diff --git a/demo/app/components/csv-entry/csv-entry.component.html b/demo/app/components/csv-entry/csv-entry.component.html index ac51d418c..7bad467c3 100644 --- a/demo/app/components/csv-entry/csv-entry.component.html +++ b/demo/app/components/csv-entry/csv-entry.component.html @@ -1,12 +1,33 @@

CSV Entry

+
+ Footer direction: + +
+
+ > + +
diff --git a/demo/app/components/csv-entry/csv-entry.component.ts b/demo/app/components/csv-entry/csv-entry.component.ts index 312f8f404..c31c9cd97 100644 --- a/demo/app/components/csv-entry/csv-entry.component.ts +++ b/demo/app/components/csv-entry/csv-entry.component.ts @@ -8,31 +8,29 @@ import { TsValidatorsService } from '@terminus/ui/validators'; templateUrl: './csv-entry.component.html', }) export class CSVEntryComponent { - validators = [ + public validators = [ Validators.required, this.validatorsService.url(), ]; - results: string | undefined; - blob; - myFile; + public results: string | undefined; + public blob; + public myFile; + public footerDirection: 'ltr' | 'rtl' = 'ltr'; constructor( private validatorsService: TsValidatorsService, ) {} - - file(v: Blob) { + public file(v: Blob): void { console.log('DEMO: Got file from CSV entry: ', v); this.blob = v; } - - generateFile() { + public generateFile(): void { this.myFile = new File([this.blob], 'testCsv'); saveFile(this.blob, 'test'); } - } diff --git a/demo/app/components/csv-entry/csv-entry.module.ts b/demo/app/components/csv-entry/csv-entry.module.ts index 2d1c27751..98ca2bf13 100644 --- a/demo/app/components/csv-entry/csv-entry.module.ts +++ b/demo/app/components/csv-entry/csv-entry.module.ts @@ -1,5 +1,6 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; import { TsCardModule } from '@terminus/ui/card'; import { TsCSVEntryModule } from '@terminus/ui/csv-entry'; import { TsSpacingModule } from '@terminus/ui/spacing'; @@ -13,6 +14,7 @@ import { CSVEntryComponent } from './csv-entry.component'; imports: [ CommonModule, CSVEntryRoutingModule, + FormsModule, TsCardModule, TsCSVEntryModule, TsSpacingModule, diff --git a/terminus-ui/csv-entry/src/csv-entry.component.html b/terminus-ui/csv-entry/src/csv-entry.component.html index 0b887ca0b..1c2cd8845 100644 --- a/terminus-ui/csv-entry/src/csv-entry.component.html +++ b/terminus-ui/csv-entry/src/csv-entry.component.html @@ -129,21 +129,29 @@ >{{ tooManyRowsMessage }} -
- Reset Table - - Add Row +
+
+ Reset Table + + Add Row +
+ + + +
+ +
diff --git a/terminus-ui/csv-entry/src/csv-entry.component.ts b/terminus-ui/csv-entry/src/csv-entry.component.ts index d89a0e8d7..e722c9246 100644 --- a/terminus-ui/csv-entry/src/csv-entry.component.ts +++ b/terminus-ui/csv-entry/src/csv-entry.component.ts @@ -94,16 +94,6 @@ const DEFAULT_VALIDATION_MESSAGES_MAX = 6; /** * This is the csv-entry UI Component * - * #### QA CSS CLASSES - * - `qa-csv-entry`: The primary container - * - `qa-csv-entry-info`: Container for row/column count - * - `qa-csv-entry-row`: A row - * - `qa-csv-entry-cell`: A body cell - * - `qa-csv-entry-header-cell`: A header cell - * - `qa-csv-entry-header-row`: Container for a header row - * - `qa-csv-entry-delete`: A delete button - * - `qa-csv-entry`: Placed on the primary container - * * @example * @@ -264,6 +255,12 @@ export class TsCSVEntryComponent implements OnInit, OnDestroy { } private _columnValidators: ValidatorFn | null[] = []; + /** + * Define the layout direction for the footer + */ + @Input() + public footerDirection: 'ltr' | 'rtl' = 'ltr'; + /** * Define output to be CSV rather than TSV */