@klippa/ngx-enhancy-forms 7.3.0 → 7.5.1

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.
@@ -16,12 +16,6 @@
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
- }
25
19
  function stringOrArrayIsSetAndEmpty(value) {
26
20
  return value !== null && value !== undefined && value.length === 0;
27
21
  }
@@ -31,9 +25,6 @@
31
25
  }
32
26
  return s.substring(0, length) + '...';
33
27
  }
34
- function arrayIsSetAndFilled(arr) {
35
- return Array.isArray(arr) && arr !== null && arr !== undefined && arr.length > 0;
36
- }
37
28
 
38
29
  var invalidFieldsSymbol = Symbol('Not all fields are valid');
39
30
  var SubFormDirective = /** @class */ (function () {
@@ -325,181 +316,6 @@
325
316
  internalComponentRef: [{ type: core.ViewChild, args: ['internalComponentRef',] }]
326
317
  };
327
318
 
328
- /**
329
- * This component is a base in order to create a component that supports ngModel.
330
- * Some important things to know about it:
331
- *
332
- * innerValue = your own inner state, which you should use to store the current state of what ngModel should be.
333
- * 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!
334
- * setInnerValueAndNotify() = call this when you want your ngModel to be updated from INSIDE of your component, and provide it to the OUTSIDE.
335
- * 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.
336
- */
337
- var ValueAccessorBase = /** @class */ (function () {
338
- function ValueAccessorBase(parent, controlContainer) {
339
- this.parent = parent;
340
- this.controlContainer = controlContainer;
341
- this.changed = new Array();
342
- this.touched = new Array();
343
- this.prevValue = null;
344
- this.disabled = false;
345
- // we support both providing just the formControlName and the full formControl
346
- this.formControlName = null;
347
- this.formControl = null;
348
- this.onTouch = new core.EventEmitter();
349
- this.validators = [];
350
- }
351
- ValueAccessorBase.prototype.ngOnInit = function () {
352
- var _this = this;
353
- var _a, _b, _c, _d;
354
- if (this.formControl) {
355
- this.attachedFormControl = this.formControl;
356
- }
357
- else if (stringIsSetAndFilled(this.formControlName)) {
358
- this.attachedFormControl = (_a = this.controlContainer) === null || _a === void 0 ? void 0 : _a.control.get(this.formControlName);
359
- if (isNullOrUndefined(this.attachedFormControl)) {
360
- 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.");
361
- }
362
- }
363
- if (this.attachedFormControl) {
364
- this.disabled = this.attachedFormControl.disabled;
365
- this.attachedFormControl.statusChanges.subscribe(function () {
366
- _this.disabled = _this.attachedFormControl.disabled;
367
- });
368
- (_c = this.parent) === null || _c === void 0 ? void 0 : _c.registerControl(this.attachedFormControl, this);
369
- if ((_d = this.attachedFormControl) === null || _d === void 0 ? void 0 : _d.validator) {
370
- var vals = this.attachedFormControl.validator({});
371
- if (isValueSet(vals)) {
372
- this.validators = Object.keys(vals);
373
- }
374
- else {
375
- this.validators = [];
376
- }
377
- }
378
- }
379
- };
380
- ValueAccessorBase.prototype.isInErrorState = function () {
381
- return this.attachedFormControl && this.attachedFormControl.status === 'INVALID' && this.attachedFormControl.touched;
382
- };
383
- ValueAccessorBase.prototype.ngOnDestroy = function () {
384
- var _a;
385
- if (this.attachedFormControl) {
386
- (_a = this.parent) === null || _a === void 0 ? void 0 : _a.unregisterControl(this.attachedFormControl);
387
- }
388
- };
389
- ValueAccessorBase.prototype.touch = function () {
390
- this.touched.forEach(function (f) { return f(); });
391
- };
392
- ValueAccessorBase.prototype.writeValue = function (value) {
393
- this.innerValue = value;
394
- this.prevValue = value;
395
- };
396
- ValueAccessorBase.prototype.registerOnChange = function (fn) {
397
- this.changed.push(fn);
398
- };
399
- ValueAccessorBase.prototype.registerOnTouched = function (fn) {
400
- this.touched.push(fn);
401
- };
402
- ValueAccessorBase.prototype.setInnerValueAndNotify = function (value) {
403
- var _this = this;
404
- var actuallySetValue = function (valueToSet) {
405
- _this.innerValue = valueToSet;
406
- _this.prevValue = valueToSet;
407
- _this.changed.forEach(function (fn) { return fn(valueToSet); });
408
- };
409
- if (isValueSet(this.innerValueChangeInterceptor)) {
410
- this.latestInnerValueChangedInterceptorPromise = this.innerValueChangeInterceptor();
411
- var myPromise_1 = this.latestInnerValueChangedInterceptorPromise;
412
- this.latestInnerValueChangedInterceptorPromise.then(function () {
413
- if (_this.latestInnerValueChangedInterceptorPromise === myPromise_1) {
414
- actuallySetValue(value);
415
- }
416
- else {
417
- // ignore outdated promises
418
- }
419
- }).catch(function () {
420
- if (_this.latestInnerValueChangedInterceptorPromise === myPromise_1) {
421
- actuallySetValue(_this.prevValue);
422
- }
423
- else {
424
- // ignore outdated promises
425
- }
426
- });
427
- }
428
- else {
429
- actuallySetValue(value);
430
- }
431
- };
432
- ValueAccessorBase.prototype.resetToNull = function () {
433
- this.setInnerValueAndNotify(null);
434
- };
435
- ValueAccessorBase.prototype.hasValidator = function (validatorName) {
436
- if (arrayIsSetAndFilled(this.validators)) {
437
- return this.validators.includes(validatorName);
438
- }
439
- return false;
440
- };
441
- return ValueAccessorBase;
442
- }());
443
- ValueAccessorBase.decorators = [
444
- { type: core.Component, args: [{
445
- selector: '',
446
- template: ''
447
- },] }
448
- ];
449
- ValueAccessorBase.ctorParameters = function () { return [
450
- { type: FormElementComponent, decorators: [{ type: core.Host }, { type: core.Optional }] },
451
- { type: forms.ControlContainer, decorators: [{ type: core.Host }, { type: core.Optional }] }
452
- ]; };
453
- ValueAccessorBase.propDecorators = {
454
- disabled: [{ type: core.Input }],
455
- innerValueChangeInterceptor: [{ type: core.Input }],
456
- formControlName: [{ type: core.Input }],
457
- formControl: [{ type: core.Input }],
458
- onTouch: [{ type: core.Output }]
459
- };
460
-
461
- var ButtonComponent = /** @class */ (function () {
462
- function ButtonComponent() {
463
- this.variant = 'white';
464
- this.size = 'medium';
465
- this.fullWidth = false;
466
- this.hasBorder = true;
467
- this.disabled = false;
468
- this.isLoading = false;
469
- this.type = 'button';
470
- }
471
- Object.defineProperty(ButtonComponent.prototype, "_", {
472
- get: function () {
473
- return this.fullWidth;
474
- },
475
- enumerable: false,
476
- configurable: true
477
- });
478
- ButtonComponent.prototype.onClick = function (event) {
479
- if (this.disabled) {
480
- event.stopPropagation();
481
- }
482
- };
483
- return ButtonComponent;
484
- }());
485
- ButtonComponent.decorators = [
486
- { type: core.Component, args: [{
487
- selector: 'klp-form-button',
488
- 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",
489
- styles: [":host{display:inline-block}:host._fullWidth{display:block}.buttonFundamentals{border:1px solid #e6ecf5;border-radius:5px;color:#888da8;cursor:pointer;font-size:13px;font-weight:700;letter-spacing:1px;padding:10px 20px}.fullWidth{width:100%}.no-border{border:none}.caption.invisible{visibility:hidden}button{position:relative}.loadingSpinnerContainer{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.small{padding-bottom:.375rem;padding-top:.375rem}.large{line-height:2}.white{background-color:#fff;border-color:#d4deee;color:#515365;font-weight:500}.white:active,.white:hover{background-color:#edf2f8;border-color:#edf2f8;color:#515365}.white:focus{text-decoration:underline}.greenFilled{background-color:#27bb5f;border-color:#27bb5f;color:#fff}.greenFilled:hover{background-color:#2bd06a;border-color:#2bd06a;color:#fff}.greenFilled:focus{text-decoration:underline}.greenFilled:active{background-color:#23a654;border-color:#23a654}.greenOutlined{background-color:#fff;border-color:#27bb5f;color:#27bb5f}.greenOutlined:hover{background-color:#2bd06a;border-color:#2bd06a;color:#fff}.greenOutlined:focus{text-decoration:underline}.greenOutlined:active{background-color:#23a654;border-color:#23a654}.greenLink{background:none;border:none;color:#27bb5f;padding:0}.greenLink:focus,.greenLink:hover{text-decoration:underline}.contextMenuItem{background-color:#fff;border-color:#fff;color:#888da8}.contextMenuItem:hover{background-color:#f6f7fb;border-color:#f6f7fb}.contextMenuItem:active,.contextMenuItem:focus{text-decoration:underline}.redFilled{background-color:#dc3545;border-color:#dc3545;color:#fff}.redFilled:hover{background-color:#e04b59;border-color:#e04b59;color:#fff}.redFilled:focus{text-decoration:underline}.redFilled:active{background-color:#d32535;border-color:#d32535}.redOutlined{background-color:#fff;border-color:#dc3545;color:#dc3545}.redOutlined:hover{background-color:#e04b59;border-color:#e04b59;color:#fff}.redOutlined:focus{text-decoration:underline}.redOutlined:active{background-color:#d32535;border-color:#d32535}.orangeFilled{background-color:#ff8000;border-color:#ff8000;color:#fff}.orangeFilled:hover{background-color:#ff8d1a;border-color:#ff8d1a;color:#fff}.orangeFilled:focus{text-decoration:underline}.orangeFilled:active{background-color:#e67300;border-color:#e67300}"]
490
- },] }
491
- ];
492
- ButtonComponent.propDecorators = {
493
- variant: [{ type: core.Input }],
494
- size: [{ type: core.Input }],
495
- fullWidth: [{ type: core.Input }],
496
- hasBorder: [{ type: core.Input }],
497
- disabled: [{ type: core.Input }],
498
- isLoading: [{ type: core.Input }],
499
- type: [{ type: core.Input }],
500
- _: [{ type: core.HostBinding, args: ['class._fullWidth',] }]
501
- };
502
-
503
319
  /*! *****************************************************************************
504
320
  Copyright (c) Microsoft Corporation.
505
321
 
@@ -818,6 +634,239 @@
818
634
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
819
635
  }
820
636
 
637
+ function removeDuplicatesFromArraysWithComparator(comparator) {
638
+ var e_1, _a;
639
+ var arrays = [];
640
+ for (var _i = 1; _i < arguments.length; _i++) {
641
+ arrays[_i - 1] = arguments[_i];
642
+ }
643
+ var combined = [];
644
+ try {
645
+ for (var arrays_1 = __values(arrays), arrays_1_1 = arrays_1.next(); !arrays_1_1.done; arrays_1_1 = arrays_1.next()) {
646
+ var array = arrays_1_1.value;
647
+ combined = combined.concat(array);
648
+ }
649
+ }
650
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
651
+ finally {
652
+ try {
653
+ if (arrays_1_1 && !arrays_1_1.done && (_a = arrays_1.return)) _a.call(arrays_1);
654
+ }
655
+ finally { if (e_1) throw e_1.error; }
656
+ }
657
+ return combined.filter(function (c, i) {
658
+ var firstOccurrenceIndex = combined.findIndex(function (c2) { return comparator(c, c2); });
659
+ return i === firstOccurrenceIndex;
660
+ });
661
+ }
662
+ function removeDuplicatesFromArray(array) {
663
+ return array.filter(function (c, i) {
664
+ var firstOccurrenceIndex = array.findIndex(function (c2) { return c2 === c; });
665
+ return i === firstOccurrenceIndex;
666
+ });
667
+ }
668
+ function insertAtIndex(arr, index, item) {
669
+ arr.splice(index, 0, item);
670
+ }
671
+ function arrayIsSetAndFilled(arr) {
672
+ return lodash.isArray(arr) && arr !== null && arr !== undefined && arr.length > 0;
673
+ }
674
+ function asArray(value) {
675
+ if (isValueSet(value)) {
676
+ if (Array.isArray(value)) {
677
+ return value;
678
+ }
679
+ return [value];
680
+ }
681
+ return [];
682
+ }
683
+ function splitArrayByCondition(value, condition) {
684
+ return value.reduce(function (acc, cur) {
685
+ if (condition(cur)) {
686
+ acc.push([]);
687
+ }
688
+ else {
689
+ acc[acc.length - 1].push(cur);
690
+ }
691
+ return acc;
692
+ }, [[]]);
693
+ }
694
+
695
+ /**
696
+ * This component is a base in order to create a component that supports ngModel.
697
+ * Some important things to know about it:
698
+ *
699
+ * innerValue = your own inner state, which you should use to store the current state of what ngModel should be.
700
+ * 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!
701
+ * setInnerValueAndNotify() = call this when you want your ngModel to be updated from INSIDE of your component, and provide it to the OUTSIDE.
702
+ * 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.
703
+ */
704
+ var ValueAccessorBase = /** @class */ (function () {
705
+ function ValueAccessorBase(parent, controlContainer) {
706
+ this.parent = parent;
707
+ this.controlContainer = controlContainer;
708
+ this.changed = new Array();
709
+ this.touched = new Array();
710
+ this.prevValue = null;
711
+ this.disabled = false;
712
+ // we support both providing just the formControlName and the full formControl
713
+ this.formControlName = null;
714
+ this.formControl = null;
715
+ this.onTouch = new core.EventEmitter();
716
+ this.validators = [];
717
+ }
718
+ ValueAccessorBase.prototype.ngOnInit = function () {
719
+ var _this = this;
720
+ var _a, _b, _c, _d;
721
+ if (this.formControl) {
722
+ this.attachedFormControl = this.formControl;
723
+ }
724
+ else if (stringIsSetAndFilled(this.formControlName)) {
725
+ this.attachedFormControl = (_a = this.controlContainer) === null || _a === void 0 ? void 0 : _a.control.get(this.formControlName);
726
+ if (isNullOrUndefined(this.attachedFormControl)) {
727
+ 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.");
728
+ }
729
+ }
730
+ if (this.attachedFormControl) {
731
+ this.disabled = this.attachedFormControl.disabled;
732
+ this.attachedFormControl.statusChanges.subscribe(function () {
733
+ _this.disabled = _this.attachedFormControl.disabled;
734
+ });
735
+ (_c = this.parent) === null || _c === void 0 ? void 0 : _c.registerControl(this.attachedFormControl, this);
736
+ if ((_d = this.attachedFormControl) === null || _d === void 0 ? void 0 : _d.validator) {
737
+ var vals = this.attachedFormControl.validator({});
738
+ if (isValueSet(vals)) {
739
+ this.validators = Object.keys(vals);
740
+ }
741
+ else {
742
+ this.validators = [];
743
+ }
744
+ }
745
+ }
746
+ };
747
+ ValueAccessorBase.prototype.isInErrorState = function () {
748
+ return this.attachedFormControl && this.attachedFormControl.status === 'INVALID' && this.attachedFormControl.touched;
749
+ };
750
+ ValueAccessorBase.prototype.ngOnDestroy = function () {
751
+ var _a;
752
+ if (this.attachedFormControl) {
753
+ (_a = this.parent) === null || _a === void 0 ? void 0 : _a.unregisterControl(this.attachedFormControl);
754
+ }
755
+ };
756
+ ValueAccessorBase.prototype.touch = function () {
757
+ this.touched.forEach(function (f) { return f(); });
758
+ };
759
+ ValueAccessorBase.prototype.writeValue = function (value) {
760
+ this.innerValue = value;
761
+ this.prevValue = value;
762
+ };
763
+ ValueAccessorBase.prototype.registerOnChange = function (fn) {
764
+ this.changed.push(fn);
765
+ };
766
+ ValueAccessorBase.prototype.registerOnTouched = function (fn) {
767
+ this.touched.push(fn);
768
+ };
769
+ ValueAccessorBase.prototype.setInnerValueAndNotify = function (value) {
770
+ var _this = this;
771
+ var actuallySetValue = function (valueToSet) {
772
+ _this.innerValue = valueToSet;
773
+ _this.prevValue = valueToSet;
774
+ _this.changed.forEach(function (fn) { return fn(valueToSet); });
775
+ };
776
+ if (isValueSet(this.innerValueChangeInterceptor)) {
777
+ this.latestInnerValueChangedInterceptorPromise = this.innerValueChangeInterceptor();
778
+ var myPromise_1 = this.latestInnerValueChangedInterceptorPromise;
779
+ this.latestInnerValueChangedInterceptorPromise.then(function () {
780
+ if (_this.latestInnerValueChangedInterceptorPromise === myPromise_1) {
781
+ actuallySetValue(value);
782
+ }
783
+ else {
784
+ // ignore outdated promises
785
+ }
786
+ }).catch(function () {
787
+ if (_this.latestInnerValueChangedInterceptorPromise === myPromise_1) {
788
+ actuallySetValue(_this.prevValue);
789
+ }
790
+ else {
791
+ // ignore outdated promises
792
+ }
793
+ });
794
+ }
795
+ else {
796
+ actuallySetValue(value);
797
+ }
798
+ };
799
+ ValueAccessorBase.prototype.resetToNull = function () {
800
+ this.setInnerValueAndNotify(null);
801
+ };
802
+ ValueAccessorBase.prototype.hasValidator = function (validatorName) {
803
+ if (arrayIsSetAndFilled(this.validators)) {
804
+ return this.validators.includes(validatorName);
805
+ }
806
+ return false;
807
+ };
808
+ return ValueAccessorBase;
809
+ }());
810
+ ValueAccessorBase.decorators = [
811
+ { type: core.Component, args: [{
812
+ selector: '',
813
+ template: ''
814
+ },] }
815
+ ];
816
+ ValueAccessorBase.ctorParameters = function () { return [
817
+ { type: FormElementComponent, decorators: [{ type: core.Host }, { type: core.Optional }] },
818
+ { type: forms.ControlContainer, decorators: [{ type: core.Host }, { type: core.Optional }] }
819
+ ]; };
820
+ ValueAccessorBase.propDecorators = {
821
+ disabled: [{ type: core.Input }],
822
+ innerValueChangeInterceptor: [{ type: core.Input }],
823
+ formControlName: [{ type: core.Input }],
824
+ formControl: [{ type: core.Input }],
825
+ onTouch: [{ type: core.Output }]
826
+ };
827
+
828
+ var ButtonComponent = /** @class */ (function () {
829
+ function ButtonComponent() {
830
+ this.variant = 'white';
831
+ this.size = 'medium';
832
+ this.fullWidth = false;
833
+ this.hasBorder = true;
834
+ this.disabled = false;
835
+ this.isLoading = false;
836
+ this.type = 'button';
837
+ }
838
+ Object.defineProperty(ButtonComponent.prototype, "_", {
839
+ get: function () {
840
+ return this.fullWidth;
841
+ },
842
+ enumerable: false,
843
+ configurable: true
844
+ });
845
+ ButtonComponent.prototype.onClick = function (event) {
846
+ if (this.disabled) {
847
+ event.stopPropagation();
848
+ }
849
+ };
850
+ return ButtonComponent;
851
+ }());
852
+ ButtonComponent.decorators = [
853
+ { type: core.Component, args: [{
854
+ selector: 'klp-form-button',
855
+ 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",
856
+ styles: [":host{display:inline-block}:host._fullWidth{display:block}.buttonFundamentals{border:1px solid #e6ecf5;border-radius:5px;color:#888da8;cursor:pointer;font-size:13px;font-weight:700;letter-spacing:1px;padding:10px 20px}.fullWidth{width:100%}.no-border{border:none}.caption.invisible{visibility:hidden}button{position:relative}.loadingSpinnerContainer{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.small{padding-bottom:.375rem;padding-top:.375rem}.large{line-height:2}.white{background-color:#fff;border-color:#d4deee;color:#515365;font-weight:500}.white:active,.white:hover{background-color:#edf2f8;border-color:#edf2f8;color:#515365}.white:focus{text-decoration:underline}.greenFilled{background-color:#27bb5f;border-color:#27bb5f;color:#fff}.greenFilled:hover{background-color:#2bd06a;border-color:#2bd06a;color:#fff}.greenFilled:focus{text-decoration:underline}.greenFilled:active{background-color:#23a654;border-color:#23a654}.greenOutlined{background-color:#fff;border-color:#27bb5f;color:#27bb5f}.greenOutlined:hover{background-color:#2bd06a;border-color:#2bd06a;color:#fff}.greenOutlined:focus{text-decoration:underline}.greenOutlined:active{background-color:#23a654;border-color:#23a654}.greenLink{background:none;border:none;color:#27bb5f;padding:0}.greenLink:focus,.greenLink:hover{text-decoration:underline}.contextMenuItem{background-color:#fff;border-color:#fff;color:#888da8}.contextMenuItem:hover{background-color:#f6f7fb;border-color:#f6f7fb}.contextMenuItem:active,.contextMenuItem:focus{text-decoration:underline}.redFilled{background-color:#dc3545;border-color:#dc3545;color:#fff}.redFilled:hover{background-color:#e04b59;border-color:#e04b59;color:#fff}.redFilled:focus{text-decoration:underline}.redFilled:active{background-color:#d32535;border-color:#d32535}.redOutlined{background-color:#fff;border-color:#dc3545;color:#dc3545}.redOutlined:hover{background-color:#e04b59;border-color:#e04b59;color:#fff}.redOutlined:focus{text-decoration:underline}.redOutlined:active{background-color:#d32535;border-color:#d32535}.orangeFilled{background-color:#ff8000;border-color:#ff8000;color:#fff}.orangeFilled:hover{background-color:#ff8d1a;border-color:#ff8d1a;color:#fff}.orangeFilled:focus{text-decoration:underline}.orangeFilled:active{background-color:#e67300;border-color:#e67300}"]
857
+ },] }
858
+ ];
859
+ ButtonComponent.propDecorators = {
860
+ variant: [{ type: core.Input }],
861
+ size: [{ type: core.Input }],
862
+ fullWidth: [{ type: core.Input }],
863
+ hasBorder: [{ type: core.Input }],
864
+ disabled: [{ type: core.Input }],
865
+ isLoading: [{ type: core.Input }],
866
+ type: [{ type: core.Input }],
867
+ _: [{ type: core.HostBinding, args: ['class._fullWidth',] }]
868
+ };
869
+
821
870
  var CheckboxComponent = /** @class */ (function (_super) {
822
871
  __extends(CheckboxComponent, _super);
823
872
  function CheckboxComponent() {
@@ -975,9 +1024,9 @@
975
1024
  SelectComponent.decorators = [
976
1025
  { type: core.Component, args: [{
977
1026
  selector: 'klp-form-select',
978
- 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()}\"\n\t(change)=\"setInnerValueAndNotify(innerValue)\"\n\t[multiple]=\"multiple\"\n\t[disabled]=\"disabled\"\n\t(blur)=\"touch()\"\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>\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",
1027
+ 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()}\"\n\t(change)=\"setInnerValueAndNotify(innerValue)\"\n\t[multiple]=\"multiple\"\n\t[disabled]=\"disabled\"\n\t(blur)=\"touch()\"\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>\n\t<ng-template let-item=\"item\" ng-option-tmp>\n\t\t<div [attr.data-cy]=\"item.id\">\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",
979
1028
  providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }],
980
- 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{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:#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 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}"]
1029
+ 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{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:#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 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 div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}: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}"]
981
1030
  },] }
982
1031
  ];
983
1032
  SelectComponent.ctorParameters = function () { return [
@@ -1800,6 +1849,56 @@
1800
1849
  clearable: [{ type: core.Input }]
1801
1850
  };
1802
1851
 
1852
+ var SortableGroupedItemsComponent = /** @class */ (function (_super) {
1853
+ __extends(SortableGroupedItemsComponent, _super);
1854
+ function SortableGroupedItemsComponent() {
1855
+ var _this = _super.apply(this, __spread(arguments)) || this;
1856
+ _this.reloader = true; // sortable items doesnt correctly update, so we have this boolean that flips to rerender the sortable items comp
1857
+ return _this;
1858
+ }
1859
+ SortableGroupedItemsComponent.prototype.writeValue = function (value) {
1860
+ var _this = this;
1861
+ _super.prototype.writeValue.call(this, value);
1862
+ this.reloader = false;
1863
+ setTimeout(function () {
1864
+ if (arrayIsSetAndFilled(value)) {
1865
+ _this.items = value.flatMap(function (e) { return __spread(e, ['']); });
1866
+ }
1867
+ else {
1868
+ _this.items = [];
1869
+ }
1870
+ _this.reloader = true;
1871
+ });
1872
+ };
1873
+ SortableGroupedItemsComponent.prototype.onItemsRearranged = function (value) {
1874
+ var _this = this;
1875
+ var result = splitArrayByCondition(value, function (e) { return e === ''; }).filter(arrayIsSetAndFilled);
1876
+ this.setInnerValueAndNotify(result);
1877
+ this.reloader = false;
1878
+ setTimeout(function () {
1879
+ _this.items = __spread(_this.items, ['']).filter(function (e, i) {
1880
+ if (i === 0 && e === '') {
1881
+ return false;
1882
+ }
1883
+ if (e === '' && _this.items[i - 1] === '') {
1884
+ return false;
1885
+ }
1886
+ return true;
1887
+ });
1888
+ _this.reloader = true;
1889
+ });
1890
+ };
1891
+ return SortableGroupedItemsComponent;
1892
+ }(ValueAccessorBase));
1893
+ SortableGroupedItemsComponent.decorators = [
1894
+ { type: core.Component, args: [{
1895
+ selector: 'klp-form-sortable-grouped-items',
1896
+ 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",
1897
+ providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: SortableGroupedItemsComponent, multi: true }],
1898
+ styles: [":host{display:block}"]
1899
+ },] }
1900
+ ];
1901
+
1803
1902
  var NgxEnhancyFormsModule = /** @class */ (function () {
1804
1903
  function NgxEnhancyFormsModule() {
1805
1904
  }
@@ -1828,6 +1927,7 @@
1828
1927
  SelectComponent,
1829
1928
  SelectFooterComponent,
1830
1929
  SortableItemsComponent,
1930
+ SortableGroupedItemsComponent,
1831
1931
  TextInputComponent,
1832
1932
  ToggleComponent,
1833
1933
  FileInputComponent,
@@ -1852,6 +1952,7 @@
1852
1952
  SelectComponent,
1853
1953
  SelectFooterComponent,
1854
1954
  SortableItemsComponent,
1955
+ SortableGroupedItemsComponent,
1855
1956
  TextInputComponent,
1856
1957
  ToggleComponent,
1857
1958
  FileInputComponent,
@@ -1898,6 +1999,7 @@
1898
1999
  exports.SELECT_TRANSLATIONS = SELECT_TRANSLATIONS;
1899
2000
  exports.SelectComponent = SelectComponent;
1900
2001
  exports.SelectFooterComponent = SelectFooterComponent;
2002
+ exports.SortableGroupedItemsComponent = SortableGroupedItemsComponent;
1901
2003
  exports.SortableItemsComponent = SortableItemsComponent;
1902
2004
  exports.SubFormDirective = SubFormDirective;
1903
2005
  exports.TextInputComponent = TextInputComponent;