@bizy/core 19.0.24 → 19.0.25
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/fesm2022/bizy-core.mjs
CHANGED
|
@@ -33,9 +33,9 @@ import { NavigationEnd, NavigationStart, Router } from '@angular/router';
|
|
|
33
33
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
34
34
|
import * as i1$2 from '@ngx-translate/core';
|
|
35
35
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
36
|
-
import * as i1$
|
|
37
|
-
import {
|
|
38
|
-
import * as i1$
|
|
36
|
+
import * as i1$3 from '@angular/cdk/dialog';
|
|
37
|
+
import { Dialog, DIALOG_DATA, DialogModule, DialogRef } from '@angular/cdk/dialog';
|
|
38
|
+
import * as i1$4 from '@angular/cdk/drag-drop';
|
|
39
39
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
40
40
|
import * as i1$5 from '@angular/platform-browser';
|
|
41
41
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
@@ -5392,95 +5392,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
5392
5392
|
args: [TranslateService]
|
|
5393
5393
|
}] }] });
|
|
5394
5394
|
|
|
5395
|
-
class BizyPopupWrapperComponent {
|
|
5396
|
-
dynamicComponentContainer;
|
|
5397
|
-
#component = inject(DIALOG_DATA);
|
|
5398
|
-
#dialogRef = inject(DialogRef);
|
|
5399
|
-
#ref = inject(ChangeDetectorRef);
|
|
5400
|
-
ngAfterViewInit() {
|
|
5401
|
-
this.loadDynamicComponent();
|
|
5402
|
-
}
|
|
5403
|
-
loadDynamicComponent() {
|
|
5404
|
-
if (this.#component) {
|
|
5405
|
-
this.dynamicComponentContainer.clear();
|
|
5406
|
-
this.dynamicComponentContainer.createComponent(this.#component);
|
|
5407
|
-
this.#ref.detectChanges();
|
|
5408
|
-
}
|
|
5409
|
-
}
|
|
5410
|
-
close() {
|
|
5411
|
-
this.#dialogRef.close();
|
|
5412
|
-
}
|
|
5413
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5414
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: BizyPopupWrapperComponent, isStandalone: true, selector: "bizy-popup-wrapper", viewQueries: [{ propertyName: "dynamicComponentContainer", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"bizy-popup-wrapper\" cdkDrag>\n\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" class=\"bizy-popup-wrapper__drag-button__icon\">\n <path d=\"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l9.4-9.4V224H109.3l9.4-9.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4H224V402.7l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-9.4 9.4V288H402.7l-9.4 9.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4H288V109.3l9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64z\"/>\n </svg>\n\n </button>\n\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\n\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" class=\"bizy-popup-wrapper__close-button__icon\">\n <path d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/>\n </svg>\n\n </button>\n\n <ng-container #dynamicComponentContainer></ng-container>\n\n</div>", styles: [":host{font-size:1rem}.bizy-popup-wrapper{position:relative;background-color:var(--bizy-popup-background-color);min-width:var(--bizy-popup-min-width);width:var(--bizy-popup-width);max-width:var(--bizy-popup-max-width)}.bizy-popup-wrapper__drag-button{position:absolute;left:-.9rem;top:-.9rem;border:.1rem solid var(--bizy-popup-drag-button-border-color);border-radius:50%;padding:.2rem;place-items:center;display:grid;border:.1rem solid #ccc;background-color:var(--bizy-popup-drag-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__drag-button:hover{transform:scale(1.1)}.bizy-popup-wrapper__drag-button__icon{height:1rem}.bizy-popup-wrapper__drag-button__icon{fill:var(--bizy-popup-drag-button-color)}.bizy-popup-wrapper__close-button{position:absolute;right:-.9rem;top:-.9rem;border:.1rem solid var(--bizy-popup-close-button-border-color);border-radius:50%;padding:.25rem .35rem;place-items:center;display:grid;border:.1rem solid #ccc;background-color:var(--bizy-popup-close-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{transform:scale(1.1)}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-hover-color)}.bizy-popup-wrapper__close-button__icon{height:1rem;transition:fill .2s ease,}.bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5415
|
-
}
|
|
5416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupWrapperComponent, decorators: [{
|
|
5417
|
-
type: Component,
|
|
5418
|
-
args: [{ selector: 'bizy-popup-wrapper', imports: [CommonModule, DialogModule, DragDropModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bizy-popup-wrapper\" cdkDrag>\n\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" class=\"bizy-popup-wrapper__drag-button__icon\">\n <path d=\"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l9.4-9.4V224H109.3l9.4-9.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4H224V402.7l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-9.4 9.4V288H402.7l-9.4 9.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4H288V109.3l9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64z\"/>\n </svg>\n\n </button>\n\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\n\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" class=\"bizy-popup-wrapper__close-button__icon\">\n <path d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/>\n </svg>\n\n </button>\n\n <ng-container #dynamicComponentContainer></ng-container>\n\n</div>", styles: [":host{font-size:1rem}.bizy-popup-wrapper{position:relative;background-color:var(--bizy-popup-background-color);min-width:var(--bizy-popup-min-width);width:var(--bizy-popup-width);max-width:var(--bizy-popup-max-width)}.bizy-popup-wrapper__drag-button{position:absolute;left:-.9rem;top:-.9rem;border:.1rem solid var(--bizy-popup-drag-button-border-color);border-radius:50%;padding:.2rem;place-items:center;display:grid;border:.1rem solid #ccc;background-color:var(--bizy-popup-drag-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__drag-button:hover{transform:scale(1.1)}.bizy-popup-wrapper__drag-button__icon{height:1rem}.bizy-popup-wrapper__drag-button__icon{fill:var(--bizy-popup-drag-button-color)}.bizy-popup-wrapper__close-button{position:absolute;right:-.9rem;top:-.9rem;border:.1rem solid var(--bizy-popup-close-button-border-color);border-radius:50%;padding:.25rem .35rem;place-items:center;display:grid;border:.1rem solid #ccc;background-color:var(--bizy-popup-close-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{transform:scale(1.1)}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-hover-color)}.bizy-popup-wrapper__close-button__icon{height:1rem;transition:fill .2s ease,}.bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-color)}\n"] }]
|
|
5419
|
-
}], propDecorators: { dynamicComponentContainer: [{
|
|
5420
|
-
type: ViewChild,
|
|
5421
|
-
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
5422
|
-
}] } });
|
|
5423
|
-
|
|
5424
|
-
class BizyPopupService {
|
|
5425
|
-
#dialog = inject(Dialog);
|
|
5426
|
-
static dialogs = new Set();
|
|
5427
|
-
static data = null;
|
|
5428
|
-
;
|
|
5429
|
-
open(data, callback) {
|
|
5430
|
-
BizyPopupService.data = data.data;
|
|
5431
|
-
const dialogRef = this.#dialog.open(BizyPopupWrapperComponent, ({
|
|
5432
|
-
id: data.id,
|
|
5433
|
-
data: data.component,
|
|
5434
|
-
autoFocus: true,
|
|
5435
|
-
hasBackdrop: true,
|
|
5436
|
-
disableClose: data.disableClose ?? false,
|
|
5437
|
-
panelClass: ['bizy-popup', data.customClass]
|
|
5438
|
-
}));
|
|
5439
|
-
BizyPopupService.dialogs.add(dialogRef);
|
|
5440
|
-
dialogRef.closed.pipe(take(1)).subscribe(response => {
|
|
5441
|
-
BizyPopupService.dialogs.delete(dialogRef);
|
|
5442
|
-
if (callback) {
|
|
5443
|
-
callback(response);
|
|
5444
|
-
}
|
|
5445
|
-
});
|
|
5446
|
-
}
|
|
5447
|
-
getData() {
|
|
5448
|
-
return BizyPopupService.data;
|
|
5449
|
-
}
|
|
5450
|
-
close(data) {
|
|
5451
|
-
let dialogRef = null;
|
|
5452
|
-
if (data && data.id) {
|
|
5453
|
-
dialogRef = Array.from(BizyPopupService.dialogs).find(_dialogRef => _dialogRef.id === data.id);
|
|
5454
|
-
}
|
|
5455
|
-
else {
|
|
5456
|
-
dialogRef = Array.from(BizyPopupService.dialogs).pop();
|
|
5457
|
-
}
|
|
5458
|
-
if (dialogRef) {
|
|
5459
|
-
dialogRef.close(data ? data.response : null);
|
|
5460
|
-
BizyPopupService.dialogs.delete(dialogRef);
|
|
5461
|
-
}
|
|
5462
|
-
BizyPopupService.data = null;
|
|
5463
|
-
}
|
|
5464
|
-
closeAll() {
|
|
5465
|
-
Array.from(BizyPopupService.dialogs).forEach(_dialogRef => {
|
|
5466
|
-
_dialogRef.close();
|
|
5467
|
-
});
|
|
5468
|
-
BizyPopupService.dialogs.clear();
|
|
5469
|
-
BizyPopupService.data = null;
|
|
5470
|
-
}
|
|
5471
|
-
openedPopups() {
|
|
5472
|
-
return BizyPopupService.dialogs.size;
|
|
5473
|
-
}
|
|
5474
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5475
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, providedIn: 'root' });
|
|
5476
|
-
}
|
|
5477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, decorators: [{
|
|
5478
|
-
type: Injectable,
|
|
5479
|
-
args: [{
|
|
5480
|
-
providedIn: 'root'
|
|
5481
|
-
}]
|
|
5482
|
-
}] });
|
|
5483
|
-
|
|
5484
5395
|
var _a;
|
|
5485
5396
|
var TOAST;
|
|
5486
5397
|
(function (TOAST) {
|
|
@@ -5570,7 +5481,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
5570
5481
|
args: [{
|
|
5571
5482
|
providedIn: 'root'
|
|
5572
5483
|
}]
|
|
5573
|
-
}], ctorParameters: () => [{ type: i1$
|
|
5484
|
+
}], ctorParameters: () => [{ type: i1$3.Dialog, decorators: [{
|
|
5574
5485
|
type: Inject,
|
|
5575
5486
|
args: [Dialog]
|
|
5576
5487
|
}] }] });
|
|
@@ -5610,6 +5521,106 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
5610
5521
|
args: [BizyToastService]
|
|
5611
5522
|
}] }] });
|
|
5612
5523
|
|
|
5524
|
+
class BizyPopupWrapperComponent {
|
|
5525
|
+
dynamicComponentContainer;
|
|
5526
|
+
#component = inject(DIALOG_DATA);
|
|
5527
|
+
#dialogRef = inject(DialogRef);
|
|
5528
|
+
#ref = inject(ChangeDetectorRef);
|
|
5529
|
+
ngAfterViewInit() {
|
|
5530
|
+
this.loadDynamicComponent();
|
|
5531
|
+
}
|
|
5532
|
+
loadDynamicComponent() {
|
|
5533
|
+
if (this.#component) {
|
|
5534
|
+
this.dynamicComponentContainer.clear();
|
|
5535
|
+
this.dynamicComponentContainer.createComponent(this.#component);
|
|
5536
|
+
this.#ref.detectChanges();
|
|
5537
|
+
}
|
|
5538
|
+
}
|
|
5539
|
+
close() {
|
|
5540
|
+
this.#dialogRef.close();
|
|
5541
|
+
}
|
|
5542
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5543
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: BizyPopupWrapperComponent, isStandalone: true, selector: "bizy-popup-wrapper", viewQueries: [{ propertyName: "dynamicComponentContainer", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"bizy-popup-wrapper\" cdkDrag>\n\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" class=\"bizy-popup-wrapper__drag-button__icon\">\n <path d=\"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l9.4-9.4V224H109.3l9.4-9.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4H224V402.7l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-9.4 9.4V288H402.7l-9.4 9.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4H288V109.3l9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64z\"/>\n </svg>\n\n </button>\n\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\n\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" class=\"bizy-popup-wrapper__close-button__icon\">\n <path d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/>\n </svg>\n\n </button>\n\n <ng-container #dynamicComponentContainer></ng-container>\n\n</div>", styles: [":host{font-size:1rem}.bizy-popup-wrapper{position:relative;background-color:var(--bizy-popup-background-color);min-width:var(--bizy-popup-min-width);width:var(--bizy-popup-width);max-width:var(--bizy-popup-max-width)}.bizy-popup-wrapper__drag-button{position:absolute;left:-.9rem;top:-.9rem;border:.1rem solid var(--bizy-popup-drag-button-border-color);border-radius:50%;padding:.2rem;place-items:center;display:grid;border:.1rem solid #ccc;background-color:var(--bizy-popup-drag-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__drag-button:hover{transform:scale(1.1)}.bizy-popup-wrapper__drag-button__icon{height:1rem}.bizy-popup-wrapper__drag-button__icon{fill:var(--bizy-popup-drag-button-color)}.bizy-popup-wrapper__close-button{position:absolute;right:-.9rem;top:-.9rem;border:.1rem solid var(--bizy-popup-close-button-border-color);border-radius:50%;padding:.25rem .35rem;place-items:center;display:grid;border:.1rem solid #ccc;background-color:var(--bizy-popup-close-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{transform:scale(1.1)}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-hover-color)}.bizy-popup-wrapper__close-button__icon{height:1rem;transition:fill .2s ease,}.bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$4.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5544
|
+
}
|
|
5545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupWrapperComponent, decorators: [{
|
|
5546
|
+
type: Component,
|
|
5547
|
+
args: [{ selector: 'bizy-popup-wrapper', imports: [CommonModule, DialogModule, DragDropModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bizy-popup-wrapper\" cdkDrag>\n\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" class=\"bizy-popup-wrapper__drag-button__icon\">\n <path d=\"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l9.4-9.4V224H109.3l9.4-9.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4H224V402.7l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-9.4 9.4V288H402.7l-9.4 9.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4H288V109.3l9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64z\"/>\n </svg>\n\n </button>\n\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\n\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" class=\"bizy-popup-wrapper__close-button__icon\">\n <path d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/>\n </svg>\n\n </button>\n\n <ng-container #dynamicComponentContainer></ng-container>\n\n</div>", styles: [":host{font-size:1rem}.bizy-popup-wrapper{position:relative;background-color:var(--bizy-popup-background-color);min-width:var(--bizy-popup-min-width);width:var(--bizy-popup-width);max-width:var(--bizy-popup-max-width)}.bizy-popup-wrapper__drag-button{position:absolute;left:-.9rem;top:-.9rem;border:.1rem solid var(--bizy-popup-drag-button-border-color);border-radius:50%;padding:.2rem;place-items:center;display:grid;border:.1rem solid #ccc;background-color:var(--bizy-popup-drag-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__drag-button:hover{transform:scale(1.1)}.bizy-popup-wrapper__drag-button__icon{height:1rem}.bizy-popup-wrapper__drag-button__icon{fill:var(--bizy-popup-drag-button-color)}.bizy-popup-wrapper__close-button{position:absolute;right:-.9rem;top:-.9rem;border:.1rem solid var(--bizy-popup-close-button-border-color);border-radius:50%;padding:.25rem .35rem;place-items:center;display:grid;border:.1rem solid #ccc;background-color:var(--bizy-popup-close-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{transform:scale(1.1)}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-hover-color)}.bizy-popup-wrapper__close-button__icon{height:1rem;transition:fill .2s ease,}.bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-color)}\n"] }]
|
|
5548
|
+
}], propDecorators: { dynamicComponentContainer: [{
|
|
5549
|
+
type: ViewChild,
|
|
5550
|
+
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
5551
|
+
}] } });
|
|
5552
|
+
|
|
5553
|
+
class BizyPopupService {
|
|
5554
|
+
#dialog = inject(Dialog);
|
|
5555
|
+
static dialogs = new Set();
|
|
5556
|
+
static data = null;
|
|
5557
|
+
;
|
|
5558
|
+
open(data, callback) {
|
|
5559
|
+
BizyPopupService.data = data.data;
|
|
5560
|
+
const dialogRef = this.#dialog.open(BizyPopupWrapperComponent, ({
|
|
5561
|
+
id: data.id,
|
|
5562
|
+
data: data.component,
|
|
5563
|
+
autoFocus: true,
|
|
5564
|
+
hasBackdrop: true,
|
|
5565
|
+
disableClose: data.disableClose ?? false,
|
|
5566
|
+
panelClass: ['bizy-popup', data.customClass]
|
|
5567
|
+
}));
|
|
5568
|
+
BizyPopupService.dialogs.add(dialogRef);
|
|
5569
|
+
dialogRef.closed.pipe(take(1)).subscribe(response => {
|
|
5570
|
+
BizyPopupService.dialogs.delete(dialogRef);
|
|
5571
|
+
if (callback) {
|
|
5572
|
+
callback(response);
|
|
5573
|
+
}
|
|
5574
|
+
});
|
|
5575
|
+
}
|
|
5576
|
+
getData() {
|
|
5577
|
+
return BizyPopupService.data;
|
|
5578
|
+
}
|
|
5579
|
+
close(data) {
|
|
5580
|
+
let dialogRef = null;
|
|
5581
|
+
if (data && data.id) {
|
|
5582
|
+
dialogRef = Array.from(BizyPopupService.dialogs).find(_dialogRef => _dialogRef.id === data.id);
|
|
5583
|
+
}
|
|
5584
|
+
else {
|
|
5585
|
+
dialogRef = Array.from(BizyPopupService.dialogs).pop();
|
|
5586
|
+
}
|
|
5587
|
+
if (dialogRef) {
|
|
5588
|
+
dialogRef.close(data ? data.response : null);
|
|
5589
|
+
BizyPopupService.dialogs.delete(dialogRef);
|
|
5590
|
+
}
|
|
5591
|
+
BizyPopupService.data = null;
|
|
5592
|
+
}
|
|
5593
|
+
closeAll() {
|
|
5594
|
+
Array.from(BizyPopupService.dialogs).forEach(_dialogRef => {
|
|
5595
|
+
_dialogRef.close();
|
|
5596
|
+
});
|
|
5597
|
+
BizyPopupService.dialogs.clear();
|
|
5598
|
+
BizyPopupService.data = null;
|
|
5599
|
+
}
|
|
5600
|
+
openedPopups() {
|
|
5601
|
+
return BizyPopupService.dialogs.size;
|
|
5602
|
+
}
|
|
5603
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5604
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService });
|
|
5605
|
+
}
|
|
5606
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, decorators: [{
|
|
5607
|
+
type: Injectable
|
|
5608
|
+
}] });
|
|
5609
|
+
|
|
5610
|
+
class BizyPopupModule {
|
|
5611
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5612
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupModule, imports: [BizyPopupWrapperComponent], exports: [BizyPopupWrapperComponent] });
|
|
5613
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupModule, providers: [BizyPopupService], imports: [BizyPopupWrapperComponent] });
|
|
5614
|
+
}
|
|
5615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupModule, decorators: [{
|
|
5616
|
+
type: NgModule,
|
|
5617
|
+
args: [{
|
|
5618
|
+
imports: [BizyPopupWrapperComponent],
|
|
5619
|
+
exports: [BizyPopupWrapperComponent],
|
|
5620
|
+
providers: [BizyPopupService]
|
|
5621
|
+
}]
|
|
5622
|
+
}] });
|
|
5623
|
+
|
|
5613
5624
|
class BizyRepeatPipe {
|
|
5614
5625
|
transform(value) {
|
|
5615
5626
|
return Array.from({ length: value }, (_, i) => i);
|
|
@@ -6722,5 +6733,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
6722
6733
|
* Generated bundle index. Do not edit.
|
|
6723
6734
|
*/
|
|
6724
6735
|
|
|
6725
|
-
export { BIZY_CALENDAR_DAY, BIZY_CALENDAR_EVENT_ACTION, BIZY_CALENDAR_LANGUAGE, BIZY_CALENDAR_MODE, BIZY_SKELETON_SHAPE, BIZY_TAG_TYPE, BizyAccordionComponent, BizyAnimationService, BizyAveragePipe, BizyBarLineChartComponent, BizyBreadcrumbComponent, BizyButtonComponent, BizyCacheService, BizyCalendarComponent, BizyCardComponent, BizyCheckboxComponent, BizyCopyToClipboardDirective, BizyCopyToClipboardService, BizyCurrencyFormatDirective, BizyDatePickerComponent, BizyEnumToArrayPipe, BizyExportToCSVService, BizyFileUploaderComponent, BizyFileUploaderService, BizyFilterComponent, BizyFilterContentComponent, BizyFilterPipe, BizyFilterSectionCheckboxOptionComponent, BizyFilterSectionComponent, BizyFilterSectionRangeOptionComponent, BizyFilterSectionSearchOptionComponent, BizyFilterSectionsComponent, BizyFormComponent, BizyFormatSecondsPipe, BizyGridComponent, BizyGridForDirective, BizyGridRowComponent, BizyInputComponent, BizyInputOptionComponent, BizyKeyboardService, BizyListComponent, BizyLoadingDirective, BizyLogService, BizyLongPressDirective, BizyMenuComponent, BizyMenuOptionComponent, BizyMenuTitleComponent, BizyOnlyNumbersDirective, BizyOnlyPhoneDigitsDirective, BizyOrderByPipe, BizyPieChartComponent, BizyPopupService, BizyPopupWrapperComponent, BizyRadioComponent, BizyRangeFilterPipe, BizyReducePipe, BizyRepeatPipe, BizyRouterService, BizySafePipe, BizySearchPipe, BizySelectComponent, BizySelectOptionComponent, BizySelectedPipe, BizySetToArrayPipe, BizySidebarComponent, BizySidebarFloatingOptionComponent, BizySidebarFloatingOptionTitleComponent, BizySidebarOptionComponent, BizySkeletonComponent, BizySliderComponent, BizyStorageService, BizyTabComponent, BizyTableColumnArrowsComponent, BizyTableColumnComponent, BizyTableColumnFixedDirective, BizyTableComponent, BizyTableFooterComponent, BizyTableHeaderComponent, BizyTableRowComponent, BizyTableRowExpandContentComponent, BizyTableScrollingComponent, BizyTableScrollingDirective, BizyTabsComponent, BizyTagComponent, BizyTextEllipsisDirective, BizyToastService, BizyToastWrapperComponent, BizyToggleComponent, BizyToolbarComponent, BizyTooltipDirective, BizyTrackByIdDirective, BizyTranslateModule, BizyTranslatePipe, BizyTranslateService, BizyUserAgentService, BizyValidatorService, BizyViewportService, LANGUAGE, LOADING_TYPE };
|
|
6736
|
+
export { BIZY_CALENDAR_DAY, BIZY_CALENDAR_EVENT_ACTION, BIZY_CALENDAR_LANGUAGE, BIZY_CALENDAR_MODE, BIZY_SKELETON_SHAPE, BIZY_TAG_TYPE, BizyAccordionComponent, BizyAnimationService, BizyAveragePipe, BizyBarLineChartComponent, BizyBreadcrumbComponent, BizyButtonComponent, BizyCacheService, BizyCalendarComponent, BizyCardComponent, BizyCheckboxComponent, BizyCopyToClipboardDirective, BizyCopyToClipboardService, BizyCurrencyFormatDirective, BizyDatePickerComponent, BizyEnumToArrayPipe, BizyExportToCSVService, BizyFileUploaderComponent, BizyFileUploaderService, BizyFilterComponent, BizyFilterContentComponent, BizyFilterPipe, BizyFilterSectionCheckboxOptionComponent, BizyFilterSectionComponent, BizyFilterSectionRangeOptionComponent, BizyFilterSectionSearchOptionComponent, BizyFilterSectionsComponent, BizyFormComponent, BizyFormatSecondsPipe, BizyGridComponent, BizyGridForDirective, BizyGridRowComponent, BizyInputComponent, BizyInputOptionComponent, BizyKeyboardService, BizyListComponent, BizyLoadingDirective, BizyLogService, BizyLongPressDirective, BizyMenuComponent, BizyMenuOptionComponent, BizyMenuTitleComponent, BizyOnlyNumbersDirective, BizyOnlyPhoneDigitsDirective, BizyOrderByPipe, BizyPieChartComponent, BizyPopupModule, BizyPopupService, BizyPopupWrapperComponent, BizyRadioComponent, BizyRangeFilterPipe, BizyReducePipe, BizyRepeatPipe, BizyRouterService, BizySafePipe, BizySearchPipe, BizySelectComponent, BizySelectOptionComponent, BizySelectedPipe, BizySetToArrayPipe, BizySidebarComponent, BizySidebarFloatingOptionComponent, BizySidebarFloatingOptionTitleComponent, BizySidebarOptionComponent, BizySkeletonComponent, BizySliderComponent, BizyStorageService, BizyTabComponent, BizyTableColumnArrowsComponent, BizyTableColumnComponent, BizyTableColumnFixedDirective, BizyTableComponent, BizyTableFooterComponent, BizyTableHeaderComponent, BizyTableRowComponent, BizyTableRowExpandContentComponent, BizyTableScrollingComponent, BizyTableScrollingDirective, BizyTabsComponent, BizyTagComponent, BizyTextEllipsisDirective, BizyToastService, BizyToastWrapperComponent, BizyToggleComponent, BizyToolbarComponent, BizyTooltipDirective, BizyTrackByIdDirective, BizyTranslateModule, BizyTranslatePipe, BizyTranslateService, BizyUserAgentService, BizyValidatorService, BizyViewportService, LANGUAGE, LOADING_TYPE };
|
|
6726
6737
|
//# sourceMappingURL=bizy-core.mjs.map
|