@kigi/components 1.45.1 → 1.46.0-beta.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/package.json +1 -1
- package/src/components/mbg-average-customer-time/mbg-average-customer-time.html +30 -36
- package/src/components/mbg-average-customer-time/mbg-average-customer-time.scss +199 -45
- package/src/components/mbg-average-customer-time/mbg-average-customer-time.ts +12 -6
- package/src/components/mbg-homescreen/mbg-homescreen.html +0 -6
- package/src/components/mbg-homescreen/mbg-homescreen.scss +1 -5
- package/src/components/mbg-homescreen/mbg-homescreen.ts +0 -8
- package/src/components/mbg-input-date/mbg-input-date.html +1 -0
- package/src/components/mbg-input-date/mbg-input-date.scss +7 -0
- package/src/components/mbg-input-date/mbg-input-date.ts +6 -1
- package/src/components/mbg-select/mbg-select.ts +39 -5
- package/src/components/mbg-store-goal/mbg-store-goal.html +116 -120
- package/src/components/mbg-store-goal/mbg-store-goal.scss +109 -66
- package/src/components/mbg-store-goal/mbg-store-goal.ts +0 -1
- package/src/components/mbg-top-sellings-products/mbg-top-sellings-products.html +171 -175
- package/src/components/mbg-top-sellings-products/mbg-top-sellings-products.scss +410 -187
- package/src/components/mbg-top-sellings-products/mbg-top-sellings-products.ts +0 -5
package/package.json
CHANGED
|
@@ -1,39 +1,33 @@
|
|
|
1
|
-
<div class="average-customer-time-wrapper"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
<div class="average-customer-time-wrapper"
|
|
2
|
+
ng-class="{'opacity-dash': $ctrl.isBlockValuesDashboarReturnCustomer}">
|
|
3
|
+
<figure class="highcharts-figure">
|
|
4
|
+
<div class="description-container-dash"
|
|
5
|
+
ng-show="$ctrl.percentagesReturnCustomerTime.length">
|
|
6
|
+
<div class="mbg-h-c-tone-s-icon-dash">
|
|
7
|
+
<i class="fa fa-lock lock-dash-store"
|
|
8
|
+
aria-hidden="true"
|
|
9
|
+
uib-tooltip="Sem permissão para visualizar"
|
|
10
|
+
tooltip-placement="left"
|
|
11
|
+
ng-if="$ctrl.isBlockValuesDashboarReturnCustomer"></i>
|
|
12
|
+
<i class="fa fa-play-circle-o play-interval"
|
|
13
|
+
uib-tooltip="Clique no painel e escolha um intervalo"
|
|
14
|
+
aria-hidden="true"></i>
|
|
15
|
+
<i ng-if="$ctrl.hideValue && !$ctrl.isBlockValuesDashboarReturnCustomer"
|
|
16
|
+
disable-animate
|
|
17
|
+
class="far fa-eye eye-board-target"
|
|
18
|
+
ng-click="$ctrl.toggleShowValuesReturnCustomer(false)"></i>
|
|
19
|
+
<i ng-if="!$ctrl.hideValue && !$ctrl.isBlockValuesDashboarReturnCustomer"
|
|
20
|
+
ng-click="$ctrl.toggleShowValuesReturnCustomer(false)"
|
|
21
|
+
disable-animate
|
|
22
|
+
class="far fa-eye-slash eye-board-target"></i>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
<div class="chart-container"
|
|
27
|
+
id="container">
|
|
23
28
|
</div>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<div class="line-pay"
|
|
28
|
-
ng-if="!$ctrl.loading"
|
|
29
|
-
></div>
|
|
30
|
-
<div class="chart-container"
|
|
31
|
-
id="container">
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
29
|
+
<div class="line-pay"
|
|
30
|
+
id="line"></div>
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
ng-if="$ctrl.loading">
|
|
38
|
-
<mbg-skeleton></mbg-skeleton>
|
|
32
|
+
</figure>
|
|
39
33
|
</div>
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
flex-grow: 1;
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.customer-average {
|
|
10
|
-
padding: 0px 32px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.fake-chart {
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 100%;
|
|
16
|
-
position: relative;
|
|
17
|
-
border-radius: 15px;
|
|
18
|
-
padding: 0px;
|
|
19
|
-
margin: 0px;
|
|
20
|
-
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
flex: 1;
|
|
23
|
-
}
|
|
24
|
-
|
|
1
|
+
.average-customer-time-wrapper {
|
|
25
2
|
.opacity-dash{
|
|
26
3
|
opacity: 0.6;
|
|
27
4
|
}
|
|
@@ -30,34 +7,211 @@ mbg-average-customer-time {
|
|
|
30
7
|
width: 250px;
|
|
31
8
|
}
|
|
32
9
|
|
|
33
|
-
|
|
10
|
+
}
|
|
11
|
+
|
|
34
12
|
.play-interval{
|
|
35
13
|
color: #0EBCBD;
|
|
36
14
|
}
|
|
37
15
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
16
|
+
.highcharts-figure {
|
|
17
|
+
.custom-title-container{
|
|
18
|
+
.custom-title{
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.line-pay {
|
|
24
|
+
background: #737373;
|
|
25
|
+
height: 1px;
|
|
26
|
+
opacity: 0.3;
|
|
27
|
+
position: relative;
|
|
28
|
+
top: -357px;
|
|
29
|
+
left: 34px;
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#container {
|
|
34
|
+
border-radius: 10px;
|
|
35
|
+
background: #FFF;
|
|
36
|
+
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
|
|
37
|
+
width: 100%;
|
|
38
|
+
margin-left: 19px;
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
align-items: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.description-container-dash {
|
|
45
|
+
color: var(--titleColor);
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: end;
|
|
48
|
+
position: relative;
|
|
49
|
+
top: 22px;
|
|
50
|
+
z-index: 9999;
|
|
51
|
+
|
|
52
|
+
.mbg-h-c-tone-s-icon-dash {
|
|
53
|
+
margin-top: -10px;
|
|
54
|
+
transition: opacity 500ms ease;
|
|
55
|
+
opacity: 0.9;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media screen and (max-width: 1920px){
|
|
61
|
+
.highcharts-figure {
|
|
62
|
+
.custom-title-container{
|
|
63
|
+
.custom-title{
|
|
64
|
+
position: relative;
|
|
65
|
+
left: 4px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
.line-pay {
|
|
69
|
+
position: relative;
|
|
70
|
+
left: 30px;
|
|
71
|
+
width: 480px;
|
|
72
|
+
}
|
|
73
|
+
#container {
|
|
74
|
+
border-radius: 10px;
|
|
75
|
+
background: #FFF;
|
|
76
|
+
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
|
|
77
|
+
width: 504px;
|
|
78
|
+
margin-left: 19px;
|
|
79
|
+
}
|
|
48
80
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media screen and (max-width: 1728px){
|
|
86
|
+
.highcharts-figure {
|
|
87
|
+
.line-pay {
|
|
88
|
+
position: relative;
|
|
89
|
+
left: 30px;
|
|
90
|
+
width: 418px;
|
|
91
|
+
}
|
|
92
|
+
#container {
|
|
93
|
+
border-radius: 10px;
|
|
94
|
+
background: #FFF;
|
|
95
|
+
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
|
|
96
|
+
width: 444px;
|
|
97
|
+
padding: inherit;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media screen and (max-width: 1536px){
|
|
103
|
+
.highcharts-figure {
|
|
104
|
+
.custom-title-container{
|
|
105
|
+
.custom-title{
|
|
106
|
+
font-size: 17px;
|
|
52
107
|
}
|
|
53
108
|
}
|
|
54
|
-
.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
109
|
+
.line-pay {
|
|
110
|
+
position: relative;
|
|
111
|
+
left: 30px;
|
|
112
|
+
width: 366px;
|
|
113
|
+
}
|
|
114
|
+
#container {
|
|
115
|
+
border-radius: 10px;
|
|
116
|
+
background: #FFF;
|
|
117
|
+
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
|
|
118
|
+
width: 390px;
|
|
59
119
|
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
60
122
|
|
|
61
|
-
|
|
62
|
-
|
|
123
|
+
@media screen and (max-width: 1440px){
|
|
124
|
+
.highcharts-figure {
|
|
125
|
+
.custom-title-container{
|
|
126
|
+
.custom-title{
|
|
127
|
+
font-size: 16px;
|
|
128
|
+
width: 100vw;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.line-pay {
|
|
133
|
+
position: relative;
|
|
134
|
+
left: 30px;
|
|
135
|
+
width: 332px;
|
|
136
|
+
}
|
|
137
|
+
#container {
|
|
138
|
+
border-radius: 10px;
|
|
139
|
+
background: #FFF;
|
|
140
|
+
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
|
|
141
|
+
width: 358px;
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@media screen and (max-width: 1368px){
|
|
148
|
+
.highcharts-figure {
|
|
149
|
+
.custom-title-container{
|
|
150
|
+
.custom-title{
|
|
151
|
+
font-size: 20px;
|
|
152
|
+
width: 100vw;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.line-pay {
|
|
157
|
+
position: relative;
|
|
158
|
+
left: 30px;
|
|
159
|
+
width: 450px;
|
|
160
|
+
}
|
|
161
|
+
#container {
|
|
162
|
+
border-radius: 10px;
|
|
163
|
+
background: #FFF;
|
|
164
|
+
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
|
|
165
|
+
width: 474px;
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@media screen and (max-width: 1366px){
|
|
172
|
+
.highcharts-figure {
|
|
173
|
+
.custom-title-container{
|
|
174
|
+
.custom-title{
|
|
175
|
+
font-size: 20px;
|
|
176
|
+
width: 100vw;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.line-pay {
|
|
181
|
+
position: relative;
|
|
182
|
+
left: 30px;
|
|
183
|
+
width: 450px;
|
|
184
|
+
}
|
|
185
|
+
#container {
|
|
186
|
+
border-radius: 10px;
|
|
187
|
+
background: #FFF;
|
|
188
|
+
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
|
|
189
|
+
width: 474px;
|
|
190
|
+
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
63
194
|
|
|
195
|
+
@media screen and (max-width: 1024px){
|
|
196
|
+
.highcharts-figure {
|
|
197
|
+
.custom-title-container{
|
|
198
|
+
.custom-title{
|
|
199
|
+
font-size: 15px;
|
|
200
|
+
width: 100vw;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.line-pay {
|
|
205
|
+
position: relative;
|
|
206
|
+
left: 30px;
|
|
207
|
+
width: 306px;
|
|
208
|
+
}
|
|
209
|
+
#container {
|
|
210
|
+
border-radius: 10px;
|
|
211
|
+
background: #FFF;
|
|
212
|
+
box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
|
|
213
|
+
width: 330px;
|
|
214
|
+
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
@@ -18,7 +18,6 @@ class MbgAverageCustomerTimeController {
|
|
|
18
18
|
private allowDashBoardAutoValues
|
|
19
19
|
private callBackInstanceZapi: Function
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
constructor(
|
|
23
22
|
public $scope,
|
|
24
23
|
public $element,
|
|
@@ -29,7 +28,6 @@ class MbgAverageCustomerTimeController {
|
|
|
29
28
|
) {}
|
|
30
29
|
|
|
31
30
|
async $onInit() {
|
|
32
|
-
|
|
33
31
|
this.isBlockValuesDashboarReturnCustomer =
|
|
34
32
|
!this.allowedToSee || !this.isPermissionAverageCustomerReturnTime
|
|
35
33
|
this.initialize()
|
|
@@ -167,7 +165,17 @@ class MbgAverageCustomerTimeController {
|
|
|
167
165
|
},
|
|
168
166
|
},
|
|
169
167
|
title: {
|
|
170
|
-
|
|
168
|
+
align: 'left',
|
|
169
|
+
text: `
|
|
170
|
+
<div class="custom-title-container">
|
|
171
|
+
<p class="custom-title">Tempo médio de retorno do cliente</p>
|
|
172
|
+
</div>`,
|
|
173
|
+
useHTML: true,
|
|
174
|
+
style: {
|
|
175
|
+
fontSize: '20px',
|
|
176
|
+
color: '#5f5b5b',
|
|
177
|
+
fontWeight: 'bold',
|
|
178
|
+
},
|
|
171
179
|
},
|
|
172
180
|
|
|
173
181
|
legend: {
|
|
@@ -220,7 +228,7 @@ class MbgAverageCustomerTimeController {
|
|
|
220
228
|
{
|
|
221
229
|
name: 'Porcentagem',
|
|
222
230
|
colorByPoint: true,
|
|
223
|
-
innerSize: '
|
|
231
|
+
innerSize: '65%',
|
|
224
232
|
data: transformedData,
|
|
225
233
|
},
|
|
226
234
|
],
|
|
@@ -250,7 +258,6 @@ class MbgAverageCustomerTimeController {
|
|
|
250
258
|
this.configPanelPercentagesReturnCustomerTime()
|
|
251
259
|
}
|
|
252
260
|
}
|
|
253
|
-
|
|
254
261
|
MbgAverageCustomerTimeController['$inject'] = [
|
|
255
262
|
'$scope',
|
|
256
263
|
'$element',
|
|
@@ -269,7 +276,6 @@ const mbgAverageCustomerTime = {
|
|
|
269
276
|
isBlockValuesDashboarReturnCustomer: '=?',
|
|
270
277
|
allowDashBoardAutoValues: '=?',
|
|
271
278
|
callBackInstanceZapi: '&?',
|
|
272
|
-
loading: '=?'
|
|
273
279
|
},
|
|
274
280
|
template,
|
|
275
281
|
controller: MbgAverageCustomerTimeController,
|
|
@@ -80,12 +80,6 @@
|
|
|
80
80
|
ng-click="$ctrl.handleDisplayValues()"><i class="fas fa-eye"></i> <span>Visualizar valores</span></a>
|
|
81
81
|
<a ng-show="$ctrl.displayValues"
|
|
82
82
|
ng-click="$ctrl.handleDisplayValues()"><i class="fas fa-eye-slash"></i> <span>Esconder valores</span></a>
|
|
83
|
-
<a class="print"
|
|
84
|
-
ng-click="$ctrl.printSalesPayments()">
|
|
85
|
-
<i class="fa fa-print"
|
|
86
|
-
aria-hidden="true"></i>
|
|
87
|
-
<span> Gerar extrato</span>
|
|
88
|
-
</a>
|
|
89
83
|
</div>
|
|
90
84
|
</div>
|
|
91
85
|
|
|
@@ -24,10 +24,6 @@ mbg-homescreen {
|
|
|
24
24
|
margin-right: 4px;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
.print{
|
|
29
|
-
margin-left: 15px;
|
|
30
|
-
}
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
&:hover {
|
|
@@ -100,7 +96,7 @@ mbg-homescreen {
|
|
|
100
96
|
.mh-container {
|
|
101
97
|
width: 100%;
|
|
102
98
|
height: auto;
|
|
103
|
-
padding: 10px
|
|
99
|
+
padding: 10px 2px;
|
|
104
100
|
|
|
105
101
|
.mh-panel-container {
|
|
106
102
|
background-color: white;
|
|
@@ -23,7 +23,6 @@ class MbgHomescreenController {
|
|
|
23
23
|
}[]
|
|
24
24
|
private allowDashboardMainSales
|
|
25
25
|
private filterActive
|
|
26
|
-
private print: Function
|
|
27
26
|
|
|
28
27
|
constructor(public $scope, public $element, public $attrs, public $timeout) {}
|
|
29
28
|
|
|
@@ -39,12 +38,6 @@ class MbgHomescreenController {
|
|
|
39
38
|
})
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
printSalesPayments() {
|
|
43
|
-
if (this.print) {
|
|
44
|
-
this.print()
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
41
|
onToggleFilters(event) {
|
|
49
42
|
event.stopPropagation()
|
|
50
43
|
this.openedFilters = !this.openedFilters
|
|
@@ -117,7 +110,6 @@ const mbgHomescreen = {
|
|
|
117
110
|
activeFilter: '=?',
|
|
118
111
|
allowDashboardMainSales: '=?',
|
|
119
112
|
panelValuesFilter: '=?',
|
|
120
|
-
print: '&?',
|
|
121
113
|
},
|
|
122
114
|
template,
|
|
123
115
|
controller: MbgHomescreenController,
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
ng-keypress="$ctrl.ngKeypress({ $event })"
|
|
15
15
|
ng-keydown="$ctrl.ngKeydown({ $event })"
|
|
16
16
|
ui-date-mask="{{ $ctrl.format }}" />
|
|
17
|
+
<label class="labelDayOfWeek" ng-if="$ctrl.nameOfTheDay" >{{$ctrl.changeDay()}}</label>
|
|
17
18
|
<!-- with calendar -->
|
|
18
19
|
<input type="text"
|
|
19
20
|
class="input-with-calendar"
|
|
@@ -17,7 +17,7 @@ class MbgInputDateController {
|
|
|
17
17
|
public betweenText: string
|
|
18
18
|
public filterDate: Function
|
|
19
19
|
public onlyMonthYear: boolean
|
|
20
|
-
|
|
20
|
+
private nameOfTheDay
|
|
21
21
|
|
|
22
22
|
constructor(public $scope, public $element, public $attrs, public $timeout) {
|
|
23
23
|
if ($attrs.ngRequired === '') {
|
|
@@ -47,6 +47,10 @@ class MbgInputDateController {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
changeDay() {
|
|
51
|
+
return new Intl.DateTimeFormat('pt-BR', { weekday: 'long' }).format(this.ngModel)
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
onChange() {
|
|
51
55
|
if (this.ngChange) {
|
|
52
56
|
this.ngChange({})
|
|
@@ -133,6 +137,7 @@ const mbgInputDate = {
|
|
|
133
137
|
filterDate: '&?',
|
|
134
138
|
onlyMonthYear: '=?',
|
|
135
139
|
titleMode: '=?',
|
|
140
|
+
nameOfTheDay: '=?',
|
|
136
141
|
},
|
|
137
142
|
template,
|
|
138
143
|
controller: MbgInputDateController,
|
|
@@ -48,6 +48,9 @@ class MbgSelectController {
|
|
|
48
48
|
private executeAfterOnInit: Function
|
|
49
49
|
private mountValue
|
|
50
50
|
private strMountValue
|
|
51
|
+
private callBackFavorite: Function
|
|
52
|
+
private favoriteModel
|
|
53
|
+
private productKitList: boolean
|
|
51
54
|
|
|
52
55
|
constructor(
|
|
53
56
|
public $scope,
|
|
@@ -242,15 +245,23 @@ class MbgSelectController {
|
|
|
242
245
|
}
|
|
243
246
|
}
|
|
244
247
|
|
|
245
|
-
onInputBlur() {
|
|
248
|
+
onInputBlur(viewFavorite) {
|
|
246
249
|
this.$timeout(() => {
|
|
247
250
|
this.hasFocus = false
|
|
248
251
|
this.data = []
|
|
249
252
|
this.checkPosition()
|
|
250
|
-
if (!
|
|
253
|
+
if (!viewFavorite) {
|
|
254
|
+
this.favoriteModel = null
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (!this.ngModel && this.cacheNgModel && !this.favoriteModel) {
|
|
258
|
+
this.ngModel = this.cacheNgModel
|
|
259
|
+
} else if (this.favoriteModel && this.favoriteModel.key) {
|
|
260
|
+
this.cacheNgModel = this.favoriteModel.key
|
|
251
261
|
this.ngModel = this.cacheNgModel
|
|
252
262
|
}
|
|
253
263
|
})
|
|
264
|
+
|
|
254
265
|
if (this.ngBlur) {
|
|
255
266
|
this.ngBlur()
|
|
256
267
|
}
|
|
@@ -419,6 +430,7 @@ class MbgSelectController {
|
|
|
419
430
|
} else {
|
|
420
431
|
await this.updateModelValue(this.inputValue)
|
|
421
432
|
}
|
|
433
|
+
|
|
422
434
|
this.executeCallback()
|
|
423
435
|
if (this.onSelect) {
|
|
424
436
|
this.onSelect({ value: this.ngModel })
|
|
@@ -598,7 +610,7 @@ class MbgSelectController {
|
|
|
598
610
|
}
|
|
599
611
|
if (!this.ngModel) {
|
|
600
612
|
delete this.inputValue
|
|
601
|
-
|
|
613
|
+
this.inputNgValue = ''
|
|
602
614
|
}
|
|
603
615
|
}
|
|
604
616
|
}
|
|
@@ -610,15 +622,34 @@ class MbgSelectController {
|
|
|
610
622
|
}
|
|
611
623
|
|
|
612
624
|
checkFavorite() {
|
|
613
|
-
let favorite
|
|
625
|
+
let favorite = null
|
|
614
626
|
this.$timeout(() => {
|
|
615
627
|
favorite = MbgCookie.get(this.getFavoriteKey())
|
|
616
628
|
if (favorite && this.enableFavorite && !this.ngModel) {
|
|
617
629
|
this.selectOption(favorite)
|
|
630
|
+
|
|
631
|
+
if (this.callBackFavorite) {
|
|
632
|
+
this.callBackFavorite({ value: favorite })
|
|
633
|
+
}
|
|
634
|
+
|
|
618
635
|
if (this.executeAfterOnInit) {
|
|
619
636
|
this.executeAfterOnInit()
|
|
620
637
|
}
|
|
621
638
|
}
|
|
639
|
+
if (this.callBackFavorite) {
|
|
640
|
+
this.callBackFavorite({ value: favorite })
|
|
641
|
+
}
|
|
642
|
+
}, 300)
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
getCheckFavoriteModel(viewFavorite) {
|
|
646
|
+
this.$timeout(() => {
|
|
647
|
+
if (!this.productKitList) return
|
|
648
|
+
this.favoriteModel = MbgCookie.get(this.getFavoriteKey())
|
|
649
|
+
if (this.callBackFavorite && this.favoriteModel) {
|
|
650
|
+
this.callBackFavorite({ value: this.favoriteModel })
|
|
651
|
+
}
|
|
652
|
+
this.onInputBlur(viewFavorite)
|
|
622
653
|
}, 300)
|
|
623
654
|
}
|
|
624
655
|
|
|
@@ -640,6 +671,7 @@ class MbgSelectController {
|
|
|
640
671
|
}
|
|
641
672
|
} else {
|
|
642
673
|
MbgCookie.set(this.getFavoriteKey(), item)
|
|
674
|
+
this.getCheckFavoriteModel(true)
|
|
643
675
|
}
|
|
644
676
|
}
|
|
645
677
|
|
|
@@ -683,7 +715,7 @@ class MbgSelectController {
|
|
|
683
715
|
}
|
|
684
716
|
}
|
|
685
717
|
|
|
686
|
-
MbgSelectController
|
|
718
|
+
MbgSelectController['$inject'] = [
|
|
687
719
|
'$scope',
|
|
688
720
|
'$element',
|
|
689
721
|
'$attrs',
|
|
@@ -717,6 +749,8 @@ const mbgSelect = {
|
|
|
717
749
|
manyFavorite: '=?',
|
|
718
750
|
executeAfterOnInit: '&?',
|
|
719
751
|
mountValue: '&?',
|
|
752
|
+
callBackFavorite: '&?',
|
|
753
|
+
productKitList: '=?',
|
|
720
754
|
},
|
|
721
755
|
controller: MbgSelectController,
|
|
722
756
|
template,
|