diff --git a/src/app/base/base.module.ts b/src/app/base/base.module.ts
index 3576a1b0..587b2064 100644
--- a/src/app/base/base.module.ts
+++ b/src/app/base/base.module.ts
@@ -18,6 +18,7 @@ import { PercentRoundPipe } from './pipes/decimal-round.pipe';
import { HeaderComponent } from './components/header/header.component';
import { DropdownComponent } from './components/dropdown/dropdown.component';
import { DropdownIterativeComponent } from './components/dropdown-iterative/dropdown-iterative.component';
+import { DropdownItComponent } from './components/dropdown-it/dropdown-it.component';
@NgModule({
declarations: [
@@ -30,7 +31,8 @@ import { DropdownIterativeComponent } from './components/dropdown-iterative/drop
PercentRoundPipe,
HeaderComponent,
DropdownComponent,
- DropdownIterativeComponent
+ DropdownIterativeComponent,
+ DropdownItComponent
],
imports: [CommonModule, AppRoutingModule, HighlightModule],
exports: [
@@ -53,7 +55,8 @@ import { DropdownIterativeComponent } from './components/dropdown-iterative/drop
PercentRoundPipe,
HeaderComponent,
DropdownComponent,
- DropdownIterativeComponent
+ DropdownIterativeComponent,
+ DropdownItComponent
],
providers: [
{
diff --git a/src/app/base/components/dropdown-it/dropdown-it-helper.ts b/src/app/base/components/dropdown-it/dropdown-it-helper.ts
new file mode 100644
index 00000000..7daa22c1
--- /dev/null
+++ b/src/app/base/components/dropdown-it/dropdown-it-helper.ts
@@ -0,0 +1,26 @@
+import { FormArray } from "@angular/forms";
+
+/**
+ * Optionset for kern dropdown
+ * @optionArray {string[] | FormArray[] | any[]} - Can be any array. string array is just used, FormArray or any object array tries to use "name" property then "text" last first string property
+ * @buttonCaption {string, optional} - used as caption for the button, if not given the first / current value is used
+ * @valuePropertyPath {string, optional} - if undefined option text is returned, else (e.g. name.tmp.xyz) the path is split and used to access the object property
+ * @keepDropdownOpen {boolean, optional} - stops the event propagation of the click event and therfore keeps the menu open
+ * @buttonTooltip {string, optional} - adds a tooltip if defined
+ * @isDisabled {boolean, optional} - disables the dropdown
+ * @isOptionDisabled {boolean[], optional} - disables the dropdown option (needs to be the exact same length as the optionArray)
+ * @optionIcons {string[], optional} - displays a predfined icon if set for the index (needs to be the exact same length as the optionArray)
+ * @hasCheckboxes {boolean, optional} - helper for checkbox like dropdowns (e.g. data browser)
+ */
+export type DropdownOptions = {
+ optionArray: string[] | FormArray[] | any[];
+ buttonCaption?: string;
+ valuePropertyPath?: string;
+ keepDropdownOpen?: boolean;
+ buttonTooltip?: string;
+ isDisabled?: boolean;
+ isOptionDisabled?: boolean[];
+ optionIcons?: string[];
+ hasCheckboxes?: boolean;
+};
+
diff --git a/src/app/base/components/dropdown-it/dropdown-it.component.html b/src/app/base/components/dropdown-it/dropdown-it.component.html
new file mode 100644
index 00000000..dcd6bd9c
--- /dev/null
+++ b/src/app/base/components/dropdown-it/dropdown-it.component.html
@@ -0,0 +1,144 @@
+