ui: refactor text file component (#18458)

* wip tests

* Move text-file to addon

* rename fileName to filename, initial cleanup of text-fil

* rename args, rename test selector

* fix eye-con, remove enterAsText from file object

* add tests

* move files back to original location

* rename files via git for git diff

* adjsut test

* Revert "wip tests"

This reverts commit 63716a1e647a0b01236d34322837456ef3e9db43.

* fix policy form input

* cleanup conditional

* add bottom margin

* add element id

* change arg name

* add text area input test

* add upload test to policy form

Co-authored-by: Chelsea Shaw <cshaw@hashicorp.com>
This commit is contained in:
claire bontempo
2022-12-19 15:54:59 -08:00
committed by GitHub
parent 600c1e634b
commit 5ebb6dfb0e
21 changed files with 330 additions and 239 deletions

View File

@@ -54,7 +54,7 @@ export default Component.extend({
// If after decoding it's not b64, we want
// the original as it was only encoded when we used `readAsDataURL`.
const fileData = decoded.match(BASE_64_REGEX) ? decoded : b64File;
yield this.onChange(this.index, { value: fileData, fileName: filename });
yield this.onChange(this.index, { value: fileData, filename: filename });
})
),