@indigina/ui-kit 1.0.41 → 1.0.45

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 (33) hide show
  1. package/bundles/indigina-ui-kit.umd.js +382 -208
  2. package/bundles/indigina-ui-kit.umd.js.map +1 -1
  3. package/bundles/indigina-ui-kit.umd.min.js +1 -1
  4. package/bundles/indigina-ui-kit.umd.min.js.map +1 -1
  5. package/esm2015/lib/components/kit-autocomplete/kit-autocomplete.component.js +13 -3
  6. package/esm2015/lib/components/kit-checkbox/kit-checkbox.component.js +10 -2
  7. package/esm2015/lib/components/kit-checkbox/kit-checkbox.module.js +3 -1
  8. package/esm2015/lib/components/kit-datetimepicker/kit-datetimepicker.component.js +4 -1
  9. package/esm2015/lib/components/kit-dropdown/kit-dropdown.component.js +14 -3
  10. package/esm2015/lib/components/kit-switch/kit-switch.component.js +21 -3
  11. package/esm2015/lib/components/kit-switch/kit-switch.module.js +3 -1
  12. package/esm2015/lib/components/kit-text-label/kit-text-label.component.js +14 -4
  13. package/esm2015/lib/components/kit-textarea/kit-textarea.component.js +14 -4
  14. package/esm2015/lib/components/kit-toggle/kit-toggle.component.js +77 -0
  15. package/esm2015/lib/components/kit-toggle/kit-toggle.module.js +25 -0
  16. package/esm2015/lib/components/kit-units-textbox/kit-units-textbox.component.js +14 -4
  17. package/esm2015/public-api.js +8 -5
  18. package/fesm2015/indigina-ui-kit.js +369 -197
  19. package/fesm2015/indigina-ui-kit.js.map +1 -1
  20. package/indigina-ui-kit.metadata.json +1 -1
  21. package/lib/components/kit-autocomplete/kit-autocomplete.component.d.ts +8 -0
  22. package/lib/components/kit-checkbox/kit-checkbox.component.d.ts +14 -0
  23. package/lib/components/kit-dropdown/kit-dropdown.component.d.ts +9 -0
  24. package/lib/components/kit-switch/kit-switch.component.d.ts +22 -0
  25. package/lib/components/kit-text-label/kit-text-label.component.d.ts +8 -0
  26. package/lib/components/kit-textarea/kit-textarea.component.d.ts +8 -0
  27. package/lib/components/kit-toggle/kit-toggle.component.d.ts +50 -0
  28. package/lib/components/kit-toggle/kit-toggle.module.d.ts +2 -0
  29. package/lib/components/kit-units-textbox/kit-units-textbox.component.d.ts +8 -0
  30. package/package.json +1 -1
  31. package/public-api.d.ts +6 -4
  32. package/styles/colors.scss +1 -0
  33. package/styles/styles.scss +1 -0
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@progress/kendo-angular-buttons'), require('@angular/forms'), require('@progress/kendo-angular-inputs'), require('@progress/kendo-angular-label'), require('@progress/kendo-angular-dropdowns'), require('@angular/animations'), require('@progress/kendo-angular-dateinputs'), require('rxjs'), require('initials'), require('@angular/router'), require('@progress/kendo-angular-menu'), require('@progress/kendo-angular-layout'), require('rxjs/operators')) :
3
- typeof define === 'function' && define.amd ? define('@indigina/ui-kit', ['exports', '@angular/core', '@angular/common', '@progress/kendo-angular-buttons', '@angular/forms', '@progress/kendo-angular-inputs', '@progress/kendo-angular-label', '@progress/kendo-angular-dropdowns', '@angular/animations', '@progress/kendo-angular-dateinputs', 'rxjs', 'initials', '@angular/router', '@progress/kendo-angular-menu', '@progress/kendo-angular-layout', 'rxjs/operators'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.indigina = global.indigina || {}, global.indigina['ui-kit'] = {}), global.ng.core, global.ng.common, global['@progress/kendo-angular-buttons'], global.ng.forms, global['@progress/kendo-angular-inputs'], global['@progress/kendo-angular-label'], global['@progress/kendo-angular-dropdowns'], global.ng.animations, global['@progress/kendo-angular-dateinputs'], global.rxjs, global.initials, global.ng.router, global['@progress/kendo-angular-menu'], global['@progress/kendo-angular-layout'], global.rxjs.operators));
5
- }(this, (function (exports, core, common, kendoAngularButtons, forms, kendoAngularInputs, kendoAngularLabel, kendoAngularDropdowns, animations, kendoAngularDateinputs, rxjs, initials, router, kendoAngularMenu, kendoAngularLayout, operators) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@progress/kendo-angular-buttons'), require('@angular/forms'), require('@progress/kendo-angular-inputs'), require('@progress/kendo-angular-label'), require('rxjs/operators'), require('@progress/kendo-angular-dropdowns'), require('@angular/animations'), require('@progress/kendo-angular-dateinputs'), require('rxjs'), require('initials'), require('@angular/router'), require('@progress/kendo-angular-menu'), require('@progress/kendo-angular-layout')) :
3
+ typeof define === 'function' && define.amd ? define('@indigina/ui-kit', ['exports', '@angular/core', '@angular/common', '@progress/kendo-angular-buttons', '@angular/forms', '@progress/kendo-angular-inputs', '@progress/kendo-angular-label', 'rxjs/operators', '@progress/kendo-angular-dropdowns', '@angular/animations', '@progress/kendo-angular-dateinputs', 'rxjs', 'initials', '@angular/router', '@progress/kendo-angular-menu', '@progress/kendo-angular-layout'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.indigina = global.indigina || {}, global.indigina['ui-kit'] = {}), global.ng.core, global.ng.common, global['@progress/kendo-angular-buttons'], global.ng.forms, global['@progress/kendo-angular-inputs'], global['@progress/kendo-angular-label'], global.rxjs.operators, global['@progress/kendo-angular-dropdowns'], global.ng.animations, global['@progress/kendo-angular-dateinputs'], global.rxjs, global.initials, global.ng.router, global['@progress/kendo-angular-menu'], global['@progress/kendo-angular-layout']));
5
+ }(this, (function (exports, core, common, kendoAngularButtons, forms, kendoAngularInputs, kendoAngularLabel, operators, kendoAngularDropdowns, animations, kendoAngularDateinputs, rxjs, initials, router, kendoAngularMenu, kendoAngularLayout) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -226,10 +226,47 @@
226
226
  },] }
227
227
  ];
228
228
 
229
+ (function (KitInputMessageType) {
230
+ KitInputMessageType["DEFAULT"] = "default";
231
+ KitInputMessageType["HINT"] = "hint";
232
+ KitInputMessageType["DANGER"] = "danger";
233
+ KitInputMessageType["SUCCESS"] = "success";
234
+ })(exports.KitInputMessageType || (exports.KitInputMessageType = {}));
235
+ var KitInputMessageComponent = /** @class */ (function () {
236
+ function KitInputMessageComponent() {
237
+ /**
238
+ * Defines a value which going to be an info message text
239
+ */
240
+ this.type = exports.KitInputMessageType.DEFAULT;
241
+ /**
242
+ * Defines a value which going to be an info message text
243
+ */
244
+ this.message = '';
245
+ }
246
+ return KitInputMessageComponent;
247
+ }());
248
+ KitInputMessageComponent.decorators = [
249
+ { type: core.Component, args: [{
250
+ selector: 'kit-input-message',
251
+ template: "<div class=\"kit-input-message kit-input-message-{{type}} display-flex flex-align-items-center\">\n <kit-svg-icon *ngIf=\"icon\"\n class=\"message-icon\"\n [icon]=\"icon\"\n ></kit-svg-icon>\n <div class=\"message-text\">{{ message }}</div>\n</div>\n",
252
+ encapsulation: core.ViewEncapsulation.None,
253
+ styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-input-message{margin-top:4px}.kit-input-message .message-icon{height:16px;margin-right:4px;width:16px}.kit-input-message .icon{fill:none}.kit-input-message .message-text{color:#27282a;font-size:13px;font-weight:400}.kit-input-message.kit-input-message-hint .message-text{color:#4d5053}.kit-input-message.kit-input-message-success .message-text{color:#0f8732}"]
254
+ },] }
255
+ ];
256
+ KitInputMessageComponent.propDecorators = {
257
+ type: [{ type: core.Input }],
258
+ icon: [{ type: core.Input }],
259
+ message: [{ type: core.Input }]
260
+ };
261
+
229
262
  (function (KitSwitchMode) {
230
263
  KitSwitchMode["SINGLE"] = "single";
231
264
  KitSwitchMode["MULTI"] = "multiple";
232
265
  })(exports.KitSwitchMode || (exports.KitSwitchMode = {}));
266
+ (function (KitSwitchState) {
267
+ KitSwitchState["REGULAR"] = "regular";
268
+ KitSwitchState["DANGER"] = "danger";
269
+ })(exports.KitSwitchState || (exports.KitSwitchState = {}));
233
270
  var KitSwitchComponent = /** @class */ (function () {
234
271
  function KitSwitchComponent() {
235
272
  /**
@@ -241,6 +278,14 @@
241
278
  * defines whether it will be possible to choose several options at time
242
279
  */
243
280
  this.mode = exports.KitSwitchMode.SINGLE;
281
+ /**
282
+ * Defines a value which going to be an info message type
283
+ */
284
+ this.messageType = exports.KitInputMessageType.DEFAULT;
285
+ /**
286
+ * Defines a particular state for the component
287
+ */
288
+ this.state = exports.KitSwitchState.REGULAR;
244
289
  /**
245
290
  * emits when an items has been selected
246
291
  */
@@ -284,10 +329,10 @@
284
329
  KitSwitchComponent.decorators = [
285
330
  { type: core.Component, args: [{
286
331
  selector: 'kit-switch',
287
- template: "<div class=\"kit-switch\">\n <ng-container *ngIf=\"items.length\">\n <label *ngIf=\"label\" class=\"label display-block\"\n [title]=\"label\"\n >{{ label }}</label>\n\n <kendo-buttongroup look=\"outline\" class=\"button-group\"\n [selection]=\"mode\"\n [class.disabled]=\"disabled\">\n <button *ngFor=\"let item of items\" class=\"button\" kendoButton\n [selected]=\"isItemSelected(item)\"\n [togglable]=\"true\"\n [disabled]=\"item.disabled && item.disabled(item)\"\n (selectedChange)=\"onItemSelect($event, item)\">\n <ng-container *ngIf=\"item.title; else icon\">\n {{ item.title }}\n </ng-container>\n\n <ng-template #icon>\n <kit-svg-icon class=\"icon-wrapper\"\n [icon]=\"item.icon\"\n ></kit-svg-icon>\n </ng-template>\n </button>\n </kendo-buttongroup>\n </ng-container>\n</div>\n",
332
+ template: "<div class=\"kit-switch {{ state }}\">\n <ng-container *ngIf=\"items.length\">\n <label *ngIf=\"label\" class=\"label display-block\"\n [title]=\"label\"\n >{{ label }}</label>\n\n <kendo-buttongroup look=\"outline\" class=\"button-group\"\n [selection]=\"mode\"\n [class.disabled]=\"disabled\">\n <button *ngFor=\"let item of items\" class=\"button\" kendoButton\n [selected]=\"isItemSelected(item)\"\n [togglable]=\"true\"\n [disabled]=\"item.disabled && item.disabled(item)\"\n (selectedChange)=\"onItemSelect($event, item)\">\n <ng-container *ngIf=\"item.title; else icon\">\n {{ item.title }}\n </ng-container>\n\n <ng-template #icon>\n <kit-svg-icon class=\"icon-wrapper\"\n [icon]=\"item.icon\"\n ></kit-svg-icon>\n </ng-template>\n </button>\n </kendo-buttongroup>\n <kit-input-message *ngIf=\"messageText\"\n [type]=\"messageType\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n </ng-container>\n</div>\n",
288
333
  changeDetection: core.ChangeDetectionStrategy.OnPush,
289
334
  encapsulation: core.ViewEncapsulation.None,
290
- styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-switch .label{color:#27282a;font-size:13px;font-weight:500;margin-bottom:4px}.kit-switch .button-group{background:#fff;border:1px solid #c1c7d0;border-radius:4px;overflow:hidden}.kit-switch .button-group.disabled{color:#fff;pointer-events:none}.kit-switch .button-group.disabled .button{color:#c1c7d0}.kit-switch .button-group.disabled .icon{stroke:#c1c7d0}.kit-switch .button-group.disabled .button.k-state-selected{background-color:#abcad6;color:#fff}.kit-switch .button.k-button{border:0;border-radius:4px;box-shadow:none;color:var(--theme-color-1,#006890);opacity:1;padding:8px}.kit-switch .button.k-button .icon{fill:none;stroke:var(--theme-color-1,#006890)}.kit-switch .button.k-button.k-state-hover,.kit-switch .button.k-button.k-state-selected,.kit-switch .button.k-button:hover{background-color:var(--theme-color-5,#002a3a);color:#fff}.kit-switch .button.k-button.k-state-hover .icon,.kit-switch .button.k-button.k-state-selected .icon,.kit-switch .button.k-button:hover .icon{stroke:#fff}.kit-switch .button.k-button.k-state-disabled{color:#c1c7d0}.kit-switch .button.k-button.k-state-selected.k-state-disabled{background-color:#abcad6;color:#fff}.kit-switch .icon-wrapper{height:16px;width:16px}"]
335
+ styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-switch .label{color:#27282a;font-size:13px;font-weight:500;margin-bottom:4px}.kit-switch .button-group{background:#fff;border:1px solid #c1c7d0;border-radius:4px;overflow:hidden}.kit-switch .button-group.disabled{color:#fff;pointer-events:none}.kit-switch .button-group.disabled .button{color:#c1c7d0}.kit-switch .button-group.disabled .icon{stroke:#c1c7d0}.kit-switch .button-group.disabled .button.k-state-selected{background-color:#abcad6;color:#fff}.kit-switch .button.k-button{border:0;border-radius:4px;box-shadow:none;color:var(--theme-color-1,#006890);opacity:1;padding:8px}.kit-switch .button.k-button .icon{fill:none;stroke:var(--theme-color-1,#006890)}.kit-switch .button.k-button.k-state-hover,.kit-switch .button.k-button.k-state-selected,.kit-switch .button.k-button:hover{background-color:var(--theme-color-5,#002a3a);color:#fff}.kit-switch .button.k-button.k-state-hover .icon,.kit-switch .button.k-button.k-state-selected .icon,.kit-switch .button.k-button:hover .icon{stroke:#fff}.kit-switch .button.k-button.k-state-disabled{color:#c1c7d0}.kit-switch .button.k-button.k-state-selected.k-state-disabled{background-color:#abcad6;color:#fff}.kit-switch .icon-wrapper{height:16px;width:16px}.kit-switch.danger .k-button-group{background:#f8e0e0;border-color:#ef3e42}"]
291
336
  },] }
292
337
  ];
293
338
  KitSwitchComponent.propDecorators = {
@@ -296,9 +341,33 @@
296
341
  label: [{ type: core.Input }],
297
342
  disabled: [{ type: core.Input }],
298
343
  selection: [{ type: core.Input }],
344
+ messageIcon: [{ type: core.Input }],
345
+ messageText: [{ type: core.Input }],
346
+ messageType: [{ type: core.Input }],
347
+ state: [{ type: core.Input }],
299
348
  selected: [{ type: core.Output }]
300
349
  };
301
350
 
351
+ var KitInputMessageModule = /** @class */ (function () {
352
+ function KitInputMessageModule() {
353
+ }
354
+ return KitInputMessageModule;
355
+ }());
356
+ KitInputMessageModule.decorators = [
357
+ { type: core.NgModule, args: [{
358
+ declarations: [
359
+ KitInputMessageComponent,
360
+ ],
361
+ imports: [
362
+ common.CommonModule,
363
+ KitSvgIconModule,
364
+ ],
365
+ exports: [
366
+ KitInputMessageComponent,
367
+ ],
368
+ },] }
369
+ ];
370
+
302
371
  var KitSwitchModule = /** @class */ (function () {
303
372
  function KitSwitchModule() {
304
373
  }
@@ -317,43 +386,11 @@
317
386
  kendoAngularButtons.ButtonModule,
318
387
  common.CommonModule,
319
388
  KitSvgIconModule,
389
+ KitInputMessageModule,
320
390
  ],
321
391
  },] }
322
392
  ];
323
393
 
324
- (function (KitInputMessageType) {
325
- KitInputMessageType["DEFAULT"] = "default";
326
- KitInputMessageType["HINT"] = "hint";
327
- KitInputMessageType["DANGER"] = "danger";
328
- KitInputMessageType["SUCCESS"] = "success";
329
- })(exports.KitInputMessageType || (exports.KitInputMessageType = {}));
330
- var KitInputMessageComponent = /** @class */ (function () {
331
- function KitInputMessageComponent() {
332
- /**
333
- * Defines a value which going to be an info message text
334
- */
335
- this.type = exports.KitInputMessageType.DEFAULT;
336
- /**
337
- * Defines a value which going to be an info message text
338
- */
339
- this.message = '';
340
- }
341
- return KitInputMessageComponent;
342
- }());
343
- KitInputMessageComponent.decorators = [
344
- { type: core.Component, args: [{
345
- selector: 'kit-input-message',
346
- template: "<div class=\"kit-input-message kit-input-message-{{type}} display-flex flex-align-items-center\">\n <kit-svg-icon *ngIf=\"icon\"\n class=\"message-icon\"\n [icon]=\"icon\"\n ></kit-svg-icon>\n <div class=\"message-text\">{{ message }}</div>\n</div>\n",
347
- encapsulation: core.ViewEncapsulation.None,
348
- styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-input-message{margin-top:4px}.kit-input-message .message-icon{height:16px;margin-right:4px;width:16px}.kit-input-message .icon{fill:none}.kit-input-message .message-text{color:#27282a;font-size:13px;font-weight:400}.kit-input-message.kit-input-message-hint .message-text{color:#4d5053}.kit-input-message.kit-input-message-success .message-text{color:#0f8732}"]
349
- },] }
350
- ];
351
- KitInputMessageComponent.propDecorators = {
352
- type: [{ type: core.Input }],
353
- icon: [{ type: core.Input }],
354
- message: [{ type: core.Input }]
355
- };
356
-
357
394
  var KitTextboxComponent = /** @class */ (function () {
358
395
  function KitTextboxComponent() {
359
396
  /**
@@ -442,26 +479,6 @@
442
479
  changed: [{ type: core.Output }]
443
480
  };
444
481
 
445
- var KitInputMessageModule = /** @class */ (function () {
446
- function KitInputMessageModule() {
447
- }
448
- return KitInputMessageModule;
449
- }());
450
- KitInputMessageModule.decorators = [
451
- { type: core.NgModule, args: [{
452
- declarations: [
453
- KitInputMessageComponent,
454
- ],
455
- imports: [
456
- common.CommonModule,
457
- KitSvgIconModule,
458
- ],
459
- exports: [
460
- KitInputMessageComponent,
461
- ],
462
- },] }
463
- ];
464
-
465
482
  var KitTextboxModule = /** @class */ (function () {
466
483
  function KitTextboxModule() {
467
484
  }
@@ -595,6 +612,158 @@
595
612
  },] }
596
613
  ];
597
614
 
615
+ (function (KitAutocompleteState) {
616
+ KitAutocompleteState["REGULAR"] = "regular";
617
+ KitAutocompleteState["DANGER"] = "danger";
618
+ })(exports.KitAutocompleteState || (exports.KitAutocompleteState = {}));
619
+ var KitAutocompleteComponent = /** @class */ (function () {
620
+ function KitAutocompleteComponent(elementRef) {
621
+ var _this = this;
622
+ this.elementRef = elementRef;
623
+ /**
624
+ * Defines an items list which is going to be an autocomplete items data
625
+ */
626
+ this.items = [];
627
+ /**
628
+ * Defines whether the loader will be visible or not
629
+ */
630
+ this.loaderVisible = false;
631
+ /**
632
+ * Defines a value which going to be an info message type
633
+ */
634
+ this.messageType = exports.KitInputMessageType.DEFAULT;
635
+ /**
636
+ * Defines a particular state for the component
637
+ */
638
+ this.state = exports.KitAutocompleteState.REGULAR;
639
+ /**
640
+ * An action which is emitted when input value changed
641
+ */
642
+ this.changed = new core.EventEmitter();
643
+ /**
644
+ * An action which is emitted once an item in the dropdown is selected
645
+ */
646
+ this.selected = new core.EventEmitter();
647
+ /**
648
+ * An action which is emitted when input lost focus
649
+ */
650
+ this.blured = new core.EventEmitter();
651
+ /**
652
+ * Function that emit normalized selected dropdown list item in case when
653
+ * inputted data changed and component lost focus
654
+ */
655
+ this.normalizedSelectedValue$ = function (text$) { return text$.pipe(operators.map(function (content) {
656
+ _this.selectedValue = content && _this.selectedValue || null;
657
+ _this.selected.emit(_this.selectedValue);
658
+ _this.onChange(_this.selectedValue || null);
659
+ return _this.selectedValue;
660
+ })); };
661
+ /**
662
+ * Settings for popup that will be opened as dropdown options list
663
+ */
664
+ this.dropdownPopupSettings = {
665
+ appendTo: 'component',
666
+ popupClass: 'kit-autocomplete-popup',
667
+ };
668
+ /**
669
+ * Function that should be called every time the form control value changes
670
+ */
671
+ this.onChange = function (value) {
672
+ };
673
+ /**
674
+ * Function that should be called when input lost focus and changed form control state to "touched"
675
+ */
676
+ this.onTouched = function () {
677
+ };
678
+ }
679
+ /**
680
+ * Callback function that return dropdown list item text
681
+ */
682
+ KitAutocompleteComponent.prototype.getOptionText = function (item) {
683
+ return item.getText && item.getText() || item.text;
684
+ };
685
+ /**
686
+ * Function that is called when input value changed
687
+ */
688
+ KitAutocompleteComponent.prototype.onFilterChange = function (value) {
689
+ this.changed.emit(value);
690
+ };
691
+ /**
692
+ * Function that is called when dropdown list item selected
693
+ */
694
+ KitAutocompleteComponent.prototype.onValueSelect = function (item) {
695
+ if (!item) {
696
+ return;
697
+ }
698
+ this.selectedValue = item;
699
+ this.selected.emit(this.selectedValue);
700
+ this.onChange(this.selectedValue);
701
+ };
702
+ /**
703
+ * Function that is called when input field lost focus
704
+ */
705
+ KitAutocompleteComponent.prototype.onBlur = function () {
706
+ this.onTouched();
707
+ this.blured.emit();
708
+ };
709
+ /**
710
+ * Function that is called when input field get focus
711
+ */
712
+ KitAutocompleteComponent.prototype.onFocus = function () {
713
+ this.elementRef.nativeElement.querySelector('.k-input').select();
714
+ };
715
+ KitAutocompleteComponent.prototype.writeValue = function (value) {
716
+ this.onChange(value);
717
+ this.selectedValue = value;
718
+ };
719
+ KitAutocompleteComponent.prototype.registerOnChange = function (fn) {
720
+ this.onChange = fn;
721
+ };
722
+ KitAutocompleteComponent.prototype.registerOnTouched = function (fn) {
723
+ this.onTouched = fn;
724
+ };
725
+ KitAutocompleteComponent.prototype.setDisabledState = function (disabled) {
726
+ this.disabled = disabled;
727
+ };
728
+ return KitAutocompleteComponent;
729
+ }());
730
+ KitAutocompleteComponent.decorators = [
731
+ { type: core.Component, args: [{
732
+ selector: 'kit-autocomplete',
733
+ template: "<div class=\"kit-autocomplete {{ state }}\"\n [class.autocomplete-empty]=\"!items || !items.length\"\n [class.autocomplete-disabled]=\"disabled\"\n [class.autocomplete-loading]=\"loaderVisible\">\n <kendo-label *ngIf=\"label\" class=\"label display-block\"\n [text]=\"label\"\n [for]=\"combobox\">\n </kendo-label>\n <div class=\"autocomplete-wrap\">\n <kendo-combobox #combobox textField=\"text\" valueField=\"value\"\n kendoDropDownFilter\n [data]=\"items\"\n [placeholder]=\"placeholder\"\n [filterable]=\"true\"\n [disabled]=\"disabled\"\n [clearButton]=\"false\"\n [value]=\"selectedValue\"\n [allowCustom]=\"true\"\n [valueNormalizer]=\"normalizedSelectedValue$\"\n [popupSettings]=\"dropdownPopupSettings\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (selectionChange)=\"onValueSelect($event)\"\n (filterChange)=\"onFilterChange($event)\"\n >\n <ng-template kendoAutoCompleteNoDataTemplate></ng-template>\n <ng-template kendoComboBoxHeaderTemplate>\n <kit-loader *ngIf=\"loaderVisible\" class=\"loader\"></kit-loader>\n </ng-template>\n <ng-template kendoComboBoxItemTemplate let-item>\n <span class=\"template\">{{ getOptionText(item) }}</span>\n </ng-template>\n </kendo-combobox>\n <kit-svg-icon class=\"input-icon\" icon=\"search\"></kit-svg-icon>\n </div>\n <kit-input-message *ngIf=\"messageText\"\n [type]=\"messageType\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
734
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
735
+ encapsulation: core.ViewEncapsulation.None,
736
+ providers: [{
737
+ provide: forms.NG_VALUE_ACCESSOR,
738
+ useExisting: core.forwardRef(function () { return KitAutocompleteComponent; }),
739
+ multi: true,
740
+ }],
741
+ styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-autocomplete .label{color:#27282a;font-size:13px;font-weight:500;margin-bottom:4px}.kit-autocomplete .autocomplete-wrap{align-items:center;display:flex;position:relative}.kit-autocomplete .k-select{display:none}.kit-autocomplete .k-combobox{width:100%}.kit-autocomplete .k-dropdown-wrap{background:#fff;border:1px solid #c1c7d0;border-radius:4px;height:34px}.kit-autocomplete .k-dropdown-wrap.k-state-focused{box-shadow:none}.kit-autocomplete .k-input{color:#27282a;font-size:14px;height:100%;padding:0 32px 0 8px}.kit-autocomplete .k-input::-moz-selection{background:#006890}.kit-autocomplete .k-input::selection{background:#006890}.kit-autocomplete .kit-loader,.kit-autocomplete .kit-loader>div,.kit-autocomplete .loader{height:100%}.kit-autocomplete .input-icon{fill:#fff;height:16px;position:absolute;right:8px;stroke:#000;width:16px}.kit-autocomplete .kit-autocomplete-popup{background-color:#f3f4f6;border:1px solid #c1c7d0;border-radius:4px;box-shadow:0 0 5px rgba(0,62,86,.5);margin-top:4px;padding:4px}.kit-autocomplete .kit-autocomplete-popup .k-item{background-color:#fff;border-radius:2px;box-shadow:none;color:#27282a;font-size:13px;font-weight:500;line-height:1.26;min-height:auto;padding:8px}.kit-autocomplete .kit-autocomplete-popup .k-item:not(:last-of-type){margin-bottom:4px}.kit-autocomplete .kit-autocomplete-popup .k-item:hover{background-color:#f3f5fa;color:#006890}.kit-autocomplete:focus-within .k-dropdown-wrap{border-color:#006890}.kit-autocomplete.autocomplete-loading .kit-autocomplete-popup{height:200px}.kit-autocomplete.autocomplete-empty .kit-autocomplete-popup,.kit-autocomplete.autocomplete-loading .kit-autocomplete-popup .k-list-scroller,.kit-autocomplete.autocomplete-loading .kit-autocomplete-popup .k-nodata{display:none}.kit-autocomplete.autocomplete-disabled .label{color:#74777d}.kit-autocomplete.danger .k-dropdown-wrap{background:#f8e0e0;border-color:#ef3e42}.kit-autocomplete.danger .input-icon{fill:#f8e0e0}"]
742
+ },] }
743
+ ];
744
+ KitAutocompleteComponent.ctorParameters = function () { return [
745
+ { type: core.ElementRef }
746
+ ]; };
747
+ KitAutocompleteComponent.propDecorators = {
748
+ label: [{ type: core.Input }],
749
+ placeholder: [{ type: core.Input }],
750
+ items: [{ type: core.Input }],
751
+ selectedValue: [{ type: core.Input }],
752
+ disabled: [{ type: core.Input }],
753
+ loaderVisible: [{ type: core.Input }],
754
+ messageIcon: [{ type: core.Input }],
755
+ messageText: [{ type: core.Input }],
756
+ messageType: [{ type: core.Input }],
757
+ state: [{ type: core.Input }],
758
+ changed: [{ type: core.Output }],
759
+ selected: [{ type: core.Output }],
760
+ blured: [{ type: core.Output }]
761
+ };
762
+
763
+ (function (KitDropdownState) {
764
+ KitDropdownState["REGULAR"] = "regular";
765
+ KitDropdownState["DANGER"] = "danger";
766
+ })(exports.KitDropdownState || (exports.KitDropdownState = {}));
598
767
  var KitDropdownComponent = /** @class */ (function () {
599
768
  function KitDropdownComponent() {
600
769
  /**
@@ -605,6 +774,10 @@
605
774
  * Defines a value which going to be an info message type
606
775
  */
607
776
  this.messageType = exports.KitInputMessageType.DEFAULT;
777
+ /**
778
+ * Defines a particular state for the component
779
+ */
780
+ this.state = exports.KitAutocompleteState.REGULAR;
608
781
  /**
609
782
  * occurs once an item in the dropdown is selected
610
783
  */
@@ -654,7 +827,7 @@
654
827
  KitDropdownComponent.decorators = [
655
828
  { type: core.Component, args: [{
656
829
  selector: 'kit-dropdown',
657
- template: "<div class=\"kit-dropdown\" [class.disabled]=\"disabled\">\n <kendo-label *ngIf=\"label\" class=\"label display-block\"\n [text]=\"label\"\n [for]=\"dropdown\"\n ></kendo-label>\n <kendo-dropdownlist #dropdown valueField=\"value\" textField=\"text\" class=\"dropdown\"\n [data]=\"items\"\n [value]=\"selectedItem\"\n [valuePrimitive]=\"true\"\n [disabled]=\"disabled\"\n [popupSettings]=\"dropdownPopupSettings\"\n [itemDisabled]=\"onItemDisabled()\"\n (selectionChange)=\"onItemSelect($event)\"\n ></kendo-dropdownlist>\n <kit-input-message *ngIf=\"messageText\"\n [type]=\"messageType\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
830
+ template: "<div class=\"kit-dropdown {{ state }}\" [class.disabled]=\"disabled\">\n <kendo-label *ngIf=\"label\" class=\"label display-block\"\n [text]=\"label\"\n [for]=\"dropdown\"\n ></kendo-label>\n <kendo-dropdownlist #dropdown valueField=\"value\" textField=\"text\" class=\"dropdown\"\n [data]=\"items\"\n [value]=\"selectedItem\"\n [valuePrimitive]=\"true\"\n [disabled]=\"disabled\"\n [popupSettings]=\"dropdownPopupSettings\"\n [itemDisabled]=\"onItemDisabled()\"\n (selectionChange)=\"onItemSelect($event)\"\n ></kendo-dropdownlist>\n <kit-input-message *ngIf=\"messageText\"\n [type]=\"messageType\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
658
831
  changeDetection: core.ChangeDetectionStrategy.OnPush,
659
832
  encapsulation: core.ViewEncapsulation.None,
660
833
  providers: [{
@@ -662,7 +835,7 @@
662
835
  useExisting: core.forwardRef(function () { return KitDropdownComponent; }),
663
836
  multi: true,
664
837
  }],
665
- styles: ["@charset \"UTF-8\";.display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-dropdown .label{color:#27282a;font-size:13px;font-weight:500;margin-bottom:4px}.kit-dropdown .k-state-disabled{background-color:#f3f4f6}.kit-dropdown .k-input{color:#27282a;font-size:14px;font-weight:400;height:100%}.kit-dropdown .k-icon:before{color:#000;content:\"\uE015\"}.kit-dropdown .k-dropdown{height:34px;width:100%}.kit-dropdown .k-dropdown-wrap{background-color:#fff;border:1px solid #c1c7d0;border-radius:4px}.kit-dropdown .k-dropdown-wrap:hover{background-color:#fff}.kit-dropdown .k-dropdown-wrap.k-state-focused{box-shadow:none}.kit-dropdown:focus-within .k-dropdown-wrap{border:1px solid #006890}.kit-dropdown:focus-within .k-dropdown-wrap .k-icon:before{color:#006890}.kit-dropdown.disabled .label{color:#74777d}.kit-dropdown-popup.k-popup{background-color:#f3f4f6;border:1px solid #c1c7d0;border-radius:4px;box-shadow:0 0 8px rgba(0,62,86,.5);margin-top:4px;padding:4px}.kit-dropdown-popup.k-popup .k-item{background-color:#fff;border-radius:2px;box-shadow:none!important;color:#27282a;font-size:13px;font-weight:500;line-height:1}.kit-dropdown-popup.k-popup .k-item:not(:last-of-type){margin-bottom:4px}.kit-dropdown-popup.k-popup .k-item.k-state-focused:hover,.kit-dropdown-popup.k-popup .k-item:hover{background-color:#f3f5fa;color:#006890}.kit-dropdown-popup.k-popup .k-item.k-state-selected{background-color:#006890;color:#fff}.kit-dropdown-popup.k-popup .k-item.k-state-disabled{background-color:#f3f4f6;color:#9a9fa6}"]
838
+ styles: ["@charset \"UTF-8\";.display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-dropdown .label{color:#27282a;font-size:13px;font-weight:500;margin-bottom:4px}.kit-dropdown .k-state-disabled{background-color:#f3f4f6}.kit-dropdown .k-input{color:#27282a;font-size:14px;font-weight:400;height:100%}.kit-dropdown .k-icon:before{color:#000;content:\"\uE015\"}.kit-dropdown .k-dropdown{height:34px;width:100%}.kit-dropdown .k-dropdown-wrap{background-color:#fff;border:1px solid #c1c7d0;border-radius:4px}.kit-dropdown .k-dropdown-wrap:hover{background-color:#fff}.kit-dropdown .k-dropdown-wrap.k-state-focused{box-shadow:none}.kit-dropdown:focus-within .k-dropdown-wrap{border:1px solid #006890}.kit-dropdown:focus-within .k-dropdown-wrap .k-icon:before{color:#006890}.kit-dropdown.disabled .label{color:#74777d}.kit-dropdown.danger .k-dropdown-wrap{background:#f8e0e0;border-color:#ef3e42}.kit-dropdown-popup.k-popup{background-color:#f3f4f6;border:1px solid #c1c7d0;border-radius:4px;box-shadow:0 0 8px rgba(0,62,86,.5);margin-top:4px;padding:4px}.kit-dropdown-popup.k-popup .k-item{background-color:#fff;border-radius:2px;box-shadow:none!important;color:#27282a;font-size:13px;font-weight:500;line-height:1}.kit-dropdown-popup.k-popup .k-item:not(:last-of-type){margin-bottom:4px}.kit-dropdown-popup.k-popup .k-item.k-state-focused:hover,.kit-dropdown-popup.k-popup .k-item:hover{background-color:#f3f5fa;color:#006890}.kit-dropdown-popup.k-popup .k-item.k-state-selected{background-color:#006890;color:#fff}.kit-dropdown-popup.k-popup .k-item.k-state-disabled{background-color:#f3f4f6;color:#9a9fa6}"]
666
839
  },] }
667
840
  ];
668
841
  KitDropdownComponent.propDecorators = {
@@ -673,6 +846,7 @@
673
846
  messageIcon: [{ type: core.Input }],
674
847
  messageText: [{ type: core.Input }],
675
848
  messageType: [{ type: core.Input }],
849
+ state: [{ type: core.Input }],
676
850
  selected: [{ type: core.Output }]
677
851
  };
678
852
 
@@ -699,6 +873,10 @@
699
873
  },] }
700
874
  ];
701
875
 
876
+ (function (KitTextareaState) {
877
+ KitTextareaState["REGULAR"] = "regular";
878
+ KitTextareaState["DANGER"] = "danger";
879
+ })(exports.KitTextareaState || (exports.KitTextareaState = {}));
702
880
  var KitTextareaComponent = /** @class */ (function () {
703
881
  function KitTextareaComponent() {
704
882
  /**
@@ -709,6 +887,10 @@
709
887
  * Defines a state whether the textarea will be disabled or not
710
888
  */
711
889
  this.disabled = false;
890
+ /**
891
+ * Defines a particular state for the component
892
+ */
893
+ this.state = exports.KitTextareaState.REGULAR;
712
894
  /**
713
895
  * An action which is emitted when textarea field received focus
714
896
  */
@@ -782,7 +964,7 @@
782
964
  KitTextareaComponent.decorators = [
783
965
  { type: core.Component, args: [{
784
966
  selector: 'kit-textarea',
785
- template: "<div class=\"kit-textarea\" [class.textarea-disabled]=\"disabled\">\n <kendo-label *ngIf=\"label\" [text]=\"label\" [for]=\"textarea\"></kendo-label>\n <textarea autoresize #textarea class=\"k-input\"\n [attr.placeholder]=\"placeholder\"\n [style.min-height.px]=\"minHeight\"\n [style.max-height.px]=\"maxHeight\"\n [attr.maxlength]=\"maxlength\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue\"\n (focus)=\"onTextareaFocus()\"\n (blur)=\"onTextareaBlur()\"\n (input)=\"onTextareaChange($event)\"\n ></textarea>\n <kit-input-message *ngIf=\"messageText\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
967
+ template: "<div class=\"kit-textarea {{ state }}\" [class.textarea-disabled]=\"disabled\">\n <kendo-label *ngIf=\"label\" [text]=\"label\" [for]=\"textarea\"></kendo-label>\n <textarea autoresize #textarea class=\"k-input\"\n [attr.placeholder]=\"placeholder\"\n [style.min-height.px]=\"minHeight\"\n [style.max-height.px]=\"maxHeight\"\n [attr.maxlength]=\"maxlength\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue\"\n (focus)=\"onTextareaFocus()\"\n (blur)=\"onTextareaBlur()\"\n (input)=\"onTextareaChange($event)\"\n ></textarea>\n <kit-input-message *ngIf=\"messageText\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
786
968
  changeDetection: core.ChangeDetectionStrategy.OnPush,
787
969
  encapsulation: core.ViewEncapsulation.None,
788
970
  providers: [{
@@ -790,7 +972,7 @@
790
972
  useExisting: core.forwardRef(function () { return KitTextareaComponent; }),
791
973
  multi: true,
792
974
  }],
793
- styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-textarea .k-label{color:#27282a;display:block;font-size:13px;font-weight:500;margin-bottom:4px}.kit-textarea .k-input{background:#fff;border:1px solid #c1c7d0;border-radius:4px;box-sizing:border-box;color:#27282a;font-size:14px;line-height:1.2;min-height:34px;overflow:auto;padding:8px;resize:none;width:100%}.kit-textarea .k-input::-moz-placeholder{color:#74777d}.kit-textarea .k-input:-ms-input-placeholder{color:#74777d}.kit-textarea .k-input::placeholder{color:#74777d}.kit-textarea .k-input:focus{border-color:#006890}.kit-textarea .k-input:disabled{background:#f3f4f6;color:#9a9fa6}.kit-textarea .k-input:disabled::-moz-placeholder{color:#9a9fa6}.kit-textarea .k-input:disabled:-ms-input-placeholder{color:#9a9fa6}.kit-textarea .k-input:disabled::placeholder{color:#9a9fa6}.kit-textarea.textarea-disabled .k-label{color:#74777d}"]
975
+ styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-textarea .k-label{color:#27282a;display:block;font-size:13px;font-weight:500;margin-bottom:4px}.kit-textarea .k-input{background:#fff;border:1px solid #c1c7d0;border-radius:4px;box-sizing:border-box;color:#27282a;font-size:14px;line-height:1.2;min-height:34px;overflow:auto;padding:8px;resize:none;width:100%}.kit-textarea .k-input::-moz-placeholder{color:#74777d}.kit-textarea .k-input:-ms-input-placeholder{color:#74777d}.kit-textarea .k-input::placeholder{color:#74777d}.kit-textarea .k-input:focus{border-color:#006890}.kit-textarea .k-input:disabled{background:#f3f4f6;color:#9a9fa6}.kit-textarea .k-input:disabled::-moz-placeholder{color:#9a9fa6}.kit-textarea .k-input:disabled:-ms-input-placeholder{color:#9a9fa6}.kit-textarea .k-input:disabled::placeholder{color:#9a9fa6}.kit-textarea.textarea-disabled .k-label{color:#74777d}.kit-textarea.danger .k-input{background:#f8e0e0;border-color:#ef3e42}"]
794
976
  },] }
795
977
  ];
796
978
  KitTextareaComponent.propDecorators = {
@@ -803,6 +985,7 @@
803
985
  disabled: [{ type: core.Input }],
804
986
  messageIcon: [{ type: core.Input }],
805
987
  messageText: [{ type: core.Input }],
988
+ state: [{ type: core.Input }],
806
989
  focused: [{ type: core.Output }],
807
990
  blured: [{ type: core.Output }],
808
991
  changed: [{ type: core.Output }]
@@ -862,6 +1045,11 @@
862
1045
  },] }
863
1046
  ];
864
1047
 
1048
+ var KitTextLabelState;
1049
+ (function (KitTextLabelState) {
1050
+ KitTextLabelState["REGULAR"] = "regular";
1051
+ KitTextLabelState["DANGER"] = "danger";
1052
+ })(KitTextLabelState || (KitTextLabelState = {}));
865
1053
  var KitTextLabelComponent = /** @class */ (function () {
866
1054
  function KitTextLabelComponent() {
867
1055
  /**
@@ -880,16 +1068,20 @@
880
1068
  * Defines a value which going to be an info message type
881
1069
  */
882
1070
  this.messageType = exports.KitInputMessageType.HINT;
1071
+ /**
1072
+ * Defines a particular state for the component
1073
+ */
1074
+ this.state = KitTextLabelState.REGULAR;
883
1075
  }
884
1076
  return KitTextLabelComponent;
885
1077
  }());
886
1078
  KitTextLabelComponent.decorators = [
887
1079
  { type: core.Component, args: [{
888
1080
  selector: 'kit-text-label',
889
- template: "<div class=\"kit-text-label\" tabindex=\"0\" [class.text-label-empty]=\"!value\">\n <kendo-label *ngIf=\"value\" [text]=\"label\"></kendo-label>\n <kendo-label *ngIf=\"!value\" [text]=\"noValueMessage || label\"></kendo-label>\n <div *ngIf=\"!htmlMode; else htmlModeTemplate\" class=\"value\">{{ value }}</div>\n <ng-template #htmlModeTemplate>\n <div class=\"value\" [innerHTML]=\"value\"></div>\n </ng-template>\n <kit-input-message *ngIf=\"messageText && value\"\n [type]=\"messageType\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
1081
+ template: "<div class=\"kit-text-label {{ state }}\" tabindex=\"0\" [class.text-label-empty]=\"!value\">\n <kendo-label *ngIf=\"value\" [text]=\"label\"></kendo-label>\n <kendo-label *ngIf=\"!value\" [text]=\"noValueMessage || label\"></kendo-label>\n <div *ngIf=\"!htmlMode; else htmlModeTemplate\" class=\"value\">{{ value }}</div>\n <ng-template #htmlModeTemplate>\n <div class=\"value\" [innerHTML]=\"value\"></div>\n </ng-template>\n <kit-input-message *ngIf=\"messageText && value\"\n [type]=\"messageType\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
890
1082
  changeDetection: core.ChangeDetectionStrategy.OnPush,
891
1083
  encapsulation: core.ViewEncapsulation.None,
892
- styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-text-label{background:#fff;border:1px solid transparent;border-radius:4px;display:inline-block;outline:none;padding:6px 4px 4px}.kit-text-label:focus{border-color:#006890;box-shadow:0 0 0 3px #e7f4ec}.kit-text-label .k-label{color:#27282a;display:block;font-size:13px;font-weight:500;margin-bottom:4px}.kit-text-label .value{border-radius:4px;color:#27282a;font-size:14px;font-weight:400}.kit-text-label.text-label-empty .value{background:#f3f4f6;height:22px;min-width:112px}"]
1084
+ styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-text-label{background:#fff;border:1px solid transparent;border-radius:4px;display:inline-block;outline:none;padding:6px 4px 4px}.kit-text-label:focus{border-color:#006890;box-shadow:0 0 0 3px #e7f4ec}.kit-text-label .k-label{color:#27282a;display:block;font-size:13px;font-weight:500;margin-bottom:4px}.kit-text-label .value{border-radius:4px;color:#27282a;font-size:14px;font-weight:400}.kit-text-label.text-label-empty .value{background:#f3f4f6;height:22px;min-width:112px}.kit-text-label.danger{background:#f8e0e0;border-color:#ef3e42}"]
893
1085
  },] }
894
1086
  ];
895
1087
  KitTextLabelComponent.propDecorators = {
@@ -898,7 +1090,8 @@
898
1090
  htmlMode: [{ type: core.Input }],
899
1091
  noValueMessage: [{ type: core.Input }],
900
1092
  messageText: [{ type: core.Input }],
901
- messageType: [{ type: core.Input }]
1093
+ messageType: [{ type: core.Input }],
1094
+ state: [{ type: core.Input }]
902
1095
  };
903
1096
 
904
1097
  var KitTextLabelModule = /** @class */ (function () {
@@ -1061,6 +1254,11 @@
1061
1254
  KitUnitsTextboxType["TEXT"] = "text";
1062
1255
  KitUnitsTextboxType["NUMBER"] = "number";
1063
1256
  })(exports.KitUnitsTextboxType || (exports.KitUnitsTextboxType = {}));
1257
+ var KitUnitsTextboxState;
1258
+ (function (KitUnitsTextboxState) {
1259
+ KitUnitsTextboxState["REGULAR"] = "regular";
1260
+ KitUnitsTextboxState["DANGER"] = "danger";
1261
+ })(KitUnitsTextboxState || (KitUnitsTextboxState = {}));
1064
1262
  var KitUnitsTextboxComponent = /** @class */ (function () {
1065
1263
  function KitUnitsTextboxComponent() {
1066
1264
  /**
@@ -1091,6 +1289,10 @@
1091
1289
  * Defines a value which used to set type ot he textbox field
1092
1290
  */
1093
1291
  this.textboxType = exports.KitUnitsTextboxType.TEXT;
1292
+ /**
1293
+ * Defines a particular state for the component
1294
+ */
1295
+ this.state = KitUnitsTextboxState.REGULAR;
1094
1296
  /**
1095
1297
  * Occurs once an item in the dropdown is selected
1096
1298
  */
@@ -1152,10 +1354,10 @@
1152
1354
  KitUnitsTextboxComponent.decorators = [
1153
1355
  { type: core.Component, args: [{
1154
1356
  selector: 'kit-units-textbox',
1155
- template: "<div class=\"kit-units-textbox\" [class.textbox-disabled]=\"disabledTextBox\"\n [class.dropdown-disabled]=\"disabledDropdown\"\n [class.units-left]=\"dropdownPosition === KitUnitsTextboxDropdownPosition.LEFT\">\n <kendo-label *ngIf=\"label\" class=\"label display-block\"\n [text]=\"label\"\n ></kendo-label>\n <div class=\"units-textbox-wrap\">\n <kendo-textbox *ngIf=\"textboxType === KitUnitsTextboxType.TEXT; else numericTextboxTemplate\"\n [placeholder]=\"placeholder\"\n [value]=\"textBoxFormControl.value || textBoxValue\"\n [disabled]=\"disabledTextBox\"\n (blur)=\"onInputBlur()\"\n (valueChange)=\"onInputChange($event)\"\n ></kendo-textbox>\n <ng-template #numericTextboxTemplate>\n <kendo-numerictextbox [placeholder]=\"placeholder\"\n [value]=\"textBoxFormControl.value || textBoxValue\"\n [decimals]=\"decimals\"\n [min]=\"min\"\n [max]=\"max\"\n [maxlength]=\"maxlength\"\n [format]=\"format\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [selectOnFocus]=\"false\"\n [disabled]=\"disabledTextBox\"\n (blur)=\"onInputBlur()\"\n (valueChange)=\"onInputChange($event)\"\n ></kendo-numerictextbox>\n </ng-template>\n <kendo-dropdownlist valueField=\"value\" textField=\"text\"\n [data]=\"dropdownItems\"\n [value]=\"dropdownFormControl.value || selectedDropdownItem\"\n [valuePrimitive]=\"true\"\n [disabled]=\"disabledDropdown\"\n [popupSettings]=\"dropdownPopupSettings\"\n [itemDisabled]=\"onItemDisabled()\"\n (selectionChange)=\"onItemSelect($event)\"\n (blur)=\"onDropdownBlur()\"\n ></kendo-dropdownlist>\n </div>\n <kit-input-message *ngIf=\"messageText\"\n [type]=\"messageType\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
1357
+ template: "<div class=\"kit-units-textbox {{ state }}\" [class.textbox-disabled]=\"disabledTextBox\"\n [class.dropdown-disabled]=\"disabledDropdown\"\n [class.units-left]=\"dropdownPosition === KitUnitsTextboxDropdownPosition.LEFT\">\n <kendo-label *ngIf=\"label\" class=\"label display-block\"\n [text]=\"label\"\n ></kendo-label>\n <div class=\"units-textbox-wrap\">\n <kendo-textbox *ngIf=\"textboxType === KitUnitsTextboxType.TEXT; else numericTextboxTemplate\"\n [placeholder]=\"placeholder\"\n [value]=\"textBoxFormControl.value || textBoxValue\"\n [disabled]=\"disabledTextBox\"\n (blur)=\"onInputBlur()\"\n (valueChange)=\"onInputChange($event)\"\n ></kendo-textbox>\n <ng-template #numericTextboxTemplate>\n <kendo-numerictextbox [placeholder]=\"placeholder\"\n [value]=\"textBoxFormControl.value || textBoxValue\"\n [decimals]=\"decimals\"\n [min]=\"min\"\n [max]=\"max\"\n [maxlength]=\"maxlength\"\n [format]=\"format\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [selectOnFocus]=\"false\"\n [disabled]=\"disabledTextBox\"\n (blur)=\"onInputBlur()\"\n (valueChange)=\"onInputChange($event)\"\n ></kendo-numerictextbox>\n </ng-template>\n <kendo-dropdownlist valueField=\"value\" textField=\"text\"\n [data]=\"dropdownItems\"\n [value]=\"dropdownFormControl.value || selectedDropdownItem\"\n [valuePrimitive]=\"true\"\n [disabled]=\"disabledDropdown\"\n [popupSettings]=\"dropdownPopupSettings\"\n [itemDisabled]=\"onItemDisabled()\"\n (selectionChange)=\"onItemSelect($event)\"\n (blur)=\"onDropdownBlur()\"\n ></kendo-dropdownlist>\n </div>\n <kit-input-message *ngIf=\"messageText\"\n [type]=\"messageType\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
1156
1358
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1157
1359
  encapsulation: core.ViewEncapsulation.None,
1158
- styles: ["@charset \"UTF-8\";.display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-units-textbox .label{color:#27282a;font-size:13px;font-weight:500;margin-bottom:4px}.kit-units-textbox .units-textbox-wrap{background:#fff;border:1px solid #c1c7d0;border-radius:4px;box-sizing:border-box;display:flex;height:34px}.kit-units-textbox .k-numerictextbox,.kit-units-textbox .k-textbox{flex-grow:1}.kit-units-textbox .k-numerictextbox .k-input,.kit-units-textbox .k-textbox .k-input{color:#27282a;font-size:14px;height:100%;padding:0 8px}.kit-units-textbox .k-dropdown{width:auto}.kit-units-textbox .k-dropdown .k-input{color:#74777d;font-size:13px;font-weight:500;height:100%;justify-content:flex-end;padding:0}.kit-units-textbox .k-dropdown .k-icon:before{color:#000;content:\"\uE015\"}.kit-units-textbox:focus-within .units-textbox-wrap{border:1px solid #006890}.kit-units-textbox .k-dropdown-wrap{background:none;border:none}.kit-units-textbox .k-dropdown-wrap.k-state-focused{box-shadow:none}.kit-units-textbox .k-dropdown-wrap.k-state-focused .k-icon:before,.kit-units-textbox .k-dropdown-wrap.k-state-focused .k-input{color:#006890}.kit-units-textbox .k-dropdown-wrap:hover{background:none}.kit-units-textbox .k-animation-container{left:auto!important;right:0!important}.kit-units-textbox .kit-dropdown-popup{background-color:#f3f4f6;border:1px solid #c1c7d0;border-radius:4px;box-shadow:0 0 8px rgba(0,62,86,.5);margin-top:8px;min-width:75px;padding:4px}.kit-units-textbox .kit-dropdown-popup .k-item{background-color:#fff;border-radius:2px;box-shadow:none!important;color:#27282a;font-size:13px;font-weight:500;justify-content:flex-end;line-height:1;text-align:right}.kit-units-textbox .kit-dropdown-popup .k-item:not(:last-of-type){margin-bottom:4px}.kit-units-textbox .kit-dropdown-popup .k-item.k-state-focused{background-color:#fff;color:#27282a}.kit-units-textbox .kit-dropdown-popup .k-item.k-state-focused:hover,.kit-units-textbox .kit-dropdown-popup .k-item:hover{background-color:#f3f5fa;color:#006890}.kit-units-textbox .kit-dropdown-popup .k-item.k-state-selected{background-color:#006890;color:#fff}.kit-units-textbox .kit-dropdown-popup .k-item.k-state-disabled{background-color:#f3f4f6;color:#9a9fa6}.kit-units-textbox.textbox-disabled .label{color:#74777d}.kit-units-textbox.textbox-disabled .units-textbox-wrap{background-color:#f3f4f6;border-color:#c1c7d0;box-shadow:none}.kit-units-textbox.textbox-disabled .k-textbox .k-input{color:#9a9fa6}.kit-units-textbox.units-left .units-textbox-wrap{flex-direction:row-reverse}.kit-units-textbox.units-left .k-textbox{-ms-grid-column:2;-ms-grid-row:1;grid-column:2;grid-row:1}.kit-units-textbox.units-left .k-textbox .k-input{padding-left:0}.kit-units-textbox.units-left .k-dropdown{-ms-grid-column:1;grid-column:1}.kit-units-textbox.units-left .k-dropdown .k-input{padding-left:10px;width:auto}.kit-units-textbox.units-left .k-animation-container{left:0!important;right:auto!important}.kit-units-textbox.units-left .kit-dropdown-popup .k-item{justify-content:flex-start;text-align:left}.kit-units-textbox .k-input-prefix,.kit-units-textbox .k-input-suffix{height:0}.kit-units-textbox.dropdown-disabled .k-dropdown-wrap .k-icon:before,.kit-units-textbox.dropdown-disabled .k-dropdown-wrap .k-input{color:#9a9fa6}"]
1360
+ styles: ["@charset \"UTF-8\";.display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-units-textbox .label{color:#27282a;font-size:13px;font-weight:500;margin-bottom:4px}.kit-units-textbox .units-textbox-wrap{background:#fff;border:1px solid #c1c7d0;border-radius:4px;box-sizing:border-box;display:flex;height:34px}.kit-units-textbox .k-numerictextbox,.kit-units-textbox .k-textbox{flex-grow:1}.kit-units-textbox .k-numerictextbox .k-input,.kit-units-textbox .k-textbox .k-input{color:#27282a;font-size:14px;height:100%;padding:0 8px}.kit-units-textbox .k-dropdown{width:auto}.kit-units-textbox .k-dropdown .k-input{color:#74777d;font-size:13px;font-weight:500;height:100%;justify-content:flex-end;padding:0}.kit-units-textbox .k-dropdown .k-icon:before{color:#000;content:\"\uE015\"}.kit-units-textbox:focus-within .units-textbox-wrap{border:1px solid #006890}.kit-units-textbox .k-dropdown-wrap{background:none;border:none}.kit-units-textbox .k-dropdown-wrap.k-state-focused{box-shadow:none}.kit-units-textbox .k-dropdown-wrap.k-state-focused .k-icon:before,.kit-units-textbox .k-dropdown-wrap.k-state-focused .k-input{color:#006890}.kit-units-textbox .k-dropdown-wrap:hover{background:none}.kit-units-textbox .k-animation-container{left:auto!important;right:0!important}.kit-units-textbox .kit-dropdown-popup{background-color:#f3f4f6;border:1px solid #c1c7d0;border-radius:4px;box-shadow:0 0 8px rgba(0,62,86,.5);margin-top:8px;min-width:75px;padding:4px}.kit-units-textbox .kit-dropdown-popup .k-item{background-color:#fff;border-radius:2px;box-shadow:none!important;color:#27282a;font-size:13px;font-weight:500;justify-content:flex-end;line-height:1;text-align:right}.kit-units-textbox .kit-dropdown-popup .k-item:not(:last-of-type){margin-bottom:4px}.kit-units-textbox .kit-dropdown-popup .k-item.k-state-focused{background-color:#fff;color:#27282a}.kit-units-textbox .kit-dropdown-popup .k-item.k-state-focused:hover,.kit-units-textbox .kit-dropdown-popup .k-item:hover{background-color:#f3f5fa;color:#006890}.kit-units-textbox .kit-dropdown-popup .k-item.k-state-selected{background-color:#006890;color:#fff}.kit-units-textbox .kit-dropdown-popup .k-item.k-state-disabled{background-color:#f3f4f6;color:#9a9fa6}.kit-units-textbox.textbox-disabled .label{color:#74777d}.kit-units-textbox.textbox-disabled .units-textbox-wrap{background-color:#f3f4f6;border-color:#c1c7d0;box-shadow:none}.kit-units-textbox.textbox-disabled .k-textbox .k-input{color:#9a9fa6}.kit-units-textbox.units-left .units-textbox-wrap{flex-direction:row-reverse}.kit-units-textbox.units-left .k-textbox{-ms-grid-column:2;-ms-grid-row:1;grid-column:2;grid-row:1}.kit-units-textbox.units-left .k-textbox .k-input{padding-left:0}.kit-units-textbox.units-left .k-dropdown{-ms-grid-column:1;grid-column:1}.kit-units-textbox.units-left .k-dropdown .k-input{padding-left:10px;width:auto}.kit-units-textbox.units-left .k-animation-container{left:0!important;right:auto!important}.kit-units-textbox.units-left .kit-dropdown-popup .k-item{justify-content:flex-start;text-align:left}.kit-units-textbox .k-input-prefix,.kit-units-textbox .k-input-suffix{height:0}.kit-units-textbox.dropdown-disabled .k-dropdown-wrap .k-icon:before,.kit-units-textbox.dropdown-disabled .k-dropdown-wrap .k-input{color:#9a9fa6}.kit-units-textbox.danger .units-textbox-wrap{background:#f8e0e0;border-color:#ef3e42}"]
1159
1361
  },] }
1160
1362
  ];
1161
1363
  KitUnitsTextboxComponent.propDecorators = {
@@ -1178,6 +1380,7 @@
1178
1380
  max: [{ type: core.Input }],
1179
1381
  maxlength: [{ type: core.Input }],
1180
1382
  format: [{ type: core.Input }],
1383
+ state: [{ type: core.Input }],
1181
1384
  selected: [{ type: core.Output }],
1182
1385
  changed: [{ type: core.Output }]
1183
1386
  };
@@ -1304,6 +1507,9 @@
1304
1507
  this.onChange(value);
1305
1508
  };
1306
1509
  KitDatetimepickerComponent.prototype.writeValue = function (value) {
1510
+ if (!value) {
1511
+ return;
1512
+ }
1307
1513
  this.onChange(new Date(value));
1308
1514
  this.defaultDate = new Date(value);
1309
1515
  };
@@ -1584,145 +1790,6 @@
1584
1790
  },] }
1585
1791
  ];
1586
1792
 
1587
- var KitAutocompleteComponent = /** @class */ (function () {
1588
- function KitAutocompleteComponent(elementRef) {
1589
- var _this = this;
1590
- this.elementRef = elementRef;
1591
- /**
1592
- * Defines an items list which is going to be an autocomplete items data
1593
- */
1594
- this.items = [];
1595
- /**
1596
- * Defines whether the loader will be visible or not
1597
- */
1598
- this.loaderVisible = false;
1599
- /**
1600
- * Defines a value which going to be an info message type
1601
- */
1602
- this.messageType = exports.KitInputMessageType.DEFAULT;
1603
- /**
1604
- * An action which is emitted when input value changed
1605
- */
1606
- this.changed = new core.EventEmitter();
1607
- /**
1608
- * An action which is emitted once an item in the dropdown is selected
1609
- */
1610
- this.selected = new core.EventEmitter();
1611
- /**
1612
- * An action which is emitted when input lost focus
1613
- */
1614
- this.blured = new core.EventEmitter();
1615
- /**
1616
- * Function that emit normalized selected dropdown list item in case when
1617
- * inputted data changed and component lost focus
1618
- */
1619
- this.normalizedSelectedValue$ = function (text$) { return text$.pipe(operators.map(function (content) {
1620
- _this.selectedValue = content && _this.selectedValue || null;
1621
- _this.selected.emit(_this.selectedValue);
1622
- _this.onChange(_this.selectedValue || null);
1623
- return _this.selectedValue;
1624
- })); };
1625
- /**
1626
- * Settings for popup that will be opened as dropdown options list
1627
- */
1628
- this.dropdownPopupSettings = {
1629
- appendTo: 'component',
1630
- popupClass: 'kit-autocomplete-popup',
1631
- };
1632
- /**
1633
- * Function that should be called every time the form control value changes
1634
- */
1635
- this.onChange = function (value) {
1636
- };
1637
- /**
1638
- * Function that should be called when input lost focus and changed form control state to "touched"
1639
- */
1640
- this.onTouched = function () {
1641
- };
1642
- }
1643
- /**
1644
- * Callback function that return dropdown list item text
1645
- */
1646
- KitAutocompleteComponent.prototype.getOptionText = function (item) {
1647
- return item.getText && item.getText() || item.text;
1648
- };
1649
- /**
1650
- * Function that is called when input value changed
1651
- */
1652
- KitAutocompleteComponent.prototype.onFilterChange = function (value) {
1653
- this.changed.emit(value);
1654
- };
1655
- /**
1656
- * Function that is called when dropdown list item selected
1657
- */
1658
- KitAutocompleteComponent.prototype.onValueSelect = function (item) {
1659
- if (!item) {
1660
- return;
1661
- }
1662
- this.selectedValue = item;
1663
- this.selected.emit(this.selectedValue);
1664
- this.onChange(this.selectedValue);
1665
- };
1666
- /**
1667
- * Function that is called when input field lost focus
1668
- */
1669
- KitAutocompleteComponent.prototype.onBlur = function () {
1670
- this.onTouched();
1671
- this.blured.emit();
1672
- };
1673
- /**
1674
- * Function that is called when input field get focus
1675
- */
1676
- KitAutocompleteComponent.prototype.onFocus = function () {
1677
- this.elementRef.nativeElement.querySelector('.k-input').select();
1678
- };
1679
- KitAutocompleteComponent.prototype.writeValue = function (value) {
1680
- this.onChange(value);
1681
- this.selectedValue = value;
1682
- };
1683
- KitAutocompleteComponent.prototype.registerOnChange = function (fn) {
1684
- this.onChange = fn;
1685
- };
1686
- KitAutocompleteComponent.prototype.registerOnTouched = function (fn) {
1687
- this.onTouched = fn;
1688
- };
1689
- KitAutocompleteComponent.prototype.setDisabledState = function (disabled) {
1690
- this.disabled = disabled;
1691
- };
1692
- return KitAutocompleteComponent;
1693
- }());
1694
- KitAutocompleteComponent.decorators = [
1695
- { type: core.Component, args: [{
1696
- selector: 'kit-autocomplete',
1697
- template: "<div class=\"kit-autocomplete\"\n [class.autocomplete-empty]=\"!items || !items.length\"\n [class.autocomplete-disabled]=\"disabled\"\n [class.autocomplete-loading]=\"loaderVisible\">\n <kendo-label *ngIf=\"label\" class=\"label display-block\"\n [text]=\"label\"\n [for]=\"combobox\">\n </kendo-label>\n <div class=\"autocomplete-wrap\">\n <kendo-combobox #combobox textField=\"text\" valueField=\"value\"\n kendoDropDownFilter\n [data]=\"items\"\n [placeholder]=\"placeholder\"\n [filterable]=\"true\"\n [disabled]=\"disabled\"\n [clearButton]=\"false\"\n [value]=\"selectedValue\"\n [allowCustom]=\"true\"\n [valueNormalizer]=\"normalizedSelectedValue$\"\n [popupSettings]=\"dropdownPopupSettings\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (selectionChange)=\"onValueSelect($event)\"\n (filterChange)=\"onFilterChange($event)\"\n >\n <ng-template kendoAutoCompleteNoDataTemplate></ng-template>\n <ng-template kendoComboBoxHeaderTemplate>\n <kit-loader *ngIf=\"loaderVisible\" class=\"loader\"></kit-loader>\n </ng-template>\n <ng-template kendoComboBoxItemTemplate let-item>\n <span class=\"template\">{{ getOptionText(item) }}</span>\n </ng-template>\n </kendo-combobox>\n <kit-svg-icon class=\"input-icon\" icon=\"search\"></kit-svg-icon>\n </div>\n <kit-input-message *ngIf=\"messageText\"\n [type]=\"messageType\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
1698
- changeDetection: core.ChangeDetectionStrategy.OnPush,
1699
- encapsulation: core.ViewEncapsulation.None,
1700
- providers: [{
1701
- provide: forms.NG_VALUE_ACCESSOR,
1702
- useExisting: core.forwardRef(function () { return KitAutocompleteComponent; }),
1703
- multi: true,
1704
- }],
1705
- styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-autocomplete .label{color:#27282a;font-size:13px;font-weight:500;margin-bottom:4px}.kit-autocomplete .autocomplete-wrap{align-items:center;display:flex;position:relative}.kit-autocomplete .k-select{display:none}.kit-autocomplete .k-combobox{width:100%}.kit-autocomplete .k-dropdown-wrap{background:#fff;border:1px solid #c1c7d0;border-radius:4px;height:34px}.kit-autocomplete .k-dropdown-wrap.k-state-focused{box-shadow:none}.kit-autocomplete .k-input{color:#27282a;font-size:14px;height:100%;padding:0 32px 0 8px}.kit-autocomplete .k-input::-moz-selection{background:#006890}.kit-autocomplete .k-input::selection{background:#006890}.kit-autocomplete .kit-loader,.kit-autocomplete .kit-loader>div,.kit-autocomplete .loader{height:100%}.kit-autocomplete .input-icon{fill:#fff;height:16px;position:absolute;right:8px;stroke:#000;width:16px}.kit-autocomplete .kit-autocomplete-popup{background-color:#f3f4f6;border:1px solid #c1c7d0;border-radius:4px;box-shadow:0 0 5px rgba(0,62,86,.5);margin-top:4px;padding:4px}.kit-autocomplete .kit-autocomplete-popup .k-item{background-color:#fff;border-radius:2px;box-shadow:none;color:#27282a;font-size:13px;font-weight:500;line-height:1.26;min-height:auto;padding:8px}.kit-autocomplete .kit-autocomplete-popup .k-item:not(:last-of-type){margin-bottom:4px}.kit-autocomplete .kit-autocomplete-popup .k-item:hover{background-color:#f3f5fa;color:#006890}.kit-autocomplete:focus-within .k-dropdown-wrap{border-color:#006890}.kit-autocomplete.autocomplete-loading .kit-autocomplete-popup{height:200px}.kit-autocomplete.autocomplete-empty .kit-autocomplete-popup,.kit-autocomplete.autocomplete-loading .kit-autocomplete-popup .k-list-scroller,.kit-autocomplete.autocomplete-loading .kit-autocomplete-popup .k-nodata{display:none}.kit-autocomplete.autocomplete-disabled .label{color:#74777d}"]
1706
- },] }
1707
- ];
1708
- KitAutocompleteComponent.ctorParameters = function () { return [
1709
- { type: core.ElementRef }
1710
- ]; };
1711
- KitAutocompleteComponent.propDecorators = {
1712
- label: [{ type: core.Input }],
1713
- placeholder: [{ type: core.Input }],
1714
- items: [{ type: core.Input }],
1715
- selectedValue: [{ type: core.Input }],
1716
- disabled: [{ type: core.Input }],
1717
- loaderVisible: [{ type: core.Input }],
1718
- messageIcon: [{ type: core.Input }],
1719
- messageText: [{ type: core.Input }],
1720
- messageType: [{ type: core.Input }],
1721
- changed: [{ type: core.Output }],
1722
- selected: [{ type: core.Output }],
1723
- blured: [{ type: core.Output }]
1724
- };
1725
-
1726
1793
  var KitAutocompleteModule = /** @class */ (function () {
1727
1794
  function KitAutocompleteModule() {
1728
1795
  }
@@ -1768,6 +1835,10 @@
1768
1835
  * Defines a particular state for the component
1769
1836
  */
1770
1837
  this.state = exports.KitCheckboxState.REGULAR;
1838
+ /**
1839
+ * Defines a value which going to be an info message type
1840
+ */
1841
+ this.messageType = exports.KitInputMessageType.DEFAULT;
1771
1842
  /**
1772
1843
  * Occurs as soon as input checked state is changed
1773
1844
  */
@@ -1807,7 +1878,7 @@
1807
1878
  KitCheckboxComponent.decorators = [
1808
1879
  { type: core.Component, args: [{
1809
1880
  selector: 'kit-checkbox',
1810
- template: "<div class=\"kit-checkbox display-flex flex-align-items-center\"\n [class.disabled]=\"disabled\"\n [ngClass]=\"state\">\n <input kendoCheckBox #checkbox type=\"checkbox\" class=\"checkbox\"\n [checked]=\"defaultChecked\"\n [disabled]=\"disabled\"\n (change)=\"onInputStateChange($event)\" />\n <kendo-label class=\"label\" [text]=\"label\"\n [for]=\"checkbox\"\n ></kendo-label>\n</div>\n",
1881
+ template: "<div class=\"kit-checkbox\"\n [class.disabled]=\"disabled\"\n [ngClass]=\"state\">\n <div class=\"display-flex flex-align-items-center\">\n <input kendoCheckBox #checkbox type=\"checkbox\" class=\"checkbox\"\n [checked]=\"defaultChecked\"\n [disabled]=\"disabled\"\n (change)=\"onInputStateChange($event)\" />\n <kendo-label class=\"label\" [text]=\"label\"\n [for]=\"checkbox\"\n ></kendo-label>\n </div>\n <kit-input-message *ngIf=\"messageText\"\n [type]=\"messageType\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
1811
1882
  changeDetection: core.ChangeDetectionStrategy.OnPush,
1812
1883
  providers: [{
1813
1884
  provide: forms.NG_VALUE_ACCESSOR,
@@ -1822,6 +1893,9 @@
1822
1893
  disabled: [{ type: core.Input }],
1823
1894
  defaultChecked: [{ type: core.Input }],
1824
1895
  state: [{ type: core.Input }],
1896
+ messageIcon: [{ type: core.Input }],
1897
+ messageText: [{ type: core.Input }],
1898
+ messageType: [{ type: core.Input }],
1825
1899
  changed: [{ type: core.Output }]
1826
1900
  };
1827
1901
 
@@ -1842,6 +1916,104 @@
1842
1916
  kendoAngularLabel.LabelModule,
1843
1917
  kendoAngularInputs.CheckBoxModule,
1844
1918
  common.CommonModule,
1919
+ KitInputMessageModule,
1920
+ ],
1921
+ },] }
1922
+ ];
1923
+
1924
+ var KitToggleComponent = /** @class */ (function () {
1925
+ function KitToggleComponent() {
1926
+ /**
1927
+ * Defines whether the component will be in disabled state
1928
+ */
1929
+ this.disabled = false;
1930
+ /**
1931
+ * Defines a default value
1932
+ */
1933
+ this.defaultChecked = false;
1934
+ /**
1935
+ * Defines a value which going to be an info message type
1936
+ */
1937
+ this.messageType = exports.KitInputMessageType.DEFAULT;
1938
+ /**
1939
+ * Occurs as soon as toggle state is changed
1940
+ */
1941
+ this.changed = new core.EventEmitter();
1942
+ /**
1943
+ * Function that should be called every time the form control value changes
1944
+ */
1945
+ this.onChange = function (value) {
1946
+ };
1947
+ /**
1948
+ * Function that should be called when input lost focus and changed form control state to "touched"
1949
+ */
1950
+ this.onTouched = function () {
1951
+ };
1952
+ }
1953
+ /**
1954
+ * Function that is called when toggle state changed
1955
+ */
1956
+ KitToggleComponent.prototype.onInputStateChange = function (checked) {
1957
+ this.onChange(checked);
1958
+ this.changed.emit(checked);
1959
+ };
1960
+ KitToggleComponent.prototype.registerOnChange = function (fn) {
1961
+ this.onChange = fn;
1962
+ };
1963
+ KitToggleComponent.prototype.registerOnTouched = function (fn) {
1964
+ this.onTouched = fn;
1965
+ };
1966
+ KitToggleComponent.prototype.writeValue = function (value) {
1967
+ this.onChange(value);
1968
+ this.defaultChecked = value;
1969
+ };
1970
+ KitToggleComponent.prototype.setDisabledState = function (disabled) {
1971
+ this.disabled = disabled;
1972
+ };
1973
+ return KitToggleComponent;
1974
+ }());
1975
+ KitToggleComponent.decorators = [
1976
+ { type: core.Component, args: [{
1977
+ selector: 'kit-toggle',
1978
+ template: "<div class=\"kit-toggle\">\n <div class=\"display-flex flex-align-items-center\">\n <kendo-switch [checked]=\"defaultChecked\"\n [disabled]=\"disabled\"\n (valueChange)=\"onInputStateChange($event)\"\n ></kendo-switch>\n <kendo-label class=\"label\" [text]=\"label\"></kendo-label>\n </div>\n <kit-input-message *ngIf=\"messageText\"\n [type]=\"messageType\"\n [icon]=\"messageIcon\"\n [message]=\"messageText\"\n ></kit-input-message>\n</div>\n",
1979
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
1980
+ encapsulation: core.ViewEncapsulation.None,
1981
+ providers: [{
1982
+ provide: forms.NG_VALUE_ACCESSOR,
1983
+ useExisting: core.forwardRef(function () { return KitToggleComponent; }),
1984
+ multi: true,
1985
+ }],
1986
+ styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}.kit-toggle .label{color:#27282a;font-size:14px;font-weight:400;margin-left:20px}.kit-toggle .k-switch-container{align-items:center;background:#fff;border:2px solid;border-radius:20px;box-shadow:none;display:flex;width:100%}.kit-toggle .k-switch-handle{border:none;height:8px;width:8px}.kit-toggle .k-switch-label-off,.kit-toggle .k-switch-label-on{display:none}.kit-toggle .k-state-focused .k-switch-container{box-shadow:none}.kit-toggle .k-switch-off .k-switch-container{border-color:#c1c7d0}.kit-toggle .k-switch-off .k-switch-handle{background:#c1c7d0;left:2px}.kit-toggle .k-switch-on .k-switch-container{background:#fff;border-color:#006890}.kit-toggle .k-switch-on .k-switch-handle{background:#006890;left:calc(100% - 10px)}.kit-toggle .k-switch{height:16px;width:32px}.kit-toggle .k-switch .k-switch-container:hover{box-shadow:none}.kit-toggle .k-state-disabled{opacity:1}.kit-toggle .k-state-disabled.k-switch-off .k-switch-container{border-color:#e6e9ec}.kit-toggle .k-state-disabled.k-switch-off .k-switch-handle{background:#e6e9ec}.kit-toggle .k-state-disabled.k-switch-on .k-switch-container{border-color:#cce1e9}.kit-toggle .k-state-disabled.k-switch-on .k-switch-handle{background:#cce1e9}"]
1987
+ },] }
1988
+ ];
1989
+ KitToggleComponent.propDecorators = {
1990
+ label: [{ type: core.Input }],
1991
+ disabled: [{ type: core.Input }],
1992
+ defaultChecked: [{ type: core.Input }],
1993
+ messageIcon: [{ type: core.Input }],
1994
+ messageText: [{ type: core.Input }],
1995
+ messageType: [{ type: core.Input }],
1996
+ changed: [{ type: core.Output }]
1997
+ };
1998
+
1999
+ var KitToggleModule = /** @class */ (function () {
2000
+ function KitToggleModule() {
2001
+ }
2002
+ return KitToggleModule;
2003
+ }());
2004
+ KitToggleModule.decorators = [
2005
+ { type: core.NgModule, args: [{
2006
+ declarations: [
2007
+ KitToggleComponent,
2008
+ ],
2009
+ imports: [
2010
+ common.CommonModule,
2011
+ kendoAngularInputs.SwitchModule,
2012
+ kendoAngularLabel.LabelModule,
2013
+ KitInputMessageModule,
2014
+ ],
2015
+ exports: [
2016
+ KitToggleComponent,
1845
2017
  ],
1846
2018
  },] }
1847
2019
  ];
@@ -1892,6 +2064,8 @@
1892
2064
  exports.KitTextareaModule = KitTextareaModule;
1893
2065
  exports.KitTextboxComponent = KitTextboxComponent;
1894
2066
  exports.KitTextboxModule = KitTextboxModule;
2067
+ exports.KitToggleComponent = KitToggleComponent;
2068
+ exports.KitToggleModule = KitToggleModule;
1895
2069
  exports.KitUnitsTextboxComponent = KitUnitsTextboxComponent;
1896
2070
  exports.KitUnitsTextboxModule = KitUnitsTextboxModule;
1897
2071
  exports.ɵa = KitSvgSpriteComponent;