@kigi/components 1.17.1-beta.6 → 1.18.0-beta.1
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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="mbg-multi-select-wrapper">
|
|
2
|
-
<span ng-if="$ctrl.showScrollArrows" class="arrow-left
|
|
2
|
+
<span ng-if="$ctrl.showScrollArrows" class="arrow-left" ng-click="$ctrl.scrollToLeft()">
|
|
3
3
|
<i class="fas fa-chevron-circle-left"></i>
|
|
4
4
|
</span>
|
|
5
5
|
<div class="mbg-multi-select-scroll"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
label="{{ $ctrl.label }}"></mbg-select>
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
|
-
<span ng-if="$ctrl.showScrollArrows" class="arrow-right
|
|
40
|
+
<span ng-if="$ctrl.showScrollArrows" class="arrow-right" ng-click="$ctrl.scrollToRight()">
|
|
41
41
|
<i class="fas fa-chevron-circle-right"></i>
|
|
42
42
|
</span>
|
|
43
43
|
</div>
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
position: absolute;
|
|
10
10
|
font-size: 20px;
|
|
11
11
|
|
|
12
|
+
z-index: 10;
|
|
13
|
+
|
|
12
14
|
background: white;
|
|
13
15
|
overflow: hidden;
|
|
14
16
|
height: 20px;
|
|
@@ -21,22 +23,28 @@
|
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
.visibility {
|
|
25
|
-
display: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&:hover {
|
|
29
|
-
.visibility {
|
|
30
|
-
display: block;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
26
|
.arrow-left {
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
left: 0px;
|
|
28
|
+
transition: transform .5s;
|
|
29
|
+
transform: translateX(-40px);
|
|
30
|
+
}
|
|
37
31
|
|
|
38
32
|
.arrow-right {
|
|
39
|
-
right:
|
|
33
|
+
right: 0px;
|
|
34
|
+
transition: transform .5s;
|
|
35
|
+
transform: translateX(40px);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
.arrow-left {
|
|
41
|
+
transition: transform .3s;
|
|
42
|
+
transform: translateX(8px);
|
|
43
|
+
}
|
|
44
|
+
.arrow-right {
|
|
45
|
+
transition: transform .3s;
|
|
46
|
+
transform: translateX(-8px);
|
|
47
|
+
}
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
.mbg-multi-select-scroll {
|
|
@@ -22,6 +22,7 @@ class MbgMultiSelectController {
|
|
|
22
22
|
private enableFavorite: boolean
|
|
23
23
|
private stepScrollSize: any
|
|
24
24
|
private showScrollArrows: boolean
|
|
25
|
+
private onRemoveItem: Function
|
|
25
26
|
|
|
26
27
|
constructor(public $scope, public $element, public $attrs, public $timeout) {}
|
|
27
28
|
|
|
@@ -119,6 +120,8 @@ class MbgMultiSelectController {
|
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
remoteItem(index) {
|
|
123
|
+
const item = this.ngModel[index]
|
|
124
|
+
|
|
122
125
|
this.ngModel.splice(index, 1)
|
|
123
126
|
this.verifyScroll()
|
|
124
127
|
this.$timeout(() => {
|
|
@@ -126,6 +129,10 @@ class MbgMultiSelectController {
|
|
|
126
129
|
this.ngChange()
|
|
127
130
|
}
|
|
128
131
|
})
|
|
132
|
+
|
|
133
|
+
if (this.onRemoveItem) {
|
|
134
|
+
this.onRemoveItem({ item, index })
|
|
135
|
+
}
|
|
129
136
|
}
|
|
130
137
|
|
|
131
138
|
stopDragEvents() {
|
|
@@ -279,6 +286,7 @@ const mbgMultiSelect = {
|
|
|
279
286
|
enableFavorite: '=?',
|
|
280
287
|
stepScrollSize: '=?',
|
|
281
288
|
showScrollArrows: '=?',
|
|
289
|
+
onRemoveItem: '&?',
|
|
282
290
|
},
|
|
283
291
|
template,
|
|
284
292
|
controller: MbgMultiSelectController,
|