@kigi/components 1.44.0-beta.5 → 1.44.0-beta.8
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 +9 -3
- package/src/components/mbg-average-customer-time/mbg-average-customer-time.scss +10 -1
- package/src/components/mbg-average-customer-time/mbg-average-customer-time.ts +17 -0
- package/src/components/mbg-image-upload-crop/image-upload-crop.ts +8 -0
package/package.json
CHANGED
|
@@ -3,25 +3,31 @@
|
|
|
3
3
|
<figure class="highcharts-figure">
|
|
4
4
|
<div class="description-container-dash"
|
|
5
5
|
ng-show="$ctrl.percentagesReturnCustomerTime.length">
|
|
6
|
-
<div class="mbg-h-c-tone-s-icon-dash"
|
|
7
|
-
ng-click="$ctrl.toggleShowValuesReturnCustomer(false)">
|
|
6
|
+
<div class="mbg-h-c-tone-s-icon-dash">
|
|
8
7
|
<i class="fa fa-lock lock-dash-store"
|
|
9
8
|
aria-hidden="true"
|
|
10
9
|
uib-tooltip="Sem permissão para visualizar"
|
|
11
10
|
tooltip-placement="left"
|
|
12
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>
|
|
13
15
|
<i ng-if="$ctrl.hideValue && !$ctrl.isBlockValuesDashboarReturnCustomer"
|
|
14
16
|
disable-animate
|
|
15
|
-
class="far fa-eye eye-board-target"
|
|
17
|
+
class="far fa-eye eye-board-target"
|
|
18
|
+
ng-click="$ctrl.toggleShowValuesReturnCustomer(false)"></i>
|
|
16
19
|
<i ng-if="!$ctrl.hideValue && !$ctrl.isBlockValuesDashboarReturnCustomer"
|
|
20
|
+
ng-click="$ctrl.toggleShowValuesReturnCustomer(false)"
|
|
17
21
|
disable-animate
|
|
18
22
|
class="far fa-eye-slash eye-board-target"></i>
|
|
19
23
|
</div>
|
|
24
|
+
|
|
20
25
|
</div>
|
|
21
26
|
<div class="chart-container"
|
|
22
27
|
id="container">
|
|
23
28
|
</div>
|
|
24
29
|
<div class="line-pay"
|
|
25
30
|
id="line"></div>
|
|
31
|
+
|
|
26
32
|
</figure>
|
|
27
33
|
</div>
|
|
@@ -16,6 +16,7 @@ class MbgAverageCustomerTimeController {
|
|
|
16
16
|
private hideValue: boolean = false
|
|
17
17
|
private boundAdjustContainerWidth
|
|
18
18
|
private allowDashBoardAutoValues
|
|
19
|
+
private callBackInstanceZapi: Function
|
|
19
20
|
|
|
20
21
|
constructor(
|
|
21
22
|
public $scope,
|
|
@@ -82,6 +83,13 @@ class MbgAverageCustomerTimeController {
|
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
async clickedPoint(clickedPoint) {
|
|
87
|
+
if (this.callBackInstanceZapi) {
|
|
88
|
+
await this.callBackInstanceZapi({ value: clickedPoint })
|
|
89
|
+
return
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
85
93
|
configPanelPercentagesReturnCustomerTime() {
|
|
86
94
|
const colors = ['#696EF0', '#45C413', '#F8D658', '#F5AE3C', '#FF8A22', '#FF4641']
|
|
87
95
|
const hasPermissionPorcentages = this.hideValue
|
|
@@ -195,6 +203,14 @@ class MbgAverageCustomerTimeController {
|
|
|
195
203
|
},
|
|
196
204
|
},
|
|
197
205
|
showInLegend: true,
|
|
206
|
+
point: {
|
|
207
|
+
events: {
|
|
208
|
+
click: async function (event) {
|
|
209
|
+
const clickedPoint = event.point
|
|
210
|
+
await this.clickedPoint(clickedPoint)
|
|
211
|
+
}.bind(this),
|
|
212
|
+
},
|
|
213
|
+
},
|
|
198
214
|
},
|
|
199
215
|
},
|
|
200
216
|
tooltip: {
|
|
@@ -259,6 +275,7 @@ const mbgAverageCustomerTime = {
|
|
|
259
275
|
allowedCallBack: '&?',
|
|
260
276
|
isBlockValuesDashboarReturnCustomer: '=?',
|
|
261
277
|
allowDashBoardAutoValues: '=?',
|
|
278
|
+
callBackInstanceZapi: '&?',
|
|
262
279
|
},
|
|
263
280
|
template,
|
|
264
281
|
controller: MbgAverageCustomerTimeController,
|
|
@@ -6,6 +6,7 @@ import { UploadImageCropModal } from './modals/upload-image-crop-modal'
|
|
|
6
6
|
class ImageUploadCropController {
|
|
7
7
|
public config: IConfigImageUploadCrop
|
|
8
8
|
public ngModel: string
|
|
9
|
+
private callBackImage: Function
|
|
9
10
|
|
|
10
11
|
constructor(
|
|
11
12
|
public $scope,
|
|
@@ -27,12 +28,18 @@ class ImageUploadCropController {
|
|
|
27
28
|
removeImage(e) {
|
|
28
29
|
e.stopPropagation()
|
|
29
30
|
this.ngModel = ''
|
|
31
|
+
if (this.callBackImage) {
|
|
32
|
+
this.callBackImage({ value: 'REMOVE' })
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
openModal(e) {
|
|
33
37
|
this.uploadImageCropModal.open(this.config, this.ngModel).then((url) => {
|
|
34
38
|
if (url) {
|
|
35
39
|
this.ngModel = url
|
|
40
|
+
if (this.callBackImage) {
|
|
41
|
+
this.callBackImage({ value: 'UPLOAD' })
|
|
42
|
+
}
|
|
36
43
|
}
|
|
37
44
|
})
|
|
38
45
|
}
|
|
@@ -42,6 +49,7 @@ const imageUploadCrop = {
|
|
|
42
49
|
bindings: {
|
|
43
50
|
ngModel: '=?',
|
|
44
51
|
config: '=?',
|
|
52
|
+
callBackImage: '&?',
|
|
45
53
|
},
|
|
46
54
|
controller: ImageUploadCropController,
|
|
47
55
|
template,
|