@klippa/ngx-enhancy-forms 4.0.0 → 5.2.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 (39) hide show
  1. package/bundles/klippa-ngx-enhancy-forms.umd.js +583 -95
  2. package/bundles/klippa-ngx-enhancy-forms.umd.js.map +1 -1
  3. package/bundles/klippa-ngx-enhancy-forms.umd.min.js +2 -2
  4. package/bundles/klippa-ngx-enhancy-forms.umd.min.js.map +1 -1
  5. package/esm2015/lib/elements/date-picker/date-picker.component.js +92 -0
  6. package/esm2015/lib/elements/date-time-picker/date-time-picker.component.js +311 -0
  7. package/esm2015/lib/elements/email/email-input.component.js +2 -2
  8. package/esm2015/lib/elements/password-field/password-field.component.js +6 -4
  9. package/esm2015/lib/elements/select/select-footer/select-footer.component.js +15 -0
  10. package/esm2015/lib/elements/select/select.component.js +30 -9
  11. package/esm2015/lib/elements/sortable-items/sortable-items.component.js +46 -4
  12. package/esm2015/lib/elements/text-input/text-input.component.js +7 -4
  13. package/esm2015/lib/elements/value-accessor-base/multiple-value-accessor-base.component.js +63 -0
  14. package/esm2015/lib/elements/value-accessor-base/value-accessor-base.component.js +25 -7
  15. package/esm2015/lib/form/form-element/form-element.component.js +25 -17
  16. package/esm2015/lib/form/form.component.js +21 -5
  17. package/esm2015/lib/ngx-enhancy-forms.module.js +13 -4
  18. package/esm2015/lib/util/values.js +11 -17
  19. package/esm2015/public-api.js +5 -2
  20. package/fesm2015/klippa-ngx-enhancy-forms.js +547 -83
  21. package/fesm2015/klippa-ngx-enhancy-forms.js.map +1 -1
  22. package/klippa-ngx-enhancy-forms.metadata.json +1 -1
  23. package/lib/elements/date-picker/date-picker.component.d.ts +23 -0
  24. package/lib/elements/date-time-picker/date-time-picker.component.d.ts +59 -0
  25. package/lib/elements/email/email-input.component.d.ts +1 -1
  26. package/lib/elements/password-field/password-field.component.d.ts +2 -1
  27. package/lib/elements/select/select-footer/select-footer.component.d.ts +4 -0
  28. package/lib/elements/select/select.component.d.ts +12 -4
  29. package/lib/elements/sortable-items/sortable-items.component.d.ts +12 -2
  30. package/lib/elements/text-input/text-input.component.d.ts +2 -0
  31. package/lib/elements/value-accessor-base/multiple-value-accessor-base.component.d.ts +11 -0
  32. package/lib/elements/value-accessor-base/value-accessor-base.component.d.ts +5 -1
  33. package/lib/form/form-element/form-element.component.d.ts +10 -6
  34. package/lib/form/form.component.d.ts +2 -0
  35. package/lib/util/values.d.ts +3 -4
  36. package/package.json +1 -1
  37. package/public-api.d.ts +4 -1
  38. package/esm2015/lib/elements/datepicker/datepicker.component.js +0 -111
  39. package/lib/elements/datepicker/datepicker.component.d.ts +0 -26
@@ -1,10 +1,10 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('lodash'), require('ngx-sortablejs'), require('@ng-select/ng-select'), require('@angular/material/core'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/button')) :
3
- typeof define === 'function' && define.amd ? define('@klippa/ngx-enhancy-forms', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'lodash', 'ngx-sortablejs', '@ng-select/ng-select', '@angular/material/core', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@angular/material/button'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.klippa = global.klippa || {}, global.klippa["ngx-enhancy-forms"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.lodash, global.ngxSortablejs, global.ngSelect, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global.ng.material.button));
5
- })(this, (function (exports, core, common, forms, lodash, ngxSortablejs, ngSelect, core$1, datepicker, formField, input, button) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('lodash'), require('ngx-sortablejs'), require('@ng-select/ng-select'), require('date-fns'), require('@angular/material/core'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/button')) :
3
+ typeof define === 'function' && define.amd ? define('@klippa/ngx-enhancy-forms', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'lodash', 'ngx-sortablejs', '@ng-select/ng-select', 'date-fns', '@angular/material/core', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@angular/material/button'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.klippa = global.klippa || {}, global.klippa["ngx-enhancy-forms"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.lodash, global.ngxSortablejs, global.ngSelect, global.dateFns, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global.ng.material.button));
5
+ })(this, (function (exports, core, common, forms, lodash, ngxSortablejs, ngSelect, dateFns, core$1, datepicker, formField, input, button) { 'use strict';
6
6
 
7
- function stringIsSetAndNotEmpty(s) {
7
+ function stringIsSetAndFilled(s) {
8
8
  return lodash.isString(s) && s.length > 0;
9
9
  }
10
10
  function isNullOrUndefined(value) {
@@ -16,30 +16,24 @@
16
16
  function isValueSet(value) {
17
17
  return value !== null && value !== undefined;
18
18
  }
19
+ function removeDuplicatesFromArray(array) {
20
+ return array.filter(function (c, i) {
21
+ var firstOccurrenceIndex = array.findIndex(function (c2) { return c2 === c; });
22
+ return i === firstOccurrenceIndex;
23
+ });
24
+ }
19
25
  function stringOrArrayIsSetAndEmpty(value) {
20
26
  return value !== null && value !== undefined && value.length === 0;
21
27
  }
22
- function useIfStringIsSet(s) {
23
- if (stringIsSetAndNotEmpty(s)) {
24
- return s;
25
- }
26
- return undefined;
27
- }
28
- function useIfArrayIsSetWithOneItem(a) {
29
- if (!isNullOrUndefined(a) && a.length === 1) {
30
- return a[0];
31
- }
32
- return undefined;
33
- }
34
- function convertParentToChild(originalClass, newClass) {
35
- return Object.assign(newClass, originalClass);
36
- }
37
28
  function truncateString(s, length) {
38
29
  if (s.length < length) {
39
30
  return s;
40
31
  }
41
32
  return s.substring(0, length) + '...';
42
33
  }
34
+ function arrayIsSetAndFilled(arr) {
35
+ return arr !== null && arr !== undefined && arr.length > 0;
36
+ }
43
37
 
44
38
  var invalidFieldsSymbol = Symbol('Not all fields are valid');
45
39
  var SubFormDirective = /** @class */ (function () {
@@ -69,18 +63,21 @@
69
63
  var injectInto = this.subFormPlaceholder.injectInto;
70
64
  var injectAt = this.subFormPlaceholder.at;
71
65
  if (injectInto instanceof forms.FormArray) {
72
- if (typeof injectAt !== "number") {
66
+ if (typeof injectAt !== 'number') {
73
67
  throw new Error("cannot index FormArray with " + typeof injectAt);
74
68
  }
75
69
  injectInto.setControl(injectAt, this.formGroup);
76
70
  }
77
71
  else if (injectInto instanceof forms.FormGroup) {
78
- if (typeof injectAt !== "string") {
72
+ if (typeof injectAt !== 'string') {
79
73
  throw new Error("cannot index FormGroup with " + typeof injectAt);
80
74
  }
81
75
  injectInto.setControl(injectAt, this.formGroup);
82
76
  }
83
77
  }
78
+ if (isValueSet(this.patchValueInterceptor)) {
79
+ this.addSupportForPatchValueInterceptor();
80
+ }
84
81
  };
85
82
  FormComponent.prototype.ngOnDestroy = function () {
86
83
  var _this = this;
@@ -92,13 +89,25 @@
92
89
  injectInto.removeAt(idx);
93
90
  }
94
91
  else if (injectInto instanceof forms.FormGroup) {
95
- if (typeof injectAt !== "string") {
92
+ if (typeof injectAt !== 'string') {
96
93
  throw new Error("cannot index FormGroup with " + typeof injectAt);
97
94
  }
98
95
  injectInto.removeControl(injectAt);
99
96
  }
100
97
  }
101
98
  };
99
+ FormComponent.prototype.addSupportForPatchValueInterceptor = function () {
100
+ var _this = this;
101
+ var fn = this.formGroup.patchValue;
102
+ var newFn = function (value, options) {
103
+ _this.patchValueInterceptor(value).then(function (val) {
104
+ setTimeout(function () {
105
+ fn.call(_this.formGroup, val, options);
106
+ });
107
+ });
108
+ };
109
+ this.formGroup.patchValue = newFn;
110
+ };
102
111
  FormComponent.prototype.registerControl = function (formControl, formElement) {
103
112
  this.activeControls.push({ formControl: formControl, formElement: formElement });
104
113
  if (this.parent) {
@@ -155,6 +164,7 @@
155
164
  FormComponent.prototype.trySubmit = function () {
156
165
  var _this = this;
157
166
  var _a, _b;
167
+ this.formGroup.updateValueAndValidity();
158
168
  this.formGroup.markAllAsTouched();
159
169
  var allControls = this.getAllFormControls();
160
170
  var originalDisabledStates = allControls.map(function (e) {
@@ -196,20 +206,21 @@
196
206
  { type: SubFormDirective, decorators: [{ type: core.Optional }] }
197
207
  ]; };
198
208
  FormComponent.propDecorators = {
199
- formGroup: [{ type: core.Input }]
209
+ formGroup: [{ type: core.Input }],
210
+ patchValueInterceptor: [{ type: core.Input }]
200
211
  };
201
212
 
202
213
  var FORM_ERROR_MESSAGES = new core.InjectionToken('form.error.messages');
203
214
  var DEFAULT_ERROR_MESSAGES = {
204
- min: "Use a number larger than %min%",
205
- max: "Use a number smaller than %max%",
206
- required: "This field is required",
207
- email: "Use a valid email address",
208
- minLength: "Has to be longer than %minLength% character(s)",
209
- maxLength: "Has to be shorter than %maxLength% character(s)",
210
- pattern: "This input is not valid",
211
- matchPassword: "Passwords must match",
212
- date: "Enter a valid date",
215
+ min: 'Use a number larger than %min%',
216
+ max: 'Use a number smaller than %max%',
217
+ required: 'This field is required',
218
+ email: 'Use a valid email address',
219
+ minLength: 'Has to be longer than %minLength% character(s)',
220
+ maxLength: 'Has to be shorter than %maxLength% character(s)',
221
+ pattern: 'This input is not valid',
222
+ matchPassword: 'Passwords must match',
223
+ date: 'Enter a valid date',
213
224
  };
214
225
  var FormElementComponent = /** @class */ (function () {
215
226
  function FormElementComponent(parent, customMessages) {
@@ -217,6 +228,7 @@
217
228
  this.customMessages = customMessages;
218
229
  this.direction = 'horizontal';
219
230
  this.captionSpacing = 'percentages';
231
+ this.spaceDistribution = '40-60';
220
232
  this.swapInputAndCaption = false;
221
233
  this.errorMessages = DEFAULT_ERROR_MESSAGES;
222
234
  this.customErrorHandlers = [];
@@ -226,11 +238,11 @@
226
238
  return msg.replace("%" + key + "%", parameters[key]);
227
239
  }, message);
228
240
  };
229
- FormElementComponent.prototype.registerControl = function (formControl) {
230
- // console.log('register');
231
- // console.log(this.caption);
241
+ FormElementComponent.prototype.registerControl = function (formControl, input) {
242
+ if (input === void 0) { input = null; }
232
243
  this.attachedControl = formControl;
233
244
  this.parent.registerControl(formControl, this);
245
+ this.input = input;
234
246
  };
235
247
  FormElementComponent.prototype.unregisterControl = function (formControl) {
236
248
  this.attachedControl = null;
@@ -275,7 +287,13 @@
275
287
  // to give some breathing room, we scroll 100px more to the top
276
288
  (_a = this.getScrollableParent(this.internalComponentRef.nativeElement)) === null || _a === void 0 ? void 0 : _a.scrollBy(0, -100);
277
289
  };
278
- FormElementComponent.prototype.getErrorMessages = function (key) {
290
+ FormElementComponent.prototype.isRequired = function () {
291
+ if (isValueSet(this.input)) {
292
+ return this.input.hasValidator('required');
293
+ }
294
+ return false;
295
+ };
296
+ FormElementComponent.prototype.getErrorMessage = function (key) {
279
297
  var _a, _b, _c;
280
298
  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];
281
299
  };
@@ -284,8 +302,8 @@
284
302
  FormElementComponent.decorators = [
285
303
  { type: core.Component, args: [{
286
304
  selector: 'klp-form-element',
287
- template: "<ng-template #errorRef>\n\t<div *ngIf=\"getErrorToShow()\" class=\"errorContainer\">\n\t\t<div *ngIf=\"showDefaultError('min')\">{{substituteParameters(getErrorMessages(\"min\"), {min: attachedControl.errors.min.min})}}</div>\n\t\t<div *ngIf=\"showDefaultError('max')\">{{substituteParameters(getErrorMessages(\"max\"), {max: attachedControl.errors.max.max})}}</div>\n\t\t<div *ngIf=\"showDefaultError('required')\">{{getErrorMessages(\"required\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('email')\">{{getErrorMessages(\"email\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('minlength')\">{{substituteParameters(getErrorMessages(\"minLength\"), {minLength: attachedControl.errors.minlength.requiredLength})}}</div>\n\t\t<div *ngIf=\"showDefaultError('maxlength')\">{{substituteParameters(getErrorMessages(\"maxLength\"), {maxLength: attachedControl.errors.maxlength.requiredLength})}}</div>\n\t\t<div *ngIf=\"showDefaultError('pattern')\">{{getErrorMessages(\"pattern\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('MatchPassword')\">{{getErrorMessages(\"matchPassword\")}}</div>\n\t\t<div *ngIf=\"showDefaultError('date')\">{{getErrorMessages(\"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<ng-container *ngIf=\"direction === 'horizontal'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n<div *ngIf=\"attachedControl\" class=\"componentContainer\" [ngClass]=\"{vertical: direction === 'vertical', reverseOrder: swapInputAndCaption}\" #internalComponentRef>\n\t<div class=\"caption\" [ngClass]=\"{ hasErrors: getErrorToShow() && attachedControl.touched, percentageSpacing: captionSpacing === 'percentages' }\">\n\t\t<div *ngIf=\"captionRef\" [ngTemplateOutlet]=\"captionRef\"></div>\n\t\t<div *ngIf=\"!captionRef\">{{caption}}</div>\n\t</div>\n\t<ng-container *ngIf=\"direction === 'vertical'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n\t<div class=\"inputContainer\" [ngClass]=\"{ percentageSpacing: captionSpacing === 'percentages' }\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n",
288
- styles: [":host{display:block;margin-top:1.25rem}.componentContainer{align-items:center;display:flex}.componentContainer.reverseOrder{flex-direction:row-reverse;justify-content:flex-end}.componentContainer.vertical{display:block;margin-bottom:1rem}.componentContainer.vertical .inputContainer{margin-top:.3125rem}.componentContainer.vertical .errorContainer{margin-left:0}.caption{color:#515365;flex:0 0 auto;font-weight:700}.caption.percentageSpacing{flex:0 0 40%}.caption.hasErrors{color:#ff8000}.inputContainer{flex:0 0 auto}.inputContainer.percentageSpacing{flex:0 0 60%}.errorContainer{color:#ff8000;margin-left:40%}"]
305
+ template: "<ng-template #errorRef>\n\t<div *ngIf=\"getErrorToShow()\" class=\"errorContainer\">\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<ng-container *ngIf=\"direction === 'horizontal'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n<div class=\"componentContainer\" [ngClass]=\"{vertical: direction === 'vertical', reverseOrder: swapInputAndCaption}\" #internalComponentRef>\n\t<div class=\"caption\" *ngIf=\"caption || captionRef\" [ngClass]=\"{ hasErrors: getErrorToShow() && attachedControl.touched, percentageSpacing: captionSpacing === 'percentages', 'd30-70': spaceDistribution === '30-70' }\">\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</div>\n\t<ng-container *ngIf=\"direction === 'vertical'\" [ngTemplateOutlet]=\"errorRef\"></ng-container>\n\t<div class=\"inputContainer\" [ngClass]=\"{ percentageSpacing: captionSpacing === 'percentages', 'd30-70': spaceDistribution === '30-70' }\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n",
306
+ styles: [":host{display:block}.componentContainer{align-items:center;display:flex}.componentContainer.reverseOrder{flex-direction:row-reverse;justify-content:flex-end}.componentContainer.vertical{display:block;margin-bottom:1rem}.componentContainer.vertical .inputContainer{margin-top:.3125rem}.componentContainer.vertical .errorContainer{margin-left:0}.captionRefContainer{display:flex}.caption{color:#515365;flex:0 0 auto;font-weight:700}.caption.percentageSpacing{flex:0 0 40%}.caption.percentageSpacing.d30-70{flex-basis:30%}.caption.hasErrors{color:#ff8000}.inputContainer{flex:1}.inputContainer.percentageSpacing{flex:0 0 60%}.inputContainer.percentageSpacing.d30-70{flex-basis:70%}.errorContainer{color:#ff8000;margin-left:40%}.errorContainer.d30-70{margin-left:30%}"]
289
307
  },] }
290
308
  ];
291
309
  FormElementComponent.ctorParameters = function () { return [
@@ -296,6 +314,7 @@
296
314
  caption: [{ type: core.Input }],
297
315
  direction: [{ type: core.Input }],
298
316
  captionSpacing: [{ type: core.Input }],
317
+ spaceDistribution: [{ type: core.Input }],
299
318
  swapInputAndCaption: [{ type: core.Input }],
300
319
  internalComponentRef: [{ type: core.ViewChild, args: ['internalComponentRef',] }]
301
320
  };
@@ -319,14 +338,16 @@
319
338
  // we support both providing just the formControlName and the full formControl
320
339
  this.formControlName = null;
321
340
  this.formControl = null;
341
+ this.onTouch = new core.EventEmitter();
342
+ this.validators = [];
322
343
  }
323
344
  ValueAccessorBase.prototype.ngOnInit = function () {
324
345
  var _this = this;
325
- var _a, _b, _c;
346
+ var _a, _b, _c, _d;
326
347
  if (this.formControl) {
327
348
  this.attachedFormControl = this.formControl;
328
349
  }
329
- else if (stringIsSetAndNotEmpty(this.formControlName)) {
350
+ else if (stringIsSetAndFilled(this.formControlName)) {
330
351
  this.attachedFormControl = (_a = this.controlContainer) === null || _a === void 0 ? void 0 : _a.control.get(this.formControlName);
331
352
  if (isNullOrUndefined(this.attachedFormControl)) {
332
353
  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.");
@@ -337,7 +358,16 @@
337
358
  this.attachedFormControl.statusChanges.subscribe(function () {
338
359
  _this.disabled = _this.attachedFormControl.disabled;
339
360
  });
340
- (_c = this.parent) === null || _c === void 0 ? void 0 : _c.registerControl(this.attachedFormControl);
361
+ (_c = this.parent) === null || _c === void 0 ? void 0 : _c.registerControl(this.attachedFormControl, this);
362
+ if ((_d = this.attachedFormControl) === null || _d === void 0 ? void 0 : _d.validator) {
363
+ var vals = this.attachedFormControl.validator({});
364
+ if (isValueSet(vals)) {
365
+ this.validators = Object.keys(vals);
366
+ }
367
+ else {
368
+ this.validators = [];
369
+ }
370
+ }
341
371
  }
342
372
  };
343
373
  ValueAccessorBase.prototype.isInErrorState = function () {
@@ -368,6 +398,12 @@
368
398
  ValueAccessorBase.prototype.resetToNull = function () {
369
399
  this.setInnerValueAndNotify(null);
370
400
  };
401
+ ValueAccessorBase.prototype.hasValidator = function (validatorName) {
402
+ if (arrayIsSetAndFilled(this.validators)) {
403
+ return this.validators.includes(validatorName);
404
+ }
405
+ return false;
406
+ };
371
407
  return ValueAccessorBase;
372
408
  }());
373
409
  ValueAccessorBase.decorators = [
@@ -383,7 +419,8 @@
383
419
  ValueAccessorBase.propDecorators = {
384
420
  disabled: [{ type: core.Input }],
385
421
  formControlName: [{ type: core.Input }],
386
- formControl: [{ type: core.Input }]
422
+ formControl: [{ type: core.Input }],
423
+ onTouch: [{ type: core.Output }]
387
424
  };
388
425
 
389
426
  var ButtonComponent = /** @class */ (function () {
@@ -830,6 +867,7 @@
830
867
  function PasswordFieldComponent() {
831
868
  var _this = _super.apply(this, __spread(arguments)) || this;
832
869
  _this.placeholder = 'Password';
870
+ _this.isPasswordConfirm = false;
833
871
  return _this;
834
872
  }
835
873
  return PasswordFieldComponent;
@@ -837,74 +875,157 @@
837
875
  PasswordFieldComponent.decorators = [
838
876
  { type: core.Component, args: [{
839
877
  selector: 'klp-form-password-field',
840
- 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/>\n",
878
+ 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]=\"isPasswordConfirm ? 'Confirm password': 'Password'\"\n\t(blur)=\"touch()\"\n/>\n",
841
879
  providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: PasswordFieldComponent, multi: true }],
842
880
  styles: [":host,input{display:block}input{-moz-transition:all .2s ease-in;-ms-transition:all .2s ease-in;-o-transition:all .2s ease-in;-webkit-transition:all .2s ease-in;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;color:#888da8;font-size:14px;height:42px;outline:none;padding:.375rem .625rem;transition:all .2s ease-in;width:100%}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder,input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{border-color:#3ed778;box-shadow:none;outline:0 none}input.input-sm{height:30px}input.input-lg{height:50px}input.error{background-color:#ffeff4;border-color:#ff3c7e}input.valid{background-color:#ebfaeb;border-color:#37c936;color:#278d26}.showErrors{border-color:#ff8000}"]
843
881
  },] }
844
882
  ];
845
883
  PasswordFieldComponent.propDecorators = {
846
- placeholder: [{ type: core.Input }]
884
+ placeholder: [{ type: core.Input }],
885
+ isPasswordConfirm: [{ type: core.Input }]
847
886
  };
848
887
 
888
+ var SELECT_TRANSLATIONS = new core.InjectionToken('klp.form.select.translations');
849
889
  var SelectComponent = /** @class */ (function (_super) {
850
890
  __extends(SelectComponent, _super);
851
- function SelectComponent(parent, controlContainer) {
891
+ function SelectComponent(parent, controlContainer, translations) {
852
892
  var _this = _super.call(this, parent, controlContainer) || this;
853
893
  _this.parent = parent;
854
894
  _this.controlContainer = controlContainer;
855
- _this.placeholder = 'Pick an option';
895
+ _this.translations = translations;
856
896
  _this.multiple = false;
897
+ _this.multipleDisplayedAsAmount = false;
857
898
  _this.clearable = true;
858
899
  _this.onSearch = new core.EventEmitter();
859
900
  return _this;
860
901
  }
902
+ SelectComponent.prototype.onTextInput = function (value) {
903
+ this.currentQueryString = value;
904
+ this.onSearch.emit(value);
905
+ };
906
+ SelectComponent.prototype.getDefaultTranslation = function (key) {
907
+ var _this = this;
908
+ switch (key) {
909
+ case 'placeholder':
910
+ return function () { var _a; return (_a = _this.placeholder) !== null && _a !== void 0 ? _a : 'Pick an option'; };
911
+ case 'amountSelected':
912
+ return function (amount) { return amount + " selected"; };
913
+ }
914
+ };
915
+ SelectComponent.prototype.getTranslation = function (key, params) {
916
+ if (params === void 0) { params = null; }
917
+ var _a, _b, _c;
918
+ 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);
919
+ };
861
920
  return SelectComponent;
862
921
  }(ValueAccessorBase));
863
922
  SelectComponent.decorators = [
864
923
  { type: core.Component, args: [{
865
924
  selector: 'klp-form-select',
866
- template: "<ng-select\n\t[placeholder]=\"placeholder\"\n\tbindLabel=\"name\"\n\tbindValue=\"id\"\n\t[items]=\"options\"\n\t[clearable]=\"clearable\"\n\t[(ngModel)]=\"innerValue\"\n\t[ngClass]=\"{showErrors: isInErrorState()}\"\n\t(change)=\"setInnerValueAndNotify(innerValue)\"\n\t[multiple]=\"multiple\"\n\t[disabled]=\"disabled\"\n\t(blur)=\"touch()\"\n\t(search)=\"onSearch.emit($event.term)\"\n\t[dropdownPosition]=\"dropdownPosition\"\n\t[searchFn]=\"customSearchFn\"\n>\n\t<ng-template let-item=\"item\" ng-option-tmp>\n\t\t{{ item.name }}\n\t\t<div *ngIf=\"item.description\" class=\"dropdown-item-description\">\n\t\t\t{{ item.description }}\n\t\t</div>\n\t</ng-template>\n</ng-select>\n",
925
+ template: "<ng-select\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()}\"\n\t(change)=\"setInnerValueAndNotify(innerValue)\"\n\t[multiple]=\"multiple\"\n\t[disabled]=\"disabled\"\n\t(blur)=\"touch()\"\n\t(search)=\"onSearch.emit($event.term)\"\n\t[dropdownPosition]=\"dropdownPosition\"\n\t[searchFn]=\"customSearchFn\"\n\t(input)=\"onTextInput($event.target.value)\"\n>\n\t<ng-template let-item=\"item\" ng-option-tmp>\n\t\t{{ item.name }}\n\t\t<div *ngIf=\"item.description\" class=\"dropdown-item-description\">\n\t\t\t{{ item.description }}\n\t\t</div>\n\t</ng-template>\n\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",
867
926
  providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }],
868
- styles: [":host{display:block}.showErrors ::ng-deep .ng-select-container,:host.showErrors ::ng-deep .ng-select-container{border-color:#ff8000}:host ::ng-deep ng-select.ng-select .ng-select-container{color:#888da8}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container{background:#fff;border-color:#3ed778}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container:hover{box-shadow:none}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow{border-color:transparent transparent #999;border-width:0 5px 5px;top:-2px}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow:hover{border-color:transparent transparent #666}:host ::ng-deep .ng-select.ng-select-opened.ng-select-bottom>.ng-select-container{border-bottom-left-radius:0;border-bottom-right-radius:0}:host ::ng-deep .ng-select.ng-select-opened.ng-select-top>.ng-select-container{border-top-left-radius:0;border-top-right-radius:0}:host ::ng-deep .ng-select.ng-select-disabled>.ng-select-container{background-color:#f9f9f9}:host ::ng-deep .ng-select .ng-has-value .ng-placeholder{display:none}:host ::ng-deep .ng-select .ng-select-container{align-items:center;background-clip:padding-box;background-color:#fff;border:1px solid #e6ecf5;border-radius:4px;border-radius:2px;box-shadow:none;box-sizing:border-box;color:#888da8;display:flex;flex-direction:row;font-size:1rem;font-size:14px;line-height:1.5;margin:0;min-height:42px;outline:none;overflow:visible;padding:.375rem .75rem;transition-delay:0s;transition-duration:.2s;transition-property:all;transition-timing-function:ease-in;width:100%}:host ::ng-deep .ng-select .ng-select-container:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-select .ng-select-container .ng-value-container{align-items:center;overflow:hidden;padding-left:10px}:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-placeholder{color:#aaa}:host ::ng-deep .ng-select.ng-select-single .ng-select-container{height:42px}:host ::ng-deep .ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{left:0;padding-left:10px;padding-right:50px;top:5px}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-label{padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding-left:7px;padding-right:10px;padding-top:2px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background-color:#e7faee;border:1px solid #93e8b3;border-radius:2px;display:flex;font-size:.9em;margin-bottom:5px;margin-right:5px;overflow:hidden}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label{padding-left:5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label{display:inline-block;overflow:hidden;padding:0 5px;text-overflow:ellipsis}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:inline-block;padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon:hover{background-color:#93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left{border-right:1px solid #93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.right{border-left:1px solid #c2e0ff}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding-bottom:3px;padding-left:3px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-bottom:3px;padding-left:3px;position:static;top:5px}:host ::ng-deep .ng-select .ng-clear-wrapper{color:#999}:host ::ng-deep .ng-select .ng-clear-wrapper .ng-clear:hover{color:#ff3c7e}:host ::ng-deep .ng-select .ng-spinner-zone{padding-right:5px;padding-top:5px}:host ::ng-deep .ng-select .ng-arrow-wrapper{padding-right:5px;width:25px}:host ::ng-deep .ng-select .ng-arrow-wrapper:hover .ng-arrow{border-top-color:#666}:host ::ng-deep .ng-select .ng-arrow-wrapper .ng-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px}:host ::ng-deep .ng-dropdown-panel{background-color:#fff;border:1px solid #3ed778;box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-top-color:#e6e6e6;margin-top:-1px;top:100%}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom .ng-dropdown-panel-items .ng-option:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host ::ng-deep .ng-dropdown-panel.ng-select-top{border-bottom-color:#e6e6e6;border-top-left-radius:4px;border-top-right-radius:4px;bottom:100%;margin-bottom:-1px}:host ::ng-deep .ng-dropdown-panel.ng-select-top .ng-dropdown-panel-items .ng-option:first-child{border-top-left-radius:4px;border-top-right-radius:4px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-footer{border-top:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items{margin-bottom:1px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;color:rgba(0,0,0,.54);cursor:default;cursor:pointer;font-weight:500;padding:8px 10px;user-select:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled{cursor:default}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-marked{background-color:#ebf5ff}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected{background-color:#f5faff;font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{background-color:#fff;color:rgba(0,0,0,.87);padding:8px 10px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected .ng-option-label{font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:#ccc}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child{padding-left:22px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label{font-size:80%;font-weight:400;padding-right:5px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding-left:0}:host ::ng-deep ng-select.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{color:#888da8;top:9px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option,:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-input>input{color:#888da8}:host ::ng-deep .ng-select.ng-select-auto-grow{max-width:inherit}:host ::ng-deep .ng-select.ng-select-auto-grow .ng-dropdown-panel{width:auto}"]
927
+ styles: [":host{display:block}.showErrors ::ng-deep .ng-select-container,:host.showErrors ::ng-deep .ng-select-container{border-color:#ff8000}:host ::ng-deep ng-select.ng-select .ng-select-container{color:#888da8}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container{background:#fff;border-color:#3ed778}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container:hover{box-shadow:none}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow{border-color:transparent transparent #999;border-width:0 5px 5px;top:-2px}:host ::ng-deep .ng-select.ng-select-opened>.ng-select-container .ng-arrow:hover{border-color:transparent transparent #666}:host ::ng-deep .ng-select.ng-select-opened.ng-select-bottom>.ng-select-container{border-bottom-left-radius:0;border-bottom-right-radius:0}:host ::ng-deep .ng-select.ng-select-opened.ng-select-top>.ng-select-container{border-top-left-radius:0;border-top-right-radius:0}:host ::ng-deep .ng-select.ng-select-disabled>.ng-select-container{background-color:#f9f9f9}:host ::ng-deep .ng-select .ng-has-value .ng-placeholder{display:none}:host ::ng-deep .ng-select .ng-select-container{align-items:center;background-clip:padding-box;background-color:#fff;border:1px solid #e6ecf5;border-radius:4px;border-radius:2px;box-shadow:none;box-sizing:border-box;color:#888da8;display:flex;flex-direction:row;font-size:1rem;font-size:14px;line-height:1.5;margin:0;min-height:42px;outline:none;overflow:visible;padding:.375rem .75rem;transition-delay:0s;transition-duration:.2s;transition-property:all;transition-timing-function:ease-in;width:100%}:host ::ng-deep .ng-select .ng-select-container:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-select .ng-select-container .ng-value-container{align-items:center;overflow:hidden;padding-left:10px}:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-placeholder{color:#aaa}:host ::ng-deep .ng-select.ng-select-single .ng-select-container{height:42px}:host ::ng-deep .ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{left:0;padding-left:10px;padding-right:50px;top:5px}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-label{padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background-color:#e7faee;border:1px solid #93e8b3;border-radius:2px;display:flex;font-size:.9em;margin-bottom:3px;margin-right:5px;margin-top:3px;overflow:hidden}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled{background-color:#f9f9f9;border:1px solid #e3e3e3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label{padding-left:5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label{display:inline-block;overflow:hidden;padding:0 5px;text-overflow:ellipsis}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:inline-block;padding:0 5px}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon:hover{background-color:#93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left{border-right:1px solid #93e8b3}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.right{border-left:1px solid #c2e0ff}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding-bottom:3px;padding-left:3px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-bottom:3px;padding-left:3px;position:static;top:5px}:host ::ng-deep .ng-select .ng-clear-wrapper{color:#999}:host ::ng-deep .ng-select .ng-clear-wrapper .ng-clear:hover{color:#ff3c7e}:host ::ng-deep .ng-select .ng-spinner-zone{padding-right:5px;padding-top:5px}:host ::ng-deep .ng-select .ng-arrow-wrapper{padding-right:5px;width:25px}:host ::ng-deep .ng-select .ng-arrow-wrapper:hover .ng-arrow{border-top-color:#666}:host ::ng-deep .ng-select .ng-arrow-wrapper .ng-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px}:host ::ng-deep .ng-dropdown-panel{background-color:#fff;border:1px solid #3ed778;box-shadow:0 1px 0 rgba(0,0,0,.06)}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-top-color:#e6e6e6;margin-top:-1px;top:100%}:host ::ng-deep .ng-dropdown-panel.ng-select-bottom .ng-dropdown-panel-items .ng-option:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host ::ng-deep .ng-dropdown-panel.ng-select-top{border-bottom-color:#e6e6e6;border-top-left-radius:4px;border-top-right-radius:4px;bottom:100%;margin-bottom:-1px}:host ::ng-deep .ng-dropdown-panel.ng-select-top .ng-dropdown-panel-items .ng-option:first-child{border-top-left-radius:4px;border-top-right-radius:4px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-footer{border-top:1px solid #ccc;padding:5px 7px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items{margin-bottom:1px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;color:rgba(0,0,0,.54);cursor:default;cursor:pointer;font-weight:500;padding:8px 10px;user-select:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled{cursor:default}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-marked{background-color:#ebf5ff}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected{background-color:#f5faff;font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{background-color:#fff;color:rgba(0,0,0,.87);padding:8px 10px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected .ng-option-label{font-weight:600}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:#e7faee;color:#333}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:#ccc}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child{padding-left:22px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label{font-size:80%;font-weight:400;padding-right:5px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding-left:0}:host ::ng-deep ng-select.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{color:#888da8;top:9px}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items .ng-option,:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-input>input{color:#888da8}:host ::ng-deep .ng-select.ng-select-auto-grow{max-width:inherit}:host ::ng-deep .ng-select.ng-select-auto-grow .ng-dropdown-panel{width:auto}"]
869
928
  },] }
870
929
  ];
871
930
  SelectComponent.ctorParameters = function () { return [
872
931
  { type: FormElementComponent, decorators: [{ type: core.Optional }, { type: core.Host }] },
873
- { type: forms.ControlContainer, decorators: [{ type: core.Optional }, { type: core.Host }] }
932
+ { type: forms.ControlContainer, decorators: [{ type: core.Optional }, { type: core.Host }] },
933
+ { type: undefined, decorators: [{ type: core.Inject, args: [SELECT_TRANSLATIONS,] }, { type: core.Optional }] }
874
934
  ]; };
875
935
  SelectComponent.propDecorators = {
876
936
  placeholder: [{ type: core.Input }],
877
937
  options: [{ type: core.Input }],
878
938
  multiple: [{ type: core.Input }],
939
+ multipleDisplayedAsAmount: [{ type: core.Input }],
879
940
  clearable: [{ type: core.Input }],
880
941
  dropdownPosition: [{ type: core.Input }],
881
942
  customSearchFn: [{ type: core.Input }],
943
+ footerElement: [{ type: core.Input }],
882
944
  onSearch: [{ type: core.Output }]
883
945
  };
884
946
 
947
+ var SelectFooterComponent = /** @class */ (function () {
948
+ function SelectFooterComponent() {
949
+ }
950
+ return SelectFooterComponent;
951
+ }());
952
+ SelectFooterComponent.decorators = [
953
+ { type: core.Component, args: [{
954
+ selector: 'klp-select-footer',
955
+ template: "<div class=\"componentContainer\">\n\t<span class=\"prefix\">{{prefix}}</span>\n\t<span class=\"text\">{{text}}</span>\n</div>\n",
956
+ styles: [":host{display:block}.componentContainer{cursor:pointer;padding:6px 10px}.componentContainer:hover{background:#e7faee}.prefix{font-size:80%;padding-right:.625rem}"]
957
+ },] }
958
+ ];
959
+ SelectFooterComponent.propDecorators = {
960
+ prefix: [{ type: core.Input }],
961
+ text: [{ type: core.Input }]
962
+ };
963
+
885
964
  var SortableItemsComponent = /** @class */ (function (_super) {
886
965
  __extends(SortableItemsComponent, _super);
887
966
  function SortableItemsComponent() {
888
967
  var _this = _super.apply(this, __spread(arguments)) || this;
889
968
  _this.sortableItemSize = 'lg';
969
+ _this.useCustomScroll = false;
970
+ _this.scrollInterval = null;
890
971
  _this.itemsOrderChanged = function () {
891
972
  _this.setInnerValueAndNotify(_this.innerValue);
892
973
  };
974
+ _this.onItemDrag = function (data) {
975
+ // if the item you're dragging is reaching the top, start scrolling.
976
+ if (data.relatedRect.top < 100) {
977
+ _this.scrollPage(100);
978
+ }
979
+ else {
980
+ _this.stopScrolling();
981
+ }
982
+ };
983
+ _this.onEnd = function () {
984
+ _this.stopScrolling();
985
+ };
893
986
  return _this;
894
987
  }
988
+ SortableItemsComponent.prototype.ngOnInit = function () {
989
+ _super.prototype.ngOnInit.call(this);
990
+ if (this.useCustomScroll) {
991
+ this.sortablejsOptions = { onUpdate: this.itemsOrderChanged, onMove: this.onItemDrag, onEnd: this.onEnd };
992
+ }
993
+ else {
994
+ this.sortablejsOptions = { onUpdate: this.itemsOrderChanged };
995
+ }
996
+ };
997
+ SortableItemsComponent.prototype.scrollPage = function (scrollAmount) {
998
+ var _this = this;
999
+ if (!isValueSet(this.scrollInterval)) {
1000
+ this.scrollInterval = setInterval(function () {
1001
+ window.scroll({
1002
+ top: document.scrollingElement.scrollTop - scrollAmount,
1003
+ behavior: 'smooth',
1004
+ });
1005
+ if (document.scrollingElement.scrollTop <= 100) {
1006
+ _this.stopScrolling();
1007
+ }
1008
+ }, 100);
1009
+ }
1010
+ };
1011
+ SortableItemsComponent.prototype.stopScrolling = function () {
1012
+ clearInterval(this.scrollInterval);
1013
+ this.scrollInterval = null;
1014
+ };
895
1015
  return SortableItemsComponent;
896
1016
  }(ValueAccessorBase));
897
1017
  SortableItemsComponent.decorators = [
898
1018
  { type: core.Component, args: [{
899
1019
  selector: 'klp-form-sortable-items',
900
- template: "<ng-template #listItem>\n\t<li *ngFor=\"let item of innerValue; index as index\"\n\t class=\"sortableItem\"\n\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 [sortablejs]=\"innerValue\"\n [sortablejsOptions]=\"{ onUpdate: itemsOrderChanged }\"\n class=\"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",
1020
+ 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",
901
1021
  providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: SortableItemsComponent, multi: true }],
902
1022
  styles: [":host{display:block}.itemsContainer{border:1px solid #e6ecf5;border-radius:5px;margin-bottom:0;padding:0}.sortableItem{border-top:1px solid #e6ecf5;cursor:-webkit-grab;cursor:grab;list-style:none}.sortableItem:hover{background:#f8f9fa}.sortableItem:first-child{border-top:none}.largeSortableItem{padding:15px}.smallSortableItem{padding:0 10px}.disabled-mouse-cursor li{cursor:no-drop}"]
903
1023
  },] }
904
1024
  ];
905
1025
  SortableItemsComponent.propDecorators = {
906
1026
  template: [{ type: core.ContentChild, args: [core.TemplateRef,] }],
907
- sortableItemSize: [{ type: core.Input }]
1027
+ sortableItemSize: [{ type: core.Input }],
1028
+ useCustomScroll: [{ type: core.Input }]
908
1029
  };
909
1030
 
910
1031
  var TextInputComponent = /** @class */ (function (_super) {
@@ -912,6 +1033,7 @@
912
1033
  function TextInputComponent() {
913
1034
  var _this = _super.apply(this, __spread(arguments)) || this;
914
1035
  _this.type = 'text';
1036
+ _this.clearable = false;
915
1037
  return _this;
916
1038
  }
917
1039
  return TextInputComponent;
@@ -919,14 +1041,16 @@
919
1041
  TextInputComponent.decorators = [
920
1042
  { type: core.Component, args: [{
921
1043
  selector: 'klp-form-text-input',
922
- template: "<input\n\t[type]=\"type\"\n\tclass=\"form-control\"\n\t[ngClass]=\"{showErrors: isInErrorState()}\"\n\t[(ngModel)]=\"innerValue\"\n\t(input)=\"setInnerValueAndNotify($event.target.value)\"\n\t[placeholder]=\"placeholder ? placeholder : ''\"\n\t(blur)=\"touch()\"\n\t[disabled]='disabled'\n/>\n",
1044
+ 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()\"\n\t\t[disabled]='disabled'\n\t/>\n\t<div class=\"clearIcon\" *ngIf=\"clearable && innerValue?.length > 0\" (click)=\"resetToNull()\">\u00D7</div>\n</div>\n",
923
1045
  providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: TextInputComponent, multi: true }],
924
- styles: [":host,input{display:block}input{-moz-transition:all .2s ease-in;-ms-transition:all .2s ease-in;-o-transition:all .2s ease-in;-webkit-transition:all .2s ease-in;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;color:#888da8;font-size:14px;height:42px;outline:none;padding:.375rem .625rem;transition:all .2s ease-in;width:100%}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder,input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{border-color:#3ed778;box-shadow:none;outline:0 none}input.input-sm{height:30px}input.input-lg{height:50px}input.error{background-color:#ffeff4;border-color:#ff3c7e}input.valid{background-color:#ebfaeb;border-color:#37c936;color:#278d26}.showErrors{border-color:#ff8000}"]
1046
+ styles: [":host{display:block}:host input:disabled{cursor:not-allowed}.componentContainer{position:relative}i{left:.625rem;position:absolute;top:14px}input{-moz-transition:all .2s ease-in;-ms-transition:all .2s ease-in;-o-transition:all .2s ease-in;-webkit-transition:all .2s ease-in;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;color:#888da8;display:block;font-size:14px;height:42px;outline:none;padding:.375rem .625rem;transition:all .2s ease-in;width:100%}input::-webkit-input-placeholder{color:#adadad}input:-moz-placeholder,input::-moz-placeholder{color:#adadad}input:-ms-input-placeholder{color:#adadad}input:focus{border-color:#3ed778;box-shadow:none;outline:0 none}input.input-sm{height:30px}input.input-lg{height:50px}input.error{background-color:#ffeff4;border-color:#ff3c7e}input.valid{background-color:#ebfaeb;border-color:#37c936;color:#278d26}input.hasIcon{padding-left:1.875rem}input.hasClearButton{padding-right:1.875rem}.clearIcon{cursor:pointer;font-size:18px;position:absolute;right:.625rem;top:7px}.showErrors{border-color:#ff8000}"]
925
1047
  },] }
926
1048
  ];
927
1049
  TextInputComponent.propDecorators = {
928
1050
  placeholder: [{ type: core.Input }],
929
- type: [{ type: core.Input }]
1051
+ type: [{ type: core.Input }],
1052
+ clearable: [{ type: core.Input }],
1053
+ icon: [{ type: core.Input }]
930
1054
  };
931
1055
 
932
1056
  var ToggleComponent = /** @class */ (function (_super) {
@@ -1071,38 +1195,226 @@
1071
1195
  _: [{ type: core.HostBinding, args: ['class._fullWidth',] }]
1072
1196
  };
1073
1197
 
1198
+ var MultipleValueAccessorBase = /** @class */ (function (_super) {
1199
+ __extends(MultipleValueAccessorBase, _super);
1200
+ function MultipleValueAccessorBase(parent, controlContainer) {
1201
+ var _this = _super.call(this, parent, controlContainer) || this;
1202
+ _this.parent = parent;
1203
+ _this.controlContainer = controlContainer;
1204
+ _this.multiple = false;
1205
+ return _this;
1206
+ }
1207
+ MultipleValueAccessorBase.prototype.writeValue = function (value) {
1208
+ if (this.multiple) {
1209
+ if (Array.isArray(value)) {
1210
+ _super.prototype.writeValue.call(this, value.filter(isValueSet));
1211
+ }
1212
+ else {
1213
+ _super.prototype.writeValue.call(this, [value].filter(isValueSet));
1214
+ }
1215
+ }
1216
+ else {
1217
+ if (Array.isArray(value)) {
1218
+ _super.prototype.writeValue.call(this, value[0]);
1219
+ }
1220
+ else {
1221
+ _super.prototype.writeValue.call(this, value);
1222
+ }
1223
+ }
1224
+ };
1225
+ MultipleValueAccessorBase.prototype.setInnerValueAndNotify = function (value) {
1226
+ if (this.multiple) {
1227
+ if (Array.isArray(value)) {
1228
+ _super.prototype.setInnerValueAndNotify.call(this, value.filter(isValueSet));
1229
+ }
1230
+ else {
1231
+ _super.prototype.setInnerValueAndNotify.call(this, [value].filter(isValueSet));
1232
+ }
1233
+ }
1234
+ else {
1235
+ if (Array.isArray(value)) {
1236
+ _super.prototype.setInnerValueAndNotify.call(this, value[0]);
1237
+ }
1238
+ else {
1239
+ _super.prototype.setInnerValueAndNotify.call(this, value);
1240
+ }
1241
+ }
1242
+ };
1243
+ return MultipleValueAccessorBase;
1244
+ }(ValueAccessorBase));
1245
+ MultipleValueAccessorBase.decorators = [
1246
+ { type: core.Component, args: [{
1247
+ selector: '',
1248
+ template: ''
1249
+ },] }
1250
+ ];
1251
+ MultipleValueAccessorBase.ctorParameters = function () { return [
1252
+ { type: FormElementComponent, decorators: [{ type: core.Host }, { type: core.Optional }] },
1253
+ { type: forms.ControlContainer, decorators: [{ type: core.Host }, { type: core.Optional }] }
1254
+ ]; };
1255
+ MultipleValueAccessorBase.propDecorators = {
1256
+ multiple: [{ type: core.Input }]
1257
+ };
1258
+
1074
1259
  var invalidDateKey = '--invalid_date--';
1075
1260
  function dateValidator(control) {
1076
1261
  var invalid = control.value === invalidDateKey;
1077
1262
  return invalid ? { date: control.value } : null;
1078
1263
  }
1079
1264
 
1265
+ var DATE_PICKER_TRANSLATIONS = new core.InjectionToken('klp.form.date.translations');
1266
+ var DatePickerComponent = /** @class */ (function (_super) {
1267
+ __extends(DatePickerComponent, _super);
1268
+ function DatePickerComponent(parent, controlContainer, translations) {
1269
+ var _this = _super.call(this, parent, controlContainer) || this;
1270
+ _this.parent = parent;
1271
+ _this.controlContainer = controlContainer;
1272
+ _this.translations = translations;
1273
+ _this.minDate = undefined;
1274
+ _this.maxDate = undefined;
1275
+ _this.sameMonthOnly = false;
1276
+ _this.format = 'dd-MM-yyyy';
1277
+ _this.clearable = false;
1278
+ return _this;
1279
+ }
1280
+ DatePickerComponent.prototype.writeValue = function (value) {
1281
+ if (value === invalidDateKey) {
1282
+ _super.prototype.writeValue.call(this, invalidDateKey);
1283
+ }
1284
+ else if (isNullOrUndefined(value)) {
1285
+ this.dateValue = null;
1286
+ _super.prototype.writeValue.call(this, null);
1287
+ }
1288
+ else {
1289
+ if (Array.isArray(value)) {
1290
+ this.dateValue = value.map(function (e) { return dateFns.parse(e, 'yyyy-MM-dd', new Date()); });
1291
+ }
1292
+ else {
1293
+ this.dateValue = dateFns.parse(value, 'yyyy-MM-dd', new Date());
1294
+ }
1295
+ _super.prototype.writeValue.call(this, value);
1296
+ }
1297
+ };
1298
+ DatePickerComponent.prototype.dateChanged = function (value) {
1299
+ if (value === invalidDateKey) {
1300
+ this.setInnerValueAndNotify(invalidDateKey);
1301
+ }
1302
+ else if (isNullOrUndefined(value)) {
1303
+ this.dateValue = null;
1304
+ this.setInnerValueAndNotify(null);
1305
+ }
1306
+ else {
1307
+ this.dateValue = value;
1308
+ if (Array.isArray(value)) {
1309
+ this.setInnerValueAndNotify(value.map(function (e) { return dateFns.format(e, 'yyyy-MM-dd'); }));
1310
+ }
1311
+ else {
1312
+ this.setInnerValueAndNotify(dateFns.format(value, 'yyyy-MM-dd'));
1313
+ }
1314
+ }
1315
+ };
1316
+ DatePickerComponent.prototype.getDefaultTranslation = function (key) {
1317
+ var _this = this;
1318
+ switch (key) {
1319
+ case 'placeholder':
1320
+ return function () { var _a; return (_a = _this.placeholder) !== null && _a !== void 0 ? _a : 'Select date'; };
1321
+ }
1322
+ };
1323
+ DatePickerComponent.prototype.getTranslation = function (key, params) {
1324
+ if (params === void 0) { params = null; }
1325
+ var _a, _b, _c;
1326
+ if (key === 'placeholder' && this.multiple) {
1327
+ return '';
1328
+ }
1329
+ 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);
1330
+ };
1331
+ return DatePickerComponent;
1332
+ }(MultipleValueAccessorBase));
1333
+ DatePickerComponent.decorators = [
1334
+ { type: core.Component, args: [{
1335
+ selector: 'klp-form-date-picker',
1336
+ 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",
1337
+ providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: DatePickerComponent, multi: true }],
1338
+ styles: [":host{display:block}.componentContainer.showErrors ::ng-deep klp-form-date-time-picker .clearButton,.componentContainer.showErrors ::ng-deep klp-form-date-time-picker .dateContainer{border-color:#ff8000}"]
1339
+ },] }
1340
+ ];
1341
+ DatePickerComponent.ctorParameters = function () { return [
1342
+ { type: FormElementComponent, decorators: [{ type: core.Host }, { type: core.Optional }] },
1343
+ { type: forms.ControlContainer, decorators: [{ type: core.Host }, { type: core.Optional }] },
1344
+ { type: undefined, decorators: [{ type: core.Inject, args: [DATE_PICKER_TRANSLATIONS,] }, { type: core.Optional }] }
1345
+ ]; };
1346
+ DatePickerComponent.propDecorators = {
1347
+ minDate: [{ type: core.Input }],
1348
+ maxDate: [{ type: core.Input }],
1349
+ sameMonthOnly: [{ type: core.Input }],
1350
+ format: [{ type: core.Input }],
1351
+ placeholder: [{ type: core.Input }],
1352
+ clearable: [{ type: core.Input }]
1353
+ };
1354
+
1080
1355
  var KLP_DATE_FORMATS = new core.InjectionToken('klp.form.date.formats');
1356
+ var DATE_TIME_PICKER_TRANSLATIONS = new core.InjectionToken('klp.form.dateTime.translations');
1081
1357
  function matDateFormatsFactory(component, dateFormats) {
1082
1358
  var _a;
1083
1359
  return (_a = dateFormats === null || dateFormats === void 0 ? void 0 : dateFormats(component.format)) !== null && _a !== void 0 ? _a : core$1.MAT_NATIVE_DATE_FORMATS;
1084
1360
  }
1085
- var DatepickerComponent = /** @class */ (function (_super) {
1086
- __extends(DatepickerComponent, _super);
1087
- function DatepickerComponent() {
1088
- var _this = _super.apply(this, __spread(arguments)) || this;
1361
+ var DateTimePickerComponent = /** @class */ (function (_super) {
1362
+ __extends(DateTimePickerComponent, _super);
1363
+ function DateTimePickerComponent(parent, controlContainer, translations, cdr) {
1364
+ var _this = _super.call(this, parent, controlContainer) || this;
1365
+ _this.parent = parent;
1366
+ _this.controlContainer = controlContainer;
1367
+ _this.translations = translations;
1368
+ _this.cdr = cdr;
1089
1369
  _this.minDate = undefined;
1090
1370
  _this.maxDate = undefined;
1091
- _this.placeholder = 'Select date';
1371
+ _this.sameMonthOnly = false;
1372
+ _this.format = 'dd-MM-yyyy';
1092
1373
  _this.clearable = false;
1374
+ _this.showTimeInput = true;
1375
+ _this.invalidTimeAsMidnight = false; // if the time is not valid, use 00:00 as the time
1093
1376
  _this.minDateStartOfDay = undefined;
1094
1377
  _this.maxDateEndOfDay = undefined;
1378
+ _this.selectedDates = [];
1379
+ _this.dateTouched = false;
1380
+ _this.hoursTouched = false;
1381
+ _this.minutesTouched = false;
1382
+ _this.isSelected = function (d) {
1383
+ if (_this.multiple) {
1384
+ return _this.selectedDates.some(function (e) { return e.getTime() === d.getTime(); }) ? 'selected' : '';
1385
+ }
1386
+ return '';
1387
+ };
1388
+ _this.filterDates = function (e) {
1389
+ if (_this.disabled) {
1390
+ return false;
1391
+ }
1392
+ return true;
1393
+ };
1095
1394
  return _this;
1096
1395
  }
1097
- DatepickerComponent.prototype.ngOnChanges = function (changes) {
1396
+ DateTimePickerComponent.prototype.ngOnInit = function () {
1397
+ _super.prototype.ngOnInit.call(this);
1398
+ if (this.multiple) {
1399
+ this.placeholder = '';
1400
+ this.showTimeInput = false;
1401
+ }
1402
+ };
1403
+ DateTimePickerComponent.prototype.ngAfterViewInit = function () {
1404
+ if (this.multiple) {
1405
+ // we are going to overwrite the datepicker closing fn later, so we are saving it here to restore it when needed
1406
+ this.datePickingClosingFn = this.datePickerRef.close;
1407
+ }
1408
+ };
1409
+ DateTimePickerComponent.prototype.ngOnChanges = function (changes) {
1098
1410
  if (changes.minDate) {
1099
- this.setMinDate(changes.minDate.currentValue);
1411
+ this.determineMinAndMaxDates();
1100
1412
  }
1101
1413
  if (changes.maxDate) {
1102
- this.setMaxDate(changes.maxDate.currentValue);
1414
+ this.determineMinAndMaxDates();
1103
1415
  }
1104
1416
  };
1105
- DatepickerComponent.prototype.setMinDate = function (minDate) {
1417
+ DateTimePickerComponent.prototype.setMinDate = function (minDate) {
1106
1418
  if (minDate) {
1107
1419
  this.minDateStartOfDay = new Date(minDate);
1108
1420
  this.minDateStartOfDay.setHours(0, 0, 0, 0);
@@ -1111,7 +1423,7 @@
1111
1423
  this.minDateStartOfDay = undefined;
1112
1424
  }
1113
1425
  };
1114
- DatepickerComponent.prototype.setMaxDate = function (maxDate) {
1426
+ DateTimePickerComponent.prototype.setMaxDate = function (maxDate) {
1115
1427
  if (maxDate) {
1116
1428
  this.maxDateEndOfDay = new Date(maxDate);
1117
1429
  this.maxDateEndOfDay.setHours(23, 59, 59, 999);
@@ -1120,67 +1432,231 @@
1120
1432
  this.maxDateEndOfDay = undefined;
1121
1433
  }
1122
1434
  };
1435
+ DateTimePickerComponent.prototype.getSelectedMonths = function () {
1436
+ return removeDuplicatesFromArray(this.selectedDates.map(function (e) { return dateFns.format(e, 'MMMM'); })).length;
1437
+ };
1123
1438
  // dateChanged is called when the output of the datepicker is changed and
1124
1439
  // parsed correctly. If the date is invalid, it will be called the first time
1125
1440
  // with null but never again until a valid input is provided.
1126
- DatepickerComponent.prototype.dateChanged = function (event) {
1127
- var nativeInputValue = this.nativeInputRef.nativeElement.value;
1441
+ DateTimePickerComponent.prototype.dateChanged = function (event) {
1442
+ var _this = this;
1128
1443
  var date = event.value;
1129
- if (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {
1130
- this.setInnerValueAndNotify(invalidDateKey);
1444
+ if (this.multiple) {
1445
+ this.datePickerRef.close = function () {
1446
+ };
1447
+ if (this.selectedDates.some(function (e) { return e.getTime() === date.getTime(); })) {
1448
+ this.selectedDates = this.selectedDates.filter(function (e) { return e.getTime() !== date.getTime(); });
1449
+ }
1450
+ else {
1451
+ this.selectedDates = __spread(this.selectedDates, [date]);
1452
+ }
1453
+ // START HACK
1454
+ // the date picker does not provide any rerender calls. Therefore, we are going to change the minDate in order to force the render
1455
+ // This is needed to show all selected days in our date picker
1456
+ // We also set the innerValue to null (with this.valueForMaterialDatePicker = null;), otherwise you can not
1457
+ // deselect your last picked date
1458
+ this.cdr.detectChanges();
1459
+ this.valueForMaterialDatePicker = null;
1460
+ var oldMinDate = this.minDateStartOfDay;
1461
+ this.minDateStartOfDay = new Date(0);
1462
+ this.cdr.detectChanges();
1463
+ this.minDateStartOfDay = oldMinDate;
1464
+ // END HACK
1465
+ if (this.sameMonthOnly) {
1466
+ if (this.selectedDates.length >= 2) {
1467
+ if (date < dateFns.startOfMonth(this.selectedDates[0]) || date > dateFns.endOfMonth(this.selectedDates[0])) {
1468
+ this.selectedDates = [date];
1469
+ }
1470
+ }
1471
+ this.determineMinAndMaxDates();
1472
+ }
1473
+ this.setInnerValueAndNotify(this.selectedDates);
1474
+ setTimeout(function () {
1475
+ _this.datePickerRef.close = _this.datePickingClosingFn;
1476
+ });
1131
1477
  }
1132
1478
  else {
1133
- this.setInnerValueAndNotify(date);
1479
+ this.notifyNewDate();
1134
1480
  }
1135
1481
  };
1136
- DatepickerComponent.prototype.writeValue = function (value) {
1482
+ DateTimePickerComponent.prototype.determineMinAndMaxDates = function () {
1483
+ if (this.sameMonthOnly) {
1484
+ if (this.selectedDates.length >= 2) {
1485
+ this.setMinDate(dateFns.startOfMonth(this.selectedDates[0]));
1486
+ this.setMaxDate(dateFns.endOfMonth(this.selectedDates[0]));
1487
+ }
1488
+ else {
1489
+ this.setMinDate(this.minDate);
1490
+ this.setMaxDate(this.maxDate);
1491
+ }
1492
+ }
1493
+ else {
1494
+ this.setMinDate(this.minDate);
1495
+ this.setMinDate(this.maxDate);
1496
+ }
1497
+ };
1498
+ DateTimePickerComponent.prototype.notifyNewDate = function () {
1499
+ var nativeInputValue = this.nativeInputRef.nativeElement.value;
1500
+ var parsedHours = Number(this.hours);
1501
+ var parsedMinutes = Number(this.minutes);
1502
+ // if we dont have the time element
1503
+ if (!this.showTimeInput) {
1504
+ if (!stringIsSetAndFilled(nativeInputValue)) {
1505
+ this.setInnerValueAndNotify(null);
1506
+ return;
1507
+ }
1508
+ if (this.valueForMaterialDatePicker instanceof Date) {
1509
+ this.setInnerValueAndNotify(this.valueForMaterialDatePicker);
1510
+ return;
1511
+ }
1512
+ }
1513
+ // when all inputs are empty
1514
+ if (!stringIsSetAndFilled(nativeInputValue) && !stringIsSetAndFilled(this.hours) && !stringIsSetAndFilled(this.minutes)) {
1515
+ this.setInnerValueAndNotify(null);
1516
+ return;
1517
+ }
1518
+ // if we have date and time
1519
+ if (stringIsSetAndFilled(this.hours) &&
1520
+ Number.isFinite(parsedHours) &&
1521
+ parsedHours >= 0 &&
1522
+ parsedHours <= 23 &&
1523
+ stringIsSetAndFilled(this.minutes) &&
1524
+ Number.isFinite(parsedMinutes) &&
1525
+ parsedMinutes >= 0 &&
1526
+ parsedMinutes <= 59 &&
1527
+ this.valueForMaterialDatePicker instanceof Date) {
1528
+ var newDateWithHours = new Date(this.valueForMaterialDatePicker.setHours(parsedHours));
1529
+ var newDateWithMinutes = new Date(newDateWithHours.setMinutes(parsedMinutes));
1530
+ this.setInnerValueAndNotify(newDateWithMinutes);
1531
+ return;
1532
+ }
1533
+ if (this.invalidTimeAsMidnight) {
1534
+ if (this.valueForMaterialDatePicker instanceof Date) {
1535
+ this.setInnerValueAndNotify(this.valueForMaterialDatePicker);
1536
+ return;
1537
+ }
1538
+ }
1539
+ // all other cases, we are not in a valid state
1540
+ this.setInnerValueAndNotify(invalidDateKey);
1541
+ };
1542
+ DateTimePickerComponent.prototype.writeValue = function (value) {
1137
1543
  _super.prototype.writeValue.call(this, value);
1138
- this.valueForMaterialDatePicker = value === invalidDateKey ? null : value;
1544
+ if (Array.isArray(value)) {
1545
+ this.selectedDates = value;
1546
+ this.determineMinAndMaxDates();
1547
+ this.valueForMaterialDatePicker = null;
1548
+ }
1549
+ else {
1550
+ this.valueForMaterialDatePicker = value === invalidDateKey ? null : value;
1551
+ if (value instanceof Date) {
1552
+ this.hours = String(value.getHours());
1553
+ this.minutes = String(value.getMinutes());
1554
+ this.formatTime();
1555
+ }
1556
+ else {
1557
+ this.hours = '';
1558
+ this.minutes = '';
1559
+ }
1560
+ }
1139
1561
  };
1140
1562
  // nativeValueChanged is called when the internal text value changes, but not
1141
1563
  // when the date is changed via the date picker. We need this so that we can
1142
1564
  // determine if the datepicker is empty or invalid.
1143
- DatepickerComponent.prototype.nativeValueChanged = function (event) {
1144
- var nativeInputValue = event.target.value;
1145
- var date = this.valueForMaterialDatePicker;
1565
+ DateTimePickerComponent.prototype.nativeValueChanged = function () {
1146
1566
  if (this.datePickerRef.opened) {
1147
1567
  // if the user is typing instead of using the picker, close it.
1148
1568
  this.datePickerRef.close();
1149
1569
  }
1150
- if (isNullOrUndefined(date) && stringIsSetAndNotEmpty(nativeInputValue)) {
1151
- this.setInnerValueAndNotify(invalidDateKey);
1152
- }
1153
- else {
1154
- this.setInnerValueAndNotify(date);
1155
- }
1570
+ this.notifyNewDate();
1156
1571
  };
1157
- DatepickerComponent.prototype.resetToNull = function () {
1572
+ DateTimePickerComponent.prototype.resetToNull = function () {
1158
1573
  this.setInnerValueAndNotify(null);
1159
1574
  this.valueForMaterialDatePicker = null;
1160
1575
  this.nativeInputRef.nativeElement.value = null;
1576
+ this.hours = '';
1577
+ this.minutes = '';
1578
+ this.selectedDates = [];
1161
1579
  };
1162
- return DatepickerComponent;
1163
- }(ValueAccessorBase));
1164
- DatepickerComponent.decorators = [
1580
+ DateTimePickerComponent.prototype.formatTime = function () {
1581
+ if (Number.isFinite(Number(this.hours)) && this.hours.length === 1) {
1582
+ this.hours = '0' + this.hours;
1583
+ }
1584
+ if (Number.isFinite(Number(this.minutes)) && this.minutes.length === 1) {
1585
+ this.minutes = '0' + this.minutes;
1586
+ }
1587
+ };
1588
+ DateTimePickerComponent.prototype.touchDate = function () {
1589
+ this.dateTouched = true;
1590
+ this.determineAllTouched();
1591
+ };
1592
+ DateTimePickerComponent.prototype.touchHours = function () {
1593
+ this.hoursTouched = true;
1594
+ this.determineAllTouched();
1595
+ };
1596
+ DateTimePickerComponent.prototype.touchMinutes = function () {
1597
+ this.minutesTouched = true;
1598
+ this.determineAllTouched();
1599
+ };
1600
+ DateTimePickerComponent.prototype.determineAllTouched = function () {
1601
+ if ((this.dateTouched && this.hoursTouched && this.minutesTouched) || (this.dateTouched && !this.showTimeInput)) {
1602
+ this.touch();
1603
+ }
1604
+ };
1605
+ DateTimePickerComponent.prototype.getDefaultTranslation = function (key) {
1606
+ var _this = this;
1607
+ switch (key) {
1608
+ case 'placeholder':
1609
+ return function () { var _a; return (_a = _this.placeholder) !== null && _a !== void 0 ? _a : 'Select date'; };
1610
+ case 'selectDays':
1611
+ return function () { return 'Select day(s)'; };
1612
+ case 'selectedDate':
1613
+ return function (d) { return d.toLocaleDateString(); };
1614
+ case 'daysSelected':
1615
+ return function (amount) { return amount + " days selected"; };
1616
+ case 'selectedInMonth':
1617
+ return function (d) { return " in " + dateFns.format(d, 'MMMM'); };
1618
+ }
1619
+ };
1620
+ DateTimePickerComponent.prototype.getTranslation = function (key, params) {
1621
+ if (params === void 0) { params = null; }
1622
+ var _a, _b, _c;
1623
+ if (key === 'placeholder' && this.multiple) {
1624
+ return '';
1625
+ }
1626
+ 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);
1627
+ };
1628
+ return DateTimePickerComponent;
1629
+ }(MultipleValueAccessorBase));
1630
+ DateTimePickerComponent.decorators = [
1165
1631
  { type: core.Component, args: [{
1166
- selector: 'klp-form-datepicker',
1167
- template: "<div class=\"componentContainer\" [ngClass]=\"{showErrors: isInErrorState()}\">\n\t<mat-form-field [floatLabel]=\"'never'\">\n\t\t<input\n\t\t\t#nativeInput\n\t\t\tmatInput\n\t\t\t[matDatepicker]=\"picker\"\n\t\t\t[(ngModel)]=\"valueForMaterialDatePicker\"\n\t\t\t(dateInput)=\"dateChanged($event)\"\n\t\t\t(input)=\"nativeValueChanged($event)\"\n\t\t\t[min]=\"minDateStartOfDay\"\n\t\t\t[max]=\"maxDateEndOfDay\"\n\t\t\t[placeholder]=\"placeholder\"\n\t\t\t(click)=\"picker.open()\"\n\t\t\t(blur)=\"touch()\"\n\t\t>\n\t\t<mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n\t\t<mat-datepicker #picker\n\t\t></mat-datepicker>\n\t</mat-form-field>\n\t<button *ngIf=\"clearable\" class=\"clearButton\" (click)=\"resetToNull()\">\u00D7</button>\n</div>\n",
1632
+ selector: 'klp-form-date-time-picker',
1633
+ 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></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",
1168
1634
  providers: [
1169
- { provide: forms.NG_VALUE_ACCESSOR, useExisting: DatepickerComponent, multi: true },
1170
- { provide: core$1.MAT_DATE_FORMATS,
1171
- deps: [DatepickerComponent, [new core.Optional(), KLP_DATE_FORMATS]],
1635
+ { provide: forms.NG_VALUE_ACCESSOR, useExisting: DateTimePickerComponent, multi: true },
1636
+ {
1637
+ provide: core$1.MAT_DATE_FORMATS,
1638
+ deps: [DateTimePickerComponent, [new core.Optional(), KLP_DATE_FORMATS]],
1172
1639
  useFactory: matDateFormatsFactory,
1173
1640
  }
1174
1641
  ],
1175
- styles: [":host{display:block}:host ::ng-deep mat-form-field{display:block;height:100%}:host ::ng-deep mat-form-field.mat-focused .mat-form-field-label,:host ::ng-deep mat-form-field .mat-form-field-label{color:#adadad}:host ::ng-deep .mat-datepicker-toggle-active{color:#666}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:none}:host ::ng-deep .mat-form-field-flex{flex-direction:row-reverse}:host ::ng-deep .mat-form-field-infix{border-top:none}: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}.componentContainer{-moz-transition:all .2s ease-in;-ms-transition:all .2s ease-in;-o-transition:all .2s ease-in;-webkit-transition:all .2s ease-in;border:1px solid #e6ecf5;border-radius:2px;box-shadow:none;color:#888da8;display:block;font-size:14px;height:42px;padding:.375rem .625rem;position:relative;transition:all .2s ease-in;width:100%}.componentContainer::-webkit-input-placeholder{color:#adadad}.componentContainer:-moz-placeholder,.componentContainer::-moz-placeholder{color:#adadad}.componentContainer:-ms-input-placeholder{color:#adadad}.componentContainer:focus{border-color:#3ed778;box-shadow:none;outline:0 none}.componentContainer.input-sm{height:30px}.componentContainer.input-lg{height:50px}.componentContainer.error{background-color:#ffeff4;border-color:#ff3c7e}.componentContainer.valid{background-color:#ebfaeb;border-color:#37c936;color:#278d26}.componentContainer.showErrors{border-color:#ff8000}.componentContainer .clearButton{align-items:center;background:none;border:none;bottom:0;color:#7b7b7b;display:flex;font-size:18px;position:absolute;right:1.25rem;top:0}"]
1642
+ styles: [":host{display:block}:host ::ng-deep mat-form-field{display:block;height:100%}:host ::ng-deep mat-form-field.mat-focused .mat-form-field-label,:host ::ng-deep mat-form-field .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{border-radius:2px;color:#888da8;display:flex;position:relative}.componentContainer .placeholderForMultipleSelection{color:#adadad}.componentContainer.showErrors .clearButton.withoutSpacing,.componentContainer.showErrors .dateContainer,.componentContainer.showErrors .timeContainer{border-color:#ff8000}.componentContainer .clearButton{align-items:center;background:#fff;border:1px solid #e6ecf5;color:#7b7b7b;display:flex;flex:0 0 auto;font-size:18px;margin-left:1.25rem;padding:6px 14px}.componentContainer .clearButton.withoutSpacing{border-left:none;margin-left:0}.componentContainer .clearButton:disabled{background:#f9f9f9;border:1px solid #e6ecf5}.componentContainer .dateContainer{background:#fff;border:1px solid #e6ecf5;flex:1 1 auto;padding:6px}.componentContainer .dateContainer.noRightBorder{border-right:none}.componentContainer .dateContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer{align-items:center;background:#fff;border:1px solid #e6ecf5;display:flex;flex:0 0 auto;margin-left:1.25rem;padding:6px .625rem}.componentContainer .timeContainer.disabled{background:#f9f9f9}.componentContainer .timeContainer input{border:none;color:#888da8;padding:0;text-align:center;width:20px}.componentContainer .timeContainer input::-moz-placeholder{color:#adadad}.componentContainer .timeContainer input:-ms-input-placeholder{color:#adadad}.componentContainer .timeContainer input::placeholder{color:#adadad}.componentContainer .timeContainer .divider{margin:0 .3125rem}"]
1176
1643
  },] }
1177
1644
  ];
1178
- DatepickerComponent.propDecorators = {
1645
+ DateTimePickerComponent.ctorParameters = function () { return [
1646
+ { type: FormElementComponent, decorators: [{ type: core.Host }, { type: core.Optional }] },
1647
+ { type: forms.ControlContainer, decorators: [{ type: core.Host }, { type: core.Optional }] },
1648
+ { type: undefined, decorators: [{ type: core.Inject, args: [DATE_TIME_PICKER_TRANSLATIONS,] }, { type: core.Optional }] },
1649
+ { type: core.ChangeDetectorRef }
1650
+ ]; };
1651
+ DateTimePickerComponent.propDecorators = {
1179
1652
  minDate: [{ type: core.Input }],
1180
1653
  maxDate: [{ type: core.Input }],
1654
+ sameMonthOnly: [{ type: core.Input }],
1181
1655
  format: [{ type: core.Input }],
1182
1656
  placeholder: [{ type: core.Input }],
1183
1657
  clearable: [{ type: core.Input }],
1658
+ showTimeInput: [{ type: core.Input }],
1659
+ invalidTimeAsMidnight: [{ type: core.Input }],
1184
1660
  nativeInputRef: [{ type: core.ViewChild, args: ['nativeInput',] }],
1185
1661
  datePickerRef: [{ type: core.ViewChild, args: ['picker',] }]
1186
1662
  };
@@ -1215,14 +1691,17 @@
1215
1691
  ],
1216
1692
  declarations: [
1217
1693
  ValueAccessorBase,
1694
+ MultipleValueAccessorBase,
1218
1695
  ButtonComponent,
1219
1696
  CheckboxComponent,
1220
- DatepickerComponent,
1697
+ DatePickerComponent,
1698
+ DateTimePickerComponent,
1221
1699
  EmailInputComponent,
1222
1700
  LoadingIndicatorComponent,
1223
1701
  NumberInputComponent,
1224
1702
  PasswordFieldComponent,
1225
1703
  SelectComponent,
1704
+ SelectFooterComponent,
1226
1705
  SortableItemsComponent,
1227
1706
  TextInputComponent,
1228
1707
  ToggleComponent,
@@ -1235,14 +1714,17 @@
1235
1714
  ],
1236
1715
  exports: [
1237
1716
  ValueAccessorBase,
1717
+ MultipleValueAccessorBase,
1238
1718
  ButtonComponent,
1239
- DatepickerComponent,
1719
+ DatePickerComponent,
1720
+ DateTimePickerComponent,
1240
1721
  CheckboxComponent,
1241
1722
  EmailInputComponent,
1242
1723
  LoadingIndicatorComponent,
1243
1724
  NumberInputComponent,
1244
1725
  PasswordFieldComponent,
1245
1726
  SelectComponent,
1727
+ SelectFooterComponent,
1246
1728
  SortableItemsComponent,
1247
1729
  TextInputComponent,
1248
1730
  ToggleComponent,
@@ -1266,8 +1748,11 @@
1266
1748
 
1267
1749
  exports.ButtonComponent = ButtonComponent;
1268
1750
  exports.CheckboxComponent = CheckboxComponent;
1751
+ exports.DATE_PICKER_TRANSLATIONS = DATE_PICKER_TRANSLATIONS;
1752
+ exports.DATE_TIME_PICKER_TRANSLATIONS = DATE_TIME_PICKER_TRANSLATIONS;
1269
1753
  exports.DEFAULT_ERROR_MESSAGES = DEFAULT_ERROR_MESSAGES;
1270
- exports.DatepickerComponent = DatepickerComponent;
1754
+ exports.DatePickerComponent = DatePickerComponent;
1755
+ exports.DateTimePickerComponent = DateTimePickerComponent;
1271
1756
  exports.EmailInputComponent = EmailInputComponent;
1272
1757
  exports.FORM_ERROR_MESSAGES = FORM_ERROR_MESSAGES;
1273
1758
  exports.FormCaptionComponent = FormCaptionComponent;
@@ -1277,10 +1762,13 @@
1277
1762
  exports.FormSubmitButtonComponent = FormSubmitButtonComponent;
1278
1763
  exports.KLP_DATE_FORMATS = KLP_DATE_FORMATS;
1279
1764
  exports.LoadingIndicatorComponent = LoadingIndicatorComponent;
1765
+ exports.MultipleValueAccessorBase = MultipleValueAccessorBase;
1280
1766
  exports.NgxEnhancyFormsModule = NgxEnhancyFormsModule;
1281
1767
  exports.NumberInputComponent = NumberInputComponent;
1282
1768
  exports.PasswordFieldComponent = PasswordFieldComponent;
1769
+ exports.SELECT_TRANSLATIONS = SELECT_TRANSLATIONS;
1283
1770
  exports.SelectComponent = SelectComponent;
1771
+ exports.SelectFooterComponent = SelectFooterComponent;
1284
1772
  exports.SortableItemsComponent = SortableItemsComponent;
1285
1773
  exports.SubFormDirective = SubFormDirective;
1286
1774
  exports.TextInputComponent = TextInputComponent;