diff --git a/.idea/typescript-compiler.xml b/.idea/typescript-compiler.xml
index 17ff836..778bac5 100644
--- a/.idea/typescript-compiler.xml
+++ b/.idea/typescript-compiler.xml
@@ -2,6 +2,8 @@
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index e84326a..0bd0570 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,19 +1,11 @@
-
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
@@ -27,80 +19,102 @@
-
-
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- $PROJECT_DIR$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
true
DEFINITION_ORDER
@@ -109,12 +123,11 @@
-
-
-
-
+
+
+
+
-
@@ -130,8 +143,6 @@
-
-
@@ -176,6 +187,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -236,6 +269,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -268,30 +335,13 @@
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -305,7 +355,7 @@
-
+
@@ -344,12 +394,6 @@
- project
-
-
-
-
-
@@ -372,103 +416,53 @@
false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1494960346363
+
+ 1496129405467
- 1494960346363
-
-
-
-
-
-
-
-
-
-
-
-
+ 1496129405467
+
-
- 1494973365190
+
+ 1496129612668
- 1494973365190
+ 1496129612668
-
- 1494973873374
-
-
-
- 1494973873374
-
-
- 1495053476965
-
-
-
- 1495053476965
-
-
+
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
@@ -476,38 +470,40 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -515,302 +511,79 @@
-
-
-
-
-
-
-
-
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/modules/dyn-form/inputs/dropdown-input.component.ts b/src/app/modules/dyn-form/inputs/dropdown-input.component.ts
index 46bd411..96d18f3 100644
--- a/src/app/modules/dyn-form/inputs/dropdown-input.component.ts
+++ b/src/app/modules/dyn-form/inputs/dropdown-input.component.ts
@@ -1,7 +1,7 @@
import {Component, forwardRef, Inject, Input, OnChanges, Pipe, PipeTransform, SimpleChanges} from '@angular/core';
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormControl, ValidationErrors } from '@angular/forms';
import {CustomInputComponent} from "./custom-input.component";
-import {HelloService} from '../../../services/hello.service';
+import {HttpCachedService} from '../../../services/http-cached.service';
@Pipe({name: 'keys'})
export class KeysPipe implements PipeTransform {
@@ -42,9 +42,8 @@ export class DropdownInputComponent extends CustomInputComponent implements OnCh
private listedItems: Array<{key: string, value: string}> = [];
private constVal: string;
- constructor(private helloService: HelloService) {
+ constructor(private httpCachedService: HttpCachedService) {
super();
- helloService.sayHello();
}
// set initial value
diff --git a/src/app/modules/dyn-form/services/question.service.ts b/src/app/modules/dyn-form/services/question.service.ts
index 3827249..0f20611 100644
--- a/src/app/modules/dyn-form/services/question.service.ts
+++ b/src/app/modules/dyn-form/services/question.service.ts
@@ -10,18 +10,40 @@ export class QuestionService {
public getQuestions(cb: (res: QuestionInterface[], err: any) => void) {
setTimeout(() => cb([
{
- type: "flag",
- description: "This is a help tooltip",
+ type: 'flag',
+ description: 'This is a help tooltip',
properties: {
- key: "flags",
- label: "Form Type Flags",
+ key: 'flags',
+ label: 'Form Type Flags',
order: 1,
// dropdown && flags
- options: [{key: "alpha", value: "A"}, {key: "beta", value: "B"}]
- },
- constraints: {
- optional: true
+ options: [{key: 'alpha', value: 'A'}, {key: 'beta', value: 'B'}, {key: 'gamma', value: 'C'}, {key: 'delta', value: 'D'}]
+ }, constraints: {
+ optional: true
+ }
+ }, {
+ type: 'dropdown',
+ description: 'Cool dropdown',
+ properties: {
+ key: 'cooldrop',
+ label: 'Dropdown',
+ order: 2,
+ methods: ['insert'],
+
+ // dropdown
+ options: [{key: 'hello', value: 'Hallo'}, {key: 'world', value: 'World'}, {key: 'and', value: 'And'}, {key: 'u', value: 'You'}]
+ }, constraints: {
+ optional: false
+ }
+ }, {
+ type: 'hidden',
+ description: 'ID',
+ properties: {
+ key: 'ID',
+ order: 3
+ }, constraints: {
+ optional: false
}
}
], null), 4000);