tickera-angular-components 0.0.1-dev.50 → 0.0.1-dev.51

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.
@@ -7709,11 +7709,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
7709
7709
  type: Input
7710
7710
  }] } });
7711
7711
 
7712
+ class ConfirmationOrderModalService extends BaseModalService {
7713
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmationOrderModalService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
7714
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmationOrderModalService, providedIn: 'root' });
7715
+ }
7716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmationOrderModalService, decorators: [{
7717
+ type: Injectable,
7718
+ args: [{ providedIn: 'root' }]
7719
+ }] });
7720
+
7721
+ class ConfirmationOrderComponent {
7722
+ confirmationOrderModalService;
7723
+ selectionDiscountService;
7724
+ selectionTotalsService;
7725
+ selectionService;
7726
+ bookingDataService;
7727
+ modalTitle = 'Confirmación de compra';
7728
+ confirmButtonText = 'Confirmar compra';
7729
+ confirmButtonTextLoading = 'Confirmando compra...';
7730
+ loading = false;
7731
+ onConfirm = new EventEmitter();
7732
+ constructor(confirmationOrderModalService, selectionDiscountService, selectionTotalsService, selectionService, bookingDataService) {
7733
+ this.confirmationOrderModalService = confirmationOrderModalService;
7734
+ this.selectionDiscountService = selectionDiscountService;
7735
+ this.selectionTotalsService = selectionTotalsService;
7736
+ this.selectionService = selectionService;
7737
+ this.bookingDataService = bookingDataService;
7738
+ }
7739
+ get isOpen() {
7740
+ return this.confirmationOrderModalService.modalIsOpen;
7741
+ }
7742
+ get selectedCount() {
7743
+ return this.selectionService.selectedCount();
7744
+ }
7745
+ get serviceFee() {
7746
+ return Number(this.bookingDataService.show()?.service_fee ?? '0');
7747
+ }
7748
+ get subtotalValue() {
7749
+ return this.selectionTotalsService.subtotalValue();
7750
+ }
7751
+ get ticketSubtotal() {
7752
+ return (this.selectionTotalsService.subtotalValue() - this.selectionTotalsService.productSubtotal());
7753
+ }
7754
+ get productSubtotal() {
7755
+ return this.selectionTotalsService.productSubtotal();
7756
+ }
7757
+ get productCount() {
7758
+ return this.selectionService.selectedProductCount();
7759
+ }
7760
+ get totalValue() {
7761
+ return this.selectionTotalsService.totalValue();
7762
+ }
7763
+ get totalDiscounted() {
7764
+ return this.selectionTotalsService.totalDiscounted();
7765
+ }
7766
+ get coupon() {
7767
+ return this.selectionDiscountService.coupon();
7768
+ }
7769
+ get corporateBond() {
7770
+ return this.selectionDiscountService.corporateBond();
7771
+ }
7772
+ get giftBond() {
7773
+ return this.selectionDiscountService.giftBond();
7774
+ }
7775
+ onClose() {
7776
+ if (this.loading)
7777
+ return;
7778
+ this.confirmationOrderModalService.close();
7779
+ }
7780
+ confirmOrder() {
7781
+ this.onConfirm && this.onConfirm.emit();
7782
+ }
7783
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmationOrderComponent, deps: [{ token: ConfirmationOrderModalService }, { token: TicketSelectionDiscountService }, { token: TicketSelectionTotalsService }, { token: TicketSelectionService }, { token: PerformanceBookingDataService }], target: i0.ɵɵFactoryTarget.Component });
7784
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ConfirmationOrderComponent, isStandalone: true, selector: "confirmation-order-modal", inputs: { modalTitle: "modalTitle", confirmButtonText: "confirmButtonText", confirmButtonTextLoading: "confirmButtonTextLoading", loading: "loading" }, outputs: { onConfirm: "onConfirm" }, ngImport: i0, template: "<app-modal [title]=\"modalTitle\" [isOpen]=\"isOpen\" size=\"md\" (closeModal)=\"onClose()\">\n <div class=\"confirmation-modal\">\n <p class=\"confirmation-modal__description\">\n Revise los detalles de la compra antes de confirmar.\n </p>\n\n <p class=\"confirmation-modal__item\">\n <span>Entradas ({{ selectedCount | number: '1.0-0' }}):</span>\n <span>${{ ticketSubtotal | number: '1.0' }}</span>\n </p>\n\n @if (productCount > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Productos ({{ productCount | number: '1.0-0' }}):</span>\n <span>${{ productSubtotal | number: '1.0' }}</span>\n </p>\n }\n\n @if (serviceFee > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Tarifa de servicio:</span>\n <span>${{ serviceFee | number: '1.0' }}</span>\n </p>\n }\n\n @if (coupon) {\n <p class=\"confirmation-modal__item\">\n <span>Cup\u00F3n de descuento:</span>\n <span class=\"confirmation-modal__discount\">\n ${{ coupon.discount_value | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (corporateBond) {\n <p class=\"confirmation-modal__item\">\n <span>Bono corporativo:</span>\n <span class=\"confirmation-modal__discount\">\n ${{ corporateBond.value | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (giftBond) {\n <p class=\"confirmation-modal__item\">\n <span>Bono de regalo:</span>\n <span class=\"confirmation-modal__discount\"> ${{ giftBond.value | number: '1.0-2' }} </span>\n </p>\n }\n\n <hr class=\"confirmation-modal__divider\" />\n\n <p class=\"confirmation-modal__totals\">\n <span class=\"confirmation-modal__totals-title\">Total:</span>\n\n @if (totalDiscounted || totalDiscounted === 0) {\n <span class=\"confirmation-modal__totals-discounted\">\n <span class=\"confirmation-modal__discount\">\n ${{ totalValue | currency: 'COP' : 'symbol' : '1.0' }}\n </span>\n <span class=\"confirmation-modal__price\">\n ${{ totalDiscounted | currency: 'COP' : 'symbol' : '1.0' }}\n </span>\n </span>\n } @else {\n <span class=\"confirmation-modal__price\">${{ totalValue | number: '1.0' }}</span>\n }\n </p>\n </div>\n\n <div class=\"confirmation-modal__actions\">\n <app-button\n size=\"sm\"\n variant=\"tertiary\"\n text=\"Cancelar\"\n (click)=\"onClose()\"\n [disabled]=\"loading\"\n />\n\n <app-button\n size=\"sm\"\n variant=\"primary\"\n [text]=\"confirmButtonText\"\n [loadingText]=\"confirmButtonTextLoading\"\n [loading]=\"loading\"\n [disabled]=\"loading\"\n (click)=\"confirmOrder()\"\n />\n </div>\n</app-modal>\n", styles: [".confirmation-modal{display:flex;flex-flow:column nowrap;gap:.5rem;width:100%}.confirmation-modal__description{color:#6b7280;font-size:.875rem;margin-bottom:.5rem}.confirmation-modal__item{align-items:center;color:#9ca3af;display:flex;flex-flow:row wrap;font-size:.75rem;justify-content:space-between;margin:0}.confirmation-modal__discount{text-decoration:line-through}.confirmation-modal__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.confirmation-modal__price{color:#4b5563;font-size:1rem;font-weight:700}.confirmation-modal__totals{align-items:center;display:flex;flex-flow:row;justify-content:space-between;margin:0;width:100%}.confirmation-modal__totals-title{color:#4b5563;font-size:1rem;font-weight:700}.confirmation-modal__totals-discounted{align-items:flex-end;display:flex;flex-flow:column}.confirmation-modal__totals-discounted .confirmation-modal__discount{color:#9ca3af;font-size:.75rem}.confirmation-modal__actions{display:flex;flex-flow:row;gap:.5rem;justify-content:flex-end;padding-top:1rem;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon"], outputs: ["clicked"] }, { kind: "component", type: AppModalComponent, selector: "app-modal", inputs: ["title", "disableClose", "showHeader", "showCloseButton", "showTitle", "isOpen", "size"], outputs: ["closeModal"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }] });
7785
+ }
7786
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmationOrderComponent, decorators: [{
7787
+ type: Component,
7788
+ args: [{ selector: 'confirmation-order-modal', standalone: true, imports: [CommonModule, AppButtonComponent, AppModalComponent], template: "<app-modal [title]=\"modalTitle\" [isOpen]=\"isOpen\" size=\"md\" (closeModal)=\"onClose()\">\n <div class=\"confirmation-modal\">\n <p class=\"confirmation-modal__description\">\n Revise los detalles de la compra antes de confirmar.\n </p>\n\n <p class=\"confirmation-modal__item\">\n <span>Entradas ({{ selectedCount | number: '1.0-0' }}):</span>\n <span>${{ ticketSubtotal | number: '1.0' }}</span>\n </p>\n\n @if (productCount > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Productos ({{ productCount | number: '1.0-0' }}):</span>\n <span>${{ productSubtotal | number: '1.0' }}</span>\n </p>\n }\n\n @if (serviceFee > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Tarifa de servicio:</span>\n <span>${{ serviceFee | number: '1.0' }}</span>\n </p>\n }\n\n @if (coupon) {\n <p class=\"confirmation-modal__item\">\n <span>Cup\u00F3n de descuento:</span>\n <span class=\"confirmation-modal__discount\">\n ${{ coupon.discount_value | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (corporateBond) {\n <p class=\"confirmation-modal__item\">\n <span>Bono corporativo:</span>\n <span class=\"confirmation-modal__discount\">\n ${{ corporateBond.value | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (giftBond) {\n <p class=\"confirmation-modal__item\">\n <span>Bono de regalo:</span>\n <span class=\"confirmation-modal__discount\"> ${{ giftBond.value | number: '1.0-2' }} </span>\n </p>\n }\n\n <hr class=\"confirmation-modal__divider\" />\n\n <p class=\"confirmation-modal__totals\">\n <span class=\"confirmation-modal__totals-title\">Total:</span>\n\n @if (totalDiscounted || totalDiscounted === 0) {\n <span class=\"confirmation-modal__totals-discounted\">\n <span class=\"confirmation-modal__discount\">\n ${{ totalValue | currency: 'COP' : 'symbol' : '1.0' }}\n </span>\n <span class=\"confirmation-modal__price\">\n ${{ totalDiscounted | currency: 'COP' : 'symbol' : '1.0' }}\n </span>\n </span>\n } @else {\n <span class=\"confirmation-modal__price\">${{ totalValue | number: '1.0' }}</span>\n }\n </p>\n </div>\n\n <div class=\"confirmation-modal__actions\">\n <app-button\n size=\"sm\"\n variant=\"tertiary\"\n text=\"Cancelar\"\n (click)=\"onClose()\"\n [disabled]=\"loading\"\n />\n\n <app-button\n size=\"sm\"\n variant=\"primary\"\n [text]=\"confirmButtonText\"\n [loadingText]=\"confirmButtonTextLoading\"\n [loading]=\"loading\"\n [disabled]=\"loading\"\n (click)=\"confirmOrder()\"\n />\n </div>\n</app-modal>\n", styles: [".confirmation-modal{display:flex;flex-flow:column nowrap;gap:.5rem;width:100%}.confirmation-modal__description{color:#6b7280;font-size:.875rem;margin-bottom:.5rem}.confirmation-modal__item{align-items:center;color:#9ca3af;display:flex;flex-flow:row wrap;font-size:.75rem;justify-content:space-between;margin:0}.confirmation-modal__discount{text-decoration:line-through}.confirmation-modal__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.confirmation-modal__price{color:#4b5563;font-size:1rem;font-weight:700}.confirmation-modal__totals{align-items:center;display:flex;flex-flow:row;justify-content:space-between;margin:0;width:100%}.confirmation-modal__totals-title{color:#4b5563;font-size:1rem;font-weight:700}.confirmation-modal__totals-discounted{align-items:flex-end;display:flex;flex-flow:column}.confirmation-modal__totals-discounted .confirmation-modal__discount{color:#9ca3af;font-size:.75rem}.confirmation-modal__actions{display:flex;flex-flow:row;gap:.5rem;justify-content:flex-end;padding-top:1rem;width:100%}\n"] }]
7789
+ }], ctorParameters: () => [{ type: ConfirmationOrderModalService }, { type: TicketSelectionDiscountService }, { type: TicketSelectionTotalsService }, { type: TicketSelectionService }, { type: PerformanceBookingDataService }], propDecorators: { modalTitle: [{
7790
+ type: Input
7791
+ }], confirmButtonText: [{
7792
+ type: Input
7793
+ }], confirmButtonTextLoading: [{
7794
+ type: Input
7795
+ }], loading: [{
7796
+ type: Input
7797
+ }], onConfirm: [{
7798
+ type: Output
7799
+ }] } });
7800
+
7712
7801
  // Config
7713
7802
 
7714
7803
  /**
7715
7804
  * Generated bundle index. Do not edit.
7716
7805
  */
7717
7806
 
7718
- export { ADMIN_API_ROUTES, ALERT_ICONS, AdminSelectComponent, AdminService, ApiService, AppAlertComponent, AppBadgeComponent, 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, DEFAULT_STAGE_CONFIG, DOCUMENT_TYPES_OPTIONS, DateInputComponent, DateService, DaySelectorGridComponent, DeleteConfirmationComponent, DeleteConfirmationService, DynamicTableComponent, ERROR_INPUT_CLASSES, EndDateGreaterThanStartValidator, FORM_ERROR_MESSAGES, FeedbackModalComponent, FeedbackModalService, FileType, FileUploadComponent, FileUploadPreviewComponent, FormEditorComponent, FormInputComponent, FormSelectComponent, FormTextareaComponent, GiftBondStatus, KONVA_SHAPE_MAPPINGS, LanguageSwitcherComponent, MinTodayValidator, MustMatchValidator, OrderItemType, OrderStatus, PAYMENT_METHODS_OPTIONS, PERFORMANCES_API_ROUTES, PRICE_ZONES_API_ROUTES, PRODUCTS_API_ROUTES, PRODUCT_CATEGORIES_API_ROUTES, PRODUCT_TAGS_API_ROUTES, PRODUCT_TYPES_API_ROUTES, PerformanceBookingDataService, PerformanceCardComponent, PerformanceCardListComponent, PerformanceMultiSelectComponent, PerformanceSelectComponent, PerformanceService, PerformanceStatus, PerformanceStepperComponent, PerformanceTicketMapComponent, PerformanceTicketStatus, PerformancesListEventsService, PriceZoneEventService, PriceZoneFormModalService, PriceZoneSelectComponent, PriceZoneService, ProductCategoryService, ProductMultiSelectComponent, ProductSelectComponent, ProductService, ProductTagService, ProductTypeService, RoomMapElementOrientation, RoomMapElementType, SHOWS_API_ROUTES, SHOW_TYPE_COLORS, STATE_API_ENDPOINTS, SeatSelectionEmptySummaryComponent, SeatSelectionSummaryComponent, SeatSelectionSummaryItemComponent, SelectedDiscountCardType, ShowCardComponent, ShowCardSkeletonComponent, ShowMultiSelectComponent, ShowSelectComponent, ShowService, ShowType, ShowsFilterComponent, StateSelectComponent, StatesService, TICKERA_COMPONENTS_CONFIG, TICKET_ELEMENT_TYPES, TICKET_MAP_GRID_SIZE, TICKET_MAP_LAST_TICKETS_LIMIT, TICKET_MAP_TITLE_HEIGHT, TICKET_STATUS_COLORS, TICKET_STATUS_FILLS, TICKET_STATUS_LABELS, TIcketMapProductSelectionComponent, TickeraTranslocoLoader, TicketMapPriceZonesComponent, TicketMapProductSelectionItemComponent, TicketMapTotalsComponent, TicketMapWidgetComponent, TicketMapWidgetHeaderComponent, TicketMapWrapperComponent, TicketMapZoomControlsComponent, TicketMapZoomService, TicketSelectionDetailsService, TicketSelectionDiscountService, TicketSelectionService, TicketSelectionTotalsService, ToastService, ToggleSwitchComponent, VENUES_API_ROUTES, ZonePriceItemComponent, ZonePriceListComponent, authInterceptor, drawChairIcon$1 as drawChairIcon, drawHappyFace, drawRoundedRect, drawWheelchairIcon, findElementAtPosition, findTicketAtPosition, formatCitiesResponseToSelect, generateExitScene, generateHallwayScene, generateProductionAreaScene, generateSeatBlockScene, generateSeatBlockTicketScene, generateStageScene, generateStairScene, generateTableScene, generateTableTicketScene, generateUnavailableSpaceScene, generateZoneScene, getBrowserLanguage, getCustomerFullname, getItemTypeIcon, getStoredLanguage, numberToLetter$1 as numberToLetter, parseJsonToFormDataAdvanced, processElementsToRenderData, provideTickeraComponents, resolveLanguage, setStoredLanguage, tintColor, transformImageToFile };
7807
+ export { ADMIN_API_ROUTES, ALERT_ICONS, AdminSelectComponent, AdminService, ApiService, AppAlertComponent, AppBadgeComponent, 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, ConfirmationOrderComponent, CorporateBondStatus, CountrySelectComponent, CountryService, CouponApplicability, CouponDiscountType, CouponStatus, CustomerSelectComponent, CustomerService, DEFAULT_STAGE_CONFIG, DOCUMENT_TYPES_OPTIONS, DateInputComponent, DateService, DaySelectorGridComponent, DeleteConfirmationComponent, DeleteConfirmationService, DynamicTableComponent, ERROR_INPUT_CLASSES, EndDateGreaterThanStartValidator, FORM_ERROR_MESSAGES, FeedbackModalComponent, FeedbackModalService, FileType, FileUploadComponent, FileUploadPreviewComponent, FormEditorComponent, FormInputComponent, FormSelectComponent, FormTextareaComponent, GiftBondStatus, KONVA_SHAPE_MAPPINGS, LanguageSwitcherComponent, MinTodayValidator, MustMatchValidator, OrderItemType, OrderStatus, PAYMENT_METHODS_OPTIONS, PERFORMANCES_API_ROUTES, PRICE_ZONES_API_ROUTES, PRODUCTS_API_ROUTES, PRODUCT_CATEGORIES_API_ROUTES, PRODUCT_TAGS_API_ROUTES, PRODUCT_TYPES_API_ROUTES, PerformanceBookingDataService, PerformanceCardComponent, PerformanceCardListComponent, PerformanceMultiSelectComponent, PerformanceSelectComponent, PerformanceService, PerformanceStatus, PerformanceStepperComponent, PerformanceTicketMapComponent, PerformanceTicketStatus, PerformancesListEventsService, PriceZoneEventService, PriceZoneFormModalService, PriceZoneSelectComponent, PriceZoneService, ProductCategoryService, ProductMultiSelectComponent, ProductSelectComponent, ProductService, ProductTagService, ProductTypeService, RoomMapElementOrientation, RoomMapElementType, SHOWS_API_ROUTES, SHOW_TYPE_COLORS, STATE_API_ENDPOINTS, SeatSelectionEmptySummaryComponent, SeatSelectionSummaryComponent, SeatSelectionSummaryItemComponent, SelectedDiscountCardType, ShowCardComponent, ShowCardSkeletonComponent, ShowMultiSelectComponent, ShowSelectComponent, ShowService, ShowType, ShowsFilterComponent, StateSelectComponent, StatesService, TICKERA_COMPONENTS_CONFIG, TICKET_ELEMENT_TYPES, TICKET_MAP_GRID_SIZE, TICKET_MAP_LAST_TICKETS_LIMIT, TICKET_MAP_TITLE_HEIGHT, TICKET_STATUS_COLORS, TICKET_STATUS_FILLS, TICKET_STATUS_LABELS, TIcketMapProductSelectionComponent, TickeraTranslocoLoader, TicketMapPriceZonesComponent, TicketMapProductSelectionItemComponent, TicketMapTotalsComponent, TicketMapWidgetComponent, TicketMapWidgetHeaderComponent, TicketMapWrapperComponent, TicketMapZoomControlsComponent, TicketMapZoomService, TicketSelectionDetailsService, TicketSelectionDiscountService, TicketSelectionService, TicketSelectionTotalsService, ToastService, ToggleSwitchComponent, VENUES_API_ROUTES, ZonePriceItemComponent, ZonePriceListComponent, authInterceptor, drawChairIcon$1 as drawChairIcon, drawHappyFace, drawRoundedRect, drawWheelchairIcon, findElementAtPosition, findTicketAtPosition, formatCitiesResponseToSelect, generateExitScene, generateHallwayScene, generateProductionAreaScene, generateSeatBlockScene, generateSeatBlockTicketScene, generateStageScene, generateStairScene, generateTableScene, generateTableTicketScene, generateUnavailableSpaceScene, generateZoneScene, getBrowserLanguage, getCustomerFullname, getItemTypeIcon, getStoredLanguage, numberToLetter$1 as numberToLetter, parseJsonToFormDataAdvanced, processElementsToRenderData, provideTickeraComponents, resolveLanguage, setStoredLanguage, tintColor, transformImageToFile };
7719
7808
  //# sourceMappingURL=tickera-angular-components.mjs.map