intelica-library-components 1.1.63 → 1.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, signal, Pipe, Component, TemplateRef, ContentChild, Input, Directive, EventEmitter, ContentChildren, Output, HostListener, forwardRef, ViewChild, PLATFORM_ID, Inject, DestroyRef, output, input, effect, Optional, Host } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, signal, Pipe, Component, TemplateRef, ContentChild, Input, Directive, EventEmitter, ContentChildren, Output, HostListener, forwardRef, ViewChild, PLATFORM_ID, Inject, DestroyRef, output, input, effect, Optional, Host, InjectionToken } from '@angular/core';
|
|
3
3
|
import { getCookie, setCookie, Cookies } from 'typescript-cookie';
|
|
4
4
|
import * as i1$4 from '@angular/common/http';
|
|
5
5
|
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
|
|
@@ -6095,11 +6095,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6095
6095
|
|
|
6096
6096
|
class IntelicaAlertComponent {
|
|
6097
6097
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IntelicaAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6098
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: IntelicaAlertComponent, isStandalone: true, selector: "intelica-alert", ngImport: i0, template: "<!-- \r\n Clases Modificadoras para estados:\r\n prConfirmDialog--warning\r\n prConfirmDialog--danger\r\n prConfirmDialog--error\r\n prConfirmDialog--success\r\n prConfirmDialog--default\r\n-->\r\n<p-confirmDialog #cd\r\n [styleClass]=\"'prConfirmDialog ' + ($any(cd.confirmation)?.data?.config?.type ? ' prConfirmDialog--' + $any(cd.confirmation).data.config.type : ' prConfirmDialog--default')\"\r\n key=\"intelica-alert-dialog\" [closable]=\"false\" [visible]=\"undefined\">\r\n <!-- \r\n We use the headless template. \r\n 'message' contains the confirmation object.\r\n 'message.data' contains our custom 'presentationData' object from AlertService.\r\n -->\r\n <ng-template pTemplate=\"headless\" let-message let-onAccept=\"onAccept\" let-onReject=\"onReject\">\r\n <div class=\"prConfirmDialog__content\">\r\n <!-- Close Button -->\r\n @if (message.data.config.showCloseButton) {\r\n <div class=\"prConfirmDialog__close\">\r\n <p-button
|
|
6098
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: IntelicaAlertComponent, isStandalone: true, selector: "intelica-alert", ngImport: i0, template: "<!-- \r\n Clases Modificadoras para estados:\r\n prConfirmDialog--warning\r\n prConfirmDialog--danger\r\n prConfirmDialog--error\r\n prConfirmDialog--success\r\n prConfirmDialog--default\r\n-->\r\n<p-confirmDialog #cd\r\n [styleClass]=\"'prConfirmDialog ' + ($any(cd.confirmation)?.data?.config?.type ? ' prConfirmDialog--' + $any(cd.confirmation).data.config.type : ' prConfirmDialog--default')\"\r\n key=\"intelica-alert-dialog\" [closable]=\"false\" [visible]=\"undefined\">\r\n <!-- \r\n We use the headless template. \r\n 'message' contains the confirmation object.\r\n 'message.data' contains our custom 'presentationData' object from AlertService.\r\n -->\r\n <ng-template pTemplate=\"headless\" let-message let-onAccept=\"onAccept\" let-onReject=\"onReject\">\r\n <div class=\"prConfirmDialog__content\">\r\n <!-- Close Button -->\r\n @if (message.data.config.showCloseButton) {\r\n <div class=\"prConfirmDialog__close\">\r\n <p-button class=\"prButton\" [rounded]=\"false\" [text]=\"true\" (onClick)=\"onReject()\" ariaLabel=\"Cerrar\"><i\r\n class=\"pi pi-times\" style=\"color: #333;\"></i></p-button>\r\n </div>\r\n }\r\n\r\n <!-- Icon -->\r\n <div class=\"prConfirmDialog__icon\">\r\n @if (message.data.config.customImageUrl) {\r\n <img [src]=\"message.data.config.customImageUrl\" alt=\"Alert icon\" />\r\n } @else {\r\n <i [class]=\"$any(message).data.iconClass\"></i>\r\n }\r\n </div>\r\n <div class=\"prConfirmDialog__details\">\r\n <!-- Title -->\r\n <h2 class=\"prConfirmDialog__title\">{{ message.header }}</h2>\r\n\r\n <!-- Subtitle / Message -->\r\n @if (message.message) {\r\n <p class=\"prConfirmDialog__subtitle\"\r\n [style.color]=\"$any(message).data.config.styles?.subtitleColor ?? '#555'\">{{ message.message }}</p>\r\n }\r\n </div>\r\n\r\n <!-- HTML Content -->\r\n @if (message.data.config.htmlContent) {\r\n <div class=\"prConfirmDialog__text\" [innerHTML]=\"$any(message).data.config.htmlContent\"\r\n [style.color]=\"$any(message).data.config.styles?.subtitleColor ?? '#555'\"></div>\r\n }\r\n\r\n <!-- Buttons -->\r\n <div class=\"prConfirmDialog__footer\">\r\n <!-- Confirm Button -->\r\n <p-button class=\"prButton\" [label]=\"message.data.confirmText\" (onClick)=\"onAccept()\" />\r\n <!-- Cancel Button -->\r\n @if (message.data.showCancelButton) {\r\n <p-button class=\"prButton\" [label]=\"message.data.cancelText\" severity=\"secondary\" [outlined]=\"true\"\r\n (onClick)=\"onReject()\" />\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n</p-confirmDialog>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i1$3.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "modal", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2$1.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
6099
6099
|
}
|
|
6100
6100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IntelicaAlertComponent, decorators: [{
|
|
6101
6101
|
type: Component,
|
|
6102
|
-
args: [{ selector: "intelica-alert", standalone: true, imports: [CommonModule, ConfirmDialogModule, ButtonModule], template: "<!-- \r\n Clases Modificadoras para estados:\r\n prConfirmDialog--warning\r\n prConfirmDialog--danger\r\n prConfirmDialog--error\r\n prConfirmDialog--success\r\n prConfirmDialog--default\r\n-->\r\n<p-confirmDialog #cd\r\n [styleClass]=\"'prConfirmDialog ' + ($any(cd.confirmation)?.data?.config?.type ? ' prConfirmDialog--' + $any(cd.confirmation).data.config.type : ' prConfirmDialog--default')\"\r\n key=\"intelica-alert-dialog\" [closable]=\"false\" [visible]=\"undefined\">\r\n <!-- \r\n We use the headless template. \r\n 'message' contains the confirmation object.\r\n 'message.data' contains our custom 'presentationData' object from AlertService.\r\n -->\r\n <ng-template pTemplate=\"headless\" let-message let-onAccept=\"onAccept\" let-onReject=\"onReject\">\r\n <div class=\"prConfirmDialog__content\">\r\n <!-- Close Button -->\r\n @if (message.data.config.showCloseButton) {\r\n <div class=\"prConfirmDialog__close\">\r\n <p-button
|
|
6102
|
+
args: [{ selector: "intelica-alert", standalone: true, imports: [CommonModule, ConfirmDialogModule, ButtonModule], template: "<!-- \r\n Clases Modificadoras para estados:\r\n prConfirmDialog--warning\r\n prConfirmDialog--danger\r\n prConfirmDialog--error\r\n prConfirmDialog--success\r\n prConfirmDialog--default\r\n-->\r\n<p-confirmDialog #cd\r\n [styleClass]=\"'prConfirmDialog ' + ($any(cd.confirmation)?.data?.config?.type ? ' prConfirmDialog--' + $any(cd.confirmation).data.config.type : ' prConfirmDialog--default')\"\r\n key=\"intelica-alert-dialog\" [closable]=\"false\" [visible]=\"undefined\">\r\n <!-- \r\n We use the headless template. \r\n 'message' contains the confirmation object.\r\n 'message.data' contains our custom 'presentationData' object from AlertService.\r\n -->\r\n <ng-template pTemplate=\"headless\" let-message let-onAccept=\"onAccept\" let-onReject=\"onReject\">\r\n <div class=\"prConfirmDialog__content\">\r\n <!-- Close Button -->\r\n @if (message.data.config.showCloseButton) {\r\n <div class=\"prConfirmDialog__close\">\r\n <p-button class=\"prButton\" [rounded]=\"false\" [text]=\"true\" (onClick)=\"onReject()\" ariaLabel=\"Cerrar\"><i\r\n class=\"pi pi-times\" style=\"color: #333;\"></i></p-button>\r\n </div>\r\n }\r\n\r\n <!-- Icon -->\r\n <div class=\"prConfirmDialog__icon\">\r\n @if (message.data.config.customImageUrl) {\r\n <img [src]=\"message.data.config.customImageUrl\" alt=\"Alert icon\" />\r\n } @else {\r\n <i [class]=\"$any(message).data.iconClass\"></i>\r\n }\r\n </div>\r\n <div class=\"prConfirmDialog__details\">\r\n <!-- Title -->\r\n <h2 class=\"prConfirmDialog__title\">{{ message.header }}</h2>\r\n\r\n <!-- Subtitle / Message -->\r\n @if (message.message) {\r\n <p class=\"prConfirmDialog__subtitle\"\r\n [style.color]=\"$any(message).data.config.styles?.subtitleColor ?? '#555'\">{{ message.message }}</p>\r\n }\r\n </div>\r\n\r\n <!-- HTML Content -->\r\n @if (message.data.config.htmlContent) {\r\n <div class=\"prConfirmDialog__text\" [innerHTML]=\"$any(message).data.config.htmlContent\"\r\n [style.color]=\"$any(message).data.config.styles?.subtitleColor ?? '#555'\"></div>\r\n }\r\n\r\n <!-- Buttons -->\r\n <div class=\"prConfirmDialog__footer\">\r\n <!-- Confirm Button -->\r\n <p-button class=\"prButton\" [label]=\"message.data.confirmText\" (onClick)=\"onAccept()\" />\r\n <!-- Cancel Button -->\r\n @if (message.data.showCancelButton) {\r\n <p-button class=\"prButton\" [label]=\"message.data.cancelText\" severity=\"secondary\" [outlined]=\"true\"\r\n (onClick)=\"onReject()\" />\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n</p-confirmDialog>" }]
|
|
6103
6103
|
}] });
|
|
6104
6104
|
|
|
6105
6105
|
class GlobalFavoriteService {
|
|
@@ -6840,27 +6840,39 @@ const ALERT_ICON_PATHS = {
|
|
|
6840
6840
|
// warning: "/assets/icons/alerts/alert-warning.svg",
|
|
6841
6841
|
// success: "/assets/icons/alerts/alert-success.svg",
|
|
6842
6842
|
};
|
|
6843
|
+
/**
|
|
6844
|
+
* InjectionToken to override the default icon CSS class per alert type.
|
|
6845
|
+
* Provide a Partial<Record<AlertType, string>> to customize icons project-wide.
|
|
6846
|
+
*
|
|
6847
|
+
* Example (app.config.ts):
|
|
6848
|
+
* { provide: ALERT_ICON_OVERRIDES, useValue: {
|
|
6849
|
+
* [AlertType.SUCCESS]: 'icon icon-success',
|
|
6850
|
+
* [AlertType.WARNING]: 'icon icon-warning',
|
|
6851
|
+
* [AlertType.ERROR]: 'icon icon-alert',
|
|
6852
|
+
* }}
|
|
6853
|
+
*/
|
|
6854
|
+
const ALERT_ICON_OVERRIDES = new InjectionToken('ALERT_ICON_OVERRIDES');
|
|
6843
6855
|
/**
|
|
6844
6856
|
* Centralized configuration for each alert type using PrimeNG icons.
|
|
6845
6857
|
*/
|
|
6846
6858
|
const ALERT_TYPE_CONFIG = {
|
|
6847
6859
|
[AlertType.WARNING]: {
|
|
6848
|
-
titleColor: "#
|
|
6849
|
-
icon: "
|
|
6860
|
+
titleColor: "#c27d00",
|
|
6861
|
+
icon: "icon icon-warning",
|
|
6850
6862
|
iconBackgroundColor: "#fff3cd",
|
|
6851
|
-
iconColor: "#
|
|
6863
|
+
iconColor: "#c27d00",
|
|
6852
6864
|
},
|
|
6853
6865
|
[AlertType.SUCCESS]: {
|
|
6854
|
-
titleColor: "#
|
|
6855
|
-
icon: "
|
|
6866
|
+
titleColor: "#126629",
|
|
6867
|
+
icon: "icon icon-success",
|
|
6856
6868
|
iconBackgroundColor: "#d4edda",
|
|
6857
|
-
iconColor: "#
|
|
6869
|
+
iconColor: "#126629",
|
|
6858
6870
|
},
|
|
6859
6871
|
[AlertType.ERROR]: {
|
|
6860
|
-
titleColor: "#
|
|
6861
|
-
icon: "
|
|
6872
|
+
titleColor: "#960d0d",
|
|
6873
|
+
icon: "icon icon-alert",
|
|
6862
6874
|
iconBackgroundColor: "#f8d7da",
|
|
6863
|
-
iconColor: "#
|
|
6875
|
+
iconColor: "#960d0d",
|
|
6864
6876
|
},
|
|
6865
6877
|
};
|
|
6866
6878
|
|
|
@@ -7268,6 +7280,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
7268
7280
|
|
|
7269
7281
|
class AlertService {
|
|
7270
7282
|
confirmationService = inject(ConfirmationService);
|
|
7283
|
+
iconOverrides = inject(ALERT_ICON_OVERRIDES, { optional: true });
|
|
7271
7284
|
DIALOG_KEY = 'intelica-alert-dialog';
|
|
7272
7285
|
/**
|
|
7273
7286
|
* Displays a warning alert with yellow styling.
|
|
@@ -7432,6 +7445,9 @@ class AlertService {
|
|
|
7432
7445
|
if (config?.customIcon) {
|
|
7433
7446
|
return config.customIcon;
|
|
7434
7447
|
}
|
|
7448
|
+
if (config?.type && this.iconOverrides?.[config.type]) {
|
|
7449
|
+
return this.iconOverrides[config.type];
|
|
7450
|
+
}
|
|
7435
7451
|
return typeConfig?.icon ?? "pi pi-info-circle";
|
|
7436
7452
|
}
|
|
7437
7453
|
getIconBackgroundColor(config, typeConfig) {
|
|
@@ -11324,5 +11340,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11324
11340
|
* Generated bundle index. Do not edit.
|
|
11325
11341
|
*/
|
|
11326
11342
|
|
|
11327
|
-
export { ALERT_DEFAULTS, ALERT_ICON_PATHS, ALERT_TYPE_CONFIG, ActionDirective, ActionsMenuComponent, AddFavoritesComponent, AlertButtonMode, AlertService, AlertType, ButtonSplitComponent, CheckboxFilterDirective, ClientContextSelector, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DATEPICKER_BUTTON_TYPES, DataDirective, DateFilterDirective, DateModeOptions, DatepickerComponent, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFavoriteService, GlobalFeatureFlagService, GlobalMenuService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaAlertComponent, IntelicaCellCheckboxDirective, IntelicaSessionService, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, NotificationJobService, NotificationOrchestratorService, NotificationService, NotificationSignalRService, OrderConstants, PageInformation, PageRootChildGuard, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RequestCacheService, ResponseHeadersInterceptor, RouteGuard, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermGuard, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
11343
|
+
export { ALERT_DEFAULTS, ALERT_ICON_OVERRIDES, ALERT_ICON_PATHS, ALERT_TYPE_CONFIG, ActionDirective, ActionsMenuComponent, AddFavoritesComponent, AlertButtonMode, AlertService, AlertType, ButtonSplitComponent, CheckboxFilterDirective, ClientContextSelector, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DATEPICKER_BUTTON_TYPES, DataDirective, DateFilterDirective, DateModeOptions, DatepickerComponent, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFavoriteService, GlobalFeatureFlagService, GlobalMenuService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaAlertComponent, IntelicaCellCheckboxDirective, IntelicaSessionService, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, NotificationJobService, NotificationOrchestratorService, NotificationService, NotificationSignalRService, OrderConstants, PageInformation, PageRootChildGuard, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RequestCacheService, ResponseHeadersInterceptor, RouteGuard, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermGuard, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
11328
11344
|
//# sourceMappingURL=intelica-library-components.mjs.map
|