@klippa/ngx-enhancy-forms 2.0.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/klippa-ngx-enhancy-forms.umd.js +610 -536
- package/bundles/klippa-ngx-enhancy-forms.umd.js.map +1 -1
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js +2 -3
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js.map +1 -1
- package/esm2015/lib/elements/select/select.component.js +7 -5
- package/esm2015/lib/form/form-element/form-element.component.js +3 -1
- package/esm2015/lib/form/form-submit-button/form-submit-button.component.js +17 -6
- package/esm2015/lib/form/form.component.js +75 -19
- package/fesm2015/klippa-ngx-enhancy-forms.js +132 -63
- package/fesm2015/klippa-ngx-enhancy-forms.js.map +1 -1
- package/klippa-ngx-enhancy-forms.metadata.json +1 -1
- package/lib/elements/select/select.component.d.ts +2 -0
- package/lib/form/form.component.d.ts +17 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component, Input, InjectionToken, Host,
|
|
1
|
+
import { Component, SkipSelf, Optional, Input, InjectionToken, Host, Inject, ViewChild, HostBinding, EventEmitter, Output, ContentChild, TemplateRef, NgModule } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FormGroup, FormArray, FormControl, ControlContainer, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
3
|
+
import { FormGroup, FormArray, FormControl, FormGroupName, ControlContainer, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
4
4
|
import { isString } from 'lodash';
|
|
5
5
|
import { SortablejsModule } from 'ngx-sortablejs';
|
|
6
6
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
@@ -10,63 +10,151 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|
|
10
10
|
import { MatInputModule } from '@angular/material/input';
|
|
11
11
|
import { MatButtonModule } from '@angular/material/button';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
function stringIsSetAndNotEmpty(s) {
|
|
14
|
+
return isString(s) && s.length > 0;
|
|
15
|
+
}
|
|
16
|
+
function isNullOrUndefined(value) {
|
|
17
|
+
return value === null || value === undefined;
|
|
18
|
+
}
|
|
19
|
+
function numberIsSet(value) {
|
|
20
|
+
return isValueSet(value) && typeof value === 'number';
|
|
21
|
+
}
|
|
22
|
+
function isValueSet(value) {
|
|
23
|
+
return value !== null && value !== undefined;
|
|
24
|
+
}
|
|
25
|
+
function stringOrArrayIsSetAndEmpty(value) {
|
|
26
|
+
return value !== null && value !== undefined && value.length === 0;
|
|
27
|
+
}
|
|
28
|
+
function useIfStringIsSet(s) {
|
|
29
|
+
if (stringIsSetAndNotEmpty(s)) {
|
|
30
|
+
return s;
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
function useIfArrayIsSetWithOneItem(a) {
|
|
35
|
+
if (!isNullOrUndefined(a) && a.length === 1) {
|
|
36
|
+
return a[0];
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
function convertParentToChild(originalClass, newClass) {
|
|
41
|
+
return Object.assign(newClass, originalClass);
|
|
42
|
+
}
|
|
43
|
+
function truncateString(s, length) {
|
|
44
|
+
if (s.length < length) {
|
|
45
|
+
return s;
|
|
46
|
+
}
|
|
47
|
+
return s.substring(0, length) + '...';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const invalidFieldsSymbol = Symbol('Not all fields are valid');
|
|
51
|
+
// Only used as a 'marker' to define a property will be filled in by a sub form
|
|
52
|
+
class SubForm extends FormGroup {
|
|
14
53
|
constructor() {
|
|
54
|
+
super({}, null);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
class FormComponent {
|
|
58
|
+
constructor(parent, surroundingFormGroupName) {
|
|
59
|
+
this.parent = parent;
|
|
60
|
+
this.surroundingFormGroupName = surroundingFormGroupName;
|
|
15
61
|
// we keep track of what form controls are actually rendered. Only those count when looking at form validation
|
|
16
62
|
this.activeControls = [];
|
|
17
63
|
}
|
|
64
|
+
ngOnInit() {
|
|
65
|
+
var _a;
|
|
66
|
+
if (this.parent) {
|
|
67
|
+
if (!isValueSet((_a = this.surroundingFormGroupName) === null || _a === void 0 ? void 0 : _a.name)) {
|
|
68
|
+
throw new Error('No surrounding groupname is found for a nested form');
|
|
69
|
+
}
|
|
70
|
+
const groupName = String(this.surroundingFormGroupName.name);
|
|
71
|
+
const groupToOverwrite = this.parent.formGroup.get(groupName);
|
|
72
|
+
if (!(groupToOverwrite instanceof SubForm)) {
|
|
73
|
+
throw new Error(`Surrounding groupname '${groupName}' is not a subFormSubstitute'`);
|
|
74
|
+
}
|
|
75
|
+
this.parent.formGroup.setControl(groupName, this.formGroup);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
18
78
|
registerControl(formControl, formElement) {
|
|
19
79
|
this.activeControls.push({ formControl, formElement });
|
|
80
|
+
if (this.parent) {
|
|
81
|
+
this.parent.registerControl(formControl, formElement);
|
|
82
|
+
}
|
|
20
83
|
}
|
|
21
84
|
unregisterControl(formControl) {
|
|
22
85
|
this.activeControls = this.activeControls.filter((e) => e.formControl !== formControl);
|
|
86
|
+
if (this.parent) {
|
|
87
|
+
this.parent.unregisterControl(formControl);
|
|
88
|
+
}
|
|
23
89
|
}
|
|
24
|
-
|
|
90
|
+
addFormGroupControls(formGroup, result) {
|
|
25
91
|
Object.values(formGroup.controls).forEach((value) => {
|
|
26
92
|
if (value instanceof FormGroup) {
|
|
27
|
-
this.
|
|
93
|
+
this.addFormGroupControls(value, result);
|
|
28
94
|
}
|
|
29
95
|
else if (value instanceof FormArray) {
|
|
30
|
-
this.
|
|
96
|
+
this.addFormArrayControls(value, result);
|
|
31
97
|
}
|
|
32
98
|
else if (value instanceof FormControl) {
|
|
33
|
-
this.
|
|
99
|
+
this.addFormControl(value, result);
|
|
34
100
|
}
|
|
35
101
|
});
|
|
36
102
|
}
|
|
37
|
-
|
|
103
|
+
addFormArrayControls(formArray, result) {
|
|
38
104
|
formArray.controls.forEach((value) => {
|
|
39
105
|
if (value instanceof FormGroup) {
|
|
40
|
-
this.
|
|
106
|
+
this.addFormGroupControls(value, result);
|
|
41
107
|
}
|
|
42
108
|
else if (value instanceof FormArray) {
|
|
43
|
-
this.
|
|
109
|
+
this.addFormArrayControls(value, result);
|
|
44
110
|
}
|
|
45
111
|
else if (value instanceof FormControl) {
|
|
46
|
-
this.
|
|
112
|
+
this.addFormControl(value, result);
|
|
47
113
|
}
|
|
48
114
|
});
|
|
49
115
|
}
|
|
116
|
+
getAllFormControls() {
|
|
117
|
+
const result = [];
|
|
118
|
+
this.addFormGroupControls(this.formGroup, result);
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
addFormControl(control, result) {
|
|
122
|
+
result.push(control);
|
|
123
|
+
}
|
|
50
124
|
disableInactiveFormControl(control) {
|
|
51
|
-
if (this.activeControls.some((e) => e.formControl === control)) {
|
|
52
|
-
control.enable();
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
125
|
+
if (!this.activeControls.some((e) => e.formControl === control)) {
|
|
55
126
|
control.disable();
|
|
56
127
|
}
|
|
57
128
|
}
|
|
58
129
|
trySubmit() {
|
|
59
130
|
var _a, _b;
|
|
60
131
|
this.formGroup.markAllAsTouched();
|
|
61
|
-
this.
|
|
132
|
+
const allControls = this.getAllFormControls();
|
|
133
|
+
const originalDisabledStates = allControls.map(e => {
|
|
134
|
+
return { control: e, disabled: e.disabled };
|
|
135
|
+
});
|
|
136
|
+
allControls.forEach(e => this.disableInactiveFormControl(e));
|
|
137
|
+
const values = this.formGroup.value;
|
|
62
138
|
if (this.formGroup.valid) {
|
|
63
|
-
|
|
139
|
+
this.setDisabledStatesForAllControls(originalDisabledStates);
|
|
140
|
+
return Promise.resolve(values);
|
|
64
141
|
}
|
|
65
142
|
else {
|
|
66
143
|
(_b = (_a = this.activeControls.find((e) => !e.formControl.valid)) === null || _a === void 0 ? void 0 : _a.formElement) === null || _b === void 0 ? void 0 : _b.scrollTo();
|
|
67
|
-
|
|
144
|
+
this.setDisabledStatesForAllControls(originalDisabledStates);
|
|
145
|
+
return Promise.reject(invalidFieldsSymbol);
|
|
68
146
|
}
|
|
69
147
|
}
|
|
148
|
+
setDisabledStatesForAllControls(originalDisabledStates) {
|
|
149
|
+
originalDisabledStates.forEach((e) => {
|
|
150
|
+
if (e.disabled) {
|
|
151
|
+
e.control.disable();
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
e.control.enable();
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
70
158
|
}
|
|
71
159
|
FormComponent.decorators = [
|
|
72
160
|
{ type: Component, args: [{
|
|
@@ -75,6 +163,10 @@ FormComponent.decorators = [
|
|
|
75
163
|
styles: [":host{display:block}:host.row{display:flex}"]
|
|
76
164
|
},] }
|
|
77
165
|
];
|
|
166
|
+
FormComponent.ctorParameters = () => [
|
|
167
|
+
{ type: FormComponent, decorators: [{ type: SkipSelf }, { type: Optional }] },
|
|
168
|
+
{ type: FormGroupName, decorators: [{ type: Optional }] }
|
|
169
|
+
];
|
|
78
170
|
FormComponent.propDecorators = {
|
|
79
171
|
formGroup: [{ type: Input }]
|
|
80
172
|
};
|
|
@@ -107,6 +199,8 @@ class FormElementComponent {
|
|
|
107
199
|
}, message);
|
|
108
200
|
}
|
|
109
201
|
registerControl(formControl) {
|
|
202
|
+
// console.log('register');
|
|
203
|
+
// console.log(this.caption);
|
|
110
204
|
this.attachedControl = formControl;
|
|
111
205
|
this.parent.registerControl(formControl, this);
|
|
112
206
|
}
|
|
@@ -177,43 +271,6 @@ FormElementComponent.propDecorators = {
|
|
|
177
271
|
internalComponentRef: [{ type: ViewChild, args: ['internalComponentRef',] }]
|
|
178
272
|
};
|
|
179
273
|
|
|
180
|
-
function stringIsSetAndNotEmpty(s) {
|
|
181
|
-
return isString(s) && s.length > 0;
|
|
182
|
-
}
|
|
183
|
-
function isNullOrUndefined(value) {
|
|
184
|
-
return value === null || value === undefined;
|
|
185
|
-
}
|
|
186
|
-
function numberIsSet(value) {
|
|
187
|
-
return isValueSet(value) && typeof value === 'number';
|
|
188
|
-
}
|
|
189
|
-
function isValueSet(value) {
|
|
190
|
-
return value !== null && value !== undefined;
|
|
191
|
-
}
|
|
192
|
-
function stringOrArrayIsSetAndEmpty(value) {
|
|
193
|
-
return value !== null && value !== undefined && value.length === 0;
|
|
194
|
-
}
|
|
195
|
-
function useIfStringIsSet(s) {
|
|
196
|
-
if (stringIsSetAndNotEmpty(s)) {
|
|
197
|
-
return s;
|
|
198
|
-
}
|
|
199
|
-
return undefined;
|
|
200
|
-
}
|
|
201
|
-
function useIfArrayIsSetWithOneItem(a) {
|
|
202
|
-
if (!isNullOrUndefined(a) && a.length === 1) {
|
|
203
|
-
return a[0];
|
|
204
|
-
}
|
|
205
|
-
return undefined;
|
|
206
|
-
}
|
|
207
|
-
function convertParentToChild(originalClass, newClass) {
|
|
208
|
-
return Object.assign(newClass, originalClass);
|
|
209
|
-
}
|
|
210
|
-
function truncateString(s, length) {
|
|
211
|
-
if (s.length < length) {
|
|
212
|
-
return s;
|
|
213
|
-
}
|
|
214
|
-
return s.substring(0, length) + '...';
|
|
215
|
-
}
|
|
216
|
-
|
|
217
274
|
/**
|
|
218
275
|
* This component is a base in order to create a component that supports ngModel.
|
|
219
276
|
* Some important things to know about it:
|
|
@@ -426,14 +483,15 @@ class SelectComponent extends ValueAccessorBase {
|
|
|
426
483
|
this.placeholder = 'Pick an option';
|
|
427
484
|
this.multiple = false;
|
|
428
485
|
this.clearable = true;
|
|
486
|
+
this.onSearch = new EventEmitter();
|
|
429
487
|
}
|
|
430
488
|
}
|
|
431
489
|
SelectComponent.decorators = [
|
|
432
490
|
{ type: Component, args: [{
|
|
433
491
|
selector: 'klp-form-select',
|
|
434
|
-
template: "<ng-select\n\t[placeholder]=\"placeholder\"\n\tbindLabel=\"name\"\n\tbindValue=\"id\"\n\t[items]=\"options\"\n\t[clearable]=\"clearable\"\n\t[(ngModel)]=\"innerValue\"\n\t[ngClass]=\"{showErrors: isInErrorState()}\"\n\t(change)=\"setInnerValueAndNotify(innerValue)\"\n\t[multiple]=\"multiple\"\n\t[disabled]=\"disabled\"\n\t(blur)=\"touch()\"\n\t[dropdownPosition]=\"dropdownPosition\"\n\t[searchFn]=\"customSearchFn\"\n>\n\t<ng-template let-item=\"item\" ng-option-tmp>\n\t\t{{ item.name }}\n\t\t<div *ngIf=\"item.description\" class=\"dropdown-item-description\">\n\t\t\t{{ item.description }}\n\t\t</div>\n\t</ng-template>\n</ng-select>\n",
|
|
492
|
+
template: "<ng-select\n\t[placeholder]=\"placeholder\"\n\tbindLabel=\"name\"\n\tbindValue=\"id\"\n\t[items]=\"options\"\n\t[clearable]=\"clearable\"\n\t[(ngModel)]=\"innerValue\"\n\t[ngClass]=\"{showErrors: isInErrorState()}\"\n\t(change)=\"setInnerValueAndNotify(innerValue)\"\n\t[multiple]=\"multiple\"\n\t[disabled]=\"disabled\"\n\t(blur)=\"touch()\"\n\t(search)=\"onSearch.emit($event.term)\"\n\t[dropdownPosition]=\"dropdownPosition\"\n\t[searchFn]=\"customSearchFn\"\n>\n\t<ng-template let-item=\"item\" ng-option-tmp>\n\t\t{{ item.name }}\n\t\t<div *ngIf=\"item.description\" class=\"dropdown-item-description\">\n\t\t\t{{ item.description }}\n\t\t</div>\n\t</ng-template>\n</ng-select>\n",
|
|
435
493
|
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }],
|
|
436
|
-
styles: [":host{display:block}.showErrors ::ng-deep .ng-select-container{border-color:#ff8000}:host ::ng-deep ng-select.ng-select .ng-select-container{color:#888da8}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container{background:#fff;border-color:#3ed778}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container:hover{box-shadow:none}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow{border-color:transparent transparent #999;border-width:0 5px 5px;top:-2px}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow:hover{border-color:transparent transparent #666}:host ::ng-deep .ng-select.ng-select-opened.ng-select-bottom>.ng-select-container{border-bottom-left-radius:0;border-bottom-right-radius:0}:host ::ng-deep .ng-select.ng-select-opened.ng-select-top>.ng-select-container{border-top-left-radius:0;border-top-right-radius:0}:host ::ng-deep .ng-select.ng-select-disabled>.ng-select-container{background-color:#f9f9f9}:host ::ng-deep .ng-select .ng-has-value .ng-placeholder{display:none}:host ::ng-deep .ng-select .ng-select-container{align-items:center;background-clip:padding-box;background-color:#fff;border:1px solid #e6ecf5;border-radius:4px;border-radius:2px;box-shadow:none;box-sizing:border-box;color:#888da8;display:flex;flex-direction:row;font-size:1rem;font-size:14px;line-height:1.5;margin:0;min-height:42px;outline:none;overflow:visible;padding:.375rem .75rem;transition-delay:0s;transition-duration:.2s;transition-property:all;transition-timing-function:ease-in;width:100%}:host ::ng-deep .ng-select .ng-select-container:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-select .ng-select-container .ng-value-container{align-items:center;overflow:hidden;padding-left:10px}:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-placeholder{color:#aaa}:host ::ng-deep .ng-select.ng-select-single .ng-select-container{height:42px}:host ::ng-deep .ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{left:0;padding-left:10px;padding-right:50px;top:5px}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-label{padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding-left:7px;padding-right:10px;padding-top:2px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background-color:#e7faee;border:1px solid #93e8b3;border-radius:2px;display:flex;font-size:.9em;margin-bottom:5px;margin-right:5px;overflow:hidden}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label{padding-left:5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label{display:inline-block;overflow:hidden;padding:0 5px;text-overflow:ellipsis}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:inline-block;padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon:hover{background-color:#93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left{border-right:1px solid #93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.right{border-left:1px solid #c2e0ff}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding-bottom:3px;padding-left:3px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-bottom:3px;padding-left:3px;position:static;top:5px}:host ::ng-deep .ng-select .ng-clear-wrapper{color:#999}:host ::ng-deep .ng-select .ng-clear-wrapper .ng-clear:hover{color:#ff3c7e}:host ::ng-deep .ng-select .ng-spinner-zone{padding-right:5px;padding-top:5px}:host ::ng-deep .ng-select .ng-arrow-wrapper{padding-right:5px;width:25px}:host ::ng-deep .ng-select .ng-arrow-wrapper:hover .ng-arrow{border-top-color:#666}:host ::ng-deep .ng-select .ng-arrow-wrapper .ng-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px}:host ::ng-deep .ng-dropdown-panel{background-color:#fff;border:1px solid #3ed778;box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-top-color:#e6e6e6;margin-top:-1px;top:100%}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom .ng-dropdown-panel-items .ng-option:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host ::ng-deep .ng-dropdown-panel.ng-select-top{border-bottom-color:#e6e6e6;border-top-left-radius:4px;border-top-right-radius:4px;bottom:100%;margin-bottom:-1px}:host ::ng-deep .ng-dropdown-panel.ng-select-top .ng-dropdown-panel-items .ng-option:first-child{border-top-left-radius:4px;border-top-right-radius:4px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-footer{border-top:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items{margin-bottom:1px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;color:rgba(0,0,0,.54);cursor:default;cursor:pointer;font-weight:500;padding:8px 10px;user-select:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled{cursor:default}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-marked{background-color:#ebf5ff}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected{background-color:#f5faff;font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{background-color:#fff;color:rgba(0,0,0,.87);padding:8px 10px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected .ng-option-label{font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:#ccc}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child{padding-left:22px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label{font-size:80%;font-weight:400;padding-right:5px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding-left:0}:host ::ng-deep ng-select.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{color:#888da8;top:9px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option,:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-input>input{color:#888da8}:host ::ng-deep .ng-select.ng-select-auto-grow{max-width:inherit}:host ::ng-deep .ng-select.ng-select-auto-grow .ng-dropdown-panel{width:auto}"]
|
|
494
|
+
styles: [":host{display:block}.showErrors ::ng-deep .ng-select-container,:host.showErrors ::ng-deep .ng-select-container{border-color:#ff8000}:host ::ng-deep ng-select.ng-select .ng-select-container{color:#888da8}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container{background:#fff;border-color:#3ed778}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container:hover{box-shadow:none}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow{border-color:transparent transparent #999;border-width:0 5px 5px;top:-2px}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow:hover{border-color:transparent transparent #666}:host ::ng-deep .ng-select.ng-select-opened.ng-select-bottom>.ng-select-container{border-bottom-left-radius:0;border-bottom-right-radius:0}:host ::ng-deep .ng-select.ng-select-opened.ng-select-top>.ng-select-container{border-top-left-radius:0;border-top-right-radius:0}:host ::ng-deep .ng-select.ng-select-disabled>.ng-select-container{background-color:#f9f9f9}:host ::ng-deep .ng-select .ng-has-value .ng-placeholder{display:none}:host ::ng-deep .ng-select .ng-select-container{align-items:center;background-clip:padding-box;background-color:#fff;border:1px solid #e6ecf5;border-radius:4px;border-radius:2px;box-shadow:none;box-sizing:border-box;color:#888da8;display:flex;flex-direction:row;font-size:1rem;font-size:14px;line-height:1.5;margin:0;min-height:42px;outline:none;overflow:visible;padding:.375rem .75rem;transition-delay:0s;transition-duration:.2s;transition-property:all;transition-timing-function:ease-in;width:100%}:host ::ng-deep .ng-select .ng-select-container:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-select .ng-select-container .ng-value-container{align-items:center;overflow:hidden;padding-left:10px}:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-placeholder{color:#aaa}:host ::ng-deep .ng-select.ng-select-single .ng-select-container{height:42px}:host ::ng-deep .ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{left:0;padding-left:10px;padding-right:50px;top:5px}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-label{padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding-left:7px;padding-right:10px;padding-top:2px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background-color:#e7faee;border:1px solid #93e8b3;border-radius:2px;display:flex;font-size:.9em;margin-bottom:5px;margin-right:5px;overflow:hidden}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label{padding-left:5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label{display:inline-block;overflow:hidden;padding:0 5px;text-overflow:ellipsis}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:inline-block;padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon:hover{background-color:#93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left{border-right:1px solid #93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.right{border-left:1px solid #c2e0ff}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding-bottom:3px;padding-left:3px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-bottom:3px;padding-left:3px;position:static;top:5px}:host ::ng-deep .ng-select .ng-clear-wrapper{color:#999}:host ::ng-deep .ng-select .ng-clear-wrapper .ng-clear:hover{color:#ff3c7e}:host ::ng-deep .ng-select .ng-spinner-zone{padding-right:5px;padding-top:5px}:host ::ng-deep .ng-select .ng-arrow-wrapper{padding-right:5px;width:25px}:host ::ng-deep .ng-select .ng-arrow-wrapper:hover .ng-arrow{border-top-color:#666}:host ::ng-deep .ng-select .ng-arrow-wrapper .ng-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px}:host ::ng-deep .ng-dropdown-panel{background-color:#fff;border:1px solid #3ed778;box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-top-color:#e6e6e6;margin-top:-1px;top:100%}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom .ng-dropdown-panel-items .ng-option:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host ::ng-deep .ng-dropdown-panel.ng-select-top{border-bottom-color:#e6e6e6;border-top-left-radius:4px;border-top-right-radius:4px;bottom:100%;margin-bottom:-1px}:host ::ng-deep .ng-dropdown-panel.ng-select-top .ng-dropdown-panel-items .ng-option:first-child{border-top-left-radius:4px;border-top-right-radius:4px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-footer{border-top:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items{margin-bottom:1px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;color:rgba(0,0,0,.54);cursor:default;cursor:pointer;font-weight:500;padding:8px 10px;user-select:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled{cursor:default}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-marked{background-color:#ebf5ff}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected{background-color:#f5faff;font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{background-color:#fff;color:rgba(0,0,0,.87);padding:8px 10px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected .ng-option-label{font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:#ccc}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child{padding-left:22px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label{font-size:80%;font-weight:400;padding-right:5px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding-left:0}:host ::ng-deep ng-select.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{color:#888da8;top:9px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option,:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-input>input{color:#888da8}:host ::ng-deep .ng-select.ng-select-auto-grow{max-width:inherit}:host ::ng-deep .ng-select.ng-select-auto-grow .ng-dropdown-panel{width:auto}"]
|
|
437
495
|
},] }
|
|
438
496
|
];
|
|
439
497
|
SelectComponent.ctorParameters = () => [
|
|
@@ -446,7 +504,8 @@ SelectComponent.propDecorators = {
|
|
|
446
504
|
multiple: [{ type: Input }],
|
|
447
505
|
clearable: [{ type: Input }],
|
|
448
506
|
dropdownPosition: [{ type: Input }],
|
|
449
|
-
customSearchFn: [{ type: Input }]
|
|
507
|
+
customSearchFn: [{ type: Input }],
|
|
508
|
+
onSearch: [{ type: Output }]
|
|
450
509
|
};
|
|
451
510
|
|
|
452
511
|
class SortableItemsComponent extends ValueAccessorBase {
|
|
@@ -582,11 +641,21 @@ class FormSubmitButtonComponent {
|
|
|
582
641
|
.trySubmit()
|
|
583
642
|
.then((value) => {
|
|
584
643
|
this.isLoading = true;
|
|
585
|
-
this.submitCallback(value)
|
|
586
|
-
|
|
587
|
-
|
|
644
|
+
const submitCallbackResult = this.submitCallback(value);
|
|
645
|
+
if (isNullOrUndefined(submitCallbackResult)) {
|
|
646
|
+
throw new Error('No promise is returned in your submit function.');
|
|
647
|
+
}
|
|
648
|
+
return submitCallbackResult.then(() => (this.isLoading = false)).catch((e) => {
|
|
649
|
+
this.isLoading = false;
|
|
650
|
+
throw e;
|
|
651
|
+
});
|
|
588
652
|
})
|
|
589
|
-
.catch(() => {
|
|
653
|
+
.catch((e) => {
|
|
654
|
+
if (e === invalidFieldsSymbol) {
|
|
655
|
+
return; // swallow the error, the framework will scroll to the field that needs attention
|
|
656
|
+
}
|
|
657
|
+
throw e;
|
|
658
|
+
});
|
|
590
659
|
}
|
|
591
660
|
}
|
|
592
661
|
FormSubmitButtonComponent.decorators = [
|
|
@@ -789,5 +858,5 @@ NgxEnhancyFormsModule.decorators = [
|
|
|
789
858
|
* Generated bundle index. Do not edit.
|
|
790
859
|
*/
|
|
791
860
|
|
|
792
|
-
export { ButtonComponent, CheckboxComponent, DEFAULT_ERROR_MESSAGES, DatepickerComponent, EmailInputComponent, FORM_ERROR_MESSAGES, FormCaptionComponent, FormComponent, FormElementComponent, FormErrorComponent, FormSubmitButtonComponent, KLP_DATE_FORMATS, LoadingIndicatorComponent, NgxEnhancyFormsModule, NumberInputComponent, PasswordFieldComponent, SelectComponent, SortableItemsComponent, TextInputComponent, ToggleComponent, ValueAccessorBase, dateValidator, invalidDateKey, matDateFormatsFactory, MaterialModule as ɵa };
|
|
861
|
+
export { ButtonComponent, CheckboxComponent, DEFAULT_ERROR_MESSAGES, DatepickerComponent, EmailInputComponent, FORM_ERROR_MESSAGES, FormCaptionComponent, FormComponent, FormElementComponent, FormErrorComponent, FormSubmitButtonComponent, KLP_DATE_FORMATS, LoadingIndicatorComponent, NgxEnhancyFormsModule, NumberInputComponent, PasswordFieldComponent, SelectComponent, SortableItemsComponent, SubForm, TextInputComponent, ToggleComponent, ValueAccessorBase, dateValidator, invalidDateKey, invalidFieldsSymbol, matDateFormatsFactory, MaterialModule as ɵa };
|
|
793
862
|
//# sourceMappingURL=klippa-ngx-enhancy-forms.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"klippa-ngx-enhancy-forms.js","sources":["../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-element/form-element.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/util/values.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/value-accessor-base/value-accessor-base.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/button/button.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/checkbox/checkbox.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/email/email-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/loading-indicator/loading-indicator.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/number-input/number-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/password-field/password-field.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/select/select.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/sortable-items/sortable-items.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/text-input/text-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/toggle/toggle.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-caption/form-caption.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-error/form-error.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-submit-button/form-submit-button.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/validators/dateValidator.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/datepicker/datepicker.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/material.module.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/ngx-enhancy-forms.module.ts","../../../../projects/klippa/ngx-enhancy-forms/src/public-api.ts","../../../../projects/klippa/ngx-enhancy-forms/src/klippa-ngx-enhancy-forms.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\nimport { FormArray, FormControl, FormGroup } from '@angular/forms';\nimport {FormElementComponent} from \"./form-element/form-element.component\";\n\n@Component({\n\tselector: 'klp-form',\n\ttemplateUrl: './form.component.html',\n\tstyleUrls: ['./form.component.scss'],\n})\nexport class FormComponent {\n\t@Input() public formGroup: FormGroup;\n\n\t// we keep track of what form controls are actually rendered. Only those count when looking at form validation\n\tprivate activeControls: Array<{\n\t\tformControl: FormControl;\n\t\tformElement: FormElementComponent;\n\t}> = [];\n\n\tpublic registerControl(formControl: FormControl, formElement: FormElementComponent) {\n\t\tthis.activeControls.push({ formControl, formElement });\n\t}\n\n\tpublic unregisterControl(formControl: FormControl) {\n\t\tthis.activeControls = this.activeControls.filter((e) => e.formControl !== formControl);\n\t}\n\n\tprivate disableInactiveFormGroupControls(formGroup: FormGroup) {\n\t\tObject.values(formGroup.controls).forEach((value) => {\n\t\t\tif (value instanceof FormGroup) {\n\t\t\t\tthis.disableInactiveFormGroupControls(value);\n\t\t\t} else if (value instanceof FormArray) {\n\t\t\t\tthis.disableInactiveFormArrayControls(value);\n\t\t\t} else if (value instanceof FormControl) {\n\t\t\t\tthis.disableInactiveFormControl(value);\n\t\t\t}\n\t\t});\n\t}\n\tprivate disableInactiveFormArrayControls(formArray: FormArray) {\n\t\tformArray.controls.forEach((value) => {\n\t\t\tif (value instanceof FormGroup) {\n\t\t\t\tthis.disableInactiveFormGroupControls(value);\n\t\t\t} else if (value instanceof FormArray) {\n\t\t\t\tthis.disableInactiveFormArrayControls(value);\n\t\t\t} else if (value instanceof FormControl) {\n\t\t\t\tthis.disableInactiveFormControl(value);\n\t\t\t}\n\t\t});\n\t}\n\tprivate disableInactiveFormControl(control: FormControl) {\n\t\tif (this.activeControls.some((e) => e.formControl === control)) {\n\t\t\tcontrol.enable();\n\t\t} else {\n\t\t\tcontrol.disable();\n\t\t}\n\t}\n\n\ttrySubmit(): Promise<any> {\n\t\tthis.formGroup.markAllAsTouched();\n\t\tthis.disableInactiveFormGroupControls(this.formGroup);\n\t\tif (this.formGroup.valid) {\n\t\t\treturn Promise.resolve(this.formGroup.value);\n\t\t} else {\n\t\t\tthis.activeControls.find((e) => !e.formControl.valid)?.formElement?.scrollTo();\n\t\t\treturn Promise.reject('Not all fields are valid');\n\t\t}\n\t}\n}\n","import {Component, ElementRef, Host, Inject, InjectionToken, Input, OnInit, Optional, ViewChild} from '@angular/core';\nimport { AbstractControl, FormControl } from '@angular/forms';\nimport {FormComponent} from \"../form.component\";\nimport {CustomErrorMessages, FormErrorMessages} from \"../../types\";\n\nexport const FORM_ERROR_MESSAGES = new InjectionToken<CustomErrorMessages>('form.error.messages');\n\nexport const DEFAULT_ERROR_MESSAGES: FormErrorMessages = {\n\tmin: \"Use a number larger than %min%\",\n\tmax: \"Use a number smaller than %max%\",\n\trequired: \"This field is required\",\n\temail: \"Use a valid email address\",\n\tminLength: \"Has to be longer than %minLength% character(s)\",\n\tmaxLength: \"Has to be shorter than %maxLength% character(s)\",\n\tpattern: \"This input is not valid\",\n\tmatchPassword: \"Passwords must match\",\n\tdate: \"Enter a valid date\",\n}\n\n@Component({\n\tselector: 'klp-form-element',\n\ttemplateUrl: './form-element.component.html',\n\tstyleUrls: ['./form-element.component.scss'],\n})\nexport class FormElementComponent {\n\tpublic attachedControl: AbstractControl;\n\t@Input() public caption: String;\n\t@Input() public direction: 'horizontal' | 'vertical' = 'horizontal';\n\t@Input() public captionSpacing: 'percentages' | 'none' = 'percentages';\n\t@Input() public swapInputAndCaption: boolean = false;\n\t@ViewChild('internalComponentRef') public internalComponentRef: ElementRef;\n\n\tpublic captionRef: ElementRef;\n\tpublic errorMessages: FormErrorMessages = DEFAULT_ERROR_MESSAGES;\n\tpublic customErrorHandlers: Array<{ error: string; templateRef: ElementRef }> = [];\n\n\tconstructor(\n\t\t@Host() @Optional() private parent: FormComponent,\n\t\t@Inject(FORM_ERROR_MESSAGES) @Optional() private customMessages: CustomErrorMessages\n\t) {\n\t}\n\n\tpublic substituteParameters(message: string, parameters: Record<string, any>): string {\n\t\treturn Object.keys(parameters).reduce((msg, key) => {\n\t\t\treturn msg.replace(`%${key}%`, parameters[key]);\n\t\t}, message);\n\t}\n\n\tpublic registerControl(formControl: FormControl) {\n\t\tthis.attachedControl = formControl;\n\t\tthis.parent.registerControl(formControl, this);\n\t}\n\n\tpublic unregisterControl(formControl: FormControl) {\n\t\tthis.attachedControl = null;\n\t\tthis.parent.unregisterControl(formControl);\n\t}\n\n\tpublic getAttachedControl() {\n\t\treturn this.attachedControl;\n\t}\n\n\tpublic registerErrorHandler(error: string, templateRef: ElementRef) {\n\t\tthis.customErrorHandlers.push({ error, templateRef });\n\t}\n\n\tpublic registerCaption(templateRef: ElementRef) {\n\t\tthis.captionRef = templateRef;\n\t}\n\n\tgetErrorToShow() {\n\t\tif (this.attachedControl?.touched === true && this.attachedControl?.errors) {\n\t\t\treturn Object.keys(this.attachedControl?.errors)[0];\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetCustomErrorHandler(error: string) {\n\t\treturn this.customErrorHandlers.find((e) => e.error === error);\n\t}\n\n\tshowDefaultError(error: string) {\n\t\treturn this.getErrorToShow() === error && !this.customErrorHandlers.some((e) => e.error === error);\n\t}\n\n\tgetScrollableParent(node) {\n\t\tif (node == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (node.scrollHeight > node.clientHeight) {\n\t\t\treturn node;\n\t\t} else {\n\t\t\treturn this.getScrollableParent(node.parentNode);\n\t\t}\n\t}\n\n\tscrollTo() {\n\t\tthis.internalComponentRef.nativeElement.scrollIntoView(true);\n\t\t// to give some breathing room, we scroll 100px more to the top\n\t\tthis.getScrollableParent(this.internalComponentRef.nativeElement)?.scrollBy(0, -100);\n\t}\n\n\tgetErrorMessages(key: keyof FormErrorMessages) {\n\t\treturn this.customMessages?.[key]?.() ?? this.errorMessages[key];\n\t}\n}\n","import { isString } from 'lodash';\n\nexport function stringIsSetAndNotEmpty(s: string) {\n\treturn isString(s) && s.length > 0;\n}\n\nexport function isNullOrUndefined(value: any) {\n\treturn value === null || value === undefined;\n}\n\nexport function numberIsSet(value: any) {\n\treturn isValueSet(value) && typeof value === 'number';\n}\n\nexport function isValueSet(value: any) {\n\treturn value !== null && value !== undefined;\n}\n\nexport function stringOrArrayIsSetAndEmpty(value: any[] | string) {\n\treturn value !== null && value !== undefined && value.length === 0;\n}\n\nexport function useIfStringIsSet(s: string) {\n\tif (stringIsSetAndNotEmpty(s)) {\n\t\treturn s;\n\t}\n\treturn undefined;\n}\n\nexport function useIfArrayIsSetWithOneItem(a: Array<any>): any {\n\tif (!isNullOrUndefined(a) && a.length === 1) {\n\t\treturn a[0];\n\t}\n\treturn undefined;\n}\n\nexport function convertParentToChild<C>(originalClass: any, newClass: C): C {\n\treturn Object.assign(newClass, originalClass);\n}\n\nexport function truncateString(s: string, length: number) {\n\tif (s.length < length) {\n\t\treturn s;\n\t}\n\treturn s.substring(0, length) + '...';\n}\n","import { ControlContainer, ControlValueAccessor, FormControl } from '@angular/forms';\nimport { Component, Host, Input, Optional } from '@angular/core';\nimport { FormElementComponent } from '../../form/form-element/form-element.component';\nimport { isNullOrUndefined, stringIsSetAndNotEmpty } from '../../util/values';\n\n/**\n * This component is a base in order to create a component that supports ngModel.\n * Some important things to know about it:\n *\n * innerValue = your own inner state, which you should use to store the current state of what ngModel should be.\n * writeValue() = called by angular, when ngModel is changed from OUTSIDE of the component. Feel free to patch this method if you need inner logic to happen when ngModel is altered from the outside. Always remember to also call the super.writeValue if you do!\n * setInnerValueAndNotify() = call this when you want your ngModel to be updated from INSIDE of your component, and provide it to the OUTSIDE.\n * ngOnInit() = Used to support the angular reactive forms framework. If you use ngOnInit in your own component (which happens fairly often) you must not forget to call the super.ngOnInit() method.\n */\n\n@Component({\n\tselector: '',\n\ttemplate: '',\n})\nexport class ValueAccessorBase<T> implements ControlValueAccessor {\n\tpublic innerValue: T;\n\tpublic changed = new Array<(value: T) => void>();\n\tprivate touched = new Array<() => void>();\n\n\t@Input() public disabled = false;\n\t// we support both providing just the formControlName and the full formControl\n\t@Input() public formControlName: string = null;\n\t@Input() public formControl: FormControl = null;\n\n\tprivate attachedFormControl: FormControl;\n\n\tconstructor(\n\t\t@Host() @Optional() protected parent: FormElementComponent,\n\t\t@Host() @Optional() protected controlContainer: ControlContainer\n\t) {}\n\n\tngOnInit() {\n\t\tif (this.formControl) {\n\t\t\tthis.attachedFormControl = this.formControl;\n\t\t} else if (stringIsSetAndNotEmpty(this.formControlName)) {\n\t\t\tthis.attachedFormControl = this.controlContainer?.control.get(this.formControlName) as FormControl;\n\t\t\tif (isNullOrUndefined(this.attachedFormControl)) {\n\t\t\t\tthrow new Error(`Form element '${this.formControlName}' with caption '${this.parent?.caption}' is not declared in your FormGroup.`);\n\t\t\t}\n\t\t}\n\t\tif (this.attachedFormControl) {\n\t\t\tthis.disabled = this.attachedFormControl.disabled;\n\t\t\tthis.attachedFormControl.statusChanges.subscribe(() => {\n\t\t\t\tthis.disabled = this.attachedFormControl.disabled;\n\t\t\t});\n\t\t\tthis.parent?.registerControl(this.attachedFormControl);\n\t\t}\n\t}\n\n\tisInErrorState() {\n\t\treturn this.attachedFormControl && this.attachedFormControl.status === 'INVALID' && this.attachedFormControl.touched;\n\t}\n\n\tngOnDestroy() {\n\t\tif (this.attachedFormControl) {\n\t\t\tthis.parent?.unregisterControl(this.attachedFormControl);\n\t\t}\n\t}\n\n\ttouch() {\n\t\tthis.touched.forEach((f) => f());\n\t}\n\n\twriteValue(value: T) {\n\t\tthis.innerValue = value;\n\t}\n\n\tregisterOnChange(fn: (value: T) => void) {\n\t\tthis.changed.push(fn);\n\t}\n\n\tregisterOnTouched(fn: () => void) {\n\t\tthis.touched.push(fn);\n\t}\n\n\tsetInnerValueAndNotify(value) {\n\t\tthis.innerValue = value;\n\t\tthis.changed.forEach((fn) => fn(value));\n\t}\n\n\tresetToNull() {\n\t\tthis.setInnerValueAndNotify(null);\n\t}\n}\n","import { Component, HostBinding, Input } from '@angular/core';\n\n@Component({\n\tselector: 'klp-form-button',\n\ttemplateUrl: './button.component.html',\n\tstyleUrls: ['./button.component.scss'],\n})\nexport class ButtonComponent {\n\t@Input() variant:\n\t\t| 'white'\n\t\t| 'greenFilled'\n\t\t| 'greenOutlined'\n\t\t| 'greenLink'\n\t\t| 'contextMenuItem'\n\t\t| 'redFilled'\n\t\t| 'redOutlined'\n\t\t| 'orangeFilled' = 'white';\n\t@Input() size: 'small' | 'medium' | 'large' = 'medium';\n\t@Input() fullWidth = false;\n\t@Input() hasBorder = true;\n\t@Input() disabled = false;\n\t@Input() isLoading = false;\n\t@Input() type: 'button' | 'submit' = 'button';\n\n\t@HostBinding('class._fullWidth') get _() {\n\t\treturn this.fullWidth;\n\t}\n\n\tonClick(event: Event) {\n\t\tif (this.disabled) {\n\t\t\tevent.stopPropagation();\n\t\t}\n\t}\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ValueAccessorBase } from '../value-accessor-base/value-accessor-base.component';\n\n@Component({\n\tselector: 'klp-form-checkbox',\n\ttemplateUrl: './checkbox.component.html',\n\tstyleUrls: ['./checkbox.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }],\n})\nexport class CheckboxComponent extends ValueAccessorBase<boolean> {\n\t@Input() caption: string;\n\t@Input() disabled: boolean;\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-email-input',\n\ttemplateUrl: './email-input.component.html',\n\tstyleUrls: ['./email-input.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: EmailInputComponent, multi: true }],\n})\nexport class EmailInputComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder = '';\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n\tselector: 'klp-form-loading-indicator',\n\ttemplateUrl: './loading-indicator.component.html',\n\tstyleUrls: ['./loading-indicator.component.scss'],\n})\nexport class LoadingIndicatorComponent {\n\t@Input() public variant: '3dots' | 'spinner' | 'textInput' | 'picker' = '3dots';\n\t@Input() public size: 'tiny' | 'small' | 'medium' | 'large' | 'huge' = 'medium';\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-number-input',\n\ttemplateUrl: './number-input.component.html',\n\tstyleUrls: ['./number-input.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: NumberInputComponent, multi: true }],\n})\nexport class NumberInputComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder: string;\n}\n","import {Component, Input} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-password-field',\n\ttemplateUrl: './password-field.component.html',\n\tstyleUrls: ['./password-field.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: PasswordFieldComponent, multi: true }],\n})\nexport class PasswordFieldComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder = 'Password';\n}\n","import { Component, Host, Input, OnInit, Optional } from '@angular/core';\nimport { ControlContainer, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\nimport {FormElementComponent} from \"../../form/form-element/form-element.component\";\n\nexport type AppSelectOptions = Array<{\n\tid: any;\n\tname: string;\n\tdescription?: string;\n\tdisabled?: boolean;\n}>;\n\n@Component({\n\tselector: 'klp-form-select',\n\ttemplateUrl: './select.component.html',\n\tstyleUrls: ['./select.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }],\n})\nexport class SelectComponent extends ValueAccessorBase<string | string[]> {\n\t@Input() placeholder: string = 'Pick an option';\n\t@Input() options: AppSelectOptions;\n\t@Input() multiple = false;\n\t@Input() clearable = true;\n\t@Input() public dropdownPosition: string;\n\t@Input() public customSearchFn: (term: string, item: { id: string; name: string; description: string }) => boolean;\n\n\tconstructor(\n\t\t@Optional() @Host() protected parent: FormElementComponent,\n\t\t@Optional() @Host() protected controlContainer: ControlContainer,\n\t) {\n\t\tsuper(parent, controlContainer);\n\t}\n}\n","import { Component, ContentChild, Input, TemplateRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-sortable-items',\n\ttemplateUrl: './sortable-items.component.html',\n\tstyleUrls: ['./sortable-items.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: SortableItemsComponent, multi: true }],\n})\nexport class SortableItemsComponent extends ValueAccessorBase<Array<any>> {\n\t@ContentChild(TemplateRef) template;\n\t@Input() sortableItemSize: 'sm' | 'lg' = 'lg';\n\n\titemsOrderChanged = () => {\n\t\tthis.setInnerValueAndNotify(this.innerValue);\n\t};\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-text-input',\n\ttemplateUrl: './text-input.component.html',\n\tstyleUrls: ['./text-input.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextInputComponent, multi: true }],\n})\nexport class TextInputComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder: string;\n\t@Input() type: 'text' | 'password' = 'text';\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-toggle',\n\ttemplateUrl: './toggle.component.html',\n\tstyleUrls: ['./toggle.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: ToggleComponent, multi: true }],\n})\nexport class ToggleComponent extends ValueAccessorBase<boolean> {}\n","import { Component, ElementRef, Host, OnInit, Optional, ViewChild } from '@angular/core';\nimport {FormElementComponent} from \"../form-element/form-element.component\";\nimport {isNullOrUndefined} from \"../../util/values\";\n\n@Component({\n\tselector: 'klp-form-caption',\n\ttemplateUrl: './form-caption.component.html',\n\tstyleUrls: ['./form-caption.component.scss'],\n})\nexport class FormCaptionComponent implements OnInit {\n\t@ViewChild('contentRef') public contentRef: ElementRef;\n\n\tconstructor(@Host() @Optional() private parent: FormElementComponent) {}\n\n\tngOnInit(): void {\n\t\t// this is being run next cycle, because we dont want to fail if the order of components is as follows:\n\t\t// <app-form-error />\n\t\t// <some-input />\n\t\t// That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet\n\t\tsetTimeout(() => {\n\t\t\tconst attachedControl = this.parent.getAttachedControl();\n\t\t\tthis.parent.registerCaption(this.contentRef);\n\t\t\tif (isNullOrUndefined(attachedControl)) {\n\t\t\t\tthrow new Error('You added a Form Caption component without an attached Form Control');\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Component, ElementRef, Host, Input, OnInit, Optional, ViewChild } from '@angular/core';\nimport {FormElementComponent} from \"../form-element/form-element.component\";\nimport {isNullOrUndefined} from \"../../util/values\";\nimport {ErrorTypes} from \"../../types\";\n\n@Component({\n\tselector: 'klp-form-error',\n\ttemplateUrl: './form-error.component.html',\n\tstyleUrls: ['./form-error.component.scss'],\n})\nexport class FormErrorComponent implements OnInit {\n\t@Input() error: ErrorTypes;\n\tpublic showError = false;\n\t@ViewChild('contentRef') public contentRef: ElementRef;\n\tconstructor(@Host() @Optional() private parent: FormElementComponent) {}\n\n\tngOnInit(): void {\n\t\t// this is being run next cycle, because we dont want to fail if the order of components is as follows:\n\t\t// <app-form-error />\n\t\t// <some-input />\n\t\t// That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet\n\t\tsetTimeout(() => {\n\t\t\tconst attachedControl = this.parent.getAttachedControl();\n\t\t\tthis.parent.registerErrorHandler(this.error, this.contentRef);\n\t\t\tif (isNullOrUndefined(attachedControl)) {\n\t\t\t\tthrow new Error('You added a Form Error component without an attached Form Control');\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Component, Host, HostBinding, Input, Optional } from '@angular/core';\nimport {FormComponent} from \"../form.component\";\n\n@Component({\n\tselector: 'klp-form-submit-button',\n\ttemplateUrl: './form-submit-button.component.html',\n\tstyleUrls: ['./form-submit-button.component.scss'],\n})\nexport class FormSubmitButtonComponent {\n\t@Input() public isLoading = false;\n\t@Input() fullWidth = false;\n\t@Input() variant: 'greenFilled' | 'redFilled' = 'greenFilled';\n\t@Input() public submitCallback: (any) => Promise<void>;\n\n\t@HostBinding('class._fullWidth') get _() {\n\t\treturn this.fullWidth;\n\t}\n\n\tconstructor(@Host() @Optional() private parentForm: FormComponent) {}\n\n\tsubmitForm() {\n\t\tthis.parentForm\n\t\t\t.trySubmit()\n\t\t\t.then((value) => {\n\t\t\t\tthis.isLoading = true;\n\t\t\t\tthis.submitCallback(value)\n\t\t\t\t\t.then(() => (this.isLoading = false))\n\t\t\t\t\t.catch(() => (this.isLoading = false));\n\t\t\t})\n\t\t\t.catch(() => {}); // swallow the error, the framework will scroll to the field that needs attention\n\t}\n}\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nexport const invalidDateKey = '--invalid_date--';\n\nexport function dateValidator(control: AbstractControl): ValidationErrors | null {\n\tconst invalid = control.value === invalidDateKey;\n\treturn invalid ? { date: control.value } : null;\n}\n","import {\n\tComponent,\n\tElementRef,\n\tHost,\n\tInject,\n\tInjectionToken,\n\tInput,\n\tOptional,\n\tSimpleChanges,\n\tViewChild\n} from '@angular/core';\nimport {ControlContainer, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {isNullOrUndefined, isValueSet, stringIsSetAndNotEmpty} from '../../util/values';\nimport { invalidDateKey } from '../../validators/dateValidator';\nimport { MatDatepicker } from '@angular/material/datepicker';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\nimport {MAT_DATE_FORMATS, MAT_NATIVE_DATE_FORMATS} from \"@angular/material/core\";\nimport {KlpDateFormats} from \"../../types\";\n\nexport const KLP_DATE_FORMATS = new InjectionToken<KlpDateFormats>('klp.form.date.formats');\n\nexport function matDateFormatsFactory(component: DatepickerComponent, dateFormats?: KlpDateFormats) {\n\treturn dateFormats?.(component.format) ?? MAT_NATIVE_DATE_FORMATS;\n}\n\n@Component({\n\tselector: 'klp-form-datepicker',\n\ttemplateUrl: './datepicker.component.html',\n\tstyleUrls: ['./datepicker.component.scss'],\n\tproviders: [\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: DatepickerComponent, multi: true },\n\t\t{ provide: MAT_DATE_FORMATS,\n\t\t\tdeps: [DatepickerComponent, [new Optional(), KLP_DATE_FORMATS]],\n\t\t\tuseFactory: matDateFormatsFactory,\n\t\t}\n\t],\n})\nexport class DatepickerComponent extends ValueAccessorBase<Date | typeof invalidDateKey> {\n\t@Input() public minDate: Date = undefined;\n\t@Input() public maxDate: Date = undefined;\n\t@Input() public format: string;\n\t@Input() public placeholder = 'Select date';\n\t@Input() public clearable = false;\n\n\t@ViewChild('nativeInput') nativeInputRef: ElementRef;\n\t@ViewChild('picker') datePickerRef: MatDatepicker<Date>;\n\n\tminDateStartOfDay: Date = undefined;\n\tmaxDateEndOfDay: Date = undefined;\n\n\t// this is passed as ngmodel and is used to set the inital date. But we also\n\t// use input and nativeInput callbacks to extend the validation logic so we\n\t// can destinguish between empty and invalid dates.\n\tvalueForMaterialDatePicker: Date;\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\tif (changes.minDate) {\n\t\t\tthis.setMinDate(changes.minDate.currentValue);\n\t\t}\n\t\tif (changes.maxDate) {\n\t\t\tthis.setMaxDate(changes.maxDate.currentValue);\n\t\t}\n\t}\n\n\tsetMinDate(minDate: Date) {\n\t\tif (minDate) {\n\t\t\tthis.minDateStartOfDay = new Date(minDate);\n\t\t\tthis.minDateStartOfDay.setHours(0, 0, 0, 0);\n\t\t} else {\n\t\t\tthis.minDateStartOfDay = undefined;\n\t\t}\n\t}\n\n\tsetMaxDate(maxDate: Date) {\n\t\tif (maxDate) {\n\t\t\tthis.maxDateEndOfDay = new Date(maxDate);\n\t\t\tthis.maxDateEndOfDay.setHours(23, 59, 59, 999);\n\t\t} else {\n\t\t\tthis.maxDateEndOfDay = undefined;\n\t\t}\n\t}\n\n\t// dateChanged is called when the output of the datepicker is changed and\n\t// parsed correctly. If the date is invalid, it will be called the first time\n\t// with null but never again until a valid input is provided.\n\tdateChanged(event: any) {\n\t\tconst nativeInputValue = this.nativeInputRef.nativeElement.value;\n\t\tconst date = event.value;\n\t\tif (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {\n\t\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t\t} else {\n\t\t\tthis.setInnerValueAndNotify(date);\n\t\t}\n\t}\n\n\twriteValue(value: Date | typeof invalidDateKey) {\n\t\tsuper.writeValue(value);\n\t\tthis.valueForMaterialDatePicker = value === invalidDateKey ? null : value;\n\t}\n\n\t// nativeValueChanged is called when the internal text value changes, but not\n\t// when the date is changed via the date picker. We need this so that we can\n\t// determine if the datepicker is empty or invalid.\n\tnativeValueChanged(event: any) {\n\t\tconst nativeInputValue = event.target.value;\n\t\tconst date = this.valueForMaterialDatePicker;\n\n\t\tif (this.datePickerRef.opened) {\n\t\t\t// if the user is typing instead of using the picker, close it.\n\t\t\tthis.datePickerRef.close();\n\t\t}\n\n\t\tif (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {\n\t\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t\t} else {\n\t\t\tthis.setInnerValueAndNotify(date);\n\t\t}\n\t}\n\n\tresetToNull() {\n\t\tthis.setInnerValueAndNotify(null);\n\t\tthis.valueForMaterialDatePicker = null;\n\t\tthis.nativeInputRef.nativeElement.value = null;\n\t}\n}\n","// material.module.ts\n\nimport { NgModule } from '@angular/core';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatNativeDateModule } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n\timports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule],\n\texports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule],\n\tproviders: [MatDatepickerModule],\n})\nexport class MaterialModule {}\n","import { NgModule } from '@angular/core';\nimport {CommonModule} from \"@angular/common\";\nimport {FormsModule} from \"@angular/forms\";\nimport {ValueAccessorBase} from \"./elements/value-accessor-base/value-accessor-base.component\";\nimport {ButtonComponent} from \"./elements/button/button.component\";\nimport {CheckboxComponent} from \"./elements/checkbox/checkbox.component\";\nimport {EmailInputComponent} from \"./elements/email/email-input.component\";\nimport {LoadingIndicatorComponent} from \"./elements/loading-indicator/loading-indicator.component\";\nimport {NumberInputComponent} from \"./elements/number-input/number-input.component\";\nimport {PasswordFieldComponent} from \"./elements/password-field/password-field.component\";\nimport {SelectComponent} from \"./elements/select/select.component\";\nimport {SortableItemsComponent} from \"./elements/sortable-items/sortable-items.component\";\nimport {TextInputComponent} from \"./elements/text-input/text-input.component\";\nimport {ToggleComponent} from \"./elements/toggle/toggle.component\";\nimport {FormCaptionComponent} from \"./form/form-caption/form-caption.component\";\nimport {FormElementComponent} from \"./form/form-element/form-element.component\";\nimport {FormErrorComponent} from \"./form/form-error/form-error.component\";\nimport {FormSubmitButtonComponent} from \"./form/form-submit-button/form-submit-button.component\";\nimport {FormComponent} from \"./form/form.component\";\nimport {SortablejsModule} from \"ngx-sortablejs\";\nimport {NgSelectModule} from \"@ng-select/ng-select\";\nimport {DatepickerComponent} from \"./elements/datepicker/datepicker.component\";\nimport {MaterialModule} from \"./material.module\";\n\n\n\n@NgModule({\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tNgSelectModule,\n\t\tSortablejsModule,\n\t\tMaterialModule,\n\t],\n\tdeclarations: [\n\t\tValueAccessorBase,\n\t\tButtonComponent,\n\t\tCheckboxComponent,\n\t\tDatepickerComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tSortableItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t],\n\texports: [\n\t\tValueAccessorBase,\n\t\tButtonComponent,\n\t\tDatepickerComponent,\n\t\tCheckboxComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tSortableItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t]\n})\nexport class NgxEnhancyFormsModule { }\n","/*\n * Public API Surface of ngx-enhancy-forms\n */\n\nexport * from './lib/ngx-enhancy-forms.module';\n\nexport * from './lib/elements/button/button.component';\nexport * from './lib/elements/checkbox/checkbox.component';\nexport * from './lib/elements/datepicker/datepicker.component';\nexport * from './lib/elements/email/email-input.component';\nexport * from './lib/elements/loading-indicator/loading-indicator.component';\nexport * from './lib/elements/number-input/number-input.component';\nexport * from './lib/elements/password-field/password-field.component';\nexport * from './lib/elements/select/select.component';\nexport * from './lib/elements/sortable-items/sortable-items.component';\nexport * from './lib/elements/text-input/text-input.component';\nexport * from './lib/elements/toggle/toggle.component';\nexport * from './lib/elements/value-accessor-base/value-accessor-base.component';\n\nexport * from './lib/form/form.component';\nexport * from './lib/form/form-caption/form-caption.component';\nexport * from './lib/form/form-element/form-element.component';\nexport * from './lib/form/form-error/form-error.component';\nexport * from './lib/form/form-submit-button/form-submit-button.component';\n\nexport * from './lib/validators/dateValidator';\n\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MaterialModule as ɵa} from './lib/material.module';"],"names":[],"mappings":";;;;;;;;;;;;MASa,aAAa;IAL1B;;QASS,mBAAc,GAGjB,EAAE,CAAC;KAkDR;IAhDO,eAAe,CAAC,WAAwB,EAAE,WAAiC;QACjF,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CA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mB;oBACnB,iBAAiB;oBACjB,mBAAmB;oBACnB,yBAAyB;oBACzB,oBAAoB;oBACpB,sBAAsB;oBACtB,eAAe;oBACf,sBAAsB;oBACtB,kBAAkB;oBAClB,eAAe;oBACf,oBAAoB;oBACpB,oBAAoB;oBACpB,kBAAkB;oBAClB,yBAAyB;oBACzB,aAAa;iBACb;aACD;;;ACxED;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"klippa-ngx-enhancy-forms.js","sources":["../../../../projects/klippa/ngx-enhancy-forms/src/lib/util/values.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-element/form-element.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/value-accessor-base/value-accessor-base.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/button/button.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/checkbox/checkbox.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/email/email-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/loading-indicator/loading-indicator.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/number-input/number-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/password-field/password-field.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/select/select.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/sortable-items/sortable-items.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/text-input/text-input.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/toggle/toggle.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-caption/form-caption.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-error/form-error.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/form/form-submit-button/form-submit-button.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/validators/dateValidator.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/elements/datepicker/datepicker.component.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/material.module.ts","../../../../projects/klippa/ngx-enhancy-forms/src/lib/ngx-enhancy-forms.module.ts","../../../../projects/klippa/ngx-enhancy-forms/src/public-api.ts","../../../../projects/klippa/ngx-enhancy-forms/src/klippa-ngx-enhancy-forms.ts"],"sourcesContent":["import { isString } from 'lodash';\n\nexport function stringIsSetAndNotEmpty(s: string) {\n\treturn isString(s) && s.length > 0;\n}\n\nexport function isNullOrUndefined(value: any) {\n\treturn value === null || value === undefined;\n}\n\nexport function numberIsSet(value: any) {\n\treturn isValueSet(value) && typeof value === 'number';\n}\n\nexport function isValueSet(value: any) {\n\treturn value !== null && value !== undefined;\n}\n\nexport function stringOrArrayIsSetAndEmpty(value: any[] | string) {\n\treturn value !== null && value !== undefined && value.length === 0;\n}\n\nexport function useIfStringIsSet(s: string) {\n\tif (stringIsSetAndNotEmpty(s)) {\n\t\treturn s;\n\t}\n\treturn undefined;\n}\n\nexport function useIfArrayIsSetWithOneItem(a: Array<any>): any {\n\tif (!isNullOrUndefined(a) && a.length === 1) {\n\t\treturn a[0];\n\t}\n\treturn undefined;\n}\n\nexport function convertParentToChild<C>(originalClass: any, newClass: C): C {\n\treturn Object.assign(newClass, originalClass);\n}\n\nexport function truncateString(s: string, length: number) {\n\tif (s.length < length) {\n\t\treturn s;\n\t}\n\treturn s.substring(0, length) + '...';\n}\n","import {Component, Input, OnInit, Optional, SkipSelf} from '@angular/core';\nimport {AbstractControl, FormArray, FormControl, FormGroup, FormGroupName} from '@angular/forms';\nimport {FormElementComponent} from './form-element/form-element.component';\nimport {isValueSet} from '../util/values';\n\nexport const invalidFieldsSymbol = Symbol('Not all fields are valid');\n\n// Only used as a 'marker' to define a property will be filled in by a sub form\nexport class SubForm extends FormGroup {\n\tconstructor() {\n\t\tsuper({}, null);\n\t}\n}\n\n@Component({\n\tselector: 'klp-form',\n\ttemplateUrl: './form.component.html',\n\tstyleUrls: ['./form.component.scss'],\n})\nexport class FormComponent implements OnInit {\n\t@Input() public formGroup: FormGroup;\n\n\t// we keep track of what form controls are actually rendered. Only those count when looking at form validation\n\tprivate activeControls: Array<{\n\t\tformControl: FormControl;\n\t\tformElement: FormElementComponent;\n\t}> = [];\n\n\tconstructor(\n\t\t@SkipSelf() @Optional() private parent: FormComponent,\n\t\t@Optional() private surroundingFormGroupName: FormGroupName,\n\t) {\n\t}\n\n\tngOnInit(): void {\n\t\tif (this.parent) {\n\t\t\tif (!isValueSet(this.surroundingFormGroupName?.name)) {\n\t\t\t\tthrow new Error('No surrounding groupname is found for a nested form');\n\t\t\t}\n\t\t\tconst groupName = String(this.surroundingFormGroupName.name);\n\t\t\tconst groupToOverwrite = this.parent.formGroup.get(groupName);\n\t\t\tif (!(groupToOverwrite instanceof SubForm)) {\n\t\t\t\tthrow new Error(`Surrounding groupname '${groupName}' is not a subFormSubstitute'`);\n\t\t\t}\n\t\t\tthis.parent.formGroup.setControl(groupName, this.formGroup);\n\t\t}\n\t}\n\n\tpublic registerControl(formControl: FormControl, formElement: FormElementComponent): void {\n\t\tthis.activeControls.push({formControl, formElement});\n\t\tif (this.parent) {\n\t\t\tthis.parent.registerControl(formControl, formElement);\n\t\t}\n\t}\n\n\tpublic unregisterControl(formControl: FormControl): void {\n\t\tthis.activeControls = this.activeControls.filter((e) => e.formControl !== formControl);\n\t\tif (this.parent) {\n\t\t\tthis.parent.unregisterControl(formControl);\n\t\t}\n\t}\n\n\tprivate addFormGroupControls(formGroup: FormGroup, result: Array<FormControl>): void {\n\t\tObject.values(formGroup.controls).forEach((value) => {\n\t\t\tif (value instanceof FormGroup) {\n\t\t\t\tthis.addFormGroupControls(value, result);\n\t\t\t} else if (value instanceof FormArray) {\n\t\t\t\tthis.addFormArrayControls(value, result);\n\t\t\t} else if (value instanceof FormControl) {\n\t\t\t\tthis.addFormControl(value, result);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate addFormArrayControls(formArray: FormArray, result: Array<FormControl>): void {\n\t\tformArray.controls.forEach((value) => {\n\t\t\tif (value instanceof FormGroup) {\n\t\t\t\tthis.addFormGroupControls(value, result);\n\t\t\t} else if (value instanceof FormArray) {\n\t\t\t\tthis.addFormArrayControls(value, result);\n\t\t\t} else if (value instanceof FormControl) {\n\t\t\t\tthis.addFormControl(value, result);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate getAllFormControls(): Array<FormControl> {\n\t\tconst result = [];\n\t\tthis.addFormGroupControls(this.formGroup, result);\n\t\treturn result;\n\t}\n\n\tprivate addFormControl(control: FormControl, result: Array<FormControl>): void {\n\t\tresult.push(control);\n\t}\n\n\tprivate disableInactiveFormControl(control: FormControl): void {\n\t\tif (!this.activeControls.some((e) => e.formControl === control)) {\n\t\t\tcontrol.disable();\n\t\t}\n\t}\n\n\ttrySubmit(): Promise<any> {\n\t\tthis.formGroup.markAllAsTouched();\n\t\tconst allControls: Array<FormControl> = this.getAllFormControls();\n\t\tconst originalDisabledStates = allControls.map(e => {\n\t\t\treturn {control: e, disabled: e.disabled};\n\t\t});\n\t\tallControls.forEach(e => this.disableInactiveFormControl(e));\n\t\tconst values = this.formGroup.value;\n\t\tif (this.formGroup.valid) {\n\t\t\tthis.setDisabledStatesForAllControls(originalDisabledStates);\n\t\t\treturn Promise.resolve(values);\n\t\t} else {\n\t\t\tthis.activeControls.find((e) => !e.formControl.valid)?.formElement?.scrollTo();\n\t\t\tthis.setDisabledStatesForAllControls(originalDisabledStates);\n\t\t\treturn Promise.reject(invalidFieldsSymbol);\n\t\t}\n\t}\n\n\tprivate setDisabledStatesForAllControls(originalDisabledStates: Array<{ control: AbstractControl; disabled: boolean }>): void {\n\t\toriginalDisabledStates.forEach((e) => {\n\t\t\tif (e.disabled) {\n\t\t\t\te.control.disable();\n\t\t\t} else {\n\t\t\t\te.control.enable();\n\t\t\t}\n\t\t});\n\t}\n}\n","import {Component, ElementRef, Host, Inject, InjectionToken, Input, OnInit, Optional, ViewChild} from '@angular/core';\nimport { AbstractControl, FormControl } from '@angular/forms';\nimport {FormComponent} from \"../form.component\";\nimport {CustomErrorMessages, FormErrorMessages} from \"../../types\";\n\nexport const FORM_ERROR_MESSAGES = new InjectionToken<CustomErrorMessages>('form.error.messages');\n\nexport const DEFAULT_ERROR_MESSAGES: FormErrorMessages = {\n\tmin: \"Use a number larger than %min%\",\n\tmax: \"Use a number smaller than %max%\",\n\trequired: \"This field is required\",\n\temail: \"Use a valid email address\",\n\tminLength: \"Has to be longer than %minLength% character(s)\",\n\tmaxLength: \"Has to be shorter than %maxLength% character(s)\",\n\tpattern: \"This input is not valid\",\n\tmatchPassword: \"Passwords must match\",\n\tdate: \"Enter a valid date\",\n}\n\n@Component({\n\tselector: 'klp-form-element',\n\ttemplateUrl: './form-element.component.html',\n\tstyleUrls: ['./form-element.component.scss'],\n})\nexport class FormElementComponent {\n\tpublic attachedControl: AbstractControl;\n\t@Input() public caption: String;\n\t@Input() public direction: 'horizontal' | 'vertical' = 'horizontal';\n\t@Input() public captionSpacing: 'percentages' | 'none' = 'percentages';\n\t@Input() public swapInputAndCaption: boolean = false;\n\t@ViewChild('internalComponentRef') public internalComponentRef: ElementRef;\n\n\tpublic captionRef: ElementRef;\n\tpublic errorMessages: FormErrorMessages = DEFAULT_ERROR_MESSAGES;\n\tpublic customErrorHandlers: Array<{ error: string; templateRef: ElementRef }> = [];\n\n\tconstructor(\n\t\t@Host() @Optional() private parent: FormComponent,\n\t\t@Inject(FORM_ERROR_MESSAGES) @Optional() private customMessages: CustomErrorMessages\n\t) {\n\t}\n\n\tpublic substituteParameters(message: string, parameters: Record<string, any>): string {\n\t\treturn Object.keys(parameters).reduce((msg, key) => {\n\t\t\treturn msg.replace(`%${key}%`, parameters[key]);\n\t\t}, message);\n\t}\n\n\tpublic registerControl(formControl: FormControl) {\n\t\t// console.log('register');\n\t\t// console.log(this.caption);\n\t\tthis.attachedControl = formControl;\n\t\tthis.parent.registerControl(formControl, this);\n\t}\n\n\tpublic unregisterControl(formControl: FormControl) {\n\t\tthis.attachedControl = null;\n\t\tthis.parent.unregisterControl(formControl);\n\t}\n\n\tpublic getAttachedControl() {\n\t\treturn this.attachedControl;\n\t}\n\n\tpublic registerErrorHandler(error: string, templateRef: ElementRef) {\n\t\tthis.customErrorHandlers.push({ error, templateRef });\n\t}\n\n\tpublic registerCaption(templateRef: ElementRef) {\n\t\tthis.captionRef = templateRef;\n\t}\n\n\tgetErrorToShow() {\n\t\tif (this.attachedControl?.touched === true && this.attachedControl?.errors) {\n\t\t\treturn Object.keys(this.attachedControl?.errors)[0];\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetCustomErrorHandler(error: string) {\n\t\treturn this.customErrorHandlers.find((e) => e.error === error);\n\t}\n\n\tshowDefaultError(error: string) {\n\t\treturn this.getErrorToShow() === error && !this.customErrorHandlers.some((e) => e.error === error);\n\t}\n\n\tgetScrollableParent(node) {\n\t\tif (node == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (node.scrollHeight > node.clientHeight) {\n\t\t\treturn node;\n\t\t} else {\n\t\t\treturn this.getScrollableParent(node.parentNode);\n\t\t}\n\t}\n\n\tscrollTo() {\n\t\tthis.internalComponentRef.nativeElement.scrollIntoView(true);\n\t\t// to give some breathing room, we scroll 100px more to the top\n\t\tthis.getScrollableParent(this.internalComponentRef.nativeElement)?.scrollBy(0, -100);\n\t}\n\n\tgetErrorMessages(key: keyof FormErrorMessages) {\n\t\treturn this.customMessages?.[key]?.() ?? this.errorMessages[key];\n\t}\n}\n","import { ControlContainer, ControlValueAccessor, FormControl } from '@angular/forms';\nimport { Component, Host, Input, Optional } from '@angular/core';\nimport { FormElementComponent } from '../../form/form-element/form-element.component';\nimport { isNullOrUndefined, stringIsSetAndNotEmpty } from '../../util/values';\n\n/**\n * This component is a base in order to create a component that supports ngModel.\n * Some important things to know about it:\n *\n * innerValue = your own inner state, which you should use to store the current state of what ngModel should be.\n * writeValue() = called by angular, when ngModel is changed from OUTSIDE of the component. Feel free to patch this method if you need inner logic to happen when ngModel is altered from the outside. Always remember to also call the super.writeValue if you do!\n * setInnerValueAndNotify() = call this when you want your ngModel to be updated from INSIDE of your component, and provide it to the OUTSIDE.\n * ngOnInit() = Used to support the angular reactive forms framework. If you use ngOnInit in your own component (which happens fairly often) you must not forget to call the super.ngOnInit() method.\n */\n\n@Component({\n\tselector: '',\n\ttemplate: '',\n})\nexport class ValueAccessorBase<T> implements ControlValueAccessor {\n\tpublic innerValue: T;\n\tpublic changed = new Array<(value: T) => void>();\n\tprivate touched = new Array<() => void>();\n\n\t@Input() public disabled = false;\n\t// we support both providing just the formControlName and the full formControl\n\t@Input() public formControlName: string = null;\n\t@Input() public formControl: FormControl = null;\n\n\tprivate attachedFormControl: FormControl;\n\n\tconstructor(\n\t\t@Host() @Optional() protected parent: FormElementComponent,\n\t\t@Host() @Optional() protected controlContainer: ControlContainer\n\t) {}\n\n\tngOnInit() {\n\t\tif (this.formControl) {\n\t\t\tthis.attachedFormControl = this.formControl;\n\t\t} else if (stringIsSetAndNotEmpty(this.formControlName)) {\n\t\t\tthis.attachedFormControl = this.controlContainer?.control.get(this.formControlName) as FormControl;\n\t\t\tif (isNullOrUndefined(this.attachedFormControl)) {\n\t\t\t\tthrow new Error(`Form element '${this.formControlName}' with caption '${this.parent?.caption}' is not declared in your FormGroup.`);\n\t\t\t}\n\t\t}\n\t\tif (this.attachedFormControl) {\n\t\t\tthis.disabled = this.attachedFormControl.disabled;\n\t\t\tthis.attachedFormControl.statusChanges.subscribe(() => {\n\t\t\t\tthis.disabled = this.attachedFormControl.disabled;\n\t\t\t});\n\t\t\tthis.parent?.registerControl(this.attachedFormControl);\n\t\t}\n\t}\n\n\tisInErrorState() {\n\t\treturn this.attachedFormControl && this.attachedFormControl.status === 'INVALID' && this.attachedFormControl.touched;\n\t}\n\n\tngOnDestroy() {\n\t\tif (this.attachedFormControl) {\n\t\t\tthis.parent?.unregisterControl(this.attachedFormControl);\n\t\t}\n\t}\n\n\ttouch() {\n\t\tthis.touched.forEach((f) => f());\n\t}\n\n\twriteValue(value: T) {\n\t\tthis.innerValue = value;\n\t}\n\n\tregisterOnChange(fn: (value: T) => void) {\n\t\tthis.changed.push(fn);\n\t}\n\n\tregisterOnTouched(fn: () => void) {\n\t\tthis.touched.push(fn);\n\t}\n\n\tsetInnerValueAndNotify(value) {\n\t\tthis.innerValue = value;\n\t\tthis.changed.forEach((fn) => fn(value));\n\t}\n\n\tresetToNull() {\n\t\tthis.setInnerValueAndNotify(null);\n\t}\n}\n","import { Component, HostBinding, Input } from '@angular/core';\n\n@Component({\n\tselector: 'klp-form-button',\n\ttemplateUrl: './button.component.html',\n\tstyleUrls: ['./button.component.scss'],\n})\nexport class ButtonComponent {\n\t@Input() variant:\n\t\t| 'white'\n\t\t| 'greenFilled'\n\t\t| 'greenOutlined'\n\t\t| 'greenLink'\n\t\t| 'contextMenuItem'\n\t\t| 'redFilled'\n\t\t| 'redOutlined'\n\t\t| 'orangeFilled' = 'white';\n\t@Input() size: 'small' | 'medium' | 'large' = 'medium';\n\t@Input() fullWidth = false;\n\t@Input() hasBorder = true;\n\t@Input() disabled = false;\n\t@Input() isLoading = false;\n\t@Input() type: 'button' | 'submit' = 'button';\n\n\t@HostBinding('class._fullWidth') get _() {\n\t\treturn this.fullWidth;\n\t}\n\n\tonClick(event: Event) {\n\t\tif (this.disabled) {\n\t\t\tevent.stopPropagation();\n\t\t}\n\t}\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ValueAccessorBase } from '../value-accessor-base/value-accessor-base.component';\n\n@Component({\n\tselector: 'klp-form-checkbox',\n\ttemplateUrl: './checkbox.component.html',\n\tstyleUrls: ['./checkbox.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }],\n})\nexport class CheckboxComponent extends ValueAccessorBase<boolean> {\n\t@Input() caption: string;\n\t@Input() disabled: boolean;\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-email-input',\n\ttemplateUrl: './email-input.component.html',\n\tstyleUrls: ['./email-input.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: EmailInputComponent, multi: true }],\n})\nexport class EmailInputComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder = '';\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n\tselector: 'klp-form-loading-indicator',\n\ttemplateUrl: './loading-indicator.component.html',\n\tstyleUrls: ['./loading-indicator.component.scss'],\n})\nexport class LoadingIndicatorComponent {\n\t@Input() public variant: '3dots' | 'spinner' | 'textInput' | 'picker' = '3dots';\n\t@Input() public size: 'tiny' | 'small' | 'medium' | 'large' | 'huge' = 'medium';\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-number-input',\n\ttemplateUrl: './number-input.component.html',\n\tstyleUrls: ['./number-input.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: NumberInputComponent, multi: true }],\n})\nexport class NumberInputComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder: string;\n}\n","import {Component, Input} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-password-field',\n\ttemplateUrl: './password-field.component.html',\n\tstyleUrls: ['./password-field.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: PasswordFieldComponent, multi: true }],\n})\nexport class PasswordFieldComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder = 'Password';\n}\n","import {Component, EventEmitter, Host, Input, OnInit, Optional, Output} from '@angular/core';\nimport { ControlContainer, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\nimport {FormElementComponent} from \"../../form/form-element/form-element.component\";\n\nexport type AppSelectOptions = Array<{\n\tid: any;\n\tname: string;\n\tdescription?: string;\n\tdisabled?: boolean;\n}>;\n\n@Component({\n\tselector: 'klp-form-select',\n\ttemplateUrl: './select.component.html',\n\tstyleUrls: ['./select.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }],\n})\nexport class SelectComponent extends ValueAccessorBase<string | string[]> {\n\t@Input() placeholder: string = 'Pick an option';\n\t@Input() options: AppSelectOptions;\n\t@Input() multiple = false;\n\t@Input() clearable = true;\n\t@Input() public dropdownPosition: string;\n\t@Input() public customSearchFn: (term: string, item: { id: string; name: string; description: string }) => boolean;\n\t@Output() public onSearch = new EventEmitter<string>();\n\n\tconstructor(\n\t\t@Optional() @Host() protected parent: FormElementComponent,\n\t\t@Optional() @Host() protected controlContainer: ControlContainer,\n\t) {\n\t\tsuper(parent, controlContainer);\n\t}\n}\n","import { Component, ContentChild, Input, TemplateRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-sortable-items',\n\ttemplateUrl: './sortable-items.component.html',\n\tstyleUrls: ['./sortable-items.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: SortableItemsComponent, multi: true }],\n})\nexport class SortableItemsComponent extends ValueAccessorBase<Array<any>> {\n\t@ContentChild(TemplateRef) template;\n\t@Input() sortableItemSize: 'sm' | 'lg' = 'lg';\n\n\titemsOrderChanged = () => {\n\t\tthis.setInnerValueAndNotify(this.innerValue);\n\t};\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-text-input',\n\ttemplateUrl: './text-input.component.html',\n\tstyleUrls: ['./text-input.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextInputComponent, multi: true }],\n})\nexport class TextInputComponent extends ValueAccessorBase<string> {\n\t@Input() placeholder: string;\n\t@Input() type: 'text' | 'password' = 'text';\n}\n","import { Component, Input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\n\n@Component({\n\tselector: 'klp-form-toggle',\n\ttemplateUrl: './toggle.component.html',\n\tstyleUrls: ['./toggle.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: ToggleComponent, multi: true }],\n})\nexport class ToggleComponent extends ValueAccessorBase<boolean> {}\n","import { Component, ElementRef, Host, OnInit, Optional, ViewChild } from '@angular/core';\nimport {FormElementComponent} from \"../form-element/form-element.component\";\nimport {isNullOrUndefined} from \"../../util/values\";\n\n@Component({\n\tselector: 'klp-form-caption',\n\ttemplateUrl: './form-caption.component.html',\n\tstyleUrls: ['./form-caption.component.scss'],\n})\nexport class FormCaptionComponent implements OnInit {\n\t@ViewChild('contentRef') public contentRef: ElementRef;\n\n\tconstructor(@Host() @Optional() private parent: FormElementComponent) {}\n\n\tngOnInit(): void {\n\t\t// this is being run next cycle, because we dont want to fail if the order of components is as follows:\n\t\t// <app-form-error />\n\t\t// <some-input />\n\t\t// That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet\n\t\tsetTimeout(() => {\n\t\t\tconst attachedControl = this.parent.getAttachedControl();\n\t\t\tthis.parent.registerCaption(this.contentRef);\n\t\t\tif (isNullOrUndefined(attachedControl)) {\n\t\t\t\tthrow new Error('You added a Form Caption component without an attached Form Control');\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Component, ElementRef, Host, Input, OnInit, Optional, ViewChild } from '@angular/core';\nimport {FormElementComponent} from \"../form-element/form-element.component\";\nimport {isNullOrUndefined} from \"../../util/values\";\nimport {ErrorTypes} from \"../../types\";\n\n@Component({\n\tselector: 'klp-form-error',\n\ttemplateUrl: './form-error.component.html',\n\tstyleUrls: ['./form-error.component.scss'],\n})\nexport class FormErrorComponent implements OnInit {\n\t@Input() error: ErrorTypes;\n\tpublic showError = false;\n\t@ViewChild('contentRef') public contentRef: ElementRef;\n\tconstructor(@Host() @Optional() private parent: FormElementComponent) {}\n\n\tngOnInit(): void {\n\t\t// this is being run next cycle, because we dont want to fail if the order of components is as follows:\n\t\t// <app-form-error />\n\t\t// <some-input />\n\t\t// That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet\n\t\tsetTimeout(() => {\n\t\t\tconst attachedControl = this.parent.getAttachedControl();\n\t\t\tthis.parent.registerErrorHandler(this.error, this.contentRef);\n\t\t\tif (isNullOrUndefined(attachedControl)) {\n\t\t\t\tthrow new Error('You added a Form Error component without an attached Form Control');\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Component, Host, HostBinding, Input, Optional } from '@angular/core';\nimport {FormComponent, invalidFieldsSymbol} from \"../form.component\";\nimport {isNullOrUndefined} from \"../../util/values\";\n\n@Component({\n\tselector: 'klp-form-submit-button',\n\ttemplateUrl: './form-submit-button.component.html',\n\tstyleUrls: ['./form-submit-button.component.scss'],\n})\nexport class FormSubmitButtonComponent {\n\t@Input() public isLoading = false;\n\t@Input() fullWidth = false;\n\t@Input() variant: 'greenFilled' | 'redFilled' = 'greenFilled';\n\t@Input() public submitCallback: (any) => Promise<void>;\n\n\t@HostBinding('class._fullWidth') get _() {\n\t\treturn this.fullWidth;\n\t}\n\n\tconstructor(@Host() @Optional() private parentForm: FormComponent) {}\n\n\tsubmitForm() {\n\t\tthis.parentForm\n\t\t\t.trySubmit()\n\t\t\t.then((value) => {\n\t\t\t\tthis.isLoading = true;\n\t\t\t\tconst submitCallbackResult = this.submitCallback(value);\n\t\t\t\tif (isNullOrUndefined(submitCallbackResult)) {\n\t\t\t\t\tthrow new Error('No promise is returned in your submit function.');\n\t\t\t\t}\n\t\t\t\treturn submitCallbackResult.then(() => (this.isLoading = false)).catch((e) => {\n\t\t\t\t\tthis.isLoading = false\n\t\t\t\t\tthrow e;\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch((e) => {\n\t\t\t\tif (e === invalidFieldsSymbol) {\n\t\t\t\t\treturn // swallow the error, the framework will scroll to the field that needs attention\n\t\t\t\t}\n\t\t\t\tthrow e;\n\t\t\t});\n\t}\n}\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nexport const invalidDateKey = '--invalid_date--';\n\nexport function dateValidator(control: AbstractControl): ValidationErrors | null {\n\tconst invalid = control.value === invalidDateKey;\n\treturn invalid ? { date: control.value } : null;\n}\n","import {\n\tComponent,\n\tElementRef,\n\tHost,\n\tInject,\n\tInjectionToken,\n\tInput,\n\tOptional,\n\tSimpleChanges,\n\tViewChild\n} from '@angular/core';\nimport {ControlContainer, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {isNullOrUndefined, isValueSet, stringIsSetAndNotEmpty} from '../../util/values';\nimport { invalidDateKey } from '../../validators/dateValidator';\nimport { MatDatepicker } from '@angular/material/datepicker';\nimport {ValueAccessorBase} from \"../value-accessor-base/value-accessor-base.component\";\nimport {MAT_DATE_FORMATS, MAT_NATIVE_DATE_FORMATS} from \"@angular/material/core\";\nimport {KlpDateFormats} from \"../../types\";\n\nexport const KLP_DATE_FORMATS = new InjectionToken<KlpDateFormats>('klp.form.date.formats');\n\nexport function matDateFormatsFactory(component: DatepickerComponent, dateFormats?: KlpDateFormats) {\n\treturn dateFormats?.(component.format) ?? MAT_NATIVE_DATE_FORMATS;\n}\n\n@Component({\n\tselector: 'klp-form-datepicker',\n\ttemplateUrl: './datepicker.component.html',\n\tstyleUrls: ['./datepicker.component.scss'],\n\tproviders: [\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: DatepickerComponent, multi: true },\n\t\t{ provide: MAT_DATE_FORMATS,\n\t\t\tdeps: [DatepickerComponent, [new Optional(), KLP_DATE_FORMATS]],\n\t\t\tuseFactory: matDateFormatsFactory,\n\t\t}\n\t],\n})\nexport class DatepickerComponent extends ValueAccessorBase<Date | typeof invalidDateKey> {\n\t@Input() public minDate: Date = undefined;\n\t@Input() public maxDate: Date = undefined;\n\t@Input() public format: string;\n\t@Input() public placeholder = 'Select date';\n\t@Input() public clearable = false;\n\n\t@ViewChild('nativeInput') nativeInputRef: ElementRef;\n\t@ViewChild('picker') datePickerRef: MatDatepicker<Date>;\n\n\tminDateStartOfDay: Date = undefined;\n\tmaxDateEndOfDay: Date = undefined;\n\n\t// this is passed as ngmodel and is used to set the inital date. But we also\n\t// use input and nativeInput callbacks to extend the validation logic so we\n\t// can destinguish between empty and invalid dates.\n\tvalueForMaterialDatePicker: Date;\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\tif (changes.minDate) {\n\t\t\tthis.setMinDate(changes.minDate.currentValue);\n\t\t}\n\t\tif (changes.maxDate) {\n\t\t\tthis.setMaxDate(changes.maxDate.currentValue);\n\t\t}\n\t}\n\n\tsetMinDate(minDate: Date) {\n\t\tif (minDate) {\n\t\t\tthis.minDateStartOfDay = new Date(minDate);\n\t\t\tthis.minDateStartOfDay.setHours(0, 0, 0, 0);\n\t\t} else {\n\t\t\tthis.minDateStartOfDay = undefined;\n\t\t}\n\t}\n\n\tsetMaxDate(maxDate: Date) {\n\t\tif (maxDate) {\n\t\t\tthis.maxDateEndOfDay = new Date(maxDate);\n\t\t\tthis.maxDateEndOfDay.setHours(23, 59, 59, 999);\n\t\t} else {\n\t\t\tthis.maxDateEndOfDay = undefined;\n\t\t}\n\t}\n\n\t// dateChanged is called when the output of the datepicker is changed and\n\t// parsed correctly. If the date is invalid, it will be called the first time\n\t// with null but never again until a valid input is provided.\n\tdateChanged(event: any) {\n\t\tconst nativeInputValue = this.nativeInputRef.nativeElement.value;\n\t\tconst date = event.value;\n\t\tif (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {\n\t\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t\t} else {\n\t\t\tthis.setInnerValueAndNotify(date);\n\t\t}\n\t}\n\n\twriteValue(value: Date | typeof invalidDateKey) {\n\t\tsuper.writeValue(value);\n\t\tthis.valueForMaterialDatePicker = value === invalidDateKey ? null : value;\n\t}\n\n\t// nativeValueChanged is called when the internal text value changes, but not\n\t// when the date is changed via the date picker. We need this so that we can\n\t// determine if the datepicker is empty or invalid.\n\tnativeValueChanged(event: any) {\n\t\tconst nativeInputValue = event.target.value;\n\t\tconst date = this.valueForMaterialDatePicker;\n\n\t\tif (this.datePickerRef.opened) {\n\t\t\t// if the user is typing instead of using the picker, close it.\n\t\t\tthis.datePickerRef.close();\n\t\t}\n\n\t\tif (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {\n\t\t\tthis.setInnerValueAndNotify(invalidDateKey);\n\t\t} else {\n\t\t\tthis.setInnerValueAndNotify(date);\n\t\t}\n\t}\n\n\tresetToNull() {\n\t\tthis.setInnerValueAndNotify(null);\n\t\tthis.valueForMaterialDatePicker = null;\n\t\tthis.nativeInputRef.nativeElement.value = null;\n\t}\n}\n","// material.module.ts\n\nimport { NgModule } from '@angular/core';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatNativeDateModule } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n\timports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule],\n\texports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule],\n\tproviders: [MatDatepickerModule],\n})\nexport class MaterialModule {}\n","import { NgModule } from '@angular/core';\nimport {CommonModule} from \"@angular/common\";\nimport {FormsModule} from \"@angular/forms\";\nimport {ValueAccessorBase} from \"./elements/value-accessor-base/value-accessor-base.component\";\nimport {ButtonComponent} from \"./elements/button/button.component\";\nimport {CheckboxComponent} from \"./elements/checkbox/checkbox.component\";\nimport {EmailInputComponent} from \"./elements/email/email-input.component\";\nimport {LoadingIndicatorComponent} from \"./elements/loading-indicator/loading-indicator.component\";\nimport {NumberInputComponent} from \"./elements/number-input/number-input.component\";\nimport {PasswordFieldComponent} from \"./elements/password-field/password-field.component\";\nimport {SelectComponent} from \"./elements/select/select.component\";\nimport {SortableItemsComponent} from \"./elements/sortable-items/sortable-items.component\";\nimport {TextInputComponent} from \"./elements/text-input/text-input.component\";\nimport {ToggleComponent} from \"./elements/toggle/toggle.component\";\nimport {FormCaptionComponent} from \"./form/form-caption/form-caption.component\";\nimport {FormElementComponent} from \"./form/form-element/form-element.component\";\nimport {FormErrorComponent} from \"./form/form-error/form-error.component\";\nimport {FormSubmitButtonComponent} from \"./form/form-submit-button/form-submit-button.component\";\nimport {FormComponent} from \"./form/form.component\";\nimport {SortablejsModule} from \"ngx-sortablejs\";\nimport {NgSelectModule} from \"@ng-select/ng-select\";\nimport {DatepickerComponent} from \"./elements/datepicker/datepicker.component\";\nimport {MaterialModule} from \"./material.module\";\n\n\n\n@NgModule({\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tNgSelectModule,\n\t\tSortablejsModule,\n\t\tMaterialModule,\n\t],\n\tdeclarations: [\n\t\tValueAccessorBase,\n\t\tButtonComponent,\n\t\tCheckboxComponent,\n\t\tDatepickerComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tSortableItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t],\n\texports: [\n\t\tValueAccessorBase,\n\t\tButtonComponent,\n\t\tDatepickerComponent,\n\t\tCheckboxComponent,\n\t\tEmailInputComponent,\n\t\tLoadingIndicatorComponent,\n\t\tNumberInputComponent,\n\t\tPasswordFieldComponent,\n\t\tSelectComponent,\n\t\tSortableItemsComponent,\n\t\tTextInputComponent,\n\t\tToggleComponent,\n\t\tFormCaptionComponent,\n\t\tFormElementComponent,\n\t\tFormErrorComponent,\n\t\tFormSubmitButtonComponent,\n\t\tFormComponent,\n\t]\n})\nexport class NgxEnhancyFormsModule { }\n","/*\n * Public API Surface of ngx-enhancy-forms\n */\n\nexport * from './lib/ngx-enhancy-forms.module';\n\nexport * from './lib/elements/button/button.component';\nexport * from './lib/elements/checkbox/checkbox.component';\nexport * from './lib/elements/datepicker/datepicker.component';\nexport * from './lib/elements/email/email-input.component';\nexport * from './lib/elements/loading-indicator/loading-indicator.component';\nexport * from './lib/elements/number-input/number-input.component';\nexport * from './lib/elements/password-field/password-field.component';\nexport * from './lib/elements/select/select.component';\nexport * from './lib/elements/sortable-items/sortable-items.component';\nexport * from './lib/elements/text-input/text-input.component';\nexport * from './lib/elements/toggle/toggle.component';\nexport * from './lib/elements/value-accessor-base/value-accessor-base.component';\n\nexport * from './lib/form/form.component';\nexport * from './lib/form/form-caption/form-caption.component';\nexport * from './lib/form/form-element/form-element.component';\nexport * from './lib/form/form-error/form-error.component';\nexport * from './lib/form/form-submit-button/form-submit-button.component';\n\nexport * from './lib/validators/dateValidator';\n\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MaterialModule as ɵa} from './lib/material.module';"],"names":[],"mappings":";;;;;;;;;;;;SAEgB,sBAAsB,CAAC,CAAS;IAC/C,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACpC,CAAC;SAEe,iBAAiB,CAAC,KAAU;IAC3C,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC9C,CAAC;SAEe,WAAW,CAAC,KAAU;IACr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