@wlcm/angular 18.2.30 → 18.2.31
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,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component,
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Output, EventEmitter, input, computed, } from '@angular/core';
|
|
2
2
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -9,33 +9,36 @@ export class WlcmButtonComponent {
|
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated Use `styleType` instead. This input will be removed in a future release.
|
|
11
11
|
*/
|
|
12
|
-
this.type =
|
|
12
|
+
this.type = input(undefined);
|
|
13
13
|
this.size = input('large');
|
|
14
14
|
this.styleType = input('filled');
|
|
15
15
|
this.buttonColor = input('primary');
|
|
16
16
|
this.buttonType = input('button');
|
|
17
|
-
this.isDisabled = false;
|
|
18
|
-
this.isLoading = false;
|
|
17
|
+
this.isDisabled = input(false);
|
|
18
|
+
this.isLoading = input(false);
|
|
19
19
|
this.clicked = new EventEmitter();
|
|
20
|
+
this.buttonClassMap = computed(() => ({
|
|
21
|
+
'wlcm-button': true,
|
|
22
|
+
[`wlcm-button--${this.type()}`]: !!this.type(),
|
|
23
|
+
[`wlcm-button--${this.size()}`]: !!this.size(),
|
|
24
|
+
[`wlcm-button--style-${this.styleType()}`]: !!this.styleType(),
|
|
25
|
+
[`wlcm-button--color-${this.buttonColor()}`]: !!this.buttonColor(),
|
|
26
|
+
'wlcm-button--loading': this.isLoading(),
|
|
27
|
+
'wlcm-button--disabled': this.isDisabled(),
|
|
28
|
+
}));
|
|
20
29
|
}
|
|
21
30
|
onClick() {
|
|
22
|
-
if (this.isDisabled || this.isLoading)
|
|
31
|
+
if (this.isDisabled() || this.isLoading())
|
|
23
32
|
return;
|
|
24
33
|
this.clicked.emit();
|
|
25
34
|
}
|
|
26
35
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.5", type: WlcmButtonComponent, isStandalone: true, selector: "wlcm-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal:
|
|
36
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.5", type: WlcmButtonComponent, isStandalone: true, selector: "wlcm-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, styleType: { classPropertyName: "styleType", publicName: "styleType", isSignal: true, isRequired: false, transformFunction: null }, buttonColor: { classPropertyName: "buttonColor", publicName: "buttonColor", isSignal: true, isRequired: false, transformFunction: null }, buttonType: { classPropertyName: "buttonType", publicName: "buttonType", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n (click)=\"onClick()\"\n [ngClass]=\"buttonClassMap()\"\n [type]=\"buttonType()\"\n>\n <div class=\"wlcm-button__content\">\n <mat-spinner\n *ngIf=\"isLoading()\"\n [color]=\"(type() || buttonColor()) === 'primary' ? 'accent' : 'primary'\"\n [diameter]=\"16\"\n ></mat-spinner>\n\n <ng-content></ng-content>\n </div>\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
28
37
|
}
|
|
29
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmButtonComponent, decorators: [{
|
|
30
39
|
type: Component,
|
|
31
|
-
args: [{ selector: 'wlcm-button', standalone: true, imports: [CommonModule, MatProgressSpinnerModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n (click)=\"onClick()\"\n
|
|
32
|
-
}], propDecorators: {
|
|
33
|
-
type: Input
|
|
34
|
-
}], isDisabled: [{
|
|
35
|
-
type: Input
|
|
36
|
-
}], isLoading: [{
|
|
37
|
-
type: Input
|
|
38
|
-
}], clicked: [{
|
|
40
|
+
args: [{ selector: 'wlcm-button', standalone: true, imports: [CommonModule, MatProgressSpinnerModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n (click)=\"onClick()\"\n [ngClass]=\"buttonClassMap()\"\n [type]=\"buttonType()\"\n>\n <div class=\"wlcm-button__content\">\n <mat-spinner\n *ngIf=\"isLoading()\"\n [color]=\"(type() || buttonColor()) === 'primary' ? 'accent' : 'primary'\"\n [diameter]=\"16\"\n ></mat-spinner>\n\n <ng-content></ng-content>\n </div>\n</button>\n" }]
|
|
41
|
+
}], propDecorators: { clicked: [{
|
|
39
42
|
type: Output
|
|
40
43
|
}] } });
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL21vZHV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LnNpemUoKSxcbiAgICBbYHdsY20tYnV0dG9uLS1zdHlsZS0ke3RoaXMuc3R5bGVUeXBlKCl9YF06ICEhdGhpcy5zdHlsZVR5cGUoKSxcbiAgICBbYHdsY20tYnV0dG9uLS1jb2xvci0ke3RoaXMuYnV0dG9uQ29sb3IoKX1gXTogISF0aGlzLmJ1dHRvbkNvbG9yKCksXG4gICAgJ3dsY20tYnV0dG9uLS1sb2FkaW5nJzogdGhpcy5pc0xvYWRpbmcoKSxcbiAgICAnd2xjbS1idXR0b24tLWRpc2FibGVkJzogdGhpcy5pc0Rpc2FibGVkKCksXG4gIH0pKTtcblxuICBvbkNsaWNrKCkge1xuICAgIGlmICh0aGlzLmlzRGlzYWJsZWQoKSB8fCB0aGlzLmlzTG9hZGluZygpKSByZXR1cm47XG5cbiAgICB0aGlzLmNsaWNrZWQuZW1pdCgpO1xuICB9XG59XG4iLCI8YnV0dG9uXG4gIChjbGljayk9XCJvbkNsaWNrKClcIlxuICBbbmdDbGFzc109XCJidXR0b25DbGFzc01hcCgpXCJcbiAgW3R5cGVdPVwiYnV0dG9uVHlwZSgpXCJcbj5cbiAgPGRpdiBjbGFzcz1cIndsY20tYnV0dG9uX19jb250ZW50XCI+XG4gICAgPG1hdC1zcGlubmVyXG4gICAgICAqbmdJZj1cImlzTG9hZGluZygpXCJcbiAgICAgIFtjb2xvcl09XCIodHlwZSgpIHx8IGJ1dHRvbkNvbG9yKCkpID09PSAncHJpbWFyeScgPyAnYWNjZW50JyA6ICdwcmltYXJ5J1wiXG4gICAgICBbZGlhbWV0ZXJdPVwiMTZcIlxuICAgID48L21hdC1zcGlubmVyPlxuXG4gICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuICA8L2Rpdj5cbjwvYnV0dG9uPlxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, EventEmitter, Component, ChangeDetectionStrategy,
|
|
2
|
+
import { input, EventEmitter, computed, Component, ChangeDetectionStrategy, Output, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/material/progress-spinner';
|
|
4
4
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
@@ -10,33 +10,36 @@ class WlcmButtonComponent {
|
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated Use `styleType` instead. This input will be removed in a future release.
|
|
12
12
|
*/
|
|
13
|
-
this.type =
|
|
13
|
+
this.type = input(undefined);
|
|
14
14
|
this.size = input('large');
|
|
15
15
|
this.styleType = input('filled');
|
|
16
16
|
this.buttonColor = input('primary');
|
|
17
17
|
this.buttonType = input('button');
|
|
18
|
-
this.isDisabled = false;
|
|
19
|
-
this.isLoading = false;
|
|
18
|
+
this.isDisabled = input(false);
|
|
19
|
+
this.isLoading = input(false);
|
|
20
20
|
this.clicked = new EventEmitter();
|
|
21
|
+
this.buttonClassMap = computed(() => ({
|
|
22
|
+
'wlcm-button': true,
|
|
23
|
+
[`wlcm-button--${this.type()}`]: !!this.type(),
|
|
24
|
+
[`wlcm-button--${this.size()}`]: !!this.size(),
|
|
25
|
+
[`wlcm-button--style-${this.styleType()}`]: !!this.styleType(),
|
|
26
|
+
[`wlcm-button--color-${this.buttonColor()}`]: !!this.buttonColor(),
|
|
27
|
+
'wlcm-button--loading': this.isLoading(),
|
|
28
|
+
'wlcm-button--disabled': this.isDisabled(),
|
|
29
|
+
}));
|
|
21
30
|
}
|
|
22
31
|
onClick() {
|
|
23
|
-
if (this.isDisabled || this.isLoading)
|
|
32
|
+
if (this.isDisabled() || this.isLoading())
|
|
24
33
|
return;
|
|
25
34
|
this.clicked.emit();
|
|
26
35
|
}
|
|
27
36
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.5", type: WlcmButtonComponent, isStandalone: true, selector: "wlcm-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal:
|
|
37
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.5", type: WlcmButtonComponent, isStandalone: true, selector: "wlcm-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, styleType: { classPropertyName: "styleType", publicName: "styleType", isSignal: true, isRequired: false, transformFunction: null }, buttonColor: { classPropertyName: "buttonColor", publicName: "buttonColor", isSignal: true, isRequired: false, transformFunction: null }, buttonType: { classPropertyName: "buttonType", publicName: "buttonType", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n (click)=\"onClick()\"\n [ngClass]=\"buttonClassMap()\"\n [type]=\"buttonType()\"\n>\n <div class=\"wlcm-button__content\">\n <mat-spinner\n *ngIf=\"isLoading()\"\n [color]=\"(type() || buttonColor()) === 'primary' ? 'accent' : 'primary'\"\n [diameter]=\"16\"\n ></mat-spinner>\n\n <ng-content></ng-content>\n </div>\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
29
38
|
}
|
|
30
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmButtonComponent, decorators: [{
|
|
31
40
|
type: Component,
|
|
32
|
-
args: [{ selector: 'wlcm-button', standalone: true, imports: [CommonModule, MatProgressSpinnerModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n (click)=\"onClick()\"\n
|
|
33
|
-
}], propDecorators: {
|
|
34
|
-
type: Input
|
|
35
|
-
}], isDisabled: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}], isLoading: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}], clicked: [{
|
|
41
|
+
args: [{ selector: 'wlcm-button', standalone: true, imports: [CommonModule, MatProgressSpinnerModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n (click)=\"onClick()\"\n [ngClass]=\"buttonClassMap()\"\n [type]=\"buttonType()\"\n>\n <div class=\"wlcm-button__content\">\n <mat-spinner\n *ngIf=\"isLoading()\"\n [color]=\"(type() || buttonColor()) === 'primary' ? 'accent' : 'primary'\"\n [diameter]=\"16\"\n ></mat-spinner>\n\n <ng-content></ng-content>\n </div>\n</button>\n" }]
|
|
42
|
+
}], propDecorators: { clicked: [{
|
|
40
43
|
type: Output
|
|
41
44
|
}] } });
|
|
42
45
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wlcm-angular-button.mjs","sources":["../../../../modules/button/src/lib/components/button/button.component.ts","../../../../modules/button/src/lib/components/button/button.component.html","../../../../modules/button/src/lib/button.module.ts","../../../../modules/button/src/wlcm-angular-button.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"wlcm-angular-button.mjs","sources":["../../../../modules/button/src/lib/components/button/button.component.ts","../../../../modules/button/src/lib/components/button/button.component.html","../../../../modules/button/src/lib/button.module.ts","../../../../modules/button/src/wlcm-angular-button.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Output,\n EventEmitter,\n InputSignal,\n input,\n computed,\n Signal,\n} from '@angular/core';\nimport { WlcmButtonColor, WlcmButtonSize, WlcmButtonStyleType, WlcmButtonType } from '../../models/button.models';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'wlcm-button',\n standalone: true,\n imports: [CommonModule, MatProgressSpinnerModule],\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WlcmButtonComponent {\n /**\n * @deprecated Use `styleType` instead. This input will be removed in a future release.\n */\n type: InputSignal<string | undefined> = input<string | undefined>(undefined);\n\n size: InputSignal<WlcmButtonSize> = input<WlcmButtonSize>('large');\n\n styleType: InputSignal<WlcmButtonStyleType> = input<WlcmButtonStyleType>('filled');\n\n buttonColor: InputSignal<WlcmButtonColor> = input<WlcmButtonColor>('primary');\n\n buttonType: InputSignal<WlcmButtonType> = input<WlcmButtonType>('button');\n\n isDisabled: InputSignal<boolean> = input(false);\n\n isLoading: InputSignal<boolean> = input(false);\n\n @Output() clicked: EventEmitter<void> = new EventEmitter();\n\n protected readonly buttonClassMap: Signal<Record<string, boolean>> = computed(() => ({\n 'wlcm-button': true,\n [`wlcm-button--${this.type()}`]: !!this.type(),\n [`wlcm-button--${this.size()}`]: !!this.size(),\n [`wlcm-button--style-${this.styleType()}`]: !!this.styleType(),\n [`wlcm-button--color-${this.buttonColor()}`]: !!this.buttonColor(),\n 'wlcm-button--loading': this.isLoading(),\n 'wlcm-button--disabled': this.isDisabled(),\n }));\n\n onClick() {\n if (this.isDisabled() || this.isLoading()) return;\n\n this.clicked.emit();\n }\n}\n","<button\n (click)=\"onClick()\"\n [ngClass]=\"buttonClassMap()\"\n [type]=\"buttonType()\"\n>\n <div class=\"wlcm-button__content\">\n <mat-spinner\n *ngIf=\"isLoading()\"\n [color]=\"(type() || buttonColor()) === 'primary' ? 'accent' : 'primary'\"\n [diameter]=\"16\"\n ></mat-spinner>\n\n <ng-content></ng-content>\n </div>\n</button>\n","import { NgModule } from '@angular/core';\nimport { WlcmButtonComponent } from './components/button/button.component';\n\n@NgModule({\n imports: [WlcmButtonComponent],\n exports: [WlcmButtonComponent],\n})\nexport class WlcmButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAsBa,mBAAmB,CAAA;AARhC,IAAA,WAAA,GAAA;AASE;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAoC,KAAK,CAAqB,SAAS,CAAC,CAAC;AAE7E,QAAA,IAAA,CAAA,IAAI,GAAgC,KAAK,CAAiB,OAAO,CAAC,CAAC;AAEnE,QAAA,IAAA,CAAA,SAAS,GAAqC,KAAK,CAAsB,QAAQ,CAAC,CAAC;AAEnF,QAAA,IAAA,CAAA,WAAW,GAAiC,KAAK,CAAkB,SAAS,CAAC,CAAC;AAE9E,QAAA,IAAA,CAAA,UAAU,GAAgC,KAAK,CAAiB,QAAQ,CAAC,CAAC;AAE1E,QAAA,IAAA,CAAA,UAAU,GAAyB,KAAK,CAAC,KAAK,CAAC,CAAC;AAEhD,QAAA,IAAA,CAAA,SAAS,GAAyB,KAAK,CAAC,KAAK,CAAC,CAAC;AAErC,QAAA,IAAA,CAAA,OAAO,GAAuB,IAAI,YAAY,EAAE,CAAC;AAExC,QAAA,IAAA,CAAA,cAAc,GAAoC,QAAQ,CAAC,OAAO;AACnF,YAAA,aAAa,EAAE,IAAI;AACnB,YAAA,CAAC,CAAgB,aAAA,EAAA,IAAI,CAAC,IAAI,EAAE,CAAA,CAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE;AAC9C,YAAA,CAAC,CAAgB,aAAA,EAAA,IAAI,CAAC,IAAI,EAAE,CAAA,CAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE;AAC9C,YAAA,CAAC,CAAsB,mBAAA,EAAA,IAAI,CAAC,SAAS,EAA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P,CAAC,YAAY,EAAE,wBAAwB,CAAC,EAAA,eAAA,EAGhC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,iXAAA,EAAA,CAAA;8BAoBrC,OAAO,EAAA,CAAA;sBAAhB,MAAM;;;MEjCI,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAhB,gBAAgB,EAAA,OAAA,EAAA,CAHjB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACnB,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;AAElB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAHjB,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGlB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,mBAAmB,CAAC;oBAC9B,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { EventEmitter, InputSignal } from '@angular/core';
|
|
1
|
+
import { EventEmitter, InputSignal, Signal } from '@angular/core';
|
|
2
2
|
import { WlcmButtonColor, WlcmButtonSize, WlcmButtonStyleType, WlcmButtonType } from '../../models/button.models';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class WlcmButtonComponent {
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated Use `styleType` instead. This input will be removed in a future release.
|
|
7
7
|
*/
|
|
8
|
-
type: string
|
|
8
|
+
type: InputSignal<string | undefined>;
|
|
9
9
|
size: InputSignal<WlcmButtonSize>;
|
|
10
10
|
styleType: InputSignal<WlcmButtonStyleType>;
|
|
11
11
|
buttonColor: InputSignal<WlcmButtonColor>;
|
|
12
12
|
buttonType: InputSignal<WlcmButtonType>;
|
|
13
|
-
isDisabled: boolean
|
|
14
|
-
isLoading: boolean
|
|
13
|
+
isDisabled: InputSignal<boolean>;
|
|
14
|
+
isLoading: InputSignal<boolean>;
|
|
15
15
|
clicked: EventEmitter<void>;
|
|
16
|
+
protected readonly buttonClassMap: Signal<Record<string, boolean>>;
|
|
16
17
|
onClick(): void;
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<WlcmButtonComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WlcmButtonComponent, "wlcm-button", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "styleType": { "alias": "styleType"; "required": false; "isSignal": true; }; "buttonColor": { "alias": "buttonColor"; "required": false; "isSignal": true; }; "buttonType": { "alias": "buttonType"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WlcmButtonComponent, "wlcm-button", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "styleType": { "alias": "styleType"; "required": false; "isSignal": true; }; "buttonColor": { "alias": "buttonColor"; "required": false; "isSignal": true; }; "buttonType": { "alias": "buttonType"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
19
20
|
}
|