@kigi/components 1.19.3 → 1.20.0-release

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.19.3",
3
+ "version": "1.20.0-release",
4
4
  "description": "@kigi/components",
5
5
  "main": "src/components/index.ts",
6
6
  "scripts": {
@@ -50,7 +50,7 @@ class MbgAddressController {
50
50
  public $timeout,
51
51
  public mbgAddressService: MbgAddressService,
52
52
  public $uibModal,
53
- ) {}
53
+ ) { }
54
54
 
55
55
  $onInit() {
56
56
  if (this.capitalize && this.address) {
@@ -93,8 +93,8 @@ class MbgAddressController {
93
93
  state: this.address.state
94
94
  ? this.address.state
95
95
  : this.address.uf && this.address.uf.initial
96
- ? this.address.uf.initial
97
- : '',
96
+ ? this.address.uf.initial
97
+ : '',
98
98
  }
99
99
  if (this.ngModel) {
100
100
  this.ngModel.EX = (this.ngModel.country || '').toLowerCase() !== 'brasil'
@@ -236,17 +236,11 @@ class MbgAddressController {
236
236
 
237
237
  createFullName() {
238
238
  if (this.address.premisse) {
239
- this.fullAddress = `${
240
- this.address.premisse ? this.address.premisse : this.ngModel.premisse
241
- } - ${
242
- this.address.neighbourhood ? this.address.neighbourhood : this.ngModel.neighbourhood
243
- }, ${this.address.localization ? this.address.localization : this.ngModel.localization} - ${
244
- this.ngModel.state
245
- }, ${this.ngModel.country}`
239
+ this.fullAddress = `${this.address.premisse ? this.address.premisse : this.ngModel.premisse
240
+ } - ${this.address.neighbourhood ? this.address.neighbourhood : this.ngModel.neighbourhood
241
+ }, ${this.address.localization ? this.address.localization : this.ngModel.localization} - ${this.ngModel.state
242
+ }, ${this.ngModel.country}`
246
243
  }
247
- console.log('this.address.neighbourhood', this.address.neighbourhood);
248
- console.log('this.address.neighbourhood', this.ngModel.neighbourhood);
249
-
250
244
  }
251
245
 
252
246
  getPremisseType(str) {
@@ -31,7 +31,7 @@ mbg-checkbox {
31
31
  float: left;
32
32
  margin: 0px;
33
33
  width: 20px;
34
- height: 20px;
34
+ height: 20px !important;
35
35
  border: 2px solid #C8CCD4;
36
36
  border-radius: 3px;
37
37
  }
@@ -2,6 +2,7 @@
2
2
  ng-if="$ctrl.props"
3
3
  mbg-autocomplete-off>
4
4
  <input type="text"
5
+ ng-class="{'input-phone': $ctrl.inputPhone}"
5
6
  ng-model="$ctrl.ngModel"
6
7
  ng-change="$ctrl.onChange()"
7
8
  placeholder="{{ $ctrl.props.placeholder }}"
@@ -14,4 +15,4 @@
14
15
  ng-keydown="$ctrl.ngKeydown({ $event })"
15
16
  ui-br-phone-number-mask="'{{$ctrl.phoneNumberMask}}'"
16
17
  maxlength="{{$ctrl.enableCountryCode ? 19 : 15}}" />
17
- </div>
18
+ </div>
@@ -1,3 +1,5 @@
1
- // .mbg-input-phone-wrapper {
2
-
3
- // }
1
+ .mb-input-phone-wrapper {
2
+ .input-phone{
3
+ border: none;
4
+ }
5
+ }
@@ -30,7 +30,7 @@ class MbgInputPhoneController {
30
30
  }
31
31
  }
32
32
 
33
- MbgInputPhoneController.$inject = ['$scope', '$element', '$attrs']
33
+ MbgInputPhoneController['$inject'] = ['$scope', '$element', '$attrs']
34
34
 
35
35
  const mbgInputPhone = {
36
36
  bindings: {
@@ -44,6 +44,7 @@ const mbgInputPhone = {
44
44
  ngKeypress: '&?',
45
45
  ngKeydown: '&?',
46
46
  enableCountryCode: '=?',
47
+ inputPhone: '=?',
47
48
  },
48
49
  template,
49
50
  controller: MbgInputPhoneController,
@@ -57,7 +57,8 @@
57
57
  <div ng-show="$ctrl.transcludeTemplate"
58
58
  mbg-dynamic-html="$ctrl.transcludeTemplate"></div>
59
59
  </div>
60
- <div ng-show="!$ctrl.transcludeTemplate"
60
+ <div ng-class="{'has-divergent-price': $ctrl.gridValues[$index][$parent.$index].hasDivergentPrice}"
61
+ ng-show="!$ctrl.transcludeTemplate"
61
62
  class="grid-product-edit-wrapper">
62
63
  <svg tabindex="-1"
63
64
  height="401pt"
@@ -1,13 +1,13 @@
1
1
  .mbg-product-grid-wrapper {
2
- input[type="number"]::-webkit-outer-spin-button,
3
- input[type="number"]::-webkit-inner-spin-button {
4
- -webkit-appearance: none;
5
- margin: 0;
6
- }
7
-
8
- input[type="number"] {
9
- -moz-appearance: textfield;
10
- }
2
+ input[type='number']::-webkit-outer-spin-button,
3
+ input[type='number']::-webkit-inner-spin-button {
4
+ -webkit-appearance: none;
5
+ margin: 0;
6
+ }
7
+
8
+ input[type='number'] {
9
+ -moz-appearance: textfield;
10
+ }
11
11
  // overflow: auto;
12
12
  max-height: 600px;
13
13
  table {
@@ -26,7 +26,8 @@
26
26
  border: 0 !important;
27
27
  }
28
28
  }
29
- tbody, thead {
29
+ tbody,
30
+ thead {
30
31
  border: 1px solid #ccc;
31
32
  border-radius: 5px;
32
33
  .grid-center-content {
@@ -41,7 +42,8 @@
41
42
  color: #666;
42
43
  }
43
44
  }
44
- th, td {
45
+ th,
46
+ td {
45
47
  position: relative;
46
48
  border: none;
47
49
  border-top: 1px solid #ccc;
@@ -57,6 +59,9 @@
57
59
  text-decoration: underline;
58
60
  cursor: pointer;
59
61
  }
62
+ .has-divergent-price {
63
+ border: 1px solid red !important;
64
+ }
60
65
  label {
61
66
  height: 100%;
62
67
  margin: 0;
@@ -117,7 +122,7 @@
117
122
  background: transparent;
118
123
  }
119
124
  input[type='number'] {
120
- -moz-appearance:textfield;
125
+ -moz-appearance: textfield;
121
126
  }
122
127
  input::-webkit-outer-spin-button,
123
128
  input::-webkit-inner-spin-button {
@@ -131,18 +136,20 @@
131
136
  &.ng-touched.ng-invalid {
132
137
  border: 1px solid #b00020;
133
138
  }
134
- &[disabled="disabled"] {
139
+ &[disabled='disabled'] {
135
140
  background: #f5f5f5;
136
141
  }
137
142
  &::-webkit-input-placeholder {
138
143
  color: #bcbcbc;
139
144
  font-style: italic;
140
145
  }
141
- &:-moz-placeholder { /* Firefox 18- */
146
+ &:-moz-placeholder {
147
+ /* Firefox 18- */
142
148
  color: #bcbcbc;
143
149
  font-style: italic;
144
150
  }
145
- &::-moz-placeholder { /* Firefox 19+ */
151
+ &::-moz-placeholder {
152
+ /* Firefox 19+ */
146
153
  color: #bcbcbc;
147
154
  font-style: italic;
148
155
  }
@@ -180,7 +187,7 @@
180
187
  }
181
188
 
182
189
  .border-list {
183
- width: 100%;
184
- height:100%;
190
+ width: 100%;
191
+ height: 100%;
185
192
  border: 1px solid #ccc;
186
193
  }
@@ -37,7 +37,7 @@
37
37
  ng-if="item[$ctrl.activeAttr] === undefined ? true : item[$ctrl.activeAttr]"
38
38
  ng-repeat="item in $ctrl.ngModel track by $index">
39
39
  <div class="inline-row"
40
- ng-class="{'default-template': !$ctrl.transcludeTemplate && $parent.$index === 0 && $index === 0}">
40
+ ng-class="{'default-template': !$ctrl.transcludeTemplate && $parent.$index === 0 && $index === 0 , 'has-divergent-price': item.hasDivergentPrice}">
41
41
  <div class="x-value-col">
42
42
  <span tabindex="-1">{{ item.xDetail.value}}</span>
43
43
  </div>
@@ -1,177 +1,181 @@
1
1
  .mbg-product-inline-wrapper {
2
- input[type="number"]::-webkit-outer-spin-button,
3
- input[type="number"]::-webkit-inner-spin-button {
4
- -webkit-appearance: none;
5
- margin: 0;
6
- }
7
-
8
- input[type="number"] {
9
- -moz-appearance: textfield;
10
- }
11
- .inline-content {
12
- overflow: auto;
13
- }
14
-
15
- .inline-y {
16
- &:first-child {
17
- .inline-row {
18
- border-top: 1px solid #ccc;
19
- }
2
+ input[type='number']::-webkit-outer-spin-button,
3
+ input[type='number']::-webkit-inner-spin-button {
4
+ -webkit-appearance: none;
5
+ margin: 0;
20
6
  }
21
- }
22
-
23
- .inline-row {
24
- display: flex;
25
- height: 44px;
26
- border-bottom: 1px solid #ccc;
27
- border-left: 1px solid #ccc;
28
- border-right: 1px solid #ccc;
29
7
 
30
- div {
31
- flex: 1;
8
+ input[type='number'] {
9
+ -moz-appearance: textfield;
10
+ }
11
+ .inline-content {
12
+ overflow: auto;
32
13
  }
33
14
 
34
- .x-value-col {
35
- display: flex;
36
- align-items: center;
37
- justify-content: center;
38
- max-width: 154px;
39
-
40
- span {
41
- font-weight: 600;
42
- color: #666;
43
- }
15
+ .has-divergent-price {
16
+ border: 1px solid red !important;
17
+ }
44
18
 
45
- label {
46
- margin-right: 5px;
19
+ .inline-y {
20
+ &:first-child {
21
+ .inline-row {
22
+ border-top: 1px solid #ccc;
23
+ }
47
24
  }
48
25
  }
49
26
 
50
- .y-value-col {
27
+ .inline-row {
51
28
  display: flex;
52
- align-items: center;
53
- justify-content: flex-start;
54
- max-width: 174px;
29
+ height: 44px;
30
+ border-bottom: 1px solid #ccc;
31
+ border-left: 1px solid #ccc;
32
+ border-right: 1px solid #ccc;
55
33
 
56
- label {
57
- margin-right: 5px;
34
+ div {
35
+ flex: 1;
58
36
  }
59
- }
60
37
 
61
- .barcode-col {
62
- display: flex;
63
- align-items: center;
64
- justify-content: center;
65
- }
38
+ .x-value-col {
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ max-width: 154px;
66
43
 
67
- .stock-col {
68
- display: flex;
69
- align-items: center;
70
- justify-content: center;
71
- }
44
+ span {
45
+ font-weight: 600;
46
+ color: #666;
47
+ }
72
48
 
73
- .price-col {
74
- display: flex;
75
- align-items: center;
76
- justify-content: center;
77
- }
49
+ label {
50
+ margin-right: 5px;
51
+ }
52
+ }
78
53
 
79
- .grid-product-item-circle {
80
- max-width: 18px;
81
- width: 18px;
82
- height: 18px;
83
- border-radius: 50%;
84
- margin: 0 12px 0 0;
85
- }
54
+ .y-value-col {
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: flex-start;
58
+ max-width: 174px;
86
59
 
87
- input {
88
- background: transparent;
89
- height: 100%;
90
- width: 100%;
91
- padding-right: 14px;
92
- &.input-error {
93
- color: #ff002e;
60
+ label {
61
+ margin-right: 5px;
62
+ }
94
63
  }
95
- }
96
-
97
- input[type="number"] {
98
- -moz-appearance: textfield;
99
- }
100
64
 
101
- input::-webkit-outer-spin-button,
102
- input::-webkit-inner-spin-button {
103
- -webkit-appearance: none;
104
- }
65
+ .barcode-col {
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ }
105
70
 
106
- input {
107
- padding: 0 6px;
108
- border: none;
109
- text-align: right;
110
- outline: none;
71
+ .stock-col {
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+ }
111
76
 
112
- &.ng-touched.ng-invalid {
113
- border: 1px solid #b00020;
77
+ .price-col {
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
114
81
  }
115
82
 
116
- &[disabled="disabled"] {
117
- background: #f5f5f5;
83
+ .grid-product-item-circle {
84
+ max-width: 18px;
85
+ width: 18px;
86
+ height: 18px;
87
+ border-radius: 50%;
88
+ margin: 0 12px 0 0;
118
89
  }
119
90
 
120
- &::-webkit-input-placeholder {
121
- color: #bcbcbc;
122
- font-style: italic;
91
+ input {
92
+ background: transparent;
93
+ height: 100%;
94
+ width: 100%;
95
+ padding-right: 14px;
96
+ &.input-error {
97
+ color: #ff002e;
98
+ }
123
99
  }
124
100
 
125
- &:-moz-placeholder {
126
- /* Firefox 18- */
127
- color: #bcbcbc;
128
- font-style: italic;
101
+ input[type='number'] {
102
+ -moz-appearance: textfield;
129
103
  }
130
104
 
131
- &::-moz-placeholder {
132
- /* Firefox 19+ */
133
- color: #bcbcbc;
134
- font-style: italic;
105
+ input::-webkit-outer-spin-button,
106
+ input::-webkit-inner-spin-button {
107
+ -webkit-appearance: none;
135
108
  }
136
109
 
137
- &:-ms-input-placeholder {
138
- color: #bcbcbc;
139
- font-style: italic;
110
+ input {
111
+ padding: 0 6px;
112
+ border: none;
113
+ text-align: right;
114
+ outline: none;
115
+
116
+ &.ng-touched.ng-invalid {
117
+ border: 1px solid #b00020;
118
+ }
119
+
120
+ &[disabled='disabled'] {
121
+ background: #f5f5f5;
122
+ }
123
+
124
+ &::-webkit-input-placeholder {
125
+ color: #bcbcbc;
126
+ font-style: italic;
127
+ }
128
+
129
+ &:-moz-placeholder {
130
+ /* Firefox 18- */
131
+ color: #bcbcbc;
132
+ font-style: italic;
133
+ }
134
+
135
+ &::-moz-placeholder {
136
+ /* Firefox 19+ */
137
+ color: #bcbcbc;
138
+ font-style: italic;
139
+ }
140
+
141
+ &:-ms-input-placeholder {
142
+ color: #bcbcbc;
143
+ font-style: italic;
144
+ }
140
145
  }
141
- }
142
146
 
143
- .inline-product-money {
144
- color: #666;
145
- font-size: 16px;
146
- font-weight: 600;
147
+ .inline-product-money {
148
+ color: #666;
149
+ font-size: 16px;
150
+ font-weight: 600;
151
+ }
147
152
  }
148
- }
149
153
 
150
- .default-header-inline {
151
- * {
152
- border: 0;
153
- }
154
+ .default-header-inline {
155
+ * {
156
+ border: 0;
157
+ }
154
158
 
155
- .barcode-col {
156
- padding-right: 6px;
157
- justify-content: flex-end;
158
- }
159
+ .barcode-col {
160
+ padding-right: 6px;
161
+ justify-content: flex-end;
162
+ }
159
163
 
160
- .stock-col {
161
- padding-right: 6px;
162
- justify-content: flex-end;
163
- }
164
+ .stock-col {
165
+ padding-right: 6px;
166
+ justify-content: flex-end;
167
+ }
164
168
 
165
- .price-col {
166
- padding-right: 6px;
167
- justify-content: flex-end;
168
- }
169
+ .price-col {
170
+ padding-right: 6px;
171
+ justify-content: flex-end;
172
+ }
169
173
 
170
- label {
171
- display: flex;
172
- text-align: center;
173
- color: #666;
174
- font-weight: 600;
174
+ label {
175
+ display: flex;
176
+ text-align: center;
177
+ color: #666;
178
+ font-weight: 600;
179
+ }
175
180
  }
176
181
  }
177
- }
@@ -56,7 +56,7 @@ class MbgSelectController {
56
56
  public $timeout,
57
57
  public $compile,
58
58
  public $transclude,
59
- ) { }
59
+ ) {}
60
60
 
61
61
  $onInit() {
62
62
  this.fixedValue = this.ngValue || 'id'
@@ -323,6 +323,10 @@ class MbgSelectController {
323
323
  }
324
324
 
325
325
  onInputKeydown(evt) {
326
+ if (this.ngDisabled) {
327
+ return
328
+ }
329
+
326
330
  this.hasFocus = true
327
331
  this.pressEnter = false
328
332
  this.ngModel = null
@@ -45,7 +45,7 @@
45
45
  <div class="col-md-12">
46
46
  <mbg-pagination active-page="$ctrl.pagination.page"
47
47
  page-size="$ctrl.pagination.pageSize"
48
- on-change="$ctrl.fetch()"
48
+ on-change="$ctrl.onChangePage()"
49
49
  count="$ctrl.pagination.count"
50
50
  page-range-displayed="10">
51
51
  </mbg-pagination>
@@ -95,6 +95,7 @@ export class MbgSelectMultiListController {
95
95
  }
96
96
 
97
97
  executeFetch() {
98
+ this.pagination.page = 1
98
99
  this.$timeout(() => {
99
100
  this.fetch({ query: this.inputValue || '', selectOption: this.selectOptionLeft })
100
101
  })
@@ -210,6 +211,7 @@ const mbgSelectMultiList = {
210
211
  isLoading: '=?',
211
212
  pagination: '=?',
212
213
  selectOptions: '=?',
214
+ onChangePage: '&?'
213
215
  },
214
216
  template,
215
217
  controller: MbgSelectMultiListController,