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 +13 -0
- package/frontend/components/flt/inputPhone/inputPhone.html +1 -0
- package/frontend/components/flt/inputPhone/inputPhone.js +1 -0
- package/frontend/components/flt/inputText/__test__/inputText.test.js +17 -0
- package/frontend/components/flt/inputText/inputText.js +11 -3
- package/package.json +2 -2
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
|
|
@@ -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