@wizishop/angular-components 0.0.38 → 0.0.42
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/angular-components.scss +3585 -3377
- package/bundles/wizishop-angular-components.umd.js +126 -13
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +2 -2
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/alert-popup/alert-popup-module.js +16 -0
- package/esm2015/lib/components/alert-popup/alert-popup.component.js +41 -0
- package/esm2015/lib/components/alert-popup/alert-popup.service.js +30 -0
- package/esm2015/lib/components/button/button.component.js +4 -2
- package/esm2015/lib/components/dropdown/dropdown.component.js +2 -2
- package/esm2015/lib/components/shared-components.module.js +3 -1
- package/esm2015/lib/services/dom.service.js +28 -4
- package/esm2015/public-api.js +3 -1
- package/esm2015/wizishop-angular-components.js +3 -2
- package/fesm2015/wizishop-angular-components.js +110 -6
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/alert-popup/alert-popup-module.d.ts +2 -0
- package/lib/components/alert-popup/alert-popup.component.d.ts +16 -0
- package/lib/components/alert-popup/alert-popup.service.d.ts +20 -0
- package/lib/components/button/button.component.d.ts +1 -0
- package/lib/services/dom.service.d.ts +11 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/wizishop-angular-components-0.0.42.tgz +0 -0
- package/wizishop-angular-components.d.ts +2 -1
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.38.tgz +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@wizishop/ng-wizi-bulma'), require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-perfect-scrollbar'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/table'), require('@angular/animations'), require('ngx-chips'), require('uuid'), require('@ngx-translate/core'), require('@angular/router')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@wizishop/angular-components', ['exports', '@wizishop/ng-wizi-bulma', '@angular/core', '@angular/common', '@angular/forms', 'ngx-perfect-scrollbar', 'rxjs', 'rxjs/operators', '@angular/cdk/table', '@angular/animations', 'ngx-chips', 'uuid', '@ngx-translate/core', '@angular/router'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wizishop = global.wizishop || {}, global.wizishop['angular-components'] = {}), global['ng-wizi-bulma'], global.ng.core, global.ng.common, global.ng.forms, global['ngx-perfect-scrollbar'], global.rxjs, global.rxjs.operators, global.ng.cdk.table, global.ng.animations, global['ngx-chips'], global.uuid, global['@ngx-translate/core'], global.ng.router));
|
|
5
|
-
}(this, (function (exports, i1, i0, common, forms, ngxPerfectScrollbar, rxjs, operators, table, animations, ngxChips, uuid, core, router) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@wizishop/ng-wizi-bulma'), require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-perfect-scrollbar'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/overlay'), require('@angular/cdk/table'), require('@angular/animations'), require('ngx-chips'), require('uuid'), require('@ngx-translate/core'), require('@angular/router')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@wizishop/angular-components', ['exports', '@wizishop/ng-wizi-bulma', '@angular/core', '@angular/common', '@angular/forms', 'ngx-perfect-scrollbar', 'rxjs', 'rxjs/operators', '@angular/cdk/overlay', '@angular/cdk/table', '@angular/animations', 'ngx-chips', 'uuid', '@ngx-translate/core', '@angular/router'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wizishop = global.wizishop || {}, global.wizishop['angular-components'] = {}), global['ng-wizi-bulma'], global.ng.core, global.ng.common, global.ng.forms, global['ngx-perfect-scrollbar'], global.rxjs, global.rxjs.operators, global.ng.cdk.overlay, global.ng.cdk.table, global.ng.animations, global['ngx-chips'], global.uuid, global['@ngx-translate/core'], global.ng.router));
|
|
5
|
+
}(this, (function (exports, i1$1, i0, common, forms, ngxPerfectScrollbar, rxjs, operators, i1, table, animations, ngxChips, uuid, core, router) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -448,7 +448,11 @@
|
|
|
448
448
|
};
|
|
449
449
|
|
|
450
450
|
var DomService = /** @class */ (function () {
|
|
451
|
-
function DomService() {
|
|
451
|
+
function DomService(componentFactoryResolver, appRef, injector, overlayContainer) {
|
|
452
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
453
|
+
this.appRef = appRef;
|
|
454
|
+
this.injector = injector;
|
|
455
|
+
this.overlayContainer = overlayContainer;
|
|
452
456
|
this.documentEventSource = new rxjs.Subject();
|
|
453
457
|
this.documentEventDone = this.documentEventSource.asObservable();
|
|
454
458
|
this.eventInitialisation = true;
|
|
@@ -478,14 +482,32 @@
|
|
|
478
482
|
_this.documentScrollSource.next(window);
|
|
479
483
|
};
|
|
480
484
|
};
|
|
485
|
+
DomService.prototype.attachComponentPortal = function (component, injector) {
|
|
486
|
+
var componentRef = this.componentFactoryResolver
|
|
487
|
+
.resolveComponentFactory(component)
|
|
488
|
+
.create(injector ? injector : this.injector);
|
|
489
|
+
this.appRef.attachView(componentRef.hostView);
|
|
490
|
+
this.overlayContainer.getContainerElement().appendChild(this._getComponentRootNode(componentRef));
|
|
491
|
+
return componentRef;
|
|
492
|
+
};
|
|
493
|
+
/** Gets the root HTMLElement for an instantiated component. */
|
|
494
|
+
DomService.prototype._getComponentRootNode = function (componentRef) {
|
|
495
|
+
return componentRef.hostView.rootNodes[0];
|
|
496
|
+
};
|
|
481
497
|
return DomService;
|
|
482
498
|
}());
|
|
483
|
-
DomService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DomService_Factory() { return new DomService(); }, token: DomService, providedIn: "root" });
|
|
499
|
+
DomService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DomService_Factory() { return new DomService(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1.OverlayContainer)); }, token: DomService, providedIn: "root" });
|
|
484
500
|
DomService.decorators = [
|
|
485
501
|
{ type: i0.Injectable, args: [{
|
|
486
502
|
providedIn: 'root'
|
|
487
503
|
},] }
|
|
488
504
|
];
|
|
505
|
+
DomService.ctorParameters = function () { return [
|
|
506
|
+
{ type: i0.ComponentFactoryResolver },
|
|
507
|
+
{ type: i0.ApplicationRef },
|
|
508
|
+
{ type: i0.Injector },
|
|
509
|
+
{ type: i1.OverlayContainer }
|
|
510
|
+
]; };
|
|
489
511
|
|
|
490
512
|
var AutoHideDirective = /** @class */ (function () {
|
|
491
513
|
function AutoHideDirective(_elementRef, domService) {
|
|
@@ -713,14 +735,14 @@
|
|
|
713
735
|
};
|
|
714
736
|
return FiltersTableService;
|
|
715
737
|
}());
|
|
716
|
-
FiltersTableService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FiltersTableService_Factory() { return new FiltersTableService(i0.ɵɵinject(i1.NwbFilterRoutingBuilder)); }, token: FiltersTableService, providedIn: "root" });
|
|
738
|
+
FiltersTableService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FiltersTableService_Factory() { return new FiltersTableService(i0.ɵɵinject(i1$1.NwbFilterRoutingBuilder)); }, token: FiltersTableService, providedIn: "root" });
|
|
717
739
|
FiltersTableService.decorators = [
|
|
718
740
|
{ type: i0.Injectable, args: [{
|
|
719
741
|
providedIn: 'root'
|
|
720
742
|
},] }
|
|
721
743
|
];
|
|
722
744
|
FiltersTableService.ctorParameters = function () { return [
|
|
723
|
-
{ type: i1.NwbFilterRoutingBuilder }
|
|
745
|
+
{ type: i1$1.NwbFilterRoutingBuilder }
|
|
724
746
|
]; };
|
|
725
747
|
|
|
726
748
|
var TableComponent = /** @class */ (function () {
|
|
@@ -891,6 +913,7 @@
|
|
|
891
913
|
this.iconFontSize = 12;
|
|
892
914
|
this.hasLoader = false;
|
|
893
915
|
this.disabled = false;
|
|
916
|
+
this.whiteSpaceNowrap = false;
|
|
894
917
|
this.click = new i0.EventEmitter();
|
|
895
918
|
this.isLoading = false;
|
|
896
919
|
this.interval = null;
|
|
@@ -930,7 +953,7 @@
|
|
|
930
953
|
ButtonComponent.decorators = [
|
|
931
954
|
{ type: i0.Component, args: [{
|
|
932
955
|
selector: 'wac-button',
|
|
933
|
-
template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"onButtonClick($event)\"\n [ngClass]=\"[label === '' ? 'alone' : '', isLoading ? 'is-loading' : '', disabled ? 'disabled' : '', widthAuto ? 'width-auto' : '']\"\n>\n <span class=\"wac-button__wrapper\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading || interval !== null\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n </span>\n</a>\n"
|
|
956
|
+
template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"onButtonClick($event)\"\n [ngClass]=\"[label === '' ? 'alone' : '', isLoading ? 'is-loading' : '', disabled ? 'disabled' : '', widthAuto ? 'width-auto' : '', whiteSpaceNowrap ? 'white-space-no-wrap' : '']\"\n>\n <span class=\"wac-button__wrapper\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading || interval !== null\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n </span>\n</a>\n"
|
|
934
957
|
},] }
|
|
935
958
|
];
|
|
936
959
|
ButtonComponent.ctorParameters = function () { return []; };
|
|
@@ -943,6 +966,7 @@
|
|
|
943
966
|
iconFontSize: [{ type: i0.Input }],
|
|
944
967
|
hasLoader: [{ type: i0.Input }],
|
|
945
968
|
disabled: [{ type: i0.Input }],
|
|
969
|
+
whiteSpaceNowrap: [{ type: i0.Input }],
|
|
946
970
|
click: [{ type: i0.Output }]
|
|
947
971
|
};
|
|
948
972
|
|
|
@@ -1000,7 +1024,7 @@
|
|
|
1000
1024
|
DropdownComponent.decorators = [
|
|
1001
1025
|
{ type: i0.Component, args: [{
|
|
1002
1026
|
selector: 'wac-dropdown',
|
|
1003
|
-
template: "<div class=\"wac-dropdown\">\n <div class=\"wac-dropdown__wrapper\">\n <i class=\"wac-dropdown__wrapper__icon far fa-ellipsis-v\"></i>\n <div class=\"wac-dropdown__wrapper__sublevel\">\n <ul class=\"wac-dropdown__wrapper__sublevel__container\">\n <li\n *ngFor=\"let item of items\"\n class=\"wac-dropdown__wrapper__sublevel__container__item\"\n (click)=\"onUserInput(item.index)\"\n >\n <i\n *ngIf=\"hasIcons\"\n [class]=\"item.icon\"\n [style.font-size.px]=\"item.iconFontSize ? item.iconFontSize : '14'\"\n ></i>\n {{ item.label }}
|
|
1027
|
+
template: "<div class=\"wac-dropdown\">\n <div class=\"wac-dropdown__wrapper\">\n <i class=\"wac-dropdown__wrapper__icon far fa-ellipsis-v\"></i>\n <div class=\"wac-dropdown__wrapper__sublevel\">\n <ul class=\"wac-dropdown__wrapper__sublevel__container\">\n <li\n *ngFor=\"let item of items\"\n class=\"wac-dropdown__wrapper__sublevel__container__item\"\n (click)=\"onUserInput(item.index)\"\n >\n <i\n *ngIf=\"hasIcons\"\n [class]=\"item.icon\"\n [style.font-size.px]=\"item.iconFontSize ? item.iconFontSize : '14'\"\n ></i>\n <span>{{ item.label }}</span>\n </li>\n </ul>\n </div>\n </div>\n</div>\n"
|
|
1004
1028
|
},] }
|
|
1005
1029
|
];
|
|
1006
1030
|
DropdownComponent.ctorParameters = function () { return []; };
|
|
@@ -3438,6 +3462,91 @@
|
|
|
3438
3462
|
response: [{ type: i0.Output }]
|
|
3439
3463
|
};
|
|
3440
3464
|
|
|
3465
|
+
var AlertPopupComponent = /** @class */ (function () {
|
|
3466
|
+
function AlertPopupComponent() {
|
|
3467
|
+
/** Subject for notifying the user that the dialog has finished closing. */
|
|
3468
|
+
this.afterClosedPopup = new rxjs.Subject();
|
|
3469
|
+
this.open = false;
|
|
3470
|
+
}
|
|
3471
|
+
AlertPopupComponent.prototype.ngOnInit = function () {
|
|
3472
|
+
var _this = this;
|
|
3473
|
+
setTimeout(function () {
|
|
3474
|
+
_this.open = true;
|
|
3475
|
+
}, 50);
|
|
3476
|
+
if (this.config.duration > 0) {
|
|
3477
|
+
this.timer = setTimeout(function () { return _this.dismiss(); }, this.config.duration);
|
|
3478
|
+
}
|
|
3479
|
+
};
|
|
3480
|
+
AlertPopupComponent.prototype.dismiss = function () {
|
|
3481
|
+
var _this = this;
|
|
3482
|
+
this.open = false;
|
|
3483
|
+
setTimeout(function () {
|
|
3484
|
+
_this.afterClosedPopup.next(true);
|
|
3485
|
+
_this.afterClosedPopup.complete();
|
|
3486
|
+
}, 200);
|
|
3487
|
+
};
|
|
3488
|
+
/**
|
|
3489
|
+
* Gets an observable that is notified when the dialog is finished closing.
|
|
3490
|
+
*/
|
|
3491
|
+
AlertPopupComponent.prototype.afterClosed = function () {
|
|
3492
|
+
return this.afterClosedPopup.asObservable();
|
|
3493
|
+
};
|
|
3494
|
+
return AlertPopupComponent;
|
|
3495
|
+
}());
|
|
3496
|
+
AlertPopupComponent.decorators = [
|
|
3497
|
+
{ type: i0.Component, args: [{
|
|
3498
|
+
selector: 'wac-alert-popup',
|
|
3499
|
+
template: "<div\n [class]=\"'alert ' + ((config.color) ? config.color : ' is-primary') + ((config.extraClasses) ? ' ' + config.extraClasses : '') + ((config.position) ? ' ' + config.position : '') + ((config.fullsize) ? ' fullsize' : '') + ((config.opacity) ? ' opacity-active' : '') + ((config.small) ? ' small' : '')\"\n [ngClass]=\"{'is-active': open}\"\n>\n <div class=\"alert--message\">\n <span class=\"icon\" *ngIf=\"config.icon\">\n <i [class]=\"config.icon\"></i>\n </span>\n <span (click)=\"dismiss()\" class=\"wac-alert-popup__close\"><i class=\"fas fa-times\"></i></span>\n <p *ngIf=\"config.title\" class=\"wac-alert-popup__title\" [innerHTML]=\"config.title\"></p>\n <p *ngIf=\"config.message\" class=\"wac-alert-popup__text\" [innerHTML]=\"config.message\"></p>\n </div>\n</div>\n",
|
|
3500
|
+
host: {
|
|
3501
|
+
class: 'wac-alert-popup'
|
|
3502
|
+
},
|
|
3503
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
3504
|
+
},] }
|
|
3505
|
+
];
|
|
3506
|
+
|
|
3507
|
+
var AlertPopupService = /** @class */ (function () {
|
|
3508
|
+
function AlertPopupService(domService) {
|
|
3509
|
+
this.domService = domService;
|
|
3510
|
+
}
|
|
3511
|
+
AlertPopupService.prototype.open = function (config) {
|
|
3512
|
+
var componentRef = this.getComponentRef(config);
|
|
3513
|
+
return componentRef.instance;
|
|
3514
|
+
};
|
|
3515
|
+
AlertPopupService.prototype.getComponentRef = function (config) {
|
|
3516
|
+
var componentRef = this.domService.attachComponentPortal(AlertPopupComponent);
|
|
3517
|
+
config = Object.assign({
|
|
3518
|
+
position: 'is-top'
|
|
3519
|
+
}, config);
|
|
3520
|
+
componentRef.instance.config = config;
|
|
3521
|
+
componentRef.instance.afterClosed().subscribe(function () {
|
|
3522
|
+
componentRef.destroy();
|
|
3523
|
+
});
|
|
3524
|
+
return componentRef;
|
|
3525
|
+
};
|
|
3526
|
+
return AlertPopupService;
|
|
3527
|
+
}());
|
|
3528
|
+
AlertPopupService.decorators = [
|
|
3529
|
+
{ type: i0.Injectable }
|
|
3530
|
+
];
|
|
3531
|
+
AlertPopupService.ctorParameters = function () { return [
|
|
3532
|
+
{ type: DomService }
|
|
3533
|
+
]; };
|
|
3534
|
+
|
|
3535
|
+
var AlertPopupModule = /** @class */ (function () {
|
|
3536
|
+
function AlertPopupModule() {
|
|
3537
|
+
}
|
|
3538
|
+
return AlertPopupModule;
|
|
3539
|
+
}());
|
|
3540
|
+
AlertPopupModule.decorators = [
|
|
3541
|
+
{ type: i0.NgModule, args: [{
|
|
3542
|
+
imports: [common.CommonModule],
|
|
3543
|
+
providers: [AlertPopupService],
|
|
3544
|
+
entryComponents: [AlertPopupComponent],
|
|
3545
|
+
declarations: [AlertPopupComponent],
|
|
3546
|
+
exports: [AlertPopupComponent]
|
|
3547
|
+
},] }
|
|
3548
|
+
];
|
|
3549
|
+
|
|
3441
3550
|
var components = [
|
|
3442
3551
|
TagComponent,
|
|
3443
3552
|
TabComponent,
|
|
@@ -3503,7 +3612,7 @@
|
|
|
3503
3612
|
imports: [
|
|
3504
3613
|
common.CommonModule,
|
|
3505
3614
|
forms.FormsModule,
|
|
3506
|
-
i1.NwbAllModule,
|
|
3615
|
+
i1$1.NwbAllModule,
|
|
3507
3616
|
core.TranslateModule.forChild(),
|
|
3508
3617
|
forms.ReactiveFormsModule,
|
|
3509
3618
|
SharedDirectives,
|
|
@@ -3518,6 +3627,7 @@
|
|
|
3518
3627
|
LoaderModule,
|
|
3519
3628
|
ProgressBarModule,
|
|
3520
3629
|
ngxPerfectScrollbar.PerfectScrollbarModule,
|
|
3630
|
+
AlertPopupModule,
|
|
3521
3631
|
router.RouterModule
|
|
3522
3632
|
],
|
|
3523
3633
|
declarations: components,
|
|
@@ -3536,7 +3646,7 @@
|
|
|
3536
3646
|
common.CommonModule,
|
|
3537
3647
|
SharedComponentsModule,
|
|
3538
3648
|
SharedDirectives,
|
|
3539
|
-
i1.NwbAllModule
|
|
3649
|
+
i1$1.NwbAllModule
|
|
3540
3650
|
],
|
|
3541
3651
|
exports: [SharedComponentsModule, SharedDirectives]
|
|
3542
3652
|
},] }
|
|
@@ -3552,6 +3662,8 @@
|
|
|
3552
3662
|
|
|
3553
3663
|
exports.AbstractDebounceDirective = AbstractDebounceDirective;
|
|
3554
3664
|
exports.AlertComponent = AlertComponent;
|
|
3665
|
+
exports.AlertPopupComponent = AlertPopupComponent;
|
|
3666
|
+
exports.AlertPopupService = AlertPopupService;
|
|
3555
3667
|
exports.AutoHideDirective = AutoHideDirective;
|
|
3556
3668
|
exports.BackComponent = BackComponent;
|
|
3557
3669
|
exports.BlockComponent = BlockComponent;
|
|
@@ -3623,7 +3735,8 @@
|
|
|
3623
3735
|
exports.ɵk = LoaderModule;
|
|
3624
3736
|
exports.ɵl = CheckboxModule;
|
|
3625
3737
|
exports.ɵm = inOutY;
|
|
3626
|
-
exports.ɵn =
|
|
3738
|
+
exports.ɵn = AlertPopupModule;
|
|
3739
|
+
exports.ɵo = inOutX;
|
|
3627
3740
|
|
|
3628
3741
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3629
3742
|
|