@colijnit/corecomponents_v12 12.0.18 → 12.0.21

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 (54) hide show
  1. package/bundles/colijnit-corecomponents_v12.umd.js +283 -81
  2. package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
  3. package/colijnit-corecomponents_v12.d.ts +14 -16
  4. package/colijnit-corecomponents_v12.metadata.json +1 -1
  5. package/esm2015/colijnit-corecomponents_v12.js +15 -17
  6. package/esm2015/lib/components/base/base-input.component.js +181 -36
  7. package/esm2015/lib/components/carousel-3d/carousel-3d.component.js +12 -6
  8. package/esm2015/lib/components/co-dialog/co-dialog.module.js +1 -3
  9. package/esm2015/lib/components/collapsible/collapsible.component.js +10 -2
  10. package/esm2015/lib/components/drop-down-list/drop-down-list.component.js +1 -1
  11. package/esm2015/lib/components/drop-down-list/drop-down.module.js +6 -6
  12. package/esm2015/lib/components/form/form.component.js +18 -18
  13. package/esm2015/lib/components/input-checkbox/input-checkbox.component.js +1 -1
  14. package/esm2015/lib/components/input-checkbox-multi-select/input-checkbox-multi-select.component.js +1 -1
  15. package/esm2015/lib/components/input-date-picker/input-date-picker.component.js +1 -1
  16. package/esm2015/lib/components/input-radio-button/input-radio-button.component.js +1 -1
  17. package/esm2015/lib/components/input-text/input-text.component.js +15 -4
  18. package/esm2015/lib/components/input-text/input-text.module.js +1 -1
  19. package/esm2015/lib/components/input-textarea/input-textarea.component.js +8 -8
  20. package/esm2015/lib/components/multi-select-list/multi-select-list.module.js +6 -6
  21. package/esm2015/lib/components/validation-error/validation-error.component.js +13 -1
  22. package/esm2015/lib/components/validation-error/validation-error.module.js +4 -2
  23. package/esm2015/public-api.js +3 -1
  24. package/fesm2015/colijnit-corecomponents_v12.js +246 -69
  25. package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
  26. package/lib/components/base/base-input.component.d.ts +23 -5
  27. package/lib/components/co-kanban/style/_layout.scss +4 -0
  28. package/lib/components/co-kanban/style/_material-definition.scss +2 -0
  29. package/lib/components/drop-down-list/style/_layout.scss +2 -1
  30. package/lib/components/drop-down-list/style/_material-definition.scss +2 -0
  31. package/lib/components/form/form.component.d.ts +2 -3
  32. package/lib/components/input-checkbox/style/_material-definition.scss +1 -2
  33. package/lib/components/input-checkbox/style/material.scss +2 -0
  34. package/lib/components/input-checkbox-multi-select/style/_layout.scss +5 -1
  35. package/lib/components/input-checkbox-multi-select/style/_material-definition.scss +2 -0
  36. package/lib/components/input-combo-box/style/_layout.scss +4 -2
  37. package/lib/components/input-combo-box/style/_material-definition.scss +2 -0
  38. package/lib/components/input-date-picker/style/_layout.scss +2 -1
  39. package/lib/components/input-date-picker/style/_material-definition.scss +4 -0
  40. package/lib/components/input-listbox/style/_layout.scss +0 -1
  41. package/lib/components/input-listbox/style/_material-definition.scss +2 -2
  42. package/lib/components/input-text/style/_layout.scss +32 -0
  43. package/lib/components/input-text/style/_material-definition.scss +3 -0
  44. package/lib/components/input-text/style/_theme.scss +21 -1
  45. package/lib/components/input-textarea/style/_theme.scss +1 -0
  46. package/lib/components/multi-select-list/style/_layout.scss +2 -1
  47. package/lib/components/multi-select-list/style/_material-definition.scss +2 -0
  48. package/lib/components/multi-select-list/style/_theme.scss +5 -1
  49. package/lib/components/validation-error/style/_layout.scss +10 -2
  50. package/lib/components/validation-error/validation-error.component.d.ts +6 -0
  51. package/lib/style/_input.mixins.scss +4 -3
  52. package/lib/style/_variables.scss +41 -1
  53. package/package.json +1 -1
  54. package/public-api.d.ts +2 -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('@angular/common/http'), require('@angular/platform-browser'), require('rxjs'), require('rxjs/operators'), require('@syncfusion/ej2-angular-splitbuttons'), require('@angular/animations'), require('@angular/platform-browser/animations'), require('@syncfusion/ej2-angular-popups'), require('@syncfusion/ej2-angular-kanban'), require('@syncfusion/ej2-angular-schedule'), require('@syncfusion/ej2-angular-navigations'), require('@syncfusion/ej2-angular-buttons'), require('@angular/forms'), require('@syncfusion/ej2-angular-dropdowns'), require('@syncfusion/ej2-angular-grids'), require('@syncfusion/ej2-base'), require('@syncfusion/ej2-angular-calendars'), require('@syncfusion/ej2-angular-inputs'), require('@syncfusion/ej2-angular-pivotview'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@syncfusion/ej2-angular-richtexteditor'), require('@angular/cdk/drag-drop'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js')) :
3
- typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/common', '@angular/common/http', '@angular/platform-browser', 'rxjs', 'rxjs/operators', '@syncfusion/ej2-angular-splitbuttons', '@angular/animations', '@angular/platform-browser/animations', '@syncfusion/ej2-angular-popups', '@syncfusion/ej2-angular-kanban', '@syncfusion/ej2-angular-schedule', '@syncfusion/ej2-angular-navigations', '@syncfusion/ej2-angular-buttons', '@angular/forms', '@syncfusion/ej2-angular-dropdowns', '@syncfusion/ej2-angular-grids', '@syncfusion/ej2-base', '@syncfusion/ej2-angular-calendars', '@syncfusion/ej2-angular-inputs', '@syncfusion/ej2-angular-pivotview', '@angular/cdk/overlay', '@angular/cdk/portal', '@syncfusion/ej2-angular-richtexteditor', '@angular/cdk/drag-drop', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.common, global.ng.common.http, global.ng.platformBrowser, global.rxjs, global.rxjs.operators, global.ej2AngularSplitbuttons, global.ng.animations, global.ng.platformBrowser.animations, global.ej2AngularPopups, global.ej2AngularKanban, global.ej2AngularSchedule, global.ej2AngularNavigations, global.ej2AngularButtons, global.ng.forms, global.ej2AngularDropdowns, global.ej2AngularGrids, global.ej2Base, global.ej2AngularCalendars, global.ej2AngularInputs, global.ej2AngularPivotview, global.ng.cdk.overlay, global.ng.cdk.portal, global.ej2AngularRichtexteditor, global.ng.cdk.dragDrop, global.three, global.CSS3DRenderer, global.TWEEN));
5
- })(this, (function (exports, core, common, http, platformBrowser, rxjs, operators, ej2AngularSplitbuttons, animations, animations$1, ej2AngularPopups, ej2AngularKanban, ej2AngularSchedule, ej2AngularNavigations, ej2AngularButtons, forms, ej2AngularDropdowns, ej2AngularGrids, ej2Base, ej2AngularCalendars, ej2AngularInputs, ej2AngularPivotview, overlay, portal, ej2AngularRichtexteditor, dragDrop, three, CSS3DRenderer, TWEEN) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('@angular/platform-browser'), require('rxjs'), require('rxjs/operators'), require('@syncfusion/ej2-angular-splitbuttons'), require('@angular/animations'), require('@syncfusion/ej2-angular-popups'), require('@syncfusion/ej2-angular-kanban'), require('@syncfusion/ej2-angular-schedule'), require('@syncfusion/ej2-angular-navigations'), require('@syncfusion/ej2-angular-buttons'), require('@angular/forms'), require('@syncfusion/ej2-angular-dropdowns'), require('@syncfusion/ej2-angular-grids'), require('@syncfusion/ej2-base'), require('@syncfusion/ej2-angular-calendars'), require('@syncfusion/ej2-angular-inputs'), require('@syncfusion/ej2-angular-pivotview'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@syncfusion/ej2-angular-richtexteditor'), require('@angular/cdk/drag-drop'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js')) :
3
+ typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/common', '@angular/common/http', '@angular/platform-browser', 'rxjs', 'rxjs/operators', '@syncfusion/ej2-angular-splitbuttons', '@angular/animations', '@syncfusion/ej2-angular-popups', '@syncfusion/ej2-angular-kanban', '@syncfusion/ej2-angular-schedule', '@syncfusion/ej2-angular-navigations', '@syncfusion/ej2-angular-buttons', '@angular/forms', '@syncfusion/ej2-angular-dropdowns', '@syncfusion/ej2-angular-grids', '@syncfusion/ej2-base', '@syncfusion/ej2-angular-calendars', '@syncfusion/ej2-angular-inputs', '@syncfusion/ej2-angular-pivotview', '@angular/cdk/overlay', '@angular/cdk/portal', '@syncfusion/ej2-angular-richtexteditor', '@angular/cdk/drag-drop', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.common, global.ng.common.http, global.ng.platformBrowser, global.rxjs, global.rxjs.operators, global.ej2AngularSplitbuttons, global.ng.animations, global.ej2AngularPopups, global.ej2AngularKanban, global.ej2AngularSchedule, global.ej2AngularNavigations, global.ej2AngularButtons, global.ng.forms, global.ej2AngularDropdowns, global.ej2AngularGrids, global.ej2Base, global.ej2AngularCalendars, global.ej2AngularInputs, global.ej2AngularPivotview, global.ng.cdk.overlay, global.ng.cdk.portal, global.ej2AngularRichtexteditor, global.ng.cdk.dragDrop, global.three, global.CSS3DRenderer, global.TWEEN));
5
+ })(this, (function (exports, core, common, http, platformBrowser, rxjs, operators, ej2AngularSplitbuttons, animations, ej2AngularPopups, ej2AngularKanban, ej2AngularSchedule, ej2AngularNavigations, ej2AngularButtons, forms, ej2AngularDropdowns, ej2AngularGrids, ej2Base, ej2AngularCalendars, ej2AngularInputs, ej2AngularPivotview, overlay, portal, ej2AngularRichtexteditor, dragDrop, three, CSS3DRenderer, TWEEN) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -2606,7 +2606,6 @@
2606
2606
  { type: core.NgModule, args: [{
2607
2607
  imports: [
2608
2608
  common.CommonModule,
2609
- animations$1.BrowserAnimationsModule,
2610
2609
  IconModule
2611
2610
  ],
2612
2611
  declarations: [CoDialogComponent],
@@ -2973,7 +2972,14 @@
2973
2972
  CollapsibleComponent.decorators = [
2974
2973
  { type: core.Component, args: [{
2975
2974
  selector: "co-collapsible",
2976
- template: "\n <div class=\"collapsible-header\" [class.end]=\"expandButtonLast\" (click)=\"changeExpanded()\">\n <div class=\"expand-icon-wrapper\" [class.expanded]=\"expanded\" *ngIf=\"!expandButtonLast\">\n <co-icon class=\"expand-icon\" [iconData]=\"iconData\"></co-icon>\n </div>\n <div class=\"collapsible-title\" [textContent]=\"headerTitle\"></div>\n <div class=\"expand-icon-wrapper\" [class.expanded]=\"expanded\" *ngIf=\"expandButtonLast\">\n <co-icon class=\"expand-icon\" [iconData]=\"iconData\"></co-icon>\n </div>\n </div>\n <div class=\"collapsible-content\" *ngIf=\"expanded\">\n <ng-content></ng-content>\n </div>\n ",
2975
+ template: "\n <div class=\"collapsible-header\" [class.end]=\"expandButtonLast\" (click)=\"changeExpanded()\">\n <div class=\"expand-icon-wrapper\" [class.expanded]=\"expanded\" *ngIf=\"!expandButtonLast\">\n <co-icon class=\"expand-icon\" [iconData]=\"iconData\"></co-icon>\n </div>\n <div class=\"collapsible-title\" [textContent]=\"headerTitle\"></div>\n <div class=\"expand-icon-wrapper\" [class.expanded]=\"expanded\" *ngIf=\"expandButtonLast\">\n <co-icon class=\"expand-icon\" [iconData]=\"iconData\"></co-icon>\n </div>\n </div>\n <div class=\"collapsible-content\" *ngIf=\"expanded\" @showHideContent>\n <ng-content></ng-content>\n </div>\n ",
2976
+ animations: [
2977
+ animations.trigger('showHideContent', [
2978
+ animations.state('*', animations.style({ height: '*' })),
2979
+ animations.state('void', animations.style({ height: 0 })),
2980
+ animations.transition('void <=> *', animations.animate(200))
2981
+ ]),
2982
+ ],
2977
2983
  changeDetection: core.ChangeDetectionStrategy.OnPush,
2978
2984
  encapsulation: core.ViewEncapsulation.None
2979
2985
  },] }
@@ -3102,7 +3108,9 @@
3102
3108
  }
3103
3109
 
3104
3110
  var ValidationErrorComponent = /** @class */ (function () {
3105
- function ValidationErrorComponent() {
3111
+ function ValidationErrorComponent(icons) {
3112
+ this.icons = icons;
3113
+ this.Icons = exports.CoreComponentsIcon;
3106
3114
  }
3107
3115
  ValidationErrorComponent.prototype.showClass = function () {
3108
3116
  return true;
@@ -3112,13 +3120,18 @@
3112
3120
  ValidationErrorComponent.decorators = [
3113
3121
  { type: core.Component, args: [{
3114
3122
  selector: "co-validation-error",
3115
- template: "\n <div class=\"validation-error-content\">\n <div class=\"validation-error-message\" [textContent]=\"error\"></div>\n </div>\n ",
3123
+ template: "\n <div class=\"validation-error-content\">\n <co-icon [iconData]=\"icons.getIcon(Icons.InformationRoundOpen)\"></co-icon>\n <div class=\"validation-error-message\" [textContent]=\"error\"></div>\n </div>\n ",
3116
3124
  animations: [],
3117
3125
  encapsulation: core.ViewEncapsulation.None
3118
3126
  },] }
3119
3127
  ];
3128
+ ValidationErrorComponent.ctorParameters = function () { return [
3129
+ { type: IconCacheService }
3130
+ ]; };
3120
3131
  ValidationErrorComponent.propDecorators = {
3121
3132
  error: [{ type: core.Input }],
3133
+ top: [{ type: core.HostBinding, args: ['style.top.px',] }, { type: core.Input }],
3134
+ left: [{ type: core.HostBinding, args: ['style.left.px',] }, { type: core.Input }],
3122
3135
  showClass: [{ type: core.HostBinding, args: ['class.co-validation-error',] }]
3123
3136
  };
3124
3137
 
@@ -3134,10 +3147,13 @@
3134
3147
  this.formUserChangeListener = formUserChangeListener;
3135
3148
  this.ngZoneWrapper = ngZoneWrapper;
3136
3149
  this.elementRef = elementRef;
3150
+ this.showSaveCancel = false;
3137
3151
  this.noValidation = false;
3138
3152
  this.forceRequired = false; // a force outside of [cfgName]'s influence
3139
3153
  // Goal: ability to emulate the red background of input fields (form-submitted invalid state)
3140
3154
  this.redErrorBackground = false;
3155
+ // @Output()
3156
+ // public commit: EventEmitter<any> = new EventEmitter<any>();
3141
3157
  this.nativeBlur = new core.EventEmitter();
3142
3158
  this.blur = new core.EventEmitter();
3143
3159
  // emits when the enter button on keyboard was pressed while this form input had focussed
@@ -3156,12 +3172,21 @@
3156
3172
  this.fullWidth = false;
3157
3173
  this.excludeUserModelChange = false;
3158
3174
  this.noFormGroupControl = false;
3175
+ this.keepFocus = false;
3176
+ this.canSaveOrCancel = false;
3159
3177
  this._markedAsUserTouched = false;
3160
3178
  this._destroyed = false;
3161
3179
  this._hasOnPushCdStrategy = false;
3180
+ this._initialModelSet = false;
3162
3181
  this._forceReadonly = undefined;
3163
3182
  this._validators = [];
3164
3183
  this._asyncValidators = [];
3184
+ // descendents should override this
3185
+ this.commit = function (model) { return __awaiter(_this, void 0, void 0, function () {
3186
+ return __generator(this, function (_a) {
3187
+ return [2 /*return*/, Promise.resolve(true)];
3188
+ });
3189
+ }); };
3165
3190
  BaseInputComponent.BaseFormInputComponentIndex++;
3166
3191
  this.name = BaseInputComponent.BaseFormInputComponentIndex.toString();
3167
3192
  if (this.formUserChangeListener) {
@@ -3187,7 +3212,12 @@
3187
3212
  return this._model;
3188
3213
  },
3189
3214
  set: function (value) {
3215
+ if (!this._initialModelSet) {
3216
+ this._initialModel = this._model;
3217
+ this._initialModelSet = true;
3218
+ }
3190
3219
  this._model = value;
3220
+ this.canSaveOrCancel = this._model !== this._initialModel;
3191
3221
  this._clearErrorComponent();
3192
3222
  },
3193
3223
  enumerable: false,
@@ -3408,6 +3438,30 @@
3408
3438
  enumerable: false,
3409
3439
  configurable: true
3410
3440
  });
3441
+ BaseInputComponent.prototype.onClick = function (event) {
3442
+ if (this.canChange && !this.noClickFocus) {
3443
+ this.requestFocus();
3444
+ if (!this.excludeUserModelChange) {
3445
+ this.markAsUserTouched();
3446
+ }
3447
+ }
3448
+ };
3449
+ BaseInputComponent.prototype.onFocusIn = function () {
3450
+ if (!this.excludeUserModelChange) {
3451
+ this.markAsUserTouched();
3452
+ }
3453
+ };
3454
+ BaseInputComponent.prototype.handleDocumentScroll = function () {
3455
+ this._positionValidationError();
3456
+ };
3457
+ BaseInputComponent.prototype.handleWindowResize = function () {
3458
+ this._positionValidationError();
3459
+ };
3460
+ BaseInputComponent.prototype.handleKeyDown = function (event) {
3461
+ if (this.showSaveCancel && this.canSaveOrCancel) {
3462
+ this._handleKeyDown(event);
3463
+ }
3464
+ };
3411
3465
  Object.defineProperty(BaseInputComponent.prototype, "canChange", {
3412
3466
  get: function () {
3413
3467
  return !this.readonly && !this.disabled;
@@ -3436,27 +3490,15 @@
3436
3490
  enumerable: false,
3437
3491
  configurable: true
3438
3492
  });
3439
- BaseInputComponent.prototype.showValidationError = function (error) {
3440
- if (this.validationErrorContainer) {
3441
- if (this._errorValidationComponent) {
3442
- this._clearErrorComponent();
3443
- }
3444
- var componentFactory = this.componentFactoryResolver.resolveComponentFactory(ValidationErrorComponent);
3445
- this._errorValidationComponent = this.validationErrorContainer.createComponent(componentFactory);
3446
- this._errorValidationComponent.instance.error = error;
3447
- }
3448
- };
3449
3493
  BaseInputComponent.prototype.ngOnInit = function () {
3450
3494
  var _this = this;
3451
3495
  this._modelChangeSub = this.modelChange.subscribe(function (val) {
3452
3496
  _this.model = val;
3453
3497
  });
3454
- // if (this.speechInput) {
3455
- // this._subscribeToSpeechInput();
3456
- // }
3457
3498
  };
3458
3499
  BaseInputComponent.prototype.ngAfterViewInit = function () {
3459
3500
  var _this = this;
3501
+ this._prepareInput();
3460
3502
  this._updateControlValidatorsAndOwnFlags();
3461
3503
  this._addOrRemoveSelfFromForm();
3462
3504
  if (this.formComponent) {
@@ -3470,6 +3512,11 @@
3470
3512
  }
3471
3513
  };
3472
3514
  BaseInputComponent.prototype.ngOnDestroy = function () {
3515
+ var _this = this;
3516
+ if (this.input) {
3517
+ this.input.removeEventListener('blur', function (event) { return _this.doBlur(event); });
3518
+ this.input.removeEventListener('focus', function (event) { return _this.doFocus(event); });
3519
+ }
3473
3520
  this._destroyed = true;
3474
3521
  this._clearErrorComponent();
3475
3522
  // if (this.tooltipManager && this.elementRef) {
@@ -3493,7 +3540,41 @@
3493
3540
  // this._removeSelfFromForm();
3494
3541
  this.elementRef = undefined;
3495
3542
  this.changeDetector = undefined;
3496
- // this.input = undefined;
3543
+ this.input = undefined;
3544
+ };
3545
+ BaseInputComponent.prototype.commitClick = function (event) {
3546
+ return __awaiter(this, void 0, void 0, function () {
3547
+ return __generator(this, function (_a) {
3548
+ switch (_a.label) {
3549
+ case 0:
3550
+ this.keepFocus = true;
3551
+ return [4 /*yield*/, this.commit(this.model)];
3552
+ case 1:
3553
+ _a.sent();
3554
+ this.keepFocus = false;
3555
+ this.doBlur(event);
3556
+ return [2 /*return*/];
3557
+ }
3558
+ });
3559
+ });
3560
+ };
3561
+ BaseInputComponent.prototype.cancelClick = function (event) {
3562
+ this.keepFocus = true;
3563
+ if (this._initialModelSet) {
3564
+ this.model = this._initialModel;
3565
+ }
3566
+ this.keepFocus = false;
3567
+ };
3568
+ BaseInputComponent.prototype.showValidationError = function (error) {
3569
+ if (this.validationErrorContainer) {
3570
+ if (this._errorValidationComponent) {
3571
+ this._clearErrorComponent();
3572
+ }
3573
+ var componentFactory = this.componentFactoryResolver.resolveComponentFactory(ValidationErrorComponent);
3574
+ this._errorValidationComponent = this.validationErrorContainer.createComponent(componentFactory);
3575
+ this._errorValidationComponent.instance.error = error;
3576
+ this._positionValidationError();
3577
+ }
3497
3578
  };
3498
3579
  /**
3499
3580
  * Emits a modelChange event with given value, indicating that the model of this form input
@@ -3510,28 +3591,34 @@
3510
3591
  this.detectChanges();
3511
3592
  }
3512
3593
  };
3513
- BaseInputComponent.prototype.onClick = function (event) {
3514
- if (this.canChange && !this.noClickFocus) {
3515
- this.requestFocus();
3516
- if (!this.excludeUserModelChange) {
3517
- this.markAsUserTouched();
3518
- }
3519
- }
3520
- };
3521
- BaseInputComponent.prototype.onFocusIn = function () {
3522
- if (!this.excludeUserModelChange) {
3523
- this.markAsUserTouched();
3524
- }
3525
- };
3526
3594
  BaseInputComponent.prototype.requestFocus = function () {
3527
3595
  if (this.canChange && this.input) {
3528
3596
  this.input.focus();
3529
3597
  this.focused = true;
3530
3598
  }
3531
3599
  };
3532
- BaseInputComponent.prototype.doBlur = function () {
3533
- this.input.blur();
3534
- this.focused = false;
3600
+ BaseInputComponent.prototype.doFocus = function (event) {
3601
+ if (this.disabled) {
3602
+ return;
3603
+ }
3604
+ this._initialModelSet = false;
3605
+ this.focused = true;
3606
+ this.canSaveOrCancel = false;
3607
+ this.focus.next();
3608
+ };
3609
+ BaseInputComponent.prototype.doBlur = function (event) {
3610
+ var _this = this;
3611
+ setTimeout(function () {
3612
+ if (_this.keepFocus) {
3613
+ if (event) {
3614
+ event.preventDefault;
3615
+ }
3616
+ return false;
3617
+ }
3618
+ _this.focused = false;
3619
+ _this.input.blur();
3620
+ _this.blur.next();
3621
+ }, 200);
3535
3622
  };
3536
3623
  BaseInputComponent.prototype.detectChanges = function () {
3537
3624
  if (!this._destroyed) {
@@ -3584,7 +3671,7 @@
3584
3671
  if (notNill(this.forcedMaxLength) || maxLength === this._maxLength) {
3585
3672
  return;
3586
3673
  }
3587
- if (maxLength > 0) { // not maxLength is 0
3674
+ if (!isNaN(maxLength)) {
3588
3675
  this._maxLength = maxLength;
3589
3676
  this._updateControlValidatorsAndOwnFlags();
3590
3677
  }
@@ -3664,7 +3751,7 @@
3664
3751
  }
3665
3752
  };
3666
3753
  BaseInputComponent.prototype._setNativeMaxLength = function (maxlength) {
3667
- if (this.input) {
3754
+ if (this.input && !isNaN(maxlength)) {
3668
3755
  this.input.maxLength = maxlength;
3669
3756
  }
3670
3757
  };
@@ -3710,6 +3797,102 @@
3710
3797
  this.formComponent.addFormInput(this.myFormInputInstance ? this.myFormInputInstance : this);
3711
3798
  }
3712
3799
  };
3800
+ BaseInputComponent.prototype._prepareInput = function () {
3801
+ var _this = this;
3802
+ if (this.elementRef && this.elementRef.nativeElement) {
3803
+ //try to find input element
3804
+ this.input = this._findInputNode(this.elementRef.nativeElement.children);
3805
+ if (this.input) {
3806
+ this.input.addEventListener('blur', function (event) { return _this.doBlur(event); });
3807
+ this.input.addEventListener('focus', function (event) { return _this.doFocus(event); });
3808
+ }
3809
+ }
3810
+ };
3811
+ BaseInputComponent.prototype._findInputNode = function (nodes) {
3812
+ for (var i = 0; i < nodes.length; i++) {
3813
+ var node = nodes[i];
3814
+ if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement) {
3815
+ return node;
3816
+ }
3817
+ else if (node.children.length > 0) {
3818
+ return this._findInputNode(node.children);
3819
+ }
3820
+ }
3821
+ };
3822
+ BaseInputComponent.prototype._positionValidationError = function () {
3823
+ if (this.elementRef && this.elementRef.nativeElement && this._errorValidationComponent) {
3824
+ var clientRect = this.elementRef.nativeElement.getBoundingClientRect();
3825
+ this._errorValidationComponent.instance.top = clientRect.bottom;
3826
+ this._errorValidationComponent.instance.left = clientRect.left;
3827
+ }
3828
+ };
3829
+ BaseInputComponent.prototype._handleKeyDown = function (event) {
3830
+ return __awaiter(this, void 0, void 0, function () {
3831
+ var _a, nextSiblingToFocus;
3832
+ return __generator(this, function (_b) {
3833
+ switch (_b.label) {
3834
+ case 0:
3835
+ _a = event.code;
3836
+ switch (_a) {
3837
+ case 'Enter': return [3 /*break*/, 1];
3838
+ case 'Tab': return [3 /*break*/, 3];
3839
+ case 'Escape': return [3 /*break*/, 5];
3840
+ }
3841
+ return [3 /*break*/, 6];
3842
+ case 1:
3843
+ event.preventDefault();
3844
+ return [4 /*yield*/, this.commitClick()];
3845
+ case 2:
3846
+ _b.sent();
3847
+ return [2 /*return*/, false];
3848
+ case 3:
3849
+ nextSiblingToFocus = event.shiftKey ? event.currentTarget.previousSibling : event.currentTarget.nextSibling;
3850
+ event.preventDefault();
3851
+ return [4 /*yield*/, this.commitClick()];
3852
+ case 4:
3853
+ _b.sent();
3854
+ if (nextSiblingToFocus) {
3855
+ try {
3856
+ this._setFocusOnNextPossibleInput(nextSiblingToFocus, event.shiftKey);
3857
+ }
3858
+ catch (e) {
3859
+ }
3860
+ }
3861
+ return [2 /*return*/, false];
3862
+ case 5:
3863
+ this.cancelClick();
3864
+ event.preventDefault();
3865
+ return [2 /*return*/, false];
3866
+ case 6: return [2 /*return*/];
3867
+ }
3868
+ });
3869
+ });
3870
+ };
3871
+ BaseInputComponent.prototype._createNewFocusEvent = function (element) {
3872
+ var eventType = "onfocusin" in element ? "focusin" : "focus", bubbles = "onfocusin" in element, focusEvent;
3873
+ if ("createEvent" in document) {
3874
+ focusEvent = document.createEvent("Event");
3875
+ focusEvent.initEvent(eventType, bubbles, true);
3876
+ }
3877
+ else if ("Event" in window) {
3878
+ focusEvent = new Event(eventType, { bubbles: bubbles, cancelable: true });
3879
+ }
3880
+ return focusEvent;
3881
+ };
3882
+ BaseInputComponent.prototype._setFocusOnNextPossibleInput = function (element, previous) {
3883
+ var elementColl = element.getElementsByTagName('input');
3884
+ if (elementColl && elementColl.length > 0) {
3885
+ var inputElement = elementColl[0];
3886
+ if (inputElement.disabled || inputElement.readOnly) {
3887
+ this._setFocusOnNextPossibleInput(previous ? element.previousSibling : element.nextSibling, previous);
3888
+ }
3889
+ else {
3890
+ var focusEvent = this._createNewFocusEvent(element);
3891
+ inputElement.focus();
3892
+ inputElement.dispatchEvent(focusEvent);
3893
+ }
3894
+ }
3895
+ };
3713
3896
  return BaseInputComponent;
3714
3897
  }());
3715
3898
  BaseInputComponent.BaseFormInputComponentIndex = 0;
@@ -3727,6 +3910,8 @@
3727
3910
  ]; };
3728
3911
  BaseInputComponent.propDecorators = {
3729
3912
  validationErrorContainer: [{ type: core.ViewChild, args: ["validationError", { read: core.ViewContainerRef },] }],
3913
+ _ngModel: [{ type: core.ViewChild, args: [forms.NgModel, { static: true },] }],
3914
+ showSaveCancel: [{ type: core.Input }],
3730
3915
  model: [{ type: core.Input }],
3731
3916
  label: [{ type: core.Input }],
3732
3917
  noValidation: [{ type: core.Input }],
@@ -3756,7 +3941,6 @@
3756
3941
  modelChange: [{ type: core.Output }],
3757
3942
  userModelChange: [{ type: core.Output }],
3758
3943
  hiddenChange: [{ type: core.Output }],
3759
- _ngModel: [{ type: core.ViewChild, args: [forms.NgModel, { static: true },] }],
3760
3944
  focused: [{ type: core.HostBinding, args: ["class.cc-input-focused",] }],
3761
3945
  formInput: [{ type: core.HostBinding, args: ["class.form-input",] }],
3762
3946
  customWidth: [{ type: core.Input }, { type: core.HostBinding, args: ["class.custom-width",] }],
@@ -3776,7 +3960,10 @@
3776
3960
  valid: [{ type: core.HostBinding, args: ["class.valid",] }],
3777
3961
  validationDisabled: [{ type: core.HostBinding, args: ["class.no-validation",] }],
3778
3962
  onClick: [{ type: core.HostListener, args: ["click", ["$event"],] }],
3779
- onFocusIn: [{ type: core.HostListener, args: ["focusin",] }]
3963
+ onFocusIn: [{ type: core.HostListener, args: ["focusin",] }],
3964
+ handleDocumentScroll: [{ type: core.HostListener, args: ["document:scroll",] }],
3965
+ handleWindowResize: [{ type: core.HostListener, args: ["window:resize",] }],
3966
+ handleKeyDown: [{ type: core.HostListener, args: ["keydown", ["$event"],] }]
3780
3967
  };
3781
3968
  __decorate([
3782
3969
  InputBoolean()
@@ -4015,19 +4202,20 @@
4015
4202
  FormComponent.prototype.isValid = function () {
4016
4203
  return this._init && this.formGroup.valid;
4017
4204
  };
4018
- FormComponent.prototype.onEnterKey = function (event) {
4019
- var target = event.target;
4020
- if (['TEXTAREA', 'SELECT'].indexOf(target.tagName) !== -1) {
4021
- return;
4022
- }
4023
- if (target.isContentEditable) {
4024
- return;
4025
- }
4026
- if (target.tagName === 'BUTTON-COLIJN' && target.getAttribute('type') === 'submit') {
4027
- return;
4028
- }
4029
- this.submit();
4030
- };
4205
+ // @HostListener('keyup.enter', ['$event'])
4206
+ // onEnterKey(event: KeyboardEvent): void {
4207
+ // const target: HTMLElement = <HTMLElement>event.target;
4208
+ // if (['TEXTAREA', 'SELECT'].indexOf(target.tagName) !== -1) {
4209
+ // return;
4210
+ // }
4211
+ // if (target.isContentEditable) {
4212
+ // return;
4213
+ // }
4214
+ // if (target.tagName === 'BUTTON-COLIJN' && target.getAttribute('type') === 'submit') {
4215
+ // return;
4216
+ // }
4217
+ // this.submit();
4218
+ // }
4031
4219
  FormComponent.prototype.reset = function () {
4032
4220
  this.submitted = false;
4033
4221
  this.formGroup.markAsUntouched();
@@ -4098,8 +4286,7 @@
4098
4286
  anySubmit: [{ type: core.Output }],
4099
4287
  validityChange: [{ type: core.Output }],
4100
4288
  readonlyChange: [{ type: core.Output }],
4101
- invalidSubmit: [{ type: core.Output }],
4102
- onEnterKey: [{ type: core.HostListener, args: ['keyup.enter', ['$event'],] }]
4289
+ invalidSubmit: [{ type: core.Output }]
4103
4290
  };
4104
4291
 
4105
4292
  var DropDownListComponent = /** @class */ (function (_super) {
@@ -5288,11 +5475,18 @@
5288
5475
  InputTextComponent.decorators = [
5289
5476
  { type: core.Component, args: [{
5290
5477
  selector: "co-input-text",
5291
- template: "\n <label [textContent]=\"placeholder\"></label>\n <input [type]=\"type\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (focus)=\"focused = true\"\n (blur)=\"focused = false\"\n >\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
5478
+ template: "\n <label [textContent]=\"placeholder\"></label>\n <input #input\n [type]=\"type\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n >\n <div *ngIf=\"showSaveCancel && focused && canSaveOrCancel\" class=\"input-save-cancel-button-wrapper\" @showHideSaveCancel>\n <div class=\"input-save-cancel-button save\" (click)=\"commitClick($event)\"></div>\n <div class=\"input-save-cancel-button cancel\" (click)=\"cancelClick($event)\"></div>\n </div>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
5292
5479
  providers: [{
5293
5480
  provide: COMPONENT_INTERFACE_NAME,
5294
5481
  useExisting: core.forwardRef(function () { return InputTextComponent; })
5295
5482
  }],
5483
+ animations: [
5484
+ animations.trigger('showHideSaveCancel', [
5485
+ animations.state('*', animations.style({ transform: 'scaleY(1)', opacity: 1 })),
5486
+ animations.state('void', animations.style({ transform: 'scaleY(0)', opacity: 0 })),
5487
+ animations.transition('void <=> *', animations.animate(200))
5488
+ ]),
5489
+ ],
5296
5490
  encapsulation: core.ViewEncapsulation.None
5297
5491
  },] }
5298
5492
  ];
@@ -5618,7 +5812,8 @@
5618
5812
  ValidationErrorModule.decorators = [
5619
5813
  { type: core.NgModule, args: [{
5620
5814
  imports: [
5621
- common.CommonModule
5815
+ common.CommonModule,
5816
+ IconModule
5622
5817
  ],
5623
5818
  declarations: [
5624
5819
  ValidationErrorComponent
@@ -5765,7 +5960,7 @@
5765
5960
  InputTextareaComponent.decorators = [
5766
5961
  { type: core.Component, args: [{
5767
5962
  selector: "co-input-textarea",
5768
- template: "\n <label [textContent]=\"placeholder\"></label>\n <textarea type=\"textarea\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (focus)=\"focused = true\"\n (blur)=\"focused = false\"\n ></textarea>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
5963
+ template: "\n <label [textContent]=\"placeholder\"></label>\n <textarea\n #input\n type=\"textarea\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></textarea>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
5769
5964
  providers: [{
5770
5965
  provide: COMPONENT_INTERFACE_NAME,
5771
5966
  useExisting: core.forwardRef(function () { return InputTextareaComponent; })
@@ -7746,6 +7941,7 @@
7746
7941
  this._createTiles();
7747
7942
  }
7748
7943
  this._checkNavigationButtons();
7944
+ this._resizeCanvasToDisplaySize();
7749
7945
  };
7750
7946
  Carousel3dComponent.prototype._init = function () {
7751
7947
  var _this = this;
@@ -7952,11 +8148,17 @@
7952
8148
  this._rotate(800);
7953
8149
  };
7954
8150
  Carousel3dComponent.prototype._resizeCanvasToDisplaySize = function () {
7955
- this._camera.aspect = this.canvasContainer.nativeElement.clientWidth / this.canvasContainer.nativeElement.clientHeight;
7956
- this._camera.updateProjectionMatrix();
7957
- this._rendererCss.setSize(this.canvasContainer.nativeElement.clientWidth, this.canvasContainer.nativeElement.clientHeight);
7958
- this._renderer.setSize(this.canvasContainer.nativeElement.clientWidth, this.canvasContainer.nativeElement.clientHeight);
7959
- this._render();
8151
+ var _this = this;
8152
+ setTimeout(function () {
8153
+ if (!_this.canvasContainer || !_this.canvasContainer.nativeElement) {
8154
+ return;
8155
+ }
8156
+ _this._camera.aspect = _this.canvasContainer.nativeElement.clientWidth / _this.canvasContainer.nativeElement.clientHeight;
8157
+ _this._camera.updateProjectionMatrix();
8158
+ _this._rendererCss.setSize(_this.canvasContainer.nativeElement.clientWidth, _this.canvasContainer.nativeElement.clientHeight);
8159
+ _this._renderer.setSize(_this.canvasContainer.nativeElement.clientWidth, _this.canvasContainer.nativeElement.clientHeight);
8160
+ _this._render();
8161
+ });
7960
8162
  };
7961
8163
  Carousel3dComponent.prototype._render = function () {
7962
8164
  this._rendererCss.render(this._sceneCss, this._camera);
@@ -8076,6 +8278,8 @@
8076
8278
  exports.PopupMessageDisplayComponent = PopupMessageDisplayComponent;
8077
8279
  exports.PopupModule = PopupModule;
8078
8280
  exports.PopupWindowShellComponent = PopupWindowShellComponent;
8281
+ exports.PriceDisplayPipe = PriceDisplayPipe;
8282
+ exports.PriceDisplayPipeModule = PriceDisplayPipeModule;
8079
8283
  exports.PromptService = PromptService;
8080
8284
  exports.SimpleGridColumnDirective = SimpleGridColumnDirective;
8081
8285
  exports.SimpleGridComponent = SimpleGridComponent;
@@ -8091,22 +8295,20 @@
8091
8295
  exports["ɵf"] = CoScrollableDirective;
8092
8296
  exports["ɵg"] = StopClickModule;
8093
8297
  exports["ɵh"] = StopClickDirective;
8094
- exports["ɵi"] = PriceDisplayPipeModule;
8095
- exports["ɵj"] = PriceDisplayPipe;
8096
- exports["ɵk"] = InputBoolean;
8097
- exports["ɵl"] = BaseModule;
8098
- exports["ɵm"] = FormInputUserModelChangeListenerService;
8099
- exports["ɵn"] = NgZoneWrapperService;
8100
- exports["ɵo"] = BaseInputComponent;
8101
- exports["ɵp"] = BaseSelectionGridComponent;
8102
- exports["ɵq"] = BaseInlineEditGridComponent;
8103
- exports["ɵr"] = BaseToolbarGridComponent;
8104
- exports["ɵs"] = BaseGridComponent;
8105
- exports["ɵt"] = AppendPipeModule;
8106
- exports["ɵu"] = AppendPipe;
8107
- exports["ɵv"] = ValidationErrorModule;
8108
- exports["ɵw"] = ValidationErrorComponent;
8109
- exports["ɵx"] = PopupShowerService;
8298
+ exports["ɵi"] = InputBoolean;
8299
+ exports["ɵj"] = BaseModule;
8300
+ exports["ɵk"] = FormInputUserModelChangeListenerService;
8301
+ exports["ɵl"] = NgZoneWrapperService;
8302
+ exports["ɵm"] = BaseInputComponent;
8303
+ exports["ɵn"] = BaseSelectionGridComponent;
8304
+ exports["ɵo"] = BaseInlineEditGridComponent;
8305
+ exports["ɵp"] = BaseToolbarGridComponent;
8306
+ exports["ɵq"] = BaseGridComponent;
8307
+ exports["ɵr"] = AppendPipeModule;
8308
+ exports["ɵs"] = AppendPipe;
8309
+ exports["ɵt"] = ValidationErrorModule;
8310
+ exports["ɵu"] = ValidationErrorComponent;
8311
+ exports["ɵv"] = PopupShowerService;
8110
8312
 
8111
8313
  Object.defineProperty(exports, '__esModule', { value: true });
8112
8314