@wizishop/angular-components 0.0.123 → 0.0.126

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.
@@ -633,7 +633,28 @@
633
633
  ngVar: [{ type: i0.Input }]
634
634
  };
635
635
 
636
- var directives = [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective];
636
+ var KeypressEnterDirective = /** @class */ (function () {
637
+ function KeypressEnterDirective() {
638
+ this.KEYPRESS_ENTER = "Enter";
639
+ this.keypressEnter = new i0.EventEmitter();
640
+ }
641
+ KeypressEnterDirective.prototype.onKeypress = function (event) {
642
+ if (event.key === this.KEYPRESS_ENTER) {
643
+ this.keypressEnter.next(true);
644
+ }
645
+ };
646
+ return KeypressEnterDirective;
647
+ }());
648
+ KeypressEnterDirective.decorators = [
649
+ { type: i0.Directive, args: [{ selector: '[keypressEnter]' },] }
650
+ ];
651
+ KeypressEnterDirective.ctorParameters = function () { return []; };
652
+ KeypressEnterDirective.propDecorators = {
653
+ onKeypress: [{ type: i0.HostListener, args: ['keypress', ['$event'],] }],
654
+ keypressEnter: [{ type: i0.Output }]
655
+ };
656
+
657
+ var directives = [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective, KeypressEnterDirective];
637
658
  var SharedDirectives = /** @class */ (function () {
638
659
  function SharedDirectives() {
639
660
  }
@@ -3106,7 +3127,7 @@
3106
3127
  this.type = 'default';
3107
3128
  this.maxWidth = '100%';
3108
3129
  this.disabled = false;
3109
- this.selectValue = new i0.EventEmitter();
3130
+ this.selectValue = new i0.EventEmitter(); // todo rename more explicit
3110
3131
  this.clickOnCallToAction = new i0.EventEmitter();
3111
3132
  this.openCategories = false;
3112
3133
  this.indexItemSelected = -1;
@@ -3114,6 +3135,16 @@
3114
3135
  this.onChange = function () { };
3115
3136
  this.onTouch = function () { };
3116
3137
  }
3138
+ Object.defineProperty(SelectComponent.prototype, "callToAction", {
3139
+ get: function () {
3140
+ return this._calllToAction;
3141
+ },
3142
+ set: function (callToAction) {
3143
+ this._calllToAction = callToAction;
3144
+ },
3145
+ enumerable: false,
3146
+ configurable: true
3147
+ });
3117
3148
  SelectComponent.prototype.ngOnInit = function () {
3118
3149
  this.indexItemSelected = this.items.findIndex(function (item) { return item.selected; });
3119
3150
  };
@@ -3173,7 +3204,7 @@
3173
3204
  SelectComponent.decorators = [
3174
3205
  { type: i0.Component, args: [{
3175
3206
  selector: 'wac-select',
3176
- template: "<p *ngIf=\"label\" [innerHTML]=\"label\" class=\"wac-select__label\"></p>\n\n<div class=\"wac-select\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\" [zIndexToggle]=\"openCategories\">\n\n <div class=\"wac-select__current\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && openCategories = !openCategories\" *ngIf=\"!search\">\n <span *ngIf=\"indexItemSelected !== -1\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span [innerHTML]=\"indexItemSelected !== -1 ? items[indexItemSelected].name : placeholder\"></span><span><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__current wac-select__current--withSearch\" [ngClass]=\"{ 'select-disabled' : disabled, 'open-search': openCategories }\" *ngIf=\"search\">\n <div class=\"wac-select__current__search\" *ngIf=\"openCategories && !disabled\">\n <i class=\"far fa-search\"></i>\n <input #search type=\"text\" [(ngModel)]=\"searchValue\" (ngModelChange)=\"onSearcheValueChange()\"/>\n </div>\n <span (click)=\"openCategories = !openCategories;\" *ngIf=\"items[indexItemSelected]?.icon && !openCategories\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span (click)=\"showCategories()\" [innerHTML]=\"items[indexItemSelected]?.name ? items[indexItemSelected].name : placeholder\"></span>\n <span (click)=\"openCategories = !openCategories;\"><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openCategories, open: type === 'open' }\" [ngStyle]=\"{ 'max-width': maxWidthItems }\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"items.length\">\n\n <div *ngIf=\"callToAction\" class=\"wac-select__content__cta\">\n <div (click)=\"onClickCallToAction()\">\n <i *ngIf=\"callToAction.icon\" [classList]=\"callToAction.icon\"></i><strong *ngIf=\"callToAction.boldText\">{{ callToAction.boldText }}</strong\n ><span>{{ callToAction?.name }}</span>\n </div>\n </div>\n\n <div\n *ngFor=\"let item of items | selectFilters: searchValue; let index = index;\"\n (click)=\"onClose()\"\n class=\"wac-select__content__item\"\n >\n <div [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(item.id)\">\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name }}\n </div>\n </div>\n\n </perfect-scrollbar>\n\n <div *ngIf=\"!(items | selectFilters: searchValue)?.length\" class=\"wac-select__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>",
3207
+ template: "<p *ngIf=\"label\" [innerHTML]=\"label\" class=\"wac-select__label\"></p>\n\n<div class=\"wac-select\" wzAutoHide (clickOutside)=\"onClose()\" [ngStyle]=\"{ 'max-width': maxWidth }\" [zIndexToggle]=\"openCategories\">\n\n <div class=\"wac-select__current\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && openCategories = !openCategories\" *ngIf=\"!search\">\n <span *ngIf=\"indexItemSelected !== -1\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span [innerHTML]=\"indexItemSelected !== -1 ? items[indexItemSelected].name : placeholder\"></span><span><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__current wac-select__current--withSearch\" [ngClass]=\"{ 'select-disabled' : disabled, 'open-search': openCategories }\" *ngIf=\"search\">\n <div class=\"wac-select__current__search\" *ngIf=\"openCategories && !disabled\">\n <i class=\"far fa-search\"></i>\n <input #search type=\"text\" [(ngModel)]=\"searchValue\" (ngModelChange)=\"onSearcheValueChange()\" (keypressEnter)=\"onClickCallToAction()\"/>\n </div>\n <span (click)=\"openCategories = !openCategories;\" *ngIf=\"items[indexItemSelected]?.icon && !openCategories\" class=\"icon\" [innerHTML]=\"items[indexItemSelected].icon\"></span>\n <span (click)=\"showCategories()\" [innerHTML]=\"items[indexItemSelected]?.name ? items[indexItemSelected].name : placeholder\"></span>\n <span (click)=\"openCategories = !openCategories;\"><i class=\"fas fa-chevron-down\"></i></span>\n </div>\n\n <div class=\"wac-select__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openCategories, open: type === 'open' }\" [ngStyle]=\"{ 'max-width': maxWidthItems }\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"items.length\">\n\n <div *ngIf=\"callToAction\" class=\"wac-select__content__cta\">\n <div (click)=\"onClickCallToAction()\">\n <i *ngIf=\"callToAction.icon\" [classList]=\"callToAction.icon\"></i><strong *ngIf=\"callToAction.boldText\">{{ callToAction.boldText }}</strong\n ><span>{{ callToAction?.name }}</span>\n </div>\n </div>\n\n <div\n *ngFor=\"let item of items | selectFilters: searchValue; let index = index;\"\n (click)=\"onClose()\"\n class=\"wac-select__content__item\"\n >\n <div [ngClass]=\"{ selected: item.selected }\" (click)=\"onSelectItem(item.id)\">\n <span class=\"icon\" [innerHTML]=\"item.icon\" *ngIf=\"item.icon\"></span>{{ item.name }}\n </div>\n </div>\n\n </perfect-scrollbar>\n\n <div *ngIf=\"!(items | selectFilters: searchValue)?.length\" class=\"wac-select__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>",
3177
3208
  providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }]
3178
3209
  },] }
3179
3210
  ];
@@ -4293,6 +4324,7 @@
4293
4324
  exports.InputComponent = InputComponent;
4294
4325
  exports.InputSearchComponent = InputSearchComponent;
4295
4326
  exports.InputWithSelectComponent = InputWithSelectComponent;
4327
+ exports.KeypressEnterDirective = KeypressEnterDirective;
4296
4328
  exports.LabelComponent = LabelComponent;
4297
4329
  exports.LinkComponent = LinkComponent;
4298
4330
  exports.LoaderComponent = LoaderComponent;