ngx-dropdown-list 1.2.0 → 21.0.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/{fesm2020 → fesm2022}/ngx-dropdown-list.mjs +783 -721
- package/fesm2022/ngx-dropdown-list.mjs.map +1 -0
- package/ngx-dropdown-list-21.0.2.tgz +0 -0
- package/package.json +10 -18
- package/{src/ngx-dropdown-list/dropdown-list.component.d.ts → types/ngx-dropdown-list.d.ts} +109 -106
- package/esm2020/ngx-dropdown-list.mjs +0 -5
- package/esm2020/public_api.mjs +0 -2
- package/esm2020/src/ngx-dropdown-list/anchor/anchor.component.mjs +0 -149
- package/esm2020/src/ngx-dropdown-list/dropdown/dropdown.component.mjs +0 -252
- package/esm2020/src/ngx-dropdown-list/dropdown-list.component.mjs +0 -233
- package/esm2020/src/ngx-dropdown-list/dropdown-list.module.mjs +0 -38
- package/esm2020/src/ngx-dropdown-list/filter/input-filter.component.mjs +0 -44
- package/esm2020/src/ngx-dropdown-list/group-item/group-item.component.mjs +0 -25
- package/esm2020/src/ngx-dropdown-list/index.mjs +0 -3
- package/esm2020/src/ngx-dropdown-list/item/item.component.mjs +0 -77
- package/esm2020/src/ngx-dropdown-list/types/index.mjs +0 -3
- package/esm2020/src/ngx-dropdown-list/types/selection-group-items.types.mjs +0 -2
- package/esm2020/src/ngx-dropdown-list/types/selection-item.types.mjs +0 -2
- package/esm2020/src/ngx-dropdown-list/utils/util.mjs +0 -59
- package/fesm2015/ngx-dropdown-list.mjs +0 -854
- package/fesm2015/ngx-dropdown-list.mjs.map +0 -1
- package/fesm2020/ngx-dropdown-list.mjs.map +0 -1
- package/ngx-dropdown-list.d.ts +0 -5
- package/public_api.d.ts +0 -1
- package/src/ngx-dropdown-list/anchor/anchor.component.d.ts +0 -85
- package/src/ngx-dropdown-list/dropdown/dropdown.component.d.ts +0 -120
- package/src/ngx-dropdown-list/dropdown-list.module.d.ts +0 -14
- package/src/ngx-dropdown-list/filter/input-filter.component.d.ts +0 -26
- package/src/ngx-dropdown-list/group-item/group-item.component.d.ts +0 -14
- package/src/ngx-dropdown-list/index.d.ts +0 -2
- package/src/ngx-dropdown-list/item/item.component.d.ts +0 -43
- package/src/ngx-dropdown-list/types/index.d.ts +0 -2
- package/src/ngx-dropdown-list/types/selection-group-items.types.d.ts +0 -8
- package/src/ngx-dropdown-list/types/selection-item.types.d.ts +0 -9
- package/src/ngx-dropdown-list/utils/util.d.ts +0 -21
|
@@ -1,313 +1,326 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, ElementRef,
|
|
2
|
+
import { EventEmitter, ElementRef, Output, Input, ViewChild, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import {
|
|
4
|
+
import { CommonModule, DecimalPipe } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* check whether the provided items contains group
|
|
10
|
-
*/
|
|
11
|
-
function hasGroup(items) {
|
|
12
|
-
return items ? (items.find(item => item.group) != null) : false;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* clear all selections from the provide items.
|
|
16
|
-
* @param items the dropdown items, can be group or item
|
|
17
|
-
*/
|
|
18
|
-
function clearAllSelection(items) {
|
|
19
|
-
if (hasGroup(items)) {
|
|
20
|
-
for (const groupItem of items) {
|
|
21
|
-
if (groupItem.items) {
|
|
22
|
-
groupItem.items.filter(item => item.selected).forEach(item => item.selected = false);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
// clear the selection of previous selected item
|
|
28
|
-
items.filter(item => item.selected).forEach(item => item.selected = false);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* stop all propagation and default actions
|
|
33
|
-
*/
|
|
34
|
-
function stopPropagationAndDefault(event) {
|
|
35
|
-
event.stopImmediatePropagation();
|
|
36
|
-
event.stopPropagation();
|
|
37
|
-
event.preventDefault();
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* check whether the provided value is number of not
|
|
41
|
-
*/
|
|
42
|
-
function isNumber(value) {
|
|
43
|
-
return !(value == null || isNaN(value) || value.length === 0);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* get the selected item from the items list (including item and group)
|
|
47
|
-
*/
|
|
48
|
-
function getFirstSelectedItem(items) {
|
|
49
|
-
if (!items) {
|
|
50
|
-
return undefined;
|
|
51
|
-
}
|
|
52
|
-
let selectedItem;
|
|
53
|
-
if (hasGroup(items)) {
|
|
54
|
-
for (const item of items) {
|
|
55
|
-
selectedItem = item.items ? item.items.find(subItem => subItem.selected) : undefined;
|
|
56
|
-
if (selectedItem) {
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
selectedItem = items ? items.find(item => item.selected) : undefined;
|
|
63
|
-
}
|
|
64
|
-
return selectedItem;
|
|
8
|
+
/**
|
|
9
|
+
* check whether the provided items contains group
|
|
10
|
+
*/
|
|
11
|
+
function hasGroup(items) {
|
|
12
|
+
return items ? (items.find(item => item.group) != null) : false;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* clear all selections from the provide items.
|
|
16
|
+
* @param items the dropdown items, can be group or item
|
|
17
|
+
*/
|
|
18
|
+
function clearAllSelection(items) {
|
|
19
|
+
if (hasGroup(items)) {
|
|
20
|
+
for (const groupItem of items) {
|
|
21
|
+
if (groupItem.items) {
|
|
22
|
+
groupItem.items.filter(item => item.selected).forEach(item => item.selected = false);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
// clear the selection of previous selected item
|
|
28
|
+
items.filter(item => item.selected).forEach(item => item.selected = false);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* stop all propagation and default actions
|
|
33
|
+
*/
|
|
34
|
+
function stopPropagationAndDefault(event) {
|
|
35
|
+
event.stopImmediatePropagation();
|
|
36
|
+
event.stopPropagation();
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* check whether the provided value is number of not
|
|
41
|
+
*/
|
|
42
|
+
function isNumber(value) {
|
|
43
|
+
return !(value == null || isNaN(value) || value.length === 0);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* get the selected item from the items list (including item and group)
|
|
47
|
+
*/
|
|
48
|
+
function getFirstSelectedItem(items) {
|
|
49
|
+
if (!items) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
let selectedItem;
|
|
53
|
+
if (hasGroup(items)) {
|
|
54
|
+
for (const item of items) {
|
|
55
|
+
selectedItem = item.items ? item.items.find(subItem => subItem.selected) : undefined;
|
|
56
|
+
if (selectedItem) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
selectedItem = items ? items.find(item => item.selected) : undefined;
|
|
63
|
+
}
|
|
64
|
+
return selectedItem;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
class AnchorComponent {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
*
|
|
122
|
-
*/
|
|
123
|
-
get
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
67
|
+
class AnchorComponent {
|
|
68
|
+
_decimalPipe;
|
|
69
|
+
/**
|
|
70
|
+
* Child element reference of anchor
|
|
71
|
+
*/
|
|
72
|
+
anchorRef;
|
|
73
|
+
/**
|
|
74
|
+
* bind to [placeHolder] for displaying the place holder string of the anchor.
|
|
75
|
+
*/
|
|
76
|
+
placeHolder;
|
|
77
|
+
/**
|
|
78
|
+
* bind to [checkbox] for checking whether the clearance flag should be shown or not.
|
|
79
|
+
*/
|
|
80
|
+
checkbox = false;
|
|
81
|
+
/**
|
|
82
|
+
* bind to [suffixText] for displaying the suffix of the selected text of anchor
|
|
83
|
+
*/
|
|
84
|
+
suffixText;
|
|
85
|
+
/**
|
|
86
|
+
* bind to [allowClear] for enabling the clearance (clearance is not avaiable when checkbox is enabled)
|
|
87
|
+
*/
|
|
88
|
+
allowClear = true;
|
|
89
|
+
/**
|
|
90
|
+
* bind to [formatNumber] for show formatted number text
|
|
91
|
+
*/
|
|
92
|
+
formatNumber;
|
|
93
|
+
/**
|
|
94
|
+
* bind to [selectedText] for displaying the selected text on anchor
|
|
95
|
+
*/
|
|
96
|
+
selectedText;
|
|
97
|
+
/**
|
|
98
|
+
* bind to [openStatus], it's the visibility status of dropdown, for showing the arrow on anchor
|
|
99
|
+
*/
|
|
100
|
+
openStatus = false;
|
|
101
|
+
/**
|
|
102
|
+
* bind to [disabled] for disabling the anchor
|
|
103
|
+
*/
|
|
104
|
+
disabled = false;
|
|
105
|
+
/**
|
|
106
|
+
* will be triggered when clicking the anchor
|
|
107
|
+
*/
|
|
108
|
+
anchorClick = new EventEmitter();
|
|
109
|
+
/**
|
|
110
|
+
* will be triggered when clicking the clearance
|
|
111
|
+
*/
|
|
112
|
+
clearanceClick = new EventEmitter();
|
|
113
|
+
/**
|
|
114
|
+
* length of anchor element, used for calculate the string length of the anchor displayed text.
|
|
115
|
+
*/
|
|
116
|
+
anchorLength;
|
|
117
|
+
constructor(_decimalPipe) {
|
|
118
|
+
this._decimalPipe = _decimalPipe;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* flag for showing the clearance flag
|
|
122
|
+
*/
|
|
123
|
+
get showClearanceFlag() {
|
|
124
|
+
return !this.checkbox && this.selectedText && this.allowClear;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* the text displays on anchor
|
|
128
|
+
*/
|
|
129
|
+
get anchorDisplayText() {
|
|
130
|
+
let anchorDisplayText = this.selectedText ? (this.formatNumber ? (isNumber(this.selectedText) ?
|
|
131
|
+
this._decimalPipe.transform(this.selectedText, '1.0-2') : this.selectedText) :
|
|
132
|
+
this.selectedText) + (this.suffixText ? this.suffixText : '') : this.placeHolder;
|
|
133
|
+
let charLength = 1;
|
|
134
|
+
if (this.showClearanceFlag && this.anchorLength > 0) {
|
|
135
|
+
charLength = Math.floor((this.anchorLength - 50) / 7);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
charLength = Math.floor((this.anchorLength - 50) / 7);
|
|
139
|
+
}
|
|
140
|
+
if (anchorDisplayText.length > charLength) {
|
|
141
|
+
anchorDisplayText = anchorDisplayText.slice(0, charLength - 2) + '...';
|
|
142
|
+
}
|
|
143
|
+
return anchorDisplayText;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* anchor CSS class
|
|
147
|
+
*/
|
|
148
|
+
get anchorClass() {
|
|
149
|
+
let anchorClassStatusPart;
|
|
150
|
+
let anchorClassFontColor;
|
|
151
|
+
if (this.disabled) {
|
|
152
|
+
anchorClassStatusPart = 'selection-anchor-disabled';
|
|
153
|
+
anchorClassFontColor = 'place-holder';
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
if (this.openStatus) {
|
|
157
|
+
anchorClassStatusPart = 'selection-anchor-open';
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
anchorClassStatusPart = 'selection-anchor-close';
|
|
161
|
+
}
|
|
162
|
+
if (this.selectedText != null) {
|
|
163
|
+
anchorClassFontColor = 'selected-item';
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
anchorClassFontColor = 'place-holder';
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return `${anchorClassStatusPart} ${anchorClassFontColor}`;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* triggered when clicking the anchor
|
|
173
|
+
*/
|
|
174
|
+
onAnchorClick(event) {
|
|
175
|
+
this.anchorClick.emit(event);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* triggered with (blur) of anchor
|
|
179
|
+
*/
|
|
180
|
+
onAnchorBlur(event) {
|
|
181
|
+
stopPropagationAndDefault(event);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* triggered when clicking the clearance
|
|
185
|
+
*/
|
|
186
|
+
onClearanceClick(event) {
|
|
187
|
+
this.clearanceClick.emit(event);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* triggered when resizing, get the clientWidth of anchor
|
|
191
|
+
*/
|
|
192
|
+
onResize() {
|
|
193
|
+
this.anchorLength = this.anchorRef ? this.anchorRef.nativeElement ? this.anchorRef.nativeElement.clientWidth : 0 : 0;
|
|
194
|
+
}
|
|
195
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: AnchorComponent, deps: [{ token: i1.DecimalPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
196
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: AnchorComponent, isStandalone: true, selector: "anchor", inputs: { placeHolder: "placeHolder", checkbox: "checkbox", suffixText: "suffixText", allowClear: "allowClear", formatNumber: "formatNumber", selectedText: "selectedText", openStatus: "openStatus", disabled: "disabled" }, outputs: { anchorClick: "anchorClick", clearanceClick: "clearanceClick" }, providers: [DecimalPipe], viewQueries: [{ propertyName: "anchorRef", first: true, predicate: ["anchor"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
173
197
|
<span #anchor tabindex="2" [ngClass]="anchorClass" (window:resize)="onResize()"
|
|
174
198
|
(mousedown)="onAnchorClick($event)" (blur)="onAnchorBlur($event)"> {{anchorDisplayText}}
|
|
175
199
|
<span #selectionClearance class="selection-clearance" (mousedown)="onClearanceClick($event)" *ngIf="showClearanceFlag">×</span>
|
|
176
200
|
</span>
|
|
177
|
-
`, isInline: true, styles: ["@charset \"UTF-8\";*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.vertical-center,.selection-anchor-close:after,.selection-anchor-open:after,.selection-anchor-disabled:after{position:absolute;top:50
|
|
178
|
-
|
|
179
|
-
|
|
201
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.vertical-center,.selection-anchor-close:after,.selection-anchor-open:after,.selection-anchor-disabled:after{position:absolute;top:50%;-ms-transform:translateY(-50%);transform:translateY(-50%)}.hover-box,.selection-anchor-close:hover{outline:0;box-shadow:0 0 6px #23adff;border-radius:4px}.anchor-box,.selection-anchor-disabled,.selection-anchor,.selection-anchor-close,.selection-anchor-open{height:100%;border-radius:4px;width:100%;position:relative;display:inline-block;padding:8px 12px 5px;border:1px solid;outline:0;box-shadow:inset 0 1px 1px #00000013;box-sizing:border-box;white-space:nowrap}.selection-anchor,.selection-anchor-close,.selection-anchor-open{cursor:pointer}.selection-anchor .selection-clearance,.selection-anchor-close .selection-clearance,.selection-anchor-open .selection-clearance{position:absolute;right:35px;font-weight:700}.selection-anchor .selection-clearance:hover,.selection-anchor-close .selection-clearance:hover,.selection-anchor-open .selection-clearance:hover{color:#000}.selection-anchor:focus,.selection-anchor-close:focus,.selection-anchor-open:focus{box-shadow:inset 0 1px 1px #00000013,0 0 8px #66afe999;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;border-color:#66afe9}.selection-anchor-disabled{border-color:#ccc;cursor:default;pointer-events:none;background:#f8f8f8;-webkit-filter:opacity(50%);filter:opacity(50%)}.selection-anchor-disabled:after{font-size:9px;content:\"\\25bc\";right:10px;padding-bottom:3px}.selection-anchor-open{border-bottom:none;border-bottom-right-radius:0;border-bottom-left-radius:0;border-color:#66afe9}.selection-anchor-open:after{font-size:9px;content:\"\\25b2\";right:10px;padding-bottom:3px}.selection-anchor-close{border-color:#ccc}.selection-anchor-close:after{font-size:9px;content:\"\\25bc\";right:10px;padding-bottom:3px}.place-holder{color:#999}.selected-item{color:#495057}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
202
|
+
}
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: AnchorComponent, decorators: [{
|
|
204
|
+
type: Component,
|
|
180
205
|
args: [{ selector: 'anchor', template: `
|
|
181
206
|
<span #anchor tabindex="2" [ngClass]="anchorClass" (window:resize)="onResize()"
|
|
182
207
|
(mousedown)="onAnchorClick($event)" (blur)="onAnchorBlur($event)"> {{anchorDisplayText}}
|
|
183
208
|
<span #selectionClearance class="selection-clearance" (mousedown)="onClearanceClick($event)" *ngIf="showClearanceFlag">×</span>
|
|
184
209
|
</span>
|
|
185
|
-
`, providers: [DecimalPipe], styles: ["@charset \"UTF-8\";*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.vertical-center,.selection-anchor-close:after,.selection-anchor-open:after,.selection-anchor-disabled:after{position:absolute;top:50
|
|
186
|
-
}], ctorParameters:
|
|
187
|
-
type: ViewChild,
|
|
188
|
-
args: ['anchor', { read: ElementRef }]
|
|
189
|
-
}], placeHolder: [{
|
|
190
|
-
type: Input
|
|
191
|
-
}], checkbox: [{
|
|
192
|
-
type: Input
|
|
193
|
-
}], suffixText: [{
|
|
194
|
-
type: Input
|
|
195
|
-
}], allowClear: [{
|
|
196
|
-
type: Input
|
|
197
|
-
}], formatNumber: [{
|
|
198
|
-
type: Input
|
|
199
|
-
}], selectedText: [{
|
|
200
|
-
type: Input
|
|
201
|
-
}], openStatus: [{
|
|
202
|
-
type: Input
|
|
203
|
-
}], disabled: [{
|
|
204
|
-
type: Input
|
|
205
|
-
}], anchorClick: [{
|
|
206
|
-
type: Output
|
|
207
|
-
}], clearanceClick: [{
|
|
208
|
-
type: Output
|
|
210
|
+
`, imports: [CommonModule], providers: [DecimalPipe], styles: ["@charset \"UTF-8\";*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.vertical-center,.selection-anchor-close:after,.selection-anchor-open:after,.selection-anchor-disabled:after{position:absolute;top:50%;-ms-transform:translateY(-50%);transform:translateY(-50%)}.hover-box,.selection-anchor-close:hover{outline:0;box-shadow:0 0 6px #23adff;border-radius:4px}.anchor-box,.selection-anchor-disabled,.selection-anchor,.selection-anchor-close,.selection-anchor-open{height:100%;border-radius:4px;width:100%;position:relative;display:inline-block;padding:8px 12px 5px;border:1px solid;outline:0;box-shadow:inset 0 1px 1px #00000013;box-sizing:border-box;white-space:nowrap}.selection-anchor,.selection-anchor-close,.selection-anchor-open{cursor:pointer}.selection-anchor .selection-clearance,.selection-anchor-close .selection-clearance,.selection-anchor-open .selection-clearance{position:absolute;right:35px;font-weight:700}.selection-anchor .selection-clearance:hover,.selection-anchor-close .selection-clearance:hover,.selection-anchor-open .selection-clearance:hover{color:#000}.selection-anchor:focus,.selection-anchor-close:focus,.selection-anchor-open:focus{box-shadow:inset 0 1px 1px #00000013,0 0 8px #66afe999;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;border-color:#66afe9}.selection-anchor-disabled{border-color:#ccc;cursor:default;pointer-events:none;background:#f8f8f8;-webkit-filter:opacity(50%);filter:opacity(50%)}.selection-anchor-disabled:after{font-size:9px;content:\"\\25bc\";right:10px;padding-bottom:3px}.selection-anchor-open{border-bottom:none;border-bottom-right-radius:0;border-bottom-left-radius:0;border-color:#66afe9}.selection-anchor-open:after{font-size:9px;content:\"\\25b2\";right:10px;padding-bottom:3px}.selection-anchor-close{border-color:#ccc}.selection-anchor-close:after{font-size:9px;content:\"\\25bc\";right:10px;padding-bottom:3px}.place-holder{color:#999}.selected-item{color:#495057}\n"] }]
|
|
211
|
+
}], ctorParameters: () => [{ type: i1.DecimalPipe }], propDecorators: { anchorRef: [{
|
|
212
|
+
type: ViewChild,
|
|
213
|
+
args: ['anchor', { read: ElementRef }]
|
|
214
|
+
}], placeHolder: [{
|
|
215
|
+
type: Input
|
|
216
|
+
}], checkbox: [{
|
|
217
|
+
type: Input
|
|
218
|
+
}], suffixText: [{
|
|
219
|
+
type: Input
|
|
220
|
+
}], allowClear: [{
|
|
221
|
+
type: Input
|
|
222
|
+
}], formatNumber: [{
|
|
223
|
+
type: Input
|
|
224
|
+
}], selectedText: [{
|
|
225
|
+
type: Input
|
|
226
|
+
}], openStatus: [{
|
|
227
|
+
type: Input
|
|
228
|
+
}], disabled: [{
|
|
229
|
+
type: Input
|
|
230
|
+
}], anchorClick: [{
|
|
231
|
+
type: Output
|
|
232
|
+
}], clearanceClick: [{
|
|
233
|
+
type: Output
|
|
209
234
|
}] } });
|
|
210
235
|
|
|
211
|
-
class InputFilterComponent {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
236
|
+
class InputFilterComponent {
|
|
237
|
+
/**
|
|
238
|
+
* bind to [filterValue], the value of the filter
|
|
239
|
+
*/
|
|
240
|
+
filterValue;
|
|
241
|
+
/**
|
|
242
|
+
* bind to [inputFilterBlur], emits with (blur) of filter input box
|
|
243
|
+
*/
|
|
244
|
+
inputFilterBlur = new EventEmitter();
|
|
245
|
+
/**
|
|
246
|
+
* bind to [filterValueChange], for 2-way binding of filterValue
|
|
247
|
+
*/
|
|
248
|
+
filterValueChange = new EventEmitter();
|
|
249
|
+
/**
|
|
250
|
+
* triggers with (blur) event, emits the (inputFilterBlur) event
|
|
251
|
+
*/
|
|
252
|
+
onFilterTextBlur(event) {
|
|
253
|
+
this.inputFilterBlur.emit(event);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* triggers with (input) event, emits the (filterValueChange) event for 2-way binding of filterValue
|
|
257
|
+
*/
|
|
258
|
+
onChange() {
|
|
259
|
+
this.filterValueChange.emit(this.filterValue);
|
|
260
|
+
}
|
|
261
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: InputFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
262
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: InputFilterComponent, isStandalone: true, selector: "input-filter", inputs: { filterValue: "filterValue" }, outputs: { inputFilterBlur: "inputFilterBlur", filterValueChange: "filterValueChange" }, ngImport: i0, template: `
|
|
237
263
|
<input type="text" class="filter-box" [(ngModel)]="filterValue" (input)="onChange()" (blur)="onFilterTextBlur($event)">
|
|
238
|
-
`, isInline: true, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.filter-box{width:calc(100% - 10px);height:28px;border-radius:4px;border:1px solid #ccc;margin:1px 5px 5px;padding-left:5px;font-size:12px;box-sizing:border-box;color:#495057}.filter-box:focus{outline:0;border-color:#ccc}\n"],
|
|
239
|
-
|
|
240
|
-
|
|
264
|
+
`, isInline: true, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.filter-box{width:calc(100% - 10px);height:28px;border-radius:4px;border:1px solid #ccc;margin:1px 5px 5px;padding-left:5px;font-size:12px;box-sizing:border-box;color:#495057}.filter-box:focus{outline:0;border-color:#ccc}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
265
|
+
}
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: InputFilterComponent, decorators: [{
|
|
267
|
+
type: Component,
|
|
241
268
|
args: [{ selector: 'input-filter', template: `
|
|
242
269
|
<input type="text" class="filter-box" [(ngModel)]="filterValue" (input)="onChange()" (blur)="onFilterTextBlur($event)">
|
|
243
|
-
`, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.filter-box{width:calc(100% - 10px);height:28px;border-radius:4px;border:1px solid #ccc;margin:1px 5px 5px;padding-left:5px;font-size:12px;box-sizing:border-box;color:#495057}.filter-box:focus{outline:0;border-color:#ccc}\n"] }]
|
|
244
|
-
}], propDecorators: { filterValue: [{
|
|
245
|
-
type: Input
|
|
246
|
-
}], inputFilterBlur: [{
|
|
247
|
-
type: Output
|
|
248
|
-
}], filterValueChange: [{
|
|
249
|
-
type: Output
|
|
250
|
-
}] } });
|
|
251
|
-
|
|
252
|
-
class GroupItemComponent {
|
|
253
|
-
/**
|
|
254
|
-
* prevent all clicking event from happening
|
|
255
|
-
*/
|
|
256
|
-
onItemGroupClick(event) {
|
|
257
|
-
event.stopImmediatePropagation();
|
|
258
|
-
event.stopPropagation();
|
|
259
|
-
event.preventDefault();
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
GroupItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
263
|
-
GroupItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: GroupItemComponent, selector: "group-item", inputs: { item: "item" }, ngImport: i0, template: `
|
|
264
|
-
<label class="dropdown-item dropdown-item-group" (mousedown)="onItemGroupClick($event)">{{item.group}}</label>
|
|
265
|
-
`, isInline: true, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown-item,.container-selection,.container-selection-selected,.container-checkbox{background:transparent;display:list-item;list-style:none;position:relative;width:100%;height:auto;cursor:pointer;color:#495057;padding-bottom:5px;padding-top:5px;padding-left:12px}.container-checkbox{padding-left:35px}.container-checkbox input{position:absolute;opacity:0;cursor:pointer}.container-checkbox .checkmark{position:absolute;top:5px;left:10px;height:15px;width:15px;border:1px solid rgba(0,0,0,.3);background-color:#fff;border-radius:4px}.container-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:4px;height:7px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}.container-checkbox:hover input~.checkmark{background-color:#ccc}.container-checkbox input:checked~.checkmark{background-color:#2196f3;border:1px solid #2196F3}.container-checkbox input:checked~.checkmark:after{display:block}.container-checkbox:hover{color:#66afe9}.container-selection,.container-selection-selected{padding-left:12px}.container-selection:hover,.container-selection-selected:hover{color:#495057;background:lightcyan}.container-selection-selected{color:#fff;background:cornflowerblue}.dropdown-item-group{font-weight:700}.dropdown-item-group:hover{cursor:default}\n"] });
|
|
266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GroupItemComponent, decorators: [{
|
|
267
|
-
type: Component,
|
|
268
|
-
args: [{ selector: 'group-item', template: `
|
|
269
|
-
<label class="dropdown-item dropdown-item-group" (mousedown)="onItemGroupClick($event)">{{item.group}}</label>
|
|
270
|
-
`, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown-item,.container-selection,.container-selection-selected,.container-checkbox{background:transparent;display:list-item;list-style:none;position:relative;width:100%;height:auto;cursor:pointer;color:#495057;padding-bottom:5px;padding-top:5px;padding-left:12px}.container-checkbox{padding-left:35px}.container-checkbox input{position:absolute;opacity:0;cursor:pointer}.container-checkbox .checkmark{position:absolute;top:5px;left:10px;height:15px;width:15px;border:1px solid rgba(0,0,0,.3);background-color:#fff;border-radius:4px}.container-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:4px;height:7px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}.container-checkbox:hover input~.checkmark{background-color:#ccc}.container-checkbox input:checked~.checkmark{background-color:#2196f3;border:1px solid #2196F3}.container-checkbox input:checked~.checkmark:after{display:block}.container-checkbox:hover{color:#66afe9}.container-selection,.container-selection-selected{padding-left:12px}.container-selection:hover,.container-selection-selected:hover{color:#495057;background:lightcyan}.container-selection-selected{color:#fff;background:cornflowerblue}.dropdown-item-group{font-weight:700}.dropdown-item-group:hover{cursor:default}\n"] }]
|
|
271
|
-
}], propDecorators: { item: [{
|
|
272
|
-
type: Input
|
|
270
|
+
`, imports: [FormsModule], styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.filter-box{width:calc(100% - 10px);height:28px;border-radius:4px;border:1px solid #ccc;margin:1px 5px 5px;padding-left:5px;font-size:12px;box-sizing:border-box;color:#495057}.filter-box:focus{outline:0;border-color:#ccc}\n"] }]
|
|
271
|
+
}], propDecorators: { filterValue: [{
|
|
272
|
+
type: Input
|
|
273
|
+
}], inputFilterBlur: [{
|
|
274
|
+
type: Output
|
|
275
|
+
}], filterValueChange: [{
|
|
276
|
+
type: Output
|
|
273
277
|
}] } });
|
|
274
278
|
|
|
275
|
-
class ItemComponent {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
*
|
|
298
|
-
*/
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
279
|
+
class ItemComponent {
|
|
280
|
+
/**
|
|
281
|
+
* bind to [checkbox], the flag of checkbox mode
|
|
282
|
+
*/
|
|
283
|
+
checkbox;
|
|
284
|
+
/**
|
|
285
|
+
* bind to [item], the dropdown option item
|
|
286
|
+
*/
|
|
287
|
+
item;
|
|
288
|
+
/**
|
|
289
|
+
* bind to [formatNumber], the flag for formatting the number
|
|
290
|
+
*/
|
|
291
|
+
formatNumber = false;
|
|
292
|
+
/**
|
|
293
|
+
* bind to [suffixText], the suffixText that will be displayed in the dropdown
|
|
294
|
+
*/
|
|
295
|
+
suffixText;
|
|
296
|
+
/**
|
|
297
|
+
* bind to [itemClick] event, triggers when clicking the item of dropdown
|
|
298
|
+
*/
|
|
299
|
+
itemClick = new EventEmitter();
|
|
300
|
+
/**
|
|
301
|
+
* bind to [checkStatusChange] event, triggers when check status is changed in checkbox mode.
|
|
302
|
+
*/
|
|
303
|
+
checkStatusChange = new EventEmitter();
|
|
304
|
+
/**
|
|
305
|
+
* check whether needs to format number for the provided text
|
|
306
|
+
*/
|
|
307
|
+
needFormatNumber(value) {
|
|
308
|
+
return isNumber(value) && this.formatNumber;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* triggered when clicking the item, emits the [itemClick] event
|
|
312
|
+
*/
|
|
313
|
+
onItemClick(item) {
|
|
314
|
+
this.itemClick.emit(item);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* triggered when checking status changed in checkbox mode, emits the [checkStatusChange] event
|
|
318
|
+
*/
|
|
319
|
+
onCheckStatusChange(item) {
|
|
320
|
+
this.checkStatusChange.emit(item);
|
|
321
|
+
}
|
|
322
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
323
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: ItemComponent, isStandalone: true, selector: "item", inputs: { checkbox: "checkbox", item: "item", formatNumber: "formatNumber", suffixText: "suffixText" }, outputs: { itemClick: "itemClick", checkStatusChange: "checkStatusChange" }, ngImport: i0, template: `
|
|
311
324
|
<label [class.container-checkbox]="checkbox"
|
|
312
325
|
[class.container-selection]="!checkbox && !item.selected"
|
|
313
326
|
[class.container-selection-selected]="!checkbox && item.selected"
|
|
@@ -317,9 +330,10 @@ ItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
317
330
|
<input type='checkbox' [id]="'checkbox-'+item.text" (change)="onCheckStatusChange(item)" [checked]="item.selected">
|
|
318
331
|
<span class="checkmark" [id]="'checkmark-'+item.text"></span>
|
|
319
332
|
</ng-container>
|
|
320
|
-
</label>`, isInline: true, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown-item,.container-selection,.container-selection-selected,.container-checkbox{background:transparent;display:list-item;list-style:none;position:relative;width:100%;height:auto;cursor:pointer;color:#495057;padding-bottom:5px;padding-top:5px;padding-left:12px}.container-checkbox{padding-left:35px}.container-checkbox input{position:absolute;opacity:0;cursor:pointer}.container-checkbox .checkmark{position:absolute;top:5px;left:10px;height:15px;width:15px;border:1px solid rgba(0,0,0,.3);background-color:#fff;border-radius:4px}.container-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:4px;height:7px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}.container-checkbox:hover input~.checkmark{background-color:#ccc}.container-checkbox input:checked~.checkmark{background-color:#2196f3;border:1px solid #2196F3}.container-checkbox input:checked~.checkmark:after{display:block}.container-checkbox:hover{color:#66afe9}.container-selection,.container-selection-selected{padding-left:12px}.container-selection:hover,.container-selection-selected:hover{color:#495057;background
|
|
321
|
-
|
|
322
|
-
|
|
333
|
+
</label>`, isInline: true, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown-item,.container-selection,.container-selection-selected,.container-checkbox{background:transparent;display:list-item;list-style:none;position:relative;width:100%;height:auto;cursor:pointer;color:#495057;padding-bottom:5px;padding-top:5px;padding-left:12px}.container-checkbox{padding-left:35px}.container-checkbox input{position:absolute;opacity:0;cursor:pointer}.container-checkbox .checkmark{position:absolute;top:5px;left:10px;height:15px;width:15px;border:1px solid rgba(0,0,0,.3);background-color:#fff;border-radius:4px}.container-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:4px;height:7px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.container-checkbox:hover input~.checkmark{background-color:#ccc}.container-checkbox input:checked~.checkmark{background-color:#2196f3;border:1px solid #2196F3}.container-checkbox input:checked~.checkmark:after{display:block}.container-checkbox:hover{color:#66afe9}.container-selection,.container-selection-selected{padding-left:12px}.container-selection:hover,.container-selection-selected:hover{color:#495057;background:#e0ffff}.container-selection-selected{color:#fff;background:#6495ed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: DecimalPipe, name: "number" }] });
|
|
334
|
+
}
|
|
335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ItemComponent, decorators: [{
|
|
336
|
+
type: Component,
|
|
323
337
|
args: [{ selector: 'item', template: `
|
|
324
338
|
<label [class.container-checkbox]="checkbox"
|
|
325
339
|
[class.container-selection]="!checkbox && !item.selected"
|
|
@@ -330,191 +344,247 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
330
344
|
<input type='checkbox' [id]="'checkbox-'+item.text" (change)="onCheckStatusChange(item)" [checked]="item.selected">
|
|
331
345
|
<span class="checkmark" [id]="'checkmark-'+item.text"></span>
|
|
332
346
|
</ng-container>
|
|
333
|
-
</label>`, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown-item,.container-selection,.container-selection-selected,.container-checkbox{background:transparent;display:list-item;list-style:none;position:relative;width:100%;height:auto;cursor:pointer;color:#495057;padding-bottom:5px;padding-top:5px;padding-left:12px}.container-checkbox{padding-left:35px}.container-checkbox input{position:absolute;opacity:0;cursor:pointer}.container-checkbox .checkmark{position:absolute;top:5px;left:10px;height:15px;width:15px;border:1px solid rgba(0,0,0,.3);background-color:#fff;border-radius:4px}.container-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:4px;height:7px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}.container-checkbox:hover input~.checkmark{background-color:#ccc}.container-checkbox input:checked~.checkmark{background-color:#2196f3;border:1px solid #2196F3}.container-checkbox input:checked~.checkmark:after{display:block}.container-checkbox:hover{color:#66afe9}.container-selection,.container-selection-selected{padding-left:12px}.container-selection:hover,.container-selection-selected:hover{color:#495057;background
|
|
334
|
-
}], propDecorators: { checkbox: [{
|
|
335
|
-
type: Input
|
|
336
|
-
}], item: [{
|
|
337
|
-
type: Input
|
|
338
|
-
}], formatNumber: [{
|
|
339
|
-
type: Input
|
|
340
|
-
}], suffixText: [{
|
|
341
|
-
type: Input
|
|
342
|
-
}], itemClick: [{
|
|
343
|
-
type: Output
|
|
344
|
-
}], checkStatusChange: [{
|
|
345
|
-
type: Output
|
|
347
|
+
</label>`, imports: [DecimalPipe, CommonModule], styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown-item,.container-selection,.container-selection-selected,.container-checkbox{background:transparent;display:list-item;list-style:none;position:relative;width:100%;height:auto;cursor:pointer;color:#495057;padding-bottom:5px;padding-top:5px;padding-left:12px}.container-checkbox{padding-left:35px}.container-checkbox input{position:absolute;opacity:0;cursor:pointer}.container-checkbox .checkmark{position:absolute;top:5px;left:10px;height:15px;width:15px;border:1px solid rgba(0,0,0,.3);background-color:#fff;border-radius:4px}.container-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:4px;height:7px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.container-checkbox:hover input~.checkmark{background-color:#ccc}.container-checkbox input:checked~.checkmark{background-color:#2196f3;border:1px solid #2196F3}.container-checkbox input:checked~.checkmark:after{display:block}.container-checkbox:hover{color:#66afe9}.container-selection,.container-selection-selected{padding-left:12px}.container-selection:hover,.container-selection-selected:hover{color:#495057;background:#e0ffff}.container-selection-selected{color:#fff;background:#6495ed}\n"] }]
|
|
348
|
+
}], propDecorators: { checkbox: [{
|
|
349
|
+
type: Input
|
|
350
|
+
}], item: [{
|
|
351
|
+
type: Input
|
|
352
|
+
}], formatNumber: [{
|
|
353
|
+
type: Input
|
|
354
|
+
}], suffixText: [{
|
|
355
|
+
type: Input
|
|
356
|
+
}], itemClick: [{
|
|
357
|
+
type: Output
|
|
358
|
+
}], checkStatusChange: [{
|
|
359
|
+
type: Output
|
|
346
360
|
}] } });
|
|
347
361
|
|
|
348
|
-
class
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
*
|
|
394
|
-
*/
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
*
|
|
426
|
-
*/
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
if (
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
this.
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
|
|
362
|
+
class GroupItemComponent {
|
|
363
|
+
/**
|
|
364
|
+
* bind to [item], the group item of dropdown
|
|
365
|
+
*/
|
|
366
|
+
item;
|
|
367
|
+
/**
|
|
368
|
+
* prevent all clicking event from happening
|
|
369
|
+
*/
|
|
370
|
+
onItemGroupClick(event) {
|
|
371
|
+
event.stopImmediatePropagation();
|
|
372
|
+
event.stopPropagation();
|
|
373
|
+
event.preventDefault();
|
|
374
|
+
}
|
|
375
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: GroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
376
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: GroupItemComponent, isStandalone: true, selector: "group-item", inputs: { item: "item" }, ngImport: i0, template: `
|
|
377
|
+
<label class="dropdown-item dropdown-item-group" (mousedown)="onItemGroupClick($event)">{{item.group}}</label>
|
|
378
|
+
`, isInline: true, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown-item,.container-selection,.container-selection-selected,.container-checkbox{background:transparent;display:list-item;list-style:none;position:relative;width:100%;height:auto;cursor:pointer;color:#495057;padding-bottom:5px;padding-top:5px;padding-left:12px}.container-checkbox{padding-left:35px}.container-checkbox input{position:absolute;opacity:0;cursor:pointer}.container-checkbox .checkmark{position:absolute;top:5px;left:10px;height:15px;width:15px;border:1px solid rgba(0,0,0,.3);background-color:#fff;border-radius:4px}.container-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:4px;height:7px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.container-checkbox:hover input~.checkmark{background-color:#ccc}.container-checkbox input:checked~.checkmark{background-color:#2196f3;border:1px solid #2196F3}.container-checkbox input:checked~.checkmark:after{display:block}.container-checkbox:hover{color:#66afe9}.container-selection,.container-selection-selected{padding-left:12px}.container-selection:hover,.container-selection-selected:hover{color:#495057;background:#e0ffff}.container-selection-selected{color:#fff;background:#6495ed}.dropdown-item-group{font-weight:700}.dropdown-item-group:hover{cursor:default}\n"] });
|
|
379
|
+
}
|
|
380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: GroupItemComponent, decorators: [{
|
|
381
|
+
type: Component,
|
|
382
|
+
args: [{ selector: 'group-item', template: `
|
|
383
|
+
<label class="dropdown-item dropdown-item-group" (mousedown)="onItemGroupClick($event)">{{item.group}}</label>
|
|
384
|
+
`, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown-item,.container-selection,.container-selection-selected,.container-checkbox{background:transparent;display:list-item;list-style:none;position:relative;width:100%;height:auto;cursor:pointer;color:#495057;padding-bottom:5px;padding-top:5px;padding-left:12px}.container-checkbox{padding-left:35px}.container-checkbox input{position:absolute;opacity:0;cursor:pointer}.container-checkbox .checkmark{position:absolute;top:5px;left:10px;height:15px;width:15px;border:1px solid rgba(0,0,0,.3);background-color:#fff;border-radius:4px}.container-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:4px;height:7px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.container-checkbox:hover input~.checkmark{background-color:#ccc}.container-checkbox input:checked~.checkmark{background-color:#2196f3;border:1px solid #2196F3}.container-checkbox input:checked~.checkmark:after{display:block}.container-checkbox:hover{color:#66afe9}.container-selection,.container-selection-selected{padding-left:12px}.container-selection:hover,.container-selection-selected:hover{color:#495057;background:#e0ffff}.container-selection-selected{color:#fff;background:#6495ed}.dropdown-item-group{font-weight:700}.dropdown-item-group:hover{cursor:default}\n"] }]
|
|
385
|
+
}], propDecorators: { item: [{
|
|
386
|
+
type: Input
|
|
387
|
+
}] } });
|
|
388
|
+
|
|
389
|
+
class DropdownComponent {
|
|
390
|
+
/**
|
|
391
|
+
* Child element reference of dropdown
|
|
392
|
+
*/
|
|
393
|
+
dropdownRef;
|
|
394
|
+
/**
|
|
395
|
+
* Child element reference of filter input text
|
|
396
|
+
*/
|
|
397
|
+
filterInputRef;
|
|
398
|
+
/**
|
|
399
|
+
* bind to [placeHolder] for displaying the place holder string of the anchor.
|
|
400
|
+
*/
|
|
401
|
+
placeHolder;
|
|
402
|
+
/**
|
|
403
|
+
* bind to [items] for the options/groups in the dropdown
|
|
404
|
+
*/
|
|
405
|
+
items;
|
|
406
|
+
/**
|
|
407
|
+
* bind to [checkbox], the flag for multi-select (checkbox) mode.
|
|
408
|
+
*/
|
|
409
|
+
checkbox = false;
|
|
410
|
+
/**
|
|
411
|
+
* bind to [selectedValue] for the value of the selected option from dropdown
|
|
412
|
+
*/
|
|
413
|
+
selectedValue;
|
|
414
|
+
/**
|
|
415
|
+
* bind to [filterBox] for displaying the filter input text box
|
|
416
|
+
*/
|
|
417
|
+
filterBox = false;
|
|
418
|
+
/**
|
|
419
|
+
* bind to [suffixText] for displaying the suffix of the selected text of anchor
|
|
420
|
+
*/
|
|
421
|
+
suffixText;
|
|
422
|
+
/**
|
|
423
|
+
* bind to [disabled] for disabling the dropdown
|
|
424
|
+
*/
|
|
425
|
+
disabled;
|
|
426
|
+
/**
|
|
427
|
+
* bind to [allowClear] for enabling the clearance (clearance is not avaiable when checkbox is enabled)
|
|
428
|
+
*/
|
|
429
|
+
allowClear = true;
|
|
430
|
+
/**
|
|
431
|
+
* bind to [formatNumber] for show formatted number text
|
|
432
|
+
*/
|
|
433
|
+
formatNumber = false;
|
|
434
|
+
/**
|
|
435
|
+
* for 2-way binding of [selectedValue]
|
|
436
|
+
*/
|
|
437
|
+
selectedValueChange = new EventEmitter(true);
|
|
438
|
+
/**
|
|
439
|
+
* [selectionChange] event that will be triggered when changing of the selection
|
|
440
|
+
*/
|
|
441
|
+
selectionChange = new EventEmitter(true);
|
|
442
|
+
/**
|
|
443
|
+
* [dropdownBlur] event that will be triggered with (blur) of dropdown
|
|
444
|
+
*/
|
|
445
|
+
dropdownBlur = new EventEmitter();
|
|
446
|
+
/**
|
|
447
|
+
* [itemClick] event that will be triggered when clicking the option of dropdown
|
|
448
|
+
*/
|
|
449
|
+
itemClick = new EventEmitter();
|
|
450
|
+
/**
|
|
451
|
+
* filter value
|
|
452
|
+
*/
|
|
453
|
+
filterValue;
|
|
454
|
+
/**
|
|
455
|
+
* flag of clicking dropdown. It's to prevent (blur) of dropdown from happening in checkbox mode.
|
|
456
|
+
*/
|
|
457
|
+
_clickedItems = false;
|
|
458
|
+
ngOnChanges(changes) {
|
|
459
|
+
if (changes['items']) {
|
|
460
|
+
this._checkSelectionChange(changes['items'].previousValue, changes['items'].currentValue);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* triggered when clicking the dropdown
|
|
465
|
+
*/
|
|
466
|
+
onItemsClick(event) {
|
|
467
|
+
if (event.offsetX > (event.target.clientWidth + event.target.clientLeft)) {
|
|
468
|
+
stopPropagationAndDefault(event);
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
// should ignore clicking on filter
|
|
472
|
+
if (this.checkbox && event.target.type !== 'text') {
|
|
473
|
+
this._clickedItems = true;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* triggered when clicking the item
|
|
478
|
+
*/
|
|
479
|
+
onItemClick(currentItem) {
|
|
480
|
+
if (!this.checkbox) {
|
|
481
|
+
this.selectedValue = this._getItemValue(currentItem); // currentItem.value != null ? currentItem.value : currentItem.text;
|
|
482
|
+
clearAllSelection(this.items);
|
|
483
|
+
// set the selection of current one
|
|
484
|
+
currentItem.selected = true;
|
|
485
|
+
this.itemClick.emit(currentItem);
|
|
486
|
+
this._onSelectionChange(this.selectedValue);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* triggers with (blur) event of filter input box
|
|
491
|
+
*/
|
|
492
|
+
onFilterTextBlur(event) {
|
|
493
|
+
this.dropdownBlur.emit(event);
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* triggers with (blur) event of dropdown
|
|
497
|
+
*/
|
|
498
|
+
onItemsBlur(event) {
|
|
499
|
+
if (this.checkbox) {
|
|
500
|
+
if (this._clickedItems) {
|
|
501
|
+
// in checkbox mode, this blur event will be ignored when clicking the dropdown (check the checkbox)
|
|
502
|
+
event.target.focus();
|
|
503
|
+
this._clickedItems = false;
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
this.dropdownBlur.emit(event);
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* toggle the selection when checking status changed (in checkbox mode)
|
|
511
|
+
*/
|
|
512
|
+
toggleSelection(item) {
|
|
513
|
+
item.selected = !item.selected;
|
|
514
|
+
this.selectionChange.emit(this._getItemValue(item)); // item.value != null ? item.value : item.text);
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* items values list after applying the filter
|
|
518
|
+
*/
|
|
519
|
+
get itemsValues() {
|
|
520
|
+
let filter;
|
|
521
|
+
if (this.filterValue) {
|
|
522
|
+
filter = this.filterValue.toUpperCase();
|
|
523
|
+
}
|
|
524
|
+
if (filter == null) {
|
|
525
|
+
return this.items;
|
|
526
|
+
}
|
|
527
|
+
if (!this.items || this.items.length === 0) {
|
|
528
|
+
return [];
|
|
529
|
+
}
|
|
530
|
+
if (hasGroup(this.items)) {
|
|
531
|
+
const items = [];
|
|
532
|
+
this.items.forEach(groupItem => {
|
|
533
|
+
if (groupItem.group != null && groupItem.group.toString().toUpperCase().includes(filter)) {
|
|
534
|
+
// if groupItem contains the filters, the groupItem needs to be displayed as well
|
|
535
|
+
items.push(groupItem);
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
const filteredItems = groupItem.items.filter(item => item.text != null && item.text.toString().toUpperCase().includes(filter));
|
|
539
|
+
if (filteredItems && filteredItems.length > 0) {
|
|
540
|
+
items.push({ group: groupItem.group, items: filteredItems });
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
return items;
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
return this.items.filter(item => (item.text != null && item.text.toString().toUpperCase().includes(filter)));
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* options CSS class
|
|
552
|
+
*/
|
|
553
|
+
get optionsClass() {
|
|
554
|
+
if (this.filterBox && !this.checkbox) {
|
|
555
|
+
return 'options with-filter';
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
return 'options no-filter';
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* get item value. Return text if value is not available
|
|
563
|
+
*/
|
|
564
|
+
_getItemValue(item) {
|
|
565
|
+
return item ? item.value != null ? item.value : item.text : undefined;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* selection changed, emits events: (selectedValueChange) and (selectionChange);
|
|
569
|
+
*/
|
|
570
|
+
_onSelectionChange(value) {
|
|
571
|
+
this.selectedValueChange.emit(value);
|
|
572
|
+
this.selectionChange.emit(value);
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* check whether the selection is changed. Emits relative events when if changed.
|
|
576
|
+
*/
|
|
577
|
+
_checkSelectionChange(previousValue, currentValue) {
|
|
578
|
+
const curSelectedItem = getFirstSelectedItem(currentValue);
|
|
579
|
+
const lastSelectedItem = getFirstSelectedItem(previousValue);
|
|
580
|
+
const curSelectedItemId = curSelectedItem ? curSelectedItem.id : undefined;
|
|
581
|
+
const lastSelectedItemId = lastSelectedItem ? lastSelectedItem.id : undefined;
|
|
582
|
+
if (curSelectedItemId !== lastSelectedItemId && !this.checkbox) {
|
|
583
|
+
this._onSelectionChange(this._getItemValue(curSelectedItem));
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
587
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: DropdownComponent, isStandalone: true, selector: "dropdown", inputs: { placeHolder: "placeHolder", items: "items", checkbox: "checkbox", selectedValue: "selectedValue", filterBox: "filterBox", suffixText: "suffixText", disabled: "disabled", allowClear: "allowClear", formatNumber: "formatNumber" }, outputs: { selectedValueChange: "selectedValueChange", selectionChange: "selectionChange", dropdownBlur: "dropdownBlur", itemClick: "itemClick" }, viewQueries: [{ propertyName: "dropdownRef", first: true, predicate: ["dropdown"], descendants: true, read: ElementRef }, { propertyName: "filterInputRef", first: true, predicate: ["filterInput"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: `
|
|
518
588
|
<span #dropdown class="dropdown" tabindex="3" (mousedown)="onItemsClick($event)" (blur)="onItemsBlur($event)" *ngIf="!disabled" >
|
|
519
589
|
<input-filter #filterInput tabindex="4" *ngIf="filterBox && !checkbox" [(filterValue)]="filterValue" (inputFilterBlur)="onFilterTextBlur($event)"></input-filter>
|
|
520
590
|
<span #selectionOptions [ngClass]="optionsClass">
|
|
@@ -533,9 +603,10 @@ DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
533
603
|
</ng-container>
|
|
534
604
|
</span>
|
|
535
605
|
</span>
|
|
536
|
-
`, isInline: true, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown{width:100%;padding:0;display:none;margin:0;border:1px solid #66afe9;border-top:none;border-bottom:none;border-top-right-radius:0;border-top-left-radius:0;box-sizing:border-box;position:relative;z-index:999}.dropdown
|
|
537
|
-
|
|
538
|
-
|
|
606
|
+
`, isInline: true, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown:focus{outline:0}.dropdown{width:100%;padding:0;display:none;margin:0;border:1px solid #66afe9;border-top:none;border-bottom:none;border-top-right-radius:0;border-top-left-radius:0;box-sizing:border-box;position:relative;z-index:999}.dropdown .options{width:calc(100% + 2px);left:0;box-sizing:border-box;background:#fff;position:absolute;max-height:228px;overflow-y:auto;overflow-x:hidden;border:1px solid #66afe9;border-top:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px;margin-left:-1px;margin-right:-1px}.dropdown .with-filter{top:32px}.dropdown .no-filter{top:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputFilterComponent, selector: "input-filter", inputs: ["filterValue"], outputs: ["inputFilterBlur", "filterValueChange"] }, { kind: "component", type: ItemComponent, selector: "item", inputs: ["checkbox", "item", "formatNumber", "suffixText"], outputs: ["itemClick", "checkStatusChange"] }, { kind: "component", type: GroupItemComponent, selector: "group-item", inputs: ["item"] }] });
|
|
607
|
+
}
|
|
608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
609
|
+
type: Component,
|
|
539
610
|
args: [{ selector: 'dropdown', template: `
|
|
540
611
|
<span #dropdown class="dropdown" tabindex="3" (mousedown)="onItemsClick($event)" (blur)="onItemsBlur($event)" *ngIf="!disabled" >
|
|
541
612
|
<input-filter #filterInput tabindex="4" *ngIf="filterBox && !checkbox" [(filterValue)]="filterValue" (inputFilterBlur)="onFilterTextBlur($event)"></input-filter>
|
|
@@ -555,193 +626,211 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
555
626
|
</ng-container>
|
|
556
627
|
</span>
|
|
557
628
|
</span>
|
|
558
|
-
`, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown{width:100%;padding:0;display:none;margin:0;border:1px solid #66afe9;border-top:none;border-bottom:none;border-top-right-radius:0;border-top-left-radius:0;box-sizing:border-box;position:relative;z-index:999}.dropdown
|
|
559
|
-
}], propDecorators: { dropdownRef: [{
|
|
560
|
-
type: ViewChild,
|
|
561
|
-
args: ['dropdown', { read: ElementRef }]
|
|
562
|
-
}], filterInputRef: [{
|
|
563
|
-
type: ViewChild,
|
|
564
|
-
args: ['filterInput', { read: ElementRef }]
|
|
565
|
-
}], placeHolder: [{
|
|
566
|
-
type: Input
|
|
567
|
-
}], items: [{
|
|
568
|
-
type: Input
|
|
569
|
-
}], checkbox: [{
|
|
570
|
-
type: Input
|
|
571
|
-
}], selectedValue: [{
|
|
572
|
-
type: Input
|
|
573
|
-
}], filterBox: [{
|
|
574
|
-
type: Input
|
|
575
|
-
}], suffixText: [{
|
|
576
|
-
type: Input
|
|
577
|
-
}], disabled: [{
|
|
578
|
-
type: Input
|
|
579
|
-
}], allowClear: [{
|
|
580
|
-
type: Input
|
|
581
|
-
}], formatNumber: [{
|
|
582
|
-
type: Input
|
|
583
|
-
}], selectedValueChange: [{
|
|
584
|
-
type: Output
|
|
585
|
-
}], selectionChange: [{
|
|
586
|
-
type: Output
|
|
587
|
-
}], dropdownBlur: [{
|
|
588
|
-
type: Output
|
|
589
|
-
}], itemClick: [{
|
|
590
|
-
type: Output
|
|
629
|
+
`, imports: [CommonModule, InputFilterComponent, ItemComponent, GroupItemComponent], styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}.dropdown:focus{outline:0}.dropdown{width:100%;padding:0;display:none;margin:0;border:1px solid #66afe9;border-top:none;border-bottom:none;border-top-right-radius:0;border-top-left-radius:0;box-sizing:border-box;position:relative;z-index:999}.dropdown .options{width:calc(100% + 2px);left:0;box-sizing:border-box;background:#fff;position:absolute;max-height:228px;overflow-y:auto;overflow-x:hidden;border:1px solid #66afe9;border-top:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px;margin-left:-1px;margin-right:-1px}.dropdown .with-filter{top:32px}.dropdown .no-filter{top:0}\n"] }]
|
|
630
|
+
}], propDecorators: { dropdownRef: [{
|
|
631
|
+
type: ViewChild,
|
|
632
|
+
args: ['dropdown', { read: ElementRef }]
|
|
633
|
+
}], filterInputRef: [{
|
|
634
|
+
type: ViewChild,
|
|
635
|
+
args: ['filterInput', { read: ElementRef }]
|
|
636
|
+
}], placeHolder: [{
|
|
637
|
+
type: Input
|
|
638
|
+
}], items: [{
|
|
639
|
+
type: Input
|
|
640
|
+
}], checkbox: [{
|
|
641
|
+
type: Input
|
|
642
|
+
}], selectedValue: [{
|
|
643
|
+
type: Input
|
|
644
|
+
}], filterBox: [{
|
|
645
|
+
type: Input
|
|
646
|
+
}], suffixText: [{
|
|
647
|
+
type: Input
|
|
648
|
+
}], disabled: [{
|
|
649
|
+
type: Input
|
|
650
|
+
}], allowClear: [{
|
|
651
|
+
type: Input
|
|
652
|
+
}], formatNumber: [{
|
|
653
|
+
type: Input
|
|
654
|
+
}], selectedValueChange: [{
|
|
655
|
+
type: Output
|
|
656
|
+
}], selectionChange: [{
|
|
657
|
+
type: Output
|
|
658
|
+
}], dropdownBlur: [{
|
|
659
|
+
type: Output
|
|
660
|
+
}], itemClick: [{
|
|
661
|
+
type: Output
|
|
591
662
|
}] } });
|
|
592
663
|
|
|
593
|
-
class DropdownListComponent {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
this.
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
this.
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}
|
|
735
|
-
/**
|
|
736
|
-
*
|
|
737
|
-
*/
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
664
|
+
class DropdownListComponent {
|
|
665
|
+
dropdownRef;
|
|
666
|
+
/**
|
|
667
|
+
* bind to [placeHolder] for displaying the place holder string of the anchor.
|
|
668
|
+
*/
|
|
669
|
+
placeHolder;
|
|
670
|
+
/**
|
|
671
|
+
* bind to [items] for the options/groups in the dropdown
|
|
672
|
+
*/
|
|
673
|
+
items;
|
|
674
|
+
/**
|
|
675
|
+
* bind to [multiSelection], the flag for multi-select (checkbox) mode.
|
|
676
|
+
*/
|
|
677
|
+
multiSelection = false;
|
|
678
|
+
/**
|
|
679
|
+
* bind to [selectedValue] for the value of the selected option from dropdown
|
|
680
|
+
*/
|
|
681
|
+
selectedValue;
|
|
682
|
+
/**
|
|
683
|
+
* bind to [filterBox] for displaying the filter input text box
|
|
684
|
+
*/
|
|
685
|
+
filterBox = false;
|
|
686
|
+
/**
|
|
687
|
+
* bind to [suffixText] for displaying the suffix of the selected text of anchor
|
|
688
|
+
*/
|
|
689
|
+
suffixText;
|
|
690
|
+
/**
|
|
691
|
+
* bind to [disabled] for disabling the dropdown
|
|
692
|
+
*/
|
|
693
|
+
disabled;
|
|
694
|
+
/**
|
|
695
|
+
* bind to [allowClear] for enabling the clearance (clearance is not avaiable when checkbox is enabled)
|
|
696
|
+
*/
|
|
697
|
+
allowClear = true;
|
|
698
|
+
/**
|
|
699
|
+
* bind to [formatNumber] for show formatted number text
|
|
700
|
+
*/
|
|
701
|
+
formatNumber = false;
|
|
702
|
+
/**
|
|
703
|
+
* for 2-way binding of [selectedValue], using async event to
|
|
704
|
+
* prevent "ExpressionChangedAfterItHasBeenCheckedError".
|
|
705
|
+
*/
|
|
706
|
+
selectedValueChange = new EventEmitter(true);
|
|
707
|
+
/**
|
|
708
|
+
* [selectionChange] event that will be triggered when changing of the selection.
|
|
709
|
+
* Using async event to prevent "ExpressionChangedAfterItHasBeenCheckedError".
|
|
710
|
+
*/
|
|
711
|
+
selectionChange = new EventEmitter(true);
|
|
712
|
+
/**
|
|
713
|
+
* visibility flag of drop down
|
|
714
|
+
*/
|
|
715
|
+
dropdownVisibility = false;
|
|
716
|
+
/**
|
|
717
|
+
* current selected text
|
|
718
|
+
*/
|
|
719
|
+
get selectedText() {
|
|
720
|
+
if (!this.multiSelection) {
|
|
721
|
+
const selectedItem = getFirstSelectedItem(this.items);
|
|
722
|
+
return selectedItem ? selectedItem.text : undefined;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* triggered with (selectionChange) event, emits (selectedValueChange) and (selectionChange)
|
|
727
|
+
*/
|
|
728
|
+
onSelectionChange(event) {
|
|
729
|
+
this.selectedValueChange.emit(event);
|
|
730
|
+
this.selectionChange.emit(event);
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* triggered with (anchorClick) event, controlling the "open" and "close" of the dropdown
|
|
734
|
+
*/
|
|
735
|
+
onAnchorClick(event) {
|
|
736
|
+
if (this.disabled) {
|
|
737
|
+
stopPropagationAndDefault(event);
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
if (this._isSelectionOpen()) {
|
|
741
|
+
this._hideItemList();
|
|
742
|
+
}
|
|
743
|
+
else {
|
|
744
|
+
this._showItemsList();
|
|
745
|
+
}
|
|
746
|
+
stopPropagationAndDefault(event);
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* triggered with (itemClick) event, closes the dropdown in non-checkbox mode
|
|
750
|
+
*/
|
|
751
|
+
onItemClick() {
|
|
752
|
+
if (!this.multiSelection) {
|
|
753
|
+
this._hideItemList();
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* triggered with (clearanceClick) event, clearing all selections
|
|
758
|
+
* and emits (selectedValueChange) and (selectionChange) event for empty value
|
|
759
|
+
*/
|
|
760
|
+
onClearanceClick(event) {
|
|
761
|
+
if (!this.multiSelection) {
|
|
762
|
+
this.selectedValue = void 0;
|
|
763
|
+
this.selectedValueChange.emit(undefined);
|
|
764
|
+
this.selectionChange.emit(undefined);
|
|
765
|
+
clearAllSelection(this.items);
|
|
766
|
+
}
|
|
767
|
+
stopPropagationAndDefault(event);
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* triggered with (dropdownBlur) event, closes the dropdown
|
|
771
|
+
*/
|
|
772
|
+
onItemsBlur() {
|
|
773
|
+
if (this._isSelectionOpen()) {
|
|
774
|
+
this._hideItemList();
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* close the dropdown
|
|
779
|
+
*/
|
|
780
|
+
_hideItemList() {
|
|
781
|
+
// hide the dropdown element (has some problem for using CSS directly, using this as a workaround)
|
|
782
|
+
this._dropdownElement.classList.remove('visible');
|
|
783
|
+
this._dropdownElement.style.display = 'none';
|
|
784
|
+
this.dropdownVisibility = false;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* open the dropdown
|
|
788
|
+
*/
|
|
789
|
+
_showItemsList() {
|
|
790
|
+
// display the dropdown element (has some problem for using CSS directly, using this as a workaround)
|
|
791
|
+
this._dropdownElement.classList.add('visible');
|
|
792
|
+
this._dropdownElement.style.display = 'block';
|
|
793
|
+
this.dropdownVisibility = true;
|
|
794
|
+
// scrolling to the selected item
|
|
795
|
+
if (this._selectedElement) {
|
|
796
|
+
this._selectedElement.scrollIntoView({ behavior: 'auto', block: 'center' });
|
|
797
|
+
}
|
|
798
|
+
// setting the focus
|
|
799
|
+
if (this.filterBox && !this.multiSelection) {
|
|
800
|
+
this._filterInputElement.focus();
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
this._dropdownElement.focus();
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* visibility status of dropdown
|
|
808
|
+
*/
|
|
809
|
+
_isSelectionOpen() {
|
|
810
|
+
return this.dropdownVisibility;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* get the real dropdown element (for focusing and visibility controlling), the <span> not the <dropdown>
|
|
814
|
+
*/
|
|
815
|
+
get _dropdownElement() {
|
|
816
|
+
return this.dropdownRef ? this.dropdownRef.nativeElement ? this.dropdownRef.nativeElement.firstElementChild : null : null;
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* get the real filter element (for focusing), the <input> not the <input-filter>
|
|
820
|
+
*/
|
|
821
|
+
get _filterInputElement() {
|
|
822
|
+
return this._dropdownElement ?
|
|
823
|
+
this._dropdownElement.firstElementChild ? this._dropdownElement.firstElementChild.firstElementChild : null : null;
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* get the HTMLElement of selected item, for doing (scrollIntoView) scrolling to the selected item
|
|
827
|
+
*/
|
|
828
|
+
get _selectedElement() {
|
|
829
|
+
const selectedItem = getFirstSelectedItem(this.items);
|
|
830
|
+
return selectedItem ? document.getElementById(selectedItem.id) : undefined;
|
|
831
|
+
}
|
|
832
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DropdownListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
833
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: DropdownListComponent, isStandalone: true, selector: "ngx-dropdown-list", inputs: { placeHolder: "placeHolder", items: "items", multiSelection: "multiSelection", selectedValue: "selectedValue", filterBox: "filterBox", suffixText: "suffixText", disabled: "disabled", allowClear: "allowClear", formatNumber: "formatNumber" }, outputs: { selectedValueChange: "selectedValueChange", selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "dropdownRef", first: true, predicate: ["dropdown"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
745
834
|
<span class="ngx-select">
|
|
746
835
|
<anchor (anchorClick)="onAnchorClick($event)" (clearanceClick)="onClearanceClick($event)"
|
|
747
836
|
[checkbox]="multiSelection"
|
|
@@ -764,9 +853,10 @@ DropdownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
764
853
|
[disabled]="disabled">
|
|
765
854
|
</dropdown>
|
|
766
855
|
</span>
|
|
767
|
-
`, isInline: true, styles: ["
|
|
768
|
-
|
|
769
|
-
|
|
856
|
+
`, isInline: true, styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}:host .ngx-select{border-radius:4px;font-size:14px;position:relative;display:inline-block;width:100%;height:34px;background:#fff;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}\n"], dependencies: [{ kind: "component", type: AnchorComponent, selector: "anchor", inputs: ["placeHolder", "checkbox", "suffixText", "allowClear", "formatNumber", "selectedText", "openStatus", "disabled"], outputs: ["anchorClick", "clearanceClick"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["placeHolder", "items", "checkbox", "selectedValue", "filterBox", "suffixText", "disabled", "allowClear", "formatNumber"], outputs: ["selectedValueChange", "selectionChange", "dropdownBlur", "itemClick"] }] });
|
|
857
|
+
}
|
|
858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DropdownListComponent, decorators: [{
|
|
859
|
+
type: Component,
|
|
770
860
|
args: [{ selector: 'ngx-dropdown-list', template: `
|
|
771
861
|
<span class="ngx-select">
|
|
772
862
|
<anchor (anchorClick)="onAnchorClick($event)" (clearanceClick)="onClearanceClick($event)"
|
|
@@ -790,65 +880,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
790
880
|
[disabled]="disabled">
|
|
791
881
|
</dropdown>
|
|
792
882
|
</span>
|
|
793
|
-
`, styles: ["
|
|
794
|
-
}], propDecorators: { dropdownRef: [{
|
|
795
|
-
type: ViewChild,
|
|
796
|
-
args: ['dropdown', { read: ElementRef }]
|
|
797
|
-
}], placeHolder: [{
|
|
798
|
-
type: Input
|
|
799
|
-
}], items: [{
|
|
800
|
-
type: Input
|
|
801
|
-
}], multiSelection: [{
|
|
802
|
-
type: Input
|
|
803
|
-
}], selectedValue: [{
|
|
804
|
-
type: Input
|
|
805
|
-
}], filterBox: [{
|
|
806
|
-
type: Input
|
|
807
|
-
}], suffixText: [{
|
|
808
|
-
type: Input
|
|
809
|
-
}], disabled: [{
|
|
810
|
-
type: Input
|
|
811
|
-
}], allowClear: [{
|
|
812
|
-
type: Input
|
|
813
|
-
}], formatNumber: [{
|
|
814
|
-
type: Input
|
|
815
|
-
}], selectedValueChange: [{
|
|
816
|
-
type: Output
|
|
817
|
-
}], selectionChange: [{
|
|
818
|
-
type: Output
|
|
883
|
+
`, imports: [AnchorComponent, DropdownComponent], styles: ["*,*:before,*:after{font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:inherit;background:inherit}:host .ngx-select{border-radius:4px;font-size:14px;position:relative;display:inline-block;width:100%;height:34px;background:#fff;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}\n"] }]
|
|
884
|
+
}], propDecorators: { dropdownRef: [{
|
|
885
|
+
type: ViewChild,
|
|
886
|
+
args: ['dropdown', { read: ElementRef }]
|
|
887
|
+
}], placeHolder: [{
|
|
888
|
+
type: Input
|
|
889
|
+
}], items: [{
|
|
890
|
+
type: Input
|
|
891
|
+
}], multiSelection: [{
|
|
892
|
+
type: Input
|
|
893
|
+
}], selectedValue: [{
|
|
894
|
+
type: Input
|
|
895
|
+
}], filterBox: [{
|
|
896
|
+
type: Input
|
|
897
|
+
}], suffixText: [{
|
|
898
|
+
type: Input
|
|
899
|
+
}], disabled: [{
|
|
900
|
+
type: Input
|
|
901
|
+
}], allowClear: [{
|
|
902
|
+
type: Input
|
|
903
|
+
}], formatNumber: [{
|
|
904
|
+
type: Input
|
|
905
|
+
}], selectedValueChange: [{
|
|
906
|
+
type: Output
|
|
907
|
+
}], selectionChange: [{
|
|
908
|
+
type: Output
|
|
819
909
|
}] } });
|
|
820
910
|
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
DropdownListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropdownListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
824
|
-
DropdownListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropdownListModule, declarations: [DropdownListComponent,
|
|
825
|
-
ItemComponent,
|
|
826
|
-
GroupItemComponent,
|
|
827
|
-
InputFilterComponent,
|
|
828
|
-
AnchorComponent,
|
|
829
|
-
DropdownComponent], imports: [CommonModule, FormsModule], exports: [DropdownListComponent] });
|
|
830
|
-
DropdownListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropdownListModule, providers: [], imports: [[CommonModule, FormsModule]] });
|
|
831
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropdownListModule, decorators: [{
|
|
832
|
-
type: NgModule,
|
|
833
|
-
args: [{
|
|
834
|
-
declarations: [
|
|
835
|
-
DropdownListComponent,
|
|
836
|
-
ItemComponent,
|
|
837
|
-
GroupItemComponent,
|
|
838
|
-
InputFilterComponent,
|
|
839
|
-
AnchorComponent,
|
|
840
|
-
DropdownComponent
|
|
841
|
-
],
|
|
842
|
-
exports: [DropdownListComponent],
|
|
843
|
-
imports: [CommonModule, FormsModule],
|
|
844
|
-
providers: [],
|
|
845
|
-
bootstrap: [],
|
|
846
|
-
}]
|
|
847
|
-
}] });
|
|
848
|
-
|
|
849
|
-
/**
|
|
850
|
-
* Generated bundle index. Do not edit.
|
|
911
|
+
/**
|
|
912
|
+
* Generated bundle index. Do not edit.
|
|
851
913
|
*/
|
|
852
914
|
|
|
853
|
-
export { DropdownListComponent
|
|
915
|
+
export { DropdownListComponent };
|
|
854
916
|
//# sourceMappingURL=ngx-dropdown-list.mjs.map
|