@ni/nimble-angular 18.2.2 → 18.2.3
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/esm2020/rich-text-mention/nimble-rich-text-mention-base.directive.mjs +13 -2
- package/fesm2015/ni-nimble-angular-rich-text-mention.mjs +12 -1
- package/fesm2015/ni-nimble-angular-rich-text-mention.mjs.map +1 -1
- package/fesm2020/ni-nimble-angular-rich-text-mention.mjs +12 -1
- package/fesm2020/ni-nimble-angular-rich-text-mention.mjs.map +1 -1
- package/package.json +1 -1
- package/rich-text-mention/nimble-rich-text-mention-base.directive.d.ts +3 -1
|
@@ -14,6 +14,14 @@ export class NimbleRichTextMentionDirective {
|
|
|
14
14
|
get pattern() {
|
|
15
15
|
return this.elementRef.nativeElement.pattern;
|
|
16
16
|
}
|
|
17
|
+
get buttonLabel() {
|
|
18
|
+
return this.elementRef.nativeElement.buttonLabel;
|
|
19
|
+
}
|
|
20
|
+
// Renaming because property should have camel casing, but attribute should not
|
|
21
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
22
|
+
set buttonLabel(value) {
|
|
23
|
+
this.renderer.setProperty(this.elementRef.nativeElement, 'buttonLabel', value);
|
|
24
|
+
}
|
|
17
25
|
checkValidity() {
|
|
18
26
|
return this.elementRef.nativeElement.checkValidity();
|
|
19
27
|
}
|
|
@@ -22,10 +30,13 @@ export class NimbleRichTextMentionDirective {
|
|
|
22
30
|
}
|
|
23
31
|
}
|
|
24
32
|
NimbleRichTextMentionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NimbleRichTextMentionDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
25
|
-
NimbleRichTextMentionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: NimbleRichTextMentionDirective, inputs: { pattern: "pattern" }, ngImport: i0 });
|
|
33
|
+
NimbleRichTextMentionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: NimbleRichTextMentionDirective, inputs: { pattern: "pattern", buttonLabel: ["button-label", "buttonLabel"] }, ngImport: i0 });
|
|
26
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NimbleRichTextMentionDirective, decorators: [{
|
|
27
35
|
type: Directive
|
|
28
36
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { pattern: [{
|
|
29
37
|
type: Input
|
|
38
|
+
}], buttonLabel: [{
|
|
39
|
+
type: Input,
|
|
40
|
+
args: ['button-label']
|
|
30
41
|
}] } });
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmltYmxlLXJpY2gtdGV4dC1tZW50aW9uLWJhc2UuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmkvbmltYmxlLWFuZ3VsYXIvcmljaC10ZXh0LW1lbnRpb24vbmltYmxlLXJpY2gtdGV4dC1tZW50aW9uLWJhc2UuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQWMsS0FBSyxFQUFhLE1BQU0sZUFBZSxDQUFDOztBQVF4RTs7R0FFRztBQUVILE1BQU0sT0FBTyw4QkFBOEI7SUFtQnZDLFlBQW9DLFFBQW1CLEVBQW1CLFVBQXlCO1FBQS9ELGFBQVEsR0FBUixRQUFRLENBQVc7UUFBbUIsZUFBVSxHQUFWLFVBQVUsQ0FBZTtJQUFJLENBQUM7SUFsQnhHLElBQW9CLE9BQU8sQ0FBQyxLQUF5QjtRQUNqRCxJQUFJ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() {
|
|
16
16
|
return this.elementRef.nativeElement.pattern;
|
|
17
17
|
}
|
|
18
|
+
get buttonLabel() {
|
|
19
|
+
return this.elementRef.nativeElement.buttonLabel;
|
|
20
|
+
}
|
|
21
|
+
// Renaming because property should have camel casing, but attribute should not
|
|
22
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
23
|
+
set buttonLabel(value) {
|
|
24
|
+
this.renderer.setProperty(this.elementRef.nativeElement, 'buttonLabel', value);
|
|
25
|
+
}
|
|
18
26
|
checkValidity() {
|
|
19
27
|
return this.elementRef.nativeElement.checkValidity();
|
|
20
28
|
}
|
|
@@ -23,11 +31,14 @@ class NimbleRichTextMentionDirective {
|
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
33
|
NimbleRichTextMentionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NimbleRichTextMentionDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
26
|
-
NimbleRichTextMentionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: NimbleRichTextMentionDirective, inputs: { pattern: "pattern" }, ngImport: i0 });
|
|
34
|
+
NimbleRichTextMentionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: NimbleRichTextMentionDirective, inputs: { pattern: "pattern", buttonLabel: ["button-label", "buttonLabel"] }, ngImport: i0 });
|
|
27
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NimbleRichTextMentionDirective, decorators: [{
|
|
28
36
|
type: Directive
|
|
29
37
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { pattern: [{
|
|
30
38
|
type: Input
|
|
39
|
+
}], buttonLabel: [{
|
|
40
|
+
type: Input,
|
|
41
|
+
args: ['button-label']
|
|
31
42
|
}] } });
|
|
32
43
|
|
|
33
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ni-nimble-angular-rich-text-mention.mjs","sources":["../../../../projects/ni/nimble-angular/rich-text-mention/nimble-rich-text-mention-base.directive.ts","../../../../projects/ni/nimble-angular/rich-text-mention/ni-nimble-angular-rich-text-mention.ts"],"sourcesContent":["import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';\nimport type { RichTextMentionValidity } from '@ni/nimble-components/dist/esm/rich-text-mention/base/models/mention-validator';\nimport type { MentionUpdateEventDetail } from '@ni/nimble-components/dist/esm/rich-text-mention/base/types';\nimport type { RichTextMention } from '@ni/nimble-components/dist/esm/rich-text-mention/base';\n\nexport { RichTextMentionValidity };\nexport type { MentionUpdateEventDetail };\n\n/**\n * Base class for rich text mention directives\n */\n@Directive()\nexport class NimbleRichTextMentionDirective<T extends RichTextMention> {\n @Input() public set pattern(value: string | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'pattern', value);\n }\n\n public get pattern(): string | undefined {\n return this.elementRef.nativeElement.pattern;\n }\n\n public constructor(private readonly renderer: Renderer2, private readonly elementRef: ElementRef<T>) { }\n\n public checkValidity(): boolean {\n return this.elementRef.nativeElement.checkValidity();\n }\n\n public get validity(): RichTextMentionValidity {\n return this.elementRef.nativeElement.validity;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAQA;;AAEG;MAEU,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"ni-nimble-angular-rich-text-mention.mjs","sources":["../../../../projects/ni/nimble-angular/rich-text-mention/nimble-rich-text-mention-base.directive.ts","../../../../projects/ni/nimble-angular/rich-text-mention/ni-nimble-angular-rich-text-mention.ts"],"sourcesContent":["import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';\nimport type { RichTextMentionValidity } from '@ni/nimble-components/dist/esm/rich-text-mention/base/models/mention-validator';\nimport type { MentionUpdateEventDetail } from '@ni/nimble-components/dist/esm/rich-text-mention/base/types';\nimport type { RichTextMention } from '@ni/nimble-components/dist/esm/rich-text-mention/base';\n\nexport { RichTextMentionValidity };\nexport type { MentionUpdateEventDetail };\n\n/**\n * Base class for rich text mention directives\n */\n@Directive()\nexport class NimbleRichTextMentionDirective<T extends RichTextMention> {\n @Input() public set pattern(value: string | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'pattern', value);\n }\n\n public get pattern(): string | undefined {\n return this.elementRef.nativeElement.pattern;\n }\n\n public get buttonLabel(): string | undefined {\n return this.elementRef.nativeElement.buttonLabel;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('button-label') public set buttonLabel(value: string | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'buttonLabel', value);\n }\n\n public constructor(private readonly renderer: Renderer2, private readonly elementRef: ElementRef<T>) { }\n\n public checkValidity(): boolean {\n return this.elementRef.nativeElement.checkValidity();\n }\n\n public get validity(): RichTextMentionValidity {\n return this.elementRef.nativeElement.validity;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAQA;;AAEG;MAEU,8BAA8B,CAAA;IAmBvC,WAAoC,CAAA,QAAmB,EAAmB,UAAyB,EAAA;AAA/D,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AAAmB,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAe;KAAK;IAlBxG,IAAoB,OAAO,CAAC,KAAyB,EAAA;AACjD,QAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;KAC9E;AAED,IAAA,IAAW,OAAO,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC;KAChD;AAED,IAAA,IAAW,WAAW,GAAA;AAClB,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC;KACpD;;;IAID,IAAkC,WAAW,CAAC,KAAyB,EAAA;AACnE,QAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;KAClF;IAIM,aAAa,GAAA;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC;KACxD;AAED,IAAA,IAAW,QAAQ,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC;KACjD;;4HA3BQ,8BAA8B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;gHAA9B,8BAA8B,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,cAAA,EAAA,aAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAA9B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,SAAS;yHAEc,OAAO,EAAA,CAAA;sBAA1B,KAAK;gBAc4B,WAAW,EAAA,CAAA;sBAA5C,KAAK;uBAAC,cAAc,CAAA;;;AC3BzB;;AAEG;;;;"}
|
|
@@ -15,6 +15,14 @@ class NimbleRichTextMentionDirective {
|
|
|
15
15
|
get pattern() {
|
|
16
16
|
return this.elementRef.nativeElement.pattern;
|
|
17
17
|
}
|
|
18
|
+
get buttonLabel() {
|
|
19
|
+
return this.elementRef.nativeElement.buttonLabel;
|
|
20
|
+
}
|
|
21
|
+
// Renaming because property should have camel casing, but attribute should not
|
|
22
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
23
|
+
set buttonLabel(value) {
|
|
24
|
+
this.renderer.setProperty(this.elementRef.nativeElement, 'buttonLabel', value);
|
|
25
|
+
}
|
|
18
26
|
checkValidity() {
|
|
19
27
|
return this.elementRef.nativeElement.checkValidity();
|
|
20
28
|
}
|
|
@@ -23,11 +31,14 @@ class NimbleRichTextMentionDirective {
|
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
33
|
NimbleRichTextMentionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NimbleRichTextMentionDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
26
|
-
NimbleRichTextMentionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: NimbleRichTextMentionDirective, inputs: { pattern: "pattern" }, ngImport: i0 });
|
|
34
|
+
NimbleRichTextMentionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: NimbleRichTextMentionDirective, inputs: { pattern: "pattern", buttonLabel: ["button-label", "buttonLabel"] }, ngImport: i0 });
|
|
27
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NimbleRichTextMentionDirective, decorators: [{
|
|
28
36
|
type: Directive
|
|
29
37
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { pattern: [{
|
|
30
38
|
type: Input
|
|
39
|
+
}], buttonLabel: [{
|
|
40
|
+
type: Input,
|
|
41
|
+
args: ['button-label']
|
|
31
42
|
}] } });
|
|
32
43
|
|
|
33
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ni-nimble-angular-rich-text-mention.mjs","sources":["../../../../projects/ni/nimble-angular/rich-text-mention/nimble-rich-text-mention-base.directive.ts","../../../../projects/ni/nimble-angular/rich-text-mention/ni-nimble-angular-rich-text-mention.ts"],"sourcesContent":["import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';\nimport type { RichTextMentionValidity } from '@ni/nimble-components/dist/esm/rich-text-mention/base/models/mention-validator';\nimport type { MentionUpdateEventDetail } from '@ni/nimble-components/dist/esm/rich-text-mention/base/types';\nimport type { RichTextMention } from '@ni/nimble-components/dist/esm/rich-text-mention/base';\n\nexport { RichTextMentionValidity };\nexport type { MentionUpdateEventDetail };\n\n/**\n * Base class for rich text mention directives\n */\n@Directive()\nexport class NimbleRichTextMentionDirective<T extends RichTextMention> {\n @Input() public set pattern(value: string | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'pattern', value);\n }\n\n public get pattern(): string | undefined {\n return this.elementRef.nativeElement.pattern;\n }\n\n public constructor(private readonly renderer: Renderer2, private readonly elementRef: ElementRef<T>) { }\n\n public checkValidity(): boolean {\n return this.elementRef.nativeElement.checkValidity();\n }\n\n public get validity(): RichTextMentionValidity {\n return this.elementRef.nativeElement.validity;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAQA;;AAEG;MAEU,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"ni-nimble-angular-rich-text-mention.mjs","sources":["../../../../projects/ni/nimble-angular/rich-text-mention/nimble-rich-text-mention-base.directive.ts","../../../../projects/ni/nimble-angular/rich-text-mention/ni-nimble-angular-rich-text-mention.ts"],"sourcesContent":["import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';\nimport type { RichTextMentionValidity } from '@ni/nimble-components/dist/esm/rich-text-mention/base/models/mention-validator';\nimport type { MentionUpdateEventDetail } from '@ni/nimble-components/dist/esm/rich-text-mention/base/types';\nimport type { RichTextMention } from '@ni/nimble-components/dist/esm/rich-text-mention/base';\n\nexport { RichTextMentionValidity };\nexport type { MentionUpdateEventDetail };\n\n/**\n * Base class for rich text mention directives\n */\n@Directive()\nexport class NimbleRichTextMentionDirective<T extends RichTextMention> {\n @Input() public set pattern(value: string | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'pattern', value);\n }\n\n public get pattern(): string | undefined {\n return this.elementRef.nativeElement.pattern;\n }\n\n public get buttonLabel(): string | undefined {\n return this.elementRef.nativeElement.buttonLabel;\n }\n\n // Renaming because property should have camel casing, but attribute should not\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('button-label') public set buttonLabel(value: string | undefined) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'buttonLabel', value);\n }\n\n public constructor(private readonly renderer: Renderer2, private readonly elementRef: ElementRef<T>) { }\n\n public checkValidity(): boolean {\n return this.elementRef.nativeElement.checkValidity();\n }\n\n public get validity(): RichTextMentionValidity {\n return this.elementRef.nativeElement.validity;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAQA;;AAEG;MAEU,8BAA8B,CAAA;IAmBvC,WAAoC,CAAA,QAAmB,EAAmB,UAAyB,EAAA;QAA/D,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QAAmB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAe;KAAK;IAlBxG,IAAoB,OAAO,CAAC,KAAyB,EAAA;AACjD,QAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;KAC9E;AAED,IAAA,IAAW,OAAO,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC;KAChD;AAED,IAAA,IAAW,WAAW,GAAA;AAClB,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC;KACpD;;;IAID,IAAkC,WAAW,CAAC,KAAyB,EAAA;AACnE,QAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;KAClF;IAIM,aAAa,GAAA;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC;KACxD;AAED,IAAA,IAAW,QAAQ,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC;KACjD;;4HA3BQ,8BAA8B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;gHAA9B,8BAA8B,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,cAAA,EAAA,aAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAA9B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,SAAS;yHAEc,OAAO,EAAA,CAAA;sBAA1B,KAAK;gBAc4B,WAAW,EAAA,CAAA;sBAA5C,KAAK;uBAAC,cAAc,CAAA;;;AC3BzB;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -13,9 +13,11 @@ export declare class NimbleRichTextMentionDirective<T extends RichTextMention> {
|
|
|
13
13
|
private readonly elementRef;
|
|
14
14
|
set pattern(value: string | undefined);
|
|
15
15
|
get pattern(): string | undefined;
|
|
16
|
+
get buttonLabel(): string | undefined;
|
|
17
|
+
set buttonLabel(value: string | undefined);
|
|
16
18
|
constructor(renderer: Renderer2, elementRef: ElementRef<T>);
|
|
17
19
|
checkValidity(): boolean;
|
|
18
20
|
get validity(): RichTextMentionValidity;
|
|
19
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<NimbleRichTextMentionDirective<any>, never>;
|
|
20
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NimbleRichTextMentionDirective<any>, never, never, { "pattern": "pattern"; }, {}, never, never, false, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NimbleRichTextMentionDirective<any>, never, never, { "pattern": "pattern"; "buttonLabel": "button-label"; }, {}, never, never, false, never>;
|
|
21
23
|
}
|