@updevs/components 1.0.0-alpha.92 → 1.0.0-alpha.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/button.component.d.ts +2 -1
- package/esm2022/button/button.component.mjs +6 -3
- package/esm2022/card/card.component.mjs +1 -1
- package/esm2022/dropdown/dropdown.component.mjs +1 -1
- package/esm2022/form/components/dynamic-field/dynamic-field.component.mjs +1 -1
- package/esm2022/form/form.component.mjs +1 -1
- package/esm2022/form-controls/date-picker/date-picker.component.mjs +1 -1
- package/esm2022/form-controls/file-upload/file-upload.component.mjs +1 -1
- package/esm2022/form-controls/select/components/multiple/select-multiple.component.mjs +1 -1
- package/esm2022/form-controls/select/components/single/select.component.mjs +1 -1
- package/esm2022/form-controls/time-picker/time-picker.component.mjs +1 -1
- package/esm2022/form-controls/time-picker/time-selector/time-selector.component.mjs +1 -1
- package/esm2022/layout/pages/auth-flow/login/login.component.mjs +1 -1
- package/esm2022/layout/partials/page-header/page-header.component.mjs +1 -1
- package/esm2022/modal/components/modal-container/modal-container.component.mjs +1 -1
- package/esm2022/paginator/paginator.component.mjs +1 -1
- package/esm2022/pricing/pricing-cards/pricing-cards.component.mjs +1 -1
- package/esm2022/pricing/pricing-table/pricing-table.component.mjs +1 -1
- package/esm2022/table/components/filter-row/filter-row.component.mjs +1 -1
- package/esm2022/table/components/save-search/save-search.component.mjs +1 -1
- package/esm2022/table/components/search-section/search-section.component.mjs +7 -6
- package/esm2022/table/table.component.mjs +1 -1
- package/fesm2022/updevs-components-button.mjs +5 -2
- package/fesm2022/updevs-components-button.mjs.map +1 -1
- package/fesm2022/updevs-components-card.mjs +1 -1
- package/fesm2022/updevs-components-card.mjs.map +1 -1
- package/fesm2022/updevs-components-dropdown.mjs +1 -1
- package/fesm2022/updevs-components-dropdown.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-date-picker.mjs +1 -1
- package/fesm2022/updevs-components-form-controls-date-picker.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-file-upload.mjs +1 -1
- package/fesm2022/updevs-components-form-controls-file-upload.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-select.mjs +2 -2
- package/fesm2022/updevs-components-form-controls-select.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-time-picker.mjs +2 -2
- package/fesm2022/updevs-components-form-controls-time-picker.mjs.map +1 -1
- package/fesm2022/updevs-components-form.mjs +2 -2
- package/fesm2022/updevs-components-form.mjs.map +1 -1
- package/fesm2022/updevs-components-layout.mjs +2 -2
- package/fesm2022/updevs-components-layout.mjs.map +1 -1
- package/fesm2022/updevs-components-modal.mjs +1 -1
- package/fesm2022/updevs-components-modal.mjs.map +1 -1
- package/fesm2022/updevs-components-paginator.mjs +1 -1
- package/fesm2022/updevs-components-paginator.mjs.map +1 -1
- package/fesm2022/updevs-components-pricing.mjs +2 -2
- package/fesm2022/updevs-components-pricing.mjs.map +1 -1
- package/fesm2022/updevs-components-table.mjs +9 -8
- package/fesm2022/updevs-components-table.mjs.map +1 -1
- package/package.json +24 -24
- package/table/components/search-section/search-section.component.d.ts +14 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updevs-components-modal.mjs","sources":["../../../../libs/components/modal/src/models/base.modal.ts","../../../../libs/components/modal/src/models/modal-config.model.ts","../../../../libs/components/modal/src/components/modal-container/modal-container.component.ts","../../../../libs/components/modal/src/components/modal-container/modal-container.component.html","../../../../libs/components/modal/src/services/modal.service.ts","../../../../libs/components/modal/src/services/modal-alert.service.ts","../../../../libs/components/modal/src/upd-modal.module.ts","../../../../libs/components/modal/src/updevs-components-modal.ts"],"sourcesContent":["import { input, Directive } from '@angular/core';\n\nimport { ModalRef } from './modal-ref';\n\n@Directive()\nexport abstract class BaseModal<TData = any> {\n modalRef = input.required<ModalRef>();\n data = input.required<TData>();\n}\n","import { TemplateRef, Type } from '@angular/core';\nimport { ButtonModel } from '@updevs/sdk/layout';\nimport { TextModel } from '@updevs/sdk';\nimport { TopBottomLeftRightType, BgColorStyleType } from '@updevs/sdk/types';\nimport { IconModel } from '@updevs/icons';\n\nimport { ModalConfig } from './modal.config';\nimport { ModalSizeType } from '../types/modal-size.type';\nimport { ModalFooterStyleType } from '../types/modal-footer-style.type';\n\nexport class ModalConfigModel implements ModalConfig {\n size: ModalSizeType = 'regular';\n isVerticallyCentered = true;\n isScrollable = false;\n showCancelButton = false;\n showCloseButton = true;\n isTextCentered = true;\n shouldDismissOnEsc = false;\n shouldDismissOnOutsideClick = false;\n isAlert = false;\n statusColor?: BgColorStyleType;\n headerTemplateRef?: TemplateRef<any>;\n footerTemplateRef?: TemplateRef<any>;\n bodyTemplateRef?: TemplateRef<any>;\n bodyContentType?: Type<any>;\n body?: TextModel;\n title?: TextModel;\n titleIcon?: IconModel;\n titleIconPosition?: TopBottomLeftRightType = 'top';\n footerLayout?: ModalFooterStyleType = 'default';\n actionButtons: ButtonModel[] = [];\n data?: any;\n\n constructor(init?: Partial<ModalConfig>) {\n if (!!init) {\n Object.assign(this, init);\n }\n }\n}\n","import { DOCUMENT, NgComponentOutlet } from '@angular/common';\nimport { Component, HostBinding, TemplateRef, inject, Type, ElementRef, Renderer2, viewChild, ComponentRef } from '@angular/core';\nimport { TextService, TextModel } from '@updevs/sdk';\nimport {\n Utils as LayoutUtils,\n LayoutService,\n ScrollbarService,\n BaseComponent,\n Overlay,\n ButtonModel\n} from '@updevs/sdk/layout';\nimport { TopBottomLeftRightType, OptionalType, BgColorStyleType } from '@updevs/sdk/types';\nimport { IconModel } from '@updevs/icons';\n\nimport { ModalSizeType } from '../../types/modal-size.type';\nimport { ModalConfig } from '../../models/modal.config';\nimport { ModalConfigModel } from '../../models/modal-config.model';\nimport { ModalFooterStyleType } from '../../types/modal-footer-style.type';\nimport { ModalRef } from '../../models/modal-ref';\n\nlet containerId = 1;\n\n@Component({\n selector: 'upd-modal-container',\n templateUrl: './modal-container.component.html',\n styleUrl: './modal-container.component.scss'\n})\nexport class ModalContainerComponent extends BaseComponent implements ModalConfig, ModalRef {\n @HostBinding('id') id = `modal-${containerId++}`;\n @HostBinding('class') hostClass = ['modal', 'modal-blur', 'fade'];\n @HostBinding('role') role = 'dialog';\n @HostBinding('aria-hidden') ariaHidden = true;\n @HostBinding('aria-modal') ariaModal = false;\n @HostBinding('tabindex') tabIndex = -1;\n @HostBinding('style.display') styleDisplay?: string;\n\n dialog = viewChild.required('dialog', { read: ElementRef });\n content = viewChild.required('content', { read: ElementRef });\n bodyContentOutlet = viewChild<NgComponentOutlet>(NgComponentOutlet);\n size: ModalSizeType = 'regular';\n isVerticallyCentered = true;\n isScrollable = false;\n showCloseButton = true;\n showCancelButton = false;\n isTextCentered = true;\n shouldDismissOnEsc = false;\n shouldDismissOnOutsideClick = false;\n isAlert = false;\n statusColor?: BgColorStyleType;\n headerTemplateRef?: TemplateRef<any>;\n footerTemplateRef?: TemplateRef<any>;\n bodyTemplateRef?: TemplateRef<any>;\n bodyContentType?: Type<any>;\n contentType?: Type<any>;\n body?: TextModel;\n title?: TextModel;\n titleIcon?: IconModel;\n titleIconPosition?: TopBottomLeftRightType = 'top';\n footerLayout?: ModalFooterStyleType = 'default';\n actionButtons: ButtonModel[] = [];\n overlay!: Overlay;\n modalContainerRef!: ComponentRef<ModalContainerComponent>;\n data?: any;\n afterClose?: (result?: any) => void;\n\n get classes(): string[] {\n return [\n 'modal-dialog',\n this.isVerticallyCentered ? 'modal-dialog-centered' : '',\n this.isScrollable ? 'modal-dialog-scrollable' : '',\n this.sizeClass\n ];\n }\n\n get titleText(): string {\n return this.textService.getText(this.title);\n }\n\n get bodyText(): string {\n return this.textService.getText(this.body);\n }\n\n get statusColorClass(): string {\n return `bg-${this.statusColor}`;\n }\n\n get sizeClass(): string {\n let cls = '';\n\n switch (this.size) {\n case 'small':\n cls = 'modal-sm';\n break;\n case 'large':\n cls = 'modal-lg';\n break;\n case 'extra-large':\n cls = 'modal-xl';\n break;\n }\n\n return cls;\n }\n\n private readonly openClass = 'modal-open';\n private readonly textService = inject(TextService);\n private readonly elementRef = inject(ElementRef);\n private readonly layoutService = inject(LayoutService);\n private readonly scrollbarService = inject(ScrollbarService);\n private readonly renderer = inject(Renderer2);\n private readonly document = inject(DOCUMENT);\n\n private get element(): any {\n return this.elementRef.nativeElement;\n }\n\n prepareToShow(config?: ModalConfig): void {\n this.setupConfig(config);\n this.scrollbarService.hide();\n this.layoutService.addBodyClasses(this.openClass);\n this.adjustDialog();\n this.setupActionButtons();\n }\n\n show(): void {\n this.setupListeners();\n\n this.styleDisplay = 'block';\n this.ariaHidden = false;\n this.ariaModal = true;\n this.element.scrollTop = 0;\n this.dialog().nativeElement.scrollTop = 0;\n\n LayoutUtils.reflow(this.element);\n\n const transitionSub = LayoutUtils.executeAfterTransition(this.element).subscribe(() => {\n this.element.classList.add('show');\n this.content().nativeElement.focus();\n });\n\n this.addSubscriptions(transitionSub);\n }\n\n close(result?: any): void {\n const transitionSub = LayoutUtils.executeAfterTransition(this.element).subscribe(() => {\n this.styleDisplay = undefined;\n this.ariaHidden = true;\n this.ariaModal = false;\n\n if (!!this.afterClose) {\n this.afterClose(result);\n }\n\n this.overlay.hide();\n this.layoutService.removeBodyClasses(this.openClass);\n this.modalContainerRef.destroy();\n });\n\n this.element.classList.remove('show');\n this.addSubscriptions(transitionSub);\n }\n\n buttonClick(event: MouseEvent, btn: ButtonModel): void {\n if (!!btn.clickFunction) {\n btn.clickFunction({ event, data: btn });\n }\n }\n\n getBodyInstance<T>(): OptionalType<T> {\n return <T>this.bodyContentOutlet()?.['_componentRef'].instance;\n }\n\n private adjustDialog(): void {\n const isModalOverflowing = this.element.scrollHeight > this.document.documentElement.clientHeight;\n const scrollbarWidth = this.scrollbarService.getWidth();\n const isBodyOverflowing = scrollbarWidth > 0;\n\n if (isBodyOverflowing && !isModalOverflowing) {\n this.renderer.setStyle(this.element, 'paddingRight', `${scrollbarWidth}px`);\n }\n\n if (!isBodyOverflowing && isModalOverflowing) {\n this.renderer.setStyle(this.element, 'paddingLeft', `${scrollbarWidth}px`);\n }\n }\n\n private setupConfig(config?: ModalConfig): void {\n if (!config) {\n return;\n }\n\n const configModel = new ModalConfigModel(config);\n this.size = configModel.size;\n this.isVerticallyCentered = configModel.isVerticallyCentered;\n this.isScrollable = configModel.isScrollable;\n this.showCancelButton = configModel.showCancelButton;\n this.showCloseButton = configModel.showCloseButton;\n this.shouldDismissOnEsc = configModel.shouldDismissOnEsc;\n this.shouldDismissOnOutsideClick = configModel.shouldDismissOnOutsideClick;\n this.isAlert = configModel.isAlert;\n this.isTextCentered = configModel.isTextCentered;\n this.statusColor = configModel.statusColor;\n this.headerTemplateRef = configModel.headerTemplateRef;\n this.footerTemplateRef = configModel.footerTemplateRef;\n this.bodyTemplateRef = configModel.bodyTemplateRef;\n this.bodyContentType = configModel.bodyContentType;\n this.body = configModel.body;\n this.title = configModel.title;\n this.titleIcon = configModel.titleIcon;\n this.titleIconPosition = configModel.titleIconPosition;\n this.footerLayout = configModel.footerLayout;\n this.actionButtons = configModel.actionButtons;\n this.data = configModel.data;\n }\n\n private setupActionButtons(): void {\n this.actionButtons.forEach(btn => {\n const fnBackup = btn.clickFunction;\n btn.clickFunction = event => {\n event.data = this;\n fnBackup!(event);\n };\n });\n }\n\n private setupListeners(): void {\n if (this.shouldDismissOnOutsideClick) {\n this.element.addEventListener('click', this.clickCallback);\n }\n\n if (this.shouldDismissOnEsc) {\n this.element.addEventListener('keydown', this.escCallback);\n }\n }\n\n private clickCallback = (evt: Event) => {\n if (evt.target === this.element) {\n this.close();\n }\n };\n\n private escCallback = (evt: KeyboardEvent) => {\n if (evt.key === 'Escape') {\n this.close();\n }\n };\n}\n","<ng-container *transloco=\"let t; prefix: 'UpDevs.Modal'\">\n <div [ngClass]=\"classes\" #dialog>\n <div class=\"modal-content\" tabindex=\"-1\" #content>\n @if (!!contentType) {\n <ng-container [ngComponentOutlet]=\"contentType\" [ngComponentOutletInputs]=\"{modalRef: this, data: data}\"></ng-container>\n } @else {\n @if (!isAlert && (!!titleText || !!headerTemplateRef)) {\n <div class=\"modal-header\">\n @if (!!headerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"headerTemplateRef\" [ngTemplateOutletContext]=\"{modalRef: this, data: data}\">\n </ng-container>\n } @else {\n <h5 class=\"modal-title\">{{ titleText }}</h5>\n @if (showCloseButton) {\n <ng-container [ngTemplateOutlet]=\"closeBtnTpl\"></ng-container>\n }\n }\n </div>\n } @else if (showCloseButton) {\n <ng-container [ngTemplateOutlet]=\"closeBtnTpl\"></ng-container>\n }\n\n <div class=\"modal-body py-4\" [class.text-center]=\"isTextCentered || isAlert\">\n @if (isAlert && !!titleText) {\n <div class=\"d-flex justify-content-center align-content-start\"\n [class.flex-row]=\"titleIconPosition === 'left' || titleIconPosition === 'right'\"\n [class.flex-column]=\"titleIconPosition === 'top' || titleIconPosition === 'bottom'\">\n @if (!!titleIcon && (titleIconPosition === 'top' || titleIconPosition === 'left')) {\n <upd-icon [model]=\"titleIcon\" [class.me-2]=\"titleIconPosition === 'left'\"\n [class.mb-2]=\"titleIconPosition === 'top'\"></upd-icon>\n }\n\n <span class=\"align-self-center fs-3 fw-bold\" [class.mb-3]=\"!!titleIcon && titleIconPosition === 'top'\">\n {{ titleText }}\n </span>\n\n @if (!!titleIcon && (titleIconPosition === 'bottom' || titleIconPosition === 'right')) {\n <upd-icon [model]=\"titleIcon\" [class.ms-2]=\"titleIconPosition === 'right'\"\n [class.mb-2]=\"titleIconPosition === 'bottom'\"></upd-icon>\n }\n </div>\n }\n\n @if (!!bodyTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"bodyTemplateRef!\" [ngTemplateOutletContext]=\"{modalRef: this, data: data}\">\n </ng-container>\n } @else if (!!bodyContentType) {\n <ng-container [ngComponentOutlet]=\"bodyContentType\" [ngComponentOutletInputs]=\"{modalRef: this, data: data}\">\n </ng-container>\n } @else {\n <div [innerHTML]=\"bodyText\" [class.text-secondary]=\"isAlert\"></div>\n }\n </div>\n\n @if (!!statusColor) {\n <div class=\"modal-status\" [style.position]=\"'relative'\" [ngClass]=\"statusColorClass\"></div>\n }\n\n @if (showCancelButton || actionButtons.length > 0 || !!footerTemplateRef) {\n <div class=\"modal-footer\">\n @if (!!footerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"footerTemplateRef\" [ngTemplateOutletContext]=\"{modalRef: this, data: data}\">\n </ng-container>\n } @else {\n @switch (footerLayout) {\n @case ('full-width') {\n <div class=\"w-100\">\n <div class=\"row\">\n @if (showCancelButton) {\n <div class=\"col\">\n <upd-button class=\"w-100\" [isNavigationLink]=\"true\" (clicked)=\"close()\">\n {{ t('Cancel') }}\n </upd-button>\n </div>\n }\n\n @for (btn of actionButtons; track btn) {\n <div class=\"col\">\n <upd-button class=\"w-100\" [model]=\"btn\"></upd-button>\n </div>\n }\n </div>\n </div>\n }\n @case ('centered') {\n <div class=\"d-flex justify-content-center w-100\">\n <ng-container [ngTemplateOutlet]=\"buttonsTpl\"></ng-container>\n </div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"buttonsTpl\"></ng-container>\n }\n }\n }\n </div>\n }\n }\n </div>\n </div>\n\n <ng-template #closeBtnTpl>\n <upd-button (clicked)=\"close()\" [shouldIgnoreBtnClass]=\"true\" customClasses=\"btn-close\"></upd-button>\n </ng-template>\n\n <ng-template #buttonsTpl>\n @if (showCancelButton) {\n <upd-button colorStyle=\"secondary\" [isLink]=\"true\" (clicked)=\"close()\">\n {{ t('Cancel') }}\n </upd-button>\n }\n\n @for (btn of actionButtons; track btn) {\n <upd-button [model]=\"btn\" (clicked)=\"buttonClick($event, btn)\"></upd-button>\n }\n </ng-template>\n</ng-container>\n","import { Injectable, inject, ViewContainerRef, ApplicationRef } from '@angular/core';\nimport { DynamicComponentLoaderService, OverlayService } from '@updevs/sdk/layout';\nimport { ComponentType } from '@updevs/sdk/types';\n\nimport { ModalContainerComponent } from '../components/modal-container/modal-container.component';\nimport { ModalConfig } from '../models/modal.config';\nimport { ModalRef } from '../models/modal-ref';\n\n@Injectable()\nexport class ModalService {\n private readonly dynamicComponentLoaderService = inject(DynamicComponentLoaderService);\n private readonly overlayService = inject(OverlayService);\n private readonly applicationRef = inject(ApplicationRef);\n\n open<T>(\n contentType?: ComponentType<T>,\n config?: ModalConfig,\n rootElement?: Element,\n shouldDisposeOnClick = false,\n shouldDisposeOnEsc = false\n ): ModalRef {\n const viewContainerRef = this.applicationRef.components[0].injector.get(ViewContainerRef);\n const modalContainerRef = this.dynamicComponentLoaderService.load(ModalContainerComponent, viewContainerRef);\n const overlay = this.overlayService.create({ rootElement, customClasses: ['modal-backdrop'] });\n\n modalContainerRef.instance.prepareToShow(config);\n\n modalContainerRef.instance.modalContainerRef = modalContainerRef;\n modalContainerRef.instance.overlay = overlay;\n modalContainerRef.instance.contentType = contentType;\n modalContainerRef.instance.shouldDismissOnOutsideClick = config?.shouldDismissOnOutsideClick || shouldDisposeOnClick;\n modalContainerRef.instance.shouldDismissOnEsc = config?.shouldDismissOnEsc || shouldDisposeOnEsc;\n\n overlay.show().subscribe(() => modalContainerRef.instance.show());\n\n return modalContainerRef.instance;\n }\n}\n","import { Injectable, inject, signal } from '@angular/core';\nimport { TextModel } from '@updevs/sdk';\nimport { ButtonModel } from '@updevs/sdk/layout';\nimport { TopBottomLeftRightType, BgColorStyleType } from '@updevs/sdk/types';\nimport { IconModel, TablerIconsType } from '@updevs/icons';\nimport { Observable, Subject } from 'rxjs';\n\nimport { ModalService } from './modal.service';\nimport { ModalSizeType } from '../types/modal-size.type';\nimport { ModalFooterStyleType } from '../types/modal-footer-style.type';\nimport { ModalRef } from '../models/modal-ref';\n\n@Injectable()\nexport class ModalAlertService {\n private readonly modalService = inject(ModalService);\n private readonly defaultIconModel: IconModel = { tablerIconWeight: 'medium-light', tablerIconSize: 48 };\n\n showWarning(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): ModalRef {\n return this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.WarningTitle', isTranslated: false },\n 'alert-triangle',\n 'text-warning',\n 'warning',\n actionButtons\n );\n }\n\n showError(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): ModalRef {\n return this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.ErrorTitle', isTranslated: false },\n 'exclamation-circle',\n 'text-danger',\n 'danger',\n actionButtons\n );\n }\n\n showInfo(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): ModalRef {\n return this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.InfoTitle', isTranslated: false },\n 'info-circle',\n 'text-info',\n 'info',\n actionButtons\n );\n }\n\n showSuccess(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): ModalRef {\n return this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.SuccessTitle', isTranslated: false },\n 'circle-check',\n 'text-success',\n 'success',\n actionButtons\n );\n }\n\n showConfirm(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): Observable<boolean> {\n // eslint-disable-next-line prefer-const\n let modalRef: ModalRef;\n const statusColor: BgColorStyleType = 'indigo';\n const result = new Subject<boolean>();\n\n if (actionButtons.length < 1) {\n actionButtons = [\n new ButtonModel({\n text: signal({ text: 'UpDevs.ModalAlert.ConfirmNo', isTranslated: false }),\n isOutline: signal(true),\n clickFunction: () => {\n result.next(false);\n modalRef.close();\n }\n }),\n new ButtonModel({\n text: signal({ text: 'UpDevs.ModalAlert.ConfirmYes', isTranslated: false }),\n colorStyle: signal(statusColor),\n clickFunction: () => {\n result.next(true);\n modalRef.close();\n }\n })\n ];\n }\n\n modalRef = this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.ConfirmationTitle', isTranslated: false },\n 'checklist',\n 'text-indigo',\n statusColor,\n actionButtons,\n 'full-width'\n );\n\n return result;\n }\n\n showCustom(\n message: TextModel,\n title: TextModel,\n titleIcon: IconModel,\n titleIconPosition: TopBottomLeftRightType,\n statusColor: BgColorStyleType,\n actionButtons: ButtonModel[] = [],\n size: ModalSizeType = 'small',\n footerLayout: ModalFooterStyleType = 'default'\n ): ModalRef {\n return this.modalService.open(undefined, {\n isAlert: true,\n title,\n titleIcon,\n titleIconPosition,\n size,\n body: message,\n statusColor,\n footerLayout,\n actionButtons\n });\n }\n\n private open(\n message: TextModel,\n title: TextModel,\n titleIconType: TablerIconsType,\n titleIconColorClass: string,\n statusColor: BgColorStyleType,\n actionButtons: ButtonModel[],\n footerLayout: ModalFooterStyleType = 'default'\n ): ModalRef {\n // eslint-disable-next-line prefer-const\n let modalRef: ModalRef;\n const titleIcon: IconModel = {\n ...this.defaultIconModel,\n tablerIcon: titleIconType,\n colorClass: titleIconColorClass\n };\n\n if (actionButtons.length < 1) {\n actionButtons.push(\n new ButtonModel({\n text: signal({ text: 'UpDevs.ModalAlert.OkButtonTitle', isTranslated: false }),\n colorStyle: signal(statusColor),\n clickFunction: () => modalRef.close()\n })\n );\n }\n\n modalRef = this.modalService.open(undefined, {\n isAlert: true,\n title,\n titleIcon,\n titleIconPosition: 'top',\n size: 'small',\n body: message,\n statusColor,\n footerLayout,\n actionButtons,\n showCloseButton: false\n });\n\n return modalRef;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdCoreLayoutModule } from '@updevs/sdk/layout';\nimport { UpdIconsModule } from '@updevs/icons';\nimport { UpdMessagesModule, MessagesService, MessageTypeEnum } from '@updevs/sdk/messages';\nimport { OptionalType } from '@updevs/sdk/types';\nimport { UpdButtonModule } from '@updevs/components/button';\nimport { TranslocoService, TranslocoDirective } from '@jsverse/transloco';\n\nimport * as en from './assets/i18n/en.json';\nimport * as pt from './assets/i18n/pt.json';\nimport { ModalService } from './services/modal.service';\nimport { ModalContainerComponent } from './components/modal-container/modal-container.component';\nimport { ModalAlertService } from './services/modal-alert.service';\nimport { ModalRef } from './models/modal-ref';\n\n@NgModule({\n imports: [\n CommonModule,\n UpdCoreLayoutModule,\n UpdButtonModule,\n UpdIconsModule,\n UpdMessagesModule,\n TranslocoDirective\n ],\n declarations: [\n ModalContainerComponent\n ],\n providers: [\n ModalService,\n ModalAlertService\n ]\n})\nexport class UpdModalModule {\n constructor(translocoService: TranslocoService, modalAlertService: ModalAlertService, messagesService: MessagesService) {\n translocoService.setFallbackLangForMissingTranslation({ fallbackLang: 'en' });\n translocoService.setTranslation(en, 'en');\n translocoService.setTranslation(pt, 'pt');\n this.setupMessagesService(modalAlertService, messagesService);\n }\n\n private setupMessagesService(modalAlertService: ModalAlertService, messagesService: MessagesService): void {\n messagesService.onNewMessage.subscribe(msg => {\n if (msg.isModal) {\n if (!!msg.onShown) {\n msg.onShown();\n }\n\n let modalRef: OptionalType<ModalRef>;\n\n switch (msg.type) {\n case MessageTypeEnum.Warning:\n modalRef = modalAlertService.showWarning(msg.message, msg.title);\n break;\n case MessageTypeEnum.Info:\n modalRef = modalAlertService.showInfo(msg.message, msg.title);\n break;\n case MessageTypeEnum.Error:\n modalRef = modalAlertService.showError(msg.message, msg.title);\n break;\n case MessageTypeEnum.Success:\n modalRef = modalAlertService.showSuccess(msg.message, msg.title);\n break;\n case MessageTypeEnum.Confirm:\n modalAlertService.showConfirm(msg.message, msg.title);\n break;\n }\n\n if (!!modalRef && !!msg.onHidden) {\n modalRef.afterClose = msg.onHidden;\n }\n }\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["LayoutUtils","i4","en","pt","i1","i2.ModalAlertService","i3"],"mappings":";;;;;;;;;;;;;;;;MAKsB,SAAS,CAAA;AAD/B,IAAA,WAAA,GAAA;AAEI,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAY;AACrC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAS;AACjC;8GAHqB,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAT,SAAS,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,U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,"file":"updevs-components-modal.mjs","sources":["../../../../libs/components/modal/src/models/base.modal.ts","../../../../libs/components/modal/src/models/modal-config.model.ts","../../../../libs/components/modal/src/components/modal-container/modal-container.component.ts","../../../../libs/components/modal/src/components/modal-container/modal-container.component.html","../../../../libs/components/modal/src/services/modal.service.ts","../../../../libs/components/modal/src/services/modal-alert.service.ts","../../../../libs/components/modal/src/upd-modal.module.ts","../../../../libs/components/modal/src/updevs-components-modal.ts"],"sourcesContent":["import { input, Directive } from '@angular/core';\n\nimport { ModalRef } from './modal-ref';\n\n@Directive()\nexport abstract class BaseModal<TData = any> {\n modalRef = input.required<ModalRef>();\n data = input.required<TData>();\n}\n","import { TemplateRef, Type } from '@angular/core';\nimport { ButtonModel } from '@updevs/sdk/layout';\nimport { TextModel } from '@updevs/sdk';\nimport { TopBottomLeftRightType, BgColorStyleType } from '@updevs/sdk/types';\nimport { IconModel } from '@updevs/icons';\n\nimport { ModalConfig } from './modal.config';\nimport { ModalSizeType } from '../types/modal-size.type';\nimport { ModalFooterStyleType } from '../types/modal-footer-style.type';\n\nexport class ModalConfigModel implements ModalConfig {\n size: ModalSizeType = 'regular';\n isVerticallyCentered = true;\n isScrollable = false;\n showCancelButton = false;\n showCloseButton = true;\n isTextCentered = true;\n shouldDismissOnEsc = false;\n shouldDismissOnOutsideClick = false;\n isAlert = false;\n statusColor?: BgColorStyleType;\n headerTemplateRef?: TemplateRef<any>;\n footerTemplateRef?: TemplateRef<any>;\n bodyTemplateRef?: TemplateRef<any>;\n bodyContentType?: Type<any>;\n body?: TextModel;\n title?: TextModel;\n titleIcon?: IconModel;\n titleIconPosition?: TopBottomLeftRightType = 'top';\n footerLayout?: ModalFooterStyleType = 'default';\n actionButtons: ButtonModel[] = [];\n data?: any;\n\n constructor(init?: Partial<ModalConfig>) {\n if (!!init) {\n Object.assign(this, init);\n }\n }\n}\n","import { DOCUMENT, NgComponentOutlet } from '@angular/common';\nimport { Component, HostBinding, TemplateRef, inject, Type, ElementRef, Renderer2, viewChild, ComponentRef } from '@angular/core';\nimport { TextService, TextModel } from '@updevs/sdk';\nimport {\n Utils as LayoutUtils,\n LayoutService,\n ScrollbarService,\n BaseComponent,\n Overlay,\n ButtonModel\n} from '@updevs/sdk/layout';\nimport { TopBottomLeftRightType, OptionalType, BgColorStyleType } from '@updevs/sdk/types';\nimport { IconModel } from '@updevs/icons';\n\nimport { ModalSizeType } from '../../types/modal-size.type';\nimport { ModalConfig } from '../../models/modal.config';\nimport { ModalConfigModel } from '../../models/modal-config.model';\nimport { ModalFooterStyleType } from '../../types/modal-footer-style.type';\nimport { ModalRef } from '../../models/modal-ref';\n\nlet containerId = 1;\n\n@Component({\n selector: 'upd-modal-container',\n templateUrl: './modal-container.component.html',\n styleUrl: './modal-container.component.scss'\n})\nexport class ModalContainerComponent extends BaseComponent implements ModalConfig, ModalRef {\n @HostBinding('id') id = `modal-${containerId++}`;\n @HostBinding('class') hostClass = ['modal', 'modal-blur', 'fade'];\n @HostBinding('role') role = 'dialog';\n @HostBinding('aria-hidden') ariaHidden = true;\n @HostBinding('aria-modal') ariaModal = false;\n @HostBinding('tabindex') tabIndex = -1;\n @HostBinding('style.display') styleDisplay?: string;\n\n dialog = viewChild.required('dialog', { read: ElementRef });\n content = viewChild.required('content', { read: ElementRef });\n bodyContentOutlet = viewChild<NgComponentOutlet>(NgComponentOutlet);\n size: ModalSizeType = 'regular';\n isVerticallyCentered = true;\n isScrollable = false;\n showCloseButton = true;\n showCancelButton = false;\n isTextCentered = true;\n shouldDismissOnEsc = false;\n shouldDismissOnOutsideClick = false;\n isAlert = false;\n statusColor?: BgColorStyleType;\n headerTemplateRef?: TemplateRef<any>;\n footerTemplateRef?: TemplateRef<any>;\n bodyTemplateRef?: TemplateRef<any>;\n bodyContentType?: Type<any>;\n contentType?: Type<any>;\n body?: TextModel;\n title?: TextModel;\n titleIcon?: IconModel;\n titleIconPosition?: TopBottomLeftRightType = 'top';\n footerLayout?: ModalFooterStyleType = 'default';\n actionButtons: ButtonModel[] = [];\n overlay!: Overlay;\n modalContainerRef!: ComponentRef<ModalContainerComponent>;\n data?: any;\n afterClose?: (result?: any) => void;\n\n get classes(): string[] {\n return [\n 'modal-dialog',\n this.isVerticallyCentered ? 'modal-dialog-centered' : '',\n this.isScrollable ? 'modal-dialog-scrollable' : '',\n this.sizeClass\n ];\n }\n\n get titleText(): string {\n return this.textService.getText(this.title);\n }\n\n get bodyText(): string {\n return this.textService.getText(this.body);\n }\n\n get statusColorClass(): string {\n return `bg-${this.statusColor}`;\n }\n\n get sizeClass(): string {\n let cls = '';\n\n switch (this.size) {\n case 'small':\n cls = 'modal-sm';\n break;\n case 'large':\n cls = 'modal-lg';\n break;\n case 'extra-large':\n cls = 'modal-xl';\n break;\n }\n\n return cls;\n }\n\n private readonly openClass = 'modal-open';\n private readonly textService = inject(TextService);\n private readonly elementRef = inject(ElementRef);\n private readonly layoutService = inject(LayoutService);\n private readonly scrollbarService = inject(ScrollbarService);\n private readonly renderer = inject(Renderer2);\n private readonly document = inject(DOCUMENT);\n\n private get element(): any {\n return this.elementRef.nativeElement;\n }\n\n prepareToShow(config?: ModalConfig): void {\n this.setupConfig(config);\n this.scrollbarService.hide();\n this.layoutService.addBodyClasses(this.openClass);\n this.adjustDialog();\n this.setupActionButtons();\n }\n\n show(): void {\n this.setupListeners();\n\n this.styleDisplay = 'block';\n this.ariaHidden = false;\n this.ariaModal = true;\n this.element.scrollTop = 0;\n this.dialog().nativeElement.scrollTop = 0;\n\n LayoutUtils.reflow(this.element);\n\n const transitionSub = LayoutUtils.executeAfterTransition(this.element).subscribe(() => {\n this.element.classList.add('show');\n this.content().nativeElement.focus();\n });\n\n this.addSubscriptions(transitionSub);\n }\n\n close(result?: any): void {\n const transitionSub = LayoutUtils.executeAfterTransition(this.element).subscribe(() => {\n this.styleDisplay = undefined;\n this.ariaHidden = true;\n this.ariaModal = false;\n\n if (!!this.afterClose) {\n this.afterClose(result);\n }\n\n this.overlay.hide();\n this.layoutService.removeBodyClasses(this.openClass);\n this.modalContainerRef.destroy();\n });\n\n this.element.classList.remove('show');\n this.addSubscriptions(transitionSub);\n }\n\n buttonClick(event: MouseEvent, btn: ButtonModel): void {\n if (!!btn.clickFunction) {\n btn.clickFunction({ event, data: btn });\n }\n }\n\n getBodyInstance<T>(): OptionalType<T> {\n return <T>this.bodyContentOutlet()?.['_componentRef'].instance;\n }\n\n private adjustDialog(): void {\n const isModalOverflowing = this.element.scrollHeight > this.document.documentElement.clientHeight;\n const scrollbarWidth = this.scrollbarService.getWidth();\n const isBodyOverflowing = scrollbarWidth > 0;\n\n if (isBodyOverflowing && !isModalOverflowing) {\n this.renderer.setStyle(this.element, 'paddingRight', `${scrollbarWidth}px`);\n }\n\n if (!isBodyOverflowing && isModalOverflowing) {\n this.renderer.setStyle(this.element, 'paddingLeft', `${scrollbarWidth}px`);\n }\n }\n\n private setupConfig(config?: ModalConfig): void {\n if (!config) {\n return;\n }\n\n const configModel = new ModalConfigModel(config);\n this.size = configModel.size;\n this.isVerticallyCentered = configModel.isVerticallyCentered;\n this.isScrollable = configModel.isScrollable;\n this.showCancelButton = configModel.showCancelButton;\n this.showCloseButton = configModel.showCloseButton;\n this.shouldDismissOnEsc = configModel.shouldDismissOnEsc;\n this.shouldDismissOnOutsideClick = configModel.shouldDismissOnOutsideClick;\n this.isAlert = configModel.isAlert;\n this.isTextCentered = configModel.isTextCentered;\n this.statusColor = configModel.statusColor;\n this.headerTemplateRef = configModel.headerTemplateRef;\n this.footerTemplateRef = configModel.footerTemplateRef;\n this.bodyTemplateRef = configModel.bodyTemplateRef;\n this.bodyContentType = configModel.bodyContentType;\n this.body = configModel.body;\n this.title = configModel.title;\n this.titleIcon = configModel.titleIcon;\n this.titleIconPosition = configModel.titleIconPosition;\n this.footerLayout = configModel.footerLayout;\n this.actionButtons = configModel.actionButtons;\n this.data = configModel.data;\n }\n\n private setupActionButtons(): void {\n this.actionButtons.forEach(btn => {\n const fnBackup = btn.clickFunction;\n btn.clickFunction = event => {\n event.data = this;\n fnBackup!(event);\n };\n });\n }\n\n private setupListeners(): void {\n if (this.shouldDismissOnOutsideClick) {\n this.element.addEventListener('click', this.clickCallback);\n }\n\n if (this.shouldDismissOnEsc) {\n this.element.addEventListener('keydown', this.escCallback);\n }\n }\n\n private clickCallback = (evt: Event) => {\n if (evt.target === this.element) {\n this.close();\n }\n };\n\n private escCallback = (evt: KeyboardEvent) => {\n if (evt.key === 'Escape') {\n this.close();\n }\n };\n}\n","<ng-container *transloco=\"let t; prefix: 'UpDevs.Modal'\">\n <div [ngClass]=\"classes\" #dialog>\n <div class=\"modal-content\" tabindex=\"-1\" #content>\n @if (!!contentType) {\n <ng-container [ngComponentOutlet]=\"contentType\" [ngComponentOutletInputs]=\"{modalRef: this, data: data}\"></ng-container>\n } @else {\n @if (!isAlert && (!!titleText || !!headerTemplateRef)) {\n <div class=\"modal-header\">\n @if (!!headerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"headerTemplateRef\" [ngTemplateOutletContext]=\"{modalRef: this, data: data}\">\n </ng-container>\n } @else {\n <h5 class=\"modal-title\">{{ titleText }}</h5>\n @if (showCloseButton) {\n <ng-container [ngTemplateOutlet]=\"closeBtnTpl\"></ng-container>\n }\n }\n </div>\n } @else if (showCloseButton) {\n <ng-container [ngTemplateOutlet]=\"closeBtnTpl\"></ng-container>\n }\n\n <div class=\"modal-body py-4\" [class.text-center]=\"isTextCentered || isAlert\">\n @if (isAlert && !!titleText) {\n <div class=\"d-flex justify-content-center align-content-start\"\n [class.flex-row]=\"titleIconPosition === 'left' || titleIconPosition === 'right'\"\n [class.flex-column]=\"titleIconPosition === 'top' || titleIconPosition === 'bottom'\">\n @if (!!titleIcon && (titleIconPosition === 'top' || titleIconPosition === 'left')) {\n <upd-icon [model]=\"titleIcon\" [class.me-2]=\"titleIconPosition === 'left'\"\n [class.mb-2]=\"titleIconPosition === 'top'\"></upd-icon>\n }\n\n <span class=\"align-self-center fs-3 fw-bold\" [class.mb-3]=\"!!titleIcon && titleIconPosition === 'top'\">\n {{ titleText }}\n </span>\n\n @if (!!titleIcon && (titleIconPosition === 'bottom' || titleIconPosition === 'right')) {\n <upd-icon [model]=\"titleIcon\" [class.ms-2]=\"titleIconPosition === 'right'\"\n [class.mb-2]=\"titleIconPosition === 'bottom'\"></upd-icon>\n }\n </div>\n }\n\n @if (!!bodyTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"bodyTemplateRef!\" [ngTemplateOutletContext]=\"{modalRef: this, data: data}\">\n </ng-container>\n } @else if (!!bodyContentType) {\n <ng-container [ngComponentOutlet]=\"bodyContentType\" [ngComponentOutletInputs]=\"{modalRef: this, data: data}\">\n </ng-container>\n } @else {\n <div [innerHTML]=\"bodyText\" [class.text-secondary]=\"isAlert\"></div>\n }\n </div>\n\n @if (!!statusColor) {\n <div class=\"modal-status\" [style.position]=\"'relative'\" [ngClass]=\"statusColorClass\"></div>\n }\n\n @if (showCancelButton || actionButtons.length > 0 || !!footerTemplateRef) {\n <div class=\"modal-footer\">\n @if (!!footerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"footerTemplateRef\" [ngTemplateOutletContext]=\"{modalRef: this, data: data}\">\n </ng-container>\n } @else {\n @switch (footerLayout) {\n @case ('full-width') {\n <div class=\"w-100\">\n <div class=\"row\">\n @if (showCancelButton) {\n <div class=\"col\">\n <upd-button class=\"w-100\" [isNavigationLink]=\"true\" (clicked)=\"close()\">\n {{ t('Cancel') }}\n </upd-button>\n </div>\n }\n\n @for (btn of actionButtons; track btn) {\n <div class=\"col\">\n <upd-button class=\"w-100\" [model]=\"btn\"></upd-button>\n </div>\n }\n </div>\n </div>\n }\n @case ('centered') {\n <div class=\"d-flex justify-content-center w-100\">\n <ng-container [ngTemplateOutlet]=\"buttonsTpl\"></ng-container>\n </div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"buttonsTpl\"></ng-container>\n }\n }\n }\n </div>\n }\n }\n </div>\n </div>\n\n <ng-template #closeBtnTpl>\n <upd-button (clicked)=\"close()\" [shouldIgnoreBtnClass]=\"true\" customClasses=\"btn-close\"></upd-button>\n </ng-template>\n\n <ng-template #buttonsTpl>\n @if (showCancelButton) {\n <upd-button colorStyle=\"secondary\" [isLink]=\"true\" (clicked)=\"close()\">\n {{ t('Cancel') }}\n </upd-button>\n }\n\n @for (btn of actionButtons; track btn) {\n <upd-button [model]=\"btn\" (clicked)=\"buttonClick($event, btn)\"></upd-button>\n }\n </ng-template>\n</ng-container>\n","import { Injectable, inject, ViewContainerRef, ApplicationRef } from '@angular/core';\nimport { DynamicComponentLoaderService, OverlayService } from '@updevs/sdk/layout';\nimport { ComponentType } from '@updevs/sdk/types';\n\nimport { ModalContainerComponent } from '../components/modal-container/modal-container.component';\nimport { ModalConfig } from '../models/modal.config';\nimport { ModalRef } from '../models/modal-ref';\n\n@Injectable()\nexport class ModalService {\n private readonly dynamicComponentLoaderService = inject(DynamicComponentLoaderService);\n private readonly overlayService = inject(OverlayService);\n private readonly applicationRef = inject(ApplicationRef);\n\n open<T>(\n contentType?: ComponentType<T>,\n config?: ModalConfig,\n rootElement?: Element,\n shouldDisposeOnClick = false,\n shouldDisposeOnEsc = false\n ): ModalRef {\n const viewContainerRef = this.applicationRef.components[0].injector.get(ViewContainerRef);\n const modalContainerRef = this.dynamicComponentLoaderService.load(ModalContainerComponent, viewContainerRef);\n const overlay = this.overlayService.create({ rootElement, customClasses: ['modal-backdrop'] });\n\n modalContainerRef.instance.prepareToShow(config);\n\n modalContainerRef.instance.modalContainerRef = modalContainerRef;\n modalContainerRef.instance.overlay = overlay;\n modalContainerRef.instance.contentType = contentType;\n modalContainerRef.instance.shouldDismissOnOutsideClick = config?.shouldDismissOnOutsideClick || shouldDisposeOnClick;\n modalContainerRef.instance.shouldDismissOnEsc = config?.shouldDismissOnEsc || shouldDisposeOnEsc;\n\n overlay.show().subscribe(() => modalContainerRef.instance.show());\n\n return modalContainerRef.instance;\n }\n}\n","import { Injectable, inject, signal } from '@angular/core';\nimport { TextModel } from '@updevs/sdk';\nimport { ButtonModel } from '@updevs/sdk/layout';\nimport { TopBottomLeftRightType, BgColorStyleType } from '@updevs/sdk/types';\nimport { IconModel, TablerIconsType } from '@updevs/icons';\nimport { Observable, Subject } from 'rxjs';\n\nimport { ModalService } from './modal.service';\nimport { ModalSizeType } from '../types/modal-size.type';\nimport { ModalFooterStyleType } from '../types/modal-footer-style.type';\nimport { ModalRef } from '../models/modal-ref';\n\n@Injectable()\nexport class ModalAlertService {\n private readonly modalService = inject(ModalService);\n private readonly defaultIconModel: IconModel = { tablerIconWeight: 'medium-light', tablerIconSize: 48 };\n\n showWarning(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): ModalRef {\n return this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.WarningTitle', isTranslated: false },\n 'alert-triangle',\n 'text-warning',\n 'warning',\n actionButtons\n );\n }\n\n showError(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): ModalRef {\n return this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.ErrorTitle', isTranslated: false },\n 'exclamation-circle',\n 'text-danger',\n 'danger',\n actionButtons\n );\n }\n\n showInfo(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): ModalRef {\n return this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.InfoTitle', isTranslated: false },\n 'info-circle',\n 'text-info',\n 'info',\n actionButtons\n );\n }\n\n showSuccess(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): ModalRef {\n return this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.SuccessTitle', isTranslated: false },\n 'circle-check',\n 'text-success',\n 'success',\n actionButtons\n );\n }\n\n showConfirm(message: TextModel, title?: TextModel, actionButtons: ButtonModel[] = []): Observable<boolean> {\n // eslint-disable-next-line prefer-const\n let modalRef: ModalRef;\n const statusColor: BgColorStyleType = 'indigo';\n const result = new Subject<boolean>();\n\n if (actionButtons.length < 1) {\n actionButtons = [\n new ButtonModel({\n text: signal({ text: 'UpDevs.ModalAlert.ConfirmNo', isTranslated: false }),\n isOutline: signal(true),\n clickFunction: () => {\n result.next(false);\n modalRef.close();\n }\n }),\n new ButtonModel({\n text: signal({ text: 'UpDevs.ModalAlert.ConfirmYes', isTranslated: false }),\n colorStyle: signal(statusColor),\n clickFunction: () => {\n result.next(true);\n modalRef.close();\n }\n })\n ];\n }\n\n modalRef = this.open(\n message,\n title || { text: 'UpDevs.ModalAlert.ConfirmationTitle', isTranslated: false },\n 'checklist',\n 'text-indigo',\n statusColor,\n actionButtons,\n 'full-width'\n );\n\n return result;\n }\n\n showCustom(\n message: TextModel,\n title: TextModel,\n titleIcon: IconModel,\n titleIconPosition: TopBottomLeftRightType,\n statusColor: BgColorStyleType,\n actionButtons: ButtonModel[] = [],\n size: ModalSizeType = 'small',\n footerLayout: ModalFooterStyleType = 'default'\n ): ModalRef {\n return this.modalService.open(undefined, {\n isAlert: true,\n title,\n titleIcon,\n titleIconPosition,\n size,\n body: message,\n statusColor,\n footerLayout,\n actionButtons\n });\n }\n\n private open(\n message: TextModel,\n title: TextModel,\n titleIconType: TablerIconsType,\n titleIconColorClass: string,\n statusColor: BgColorStyleType,\n actionButtons: ButtonModel[],\n footerLayout: ModalFooterStyleType = 'default'\n ): ModalRef {\n // eslint-disable-next-line prefer-const\n let modalRef: ModalRef;\n const titleIcon: IconModel = {\n ...this.defaultIconModel,\n tablerIcon: titleIconType,\n colorClass: titleIconColorClass\n };\n\n if (actionButtons.length < 1) {\n actionButtons.push(\n new ButtonModel({\n text: signal({ text: 'UpDevs.ModalAlert.OkButtonTitle', isTranslated: false }),\n colorStyle: signal(statusColor),\n clickFunction: () => modalRef.close()\n })\n );\n }\n\n modalRef = this.modalService.open(undefined, {\n isAlert: true,\n title,\n titleIcon,\n titleIconPosition: 'top',\n size: 'small',\n body: message,\n statusColor,\n footerLayout,\n actionButtons,\n showCloseButton: false\n });\n\n return modalRef;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdCoreLayoutModule } from '@updevs/sdk/layout';\nimport { UpdIconsModule } from '@updevs/icons';\nimport { UpdMessagesModule, MessagesService, MessageTypeEnum } from '@updevs/sdk/messages';\nimport { OptionalType } from '@updevs/sdk/types';\nimport { UpdButtonModule } from '@updevs/components/button';\nimport { TranslocoService, TranslocoDirective } from '@jsverse/transloco';\n\nimport * as en from './assets/i18n/en.json';\nimport * as pt from './assets/i18n/pt.json';\nimport { ModalService } from './services/modal.service';\nimport { ModalContainerComponent } from './components/modal-container/modal-container.component';\nimport { ModalAlertService } from './services/modal-alert.service';\nimport { ModalRef } from './models/modal-ref';\n\n@NgModule({\n imports: [\n CommonModule,\n UpdCoreLayoutModule,\n UpdButtonModule,\n UpdIconsModule,\n UpdMessagesModule,\n TranslocoDirective\n ],\n declarations: [\n ModalContainerComponent\n ],\n providers: [\n ModalService,\n ModalAlertService\n ]\n})\nexport class UpdModalModule {\n constructor(translocoService: TranslocoService, modalAlertService: ModalAlertService, messagesService: MessagesService) {\n translocoService.setFallbackLangForMissingTranslation({ fallbackLang: 'en' });\n translocoService.setTranslation(en, 'en');\n translocoService.setTranslation(pt, 'pt');\n this.setupMessagesService(modalAlertService, messagesService);\n }\n\n private setupMessagesService(modalAlertService: ModalAlertService, messagesService: MessagesService): void {\n messagesService.onNewMessage.subscribe(msg => {\n if (msg.isModal) {\n if (!!msg.onShown) {\n msg.onShown();\n }\n\n let modalRef: OptionalType<ModalRef>;\n\n switch (msg.type) {\n case MessageTypeEnum.Warning:\n modalRef = modalAlertService.showWarning(msg.message, msg.title);\n break;\n case MessageTypeEnum.Info:\n modalRef = modalAlertService.showInfo(msg.message, msg.title);\n break;\n case MessageTypeEnum.Error:\n modalRef = modalAlertService.showError(msg.message, msg.title);\n break;\n case MessageTypeEnum.Success:\n modalRef = modalAlertService.showSuccess(msg.message, msg.title);\n break;\n case MessageTypeEnum.Confirm:\n modalAlertService.showConfirm(msg.message, msg.title);\n break;\n }\n\n if (!!modalRef && !!msg.onHidden) {\n modalRef.afterClose = msg.onHidden;\n }\n }\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["LayoutUtils","i4","en","pt","i1","i2.ModalAlertService","i3"],"mappings":";;;;;;;;;;;;;;;;MAKsB,SAAS,CAAA;AAD/B,IAAA,WAAA,GAAA;AAEI,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAY;AACrC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAS;AACjC;8GAHqB,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAT,SAAS,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAD9B;;;MCMY,gBAAgB,CAAA;AAuBzB,IAAA,WAAA,CAAY,IAA2B,EAAA;QAtBvC,IAAI,CAAA,IAAA,GAAkB,SAAS;QAC/B,IAAoB,CAAA,oBAAA,GAAG,IAAI;QAC3B,IAAY,CAAA,YAAA,GAAG,KAAK;QACpB,IAAgB,CAAA,gBAAA,GAAG,KAAK;QACxB,IAAe,CAAA,eAAA,GAAG,IAAI;QACtB,IAAc,CAAA,cAAA,GAAG,IAAI;QACrB,IAAkB,CAAA,kBAAA,GAAG,KAAK;QAC1B,IAA2B,CAAA,2BAAA,GAAG,KAAK;QACnC,IAAO,CAA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,IAAA,EAAA,cAAc,EALZ,SAAA,EAAA;YACP,YAAY;YACZ;AACH,SAAA,EAAA,OAAA,EAAA,CAbG,YAAY;YACZ,mBAAmB;YACnB,eAAe;YACf,cAAc;YACd,iBAAiB,CAAA,EAAA,CAAA,CAAA;;2FAWZ,cAAc,EAAA,UAAA,EAAA,CAAA;kBAjB1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,mBAAmB;wBACnB,eAAe;wBACf,cAAc;wBACd,iBAAiB;wBACjB;AACH,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV;AACH,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACP,YAAY;wBACZ;AACH;AACJ,iBAAA;;;AChCD;;AAEG;;;;"}
|
|
@@ -58,7 +58,7 @@ class PaginatorComponent {
|
|
|
58
58
|
this.changed.emit();
|
|
59
59
|
}
|
|
60
60
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: PaginatorComponent, selector: "upd-paginator", inputs: { startPageIndex: { classPropertyName: "startPageIndex", publicName: "startPageIndex", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: true, isRequired: false, transformFunction: null }, availablePageSizes: { classPropertyName: "availablePageSizes", publicName: "availablePageSizes", isSignal: true, isRequired: false, transformFunction: null }, defaultInitPageSize: { classPropertyName: "defaultInitPageSize", publicName: "defaultInitPageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayFirstIcon: { classPropertyName: "shouldDisplayFirstIcon", publicName: "shouldDisplayFirstIcon", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayFirstText: { classPropertyName: "shouldDisplayFirstText", publicName: "shouldDisplayFirstText", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayPreviousIcon: { classPropertyName: "shouldDisplayPreviousIcon", publicName: "shouldDisplayPreviousIcon", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayPreviousText: { classPropertyName: "shouldDisplayPreviousText", publicName: "shouldDisplayPreviousText", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayNextIcon: { classPropertyName: "shouldDisplayNextIcon", publicName: "shouldDisplayNextIcon", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayNextText: { classPropertyName: "shouldDisplayNextText", publicName: "shouldDisplayNextText", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayLastIcon: { classPropertyName: "shouldDisplayLastIcon", publicName: "shouldDisplayLastIcon", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayLastText: { classPropertyName: "shouldDisplayLastText", publicName: "shouldDisplayLastText", isSignal: true, isRequired: false, transformFunction: null }, previousDescription: { classPropertyName: "previousDescription", publicName: "previousDescription", isSignal: true, isRequired: false, transformFunction: null }, nextDescription: { classPropertyName: "nextDescription", publicName: "nextDescription", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", currentPage: "currentPageChange", pageSize: "pageSizeChange" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Paginator'\">\n <div class=\"d-flex m-0 ms-auto align-items-center\">\n <div class=\"text-secondary me-2\">\n {{ t('ItemsPerPage') }}\n </div>\n <upd-select [items]=\"pageOptions()\" [value]=\"selectedPageSize()\" (selectedItem)=\"onSelectPageSize($event)\"\n [shouldShowClearButton]=\"false\" [isCompact]=\"true\" [useSystemStyle]=\"true\"></upd-select>\n <p class=\"m-0 text-secondary ms-4\">\n @if (totalRecords() > 0) {\n {{ t('FromToOf', { first: currentFirstDisplayed(), last: currentLastDisplayed(), totalRecords: totalRecords() }) }}\n } @else {\n {{ t('NoRecords') }}\n }\n </p>\n <ul class=\"pagination m-0 ms-4\">\n @if (!previousDescription()) {\n <li class=\"page-item\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayFirstText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isFirstDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isFirstDisabled()\"\n [isDisabled]=\"isPreviousDisabled()\" (clicked)=\"selectPage(startPageIndex())\">\n @if (shouldDisplayFirstIcon()) {\n <upd-icon tablerIcon=\"chevron-left-pipe\"></upd-icon>\n }\n @if (shouldDisplayFirstText()) {\n {{ t('First') }}\n }\n </upd-button>\n </li>\n }\n\n <li class=\"page-item\" [class.page-prev]=\"!!previousDescription()\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayPreviousText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isPreviousDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isPreviousDisabled()\"\n [isDisabled]=\"isPreviousDisabled()\" (clicked)=\"selectPage(currentPage() - 1)\">\n @if (!!previousDescription()) {\n <div class=\"page-item-subtitle\">{{ t('Previous') }}</div>\n <div class=\"page-item-title\">{{ textService.getText(previousDescription()) }}</div>\n } @else {\n @if (shouldDisplayPreviousIcon()) {\n <upd-icon tablerIcon=\"chevron-left\"></upd-icon>\n }\n @if (shouldDisplayPreviousText()) {\n {{ t('PreviousShort') }}\n }\n }\n </upd-button>\n </li>\n\n <li class=\"page-item\" [class.page-next]=\"!!nextDescription()\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayNextText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isNextDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isNextDisabled()\" [isDisabled]=\"isNextDisabled()\"\n (clicked)=\"selectPage(currentPage() + 1)\">\n @if (!!nextDescription()) {\n <div class=\"page-item-subtitle\">{{ t('Next') }}</div>\n <div class=\"page-item-title\">{{ textService.getText(nextDescription()) }}</div>\n } @else {\n @if (shouldDisplayNextText()) {\n {{ t('NextShort') }}\n }\n @if (shouldDisplayNextIcon()) {\n <upd-icon tablerIcon=\"chevron-right\"></upd-icon>\n }\n }\n </upd-button>\n </li>\n\n @if (!nextDescription()) {\n <li class=\"page-item\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayLastText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isLastDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isLastDisabled()\" [isDisabled]=\"isNextDisabled()\"\n (clicked)=\"selectPage(totalPages() - (startPageIndex() === 0 ? 1 : 0))\">\n @if (shouldDisplayLastText()) {\n {{ t('Last') }}\n }\n @if (shouldDisplayLastIcon()) {\n <upd-icon tablerIcon=\"chevron-right-pipe\"></upd-icon>\n }\n </upd-button>\n </li>\n }\n </ul>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "component", type: i1.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i2.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i3.SelectComponent, selector: "upd-select", inputs: ["useSystemStyle", "shouldShowClearButton", "shouldTruncateSelectedText", "isCompact", "value"], outputs: ["valueChange", "selectedItem"] }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: PaginatorComponent, selector: "upd-paginator", inputs: { startPageIndex: { classPropertyName: "startPageIndex", publicName: "startPageIndex", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: true, isRequired: false, transformFunction: null }, availablePageSizes: { classPropertyName: "availablePageSizes", publicName: "availablePageSizes", isSignal: true, isRequired: false, transformFunction: null }, defaultInitPageSize: { classPropertyName: "defaultInitPageSize", publicName: "defaultInitPageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayFirstIcon: { classPropertyName: "shouldDisplayFirstIcon", publicName: "shouldDisplayFirstIcon", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayFirstText: { classPropertyName: "shouldDisplayFirstText", publicName: "shouldDisplayFirstText", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayPreviousIcon: { classPropertyName: "shouldDisplayPreviousIcon", publicName: "shouldDisplayPreviousIcon", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayPreviousText: { classPropertyName: "shouldDisplayPreviousText", publicName: "shouldDisplayPreviousText", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayNextIcon: { classPropertyName: "shouldDisplayNextIcon", publicName: "shouldDisplayNextIcon", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayNextText: { classPropertyName: "shouldDisplayNextText", publicName: "shouldDisplayNextText", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayLastIcon: { classPropertyName: "shouldDisplayLastIcon", publicName: "shouldDisplayLastIcon", isSignal: true, isRequired: false, transformFunction: null }, shouldDisplayLastText: { classPropertyName: "shouldDisplayLastText", publicName: "shouldDisplayLastText", isSignal: true, isRequired: false, transformFunction: null }, previousDescription: { classPropertyName: "previousDescription", publicName: "previousDescription", isSignal: true, isRequired: false, transformFunction: null }, nextDescription: { classPropertyName: "nextDescription", publicName: "nextDescription", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", currentPage: "currentPageChange", pageSize: "pageSizeChange" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Paginator'\">\n <div class=\"d-flex m-0 ms-auto align-items-center\">\n <div class=\"text-secondary me-2\">\n {{ t('ItemsPerPage') }}\n </div>\n <upd-select [items]=\"pageOptions()\" [value]=\"selectedPageSize()\" (selectedItem)=\"onSelectPageSize($event)\"\n [shouldShowClearButton]=\"false\" [isCompact]=\"true\" [useSystemStyle]=\"true\"></upd-select>\n <p class=\"m-0 text-secondary ms-4\">\n @if (totalRecords() > 0) {\n {{ t('FromToOf', { first: currentFirstDisplayed(), last: currentLastDisplayed(), totalRecords: totalRecords() }) }}\n } @else {\n {{ t('NoRecords') }}\n }\n </p>\n <ul class=\"pagination m-0 ms-4\">\n @if (!previousDescription()) {\n <li class=\"page-item\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayFirstText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isFirstDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isFirstDisabled()\"\n [isDisabled]=\"isPreviousDisabled()\" (clicked)=\"selectPage(startPageIndex())\">\n @if (shouldDisplayFirstIcon()) {\n <upd-icon tablerIcon=\"chevron-left-pipe\"></upd-icon>\n }\n @if (shouldDisplayFirstText()) {\n {{ t('First') }}\n }\n </upd-button>\n </li>\n }\n\n <li class=\"page-item\" [class.page-prev]=\"!!previousDescription()\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayPreviousText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isPreviousDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isPreviousDisabled()\"\n [isDisabled]=\"isPreviousDisabled()\" (clicked)=\"selectPage(currentPage() - 1)\">\n @if (!!previousDescription()) {\n <div class=\"page-item-subtitle\">{{ t('Previous') }}</div>\n <div class=\"page-item-title\">{{ textService.getText(previousDescription()) }}</div>\n } @else {\n @if (shouldDisplayPreviousIcon()) {\n <upd-icon tablerIcon=\"chevron-left\"></upd-icon>\n }\n @if (shouldDisplayPreviousText()) {\n {{ t('PreviousShort') }}\n }\n }\n </upd-button>\n </li>\n\n <li class=\"page-item\" [class.page-next]=\"!!nextDescription()\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayNextText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isNextDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isNextDisabled()\" [isDisabled]=\"isNextDisabled()\"\n (clicked)=\"selectPage(currentPage() + 1)\">\n @if (!!nextDescription()) {\n <div class=\"page-item-subtitle\">{{ t('Next') }}</div>\n <div class=\"page-item-title\">{{ textService.getText(nextDescription()) }}</div>\n } @else {\n @if (shouldDisplayNextText()) {\n {{ t('NextShort') }}\n }\n @if (shouldDisplayNextIcon()) {\n <upd-icon tablerIcon=\"chevron-right\"></upd-icon>\n }\n }\n </upd-button>\n </li>\n\n @if (!nextDescription()) {\n <li class=\"page-item\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayLastText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isLastDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isLastDisabled()\" [isDisabled]=\"isNextDisabled()\"\n (clicked)=\"selectPage(totalPages() - (startPageIndex() === 0 ? 1 : 0))\">\n @if (shouldDisplayLastText()) {\n {{ t('Last') }}\n }\n @if (shouldDisplayLastIcon()) {\n <upd-icon tablerIcon=\"chevron-right-pipe\"></upd-icon>\n }\n </upd-button>\n </li>\n }\n </ul>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "component", type: i1.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i2.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title", "stopPropagation"], outputs: ["clicked"] }, { kind: "component", type: i3.SelectComponent, selector: "upd-select", inputs: ["useSystemStyle", "shouldShowClearButton", "shouldTruncateSelectedText", "isCompact", "value"], outputs: ["valueChange", "selectedItem"] }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] }); }
|
|
62
62
|
}
|
|
63
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
64
64
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updevs-components-paginator.mjs","sources":["../../../../libs/components/paginator/src/paginator.component.ts","../../../../libs/components/paginator/src/paginator.component.html","../../../../libs/components/paginator/src/upd-paginator.module.ts","../../../../libs/components/paginator/src/updevs-components-paginator.ts"],"sourcesContent":["import { Component, inject, HostBinding, effect, input, computed, Signal, model, Output, EventEmitter } from '@angular/core';\nimport { TextModel, TextService } from '@updevs/sdk';\nimport { SelectItem } from '@updevs/components/form-controls/select';\n\n@Component({\n selector: 'upd-paginator',\n templateUrl: './paginator.component.html',\n styleUrl: './paginator.component.scss'\n})\nexport class PaginatorComponent {\n @HostBinding('class') hostClasses = '';\n @Output() readonly changed = new EventEmitter<void>();\n\n startPageIndex = input<0 | 1>(0);\n currentPage = model<number>(this.startPageIndex());\n wrapperClasses = input<string>('');\n availablePageSizes = input<number[]>([5, 10, 15, 25, 50]);\n defaultInitPageSize = input<number>(10);\n pageSize = model<number>(this.defaultInitPageSize());\n shouldDisplayFirstIcon = input<boolean>(true);\n shouldDisplayFirstText = input<boolean>(true);\n shouldDisplayPreviousIcon = input<boolean>(true);\n shouldDisplayPreviousText = input<boolean>(true);\n shouldDisplayNextIcon = input<boolean>(true);\n shouldDisplayNextText = input<boolean>(true);\n shouldDisplayLastIcon = input<boolean>(true);\n shouldDisplayLastText = input<boolean>(true);\n previousDescription = input<TextModel>();\n nextDescription = input<TextModel>();\n totalRecords = input<number>(0);\n isFirstDisabled = computed(() => this.currentPage() === this.startPageIndex() || this.totalRecords() === 0);\n isPreviousDisabled = computed(() => this.currentPage() === this.startPageIndex() || this.totalRecords() === 0);\n isNextDisabled = computed(() => this.currentPage() + 1 === this.totalPages() || this.totalRecords() === 0);\n isLastDisabled = computed(() => this.currentPage() + 1 === this.totalPages() || this.totalRecords() === 0);\n pageOptions: Signal<SelectItem[]> = computed(() => this.availablePageSizes().map(ps => ({ value: ps, text: ps.toString() })));\n selectedPageSize = computed(() => this.pageOptions().find(po => po.value === this.pageSize()));\n totalPages = computed(() => Math.ceil(this.totalRecords() / this.pageSize()));\n currentFirstDisplayed = computed(() => ((this.currentPage() - this.startPageIndex()) * this.pageSize()) + 1);\n currentLastDisplayed = computed(() => (this.expectedLast() > this.totalRecords() ? this.totalRecords() : this.expectedLast()));\n\n readonly textService = inject(TextService);\n\n private expectedLast = computed(() => (this.currentPage() + (this.startPageIndex() === 1 ? 0 : 1)) * this.pageSize());\n private readonly defaultWrapperClasses = 'd-flex align-items-center';\n\n constructor() {\n effect(() => {\n this.hostClasses = `${this.defaultWrapperClasses} ${this.wrapperClasses()}`;\n });\n }\n\n onSelectPageSize(page?: SelectItem): void {\n console.log('page', page);\n this.pageSize.set(page?.value || 1);\n this.changed.emit();\n }\n\n selectPage(page: number): void {\n this.currentPage.set(page);\n this.changed.emit();\n }\n}\n","<ng-container *transloco=\"let t; prefix: 'UpDevs.Paginator'\">\n <div class=\"d-flex m-0 ms-auto align-items-center\">\n <div class=\"text-secondary me-2\">\n {{ t('ItemsPerPage') }}\n </div>\n <upd-select [items]=\"pageOptions()\" [value]=\"selectedPageSize()\" (selectedItem)=\"onSelectPageSize($event)\"\n [shouldShowClearButton]=\"false\" [isCompact]=\"true\" [useSystemStyle]=\"true\"></upd-select>\n <p class=\"m-0 text-secondary ms-4\">\n @if (totalRecords() > 0) {\n {{ t('FromToOf', { first: currentFirstDisplayed(), last: currentLastDisplayed(), totalRecords: totalRecords() }) }}\n } @else {\n {{ t('NoRecords') }}\n }\n </p>\n <ul class=\"pagination m-0 ms-4\">\n @if (!previousDescription()) {\n <li class=\"page-item\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayFirstText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isFirstDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isFirstDisabled()\"\n [isDisabled]=\"isPreviousDisabled()\" (clicked)=\"selectPage(startPageIndex())\">\n @if (shouldDisplayFirstIcon()) {\n <upd-icon tablerIcon=\"chevron-left-pipe\"></upd-icon>\n }\n @if (shouldDisplayFirstText()) {\n {{ t('First') }}\n }\n </upd-button>\n </li>\n }\n\n <li class=\"page-item\" [class.page-prev]=\"!!previousDescription()\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayPreviousText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isPreviousDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isPreviousDisabled()\"\n [isDisabled]=\"isPreviousDisabled()\" (clicked)=\"selectPage(currentPage() - 1)\">\n @if (!!previousDescription()) {\n <div class=\"page-item-subtitle\">{{ t('Previous') }}</div>\n <div class=\"page-item-title\">{{ textService.getText(previousDescription()) }}</div>\n } @else {\n @if (shouldDisplayPreviousIcon()) {\n <upd-icon tablerIcon=\"chevron-left\"></upd-icon>\n }\n @if (shouldDisplayPreviousText()) {\n {{ t('PreviousShort') }}\n }\n }\n </upd-button>\n </li>\n\n <li class=\"page-item\" [class.page-next]=\"!!nextDescription()\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayNextText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isNextDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isNextDisabled()\" [isDisabled]=\"isNextDisabled()\"\n (clicked)=\"selectPage(currentPage() + 1)\">\n @if (!!nextDescription()) {\n <div class=\"page-item-subtitle\">{{ t('Next') }}</div>\n <div class=\"page-item-title\">{{ textService.getText(nextDescription()) }}</div>\n } @else {\n @if (shouldDisplayNextText()) {\n {{ t('NextShort') }}\n }\n @if (shouldDisplayNextIcon()) {\n <upd-icon tablerIcon=\"chevron-right\"></upd-icon>\n }\n }\n </upd-button>\n </li>\n\n @if (!nextDescription()) {\n <li class=\"page-item\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayLastText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isLastDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isLastDisabled()\" [isDisabled]=\"isNextDisabled()\"\n (clicked)=\"selectPage(totalPages() - (startPageIndex() === 0 ? 1 : 0))\">\n @if (shouldDisplayLastText()) {\n {{ t('Last') }}\n }\n @if (shouldDisplayLastIcon()) {\n <upd-icon tablerIcon=\"chevron-right-pipe\"></upd-icon>\n }\n </upd-button>\n </li>\n }\n </ul>\n </div>\n</ng-container>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdIconsModule } from '@updevs/icons';\nimport { UpdButtonModule } from '@updevs/components/button';\nimport { UpdSelectModule } from '@updevs/components/form-controls/select';\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\n\nimport * as en from './assets/i18n/en.json';\nimport * as pt from './assets/i18n/pt.json';\nimport { PaginatorComponent } from './paginator.component';\n\n@NgModule({\n imports: [\n CommonModule,\n UpdIconsModule,\n UpdButtonModule,\n UpdSelectModule,\n TranslocoDirective\n ],\n declarations: [\n PaginatorComponent\n ],\n exports: [\n PaginatorComponent\n ]\n})\nexport class UpdPaginatorModule {\n constructor(translocoService: TranslocoService) {\n translocoService.setFallbackLangForMissingTranslation({ fallbackLang: 'en' });\n translocoService.setTranslation(en, 'en');\n translocoService.setTranslation(pt, 'pt');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4","en","pt","i1"],"mappings":";;;;;;;;;;;;;MASa,kBAAkB,CAAA;AAoC3B,IAAA,WAAA,GAAA;QAnCsB,IAAW,CAAA,WAAA,GAAG,EAAE;AACnB,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAQ;AAErD,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAQ,CAAC,CAAC;QAChC,IAAW,CAAA,WAAA,GAAG,KAAK,CAAS,IAAI,CAAC,cAAc,EAAE,CAAC;AAClD,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAS,EAAE,CAAC;AAClC,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAW,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AACzD,QAAA,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAS,EAAE,CAAC;QACvC,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAS,IAAI,CAAC,mBAAmB,EAAE,CAAC;AACpD,QAAA,IAAA,CAAA,sBAAsB,GAA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zC,QAAA,gBAAgB,CAAC,cAAc,CAACC,IAAE,EAAE,IAAI,CAAC;;8GAJpC,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAlB,kBAAkB,EAAA,YAAA,EAAA,CANvB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAPlB,YAAY;YACZ,cAAc;YACd,eAAe;YACf,eAAe;AACf,YAAA,kBAAkB,aAMlB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAbvB,YAAY;YACZ,cAAc;YACd,eAAe;YACf,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAUV,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAf9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,cAAc;wBACd,eAAe;wBACf,eAAe;wBACf;AACH,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL;AACH;AACJ,iBAAA;;;ACzBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"updevs-components-paginator.mjs","sources":["../../../../libs/components/paginator/src/paginator.component.ts","../../../../libs/components/paginator/src/paginator.component.html","../../../../libs/components/paginator/src/upd-paginator.module.ts","../../../../libs/components/paginator/src/updevs-components-paginator.ts"],"sourcesContent":["import { Component, inject, HostBinding, effect, input, computed, Signal, model, Output, EventEmitter } from '@angular/core';\nimport { TextModel, TextService } from '@updevs/sdk';\nimport { SelectItem } from '@updevs/components/form-controls/select';\n\n@Component({\n selector: 'upd-paginator',\n templateUrl: './paginator.component.html',\n styleUrl: './paginator.component.scss'\n})\nexport class PaginatorComponent {\n @HostBinding('class') hostClasses = '';\n @Output() readonly changed = new EventEmitter<void>();\n\n startPageIndex = input<0 | 1>(0);\n currentPage = model<number>(this.startPageIndex());\n wrapperClasses = input<string>('');\n availablePageSizes = input<number[]>([5, 10, 15, 25, 50]);\n defaultInitPageSize = input<number>(10);\n pageSize = model<number>(this.defaultInitPageSize());\n shouldDisplayFirstIcon = input<boolean>(true);\n shouldDisplayFirstText = input<boolean>(true);\n shouldDisplayPreviousIcon = input<boolean>(true);\n shouldDisplayPreviousText = input<boolean>(true);\n shouldDisplayNextIcon = input<boolean>(true);\n shouldDisplayNextText = input<boolean>(true);\n shouldDisplayLastIcon = input<boolean>(true);\n shouldDisplayLastText = input<boolean>(true);\n previousDescription = input<TextModel>();\n nextDescription = input<TextModel>();\n totalRecords = input<number>(0);\n isFirstDisabled = computed(() => this.currentPage() === this.startPageIndex() || this.totalRecords() === 0);\n isPreviousDisabled = computed(() => this.currentPage() === this.startPageIndex() || this.totalRecords() === 0);\n isNextDisabled = computed(() => this.currentPage() + 1 === this.totalPages() || this.totalRecords() === 0);\n isLastDisabled = computed(() => this.currentPage() + 1 === this.totalPages() || this.totalRecords() === 0);\n pageOptions: Signal<SelectItem[]> = computed(() => this.availablePageSizes().map(ps => ({ value: ps, text: ps.toString() })));\n selectedPageSize = computed(() => this.pageOptions().find(po => po.value === this.pageSize()));\n totalPages = computed(() => Math.ceil(this.totalRecords() / this.pageSize()));\n currentFirstDisplayed = computed(() => ((this.currentPage() - this.startPageIndex()) * this.pageSize()) + 1);\n currentLastDisplayed = computed(() => (this.expectedLast() > this.totalRecords() ? this.totalRecords() : this.expectedLast()));\n\n readonly textService = inject(TextService);\n\n private expectedLast = computed(() => (this.currentPage() + (this.startPageIndex() === 1 ? 0 : 1)) * this.pageSize());\n private readonly defaultWrapperClasses = 'd-flex align-items-center';\n\n constructor() {\n effect(() => {\n this.hostClasses = `${this.defaultWrapperClasses} ${this.wrapperClasses()}`;\n });\n }\n\n onSelectPageSize(page?: SelectItem): void {\n console.log('page', page);\n this.pageSize.set(page?.value || 1);\n this.changed.emit();\n }\n\n selectPage(page: number): void {\n this.currentPage.set(page);\n this.changed.emit();\n }\n}\n","<ng-container *transloco=\"let t; prefix: 'UpDevs.Paginator'\">\n <div class=\"d-flex m-0 ms-auto align-items-center\">\n <div class=\"text-secondary me-2\">\n {{ t('ItemsPerPage') }}\n </div>\n <upd-select [items]=\"pageOptions()\" [value]=\"selectedPageSize()\" (selectedItem)=\"onSelectPageSize($event)\"\n [shouldShowClearButton]=\"false\" [isCompact]=\"true\" [useSystemStyle]=\"true\"></upd-select>\n <p class=\"m-0 text-secondary ms-4\">\n @if (totalRecords() > 0) {\n {{ t('FromToOf', { first: currentFirstDisplayed(), last: currentLastDisplayed(), totalRecords: totalRecords() }) }}\n } @else {\n {{ t('NoRecords') }}\n }\n </p>\n <ul class=\"pagination m-0 ms-4\">\n @if (!previousDescription()) {\n <li class=\"page-item\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayFirstText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isFirstDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isFirstDisabled()\"\n [isDisabled]=\"isPreviousDisabled()\" (clicked)=\"selectPage(startPageIndex())\">\n @if (shouldDisplayFirstIcon()) {\n <upd-icon tablerIcon=\"chevron-left-pipe\"></upd-icon>\n }\n @if (shouldDisplayFirstText()) {\n {{ t('First') }}\n }\n </upd-button>\n </li>\n }\n\n <li class=\"page-item\" [class.page-prev]=\"!!previousDescription()\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayPreviousText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isPreviousDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isPreviousDisabled()\"\n [isDisabled]=\"isPreviousDisabled()\" (clicked)=\"selectPage(currentPage() - 1)\">\n @if (!!previousDescription()) {\n <div class=\"page-item-subtitle\">{{ t('Previous') }}</div>\n <div class=\"page-item-title\">{{ textService.getText(previousDescription()) }}</div>\n } @else {\n @if (shouldDisplayPreviousIcon()) {\n <upd-icon tablerIcon=\"chevron-left\"></upd-icon>\n }\n @if (shouldDisplayPreviousText()) {\n {{ t('PreviousShort') }}\n }\n }\n </upd-button>\n </li>\n\n <li class=\"page-item\" [class.page-next]=\"!!nextDescription()\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayNextText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isNextDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isNextDisabled()\" [isDisabled]=\"isNextDisabled()\"\n (clicked)=\"selectPage(currentPage() + 1)\">\n @if (!!nextDescription()) {\n <div class=\"page-item-subtitle\">{{ t('Next') }}</div>\n <div class=\"page-item-title\">{{ textService.getText(nextDescription()) }}</div>\n } @else {\n @if (shouldDisplayNextText()) {\n {{ t('NextShort') }}\n }\n @if (shouldDisplayNextIcon()) {\n <upd-icon tablerIcon=\"chevron-right\"></upd-icon>\n }\n }\n </upd-button>\n </li>\n\n @if (!nextDescription()) {\n <li class=\"page-item\">\n <upd-button customClasses=\"page-link\" [isLink]=\"true\" [isIcon]=\"!shouldDisplayLastText()\" colorStyle=\"secondary\"\n [attr.tabindex]=\"isLastDisabled() ? -1 : 0\" [attr.aria-disabled]=\"isLastDisabled()\" [isDisabled]=\"isNextDisabled()\"\n (clicked)=\"selectPage(totalPages() - (startPageIndex() === 0 ? 1 : 0))\">\n @if (shouldDisplayLastText()) {\n {{ t('Last') }}\n }\n @if (shouldDisplayLastIcon()) {\n <upd-icon tablerIcon=\"chevron-right-pipe\"></upd-icon>\n }\n </upd-button>\n </li>\n }\n </ul>\n </div>\n</ng-container>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdIconsModule } from '@updevs/icons';\nimport { UpdButtonModule } from '@updevs/components/button';\nimport { UpdSelectModule } from '@updevs/components/form-controls/select';\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\n\nimport * as en from './assets/i18n/en.json';\nimport * as pt from './assets/i18n/pt.json';\nimport { PaginatorComponent } from './paginator.component';\n\n@NgModule({\n imports: [\n CommonModule,\n UpdIconsModule,\n UpdButtonModule,\n UpdSelectModule,\n TranslocoDirective\n ],\n declarations: [\n PaginatorComponent\n ],\n exports: [\n PaginatorComponent\n ]\n})\nexport class UpdPaginatorModule {\n constructor(translocoService: TranslocoService) {\n translocoService.setFallbackLangForMissingTranslation({ fallbackLang: 'en' });\n translocoService.setTranslation(en, 'en');\n translocoService.setTranslation(pt, 'pt');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4","en","pt","i1"],"mappings":";;;;;;;;;;;;;MASa,kBAAkB,CAAA;AAoC3B,IAAA,WAAA,GAAA;QAnCsB,IAAW,CAAA,WAAA,GAAG,EAAE;AACnB,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAQ;AAErD,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAQ,CAAC,CAAC;QAChC,IAAW,CAAA,WAAA,GAAG,KAAK,CAAS,IAAI,CAAC,cAAc,EAAE,CAAC;AAClD,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAS,EAAE,CAAC;AAClC,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAW,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AACzD,QAAA,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAS,EAAE,CAAC;QACvC,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAS,IAAI,CAAC,mBAAmB,EAAE,CAAC;AACpD,QAAA,IAAA,CAAA,sBAAsB,GAAG,KAAK,CAAU,IAAI,CAAC;AAC7C,QAAA,IAAA,CAAA,sBA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EAAE,IAAI,CAAC;;8GAJpC,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAlB,kBAAkB,EAAA,YAAA,EAAA,CANvB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAPlB,YAAY;YACZ,cAAc;YACd,eAAe;YACf,eAAe;AACf,YAAA,kBAAkB,aAMlB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAbvB,YAAY;YACZ,cAAc;YACd,eAAe;YACf,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAUV,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAf9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,cAAc;wBACd,eAAe;wBACf,eAAe;wBACf;AACH,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL;AACH;AACJ,iBAAA;;;ACzBD;;AAEG;;;;"}
|
|
@@ -25,7 +25,7 @@ class PricingCardsComponent {
|
|
|
25
25
|
this.selected.emit(item);
|
|
26
26
|
}
|
|
27
27
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PricingCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: PricingCardsComponent, selector: "upd-pricing-cards", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: "<div class=\"row row-cards\">\n @for (item of items(); track item.id) {\n <div class=\"col-lg col-sm-6\">\n <upd-card [ribbonBackground]=\"!!item.ribbonIcon ? item.highlightColor : undefined\" [ribbonIcon]=\"item.ribbonIcon\"\n [ribbonStyle]=\"item.ribbonStyle || 'top'\" [statusBackground]=\"item.highlightColor\" [useLightHeader]=\"true\">\n <ng-template updCardHeader>\n <div class=\"text-uppercase text-secondary fw-bold\">{{ item.title }}</div>\n <div [class.me-6]=\"!!item.ribbonIcon\" class=\"ms-auto d-flex gap-1\">\n @for (tag of item.tags; track tag.text.text) {\n <upd-badge [bgColor]=\"tag.backgroundColor\" [text]=\"tag.text\"></upd-badge>\n }\n </div>\n </ng-template>\n\n <div class=\"d-flex flex-column h-100\">\n <div>\n <div class=\"display-5 fw-bold mb-3\" [class.text-center]=\"item.isPriceCentered\" [innerHTML]=\"item.price\"></div>\n\n @if ((item.groupedFeatures?.length || 0) > 0) {\n @for (group of item.groupedFeatures; track group.name) {\n <div class=\"bg-surface-tertiary\">\n <span class=\"subheader\">{{ group.name }}</span>\n </div>\n <ng-container [ngTemplateOutlet]=\"featuresTpl\"\n [ngTemplateOutletContext]=\"{features: group.features}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"featuresTpl\"\n [ngTemplateOutletContext]=\"{features: item.features}\"></ng-container>\n }\n </div>\n\n <div class=\"flex-grow-1\"></div>\n\n @if (!!item.description) {\n <div class=\"text-secondary mb-3\" [class.text-center]=\"item.isPriceCentered\"\n [innerHTML]=\"item.description\"></div>\n }\n\n <div class=\"text-center mt-4\">\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </div>\n </div>\n </upd-card>\n </div>\n }\n</div>\n\n<ng-template #featuresTpl let-features=\"features\">\n <ul class=\"list-unstyled lh-lg\">\n @for (feature of features; track feature.text) {\n <li [class.fw-bold]=\"feature.isHighlighted\">\n @if (feature.isIncluded) {\n <upd-icon tablerIcon=\"check\" tablerIconWeight=\"bold\" colorClass=\"text-success\"></upd-icon>\n } @else {\n <upd-icon tablerIcon=\"minus\" tablerIconWeight=\"bold\" colorClass=\"text-secondary\"></upd-icon>\n }\n\n <span class=\"ms-2\" [innerHTML]=\"feature.text\" [class.text-secondary]=\"!feature.isIncluded\"></span>\n\n @if (!!feature.extraInfo) {\n <span [updPopover]=\"feature.extraInfo\" [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"info-circle\" />\n </span>\n }\n </li>\n }\n </ul>\n</ng-template>\n", styles: [":host{display:flex}.row-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));width:100%}.col-lg{display:flex;flex-direction:column;height:100%;width:100%}upd-card{display:flex;flex-direction:column;height:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.CardComponent, selector: "upd-card", inputs: ["wrapperClasses", "title", "subtitle", "hoverEffect", "state", "type", "imagePosition", "bgColor", "stampIcon", "stampBackground", "statusBackground", "statusPosition", "ribbonBackground", "ribbonStyle", "ribbonIcon", "ribbonText", "rotate", "removeBorder", "useLightHeader", "showHeader", "isFooterTransparent", "footerText", "showProgressBar", "progress", "actions"] }, { kind: "directive", type: i2.CardHeaderDirective, selector: "ng-template[updCardHeader]" }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i5.BadgeComponent, selector: "upd-badge", inputs: ["config", "bgColor", "textColor", "text", "isOutline", "isPill", "isNotification", "isBlinking", "customClasses"] }, { kind: "directive", type: i6.PopoverDirective, selector: "[updPopover]", inputs: ["updPopover", "updPopoverTitle", "updPopoverTitleTemplate", "updPopoverTemplate", "updPopoverPlacement", "updPopoverCustomClasses", "updPopoverActAsTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: PricingCardsComponent, selector: "upd-pricing-cards", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: "<div class=\"row row-cards\">\n @for (item of items(); track item.id) {\n <div class=\"col-lg col-sm-6\">\n <upd-card [ribbonBackground]=\"!!item.ribbonIcon ? item.highlightColor : undefined\" [ribbonIcon]=\"item.ribbonIcon\"\n [ribbonStyle]=\"item.ribbonStyle || 'top'\" [statusBackground]=\"item.highlightColor\" [useLightHeader]=\"true\">\n <ng-template updCardHeader>\n <div class=\"text-uppercase text-secondary fw-bold\">{{ item.title }}</div>\n <div [class.me-6]=\"!!item.ribbonIcon\" class=\"ms-auto d-flex gap-1\">\n @for (tag of item.tags; track tag.text.text) {\n <upd-badge [bgColor]=\"tag.backgroundColor\" [text]=\"tag.text\"></upd-badge>\n }\n </div>\n </ng-template>\n\n <div class=\"d-flex flex-column h-100\">\n <div>\n <div class=\"display-5 fw-bold mb-3\" [class.text-center]=\"item.isPriceCentered\" [innerHTML]=\"item.price\"></div>\n\n @if ((item.groupedFeatures?.length || 0) > 0) {\n @for (group of item.groupedFeatures; track group.name) {\n <div class=\"bg-surface-tertiary\">\n <span class=\"subheader\">{{ group.name }}</span>\n </div>\n <ng-container [ngTemplateOutlet]=\"featuresTpl\"\n [ngTemplateOutletContext]=\"{features: group.features}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"featuresTpl\"\n [ngTemplateOutletContext]=\"{features: item.features}\"></ng-container>\n }\n </div>\n\n <div class=\"flex-grow-1\"></div>\n\n @if (!!item.description) {\n <div class=\"text-secondary mb-3\" [class.text-center]=\"item.isPriceCentered\"\n [innerHTML]=\"item.description\"></div>\n }\n\n <div class=\"text-center mt-4\">\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </div>\n </div>\n </upd-card>\n </div>\n }\n</div>\n\n<ng-template #featuresTpl let-features=\"features\">\n <ul class=\"list-unstyled lh-lg\">\n @for (feature of features; track feature.text) {\n <li [class.fw-bold]=\"feature.isHighlighted\">\n @if (feature.isIncluded) {\n <upd-icon tablerIcon=\"check\" tablerIconWeight=\"bold\" colorClass=\"text-success\"></upd-icon>\n } @else {\n <upd-icon tablerIcon=\"minus\" tablerIconWeight=\"bold\" colorClass=\"text-secondary\"></upd-icon>\n }\n\n <span class=\"ms-2\" [innerHTML]=\"feature.text\" [class.text-secondary]=\"!feature.isIncluded\"></span>\n\n @if (!!feature.extraInfo) {\n <span [updPopover]=\"feature.extraInfo\" [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"info-circle\" />\n </span>\n }\n </li>\n }\n </ul>\n</ng-template>\n", styles: [":host{display:flex}.row-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));width:100%}.col-lg{display:flex;flex-direction:column;height:100%;width:100%}upd-card{display:flex;flex-direction:column;height:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.CardComponent, selector: "upd-card", inputs: ["wrapperClasses", "title", "subtitle", "hoverEffect", "state", "type", "imagePosition", "bgColor", "stampIcon", "stampBackground", "statusBackground", "statusPosition", "ribbonBackground", "ribbonStyle", "ribbonIcon", "ribbonText", "rotate", "removeBorder", "useLightHeader", "showHeader", "isFooterTransparent", "footerText", "showProgressBar", "progress", "actions"] }, { kind: "directive", type: i2.CardHeaderDirective, selector: "ng-template[updCardHeader]" }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title", "stopPropagation"], outputs: ["clicked"] }, { kind: "component", type: i5.BadgeComponent, selector: "upd-badge", inputs: ["config", "bgColor", "textColor", "text", "isOutline", "isPill", "isNotification", "isBlinking", "customClasses"] }, { kind: "directive", type: i6.PopoverDirective, selector: "[updPopover]", inputs: ["updPopover", "updPopoverTitle", "updPopoverTitleTemplate", "updPopoverTemplate", "updPopoverPlacement", "updPopoverCustomClasses", "updPopoverActAsTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
29
29
|
}
|
|
30
30
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PricingCardsComponent, decorators: [{
|
|
31
31
|
type: Component,
|
|
@@ -76,7 +76,7 @@ class PricingTableComponent {
|
|
|
76
76
|
return group?.features.find(f => f.text === featureText);
|
|
77
77
|
}
|
|
78
78
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PricingTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: PricingTableComponent, selector: "upd-pricing-table", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, shouldRemoveCardStyle: { classPropertyName: "shouldRemoveCardStyle", publicName: "shouldRemoveCardStyle", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: "<div [class.card]=\"!shouldRemoveCardStyle()\">\n <div class=\"table-responsive\">\n <table class=\"table table-vcenter table-bordered table-nowrap card-table\">\n <thead>\n <tr>\n <td class=\"w-50\">\n @if (!!title() || !!description()) {\n @if (!!title()) {\n <h2 [innerHTML]=\"title()\"></h2>\n }\n\n @if (!!description()) {\n <div class=\"text-secondary text-wrap\" [innerHTML]=\"description()\"></div>\n }\n }\n </td>\n @for (item of items(); track item.id) {\n <td class=\"text-center\">\n <div class=\"text-uppercase text-secondary font-weight-medium\" [innerHTML]=\"item.title\"></div>\n <div class=\"display-6 fw-bold my-3\" [innerHTML]=\"item.price\"></div>\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </td>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of tableBodyRows(); track row.isHeader ? row.name : row.text) {\n @if (row.isHeader) {\n <tr class=\"bg-surface-tertiary\">\n <th [attr.colspan]=\"items().length + 1\" class=\"subheader\" [innerHTML]=\"row.name\"></th>\n </tr>\n } @else {\n <tr>\n <td>\n <span [innerHTML]=\"row.text\"></span>\n @if (!!row.extraInfo) {\n <span [updPopover]=\"row.extraInfo\" [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"info-circle\" />\n </span>\n }\n </td>\n @for (cell of row.cells; track $index) {\n <td class=\"text-center\">\n @if (!cell.itemDescription) {\n <upd-icon [tablerIcon]=\"cell.isIncluded ? 'check' : 'minus'\" tablerIconWeight=\"bold\"\n [colorClass]=\"cell.isIncluded ? 'text-success' : 'text-secondary'\">\n </upd-icon>\n } @else {\n <span [innerHTML]=\"cell.itemDescription\" [class.text-secondary]=\"!cell.isIncluded\"></span>\n }\n </td>\n }\n </tr>\n }\n }\n </tbody>\n <tfoot>\n <tr>\n <td></td>\n @for (item of items(); track item.id) {\n <td>\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "directive", type: i6.PopoverDirective, selector: "[updPopover]", inputs: ["updPopover", "updPopoverTitle", "updPopoverTitleTemplate", "updPopoverTemplate", "updPopoverPlacement", "updPopoverCustomClasses", "updPopoverActAsTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
79
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: PricingTableComponent, selector: "upd-pricing-table", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, shouldRemoveCardStyle: { classPropertyName: "shouldRemoveCardStyle", publicName: "shouldRemoveCardStyle", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: "<div [class.card]=\"!shouldRemoveCardStyle()\">\n <div class=\"table-responsive\">\n <table class=\"table table-vcenter table-bordered table-nowrap card-table\">\n <thead>\n <tr>\n <td class=\"w-50\">\n @if (!!title() || !!description()) {\n @if (!!title()) {\n <h2 [innerHTML]=\"title()\"></h2>\n }\n\n @if (!!description()) {\n <div class=\"text-secondary text-wrap\" [innerHTML]=\"description()\"></div>\n }\n }\n </td>\n @for (item of items(); track item.id) {\n <td class=\"text-center\">\n <div class=\"text-uppercase text-secondary font-weight-medium\" [innerHTML]=\"item.title\"></div>\n <div class=\"display-6 fw-bold my-3\" [innerHTML]=\"item.price\"></div>\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </td>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of tableBodyRows(); track row.isHeader ? row.name : row.text) {\n @if (row.isHeader) {\n <tr class=\"bg-surface-tertiary\">\n <th [attr.colspan]=\"items().length + 1\" class=\"subheader\" [innerHTML]=\"row.name\"></th>\n </tr>\n } @else {\n <tr>\n <td>\n <span [innerHTML]=\"row.text\"></span>\n @if (!!row.extraInfo) {\n <span [updPopover]=\"row.extraInfo\" [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"info-circle\" />\n </span>\n }\n </td>\n @for (cell of row.cells; track $index) {\n <td class=\"text-center\">\n @if (!cell.itemDescription) {\n <upd-icon [tablerIcon]=\"cell.isIncluded ? 'check' : 'minus'\" tablerIconWeight=\"bold\"\n [colorClass]=\"cell.isIncluded ? 'text-success' : 'text-secondary'\">\n </upd-icon>\n } @else {\n <span [innerHTML]=\"cell.itemDescription\" [class.text-secondary]=\"!cell.isIncluded\"></span>\n }\n </td>\n }\n </tr>\n }\n }\n </tbody>\n <tfoot>\n <tr>\n <td></td>\n @for (item of items(); track item.id) {\n <td>\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title", "stopPropagation"], outputs: ["clicked"] }, { kind: "directive", type: i6.PopoverDirective, selector: "[updPopover]", inputs: ["updPopover", "updPopoverTitle", "updPopoverTitleTemplate", "updPopoverTemplate", "updPopoverPlacement", "updPopoverCustomClasses", "updPopoverActAsTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
80
80
|
}
|
|
81
81
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PricingTableComponent, decorators: [{
|
|
82
82
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updevs-components-pricing.mjs","sources":["../../../../libs/components/pricing/src/pricing-cards/pricing-cards.component.ts","../../../../libs/components/pricing/src/pricing-cards/pricing-cards.component.html","../../../../libs/components/pricing/src/pricing-table/pricing-table.component.ts","../../../../libs/components/pricing/src/pricing-table/pricing-table.component.html","../../../../libs/components/pricing/src/upd-pricing.module.ts","../../../../libs/components/pricing/src/updevs-components-pricing.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, input, output } from '@angular/core';\nimport { TextService } from '@updevs/sdk';\n\nimport { PriceItemModel } from '../models/price-item.model';\n\n@Component({\n selector: 'upd-pricing-cards',\n templateUrl: './pricing-cards.component.html',\n styleUrl: './pricing-cards.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PricingCardsComponent {\n readonly isLoading = input<boolean>(false);\n readonly items = input.required<PriceItemModel[]>();\n readonly selected = output<PriceItemModel>();\n\n readonly textService = inject(TextService);\n\n selectOption(item: PriceItemModel): void {\n this.selected.emit(item);\n }\n}\n","<div class=\"row row-cards\">\n @for (item of items(); track item.id) {\n <div class=\"col-lg col-sm-6\">\n <upd-card [ribbonBackground]=\"!!item.ribbonIcon ? item.highlightColor : undefined\" [ribbonIcon]=\"item.ribbonIcon\"\n [ribbonStyle]=\"item.ribbonStyle || 'top'\" [statusBackground]=\"item.highlightColor\" [useLightHeader]=\"true\">\n <ng-template updCardHeader>\n <div class=\"text-uppercase text-secondary fw-bold\">{{ item.title }}</div>\n <div [class.me-6]=\"!!item.ribbonIcon\" class=\"ms-auto d-flex gap-1\">\n @for (tag of item.tags; track tag.text.text) {\n <upd-badge [bgColor]=\"tag.backgroundColor\" [text]=\"tag.text\"></upd-badge>\n }\n </div>\n </ng-template>\n\n <div class=\"d-flex flex-column h-100\">\n <div>\n <div class=\"display-5 fw-bold mb-3\" [class.text-center]=\"item.isPriceCentered\" [innerHTML]=\"item.price\"></div>\n\n @if ((item.groupedFeatures?.length || 0) > 0) {\n @for (group of item.groupedFeatures; track group.name) {\n <div class=\"bg-surface-tertiary\">\n <span class=\"subheader\">{{ group.name }}</span>\n </div>\n <ng-container [ngTemplateOutlet]=\"featuresTpl\"\n [ngTemplateOutletContext]=\"{features: group.features}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"featuresTpl\"\n [ngTemplateOutletContext]=\"{features: item.features}\"></ng-container>\n }\n </div>\n\n <div class=\"flex-grow-1\"></div>\n\n @if (!!item.description) {\n <div class=\"text-secondary mb-3\" [class.text-center]=\"item.isPriceCentered\"\n [innerHTML]=\"item.description\"></div>\n }\n\n <div class=\"text-center mt-4\">\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </div>\n </div>\n </upd-card>\n </div>\n }\n</div>\n\n<ng-template #featuresTpl let-features=\"features\">\n <ul class=\"list-unstyled lh-lg\">\n @for (feature of features; track feature.text) {\n <li [class.fw-bold]=\"feature.isHighlighted\">\n @if (feature.isIncluded) {\n <upd-icon tablerIcon=\"check\" tablerIconWeight=\"bold\" colorClass=\"text-success\"></upd-icon>\n } @else {\n <upd-icon tablerIcon=\"minus\" tablerIconWeight=\"bold\" colorClass=\"text-secondary\"></upd-icon>\n }\n\n <span class=\"ms-2\" [innerHTML]=\"feature.text\" [class.text-secondary]=\"!feature.isIncluded\"></span>\n\n @if (!!feature.extraInfo) {\n <span [updPopover]=\"feature.extraInfo\" [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"info-circle\" />\n </span>\n }\n </li>\n }\n </ul>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { TextService } from '@updevs/sdk';\n\nimport { PriceItemModel } from '../models/price-item.model';\n\ntype DisplayRow =\n | { isHeader: true; name: string }\n | { isHeader: false; text: string; extraInfo?: string; cells: { isIncluded: boolean; itemDescription?: string }[] };\n\n@Component({\n selector: 'upd-pricing-table',\n templateUrl: './pricing-table.component.html',\n styleUrl: './pricing-table.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PricingTableComponent {\n readonly isLoading = input<boolean>(false);\n readonly shouldRemoveCardStyle = input<boolean>(false);\n readonly title = input<string>();\n readonly description = input<string>();\n readonly items = input.required<PriceItemModel[]>();\n readonly selected = output<PriceItemModel>();\n\n readonly tableBodyRows = computed<DisplayRow[]>(() => {\n const plans = this.items();\n\n if (!plans || plans.length === 0) {\n return [];\n }\n\n const displayRows: DisplayRow[] = [];\n const featureTemplate = plans[0].groupedFeatures || [];\n\n for (const group of featureTemplate) {\n displayRows.push({ isHeader: true, name: group.name });\n\n for (const feature of group.features) {\n displayRows.push({\n isHeader: false,\n text: feature.text,\n extraInfo: feature.extraInfo,\n cells: plans.map(plan => {\n const planFeature = this.findFeature(plan, group.name, feature.text);\n return {\n isIncluded: !!planFeature?.isIncluded,\n itemDescription: planFeature?.itemDescription\n };\n })\n });\n }\n }\n\n return displayRows;\n });\n readonly textService = inject(TextService);\n\n selectOption(item: PriceItemModel): void {\n this.selected.emit(item);\n }\n\n private findFeature(item: PriceItemModel, groupName: string, featureText: string) {\n const group = item.groupedFeatures?.find(g => g.name === groupName);\n return group?.features.find(f => f.text === featureText);\n }\n}\n","<div [class.card]=\"!shouldRemoveCardStyle()\">\n <div class=\"table-responsive\">\n <table class=\"table table-vcenter table-bordered table-nowrap card-table\">\n <thead>\n <tr>\n <td class=\"w-50\">\n @if (!!title() || !!description()) {\n @if (!!title()) {\n <h2 [innerHTML]=\"title()\"></h2>\n }\n\n @if (!!description()) {\n <div class=\"text-secondary text-wrap\" [innerHTML]=\"description()\"></div>\n }\n }\n </td>\n @for (item of items(); track item.id) {\n <td class=\"text-center\">\n <div class=\"text-uppercase text-secondary font-weight-medium\" [innerHTML]=\"item.title\"></div>\n <div class=\"display-6 fw-bold my-3\" [innerHTML]=\"item.price\"></div>\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </td>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of tableBodyRows(); track row.isHeader ? row.name : row.text) {\n @if (row.isHeader) {\n <tr class=\"bg-surface-tertiary\">\n <th [attr.colspan]=\"items().length + 1\" class=\"subheader\" [innerHTML]=\"row.name\"></th>\n </tr>\n } @else {\n <tr>\n <td>\n <span [innerHTML]=\"row.text\"></span>\n @if (!!row.extraInfo) {\n <span [updPopover]=\"row.extraInfo\" [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"info-circle\" />\n </span>\n }\n </td>\n @for (cell of row.cells; track $index) {\n <td class=\"text-center\">\n @if (!cell.itemDescription) {\n <upd-icon [tablerIcon]=\"cell.isIncluded ? 'check' : 'minus'\" tablerIconWeight=\"bold\"\n [colorClass]=\"cell.isIncluded ? 'text-success' : 'text-secondary'\">\n </upd-icon>\n } @else {\n <span [innerHTML]=\"cell.itemDescription\" [class.text-secondary]=\"!cell.isIncluded\"></span>\n }\n </td>\n }\n </tr>\n }\n }\n </tbody>\n <tfoot>\n <tr>\n <td></td>\n @for (item of items(); track item.id) {\n <td>\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdIconsModule } from '@updevs/icons';\nimport { UpdCardModule } from '@updevs/components/card';\nimport { UpdButtonModule } from '@updevs/components/button';\nimport { UpdBadgeModule } from '@updevs/components/badge';\nimport { UpdPopoverModule } from '@updevs/components/popover';\n\nimport { PricingCardsComponent } from './pricing-cards/pricing-cards.component';\nimport { PricingTableComponent } from './pricing-table/pricing-table.component';\n\n@NgModule({\n imports: [\n CommonModule,\n UpdCardModule,\n UpdIconsModule,\n UpdButtonModule,\n UpdBadgeModule,\n UpdPopoverModule\n ],\n declarations: [\n PricingCardsComponent,\n PricingTableComponent\n ],\n exports: [\n PricingCardsComponent,\n PricingTableComponent\n ]\n})\nexport class UpdPricingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;MAWa,qBAAqB,CAAA;AANlC,IAAA,WAAA,GAAA;AAOa,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,KAAK,CAAC;AACjC,QA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AA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iBARrB,qBAAqB;AACrB,YAAA,qBAAqB,aATrB,YAAY;YACZ,aAAa;YACb,cAAc;YACd,eAAe;YACf,cAAc;AACd,YAAA,gBAAgB,aAOhB,qBAAqB;YACrB,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAGhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAhBrB,YAAY;YACZ,aAAa;YACb,cAAc;YACd,eAAe;YACf,cAAc;YACd,gBAAgB,CAAA,EAAA,CAAA,CAAA;;2FAWX,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAlB5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,aAAa;wBACb,cAAc;wBACd,eAAe;wBACf,cAAc;wBACd;AACH,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,qBAAqB;wBACrB;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,qBAAqB;wBACrB;AACH;AACJ,iBAAA;;;AC5BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"updevs-components-pricing.mjs","sources":["../../../../libs/components/pricing/src/pricing-cards/pricing-cards.component.ts","../../../../libs/components/pricing/src/pricing-cards/pricing-cards.component.html","../../../../libs/components/pricing/src/pricing-table/pricing-table.component.ts","../../../../libs/components/pricing/src/pricing-table/pricing-table.component.html","../../../../libs/components/pricing/src/upd-pricing.module.ts","../../../../libs/components/pricing/src/updevs-components-pricing.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, input, output } from '@angular/core';\nimport { TextService } from '@updevs/sdk';\n\nimport { PriceItemModel } from '../models/price-item.model';\n\n@Component({\n selector: 'upd-pricing-cards',\n templateUrl: './pricing-cards.component.html',\n styleUrl: './pricing-cards.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PricingCardsComponent {\n readonly isLoading = input<boolean>(false);\n readonly items = input.required<PriceItemModel[]>();\n readonly selected = output<PriceItemModel>();\n\n readonly textService = inject(TextService);\n\n selectOption(item: PriceItemModel): void {\n this.selected.emit(item);\n }\n}\n","<div class=\"row row-cards\">\n @for (item of items(); track item.id) {\n <div class=\"col-lg col-sm-6\">\n <upd-card [ribbonBackground]=\"!!item.ribbonIcon ? item.highlightColor : undefined\" [ribbonIcon]=\"item.ribbonIcon\"\n [ribbonStyle]=\"item.ribbonStyle || 'top'\" [statusBackground]=\"item.highlightColor\" [useLightHeader]=\"true\">\n <ng-template updCardHeader>\n <div class=\"text-uppercase text-secondary fw-bold\">{{ item.title }}</div>\n <div [class.me-6]=\"!!item.ribbonIcon\" class=\"ms-auto d-flex gap-1\">\n @for (tag of item.tags; track tag.text.text) {\n <upd-badge [bgColor]=\"tag.backgroundColor\" [text]=\"tag.text\"></upd-badge>\n }\n </div>\n </ng-template>\n\n <div class=\"d-flex flex-column h-100\">\n <div>\n <div class=\"display-5 fw-bold mb-3\" [class.text-center]=\"item.isPriceCentered\" [innerHTML]=\"item.price\"></div>\n\n @if ((item.groupedFeatures?.length || 0) > 0) {\n @for (group of item.groupedFeatures; track group.name) {\n <div class=\"bg-surface-tertiary\">\n <span class=\"subheader\">{{ group.name }}</span>\n </div>\n <ng-container [ngTemplateOutlet]=\"featuresTpl\"\n [ngTemplateOutletContext]=\"{features: group.features}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"featuresTpl\"\n [ngTemplateOutletContext]=\"{features: item.features}\"></ng-container>\n }\n </div>\n\n <div class=\"flex-grow-1\"></div>\n\n @if (!!item.description) {\n <div class=\"text-secondary mb-3\" [class.text-center]=\"item.isPriceCentered\"\n [innerHTML]=\"item.description\"></div>\n }\n\n <div class=\"text-center mt-4\">\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </div>\n </div>\n </upd-card>\n </div>\n }\n</div>\n\n<ng-template #featuresTpl let-features=\"features\">\n <ul class=\"list-unstyled lh-lg\">\n @for (feature of features; track feature.text) {\n <li [class.fw-bold]=\"feature.isHighlighted\">\n @if (feature.isIncluded) {\n <upd-icon tablerIcon=\"check\" tablerIconWeight=\"bold\" colorClass=\"text-success\"></upd-icon>\n } @else {\n <upd-icon tablerIcon=\"minus\" tablerIconWeight=\"bold\" colorClass=\"text-secondary\"></upd-icon>\n }\n\n <span class=\"ms-2\" [innerHTML]=\"feature.text\" [class.text-secondary]=\"!feature.isIncluded\"></span>\n\n @if (!!feature.extraInfo) {\n <span [updPopover]=\"feature.extraInfo\" [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"info-circle\" />\n </span>\n }\n </li>\n }\n </ul>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { TextService } from '@updevs/sdk';\n\nimport { PriceItemModel } from '../models/price-item.model';\n\ntype DisplayRow =\n | { isHeader: true; name: string }\n | { isHeader: false; text: string; extraInfo?: string; cells: { isIncluded: boolean; itemDescription?: string }[] };\n\n@Component({\n selector: 'upd-pricing-table',\n templateUrl: './pricing-table.component.html',\n styleUrl: './pricing-table.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PricingTableComponent {\n readonly isLoading = input<boolean>(false);\n readonly shouldRemoveCardStyle = input<boolean>(false);\n readonly title = input<string>();\n readonly description = input<string>();\n readonly items = input.required<PriceItemModel[]>();\n readonly selected = output<PriceItemModel>();\n\n readonly tableBodyRows = computed<DisplayRow[]>(() => {\n const plans = this.items();\n\n if (!plans || plans.length === 0) {\n return [];\n }\n\n const displayRows: DisplayRow[] = [];\n const featureTemplate = plans[0].groupedFeatures || [];\n\n for (const group of featureTemplate) {\n displayRows.push({ isHeader: true, name: group.name });\n\n for (const feature of group.features) {\n displayRows.push({\n isHeader: false,\n text: feature.text,\n extraInfo: feature.extraInfo,\n cells: plans.map(plan => {\n const planFeature = this.findFeature(plan, group.name, feature.text);\n return {\n isIncluded: !!planFeature?.isIncluded,\n itemDescription: planFeature?.itemDescription\n };\n })\n });\n }\n }\n\n return displayRows;\n });\n readonly textService = inject(TextService);\n\n selectOption(item: PriceItemModel): void {\n this.selected.emit(item);\n }\n\n private findFeature(item: PriceItemModel, groupName: string, featureText: string) {\n const group = item.groupedFeatures?.find(g => g.name === groupName);\n return group?.features.find(f => f.text === featureText);\n }\n}\n","<div [class.card]=\"!shouldRemoveCardStyle()\">\n <div class=\"table-responsive\">\n <table class=\"table table-vcenter table-bordered table-nowrap card-table\">\n <thead>\n <tr>\n <td class=\"w-50\">\n @if (!!title() || !!description()) {\n @if (!!title()) {\n <h2 [innerHTML]=\"title()\"></h2>\n }\n\n @if (!!description()) {\n <div class=\"text-secondary text-wrap\" [innerHTML]=\"description()\"></div>\n }\n }\n </td>\n @for (item of items(); track item.id) {\n <td class=\"text-center\">\n <div class=\"text-uppercase text-secondary font-weight-medium\" [innerHTML]=\"item.title\"></div>\n <div class=\"display-6 fw-bold my-3\" [innerHTML]=\"item.price\"></div>\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </td>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of tableBodyRows(); track row.isHeader ? row.name : row.text) {\n @if (row.isHeader) {\n <tr class=\"bg-surface-tertiary\">\n <th [attr.colspan]=\"items().length + 1\" class=\"subheader\" [innerHTML]=\"row.name\"></th>\n </tr>\n } @else {\n <tr>\n <td>\n <span [innerHTML]=\"row.text\"></span>\n @if (!!row.extraInfo) {\n <span [updPopover]=\"row.extraInfo\" [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"info-circle\" />\n </span>\n }\n </td>\n @for (cell of row.cells; track $index) {\n <td class=\"text-center\">\n @if (!cell.itemDescription) {\n <upd-icon [tablerIcon]=\"cell.isIncluded ? 'check' : 'minus'\" tablerIconWeight=\"bold\"\n [colorClass]=\"cell.isIncluded ? 'text-success' : 'text-secondary'\">\n </upd-icon>\n } @else {\n <span [innerHTML]=\"cell.itemDescription\" [class.text-secondary]=\"!cell.isIncluded\"></span>\n }\n </td>\n }\n </tr>\n }\n }\n </tbody>\n <tfoot>\n <tr>\n <td></td>\n @for (item of items(); track item.id) {\n <td>\n <upd-button (clicked)=\"selectOption(item)\" customClasses=\"w-100\" [isLoading]=\"isLoading()\"\n [colorStyle]=\"!!item.highlightColor ? item.highlightColor : undefined\" [isDisabled]=\"!!item.currentText\">\n {{ textService.getText(!!item.currentText ? item.currentText : item.chooseThisText) }}\n </upd-button>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdIconsModule } from '@updevs/icons';\nimport { UpdCardModule } from '@updevs/components/card';\nimport { UpdButtonModule } from '@updevs/components/button';\nimport { UpdBadgeModule } from '@updevs/components/badge';\nimport { UpdPopoverModule } from '@updevs/components/popover';\n\nimport { PricingCardsComponent } from './pricing-cards/pricing-cards.component';\nimport { PricingTableComponent } from './pricing-table/pricing-table.component';\n\n@NgModule({\n imports: [\n CommonModule,\n UpdCardModule,\n UpdIconsModule,\n UpdButtonModule,\n UpdBadgeModule,\n UpdPopoverModule\n ],\n declarations: [\n PricingCardsComponent,\n PricingTableComponent\n ],\n exports: [\n PricingCardsComponent,\n PricingTableComponent\n ]\n})\nexport class UpdPricingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;MAWa,qBAAqB,CAAA;AANlC,IAAA,WAAA,GAAA;AAOa,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,KAAK,CAAC;AACjC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAoB;QAC1C,IAAQ,CAAA,QAAA,GAAG,MAAM,EAAkB;AAEnC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAK7C;AAHG,IAAA,YAAY,CAAC,IAAoB,EAAA;AAC7B,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;;8GARnB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,mWCXlC,ovHAwEA,EAAA,MAAA,EAAA,CAAA,yOAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,gBAAA,EAAA,OAAA,EAAA,UAAA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