@cauca-911/material 18.0.1-beta5 → 18.0.1-beta7
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,7 +1,8 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
2
|
import { MatButton, } from '@angular/material/button';
|
|
3
3
|
import { MatIconModule } from '@angular/material/icon';
|
|
4
4
|
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
+
import { BaseButtonWithLabel } from '../base-button';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
import * as i1 from "@angular/material/icon";
|
|
7
8
|
import * as i2 from "@ngx-translate/core";
|
|
@@ -11,7 +12,7 @@ function RaisedButtonComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
11
12
|
i0.ɵɵelementEnd();
|
|
12
13
|
} if (rf & 2) {
|
|
13
14
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
14
|
-
i0.ɵɵclassProp("button-spin", ctx_r0.isInProgress
|
|
15
|
+
i0.ɵɵclassProp("button-spin", ctx_r0.isInProgress);
|
|
15
16
|
i0.ɵɵadvance();
|
|
16
17
|
i0.ɵɵtextInterpolate(ctx_r0.iconToShow());
|
|
17
18
|
} }
|
|
@@ -34,26 +35,13 @@ function RaisedButtonComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
34
35
|
i0.ɵɵelementEnd();
|
|
35
36
|
} if (rf & 2) {
|
|
36
37
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
37
|
-
i0.ɵɵclassProp("button-spin", ctx_r0.isInProgress
|
|
38
|
+
i0.ɵɵclassProp("button-spin", ctx_r0.isInProgress);
|
|
38
39
|
i0.ɵɵadvance();
|
|
39
40
|
i0.ɵɵtextInterpolate(ctx_r0.iconToShow());
|
|
40
41
|
} }
|
|
41
|
-
export class RaisedButtonComponent {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.label = input();
|
|
45
|
-
this.color = input(undefined);
|
|
46
|
-
this.icon = input();
|
|
47
|
-
this.iconAlignment = input('left');
|
|
48
|
-
this.isDisabled = input(false);
|
|
49
|
-
this.isInProgress = input(false);
|
|
50
|
-
this.showIcon = computed(() => !!this.icon() || this.isInProgress());
|
|
51
|
-
this.iconToShow = computed(() => this.isInProgress() ? 'update' : this.icon());
|
|
52
|
-
this.buttonDisabled = computed(() => this.isDisabled() || this.isInProgress());
|
|
53
|
-
this.buttonClick = output();
|
|
54
|
-
}
|
|
55
|
-
static { this.ɵfac = function RaisedButtonComponent_Factory(t) { return new (t || RaisedButtonComponent)(); }; }
|
|
56
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RaisedButtonComponent, selectors: [["app-raised-button"]], inputs: { translateLabel: [1, "translateLabel"], label: [1, "label"], color: [1, "color"], icon: [1, "icon"], iconAlignment: [1, "iconAlignment"], isDisabled: [1, "isDisabled"], isInProgress: [1, "isInProgress"] }, outputs: { buttonClick: "buttonClick" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 5, vars: 5, consts: [["mat-raised-button", "", "onclick", "this.blur()", 3, "click", "color", "disabled"], [3, "button-spin"]], template: function RaisedButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
+
export class RaisedButtonComponent extends BaseButtonWithLabel {
|
|
43
|
+
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵRaisedButtonComponent_BaseFactory; return function RaisedButtonComponent_Factory(t) { return (ɵRaisedButtonComponent_BaseFactory || (ɵRaisedButtonComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RaisedButtonComponent)))(t || RaisedButtonComponent); }; })(); }
|
|
44
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RaisedButtonComponent, selectors: [["app-raised-button"]], standalone: true, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], decls: 5, vars: 5, consts: [["mat-raised-button", "", "onclick", "this.blur()", 3, "click", "color", "disabled"], [3, "button-spin"]], template: function RaisedButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
57
45
|
i0.ɵɵelementStart(0, "button", 0);
|
|
58
46
|
i0.ɵɵlistener("click", function RaisedButtonComponent_Template_button_click_0_listener() { return ctx.buttonClick.emit(); });
|
|
59
47
|
i0.ɵɵtemplate(1, RaisedButtonComponent_Conditional_1_Template, 2, 3, "mat-icon", 1)(2, RaisedButtonComponent_Conditional_2_Template, 2, 3)(3, RaisedButtonComponent_Conditional_3_Template, 1, 1)(4, RaisedButtonComponent_Conditional_4_Template, 2, 3, "mat-icon", 1);
|
|
@@ -70,7 +58,7 @@ export class RaisedButtonComponent {
|
|
|
70
58
|
}
|
|
71
59
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RaisedButtonComponent, [{
|
|
72
60
|
type: Component,
|
|
73
|
-
args: [{ selector: 'app-raised-button', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, MatIconModule, TranslateModule], template: "<button mat-raised-button [color]=\"color()\" onclick=\"this.blur()\" [disabled]=\"buttonDisabled()\" (click)=\"buttonClick.emit()\">\r\n @if (showIcon() && iconAlignment() === 'left') { <mat-icon [class.button-spin]=\"isInProgress
|
|
61
|
+
args: [{ selector: 'app-raised-button', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, MatIconModule, TranslateModule], template: "<button mat-raised-button [color]=\"color()\" onclick=\"this.blur()\" [disabled]=\"buttonDisabled()\" (click)=\"buttonClick.emit()\">\r\n @if (showIcon() && iconAlignment() === 'left') { <mat-icon [class.button-spin]=\"isInProgress\">{{iconToShow()}}</mat-icon> }\r\n @if (translateLabel()) {{{label()|translate}}} @else {{{label()}}}\r\n @if (showIcon() && iconAlignment() === 'right') { <mat-icon [class.button-spin]=\"isInProgress\">{{iconToShow()}}</mat-icon> }\r\n</button>", styles: [".mdc-button.mat-white,.mat-stroked-button.mat-white{color:#fff;border-color:#fff}.mdc-button.mat-white:hover,.mat-mdc-outlined-button.mat-white:hover{background-color:transparent}\n"] }]
|
|
74
62
|
}], null, null); })();
|
|
75
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RaisedButtonComponent, { className: "RaisedButtonComponent", filePath: "lib\\buttons\\raised-button\\raised-button.component.ts", lineNumber:
|
|
76
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
63
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RaisedButtonComponent, { className: "RaisedButtonComponent", filePath: "lib\\buttons\\raised-button\\raised-button.component.ts", lineNumber: 15 }); })();
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFpc2VkLWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jYXVjYS1tYXRlcmlhbC9zcmMvbGliL2J1dHRvbnMvcmFpc2VkLWJ1dHRvbi9yYWlzZWQtYnV0dG9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NhdWNhLW1hdGVyaWFsL3NyYy9saWIvYnV0dG9ucy9yYWlzZWQtYnV0dG9uL3JhaXNlZC1idXR0b24uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNuRSxPQUFPLEVBQUUsU0FBUyxHQUFHLE1BQU0sMEJBQTBCLENBQUM7QUFDdEQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3ZELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTS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ID09PSAnbGVmdCcpIHsgPG1hdC1pY29uIFtjbGFzcy5idXR0b24tc3Bpbl09XCJpc0luUHJvZ3Jlc3NcIj57e2ljb25Ub1Nob3coKX19PC9tYXQtaWNvbj4gfVxyXG4gICAgQGlmICh0cmFuc2xhdGVMYWJlbCgpKSB7e3tsYWJlbCgpfHRyYW5zbGF0ZX19fSBAZWxzZSB7e3tsYWJlbCgpfX19XHJcbiAgICBAaWYgKHNob3dJY29uKCkgJiYgaWNvbkFsaWdubWVudCgpID09PSAncmlnaHQnKSB7IDxtYXQtaWNvbiBbY2xhc3MuYnV0dG9uLXNwaW5dPVwiaXNJblByb2dyZXNzXCI+e3tpY29uVG9TaG93KCl9fTwvbWF0LWljb24+IH1cclxuPC9idXR0b24+Il19
|
|
@@ -1061,7 +1061,7 @@ function RaisedButtonComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
1061
1061
|
i0.ɵɵelementEnd();
|
|
1062
1062
|
} if (rf & 2) {
|
|
1063
1063
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
1064
|
-
i0.ɵɵclassProp("button-spin", ctx_r0.isInProgress
|
|
1064
|
+
i0.ɵɵclassProp("button-spin", ctx_r0.isInProgress);
|
|
1065
1065
|
i0.ɵɵadvance();
|
|
1066
1066
|
i0.ɵɵtextInterpolate(ctx_r0.iconToShow());
|
|
1067
1067
|
} }
|
|
@@ -1084,26 +1084,13 @@ function RaisedButtonComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
1084
1084
|
i0.ɵɵelementEnd();
|
|
1085
1085
|
} if (rf & 2) {
|
|
1086
1086
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
1087
|
-
i0.ɵɵclassProp("button-spin", ctx_r0.isInProgress
|
|
1087
|
+
i0.ɵɵclassProp("button-spin", ctx_r0.isInProgress);
|
|
1088
1088
|
i0.ɵɵadvance();
|
|
1089
1089
|
i0.ɵɵtextInterpolate(ctx_r0.iconToShow());
|
|
1090
1090
|
} }
|
|
1091
|
-
class RaisedButtonComponent {
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
this.label = input();
|
|
1095
|
-
this.color = input(undefined);
|
|
1096
|
-
this.icon = input();
|
|
1097
|
-
this.iconAlignment = input('left');
|
|
1098
|
-
this.isDisabled = input(false);
|
|
1099
|
-
this.isInProgress = input(false);
|
|
1100
|
-
this.showIcon = computed(() => !!this.icon() || this.isInProgress());
|
|
1101
|
-
this.iconToShow = computed(() => this.isInProgress() ? 'update' : this.icon());
|
|
1102
|
-
this.buttonDisabled = computed(() => this.isDisabled() || this.isInProgress());
|
|
1103
|
-
this.buttonClick = output();
|
|
1104
|
-
}
|
|
1105
|
-
static { this.ɵfac = function RaisedButtonComponent_Factory(t) { return new (t || RaisedButtonComponent)(); }; }
|
|
1106
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RaisedButtonComponent, selectors: [["app-raised-button"]], inputs: { translateLabel: [1, "translateLabel"], label: [1, "label"], color: [1, "color"], icon: [1, "icon"], iconAlignment: [1, "iconAlignment"], isDisabled: [1, "isDisabled"], isInProgress: [1, "isInProgress"] }, outputs: { buttonClick: "buttonClick" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 5, vars: 5, consts: [["mat-raised-button", "", "onclick", "this.blur()", 3, "click", "color", "disabled"], [3, "button-spin"]], template: function RaisedButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1091
|
+
class RaisedButtonComponent extends BaseButtonWithLabel {
|
|
1092
|
+
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵRaisedButtonComponent_BaseFactory; return function RaisedButtonComponent_Factory(t) { return (ɵRaisedButtonComponent_BaseFactory || (ɵRaisedButtonComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RaisedButtonComponent)))(t || RaisedButtonComponent); }; })(); }
|
|
1093
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RaisedButtonComponent, selectors: [["app-raised-button"]], standalone: true, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], decls: 5, vars: 5, consts: [["mat-raised-button", "", "onclick", "this.blur()", 3, "click", "color", "disabled"], [3, "button-spin"]], template: function RaisedButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1107
1094
|
i0.ɵɵelementStart(0, "button", 0);
|
|
1108
1095
|
i0.ɵɵlistener("click", function RaisedButtonComponent_Template_button_click_0_listener() { return ctx.buttonClick.emit(); });
|
|
1109
1096
|
i0.ɵɵtemplate(1, RaisedButtonComponent_Conditional_1_Template, 2, 3, "mat-icon", 1)(2, RaisedButtonComponent_Conditional_2_Template, 2, 3)(3, RaisedButtonComponent_Conditional_3_Template, 1, 1)(4, RaisedButtonComponent_Conditional_4_Template, 2, 3, "mat-icon", 1);
|
|
@@ -1120,9 +1107,9 @@ class RaisedButtonComponent {
|
|
|
1120
1107
|
}
|
|
1121
1108
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RaisedButtonComponent, [{
|
|
1122
1109
|
type: Component,
|
|
1123
|
-
args: [{ selector: 'app-raised-button', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, MatIconModule, TranslateModule], template: "<button mat-raised-button [color]=\"color()\" onclick=\"this.blur()\" [disabled]=\"buttonDisabled()\" (click)=\"buttonClick.emit()\">\r\n @if (showIcon() && iconAlignment() === 'left') { <mat-icon [class.button-spin]=\"isInProgress
|
|
1110
|
+
args: [{ selector: 'app-raised-button', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, MatIconModule, TranslateModule], template: "<button mat-raised-button [color]=\"color()\" onclick=\"this.blur()\" [disabled]=\"buttonDisabled()\" (click)=\"buttonClick.emit()\">\r\n @if (showIcon() && iconAlignment() === 'left') { <mat-icon [class.button-spin]=\"isInProgress\">{{iconToShow()}}</mat-icon> }\r\n @if (translateLabel()) {{{label()|translate}}} @else {{{label()}}}\r\n @if (showIcon() && iconAlignment() === 'right') { <mat-icon [class.button-spin]=\"isInProgress\">{{iconToShow()}}</mat-icon> }\r\n</button>", styles: [".mdc-button.mat-white,.mat-stroked-button.mat-white{color:#fff;border-color:#fff}.mdc-button.mat-white:hover,.mat-mdc-outlined-button.mat-white:hover{background-color:transparent}\n"] }]
|
|
1124
1111
|
}], null, null); })();
|
|
1125
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RaisedButtonComponent, { className: "RaisedButtonComponent", filePath: "lib\\buttons\\raised-button\\raised-button.component.ts", lineNumber:
|
|
1112
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RaisedButtonComponent, { className: "RaisedButtonComponent", filePath: "lib\\buttons\\raised-button\\raised-button.component.ts", lineNumber: 15 }); })();
|
|
1126
1113
|
|
|
1127
1114
|
class IconButtonComponent extends BaseButton {
|
|
1128
1115
|
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵIconButtonComponent_BaseFactory; return function IconButtonComponent_Factory(t) { return (ɵIconButtonComponent_BaseFactory || (ɵIconButtonComponent_BaseFactory = i0.ɵɵgetInheritedFactory(IconButtonComponent)))(t || IconButtonComponent); }; })(); }
|