@updevs/components 1.0.0-alpha.93 → 1.0.0-alpha.95
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 +3 -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 +14 -3
- 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/list/list.component.mjs +6 -3
- 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 +3 -3
- package/esm2022/table/components/save-search/save-search.component.mjs +1 -1
- package/esm2022/table/components/search-section/search-section.component.mjs +1 -1
- package/esm2022/table/table.component.mjs +1 -1
- package/fesm2022/updevs-components-button.mjs +2 -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 +14 -3
- 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-list.mjs +5 -2
- package/fesm2022/updevs-components-list.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 +5 -5
- package/fesm2022/updevs-components-table.mjs.map +1 -1
- package/list/list.component.d.ts +1 -0
- package/package.json +17 -17
|
@@ -73,6 +73,9 @@ class ListComponent {
|
|
|
73
73
|
evt.stopPropagation();
|
|
74
74
|
this.selectedItem.emit(item);
|
|
75
75
|
}
|
|
76
|
+
trackByItemId(index, item) {
|
|
77
|
+
return item.id ?? index;
|
|
78
|
+
}
|
|
76
79
|
setupItems() {
|
|
77
80
|
const tempItems = [];
|
|
78
81
|
this.items?.forEach(it => {
|
|
@@ -106,11 +109,11 @@ class ListComponent {
|
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
109
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: ListComponent, selector: "upd-list", inputs: { items: "items", shouldOverflow: "shouldOverflow", isFlush: "isFlush", isVisible: "isVisible", isHoverable: "isHoverable", shouldDisplayItemsCounter: "shouldDisplayItemsCounter", wrapperClasses: "wrapperClasses", maxHeight: "maxHeight" }, outputs: { checkboxChanged: "checkboxChanged", selectedItem: "selectedItem" }, host: { properties: { "class": "this.localWrapperClasses" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.List'\">\n @for (item of listItems; track item) {\n @if ((item.children?.length || 0) > 0) {\n <div class=\"list-group-header sticky-top\">{{ item.text }}</div>\n @for (child of item.children; track child) {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:child}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n }\n } @empty {\n <div class=\"list-group-item\">\n <upd-icon tablerIcon=\"alert-triangle\" wrapperClasses=\"text-yellow\"></upd-icon>\n {{ t('NoRecordsFound') }}\n </div>\n }\n\n @if (shouldDisplayItemsCounter && listItems.length > 0) {\n <div class=\"list-items-counter bg-muted text-muted-fg\">\n {{ listItems.length }} {{ t(listItems.length === 1 ? 'Item' : 'Items') }}\n </div>\n }\n</ng-container>\n\n<ng-template #listItemTpl let-item=\"item\">\n <div class=\"list-group-item\" [class.list-group-item-action]=\"!item.hasLeftBox\" [class.active]=\"item.isActive\"\n [class.disabled]=\"item.isDisabled\" (click)=\"onSelectItem($event, item)\">\n @if (!item.hasLeftBox) {\n <span>{{ item.text }}</span>\n } @else {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"leftBoxTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n <div class=\"col text-truncate align-content-center\">\n @if (!!item.text) {\n <div class=\"text-body d-block\">{{ item.text }}</div>\n }\n @if (!!item.description) {\n <div class=\"text-muted text-truncate mt-n1\">{{ item.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #leftBoxTpl let-item=\"item\">\n <div class=\"col-auto\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\"></upd-icon>\n } @else if (item.hasCheckbox) {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"></upd-checkbox>\n <!-- [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')\"-->\n\n } @else if (item.hasLeftBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n } @else if (!!item.leftBoxImage || !!item.leftBoxText) {\n <a href=\"#\"> <!-- TODO: change. -->\n <span class=\"avatar\" style=\"background-image: url({{item.leftBoxImage}})\">{{ item.leftBoxText }}\n @if (item.hasBottomRightBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </span>\n </a>\n } @else if (!!item.leftBoxHtml) {\n <div [innerHTML]=\"item.leftBoxHtml\"></div>\n }\n </div>\n</ng-template
|
|
112
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: ListComponent, selector: "upd-list", inputs: { items: "items", shouldOverflow: "shouldOverflow", isFlush: "isFlush", isVisible: "isVisible", isHoverable: "isHoverable", shouldDisplayItemsCounter: "shouldDisplayItemsCounter", wrapperClasses: "wrapperClasses", maxHeight: "maxHeight" }, outputs: { checkboxChanged: "checkboxChanged", selectedItem: "selectedItem" }, host: { properties: { "class": "this.localWrapperClasses" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.List'\">\n @for (item of listItems; track trackByItemId($index, item)) {\n @if ((item.children?.length || 0) > 0) {\n <div class=\"list-group-header sticky-top\">{{ item.text }}</div>\n @for (child of item.children; track child) {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:child}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n }\n } @empty {\n <div class=\"list-group-item\">\n <upd-icon tablerIcon=\"alert-triangle\" wrapperClasses=\"text-yellow\"></upd-icon>\n {{ t('NoRecordsFound') }}\n </div>\n }\n\n @if (shouldDisplayItemsCounter && listItems.length > 0) {\n <div class=\"list-items-counter bg-muted text-muted-fg\">\n {{ listItems.length }} {{ t(listItems.length === 1 ? 'Item' : 'Items') }}\n </div>\n }\n</ng-container>\n\n<ng-template #listItemTpl let-item=\"item\">\n <div class=\"list-group-item\" [class.list-group-item-action]=\"!item.hasLeftBox\" [class.active]=\"item.isActive\"\n [class.disabled]=\"item.isDisabled\" (click)=\"onSelectItem($event, item)\">\n @if (!item.hasLeftBox) {\n <span>{{ item.text }}</span>\n } @else {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"leftBoxTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n <div class=\"col text-truncate align-content-center\">\n @if (!!item.text) {\n <div class=\"text-body d-block\">{{ item.text }}</div>\n }\n @if (!!item.description) {\n <div class=\"text-muted text-truncate mt-n1\">{{ item.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #leftBoxTpl let-item=\"item\">\n <div class=\"col-auto\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\"></upd-icon>\n } @else if (item.hasCheckbox) {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"></upd-checkbox>\n <!-- [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')\"-->\n\n } @else if (item.hasLeftBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n } @else if (!!item.leftBoxImage || !!item.leftBoxText) {\n <a href=\"#\"> <!-- TODO: change. -->\n <span class=\"avatar\" style=\"background-image: url({{item.leftBoxImage}})\">{{ item.leftBoxText }}\n @if (item.hasBottomRightBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </span>\n </a>\n } @else if (!!item.leftBoxHtml) {\n <div [innerHTML]=\"item.leftBoxHtml\"></div>\n }\n </div>\n</ng-template>", styles: ["upd-list{width:100%}.list-group-item{cursor:pointer}.list-hidden{display:none!important}.list-items-counter{position:sticky;bottom:0;right:0;float:right;border-top-left-radius:2px;opacity:.6;padding:2px 12px;margin-top:-24px}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.CheckboxComponent, selector: "upd-checkbox", inputs: ["wrapperClasses", "value", "customClasses", "isChecked", "isInline", "isSwitch", "isIndeterminate"], outputs: ["changed", "isCheckedChange", "isIndeterminateChange"] }, { kind: "component", type: i4.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
110
113
|
}
|
|
111
114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ListComponent, decorators: [{
|
|
112
115
|
type: Component,
|
|
113
|
-
args: [{ selector: 'upd-list', encapsulation: ViewEncapsulation.None, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.List'\">\n @for (item of listItems; track item) {\n @if ((item.children?.length || 0) > 0) {\n <div class=\"list-group-header sticky-top\">{{ item.text }}</div>\n @for (child of item.children; track child) {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:child}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n }\n } @empty {\n <div class=\"list-group-item\">\n <upd-icon tablerIcon=\"alert-triangle\" wrapperClasses=\"text-yellow\"></upd-icon>\n {{ t('NoRecordsFound') }}\n </div>\n }\n\n @if (shouldDisplayItemsCounter && listItems.length > 0) {\n <div class=\"list-items-counter bg-muted text-muted-fg\">\n {{ listItems.length }} {{ t(listItems.length === 1 ? 'Item' : 'Items') }}\n </div>\n }\n</ng-container>\n\n<ng-template #listItemTpl let-item=\"item\">\n <div class=\"list-group-item\" [class.list-group-item-action]=\"!item.hasLeftBox\" [class.active]=\"item.isActive\"\n [class.disabled]=\"item.isDisabled\" (click)=\"onSelectItem($event, item)\">\n @if (!item.hasLeftBox) {\n <span>{{ item.text }}</span>\n } @else {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"leftBoxTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n <div class=\"col text-truncate align-content-center\">\n @if (!!item.text) {\n <div class=\"text-body d-block\">{{ item.text }}</div>\n }\n @if (!!item.description) {\n <div class=\"text-muted text-truncate mt-n1\">{{ item.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #leftBoxTpl let-item=\"item\">\n <div class=\"col-auto\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\"></upd-icon>\n } @else if (item.hasCheckbox) {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"></upd-checkbox>\n <!-- [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')\"-->\n\n } @else if (item.hasLeftBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n } @else if (!!item.leftBoxImage || !!item.leftBoxText) {\n <a href=\"#\"> <!-- TODO: change. -->\n <span class=\"avatar\" style=\"background-image: url({{item.leftBoxImage}})\">{{ item.leftBoxText }}\n @if (item.hasBottomRightBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </span>\n </a>\n } @else if (!!item.leftBoxHtml) {\n <div [innerHTML]=\"item.leftBoxHtml\"></div>\n }\n </div>\n</ng-template
|
|
116
|
+
args: [{ selector: 'upd-list', encapsulation: ViewEncapsulation.None, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.List'\">\n @for (item of listItems; track trackByItemId($index, item)) {\n @if ((item.children?.length || 0) > 0) {\n <div class=\"list-group-header sticky-top\">{{ item.text }}</div>\n @for (child of item.children; track child) {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:child}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n }\n } @empty {\n <div class=\"list-group-item\">\n <upd-icon tablerIcon=\"alert-triangle\" wrapperClasses=\"text-yellow\"></upd-icon>\n {{ t('NoRecordsFound') }}\n </div>\n }\n\n @if (shouldDisplayItemsCounter && listItems.length > 0) {\n <div class=\"list-items-counter bg-muted text-muted-fg\">\n {{ listItems.length }} {{ t(listItems.length === 1 ? 'Item' : 'Items') }}\n </div>\n }\n</ng-container>\n\n<ng-template #listItemTpl let-item=\"item\">\n <div class=\"list-group-item\" [class.list-group-item-action]=\"!item.hasLeftBox\" [class.active]=\"item.isActive\"\n [class.disabled]=\"item.isDisabled\" (click)=\"onSelectItem($event, item)\">\n @if (!item.hasLeftBox) {\n <span>{{ item.text }}</span>\n } @else {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"leftBoxTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n <div class=\"col text-truncate align-content-center\">\n @if (!!item.text) {\n <div class=\"text-body d-block\">{{ item.text }}</div>\n }\n @if (!!item.description) {\n <div class=\"text-muted text-truncate mt-n1\">{{ item.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #leftBoxTpl let-item=\"item\">\n <div class=\"col-auto\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\"></upd-icon>\n } @else if (item.hasCheckbox) {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"></upd-checkbox>\n <!-- [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')\"-->\n\n } @else if (item.hasLeftBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n } @else if (!!item.leftBoxImage || !!item.leftBoxText) {\n <a href=\"#\"> <!-- TODO: change. -->\n <span class=\"avatar\" style=\"background-image: url({{item.leftBoxImage}})\">{{ item.leftBoxText }}\n @if (item.hasBottomRightBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </span>\n </a>\n } @else if (!!item.leftBoxHtml) {\n <div [innerHTML]=\"item.leftBoxHtml\"></div>\n }\n </div>\n</ng-template>", styles: ["upd-list{width:100%}.list-group-item{cursor:pointer}.list-hidden{display:none!important}.list-items-counter{position:sticky;bottom:0;right:0;float:right;border-top-left-radius:2px;opacity:.6;padding:2px 12px;margin-top:-24px}\n"] }]
|
|
114
117
|
}], propDecorators: { localWrapperClasses: [{
|
|
115
118
|
type: HostBinding,
|
|
116
119
|
args: ['class']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updevs-components-list.mjs","sources":["../../../../libs/components/list/src/models/list-item.model.ts","../../../../libs/components/list/src/list.component.ts","../../../../libs/components/list/src/list.component.html","../../../../libs/components/list/src/upd-list.module.ts","../../../../libs/components/list/src/updevs-components-list.ts"],"sourcesContent":["import { IconModel } from '@updevs/icons';\nimport { BgColorStyleType } from '@updevs/sdk/types';\n\nimport { ListItem } from './list-item';\nimport { BadgePositionType } from './badge-position.type';\n\nexport class ListItemModel implements ListItem {\n id?: any;\n text?: string;\n description?: string;\n icon?: IconModel;\n isChecked?: boolean;\n isSwitch?: boolean;\n hasCheckbox?: boolean;\n isDisabled?: boolean;\n isActive?: boolean;\n leftBoxText?: string;\n leftBoxImage?: string;\n leftBoxHtml?: string;\n badgeColor?: BgColorStyleType;\n badgeText?: string;\n badgePosition?: BadgePositionType;\n children?: ListItemModel[];\n get hasLeftBox(): boolean {\n return !!this.leftBoxImage\n || !!this.leftBoxText\n || !!this.badgeColor\n || this.hasCheckbox === true\n || !!this.icon\n || !!this.leftBoxHtml;\n }\n get hasLeftBadge(): boolean {\n return !!this.badgeColor && this.badgePosition === 'left';\n }\n get hasBottomRightBadge(): boolean {\n return !!this.badgeColor && this.badgePosition === 'left-box-bottom-right';\n }\n\n constructor(init?: ListItem) {\n Object.assign(this, init);\n }\n}\n","import {\n Component,\n HostBinding,\n Input,\n Renderer2,\n ElementRef,\n OnInit,\n RendererStyleFlags2,\n ViewEncapsulation,\n Output,\n EventEmitter,\n OnChanges,\n SimpleChanges, inject\n} from '@angular/core';\n\nimport { ListItem } from './models/list-item';\nimport { ListItemModel } from './models/list-item.model';\n\n@Component({\n selector: 'upd-list',\n templateUrl: './list.component.html',\n styleUrls: ['./list.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class ListComponent implements OnInit, OnChanges {\n @HostBinding('class') localWrapperClasses = '';\n\n /**\n * List items.\n * If provided, the single will be considered static.\n */\n @Input() items?: ListItem[];\n /**\n * Whether the content should overflow or not.\n */\n @Input() shouldOverflow = false;\n /**\n * Whether the list will fit the layout of the container.\n * If set to false, the list's round borders will be visible. It'll have a detached behavior.\n */\n @Input() isFlush = true;\n @Input() isVisible = true;\n @Input() isHoverable = false;\n @Input() shouldDisplayItemsCounter = false;\n @Input() wrapperClasses = '';\n /**\n * Maximum height of the component.\n * Note: The unit should also be provided, i.e.: 350px, 35rem, etc.\n */\n @Input() maxHeight?: string;\n\n @Output() readonly checkboxChanged = new EventEmitter<ListItem>();\n @Output() readonly selectedItem = new EventEmitter<ListItem>();\n\n listItems: ListItemModel[] = [];\n currentSelection: ListItem[] = [];\n\n private localBackupItems: ListItem[] = [];\n\n private readonly renderer = inject(Renderer2);\n private readonly elementRef = inject(ElementRef);\n\n ngOnInit(): void {\n this.setupStyle();\n this.updateWrapperClasses();\n this.setupItems();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.setupStyle();\n this.updateWrapperClasses();\n\n if (!!changes['items']) {\n this.setupItems();\n }\n }\n\n onCheckboxChange(item: ListItem, isChecked: boolean): void {\n item.isChecked = isChecked;\n this.checkboxChanged.emit(item);\n }\n\n onSelectItem(evt: any, item: ListItem): void {\n evt.stopPropagation();\n this.selectedItem.emit(item);\n }\n\n private setupItems(): void {\n const tempItems: ListItemModel[] = [];\n\n this.items?.forEach(it => {\n const parent = new ListItemModel(it);\n\n if ((it.children?.length || 0) > 0) {\n parent.children = [];\n it.children?.forEach(child => parent.children!.push(new ListItemModel(child)));\n }\n\n tempItems.push(parent);\n });\n\n this.listItems = [...tempItems];\n }\n\n private setupStyle(): void {\n if (!!this.maxHeight) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'max-height', this.maxHeight, RendererStyleFlags2.Important);\n }\n }\n\n private updateWrapperClasses(): void {\n this.localWrapperClasses = 'list-group' + ` ${this.wrapperClasses}`;\n\n if (this.isFlush) {\n this.localWrapperClasses += ' list-group-flush';\n }\n\n if (this.isHoverable) {\n this.localWrapperClasses += ' list-group-hoverable';\n }\n\n if (this.shouldOverflow) {\n this.localWrapperClasses += ' overflow-auto';\n }\n\n if (!this.isVisible) {\n this.localWrapperClasses += ' list-hidden';\n }\n }\n}\n","<ng-container *transloco=\"let t; prefix: 'UpDevs.List'\">\n @for (item of listItems; track item) {\n @if ((item.children?.length || 0) > 0) {\n <div class=\"list-group-header sticky-top\">{{ item.text }}</div>\n @for (child of item.children; track child) {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:child}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n }\n } @empty {\n <div class=\"list-group-item\">\n <upd-icon tablerIcon=\"alert-triangle\" wrapperClasses=\"text-yellow\"></upd-icon>\n {{ t('NoRecordsFound') }}\n </div>\n }\n\n @if (shouldDisplayItemsCounter && listItems.length > 0) {\n <div class=\"list-items-counter bg-muted text-muted-fg\">\n {{ listItems.length }} {{ t(listItems.length === 1 ? 'Item' : 'Items') }}\n </div>\n }\n</ng-container>\n\n<ng-template #listItemTpl let-item=\"item\">\n <div class=\"list-group-item\" [class.list-group-item-action]=\"!item.hasLeftBox\" [class.active]=\"item.isActive\"\n [class.disabled]=\"item.isDisabled\" (click)=\"onSelectItem($event, item)\">\n @if (!item.hasLeftBox) {\n <span>{{ item.text }}</span>\n } @else {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"leftBoxTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n <div class=\"col text-truncate align-content-center\">\n @if (!!item.text) {\n <div class=\"text-body d-block\">{{ item.text }}</div>\n }\n @if (!!item.description) {\n <div class=\"text-muted text-truncate mt-n1\">{{ item.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #leftBoxTpl let-item=\"item\">\n <div class=\"col-auto\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\"></upd-icon>\n } @else if (item.hasCheckbox) {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"></upd-checkbox>\n <!-- [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')\"-->\n\n } @else if (item.hasLeftBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n } @else if (!!item.leftBoxImage || !!item.leftBoxText) {\n <a href=\"#\"> <!-- TODO: change. -->\n <span class=\"avatar\" style=\"background-image: url({{item.leftBoxImage}})\">{{ item.leftBoxText }}\n @if (item.hasBottomRightBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </span>\n </a>\n } @else if (!!item.leftBoxHtml) {\n <div [innerHTML]=\"item.leftBoxHtml\"></div>\n }\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TranslocoService, TranslocoModule } from '@jsverse/transloco';\nimport { UpdCheckboxModule } from '@updevs/components/form-controls/checkbox';\nimport { UpdIconsModule } from '@updevs/icons';\n\nimport * as en from './assets/i18n/en.json';\nimport * as pt from './assets/i18n/pt.json';\nimport { ListComponent } from './list.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TranslocoModule,\n UpdCheckboxModule,\n UpdIconsModule\n ],\n declarations: [\n ListComponent\n ],\n exports: [\n ListComponent\n ]\n})\nexport class UpdListModule {\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":["i2","en","pt","i1"],"mappings":";;;;;;;;;;;MAMa,aAAa,CAAA;AAiBtB,IAAA,IAAI,UAAU,GAAA;AACV,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC;eACP,CAAC,CAAC,IAAI,CAAC;eACP,CAAC,CAAC,IAAI,CAAC;eACP,IAAI,CAAC,WAAW,KAAK;eACrB,CAAC,CAAC,IAAI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,gBAAgB,CAAC,oCAAoC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAC7E,QAAA,gBAAgB,CAAC,cAAc,CAACC,IAAE,EAAE,IAAI,CAAC;AACzC,QAAA,gBAAgB,CAAC,cAAc,CAACC,IAAE,EAAE,IAAI,CAAC;;8GAJpC,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAb,aAAa,EAAA,YAAA,EAAA,CANlB,aAAa,CAAA,EAAA,OAAA,EAAA,CANb,YAAY;YACZ,eAAe;YACf,iBAAiB;AACjB,YAAA,cAAc,aAMd,aAAa,CAAA,EAAA,CAAA,CAAA;AAGR,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,aAAa,YAZlB,YAAY;YACZ,eAAe;YACf,iBAAiB;YACjB,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAST,aAAa,EAAA,UAAA,EAAA,CAAA;kBAdzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,iBAAiB;wBACjB;AACH,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL;AACH;AACJ,iBAAA;;;ACvBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"updevs-components-list.mjs","sources":["../../../../libs/components/list/src/models/list-item.model.ts","../../../../libs/components/list/src/list.component.ts","../../../../libs/components/list/src/list.component.html","../../../../libs/components/list/src/upd-list.module.ts","../../../../libs/components/list/src/updevs-components-list.ts"],"sourcesContent":["import { IconModel } from '@updevs/icons';\nimport { BgColorStyleType } from '@updevs/sdk/types';\n\nimport { ListItem } from './list-item';\nimport { BadgePositionType } from './badge-position.type';\n\nexport class ListItemModel implements ListItem {\n id?: any;\n text?: string;\n description?: string;\n icon?: IconModel;\n isChecked?: boolean;\n isSwitch?: boolean;\n hasCheckbox?: boolean;\n isDisabled?: boolean;\n isActive?: boolean;\n leftBoxText?: string;\n leftBoxImage?: string;\n leftBoxHtml?: string;\n badgeColor?: BgColorStyleType;\n badgeText?: string;\n badgePosition?: BadgePositionType;\n children?: ListItemModel[];\n get hasLeftBox(): boolean {\n return !!this.leftBoxImage\n || !!this.leftBoxText\n || !!this.badgeColor\n || this.hasCheckbox === true\n || !!this.icon\n || !!this.leftBoxHtml;\n }\n get hasLeftBadge(): boolean {\n return !!this.badgeColor && this.badgePosition === 'left';\n }\n get hasBottomRightBadge(): boolean {\n return !!this.badgeColor && this.badgePosition === 'left-box-bottom-right';\n }\n\n constructor(init?: ListItem) {\n Object.assign(this, init);\n }\n}\n","import {\n Component,\n HostBinding,\n Input,\n Renderer2,\n ElementRef,\n OnInit,\n RendererStyleFlags2,\n ViewEncapsulation,\n Output,\n EventEmitter,\n OnChanges,\n SimpleChanges, inject\n} from '@angular/core';\n\nimport { ListItem } from './models/list-item';\nimport { ListItemModel } from './models/list-item.model';\n\n@Component({\n selector: 'upd-list',\n templateUrl: './list.component.html',\n styleUrls: ['./list.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class ListComponent implements OnInit, OnChanges {\n @HostBinding('class') localWrapperClasses = '';\n\n /**\n * List items.\n * If provided, the single will be considered static.\n */\n @Input() items?: ListItem[];\n /**\n * Whether the content should overflow or not.\n */\n @Input() shouldOverflow = false;\n /**\n * Whether the list will fit the layout of the container.\n * If set to false, the list's round borders will be visible. It'll have a detached behavior.\n */\n @Input() isFlush = true;\n @Input() isVisible = true;\n @Input() isHoverable = false;\n @Input() shouldDisplayItemsCounter = false;\n @Input() wrapperClasses = '';\n /**\n * Maximum height of the component.\n * Note: The unit should also be provided, i.e.: 350px, 35rem, etc.\n */\n @Input() maxHeight?: string;\n\n @Output() readonly checkboxChanged = new EventEmitter<ListItem>();\n @Output() readonly selectedItem = new EventEmitter<ListItem>();\n\n listItems: ListItemModel[] = [];\n currentSelection: ListItem[] = [];\n\n private localBackupItems: ListItem[] = [];\n\n private readonly renderer = inject(Renderer2);\n private readonly elementRef = inject(ElementRef);\n\n ngOnInit(): void {\n this.setupStyle();\n this.updateWrapperClasses();\n this.setupItems();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.setupStyle();\n this.updateWrapperClasses();\n\n if (!!changes['items']) {\n this.setupItems();\n }\n }\n\n onCheckboxChange(item: ListItem, isChecked: boolean): void {\n item.isChecked = isChecked;\n this.checkboxChanged.emit(item);\n }\n\n onSelectItem(evt: any, item: ListItem): void {\n evt.stopPropagation();\n this.selectedItem.emit(item);\n }\n\n trackByItemId(index: number, item: ListItem): any {\n return item.id ?? index;\n }\n\n private setupItems(): void {\n const tempItems: ListItemModel[] = [];\n\n this.items?.forEach(it => {\n const parent = new ListItemModel(it);\n\n if ((it.children?.length || 0) > 0) {\n parent.children = [];\n it.children?.forEach(child => parent.children!.push(new ListItemModel(child)));\n }\n\n tempItems.push(parent);\n });\n\n this.listItems = [...tempItems];\n }\n\n private setupStyle(): void {\n if (!!this.maxHeight) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'max-height', this.maxHeight, RendererStyleFlags2.Important);\n }\n }\n\n private updateWrapperClasses(): void {\n this.localWrapperClasses = 'list-group' + ` ${this.wrapperClasses}`;\n\n if (this.isFlush) {\n this.localWrapperClasses += ' list-group-flush';\n }\n\n if (this.isHoverable) {\n this.localWrapperClasses += ' list-group-hoverable';\n }\n\n if (this.shouldOverflow) {\n this.localWrapperClasses += ' overflow-auto';\n }\n\n if (!this.isVisible) {\n this.localWrapperClasses += ' list-hidden';\n }\n }\n}\n","<ng-container *transloco=\"let t; prefix: 'UpDevs.List'\">\n @for (item of listItems; track trackByItemId($index, item)) {\n @if ((item.children?.length || 0) > 0) {\n <div class=\"list-group-header sticky-top\">{{ item.text }}</div>\n @for (child of item.children; track child) {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:child}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n }\n } @empty {\n <div class=\"list-group-item\">\n <upd-icon tablerIcon=\"alert-triangle\" wrapperClasses=\"text-yellow\"></upd-icon>\n {{ t('NoRecordsFound') }}\n </div>\n }\n\n @if (shouldDisplayItemsCounter && listItems.length > 0) {\n <div class=\"list-items-counter bg-muted text-muted-fg\">\n {{ listItems.length }} {{ t(listItems.length === 1 ? 'Item' : 'Items') }}\n </div>\n }\n</ng-container>\n\n<ng-template #listItemTpl let-item=\"item\">\n <div class=\"list-group-item\" [class.list-group-item-action]=\"!item.hasLeftBox\" [class.active]=\"item.isActive\"\n [class.disabled]=\"item.isDisabled\" (click)=\"onSelectItem($event, item)\">\n @if (!item.hasLeftBox) {\n <span>{{ item.text }}</span>\n } @else {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"leftBoxTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n <div class=\"col text-truncate align-content-center\">\n @if (!!item.text) {\n <div class=\"text-body d-block\">{{ item.text }}</div>\n }\n @if (!!item.description) {\n <div class=\"text-muted text-truncate mt-n1\">{{ item.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #leftBoxTpl let-item=\"item\">\n <div class=\"col-auto\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\"></upd-icon>\n } @else if (item.hasCheckbox) {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"></upd-checkbox>\n <!-- [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')\"-->\n\n } @else if (item.hasLeftBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n } @else if (!!item.leftBoxImage || !!item.leftBoxText) {\n <a href=\"#\"> <!-- TODO: change. -->\n <span class=\"avatar\" style=\"background-image: url({{item.leftBoxImage}})\">{{ item.leftBoxText }}\n @if (item.hasBottomRightBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </span>\n </a>\n } @else if (!!item.leftBoxHtml) {\n <div [innerHTML]=\"item.leftBoxHtml\"></div>\n }\n </div>\n</ng-template>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TranslocoService, TranslocoModule } from '@jsverse/transloco';\nimport { UpdCheckboxModule } from '@updevs/components/form-controls/checkbox';\nimport { UpdIconsModule } from '@updevs/icons';\n\nimport * as en from './assets/i18n/en.json';\nimport * as pt from './assets/i18n/pt.json';\nimport { ListComponent } from './list.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TranslocoModule,\n UpdCheckboxModule,\n UpdIconsModule\n ],\n declarations: [\n ListComponent\n ],\n exports: [\n ListComponent\n ]\n})\nexport class UpdListModule {\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":["i2","en","pt","i1"],"mappings":";;;;;;;;;;;MAMa,aAAa,CAAA;AAiBtB,IAAA,IAAI,UAAU,GAAA;AACV,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC;eACP,CAAC,CAAC,IAAI,CAAC;eACP,CAAC,CAAC,IAAI,CAAC;eACP,IAAI,CAAC,WAAW,KAAK;eACrB,CAAC,CAAC,IAAI,CAAC;AACP,eAAA,CAAC,CAAC,IAAI,CAAC,WAAW;;AAE7B,IAAA,IAAI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,gBAAkC,EAAA;QAC1C,gBAAgB,CAAC,oCAAoC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAC7E,QAAA,gBAAgB,CAAC,cAAc,CAACC,IAAE,EAAE,IAAI,CAAC;AACzC,QAAA,gBAAgB,CAAC,cAAc,CAACC,IAAE,EAAE,IAAI,CAAC;;8GAJpC,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAb,aAAa,EAAA,YAAA,EAAA,CANlB,aAAa,CAAA,EAAA,OAAA,EAAA,CANb,YAAY;YACZ,eAAe;YACf,iBAAiB;AACjB,YAAA,cAAc,aAMd,aAAa,CAAA,EAAA,CAAA,CAAA;AAGR,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,aAAa,YAZlB,YAAY;YACZ,eAAe;YACf,iBAAiB;YACjB,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAST,aAAa,EAAA,UAAA,EAAA,CAAA;kBAdzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,iBAAiB;wBACjB;AACH,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL;AACH;AACJ,iBAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -224,7 +224,7 @@ class ModalContainerComponent extends BaseComponent {
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ModalContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
227
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: ModalContainerComponent, selector: "upd-modal-container", host: { properties: { "id": "this.id", "class": "this.hostClass", "role": "this.role", "aria-hidden": "this.ariaHidden", "aria-modal": "this.ariaModal", "tabindex": "this.tabIndex", "style.display": "this.styleDisplay" } }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "bodyContentOutlet", first: true, predicate: NgComponentOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<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", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] }); }
|
|
227
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: ModalContainerComponent, selector: "upd-modal-container", host: { properties: { "id": "this.id", "class": "this.hostClass", "role": "this.role", "aria-hidden": "this.ariaHidden", "aria-modal": "this.ariaModal", "tabindex": "this.tabIndex", "style.display": "this.styleDisplay" } }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "bodyContentOutlet", first: true, predicate: NgComponentOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<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", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] }); }
|
|
228
228
|
}
|
|
229
229
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ModalContainerComponent, decorators: [{
|
|
230
230
|
type: Component,
|
|
@@ -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,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,CA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EAAA,CARvB,YAAY;YACZ,mBAAmB;YACnB,eAAe;YACf,cAAc;YACd,iBAAiB;YACjB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAUb,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,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;;;;"}
|
|
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,QAA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;;;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,GAAG,KAAK,CAAU,IAAI,CAAC;AAC7C,QAAA,IAAA,CAAA,sBAAsB,GAAG,KAAK,CAAU,IAAI,CAAC;AAC7C,QAAA,IAAA,CAAA,yBAAyB,GAAG,KAAK,CAAU,IAAI,CAAC;AAChD,QAAA,IAAA,CAAA,yBAAyB,GAAG,KAAK,CAAU,IAAI,CAAC;AAChD,QAAA,IAAA,CAAA,qBAAqB,GAAG,KAAK,CAAU,IAAI,CAAC;AAC5C,QAAA,IAAA,CAAA,qBAAqB,GAAG,KAAK,CAAU,IAAI,CAAC;AAC5C,QAAA,IAAA,CAAA,qBAAqB,GAAG,KAAK,CAAU,IAAI,CAAC;AAC5C,QAAA,IAAA,CAAA,qBAAqB,GAAG,KAAK,CAAU,IAAI,CAAC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A,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 * Gener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