tickera-angular-components 0.0.1-dev.22 → 0.0.1-dev.23

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, makeEnvironmentProviders, PLATFORM_ID, Inject, Injectable, signal, LOCALE_ID, computed, inject, EventEmitter, Input, Output, Component, ViewEncapsulation, Self, Optional, Injector, HostListener, forwardRef, effect, ViewChild } from '@angular/core';
2
+ import { InjectionToken, makeEnvironmentProviders, PLATFORM_ID, Inject, Injectable, signal, LOCALE_ID, computed, inject, EventEmitter, Input, Output, Component, ViewEncapsulation, HostListener, Self, Optional, Injector, forwardRef, effect, ViewChild } from '@angular/core';
3
3
  import * as i2$1 from '@jsverse/transloco';
4
4
  import { provideTransloco, TranslocoModule } from '@jsverse/transloco';
5
5
  import { from, throwError, BehaviorSubject, Subject, of } from 'rxjs';
@@ -1542,6 +1542,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
1542
1542
  args: [{ providedIn: 'root' }]
1543
1543
  }], ctorParameters: () => [{ type: ApiService }] });
1544
1544
 
1545
+ class BaseModalService {
1546
+ isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
1547
+ get modalIsOpen() {
1548
+ return this.isOpen;
1549
+ }
1550
+ open() {
1551
+ this.isOpen.set(true);
1552
+ }
1553
+ close() {
1554
+ this.isOpen.set(false);
1555
+ }
1556
+ }
1557
+
1545
1558
  const authInterceptor = (req, next) => {
1546
1559
  const platformId = inject(PLATFORM_ID);
1547
1560
  const config = inject(TICKERA_COMPONENTS_CONFIG);
@@ -1692,12 +1705,17 @@ class AppModalComponent {
1692
1705
  return;
1693
1706
  this.closeModal.emit();
1694
1707
  }
1708
+ onKeydownEscape() {
1709
+ if (this.isOpen()) {
1710
+ this.onCloseModal();
1711
+ }
1712
+ }
1695
1713
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1696
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppModalComponent, isStandalone: true, selector: "app-modal", inputs: { title: "title", disableClose: "disableClose", isOpen: "isOpen", size: "size" }, outputs: { closeModal: "closeModal" }, ngImport: i0, template: "@if (isOpen()) {\n <div class=\"modal-overlay\">\n <div class=\"modal-backdrop\" (click)=\"onCloseModal()\"></div>\n\n <div class=\"modal-dialog\" [class]=\"'modal-dialog--' + size\">\n @if (!disableClose || !!title) {\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ title }}</h3>\n\n @if (!disableClose) {\n <button class=\"modal-close-button\" (click)=\"onCloseModal()\">&times;</button>\n }\n </div>\n }\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [".modal-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:50}.modal-backdrop{position:absolute;inset:0;background-color:#000;opacity:.5}.modal-dialog{position:relative;z-index:10;width:100%;background-color:#fff;border-radius:.5rem;max-height:100vh;overflow-y:auto;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a}.modal-dialog--xs{max-width:20rem}.modal-dialog--sm{max-width:24rem}.modal-dialog--md{max-width:28rem}.modal-dialog--lg{max-width:32rem}.modal-dialog--xl{max-width:36rem}.modal-dialog--2xl{max-width:42rem}.modal-dialog--3xl{max-width:48rem}.modal-dialog--4xl{max-width:56rem}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;border-bottom:1px solid #e5e7eb}.modal-title{font-size:1.125rem;font-weight:600;color:#1f2937;margin:0}.modal-close-button{background:none;border:none;font-size:1.5rem;cursor:pointer;color:#4b5563;padding:0;width:1.875rem;height:1.875rem;display:flex;align-items:center;justify-content:center}.modal-close-button:hover{color:#1f2937}.modal-body{padding:1.25rem}.modal-body p:first-of-type{margin-top:0}.modal-body p:last-of-type{margin-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
1714
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppModalComponent, isStandalone: true, selector: "app-modal", inputs: { title: "title", disableClose: "disableClose", isOpen: "isOpen", size: "size" }, outputs: { closeModal: "closeModal" }, host: { listeners: { "document:keydown.escape": "onKeydownEscape()" } }, ngImport: i0, template: "@if (isOpen()) {\n <div class=\"modal-overlay\">\n <div class=\"modal-backdrop\" (click)=\"onCloseModal()\"></div>\n\n <div class=\"modal-dialog\" [class]=\"'modal-dialog--' + size\">\n @if (!disableClose || !!title) {\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ title }}</h3>\n\n @if (!disableClose) {\n <button class=\"modal-close-button\" (click)=\"onCloseModal()\">&times;</button>\n }\n </div>\n }\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [".modal-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:50}.modal-backdrop{position:absolute;inset:0;background-color:#000;opacity:.5;filter:blur(4px)}.modal-dialog{position:relative;z-index:10;width:100%;background-color:#fff;border-radius:.5rem;max-height:100vh;overflow-y:auto;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a}.modal-dialog--xs{max-width:20rem}.modal-dialog--sm{max-width:24rem}.modal-dialog--md{max-width:28rem}.modal-dialog--lg{max-width:32rem}.modal-dialog--xl{max-width:36rem}.modal-dialog--2xl{max-width:42rem}.modal-dialog--3xl{max-width:48rem}.modal-dialog--4xl{max-width:56rem}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;border-bottom:1px solid #e5e7eb}.modal-title{font-size:1.125rem;font-weight:600;color:#1f2937;margin:0}.modal-close-button{background:none;border:none;font-size:1.5rem;cursor:pointer;color:#4b5563;padding:0;width:1.875rem;height:1.875rem;display:flex;align-items:center;justify-content:center}.modal-close-button:hover{color:#1f2937}.modal-body{padding:1.25rem}.modal-body p:first-of-type{margin-top:0}.modal-body p:last-of-type{margin-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
1697
1715
  }
1698
1716
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppModalComponent, decorators: [{
1699
1717
  type: Component,
1700
- args: [{ selector: 'app-modal', standalone: true, imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "@if (isOpen()) {\n <div class=\"modal-overlay\">\n <div class=\"modal-backdrop\" (click)=\"onCloseModal()\"></div>\n\n <div class=\"modal-dialog\" [class]=\"'modal-dialog--' + size\">\n @if (!disableClose || !!title) {\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ title }}</h3>\n\n @if (!disableClose) {\n <button class=\"modal-close-button\" (click)=\"onCloseModal()\">&times;</button>\n }\n </div>\n }\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [".modal-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:50}.modal-backdrop{position:absolute;inset:0;background-color:#000;opacity:.5}.modal-dialog{position:relative;z-index:10;width:100%;background-color:#fff;border-radius:.5rem;max-height:100vh;overflow-y:auto;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a}.modal-dialog--xs{max-width:20rem}.modal-dialog--sm{max-width:24rem}.modal-dialog--md{max-width:28rem}.modal-dialog--lg{max-width:32rem}.modal-dialog--xl{max-width:36rem}.modal-dialog--2xl{max-width:42rem}.modal-dialog--3xl{max-width:48rem}.modal-dialog--4xl{max-width:56rem}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;border-bottom:1px solid #e5e7eb}.modal-title{font-size:1.125rem;font-weight:600;color:#1f2937;margin:0}.modal-close-button{background:none;border:none;font-size:1.5rem;cursor:pointer;color:#4b5563;padding:0;width:1.875rem;height:1.875rem;display:flex;align-items:center;justify-content:center}.modal-close-button:hover{color:#1f2937}.modal-body{padding:1.25rem}.modal-body p:first-of-type{margin-top:0}.modal-body p:last-of-type{margin-bottom:0}\n"] }]
1718
+ args: [{ selector: 'app-modal', standalone: true, imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "@if (isOpen()) {\n <div class=\"modal-overlay\">\n <div class=\"modal-backdrop\" (click)=\"onCloseModal()\"></div>\n\n <div class=\"modal-dialog\" [class]=\"'modal-dialog--' + size\">\n @if (!disableClose || !!title) {\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ title }}</h3>\n\n @if (!disableClose) {\n <button class=\"modal-close-button\" (click)=\"onCloseModal()\">&times;</button>\n }\n </div>\n }\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [".modal-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:50}.modal-backdrop{position:absolute;inset:0;background-color:#000;opacity:.5;filter:blur(4px)}.modal-dialog{position:relative;z-index:10;width:100%;background-color:#fff;border-radius:.5rem;max-height:100vh;overflow-y:auto;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a}.modal-dialog--xs{max-width:20rem}.modal-dialog--sm{max-width:24rem}.modal-dialog--md{max-width:28rem}.modal-dialog--lg{max-width:32rem}.modal-dialog--xl{max-width:36rem}.modal-dialog--2xl{max-width:42rem}.modal-dialog--3xl{max-width:48rem}.modal-dialog--4xl{max-width:56rem}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;border-bottom:1px solid #e5e7eb}.modal-title{font-size:1.125rem;font-weight:600;color:#1f2937;margin:0}.modal-close-button{background:none;border:none;font-size:1.5rem;cursor:pointer;color:#4b5563;padding:0;width:1.875rem;height:1.875rem;display:flex;align-items:center;justify-content:center}.modal-close-button:hover{color:#1f2937}.modal-body{padding:1.25rem}.modal-body p:first-of-type{margin-top:0}.modal-body p:last-of-type{margin-bottom:0}\n"] }]
1701
1719
  }], propDecorators: { title: [{
1702
1720
  type: Input
1703
1721
  }], disableClose: [{
@@ -1708,6 +1726,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
1708
1726
  type: Input
1709
1727
  }], closeModal: [{
1710
1728
  type: Output
1729
+ }], onKeydownEscape: [{
1730
+ type: HostListener,
1731
+ args: ['document:keydown.escape']
1711
1732
  }] } });
1712
1733
 
1713
1734
  class LoadingmModalComponent {
@@ -5121,5 +5142,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
5121
5142
  * Generated bundle index. Do not edit.
5122
5143
  */
5123
5144
 
5124
- export { ADMIN_API_ROUTES, ALERT_ICONS, AdminSelectComponent, AdminService, ApiService, AppAlertComponent, AppButtonComponent, AppLinkButtonComponent, AppModalComponent, AsyncSelectComponent, AuditInformationComponent, BASE_BUTTON_CLASSES, BASE_INPUT_CLASSES, BUTTON_SIZES_CLASSES, BUTTON_VARIANT_CLASSES, CITY_API_ENDPOINTS, COUNTRY_API_ENDPOINTS, CUSTOMERS_API_ROUTES, ChangePasswordFormComponent, ChangePasswordFormService, CitiesService, CitySelectComponent, ColorPickerComponent, CorporateBondStatus, CountrySelectComponent, CountryService, CouponApplicability, CouponDiscountType, CouponStatus, CustomerSelectComponent, CustomerService, DateInputComponent, DateService, DaySelectorGridComponent, DeleteConfirmationComponent, DeleteConfirmationService, DynamicTableComponent, ERROR_INPUT_CLASSES, EndDateGreaterThanStartValidator, FORM_ERROR_MESSAGES, FileType, FileUploadComponent, FileUploadPreviewComponent, FormEditorComponent, FormInputComponent, FormSelectComponent, FormTextareaComponent, GiftBondStatus, LanguageSwitcherComponent, LoadingModalService, LoadingmModalComponent, MinTodayValidator, MustMatchValidator, OrderItemType, OrderStatus, PERFORMANCES_API_ROUTES, PRICE_ZONES_API_ROUTES, PRODUCTS_API_ROUTES, PRODUCT_CATEGORIES_API_ROUTES, PRODUCT_TAGS_API_ROUTES, PRODUCT_TYPES_API_ROUTES, PerformanceCardComponent, PerformanceCardListComponent, PerformanceMultiSelectComponent, PerformanceSelectComponent, PerformanceService, PerformanceStatus, PerformanceStepperComponent, PerformanceTicketStatus, PerformancesListEventsService, PriceZoneEventService, PriceZoneFormModalService, PriceZoneSelectComponent, PriceZoneService, ProductCategoryService, ProductMultiSelectComponent, ProductSelectComponent, ProductService, ProductTagService, ProductTypeService, RoomMapElementOrientation, RoomMapElementType, SHOWS_API_ROUTES, STATE_API_ENDPOINTS, ShowMultiSelectComponent, ShowSelectComponent, ShowService, ShowsFilterComponent, StateSelectComponent, StatesService, TICKERA_COMPONENTS_CONFIG, TickeraTranslocoLoader, ToastService, ToggleSwitchComponent, VENUES_API_ROUTES, ZonePriceItemComponent, ZonePriceListComponent, authInterceptor, formatCitiesResponseToSelect, getBrowserLanguage, getCustomerFullname, getStoredLanguage, parseJsonToFormDataAdvanced, provideTickeraComponents, resolveLanguage, setStoredLanguage, transformImageToFile };
5145
+ export { ADMIN_API_ROUTES, ALERT_ICONS, AdminSelectComponent, AdminService, ApiService, AppAlertComponent, AppButtonComponent, AppLinkButtonComponent, AppModalComponent, AsyncSelectComponent, AuditInformationComponent, BASE_BUTTON_CLASSES, BASE_INPUT_CLASSES, BUTTON_SIZES_CLASSES, BUTTON_VARIANT_CLASSES, BaseModalService, CITY_API_ENDPOINTS, COUNTRY_API_ENDPOINTS, CUSTOMERS_API_ROUTES, ChangePasswordFormComponent, ChangePasswordFormService, CitiesService, CitySelectComponent, ColorPickerComponent, CorporateBondStatus, CountrySelectComponent, CountryService, CouponApplicability, CouponDiscountType, CouponStatus, CustomerSelectComponent, CustomerService, DateInputComponent, DateService, DaySelectorGridComponent, DeleteConfirmationComponent, DeleteConfirmationService, DynamicTableComponent, ERROR_INPUT_CLASSES, EndDateGreaterThanStartValidator, FORM_ERROR_MESSAGES, FileType, FileUploadComponent, FileUploadPreviewComponent, FormEditorComponent, FormInputComponent, FormSelectComponent, FormTextareaComponent, GiftBondStatus, LanguageSwitcherComponent, LoadingModalService, LoadingmModalComponent, MinTodayValidator, MustMatchValidator, OrderItemType, OrderStatus, PERFORMANCES_API_ROUTES, PRICE_ZONES_API_ROUTES, PRODUCTS_API_ROUTES, PRODUCT_CATEGORIES_API_ROUTES, PRODUCT_TAGS_API_ROUTES, PRODUCT_TYPES_API_ROUTES, PerformanceCardComponent, PerformanceCardListComponent, PerformanceMultiSelectComponent, PerformanceSelectComponent, PerformanceService, PerformanceStatus, PerformanceStepperComponent, PerformanceTicketStatus, PerformancesListEventsService, PriceZoneEventService, PriceZoneFormModalService, PriceZoneSelectComponent, PriceZoneService, ProductCategoryService, ProductMultiSelectComponent, ProductSelectComponent, ProductService, ProductTagService, ProductTypeService, RoomMapElementOrientation, RoomMapElementType, SHOWS_API_ROUTES, STATE_API_ENDPOINTS, ShowMultiSelectComponent, ShowSelectComponent, ShowService, ShowsFilterComponent, StateSelectComponent, StatesService, TICKERA_COMPONENTS_CONFIG, TickeraTranslocoLoader, ToastService, ToggleSwitchComponent, VENUES_API_ROUTES, ZonePriceItemComponent, ZonePriceListComponent, authInterceptor, formatCitiesResponseToSelect, getBrowserLanguage, getCustomerFullname, getStoredLanguage, parseJsonToFormDataAdvanced, provideTickeraComponents, resolveLanguage, setStoredLanguage, transformImageToFile };
5125
5146
  //# sourceMappingURL=tickera-angular-components.mjs.map