summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/components/dynamic-element/elements-ui')
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.html1
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.less2
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.ts47
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.html3
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.less11
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.ts52
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.html15
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.less17
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.ts41
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.html15
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.less17
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.ts41
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.html26
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.less36
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.ts58
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/ui-element-base.component.ts55
16 files changed, 0 insertions, 437 deletions
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.html b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.html
deleted file mode 100644
index a3e28c5f0b..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.html
+++ /dev/null
@@ -1 +0,0 @@
-<input #{{name}} [(ngModel)]="value" type="checkbox" (change)="onSave(value)" [ngClass]="{'disabled':readonly}"/>
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.less b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.less
deleted file mode 100644
index bed097fe5e..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.less
+++ /dev/null
@@ -1,2 +0,0 @@
-/deep/ ui-element-checkbox {
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.ts b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.ts
deleted file mode 100644
index f73afd42c7..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/checkbox/ui-element-checkbox.component.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-import { Component, ViewChild, ElementRef, ContentChildren, Input } from '@angular/core';
-import { BrowserModule } from '@angular/platform-browser'
-import { UiElementBase, UiElementBaseInterface } from './../ui-element-base.component';
-
-@Component({
- selector: 'ui-element-checkbox',
- templateUrl: './ui-element-checkbox.component.html',
- styleUrls: ['./ui-element-checkbox.component.less'],
-})
-export class UiElementCheckBoxComponent extends UiElementBase implements UiElementBaseInterface {
-
- constructor() {
- super();
- }
-
- ngAfterContentInit() {
- // Convert the value to boolean (instanceOf does not work, the type is undefined).
- if (this.value==='true' || this.value==='false') {
- this.value = this.value==='true'?true:false;
- }
- }
-
- onSave() {
- this.baseEmitter.emit(this.value);
- }
-
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.html b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.html
deleted file mode 100644
index bfb927af71..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<select name='{{name}}' [(ngModel)]="value" #t (change)="onSave()" [ngClass]="{'disabled':readonly}">
- <option *ngFor="let ddvalue of values" [value]="ddvalue.value">{{ddvalue.label}}</option>
-</select>
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.less b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.less
deleted file mode 100644
index ea3e35140e..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.less
+++ /dev/null
@@ -1,11 +0,0 @@
-@import '../../../../../../assets/styles/variables';
-
-/deep/ ui-element-dropdown {
-
- select {
- text-indent: 6px;
- border: solid 1px @main_color_o;
- width: 100%;
- }
-
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.ts b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.ts
deleted file mode 100644
index 970c61531f..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/dropdown/ui-element-dropdown.component.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-import { Component, EventEmitter, Output, Input } from '@angular/core'
-import { BrowserModule } from '@angular/platform-browser'
-import { UiElementBase, UiElementBaseInterface } from './../ui-element-base.component';
-
-export class DropdownValue {
- value:string;
- label:string;
-
- constructor(value:string,label:string) {
- this.value = value;
- this.label = label;
- }
-}
-
-@Component({
- selector: 'ui-element-dropdown',
- templateUrl: './ui-element-dropdown.component.html',
- styleUrls: ['./ui-element-dropdown.component.less'],
-})
-export class UiElementDropDownComponent extends UiElementBase implements UiElementBaseInterface {
- @Input()
- values: DropdownValue[];
-
- constructor() {
- super();
- }
-
- onSave() {
- this.baseEmitter.emit(JSON.parse(this.value));
- }
-
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.html b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.html
deleted file mode 100644
index 814ebfd28b..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<input
- class="value-input"
- [ngClass]="{'error': control.invalid}"
- type="text"
- [name]="name"
- [(ngModel)]="value"
- (change)="onSave()"
- [attr.maxlength]="validation.propertyValue.max"
- [attr.minlength]="validation.propertyValue.min"
- [pattern]="pattern"
- [formControl]="control"
- tooltip="{{value}}"
- [readonly]="readonly"
- [ngClass]="{'disabled':readonly}"
- />
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.less b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.less
deleted file mode 100644
index d320c7ff8b..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.less
+++ /dev/null
@@ -1,17 +0,0 @@
-@import '../../../../../../assets/styles/variables';
-
-/deep/ ui-element-input {
-
- input {
- text-indent: 6px;
- border: solid 1px @main_color_o;
- }
-
- .error {
- border: solid 1px @func_color_q;
- color: @func_color_q;
- outline: none;
- box-sizing: border-box;
- }
-
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.ts b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.ts
deleted file mode 100644
index fb3b3db859..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/input/ui-element-input.component.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-import {Component, ViewChild, ElementRef, ContentChildren, Input} from '@angular/core';
-import { BrowserModule } from '@angular/platform-browser'
-import { UiElementBase, UiElementBaseInterface } from './../ui-element-base.component';
-
-@Component({
- selector: 'ui-element-input',
- templateUrl: './ui-element-input.component.html',
- styleUrls: ['./ui-element-input.component.less'],
-})
-export class UiElementInputComponent extends UiElementBase implements UiElementBaseInterface {
- constructor() {
- super();
- this.pattern = this.validation.validationPatterns.comment;
- }
-
- onSave() {
- if (!this.control.invalid){
- this.baseEmitter.emit(this.value);
- }
- }
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.html b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.html
deleted file mode 100644
index e5518d453f..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<input
- class="value-input"
- [ngClass]="{'error': control.invalid}"
- type="text"
- [name]="name"
- [(ngModel)]="value"
- (change)="onSave()"
- [attr.maxlength]="validation.propertyValue.max"
- [attr.minlength]="validation.propertyValue.min"
- [pattern]="pattern"
- [formControl]="control"
- tooltip="{{value}}"
- [readonly]="readonly"
- [ngClass]="{'disabled':readonly}"
-/>
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.less b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.less
deleted file mode 100644
index 8073c3858e..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.less
+++ /dev/null
@@ -1,17 +0,0 @@
-@import '../../../../../../assets/styles/variables';
-
-/deep/ ui-element-integer-input {
-
- input {
- text-indent: 6px;
- border: solid 1px @main_color_o;
- }
-
- .error {
- border: solid 1px @func_color_q;
- color: @func_color_q;
- outline: none;
- box-sizing: border-box;
- }
-
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.ts b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.ts
deleted file mode 100644
index 3339b605ca..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/integer-input/ui-element-integer-input.component.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-import {Component, ViewChild, ElementRef, ContentChildren, Input} from '@angular/core';
-import { BrowserModule } from '@angular/platform-browser'
-import { UiElementBase, UiElementBaseInterface } from './../ui-element-base.component';
-
-@Component({
- selector: 'ui-element-integer-input',
- templateUrl: './ui-element-integer-input.component.html',
- styleUrls: ['./ui-element-integer-input.component.less'],
-})
-export class UiElementIntegerInputComponent extends UiElementBase implements UiElementBaseInterface {
- constructor() {
- super();
- this.pattern = this.validation.validationPatterns.comment;
- }
-
- onSave() {
- if (!this.control.invalid){
- this.baseEmitter.emit(this.value ? JSON.parse(this.value) : this.value);
- }
- }
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.html b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.html
deleted file mode 100644
index 3bd51b4e36..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<div class="popover-input-wrapper" tooltip="{{value}}">
- <input
- class="value-input"
- type="text"
- [ngClass]="{'error': control.invalid}"
- [name]="name"
- [value]="value!=undefined?value:''"
- disabled
- />
- <button [popover]="popoverForm" [ngClass]="{'disabled':readonly}">Edit</button>
-</div>
-
-<popover-content #popoverForm [title]="name" [buttons]="buttonsArray" [placement]="'top'" [closeOnClickOutside]="true">
- <div class="edit-subnet-wrapper">
- <textarea rows="5"
- #textArea
- class="subnet-value"
- [ngClass]="{'error': control.invalid}"
- [(ngModel)]="value"
- [attr.maxlength]="validation.propertyValue.max"
- [attr.minlength]="validation.propertyValue.min"
- [pattern]="pattern"
- [formControl]="control"
- ></textarea>
- </div>
-</popover-content>
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.less b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.less
deleted file mode 100644
index 5be443f7b6..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.less
+++ /dev/null
@@ -1,36 +0,0 @@
-@import '../../../../../../assets/styles/variables';
-
-.popover-input-wrapper {
- display: flex;
-}
-
-/deep/ ui-element-popover-input {
-
- .popover {
- max-width: 350px;
- width: 350px;
- }
-
- .edit-subnet-wrapper {
- padding: 12px;
-
- .subnet-value {
- width: 100%;
- resize: none;
- }
- }
-
- input {
- padding-right: 6px;
- padding-left: 6px;
- border: solid 1px @main_color_o;
- }
-
- .error {
- border: solid 1px @func_color_q;
- color: @func_color_q;
- outline: none;
- box-sizing: border-box;
- }
-
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.ts b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.ts
deleted file mode 100644
index 67eb8822b4..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/popover-input/ui-element-popover-input.component.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-import {Component, ViewChild, ElementRef, Input} from '@angular/core';
-import {UiElementBase, UiElementBaseInterface} from "../ui-element-base.component";
-import {ButtonsModelMap, ButtonModel} from "app/models";
-import { PopoverContentComponent } from "app/ng2/components/popover/popover-content.component"
-import { PopoverComponent } from "app/ng2/components/popover/popover.component"
-
-@Component({
- selector: 'ui-element-popover-input',
- templateUrl: './ui-element-popover-input.component.html',
- styleUrls: ['./ui-element-popover-input.component.less']
-})
-export class UiElementPopoverInputComponent extends UiElementBase implements UiElementBaseInterface {
- @ViewChild('textArea') textArea: ElementRef;
- @ViewChild('popoverForm') popoverContentComponent: PopoverContentComponent;
-
- saveButton: ButtonModel;
- buttonsArray: ButtonsModelMap;
-
- onSave = ():void => {
- if (!this.control.invalid){
- this.baseEmitter.emit(this.value);
- this.popoverContentComponent.hide();
- }
- }
-
- constructor() {
- super();
- // Create Save button and insert to buttons map
- this.saveButton = new ButtonModel('save', 'blue', this.onSave);
- this.buttonsArray = { 'test': this.saveButton };
-
- // Define the regex pattern for this controller
- this.pattern = this.validation.validationPatterns.comment;
-
- // Disable / Enable button according to validation
- //this.control.valueChanges.subscribe(data => this.saveButton.disabled = this.control.invalid);
- }
-}
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/ui-element-base.component.ts b/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/ui-element-base.component.ts
deleted file mode 100644
index 4bc35e814a..0000000000
--- a/catalog-ui/src/app/ng2/components/dynamic-element/elements-ui/ui-element-base.component.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-import { Component, EventEmitter, Input, Output } from '@angular/core'
-import { ValidationConfiguration } from "app/models";
-import { FormControl, Validators } from '@angular/forms';
-
-export interface UiElementBaseInterface {
- onSave();
-}
-
-@Component({
- template: ``,
- styles: []
-})
-export class UiElementBase {
-
- protected validation = ValidationConfiguration.validation;
- protected control: FormControl;
-
- // Two way binding for value (need to write the "Change" word like this)
- @Output('valueChange') baseEmitter: EventEmitter<string> = new EventEmitter<any>();
- @Input('value') set setValueValue(value) {
- this.value = value;
- }
-
- protected name: string;
- protected type: string;
- protected value: any;
- protected pattern: any;
- protected readonly:boolean;
-
- constructor() {
- //this.control = new FormControl('', [Validators.required]);
- this.control = new FormControl('', []);
- }
-
-}