valtech-components 2.0.719 → 2.0.720
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/esm2022/lib/components/molecules/action-card/action-card.component.mjs +15 -40
- package/esm2022/lib/components/molecules/stats-card/stats-card.component.mjs +8 -10
- package/esm2022/lib/services/confirmation-dialog/confirmation-dialog.service.mjs +25 -11
- package/esm2022/lib/services/confirmation-dialog/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +44 -57
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/action-card/action-card.component.d.ts +3 -3
- package/lib/components/molecules/stats-card/stats-card.component.d.ts +2 -2
- package/lib/services/confirmation-dialog/types.d.ts +2 -2
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/lib/components/styles/alert.scss +122 -0
- package/src/lib/components/styles/overrides.scss +1 -0
|
@@ -50,7 +50,7 @@ import 'prismjs/components/prism-json';
|
|
|
50
50
|
* Current version of valtech-components.
|
|
51
51
|
* This is automatically updated during the publish process.
|
|
52
52
|
*/
|
|
53
|
-
const VERSION = '2.0.
|
|
53
|
+
const VERSION = '2.0.720';
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Servicio para gestionar presets de componentes.
|
|
@@ -11419,14 +11419,14 @@ addIcons({ trendingUp, trendingDown, remove, analytics, people, cash, cart, eye,
|
|
|
11419
11419
|
*
|
|
11420
11420
|
* @input preset: string - Name of preset to apply
|
|
11421
11421
|
* @input props: StatsCardMetadata - Configuration for the stats card
|
|
11422
|
-
* @output
|
|
11422
|
+
* @output onClick: void - Emits when card is clicked
|
|
11423
11423
|
*/
|
|
11424
11424
|
class StatsCardComponent {
|
|
11425
11425
|
constructor() {
|
|
11426
11426
|
this.presets = inject(PresetService);
|
|
11427
11427
|
this.props = {};
|
|
11428
11428
|
this.resolvedProps = {};
|
|
11429
|
-
this.
|
|
11429
|
+
this.onClick = new EventEmitter();
|
|
11430
11430
|
this.Math = Math;
|
|
11431
11431
|
}
|
|
11432
11432
|
ngOnInit() {
|
|
@@ -11438,9 +11438,7 @@ class StatsCardComponent {
|
|
|
11438
11438
|
}
|
|
11439
11439
|
}
|
|
11440
11440
|
resolveProps() {
|
|
11441
|
-
const presetProps = this.preset
|
|
11442
|
-
? this.presets.get('statsCard', this.preset)
|
|
11443
|
-
: {};
|
|
11441
|
+
const presetProps = this.preset ? this.presets.get('statsCard', this.preset) : {};
|
|
11444
11442
|
this.resolvedProps = {
|
|
11445
11443
|
...presetProps,
|
|
11446
11444
|
...this.props,
|
|
@@ -11472,13 +11470,13 @@ class StatsCardComponent {
|
|
|
11472
11470
|
return 'remove';
|
|
11473
11471
|
}
|
|
11474
11472
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StatsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11475
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: StatsCardComponent, isStandalone: true, selector: "val-stats-card", inputs: { preset: "preset", props: "props" }, outputs: {
|
|
11473
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: StatsCardComponent, isStandalone: true, selector: "val-stats-card", inputs: { preset: "preset", props: "props" }, outputs: { onClick: "onClick" }, usesOnChanges: true, ngImport: i0, template: `
|
|
11476
11474
|
<ion-card
|
|
11477
11475
|
class="stats-card"
|
|
11478
11476
|
[class]="getBackgroundClass()"
|
|
11479
11477
|
[style.--card-color]="getCardColor()"
|
|
11480
11478
|
[style.min-height.px]="resolvedProps.minHeight"
|
|
11481
|
-
(click)="
|
|
11479
|
+
(click)="onClick.emit()"
|
|
11482
11480
|
>
|
|
11483
11481
|
<ion-card-content>
|
|
11484
11482
|
<div class="stats-header">
|
|
@@ -11542,7 +11540,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
11542
11540
|
[class]="getBackgroundClass()"
|
|
11543
11541
|
[style.--card-color]="getCardColor()"
|
|
11544
11542
|
[style.min-height.px]="resolvedProps.minHeight"
|
|
11545
|
-
(click)="
|
|
11543
|
+
(click)="onClick.emit()"
|
|
11546
11544
|
>
|
|
11547
11545
|
<ion-card-content>
|
|
11548
11546
|
<div class="stats-header">
|
|
@@ -11601,7 +11599,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
11601
11599
|
type: Input
|
|
11602
11600
|
}], props: [{
|
|
11603
11601
|
type: Input
|
|
11604
|
-
}],
|
|
11602
|
+
}], onClick: [{
|
|
11605
11603
|
type: Output
|
|
11606
11604
|
}] } });
|
|
11607
11605
|
|
|
@@ -18782,10 +18780,7 @@ const ACTION_CARD_DEFAULTS = {
|
|
|
18782
18780
|
};
|
|
18783
18781
|
|
|
18784
18782
|
addIcons({ chevronForwardOutline });
|
|
18785
|
-
const IONIC_COLORS = [
|
|
18786
|
-
'primary', 'secondary', 'tertiary', 'success',
|
|
18787
|
-
'warning', 'danger', 'light', 'medium', 'dark'
|
|
18788
|
-
];
|
|
18783
|
+
const IONIC_COLORS = ['primary', 'secondary', 'tertiary', 'success', 'warning', 'danger', 'light', 'medium', 'dark'];
|
|
18789
18784
|
/**
|
|
18790
18785
|
* val-action-card
|
|
18791
18786
|
*
|
|
@@ -18800,7 +18795,7 @@ const IONIC_COLORS = [
|
|
|
18800
18795
|
* title: 'Settings',
|
|
18801
18796
|
* description: 'Manage your preferences'
|
|
18802
18797
|
* }"
|
|
18803
|
-
* (
|
|
18798
|
+
* (onClick)="onCardClick($event)"
|
|
18804
18799
|
* />
|
|
18805
18800
|
* ```
|
|
18806
18801
|
*
|
|
@@ -18836,7 +18831,7 @@ class ActionCardComponent {
|
|
|
18836
18831
|
/** Component configuration */
|
|
18837
18832
|
this.props = input({});
|
|
18838
18833
|
/** Event emitted when card is clicked */
|
|
18839
|
-
this.
|
|
18834
|
+
this.onClick = new EventEmitter();
|
|
18840
18835
|
/** Merged configuration with defaults */
|
|
18841
18836
|
this.config = computed(() => ({
|
|
18842
18837
|
...ACTION_CARD_DEFAULTS,
|
|
@@ -18900,7 +18895,7 @@ class ActionCardComponent {
|
|
|
18900
18895
|
return;
|
|
18901
18896
|
}
|
|
18902
18897
|
// Emit click event
|
|
18903
|
-
this.
|
|
18898
|
+
this.onClick.emit({
|
|
18904
18899
|
token: cfg.token,
|
|
18905
18900
|
navigated: !!cfg.routerLink || !!cfg.href,
|
|
18906
18901
|
});
|
|
@@ -18910,7 +18905,7 @@ class ActionCardComponent {
|
|
|
18910
18905
|
}
|
|
18911
18906
|
}
|
|
18912
18907
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ActionCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18913
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ActionCardComponent, isStandalone: true, selector: "val-action-card", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, outputs: {
|
|
18908
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ActionCardComponent, isStandalone: true, selector: "val-action-card", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: `
|
|
18914
18909
|
<article
|
|
18915
18910
|
class="action-card"
|
|
18916
18911
|
[class.action-card--small]="config().size === 'small'"
|
|
@@ -18942,11 +18937,7 @@ class ActionCardComponent {
|
|
|
18942
18937
|
}
|
|
18943
18938
|
|
|
18944
18939
|
<!-- Icon Container -->
|
|
18945
|
-
<div
|
|
18946
|
-
class="action-card__icon"
|
|
18947
|
-
[style.color]="getIconColor()"
|
|
18948
|
-
[style.background-color]="getIconBackgroundColor()"
|
|
18949
|
-
>
|
|
18940
|
+
<div class="action-card__icon" [style.color]="getIconColor()" [style.background-color]="getIconBackgroundColor()">
|
|
18950
18941
|
@if (config().icon?.ionicon) {
|
|
18951
18942
|
<ion-icon [name]="config().icon!.ionicon!"></ion-icon>
|
|
18952
18943
|
} @else if (config().icon?.svgPath) {
|
|
@@ -18961,11 +18952,7 @@ class ActionCardComponent {
|
|
|
18961
18952
|
<path [attr.d]="config().icon!.svgPath" />
|
|
18962
18953
|
</svg>
|
|
18963
18954
|
} @else if (config().icon?.imageUrl) {
|
|
18964
|
-
<img
|
|
18965
|
-
[src]="config().icon!.imageUrl"
|
|
18966
|
-
[alt]="getTitle()"
|
|
18967
|
-
class="action-card__icon-image"
|
|
18968
|
-
/>
|
|
18955
|
+
<img [src]="config().icon!.imageUrl" [alt]="getTitle()" class="action-card__icon-image" />
|
|
18969
18956
|
}
|
|
18970
18957
|
</div>
|
|
18971
18958
|
|
|
@@ -18979,10 +18966,7 @@ class ActionCardComponent {
|
|
|
18979
18966
|
|
|
18980
18967
|
<!-- Chevron (optional) -->
|
|
18981
18968
|
@if (config().showChevron && !config().disabled) {
|
|
18982
|
-
<ion-icon
|
|
18983
|
-
name="chevron-forward-outline"
|
|
18984
|
-
class="action-card__chevron"
|
|
18985
|
-
></ion-icon>
|
|
18969
|
+
<ion-icon name="chevron-forward-outline" class="action-card__chevron"></ion-icon>
|
|
18986
18970
|
}
|
|
18987
18971
|
</article>
|
|
18988
18972
|
`, isInline: true, styles: [":host{display:block}.action-card{position:relative;display:flex;align-items:center;gap:1rem;padding:1rem;background:var(--card-bg, var(--ion-card-background, var(--ion-background-color)));border-radius:12px;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease;text-decoration:none;overflow:hidden;--ripple-color: var(--ion-color-primary)}.action-card--small{padding:.75rem;gap:.75rem}.action-card--small .action-card__icon{width:36px;height:36px;font-size:18px;border-radius:8px}.action-card--small .action-card__icon svg{width:18px;height:18px}.action-card--small .action-card__title{font-size:.9rem}.action-card--small .action-card__description{font-size:.8rem}.action-card--medium{padding:1rem;gap:1rem}.action-card--medium .action-card__icon{width:48px;height:48px;font-size:24px;border-radius:10px}.action-card--medium .action-card__icon svg{width:24px;height:24px}.action-card--medium .action-card__title{font-size:1rem}.action-card--medium .action-card__description{font-size:.875rem}.action-card--large{padding:1.25rem;gap:1.25rem}.action-card--large .action-card__icon{width:56px;height:56px;font-size:28px;border-radius:12px}.action-card--large .action-card__icon svg{width:28px;height:28px}.action-card--large .action-card__title{font-size:1.1rem}.action-card--large .action-card__description{font-size:.9rem}.action-card--bordered{border:1px solid var(--card-border-color, var(--ion-color-light-shade))}.action-card--shadowed{box-shadow:0 2px 8px #00000014}.action-card--clickable:hover{transform:translateY(-2px);box-shadow:0 4px 16px #0000001f}.action-card--clickable:focus-visible{outline:2px solid var(--ion-color-primary);outline-offset:2px}.action-card--clickable:active{transform:translateY(0)}.action-card--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.action-card__badge{position:absolute;top:8px;right:8px;padding:2px 8px;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;border-radius:10px;z-index:1}.action-card__icon{flex-shrink:0;display:flex;align-items:center;justify-content:center}.action-card__icon ion-icon{font-size:inherit}.action-card__icon svg{display:block}.action-card__icon-image{width:100%;height:100%;object-fit:cover;border-radius:8px}.action-card__content{flex:1;min-width:0}.action-card__title{margin:0 0 .25rem;font-weight:600;color:var(--ion-text-color);line-height:1.3}.action-card__description{margin:0;color:var(--ion-color-medium);line-height:1.4}.action-card__chevron{flex-shrink:0;font-size:1.25rem;color:var(--ion-color-medium);transition:transform .2s ease}.action-card--clickable:hover .action-card__chevron{transform:translate(4px)}@media (prefers-color-scheme: dark){.action-card--shadowed{box-shadow:0 2px 8px #0000004d}.action-card--clickable:hover{box-shadow:0 4px 16px #0006}}:host-context(.dark) .action-card--shadowed,:host-context(body.dark) .action-card--shadowed,:host-context([data-theme=dark]) .action-card--shadowed{box-shadow:0 2px 8px #0000004d}:host-context(.dark) .action-card--clickable:hover,:host-context(body.dark) .action-card--clickable:hover,:host-context([data-theme=dark]) .action-card--clickable:hover{box-shadow:0 4px 16px #0006}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonRippleEffect, selector: "ion-ripple-effect", inputs: ["type"] }] }); }
|
|
@@ -19021,11 +19005,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
19021
19005
|
}
|
|
19022
19006
|
|
|
19023
19007
|
<!-- Icon Container -->
|
|
19024
|
-
<div
|
|
19025
|
-
class="action-card__icon"
|
|
19026
|
-
[style.color]="getIconColor()"
|
|
19027
|
-
[style.background-color]="getIconBackgroundColor()"
|
|
19028
|
-
>
|
|
19008
|
+
<div class="action-card__icon" [style.color]="getIconColor()" [style.background-color]="getIconBackgroundColor()">
|
|
19029
19009
|
@if (config().icon?.ionicon) {
|
|
19030
19010
|
<ion-icon [name]="config().icon!.ionicon!"></ion-icon>
|
|
19031
19011
|
} @else if (config().icon?.svgPath) {
|
|
@@ -19040,11 +19020,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
19040
19020
|
<path [attr.d]="config().icon!.svgPath" />
|
|
19041
19021
|
</svg>
|
|
19042
19022
|
} @else if (config().icon?.imageUrl) {
|
|
19043
|
-
<img
|
|
19044
|
-
[src]="config().icon!.imageUrl"
|
|
19045
|
-
[alt]="getTitle()"
|
|
19046
|
-
class="action-card__icon-image"
|
|
19047
|
-
/>
|
|
19023
|
+
<img [src]="config().icon!.imageUrl" [alt]="getTitle()" class="action-card__icon-image" />
|
|
19048
19024
|
}
|
|
19049
19025
|
</div>
|
|
19050
19026
|
|
|
@@ -19058,14 +19034,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
19058
19034
|
|
|
19059
19035
|
<!-- Chevron (optional) -->
|
|
19060
19036
|
@if (config().showChevron && !config().disabled) {
|
|
19061
|
-
<ion-icon
|
|
19062
|
-
name="chevron-forward-outline"
|
|
19063
|
-
class="action-card__chevron"
|
|
19064
|
-
></ion-icon>
|
|
19037
|
+
<ion-icon name="chevron-forward-outline" class="action-card__chevron"></ion-icon>
|
|
19065
19038
|
}
|
|
19066
19039
|
</article>
|
|
19067
19040
|
`, styles: [":host{display:block}.action-card{position:relative;display:flex;align-items:center;gap:1rem;padding:1rem;background:var(--card-bg, var(--ion-card-background, var(--ion-background-color)));border-radius:12px;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease;text-decoration:none;overflow:hidden;--ripple-color: var(--ion-color-primary)}.action-card--small{padding:.75rem;gap:.75rem}.action-card--small .action-card__icon{width:36px;height:36px;font-size:18px;border-radius:8px}.action-card--small .action-card__icon svg{width:18px;height:18px}.action-card--small .action-card__title{font-size:.9rem}.action-card--small .action-card__description{font-size:.8rem}.action-card--medium{padding:1rem;gap:1rem}.action-card--medium .action-card__icon{width:48px;height:48px;font-size:24px;border-radius:10px}.action-card--medium .action-card__icon svg{width:24px;height:24px}.action-card--medium .action-card__title{font-size:1rem}.action-card--medium .action-card__description{font-size:.875rem}.action-card--large{padding:1.25rem;gap:1.25rem}.action-card--large .action-card__icon{width:56px;height:56px;font-size:28px;border-radius:12px}.action-card--large .action-card__icon svg{width:28px;height:28px}.action-card--large .action-card__title{font-size:1.1rem}.action-card--large .action-card__description{font-size:.9rem}.action-card--bordered{border:1px solid var(--card-border-color, var(--ion-color-light-shade))}.action-card--shadowed{box-shadow:0 2px 8px #00000014}.action-card--clickable:hover{transform:translateY(-2px);box-shadow:0 4px 16px #0000001f}.action-card--clickable:focus-visible{outline:2px solid var(--ion-color-primary);outline-offset:2px}.action-card--clickable:active{transform:translateY(0)}.action-card--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.action-card__badge{position:absolute;top:8px;right:8px;padding:2px 8px;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;border-radius:10px;z-index:1}.action-card__icon{flex-shrink:0;display:flex;align-items:center;justify-content:center}.action-card__icon ion-icon{font-size:inherit}.action-card__icon svg{display:block}.action-card__icon-image{width:100%;height:100%;object-fit:cover;border-radius:8px}.action-card__content{flex:1;min-width:0}.action-card__title{margin:0 0 .25rem;font-weight:600;color:var(--ion-text-color);line-height:1.3}.action-card__description{margin:0;color:var(--ion-color-medium);line-height:1.4}.action-card__chevron{flex-shrink:0;font-size:1.25rem;color:var(--ion-color-medium);transition:transform .2s ease}.action-card--clickable:hover .action-card__chevron{transform:translate(4px)}@media (prefers-color-scheme: dark){.action-card--shadowed{box-shadow:0 2px 8px #0000004d}.action-card--clickable:hover{box-shadow:0 4px 16px #0006}}:host-context(.dark) .action-card--shadowed,:host-context(body.dark) .action-card--shadowed,:host-context([data-theme=dark]) .action-card--shadowed{box-shadow:0 2px 8px #0000004d}:host-context(.dark) .action-card--clickable:hover,:host-context(body.dark) .action-card--clickable:hover,:host-context([data-theme=dark]) .action-card--clickable:hover{box-shadow:0 4px 16px #0006}\n"] }]
|
|
19068
|
-
}], propDecorators: {
|
|
19041
|
+
}], propDecorators: { onClick: [{
|
|
19069
19042
|
type: Output
|
|
19070
19043
|
}] } });
|
|
19071
19044
|
|
|
@@ -28796,15 +28769,22 @@ class ConfirmationDialogService {
|
|
|
28796
28769
|
*/
|
|
28797
28770
|
async confirm(options) {
|
|
28798
28771
|
const buttons = this.buildButtons(options);
|
|
28772
|
+
// Default: usa val-alert (estilo iOS dark unificado de la lib)
|
|
28773
|
+
const userClasses = options.cssClass
|
|
28774
|
+
? Array.isArray(options.cssClass)
|
|
28775
|
+
? options.cssClass
|
|
28776
|
+
: [options.cssClass]
|
|
28777
|
+
: [];
|
|
28778
|
+
const cssClass = ['val-alert', ...userClasses];
|
|
28799
28779
|
const alert = await this.alertController.create({
|
|
28800
28780
|
header: options.title,
|
|
28801
28781
|
subHeader: options.subHeader,
|
|
28802
28782
|
message: options.message,
|
|
28803
28783
|
buttons,
|
|
28804
28784
|
backdropDismiss: options.backdropDismiss ?? false,
|
|
28805
|
-
cssClass
|
|
28806
|
-
mode: options.mode,
|
|
28807
|
-
translucent: options.translucent ??
|
|
28785
|
+
cssClass,
|
|
28786
|
+
mode: options.mode ?? 'ios',
|
|
28787
|
+
translucent: options.translucent ?? true,
|
|
28808
28788
|
animated: options.animated ?? true,
|
|
28809
28789
|
});
|
|
28810
28790
|
await alert.present();
|
|
@@ -28831,13 +28811,20 @@ class ConfirmationDialogService {
|
|
|
28831
28811
|
* @returns Promise resolving to the confirmation result
|
|
28832
28812
|
*/
|
|
28833
28813
|
async confirmDestructive(options) {
|
|
28814
|
+
// Marca el modal con val-alert--destructive para que el CSS pinte
|
|
28815
|
+
// el texto del botón destructivo en rojo (sin tocar el fondo).
|
|
28816
|
+
const extraClass = 'val-alert--destructive';
|
|
28817
|
+
const userClasses = options.cssClass
|
|
28818
|
+
? Array.isArray(options.cssClass)
|
|
28819
|
+
? options.cssClass
|
|
28820
|
+
: [options.cssClass]
|
|
28821
|
+
: [];
|
|
28834
28822
|
return this.confirm({
|
|
28835
28823
|
...options,
|
|
28824
|
+
cssClass: [...userClasses, extraClass],
|
|
28836
28825
|
confirmButton: {
|
|
28837
28826
|
text: options.confirmButton?.text || 'Delete',
|
|
28838
28827
|
role: 'destructive',
|
|
28839
|
-
color: 'danger',
|
|
28840
|
-
cssClass: 'destructive-button',
|
|
28841
28828
|
...options.confirmButton,
|
|
28842
28829
|
},
|
|
28843
28830
|
});
|
|
@@ -28894,21 +28881,21 @@ class ConfirmationDialogService {
|
|
|
28894
28881
|
}
|
|
28895
28882
|
buildButtons(options) {
|
|
28896
28883
|
const buttons = [];
|
|
28897
|
-
// Cancel button
|
|
28884
|
+
// Cancel button — sin color ionic por default (el CSS de val-alert se encarga)
|
|
28898
28885
|
const cancelBtn = options.cancelButton || DEFAULT_CANCEL_BUTTON;
|
|
28899
28886
|
buttons.push({
|
|
28900
28887
|
text: cancelBtn.text,
|
|
28901
28888
|
role: cancelBtn.role || 'cancel',
|
|
28902
|
-
cssClass: cancelBtn.cssClass
|
|
28889
|
+
cssClass: cancelBtn.cssClass,
|
|
28903
28890
|
handler: cancelBtn.handler,
|
|
28904
28891
|
});
|
|
28905
28892
|
// Extra buttons (if any)
|
|
28906
28893
|
if (options.extraButtons) {
|
|
28907
|
-
options.extraButtons.forEach(
|
|
28894
|
+
options.extraButtons.forEach(btn => {
|
|
28908
28895
|
buttons.push({
|
|
28909
28896
|
text: btn.text,
|
|
28910
28897
|
role: btn.role,
|
|
28911
|
-
cssClass: btn.cssClass
|
|
28898
|
+
cssClass: btn.cssClass,
|
|
28912
28899
|
handler: btn.handler,
|
|
28913
28900
|
});
|
|
28914
28901
|
});
|
|
@@ -28918,7 +28905,7 @@ class ConfirmationDialogService {
|
|
|
28918
28905
|
buttons.push({
|
|
28919
28906
|
text: confirmBtn.text,
|
|
28920
28907
|
role: confirmBtn.role || 'confirm',
|
|
28921
|
-
cssClass: confirmBtn.cssClass
|
|
28908
|
+
cssClass: confirmBtn.cssClass,
|
|
28922
28909
|
handler: confirmBtn.handler,
|
|
28923
28910
|
});
|
|
28924
28911
|
return buttons;
|