@bizy/core 19.0.23 → 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.
@@ -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$4 from '@angular/cdk/dialog';
37
- import { DIALOG_DATA, DialogRef, DialogModule, Dialog } from '@angular/cdk/dialog';
38
- import * as i1$3 from '@angular/cdk/drag-drop';
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';
@@ -1555,10 +1555,13 @@ class BizyFileUploaderService {
1555
1555
  }, 0);
1556
1556
  };
1557
1557
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyFileUploaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1558
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyFileUploaderService });
1558
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyFileUploaderService, providedIn: 'root' });
1559
1559
  }
1560
1560
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyFileUploaderService, decorators: [{
1561
- type: Injectable
1561
+ type: Injectable,
1562
+ args: [{
1563
+ providedIn: 'root'
1564
+ }]
1562
1565
  }] });
1563
1566
 
1564
1567
  class BizyFileUploaderComponent {
@@ -5389,95 +5392,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
5389
5392
  args: [TranslateService]
5390
5393
  }] }] });
5391
5394
 
5392
- class BizyPopupWrapperComponent {
5393
- dynamicComponentContainer;
5394
- #component = inject(DIALOG_DATA);
5395
- #dialogRef = inject(DialogRef);
5396
- #ref = inject(ChangeDetectorRef);
5397
- ngAfterViewInit() {
5398
- this.loadDynamicComponent();
5399
- }
5400
- loadDynamicComponent() {
5401
- if (this.#component) {
5402
- this.dynamicComponentContainer.clear();
5403
- this.dynamicComponentContainer.createComponent(this.#component);
5404
- this.#ref.detectChanges();
5405
- }
5406
- }
5407
- close() {
5408
- this.#dialogRef.close();
5409
- }
5410
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5411
- 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 });
5412
- }
5413
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupWrapperComponent, decorators: [{
5414
- type: Component,
5415
- 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"] }]
5416
- }], propDecorators: { dynamicComponentContainer: [{
5417
- type: ViewChild,
5418
- args: ['dynamicComponentContainer', { read: ViewContainerRef }]
5419
- }] } });
5420
-
5421
- class BizyPopupService {
5422
- #dialog = inject(Dialog);
5423
- static dialogs = new Set();
5424
- static data = null;
5425
- ;
5426
- open(data, callback) {
5427
- BizyPopupService.data = data.data;
5428
- const dialogRef = this.#dialog.open(BizyPopupWrapperComponent, ({
5429
- id: data.id,
5430
- data: data.component,
5431
- autoFocus: true,
5432
- hasBackdrop: true,
5433
- disableClose: data.disableClose ?? false,
5434
- panelClass: ['bizy-popup', data.customClass]
5435
- }));
5436
- BizyPopupService.dialogs.add(dialogRef);
5437
- dialogRef.closed.pipe(take(1)).subscribe(response => {
5438
- BizyPopupService.dialogs.delete(dialogRef);
5439
- if (callback) {
5440
- callback(response);
5441
- }
5442
- });
5443
- }
5444
- getData() {
5445
- return BizyPopupService.data;
5446
- }
5447
- close(data) {
5448
- let dialogRef = null;
5449
- if (data && data.id) {
5450
- dialogRef = Array.from(BizyPopupService.dialogs).find(_dialogRef => _dialogRef.id === data.id);
5451
- }
5452
- else {
5453
- dialogRef = Array.from(BizyPopupService.dialogs).pop();
5454
- }
5455
- if (dialogRef) {
5456
- dialogRef.close(data ? data.response : null);
5457
- BizyPopupService.dialogs.delete(dialogRef);
5458
- }
5459
- BizyPopupService.data = null;
5460
- }
5461
- closeAll() {
5462
- Array.from(BizyPopupService.dialogs).forEach(_dialogRef => {
5463
- _dialogRef.close();
5464
- });
5465
- BizyPopupService.dialogs.clear();
5466
- BizyPopupService.data = null;
5467
- }
5468
- openedPopups() {
5469
- return BizyPopupService.dialogs.size;
5470
- }
5471
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5472
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, providedIn: 'root' });
5473
- }
5474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, decorators: [{
5475
- type: Injectable,
5476
- args: [{
5477
- providedIn: 'root'
5478
- }]
5479
- }] });
5480
-
5395
+ var _a;
5481
5396
  var TOAST;
5482
5397
  (function (TOAST) {
5483
5398
  TOAST["DEFAULT"] = "default";
@@ -5488,7 +5403,7 @@ var TOAST;
5488
5403
  })(TOAST || (TOAST = {}));
5489
5404
  class BizyToastService {
5490
5405
  dialog;
5491
- #toasts = new Set();
5406
+ static toasts = new Set();
5492
5407
  duration = 3000;
5493
5408
  defaultSuccessTitle = 'Operación exitosa';
5494
5409
  defaultDangerTitle = 'Hubo un problema';
@@ -5511,7 +5426,7 @@ class BizyToastService {
5511
5426
  disableClose: false,
5512
5427
  panelClass: ['bizy-toast', 'bizy-toast--in']
5513
5428
  });
5514
- this.#toasts.add(toastRef);
5429
+ _a.toasts.add(toastRef);
5515
5430
  }
5516
5431
  config(data) {
5517
5432
  if (!data) {
@@ -5547,22 +5462,26 @@ class BizyToastService {
5547
5462
  return;
5548
5463
  }
5549
5464
  let toastRef = null;
5550
- toastRef = Array.from(this.#toasts).find(_toastRef => _toastRef.id === id);
5465
+ toastRef = Array.from(_a.toasts).find(_toastRef => _toastRef.id === id);
5551
5466
  if (toastRef) {
5552
5467
  toastRef.removePanelClass('bizy-toast--in');
5553
5468
  toastRef.addPanelClass('bizy-toast--out');
5554
5469
  setTimeout(() => {
5555
5470
  toastRef.close();
5556
- this.#toasts.delete(toastRef);
5471
+ _a.toasts.delete(toastRef);
5557
5472
  }, 500);
5558
5473
  }
5559
5474
  };
5560
5475
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService, deps: [{ token: Dialog }], target: i0.ɵɵFactoryTarget.Injectable });
5561
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService });
5476
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService, providedIn: 'root' });
5562
5477
  }
5478
+ _a = BizyToastService;
5563
5479
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService, decorators: [{
5564
- type: Injectable
5565
- }], ctorParameters: () => [{ type: i1$4.Dialog, decorators: [{
5480
+ type: Injectable,
5481
+ args: [{
5482
+ providedIn: 'root'
5483
+ }]
5484
+ }], ctorParameters: () => [{ type: i1$3.Dialog, decorators: [{
5566
5485
  type: Inject,
5567
5486
  args: [Dialog]
5568
5487
  }] }] });
@@ -5602,6 +5521,106 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
5602
5521
  args: [BizyToastService]
5603
5522
  }] }] });
5604
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
+
5605
5624
  class BizyRepeatPipe {
5606
5625
  transform(value) {
5607
5626
  return Array.from({ length: value }, (_, i) => i);
@@ -5981,10 +6000,13 @@ class BizyFormatSecondsService {
5981
6000
  }
5982
6001
  }
5983
6002
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyFormatSecondsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5984
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyFormatSecondsService });
6003
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyFormatSecondsService, providedIn: 'root' });
5985
6004
  }
5986
6005
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyFormatSecondsService, decorators: [{
5987
- type: Injectable
6006
+ type: Injectable,
6007
+ args: [{
6008
+ providedIn: 'root'
6009
+ }]
5988
6010
  }] });
5989
6011
 
5990
6012
  class BizyFormatSecondsPipe {
@@ -6711,5 +6733,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
6711
6733
  * Generated bundle index. Do not edit.
6712
6734
  */
6713
6735
 
6714
- 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 };
6715
6737
  //# sourceMappingURL=bizy-core.mjs.map