ng-jvx-multiselect 1.1.28
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/README.md +330 -0
- package/_index.scss +1 -0
- package/esm2020/lib/directives/ng-jvx-disabled-option.directive.mjs +49 -0
- package/esm2020/lib/directives/ng-jvx-focus.directive.mjs +29 -0
- package/esm2020/lib/directives/ng-jvx-group-header.directive.mjs +25 -0
- package/esm2020/lib/directives/ng-jvx-options-template.directive.mjs +26 -0
- package/esm2020/lib/directives/ng-jvx-selection-template.directive.mjs +25 -0
- package/esm2020/lib/interfaces/ng-jvx-group-mapper.mjs +2 -0
- package/esm2020/lib/interfaces/ng-jvx-option-mapper.mjs +2 -0
- package/esm2020/lib/interfaces/ng-jvx-search-mapper.mjs +2 -0
- package/esm2020/lib/ng-jvx-multiselect.component.mjs +589 -0
- package/esm2020/lib/ng-jvx-multiselect.module.mjs +92 -0
- package/esm2020/lib/ng-jvx-multiselect.service.mjs +42 -0
- package/esm2020/lib/ng-jvx-option/ng-jvx-option.component.mjs +31 -0
- package/esm2020/lib/ng-jvx-panel/ng-jvx-panel.component.mjs +41 -0
- package/esm2020/ng-jvx-multiselect.mjs +5 -0
- package/esm2020/public-api.mjs +15 -0
- package/fesm2015/ng-jvx-multiselect.mjs +924 -0
- package/fesm2015/ng-jvx-multiselect.mjs.map +1 -0
- package/fesm2020/ng-jvx-multiselect.mjs +918 -0
- package/fesm2020/ng-jvx-multiselect.mjs.map +1 -0
- package/lib/directives/ng-jvx-disabled-option.directive.d.ts +14 -0
- package/lib/directives/ng-jvx-disabled-option.directive.d.ts.map +1 -0
- package/lib/directives/ng-jvx-focus.directive.d.ts +11 -0
- package/lib/directives/ng-jvx-focus.directive.d.ts.map +1 -0
- package/lib/directives/ng-jvx-group-header.directive.d.ts +10 -0
- package/lib/directives/ng-jvx-group-header.directive.d.ts.map +1 -0
- package/lib/directives/ng-jvx-options-template.directive.d.ts +11 -0
- package/lib/directives/ng-jvx-options-template.directive.d.ts.map +1 -0
- package/lib/directives/ng-jvx-selection-template.directive.d.ts +10 -0
- package/lib/directives/ng-jvx-selection-template.directive.d.ts.map +1 -0
- package/lib/interfaces/ng-jvx-group-mapper.d.ts +8 -0
- package/lib/interfaces/ng-jvx-group-mapper.d.ts.map +1 -0
- package/lib/interfaces/ng-jvx-option-mapper.d.ts +7 -0
- package/lib/interfaces/ng-jvx-option-mapper.d.ts.map +1 -0
- package/lib/interfaces/ng-jvx-search-mapper.d.ts +7 -0
- package/lib/interfaces/ng-jvx-search-mapper.d.ts.map +1 -0
- package/lib/ng-jvx-multiselect.component.d.ts +144 -0
- package/lib/ng-jvx-multiselect.component.d.ts.map +1 -0
- package/lib/ng-jvx-multiselect.module.d.ts +26 -0
- package/lib/ng-jvx-multiselect.module.d.ts.map +1 -0
- package/lib/ng-jvx-multiselect.service.d.ts +20 -0
- package/lib/ng-jvx-multiselect.service.d.ts.map +1 -0
- package/lib/ng-jvx-option/ng-jvx-option.component.d.ts +14 -0
- package/lib/ng-jvx-option/ng-jvx-option.component.d.ts.map +1 -0
- package/lib/ng-jvx-panel/ng-jvx-panel.component.d.ts +16 -0
- package/lib/ng-jvx-panel/ng-jvx-panel.component.d.ts.map +1 -0
- package/ng-jvx-multiselect.d.ts +5 -0
- package/ng-jvx-multiselect.d.ts.map +1 -0
- package/package.json +48 -0
- package/public-api.d.ts +11 -0
- package/public-api.d.ts.map +1 -0
- package/src/lib/mixins.scss +6 -0
- package/src/lib/ng-jvx-multiselect.component.scss +234 -0
- package/src/lib/ng-jvx-option/ng-jvx-option.component.scss +40 -0
- package/src/lib/ng-jvx-panel/ng-jvx-panel.component.scss +0 -0
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './lib/ng-jvx-option/ng-jvx-option.component';
|
|
2
|
+
export * from './lib/directives/ng-jvx-options-template.directive';
|
|
3
|
+
export * from './lib/directives/ng-jvx-selection-template.directive';
|
|
4
|
+
export * from './lib/directives/ng-jvx-group-header.directive';
|
|
5
|
+
export * from './lib/directives/ng-jvx-disabled-option.directive';
|
|
6
|
+
export * from './lib/ng-jvx-multiselect.service';
|
|
7
|
+
export * from './lib/ng-jvx-multiselect.component';
|
|
8
|
+
export * from './lib/ng-jvx-multiselect.module';
|
|
9
|
+
export * from './lib/interfaces/ng-jvx-option-mapper';
|
|
10
|
+
export * from './lib/interfaces/ng-jvx-search-mapper';
|
|
11
|
+
export * from './lib/interfaces/ng-jvx-group-mapper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../projects/ng-jvx-multiselect/src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,sDAAsD,CAAC;AACrE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mDAAmD,CAAC;AAClE,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
@mixin alpha($property, $color-variable, $opacity) {
|
|
2
|
+
$color-variable-h: var(#{$color-variable+'-h'});
|
|
3
|
+
$color-variable-s: var(#{$color-variable+'-s'});
|
|
4
|
+
$color-variable-l: var(#{$color-variable+'-l'});
|
|
5
|
+
#{$property}: hsla($color-variable-h, $color-variable-s, $color-variable-l, $opacity);
|
|
6
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@import 'ng-jvx-option/ng-jvx-option.component';
|
|
4
|
+
|
|
5
|
+
@mixin ng-jvx-multiselect-style($theme: null) {
|
|
6
|
+
$primary: var(--jvx-multiselect-primary);
|
|
7
|
+
$accent: var(--jvx-multiselect-accent);
|
|
8
|
+
$warn: var(--jvx-multiselect-warn);
|
|
9
|
+
@if ($theme) {
|
|
10
|
+
$primary: mat.get-color-from-palette(map.get($theme, primary));
|
|
11
|
+
$accent: mat.get-color-from-palette(map.get($theme, accent));
|
|
12
|
+
$warn: mat.get-color-from-palette(map.get($theme, warn));
|
|
13
|
+
}
|
|
14
|
+
@include ng-jvx-option-style($theme);
|
|
15
|
+
ng-jvx-multiselect {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
width: 100%;
|
|
19
|
+
|
|
20
|
+
.ng-jvx-multiselect {
|
|
21
|
+
width: 100%;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
|
|
25
|
+
.ng-jvx-multiselect-value-container {
|
|
26
|
+
width: 100%;
|
|
27
|
+
display: flex;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
position: relative;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
align-items: center;
|
|
32
|
+
|
|
33
|
+
.ng-jvx-multiselect__placeholder {
|
|
34
|
+
height: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
position: absolute;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.ng-jvx-multiselect-value {
|
|
41
|
+
flex: 1 1 100%;
|
|
42
|
+
max-width: calc(100% - 28px);
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
|
|
46
|
+
.mat-chip-list-wrapper {
|
|
47
|
+
.mat-standard-chip {
|
|
48
|
+
padding: 0 5px 0 7px;
|
|
49
|
+
margin: 4px 5px 0;
|
|
50
|
+
|
|
51
|
+
.chip-content {
|
|
52
|
+
margin-left: 4px;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
display: inline-block;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
.ng-jvx-multiselect__remove-button {
|
|
65
|
+
display: flex;
|
|
66
|
+
height: 100%;
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ng-jvx-multiselect-arrow {
|
|
71
|
+
width: 24px;
|
|
72
|
+
padding-right: 4px;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
|
|
76
|
+
mat-icon {
|
|
77
|
+
transition: transform 0.3s ease-in-out;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@keyframes lds-ring {
|
|
81
|
+
0% {
|
|
82
|
+
transform: rotate(0deg);
|
|
83
|
+
}
|
|
84
|
+
100% {
|
|
85
|
+
transform: rotate(360deg);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.lds-ring {
|
|
90
|
+
display: inline-block;
|
|
91
|
+
position: relative;
|
|
92
|
+
width: 24px;
|
|
93
|
+
height: 24px;
|
|
94
|
+
|
|
95
|
+
div {
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
display: block;
|
|
98
|
+
position: absolute;
|
|
99
|
+
width: 6px;
|
|
100
|
+
height: 16px;
|
|
101
|
+
margin: 4px;
|
|
102
|
+
border: 2px solid;
|
|
103
|
+
border-radius: 50%;
|
|
104
|
+
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
105
|
+
border-color: #{$accent} transparent transparent transparent;
|
|
106
|
+
|
|
107
|
+
&:nth-child(1) {
|
|
108
|
+
animation-delay: -0.45s;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&:nth-child(2) {
|
|
112
|
+
animation-delay: -0.3s;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&:nth-child(3) {
|
|
116
|
+
animation-delay: -0.15s;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.is-open {
|
|
123
|
+
.ng-jvx-multiselect-arrow {
|
|
124
|
+
mat-icon {
|
|
125
|
+
transform: rotate(180deg);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&.disabled {
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
|
|
135
|
+
.ng-jvx-multiselect-arrow {
|
|
136
|
+
mat-icon {
|
|
137
|
+
opacity: 0.3;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&.has-errors {
|
|
143
|
+
color: red;
|
|
144
|
+
|
|
145
|
+
.ng-jvx-multiselect-value {
|
|
146
|
+
&.single-value-container {
|
|
147
|
+
color: red;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&.multi-value-container {
|
|
151
|
+
width: 100%;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.ng-jvx-multiselect-arrow {
|
|
156
|
+
mat-icon {
|
|
157
|
+
color: red;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
.mat-select-test {
|
|
164
|
+
width: 250px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.menu-list-container {
|
|
168
|
+
max-height: 300px;
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-direction: column;
|
|
171
|
+
}
|
|
172
|
+
.menu-footer {
|
|
173
|
+
max-height: 30px;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
}
|
|
176
|
+
.cdk-overlay-pane {
|
|
177
|
+
.mat-menu-panel.jvx-multiselect-panel {
|
|
178
|
+
min-width: 100%;
|
|
179
|
+
max-width: 100%;
|
|
180
|
+
|
|
181
|
+
.mat-menu-content {
|
|
182
|
+
padding-top: 0 !important;
|
|
183
|
+
padding-bottom: 0 !important;
|
|
184
|
+
|
|
185
|
+
.menu-list-container {
|
|
186
|
+
ng-scrollbar {
|
|
187
|
+
--scrollbar-color: transparent;
|
|
188
|
+
--scrollbar-container-color: transparent;
|
|
189
|
+
--scrollbar-thumb-color: #{$accent};
|
|
190
|
+
--scrollbar-thumb-hover-color: #{$accent};
|
|
191
|
+
--scrollbar-border-radius: 4px;
|
|
192
|
+
--scrollbar-size: 6px;
|
|
193
|
+
--scrollbar-padding: 8px;
|
|
194
|
+
--scroll-view-margin: 0;
|
|
195
|
+
--scroll-view-color: transparent;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.search-input-container {
|
|
200
|
+
height: 40px;
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
padding: 10px;
|
|
204
|
+
|
|
205
|
+
input {
|
|
206
|
+
width: 100%;
|
|
207
|
+
outline: none;
|
|
208
|
+
border: none;
|
|
209
|
+
|
|
210
|
+
&:focus {
|
|
211
|
+
outline: none;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&:active {
|
|
215
|
+
outline: none
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.mat-selection-list {
|
|
221
|
+
padding-top: 0 !important;
|
|
222
|
+
padding-bottom: 0 !important;
|
|
223
|
+
|
|
224
|
+
mat-list-option[aria-selected="true"], mat-list-option[aria-selected="false"] {
|
|
225
|
+
mat-pseudo-checkbox {
|
|
226
|
+
display: none
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
@mixin ng-jvx-option-style($theme: null) {
|
|
5
|
+
$primary: var(--jvx-multiselect-primary);
|
|
6
|
+
$accent: var(--jvx-multiselect-accent);
|
|
7
|
+
$warn: var(--jvx-multiselect-warn);
|
|
8
|
+
@if ($theme) {
|
|
9
|
+
$primary: mat.get-color-from-palette(map.get($theme, primary));
|
|
10
|
+
$accent: mat.get-color-from-palette(map.get($theme, accent));
|
|
11
|
+
$warn: mat.get-color-from-palette(map.get($theme, warn));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
mat-list-option.mat-list-item.mat-list-option.ng-jvx-option {
|
|
15
|
+
height: auto;
|
|
16
|
+
min-height: 48px;
|
|
17
|
+
|
|
18
|
+
.mat-list-text {
|
|
19
|
+
min-height: 48px;
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&[aria-selected="true"] {
|
|
25
|
+
|
|
26
|
+
color: #{$primary};
|
|
27
|
+
|
|
28
|
+
.list-option-background {
|
|
29
|
+
position: absolute;
|
|
30
|
+
left: 0;
|
|
31
|
+
top: 0;
|
|
32
|
+
z-index: -1;
|
|
33
|
+
opacity: 0.45;
|
|
34
|
+
height: 100%;
|
|
35
|
+
width: 100%;
|
|
36
|
+
background: #{$primary};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
File without changes
|