🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

ngx-mentions

Package Overview
Dependencies
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-mentions - npm Package Compare versions

Comparing version

to
13.2.0

16

lib/ngx-mentions.component.d.ts

@@ -1,6 +0,6 @@

import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
import { EventEmitter, TemplateRef } from '@angular/core';
import { ChoiceWithIndices } from './text-input-autocomplete';
import { TagMouseEvent } from './text-input-highlight';
import { HighlightTag, TagMouseEvent } from './text-input-highlight';
import * as i0 from "@angular/core";
export declare class NgxMentionsComponent implements OnInit {
export declare class NgxMentionsComponent {
mentionsConfig: {

@@ -88,8 +88,8 @@ /**

tagMouseLeave: EventEmitter<TagMouseEvent>;
selectedCwis: ChoiceWithIndices[];
constructor();
ngOnInit(): void;
onSelectedChoicesChange(cwis: ChoiceWithIndices[]): void;
/**
* Array of mentions with the tag level class name if required
*/
mentions: HighlightTag[];
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMentionsComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMentionsComponent, "ngx-mentions", never, { "mentionsConfig": "mentionsConfig"; "textInputElement": "textInputElement"; "menuTemplate": "menuTemplate"; "searchRegexp": "searchRegexp"; "closeMenuOnBlur": "closeMenuOnBlur"; "removeWholeTagOnBackspace": "removeWholeTagOnBackspace"; "selectedChoices": "selectedChoices"; "refreshTagHighlighting": "refreshTagHighlighting"; "tagCssClass": "tagCssClass"; }, { "menuShow": "menuShow"; "menuHide": "menuHide"; "choiceSelected": "choiceSelected"; "choiceRemoved": "choiceRemoved"; "selectedChoicesChange": "selectedChoicesChange"; "search": "search"; "tagClick": "tagClick"; "tagMouseEnter": "tagMouseEnter"; "tagMouseLeave": "tagMouseLeave"; }, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMentionsComponent, "ngx-mentions", never, { "mentionsConfig": "mentionsConfig"; "textInputElement": "textInputElement"; "menuTemplate": "menuTemplate"; "searchRegexp": "searchRegexp"; "closeMenuOnBlur": "closeMenuOnBlur"; "removeWholeTagOnBackspace": "removeWholeTagOnBackspace"; "selectedChoices": "selectedChoices"; "refreshTagHighlighting": "refreshTagHighlighting"; "tagCssClass": "tagCssClass"; "mentions": "mentions"; }, { "menuShow": "menuShow"; "menuHide": "menuHide"; "choiceSelected": "choiceSelected"; "choiceRemoved": "choiceRemoved"; "selectedChoicesChange": "selectedChoicesChange"; "search": "search"; "tagClick": "tagClick"; "tagMouseEnter": "tagMouseEnter"; "tagMouseLeave": "tagMouseLeave"; }, never, never>;
}

@@ -10,2 +10,3 @@ import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, TemplateRef } from '@angular/core';

};
cssClass?: string;
}

@@ -86,2 +87,3 @@ export declare class TextInputAutocompleteComponent implements OnChanges, OnInit, OnDestroy {

private _cursorSelectionEnd;
private _matchMention;
menuCtrl?: {

@@ -97,6 +99,2 @@ template: TemplateRef<any>;

};
matchMention: {
triggerCharacter: string;
getChoiceLabel: (choice: any) => string;
};
constructor(ngZone: NgZone, renderer: Renderer2, changeDetectorRef: ChangeDetectorRef);

@@ -103,0 +101,0 @@ ngOnChanges(changes: SimpleChanges): void;

@@ -5,2 +5,3 @@ export interface HighlightTag {

end: number;
triggerCharacter: string;
};

@@ -7,0 +8,0 @@ cssClass?: string;

{
"name": "ngx-mentions",
"version": "13.1.0",
"version": "13.2.0",
"description": "Mentions component for Angular.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -56,3 +56,4 @@

`menuTemplate` | Reference to the menu template (used to display the search results). | `TemplateRef` | Required
| `mentionsConfig` | An array of objects representing the configuration for mentions. Each object should have the following properties:<br>---<br>`triggerCharacter`: The character that will trigger the menu to appear.<br>`getChoiceLabel`: A function that formats the selected choice and returns the label for the choice. | `{ triggerCharacter: string, getChoiceLabel: (choice: any) => string }[]` | ```typescript [ { triggerCharacter: '@', getChoiceLabel: (user: User): string => { return `@${user.name}`; }, }, { triggerCharacter: '#', getChoiceLabel: (tag: Tag): string => { return `#${tag.tag}`; }, } ]``` |
| `mentionsConfig` | An array of objects representing the configuration for mentions. Each object should have the following properties:<br>---<br>`triggerCharacter`: The character that will trigger the menu to appear.<br>`getChoiceLabel`: A function that formats the selected choice and returns the label for the choice. | `Array` | Required |
`mentions` | An array of objects containing all the selected mentions | `ChoiceWithIndices[]` | Required |
`searchRegexp` | The regular expression that will match the search text after the trigger character. No match will hide the menu. | `RegExp` | `/^\w*$/`

@@ -105,2 +106,3 @@ `closeMenuOnBlur` | Whether to close the menu when the host `textInputElement` loses focus. | `boolean` | `false`

[searchRegexp]="'^([-&.\\w]+ *){0,3}$'"
[mentions]="mentions"
[removeWholeTagOnBackspace]="true"

@@ -135,2 +137,3 @@ (search)="loadChoices($event)"

[searchRegexp]="'^([-&.\\w]+ *){0,3}$'"
[mentions]="mentions"
[removeWholeTagOnBackspace]="true"

@@ -137,0 +140,0 @@ (search)="loadChoices($event)"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet