diff --git a/web/src/app/shared/components/number-picker/number-picker.component.html b/web/src/app/shared/components/number-picker/number-picker.component.html deleted file mode 100644 index 7d5d4b182..000000000 --- a/web/src/app/shared/components/number-picker/number-picker.component.html +++ /dev/null @@ -1,11 +0,0 @@ -
- -
- - -
-
diff --git a/web/src/app/shared/components/number-picker/number-picker.component.scss b/web/src/app/shared/components/number-picker/number-picker.component.scss deleted file mode 100644 index e9da03c5c..000000000 --- a/web/src/app/shared/components/number-picker/number-picker.component.scss +++ /dev/null @@ -1,46 +0,0 @@ -button { - font-size: 1px; - padding: 0px; -} - -.input-group { - max-width: 100px; -} - -input { - text-align: right; -} -.input-group-btn-vertical { - position: relative; - white-space: nowrap; - vertical-align: middle; - display: table-cell; -} -.input-group-btn-vertical > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; - padding: 1px; - margin-left: -1px; - position: relative; - border-radius: 0; -} -.input-group-btn-vertical > .btn:first-child { - border-top-right-radius: 4px; -} -.input-group-btn-vertical > .btn:last-child { - margin-top: -3px; - border-bottom-right-radius: 4px; -} - -// small "hack" to remove the arrows in the input fields of type numbers -input[type='number']::-webkit-inner-spin-button, -input[type='number']::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; -} - -input[type='number'] { - -moz-appearance: textfield; -} diff --git a/web/src/app/shared/components/number-picker/number-picker.component.spec.ts b/web/src/app/shared/components/number-picker/number-picker.component.spec.ts deleted file mode 100644 index fd8402c20..000000000 --- a/web/src/app/shared/components/number-picker/number-picker.component.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { NumberPickerComponent } from './number-picker.component'; - -describe('NumberPickerComponent', () => { - let component: NumberPickerComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [NumberPickerComponent], - imports: [FormsModule, ReactiveFormsModule] - }).compileComponents(); - - fixture = TestBed.createComponent(NumberPickerComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/web/src/app/shared/components/number-picker/number-picker.component.ts b/web/src/app/shared/components/number-picker/number-picker.component.ts deleted file mode 100644 index 67533bb73..000000000 --- a/web/src/app/shared/components/number-picker/number-picker.component.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Component, OnInit, forwardRef, Input } from '@angular/core'; -import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; - -@Component({ - selector: 'taskana-shared-number-picker', - templateUrl: './number-picker.component.html', - styleUrls: ['./number-picker.component.scss'], - providers: [ - { - provide: NG_VALUE_ACCESSOR, - useExisting: forwardRef(() => NumberPickerComponent), - multi: true - } - ] -}) -export class NumberPickerComponent implements OnInit, ControlValueAccessor { - @Input() required = false; - - // The internal data model - private innerValue: any = 0; - - // Placeholders for the callbacks which are later provided - // by the Control Value Accessor - private onTouchedCallback: () => {}; - private onChangeCallback: (_: any) => {}; - - ngOnInit() {} - - // get accessor - get value(): any { - return this.innerValue; - } - - // set accessor including call the onchange callback - set value(v: any) { - if (v !== this.innerValue) { - this.innerValue = v; - this.onChangeCallback(v); - } - } - - // From ControlValueAccessor interface - writeValue(value: any) { - if (value !== this.innerValue) { - this.innerValue = value; - } - } - - // From ControlValueAccessor interface - registerOnChange(fn: any) { - this.onChangeCallback = fn; - } - - // From ControlValueAccessor interface - registerOnTouched(fn: any) { - this.onTouchedCallback = fn; - } - - increase() { - if (!this.value) { - this.value = 0; - } - this.value += 1; - } - - decrease() { - if (!this.value) { - this.value = 0; - } - this.value -= 1; - } -} diff --git a/web/src/app/shared/shared.module.ts b/web/src/app/shared/shared.module.ts index f86731b81..dbda9edfc 100644 --- a/web/src/app/shared/shared.module.ts +++ b/web/src/app/shared/shared.module.ts @@ -27,7 +27,6 @@ import { MatButtonModule } from '@angular/material/button'; import { MatRadioModule } from '@angular/material/radio'; import { SortComponent } from './components/sort/sort.component'; import { PaginationComponent } from './components/pagination/pagination.component'; -import { NumberPickerComponent } from './components/number-picker/number-picker.component'; import { ProgressSpinnerComponent } from './components/progress-spinner/progress-spinner.component'; /** @@ -93,7 +92,6 @@ const DECLARATIONS = [ IconTypeComponent, FieldErrorDisplayComponent, PaginationComponent, - NumberPickerComponent, ProgressSpinnerComponent, ToastComponent, DialogPopUpComponent,