@kigi/components 1.46.0-beta.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kigi/components",
3
- "version": "1.46.0-beta.1",
3
+ "version": "1.46.0-beta.2",
4
4
  "description": "@kigi/components",
5
5
  "main": "src/components/index.ts",
6
6
  "scripts": {
@@ -1,39 +1,33 @@
1
- <div class="average-customer-time-wrapper">
2
- <div class="row customer-average">
3
- <div class="description-container-dash"
4
- ng-show="$ctrl.percentagesReturnCustomerTime.length">
5
- <span class="description-dash">Tempo médio de retorno do cliente</span>
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>
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
- </div>
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
- <div class="fake-chart"
37
- ng-if="$ctrl.loading">
38
- <mbg-skeleton></mbg-skeleton>
32
+ </figure>
39
33
  </div>
@@ -1,65 +1,217 @@
1
- mbg-average-customer-time {
2
- display: block;
3
- width: 100%;
4
- height: 100%;
5
- flex-grow: 1;
6
- box-sizing: border-box;
7
- }
8
-
9
1
  .average-customer-time-wrapper {
2
+ .opacity-dash{
3
+ opacity: 0.6;
4
+ }
10
5
  .tooltip-inner {
11
6
  background: #0EBCBD !important;
12
7
  width: 250px;
13
8
  }
9
+
10
+ }
11
+
12
+ .play-interval{
13
+ color: #0EBCBD;
14
+ }
15
+
16
+ .highcharts-figure {
17
+ .custom-title-container{
18
+ .custom-title{
19
+ position: relative;
20
+ }
14
21
  }
15
22
 
16
- .customer-average {
17
- padding: 0px 32px;
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
+ }
18
58
  }
19
59
 
20
- .fake-chart {
21
- width: 100%;
22
- height: 100%;
23
- position: relative;
24
- border-radius: 15px;
25
- padding: 0px;
26
- margin: 0px;
27
- box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.05);
28
- overflow: hidden;
29
- flex: 1;
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
+ }
80
+
81
+ }
82
+
30
83
  }
31
84
 
32
- .opacity-dash{
33
- opacity: 0.6;
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
+ }
34
99
  }
35
-
36
- .play-interval{
37
- color: #0EBCBD;
100
+ }
101
+
102
+ @media screen and (max-width: 1536px){
103
+ .highcharts-figure {
104
+ .custom-title-container{
105
+ .custom-title{
106
+ font-size: 17px;
107
+ }
108
+ }
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;
119
+ }
120
+ }
121
+ }
122
+
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
+ }
38
144
  }
145
+ }
39
146
 
40
- .description-container-dash-average {
41
- flex-grow: 1;
42
- color: var(--titleColor);
43
- display: flex;
44
- justify-content: space-between;
45
- width: 100%;
46
- font-weight: 600;
47
- font-size: 14px;
48
- align-items: center;
49
- padding: 8px 16px 5px 16px;
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
+ }
50
155
 
51
- .mbg-h-c-tone-s-icon-dash {
52
- transition: opacity 500ms ease;
53
- opacity: 0.9;
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
+ }
54
178
  }
179
+
180
+ .line-pay {
181
+ position: relative;
182
+ left: 30px;
183
+ width: 450px;
55
184
  }
56
- .description-dash {
57
- color: #aaabaa;
58
- font-size: 17px;
59
- font-weight: 500;
60
- fill: #aaabaa;
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
+
61
191
  }
192
+ }
193
+ }
62
194
 
63
-
64
-
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;
65
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
- text: null,
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: '75%',
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 0px 0px 0px;
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"
@@ -7,6 +7,13 @@
7
7
  input {
8
8
  width: 100%;
9
9
  }
10
+ .labelDayOfWeek{
11
+ margin-left: 4px;
12
+ margin-top: 4px;
13
+ padding: 6px;
14
+ width: 116px;
15
+ word-break: break-word;
16
+ }
10
17
  .mbg-date-between {
11
18
  display: flex;
12
19
  width: 100%;
@@ -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,
@@ -49,6 +49,8 @@ class MbgSelectController {
49
49
  private mountValue
50
50
  private strMountValue
51
51
  private callBackFavorite: Function
52
+ private favoriteModel
53
+ private productKitList: boolean
52
54
 
53
55
  constructor(
54
56
  public $scope,
@@ -243,15 +245,23 @@ class MbgSelectController {
243
245
  }
244
246
  }
245
247
 
246
- onInputBlur() {
248
+ onInputBlur(viewFavorite) {
247
249
  this.$timeout(() => {
248
250
  this.hasFocus = false
249
251
  this.data = []
250
252
  this.checkPosition()
251
- if (!this.ngModel && this.cacheNgModel) {
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
252
261
  this.ngModel = this.cacheNgModel
253
262
  }
254
263
  })
264
+
255
265
  if (this.ngBlur) {
256
266
  this.ngBlur()
257
267
  }
@@ -420,6 +430,7 @@ class MbgSelectController {
420
430
  } else {
421
431
  await this.updateModelValue(this.inputValue)
422
432
  }
433
+
423
434
  this.executeCallback()
424
435
  if (this.onSelect) {
425
436
  this.onSelect({ value: this.ngModel })
@@ -599,7 +610,7 @@ class MbgSelectController {
599
610
  }
600
611
  if (!this.ngModel) {
601
612
  delete this.inputValue
602
- delete this.inputNgValue
613
+ this.inputNgValue = ''
603
614
  }
604
615
  }
605
616
  }
@@ -611,18 +622,34 @@ class MbgSelectController {
611
622
  }
612
623
 
613
624
  checkFavorite() {
614
- let favorite
625
+ let favorite = null
615
626
  this.$timeout(() => {
616
627
  favorite = MbgCookie.get(this.getFavoriteKey())
617
628
  if (favorite && this.enableFavorite && !this.ngModel) {
618
629
  this.selectOption(favorite)
619
- if(this.callBackFavorite){
620
- this.callBackFavorite({value: favorite})
630
+
631
+ if (this.callBackFavorite) {
632
+ this.callBackFavorite({ value: favorite })
621
633
  }
634
+
622
635
  if (this.executeAfterOnInit) {
623
636
  this.executeAfterOnInit()
624
637
  }
625
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)
626
653
  }, 300)
627
654
  }
628
655
 
@@ -644,6 +671,7 @@ class MbgSelectController {
644
671
  }
645
672
  } else {
646
673
  MbgCookie.set(this.getFavoriteKey(), item)
674
+ this.getCheckFavoriteModel(true)
647
675
  }
648
676
  }
649
677
 
@@ -687,7 +715,7 @@ class MbgSelectController {
687
715
  }
688
716
  }
689
717
 
690
- MbgSelectController.$inject = [
718
+ MbgSelectController['$inject'] = [
691
719
  '$scope',
692
720
  '$element',
693
721
  '$attrs',
@@ -721,7 +749,8 @@ const mbgSelect = {
721
749
  manyFavorite: '=?',
722
750
  executeAfterOnInit: '&?',
723
751
  mountValue: '&?',
724
- callBackFavorite: '&?'
752
+ callBackFavorite: '&?',
753
+ productKitList: '=?',
725
754
  },
726
755
  controller: MbgSelectController,
727
756
  template,