@klippa/ngx-enhancy-forms 14.0.1 → 16.0.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.
Files changed (71) hide show
  1. package/{esm2020 → esm2022}/lib/elements/button/button.component.mjs +4 -4
  2. package/{esm2020 → esm2022}/lib/elements/checkbox/checkbox.component.mjs +4 -4
  3. package/{esm2020 → esm2022}/lib/elements/date-picker/date-picker.component.mjs +4 -4
  4. package/{esm2020 → esm2022}/lib/elements/date-time-picker/date-time-picker.component.mjs +13 -13
  5. package/{esm2020 → esm2022}/lib/elements/email/email-input.component.mjs +4 -4
  6. package/{esm2020 → esm2022}/lib/elements/file-input/file-input.component.mjs +4 -4
  7. package/{esm2020 → esm2022}/lib/elements/hour-minute-input/hour-minute-input.component.mjs +4 -4
  8. package/{esm2020 → esm2022}/lib/elements/loading-indicator/loading-indicator.component.mjs +4 -4
  9. package/{esm2020 → esm2022}/lib/elements/number-input/number-input.component.mjs +4 -4
  10. package/{esm2020 → esm2022}/lib/elements/password-field/password-field.component.mjs +4 -4
  11. package/{esm2020 → esm2022}/lib/elements/radio/radio.component.mjs +4 -4
  12. package/{esm2020 → esm2022}/lib/elements/select/select-footer/select-footer.component.mjs +4 -4
  13. package/esm2022/lib/elements/select/select.component.mjs +138 -0
  14. package/{esm2020 → esm2022}/lib/elements/sortable-grouped-items/sortable-grouped-items.component.mjs +4 -4
  15. package/esm2022/lib/elements/sortable-items/sortable-items.component.mjs +86 -0
  16. package/{esm2020 → esm2022}/lib/elements/text-input/text-input.component.mjs +4 -4
  17. package/{esm2020 → esm2022}/lib/elements/toggle/toggle.component.mjs +4 -4
  18. package/{esm2020 → esm2022}/lib/elements/value-accessor-base/multiple-value-accessor-base.component.mjs +4 -4
  19. package/{esm2020 → esm2022}/lib/elements/value-accessor-base/value-accessor-base.component.mjs +4 -4
  20. package/{esm2020 → esm2022}/lib/form/form-caption/form-caption.component.mjs +4 -4
  21. package/{esm2020 → esm2022}/lib/form/form-element/form-element.component.mjs +4 -4
  22. package/{esm2020 → esm2022}/lib/form/form-error/form-error.component.mjs +4 -4
  23. package/{esm2020 → esm2022}/lib/form/form-submit-button/form-submit-button.component.mjs +7 -7
  24. package/{esm2020 → esm2022}/lib/form/form.component.mjs +7 -7
  25. package/esm2022/lib/material.module.mjs +22 -0
  26. package/{esm2020 → esm2022}/lib/ngx-enhancy-forms.module.mjs +67 -67
  27. package/{esm2020 → esm2022}/lib/util/arrays.mjs +2 -2
  28. package/{fesm2020 → fesm2022}/klippa-ngx-enhancy-forms.mjs +186 -171
  29. package/fesm2022/klippa-ngx-enhancy-forms.mjs.map +1 -0
  30. package/lib/elements/button/button.component.d.ts +1 -1
  31. package/lib/elements/checkbox/checkbox.component.d.ts +1 -1
  32. package/lib/elements/date-picker/date-picker.component.d.ts +1 -1
  33. package/lib/elements/date-time-picker/date-time-picker.component.d.ts +1 -1
  34. package/lib/elements/email/email-input.component.d.ts +1 -1
  35. package/lib/elements/file-input/file-input.component.d.ts +1 -1
  36. package/lib/elements/hour-minute-input/hour-minute-input.component.d.ts +1 -1
  37. package/lib/elements/loading-indicator/loading-indicator.component.d.ts +1 -1
  38. package/lib/elements/number-input/number-input.component.d.ts +1 -1
  39. package/lib/elements/password-field/password-field.component.d.ts +1 -1
  40. package/lib/elements/radio/radio.component.d.ts +3 -3
  41. package/lib/elements/select/select-footer/select-footer.component.d.ts +1 -1
  42. package/lib/elements/select/select.component.d.ts +4 -4
  43. package/lib/elements/sortable-grouped-items/sortable-grouped-items.component.d.ts +1 -1
  44. package/lib/elements/sortable-items/sortable-items.component.d.ts +1 -1
  45. package/lib/elements/text-input/text-input.component.d.ts +1 -1
  46. package/lib/elements/toggle/toggle.component.d.ts +1 -1
  47. package/lib/elements/value-accessor-base/multiple-value-accessor-base.component.d.ts +1 -1
  48. package/lib/elements/value-accessor-base/value-accessor-base.component.d.ts +1 -1
  49. package/lib/form/form-caption/form-caption.component.d.ts +1 -1
  50. package/lib/form/form-element/form-element.component.d.ts +1 -1
  51. package/lib/form/form-error/form-error.component.d.ts +1 -1
  52. package/lib/form/form-submit-button/form-submit-button.component.d.ts +1 -1
  53. package/lib/form/form.component.d.ts +2 -2
  54. package/lib/material.module.d.ts +4 -4
  55. package/lib/ngx-enhancy-forms.module.d.ts +1 -1
  56. package/lib/types.d.ts +3 -3
  57. package/package.json +8 -14
  58. package/esm2020/lib/elements/select/select.component.mjs +0 -138
  59. package/esm2020/lib/elements/sortable-items/sortable-items.component.mjs +0 -70
  60. package/esm2020/lib/material.module.mjs +0 -22
  61. package/fesm2015/klippa-ngx-enhancy-forms.mjs +0 -2052
  62. package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +0 -1
  63. package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +0 -1
  64. package/src/lib/form/README.md +0 -1
  65. /package/{esm2020 → esm2022}/klippa-ngx-enhancy-forms.mjs +0 -0
  66. /package/{esm2020 → esm2022}/lib/types.mjs +0 -0
  67. /package/{esm2020 → esm2022}/lib/util/objects.mjs +0 -0
  68. /package/{esm2020 → esm2022}/lib/util/values.mjs +0 -0
  69. /package/{esm2020 → esm2022}/lib/validators/dateValidator.mjs +0 -0
  70. /package/{esm2020 → esm2022}/lib/validators/timeValidator.mjs +0 -0
  71. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
@@ -1,2052 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Directive, Input, Component, SkipSelf, Optional, InjectionToken, Host, Inject, ViewChild, EventEmitter, Output, HostBinding, TemplateRef, ContentChild, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/forms';
6
- import { UntypedFormArray, UntypedFormGroup, UntypedFormControl, FormControl, FormArray, FormGroup, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
7
- import { isString } from 'lodash-es';
8
- import { isArray } from 'lodash';
9
- import { __awaiter } from 'tslib';
10
- import * as i4 from '@ng-select/ng-select';
11
- import { NgSelectModule } from '@ng-select/ng-select';
12
- import * as i2$1 from 'ngx-sortablejs';
13
- import { SortablejsModule } from 'ngx-sortablejs';
14
- import { isSameDay, format, startOfMonth, endOfMonth, parse } from 'date-fns';
15
- import * as i3 from '@angular/material/core';
16
- import { MAT_NATIVE_DATE_FORMATS, MAT_DATE_FORMATS, MatNativeDateModule } from '@angular/material/core';
17
- import * as i5 from '@angular/material/datepicker';
18
- import { MatDatepickerModule } from '@angular/material/datepicker';
19
- import * as i6 from '@angular/material/form-field';
20
- import { MatFormFieldModule } from '@angular/material/form-field';
21
- import * as i7 from '@angular/material/input';
22
- import { MatInputModule } from '@angular/material/input';
23
- import { MatButtonModule } from '@angular/material/button';
24
-
25
- function stringIsSetAndFilled(s) {
26
- return isString(s) && s.length > 0;
27
- }
28
- function isNullOrUndefined(value) {
29
- return value === null || value === undefined;
30
- }
31
- function numberIsSet(value) {
32
- return isValueSet(value) && typeof value === 'number';
33
- }
34
- function isValueSet(value) {
35
- return value !== null && value !== undefined;
36
- }
37
- function stringOrArrayIsSetAndEmpty(value) {
38
- return value !== null && value !== undefined && value.length === 0;
39
- }
40
- function truncateString(s, length) {
41
- if (s.length < length) {
42
- return s;
43
- }
44
- return s.substring(0, length) + '...';
45
- }
46
-
47
- function removeDuplicatesFromArraysWithComparator(comparator, ...arrays) {
48
- let combined = [];
49
- for (const array of arrays) {
50
- combined = combined.concat(array);
51
- }
52
- return combined.filter((c, i) => {
53
- const firstOccurrenceIndex = combined.findIndex((c2) => comparator(c, c2));
54
- return i === firstOccurrenceIndex;
55
- });
56
- }
57
- function removeDuplicatesFromArray(array) {
58
- return array.filter((c, i) => {
59
- const firstOccurrenceIndex = array.findIndex((c2) => c2 === c);
60
- return i === firstOccurrenceIndex;
61
- });
62
- }
63
- function insertAtIndex(arr, index, item) {
64
- arr.splice(index, 0, item);
65
- }
66
- function arrayIsSetAndFilled(arr) {
67
- return isArray(arr) && arr !== null && arr !== undefined && arr.length > 0;
68
- }
69
- function asArray(value) {
70
- if (isValueSet(value)) {
71
- if (Array.isArray(value)) {
72
- return value;
73
- }
74
- return [value];
75
- }
76
- return [];
77
- }
78
- function splitArrayByCondition(value, condition) {
79
- return value.reduce((acc, cur) => {
80
- if (condition(cur)) {
81
- acc.push([]);
82
- }
83
- else {
84
- acc[acc.length - 1].push(cur);
85
- }
86
- return acc;
87
- }, [[]]);
88
- }
89
-
90
- function mergeArray(arrA, arrB) {
91
- var _a;
92
- const arr = new Array(Math.max(arrA.length, arrB.length));
93
- for (let i = 0; i < arr.length; i++) {
94
- if (typeof arrA[i] === 'object' && typeof arrB[i] === 'object') {
95
- arr[i] = deepMerge(arrA[i], arrB[i]);
96
- }
97
- else {
98
- arr[i] = (_a = arrB[i]) !== null && _a !== void 0 ? _a : arrA[i];
99
- }
100
- }
101
- return arr;
102
- }
103
- function deepMerge(objA, objB) {
104
- if (Array.isArray(objA) || Array.isArray(objB)) {
105
- if (Array.isArray(objA) && Array.isArray(objB)) {
106
- return mergeArray(objA, objB);
107
- }
108
- // if a and b differ in type, prefer b.
109
- return objB !== null && objB !== void 0 ? objB : objA;
110
- }
111
- const merged = {};
112
- const keys = new Set([
113
- ...Object.keys(objA),
114
- ...Object.keys(objB),
115
- ]);
116
- keys.forEach((key) => {
117
- const a = objA[key];
118
- const b = objB[key];
119
- if (typeof a === 'object' && typeof b === 'object') {
120
- merged[key] = deepMerge(a, b);
121
- return;
122
- }
123
- // if a and b differ in type, prefer b.
124
- merged[key] = (b !== null && b !== void 0 ? b : a);
125
- });
126
- return merged;
127
- }
128
-
129
- const invalidFieldsSymbol = Symbol('Not all fields are valid');
130
- class SubFormDirective {
131
- }
132
- SubFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SubFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
133
- SubFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: SubFormDirective, selector: "klp-sub-form", inputs: { injectInto: "injectInto", at: "at" }, ngImport: i0 });
134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SubFormDirective, decorators: [{
135
- type: Directive,
136
- args: [{
137
- // tslint:disable-next-line:directive-selector
138
- selector: 'klp-sub-form',
139
- }]
140
- }], propDecorators: { injectInto: [{
141
- type: Input
142
- }], at: [{
143
- type: Input
144
- }] } });
145
- class FormComponent {
146
- constructor(parent, subFormPlaceholder) {
147
- this.parent = parent;
148
- this.subFormPlaceholder = subFormPlaceholder;
149
- this.readOnly = false;
150
- this.showErrorMessages = true;
151
- this.errorMessageLocation = 'belowCaption';
152
- // we keep track of what form controls are actually rendered. Only those count when looking at form validation
153
- this.activeControls = [];
154
- }
155
- ngOnInit() {
156
- var _a, _b, _c, _d;
157
- if (isValueSet(this.parent) && isValueSet(this.subFormPlaceholder)) {
158
- const injectInto = this.subFormPlaceholder.injectInto;
159
- const injectAt = this.subFormPlaceholder.at;
160
- if (injectInto instanceof UntypedFormArray) {
161
- if (typeof injectAt !== 'number') {
162
- throw new Error(`cannot index FormArray with ${typeof injectAt}`);
163
- }
164
- if ((_a = injectInto.at(injectAt)) === null || _a === void 0 ? void 0 : _a.disabled) {
165
- this.formGroup.disable();
166
- }
167
- const valueBeforeInject = (_b = injectInto.at(injectAt)) === null || _b === void 0 ? void 0 : _b.value;
168
- injectInto.setControl(injectAt, this.formGroup);
169
- if (isValueSet(valueBeforeInject)) {
170
- this.formGroup.patchValue(valueBeforeInject);
171
- }
172
- }
173
- else if (injectInto instanceof UntypedFormGroup) {
174
- if (typeof injectAt !== 'string') {
175
- throw new Error(`cannot index FormGroup with ${typeof injectAt}`);
176
- }
177
- if ((_c = injectInto.get(injectAt)) === null || _c === void 0 ? void 0 : _c.disabled) {
178
- this.formGroup.disable();
179
- }
180
- const valueBeforeInject = (_d = injectInto.get(injectAt)) === null || _d === void 0 ? void 0 : _d.value;
181
- injectInto.setControl(injectAt, this.formGroup);
182
- if (isValueSet(valueBeforeInject)) {
183
- this.formGroup.patchValue(valueBeforeInject);
184
- }
185
- }
186
- }
187
- if (isValueSet(this.patchValueInterceptor)) {
188
- this.addSupportForPatchValueInterceptor();
189
- }
190
- }
191
- ngOnChanges(simpleChanges) {
192
- var _a;
193
- if (((_a = simpleChanges.readOnly) === null || _a === void 0 ? void 0 : _a.currentValue) === true) {
194
- this.activeControls.forEach(e => e.formControl.disable());
195
- }
196
- }
197
- ngOnDestroy() {
198
- if (isValueSet(this.parent) && isValueSet(this.subFormPlaceholder)) {
199
- const injectInto = this.subFormPlaceholder.injectInto;
200
- const injectAt = this.subFormPlaceholder.at;
201
- if (injectInto instanceof UntypedFormArray) {
202
- const idx = injectInto.controls.findIndex(e => e === this.formGroup);
203
- injectInto.removeAt(idx);
204
- }
205
- else if (injectInto instanceof UntypedFormGroup) {
206
- if (typeof injectAt !== 'string') {
207
- throw new Error(`cannot index FormGroup with ${typeof injectAt}`);
208
- }
209
- injectInto.removeControl(injectAt);
210
- }
211
- }
212
- }
213
- addSupportForPatchValueInterceptor() {
214
- const fn = this.formGroup.patchValue;
215
- const newFn = (value, options) => {
216
- this.patchValueInterceptor(value).then((val) => {
217
- setTimeout(() => {
218
- fn.call(this.formGroup, val, options);
219
- });
220
- });
221
- };
222
- this.formGroup.patchValue = newFn;
223
- }
224
- registerControl(formControl, formElement) {
225
- this.activeControls.push({ formControl, formElement });
226
- if (this.parent) {
227
- this.parent.registerControl(formControl, formElement);
228
- }
229
- if (this.readOnly) {
230
- formControl.disable();
231
- }
232
- }
233
- unregisterControl(formControl) {
234
- this.activeControls = this.activeControls.filter((e) => e.formControl !== formControl);
235
- if (this.parent) {
236
- this.parent.unregisterControl(formControl);
237
- }
238
- }
239
- addFormGroupControls(formGroup, result) {
240
- Object.values(formGroup.controls).forEach((value) => {
241
- if (value instanceof UntypedFormGroup) {
242
- this.addFormGroupControls(value, result);
243
- }
244
- else if (value instanceof UntypedFormArray) {
245
- this.addFormArrayControls(value, result);
246
- }
247
- else if (value instanceof UntypedFormControl) {
248
- this.addFormControl(value, result);
249
- }
250
- });
251
- }
252
- addFormArrayControls(formArray, result) {
253
- formArray.controls.forEach((value) => {
254
- if (value instanceof UntypedFormGroup) {
255
- this.addFormGroupControls(value, result);
256
- }
257
- else if (value instanceof UntypedFormArray) {
258
- this.addFormArrayControls(value, result);
259
- }
260
- else if (value instanceof UntypedFormControl) {
261
- this.addFormControl(value, result);
262
- }
263
- });
264
- }
265
- getAllFormControls() {
266
- const result = [];
267
- this.addFormGroupControls(this.formGroup, result);
268
- return result;
269
- }
270
- addFormControl(control, result) {
271
- result.push(control);
272
- }
273
- disableInactiveFormControl(control) {
274
- if (!this.activeControls.some((e) => e.formControl === control)) {
275
- control.disable();
276
- }
277
- }
278
- trySubmit() {
279
- var _a, _b;
280
- this.formGroup.markAllAsTouched();
281
- const allControls = this.getAllFormControls();
282
- const originalDisabledStates = allControls.map(e => {
283
- return { control: e, disabled: e.disabled };
284
- });
285
- allControls.forEach(e => this.disableInactiveFormControl(e));
286
- allControls.forEach(e => e.updateValueAndValidity());
287
- const formGroupValue = this.formGroup.value;
288
- const renderedAndEnabledValues = this.getRenderedFieldValuesFormGroup(this.formGroup, true);
289
- const renderedButDisabledValues = this.getRenderedFieldValuesFormGroup(this.formGroup, false);
290
- if (this.formGroup.invalid) {
291
- (_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();
292
- this.setDisabledStatesForAllControls(originalDisabledStates);
293
- return Promise.reject(invalidFieldsSymbol);
294
- }
295
- else {
296
- this.setDisabledStatesForAllControls(originalDisabledStates);
297
- const renderedValues = deepMerge(renderedAndEnabledValues, renderedButDisabledValues);
298
- return Promise.resolve([formGroupValue, renderedValues]);
299
- }
300
- }
301
- getRenderedFieldValuesFormGroup(formGroup, enabled, valueObject = {}) {
302
- Object.entries(formGroup.controls).forEach(([name, control]) => {
303
- if (control instanceof FormControl && control.enabled === enabled && this.activeControls.some(e => e.formControl === control)) {
304
- valueObject[name] = control.value;
305
- }
306
- else if (control instanceof FormArray) {
307
- valueObject[name] = [];
308
- this.getRenderedFieldValuesFormArray(control, enabled, valueObject[name]);
309
- }
310
- else if (control instanceof FormGroup) {
311
- valueObject[name] = {};
312
- this.getRenderedFieldValuesFormGroup(control, enabled, valueObject[name]);
313
- }
314
- });
315
- return valueObject;
316
- }
317
- getRenderedFieldValuesFormArray(formArray, enabled, valueArray) {
318
- formArray.controls.forEach((control) => {
319
- if (control instanceof FormControl && control.enabled === enabled && this.activeControls.some(e => e.formControl === control)) {
320
- valueArray.push(control.value);
321
- }
322
- else if (control instanceof FormArray) {
323
- const newArray = [];
324
- valueArray.push(newArray);
325
- this.getRenderedFieldValuesFormArray(control, enabled, newArray);
326
- }
327
- else if (control instanceof FormGroup) {
328
- const newObject = {};
329
- valueArray.push(newObject);
330
- this.getRenderedFieldValuesFormGroup(control, enabled, newObject);
331
- }
332
- });
333
- }
334
- setDisabledStatesForAllControls(originalDisabledStates) {
335
- originalDisabledStates.forEach((e) => {
336
- if (e.disabled) {
337
- e.control.disable();
338
- }
339
- else {
340
- e.control.enable();
341
- }
342
- });
343
- }
344
- }
345
- FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormComponent, deps: [{ token: FormComponent, optional: true, skipSelf: true }, { token: SubFormDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
346
- FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormComponent, selector: "klp-form", inputs: { readOnly: "readOnly", showErrorMessages: "showErrorMessages", errorMessageLocation: "errorMessageLocation", formGroup: "formGroup", patchValueInterceptor: "patchValueInterceptor" }, usesOnChanges: true, ngImport: i0, template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}:host form{height:inherit}\n"], dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormComponent, decorators: [{
348
- type: Component,
349
- args: [{ selector: 'klp-form', template: "<form>\n\t<ng-content></ng-content>\n</form>\n\n\n", styles: [":host{display:block}:host.row{display:flex}:host form{height:inherit}\n"] }]
350
- }], ctorParameters: function () {
351
- return [{ type: FormComponent, decorators: [{
352
- type: SkipSelf
353
- }, {
354
- type: Optional
355
- }] }, { type: SubFormDirective, decorators: [{
356
- type: Optional
357
- }] }];
358
- }, propDecorators: { readOnly: [{
359
- type: Input
360
- }], showErrorMessages: [{
361
- type: Input
362
- }], errorMessageLocation: [{
363
- type: Input
364
- }], formGroup: [{
365
- type: Input
366
- }], patchValueInterceptor: [{
367
- type: Input
368
- }] } });
369
-
370
- const FORM_ERROR_MESSAGES = new InjectionToken('form.error.messages');
371
- const DEFAULT_ERROR_MESSAGES = {
372
- min: 'Use a number larger than %min%',
373
- max: 'Use a number smaller than %max%',
374
- required: 'This field is required',
375
- email: 'Use a valid email address',
376
- minLength: 'Has to be longer than %minLength% character(s)',
377
- maxLength: 'Has to be shorter than %maxLength% character(s)',
378
- pattern: 'This input is not valid',
379
- matchPassword: 'Passwords must match',
380
- date: 'Enter a valid date',
381
- };
382
- class FormElementComponent {
383
- constructor(parent, customMessages) {
384
- this.parent = parent;
385
- this.customMessages = customMessages;
386
- this.direction = 'horizontal';
387
- this.captionSpacing = 'percentages';
388
- this.spaceDistribution = '40-60';
389
- this.swapInputAndCaption = false;
390
- this.errorMessages = DEFAULT_ERROR_MESSAGES;
391
- this.customErrorHandlers = [];
392
- }
393
- shouldShowErrorMessages() {
394
- var _a;
395
- return ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.showErrorMessages) !== false;
396
- }
397
- substituteParameters(message, parameters) {
398
- return Object.keys(parameters).reduce((msg, key) => {
399
- return msg.replace(`%${key}%`, parameters[key]);
400
- }, message);
401
- }
402
- registerControl(formControl, input = null) {
403
- this.attachedControl = formControl;
404
- this.parent.registerControl(formControl, this);
405
- this.input = input;
406
- }
407
- unregisterControl(formControl) {
408
- this.attachedControl = null;
409
- this.parent.unregisterControl(formControl);
410
- }
411
- getAttachedControl() {
412
- return this.attachedControl;
413
- }
414
- registerErrorHandler(error, templateRef) {
415
- this.customErrorHandlers.push({ error, templateRef });
416
- }
417
- registerCaption(templateRef) {
418
- this.captionRef = templateRef;
419
- }
420
- getErrorToShow() {
421
- var _a, _b, _c;
422
- if (((_a = this.attachedControl) === null || _a === void 0 ? void 0 : _a.touched) === true && ((_b = this.attachedControl) === null || _b === void 0 ? void 0 : _b.errors)) {
423
- return Object.keys((_c = this.attachedControl) === null || _c === void 0 ? void 0 : _c.errors)[0];
424
- }
425
- return null;
426
- }
427
- getCustomErrorHandler(error) {
428
- return this.customErrorHandlers.find((e) => e.error === error);
429
- }
430
- showDefaultError(error) {
431
- return this.getErrorToShow() === error && !this.customErrorHandlers.some((e) => e.error === error);
432
- }
433
- getScrollableParent(node) {
434
- if (node == null) {
435
- return null;
436
- }
437
- if (node.scrollHeight > node.clientHeight) {
438
- return node;
439
- }
440
- else {
441
- return this.getScrollableParent(node.parentNode);
442
- }
443
- }
444
- scrollTo() {
445
- var _a;
446
- this.internalComponentRef.nativeElement.scrollIntoView(true);
447
- // to give some breathing room, we scroll 100px more to the top
448
- (_a = this.getScrollableParent(this.internalComponentRef.nativeElement)) === null || _a === void 0 ? void 0 : _a.scrollBy(0, -100);
449
- }
450
- isRequired() {
451
- if (isValueSet(this.input)) {
452
- return this.input.hasValidator('required');
453
- }
454
- return false;
455
- }
456
- getErrorMessage(key) {
457
- var _a, _b, _c;
458
- return (_c = (_b = (_a = this.customMessages) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : this.errorMessages[key];
459
- }
460
- getErrorLocation() {
461
- var _a, _b;
462
- return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.errorMessageLocation) !== null && _b !== void 0 ? _b : 'belowCaption';
463
- }
464
- }
465
- FormElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormElementComponent, deps: [{ token: FormComponent, host: true, optional: true }, { token: FORM_ERROR_MESSAGES, optional: true }], target: i0.ɵɵFactoryTarget.Component });
466
- FormElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormElementComponent, selector: "klp-form-element", inputs: { caption: "caption", direction: "direction", captionSpacing: "captionSpacing", spaceDistribution: "spaceDistribution", swapInputAndCaption: "swapInputAndCaption" }, viewQueries: [{ propertyName: "internalComponentRef", first: true, predicate: ["internalComponentRef"], descendants: true }], ngImport: i0, template: "<ng-template #errorRef>\n\t<div *ngIf=\"shouldShowErrorMessages() && getErrorToShow()\" class=\"errorContainer\" [ngClass]=\"{hasCaption: caption || captionRef, 'd30-70': spaceDistribution === '30-70', 'd34-66': spaceDistribution === '34-66'}\">\n\t\t<div *ngIf=\"showDefaultError('min')\">{{substituteParameters(getErrorMessage(\"min\"), {min: attachedControl.errors.min.min})}}</div>\n\t\t<div *ngIf=\"showDefaultError('max')\">{{substituteParameters(getErrorMessage(\"max\"), {max: attachedControl.errors.max.max})}}</div>\n\t\t<div *ngIf=\"showDefaultError('required')\">{{getErrorMessage(\"required\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('email')\">{{getErrorMessage(\"email\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('minlength')\">{{substituteParameters(getErrorMessage(\"minLength\"), {minLength: attachedControl.errors.minlength.requiredLength})}}</div>\n\t\t<div *ngIf=\"showDefaultError('maxlength')\">{{substituteParameters(getErrorMessage(\"maxLength\"), {maxLength: attachedControl.errors.maxlength.requiredLength})}}</div>\n\t\t<div *ngIf=\"showDefaultError('pattern')\">{{getErrorMessage(\"pattern\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('MatchPassword')\">{{getErrorMessage(\"matchPassword\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('date')\">{{getErrorMessage(\"date\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('message')\">{{attachedControl.errors.message.value}}</div>\n\t\t<div [ngTemplateOutlet]=\"getCustomErrorHandler(getErrorToShow())?.templateRef\"></div>\n\t</div>\n</ng-template>\n\n<ng-container *ngIf=\"direction === 'horizontal'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n\n<div class=\"componentContainer\" [ngClass]=\"{hasCaption: caption || captionRef, vertical: direction === 'vertical', reverseOrder: swapInputAndCaption}\" #internalComponentRef>\n\t<div class=\"caption\" *ngIf=\"caption || captionRef\"\n\t\t[ngClass]=\"{\n\t\t\thasErrors: getErrorToShow() && attachedControl.touched,\n\t\t\tpercentageSpacing: captionSpacing === 'percentages',\n\t\t\t'd30-70': spaceDistribution === '30-70',\n\t\t\t'd34-66': spaceDistribution === '34-66',\n\t\t\twithErrorRightOfCaption: getErrorLocation() === 'rightOfCaption'\n\t\t}\"\n\t>\n\t\t<div *ngIf=\"captionRef\" class=\"captionRefContainer\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"captionRef\"></ng-container>\n\t\t\t<div *ngIf=\"isRequired()\">&nbsp;*</div>\n\t\t</div>\n\t\t<div *ngIf=\"!captionRef\">{{caption}}<span *ngIf=\"isRequired()\">&nbsp;*</span></div>\n\t\t<div class=\"rightOfCaptionError\">\n\t\t\t<ng-container *ngIf=\"direction === 'vertical' && getErrorLocation() === 'rightOfCaption'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n\t\t</div>\n\t</div>\n\t<ng-container *ngIf=\"direction === 'vertical' && getErrorLocation() === 'belowCaption'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n\t<div class=\"inputContainer\" [ngClass]=\"{\n\t\tpercentageSpacing: captionSpacing === 'percentages',\n\t\t'd30-70': spaceDistribution === '30-70',\n\t\t'd34-66': spaceDistribution === '34-66'\n\t}\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n", styles: [":host{display:block}.componentContainer{display:flex;align-items:center;min-height:42px}.componentContainer:not(.hasCaption){display:block}.componentContainer:not(.hasCaption) .inputContainer{margin-top:0}.componentContainer.reverseOrder{flex-direction:row-reverse;justify-content:flex-end}.componentContainer.vertical{display:block}.componentContainer.vertical .inputContainer{margin-top:.3125rem}.componentContainer.vertical .errorContainer{margin-left:0}.componentContainer.vertical .caption{padding-right:0}.captionRefContainer{display:flex}.caption{font-weight:700;flex:0 0 auto;padding-right:1.25rem;color:#515365}.caption.percentageSpacing{flex:0 0 40%}.caption.percentageSpacing.d30-70{flex-basis:30%}.caption.percentageSpacing.d34-66{flex-basis:34%}.caption.hasErrors{color:#ff8000}.caption.withErrorRightOfCaption{display:flex;justify-content:space-between;gap:2.5rem}.caption.withErrorRightOfCaption .rightOfCaptionError{font-weight:400;overflow:hidden}.caption.withErrorRightOfCaption .rightOfCaptionError *{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.inputContainer{flex:1}.inputContainer.percentageSpacing{flex:0 0 60%}.inputContainer.percentageSpacing.d30-70{flex-basis:70%}.inputContainer.percentageSpacing.d34-66{flex-basis:66%}.errorContainer{color:#ff8000}.errorContainer.hasCaption{margin-left:40%}.errorContainer.hasCaption.d30-70{margin-left:30%}.errorContainer.hasCaption.d34-66{margin-left:34%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormElementComponent, decorators: [{
468
- type: Component,
469
- args: [{ selector: 'klp-form-element', template: "<ng-template #errorRef>\n\t<div *ngIf=\"shouldShowErrorMessages() && getErrorToShow()\" class=\"errorContainer\" [ngClass]=\"{hasCaption: caption || captionRef, 'd30-70': spaceDistribution === '30-70', 'd34-66': spaceDistribution === '34-66'}\">\n\t\t<div *ngIf=\"showDefaultError('min')\">{{substituteParameters(getErrorMessage(\"min\"), {min: attachedControl.errors.min.min})}}</div>\n\t\t<div *ngIf=\"showDefaultError('max')\">{{substituteParameters(getErrorMessage(\"max\"), {max: attachedControl.errors.max.max})}}</div>\n\t\t<div *ngIf=\"showDefaultError('required')\">{{getErrorMessage(\"required\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('email')\">{{getErrorMessage(\"email\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('minlength')\">{{substituteParameters(getErrorMessage(\"minLength\"), {minLength: attachedControl.errors.minlength.requiredLength})}}</div>\n\t\t<div *ngIf=\"showDefaultError('maxlength')\">{{substituteParameters(getErrorMessage(\"maxLength\"), {maxLength: attachedControl.errors.maxlength.requiredLength})}}</div>\n\t\t<div *ngIf=\"showDefaultError('pattern')\">{{getErrorMessage(\"pattern\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('MatchPassword')\">{{getErrorMessage(\"matchPassword\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('date')\">{{getErrorMessage(\"date\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('message')\">{{attachedControl.errors.message.value}}</div>\n\t\t<div [ngTemplateOutlet]=\"getCustomErrorHandler(getErrorToShow())?.templateRef\"></div>\n\t</div>\n</ng-template>\n\n<ng-container *ngIf=\"direction === 'horizontal'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n\n<div class=\"componentContainer\" [ngClass]=\"{hasCaption: caption || captionRef, vertical: direction === 'vertical', reverseOrder: swapInputAndCaption}\" #internalComponentRef>\n\t<div class=\"caption\" *ngIf=\"caption || captionRef\"\n\t\t[ngClass]=\"{\n\t\t\thasErrors: getErrorToShow() && attachedControl.touched,\n\t\t\tpercentageSpacing: captionSpacing === 'percentages',\n\t\t\t'd30-70': spaceDistribution === '30-70',\n\t\t\t'd34-66': spaceDistribution === '34-66',\n\t\t\twithErrorRightOfCaption: getErrorLocation() === 'rightOfCaption'\n\t\t}\"\n\t>\n\t\t<div *ngIf=\"captionRef\" class=\"captionRefContainer\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"captionRef\"></ng-container>\n\t\t\t<div *ngIf=\"isRequired()\">&nbsp;*</div>\n\t\t</div>\n\t\t<div *ngIf=\"!captionRef\">{{caption}}<span *ngIf=\"isRequired()\">&nbsp;*</span></div>\n\t\t<div class=\"rightOfCaptionError\">\n\t\t\t<ng-container *ngIf=\"direction === 'vertical' && getErrorLocation() === 'rightOfCaption'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n\t\t</div>\n\t</div>\n\t<ng-container *ngIf=\"direction === 'vertical' && getErrorLocation() === 'belowCaption'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n\t<div class=\"inputContainer\" [ngClass]=\"{\n\t\tpercentageSpacing: captionSpacing === 'percentages',\n\t\t'd30-70': spaceDistribution === '30-70',\n\t\t'd34-66': spaceDistribution === '34-66'\n\t}\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n", styles: [":host{display:block}.componentContainer{display:flex;align-items:center;min-height:42px}.componentContainer:not(.hasCaption){display:block}.componentContainer:not(.hasCaption) .inputContainer{margin-top:0}.componentContainer.reverseOrder{flex-direction:row-reverse;justify-content:flex-end}.componentContainer.vertical{display:block}.componentContainer.vertical .inputContainer{margin-top:.3125rem}.componentContainer.vertical .errorContainer{margin-left:0}.componentContainer.vertical .caption{padding-right:0}.captionRefContainer{display:flex}.caption{font-weight:700;flex:0 0 auto;padding-right:1.25rem;color:#515365}.caption.percentageSpacing{flex:0 0 40%}.caption.percentageSpacing.d30-70{flex-basis:30%}.caption.percentageSpacing.d34-66{flex-basis:34%}.caption.hasErrors{color:#ff8000}.caption.withErrorRightOfCaption{display:flex;justify-content:space-between;gap:2.5rem}.caption.withErrorRightOfCaption .rightOfCaptionError{font-weight:400;overflow:hidden}.caption.withErrorRightOfCaption .rightOfCaptionError *{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.inputContainer{flex:1}.inputContainer.percentageSpacing{flex:0 0 60%}.inputContainer.percentageSpacing.d30-70{flex-basis:70%}.inputContainer.percentageSpacing.d34-66{flex-basis:66%}.errorContainer{color:#ff8000}.errorContainer.hasCaption{margin-left:40%}.errorContainer.hasCaption.d30-70{margin-left:30%}.errorContainer.hasCaption.d34-66{margin-left:34%}\n"] }]
470
- }], ctorParameters: function () {
471
- return [{ type: FormComponent, decorators: [{
472
- type: Host
473
- }, {
474
- type: Optional
475
- }] }, { type: undefined, decorators: [{
476
- type: Inject,
477
- args: [FORM_ERROR_MESSAGES]
478
- }, {
479
- type: Optional
480
- }] }];
481
- }, propDecorators: { caption: [{
482
- type: Input
483
- }], direction: [{
484
- type: Input
485
- }], captionSpacing: [{
486
- type: Input
487
- }], spaceDistribution: [{
488
- type: Input
489
- }], swapInputAndCaption: [{
490
- type: Input
491
- }], internalComponentRef: [{
492
- type: ViewChild,
493
- args: ['internalComponentRef']
494
- }] } });
495
-
496
- /**
497
- * This component is a base in order to create a component that supports ngModel.
498
- * Some important things to know about it:
499
- *
500
- * innerValue = your own inner state, which you should use to store the current state of what ngModel should be.
501
- * 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!
502
- * setInnerValueAndNotify() = call this when you want your ngModel to be updated from INSIDE of your component, and provide it to the OUTSIDE.
503
- * 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.
504
- */
505
- class ValueAccessorBase {
506
- constructor(parent, controlContainer) {
507
- this.parent = parent;
508
- this.controlContainer = controlContainer;
509
- this.changed = new Array();
510
- this.touched = new Array();
511
- this.prevValue = null;
512
- this.disabled = false;
513
- // we support both providing just the formControlName and the full formControl
514
- this.formControlName = null;
515
- this.formControl = null;
516
- this.onTouch = new EventEmitter();
517
- this.focus = () => {
518
- var _a, _b, _c;
519
- if (isValueSet((_a = this.nativeInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement)) {
520
- (_c = (_b = this.nativeInputRef) === null || _b === void 0 ? void 0 : _b.nativeElement) === null || _c === void 0 ? void 0 : _c.focus();
521
- }
522
- else {
523
- throw new Error('the focus() method is not implemented in this element!');
524
- }
525
- };
526
- }
527
- ngOnInit() {
528
- var _a, _b, _c;
529
- if (this.formControl) {
530
- this.attachedFormControl = this.formControl;
531
- }
532
- else if (stringIsSetAndFilled(this.formControlName)) {
533
- this.attachedFormControl = (_a = this.controlContainer) === null || _a === void 0 ? void 0 : _a.control.get(this.formControlName);
534
- if (isNullOrUndefined(this.attachedFormControl)) {
535
- throw new Error(`Form element '${this.formControlName}' with caption '${(_b = this.parent) === null || _b === void 0 ? void 0 : _b.caption}' is not declared in your FormGroup.`);
536
- }
537
- }
538
- if (this.attachedFormControl) {
539
- this.disabled = this.attachedFormControl.disabled;
540
- this.attachedFormControl.statusChanges.subscribe(() => {
541
- this.disabled = this.attachedFormControl.disabled;
542
- });
543
- (_c = this.parent) === null || _c === void 0 ? void 0 : _c.registerControl(this.attachedFormControl, this);
544
- }
545
- }
546
- isInErrorState() {
547
- return this.attachedFormControl && this.attachedFormControl.status === 'INVALID' && this.attachedFormControl.touched;
548
- }
549
- ngOnDestroy() {
550
- var _a;
551
- if (this.attachedFormControl) {
552
- (_a = this.parent) === null || _a === void 0 ? void 0 : _a.unregisterControl(this.attachedFormControl);
553
- }
554
- }
555
- touch() {
556
- this.touched.forEach((f) => f());
557
- }
558
- writeValue(value) {
559
- this.innerValue = value;
560
- this.prevValue = value;
561
- }
562
- registerOnChange(fn) {
563
- this.changed.push(fn);
564
- }
565
- registerOnTouched(fn) {
566
- this.touched.push(fn);
567
- }
568
- setInnerValueAndNotify(value) {
569
- const actuallySetValue = (valueToSet) => {
570
- this.innerValue = valueToSet;
571
- this.prevValue = valueToSet;
572
- this.changed.forEach((fn) => fn(valueToSet));
573
- };
574
- if (isValueSet(this.innerValueChangeInterceptor)) {
575
- this.latestInnerValueChangedInterceptorPromise = this.innerValueChangeInterceptor(this.prevValue, value);
576
- const myPromise = this.latestInnerValueChangedInterceptorPromise;
577
- this.latestInnerValueChangedInterceptorPromise.then(() => {
578
- if (this.latestInnerValueChangedInterceptorPromise === myPromise) {
579
- actuallySetValue(value);
580
- }
581
- else {
582
- // ignore outdated promises
583
- }
584
- }).catch(() => {
585
- if (this.latestInnerValueChangedInterceptorPromise === myPromise) {
586
- actuallySetValue(this.prevValue);
587
- }
588
- else {
589
- // ignore outdated promises
590
- }
591
- });
592
- }
593
- else {
594
- actuallySetValue(value);
595
- }
596
- }
597
- resetToNull() {
598
- this.setInnerValueAndNotify(null);
599
- }
600
- hasValidator(validatorName) {
601
- var _a, _b, _c;
602
- const validators = Object.keys((_c = (_b = (_a = this.attachedFormControl) === null || _a === void 0 ? void 0 : _a.validator) === null || _b === void 0 ? void 0 : _b.call(_a, {})) !== null && _c !== void 0 ? _c : {});
603
- if (arrayIsSetAndFilled(validators)) {
604
- return validators.includes(validatorName);
605
- }
606
- return false;
607
- }
608
- }
609
- ValueAccessorBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ValueAccessorBase, deps: [{ token: FormElementComponent, host: true, optional: true }, { token: i2.ControlContainer, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
610
- ValueAccessorBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: ValueAccessorBase, selector: "ng-component", inputs: { disabled: "disabled", innerValueChangeInterceptor: "innerValueChangeInterceptor", formControlName: "formControlName", formControl: "formControl" }, outputs: { onTouch: "onTouch" }, viewQueries: [{ propertyName: "nativeInputRef", first: true, predicate: ["nativeInputRef"], descendants: true }], ngImport: i0, template: '', isInline: true });
611
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ValueAccessorBase, decorators: [{
612
- type: Component,
613
- args: [{
614
- selector: '',
615
- template: '',
616
- }]
617
- }], ctorParameters: function () {
618
- return [{ type: FormElementComponent, decorators: [{
619
- type: Host
620
- }, {
621
- type: Optional
622
- }] }, { type: i2.ControlContainer, decorators: [{
623
- type: Host
624
- }, {
625
- type: Optional
626
- }] }];
627
- }, propDecorators: { disabled: [{
628
- type: Input
629
- }], innerValueChangeInterceptor: [{
630
- type: Input
631
- }], formControlName: [{
632
- type: Input
633
- }], formControl: [{
634
- type: Input
635
- }], onTouch: [{
636
- type: Output
637
- }], nativeInputRef: [{
638
- type: ViewChild,
639
- args: ['nativeInputRef']
640
- }] } });
641
-
642
- class LoadingIndicatorComponent {
643
- constructor() {
644
- this.variant = '3dots';
645
- this.size = 'medium';
646
- }
647
- }
648
- LoadingIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: LoadingIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
649
- LoadingIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: LoadingIndicatorComponent, selector: "klp-form-loading-indicator", inputs: { variant: "variant", size: "size" }, ngImport: i0, template: "<div class=\"threeDots\" [ngClass]=\"[size]\" *ngIf=\"variant === '3dots'\">\n\t<div></div>\n\t<div></div>\n\t<div></div>\n\t<div></div>\n</div>\n\n<div class=\"spinner\" [ngClass]=\"[size]\" *ngIf=\"variant === 'spinner'\">\n\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 48 48\">\n\t\t<circle cx=\"24\" cy=\"4\" r=\"4\" fill=\"currentColor\" />\n\t\t<circle cx=\"12.19\" cy=\"7.86\" r=\"3.7\" fill=\"currentColor\" />\n\t\t<circle cx=\"5.02\" cy=\"17.68\" r=\"3.4\" fill=\"currentColor\" />\n\t\t<circle cx=\"5.02\" cy=\"30.32\" r=\"3.1\" fill=\"currentColor\" />\n\t\t<circle cx=\"12.19\" cy=\"40.14\" r=\"2.8\" fill=\"currentColor\" />\n\t\t<circle cx=\"24\" cy=\"44\" r=\"2.5\" fill=\"currentColor\" />\n\t\t<circle cx=\"35.81\" cy=\"40.14\" r=\"2.2\" fill=\"currentColor\" />\n\t\t<circle cx=\"42.98\" cy=\"30.32\" r=\"1.9\" fill=\"currentColor\" />\n\t\t<circle cx=\"42.98\" cy=\"17.68\" r=\"1.6\" fill=\"currentColor\" />\n\t\t<circle cx=\"35.81\" cy=\"7.86\" r=\"1.3\" fill=\"currentColor\" />\n\t</svg>\n</div>\n\n<div class=\"textInput\" *ngIf=\"variant === 'textInput'\">\n\t<input\n\t\tdisabled\n\t\ttype=\"text\"\n\t\tclass=\"form-control\"\n\t\tplaceholder=\"Loading...\"\n\t>\n</div>\n\n<div class=\"picker\" *ngIf=\"variant === 'picker'\">\n\t<input\n\t\tdisabled\n\t\ttype=\"text\"\n\t\tclass=\"form-control\"\n\t\tplaceholder=\"Loading...\"\n\t>\n\t<div class=\"chevronDown\"></div>\n</div>\n", styles: [":host{display:block}.threeDots{display:block;position:relative;width:calc(4 * var(--base));height:var(--base)}.threeDots.tiny{--base: 4px}.threeDots.small{--base: 8px}.threeDots.medium{--base: 12px}.threeDots.large{--base: 18px}.threeDots.huge{--base: 26px}.threeDots div{position:absolute;top:0;width:var(--base);height:var(--base);border-radius:50%;background:#27bb5f;animation-timing-function:cubic-bezier(0,1,1,0)}.threeDots div:nth-child(1){animation:lds-ellipsis1 .6s infinite}.threeDots div:nth-child(2){animation:lds-ellipsis2 .6s infinite}.threeDots div:nth-child(3){left:calc(1.5 * var(--base));animation:lds-ellipsis2 .6s infinite}.threeDots div:nth-child(4){left:calc(3 * var(--base));animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(150%)}}.spinner.tiny svg{width:1rem;height:1rem}.spinner.small svg{width:1.6rem;height:1.6rem}.spinner.medium svg{width:2.5rem;height:2.5rem}.spinner.large svg{width:3rem;height:3rem}.spinner.huge svg{width:4rem;height:4rem}.spinner svg{-webkit-transition-property:-webkit-transform;-webkit-transition-duration:1.2s;-webkit-animation-name:rotate;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear;-moz-transition-property:-moz-transform;-moz-animation-name:rotate;-moz-animation-duration:1.2s;-moz-animation-iteration-count:infinite;-moz-animation-timing-function:linear;transition-property:transform;animation-name:rotate;animation-duration:1.2s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.picker{position:relative}.picker .chevronDown{position:absolute;top:18px;right:23px;width:0;height:0;border-top:5px solid #888da8;border-left:5px solid transparent;border-right:5px solid transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
650
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: LoadingIndicatorComponent, decorators: [{
651
- type: Component,
652
- args: [{ selector: 'klp-form-loading-indicator', template: "<div class=\"threeDots\" [ngClass]=\"[size]\" *ngIf=\"variant === '3dots'\">\n\t<div></div>\n\t<div></div>\n\t<div></div>\n\t<div></div>\n</div>\n\n<div class=\"spinner\" [ngClass]=\"[size]\" *ngIf=\"variant === 'spinner'\">\n\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 48 48\">\n\t\t<circle cx=\"24\" cy=\"4\" r=\"4\" fill=\"currentColor\" />\n\t\t<circle cx=\"12.19\" cy=\"7.86\" r=\"3.7\" fill=\"currentColor\" />\n\t\t<circle cx=\"5.02\" cy=\"17.68\" r=\"3.4\" fill=\"currentColor\" />\n\t\t<circle cx=\"5.02\" cy=\"30.32\" r=\"3.1\" fill=\"currentColor\" />\n\t\t<circle cx=\"12.19\" cy=\"40.14\" r=\"2.8\" fill=\"currentColor\" />\n\t\t<circle cx=\"24\" cy=\"44\" r=\"2.5\" fill=\"currentColor\" />\n\t\t<circle cx=\"35.81\" cy=\"40.14\" r=\"2.2\" fill=\"currentColor\" />\n\t\t<circle cx=\"42.98\" cy=\"30.32\" r=\"1.9\" fill=\"currentColor\" />\n\t\t<circle cx=\"42.98\" cy=\"17.68\" r=\"1.6\" fill=\"currentColor\" />\n\t\t<circle cx=\"35.81\" cy=\"7.86\" r=\"1.3\" fill=\"currentColor\" />\n\t</svg>\n</div>\n\n<div class=\"textInput\" *ngIf=\"variant === 'textInput'\">\n\t<input\n\t\tdisabled\n\t\ttype=\"text\"\n\t\tclass=\"form-control\"\n\t\tplaceholder=\"Loading...\"\n\t>\n</div>\n\n<div class=\"picker\" *ngIf=\"variant === 'picker'\">\n\t<input\n\t\tdisabled\n\t\ttype=\"text\"\n\t\tclass=\"form-control\"\n\t\tplaceholder=\"Loading...\"\n\t>\n\t<div class=\"chevronDown\"></div>\n</div>\n", styles: [":host{display:block}.threeDots{display:block;position:relative;width:calc(4 * var(--base));height:var(--base)}.threeDots.tiny{--base: 4px}.threeDots.small{--base: 8px}.threeDots.medium{--base: 12px}.threeDots.large{--base: 18px}.threeDots.huge{--base: 26px}.threeDots div{position:absolute;top:0;width:var(--base);height:var(--base);border-radius:50%;background:#27bb5f;animation-timing-function:cubic-bezier(0,1,1,0)}.threeDots div:nth-child(1){animation:lds-ellipsis1 .6s infinite}.threeDots div:nth-child(2){animation:lds-ellipsis2 .6s infinite}.threeDots div:nth-child(3){left:calc(1.5 * var(--base));animation:lds-ellipsis2 .6s infinite}.threeDots div:nth-child(4){left:calc(3 * var(--base));animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(150%)}}.spinner.tiny svg{width:1rem;height:1rem}.spinner.small svg{width:1.6rem;height:1.6rem}.spinner.medium svg{width:2.5rem;height:2.5rem}.spinner.large svg{width:3rem;height:3rem}.spinner.huge svg{width:4rem;height:4rem}.spinner svg{-webkit-transition-property:-webkit-transform;-webkit-transition-duration:1.2s;-webkit-animation-name:rotate;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear;-moz-transition-property:-moz-transform;-moz-animation-name:rotate;-moz-animation-duration:1.2s;-moz-animation-iteration-count:infinite;-moz-animation-timing-function:linear;transition-property:transform;animation-name:rotate;animation-duration:1.2s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.picker{position:relative}.picker .chevronDown{position:absolute;top:18px;right:23px;width:0;height:0;border-top:5px solid #888da8;border-left:5px solid transparent;border-right:5px solid transparent}\n"] }]
653
- }], propDecorators: { variant: [{
654
- type: Input
655
- }], size: [{
656
- type: Input
657
- }] } });
658
-
659
- class ButtonComponent {
660
- constructor() {
661
- this.variant = 'white';
662
- this.size = 'medium';
663
- this.fullWidth = false;
664
- this.hasBorder = true;
665
- this.disabled = false;
666
- this.isLoading = false;
667
- this.type = 'button';
668
- }
669
- get _() {
670
- return this.fullWidth;
671
- }
672
- onClick(event) {
673
- return __awaiter(this, void 0, void 0, function* () {
674
- if (this.disabled) {
675
- event.stopPropagation();
676
- return;
677
- }
678
- if (isValueSet(this.clickCallback)) {
679
- this.isLoading = true;
680
- yield this.clickCallback(event).finally(() => {
681
- this.isLoading = false;
682
- });
683
- }
684
- });
685
- }
686
- }
687
- ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
688
- ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: ButtonComponent, selector: "klp-form-button", inputs: { variant: "variant", size: "size", fullWidth: "fullWidth", hasBorder: "hasBorder", disabled: "disabled", isLoading: "isLoading", type: "type", clickCallback: "clickCallback" }, host: { properties: { "class._fullWidth": "this._" } }, ngImport: i0, template: "<button class=\"buttonFundamentals\"\n\t[ngClass]=\"[\n\t\tvariant,\n\t\tsize,\n\t\tfullWidth ? 'fullWidth' : '',\n\t\thasBorder ? '' : 'no-border',\n\t\tdisabled ? 'disabled' : ''\n\t]\"\n\t[type]=\"type\"\n\t(click)=\"onClick($event)\"\n>\n\t<div class=\"caption\" [ngClass]=\"{invisible: isLoading}\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"loadingSpinnerContainer\" *ngIf=\"isLoading\">\n\t\t<klp-form-loading-indicator variant=\"spinner\" size=\"small\"></klp-form-loading-indicator>\n\t</div>\n</button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.buttonFundamentals{cursor:pointer;letter-spacing:1px;font-size:13px;font-weight:700;padding:0 20px;border:1px solid #e6ecf5;border-radius:5px;color:#888da8;height:2.625rem}.buttonFundamentals.disabled{cursor:not-allowed}.buttonFundamentals.tiny{font-size:.75rem;font-weight:400;height:2rem}.buttonFundamentals.large{height:3rem}.fullWidth{width:100%}.no-border{border:none}.caption.invisible{visibility:hidden}button{position:relative}.loadingSpinnerContainer{position:absolute;inset:0;display:flex;justify-content:center;align-items:center}.white{color:#515365;background-color:#fff;border-color:#d4deee;font-weight:500}.white:hover,.white:active{color:#515365;background-color:#edf2f8;border-color:#edf2f8}.white:focus{text-decoration:underline}.greenFilled{background-color:#27bb5f;border-color:#27bb5f;color:#fff}.greenFilled:hover{color:#fff;background-color:#2bd06a;border-color:#2bd06a}.greenFilled:focus{text-decoration:underline}.greenFilled:active{background-color:#23a654;border-color:#23a654}.greenOutlined{background-color:#fff;border-color:#27bb5f;color:#27bb5f}.greenOutlined:hover{color:#fff;background-color:#2bd06a;border-color:#2bd06a}.greenOutlined:focus{text-decoration:underline}.greenOutlined:active{background-color:#23a654;border-color:#23a654}.greenLink{color:#27bb5f;border:none;background:none;padding:0}.greenLink:hover,.greenLink:focus{text-decoration:underline}.contextMenuItem{color:#888da8;background-color:#fff;border-color:#fff}.contextMenuItem:hover{background-color:#f6f7fb;border-color:#f6f7fb}.contextMenuItem:focus,.contextMenuItem:active{text-decoration:underline}.redFilled{color:#fff;background-color:#dc3545;border-color:#dc3545}.redFilled:hover{color:#fff;background-color:#e04b59;border-color:#e04b59}.redFilled:focus{text-decoration:underline}.redFilled:active{background-color:#d32535;border-color:#d32535}.redOutlined{color:#dc3545;background-color:#fff;border-color:#dc3545}.redOutlined:hover{color:#fff;background-color:#e04b59;border-color:#e04b59}.redOutlined:focus{text-decoration:underline}.redOutlined:active{background-color:#d32535;border-color:#d32535}.orangeFilled{color:#fff;background-color:#ff8000;border-color:#ff8000}.orangeFilled:hover{color:#fff;background-color:#ff8d1a;border-color:#ff8d1a}.orangeFilled:focus{text-decoration:underline}.orangeFilled:active{background-color:#e67300;border-color:#e67300}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoadingIndicatorComponent, selector: "klp-form-loading-indicator", inputs: ["variant", "size"] }] });
689
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ButtonComponent, decorators: [{
690
- type: Component,
691
- args: [{ selector: 'klp-form-button', template: "<button class=\"buttonFundamentals\"\n\t[ngClass]=\"[\n\t\tvariant,\n\t\tsize,\n\t\tfullWidth ? 'fullWidth' : '',\n\t\thasBorder ? '' : 'no-border',\n\t\tdisabled ? 'disabled' : ''\n\t]\"\n\t[type]=\"type\"\n\t(click)=\"onClick($event)\"\n>\n\t<div class=\"caption\" [ngClass]=\"{invisible: isLoading}\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"loadingSpinnerContainer\" *ngIf=\"isLoading\">\n\t\t<klp-form-loading-indicator variant=\"spinner\" size=\"small\"></klp-form-loading-indicator>\n\t</div>\n</button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.buttonFundamentals{cursor:pointer;letter-spacing:1px;font-size:13px;font-weight:700;padding:0 20px;border:1px solid #e6ecf5;border-radius:5px;color:#888da8;height:2.625rem}.buttonFundamentals.disabled{cursor:not-allowed}.buttonFundamentals.tiny{font-size:.75rem;font-weight:400;height:2rem}.buttonFundamentals.large{height:3rem}.fullWidth{width:100%}.no-border{border:none}.caption.invisible{visibility:hidden}button{position:relative}.loadingSpinnerContainer{position:absolute;inset:0;display:flex;justify-content:center;align-items:center}.white{color:#515365;background-color:#fff;border-color:#d4deee;font-weight:500}.white:hover,.white:active{color:#515365;background-color:#edf2f8;border-color:#edf2f8}.white:focus{text-decoration:underline}.greenFilled{background-color:#27bb5f;border-color:#27bb5f;color:#fff}.greenFilled:hover{color:#fff;background-color:#2bd06a;border-color:#2bd06a}.greenFilled:focus{text-decoration:underline}.greenFilled:active{background-color:#23a654;border-color:#23a654}.greenOutlined{background-color:#fff;border-color:#27bb5f;color:#27bb5f}.greenOutlined:hover{color:#fff;background-color:#2bd06a;border-color:#2bd06a}.greenOutlined:focus{text-decoration:underline}.greenOutlined:active{background-color:#23a654;border-color:#23a654}.greenLink{color:#27bb5f;border:none;background:none;padding:0}.greenLink:hover,.greenLink:focus{text-decoration:underline}.contextMenuItem{color:#888da8;background-color:#fff;border-color:#fff}.contextMenuItem:hover{background-color:#f6f7fb;border-color:#f6f7fb}.contextMenuItem:focus,.contextMenuItem:active{text-decoration:underline}.redFilled{color:#fff;background-color:#dc3545;border-color:#dc3545}.redFilled:hover{color:#fff;background-color:#e04b59;border-color:#e04b59}.redFilled:focus{text-decoration:underline}.redFilled:active{background-color:#d32535;border-color:#d32535}.redOutlined{color:#dc3545;background-color:#fff;border-color:#dc3545}.redOutlined:hover{color:#fff;background-color:#e04b59;border-color:#e04b59}.redOutlined:focus{text-decoration:underline}.redOutlined:active{background-color:#d32535;border-color:#d32535}.orangeFilled{color:#fff;background-color:#ff8000;border-color:#ff8000}.orangeFilled:hover{color:#fff;background-color:#ff8d1a;border-color:#ff8d1a}.orangeFilled:focus{text-decoration:underline}.orangeFilled:active{background-color:#e67300;border-color:#e67300}\n"] }]
692
- }], propDecorators: { variant: [{
693
- type: Input
694
- }], size: [{
695
- type: Input
696
- }], fullWidth: [{
697
- type: Input
698
- }], hasBorder: [{
699
- type: Input
700
- }], disabled: [{
701
- type: Input
702
- }], isLoading: [{
703
- type: Input
704
- }], type: [{
705
- type: Input
706
- }], clickCallback: [{
707
- type: Input
708
- }], _: [{
709
- type: HostBinding,
710
- args: ['class._fullWidth']
711
- }] } });
712
-
713
- class CheckboxComponent extends ValueAccessorBase {
714
- constructor() {
715
- super(...arguments);
716
- this.renderUndefinedAsIndeterminate = false;
717
- }
718
- }
719
- CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
720
- CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: CheckboxComponent, selector: "klp-form-checkbox", inputs: { caption: "caption", renderUndefinedAsIndeterminate: "renderUndefinedAsIndeterminate" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"componentContainer\">\n\t<div class=\"checkboxContainer\">\n\t\t<input type=\"checkbox\" class=\"checkboxNative\"\n\t\t\t[(ngModel)]=\"innerValue\"\n\t\t\t(change)=\"setInnerValueAndNotify(innerValue); touch()\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t#nativeInputRef\n\t\t/>\n <div class=\"checkboxVisual\">\n <svg *ngIf=\"innerValue === true\" version=\"1.1\" viewBox=\"0 0 4.2333 4.2333\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m0.17014 2.7065 1.3073 1.1798 2.5656-3.7404\" stroke=\"currentColor\" fill=\"none\" stroke-width=\".4646px\" />\n </svg>\n\t\t\t<svg *ngIf=\"renderUndefinedAsIndeterminate && innerValue === undefined\" version=\"1.1\" viewBox=\"0 0 4.2333 4.2333\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t<path d=\"m0.5 2.11665 3.2333 0\" stroke=\"currentColor\" fill=\"none\" stroke-width=\".4646px\" />\n\t\t\t</svg>\n </div>\n\t</div>\n\t<div *ngIf=\"caption\" class=\"caption\">{{ caption }}</div>\n</label>\n", styles: [":host{display:block}.componentContainer{display:flex;margin-bottom:0}.checkboxContainer{position:relative}.caption{cursor:pointer;font-weight:700;color:#888da8}.checkboxNative{position:absolute;opacity:0;top:0;left:0;width:22px;height:22px;cursor:pointer}.checkboxVisual{pointer-events:none;color:#27bb5f;padding:.125rem;width:22px;height:22px;display:inline-block;border:2px solid #e6ecf5;border-radius:3px;margin-right:10px;font-size:15px;font-weight:400;line-height:19px;vertical-align:bottom;text-align:center;background-color:#fff;cursor:pointer}.checkboxNative[disabled]{cursor:not-allowed}.checkboxNative[disabled]+.checkboxVisual:before{color:#666}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
721
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: CheckboxComponent, decorators: [{
722
- type: Component,
723
- args: [{ selector: 'klp-form-checkbox', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], template: "<label class=\"componentContainer\">\n\t<div class=\"checkboxContainer\">\n\t\t<input type=\"checkbox\" class=\"checkboxNative\"\n\t\t\t[(ngModel)]=\"innerValue\"\n\t\t\t(change)=\"setInnerValueAndNotify(innerValue); touch()\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t#nativeInputRef\n\t\t/>\n <div class=\"checkboxVisual\">\n <svg *ngIf=\"innerValue === true\" version=\"1.1\" viewBox=\"0 0 4.2333 4.2333\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m0.17014 2.7065 1.3073 1.1798 2.5656-3.7404\" stroke=\"currentColor\" fill=\"none\" stroke-width=\".4646px\" />\n </svg>\n\t\t\t<svg *ngIf=\"renderUndefinedAsIndeterminate && innerValue === undefined\" version=\"1.1\" viewBox=\"0 0 4.2333 4.2333\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t<path d=\"m0.5 2.11665 3.2333 0\" stroke=\"currentColor\" fill=\"none\" stroke-width=\".4646px\" />\n\t\t\t</svg>\n </div>\n\t</div>\n\t<div *ngIf=\"caption\" class=\"caption\">{{ caption }}</div>\n</label>\n", styles: [":host{display:block}.componentContainer{display:flex;margin-bottom:0}.checkboxContainer{position:relative}.caption{cursor:pointer;font-weight:700;color:#888da8}.checkboxNative{position:absolute;opacity:0;top:0;left:0;width:22px;height:22px;cursor:pointer}.checkboxVisual{pointer-events:none;color:#27bb5f;padding:.125rem;width:22px;height:22px;display:inline-block;border:2px solid #e6ecf5;border-radius:3px;margin-right:10px;font-size:15px;font-weight:400;line-height:19px;vertical-align:bottom;text-align:center;background-color:#fff;cursor:pointer}.checkboxNative[disabled]{cursor:not-allowed}.checkboxNative[disabled]+.checkboxVisual:before{color:#666}\n"] }]
724
- }], propDecorators: { caption: [{
725
- type: Input
726
- }], renderUndefinedAsIndeterminate: [{
727
- type: Input
728
- }] } });
729
-
730
- class EmailInputComponent extends ValueAccessorBase {
731
- constructor() {
732
- super(...arguments);
733
- this.placeholder = '';
734
- }
735
- }
736
- EmailInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: EmailInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
737
- EmailInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: EmailInputComponent, selector: "klp-form-email-input", inputs: { placeholder: "placeholder" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: EmailInputComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<input\n\ttype=\"email\"\n\tclass=\"form-control\"\n\t[(ngModel)]=\"innerValue\"\n\t(input)=\"setInnerValueAndNotify($event.target.value)\"\n\t[placeholder]=\"placeholder\"\n\t(blur)=\"touch()\"\n\t[disabled]=\"disabled\"\n\t#nativeInputRef\n/>\n", styles: [":host{display:block}input{outline:none;display:block;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;height:42px;width:100%;padding:.375rem .625rem;font-size:14px;color:#888da8;transition:all .2s ease-in;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder{color:#adadad}input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{outline:0 none;box-shadow:none;border-color:#3ed778}input.input-sm{height:30px}input.input-lg{height:50px}input.error{border-color:#dc3545;background-color:#f6cdd1}input.valid{border-color:#37c936;background-color:#ebfaeb;color:#278d26}.showErrors{border-color:#ff8000}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
738
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: EmailInputComponent, decorators: [{
739
- type: Component,
740
- args: [{ selector: 'klp-form-email-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: EmailInputComponent, multi: true }], template: "<input\n\ttype=\"email\"\n\tclass=\"form-control\"\n\t[(ngModel)]=\"innerValue\"\n\t(input)=\"setInnerValueAndNotify($event.target.value)\"\n\t[placeholder]=\"placeholder\"\n\t(blur)=\"touch()\"\n\t[disabled]=\"disabled\"\n\t#nativeInputRef\n/>\n", styles: [":host{display:block}input{outline:none;display:block;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;height:42px;width:100%;padding:.375rem .625rem;font-size:14px;color:#888da8;transition:all .2s ease-in;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder{color:#adadad}input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{outline:0 none;box-shadow:none;border-color:#3ed778}input.input-sm{height:30px}input.input-lg{height:50px}input.error{border-color:#dc3545;background-color:#f6cdd1}input.valid{border-color:#37c936;background-color:#ebfaeb;color:#278d26}.showErrors{border-color:#ff8000}\n"] }]
741
- }], propDecorators: { placeholder: [{
742
- type: Input
743
- }] } });
744
-
745
- class NumberInputComponent extends ValueAccessorBase {
746
- constructor() {
747
- super(...arguments);
748
- this.parseNumber = false;
749
- }
750
- setInnerValueAndNotify(value) {
751
- if (this.parseNumber && typeof value === "string") {
752
- super.setInnerValueAndNotify(Number(value));
753
- }
754
- else {
755
- super.setInnerValueAndNotify(value);
756
- }
757
- }
758
- }
759
- NumberInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: NumberInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
760
- NumberInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: NumberInputComponent, selector: "klp-form-number-input", inputs: { placeholder: "placeholder", parseNumber: "parseNumber" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: NumberInputComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<input\n\ttype=\"number\"\n\tclass=\"form-control\"\n\t[(ngModel)]=\"innerValue\"\n\t(input)=\"setInnerValueAndNotify($event.target.value)\"\n\t[placeholder]=\"placeholder ? placeholder : ''\"\n\t[ngClass]=\"{showErrors: isInErrorState()}\"\n\t[disabled]=\"disabled\"\n\t#nativeInputRef\n/>\n", styles: [":host{display:block}input{outline:none;display:block;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;height:42px;width:100%;padding:.375rem .625rem;font-size:14px;color:#888da8;transition:all .2s ease-in;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder{color:#adadad}input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{outline:0 none;box-shadow:none;border-color:#3ed778}input.input-sm{height:30px}input.input-lg{height:50px}input.error{border-color:#dc3545;background-color:#f6cdd1}input.valid{border-color:#37c936;background-color:#ebfaeb;color:#278d26}.showErrors{border-color:#ff8000}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
761
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: NumberInputComponent, decorators: [{
762
- type: Component,
763
- args: [{ selector: 'klp-form-number-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: NumberInputComponent, multi: true }], template: "<input\n\ttype=\"number\"\n\tclass=\"form-control\"\n\t[(ngModel)]=\"innerValue\"\n\t(input)=\"setInnerValueAndNotify($event.target.value)\"\n\t[placeholder]=\"placeholder ? placeholder : ''\"\n\t[ngClass]=\"{showErrors: isInErrorState()}\"\n\t[disabled]=\"disabled\"\n\t#nativeInputRef\n/>\n", styles: [":host{display:block}input{outline:none;display:block;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;height:42px;width:100%;padding:.375rem .625rem;font-size:14px;color:#888da8;transition:all .2s ease-in;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder{color:#adadad}input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{outline:0 none;box-shadow:none;border-color:#3ed778}input.input-sm{height:30px}input.input-lg{height:50px}input.error{border-color:#dc3545;background-color:#f6cdd1}input.valid{border-color:#37c936;background-color:#ebfaeb;color:#278d26}.showErrors{border-color:#ff8000}\n"] }]
764
- }], propDecorators: { placeholder: [{
765
- type: Input
766
- }], parseNumber: [{
767
- type: Input
768
- }] } });
769
-
770
- class PasswordFieldComponent extends ValueAccessorBase {
771
- constructor() {
772
- super(...arguments);
773
- this.placeholder = 'Password';
774
- }
775
- }
776
- PasswordFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: PasswordFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
777
- PasswordFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: PasswordFieldComponent, selector: "klp-form-password-field", inputs: { placeholder: "placeholder" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: PasswordFieldComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<input\n\ttype=\"password\"\n\tclass=\"form-control\"\n [ngClass]=\"{showErrors: isInErrorState()}\"\n\t[(ngModel)]=\"innerValue\"\n\t(input)=\"setInnerValueAndNotify($event.target.value)\"\n\t[placeholder]=\"placeholder\"\n\t(blur)=\"touch()\"\n\t[disabled]=\"disabled\"\n\t#nativeInputRef\n/>\n", styles: [":host{display:block}input{outline:none;display:block;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;height:42px;width:100%;padding:.375rem .625rem;font-size:14px;color:#888da8;transition:all .2s ease-in;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder{color:#adadad}input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{outline:0 none;box-shadow:none;border-color:#3ed778}input.input-sm{height:30px}input.input-lg{height:50px}input.error{border-color:#dc3545;background-color:#f6cdd1}input.valid{border-color:#37c936;background-color:#ebfaeb;color:#278d26}.showErrors{border-color:#ff8000}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
778
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: PasswordFieldComponent, decorators: [{
779
- type: Component,
780
- args: [{ selector: 'klp-form-password-field', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: PasswordFieldComponent, multi: true }], template: "<input\n\ttype=\"password\"\n\tclass=\"form-control\"\n [ngClass]=\"{showErrors: isInErrorState()}\"\n\t[(ngModel)]=\"innerValue\"\n\t(input)=\"setInnerValueAndNotify($event.target.value)\"\n\t[placeholder]=\"placeholder\"\n\t(blur)=\"touch()\"\n\t[disabled]=\"disabled\"\n\t#nativeInputRef\n/>\n", styles: [":host{display:block}input{outline:none;display:block;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;height:42px;width:100%;padding:.375rem .625rem;font-size:14px;color:#888da8;transition:all .2s ease-in;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder{color:#adadad}input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{outline:0 none;box-shadow:none;border-color:#3ed778}input.input-sm{height:30px}input.input-lg{height:50px}input.error{border-color:#dc3545;background-color:#f6cdd1}input.valid{border-color:#37c936;background-color:#ebfaeb;color:#278d26}.showErrors{border-color:#ff8000}\n"] }]
781
- }], propDecorators: { placeholder: [{
782
- type: Input
783
- }] } });
784
-
785
- const SELECT_TRANSLATIONS = new InjectionToken('klp.form.select.translations');
786
- class KlpSelectOptionTemplateDirective {
787
- }
788
- KlpSelectOptionTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KlpSelectOptionTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
789
- KlpSelectOptionTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: KlpSelectOptionTemplateDirective, selector: "[klpSelectOptionTpl]", ngImport: i0 });
790
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KlpSelectOptionTemplateDirective, decorators: [{
791
- type: Directive,
792
- args: [{ selector: '[klpSelectOptionTpl]' }]
793
- }] });
794
- class SelectComponent extends ValueAccessorBase {
795
- constructor(parent, controlContainer, translations, elRef) {
796
- super(parent, controlContainer);
797
- this.parent = parent;
798
- this.controlContainer = controlContainer;
799
- this.translations = translations;
800
- this.elRef = elRef;
801
- this.orientation = 'horizontal';
802
- this.multiple = false;
803
- this.multipleDisplayedAsAmount = false;
804
- this.clearable = true;
805
- this.truncateOptions = true;
806
- this.onSearch = new EventEmitter();
807
- this.onEndReached = new EventEmitter();
808
- this.onOpened = new EventEmitter();
809
- this.onBlur = new EventEmitter();
810
- this.onClear = new EventEmitter();
811
- this.lastItemIndexReached = -1;
812
- this.focus = () => {
813
- this.ngSelect.focus();
814
- };
815
- }
816
- ngOnChanges(changes) {
817
- if (isValueSet(changes.options)) {
818
- this.lastItemIndexReached = -1;
819
- }
820
- }
821
- getDefaultTranslation(key) {
822
- switch (key) {
823
- case 'placeholder':
824
- return () => 'Pick an option';
825
- case 'amountSelected':
826
- return (amount) => `${amount} selected`;
827
- }
828
- }
829
- getTranslation(key, params = null) {
830
- var _a, _b, _c;
831
- if (key === 'placeholder' && stringIsSetAndFilled(this.placeholder)) {
832
- return this.placeholder;
833
- }
834
- return (_c = (_b = (_a = this.translations) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.call(_a, params)) !== null && _c !== void 0 ? _c : this.getDefaultTranslation(key)(params);
835
- }
836
- onScroll(lastItemIndex) {
837
- var _a, _b, _c, _d;
838
- const visibleItems = (_d = (_c = (_b = (_a = this.ngSelect) === null || _a === void 0 ? void 0 : _a.itemsList) === null || _b === void 0 ? void 0 : _b.filteredItems) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0;
839
- if (this.lastItemIndexReached < lastItemIndex && lastItemIndex === visibleItems) {
840
- this.onEndReached.emit();
841
- }
842
- this.lastItemIndexReached = Math.max(lastItemIndex, this.lastItemIndexReached);
843
- }
844
- searchQueryChanged(searchQuery) {
845
- this.onSearch.emit(searchQuery);
846
- }
847
- onOpen() {
848
- // waiting for the thing to render until we fire the event
849
- setTimeout(() => {
850
- this.onOpened.emit();
851
- if (this.truncateOptions === false) {
852
- const widths = Array.from(this.elRef.nativeElement.querySelectorAll('.ng-option div')).map((e) => e.scrollWidth);
853
- const maxWidth = Math.max(...widths);
854
- const dropdownPanel = this.elRef.nativeElement.querySelector('ng-dropdown-panel');
855
- dropdownPanel.style.width = `${maxWidth + 40}px`;
856
- }
857
- });
858
- }
859
- }
860
- SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SelectComponent, deps: [{ token: FormElementComponent, host: true, optional: true }, { token: i2.ControlContainer, host: true, optional: true }, { token: SELECT_TRANSLATIONS, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
861
- SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: SelectComponent, selector: "klp-form-select", inputs: { placeholder: "placeholder", orientation: "orientation", options: "options", multiple: "multiple", multipleDisplayedAsAmount: "multipleDisplayedAsAmount", clearable: "clearable", truncateOptions: "truncateOptions", dropdownPosition: "dropdownPosition", customSearchFn: "customSearchFn", footerElement: "footerElement" }, outputs: { onSearch: "onSearch", onEndReached: "onEndReached", onOpened: "onOpened", onBlur: "onBlur", onClear: "onClear" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }], queries: [{ propertyName: "customOptionTpl", first: true, predicate: KlpSelectOptionTemplateDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "ngSelect", first: true, predicate: ["ngSelect"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-select\n\t#ngSelect\n\t[placeholder]=\"getTranslation('placeholder')\"\n\tbindLabel=\"name\"\n\tbindValue=\"id\"\n\t[items]=\"options\"\n\t[clearable]=\"clearable\"\n\t[(ngModel)]=\"innerValue\"\n\t[ngClass]=\"{showErrors: isInErrorState(), verticalOrientation: orientation === 'vertical'}\"\n\t(change)=\"setInnerValueAndNotify(innerValue)\"\n\t[multiple]=\"multiple\"\n\t[disabled]=\"disabled\"\n\t(blur)=\"touch(); onBlur.emit()\"\n\t(clear)=\"onClear.emit()\"\n\t(search)=\"searchQueryChanged($event.term)\"\n\t[dropdownPosition]=\"dropdownPosition\"\n\t[searchFn]=\"customSearchFn\"\n\t[selectOnTab]=\"true\"\n\t[virtualScroll]=\"true\"\n\t(scroll)=\"onScroll($event.end)\"\n\t(open)=\"onOpen()\"\n>\n\t<ng-template let-item=\"item\" ng-option-tmp>\n\t\t<ng-container *ngIf=\"customOptionTpl\" [ngTemplateOutlet]=\"customOptionTpl\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n\t\t<div [attr.data-cy]=\"item.id\" *ngIf=\"!customOptionTpl\">\n\t\t\t{{ item.name }}\n\t\t\t<div *ngIf=\"item.description\" class=\"dropdown-item-description\">\n\t\t\t\t{{ item.description }}\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\t<ng-container *ngIf=\"multiple && multipleDisplayedAsAmount && innerValue?.length > 1\">\n\t\t<ng-template ng-multi-label-tmp>\n\t\t\t<div class=\"ng-value\">\n\t\t\t\t<span class=\"ng-value-label\">{{getTranslation('amountSelected', innerValue?.length)}}</span>\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-container>\n\t<ng-template ng-footer-tmp *ngIf=\"footerElement\">\n\t\t<ng-container [ngTemplateOutlet]=\"footerElement\"></ng-container>\n\t</ng-template>\n</ng-select>\n", styles: [":host{display:block}ng-select.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{top:-2px;border-color:transparent transparent #999;border-width:0 5px 5px}: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-right-radius:0;border-bottom-left-radius:0}:host ::ng-deep .ng-select.ng-select-opened.ng-select-top>.ng-select-container{border-top-right-radius:0;border-top-left-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-placeholder,:host ::ng-deep .ng-value{width:0px;flex-grow:1;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ng-select .ng-select-container{display:flex;flex-direction:row;border:1px solid #ccc;min-height:42px;align-items:center;background-clip:padding-box;background-color:#fff;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;box-sizing:border-box;color:#888da8;font-size:1rem;font-size:14px;line-height:1.5;margin:0;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 #0000000f}:host ::ng-deep .ng-select .ng-select-container .ng-value-container{align-items:center;padding-left:10px;overflow:hidden}: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 .ng-value{font-size:.9em;margin-right:5px;margin-top:3px;margin-bottom:3px;background-color:#e7faee;border-radius:2px;border:1px solid #93e8b3;display:flex;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;padding:0 5px;overflow:hidden;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{top:5px;padding-bottom:3px;padding-left:3px;position:static}:host ::ng-deep .ng-select .ng-clear-wrapper{color:#999}:host ::ng-deep .ng-select .ng-clear-wrapper .ng-clear:hover{color:#dc3545}: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 #0000000f}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom{top:100%;border-bottom-right-radius:4px;border-bottom-left-radius:4px;border-top-color:#e6e6e6;margin-top:-1px}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom .ng-dropdown-panel-items .ng-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}:host ::ng-deep .ng-dropdown-panel.ng-select-top{bottom:100%;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-color:#e6e6e6;margin-bottom:-1px}:host ::ng-deep .ng-dropdown-panel.ng-select-top .ng-dropdown-panel-items .ng-option:first-child{border-top-right-radius:4px;border-top-left-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{-webkit-user-select:none;user-select:none;cursor:default;padding:8px 10px;font-weight:500;color:#0000008a;cursor:pointer}: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:#000000de;padding:8px 10px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected{color:#333;background-color:#e7faee}: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{padding-right:5px;font-size:80%;font-weight:400}: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{top:9px;color:#888da8}:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-input>input{color:#888da8}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{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}.verticalOrientation{transform:translateY(100%) rotate(-90deg);transform-origin:top left}.verticalOrientation ::ng-deep ng-dropdown-panel.ng-select-bottom{transform:rotate(90deg) translate(100%);transform-origin:top right;border-top-color:#3ed778;border-bottom-right-radius:2px;border-bottom-left-radius:0;border-top-right-radius:2px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i4.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i4.NgMultiLabelTemplateDirective, selector: "[ng-multi-label-tmp]" }, { kind: "directive", type: i4.NgFooterTemplateDirective, selector: "[ng-footer-tmp]" }] });
862
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SelectComponent, decorators: [{
863
- type: Component,
864
- args: [{ selector: 'klp-form-select', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }], template: "<ng-select\n\t#ngSelect\n\t[placeholder]=\"getTranslation('placeholder')\"\n\tbindLabel=\"name\"\n\tbindValue=\"id\"\n\t[items]=\"options\"\n\t[clearable]=\"clearable\"\n\t[(ngModel)]=\"innerValue\"\n\t[ngClass]=\"{showErrors: isInErrorState(), verticalOrientation: orientation === 'vertical'}\"\n\t(change)=\"setInnerValueAndNotify(innerValue)\"\n\t[multiple]=\"multiple\"\n\t[disabled]=\"disabled\"\n\t(blur)=\"touch(); onBlur.emit()\"\n\t(clear)=\"onClear.emit()\"\n\t(search)=\"searchQueryChanged($event.term)\"\n\t[dropdownPosition]=\"dropdownPosition\"\n\t[searchFn]=\"customSearchFn\"\n\t[selectOnTab]=\"true\"\n\t[virtualScroll]=\"true\"\n\t(scroll)=\"onScroll($event.end)\"\n\t(open)=\"onOpen()\"\n>\n\t<ng-template let-item=\"item\" ng-option-tmp>\n\t\t<ng-container *ngIf=\"customOptionTpl\" [ngTemplateOutlet]=\"customOptionTpl\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n\t\t<div [attr.data-cy]=\"item.id\" *ngIf=\"!customOptionTpl\">\n\t\t\t{{ item.name }}\n\t\t\t<div *ngIf=\"item.description\" class=\"dropdown-item-description\">\n\t\t\t\t{{ item.description }}\n\t\t\t</div>\n\t\t</div>\n\t</ng-template>\n\t<ng-container *ngIf=\"multiple && multipleDisplayedAsAmount && innerValue?.length > 1\">\n\t\t<ng-template ng-multi-label-tmp>\n\t\t\t<div class=\"ng-value\">\n\t\t\t\t<span class=\"ng-value-label\">{{getTranslation('amountSelected', innerValue?.length)}}</span>\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-container>\n\t<ng-template ng-footer-tmp *ngIf=\"footerElement\">\n\t\t<ng-container [ngTemplateOutlet]=\"footerElement\"></ng-container>\n\t</ng-template>\n</ng-select>\n", styles: [":host{display:block}ng-select.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{top:-2px;border-color:transparent transparent #999;border-width:0 5px 5px}: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-right-radius:0;border-bottom-left-radius:0}:host ::ng-deep .ng-select.ng-select-opened.ng-select-top>.ng-select-container{border-top-right-radius:0;border-top-left-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-placeholder,:host ::ng-deep .ng-value{width:0px;flex-grow:1;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ng-select .ng-select-container{display:flex;flex-direction:row;border:1px solid #ccc;min-height:42px;align-items:center;background-clip:padding-box;background-color:#fff;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;box-sizing:border-box;color:#888da8;font-size:1rem;font-size:14px;line-height:1.5;margin:0;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 #0000000f}:host ::ng-deep .ng-select .ng-select-container .ng-value-container{align-items:center;padding-left:10px;overflow:hidden}: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 .ng-value{font-size:.9em;margin-right:5px;margin-top:3px;margin-bottom:3px;background-color:#e7faee;border-radius:2px;border:1px solid #93e8b3;display:flex;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;padding:0 5px;overflow:hidden;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{top:5px;padding-bottom:3px;padding-left:3px;position:static}:host ::ng-deep .ng-select .ng-clear-wrapper{color:#999}:host ::ng-deep .ng-select .ng-clear-wrapper .ng-clear:hover{color:#dc3545}: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 #0000000f}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom{top:100%;border-bottom-right-radius:4px;border-bottom-left-radius:4px;border-top-color:#e6e6e6;margin-top:-1px}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom .ng-dropdown-panel-items .ng-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}:host ::ng-deep .ng-dropdown-panel.ng-select-top{bottom:100%;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-color:#e6e6e6;margin-bottom:-1px}:host ::ng-deep .ng-dropdown-panel.ng-select-top .ng-dropdown-panel-items .ng-option:first-child{border-top-right-radius:4px;border-top-left-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{-webkit-user-select:none;user-select:none;cursor:default;padding:8px 10px;font-weight:500;color:#0000008a;cursor:pointer}: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:#000000de;padding:8px 10px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected{color:#333;background-color:#e7faee}: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{padding-right:5px;font-size:80%;font-weight:400}: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{top:9px;color:#888da8}:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-input>input{color:#888da8}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{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}.verticalOrientation{transform:translateY(100%) rotate(-90deg);transform-origin:top left}.verticalOrientation ::ng-deep ng-dropdown-panel.ng-select-bottom{transform:rotate(90deg) translate(100%);transform-origin:top right;border-top-color:#3ed778;border-bottom-right-radius:2px;border-bottom-left-radius:0;border-top-right-radius:2px}\n"] }]
865
- }], ctorParameters: function () {
866
- return [{ type: FormElementComponent, decorators: [{
867
- type: Optional
868
- }, {
869
- type: Host
870
- }] }, { type: i2.ControlContainer, decorators: [{
871
- type: Optional
872
- }, {
873
- type: Host
874
- }] }, { type: undefined, decorators: [{
875
- type: Inject,
876
- args: [SELECT_TRANSLATIONS]
877
- }, {
878
- type: Optional
879
- }] }, { type: i0.ElementRef }];
880
- }, propDecorators: { placeholder: [{
881
- type: Input
882
- }], orientation: [{
883
- type: Input
884
- }], options: [{
885
- type: Input
886
- }], multiple: [{
887
- type: Input
888
- }], multipleDisplayedAsAmount: [{
889
- type: Input
890
- }], clearable: [{
891
- type: Input
892
- }], truncateOptions: [{
893
- type: Input
894
- }], dropdownPosition: [{
895
- type: Input
896
- }], customSearchFn: [{
897
- type: Input
898
- }], footerElement: [{
899
- type: Input
900
- }], onSearch: [{
901
- type: Output
902
- }], onEndReached: [{
903
- type: Output
904
- }], onOpened: [{
905
- type: Output
906
- }], onBlur: [{
907
- type: Output
908
- }], onClear: [{
909
- type: Output
910
- }], ngSelect: [{
911
- type: ViewChild,
912
- args: ['ngSelect']
913
- }], customOptionTpl: [{
914
- type: ContentChild,
915
- args: [KlpSelectOptionTemplateDirective, { read: TemplateRef }]
916
- }] } });
917
-
918
- class SelectFooterComponent {
919
- }
920
- SelectFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SelectFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
921
- SelectFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: SelectFooterComponent, selector: "klp-select-footer", inputs: { prefix: "prefix", text: "text" }, ngImport: i0, template: "<div class=\"componentContainer\">\n\t<span class=\"prefix\">{{prefix}}</span>\n\t<span class=\"text\">{{text}}</span>\n</div>\n", styles: [":host{display:block}.componentContainer{cursor:pointer;padding:6px 10px}.componentContainer:hover{background:#e7faee}.prefix{font-size:80%;padding-right:.625rem}\n"] });
922
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SelectFooterComponent, decorators: [{
923
- type: Component,
924
- args: [{ selector: 'klp-select-footer', template: "<div class=\"componentContainer\">\n\t<span class=\"prefix\">{{prefix}}</span>\n\t<span class=\"text\">{{text}}</span>\n</div>\n", styles: [":host{display:block}.componentContainer{cursor:pointer;padding:6px 10px}.componentContainer:hover{background:#e7faee}.prefix{font-size:80%;padding-right:.625rem}\n"] }]
925
- }], propDecorators: { prefix: [{
926
- type: Input
927
- }], text: [{
928
- type: Input
929
- }] } });
930
-
931
- class SortableItemsComponent extends ValueAccessorBase {
932
- constructor() {
933
- super(...arguments);
934
- this.sortableItemSize = 'lg';
935
- this.useCustomScroll = false;
936
- this.scrollInterval = null;
937
- this.itemsOrderChanged = () => {
938
- this.setInnerValueAndNotify(this.innerValue);
939
- };
940
- this.onItemDrag = (data) => {
941
- // if the item you're dragging is reaching the top, start scrolling.
942
- if (data.relatedRect.top < 100) {
943
- this.scrollPage(100);
944
- }
945
- else {
946
- this.stopScrolling();
947
- }
948
- };
949
- this.onEnd = () => {
950
- this.stopScrolling();
951
- };
952
- }
953
- ngOnInit() {
954
- super.ngOnInit();
955
- if (this.useCustomScroll) {
956
- this.sortablejsOptions = { onUpdate: this.itemsOrderChanged, onMove: this.onItemDrag, onEnd: this.onEnd };
957
- }
958
- else {
959
- this.sortablejsOptions = { onUpdate: this.itemsOrderChanged };
960
- }
961
- }
962
- scrollPage(scrollAmount) {
963
- if (!isValueSet(this.scrollInterval)) {
964
- this.scrollInterval = setInterval(() => {
965
- window.scroll({
966
- top: document.scrollingElement.scrollTop - scrollAmount,
967
- behavior: 'smooth',
968
- });
969
- if (document.scrollingElement.scrollTop <= 100) {
970
- this.stopScrolling();
971
- }
972
- }, 100);
973
- }
974
- }
975
- stopScrolling() {
976
- clearInterval(this.scrollInterval);
977
- this.scrollInterval = null;
978
- }
979
- }
980
- SortableItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SortableItemsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
981
- SortableItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: SortableItemsComponent, selector: "klp-form-sortable-items", inputs: { sortableItemSize: "sortableItemSize", useCustomScroll: "useCustomScroll" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SortableItemsComponent, multi: true }], queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #listItem>\n\t<li *ngFor=\"let item of innerValue; index as index\"\n\t\t\tclass=\"sortableItem\"\n\t\t\t[ngClass]=\"{\n\t\t\tlargeSortableItem: sortableItemSize === 'lg',\n\t\t \tsmallSortableItem: sortableItemSize === 'sm'\n\t\t }\"\n\t>\n\t\t<ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item: item, index:index }\"></ng-container>\n\t</li>\n</ng-template>\n\n<ol *ngIf='!disabled'\n\t\t[sortablejs]=\"innerValue\"\n\t\t[sortablejsOptions]=\"sortablejsOptions\"\n\t\tclass=\"itemsContainer\"\n>\n\t<ng-container *ngTemplateOutlet=\"listItem\"></ng-container>\n</ol>\n\n<ol *ngIf='disabled' class=\"itemsContainer disabled-mouse-cursor\">\n\t<ng-container *ngTemplateOutlet=\"listItem\"></ng-container>\n</ol>\n", styles: [":host{display:block}.itemsContainer{border:1px solid #e6ecf5;border-radius:5px;padding:0;margin-bottom:0}.sortableItem{list-style:none;border-top:1px solid #e6ecf5;cursor:grab}.sortableItem:hover{background:#f8f9fa}.sortableItem:first-child{border-top:none}.largeSortableItem{padding:15px}.smallSortableItem{padding:0 10px}.disabled-mouse-cursor li{cursor:no-drop}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.SortablejsDirective, selector: "[sortablejs]", inputs: ["sortablejs", "sortablejsContainer", "sortablejsOptions", "sortablejsCloneFunction"], outputs: ["sortablejsInit"] }] });
982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SortableItemsComponent, decorators: [{
983
- type: Component,
984
- args: [{ selector: 'klp-form-sortable-items', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SortableItemsComponent, multi: true }], template: "<ng-template #listItem>\n\t<li *ngFor=\"let item of innerValue; index as index\"\n\t\t\tclass=\"sortableItem\"\n\t\t\t[ngClass]=\"{\n\t\t\tlargeSortableItem: sortableItemSize === 'lg',\n\t\t \tsmallSortableItem: sortableItemSize === 'sm'\n\t\t }\"\n\t>\n\t\t<ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item: item, index:index }\"></ng-container>\n\t</li>\n</ng-template>\n\n<ol *ngIf='!disabled'\n\t\t[sortablejs]=\"innerValue\"\n\t\t[sortablejsOptions]=\"sortablejsOptions\"\n\t\tclass=\"itemsContainer\"\n>\n\t<ng-container *ngTemplateOutlet=\"listItem\"></ng-container>\n</ol>\n\n<ol *ngIf='disabled' class=\"itemsContainer disabled-mouse-cursor\">\n\t<ng-container *ngTemplateOutlet=\"listItem\"></ng-container>\n</ol>\n", styles: [":host{display:block}.itemsContainer{border:1px solid #e6ecf5;border-radius:5px;padding:0;margin-bottom:0}.sortableItem{list-style:none;border-top:1px solid #e6ecf5;cursor:grab}.sortableItem:hover{background:#f8f9fa}.sortableItem:first-child{border-top:none}.largeSortableItem{padding:15px}.smallSortableItem{padding:0 10px}.disabled-mouse-cursor li{cursor:no-drop}\n"] }]
985
- }], propDecorators: { template: [{
986
- type: ContentChild,
987
- args: [TemplateRef]
988
- }], sortableItemSize: [{
989
- type: Input
990
- }], useCustomScroll: [{
991
- type: Input
992
- }] } });
993
-
994
- class TextInputComponent extends ValueAccessorBase {
995
- constructor() {
996
- super(...arguments);
997
- this.type = 'text';
998
- this.clearable = false;
999
- this.onBlur = new EventEmitter();
1000
- }
1001
- }
1002
- TextInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: TextInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1003
- TextInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: TextInputComponent, selector: "klp-form-text-input", inputs: { placeholder: "placeholder", type: "type", clearable: "clearable", icon: "icon" }, outputs: { onBlur: "onBlur" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextInputComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\">\n\t<ng-container *ngIf=\"icon?.length > 0\">\n\t\t<i class=\"ti-search\" *ngIf=\"icon === 'search'\"></i>\n\t</ng-container>\n\t<input\n\t\t[type]=\"type\"\n\t\t[ngClass]=\"{showErrors: isInErrorState(), hasIcon: icon?.length > 0, hasClearButton: clearable}\"\n\t\t[(ngModel)]=\"innerValue\"\n\t\t(input)=\"setInnerValueAndNotify($event.target.value)\"\n\t\t[placeholder]=\"placeholder ? placeholder : ''\"\n\t\t(blur)=\"touch(); onBlur.emit()\"\n\t\t[disabled]='disabled'\n\t\t#nativeInputRef\n\t/>\n\t<div class=\"clearIcon\" *ngIf=\"clearable && innerValue?.length > 0\" (click)=\"resetToNull()\">\u00D7</div>\n</div>\n", styles: [":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{position:relative}i{position:absolute;left:.625rem;top:14px}input{outline:none;display:block;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;height:42px;width:100%;padding:.375rem .625rem;font-size:14px;color:#888da8;transition:all .2s ease-in;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder{color:#adadad}input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{outline:0 none;box-shadow:none;border-color:#3ed778}input.input-sm{height:30px}input.input-lg{height:50px}input.error{border-color:#dc3545;background-color:#f6cdd1}input.valid{border-color:#37c936;background-color:#ebfaeb;color:#278d26}input.hasIcon{padding-left:1.875rem}input.hasClearButton{padding-right:1.875rem}.clearIcon{position:absolute;right:.625rem;top:7px;font-size:18px;cursor:pointer}.showErrors{border-color:#ff8000}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1004
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: TextInputComponent, decorators: [{
1005
- type: Component,
1006
- args: [{ selector: 'klp-form-text-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextInputComponent, multi: true }], template: "<div class=\"componentContainer\">\n\t<ng-container *ngIf=\"icon?.length > 0\">\n\t\t<i class=\"ti-search\" *ngIf=\"icon === 'search'\"></i>\n\t</ng-container>\n\t<input\n\t\t[type]=\"type\"\n\t\t[ngClass]=\"{showErrors: isInErrorState(), hasIcon: icon?.length > 0, hasClearButton: clearable}\"\n\t\t[(ngModel)]=\"innerValue\"\n\t\t(input)=\"setInnerValueAndNotify($event.target.value)\"\n\t\t[placeholder]=\"placeholder ? placeholder : ''\"\n\t\t(blur)=\"touch(); onBlur.emit()\"\n\t\t[disabled]='disabled'\n\t\t#nativeInputRef\n\t/>\n\t<div class=\"clearIcon\" *ngIf=\"clearable && innerValue?.length > 0\" (click)=\"resetToNull()\">\u00D7</div>\n</div>\n", styles: [":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{position:relative}i{position:absolute;left:.625rem;top:14px}input{outline:none;display:block;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;height:42px;width:100%;padding:.375rem .625rem;font-size:14px;color:#888da8;transition:all .2s ease-in;-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;-o-transition:all .2s ease-in;-ms-transition:all .2s ease-in}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder{color:#adadad}input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{outline:0 none;box-shadow:none;border-color:#3ed778}input.input-sm{height:30px}input.input-lg{height:50px}input.error{border-color:#dc3545;background-color:#f6cdd1}input.valid{border-color:#37c936;background-color:#ebfaeb;color:#278d26}input.hasIcon{padding-left:1.875rem}input.hasClearButton{padding-right:1.875rem}.clearIcon{position:absolute;right:.625rem;top:7px;font-size:18px;cursor:pointer}.showErrors{border-color:#ff8000}\n"] }]
1007
- }], propDecorators: { placeholder: [{
1008
- type: Input
1009
- }], type: [{
1010
- type: Input
1011
- }], clearable: [{
1012
- type: Input
1013
- }], icon: [{
1014
- type: Input
1015
- }], onBlur: [{
1016
- type: Output
1017
- }] } });
1018
-
1019
- class ToggleComponent extends ValueAccessorBase {
1020
- }
1021
- ToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1022
- ToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: ToggleComponent, selector: "klp-form-toggle", providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: ToggleComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\" [ngClass]=\"{disabled: disabled}\">\n\t<input type=\"checkbox\" class=\"nativeCheckbox\"\n\t\t[(ngModel)]=\"innerValue\"\n\t\t(input)=\"setInnerValueAndNotify($event.target.checked); touch()\"\n\t\t[disabled]=\"disabled\"\n\t\t[ngClass]=\"{showErrors: isInErrorState()}\"\n\t #nativeInputRef\n\t/>\n\t<div class=\"toggleVisual\"></div>\n</div>\n", styles: [":host{display:block}.componentContainer{position:relative}.nativeCheckbox{position:absolute;opacity:0;top:0;left:0;width:35px;height:20px;cursor:pointer}.toggleVisual{pointer-events:none;position:relative;display:block;transition:.4s ease;-webkit-transition:.4s ease;-moz-transition:.4s ease;-o-transition:.4s ease;-ms-transition:.4s ease;width:35px;height:20px;border:1px solid #e6ecf5;border-radius:35px}.toggleVisual:before{content:\"\";position:absolute;display:block;transition:.2s cubic-bezier(.24,0,.5,1);-webkit-transition:.2s cubic-bezier(.24,0,.5,1);-moz-transition:.2s cubic-bezier(.24,0,.5,1);-o-transition:.2s cubic-bezier(.24,0,.5,1);-ms-transition:.2s cubic-bezier(.24,0,.5,1);margin:1px;width:33px;height:18px;top:-1px;left:-1px;border-radius:30px}.toggleVisual:after{content:\"\";position:absolute;display:block;box-shadow:0 0 0 1px #0000001a,0 4px #0000000a,0 4px 9px #00000021,0 3px 3px #0000000d;transition:.35s cubic-bezier(.54,1.6,.5,1);-webkit-transition:.35s cubic-bezier(.54,1.6,.5,1);-moz-transition:.35s cubic-bezier(.54,1.6,.5,1);-o-transition:.35s cubic-bezier(.54,1.6,.5,1);-ms-transition:.35s cubic-bezier(.54,1.6,.5,1);background:#f7f7f7;height:20px;width:20px;top:-1px;left:0;border-radius:60px}.nativeCheckbox:checked+.toggleVisual:before{background:#37c936;transition:width .2s cubic-bezier(0,0,0,.1);-webkit-transition:width .2s cubic-bezier(0,0,0,.1);-moz-transition:width .2s cubic-bezier(0,0,0,.1);-o-transition:width .2s cubic-bezier(0,0,0,.1);-ms-transition:width .2s cubic-bezier(0,0,0,.1)}.nativeCheckbox:checked+.toggleVisual:after{left:18px}.disabled{opacity:.6}.showErrors+.toggleVisual:before{border:1px solid #ff8000}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1023
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ToggleComponent, decorators: [{
1024
- type: Component,
1025
- args: [{ selector: 'klp-form-toggle', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: ToggleComponent, multi: true }], template: "<div class=\"componentContainer\" [ngClass]=\"{disabled: disabled}\">\n\t<input type=\"checkbox\" class=\"nativeCheckbox\"\n\t\t[(ngModel)]=\"innerValue\"\n\t\t(input)=\"setInnerValueAndNotify($event.target.checked); touch()\"\n\t\t[disabled]=\"disabled\"\n\t\t[ngClass]=\"{showErrors: isInErrorState()}\"\n\t #nativeInputRef\n\t/>\n\t<div class=\"toggleVisual\"></div>\n</div>\n", styles: [":host{display:block}.componentContainer{position:relative}.nativeCheckbox{position:absolute;opacity:0;top:0;left:0;width:35px;height:20px;cursor:pointer}.toggleVisual{pointer-events:none;position:relative;display:block;transition:.4s ease;-webkit-transition:.4s ease;-moz-transition:.4s ease;-o-transition:.4s ease;-ms-transition:.4s ease;width:35px;height:20px;border:1px solid #e6ecf5;border-radius:35px}.toggleVisual:before{content:\"\";position:absolute;display:block;transition:.2s cubic-bezier(.24,0,.5,1);-webkit-transition:.2s cubic-bezier(.24,0,.5,1);-moz-transition:.2s cubic-bezier(.24,0,.5,1);-o-transition:.2s cubic-bezier(.24,0,.5,1);-ms-transition:.2s cubic-bezier(.24,0,.5,1);margin:1px;width:33px;height:18px;top:-1px;left:-1px;border-radius:30px}.toggleVisual:after{content:\"\";position:absolute;display:block;box-shadow:0 0 0 1px #0000001a,0 4px #0000000a,0 4px 9px #00000021,0 3px 3px #0000000d;transition:.35s cubic-bezier(.54,1.6,.5,1);-webkit-transition:.35s cubic-bezier(.54,1.6,.5,1);-moz-transition:.35s cubic-bezier(.54,1.6,.5,1);-o-transition:.35s cubic-bezier(.54,1.6,.5,1);-ms-transition:.35s cubic-bezier(.54,1.6,.5,1);background:#f7f7f7;height:20px;width:20px;top:-1px;left:0;border-radius:60px}.nativeCheckbox:checked+.toggleVisual:before{background:#37c936;transition:width .2s cubic-bezier(0,0,0,.1);-webkit-transition:width .2s cubic-bezier(0,0,0,.1);-moz-transition:width .2s cubic-bezier(0,0,0,.1);-o-transition:width .2s cubic-bezier(0,0,0,.1);-ms-transition:width .2s cubic-bezier(0,0,0,.1)}.nativeCheckbox:checked+.toggleVisual:after{left:18px}.disabled{opacity:.6}.showErrors+.toggleVisual:before{border:1px solid #ff8000}\n"] }]
1026
- }] });
1027
-
1028
- class FormCaptionComponent {
1029
- constructor(parent) {
1030
- this.parent = parent;
1031
- }
1032
- ngOnInit() {
1033
- // this is being run next cycle, because we dont want to fail if the order of components is as follows:
1034
- // <app-form-error />
1035
- // <some-input />
1036
- // That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet
1037
- setTimeout(() => {
1038
- this.parent.registerCaption(this.contentRef);
1039
- });
1040
- }
1041
- }
1042
- FormCaptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormCaptionComponent, deps: [{ token: FormElementComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1043
- FormCaptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormCaptionComponent, selector: "klp-form-caption", viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentRef"], descendants: true }], ngImport: i0, template: "<ng-template #contentRef>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}\n"] });
1044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormCaptionComponent, decorators: [{
1045
- type: Component,
1046
- args: [{ selector: 'klp-form-caption', template: "<ng-template #contentRef>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
1047
- }], ctorParameters: function () {
1048
- return [{ type: FormElementComponent, decorators: [{
1049
- type: Host
1050
- }, {
1051
- type: Optional
1052
- }] }];
1053
- }, propDecorators: { contentRef: [{
1054
- type: ViewChild,
1055
- args: ['contentRef']
1056
- }] } });
1057
-
1058
- class FormErrorComponent {
1059
- constructor(parent) {
1060
- this.parent = parent;
1061
- this.showError = false;
1062
- }
1063
- ngOnInit() {
1064
- // this is being run next cycle, because we dont want to fail if the order of components is as follows:
1065
- // <app-form-error />
1066
- // <some-input />
1067
- // That would fail, because the logic of the form error is run first, and at that moment, the `some-input` isnt registered yet
1068
- setTimeout(() => {
1069
- const attachedControl = this.parent.getAttachedControl();
1070
- this.parent.registerErrorHandler(this.error, this.contentRef);
1071
- if (isNullOrUndefined(attachedControl)) {
1072
- throw new Error('You added a Form Error component without an attached Form Control');
1073
- }
1074
- });
1075
- }
1076
- }
1077
- FormErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormErrorComponent, deps: [{ token: FormElementComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1078
- FormErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormErrorComponent, selector: "klp-form-error", inputs: { error: "error" }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentRef"], descendants: true }], ngImport: i0, template: "<ng-template #contentRef>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}\n"] });
1079
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormErrorComponent, decorators: [{
1080
- type: Component,
1081
- args: [{ selector: 'klp-form-error', template: "<ng-template #contentRef>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
1082
- }], ctorParameters: function () {
1083
- return [{ type: FormElementComponent, decorators: [{
1084
- type: Host
1085
- }, {
1086
- type: Optional
1087
- }] }];
1088
- }, propDecorators: { error: [{
1089
- type: Input
1090
- }], contentRef: [{
1091
- type: ViewChild,
1092
- args: ['contentRef']
1093
- }] } });
1094
-
1095
- class FormSubmitButtonComponent {
1096
- constructor(parentForm) {
1097
- this.parentForm = parentForm;
1098
- this.isLoading = false;
1099
- this.fullWidth = false;
1100
- this.variant = 'greenFilled';
1101
- this.before = () => Promise.resolve();
1102
- this.after = () => Promise.resolve();
1103
- }
1104
- get _() {
1105
- return this.fullWidth;
1106
- }
1107
- submitForm() {
1108
- return __awaiter(this, void 0, void 0, function* () {
1109
- try {
1110
- yield this.before();
1111
- }
1112
- catch (e) {
1113
- return;
1114
- }
1115
- this.parentForm
1116
- .trySubmit()
1117
- .then(([renderedAndEnabledValues, renderedValues]) => {
1118
- this.isLoading = true;
1119
- const submitCallbackResult = this.submitCallback(renderedAndEnabledValues, renderedValues);
1120
- if (isNullOrUndefined(submitCallbackResult)) {
1121
- throw new Error('No promise is returned in your submit function.');
1122
- }
1123
- return submitCallbackResult.then(() => (this.isLoading = false)).catch((e) => {
1124
- this.isLoading = false;
1125
- throw e;
1126
- });
1127
- })
1128
- .catch((e) => {
1129
- if (e === invalidFieldsSymbol) {
1130
- return; // swallow the error, the framework will scroll to the field that needs attention
1131
- }
1132
- throw e;
1133
- });
1134
- yield this.after();
1135
- });
1136
- }
1137
- }
1138
- FormSubmitButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormSubmitButtonComponent, deps: [{ token: FormComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1139
- FormSubmitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormSubmitButtonComponent, selector: "klp-form-submit-button", inputs: { isLoading: "isLoading", fullWidth: "fullWidth", variant: "variant", before: "before", after: "after", submitCallback: "submitCallback" }, host: { properties: { "class._fullWidth": "this._" } }, ngImport: i0, template: "<klp-form-button\n\t\t[variant]=\"variant\"\n\t\t(click)=\"submitForm()\"\n\t\t[disabled]=\"isLoading\"\n\t\t[isLoading]=\"isLoading\"\n\t\t[fullWidth]=\"fullWidth\"\n\t\ttype=\"submit\"\n\t\t[ngClass]=\"fullWidth ? 'fullWidth' : ''\"\n\t>\n\t<ng-content></ng-content>\n</klp-form-button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.fullWidth{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "klp-form-button", inputs: ["variant", "size", "fullWidth", "hasBorder", "disabled", "isLoading", "type", "clickCallback"] }] });
1140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormSubmitButtonComponent, decorators: [{
1141
- type: Component,
1142
- args: [{ selector: 'klp-form-submit-button', template: "<klp-form-button\n\t\t[variant]=\"variant\"\n\t\t(click)=\"submitForm()\"\n\t\t[disabled]=\"isLoading\"\n\t\t[isLoading]=\"isLoading\"\n\t\t[fullWidth]=\"fullWidth\"\n\t\ttype=\"submit\"\n\t\t[ngClass]=\"fullWidth ? 'fullWidth' : ''\"\n\t>\n\t<ng-content></ng-content>\n</klp-form-button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.fullWidth{width:100%}\n"] }]
1143
- }], ctorParameters: function () {
1144
- return [{ type: FormComponent, decorators: [{
1145
- type: Host
1146
- }, {
1147
- type: Optional
1148
- }] }];
1149
- }, propDecorators: { isLoading: [{
1150
- type: Input
1151
- }], fullWidth: [{
1152
- type: Input
1153
- }], variant: [{
1154
- type: Input
1155
- }], before: [{
1156
- type: Input
1157
- }], after: [{
1158
- type: Input
1159
- }], submitCallback: [{
1160
- type: Input
1161
- }], _: [{
1162
- type: HostBinding,
1163
- args: ['class._fullWidth']
1164
- }] } });
1165
-
1166
- class MultipleValueAccessorBase extends ValueAccessorBase {
1167
- constructor(parent, controlContainer) {
1168
- super(parent, controlContainer);
1169
- this.parent = parent;
1170
- this.controlContainer = controlContainer;
1171
- this.multiple = false;
1172
- }
1173
- writeValue(value) {
1174
- // if the outside world passes a value in the wrong format, it should be corrected
1175
- if (this.multiple && !Array.isArray(value)) {
1176
- const correctedVal = [value].filter(isValueSet);
1177
- super.writeValue(correctedVal);
1178
- super.setInnerValueAndNotify(correctedVal);
1179
- }
1180
- else if (!this.multiple && Array.isArray(value)) {
1181
- const correctedVal = value[0];
1182
- super.writeValue(correctedVal);
1183
- super.setInnerValueAndNotify(correctedVal);
1184
- }
1185
- else {
1186
- super.writeValue(value);
1187
- }
1188
- }
1189
- setInnerValueAndNotify(value) {
1190
- if (this.multiple && !Array.isArray(value)) {
1191
- super.setInnerValueAndNotify([value].filter(isValueSet));
1192
- }
1193
- else if (!this.multiple && Array.isArray(value)) {
1194
- super.setInnerValueAndNotify(value[0]);
1195
- }
1196
- else {
1197
- super.setInnerValueAndNotify(value);
1198
- }
1199
- }
1200
- }
1201
- MultipleValueAccessorBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MultipleValueAccessorBase, deps: [{ token: FormElementComponent, host: true, optional: true }, { token: i2.ControlContainer, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1202
- MultipleValueAccessorBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: MultipleValueAccessorBase, selector: "ng-component", inputs: { multiple: "multiple" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
1203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MultipleValueAccessorBase, decorators: [{
1204
- type: Component,
1205
- args: [{
1206
- selector: '',
1207
- template: '',
1208
- }]
1209
- }], ctorParameters: function () {
1210
- return [{ type: FormElementComponent, decorators: [{
1211
- type: Host
1212
- }, {
1213
- type: Optional
1214
- }] }, { type: i2.ControlContainer, decorators: [{
1215
- type: Host
1216
- }, {
1217
- type: Optional
1218
- }] }];
1219
- }, propDecorators: { multiple: [{
1220
- type: Input
1221
- }] } });
1222
-
1223
- const invalidDateKey = '--invalid_date--';
1224
- function dateValidator(control) {
1225
- const invalid = control.value === invalidDateKey;
1226
- return invalid ? { date: control.value } : null;
1227
- }
1228
-
1229
- const KLP_DATE_FORMATS = new InjectionToken('klp.form.date.formats');
1230
- const DATE_TIME_PICKER_TRANSLATIONS = new InjectionToken('klp.form.dateTime.translations');
1231
- const DATE_PICKER_LOCALE = new InjectionToken('klp.form.dateTime.locale');
1232
- function matDateFormatsFactory(component, dateFormats) {
1233
- var _a;
1234
- return (_a = dateFormats === null || dateFormats === void 0 ? void 0 : dateFormats(component.format)) !== null && _a !== void 0 ? _a : MAT_NATIVE_DATE_FORMATS;
1235
- }
1236
- class DateTimePickerComponent extends MultipleValueAccessorBase {
1237
- constructor(parent, controlContainer, translations, datePickerLocale, dateAdapter, cdr) {
1238
- super(parent, controlContainer);
1239
- this.parent = parent;
1240
- this.controlContainer = controlContainer;
1241
- this.translations = translations;
1242
- this.datePickerLocale = datePickerLocale;
1243
- this.dateAdapter = dateAdapter;
1244
- this.cdr = cdr;
1245
- this.minDate = undefined;
1246
- this.maxDate = undefined;
1247
- this.sameMonthOnly = false;
1248
- this.format = 'dd-MM-yyyy';
1249
- this.clearable = false;
1250
- this.showTimeInput = true;
1251
- this.invalidTimeAsMidnight = false; // if the time is not valid, use 00:00 as the time
1252
- this.openPickerOnDate = null;
1253
- this.minDateStartOfDay = undefined;
1254
- this.maxDateEndOfDay = undefined;
1255
- this.selectedDates = [];
1256
- this.dateTouched = false;
1257
- this.hoursTouched = false;
1258
- this.minutesTouched = false;
1259
- this.isSelected = (d) => {
1260
- if (this.multiple) {
1261
- return this.selectedDates.some((e) => isSameDay(e, d)) ? 'selected' : '';
1262
- }
1263
- return '';
1264
- };
1265
- this.filterDates = (e) => {
1266
- if (this.disabled) {
1267
- return false;
1268
- }
1269
- return true;
1270
- };
1271
- if (isValueSet(datePickerLocale)) {
1272
- dateAdapter.setLocale(datePickerLocale());
1273
- }
1274
- }
1275
- ngOnInit() {
1276
- super.ngOnInit();
1277
- if (this.multiple) {
1278
- this.placeholder = '';
1279
- this.showTimeInput = false;
1280
- }
1281
- }
1282
- ngAfterViewInit() {
1283
- if (this.multiple) {
1284
- // we are going to overwrite the datepicker closing fn later, so we are saving it here to restore it when needed
1285
- this.datePickingClosingFn = this.datePickerRef.close;
1286
- }
1287
- }
1288
- ngOnChanges(changes) {
1289
- if (changes.minDate) {
1290
- this.determineMinAndMaxDates();
1291
- }
1292
- if (changes.maxDate) {
1293
- this.determineMinAndMaxDates();
1294
- }
1295
- }
1296
- setMinDate(minDate) {
1297
- if (minDate) {
1298
- this.minDateStartOfDay = new Date(minDate);
1299
- this.minDateStartOfDay.setHours(0, 0, 0, 0);
1300
- }
1301
- else {
1302
- this.minDateStartOfDay = undefined;
1303
- }
1304
- }
1305
- setMaxDate(maxDate) {
1306
- if (maxDate) {
1307
- this.maxDateEndOfDay = new Date(maxDate);
1308
- this.maxDateEndOfDay.setHours(23, 59, 59, 999);
1309
- }
1310
- else {
1311
- this.maxDateEndOfDay = undefined;
1312
- }
1313
- }
1314
- getSelectedMonths() {
1315
- return removeDuplicatesFromArray(this.selectedDates.map((e) => format(e, 'MMMM'))).length;
1316
- }
1317
- // dateChanged is called when the output of the datepicker is changed and
1318
- // parsed correctly. If the date is invalid, it will be called the first time
1319
- // with null but never again until a valid input is provided.
1320
- dateChanged(event) {
1321
- const date = event.value;
1322
- if (this.multiple) {
1323
- this.datePickerRef.close = () => {
1324
- };
1325
- if (this.selectedDates.some((e) => isSameDay(e, date))) {
1326
- this.selectedDates = this.selectedDates.filter((e) => !isSameDay(e, date));
1327
- }
1328
- else {
1329
- this.selectedDates = [...this.selectedDates, date];
1330
- }
1331
- // START HACK
1332
- // the date picker does not provide any rerender calls. Therefore, we are going to change the minDate in order to force the render
1333
- // This is needed to show all selected days in our date picker
1334
- // We also set the innerValue to null (with this.valueForMaterialDatePicker = null;), otherwise you can not
1335
- // deselect your last picked date
1336
- this.cdr.detectChanges();
1337
- this.valueForMaterialDatePicker = null;
1338
- const oldMinDate = this.minDateStartOfDay;
1339
- this.minDateStartOfDay = new Date(0);
1340
- this.cdr.detectChanges();
1341
- this.minDateStartOfDay = oldMinDate;
1342
- // END HACK
1343
- if (this.sameMonthOnly) {
1344
- if (this.selectedDates.length >= 2) {
1345
- if (date < startOfMonth(this.selectedDates[0]) || date > endOfMonth(this.selectedDates[0])) {
1346
- this.selectedDates = [date];
1347
- }
1348
- }
1349
- this.determineMinAndMaxDates();
1350
- }
1351
- this.setInnerValueAndNotify(this.selectedDates);
1352
- setTimeout(() => {
1353
- this.datePickerRef.close = this.datePickingClosingFn;
1354
- });
1355
- }
1356
- else {
1357
- this.notifyNewDate();
1358
- }
1359
- }
1360
- determineMinAndMaxDates() {
1361
- if (this.sameMonthOnly) {
1362
- if (this.selectedDates.length >= 2) {
1363
- this.setMinDate(startOfMonth(this.selectedDates[0]));
1364
- this.setMaxDate(endOfMonth(this.selectedDates[0]));
1365
- }
1366
- else {
1367
- this.setMinDate(this.minDate);
1368
- this.setMaxDate(this.maxDate);
1369
- }
1370
- }
1371
- else {
1372
- this.setMinDate(this.minDate);
1373
- this.setMaxDate(this.maxDate);
1374
- }
1375
- }
1376
- notifyNewDate() {
1377
- const nativeInputValue = this.nativeInputRef.nativeElement.value;
1378
- const parsedHours = Number(this.hours);
1379
- const parsedMinutes = Number(this.minutes);
1380
- // if we dont have the time element
1381
- if (!this.showTimeInput) {
1382
- if (!stringIsSetAndFilled(nativeInputValue)) {
1383
- this.setInnerValueAndNotify(null);
1384
- return;
1385
- }
1386
- if (this.valueForMaterialDatePicker instanceof Date) {
1387
- this.setInnerValueAndNotify(this.valueForMaterialDatePicker);
1388
- return;
1389
- }
1390
- }
1391
- // when all inputs are empty
1392
- if (!stringIsSetAndFilled(nativeInputValue) && !stringIsSetAndFilled(this.hours) && !stringIsSetAndFilled(this.minutes)) {
1393
- this.setInnerValueAndNotify(null);
1394
- return;
1395
- }
1396
- // if we have date and time
1397
- if (stringIsSetAndFilled(this.hours) &&
1398
- Number.isFinite(parsedHours) &&
1399
- parsedHours >= 0 &&
1400
- parsedHours <= 23 &&
1401
- stringIsSetAndFilled(this.minutes) &&
1402
- Number.isFinite(parsedMinutes) &&
1403
- parsedMinutes >= 0 &&
1404
- parsedMinutes <= 59 &&
1405
- this.valueForMaterialDatePicker instanceof Date) {
1406
- const newDateWithHours = new Date(this.valueForMaterialDatePicker.setHours(parsedHours));
1407
- const newDateWithMinutes = new Date(newDateWithHours.setMinutes(parsedMinutes));
1408
- this.setInnerValueAndNotify(newDateWithMinutes);
1409
- return;
1410
- }
1411
- if (this.invalidTimeAsMidnight) {
1412
- if (this.valueForMaterialDatePicker instanceof Date) {
1413
- this.setInnerValueAndNotify(this.valueForMaterialDatePicker);
1414
- return;
1415
- }
1416
- }
1417
- // all other cases, we are not in a valid state
1418
- this.setInnerValueAndNotify(invalidDateKey);
1419
- }
1420
- writeValue(value) {
1421
- super.writeValue(value);
1422
- if (Array.isArray(value)) {
1423
- this.selectedDates = value;
1424
- this.determineMinAndMaxDates();
1425
- this.valueForMaterialDatePicker = null;
1426
- if (arrayIsSetAndFilled(value)) {
1427
- this.openPickerOnDate = this.selectedDates[0];
1428
- }
1429
- }
1430
- else {
1431
- this.valueForMaterialDatePicker = value === invalidDateKey ? null : value;
1432
- if (value instanceof Date) {
1433
- this.hours = String(value.getHours());
1434
- this.minutes = String(value.getMinutes());
1435
- this.formatTime();
1436
- this.openPickerOnDate = value;
1437
- }
1438
- else {
1439
- this.hours = '';
1440
- this.minutes = '';
1441
- this.openPickerOnDate = null;
1442
- this.selectedDates = [];
1443
- }
1444
- }
1445
- }
1446
- // nativeValueChanged is called when the internal text value changes, but not
1447
- // when the date is changed via the date picker. We need this so that we can
1448
- // determine if the datepicker is empty or invalid.
1449
- nativeValueChanged() {
1450
- if (this.datePickerRef.opened) {
1451
- // if the user is typing instead of using the picker, close it.
1452
- this.datePickerRef.close();
1453
- }
1454
- this.notifyNewDate();
1455
- }
1456
- resetToNull() {
1457
- this.setInnerValueAndNotify(null);
1458
- this.valueForMaterialDatePicker = null;
1459
- this.nativeInputRef.nativeElement.value = null;
1460
- this.hours = '';
1461
- this.minutes = '';
1462
- this.selectedDates = [];
1463
- }
1464
- formatTime() {
1465
- if (Number.isFinite(Number(this.hours)) && this.hours.length === 1) {
1466
- this.hours = '0' + this.hours;
1467
- }
1468
- if (Number.isFinite(Number(this.minutes)) && this.minutes.length === 1) {
1469
- this.minutes = '0' + this.minutes;
1470
- }
1471
- }
1472
- touchDate() {
1473
- this.dateTouched = true;
1474
- this.determineAllTouched();
1475
- }
1476
- touchHours() {
1477
- this.hoursTouched = true;
1478
- this.determineAllTouched();
1479
- }
1480
- touchMinutes() {
1481
- this.minutesTouched = true;
1482
- this.determineAllTouched();
1483
- }
1484
- determineAllTouched() {
1485
- if ((this.dateTouched && this.hoursTouched && this.minutesTouched) || (this.dateTouched && !this.showTimeInput)) {
1486
- this.touch();
1487
- }
1488
- }
1489
- getDefaultTranslation(key) {
1490
- switch (key) {
1491
- case 'placeholder':
1492
- return () => 'Select date';
1493
- case 'selectDays':
1494
- return () => 'Select day(s)';
1495
- case 'selectedDate':
1496
- return (d) => d.toLocaleDateString();
1497
- case 'daysSelected':
1498
- return (amount) => `${amount} days selected`;
1499
- case 'selectedInMonth':
1500
- return (d) => ` in ${format(d, 'MMMM')}`;
1501
- }
1502
- }
1503
- getTranslation(key, params = null) {
1504
- var _a, _b, _c;
1505
- if (key === 'placeholder' && this.multiple) {
1506
- return '';
1507
- }
1508
- if (key === 'placeholder' && stringIsSetAndFilled(this.placeholder)) {
1509
- return this.placeholder;
1510
- }
1511
- return (_c = (_b = (_a = this.translations) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.call(_a, params)) !== null && _c !== void 0 ? _c : this.getDefaultTranslation(key)(params);
1512
- }
1513
- }
1514
- DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: FormElementComponent, host: true, optional: true }, { token: i2.ControlContainer, host: true, optional: true }, { token: DATE_TIME_PICKER_TRANSLATIONS, optional: true }, { token: DATE_PICKER_LOCALE, optional: true }, { token: i3.DateAdapter }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1515
- DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: DateTimePickerComponent, selector: "klp-form-date-time-picker", inputs: { minDate: "minDate", maxDate: "maxDate", sameMonthOnly: "sameMonthOnly", format: "format", placeholder: "placeholder", clearable: "clearable", showTimeInput: "showTimeInput", invalidTimeAsMidnight: "invalidTimeAsMidnight" }, providers: [
1516
- { provide: NG_VALUE_ACCESSOR, useExisting: DateTimePickerComponent, multi: true },
1517
- {
1518
- provide: MAT_DATE_FORMATS,
1519
- deps: [DateTimePickerComponent, [new Optional(), KLP_DATE_FORMATS]],
1520
- useFactory: matDateFormatsFactory,
1521
- },
1522
- ], viewQueries: [{ propertyName: "nativeInputRef", first: true, predicate: ["nativeInput"], descendants: true }, { propertyName: "datePickerRef", first: true, predicate: ["picker"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"componentContainer\" [ngClass]=\"{showErrors: isInErrorState()}\">\n\t<div class=\"dateContainer\" [ngClass]=\"{noRightBorder: !showTimeInput && clearable && !disabled, disabled: disabled}\">\n\t\t<mat-form-field floatLabel=\"never\">\n\t\t\t<div *ngIf=\"multiple\" class=\"daysSelectedCaption\" (click)=\"picker.open()\" [ngClass]=\"{disabled: disabled}\">\n\t\t\t\t<ng-container *ngIf=\"selectedDates.length >= 2\">\n\t\t\t\t\t<span>{{getTranslation('daysSelected', selectedDates.length)}}</span>\n\t\t\t\t\t<span *ngIf=\"getSelectedMonths() === 1\">{{getTranslation('selectedInMonth', selectedDates[0])}}</span>\n\t\t\t\t</ng-container>\n\t\t\t\t<span *ngIf=\"selectedDates.length === 1\">{{getTranslation('selectedDate', selectedDates[0])}}</span>\n\t\t\t\t<span *ngIf=\"selectedDates.length === 0\" class=\"placeholderForMultipleSelection\">{{getTranslation('selectDays')}}</span>\n\t\t\t</div>\n\t\t\t<input\n\t\t\t\t#nativeInput\n\t\t\t\tmatInput\n\t\t\t\t[matDatepicker]=\"picker\"\n\t\t\t\t[matDatepickerFilter]=\"filterDates\"\n\t\t\t\t[(ngModel)]=\"valueForMaterialDatePicker\"\n\t\t\t\t(dateInput)=\"dateChanged($event)\"\n\t\t\t\t(input)=\"nativeValueChanged()\"\n\t\t\t\t[min]=\"minDateStartOfDay\"\n\t\t\t\t[max]=\"maxDateEndOfDay\"\n\t\t\t\t[placeholder]=\"getTranslation('placeholder')\"\n\t\t\t\t(click)=\"picker.open()\"\n\t\t\t\t(blur)=\"touchDate()\"\n\t\t\t\t[ngClass]=\"{inputForMultipleDays: multiple}\"\n\t\t\t>\n\t\t\t<mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n\t\t\t<mat-datepicker\n\t\t\t\t#picker\n\t\t\t\t[dateClass]=\"isSelected\"\n\t\t\t\t[startAt]=\"openPickerOnDate\"\n\t\t\t></mat-datepicker>\n\t\t</mat-form-field>\n\t</div>\n\t<div class=\"timeContainer\" *ngIf=\"showTimeInput\" [ngClass]=\"{disabled: disabled}\">\n\t\t<input maxlength=\"2\" placeholder=\"__\" [disabled]=\"disabled\" [(ngModel)]=\"hours\" (ngModelChange)=\"notifyNewDate()\" (blur)=\"formatTime(); touchHours()\">\n\t\t<div class=\"divider\">:</div>\n\t\t<input maxlength=\"2\" placeholder=\"__\" [disabled]=\"disabled\" [(ngModel)]=\"minutes\" (ngModelChange)=\"notifyNewDate()\" (blur)=\"formatTime(); touchMinutes()\">\n\t</div>\n\t<button *ngIf=\"clearable && !disabled\" class=\"clearButton\" (click)=\"resetToNull()\" [ngClass]=\"{withoutSpacing: !showTimeInput}\">\u00D7</button>\n</div>\n", styles: [":host{display:block}:host ::ng-deep mat-form-field{display:block;height:100%}:host ::ng-deep mat-form-field .mat-form-field-label{color:#adadad}:host ::ng-deep mat-form-field.mat-focused .mat-form-field-label{color:#adadad}:host ::ng-deep .mat-datepicker-toggle-active{color:#666}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field-flex{flex-direction:row-reverse}:host ::ng-deep .mat-form-field-infix{border-top:none;width:auto}:host ::ng-deep .mat-form-field-suffix{margin-right:.625rem}:host ::ng-deep .mat-form-field-suffix:hover .mat-button-focus-overlay{opacity:.1}:host ::ng-deep .mat-form-field-underline{display:none}:host ::ng-deep .daysSelectedCaption{cursor:pointer}:host ::ng-deep .daysSelectedCaption.disabled{cursor:zoom-in}:host ::ng-deep .inputForMultipleDays{display:none}.componentContainer{display:flex;position:relative;border-radius:2px;color:#888da8}.componentContainer .placeholderForMultipleSelection{color:#adadad}.componentContainer.showErrors .dateContainer,.componentContainer.showErrors .timeContainer,.componentContainer.showErrors .clearButton.withoutSpacing{border-color:#ff8000}.componentContainer .clearButton{flex:0 0 auto;display:flex;align-items:center;background:#ffffff;color:#7b7b7b;border:1px solid #e6ecf5;margin-left:1.25rem;padding:6px 14px;font-size:18px}.componentContainer .clearButton.withoutSpacing{border-left:none;margin-left:0}.componentContainer .clearButton:disabled{border:1px solid #e6ecf5;background:#f9f9f9}.componentContainer .dateContainer{flex:1 1 auto;padding:6px;background:#ffffff;border:1px solid #e6ecf5}.componentContainer .dateContainer.noRightBorder{border-right:none}.componentContainer .dateContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer{flex:0 0 auto;margin-left:1.25rem;padding:6px .625rem;background:#ffffff;display:flex;align-items:center;border:1px solid #e6ecf5}.componentContainer .timeContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer input{color:#888da8;text-align:center;width:20px;padding:0;border:none}.componentContainer .timeContainer input::placeholder{color:#adadad}.componentContainer .timeContainer .divider{margin:0 .3125rem}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] });
1523
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: DateTimePickerComponent, decorators: [{
1524
- type: Component,
1525
- args: [{ selector: 'klp-form-date-time-picker', providers: [
1526
- { provide: NG_VALUE_ACCESSOR, useExisting: DateTimePickerComponent, multi: true },
1527
- {
1528
- provide: MAT_DATE_FORMATS,
1529
- deps: [DateTimePickerComponent, [new Optional(), KLP_DATE_FORMATS]],
1530
- useFactory: matDateFormatsFactory,
1531
- },
1532
- ], template: "<div class=\"componentContainer\" [ngClass]=\"{showErrors: isInErrorState()}\">\n\t<div class=\"dateContainer\" [ngClass]=\"{noRightBorder: !showTimeInput && clearable && !disabled, disabled: disabled}\">\n\t\t<mat-form-field floatLabel=\"never\">\n\t\t\t<div *ngIf=\"multiple\" class=\"daysSelectedCaption\" (click)=\"picker.open()\" [ngClass]=\"{disabled: disabled}\">\n\t\t\t\t<ng-container *ngIf=\"selectedDates.length >= 2\">\n\t\t\t\t\t<span>{{getTranslation('daysSelected', selectedDates.length)}}</span>\n\t\t\t\t\t<span *ngIf=\"getSelectedMonths() === 1\">{{getTranslation('selectedInMonth', selectedDates[0])}}</span>\n\t\t\t\t</ng-container>\n\t\t\t\t<span *ngIf=\"selectedDates.length === 1\">{{getTranslation('selectedDate', selectedDates[0])}}</span>\n\t\t\t\t<span *ngIf=\"selectedDates.length === 0\" class=\"placeholderForMultipleSelection\">{{getTranslation('selectDays')}}</span>\n\t\t\t</div>\n\t\t\t<input\n\t\t\t\t#nativeInput\n\t\t\t\tmatInput\n\t\t\t\t[matDatepicker]=\"picker\"\n\t\t\t\t[matDatepickerFilter]=\"filterDates\"\n\t\t\t\t[(ngModel)]=\"valueForMaterialDatePicker\"\n\t\t\t\t(dateInput)=\"dateChanged($event)\"\n\t\t\t\t(input)=\"nativeValueChanged()\"\n\t\t\t\t[min]=\"minDateStartOfDay\"\n\t\t\t\t[max]=\"maxDateEndOfDay\"\n\t\t\t\t[placeholder]=\"getTranslation('placeholder')\"\n\t\t\t\t(click)=\"picker.open()\"\n\t\t\t\t(blur)=\"touchDate()\"\n\t\t\t\t[ngClass]=\"{inputForMultipleDays: multiple}\"\n\t\t\t>\n\t\t\t<mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n\t\t\t<mat-datepicker\n\t\t\t\t#picker\n\t\t\t\t[dateClass]=\"isSelected\"\n\t\t\t\t[startAt]=\"openPickerOnDate\"\n\t\t\t></mat-datepicker>\n\t\t</mat-form-field>\n\t</div>\n\t<div class=\"timeContainer\" *ngIf=\"showTimeInput\" [ngClass]=\"{disabled: disabled}\">\n\t\t<input maxlength=\"2\" placeholder=\"__\" [disabled]=\"disabled\" [(ngModel)]=\"hours\" (ngModelChange)=\"notifyNewDate()\" (blur)=\"formatTime(); touchHours()\">\n\t\t<div class=\"divider\">:</div>\n\t\t<input maxlength=\"2\" placeholder=\"__\" [disabled]=\"disabled\" [(ngModel)]=\"minutes\" (ngModelChange)=\"notifyNewDate()\" (blur)=\"formatTime(); touchMinutes()\">\n\t</div>\n\t<button *ngIf=\"clearable && !disabled\" class=\"clearButton\" (click)=\"resetToNull()\" [ngClass]=\"{withoutSpacing: !showTimeInput}\">\u00D7</button>\n</div>\n", styles: [":host{display:block}:host ::ng-deep mat-form-field{display:block;height:100%}:host ::ng-deep mat-form-field .mat-form-field-label{color:#adadad}:host ::ng-deep mat-form-field.mat-focused .mat-form-field-label{color:#adadad}:host ::ng-deep .mat-datepicker-toggle-active{color:#666}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field-flex{flex-direction:row-reverse}:host ::ng-deep .mat-form-field-infix{border-top:none;width:auto}:host ::ng-deep .mat-form-field-suffix{margin-right:.625rem}:host ::ng-deep .mat-form-field-suffix:hover .mat-button-focus-overlay{opacity:.1}:host ::ng-deep .mat-form-field-underline{display:none}:host ::ng-deep .daysSelectedCaption{cursor:pointer}:host ::ng-deep .daysSelectedCaption.disabled{cursor:zoom-in}:host ::ng-deep .inputForMultipleDays{display:none}.componentContainer{display:flex;position:relative;border-radius:2px;color:#888da8}.componentContainer .placeholderForMultipleSelection{color:#adadad}.componentContainer.showErrors .dateContainer,.componentContainer.showErrors .timeContainer,.componentContainer.showErrors .clearButton.withoutSpacing{border-color:#ff8000}.componentContainer .clearButton{flex:0 0 auto;display:flex;align-items:center;background:#ffffff;color:#7b7b7b;border:1px solid #e6ecf5;margin-left:1.25rem;padding:6px 14px;font-size:18px}.componentContainer .clearButton.withoutSpacing{border-left:none;margin-left:0}.componentContainer .clearButton:disabled{border:1px solid #e6ecf5;background:#f9f9f9}.componentContainer .dateContainer{flex:1 1 auto;padding:6px;background:#ffffff;border:1px solid #e6ecf5}.componentContainer .dateContainer.noRightBorder{border-right:none}.componentContainer .dateContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer{flex:0 0 auto;margin-left:1.25rem;padding:6px .625rem;background:#ffffff;display:flex;align-items:center;border:1px solid #e6ecf5}.componentContainer .timeContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer input{color:#888da8;text-align:center;width:20px;padding:0;border:none}.componentContainer .timeContainer input::placeholder{color:#adadad}.componentContainer .timeContainer .divider{margin:0 .3125rem}\n"] }]
1533
- }], ctorParameters: function () {
1534
- return [{ type: FormElementComponent, decorators: [{
1535
- type: Host
1536
- }, {
1537
- type: Optional
1538
- }] }, { type: i2.ControlContainer, decorators: [{
1539
- type: Host
1540
- }, {
1541
- type: Optional
1542
- }] }, { type: undefined, decorators: [{
1543
- type: Inject,
1544
- args: [DATE_TIME_PICKER_TRANSLATIONS]
1545
- }, {
1546
- type: Optional
1547
- }] }, { type: undefined, decorators: [{
1548
- type: Inject,
1549
- args: [DATE_PICKER_LOCALE]
1550
- }, {
1551
- type: Optional
1552
- }] }, { type: i3.DateAdapter }, { type: i0.ChangeDetectorRef }];
1553
- }, propDecorators: { minDate: [{
1554
- type: Input
1555
- }], maxDate: [{
1556
- type: Input
1557
- }], sameMonthOnly: [{
1558
- type: Input
1559
- }], format: [{
1560
- type: Input
1561
- }], placeholder: [{
1562
- type: Input
1563
- }], clearable: [{
1564
- type: Input
1565
- }], showTimeInput: [{
1566
- type: Input
1567
- }], invalidTimeAsMidnight: [{
1568
- type: Input
1569
- }], nativeInputRef: [{
1570
- type: ViewChild,
1571
- args: ['nativeInput']
1572
- }], datePickerRef: [{
1573
- type: ViewChild,
1574
- args: ['picker']
1575
- }] } });
1576
-
1577
- const DATE_PICKER_TRANSLATIONS = new InjectionToken('klp.form.date.translations');
1578
- class DatePickerComponent extends MultipleValueAccessorBase {
1579
- constructor(parent, controlContainer, translations) {
1580
- super(parent, controlContainer);
1581
- this.parent = parent;
1582
- this.controlContainer = controlContainer;
1583
- this.translations = translations;
1584
- this.minDate = undefined;
1585
- this.maxDate = undefined;
1586
- this.sameMonthOnly = false;
1587
- this.format = 'dd-MM-yyyy';
1588
- this.clearable = false;
1589
- }
1590
- writeValue(value) {
1591
- if (value === invalidDateKey) {
1592
- super.writeValue(invalidDateKey);
1593
- }
1594
- else if (isNullOrUndefined(value)) {
1595
- this.dateValue = this.multiple ? [] : null;
1596
- super.writeValue(this.multiple ? [] : null);
1597
- }
1598
- else {
1599
- if (Array.isArray(value)) {
1600
- this.dateValue = value.map((e) => parse(e, 'yyyy-MM-dd', new Date()));
1601
- }
1602
- else {
1603
- this.dateValue = parse(value, 'yyyy-MM-dd', new Date());
1604
- }
1605
- super.writeValue(value);
1606
- }
1607
- }
1608
- dateChanged(value) {
1609
- if (value === invalidDateKey) {
1610
- this.setInnerValueAndNotify(invalidDateKey);
1611
- }
1612
- else if (isNullOrUndefined(value)) {
1613
- this.dateValue = this.multiple ? [] : null;
1614
- this.setInnerValueAndNotify(this.multiple ? [] : null);
1615
- }
1616
- else {
1617
- this.dateValue = value;
1618
- if (Array.isArray(value)) {
1619
- this.setInnerValueAndNotify(value.map((e) => format(e, 'yyyy-MM-dd')));
1620
- }
1621
- else {
1622
- this.setInnerValueAndNotify(format(value, 'yyyy-MM-dd'));
1623
- }
1624
- }
1625
- }
1626
- getDefaultTranslation(key) {
1627
- switch (key) {
1628
- case 'placeholder':
1629
- return () => 'Select date';
1630
- }
1631
- }
1632
- getTranslation(key, params = null) {
1633
- var _a, _b, _c;
1634
- if (key === 'placeholder' && this.multiple) {
1635
- return '';
1636
- }
1637
- if (key === 'placeholder' && stringIsSetAndFilled(this.placeholder)) {
1638
- return this.placeholder;
1639
- }
1640
- return (_c = (_b = (_a = this.translations) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.call(_a, params)) !== null && _c !== void 0 ? _c : this.getDefaultTranslation(key)(params);
1641
- }
1642
- }
1643
- DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: DatePickerComponent, deps: [{ token: FormElementComponent, host: true, optional: true }, { token: i2.ControlContainer, host: true, optional: true }, { token: DATE_PICKER_TRANSLATIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1644
- DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: DatePickerComponent, selector: "klp-form-date-picker", inputs: { minDate: "minDate", maxDate: "maxDate", sameMonthOnly: "sameMonthOnly", format: "format", placeholder: "placeholder", clearable: "clearable" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: DatePickerComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\" [ngClass]=\"{showErrors: isInErrorState()}\">\n\t<klp-form-date-time-picker\n\t\t[multiple]=\"multiple\"\n\t\t[disabled]=\"disabled\"\n\t\t[(ngModel)]=\"dateValue\"\n\t\t(ngModelChange)=\"dateChanged($event)\"\n\t\t[minDate]=\"minDate\"\n\t\t[maxDate]=\"maxDate\"\n\t\t[sameMonthOnly]=\"sameMonthOnly\"\n\t\t[format]=\"format\"\n\t\t[placeholder]=\"getTranslation('placeholder')\"\n\t\t[clearable]=\"clearable\"\n\t\t[showTimeInput]=\"false\"\n\t\t(onTouch)=\"touch()\"\n\t></klp-form-date-time-picker>\n</div>\n", styles: [":host{display:block}.componentContainer.showErrors ::ng-deep klp-form-date-time-picker .dateContainer,.componentContainer.showErrors ::ng-deep klp-form-date-time-picker .clearButton{border-color:#ff8000}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DateTimePickerComponent, selector: "klp-form-date-time-picker", inputs: ["minDate", "maxDate", "sameMonthOnly", "format", "placeholder", "clearable", "showTimeInput", "invalidTimeAsMidnight"] }] });
1645
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: DatePickerComponent, decorators: [{
1646
- type: Component,
1647
- args: [{ selector: 'klp-form-date-picker', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: DatePickerComponent, multi: true }], template: "<div class=\"componentContainer\" [ngClass]=\"{showErrors: isInErrorState()}\">\n\t<klp-form-date-time-picker\n\t\t[multiple]=\"multiple\"\n\t\t[disabled]=\"disabled\"\n\t\t[(ngModel)]=\"dateValue\"\n\t\t(ngModelChange)=\"dateChanged($event)\"\n\t\t[minDate]=\"minDate\"\n\t\t[maxDate]=\"maxDate\"\n\t\t[sameMonthOnly]=\"sameMonthOnly\"\n\t\t[format]=\"format\"\n\t\t[placeholder]=\"getTranslation('placeholder')\"\n\t\t[clearable]=\"clearable\"\n\t\t[showTimeInput]=\"false\"\n\t\t(onTouch)=\"touch()\"\n\t></klp-form-date-time-picker>\n</div>\n", styles: [":host{display:block}.componentContainer.showErrors ::ng-deep klp-form-date-time-picker .dateContainer,.componentContainer.showErrors ::ng-deep klp-form-date-time-picker .clearButton{border-color:#ff8000}\n"] }]
1648
- }], ctorParameters: function () {
1649
- return [{ type: FormElementComponent, decorators: [{
1650
- type: Host
1651
- }, {
1652
- type: Optional
1653
- }] }, { type: i2.ControlContainer, decorators: [{
1654
- type: Host
1655
- }, {
1656
- type: Optional
1657
- }] }, { type: undefined, decorators: [{
1658
- type: Inject,
1659
- args: [DATE_PICKER_TRANSLATIONS]
1660
- }, {
1661
- type: Optional
1662
- }] }];
1663
- }, propDecorators: { minDate: [{
1664
- type: Input
1665
- }], maxDate: [{
1666
- type: Input
1667
- }], sameMonthOnly: [{
1668
- type: Input
1669
- }], format: [{
1670
- type: Input
1671
- }], placeholder: [{
1672
- type: Input
1673
- }], clearable: [{
1674
- type: Input
1675
- }] } });
1676
-
1677
- // material.module.ts
1678
- class MaterialModule {
1679
- }
1680
- MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1681
- MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: MaterialModule, imports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule], exports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule] });
1682
- MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MaterialModule, providers: [MatDatepickerModule], imports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule, MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule] });
1683
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MaterialModule, decorators: [{
1684
- type: NgModule,
1685
- args: [{
1686
- imports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule],
1687
- exports: [MatDatepickerModule, MatFormFieldModule, MatNativeDateModule, MatInputModule, MatButtonModule],
1688
- providers: [MatDatepickerModule],
1689
- }]
1690
- }] });
1691
-
1692
- class FileInputComponent extends MultipleValueAccessorBase {
1693
- constructor() {
1694
- super(...arguments);
1695
- this.isLoading = false;
1696
- this.clearable = false;
1697
- this.onlyShowUploadButton = false;
1698
- this.useFullParentSize = false;
1699
- }
1700
- onChange(files) {
1701
- const result = [];
1702
- for (let i = 0; i < files.length; i++) {
1703
- result.push(files.item(i));
1704
- }
1705
- this.setInnerValueAndNotify(result);
1706
- // to make sure we can select the same file again
1707
- this.nativeInputRef.nativeElement.value = null;
1708
- }
1709
- getFileNames() {
1710
- if (Array.isArray(this.innerValue)) {
1711
- return this.innerValue.map(e => e.name).join(', ');
1712
- }
1713
- else if (this.innerValue instanceof File) {
1714
- return this.innerValue.name;
1715
- }
1716
- return null;
1717
- }
1718
- shouldShowClearButton() {
1719
- if (this.onlyShowUploadButton) {
1720
- return false;
1721
- }
1722
- if (this.multiple) {
1723
- if (arrayIsSetAndFilled(this.innerValue)) {
1724
- return true;
1725
- }
1726
- return false;
1727
- }
1728
- if (isValueSet(this.innerValue)) {
1729
- return true;
1730
- }
1731
- return false;
1732
- }
1733
- uploadFileClicked() {
1734
- this.nativeInputRef.nativeElement.click();
1735
- }
1736
- }
1737
- FileInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FileInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1738
- FileInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FileInputComponent, selector: "klp-form-file-input", inputs: { isLoading: "isLoading", clearable: "clearable", onlyShowUploadButton: "onlyShowUploadButton", useFullParentSize: "useFullParentSize" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], viewQueries: [{ propertyName: "nativeInputRef", first: true, predicate: ["nativeInputRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize}\">\n\t<div class=\"buttonContainer\">\n\t\t<klp-form-button class=\"uploadButton\" [isLoading]=\"isLoading\" (click)=\"uploadFileClicked()\">\n\t\t\tUpload a file\n\t\t</klp-form-button>\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t</div>\n\t<div class=\"fileName\" *ngIf=\"!onlyShowUploadButton\">\n\t\t{{getFileNames()}}\n\t</div>\n\t<klp-form-button class=\"clearButton\" variant=\"white\" *ngIf=\"shouldShowClearButton()\" (click)=\"resetToNull()\">X</klp-form-button>\n</div>\n", styles: [":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{display:flex;align-items:center}.componentContainer.fullParentSize{height:100%;justify-content:center;position:relative}.componentContainer:not(.fullParentSize) .buttonContainer{position:relative}.componentContainer .buttonContainer{flex:0 0 auto}input{position:absolute;cursor:pointer;opacity:0;inset:0}.fileName{flex:1 1 0px;margin-left:.625rem;color:#515365;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clearButton{flex:0 0 auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "klp-form-button", inputs: ["variant", "size", "fullWidth", "hasBorder", "disabled", "isLoading", "type", "clickCallback"] }] });
1739
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FileInputComponent, decorators: [{
1740
- type: Component,
1741
- args: [{ selector: 'klp-form-file-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: FileInputComponent, multi: true }], template: "<div class=\"componentContainer\" [ngClass]=\"{fullParentSize: useFullParentSize}\">\n\t<div class=\"buttonContainer\">\n\t\t<klp-form-button class=\"uploadButton\" [isLoading]=\"isLoading\" (click)=\"uploadFileClicked()\">\n\t\t\tUpload a file\n\t\t</klp-form-button>\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\t#nativeInputRef\n\t\t\t(change)=\"onChange($event.target.files)\"\n\t\t\t[multiple]=\"multiple\"\n\t\t\t[disabled]=\"disabled\"\n\t\t>\n\t</div>\n\t<div class=\"fileName\" *ngIf=\"!onlyShowUploadButton\">\n\t\t{{getFileNames()}}\n\t</div>\n\t<klp-form-button class=\"clearButton\" variant=\"white\" *ngIf=\"shouldShowClearButton()\" (click)=\"resetToNull()\">X</klp-form-button>\n</div>\n", styles: [":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{display:flex;align-items:center}.componentContainer.fullParentSize{height:100%;justify-content:center;position:relative}.componentContainer:not(.fullParentSize) .buttonContainer{position:relative}.componentContainer .buttonContainer{flex:0 0 auto}input{position:absolute;cursor:pointer;opacity:0;inset:0}.fileName{flex:1 1 0px;margin-left:.625rem;color:#515365;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clearButton{flex:0 0 auto}\n"] }]
1742
- }], propDecorators: { isLoading: [{
1743
- type: Input
1744
- }], clearable: [{
1745
- type: Input
1746
- }], onlyShowUploadButton: [{
1747
- type: Input
1748
- }], useFullParentSize: [{
1749
- type: Input
1750
- }], nativeInputRef: [{
1751
- type: ViewChild,
1752
- args: ['nativeInputRef']
1753
- }] } });
1754
-
1755
- class SortableGroupedItemsComponent extends ValueAccessorBase {
1756
- constructor() {
1757
- super(...arguments);
1758
- this.reloader = true; // sortable items doesnt correctly update, so we have this boolean that flips to rerender the sortable items comp
1759
- }
1760
- writeValue(value) {
1761
- super.writeValue(value);
1762
- this.reloader = false;
1763
- setTimeout(() => {
1764
- if (arrayIsSetAndFilled(value)) {
1765
- this.items = value.flatMap(e => [...e, '']);
1766
- }
1767
- else {
1768
- this.items = [];
1769
- }
1770
- this.reloader = true;
1771
- });
1772
- }
1773
- onItemsRearranged(value) {
1774
- const result = splitArrayByCondition(value, e => e === '').filter(arrayIsSetAndFilled);
1775
- this.setInnerValueAndNotify(result);
1776
- this.reloader = false;
1777
- setTimeout(() => {
1778
- this.items = [...this.items, ''].filter((e, i) => {
1779
- if (i === 0 && e === '') {
1780
- return false;
1781
- }
1782
- if (e === '' && this.items[i - 1] === '') {
1783
- return false;
1784
- }
1785
- return true;
1786
- });
1787
- this.reloader = true;
1788
- });
1789
- }
1790
- }
1791
- SortableGroupedItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SortableGroupedItemsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1792
- SortableGroupedItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: SortableGroupedItemsComponent, selector: "klp-form-sortable-grouped-items", providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SortableGroupedItemsComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"reloader\">\n\t<klp-form-sortable-items\n\t\t[(ngModel)]=\"items\"\n\t\t(ngModelChange)=\"onItemsRearranged($event)\"\n\t>\n\t\t<ng-template let-item=\"item\">\n\t\t\t<div>{{item}}</div>\n\t\t</ng-template>\n\t</klp-form-sortable-items>\n</ng-container>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SortableItemsComponent, selector: "klp-form-sortable-items", inputs: ["sortableItemSize", "useCustomScroll"] }] });
1793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: SortableGroupedItemsComponent, decorators: [{
1794
- type: Component,
1795
- args: [{ selector: 'klp-form-sortable-grouped-items', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SortableGroupedItemsComponent, multi: true }], template: "<ng-container *ngIf=\"reloader\">\n\t<klp-form-sortable-items\n\t\t[(ngModel)]=\"items\"\n\t\t(ngModelChange)=\"onItemsRearranged($event)\"\n\t>\n\t\t<ng-template let-item=\"item\">\n\t\t\t<div>{{item}}</div>\n\t\t</ng-template>\n\t</klp-form-sortable-items>\n</ng-container>\n", styles: [":host{display:block}\n"] }]
1796
- }] });
1797
-
1798
- const invalidTimeKey = '--invalid_time--';
1799
- function timeValidator(control) {
1800
- const invalid = control.value === invalidTimeKey;
1801
- return invalid ? { date: control.value } : null;
1802
- }
1803
-
1804
- class HourMinuteInputComponent extends ValueAccessorBase {
1805
- constructor() {
1806
- super(...arguments);
1807
- this.placeholders = ['hour', 'min'];
1808
- this.hoursTouched = false;
1809
- this.minutesTouched = false;
1810
- }
1811
- formatHours() {
1812
- if (!stringIsSetAndFilled(this.hours)) {
1813
- this.hours = '0';
1814
- }
1815
- }
1816
- formatMinutes() {
1817
- if (!stringIsSetAndFilled(this.minutes)) {
1818
- this.minutes = '0';
1819
- }
1820
- }
1821
- formatTime() {
1822
- if (Number.isFinite(Number(this.hours)) && this.hours.length === 1) {
1823
- this.hours = '0' + this.hours;
1824
- }
1825
- if (Number.isFinite(Number(this.minutes)) && this.minutes.length === 1) {
1826
- this.minutes = '0' + this.minutes;
1827
- }
1828
- }
1829
- writeValue(value) {
1830
- if (Number.isFinite(value)) {
1831
- this.hours = Math.floor(value / 60) + '';
1832
- this.minutes = value % 60 + '';
1833
- this.formatTime();
1834
- super.writeValue(value);
1835
- }
1836
- else {
1837
- this.hours = '';
1838
- this.minutes = '';
1839
- super.writeValue(invalidTimeKey);
1840
- }
1841
- }
1842
- notifyNewTime() {
1843
- const parsedHours = Number(this.hours);
1844
- const parsedMinutes = Number(this.minutes);
1845
- // when all inputs are empty
1846
- if (!stringIsSetAndFilled(this.hours) && !stringIsSetAndFilled(this.minutes)) {
1847
- this.setInnerValueAndNotify(null);
1848
- return;
1849
- }
1850
- // if we have valid time
1851
- if (Number.isFinite(parsedHours) &&
1852
- parsedHours >= 0 &&
1853
- parsedHours <= 9999 &&
1854
- Number.isFinite(parsedMinutes) &&
1855
- parsedMinutes >= 0 &&
1856
- parsedMinutes <= 59) {
1857
- this.setInnerValueAndNotify(parsedHours * 60 + parsedMinutes);
1858
- return;
1859
- }
1860
- // all other cases, we are not in a valid state
1861
- this.setInnerValueAndNotify(invalidTimeKey);
1862
- }
1863
- touchHours() {
1864
- this.hoursTouched = true;
1865
- this.determineAllTouched();
1866
- }
1867
- touchMinutes() {
1868
- this.minutesTouched = true;
1869
- this.determineAllTouched();
1870
- }
1871
- determineAllTouched() {
1872
- if (this.hoursTouched && this.minutesTouched) {
1873
- this.touch();
1874
- }
1875
- }
1876
- }
1877
- HourMinuteInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: HourMinuteInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1878
- HourMinuteInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: HourMinuteInputComponent, selector: "klp-form-hour-minute-input", inputs: { placeholders: "placeholders" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: HourMinuteInputComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\" [ngClass]=\"{disabled: disabled}\">\n\t<input class=\"hourInput\" maxlength=\"4\" [placeholder]=\"placeholders[0]\" [disabled]=\"disabled\" [(ngModel)]=\"hours\" (blur)=\"formatHours(); formatTime(); touchHours(); notifyNewTime()\" (ngModelChange)=\"notifyNewTime()\" #nativeInputRef>\n\t<div class=\"divider\">:</div>\n\t<input maxlength=\"2\" [placeholder]=\"placeholders[1]\" [disabled]=\"disabled\" [(ngModel)]=\"minutes\" (blur)=\"formatMinutes(); formatTime(); touchMinutes(); notifyNewTime()\" (ngModelChange)=\"notifyNewTime()\">\n</div>\n", styles: [":host{display:flex}.componentContainer{height:42px;flex:0 0 auto;padding:6px .625rem;background:#ffffff;display:flex;align-items:center;border:1px solid #e6ecf5}.componentContainer.disabled{background:#f9f9f9;cursor:not-allowed}.componentContainer input{color:#888da8;text-align:center;width:30px;padding:0;border:none}.componentContainer input.hourInput{width:50px}.componentContainer input::placeholder{color:#adadad}.componentContainer .divider{margin:0 .3125rem}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1879
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: HourMinuteInputComponent, decorators: [{
1880
- type: Component,
1881
- args: [{ selector: 'klp-form-hour-minute-input', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: HourMinuteInputComponent, multi: true }], template: "<div class=\"componentContainer\" [ngClass]=\"{disabled: disabled}\">\n\t<input class=\"hourInput\" maxlength=\"4\" [placeholder]=\"placeholders[0]\" [disabled]=\"disabled\" [(ngModel)]=\"hours\" (blur)=\"formatHours(); formatTime(); touchHours(); notifyNewTime()\" (ngModelChange)=\"notifyNewTime()\" #nativeInputRef>\n\t<div class=\"divider\">:</div>\n\t<input maxlength=\"2\" [placeholder]=\"placeholders[1]\" [disabled]=\"disabled\" [(ngModel)]=\"minutes\" (blur)=\"formatMinutes(); formatTime(); touchMinutes(); notifyNewTime()\" (ngModelChange)=\"notifyNewTime()\">\n</div>\n", styles: [":host{display:flex}.componentContainer{height:42px;flex:0 0 auto;padding:6px .625rem;background:#ffffff;display:flex;align-items:center;border:1px solid #e6ecf5}.componentContainer.disabled{background:#f9f9f9;cursor:not-allowed}.componentContainer input{color:#888da8;text-align:center;width:30px;padding:0;border:none}.componentContainer input.hourInput{width:50px}.componentContainer input::placeholder{color:#adadad}.componentContainer .divider{margin:0 .3125rem}\n"] }]
1882
- }], propDecorators: { placeholders: [{
1883
- type: Input
1884
- }] } });
1885
-
1886
- var Orientation;
1887
- (function (Orientation) {
1888
- Orientation["COLUMN"] = "column";
1889
- Orientation["ROW"] = "row";
1890
- })(Orientation || (Orientation = {}));
1891
- class RadioComponent extends ValueAccessorBase {
1892
- constructor() {
1893
- super(...arguments);
1894
- this.orientation = Orientation.ROW;
1895
- this.variant = 'classic';
1896
- }
1897
- }
1898
- RadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1899
- RadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: RadioComponent, selector: "klp-form-radio", inputs: { options: "options", orientation: "orientation", variant: "variant" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\" [class]=\"orientation\">\n\t<ng-container *ngFor=\"let option of options\">\n\t\t<button class=\"optionContainer\"\n\t\t\t[ngClass]=\"{classic: variant === 'classic', button: variant === 'button', isSelected: innerValue === option.id}\"\n\t\t\t(click)=\"setInnerValueAndNotify(option.id)\"\n\t\t>\n\t\t\t<div class=\"selectedRadioBtnContainer\" *ngIf=\"variant === 'classic'\">\n\t\t\t\t<div class=\"selected\" *ngIf=\"innerValue === option.id\"></div>\n\t\t\t</div>\n\t\t\t<div>{{option.name}}</div>\n\t\t</button>\n\t</ng-container>\n</div>\n", styles: [":host{display:block}.componentContainer{position:relative;display:flex}.componentContainer.column{flex-direction:column}.componentContainer.column .optionContainer{margin-bottom:.3125rem}.componentContainer.column .optionContainer:last-child{margin-bottom:0}.componentContainer.row{flex-direction:row}.componentContainer.row .optionContainer:first-child{border-radius:6px 0 0 6px}.componentContainer.row .optionContainer:last-child{border-radius:0 6px 6px 0}.optionContainer{display:flex;flex-direction:row;margin-right:.3125rem;background:transparent;border:none;align-items:center}.optionContainer.classic{cursor:pointer}.optionContainer.classic .selectedRadioBtnContainer{position:relative;height:20px;width:20px;padding:4px;border-radius:50%;border:2px solid #e6ecf5;margin-right:.3125rem}.optionContainer.classic .selectedRadioBtnContainer .selected{height:100%;width:100%;display:block;border-radius:100%;background-color:#27bb5f}.optionContainer.button{position:relative;cursor:pointer;padding:10px 14px;margin-right:0;transition:all .3s ease-in-out;color:#27bb5f;border:1px solid #27bb5f;background-color:#fff}.optionContainer.button.isSelected{background:#27bb5f;color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1900
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioComponent, decorators: [{
1901
- type: Component,
1902
- args: [{ selector: 'klp-form-radio', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }], template: "<div class=\"componentContainer\" [class]=\"orientation\">\n\t<ng-container *ngFor=\"let option of options\">\n\t\t<button class=\"optionContainer\"\n\t\t\t[ngClass]=\"{classic: variant === 'classic', button: variant === 'button', isSelected: innerValue === option.id}\"\n\t\t\t(click)=\"setInnerValueAndNotify(option.id)\"\n\t\t>\n\t\t\t<div class=\"selectedRadioBtnContainer\" *ngIf=\"variant === 'classic'\">\n\t\t\t\t<div class=\"selected\" *ngIf=\"innerValue === option.id\"></div>\n\t\t\t</div>\n\t\t\t<div>{{option.name}}</div>\n\t\t</button>\n\t</ng-container>\n</div>\n", styles: [":host{display:block}.componentContainer{position:relative;display:flex}.componentContainer.column{flex-direction:column}.componentContainer.column .optionContainer{margin-bottom:.3125rem}.componentContainer.column .optionContainer:last-child{margin-bottom:0}.componentContainer.row{flex-direction:row}.componentContainer.row .optionContainer:first-child{border-radius:6px 0 0 6px}.componentContainer.row .optionContainer:last-child{border-radius:0 6px 6px 0}.optionContainer{display:flex;flex-direction:row;margin-right:.3125rem;background:transparent;border:none;align-items:center}.optionContainer.classic{cursor:pointer}.optionContainer.classic .selectedRadioBtnContainer{position:relative;height:20px;width:20px;padding:4px;border-radius:50%;border:2px solid #e6ecf5;margin-right:.3125rem}.optionContainer.classic .selectedRadioBtnContainer .selected{height:100%;width:100%;display:block;border-radius:100%;background-color:#27bb5f}.optionContainer.button{position:relative;cursor:pointer;padding:10px 14px;margin-right:0;transition:all .3s ease-in-out;color:#27bb5f;border:1px solid #27bb5f;background-color:#fff}.optionContainer.button.isSelected{background:#27bb5f;color:#fff}\n"] }]
1903
- }], propDecorators: { options: [{
1904
- type: Input
1905
- }], orientation: [{
1906
- type: Input
1907
- }], variant: [{
1908
- type: Input
1909
- }] } });
1910
-
1911
- class NgxEnhancyFormsModule {
1912
- }
1913
- NgxEnhancyFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: NgxEnhancyFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1914
- NgxEnhancyFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: NgxEnhancyFormsModule, declarations: [ValueAccessorBase,
1915
- MultipleValueAccessorBase,
1916
- ButtonComponent,
1917
- CheckboxComponent,
1918
- DatePickerComponent,
1919
- DateTimePickerComponent,
1920
- EmailInputComponent,
1921
- LoadingIndicatorComponent,
1922
- NumberInputComponent,
1923
- PasswordFieldComponent,
1924
- SelectComponent,
1925
- KlpSelectOptionTemplateDirective,
1926
- SelectFooterComponent,
1927
- SortableItemsComponent,
1928
- SortableGroupedItemsComponent,
1929
- TextInputComponent,
1930
- ToggleComponent,
1931
- FileInputComponent,
1932
- FormCaptionComponent,
1933
- FormElementComponent,
1934
- FormErrorComponent,
1935
- FormSubmitButtonComponent,
1936
- FormComponent,
1937
- SubFormDirective,
1938
- HourMinuteInputComponent,
1939
- RadioComponent], imports: [CommonModule,
1940
- FormsModule,
1941
- NgSelectModule,
1942
- SortablejsModule,
1943
- MaterialModule], exports: [ValueAccessorBase,
1944
- MultipleValueAccessorBase,
1945
- ButtonComponent,
1946
- DatePickerComponent,
1947
- DateTimePickerComponent,
1948
- CheckboxComponent,
1949
- EmailInputComponent,
1950
- LoadingIndicatorComponent,
1951
- NumberInputComponent,
1952
- PasswordFieldComponent,
1953
- SelectComponent,
1954
- KlpSelectOptionTemplateDirective,
1955
- SelectFooterComponent,
1956
- SortableItemsComponent,
1957
- SortableGroupedItemsComponent,
1958
- TextInputComponent,
1959
- ToggleComponent,
1960
- FileInputComponent,
1961
- FormCaptionComponent,
1962
- FormElementComponent,
1963
- FormErrorComponent,
1964
- FormSubmitButtonComponent,
1965
- FormComponent,
1966
- SubFormDirective,
1967
- HourMinuteInputComponent,
1968
- RadioComponent] });
1969
- NgxEnhancyFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: NgxEnhancyFormsModule, imports: [CommonModule,
1970
- FormsModule,
1971
- NgSelectModule,
1972
- SortablejsModule,
1973
- MaterialModule] });
1974
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: NgxEnhancyFormsModule, decorators: [{
1975
- type: NgModule,
1976
- args: [{
1977
- imports: [
1978
- CommonModule,
1979
- FormsModule,
1980
- NgSelectModule,
1981
- SortablejsModule,
1982
- MaterialModule,
1983
- ],
1984
- declarations: [
1985
- ValueAccessorBase,
1986
- MultipleValueAccessorBase,
1987
- ButtonComponent,
1988
- CheckboxComponent,
1989
- DatePickerComponent,
1990
- DateTimePickerComponent,
1991
- EmailInputComponent,
1992
- LoadingIndicatorComponent,
1993
- NumberInputComponent,
1994
- PasswordFieldComponent,
1995
- SelectComponent,
1996
- KlpSelectOptionTemplateDirective,
1997
- SelectFooterComponent,
1998
- SortableItemsComponent,
1999
- SortableGroupedItemsComponent,
2000
- TextInputComponent,
2001
- ToggleComponent,
2002
- FileInputComponent,
2003
- FormCaptionComponent,
2004
- FormElementComponent,
2005
- FormErrorComponent,
2006
- FormSubmitButtonComponent,
2007
- FormComponent,
2008
- SubFormDirective,
2009
- HourMinuteInputComponent,
2010
- RadioComponent
2011
- ],
2012
- exports: [
2013
- ValueAccessorBase,
2014
- MultipleValueAccessorBase,
2015
- ButtonComponent,
2016
- DatePickerComponent,
2017
- DateTimePickerComponent,
2018
- CheckboxComponent,
2019
- EmailInputComponent,
2020
- LoadingIndicatorComponent,
2021
- NumberInputComponent,
2022
- PasswordFieldComponent,
2023
- SelectComponent,
2024
- KlpSelectOptionTemplateDirective,
2025
- SelectFooterComponent,
2026
- SortableItemsComponent,
2027
- SortableGroupedItemsComponent,
2028
- TextInputComponent,
2029
- ToggleComponent,
2030
- FileInputComponent,
2031
- FormCaptionComponent,
2032
- FormElementComponent,
2033
- FormErrorComponent,
2034
- FormSubmitButtonComponent,
2035
- FormComponent,
2036
- SubFormDirective,
2037
- HourMinuteInputComponent,
2038
- RadioComponent
2039
- ]
2040
- }]
2041
- }] });
2042
-
2043
- /*
2044
- * Public API Surface of ngx-enhancy-forms
2045
- */
2046
-
2047
- /**
2048
- * Generated bundle index. Do not edit.
2049
- */
2050
-
2051
- export { ButtonComponent, CheckboxComponent, DATE_PICKER_LOCALE, DATE_PICKER_TRANSLATIONS, DATE_TIME_PICKER_TRANSLATIONS, DEFAULT_ERROR_MESSAGES, DatePickerComponent, DateTimePickerComponent, EmailInputComponent, FORM_ERROR_MESSAGES, FileInputComponent, FormCaptionComponent, FormComponent, FormElementComponent, FormErrorComponent, FormSubmitButtonComponent, HourMinuteInputComponent, KLP_DATE_FORMATS, KlpSelectOptionTemplateDirective, LoadingIndicatorComponent, MultipleValueAccessorBase, NgxEnhancyFormsModule, NumberInputComponent, Orientation, PasswordFieldComponent, RadioComponent, SELECT_TRANSLATIONS, SelectComponent, SelectFooterComponent, SortableGroupedItemsComponent, SortableItemsComponent, SubFormDirective, TextInputComponent, ToggleComponent, ValueAccessorBase, dateValidator, invalidDateKey, invalidFieldsSymbol, matDateFormatsFactory };
2052
- //# sourceMappingURL=klippa-ngx-enhancy-forms.mjs.map