@wizishop/angular-components 0.0.39 → 0.0.40
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 +3188 -3014
- package/bundles/wizishop-angular-components.umd.js +122 -11
- 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/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 +106 -4
- 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 +19 -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.40.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.39.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 () {
|
|
@@ -3438,6 +3460,91 @@
|
|
|
3438
3460
|
response: [{ type: i0.Output }]
|
|
3439
3461
|
};
|
|
3440
3462
|
|
|
3463
|
+
var AlertPopupComponent = /** @class */ (function () {
|
|
3464
|
+
function AlertPopupComponent() {
|
|
3465
|
+
/** Subject for notifying the user that the dialog has finished closing. */
|
|
3466
|
+
this.afterClosedPopup = new rxjs.Subject();
|
|
3467
|
+
this.open = false;
|
|
3468
|
+
}
|
|
3469
|
+
AlertPopupComponent.prototype.ngOnInit = function () {
|
|
3470
|
+
var _this = this;
|
|
3471
|
+
setTimeout(function () {
|
|
3472
|
+
_this.open = true;
|
|
3473
|
+
}, 50);
|
|
3474
|
+
if (this.config.duration > 0) {
|
|
3475
|
+
this.timer = setTimeout(function () { return _this.dismiss(); }, this.config.duration);
|
|
3476
|
+
}
|
|
3477
|
+
};
|
|
3478
|
+
AlertPopupComponent.prototype.dismiss = function () {
|
|
3479
|
+
var _this = this;
|
|
3480
|
+
this.open = false;
|
|
3481
|
+
setTimeout(function () {
|
|
3482
|
+
_this.afterClosedPopup.next(true);
|
|
3483
|
+
_this.afterClosedPopup.complete();
|
|
3484
|
+
}, 200);
|
|
3485
|
+
};
|
|
3486
|
+
/**
|
|
3487
|
+
* Gets an observable that is notified when the dialog is finished closing.
|
|
3488
|
+
*/
|
|
3489
|
+
AlertPopupComponent.prototype.afterClosed = function () {
|
|
3490
|
+
return this.afterClosedPopup.asObservable();
|
|
3491
|
+
};
|
|
3492
|
+
return AlertPopupComponent;
|
|
3493
|
+
}());
|
|
3494
|
+
AlertPopupComponent.decorators = [
|
|
3495
|
+
{ type: i0.Component, args: [{
|
|
3496
|
+
selector: 'wac-alert-popup',
|
|
3497
|
+
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' : '')\"\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 class=\"wac-alert-popup__text\" [innerHTML]=\"config.message\"></p>\n </div>\n</div>\n",
|
|
3498
|
+
host: {
|
|
3499
|
+
class: 'wac-alert-popup'
|
|
3500
|
+
},
|
|
3501
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
3502
|
+
},] }
|
|
3503
|
+
];
|
|
3504
|
+
|
|
3505
|
+
var AlertPopupService = /** @class */ (function () {
|
|
3506
|
+
function AlertPopupService(domService) {
|
|
3507
|
+
this.domService = domService;
|
|
3508
|
+
}
|
|
3509
|
+
AlertPopupService.prototype.open = function (config) {
|
|
3510
|
+
var componentRef = this.getComponentRef(config);
|
|
3511
|
+
return componentRef.instance;
|
|
3512
|
+
};
|
|
3513
|
+
AlertPopupService.prototype.getComponentRef = function (config) {
|
|
3514
|
+
var componentRef = this.domService.attachComponentPortal(AlertPopupComponent);
|
|
3515
|
+
config = Object.assign({
|
|
3516
|
+
position: 'is-top'
|
|
3517
|
+
}, config);
|
|
3518
|
+
componentRef.instance.config = config;
|
|
3519
|
+
componentRef.instance.afterClosed().subscribe(function () {
|
|
3520
|
+
componentRef.destroy();
|
|
3521
|
+
});
|
|
3522
|
+
return componentRef;
|
|
3523
|
+
};
|
|
3524
|
+
return AlertPopupService;
|
|
3525
|
+
}());
|
|
3526
|
+
AlertPopupService.decorators = [
|
|
3527
|
+
{ type: i0.Injectable }
|
|
3528
|
+
];
|
|
3529
|
+
AlertPopupService.ctorParameters = function () { return [
|
|
3530
|
+
{ type: DomService }
|
|
3531
|
+
]; };
|
|
3532
|
+
|
|
3533
|
+
var AlertPopupModule = /** @class */ (function () {
|
|
3534
|
+
function AlertPopupModule() {
|
|
3535
|
+
}
|
|
3536
|
+
return AlertPopupModule;
|
|
3537
|
+
}());
|
|
3538
|
+
AlertPopupModule.decorators = [
|
|
3539
|
+
{ type: i0.NgModule, args: [{
|
|
3540
|
+
imports: [common.CommonModule],
|
|
3541
|
+
providers: [AlertPopupService],
|
|
3542
|
+
entryComponents: [AlertPopupComponent],
|
|
3543
|
+
declarations: [AlertPopupComponent],
|
|
3544
|
+
exports: [AlertPopupComponent]
|
|
3545
|
+
},] }
|
|
3546
|
+
];
|
|
3547
|
+
|
|
3441
3548
|
var components = [
|
|
3442
3549
|
TagComponent,
|
|
3443
3550
|
TabComponent,
|
|
@@ -3503,7 +3610,7 @@
|
|
|
3503
3610
|
imports: [
|
|
3504
3611
|
common.CommonModule,
|
|
3505
3612
|
forms.FormsModule,
|
|
3506
|
-
i1.NwbAllModule,
|
|
3613
|
+
i1$1.NwbAllModule,
|
|
3507
3614
|
core.TranslateModule.forChild(),
|
|
3508
3615
|
forms.ReactiveFormsModule,
|
|
3509
3616
|
SharedDirectives,
|
|
@@ -3518,6 +3625,7 @@
|
|
|
3518
3625
|
LoaderModule,
|
|
3519
3626
|
ProgressBarModule,
|
|
3520
3627
|
ngxPerfectScrollbar.PerfectScrollbarModule,
|
|
3628
|
+
AlertPopupModule,
|
|
3521
3629
|
router.RouterModule
|
|
3522
3630
|
],
|
|
3523
3631
|
declarations: components,
|
|
@@ -3536,7 +3644,7 @@
|
|
|
3536
3644
|
common.CommonModule,
|
|
3537
3645
|
SharedComponentsModule,
|
|
3538
3646
|
SharedDirectives,
|
|
3539
|
-
i1.NwbAllModule
|
|
3647
|
+
i1$1.NwbAllModule
|
|
3540
3648
|
],
|
|
3541
3649
|
exports: [SharedComponentsModule, SharedDirectives]
|
|
3542
3650
|
},] }
|
|
@@ -3552,6 +3660,8 @@
|
|
|
3552
3660
|
|
|
3553
3661
|
exports.AbstractDebounceDirective = AbstractDebounceDirective;
|
|
3554
3662
|
exports.AlertComponent = AlertComponent;
|
|
3663
|
+
exports.AlertPopupComponent = AlertPopupComponent;
|
|
3664
|
+
exports.AlertPopupService = AlertPopupService;
|
|
3555
3665
|
exports.AutoHideDirective = AutoHideDirective;
|
|
3556
3666
|
exports.BackComponent = BackComponent;
|
|
3557
3667
|
exports.BlockComponent = BlockComponent;
|
|
@@ -3623,7 +3733,8 @@
|
|
|
3623
3733
|
exports.ɵk = LoaderModule;
|
|
3624
3734
|
exports.ɵl = CheckboxModule;
|
|
3625
3735
|
exports.ɵm = inOutY;
|
|
3626
|
-
exports.ɵn =
|
|
3736
|
+
exports.ɵn = AlertPopupModule;
|
|
3737
|
+
exports.ɵo = inOutX;
|
|
3627
3738
|
|
|
3628
3739
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3629
3740
|
|