ng-select2-component
Advanced tools
Comparing version 12.0.0 to 12.1.0
# Changelog of ng-select2 | ||
## V12.1.0 (2023-07-05) | ||
### Changes | ||
- improve `search` event (see `Select2ScrollEvent`) | ||
- add data on `Select2ScrollEvent` | ||
## V12.0.0 (2023-06-07) | ||
@@ -4,0 +11,0 @@ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export declare const timeout = 200; |
@@ -0,0 +0,0 @@ import * as i0 from "@angular/core"; |
@@ -36,21 +36,39 @@ import { Select2 } from './select2.component'; | ||
export interface Select2UpdateEvent<U extends Select2UpdateValue = Select2Value> { | ||
component: Select2; | ||
value: U; | ||
options: Select2Option[]; | ||
/** component */ | ||
readonly component: Select2; | ||
/** current selected value */ | ||
readonly value: U; | ||
/** selected option */ | ||
readonly options: Select2Option[]; | ||
} | ||
export interface Select2SearchEvent<U extends Select2UpdateValue = Select2Value> { | ||
component: Select2; | ||
value: U; | ||
search: string; | ||
/** component */ | ||
readonly component: Select2; | ||
/** current selected value */ | ||
readonly value: U; | ||
/** search text */ | ||
readonly search: string; | ||
/** current data source */ | ||
readonly data: Select2Data; | ||
/** method to call to update the data */ | ||
readonly filteredData: (data: Select2Data) => void; | ||
} | ||
export interface Select2RemoveEvent<U extends Select2UpdateValue = Select2Value> { | ||
component: Select2; | ||
value: U; | ||
removedOption: Select2Option; | ||
/** component */ | ||
readonly component: Select2; | ||
/** current selected value */ | ||
readonly value: U; | ||
/** remove */ | ||
readonly removedOption: Select2Option; | ||
} | ||
export interface Select2ScrollEvent { | ||
component: Select2; | ||
way: 'up' | 'down'; | ||
search: string; | ||
/** component */ | ||
readonly component: Select2; | ||
/** scroll way */ | ||
readonly way: 'up' | 'down'; | ||
/** search text */ | ||
readonly search: string; | ||
/** current data */ | ||
readonly data: Select2Data; | ||
} | ||
//# sourceMappingURL=select2-interfaces.d.ts.map |
@@ -0,0 +0,0 @@ import * as i0 from "@angular/core"; |
@@ -0,0 +0,0 @@ import { Select2Data, Select2Option, Select2UpdateValue, Select2Value } from './select2-interfaces'; |
@@ -19,3 +19,2 @@ import { ConnectedPosition } from '@angular/cdk/overlay'; | ||
placeholder: string; | ||
customSearchEnabled: boolean; | ||
limitSelection: number; | ||
@@ -75,2 +74,5 @@ listPosition: 'above' | 'below' | 'auto'; | ||
set searchText(text: string); | ||
/** Active Search event */ | ||
get customSearchEnabled(): boolean; | ||
set customSearchEnabled(value: boolean); | ||
/** minimal data of show the search field */ | ||
@@ -113,2 +115,3 @@ get minCountForSearch(): number | string; | ||
maxResultsExceeded: boolean; | ||
private _customSearchEnabled; | ||
private _minCountForSearch?; | ||
@@ -232,3 +235,2 @@ private cdkConnectedOverlay; | ||
private _dirtyCheckNativeValue; | ||
private _coerceBooleanProperty; | ||
private _focusSearchboxOrResultsElement; | ||
@@ -238,4 +240,4 @@ private _focus; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<Select2, [null, null, { optional: true; }, { optional: true; }, { optional: true; self: true; }, { attribute: "tabindex"; }]>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<Select2, "select2", never, { "data": { "alias": "data"; "required": false; }; "minCharForSearch": { "alias": "minCharForSearch"; "required": false; }; "displaySearchStatus": { "alias": "displaySearchStatus"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "customSearchEnabled": { "alias": "customSearchEnabled"; "required": false; }; "limitSelection": { "alias": "limitSelection"; "required": false; }; "listPosition": { "alias": "listPosition"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "overlay": { "alias": "overlay"; "required": false; }; "styleMode": { "alias": "styleMode"; "required": false; }; "noResultMessage": { "alias": "noResultMessage"; "required": false; }; "maxResults": { "alias": "maxResults"; "required": false; }; "maxResultsMessage": { "alias": "maxResultsMessage"; "required": false; }; "infiniteScrollDistance": { "alias": "infiniteScrollDistance"; "required": false; }; "infiniteScrollThrottle": { "alias": "infiniteScrollThrottle"; "required": false; }; "infiniteScroll": { "alias": "infiniteScroll"; "required": false; }; "autoCreate": { "alias": "autoCreate"; "required": false; }; "noLabelTemplate": { "alias": "noLabelTemplate"; "required": false; }; "editPattern": { "alias": "editPattern"; "required": false; }; "templates": { "alias": "templates"; "required": false; }; "resultMaxHeight": { "alias": "resultMaxHeight"; "required": false; }; "minCountForSearch": { "alias": "minCountForSearch"; "required": false; }; "id": { "alias": "id"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hideSelectedItems": { "alias": "hideSelectedItems"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "resettable": { "alias": "resettable"; "required": false; }; }, { "update": "update"; "open": "open"; "close": "close"; "focus": "focus"; "blur": "blur"; "search": "search"; "scroll": "scroll"; "removeOption": "removeOption"; }, never, ["select2-label", "select2-hint"], false, never>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<Select2, "select2", never, { "data": { "alias": "data"; "required": true; }; "minCharForSearch": { "alias": "minCharForSearch"; "required": false; }; "displaySearchStatus": { "alias": "displaySearchStatus"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "limitSelection": { "alias": "limitSelection"; "required": false; }; "listPosition": { "alias": "listPosition"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "overlay": { "alias": "overlay"; "required": false; }; "styleMode": { "alias": "styleMode"; "required": false; }; "noResultMessage": { "alias": "noResultMessage"; "required": false; }; "maxResults": { "alias": "maxResults"; "required": false; }; "maxResultsMessage": { "alias": "maxResultsMessage"; "required": false; }; "infiniteScrollDistance": { "alias": "infiniteScrollDistance"; "required": false; }; "infiniteScrollThrottle": { "alias": "infiniteScrollThrottle"; "required": false; }; "infiniteScroll": { "alias": "infiniteScroll"; "required": false; }; "autoCreate": { "alias": "autoCreate"; "required": false; }; "noLabelTemplate": { "alias": "noLabelTemplate"; "required": false; }; "editPattern": { "alias": "editPattern"; "required": false; }; "templates": { "alias": "templates"; "required": false; }; "resultMaxHeight": { "alias": "resultMaxHeight"; "required": false; }; "customSearchEnabled": { "alias": "customSearchEnabled"; "required": false; }; "minCountForSearch": { "alias": "minCountForSearch"; "required": false; }; "id": { "alias": "id"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hideSelectedItems": { "alias": "hideSelectedItems"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "resettable": { "alias": "resettable"; "required": false; }; }, { "update": "update"; "open": "open"; "close": "close"; "focus": "focus"; "blur": "blur"; "search": "search"; "scroll": "scroll"; "removeOption": "removeOption"; }, never, ["select2-label", "select2-hint"], false, never>; | ||
} | ||
//# sourceMappingURL=select2.component.d.ts.map |
@@ -0,0 +0,0 @@ import * as i0 from "@angular/core"; |
{ | ||
"name": "ng-select2-component", | ||
"version": "12.0.0", | ||
"version": "12.1.0", | ||
"description": "An Angular select2 component.", | ||
@@ -5,0 +5,0 @@ "author": "York Yao, Célian Veyssière", |
@@ -0,0 +0,0 @@ export * from './lib/select2-interfaces'; |
@@ -114,3 +114,2 @@ [![npm version](https://badge.fury.io/js/ng-select2-component.svg)](https://badge.fury.io/js/ng-select2-component) [![Downloads](https://img.shields.io/npm/dm/ng-select2-component.svg)](https://www.npmjs.com/package/ng-select2-component) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Harvest-Dev/ng-select2/master/LICENSE.md) | ||
```ts | ||
type Select2Data = (Select2Group | Select2Option)[]; | ||
@@ -149,28 +148,48 @@ export interface Select2Group { | ||
type Select2Value = string | number | boolean | object; | ||
export type Select2Value = string | number | boolean | object; | ||
type Select2UpdateValue = Select2Value | Select2Value[]; | ||
export type Select2UpdateValue = Select2Value | Select2Value[]; | ||
export type Select2Data = (Select2Group | Select2Option)[]; | ||
export interface Select2UpdateEvent<U extends Select2UpdateValue = Select2Value> { | ||
component: Select2; | ||
value: U; | ||
options: Select2Option[]; | ||
/** component */ | ||
readonly component: Select2; | ||
/** current selected value */ | ||
readonly value: U; | ||
/** selected option */ | ||
readonly options: Select2Option[]; | ||
} | ||
export interface Select2SearchEvent<U extends Select2UpdateValue = Select2Value> { | ||
component: Select2; | ||
value: U; | ||
search: string; | ||
/** component */ | ||
readonly component: Select2; | ||
/** current selected value */ | ||
readonly value: U; | ||
/** search text */ | ||
readonly search: string; | ||
/** current data source */ | ||
readonly data: Select2Data; | ||
/** method to call to update the data */ | ||
readonly filteredData: (data: Select2Data) => void; | ||
} | ||
export interface Select2RemoveEvent<U extends Select2UpdateValue = Select2Value> { | ||
component: Select2; | ||
value: U; | ||
removedOption: Select2Option; | ||
/** component */ | ||
readonly component: Select2; | ||
/** current selected value */ | ||
readonly value: U; | ||
/** remove */ | ||
readonly removedOption: Select2Option; | ||
} | ||
export interface Select2ScrollEvent { | ||
component: Select2; | ||
way: 'up' | 'down'; | ||
search: string; | ||
/** component */ | ||
readonly component: Select2; | ||
/** scroll way */ | ||
readonly way: 'up' | 'down'; | ||
/** search text */ | ||
readonly search: string; | ||
/** current data */ | ||
readonly data: Select2Data; | ||
} | ||
@@ -177,0 +196,0 @@ ``` |
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
520521
3369
374
0