@wizishop/angular-components 0.0.124 → 0.0.127
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.
- package/bundles/wizishop-angular-components.umd.js +36 -3
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +1 -1
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/selects/select/select.component.js +10 -3
- package/esm2015/lib/directives/keyboard-events/keypress-enter.directive.js +21 -0
- package/esm2015/lib/directives/shared-directives.module.js +3 -2
- package/esm2015/public-api.js +2 -1
- package/fesm2015/wizishop-angular-components.js +31 -4
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/selects/select/select.component.d.ts +3 -1
- package/lib/directives/keyboard-events/keypress-enter.directive.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/wizishop-angular-components-0.0.127.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.124.tgz +0 -0
|
@@ -633,7 +633,28 @@
|
|
|
633
633
|
ngVar: [{ type: i0.Input }]
|
|
634
634
|
};
|
|
635
635
|
|
|
636
|
-
var
|
|
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,17 @@
|
|
|
3114
3135
|
this.onChange = function () { };
|
|
3115
3136
|
this.onTouch = function () { };
|
|
3116
3137
|
}
|
|
3138
|
+
Object.defineProperty(SelectComponent.prototype, "items", {
|
|
3139
|
+
get: function () {
|
|
3140
|
+
return this._items;
|
|
3141
|
+
},
|
|
3142
|
+
set: function (items) {
|
|
3143
|
+
this._items = items;
|
|
3144
|
+
this.indexItemSelected = -1;
|
|
3145
|
+
},
|
|
3146
|
+
enumerable: false,
|
|
3147
|
+
configurable: true
|
|
3148
|
+
});
|
|
3117
3149
|
Object.defineProperty(SelectComponent.prototype, "callToAction", {
|
|
3118
3150
|
get: function () {
|
|
3119
3151
|
return this._calllToAction;
|
|
@@ -3183,7 +3215,7 @@
|
|
|
3183
3215
|
SelectComponent.decorators = [
|
|
3184
3216
|
{ type: i0.Component, args: [{
|
|
3185
3217
|
selector: 'wac-select',
|
|
3186
|
-
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>",
|
|
3218
|
+
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>",
|
|
3187
3219
|
providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }]
|
|
3188
3220
|
},] }
|
|
3189
3221
|
];
|
|
@@ -4303,6 +4335,7 @@
|
|
|
4303
4335
|
exports.InputComponent = InputComponent;
|
|
4304
4336
|
exports.InputSearchComponent = InputSearchComponent;
|
|
4305
4337
|
exports.InputWithSelectComponent = InputWithSelectComponent;
|
|
4338
|
+
exports.KeypressEnterDirective = KeypressEnterDirective;
|
|
4306
4339
|
exports.LabelComponent = LabelComponent;
|
|
4307
4340
|
exports.LinkComponent = LinkComponent;
|
|
4308
4341
|
exports.LoaderComponent = LoaderComponent;
|