fleetcor-lwc 3.13.3 → 3.13.5

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/README.md CHANGED
@@ -604,6 +604,7 @@ This component fully extends from `Input Text`
604
604
  | @api variables | type | values | required | description |
605
605
  | ---------------------- | ------ | ------ | -------- | --------------------------------------------------------------------------------------------- |
606
606
  | name | string | | + | |
607
+ | input-label | string | | - | |
607
608
  | error-message | string | | - | |
608
609
  | value | string | | - | |
609
610
  | required | bool | | - | |
@@ -946,6 +947,18 @@ You can override them as you wish by global css variables as priority.
946
947
  <details>
947
948
  <summary>Click to expand/collapse</summary>
948
949
 
950
+ v.3.13.5
951
+
952
+ - Update `flt-input-phone` component
953
+
954
+ ---
955
+
956
+ v.3.13.4
957
+
958
+ - Bug fix `flt-input-text` component
959
+
960
+ ---
961
+
949
962
  v.3.13.3
950
963
 
951
964
  - Bug fix `flt-input-phone` component
@@ -19,6 +19,7 @@
19
19
  disabled={disabled}
20
20
  onfocus={handleFocus}
21
21
  onblur={handleBlur}
22
+ label={inputLabel}
22
23
  placeholder={placeholder}
23
24
  name="phoneNumber"></flt-input-text>
24
25
  </div>
@@ -10,6 +10,7 @@ const CODE_VALUE_SB = '+44'
10
10
 
11
11
  export default class InputPhone extends UserDataValidator {
12
12
  @api errorMessage
13
+ @api inputLabel
13
14
  @api placeholder
14
15
  @api disabled
15
16
  @api required
@@ -177,6 +177,23 @@ describe('flt-input-text', () => {
177
177
  return Promise.resolve().then(async () => {
178
178
  await expect(inputTextElement.value).toBeFalsy()
179
179
  await expect(inputElement.value).toBeFalsy()
180
+
181
+ inputTextElement.disabled = false
182
+ inputElement.value = 'Aleks '
183
+ inputElement.dispatchEvent(new Event('change'))
184
+
185
+ return Promise.resolve().then(async () => {
186
+ await expect(inputTextElement.value).toBe('Aleks')
187
+ await expect(inputElement.value).toBe('Aleks')
188
+
189
+ inputElement.value = ''
190
+ inputElement.dispatchEvent(new Event('change'))
191
+
192
+ return Promise.resolve().then(async () => {
193
+ await expect(inputTextElement.value).toBe('')
194
+ await expect(inputElement.value).toBe('')
195
+ })
196
+ })
180
197
  })
181
198
  })
182
199
  })
@@ -63,8 +63,6 @@ export default class InputText extends InputElement {
63
63
  if (this.disabled) return
64
64
  this.focused = false
65
65
  this.touched = true
66
- this.value = (event.target.value || '').trim()
67
- event.target.value = this.value
68
66
  this.dispatchEvent(
69
67
  new CustomEvent('blur', {
70
68
  detail: null,
@@ -83,7 +81,7 @@ export default class InputText extends InputElement {
83
81
  this.value = event.target.value
84
82
  this.dispatchEvent(
85
83
  new CustomEvent('change', {
86
- detail: this.getData()
84
+ detail: { ...this.getData(), _oninput: true }
87
85
  })
88
86
  )
89
87
  }
@@ -92,7 +90,17 @@ export default class InputText extends InputElement {
92
90
  handleChange(event) {
93
91
  if (this.disabled) {
94
92
  event.target.value = ''
93
+ } else {
94
+ this.value = (event.target.value || '').trim()
95
+ event.target.value = this.value
96
+
97
+ this.dispatchEvent(
98
+ new CustomEvent('change', {
99
+ detail: { ...this.getData(), _onchage: true }
100
+ })
101
+ )
95
102
  }
103
+
96
104
  event.stopPropagation()
97
105
  event.preventDefault()
98
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetcor-lwc",
3
- "version": "3.13.3",
3
+ "version": "3.13.5",
4
4
  "description": "LWC framework by Fleetcor",
5
5
  "repository": {
6
6
  "type": "git",
@@ -87,4 +87,4 @@
87
87
  "imask": "^7.6.1",
88
88
  "prismjs": "^1.30.0"
89
89
  }
90
- }
90
+ }