@bizy/core 19.0.25 → 19.0.26

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.
Files changed (113) hide show
  1. package/fesm2022/bizy-core.mjs +1107 -1016
  2. package/fesm2022/bizy-core.mjs.map +1 -1
  3. package/lib/directives/directives.module.d.ts +15 -0
  4. package/lib/directives/index.d.ts +1 -0
  5. package/lib/{components → modules}/index.d.ts +3 -0
  6. package/lib/{services → modules}/popup/popup.service.d.ts +0 -1
  7. package/lib/{services → modules}/toast/index.d.ts +1 -0
  8. package/lib/modules/toast/toast.module.d.ts +7 -0
  9. package/lib/{services → modules}/translate/index.d.ts +1 -0
  10. package/lib/{services → modules}/translate/translate.module.d.ts +2 -2
  11. package/lib/{pipes → modules/translate}/translate.pipe.d.ts +1 -1
  12. package/lib/{services → modules}/translate/translate.service.d.ts +3 -3
  13. package/lib/pipes/index.d.ts +1 -1
  14. package/lib/pipes/pipes.module.d.ts +16 -0
  15. package/lib/services/index.d.ts +0 -4
  16. package/package.json +1 -1
  17. package/public-api.d.ts +1 -1
  18. /package/lib/{components → modules}/accordion/accordion.component.d.ts +0 -0
  19. /package/lib/{components → modules}/accordion/index.d.ts +0 -0
  20. /package/lib/{components → modules}/bar-line-chart/bar-line-chart.component.d.ts +0 -0
  21. /package/lib/{components → modules}/bar-line-chart/bar-line-chart.types.d.ts +0 -0
  22. /package/lib/{components → modules}/bar-line-chart/index.d.ts +0 -0
  23. /package/lib/{components → modules}/breadcrumb/breadcrumb.component.d.ts +0 -0
  24. /package/lib/{components → modules}/breadcrumb/breadcrumb.types.d.ts +0 -0
  25. /package/lib/{components → modules}/breadcrumb/index.d.ts +0 -0
  26. /package/lib/{components → modules}/button/button.component.d.ts +0 -0
  27. /package/lib/{components → modules}/button/index.d.ts +0 -0
  28. /package/lib/{components → modules}/calendar/calendar.component.d.ts +0 -0
  29. /package/lib/{components → modules}/calendar/calendar.formatter.d.ts +0 -0
  30. /package/lib/{components → modules}/calendar/calendar.types.d.ts +0 -0
  31. /package/lib/{components → modules}/calendar/index.d.ts +0 -0
  32. /package/lib/{components → modules}/card/card.component.d.ts +0 -0
  33. /package/lib/{components → modules}/card/index.d.ts +0 -0
  34. /package/lib/{components → modules}/checkbox/checkbox.component.d.ts +0 -0
  35. /package/lib/{components → modules}/checkbox/index.d.ts +0 -0
  36. /package/lib/{components → modules}/date-picker/date-picker.component.d.ts +0 -0
  37. /package/lib/{components → modules}/date-picker/index.d.ts +0 -0
  38. /package/lib/{components → modules}/file-uploader/file-uploader.component.d.ts +0 -0
  39. /package/lib/{components → modules}/file-uploader/file-uploader.service.d.ts +0 -0
  40. /package/lib/{components → modules}/file-uploader/index.d.ts +0 -0
  41. /package/lib/{components → modules}/filter/filter-content/filter-content.component.d.ts +0 -0
  42. /package/lib/{components → modules}/filter/filter-section/filter-section.component.d.ts +0 -0
  43. /package/lib/{components → modules}/filter/filter-section-checkbox-option/filter-section-checkbox-option.component.d.ts +0 -0
  44. /package/lib/{components → modules}/filter/filter-section-range-option/filter-section-range-option.component.d.ts +0 -0
  45. /package/lib/{components → modules}/filter/filter-section-search-option/filter-section-search-option.component.d.ts +0 -0
  46. /package/lib/{components → modules}/filter/filter-sections/filter-sections.component.d.ts +0 -0
  47. /package/lib/{components → modules}/filter/filter.component.d.ts +0 -0
  48. /package/lib/{components → modules}/filter/index.d.ts +0 -0
  49. /package/lib/{components → modules}/filter/pipes/filter.pipe.d.ts +0 -0
  50. /package/lib/{components → modules}/filter/pipes/index.d.ts +0 -0
  51. /package/lib/{components → modules}/filter/pipes/range-filter.pipe.d.ts +0 -0
  52. /package/lib/{components → modules}/form/form.component.d.ts +0 -0
  53. /package/lib/{components → modules}/form/index.d.ts +0 -0
  54. /package/lib/{components → modules}/grid/grid-row/grid-row.component.d.ts +0 -0
  55. /package/lib/{components → modules}/grid/grid.component.d.ts +0 -0
  56. /package/lib/{components → modules}/grid/grid.directive.d.ts +0 -0
  57. /package/lib/{components → modules}/grid/index.d.ts +0 -0
  58. /package/lib/{components → modules}/input/index.d.ts +0 -0
  59. /package/lib/{components → modules}/input/input-option/input-option.component.d.ts +0 -0
  60. /package/lib/{components → modules}/input/input.component.d.ts +0 -0
  61. /package/lib/{components → modules}/list/index.d.ts +0 -0
  62. /package/lib/{components → modules}/list/list.component.d.ts +0 -0
  63. /package/lib/{components → modules}/menu/index.d.ts +0 -0
  64. /package/lib/{components → modules}/menu/menu-option/menu-option.component.d.ts +0 -0
  65. /package/lib/{components → modules}/menu/menu-title/menu-title.component.d.ts +0 -0
  66. /package/lib/{components → modules}/menu/menu.component.d.ts +0 -0
  67. /package/lib/{components → modules}/pie-chart/index.d.ts +0 -0
  68. /package/lib/{components → modules}/pie-chart/pie-chart.component.d.ts +0 -0
  69. /package/lib/{components → modules}/pie-chart/pie-chart.types.d.ts +0 -0
  70. /package/lib/{services → modules}/popup/index.d.ts +0 -0
  71. /package/lib/{services → modules}/popup/popup-wrapper/popup-wrapper.component.d.ts +0 -0
  72. /package/lib/{services → modules}/popup/popup.module.d.ts +0 -0
  73. /package/lib/{services → modules}/popup/popup.types.d.ts +0 -0
  74. /package/lib/{components → modules}/radio/index.d.ts +0 -0
  75. /package/lib/{components → modules}/radio/radio.component.d.ts +0 -0
  76. /package/lib/{components → modules}/select/index.d.ts +0 -0
  77. /package/lib/{components → modules}/select/select-option/select-option.component.d.ts +0 -0
  78. /package/lib/{components → modules}/select/select.component.d.ts +0 -0
  79. /package/lib/{components → modules}/sidebar/index.d.ts +0 -0
  80. /package/lib/{components → modules}/sidebar/sidebar-floating-option/sidebar-floating-option.component.d.ts +0 -0
  81. /package/lib/{components → modules}/sidebar/sidebar-floating-option-title/sidebar-floating-option-title.component.d.ts +0 -0
  82. /package/lib/{components → modules}/sidebar/sidebar-option/sidebar-option.component.d.ts +0 -0
  83. /package/lib/{components → modules}/sidebar/sidebar.component.d.ts +0 -0
  84. /package/lib/{components → modules}/skeleton/index.d.ts +0 -0
  85. /package/lib/{components → modules}/skeleton/skeleton.component.d.ts +0 -0
  86. /package/lib/{components → modules}/skeleton/skeleton.types.d.ts +0 -0
  87. /package/lib/{components → modules}/slider/index.d.ts +0 -0
  88. /package/lib/{components → modules}/slider/slider.component.d.ts +0 -0
  89. /package/lib/{components → modules}/table/directives/index.d.ts +0 -0
  90. /package/lib/{components → modules}/table/directives/table-column-fixed.directive.d.ts +0 -0
  91. /package/lib/{components → modules}/table/index.d.ts +0 -0
  92. /package/lib/{components → modules}/table/table-column/table-column.component.d.ts +0 -0
  93. /package/lib/{components → modules}/table/table-column-arrows/table-column-arrows.component.d.ts +0 -0
  94. /package/lib/{components → modules}/table/table-footer/table-footer.component.d.ts +0 -0
  95. /package/lib/{components → modules}/table/table-header/table-header.component.d.ts +0 -0
  96. /package/lib/{components → modules}/table/table-row/table-row.component.d.ts +0 -0
  97. /package/lib/{components → modules}/table/table-row-expand-content/table-row-expand-content.component.d.ts +0 -0
  98. /package/lib/{components → modules}/table/table-scrolling/table-scrolling.component.d.ts +0 -0
  99. /package/lib/{components → modules}/table/table-scrolling/table-scrolling.directive.d.ts +0 -0
  100. /package/lib/{components → modules}/table/table.component.d.ts +0 -0
  101. /package/lib/{components → modules}/tabs/index.d.ts +0 -0
  102. /package/lib/{components → modules}/tabs/tab/tab.component.d.ts +0 -0
  103. /package/lib/{components → modules}/tabs/tabs.component.d.ts +0 -0
  104. /package/lib/{components → modules}/tag/index.d.ts +0 -0
  105. /package/lib/{components → modules}/tag/tag.component.d.ts +0 -0
  106. /package/lib/{components → modules}/tag/tag.types.d.ts +0 -0
  107. /package/lib/{services → modules}/toast/toast-wrapper/toast-wrapper.component.d.ts +0 -0
  108. /package/lib/{services → modules}/toast/toast.service.d.ts +0 -0
  109. /package/lib/{components → modules}/toggle/index.d.ts +0 -0
  110. /package/lib/{components → modules}/toggle/toggle.component.d.ts +0 -0
  111. /package/lib/{components → modules}/toggle/toggle.types.d.ts +0 -0
  112. /package/lib/{components → modules}/toolbar/index.d.ts +0 -0
  113. /package/lib/{components → modules}/toolbar/toolbar.component.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import * as i1 from '@angular/common';
2
2
  import { CommonModule, DOCUMENT, registerLocaleData, DatePipe } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, ChangeDetectorRef, Output, Input, Inject, ChangeDetectionStrategy, Component, ElementRef, Renderer2, Injectable, Directive, ViewChild, ContentChildren, inject, Pipe, ContentChild, ViewContainerRef, TemplateRef, RendererFactory2, NgModule, HostListener, Host } from '@angular/core';
4
+ import { EventEmitter, ChangeDetectorRef, Output, Input, Inject, ChangeDetectionStrategy, Component, ElementRef, Renderer2, Injectable, Directive, ViewChild, ContentChildren, inject, Pipe, ContentChild, ViewContainerRef, TemplateRef, NgModule, RendererFactory2, HostListener, Host } from '@angular/core';
5
5
  import * as echarts from 'echarts';
6
6
  import html2canvas from 'html2canvas';
7
7
  import { Subscription, BehaviorSubject, Subject, filter, take, skip, auditTime, throttleTime, debounceTime, interval, fromEvent, merge, timer, of } from 'rxjs';
@@ -28,16 +28,15 @@ import * as i3 from '@angular/cdk/portal';
28
28
  import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
29
29
  import * as i2$3 from '@angular/cdk/scrolling';
30
30
  import { ScrollingModule, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
31
- import * as i1$1 from '@angular/router';
32
- import { NavigationEnd, NavigationStart, Router } from '@angular/router';
33
- import { Clipboard } from '@angular/cdk/clipboard';
34
- import * as i1$2 from '@ngx-translate/core';
35
- import { TranslateModule, TranslateService } from '@ngx-translate/core';
36
- import * as i1$3 from '@angular/cdk/dialog';
31
+ import { TranslateService, TranslateModule } from '@ngx-translate/core';
32
+ import * as i1$1 from '@angular/cdk/dialog';
37
33
  import { Dialog, DIALOG_DATA, DialogModule, DialogRef } from '@angular/cdk/dialog';
38
- import * as i1$4 from '@angular/cdk/drag-drop';
34
+ import * as i1$2 from '@angular/cdk/drag-drop';
39
35
  import { DragDropModule } from '@angular/cdk/drag-drop';
40
- import * as i1$5 from '@angular/platform-browser';
36
+ import * as i1$3 from '@angular/router';
37
+ import { NavigationEnd, NavigationStart, Router } from '@angular/router';
38
+ import { Clipboard } from '@angular/cdk/clipboard';
39
+ import * as i1$4 from '@angular/platform-browser';
41
40
  import { DomSanitizer } from '@angular/platform-browser';
42
41
  import Fuse from 'fuse.js';
43
42
 
@@ -4454,1170 +4453,1199 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4454
4453
  args: [{ selector: 'bizy-toolbar', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bizy-toolbar\">\n\n <span class=\"bizy-toolbar__start\">\n \n <ng-content select=\"[slot=start]\"></ng-content>\n\n </span>\n\n <span class=\"bizy-toolbar__end\">\n\n <ng-content select=\"[slot=end]\"></ng-content>\n\n </span>\n\n</div>\n", styles: [":host{font-size:1rem}.bizy-toolbar{height:var(--bizy-toolbar-height);width:100%;background-color:var(--bizy-toolbar-background-color);display:flex;align-items:center;justify-content:space-between;column-gap:var(--bizy-toolbar-column-gap);padding:var(--bizy-toolbar-padding)}.bizy-toolbar__start{height:100%;display:flex;align-items:center;column-gap:var(--bizy-toolbar-column-gap)}.bizy-toolbar__end{height:100%;display:flex;align-items:center;justify-content:flex-end;column-gap:var(--bizy-toolbar-column-gap)}::ng-deep .bizy-toolbar *[toolbar-option]{height:100%}\n"] }]
4455
4454
  }] });
4456
4455
 
4457
- var BIZY_ANIMATION;
4458
- (function (BIZY_ANIMATION) {
4459
- BIZY_ANIMATION["FADE_IN"] = "fade-in";
4460
- BIZY_ANIMATION["FADE_OUT"] = "fade-out";
4461
- BIZY_ANIMATION["FADE_IN_UP"] = "fade-in-up";
4462
- BIZY_ANIMATION["FADE_IN_RIGHT"] = "fade-in-right";
4463
- BIZY_ANIMATION["FADE_IN_DOWN"] = "fade-in-down";
4464
- BIZY_ANIMATION["FADE_IN_LEFT"] = "fade-in-left";
4465
- BIZY_ANIMATION["SLIDE_IN_UP"] = "slide-in-up";
4466
- BIZY_ANIMATION["SLIDE_IN_RIGHT"] = "slide-in-right";
4467
- BIZY_ANIMATION["SLIDE_IN_DOWN"] = "slide-in-down";
4468
- BIZY_ANIMATION["SLIDE_IN_LEFT"] = "slide-in-left";
4469
- BIZY_ANIMATION["SLIDE_OUT_RIGHT"] = "slide-out-right";
4470
- BIZY_ANIMATION["SLIDE_OUT_LEFT"] = "slide-out-left";
4471
- })(BIZY_ANIMATION || (BIZY_ANIMATION = {}));
4472
- class BizyAnimationService {
4473
- rendererFactory;
4474
- #renderer;
4475
- constructor(rendererFactory) {
4476
- this.rendererFactory = rendererFactory;
4477
- this.#renderer = this.rendererFactory.createRenderer(null, null);
4478
- }
4479
- setAnimation(element, animation) {
4480
- return new Promise(resolve => {
4481
- if (!element || !animation || !this.#renderer) {
4482
- return;
4483
- }
4484
- const root = this.#renderer.selectRootElement(':root', true);
4485
- const animationTimeout = getComputedStyle(root).getPropertyValue('--bizy-animation-timeout').trim();
4486
- this.#renderer.addClass(element, 'animated');
4487
- this.#renderer.addClass(element, animation);
4488
- setTimeout(() => {
4489
- this.#renderer.removeClass(element, 'animated');
4490
- this.#renderer.removeClass(element, animation);
4491
- resolve();
4492
- }, Number(animationTimeout.match(/\d/g).join('')));
4456
+ var LANGUAGE;
4457
+ (function (LANGUAGE) {
4458
+ LANGUAGE["SPANISH"] = "es";
4459
+ LANGUAGE["ENGLISH"] = "en";
4460
+ })(LANGUAGE || (LANGUAGE = {}));
4461
+ class BizyTranslateService {
4462
+ #translate = inject(TranslateService);
4463
+ forRoot = TranslateModule.forRoot;
4464
+ loadTranslations(...args) {
4465
+ const locales = [...args];
4466
+ locales.forEach(locale => {
4467
+ this.#translate.setTranslation(locale.lang, locale.translations, true);
4493
4468
  });
4494
4469
  }
4495
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyAnimationService, deps: [{ token: RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
4496
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyAnimationService, providedIn: 'root' });
4497
- }
4498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyAnimationService, decorators: [{
4499
- type: Injectable,
4500
- args: [{
4501
- providedIn: 'root'
4502
- }]
4503
- }], ctorParameters: () => [{ type: i0.RendererFactory2, decorators: [{
4504
- type: Inject,
4505
- args: [RendererFactory2]
4506
- }] }] });
4507
-
4508
- class BizyViewportService {
4509
- window;
4510
- #viewportSizeChanged;
4511
- get sizeChange$() {
4512
- return this.#viewportSizeChanged.asObservable();
4470
+ addLangs(langs) {
4471
+ this.#translate.addLangs(langs);
4513
4472
  }
4514
- constructor(window) {
4515
- this.window = window;
4516
- this.#viewportSizeChanged = new BehaviorSubject({
4517
- width: this.window.innerWidth,
4518
- height: this.window.innerHeight
4519
- });
4520
- fromEvent(window, 'resize')
4521
- .pipe(debounceTime$1(200), map((event) => ({
4522
- width: event.currentTarget.innerWidth,
4523
- height: event.currentTarget.innerHeight
4524
- })))
4525
- .subscribe(windowSize => {
4526
- this.#viewportSizeChanged.next(windowSize);
4527
- });
4473
+ getLangs() {
4474
+ return this.#translate.getLangs();
4528
4475
  }
4529
- width() {
4530
- return this.window.screen.availWidth;
4476
+ setDefault(lang) {
4477
+ this.#translate.setDefaultLang(lang);
4531
4478
  }
4532
- height() {
4533
- return this.window.screen.availHeight;
4479
+ getCurrentLang() {
4480
+ return this.#translate.currentLang;
4534
4481
  }
4535
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyViewportService, deps: [{ token: Window }], target: i0.ɵɵFactoryTarget.Injectable });
4536
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyViewportService, providedIn: 'root' });
4482
+ use(lang) {
4483
+ this.#translate.use(lang);
4484
+ }
4485
+ get(translation) {
4486
+ return this.#translate.instant(translation);
4487
+ }
4488
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4489
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateService, providedIn: 'root' });
4537
4490
  }
4538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyViewportService, decorators: [{
4491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateService, decorators: [{
4539
4492
  type: Injectable,
4540
4493
  args: [{
4541
4494
  providedIn: 'root'
4542
4495
  }]
4543
- }], ctorParameters: () => [{ type: Window, decorators: [{
4544
- type: Inject,
4545
- args: [Window]
4546
- }] }] });
4496
+ }] });
4547
4497
 
4548
- class BizyKeyboardService {
4549
- document;
4550
- #shiftHolding = new BehaviorSubject(false);
4551
- get shiftHolding$() {
4552
- return this.#shiftHolding.asObservable();
4553
- }
4554
- constructor(document) {
4555
- this.document = document;
4556
- this.document.addEventListener('keydown', (event) => {
4557
- if (event.key === 'Shift') {
4558
- this.#shiftHolding.next(true);
4559
- }
4560
- });
4561
- this.document.addEventListener('keyup', (event) => {
4562
- if (event.key === 'Shift') {
4563
- this.#shiftHolding.next(false);
4564
- }
4565
- });
4498
+ class BizyTranslatePipe {
4499
+ translate;
4500
+ constructor(translate) {
4501
+ this.translate = translate;
4566
4502
  }
4567
- isShiftHolding() {
4568
- return this.#shiftHolding.value;
4503
+ transform(label) {
4504
+ return this.translate.get(label);
4569
4505
  }
4570
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyKeyboardService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
4571
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyKeyboardService, providedIn: 'root' });
4506
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslatePipe, deps: [{ token: BizyTranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
4507
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslatePipe, isStandalone: true, name: "translate" });
4572
4508
  }
4573
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyKeyboardService, decorators: [{
4574
- type: Injectable,
4509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslatePipe, decorators: [{
4510
+ type: Pipe,
4575
4511
  args: [{
4576
- providedIn: 'root'
4512
+ name: 'translate',
4577
4513
  }]
4578
- }], ctorParameters: () => [{ type: Document, decorators: [{
4514
+ }], ctorParameters: () => [{ type: BizyTranslateService, decorators: [{
4579
4515
  type: Inject,
4580
- args: [DOCUMENT]
4516
+ args: [BizyTranslateService]
4581
4517
  }] }] });
4582
4518
 
4583
- class BizyExportToCSVService {
4584
- document;
4585
- rendererFactory;
4586
- #loading = false;
4587
- #renderer;
4588
- constructor(document, rendererFactory) {
4589
- this.document = document;
4590
- this.rendererFactory = rendererFactory;
4591
- this.#renderer = this.rendererFactory.createRenderer(null, null);
4519
+ class BizyTranslateModule {
4520
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4521
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateModule, imports: [BizyTranslatePipe], exports: [BizyTranslatePipe] });
4522
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateModule, providers: [BizyTranslateService] });
4523
+ }
4524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateModule, decorators: [{
4525
+ type: NgModule,
4526
+ args: [{
4527
+ imports: [BizyTranslatePipe],
4528
+ exports: [BizyTranslatePipe],
4529
+ providers: [BizyTranslateService]
4530
+ }]
4531
+ }] });
4532
+
4533
+ var _a;
4534
+ var TOAST;
4535
+ (function (TOAST) {
4536
+ TOAST["DEFAULT"] = "default";
4537
+ TOAST["SUCCESS"] = "success";
4538
+ TOAST["INFO"] = "info";
4539
+ TOAST["WARNING"] = "warning";
4540
+ TOAST["DANGER"] = "danger";
4541
+ })(TOAST || (TOAST = {}));
4542
+ class BizyToastService {
4543
+ dialog;
4544
+ static toasts = new Set();
4545
+ duration = 3000;
4546
+ defaultSuccessTitle = 'Operación exitosa';
4547
+ defaultDangerTitle = 'Hubo un problema';
4548
+ constructor(dialog) {
4549
+ this.dialog = dialog;
4592
4550
  }
4593
- download(data) {
4594
- if (this.#loading || !data.items || !Array.isArray(data.items) || !data.model) {
4551
+ #open(data) {
4552
+ const id = `bizy-toast-${Math.random()}`;
4553
+ const toastRef = this.dialog.open(BizyToastWrapperComponent, {
4554
+ id,
4555
+ data: {
4556
+ type: data.type,
4557
+ duration: this.duration,
4558
+ id,
4559
+ title: typeof data.data === 'string' ? data.data : data.data.title,
4560
+ msg: typeof data.data === 'string' ? '' : data.data.msg
4561
+ },
4562
+ autoFocus: false,
4563
+ hasBackdrop: false,
4564
+ disableClose: false,
4565
+ panelClass: ['bizy-toast', 'bizy-toast--in']
4566
+ });
4567
+ _a.toasts.add(toastRef);
4568
+ }
4569
+ config(data) {
4570
+ if (!data) {
4595
4571
  return;
4596
4572
  }
4597
- try {
4598
- this.#loading = true;
4599
- const csv = this.getCSV(data);
4600
- if (!data.fileName) {
4601
- data.fileName = 'bizy-csv';
4602
- }
4603
- this.#downloadCSV({ csv, fileName: data.fileName });
4573
+ if (data.defaultSuccessTitle) {
4574
+ this.defaultSuccessTitle = data.defaultSuccessTitle;
4604
4575
  }
4605
- finally {
4606
- this.#loading = false;
4576
+ if (data.defaultDangerTitle) {
4577
+ this.defaultDangerTitle = data.defaultDangerTitle;
4578
+ }
4579
+ if (data.duration) {
4580
+ this.duration = data.duration;
4607
4581
  }
4608
4582
  }
4609
- getCSV(data) {
4610
- let csv = '';
4611
- function escapeCommas(str) {
4612
- return str.includes(',') ? `"${str}"` : str;
4583
+ default(data) {
4584
+ this.#open({ type: TOAST.DEFAULT, data });
4585
+ }
4586
+ info(data) {
4587
+ this.#open({ type: TOAST.INFO, data });
4588
+ }
4589
+ success(data = this.defaultSuccessTitle) {
4590
+ this.#open({ type: TOAST.SUCCESS, data });
4591
+ }
4592
+ warning(data) {
4593
+ this.#open({ type: TOAST.WARNING, data });
4594
+ }
4595
+ danger(data = this.defaultDangerTitle) {
4596
+ this.#open({ type: TOAST.DANGER, data });
4597
+ }
4598
+ close = (id) => {
4599
+ if (!id) {
4600
+ return;
4613
4601
  }
4614
- for (const key in data.model) {
4615
- if (key) {
4616
- csv += `${data.model[key]},`;
4617
- }
4602
+ let toastRef = null;
4603
+ toastRef = Array.from(_a.toasts).find(_toastRef => _toastRef.id === id);
4604
+ if (toastRef) {
4605
+ toastRef.removePanelClass('bizy-toast--in');
4606
+ toastRef.addPanelClass('bizy-toast--out');
4607
+ setTimeout(() => {
4608
+ toastRef.close();
4609
+ _a.toasts.delete(toastRef);
4610
+ }, 500);
4618
4611
  }
4619
- data.items.forEach(_item => {
4620
- // Remove the last character (',')
4621
- csv = csv.slice(0, -1);
4622
- csv += '\n';
4623
- for (const key in data.model) {
4624
- let value = _item;
4625
- const nestedProperty = key.split('.');
4626
- for (let i = 0; i < nestedProperty.length; i++) {
4627
- const _property = nestedProperty[i];
4628
- if (value) {
4629
- value = value[_property];
4630
- }
4631
- else {
4632
- break;
4633
- }
4634
- }
4635
- if (typeof value !== undefined && value !== null) {
4636
- csv += `${escapeCommas(String(value).replace(/\n/g, ''))},`;
4637
- }
4638
- else {
4639
- csv += ',';
4640
- }
4641
- }
4642
- });
4643
- if (csv && csv[csv.length - 1] === ',') {
4644
- // Remove the last character (',')
4645
- csv = csv.slice(0, -1);
4646
- }
4647
- return csv;
4612
+ };
4613
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService, deps: [{ token: Dialog }], target: i0.ɵɵFactoryTarget.Injectable });
4614
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService });
4615
+ }
4616
+ _a = BizyToastService;
4617
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService, decorators: [{
4618
+ type: Injectable
4619
+ }], ctorParameters: () => [{ type: i1$1.Dialog, decorators: [{
4620
+ type: Inject,
4621
+ args: [Dialog]
4622
+ }] }] });
4623
+
4624
+ class BizyToastWrapperComponent {
4625
+ data;
4626
+ toast;
4627
+ type = TOAST.INFO;
4628
+ title = '';
4629
+ msg = '';
4630
+ id;
4631
+ constructor(data, toast) {
4632
+ this.data = data;
4633
+ this.toast = toast;
4634
+ this.type = this.data.type;
4635
+ this.title = this.data.title;
4636
+ this.msg = this.data.msg;
4637
+ this.id = this.data.id;
4638
+ setTimeout(() => {
4639
+ this.close();
4640
+ }, 3000);
4648
4641
  }
4649
- #downloadCSV(data) {
4650
- const blob = new Blob([data.csv], { type: 'text/csv;charset=utf-8;' });
4651
- const url = URL.createObjectURL(blob);
4652
- const downloadButton = this.#renderer.createElement('a');
4653
- downloadButton.setAttribute('download', data.fileName);
4654
- downloadButton.href = url;
4655
- this.#renderer.appendChild(this.document.body, downloadButton);
4656
- downloadButton.click();
4657
- this.#renderer.removeChild(this.document.body, downloadButton);
4642
+ close() {
4643
+ this.toast.close(this.id);
4658
4644
  }
4659
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyExportToCSVService, deps: [{ token: DOCUMENT }, { token: RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
4660
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyExportToCSVService, providedIn: 'root' });
4645
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastWrapperComponent, deps: [{ token: DIALOG_DATA }, { token: BizyToastService }], target: i0.ɵɵFactoryTarget.Component });
4646
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: BizyToastWrapperComponent, isStandalone: true, selector: "bizy-toast-wrapper", providers: [BizyToastService], ngImport: i0, template: "<div class=\"bizy-toast-wrapper bizy-toast-wrapper--{{type}}\">\n\n <button (click)=\"close()\" (keyup.enter)=\"close()\" class=\"bizy-toast-wrapper__close-button\">\n\n <svg \n data-name=\"Cancel button\"\n id=\"bizy-toast-wrapper-close-svg\" \n viewBox=\"0 0 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path id=\"bizy-toast-wrapper-close-svg-content\" d=\"M114,100l49-49a9.9,9.9,0,0,0-14-14L100,86,51,37A9.9,9.9,0,0,0,37,51l49,49L37,149a9.9,9.9,0,0,0,14,14l49-49,49,49a9.9,9.9,0,0,0,14-14Z\"/>\n </svg>\n\n </button>\n\n\n <h3 class=\"bizy-toast-wrapper__title bizy-toast-wrapper__title--{{type}}\" *ngIf=\"title\">{{title}}</h3>\n\n <h5 class=\"bizy-toast-wrapper__msg\" *ngIf=\"msg\">{{msg}}</h5>\n\n\n <span class=\"bizy-toast__progress bizy-toast__progress--{{type}}\"></span>\n \n</div>", styles: [":host{font-size:1rem}.bizy-toast-wrapper{position:relative;width:100%;min-width:20rem;height:fit-content;min-height:3rem;border-left:var(--bizy-toast-border-left);border-top-left-radius:.5rem;border-bottom-left-radius:.5rem;display:flex;flex-direction:column;justify-content:center;row-gap:.5rem;padding:.5rem;box-shadow:0 18px 25px #32325d40,0 3px 6px #0000001a}.bizy-toast-wrapper__title{max-width:min(28rem,60vw)}.bizy-toast-wrapper__msg{max-width:min(30rem,70vw)}.bizy-toast-wrapper--default{background-color:var(--bizy-toast-default-background-color, );border-left-color:var(--bizy-toast-default-color)}.bizy-toast-wrapper__title--default{color:var(--bizy-toast-default-color)}.bizy-toast-wrapper--info{background-color:var(--bizy-toast-info-background-color, );border-left-color:var(--bizy-toast-info-color)}.bizy-toast-wrapper__title--info{color:var(--bizy-toast-info-color)}.bizy-toast-wrapper--success{background-color:var(--bizy-toast-success-background-color);border-left-color:var(--bizy-toast-success-color)}.bizy-toast-wrapper__title--success{color:var(--bizy-toast-success-color)}.bizy-toast-wrapper--warning{background-color:var(--bizy-toast-warning-background-color);border-left-color:var(--bizy-toast-warning-color)}.bizy-toast-wrapper__title--warning{color:var(--bizy-toast-warning-color)}.bizy-toast-wrapper--danger{background-color:var(--bizy-toast-danger-background-color);border-left-color:var(--bizy-toast-danger-color)}.bizy-toast-wrapper__title--danger{color:var(--bizy-toast-danger-color)}.bizy-toast-wrapper__close-button{position:absolute;right:.5rem;top:.5rem;border:none;cursor:pointer;background-color:transparent;transition:color .2s;z-index:1}.bizy-toast-wrapper__close-button #bizy-toast-wrapper-close-svg{height:1rem}.bizy-toast-wrapper__close-button #bizy-toast-wrapper-close-svg-content{fill:var(--bizy-toast-close-button-color)}.bizy-toast-wrapper__close-button:hover #bizy-toast-wrapper-close-svg-content{fill:var(--bizy-toast-close-button-hover-color)}.bizy-toast__progress{width:100%;height:.1rem;display:inline-block;position:absolute;bottom:0;left:0;right:0;overflow:hidden}.bizy-toast__progress--default{background-color:var(--bizy-toast-default-color)}.bizy-toast__progress--info{background-color:var(--bizy-toast-info-color)}.bizy-toast__progress--success{background-color:var(--bizy-toast-success-color)}.bizy-toast__progress--warning{background-color:var(--bizy-toast-warning-color)}.bizy-toast__progress--danger{background-color:var(--bizy-toast-danger-color)}.bizy-toast__progress:after{content:\"\";box-sizing:border-box;width:0;height:.1rem;background-color:#fff;position:absolute;top:0;left:0;animation:progress 2.5s linear infinite}@keyframes progress{0%{width:0}to{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DialogModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4661
4647
  }
4662
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyExportToCSVService, decorators: [{
4663
- type: Injectable,
4664
- args: [{
4665
- providedIn: 'root'
4666
- }]
4667
- }], ctorParameters: () => [{ type: Document, decorators: [{
4648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastWrapperComponent, decorators: [{
4649
+ type: Component,
4650
+ args: [{ selector: 'bizy-toast-wrapper', imports: [CommonModule, DialogModule], providers: [BizyToastService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bizy-toast-wrapper bizy-toast-wrapper--{{type}}\">\n\n <button (click)=\"close()\" (keyup.enter)=\"close()\" class=\"bizy-toast-wrapper__close-button\">\n\n <svg \n data-name=\"Cancel button\"\n id=\"bizy-toast-wrapper-close-svg\" \n viewBox=\"0 0 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path id=\"bizy-toast-wrapper-close-svg-content\" d=\"M114,100l49-49a9.9,9.9,0,0,0-14-14L100,86,51,37A9.9,9.9,0,0,0,37,51l49,49L37,149a9.9,9.9,0,0,0,14,14l49-49,49,49a9.9,9.9,0,0,0,14-14Z\"/>\n </svg>\n\n </button>\n\n\n <h3 class=\"bizy-toast-wrapper__title bizy-toast-wrapper__title--{{type}}\" *ngIf=\"title\">{{title}}</h3>\n\n <h5 class=\"bizy-toast-wrapper__msg\" *ngIf=\"msg\">{{msg}}</h5>\n\n\n <span class=\"bizy-toast__progress bizy-toast__progress--{{type}}\"></span>\n \n</div>", styles: [":host{font-size:1rem}.bizy-toast-wrapper{position:relative;width:100%;min-width:20rem;height:fit-content;min-height:3rem;border-left:var(--bizy-toast-border-left);border-top-left-radius:.5rem;border-bottom-left-radius:.5rem;display:flex;flex-direction:column;justify-content:center;row-gap:.5rem;padding:.5rem;box-shadow:0 18px 25px #32325d40,0 3px 6px #0000001a}.bizy-toast-wrapper__title{max-width:min(28rem,60vw)}.bizy-toast-wrapper__msg{max-width:min(30rem,70vw)}.bizy-toast-wrapper--default{background-color:var(--bizy-toast-default-background-color, );border-left-color:var(--bizy-toast-default-color)}.bizy-toast-wrapper__title--default{color:var(--bizy-toast-default-color)}.bizy-toast-wrapper--info{background-color:var(--bizy-toast-info-background-color, );border-left-color:var(--bizy-toast-info-color)}.bizy-toast-wrapper__title--info{color:var(--bizy-toast-info-color)}.bizy-toast-wrapper--success{background-color:var(--bizy-toast-success-background-color);border-left-color:var(--bizy-toast-success-color)}.bizy-toast-wrapper__title--success{color:var(--bizy-toast-success-color)}.bizy-toast-wrapper--warning{background-color:var(--bizy-toast-warning-background-color);border-left-color:var(--bizy-toast-warning-color)}.bizy-toast-wrapper__title--warning{color:var(--bizy-toast-warning-color)}.bizy-toast-wrapper--danger{background-color:var(--bizy-toast-danger-background-color);border-left-color:var(--bizy-toast-danger-color)}.bizy-toast-wrapper__title--danger{color:var(--bizy-toast-danger-color)}.bizy-toast-wrapper__close-button{position:absolute;right:.5rem;top:.5rem;border:none;cursor:pointer;background-color:transparent;transition:color .2s;z-index:1}.bizy-toast-wrapper__close-button #bizy-toast-wrapper-close-svg{height:1rem}.bizy-toast-wrapper__close-button #bizy-toast-wrapper-close-svg-content{fill:var(--bizy-toast-close-button-color)}.bizy-toast-wrapper__close-button:hover #bizy-toast-wrapper-close-svg-content{fill:var(--bizy-toast-close-button-hover-color)}.bizy-toast__progress{width:100%;height:.1rem;display:inline-block;position:absolute;bottom:0;left:0;right:0;overflow:hidden}.bizy-toast__progress--default{background-color:var(--bizy-toast-default-color)}.bizy-toast__progress--info{background-color:var(--bizy-toast-info-color)}.bizy-toast__progress--success{background-color:var(--bizy-toast-success-color)}.bizy-toast__progress--warning{background-color:var(--bizy-toast-warning-color)}.bizy-toast__progress--danger{background-color:var(--bizy-toast-danger-color)}.bizy-toast__progress:after{content:\"\";box-sizing:border-box;width:0;height:.1rem;background-color:#fff;position:absolute;top:0;left:0;animation:progress 2.5s linear infinite}@keyframes progress{0%{width:0}to{width:100%}}\n"] }]
4651
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
4668
4652
  type: Inject,
4669
- args: [DOCUMENT]
4670
- }] }, { type: i0.RendererFactory2, decorators: [{
4653
+ args: [DIALOG_DATA]
4654
+ }] }, { type: BizyToastService, decorators: [{
4671
4655
  type: Inject,
4672
- args: [RendererFactory2]
4656
+ args: [BizyToastService]
4673
4657
  }] }] });
4674
4658
 
4675
- class BizyRouterService {
4676
- router;
4677
- _backPath = '';
4678
- transitionsEnd$;
4679
- transitionsStart$;
4680
- popStateEvent$;
4681
- constructor(router) {
4682
- this.router = router;
4683
- this.transitionsEnd$ = this.router.events.pipe(filter$1(event => event instanceof NavigationEnd), map((event) => event.id), distinctUntilChanged(), map(() => this.router.routerState.snapshot.root));
4684
- this.transitionsStart$ = this.router.events.pipe(filter$1(event => event instanceof NavigationStart), map((event) => event.id), distinctUntilChanged(), map(() => this.router.routerState.snapshot.root));
4685
- this.popStateEvent$ = fromEvent(window, 'popstate');
4686
- }
4687
- getURL() {
4688
- return window.location.pathname;
4659
+ class BizyToastModule {
4660
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4661
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BizyToastModule, imports: [BizyToastWrapperComponent], exports: [BizyToastWrapperComponent] });
4662
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastModule, providers: [BizyToastService], imports: [BizyToastWrapperComponent] });
4663
+ }
4664
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastModule, decorators: [{
4665
+ type: NgModule,
4666
+ args: [{
4667
+ imports: [BizyToastWrapperComponent],
4668
+ exports: [BizyToastWrapperComponent],
4669
+ providers: [BizyToastService]
4670
+ }]
4671
+ }] });
4672
+
4673
+ class BizyPopupWrapperComponent {
4674
+ dynamicComponentContainer;
4675
+ #component = inject(DIALOG_DATA);
4676
+ #dialogRef = inject(DialogRef);
4677
+ #ref = inject(ChangeDetectorRef);
4678
+ ngAfterViewInit() {
4679
+ this.loadDynamicComponent();
4689
4680
  }
4690
- getBackPath() {
4691
- return this._backPath;
4681
+ loadDynamicComponent() {
4682
+ if (this.#component) {
4683
+ this.dynamicComponentContainer.clear();
4684
+ this.dynamicComponentContainer.createComponent(this.#component);
4685
+ this.#ref.detectChanges();
4686
+ }
4692
4687
  }
4693
- getId(activatedRoute, param) {
4694
- return activatedRoute.snapshot.paramMap.get(param);
4688
+ close() {
4689
+ this.#dialogRef.close();
4695
4690
  }
4696
- getQueryParam(activatedRoute, param) {
4697
- return activatedRoute.snapshot.queryParamMap.get(param);
4691
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4692
+ 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$2.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$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4693
+ }
4694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupWrapperComponent, decorators: [{
4695
+ type: Component,
4696
+ 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"] }]
4697
+ }], propDecorators: { dynamicComponentContainer: [{
4698
+ type: ViewChild,
4699
+ args: ['dynamicComponentContainer', { read: ViewContainerRef }]
4700
+ }] } });
4701
+
4702
+ class BizyPopupService {
4703
+ #dialog = inject(Dialog);
4704
+ static dialogs = new Set();
4705
+ #data = null;
4706
+ ;
4707
+ open(data, callback) {
4708
+ this.#data = data.data;
4709
+ const dialogRef = this.#dialog.open(BizyPopupWrapperComponent, ({
4710
+ id: data.id,
4711
+ data: data.component,
4712
+ autoFocus: true,
4713
+ hasBackdrop: true,
4714
+ disableClose: data.disableClose ?? false,
4715
+ panelClass: ['bizy-popup', data.customClass]
4716
+ }));
4717
+ BizyPopupService.dialogs.add(dialogRef);
4718
+ dialogRef.closed.pipe(take(1)).subscribe(response => {
4719
+ BizyPopupService.dialogs.delete(dialogRef);
4720
+ if (callback) {
4721
+ callback(response);
4722
+ }
4723
+ });
4698
4724
  }
4699
- getAllQueryParam() {
4700
- const params = new URL(window.location.href).searchParams;
4701
- const queryParams = {};
4702
- for (const [key, value] of params.entries()) {
4703
- queryParams[key] = value;
4704
- }
4705
- return queryParams;
4725
+ getData() {
4726
+ return this.#data;
4706
4727
  }
4707
- goTo(data) {
4708
- if (data.replace) {
4709
- this._backPath = '';
4728
+ close(data) {
4729
+ let dialogRef = null;
4730
+ if (data && data.id) {
4731
+ dialogRef = Array.from(BizyPopupService.dialogs).find(_dialogRef => _dialogRef.id === data.id);
4710
4732
  }
4711
4733
  else {
4712
- this._backPath = this.getURL();
4713
- }
4714
- if (data.path[0] === '/') {
4715
- this.router.navigateByUrl(`${data.path}${this._serialize(data.params)}`, { replaceUrl: data.replace ?? false, skipLocationChange: data.skip ?? false });
4716
- return;
4717
- }
4718
- const path = this.getURL();
4719
- const index = path.indexOf('?');
4720
- const url = index !== -1 ? path.substring(0, index) : path;
4721
- this.router.navigateByUrl(`${url}/${data.path}${this._serialize(data.params)}`, { replaceUrl: data.replace ?? false, skipLocationChange: data.skip ?? false });
4722
- }
4723
- goBack(data) {
4724
- if (this._backPath) {
4725
- history.back();
4726
- this._backPath = '';
4727
- }
4728
- else if (data && data.path) {
4729
- this.router.navigateByUrl(data.path, { replaceUrl: true });
4734
+ dialogRef = Array.from(BizyPopupService.dialogs).pop();
4730
4735
  }
4731
- else {
4732
- const index = this.getURL().lastIndexOf('/');
4733
- const backURL = this.getURL().substring(0, index);
4734
- this.router.navigateByUrl(backURL, { replaceUrl: true });
4736
+ if (dialogRef) {
4737
+ dialogRef.close(data ? data.response : null);
4738
+ BizyPopupService.dialogs.delete(dialogRef);
4735
4739
  }
4740
+ this.#data = null;
4736
4741
  }
4737
- reload(force) {
4738
- if (force) {
4739
- window.location.reload();
4740
- }
4741
- else {
4742
- setTimeout(() => {
4743
- this.router.navigateByUrl('/', { skipLocationChange: true }).then(() => {
4744
- this.goTo({ path: this.getURL(), params: this.getAllQueryParam() });
4745
- });
4746
- }, 1);
4747
- }
4742
+ closeAll() {
4743
+ Array.from(BizyPopupService.dialogs).forEach(_dialogRef => {
4744
+ _dialogRef.close();
4745
+ });
4746
+ BizyPopupService.dialogs.clear();
4747
+ this.#data = null;
4748
4748
  }
4749
- _serialize(params) {
4750
- if (!params) {
4751
- return '';
4752
- }
4753
- const str = [];
4754
- for (const param in params) {
4755
- if (params[param]) {
4756
- str.push(encodeURIComponent(param) + '=' + encodeURIComponent(params[param]));
4757
- }
4758
- }
4759
- const queryParams = str.length > 0 ? `?${str.join('&')}` : '';
4760
- return queryParams;
4749
+ openedPopups() {
4750
+ return BizyPopupService.dialogs.size;
4761
4751
  }
4762
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyRouterService, deps: [{ token: Router }], target: i0.ɵɵFactoryTarget.Injectable });
4763
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyRouterService, providedIn: 'root' });
4752
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4753
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService });
4764
4754
  }
4765
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyRouterService, decorators: [{
4766
- type: Injectable,
4755
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, decorators: [{
4756
+ type: Injectable
4757
+ }] });
4758
+
4759
+ class BizyPopupModule {
4760
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4761
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupModule, imports: [BizyPopupWrapperComponent], exports: [BizyPopupWrapperComponent] });
4762
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupModule, providers: [BizyPopupService], imports: [BizyPopupWrapperComponent] });
4763
+ }
4764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupModule, decorators: [{
4765
+ type: NgModule,
4767
4766
  args: [{
4768
- providedIn: 'root'
4767
+ imports: [BizyPopupWrapperComponent],
4768
+ exports: [BizyPopupWrapperComponent],
4769
+ providers: [BizyPopupService]
4769
4770
  }]
4770
- }], ctorParameters: () => [{ type: i1$1.Router, decorators: [{
4771
- type: Inject,
4772
- args: [Router]
4773
- }] }] });
4771
+ }] });
4774
4772
 
4775
- class BizyCacheService {
4776
- router;
4777
- CACHE_PREFIX = 'BIZY-CACHE';
4778
- constructor(router) {
4779
- this.router = router;
4780
- }
4781
- getData(key) {
4782
- if (!key) {
4783
- key = this.router.getURL();
4784
- }
4785
- const data = sessionStorage.getItem(`${this.CACHE_PREFIX}-${key}`);
4786
- if (data) {
4787
- const _data = JSON.parse(data);
4788
- return Date.now() < _data.expiresAt ? _data.value : {};
4789
- }
4790
- return {};
4773
+ var BIZY_ANIMATION;
4774
+ (function (BIZY_ANIMATION) {
4775
+ BIZY_ANIMATION["FADE_IN"] = "fade-in";
4776
+ BIZY_ANIMATION["FADE_OUT"] = "fade-out";
4777
+ BIZY_ANIMATION["FADE_IN_UP"] = "fade-in-up";
4778
+ BIZY_ANIMATION["FADE_IN_RIGHT"] = "fade-in-right";
4779
+ BIZY_ANIMATION["FADE_IN_DOWN"] = "fade-in-down";
4780
+ BIZY_ANIMATION["FADE_IN_LEFT"] = "fade-in-left";
4781
+ BIZY_ANIMATION["SLIDE_IN_UP"] = "slide-in-up";
4782
+ BIZY_ANIMATION["SLIDE_IN_RIGHT"] = "slide-in-right";
4783
+ BIZY_ANIMATION["SLIDE_IN_DOWN"] = "slide-in-down";
4784
+ BIZY_ANIMATION["SLIDE_IN_LEFT"] = "slide-in-left";
4785
+ BIZY_ANIMATION["SLIDE_OUT_RIGHT"] = "slide-out-right";
4786
+ BIZY_ANIMATION["SLIDE_OUT_LEFT"] = "slide-out-left";
4787
+ })(BIZY_ANIMATION || (BIZY_ANIMATION = {}));
4788
+ class BizyAnimationService {
4789
+ rendererFactory;
4790
+ #renderer;
4791
+ constructor(rendererFactory) {
4792
+ this.rendererFactory = rendererFactory;
4793
+ this.#renderer = this.rendererFactory.createRenderer(null, null);
4791
4794
  }
4792
- setData(value, key, expiresAt) {
4793
- if (typeof value === 'undefined' || value === null) {
4794
- return;
4795
- }
4796
- if (!key) {
4797
- key = this.router.getURL();
4798
- }
4799
- if (!expiresAt) {
4800
- const date = new Date();
4801
- date.setHours(23, 59, 59);
4802
- expiresAt = date.getTime();
4803
- }
4804
- const data = {
4805
- expiresAt,
4806
- value
4807
- };
4808
- sessionStorage.setItem(`${this.CACHE_PREFIX}-${key}`, JSON.stringify(data));
4795
+ setAnimation(element, animation) {
4796
+ return new Promise(resolve => {
4797
+ if (!element || !animation || !this.#renderer) {
4798
+ return;
4799
+ }
4800
+ const root = this.#renderer.selectRootElement(':root', true);
4801
+ const animationTimeout = getComputedStyle(root).getPropertyValue('--bizy-animation-timeout').trim();
4802
+ this.#renderer.addClass(element, 'animated');
4803
+ this.#renderer.addClass(element, animation);
4804
+ setTimeout(() => {
4805
+ this.#renderer.removeClass(element, 'animated');
4806
+ this.#renderer.removeClass(element, animation);
4807
+ resolve();
4808
+ }, Number(animationTimeout.match(/\d/g).join('')));
4809
+ });
4809
4810
  }
4810
- remove(key) {
4811
- if (!key) {
4812
- key = this.router.getURL();
4813
- }
4814
- sessionStorage.removeItem(`${this.CACHE_PREFIX}-${key}`);
4811
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyAnimationService, deps: [{ token: RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
4812
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyAnimationService, providedIn: 'root' });
4813
+ }
4814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyAnimationService, decorators: [{
4815
+ type: Injectable,
4816
+ args: [{
4817
+ providedIn: 'root'
4818
+ }]
4819
+ }], ctorParameters: () => [{ type: i0.RendererFactory2, decorators: [{
4820
+ type: Inject,
4821
+ args: [RendererFactory2]
4822
+ }] }] });
4823
+
4824
+ class BizyViewportService {
4825
+ window;
4826
+ #viewportSizeChanged;
4827
+ get sizeChange$() {
4828
+ return this.#viewportSizeChanged.asObservable();
4815
4829
  }
4816
- removeAll() {
4817
- const cacheKeys = Object.keys(sessionStorage).filter(key => {
4818
- return key.includes(this.CACHE_PREFIX);
4830
+ constructor(window) {
4831
+ this.window = window;
4832
+ this.#viewportSizeChanged = new BehaviorSubject({
4833
+ width: this.window.innerWidth,
4834
+ height: this.window.innerHeight
4819
4835
  });
4820
- cacheKeys.forEach(value => {
4821
- sessionStorage.removeItem(value);
4836
+ fromEvent(window, 'resize')
4837
+ .pipe(debounceTime$1(200), map((event) => ({
4838
+ width: event.currentTarget.innerWidth,
4839
+ height: event.currentTarget.innerHeight
4840
+ })))
4841
+ .subscribe(windowSize => {
4842
+ this.#viewportSizeChanged.next(windowSize);
4822
4843
  });
4823
4844
  }
4824
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCacheService, deps: [{ token: BizyRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
4825
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCacheService, providedIn: 'root' });
4845
+ width() {
4846
+ return this.window.screen.availWidth;
4847
+ }
4848
+ height() {
4849
+ return this.window.screen.availHeight;
4850
+ }
4851
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyViewportService, deps: [{ token: Window }], target: i0.ɵɵFactoryTarget.Injectable });
4852
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyViewportService, providedIn: 'root' });
4826
4853
  }
4827
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCacheService, decorators: [{
4854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyViewportService, decorators: [{
4828
4855
  type: Injectable,
4829
4856
  args: [{
4830
4857
  providedIn: 'root'
4831
4858
  }]
4832
- }], ctorParameters: () => [{ type: BizyRouterService, decorators: [{
4859
+ }], ctorParameters: () => [{ type: Window, decorators: [{
4833
4860
  type: Inject,
4834
- args: [BizyRouterService]
4861
+ args: [Window]
4835
4862
  }] }] });
4836
4863
 
4837
- /**
4838
- * Copyright 2020 Google LLC
4839
- *
4840
- * Licensed under the Apache License, Version 2.0 (the 'License');
4841
- * you may not use this file except in compliance with the License.
4842
- * You may obtain a copy of the License at
4843
- *
4844
- * http://www.apache.org/licenses/LICENSE-2.0
4845
- *
4846
- * Unless required by applicable law or agreed to in writing, software
4847
- * distributed under the License is distributed on an 'AS IS' BASIS,
4848
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4849
- * See the License for the specific language governing permissions and
4850
- * limitations under the License.
4851
- */
4852
- // This function's role is to enable smooth transition to the brave new world of
4853
- // User-Agent Client Hints. If you have legacy code that relies on
4854
- // `navigator.userAgent` and which relies on entropy that will go away by
4855
- // default, you *need* to refactor it to use UA-CH. This function is to be used
4856
- // as a stop gap, to enable smooth transition during that period.
4857
- /**
4858
- * @param {string[]} hints
4859
- * @return {Promise<string|undefined>} A Promise that resolves to a string if a
4860
- * UA could be synthesized from client hints, otherwise undefined.
4861
- */
4862
- async function getUserAgentUsingClientHints(hints) {
4863
- // Helper functions for platform specific strings
4864
- const GetCrosSpecificString = (values) => {
4865
- let osCPUFragment = '';
4866
- if (values.bitness == '64') {
4867
- if (values.architecture == 'x86') {
4868
- osCPUFragment = 'x86_64';
4864
+ class BizyKeyboardService {
4865
+ document;
4866
+ #shiftHolding = new BehaviorSubject(false);
4867
+ get shiftHolding$() {
4868
+ return this.#shiftHolding.asObservable();
4869
+ }
4870
+ constructor(document) {
4871
+ this.document = document;
4872
+ this.document.addEventListener('keydown', (event) => {
4873
+ if (event.key === 'Shift') {
4874
+ this.#shiftHolding.next(true);
4869
4875
  }
4870
- else if (values.architecture == 'arm') {
4871
- osCPUFragment = 'aarch64';
4876
+ });
4877
+ this.document.addEventListener('keyup', (event) => {
4878
+ if (event.key === 'Shift') {
4879
+ this.#shiftHolding.next(false);
4872
4880
  }
4881
+ });
4882
+ }
4883
+ isShiftHolding() {
4884
+ return this.#shiftHolding.value;
4885
+ }
4886
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyKeyboardService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
4887
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyKeyboardService, providedIn: 'root' });
4888
+ }
4889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyKeyboardService, decorators: [{
4890
+ type: Injectable,
4891
+ args: [{
4892
+ providedIn: 'root'
4893
+ }]
4894
+ }], ctorParameters: () => [{ type: Document, decorators: [{
4895
+ type: Inject,
4896
+ args: [DOCUMENT]
4897
+ }] }] });
4898
+
4899
+ class BizyExportToCSVService {
4900
+ document;
4901
+ rendererFactory;
4902
+ #loading = false;
4903
+ #renderer;
4904
+ constructor(document, rendererFactory) {
4905
+ this.document = document;
4906
+ this.rendererFactory = rendererFactory;
4907
+ this.#renderer = this.rendererFactory.createRenderer(null, null);
4908
+ }
4909
+ download(data) {
4910
+ if (this.#loading || !data.items || !Array.isArray(data.items) || !data.model) {
4911
+ return;
4873
4912
  }
4874
- else if (values.architecture == 'arm' && values.bitness == '32') {
4875
- osCPUFragment = 'armv7l';
4876
- }
4877
- if (osCPUFragment == '') {
4878
- return `X11; CrOS ${values.platformVersion}`;
4879
- }
4880
- return `X11; CrOS ${osCPUFragment} ${values.platformVersion}`;
4881
- };
4882
- const GetWindowsSpecificString = (values) => {
4883
- let osCPUFragment = '';
4884
- if (values.architecture == 'x86' && values.bitness == '64') {
4885
- osCPUFragment = '; Win64; x64';
4886
- }
4887
- else if (values.architecture == 'arm') {
4888
- osCPUFragment = '; ARM';
4913
+ try {
4914
+ this.#loading = true;
4915
+ const csv = this.getCSV(data);
4916
+ if (!data.fileName) {
4917
+ data.fileName = 'bizy-csv';
4918
+ }
4919
+ this.#downloadCSV({ csv, fileName: data.fileName });
4889
4920
  }
4890
- else if (values.wow64 === true) {
4891
- osCPUFragment = '; WOW64';
4921
+ finally {
4922
+ this.#loading = false;
4892
4923
  }
4893
- return `Windows NT ${getWindowsPlatformVersion(values.platformVersion)}${osCPUFragment}`;
4894
- };
4895
- const GetMacSpecificString = (values) => {
4896
- let newUA = 'Macintosh;';
4897
- newUA += values.architecture === 'arm' ? ' ARM ' : ' Intel ';
4898
- newUA += 'Mac OS X ';
4899
- let macVersion = values.platformVersion;
4900
- if (macVersion.indexOf('.') > -1) {
4901
- macVersion = macVersion.split('.').join('_');
4924
+ }
4925
+ getCSV(data) {
4926
+ let csv = '';
4927
+ function escapeCommas(str) {
4928
+ return str.includes(',') ? `"${str}"` : str;
4902
4929
  }
4903
- newUA += macVersion;
4904
- return newUA;
4905
- };
4906
- const GetAndroidSpecificString = (values) => {
4907
- let newUA = 'Linux; Android ';
4908
- newUA += values.platformVersion;
4909
- if (values.model) {
4910
- newUA += '; ';
4911
- newUA += values.model;
4930
+ for (const key in data.model) {
4931
+ if (key) {
4932
+ csv += `${data.model[key]},`;
4933
+ }
4912
4934
  }
4913
- return newUA;
4914
- };
4915
- const Initialize = (values) => {
4916
- if (!values.architecture) {
4917
- values.architecture = 'x86';
4918
- }
4919
- if (!values.bitness) {
4920
- values.bitness = '64';
4921
- }
4922
- if (!values.model) {
4923
- values.model = '';
4924
- }
4925
- if (!values.platform) {
4926
- values.platform = 'Windows';
4927
- }
4928
- if (!values.platformVersion) {
4929
- values.platformVersion = '10.0';
4930
- }
4931
- if (!values.wow64) {
4932
- values.wow64 = false;
4933
- }
4934
- return values;
4935
- };
4936
- // @ts-ignore-error
4937
- if (!navigator.userAgentData) {
4938
- return Promise.resolve('');
4939
- }
4940
- // Verify that this is a Chromium-based browser
4941
- let isChromium = false;
4942
- let chromiumVersion;
4943
- // eslint-disable-next-line prefer-regex-literals
4944
- const isChromeUAPattern = new RegExp('AppleWebKit/537.36 \\(KHTML, like Gecko\\) Chrome/\\d+.\\d+.\\d+.\\d+ (Mobile )?Safari/537.36$');
4945
- // @ts-ignore-error
4946
- navigator.userAgentData.brands.forEach(value => {
4947
- if (value.brand == 'Chromium') {
4948
- // Let's double check the UA string as well, so we don't accidentally
4949
- // capture a headless browser or friendly bot (which should report as
4950
- // HeadlessChrome or something entirely different).
4951
- isChromium = isChromeUAPattern.test(navigator.userAgent);
4952
- chromiumVersion = value.version;
4953
- }
4954
- });
4955
- // @ts-ignore
4956
- if (!isChromium || chromiumVersion < 100) {
4957
- // If this is not a Chromium-based browser, the UA string should be very
4958
- // different. Or, if this is a Chromium lower than 100, it doesn't have
4959
- // all the hints we rely on. So let's bail.
4960
- return Promise.resolve('');
4961
- }
4962
- // Main logic
4963
- return new Promise(resolve => {
4964
- // @ts-ignore-error
4965
- navigator.userAgentData.getHighEntropyValues(hints).then(values => {
4966
- let initialValues = {
4967
- // @ts-ignore-error
4968
- platform: navigator.userAgentData?.platform,
4969
- version: chromiumVersion
4970
- };
4971
- values = Object.assign(initialValues, values);
4972
- values = Initialize(values);
4973
- let newUA = 'Mozilla/5.0 (';
4974
- if (['Chrome OS', 'Chromium OS'].includes(values.platform)) {
4975
- newUA += GetCrosSpecificString(values);
4976
- }
4977
- else if (values.platform == 'Windows') {
4978
- newUA += GetWindowsSpecificString(values);
4979
- }
4980
- else if (values.platform == 'macOS') {
4981
- newUA += GetMacSpecificString(values);
4982
- }
4983
- else if (values.platform == 'Android') {
4984
- newUA += GetAndroidSpecificString(values);
4985
- }
4986
- else {
4987
- newUA += 'X11; Linux x86_64';
4988
- }
4989
- newUA += ') AppleWebKit/537.36 (KHTML, like Gecko) Chrome/';
4990
- newUA += getVersion(values?.fullVersionList, initialValues.version);
4991
- // @ts-ignore-error
4992
- if (navigator.userAgentData.mobile) {
4993
- newUA += ' Mobile';
4935
+ data.items.forEach(_item => {
4936
+ // Remove the last character (',')
4937
+ csv = csv.slice(0, -1);
4938
+ csv += '\n';
4939
+ for (const key in data.model) {
4940
+ let value = _item;
4941
+ const nestedProperty = key.split('.');
4942
+ for (let i = 0; i < nestedProperty.length; i++) {
4943
+ const _property = nestedProperty[i];
4944
+ if (value) {
4945
+ value = value[_property];
4946
+ }
4947
+ else {
4948
+ break;
4949
+ }
4950
+ }
4951
+ if (typeof value !== undefined && value !== null) {
4952
+ csv += `${escapeCommas(String(value).replace(/\n/g, ''))},`;
4953
+ }
4954
+ else {
4955
+ csv += ',';
4956
+ }
4994
4957
  }
4995
- newUA += ' Safari/537.36';
4996
- resolve(newUA);
4997
4958
  });
4998
- });
4999
- }
5000
- function getVersion(fullVersionList, majorVersion) {
5001
- // If we don't get a fullVersionList, or it's somehow undefined, return
5002
- // the reduced version number.
5003
- return (fullVersionList?.find((item) => item.brand == 'Google Chrome')?.version ||
5004
- `${majorVersion}.0.0.0`);
5005
- }
5006
- function getWindowsPlatformVersion(platformVersion) {
5007
- // https://wicg.github.io/ua-client-hints/#get-the-legacy-windows-version-number
5008
- const versionMap = new Map([
5009
- ['0.3.0', '6.3'], // Windows 8.1
5010
- ['0.2.0', '6.2'], // Windows 8
5011
- ['0.1.0', '6.1'] // Windows 7
5012
- ]);
5013
- if (versionMap.has(platformVersion)) {
5014
- return versionMap.get(platformVersion);
4959
+ if (csv && csv[csv.length - 1] === ',') {
4960
+ // Remove the last character (',')
4961
+ csv = csv.slice(0, -1);
4962
+ }
4963
+ return csv;
5015
4964
  }
5016
- // Windows 10 and above send "Windows NT 10.0"
5017
- return '10.0';
5018
- }
5019
- /**
5020
- * @param {string[]} hints
5021
- * @return {Promise<string|undefined>} A Promise that resolves on overriding the
5022
- * navigator.userAgent string.
5023
- */
5024
- async function overrideUserAgentUsingClientHints(hints) {
5025
- return new Promise(resolve => {
5026
- getUserAgentUsingClientHints(hints).then(newUA => {
5027
- if (newUA) {
5028
- // Got a new UA value. Now override `navigator.userAgent`.
5029
- Object.defineProperty(navigator, 'userAgent', {
5030
- value: newUA,
5031
- writable: false,
5032
- configurable: true
5033
- });
5034
- }
5035
- else {
5036
- newUA = navigator.userAgent;
5037
- }
5038
- resolve(newUA);
5039
- });
5040
- });
5041
- }
5042
- const exportedForTests = { getVersion, getWindowsPlatformVersion };
5043
-
5044
- class BizyUserAgentService {
5045
- get() {
5046
- return new Promise(resolve => {
5047
- overrideUserAgentUsingClientHints([
5048
- 'architecture',
5049
- 'bitness',
5050
- 'model',
5051
- 'platformVersion',
5052
- 'uaFullVersion',
5053
- 'fullVersionList'
5054
- ])
5055
- .then(userAgent => {
5056
- resolve(userAgent);
5057
- })
5058
- .catch(() => {
5059
- resolve(window.navigator.userAgent);
5060
- });
5061
- });
4965
+ #downloadCSV(data) {
4966
+ const blob = new Blob([data.csv], { type: 'text/csv;charset=utf-8;' });
4967
+ const url = URL.createObjectURL(blob);
4968
+ const downloadButton = this.#renderer.createElement('a');
4969
+ downloadButton.setAttribute('download', data.fileName);
4970
+ downloadButton.href = url;
4971
+ this.#renderer.appendChild(this.document.body, downloadButton);
4972
+ downloadButton.click();
4973
+ this.#renderer.removeChild(this.document.body, downloadButton);
5062
4974
  }
5063
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyUserAgentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5064
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyUserAgentService, providedIn: 'root' });
4975
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyExportToCSVService, deps: [{ token: DOCUMENT }, { token: RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
4976
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyExportToCSVService, providedIn: 'root' });
5065
4977
  }
5066
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyUserAgentService, decorators: [{
4978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyExportToCSVService, decorators: [{
5067
4979
  type: Injectable,
5068
4980
  args: [{
5069
4981
  providedIn: 'root'
5070
4982
  }]
5071
- }] });
4983
+ }], ctorParameters: () => [{ type: Document, decorators: [{
4984
+ type: Inject,
4985
+ args: [DOCUMENT]
4986
+ }] }, { type: i0.RendererFactory2, decorators: [{
4987
+ type: Inject,
4988
+ args: [RendererFactory2]
4989
+ }] }] });
5072
4990
 
5073
- class BizyValidatorService {
5074
- isEmail(email) {
5075
- const regex = /^(([^ñ<>()[\]\\.,;:\s@"]+(\.[^ñ<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
5076
- return regex.test(String(email).toLowerCase());
5077
- }
5078
- isPassFormat(pass) {
5079
- const formatRegex = /(?!.*012)(?!.*123)(?!.*234)(?!.*345)(?!.*456)(?!.*567)(?!.*678)(?!.*789)(?!.*987)(?!.*876)(?!.*765)(?!.*654)(?!.*543)(?!.*432)(?!.*321)(?!.*210)(?!.*(.)\1{2,})(?!(^\D+$))(?!(^\d+$))(^.{6,}$)/;
5080
- const excludeRegex = /[^'"]$/;
5081
- const _pass = String(pass).toLowerCase();
5082
- return formatRegex.test(_pass) && excludeRegex.test(_pass);
4991
+ class BizyRouterService {
4992
+ router;
4993
+ _backPath = '';
4994
+ transitionsEnd$;
4995
+ transitionsStart$;
4996
+ popStateEvent$;
4997
+ constructor(router) {
4998
+ this.router = router;
4999
+ this.transitionsEnd$ = this.router.events.pipe(filter$1(event => event instanceof NavigationEnd), map((event) => event.id), distinctUntilChanged(), map(() => this.router.routerState.snapshot.root));
5000
+ this.transitionsStart$ = this.router.events.pipe(filter$1(event => event instanceof NavigationStart), map((event) => event.id), distinctUntilChanged(), map(() => this.router.routerState.snapshot.root));
5001
+ this.popStateEvent$ = fromEvent(window, 'popstate');
5083
5002
  }
5084
- isNoSpecialCharacter(name) {
5085
- const regex = /^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;
5086
- return regex.test(String(name).toLowerCase());
5003
+ getURL() {
5004
+ return window.location.pathname;
5087
5005
  }
5088
- isNumber(number) {
5089
- const regex = /^[0-9]*$/;
5090
- return regex.test(String(number).toLowerCase());
5006
+ getBackPath() {
5007
+ return this._backPath;
5091
5008
  }
5092
- isPhoneNumber(number) {
5093
- const regex = /^\+{0,1}[0-9#*]+$/;
5094
- return regex.test(String(number).toLowerCase());
5009
+ getId(activatedRoute, param) {
5010
+ return activatedRoute.snapshot.paramMap.get(param);
5095
5011
  }
5096
- isString(string) {
5097
- return typeof string === 'string' || string instanceof String;
5012
+ getQueryParam(activatedRoute, param) {
5013
+ return activatedRoute.snapshot.queryParamMap.get(param);
5098
5014
  }
5099
- isJSON(text) {
5100
- if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\/bfnrtu]/g, '@')
5101
- .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/g, ']')
5102
- .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
5103
- return true;
5015
+ getAllQueryParam() {
5016
+ const params = new URL(window.location.href).searchParams;
5017
+ const queryParams = {};
5018
+ for (const [key, value] of params.entries()) {
5019
+ queryParams[key] = value;
5104
5020
  }
5105
- return false;
5106
- }
5107
- emailValidator() {
5108
- return (control) => {
5109
- return !control.value || (control.value && this.isEmail(control.value)) ? null : { bizyEmail: true };
5110
- };
5111
- }
5112
- phoneNumberValidator() {
5113
- return (control) => {
5114
- return !control.value || (control.value && this.isPhoneNumber(control.value)) ? null : { bizyPhoneNumber: true };
5115
- };
5021
+ return queryParams;
5116
5022
  }
5117
- numberValidator() {
5118
- return (control) => {
5119
- return !control.value || (control.value && this.isNumber(control.value)) ? null : { bizyNumber: true };
5120
- };
5023
+ goTo(data) {
5024
+ if (data.replace) {
5025
+ this._backPath = '';
5026
+ }
5027
+ else {
5028
+ this._backPath = this.getURL();
5029
+ }
5030
+ if (data.path[0] === '/') {
5031
+ this.router.navigateByUrl(`${data.path}${this._serialize(data.params)}`, { replaceUrl: data.replace ?? false, skipLocationChange: data.skip ?? false });
5032
+ return;
5033
+ }
5034
+ const path = this.getURL();
5035
+ const index = path.indexOf('?');
5036
+ const url = index !== -1 ? path.substring(0, index) : path;
5037
+ this.router.navigateByUrl(`${url}/${data.path}${this._serialize(data.params)}`, { replaceUrl: data.replace ?? false, skipLocationChange: data.skip ?? false });
5121
5038
  }
5122
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyValidatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5123
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyValidatorService, providedIn: 'root' });
5039
+ goBack(data) {
5040
+ if (this._backPath) {
5041
+ history.back();
5042
+ this._backPath = '';
5043
+ }
5044
+ else if (data && data.path) {
5045
+ this.router.navigateByUrl(data.path, { replaceUrl: true });
5046
+ }
5047
+ else {
5048
+ const index = this.getURL().lastIndexOf('/');
5049
+ const backURL = this.getURL().substring(0, index);
5050
+ this.router.navigateByUrl(backURL, { replaceUrl: true });
5051
+ }
5052
+ }
5053
+ reload(force) {
5054
+ if (force) {
5055
+ window.location.reload();
5056
+ }
5057
+ else {
5058
+ setTimeout(() => {
5059
+ this.router.navigateByUrl('/', { skipLocationChange: true }).then(() => {
5060
+ this.goTo({ path: this.getURL(), params: this.getAllQueryParam() });
5061
+ });
5062
+ }, 1);
5063
+ }
5064
+ }
5065
+ _serialize(params) {
5066
+ if (!params) {
5067
+ return '';
5068
+ }
5069
+ const str = [];
5070
+ for (const param in params) {
5071
+ if (params[param]) {
5072
+ str.push(encodeURIComponent(param) + '=' + encodeURIComponent(params[param]));
5073
+ }
5074
+ }
5075
+ const queryParams = str.length > 0 ? `?${str.join('&')}` : '';
5076
+ return queryParams;
5077
+ }
5078
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyRouterService, deps: [{ token: Router }], target: i0.ɵɵFactoryTarget.Injectable });
5079
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyRouterService, providedIn: 'root' });
5124
5080
  }
5125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyValidatorService, decorators: [{
5081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyRouterService, decorators: [{
5126
5082
  type: Injectable,
5127
5083
  args: [{
5128
5084
  providedIn: 'root'
5129
5085
  }]
5130
- }] });
5086
+ }], ctorParameters: () => [{ type: i1$3.Router, decorators: [{
5087
+ type: Inject,
5088
+ args: [Router]
5089
+ }] }] });
5131
5090
 
5132
- class BizyStorageService {
5133
- get(key) {
5134
- const item = localStorage.getItem(key);
5135
- try {
5136
- return JSON.parse(item);
5091
+ class BizyCacheService {
5092
+ router;
5093
+ CACHE_PREFIX = 'BIZY-CACHE';
5094
+ constructor(router) {
5095
+ this.router = router;
5096
+ }
5097
+ getData(key) {
5098
+ if (!key) {
5099
+ key = this.router.getURL();
5137
5100
  }
5138
- catch (e) {
5139
- return item;
5101
+ const data = sessionStorage.getItem(`${this.CACHE_PREFIX}-${key}`);
5102
+ if (data) {
5103
+ const _data = JSON.parse(data);
5104
+ return Date.now() < _data.expiresAt ? _data.value : {};
5140
5105
  }
5106
+ return {};
5141
5107
  }
5142
- set(key, value) {
5143
- if (typeof value === 'object') {
5144
- localStorage.setItem(key, JSON.stringify(value));
5108
+ setData(value, key, expiresAt) {
5109
+ if (typeof value === 'undefined' || value === null) {
5110
+ return;
5145
5111
  }
5146
- else if (typeof value === 'string') {
5147
- localStorage.setItem(key, value);
5112
+ if (!key) {
5113
+ key = this.router.getURL();
5148
5114
  }
5149
- else {
5150
- localStorage.setItem(key, String(value));
5115
+ if (!expiresAt) {
5116
+ const date = new Date();
5117
+ date.setHours(23, 59, 59);
5118
+ expiresAt = date.getTime();
5151
5119
  }
5120
+ const data = {
5121
+ expiresAt,
5122
+ value
5123
+ };
5124
+ sessionStorage.setItem(`${this.CACHE_PREFIX}-${key}`, JSON.stringify(data));
5152
5125
  }
5153
5126
  remove(key) {
5154
- localStorage.removeItem(key);
5127
+ if (!key) {
5128
+ key = this.router.getURL();
5129
+ }
5130
+ sessionStorage.removeItem(`${this.CACHE_PREFIX}-${key}`);
5155
5131
  }
5156
- clear() {
5157
- localStorage.clear();
5132
+ removeAll() {
5133
+ const cacheKeys = Object.keys(sessionStorage).filter(key => {
5134
+ return key.includes(this.CACHE_PREFIX);
5135
+ });
5136
+ cacheKeys.forEach(value => {
5137
+ sessionStorage.removeItem(value);
5138
+ });
5158
5139
  }
5159
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5160
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyStorageService, providedIn: 'root' });
5140
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCacheService, deps: [{ token: BizyRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
5141
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCacheService, providedIn: 'root' });
5161
5142
  }
5162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyStorageService, decorators: [{
5143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCacheService, decorators: [{
5163
5144
  type: Injectable,
5164
5145
  args: [{
5165
5146
  providedIn: 'root'
5166
5147
  }]
5167
- }] });
5148
+ }], ctorParameters: () => [{ type: BizyRouterService, decorators: [{
5149
+ type: Inject,
5150
+ args: [BizyRouterService]
5151
+ }] }] });
5168
5152
 
5169
- var COLOR;
5170
- (function (COLOR) {
5171
- COLOR["DEFAULT"] = "#666666";
5172
- COLOR["INFO"] = "#2484C6";
5173
- COLOR["SUCCESS"] = "#65BF6C";
5174
- COLOR["WARNING"] = "#F7A64C";
5175
- COLOR["ERROR"] = "#EF4C59";
5176
- })(COLOR || (COLOR = {}));
5177
- class BizyLogService {
5178
- #lastLogTimestamp = 0;
5179
- #log(log, color, param) {
5180
- const difference = this.#lastLogTimestamp ? Date.now() - this.#lastLogTimestamp : 0;
5181
- this.#lastLogTimestamp = Date.now();
5182
- const timestampStyles = 'color: #EE5DFF';
5183
- const logStyles = `color: ${color}; font-size: 12px;`;
5184
- const date = new Date();
5185
- if (param) {
5186
- console.log(`%c${date.toLocaleString()}: %c${log} %c(+${difference}ms)`, timestampStyles, logStyles, timestampStyles, param);
5153
+ /**
5154
+ * Copyright 2020 Google LLC
5155
+ *
5156
+ * Licensed under the Apache License, Version 2.0 (the 'License');
5157
+ * you may not use this file except in compliance with the License.
5158
+ * You may obtain a copy of the License at
5159
+ *
5160
+ * http://www.apache.org/licenses/LICENSE-2.0
5161
+ *
5162
+ * Unless required by applicable law or agreed to in writing, software
5163
+ * distributed under the License is distributed on an 'AS IS' BASIS,
5164
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5165
+ * See the License for the specific language governing permissions and
5166
+ * limitations under the License.
5167
+ */
5168
+ // This function's role is to enable smooth transition to the brave new world of
5169
+ // User-Agent Client Hints. If you have legacy code that relies on
5170
+ // `navigator.userAgent` and which relies on entropy that will go away by
5171
+ // default, you *need* to refactor it to use UA-CH. This function is to be used
5172
+ // as a stop gap, to enable smooth transition during that period.
5173
+ /**
5174
+ * @param {string[]} hints
5175
+ * @return {Promise<string|undefined>} A Promise that resolves to a string if a
5176
+ * UA could be synthesized from client hints, otherwise undefined.
5177
+ */
5178
+ async function getUserAgentUsingClientHints(hints) {
5179
+ // Helper functions for platform specific strings
5180
+ const GetCrosSpecificString = (values) => {
5181
+ let osCPUFragment = '';
5182
+ if (values.bitness == '64') {
5183
+ if (values.architecture == 'x86') {
5184
+ osCPUFragment = 'x86_64';
5185
+ }
5186
+ else if (values.architecture == 'arm') {
5187
+ osCPUFragment = 'aarch64';
5188
+ }
5187
5189
  }
5188
- else {
5189
- console.log(`%c${date.toLocaleString()}: %c${log} %c(+${difference}ms)`, timestampStyles, logStyles, timestampStyles);
5190
+ else if (values.architecture == 'arm' && values.bitness == '32') {
5191
+ osCPUFragment = 'armv7l';
5190
5192
  }
5191
- }
5192
- debug(data, param) {
5193
- if (typeof data === 'string') {
5194
- this.#log(data, COLOR.DEFAULT, param);
5193
+ if (osCPUFragment == '') {
5194
+ return `X11; CrOS ${values.platformVersion}`;
5195
5195
  }
5196
- else {
5197
- this.#template({ ...data, param: data.param, title: 'Debug', color: COLOR.DEFAULT });
5196
+ return `X11; CrOS ${osCPUFragment} ${values.platformVersion}`;
5197
+ };
5198
+ const GetWindowsSpecificString = (values) => {
5199
+ let osCPUFragment = '';
5200
+ if (values.architecture == 'x86' && values.bitness == '64') {
5201
+ osCPUFragment = '; Win64; x64';
5198
5202
  }
5199
- }
5200
- info(data, param) {
5201
- if (typeof data === 'string') {
5202
- this.#log(data, COLOR.INFO, param);
5203
+ else if (values.architecture == 'arm') {
5204
+ osCPUFragment = '; ARM';
5203
5205
  }
5204
- else {
5205
- this.#template({ ...data, param: data.param, title: 'Info', color: COLOR.INFO });
5206
+ else if (values.wow64 === true) {
5207
+ osCPUFragment = '; WOW64';
5206
5208
  }
5207
- }
5208
- success(data, param) {
5209
- if (typeof data === 'string') {
5210
- this.#log(data, COLOR.SUCCESS, param);
5209
+ return `Windows NT ${getWindowsPlatformVersion(values.platformVersion)}${osCPUFragment}`;
5210
+ };
5211
+ const GetMacSpecificString = (values) => {
5212
+ let newUA = 'Macintosh;';
5213
+ newUA += values.architecture === 'arm' ? ' ARM ' : ' Intel ';
5214
+ newUA += 'Mac OS X ';
5215
+ let macVersion = values.platformVersion;
5216
+ if (macVersion.indexOf('.') > -1) {
5217
+ macVersion = macVersion.split('.').join('_');
5211
5218
  }
5212
- else {
5213
- this.#template({ ...data, param: data.param, title: 'Success', color: COLOR.SUCCESS });
5219
+ newUA += macVersion;
5220
+ return newUA;
5221
+ };
5222
+ const GetAndroidSpecificString = (values) => {
5223
+ let newUA = 'Linux; Android ';
5224
+ newUA += values.platformVersion;
5225
+ if (values.model) {
5226
+ newUA += '; ';
5227
+ newUA += values.model;
5214
5228
  }
5215
- }
5216
- warning(data, param) {
5217
- if (typeof data === 'string') {
5218
- this.#log(data, COLOR.WARNING, param);
5229
+ return newUA;
5230
+ };
5231
+ const Initialize = (values) => {
5232
+ if (!values.architecture) {
5233
+ values.architecture = 'x86';
5219
5234
  }
5220
- else {
5221
- this.#template({ ...data, param: data.param, title: 'Warning', color: COLOR.WARNING });
5235
+ if (!values.bitness) {
5236
+ values.bitness = '64';
5222
5237
  }
5223
- }
5224
- error(data, param) {
5225
- if (typeof data === 'string') {
5226
- this.#log(data, COLOR.ERROR, param);
5238
+ if (!values.model) {
5239
+ values.model = '';
5227
5240
  }
5228
- else {
5229
- this.#template({ ...data, param: data.param, title: 'Error', color: COLOR.ERROR });
5241
+ if (!values.platform) {
5242
+ values.platform = 'Windows';
5230
5243
  }
5244
+ if (!values.platformVersion) {
5245
+ values.platformVersion = '10.0';
5246
+ }
5247
+ if (!values.wow64) {
5248
+ values.wow64 = false;
5249
+ }
5250
+ return values;
5251
+ };
5252
+ // @ts-ignore-error
5253
+ if (!navigator.userAgentData) {
5254
+ return Promise.resolve('');
5231
5255
  }
5232
- /** DEPRECATED */
5233
- templateDebug(data) {
5234
- this.#template({ ...data, title: 'Debug', color: COLOR.DEFAULT });
5235
- }
5236
- /** DEPRECATED */
5237
- templateSucc(data) {
5238
- this.#template({ ...data, title: 'Success', color: COLOR.SUCCESS });
5239
- }
5240
- /** DEPRECATED */
5241
- templateInfo(data) {
5242
- this.#template({ ...data, title: 'Info', color: COLOR.INFO });
5243
- }
5244
- /** DEPRECATED */
5245
- templateWarn(data) {
5246
- this.#template({ ...data, title: 'Warning', color: COLOR.WARNING });
5247
- }
5248
- /** DEPRECATED */
5249
- templateError(data) {
5250
- this.#template({ ...data, title: 'Error', color: COLOR.ERROR });
5256
+ // Verify that this is a Chromium-based browser
5257
+ let isChromium = false;
5258
+ let chromiumVersion;
5259
+ // eslint-disable-next-line prefer-regex-literals
5260
+ const isChromeUAPattern = new RegExp('AppleWebKit/537.36 \\(KHTML, like Gecko\\) Chrome/\\d+.\\d+.\\d+.\\d+ (Mobile )?Safari/537.36$');
5261
+ // @ts-ignore-error
5262
+ navigator.userAgentData.brands.forEach(value => {
5263
+ if (value.brand == 'Chromium') {
5264
+ // Let's double check the UA string as well, so we don't accidentally
5265
+ // capture a headless browser or friendly bot (which should report as
5266
+ // HeadlessChrome or something entirely different).
5267
+ isChromium = isChromeUAPattern.test(navigator.userAgent);
5268
+ chromiumVersion = value.version;
5269
+ }
5270
+ });
5271
+ // @ts-ignore
5272
+ if (!isChromium || chromiumVersion < 100) {
5273
+ // If this is not a Chromium-based browser, the UA string should be very
5274
+ // different. Or, if this is a Chromium lower than 100, it doesn't have
5275
+ // all the hints we rely on. So let's bail.
5276
+ return Promise.resolve('');
5251
5277
  }
5252
- #template(data) {
5253
- const log = `(${data.title}) ${data.fileName} - ${data.functionName}`;
5254
- this.#log(log, data.color, data.param);
5278
+ // Main logic
5279
+ return new Promise(resolve => {
5280
+ // @ts-ignore-error
5281
+ navigator.userAgentData.getHighEntropyValues(hints).then(values => {
5282
+ let initialValues = {
5283
+ // @ts-ignore-error
5284
+ platform: navigator.userAgentData?.platform,
5285
+ version: chromiumVersion
5286
+ };
5287
+ values = Object.assign(initialValues, values);
5288
+ values = Initialize(values);
5289
+ let newUA = 'Mozilla/5.0 (';
5290
+ if (['Chrome OS', 'Chromium OS'].includes(values.platform)) {
5291
+ newUA += GetCrosSpecificString(values);
5292
+ }
5293
+ else if (values.platform == 'Windows') {
5294
+ newUA += GetWindowsSpecificString(values);
5295
+ }
5296
+ else if (values.platform == 'macOS') {
5297
+ newUA += GetMacSpecificString(values);
5298
+ }
5299
+ else if (values.platform == 'Android') {
5300
+ newUA += GetAndroidSpecificString(values);
5301
+ }
5302
+ else {
5303
+ newUA += 'X11; Linux x86_64';
5304
+ }
5305
+ newUA += ') AppleWebKit/537.36 (KHTML, like Gecko) Chrome/';
5306
+ newUA += getVersion(values?.fullVersionList, initialValues.version);
5307
+ // @ts-ignore-error
5308
+ if (navigator.userAgentData.mobile) {
5309
+ newUA += ' Mobile';
5310
+ }
5311
+ newUA += ' Safari/537.36';
5312
+ resolve(newUA);
5313
+ });
5314
+ });
5315
+ }
5316
+ function getVersion(fullVersionList, majorVersion) {
5317
+ // If we don't get a fullVersionList, or it's somehow undefined, return
5318
+ // the reduced version number.
5319
+ return (fullVersionList?.find((item) => item.brand == 'Google Chrome')?.version ||
5320
+ `${majorVersion}.0.0.0`);
5321
+ }
5322
+ function getWindowsPlatformVersion(platformVersion) {
5323
+ // https://wicg.github.io/ua-client-hints/#get-the-legacy-windows-version-number
5324
+ const versionMap = new Map([
5325
+ ['0.3.0', '6.3'], // Windows 8.1
5326
+ ['0.2.0', '6.2'], // Windows 8
5327
+ ['0.1.0', '6.1'] // Windows 7
5328
+ ]);
5329
+ if (versionMap.has(platformVersion)) {
5330
+ return versionMap.get(platformVersion);
5255
5331
  }
5256
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5257
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyLogService, providedIn: 'root' });
5332
+ // Windows 10 and above send "Windows NT 10.0"
5333
+ return '10.0';
5258
5334
  }
5259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyLogService, decorators: [{
5260
- type: Injectable,
5261
- args: [{
5262
- providedIn: 'root'
5263
- }]
5264
- }] });
5265
-
5266
- class BizyCopyToClipboardService {
5267
- #clipboard = inject(Clipboard);
5268
- copy(data) {
5269
- return new Promise((resolve, reject) => {
5270
- try {
5271
- if (!data) {
5272
- resolve();
5273
- return;
5274
- }
5275
- setTimeout(() => {
5276
- let toCopy = '';
5277
- if (typeof data === 'string' || data instanceof String) {
5278
- toCopy = data;
5279
- }
5280
- else if (data.items && data.items.length > 0 && data.model) {
5281
- for (const key in data.model) {
5282
- if (key) {
5283
- toCopy += `${data.model[key]},`;
5284
- }
5285
- }
5286
- data.items.forEach(_item => {
5287
- // Remove the last character (',')
5288
- toCopy = toCopy.slice(0, -2);
5289
- toCopy += '\n';
5290
- for (const key in data.model) {
5291
- let value = _item;
5292
- const nestedProperty = key.split('.');
5293
- nestedProperty.forEach(_property => {
5294
- value = value[_property];
5295
- });
5296
- if (typeof value !== undefined && value !== null) {
5297
- toCopy += `${String(value).replace(/\n/g, '')},`;
5298
- }
5299
- else {
5300
- toCopy += ',';
5301
- }
5302
- }
5303
- });
5304
- }
5305
- const pending = this.#clipboard.beginCopy(toCopy);
5306
- let remainingAttempts = 3;
5307
- const attempt = () => {
5308
- const result = pending.copy();
5309
- if (!result && --remainingAttempts) {
5310
- setTimeout(attempt);
5311
- }
5312
- else {
5313
- // Remember to destroy when you're done!
5314
- pending.destroy();
5315
- resolve();
5316
- }
5317
- };
5318
- attempt();
5319
- }, 100);
5335
+ /**
5336
+ * @param {string[]} hints
5337
+ * @return {Promise<string|undefined>} A Promise that resolves on overriding the
5338
+ * navigator.userAgent string.
5339
+ */
5340
+ async function overrideUserAgentUsingClientHints(hints) {
5341
+ return new Promise(resolve => {
5342
+ getUserAgentUsingClientHints(hints).then(newUA => {
5343
+ if (newUA) {
5344
+ // Got a new UA value. Now override `navigator.userAgent`.
5345
+ Object.defineProperty(navigator, 'userAgent', {
5346
+ value: newUA,
5347
+ writable: false,
5348
+ configurable: true
5349
+ });
5320
5350
  }
5321
- catch (error) {
5322
- reject(error);
5351
+ else {
5352
+ newUA = navigator.userAgent;
5323
5353
  }
5354
+ resolve(newUA);
5355
+ });
5356
+ });
5357
+ }
5358
+ const exportedForTests = { getVersion, getWindowsPlatformVersion };
5359
+
5360
+ class BizyUserAgentService {
5361
+ get() {
5362
+ return new Promise(resolve => {
5363
+ overrideUserAgentUsingClientHints([
5364
+ 'architecture',
5365
+ 'bitness',
5366
+ 'model',
5367
+ 'platformVersion',
5368
+ 'uaFullVersion',
5369
+ 'fullVersionList'
5370
+ ])
5371
+ .then(userAgent => {
5372
+ resolve(userAgent);
5373
+ })
5374
+ .catch(() => {
5375
+ resolve(window.navigator.userAgent);
5376
+ });
5324
5377
  });
5325
5378
  }
5326
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCopyToClipboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5327
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCopyToClipboardService, providedIn: 'root' });
5379
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyUserAgentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5380
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyUserAgentService, providedIn: 'root' });
5328
5381
  }
5329
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCopyToClipboardService, decorators: [{
5382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyUserAgentService, decorators: [{
5330
5383
  type: Injectable,
5331
5384
  args: [{
5332
5385
  providedIn: 'root'
5333
5386
  }]
5334
5387
  }] });
5335
5388
 
5336
- class BizyTranslateModule {
5337
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5338
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateModule, imports: [i1$2.TranslateModule] });
5339
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateModule, imports: [TranslateModule.forRoot()] });
5340
- }
5341
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateModule, decorators: [{
5342
- type: NgModule,
5343
- args: [{
5344
- imports: [TranslateModule.forRoot()]
5345
- }]
5346
- }] });
5347
-
5348
- var LANGUAGE;
5349
- (function (LANGUAGE) {
5350
- LANGUAGE["SPANISH"] = "es";
5351
- LANGUAGE["ENGLISH"] = "en";
5352
- })(LANGUAGE || (LANGUAGE = {}));
5353
- class BizyTranslateService {
5354
- translate;
5355
- constructor(translate) {
5356
- this.translate = translate;
5357
- }
5358
- loadTranslations(...args) {
5359
- const locales = [...args];
5360
- locales.forEach(locale => {
5361
- this.translate.setTranslation(locale.lang, locale.translations, true);
5362
- });
5363
- }
5364
- addLangs(langs) {
5365
- this.translate.addLangs(langs);
5366
- }
5367
- getLangs() {
5368
- return this.translate.getLangs();
5369
- }
5370
- setDefault(lang) {
5371
- this.translate.setDefaultLang(lang);
5389
+ class BizyValidatorService {
5390
+ isEmail(email) {
5391
+ const regex = /^(([^ñ<>()[\]\\.,;:\s@"]+(\.[^ñ<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
5392
+ return regex.test(String(email).toLowerCase());
5372
5393
  }
5373
- getCurrentLang() {
5374
- return this.translate.currentLang;
5394
+ isPassFormat(pass) {
5395
+ const formatRegex = /(?!.*012)(?!.*123)(?!.*234)(?!.*345)(?!.*456)(?!.*567)(?!.*678)(?!.*789)(?!.*987)(?!.*876)(?!.*765)(?!.*654)(?!.*543)(?!.*432)(?!.*321)(?!.*210)(?!.*(.)\1{2,})(?!(^\D+$))(?!(^\d+$))(^.{6,}$)/;
5396
+ const excludeRegex = /[^'"]$/;
5397
+ const _pass = String(pass).toLowerCase();
5398
+ return formatRegex.test(_pass) && excludeRegex.test(_pass);
5375
5399
  }
5376
- use(lang) {
5377
- this.translate.use(lang);
5400
+ isNoSpecialCharacter(name) {
5401
+ const regex = /^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;
5402
+ return regex.test(String(name).toLowerCase());
5378
5403
  }
5379
- get(translation) {
5380
- return this.translate.instant(translation);
5404
+ isNumber(number) {
5405
+ const regex = /^[0-9]*$/;
5406
+ return regex.test(String(number).toLowerCase());
5381
5407
  }
5382
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateService, deps: [{ token: TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
5383
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateService, providedIn: 'root' });
5384
- }
5385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslateService, decorators: [{
5386
- type: Injectable,
5387
- args: [{
5388
- providedIn: 'root'
5389
- }]
5390
- }], ctorParameters: () => [{ type: i1$2.TranslateService, decorators: [{
5391
- type: Inject,
5392
- args: [TranslateService]
5393
- }] }] });
5394
-
5395
- var _a;
5396
- var TOAST;
5397
- (function (TOAST) {
5398
- TOAST["DEFAULT"] = "default";
5399
- TOAST["SUCCESS"] = "success";
5400
- TOAST["INFO"] = "info";
5401
- TOAST["WARNING"] = "warning";
5402
- TOAST["DANGER"] = "danger";
5403
- })(TOAST || (TOAST = {}));
5404
- class BizyToastService {
5405
- dialog;
5406
- static toasts = new Set();
5407
- duration = 3000;
5408
- defaultSuccessTitle = 'Operación exitosa';
5409
- defaultDangerTitle = 'Hubo un problema';
5410
- constructor(dialog) {
5411
- this.dialog = dialog;
5408
+ isPhoneNumber(number) {
5409
+ const regex = /^\+{0,1}[0-9#*]+$/;
5410
+ return regex.test(String(number).toLowerCase());
5412
5411
  }
5413
- #open(data) {
5414
- const id = `bizy-toast-${Math.random()}`;
5415
- const toastRef = this.dialog.open(BizyToastWrapperComponent, {
5416
- id,
5417
- data: {
5418
- type: data.type,
5419
- duration: this.duration,
5420
- id,
5421
- title: typeof data.data === 'string' ? data.data : data.data.title,
5422
- msg: typeof data.data === 'string' ? '' : data.data.msg
5423
- },
5424
- autoFocus: false,
5425
- hasBackdrop: false,
5426
- disableClose: false,
5427
- panelClass: ['bizy-toast', 'bizy-toast--in']
5428
- });
5429
- _a.toasts.add(toastRef);
5412
+ isString(string) {
5413
+ return typeof string === 'string' || string instanceof String;
5430
5414
  }
5431
- config(data) {
5432
- if (!data) {
5433
- return;
5434
- }
5435
- if (data.defaultSuccessTitle) {
5436
- this.defaultSuccessTitle = data.defaultSuccessTitle;
5437
- }
5438
- if (data.defaultDangerTitle) {
5439
- this.defaultDangerTitle = data.defaultDangerTitle;
5440
- }
5441
- if (data.duration) {
5442
- this.duration = data.duration;
5415
+ isJSON(text) {
5416
+ if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\/bfnrtu]/g, '@')
5417
+ .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/g, ']')
5418
+ .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
5419
+ return true;
5443
5420
  }
5421
+ return false;
5444
5422
  }
5445
- default(data) {
5446
- this.#open({ type: TOAST.DEFAULT, data });
5447
- }
5448
- info(data) {
5449
- this.#open({ type: TOAST.INFO, data });
5450
- }
5451
- success(data = this.defaultSuccessTitle) {
5452
- this.#open({ type: TOAST.SUCCESS, data });
5423
+ emailValidator() {
5424
+ return (control) => {
5425
+ return !control.value || (control.value && this.isEmail(control.value)) ? null : { bizyEmail: true };
5426
+ };
5453
5427
  }
5454
- warning(data) {
5455
- this.#open({ type: TOAST.WARNING, data });
5428
+ phoneNumberValidator() {
5429
+ return (control) => {
5430
+ return !control.value || (control.value && this.isPhoneNumber(control.value)) ? null : { bizyPhoneNumber: true };
5431
+ };
5456
5432
  }
5457
- danger(data = this.defaultDangerTitle) {
5458
- this.#open({ type: TOAST.DANGER, data });
5433
+ numberValidator() {
5434
+ return (control) => {
5435
+ return !control.value || (control.value && this.isNumber(control.value)) ? null : { bizyNumber: true };
5436
+ };
5459
5437
  }
5460
- close = (id) => {
5461
- if (!id) {
5462
- return;
5463
- }
5464
- let toastRef = null;
5465
- toastRef = Array.from(_a.toasts).find(_toastRef => _toastRef.id === id);
5466
- if (toastRef) {
5467
- toastRef.removePanelClass('bizy-toast--in');
5468
- toastRef.addPanelClass('bizy-toast--out');
5469
- setTimeout(() => {
5470
- toastRef.close();
5471
- _a.toasts.delete(toastRef);
5472
- }, 500);
5473
- }
5474
- };
5475
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService, deps: [{ token: Dialog }], target: i0.ɵɵFactoryTarget.Injectable });
5476
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService, providedIn: 'root' });
5438
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyValidatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5439
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyValidatorService, providedIn: 'root' });
5477
5440
  }
5478
- _a = BizyToastService;
5479
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastService, decorators: [{
5441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyValidatorService, decorators: [{
5480
5442
  type: Injectable,
5481
5443
  args: [{
5482
5444
  providedIn: 'root'
5483
5445
  }]
5484
- }], ctorParameters: () => [{ type: i1$3.Dialog, decorators: [{
5485
- type: Inject,
5486
- args: [Dialog]
5487
- }] }] });
5488
-
5489
- class BizyToastWrapperComponent {
5490
- data;
5491
- toast;
5492
- type = TOAST.INFO;
5493
- title = '';
5494
- msg = '';
5495
- id;
5496
- constructor(data, toast) {
5497
- this.data = data;
5498
- this.toast = toast;
5499
- this.type = this.data.type;
5500
- this.title = this.data.title;
5501
- this.msg = this.data.msg;
5502
- this.id = this.data.id;
5503
- setTimeout(() => {
5504
- this.close();
5505
- }, 3000);
5506
- }
5507
- close() {
5508
- this.toast.close(this.id);
5509
- }
5510
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastWrapperComponent, deps: [{ token: DIALOG_DATA }, { token: BizyToastService }], target: i0.ɵɵFactoryTarget.Component });
5511
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: BizyToastWrapperComponent, isStandalone: true, selector: "bizy-toast-wrapper", providers: [BizyToastService], ngImport: i0, template: "<div class=\"bizy-toast-wrapper bizy-toast-wrapper--{{type}}\">\n\n <button (click)=\"close()\" (keyup.enter)=\"close()\" class=\"bizy-toast-wrapper__close-button\">\n\n <svg \n data-name=\"Cancel button\"\n id=\"bizy-toast-wrapper-close-svg\" \n viewBox=\"0 0 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path id=\"bizy-toast-wrapper-close-svg-content\" d=\"M114,100l49-49a9.9,9.9,0,0,0-14-14L100,86,51,37A9.9,9.9,0,0,0,37,51l49,49L37,149a9.9,9.9,0,0,0,14,14l49-49,49,49a9.9,9.9,0,0,0,14-14Z\"/>\n </svg>\n\n </button>\n\n\n <h3 class=\"bizy-toast-wrapper__title bizy-toast-wrapper__title--{{type}}\" *ngIf=\"title\">{{title}}</h3>\n\n <h5 class=\"bizy-toast-wrapper__msg\" *ngIf=\"msg\">{{msg}}</h5>\n\n\n <span class=\"bizy-toast__progress bizy-toast__progress--{{type}}\"></span>\n \n</div>", styles: [":host{font-size:1rem}.bizy-toast-wrapper{position:relative;width:100%;min-width:20rem;height:fit-content;min-height:3rem;border-left:var(--bizy-toast-border-left);border-top-left-radius:.5rem;border-bottom-left-radius:.5rem;display:flex;flex-direction:column;justify-content:center;row-gap:.5rem;padding:.5rem;box-shadow:0 18px 25px #32325d40,0 3px 6px #0000001a}.bizy-toast-wrapper__title{max-width:min(28rem,60vw)}.bizy-toast-wrapper__msg{max-width:min(30rem,70vw)}.bizy-toast-wrapper--default{background-color:var(--bizy-toast-default-background-color, );border-left-color:var(--bizy-toast-default-color)}.bizy-toast-wrapper__title--default{color:var(--bizy-toast-default-color)}.bizy-toast-wrapper--info{background-color:var(--bizy-toast-info-background-color, );border-left-color:var(--bizy-toast-info-color)}.bizy-toast-wrapper__title--info{color:var(--bizy-toast-info-color)}.bizy-toast-wrapper--success{background-color:var(--bizy-toast-success-background-color);border-left-color:var(--bizy-toast-success-color)}.bizy-toast-wrapper__title--success{color:var(--bizy-toast-success-color)}.bizy-toast-wrapper--warning{background-color:var(--bizy-toast-warning-background-color);border-left-color:var(--bizy-toast-warning-color)}.bizy-toast-wrapper__title--warning{color:var(--bizy-toast-warning-color)}.bizy-toast-wrapper--danger{background-color:var(--bizy-toast-danger-background-color);border-left-color:var(--bizy-toast-danger-color)}.bizy-toast-wrapper__title--danger{color:var(--bizy-toast-danger-color)}.bizy-toast-wrapper__close-button{position:absolute;right:.5rem;top:.5rem;border:none;cursor:pointer;background-color:transparent;transition:color .2s;z-index:1}.bizy-toast-wrapper__close-button #bizy-toast-wrapper-close-svg{height:1rem}.bizy-toast-wrapper__close-button #bizy-toast-wrapper-close-svg-content{fill:var(--bizy-toast-close-button-color)}.bizy-toast-wrapper__close-button:hover #bizy-toast-wrapper-close-svg-content{fill:var(--bizy-toast-close-button-hover-color)}.bizy-toast__progress{width:100%;height:.1rem;display:inline-block;position:absolute;bottom:0;left:0;right:0;overflow:hidden}.bizy-toast__progress--default{background-color:var(--bizy-toast-default-color)}.bizy-toast__progress--info{background-color:var(--bizy-toast-info-color)}.bizy-toast__progress--success{background-color:var(--bizy-toast-success-color)}.bizy-toast__progress--warning{background-color:var(--bizy-toast-warning-color)}.bizy-toast__progress--danger{background-color:var(--bizy-toast-danger-color)}.bizy-toast__progress:after{content:\"\";box-sizing:border-box;width:0;height:.1rem;background-color:#fff;position:absolute;top:0;left:0;animation:progress 2.5s linear infinite}@keyframes progress{0%{width:0}to{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DialogModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5512
- }
5513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyToastWrapperComponent, decorators: [{
5514
- type: Component,
5515
- args: [{ selector: 'bizy-toast-wrapper', imports: [CommonModule, DialogModule], providers: [BizyToastService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bizy-toast-wrapper bizy-toast-wrapper--{{type}}\">\n\n <button (click)=\"close()\" (keyup.enter)=\"close()\" class=\"bizy-toast-wrapper__close-button\">\n\n <svg \n data-name=\"Cancel button\"\n id=\"bizy-toast-wrapper-close-svg\" \n viewBox=\"0 0 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path id=\"bizy-toast-wrapper-close-svg-content\" d=\"M114,100l49-49a9.9,9.9,0,0,0-14-14L100,86,51,37A9.9,9.9,0,0,0,37,51l49,49L37,149a9.9,9.9,0,0,0,14,14l49-49,49,49a9.9,9.9,0,0,0,14-14Z\"/>\n </svg>\n\n </button>\n\n\n <h3 class=\"bizy-toast-wrapper__title bizy-toast-wrapper__title--{{type}}\" *ngIf=\"title\">{{title}}</h3>\n\n <h5 class=\"bizy-toast-wrapper__msg\" *ngIf=\"msg\">{{msg}}</h5>\n\n\n <span class=\"bizy-toast__progress bizy-toast__progress--{{type}}\"></span>\n \n</div>", styles: [":host{font-size:1rem}.bizy-toast-wrapper{position:relative;width:100%;min-width:20rem;height:fit-content;min-height:3rem;border-left:var(--bizy-toast-border-left);border-top-left-radius:.5rem;border-bottom-left-radius:.5rem;display:flex;flex-direction:column;justify-content:center;row-gap:.5rem;padding:.5rem;box-shadow:0 18px 25px #32325d40,0 3px 6px #0000001a}.bizy-toast-wrapper__title{max-width:min(28rem,60vw)}.bizy-toast-wrapper__msg{max-width:min(30rem,70vw)}.bizy-toast-wrapper--default{background-color:var(--bizy-toast-default-background-color, );border-left-color:var(--bizy-toast-default-color)}.bizy-toast-wrapper__title--default{color:var(--bizy-toast-default-color)}.bizy-toast-wrapper--info{background-color:var(--bizy-toast-info-background-color, );border-left-color:var(--bizy-toast-info-color)}.bizy-toast-wrapper__title--info{color:var(--bizy-toast-info-color)}.bizy-toast-wrapper--success{background-color:var(--bizy-toast-success-background-color);border-left-color:var(--bizy-toast-success-color)}.bizy-toast-wrapper__title--success{color:var(--bizy-toast-success-color)}.bizy-toast-wrapper--warning{background-color:var(--bizy-toast-warning-background-color);border-left-color:var(--bizy-toast-warning-color)}.bizy-toast-wrapper__title--warning{color:var(--bizy-toast-warning-color)}.bizy-toast-wrapper--danger{background-color:var(--bizy-toast-danger-background-color);border-left-color:var(--bizy-toast-danger-color)}.bizy-toast-wrapper__title--danger{color:var(--bizy-toast-danger-color)}.bizy-toast-wrapper__close-button{position:absolute;right:.5rem;top:.5rem;border:none;cursor:pointer;background-color:transparent;transition:color .2s;z-index:1}.bizy-toast-wrapper__close-button #bizy-toast-wrapper-close-svg{height:1rem}.bizy-toast-wrapper__close-button #bizy-toast-wrapper-close-svg-content{fill:var(--bizy-toast-close-button-color)}.bizy-toast-wrapper__close-button:hover #bizy-toast-wrapper-close-svg-content{fill:var(--bizy-toast-close-button-hover-color)}.bizy-toast__progress{width:100%;height:.1rem;display:inline-block;position:absolute;bottom:0;left:0;right:0;overflow:hidden}.bizy-toast__progress--default{background-color:var(--bizy-toast-default-color)}.bizy-toast__progress--info{background-color:var(--bizy-toast-info-color)}.bizy-toast__progress--success{background-color:var(--bizy-toast-success-color)}.bizy-toast__progress--warning{background-color:var(--bizy-toast-warning-color)}.bizy-toast__progress--danger{background-color:var(--bizy-toast-danger-color)}.bizy-toast__progress:after{content:\"\";box-sizing:border-box;width:0;height:.1rem;background-color:#fff;position:absolute;top:0;left:0;animation:progress 2.5s linear infinite}@keyframes progress{0%{width:0}to{width:100%}}\n"] }]
5516
- }], ctorParameters: () => [{ type: undefined, decorators: [{
5517
- type: Inject,
5518
- args: [DIALOG_DATA]
5519
- }] }, { type: BizyToastService, decorators: [{
5520
- type: Inject,
5521
- args: [BizyToastService]
5522
- }] }] });
5446
+ }] });
5523
5447
 
5524
- class BizyPopupWrapperComponent {
5525
- dynamicComponentContainer;
5526
- #component = inject(DIALOG_DATA);
5527
- #dialogRef = inject(DialogRef);
5528
- #ref = inject(ChangeDetectorRef);
5529
- ngAfterViewInit() {
5530
- this.loadDynamicComponent();
5448
+ class BizyStorageService {
5449
+ get(key) {
5450
+ const item = localStorage.getItem(key);
5451
+ try {
5452
+ return JSON.parse(item);
5453
+ }
5454
+ catch (e) {
5455
+ return item;
5456
+ }
5531
5457
  }
5532
- loadDynamicComponent() {
5533
- if (this.#component) {
5534
- this.dynamicComponentContainer.clear();
5535
- this.dynamicComponentContainer.createComponent(this.#component);
5536
- this.#ref.detectChanges();
5458
+ set(key, value) {
5459
+ if (typeof value === 'object') {
5460
+ localStorage.setItem(key, JSON.stringify(value));
5461
+ }
5462
+ else if (typeof value === 'string') {
5463
+ localStorage.setItem(key, value);
5464
+ }
5465
+ else {
5466
+ localStorage.setItem(key, String(value));
5537
5467
  }
5538
5468
  }
5539
- close() {
5540
- this.#dialogRef.close();
5469
+ remove(key) {
5470
+ localStorage.removeItem(key);
5541
5471
  }
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 });
5472
+ clear() {
5473
+ localStorage.clear();
5474
+ }
5475
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5476
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyStorageService, providedIn: 'root' });
5544
5477
  }
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
- }] } });
5478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyStorageService, decorators: [{
5479
+ type: Injectable,
5480
+ args: [{
5481
+ providedIn: 'root'
5482
+ }]
5483
+ }] });
5552
5484
 
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
- });
5485
+ var COLOR;
5486
+ (function (COLOR) {
5487
+ COLOR["DEFAULT"] = "#666666";
5488
+ COLOR["INFO"] = "#2484C6";
5489
+ COLOR["SUCCESS"] = "#65BF6C";
5490
+ COLOR["WARNING"] = "#F7A64C";
5491
+ COLOR["ERROR"] = "#EF4C59";
5492
+ })(COLOR || (COLOR = {}));
5493
+ class BizyLogService {
5494
+ #lastLogTimestamp = 0;
5495
+ #log(log, color, param) {
5496
+ const difference = this.#lastLogTimestamp ? Date.now() - this.#lastLogTimestamp : 0;
5497
+ this.#lastLogTimestamp = Date.now();
5498
+ const timestampStyles = 'color: #EE5DFF';
5499
+ const logStyles = `color: ${color}; font-size: 12px;`;
5500
+ const date = new Date();
5501
+ if (param) {
5502
+ console.log(`%c${date.toLocaleString()}: %c${log} %c(+${difference}ms)`, timestampStyles, logStyles, timestampStyles, param);
5503
+ }
5504
+ else {
5505
+ console.log(`%c${date.toLocaleString()}: %c${log} %c(+${difference}ms)`, timestampStyles, logStyles, timestampStyles);
5506
+ }
5575
5507
  }
5576
- getData() {
5577
- return BizyPopupService.data;
5508
+ debug(data, param) {
5509
+ if (typeof data === 'string') {
5510
+ this.#log(data, COLOR.DEFAULT, param);
5511
+ }
5512
+ else {
5513
+ this.#template({ ...data, param: data.param, title: 'Debug', color: COLOR.DEFAULT });
5514
+ }
5578
5515
  }
5579
- close(data) {
5580
- let dialogRef = null;
5581
- if (data && data.id) {
5582
- dialogRef = Array.from(BizyPopupService.dialogs).find(_dialogRef => _dialogRef.id === data.id);
5516
+ info(data, param) {
5517
+ if (typeof data === 'string') {
5518
+ this.#log(data, COLOR.INFO, param);
5583
5519
  }
5584
5520
  else {
5585
- dialogRef = Array.from(BizyPopupService.dialogs).pop();
5521
+ this.#template({ ...data, param: data.param, title: 'Info', color: COLOR.INFO });
5586
5522
  }
5587
- if (dialogRef) {
5588
- dialogRef.close(data ? data.response : null);
5589
- BizyPopupService.dialogs.delete(dialogRef);
5523
+ }
5524
+ success(data, param) {
5525
+ if (typeof data === 'string') {
5526
+ this.#log(data, COLOR.SUCCESS, param);
5527
+ }
5528
+ else {
5529
+ this.#template({ ...data, param: data.param, title: 'Success', color: COLOR.SUCCESS });
5590
5530
  }
5591
- BizyPopupService.data = null;
5592
5531
  }
5593
- closeAll() {
5594
- Array.from(BizyPopupService.dialogs).forEach(_dialogRef => {
5595
- _dialogRef.close();
5596
- });
5597
- BizyPopupService.dialogs.clear();
5598
- BizyPopupService.data = null;
5532
+ warning(data, param) {
5533
+ if (typeof data === 'string') {
5534
+ this.#log(data, COLOR.WARNING, param);
5535
+ }
5536
+ else {
5537
+ this.#template({ ...data, param: data.param, title: 'Warning', color: COLOR.WARNING });
5538
+ }
5599
5539
  }
5600
- openedPopups() {
5601
- return BizyPopupService.dialogs.size;
5540
+ error(data, param) {
5541
+ if (typeof data === 'string') {
5542
+ this.#log(data, COLOR.ERROR, param);
5543
+ }
5544
+ else {
5545
+ this.#template({ ...data, param: data.param, title: 'Error', color: COLOR.ERROR });
5546
+ }
5602
5547
  }
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 });
5548
+ /** DEPRECATED */
5549
+ templateDebug(data) {
5550
+ this.#template({ ...data, title: 'Debug', color: COLOR.DEFAULT });
5551
+ }
5552
+ /** DEPRECATED */
5553
+ templateSucc(data) {
5554
+ this.#template({ ...data, title: 'Success', color: COLOR.SUCCESS });
5555
+ }
5556
+ /** DEPRECATED */
5557
+ templateInfo(data) {
5558
+ this.#template({ ...data, title: 'Info', color: COLOR.INFO });
5559
+ }
5560
+ /** DEPRECATED */
5561
+ templateWarn(data) {
5562
+ this.#template({ ...data, title: 'Warning', color: COLOR.WARNING });
5563
+ }
5564
+ /** DEPRECATED */
5565
+ templateError(data) {
5566
+ this.#template({ ...data, title: 'Error', color: COLOR.ERROR });
5567
+ }
5568
+ #template(data) {
5569
+ const log = `(${data.title}) ${data.fileName} - ${data.functionName}`;
5570
+ this.#log(log, data.color, data.param);
5571
+ }
5572
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5573
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyLogService, providedIn: 'root' });
5605
5574
  }
5606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupService, decorators: [{
5607
- type: Injectable
5575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyLogService, decorators: [{
5576
+ type: Injectable,
5577
+ args: [{
5578
+ providedIn: 'root'
5579
+ }]
5608
5580
  }] });
5609
5581
 
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] });
5582
+ class BizyCopyToClipboardService {
5583
+ #clipboard = inject(Clipboard);
5584
+ copy(data) {
5585
+ return new Promise((resolve, reject) => {
5586
+ try {
5587
+ if (!data) {
5588
+ resolve();
5589
+ return;
5590
+ }
5591
+ setTimeout(() => {
5592
+ let toCopy = '';
5593
+ if (typeof data === 'string' || data instanceof String) {
5594
+ toCopy = data;
5595
+ }
5596
+ else if (data.items && data.items.length > 0 && data.model) {
5597
+ for (const key in data.model) {
5598
+ if (key) {
5599
+ toCopy += `${data.model[key]},`;
5600
+ }
5601
+ }
5602
+ data.items.forEach(_item => {
5603
+ // Remove the last character (',')
5604
+ toCopy = toCopy.slice(0, -2);
5605
+ toCopy += '\n';
5606
+ for (const key in data.model) {
5607
+ let value = _item;
5608
+ const nestedProperty = key.split('.');
5609
+ nestedProperty.forEach(_property => {
5610
+ value = value[_property];
5611
+ });
5612
+ if (typeof value !== undefined && value !== null) {
5613
+ toCopy += `${String(value).replace(/\n/g, '')},`;
5614
+ }
5615
+ else {
5616
+ toCopy += ',';
5617
+ }
5618
+ }
5619
+ });
5620
+ }
5621
+ const pending = this.#clipboard.beginCopy(toCopy);
5622
+ let remainingAttempts = 3;
5623
+ const attempt = () => {
5624
+ const result = pending.copy();
5625
+ if (!result && --remainingAttempts) {
5626
+ setTimeout(attempt);
5627
+ }
5628
+ else {
5629
+ // Remember to destroy when you're done!
5630
+ pending.destroy();
5631
+ resolve();
5632
+ }
5633
+ };
5634
+ attempt();
5635
+ }, 100);
5636
+ }
5637
+ catch (error) {
5638
+ reject(error);
5639
+ }
5640
+ });
5641
+ }
5642
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCopyToClipboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5643
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCopyToClipboardService, providedIn: 'root' });
5614
5644
  }
5615
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPopupModule, decorators: [{
5616
- type: NgModule,
5645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyCopyToClipboardService, decorators: [{
5646
+ type: Injectable,
5617
5647
  args: [{
5618
- imports: [BizyPopupWrapperComponent],
5619
- exports: [BizyPopupWrapperComponent],
5620
- providers: [BizyPopupService]
5648
+ providedIn: 'root'
5621
5649
  }]
5622
5650
  }] });
5623
5651
 
@@ -5844,7 +5872,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
5844
5872
  args: [{
5845
5873
  name: 'bizySafe'
5846
5874
  }]
5847
- }], ctorParameters: () => [{ type: i1$5.DomSanitizer, decorators: [{
5875
+ }], ctorParameters: () => [{ type: i1$4.DomSanitizer, decorators: [{
5848
5876
  type: Inject,
5849
5877
  args: [DomSanitizer]
5850
5878
  }] }] });
@@ -6085,26 +6113,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
6085
6113
  args: [BizyFormatSecondsService]
6086
6114
  }] }] });
6087
6115
 
6088
- class BizyTranslatePipe {
6089
- translate;
6090
- constructor(translate) {
6091
- this.translate = translate;
6092
- }
6093
- transform(label) {
6094
- return this.translate.get(label);
6095
- }
6096
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslatePipe, deps: [{ token: BizyTranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
6097
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslatePipe, isStandalone: true, name: "translate" });
6116
+ const PIPES = [
6117
+ BizyRepeatPipe,
6118
+ BizySetToArrayPipe,
6119
+ BizyEnumToArrayPipe,
6120
+ BizySelectedPipe,
6121
+ BizyOrderByPipe,
6122
+ BizyReducePipe,
6123
+ BizySafePipe,
6124
+ BizyAveragePipe,
6125
+ BizySearchPipe,
6126
+ BizyFormatSecondsPipe,
6127
+ ];
6128
+ class BizyPipesModule {
6129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6130
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BizyPipesModule, imports: [BizyRepeatPipe,
6131
+ BizySetToArrayPipe,
6132
+ BizyEnumToArrayPipe,
6133
+ BizySelectedPipe,
6134
+ BizyOrderByPipe,
6135
+ BizyReducePipe,
6136
+ BizySafePipe,
6137
+ BizyAveragePipe,
6138
+ BizySearchPipe,
6139
+ BizyFormatSecondsPipe], exports: [BizyRepeatPipe,
6140
+ BizySetToArrayPipe,
6141
+ BizyEnumToArrayPipe,
6142
+ BizySelectedPipe,
6143
+ BizyOrderByPipe,
6144
+ BizyReducePipe,
6145
+ BizySafePipe,
6146
+ BizyAveragePipe,
6147
+ BizySearchPipe,
6148
+ BizyFormatSecondsPipe] });
6149
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPipesModule, providers: PIPES });
6098
6150
  }
6099
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyTranslatePipe, decorators: [{
6100
- type: Pipe,
6151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyPipesModule, decorators: [{
6152
+ type: NgModule,
6101
6153
  args: [{
6102
- name: 'translate',
6154
+ imports: PIPES,
6155
+ exports: PIPES,
6156
+ providers: PIPES
6103
6157
  }]
6104
- }], ctorParameters: () => [{ type: BizyTranslateService, decorators: [{
6105
- type: Inject,
6106
- args: [BizyTranslateService]
6107
- }] }] });
6158
+ }] });
6108
6159
 
6109
6160
  class BizyCopyToClipboardDirective {
6110
6161
  elementRef;
@@ -6729,9 +6780,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
6729
6780
  type: Host
6730
6781
  }] }] });
6731
6782
 
6783
+ const DIRECTIVES = [
6784
+ BizyCopyToClipboardDirective,
6785
+ BizyCurrencyFormatDirective,
6786
+ BizyLoadingDirective,
6787
+ BizyLongPressDirective,
6788
+ BizyOnlyNumbersDirective,
6789
+ BizyOnlyPhoneDigitsDirective,
6790
+ BizyTextEllipsisDirective,
6791
+ BizyTooltipDirective,
6792
+ BizyTrackByIdDirective
6793
+ ];
6794
+ class BizyDirectivesModule {
6795
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6796
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BizyDirectivesModule, imports: [BizyCopyToClipboardDirective,
6797
+ BizyCurrencyFormatDirective,
6798
+ BizyLoadingDirective,
6799
+ BizyLongPressDirective,
6800
+ BizyOnlyNumbersDirective,
6801
+ BizyOnlyPhoneDigitsDirective,
6802
+ BizyTextEllipsisDirective,
6803
+ BizyTooltipDirective,
6804
+ BizyTrackByIdDirective], exports: [BizyCopyToClipboardDirective,
6805
+ BizyCurrencyFormatDirective,
6806
+ BizyLoadingDirective,
6807
+ BizyLongPressDirective,
6808
+ BizyOnlyNumbersDirective,
6809
+ BizyOnlyPhoneDigitsDirective,
6810
+ BizyTextEllipsisDirective,
6811
+ BizyTooltipDirective,
6812
+ BizyTrackByIdDirective] });
6813
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyDirectivesModule });
6814
+ }
6815
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyDirectivesModule, decorators: [{
6816
+ type: NgModule,
6817
+ args: [{
6818
+ imports: DIRECTIVES,
6819
+ exports: DIRECTIVES
6820
+ }]
6821
+ }] });
6822
+
6732
6823
  /**
6733
6824
  * Generated bundle index. Do not edit.
6734
6825
  */
6735
6826
 
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 };
6827
+ 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, BizyDirectivesModule, 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, BizyPipesModule, 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, BizyToastModule, BizyToastService, BizyToastWrapperComponent, BizyToggleComponent, BizyToolbarComponent, BizyTooltipDirective, BizyTrackByIdDirective, BizyTranslateModule, BizyTranslatePipe, BizyTranslateService, BizyUserAgentService, BizyValidatorService, BizyViewportService, LANGUAGE, LOADING_TYPE };
6737
6828
  //# sourceMappingURL=bizy-core.mjs.map