button-toggle-input 15.0.3
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/README.md +105 -0
- package/button-toggle-input-15.0.3.tgz +0 -0
- package/esm2022/button-toggle-input.mjs +5 -0
- package/esm2022/lib/button-toggle-input-demo/button-toggle-input-demo.component.mjs +94 -0
- package/esm2022/lib/button-toggle-input.component.mjs +155 -0
- package/esm2022/lib/button-toggle-input.module.mjs +60 -0
- package/esm2022/lib/models/list-item.model.mjs +14 -0
- package/esm2022/public-api.mjs +8 -0
- package/fesm2022/button-toggle-input.mjs +321 -0
- package/fesm2022/button-toggle-input.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/button-toggle-input-demo/button-toggle-input-demo.component.d.ts +80 -0
- package/lib/button-toggle-input.component.d.ts +53 -0
- package/lib/button-toggle-input.module.d.ts +16 -0
- package/lib/models/list-item.model.d.ts +18 -0
- package/package.json +30 -0
- package/public-api.d.ts +4 -0
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Button Toggle Selection Component
|
|
2
|
+
|
|
3
|
+
This is a Button Toggle
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
1) `npm i button-toggle-input`
|
|
8
|
+
|
|
9
|
+
2) Import `ButtonToggleInputModule`
|
|
10
|
+
|
|
11
|
+
3) Use the selector in your template
|
|
12
|
+
```html
|
|
13
|
+
<app-button-toggle-input
|
|
14
|
+
[formControl]="selectionControl"
|
|
15
|
+
[data]="data"
|
|
16
|
+
[toolTips]="tooltip1.checked"
|
|
17
|
+
[fullWidth]="width1.value"
|
|
18
|
+
[noBorder]="!border1.checked"
|
|
19
|
+
[iconSuffix]="suffix1.checked"
|
|
20
|
+
></app-button-toggle-input>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Input Properties
|
|
24
|
+
|
|
25
|
+
| Input | Type | Description | Default |
|
|
26
|
+
|------------------|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
|
|
27
|
+
| data | ListItem[] | string[] | An array of ListItem objects or strings that define the toggle options. If passed as strings, each string is used as both the value and label. | (Required) |
|
|
28
|
+
| multiple | boolean | If true, allows multiple selections. | false |
|
|
29
|
+
| toolTips | boolean | If true, displays tooltips on each toggle item. | false |
|
|
30
|
+
| toolTipPosition | TooltipPosition | The position of the tooltips ('above', 'below', 'left', 'right'). Imported from @angular/material/tooltip. | "above" |
|
|
31
|
+
| toolTipShowDelay | number | The delay in milliseconds before the tooltip is displayed. | 1 |
|
|
32
|
+
| color | string | The base color of the toggle buttons, e.g., a hex code. | "#333333" |
|
|
33
|
+
| lightColor | string | The color used for the toggle button's light areas (e.g., background when not selected). | "white" |
|
|
34
|
+
| darkColor | string | The color used for the toggle button's dark areas (e.g., text when selected). | "black" |
|
|
35
|
+
| noBorder | boolean | If true, removes the border from the toggle buttons. | false |
|
|
36
|
+
| iconPrefix | boolean | If true, displays the icon before the label. Ignored if iconSuffix is also true. | true |
|
|
37
|
+
| iconSuffix | boolean | If true, displays the icon after the label. When true, iconPrefix is automatically set to false. | false |
|
|
38
|
+
| fullWidth | boolean | If true, makes the toggle buttons take up the full width of their container. | false |
|
|
39
|
+
|
|
40
|
+
### Usage Example
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { Component } from '@angular/core';
|
|
44
|
+
|
|
45
|
+
interface ListItem {
|
|
46
|
+
value: string;
|
|
47
|
+
label: string;
|
|
48
|
+
icon?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@Component({
|
|
52
|
+
selector: 'app-example',
|
|
53
|
+
template: `
|
|
54
|
+
<app-button-toggle-input
|
|
55
|
+
[data]="items"
|
|
56
|
+
[(ngModel)]="selectedItems"
|
|
57
|
+
[multiple]="true"
|
|
58
|
+
[toolTips]="true"
|
|
59
|
+
toolTipPosition="below"
|
|
60
|
+
color="#007bff"
|
|
61
|
+
lightColor="#f0f8ff"
|
|
62
|
+
darkColor="white"
|
|
63
|
+
[noBorder]="true"
|
|
64
|
+
[iconPrefix]="true"
|
|
65
|
+
[fullWidth]="true"
|
|
66
|
+
>
|
|
67
|
+
</app-button-toggle-input>
|
|
68
|
+
<p>Selected Items: {{ selectedItems | json }}</p>
|
|
69
|
+
`
|
|
70
|
+
})
|
|
71
|
+
export class ExampleComponent {
|
|
72
|
+
items: ListItem[] = [
|
|
73
|
+
{ value: 'item1', label: 'Item 1', icon: 'fa fa-check' },
|
|
74
|
+
{ value: 'item2', label: 'Item 2', icon: 'fa fa-times' },
|
|
75
|
+
{ value: 'item3', label: 'Item 3' }
|
|
76
|
+
];
|
|
77
|
+
selectedItems: string[] = [];
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Form Integration (ControlValueAccessor)
|
|
82
|
+
|
|
83
|
+
The component implements the ControlValueAccessor interface, making it easy to integrate with Angular forms:
|
|
84
|
+
|
|
85
|
+
writeValue(value: any): void: Sets the value of the control.
|
|
86
|
+
registerOnChange(fn: any): void: Registers a callback function to be called when the control's value changes.
|
|
87
|
+
registerOnTouched(fn: any): void: Registers a callback function to be called when the control is touched.
|
|
88
|
+
setDisabledState(isDisabled: boolean): void: Disables or enables the control.
|
|
89
|
+
The component uses a FormControl internally to manage the selected values. The selected values are emitted through the onChange callback.
|
|
90
|
+
|
|
91
|
+
## Sample Data Structure
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
const groupOptions: ListItem[] = [
|
|
95
|
+
{ label: 'Sample', value: 'test', icon: 'add' },
|
|
96
|
+
{ value: 'list', icon: 'list' },
|
|
97
|
+
{ value: 'list', label: 'me' },
|
|
98
|
+
{ label: '', value: 'grid', icon: 'grid_on', tootTip: 'Grid View'},
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
or
|
|
102
|
+
|
|
103
|
+
const groupOptions = ['store', 'data', 'type', 'expiresIn', 'options']
|
|
104
|
+
```
|
|
105
|
+
|
|
Binary file
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLXRvZ2dsZS1pbnB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2J1dHRvbi10b2dnbGUtaW5wdXQvc3JjL2J1dHRvbi10b2dnbGUtaW5wdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
2
|
+
import { FormBuilder } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/forms";
|
|
5
|
+
import * as i2 from "@angular/material/button";
|
|
6
|
+
import * as i3 from "@angular/material/button-toggle";
|
|
7
|
+
import * as i4 from "@angular/material/slide-toggle";
|
|
8
|
+
import * as i5 from "@angular/material/divider";
|
|
9
|
+
import * as i6 from "../button-toggle-input.component";
|
|
10
|
+
import * as i7 from "@angular/common";
|
|
11
|
+
export class ButtonToggleDemoComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.fb = inject(FormBuilder);
|
|
14
|
+
this.type = 'icons';
|
|
15
|
+
this.data_1 = [
|
|
16
|
+
{ id: 1, icon: 'home', value: 'option_1', disabled: true },
|
|
17
|
+
{ id: 2, icon: 'layers', value: 'option_2' },
|
|
18
|
+
{ id: 3, icon: 'add', value: 'option_3' },
|
|
19
|
+
{ id: 3, icon: 'build', value: 'option_4', disabled: true },
|
|
20
|
+
{ id: 3, icon: 'list', value: 'option_5', selected: true },
|
|
21
|
+
{ id: 3, icon: 'business', value: 'option_6' },
|
|
22
|
+
];
|
|
23
|
+
this.data_2 = [
|
|
24
|
+
{ id: 1, label: 'Home', value: 'option_1', disabled: true },
|
|
25
|
+
{ id: 2, label: 'Samples', value: 'option_2' },
|
|
26
|
+
{ id: 3, label: 'Demos 1 is here', value: 'option_3' },
|
|
27
|
+
{ id: 3, label: 'Demos 2A', value: 'option_4', disabled: true },
|
|
28
|
+
{ id: 3, label: 'Demos 2B', value: 'option_5', selected: true },
|
|
29
|
+
{ id: 3, label: 'Demos 3', value: 'option_6' },
|
|
30
|
+
];
|
|
31
|
+
this.data_3 = [
|
|
32
|
+
{ id: 1, label: 'Home', icon: 'home', value: 'option_1', disabled: true },
|
|
33
|
+
{ id: 2, label: 'Samples', icon: 'layers', value: 'option_2' },
|
|
34
|
+
{ id: 3, label: 'Demos 1', icon: 'add', value: 'option_3' },
|
|
35
|
+
{ id: 3, label: 'Demos 2A', icon: 'network', value: 'option_4', disabled: true },
|
|
36
|
+
{ id: 3, label: 'Demos 2B', icon: 'list', value: 'option_5', selected: true },
|
|
37
|
+
{ id: 3, label: 'Demos 3', icon: 'business', value: 'option_6' },
|
|
38
|
+
];
|
|
39
|
+
this.data = this.data_1;
|
|
40
|
+
this.selectionControl_1 = this.fb.control(null);
|
|
41
|
+
this.selectionControl_2 = this.fb.control(null);
|
|
42
|
+
this.changeDetection_1 = this.fb.control(true);
|
|
43
|
+
this.changeDetection_2 = this.fb.control(false);
|
|
44
|
+
}
|
|
45
|
+
ngOnInit() {
|
|
46
|
+
this.selectionControl_1.valueChanges.subscribe(data => {
|
|
47
|
+
if (this.changeDetection_1.value)
|
|
48
|
+
console.log('CHANGE:', data);
|
|
49
|
+
});
|
|
50
|
+
this.selectionControl_2.valueChanges.subscribe(data => {
|
|
51
|
+
if (this.changeDetection_2.value)
|
|
52
|
+
console.log('CHANGE:', data);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
onPerformPatch() {
|
|
56
|
+
this.selectionControl_1.patchValue(['option_3']);
|
|
57
|
+
this.selectionControl_2.patchValue(['option_3', 'option_5']);
|
|
58
|
+
}
|
|
59
|
+
onChangeDataType(type) {
|
|
60
|
+
if (type === 'icons') {
|
|
61
|
+
this.data = this.data_1;
|
|
62
|
+
}
|
|
63
|
+
else if (type === 'labels') {
|
|
64
|
+
this.data = this.data_2;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.data = this.data_3;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// DISABLE
|
|
71
|
+
onDisabled_1(disable) {
|
|
72
|
+
if (disable) {
|
|
73
|
+
this.selectionControl_1.disable();
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
this.selectionControl_1.enable();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
onDisabled_2(disable) {
|
|
80
|
+
if (disable) {
|
|
81
|
+
this.selectionControl_2.disable();
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.selectionControl_2.enable();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleDemoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
88
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonToggleDemoComponent, selector: "app-button-toggle-demo", ngImport: i0, template: "<h1 style=\"flex: 1;\">Button Toggle Input</h1>\n\n\n<div style=\"display: flex; flex-direction: column; margin-top: 1rem;\">\n <div style=\"flex:1; text-align: right;\">\n <div style=\"display: flex; gap: 2rem; flex-direction: row-reverse;\">\n <mat-button-toggle (click)=\"onPerformPatch()\">Patch</mat-button-toggle>\n <mat-button-toggle-group #varTypes=\"matButtonToggleGroup\" (change)=\"onChangeDataType(varTypes.value)\">\n <mat-button-toggle value=\"icons\" checked=\"true\">Icons</mat-button-toggle>\n <mat-button-toggle value=\"labels\" checked=\"false\">Labels</mat-button-toggle>\n <mat-button-toggle value=\"combo\" checked=\"false\">Combo</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <!-- MAIN DEMOS -->\n <div style=\"margin: 1rem; margin-right: 0;\">\n <h3 style=\"margin-bottom: 0;\">Button Toggle Selection - {{ varTypes.value | uppercase }}</h3>\n\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_1.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n <app-button-toggle-input\n [formControl]=\"selectionControl_1\"\n [data]=\"data\"\n [toolTips]=\"tooltip1.checked\"\n [fullWidth]=\"width1.value\"\n [noBorder]=\"!border1.checked\"\n [iconSuffix]=\"suffix1.checked\"\n ></app-button-toggle-input>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_1\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable1 (change)=\"onDisabled_1(disable1.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix1>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip1>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border1 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Single Selection<br>\n ToolTips<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width1=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n </div>\n\n\n <div style=\"margin: 1rem; margin-right: 0;\">\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_2.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n\n <app-button-toggle-input\n [formControl]=\"selectionControl_2\"\n [data]=\"data\"\n [toolTips]=\"tooltip2.checked\"\n toolTipPosition=\"above\"\n [multiple]=\"true\"\n [fullWidth]=\"width2.value\"\n [noBorder]=\"!border2.checked\"\n [iconSuffix]=\"suffix2.checked\"\n ></app-button-toggle-input>\n\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_2\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable2 (change)=\"onDisabled_2(disable2.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix2>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip2>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border2 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Multiple Selection<br>\n ToolTips<br>\n ToolTip Position ABOVE<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width2=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <div style=\"margin-top: .5rem; margin-bottom: 1rem;\">\n <mat-divider></mat-divider>\n </div>\n </div>\n\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i4.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i6.ButtonToggleInputComponent, selector: "app-button-toggle-input", inputs: ["multiple", "toolTips", "toolTipPosition", "toolTipShowDelay", "color", "lightColor", "darkColor", "noBorder", "iconPrefix", "iconSuffix", "fullWidth", "data"] }, { kind: "pipe", type: i7.UpperCasePipe, name: "uppercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
89
|
+
}
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleDemoComponent, decorators: [{
|
|
91
|
+
type: Component,
|
|
92
|
+
args: [{ selector: 'app-button-toggle-demo', changeDetection: ChangeDetectionStrategy.OnPush, template: "<h1 style=\"flex: 1;\">Button Toggle Input</h1>\n\n\n<div style=\"display: flex; flex-direction: column; margin-top: 1rem;\">\n <div style=\"flex:1; text-align: right;\">\n <div style=\"display: flex; gap: 2rem; flex-direction: row-reverse;\">\n <mat-button-toggle (click)=\"onPerformPatch()\">Patch</mat-button-toggle>\n <mat-button-toggle-group #varTypes=\"matButtonToggleGroup\" (change)=\"onChangeDataType(varTypes.value)\">\n <mat-button-toggle value=\"icons\" checked=\"true\">Icons</mat-button-toggle>\n <mat-button-toggle value=\"labels\" checked=\"false\">Labels</mat-button-toggle>\n <mat-button-toggle value=\"combo\" checked=\"false\">Combo</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <!-- MAIN DEMOS -->\n <div style=\"margin: 1rem; margin-right: 0;\">\n <h3 style=\"margin-bottom: 0;\">Button Toggle Selection - {{ varTypes.value | uppercase }}</h3>\n\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_1.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n <app-button-toggle-input\n [formControl]=\"selectionControl_1\"\n [data]=\"data\"\n [toolTips]=\"tooltip1.checked\"\n [fullWidth]=\"width1.value\"\n [noBorder]=\"!border1.checked\"\n [iconSuffix]=\"suffix1.checked\"\n ></app-button-toggle-input>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_1\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable1 (change)=\"onDisabled_1(disable1.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix1>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip1>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border1 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Single Selection<br>\n ToolTips<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width1=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n </div>\n\n\n <div style=\"margin: 1rem; margin-right: 0;\">\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_2.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n\n <app-button-toggle-input\n [formControl]=\"selectionControl_2\"\n [data]=\"data\"\n [toolTips]=\"tooltip2.checked\"\n toolTipPosition=\"above\"\n [multiple]=\"true\"\n [fullWidth]=\"width2.value\"\n [noBorder]=\"!border2.checked\"\n [iconSuffix]=\"suffix2.checked\"\n ></app-button-toggle-input>\n\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_2\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable2 (change)=\"onDisabled_2(disable2.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix2>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip2>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border2 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Multiple Selection<br>\n ToolTips<br>\n ToolTip Position ABOVE<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width2=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <div style=\"margin-top: .5rem; margin-bottom: 1rem;\">\n <mat-divider></mat-divider>\n </div>\n </div>\n\n</div>\n" }]
|
|
93
|
+
}], ctorParameters: function () { return []; } });
|
|
94
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLXRvZ2dsZS1pbnB1dC1kZW1vLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2J1dHRvbi10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ZGl2IHN0eWxlPVwiZGlzcGxheTogZmxleDsgZ2FwOiAycmVtOyBtYXJnaW4tdG9wOiAycmVtO1wiPlxuICAgICAgICA8ZGl2PlxuICAgICAgICAgIE11bHRpcGxlIFNlbGVjdGlvbjxicj5cbiAgICAgICAgICBUb29sVGlwczxicj5cbiAgICAgICAgICBUb29sVGlwIFBvc2l0aW9uIEFCT1ZFPGJyPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPHNwYW4gc3R5bGU9XCJmbGV4OjFcIj48L3NwYW4+XG4gICAgICAgIDxkaXY+XG4gICAgICAgICAgPG1hdC1idXR0b24tdG9nZ2xlLWdyb3VwICN3aWR0aDI9XCJtYXRCdXR0b25Ub2dnbGVHcm91cFwiPlxuICAgICAgICAgICAgPG1hdC1idXR0b24tdG9nZ2xlIHZhbHVlPVwiZmFsc2VcIiBjaGVja2VkPVwiZmFsc2VcIj5Ob3JtYWwgV2lkdGg8L21hdC1idXR0b24tdG9nZ2xlPlxuICAgICAgICAgICAgPG1hdC1idXR0b24tdG9nZ2xlIHZhbHVlPVwidHJ1ZVwiIGNoZWNrZWQ9XCJ0cnVlXCI+RnVsbCBXaWR0aDwvbWF0LWJ1dHRvbi10b2dnbGU+XG4gICAgICAgICAgPC9tYXQtYnV0dG9uLXRvZ2dsZS1ncm91cD5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cblxuICAgICAgPGRpdiBzdHlsZT1cIm1hcmdpbi10b3A6IC41cmVtOyBtYXJnaW4tYm90dG9tOiAxcmVtO1wiPlxuICAgICAgICA8bWF0LWRpdmlkZXI+PC9tYXQtZGl2aWRlcj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuXG48L2Rpdj5cbiJdfQ==
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Component, Input, forwardRef, inject } from '@angular/core';
|
|
2
|
+
import { FormBuilder, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import { ListItem } from './models/list-item.model';
|
|
4
|
+
import { Subscription } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@angular/common";
|
|
7
|
+
import * as i2 from "@angular/forms";
|
|
8
|
+
import * as i3 from "@angular/material/icon";
|
|
9
|
+
import * as i4 from "@angular/material/tooltip";
|
|
10
|
+
import * as i5 from "@angular/material/button-toggle";
|
|
11
|
+
export class ButtonToggleInputComponent {
|
|
12
|
+
set noBorder(value) {
|
|
13
|
+
this._noBorder = value !== null && `${value}` !== 'false';
|
|
14
|
+
}
|
|
15
|
+
get noBorder() {
|
|
16
|
+
return this._noBorder;
|
|
17
|
+
}
|
|
18
|
+
set iconPrefix(value) {
|
|
19
|
+
this._iconPrefix = (value !== undefined) ? value : false;
|
|
20
|
+
}
|
|
21
|
+
get iconPrefix() {
|
|
22
|
+
return this._iconPrefix;
|
|
23
|
+
}
|
|
24
|
+
set iconSuffix(value) {
|
|
25
|
+
this._iconSuffix = (value !== undefined) ? value : false;
|
|
26
|
+
this.iconPrefix = !this.iconSuffix;
|
|
27
|
+
}
|
|
28
|
+
get iconSuffix() {
|
|
29
|
+
return this._iconSuffix;
|
|
30
|
+
}
|
|
31
|
+
set fullWidth(value) {
|
|
32
|
+
this._fullWidth = value !== null && `${value}` !== 'false';
|
|
33
|
+
}
|
|
34
|
+
get fullWidth() {
|
|
35
|
+
return this._fullWidth;
|
|
36
|
+
}
|
|
37
|
+
set data(value) {
|
|
38
|
+
const isString = this.isArrayOfStrings(value);
|
|
39
|
+
this._data = (isString) ? value.map(item => ListItem.adapt({ value: item, label: item })) : value.map(item => ListItem.adapt(item));
|
|
40
|
+
this.hasLabels = this.data.some(item => item['label']);
|
|
41
|
+
this.hasIcons = this.data.some((item) => item["icon"]);
|
|
42
|
+
}
|
|
43
|
+
get selected() {
|
|
44
|
+
return this.data.filter(item => item.selected).map(item => item.value);
|
|
45
|
+
}
|
|
46
|
+
get hasSelected() {
|
|
47
|
+
return (this.selected.length > 0);
|
|
48
|
+
}
|
|
49
|
+
get data() {
|
|
50
|
+
return this._data;
|
|
51
|
+
}
|
|
52
|
+
constructor() {
|
|
53
|
+
this.multiple = false;
|
|
54
|
+
this.toolTips = false;
|
|
55
|
+
this.toolTipPosition = 'above';
|
|
56
|
+
this.toolTipShowDelay = 1;
|
|
57
|
+
this.color = "#333333";
|
|
58
|
+
this.lightColor = "white";
|
|
59
|
+
this.darkColor = "black";
|
|
60
|
+
this._noBorder = false;
|
|
61
|
+
this._iconPrefix = true;
|
|
62
|
+
this._iconSuffix = false;
|
|
63
|
+
this._fullWidth = false;
|
|
64
|
+
this.formInitialized = false;
|
|
65
|
+
this.isArrayOfStrings = (arr) => {
|
|
66
|
+
const isArray = Array.isArray(arr) && arr.every(item => typeof item === 'string');
|
|
67
|
+
return (arr.length > 0) ? isArray : false;
|
|
68
|
+
};
|
|
69
|
+
this.hasLabels = false;
|
|
70
|
+
this.hasIcons = false;
|
|
71
|
+
this._data = [];
|
|
72
|
+
this.subscription = new Subscription();
|
|
73
|
+
this.sample = "orange";
|
|
74
|
+
this.test = 'red';
|
|
75
|
+
this.fb = inject(FormBuilder);
|
|
76
|
+
this.display = this.fb.control(null);
|
|
77
|
+
this.disabled = false;
|
|
78
|
+
this.onChange = () => { };
|
|
79
|
+
this.onTouch = () => { };
|
|
80
|
+
}
|
|
81
|
+
ngOnInit() {
|
|
82
|
+
this.subscription.add(this.display.valueChanges.subscribe(data => this.onChange(data)));
|
|
83
|
+
}
|
|
84
|
+
writeValue(value) {
|
|
85
|
+
if (!this.formInitialized) {
|
|
86
|
+
this.display.patchValue(this.selected, { emitEvent: false });
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
const valuePatch = (value) ? (this.multiple) ? value : value[0] : null;
|
|
90
|
+
this.display.patchValue(valuePatch, { emitEvent: false });
|
|
91
|
+
}
|
|
92
|
+
this.formInitialized = true;
|
|
93
|
+
}
|
|
94
|
+
registerOnChange(fn) {
|
|
95
|
+
this.onChange = fn;
|
|
96
|
+
}
|
|
97
|
+
registerOnTouched(fn) {
|
|
98
|
+
this.onTouch = fn;
|
|
99
|
+
}
|
|
100
|
+
setDisabledState(isDisabled) {
|
|
101
|
+
this.disabled = isDisabled;
|
|
102
|
+
if (this.disabled) {
|
|
103
|
+
this.display.disable();
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
this.display.enable();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
ngOnDestroy() {
|
|
110
|
+
this.subscription.unsubscribe();
|
|
111
|
+
}
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonToggleInputComponent, selector: "app-button-toggle-input", inputs: { multiple: "multiple", toolTips: "toolTips", toolTipPosition: "toolTipPosition", toolTipShowDelay: "toolTipShowDelay", color: "color", lightColor: "lightColor", darkColor: "darkColor", noBorder: "noBorder", iconPrefix: "iconPrefix", iconSuffix: "iconSuffix", fullWidth: "fullWidth", data: "data" }, providers: [
|
|
114
|
+
{
|
|
115
|
+
provide: NG_VALUE_ACCESSOR,
|
|
116
|
+
useExisting: forwardRef(() => ButtonToggleInputComponent),
|
|
117
|
+
multi: true
|
|
118
|
+
}
|
|
119
|
+
], ngImport: i0, template: "<mat-button-toggle-group\n style=\"height: 44px;\"\n [class.stretch]=\"fullWidth\"\n [style.background-color]=\"(noBorder) ? '' : 'white'\"\n [style.border-radius]=\"(noBorder) ? 'none' : '5rem'\"\n [style.border]=\"(noBorder) ? 'none' : ''\"\n [formControl]=\"display\"\n [multiple]=\"multiple\"\n>\n <ng-container *ngFor=\"let item of data;\">\n\n <mat-button-toggle\n [disableRipple]=\"true\"\n color=\"primary\"\n style=\"border-radius: 5rem;\"\n [style.flex]=\"(fullWidth) ? '1' : ''\"\n [style.opacity]=\"disabled ? '0.3' : ''\"\n [style.padding-left]=\"(hasLabels && !fullWidth) ? '.5rem' : ''\"\n [style.padding-right]=\"(hasLabels && !fullWidth)? '.5rem' : ''\"\n [value]=\"item.value\"\n [matTooltip]=\"(toolTips) ? item.tootTip : ''\"\n [matTooltipPosition]=\"toolTipPosition\"\n [matTooltipShowDelay]=\"toolTipShowDelay * 1000\"\n [disabled]=\"item.disabled\"\n >\n <div\n style=\"display: flex; gap: 0.5rem; padding-top: 0.25rem\"\n [style.padding-top]=\"iconSuffix && (hasIcons && hasLabels) ? '' : '.25rem'\">\n <div class=\"icon\" *ngIf=\"hasIcons && iconPrefix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n\n <div class=\"overflow-content\" *ngIf=\"item.label !== ''\">{{ item.label }}</div>\n\n <div class=\"icon\" *ngIf=\"hasIcons && iconSuffix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n </div>\n\n </mat-button-toggle>\n\n </ng-container>\n</mat-button-toggle-group>\n", styles: [".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-button-toggle-checked{background-color:#333!important;color:#fff!important;transition:all .2s ease;font-weight:600}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border:none!important;white-space:pre-wrap!important}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{border:none!important;white-space:pre-wrap!important}.mat-button-toggle-label-content{line-height:32px!important}.mat-checkbox span.mat-checkbox-ripple{display:none}mat-button-toggle{display:flex;align-items:center;justify-content:center;text-align:center}mat-button-toggle .overflow-content{display:flex;align-items:center;justify-content:center;white-space:normal;word-wrap:break-word;line-height:1.2rem;font-size:1rem}.stretch{display:flex}.icon{display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i5.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }] }); }
|
|
120
|
+
}
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputComponent, decorators: [{
|
|
122
|
+
type: Component,
|
|
123
|
+
args: [{ selector: 'app-button-toggle-input', providers: [
|
|
124
|
+
{
|
|
125
|
+
provide: NG_VALUE_ACCESSOR,
|
|
126
|
+
useExisting: forwardRef(() => ButtonToggleInputComponent),
|
|
127
|
+
multi: true
|
|
128
|
+
}
|
|
129
|
+
], template: "<mat-button-toggle-group\n style=\"height: 44px;\"\n [class.stretch]=\"fullWidth\"\n [style.background-color]=\"(noBorder) ? '' : 'white'\"\n [style.border-radius]=\"(noBorder) ? 'none' : '5rem'\"\n [style.border]=\"(noBorder) ? 'none' : ''\"\n [formControl]=\"display\"\n [multiple]=\"multiple\"\n>\n <ng-container *ngFor=\"let item of data;\">\n\n <mat-button-toggle\n [disableRipple]=\"true\"\n color=\"primary\"\n style=\"border-radius: 5rem;\"\n [style.flex]=\"(fullWidth) ? '1' : ''\"\n [style.opacity]=\"disabled ? '0.3' : ''\"\n [style.padding-left]=\"(hasLabels && !fullWidth) ? '.5rem' : ''\"\n [style.padding-right]=\"(hasLabels && !fullWidth)? '.5rem' : ''\"\n [value]=\"item.value\"\n [matTooltip]=\"(toolTips) ? item.tootTip : ''\"\n [matTooltipPosition]=\"toolTipPosition\"\n [matTooltipShowDelay]=\"toolTipShowDelay * 1000\"\n [disabled]=\"item.disabled\"\n >\n <div\n style=\"display: flex; gap: 0.5rem; padding-top: 0.25rem\"\n [style.padding-top]=\"iconSuffix && (hasIcons && hasLabels) ? '' : '.25rem'\">\n <div class=\"icon\" *ngIf=\"hasIcons && iconPrefix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n\n <div class=\"overflow-content\" *ngIf=\"item.label !== ''\">{{ item.label }}</div>\n\n <div class=\"icon\" *ngIf=\"hasIcons && iconSuffix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n </div>\n\n </mat-button-toggle>\n\n </ng-container>\n</mat-button-toggle-group>\n", styles: [".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-button-toggle-checked{background-color:#333!important;color:#fff!important;transition:all .2s ease;font-weight:600}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border:none!important;white-space:pre-wrap!important}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{border:none!important;white-space:pre-wrap!important}.mat-button-toggle-label-content{line-height:32px!important}.mat-checkbox span.mat-checkbox-ripple{display:none}mat-button-toggle{display:flex;align-items:center;justify-content:center;text-align:center}mat-button-toggle .overflow-content{display:flex;align-items:center;justify-content:center;white-space:normal;word-wrap:break-word;line-height:1.2rem;font-size:1rem}.stretch{display:flex}.icon{display:flex;align-items:center}\n"] }]
|
|
130
|
+
}], ctorParameters: function () { return []; }, propDecorators: { multiple: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], toolTips: [{
|
|
133
|
+
type: Input
|
|
134
|
+
}], toolTipPosition: [{
|
|
135
|
+
type: Input
|
|
136
|
+
}], toolTipShowDelay: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], color: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], lightColor: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], darkColor: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], noBorder: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], iconPrefix: [{
|
|
147
|
+
type: Input
|
|
148
|
+
}], iconSuffix: [{
|
|
149
|
+
type: Input
|
|
150
|
+
}], fullWidth: [{
|
|
151
|
+
type: Input
|
|
152
|
+
}], data: [{
|
|
153
|
+
type: Input
|
|
154
|
+
}] } });
|
|
155
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLXRvZ2dsZS1pbnB1dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9idXR0b24tdG9nZ2xlLWlucHV0L3NyYy9saWIvYnV0dG9uLXRvZ2dsZS1pbnB1dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9idXR0b24tdG9nZ2xlLWlucHV0L3NyYy9saWIvYnV0dG9uLXRvZ2dsZS1pbnB1dC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBcUIsV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ZWZpeFwiPlxuICAgICAgICAgIDxtYXQtaWNvbj57e2l0ZW0uaWNvbn19PC9tYXQtaWNvbj5cbiAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgPGRpdiBjbGFzcz1cIm92ZXJmbG93LWNvbnRlbnRcIiAqbmdJZj1cIml0ZW0ubGFiZWwgIT09ICcnXCI+e3sgaXRlbS5sYWJlbCB9fTwvZGl2PlxuXG4gICAgICAgIDxkaXYgY2xhc3M9XCJpY29uXCIgKm5nSWY9XCJoYXNJY29ucyAmJiBpY29uU3VmZml4XCI+XG4gICAgICAgICAgPG1hdC1pY29uPnt7aXRlbS5pY29ufX08L21hdC1pY29uPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuXG4gICAgPC9tYXQtYnV0dG9uLXRvZ2dsZT5cblxuICA8L25nLWNvbnRhaW5lcj5cbjwvbWF0LWJ1dHRvbi10b2dnbGUtZ3JvdXA+XG4iXX0=
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { ButtonToggleInputComponent } from './button-toggle-input.component';
|
|
5
|
+
import { ButtonToggleDemoComponent } from './button-toggle-input-demo/button-toggle-input-demo.component';
|
|
6
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
7
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
8
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
10
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
11
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
export class ButtonToggleInputModule {
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
15
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputModule, declarations: [ButtonToggleInputComponent,
|
|
16
|
+
ButtonToggleDemoComponent], imports: [CommonModule,
|
|
17
|
+
FormsModule,
|
|
18
|
+
MatIconModule,
|
|
19
|
+
MatButtonModule,
|
|
20
|
+
MatTooltipModule,
|
|
21
|
+
ReactiveFormsModule,
|
|
22
|
+
MatButtonToggleModule,
|
|
23
|
+
MatSlideToggleModule,
|
|
24
|
+
MatDividerModule], exports: [ButtonToggleInputComponent,
|
|
25
|
+
ButtonToggleDemoComponent] }); }
|
|
26
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputModule, imports: [CommonModule,
|
|
27
|
+
FormsModule,
|
|
28
|
+
MatIconModule,
|
|
29
|
+
MatButtonModule,
|
|
30
|
+
MatTooltipModule,
|
|
31
|
+
ReactiveFormsModule,
|
|
32
|
+
MatButtonToggleModule,
|
|
33
|
+
MatSlideToggleModule,
|
|
34
|
+
MatDividerModule] }); }
|
|
35
|
+
}
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputModule, decorators: [{
|
|
37
|
+
type: NgModule,
|
|
38
|
+
args: [{
|
|
39
|
+
imports: [
|
|
40
|
+
CommonModule,
|
|
41
|
+
FormsModule,
|
|
42
|
+
MatIconModule,
|
|
43
|
+
MatButtonModule,
|
|
44
|
+
MatTooltipModule,
|
|
45
|
+
ReactiveFormsModule,
|
|
46
|
+
MatButtonToggleModule,
|
|
47
|
+
MatSlideToggleModule,
|
|
48
|
+
MatDividerModule,
|
|
49
|
+
],
|
|
50
|
+
declarations: [
|
|
51
|
+
ButtonToggleInputComponent,
|
|
52
|
+
ButtonToggleDemoComponent
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AgIE1hdFNsaWRlVG9nZ2xlTW9kdWxlLFxuICAgIE1hdERpdmlkZXJNb2R1bGUsXG4gIF0sXG4gIGRlY2xhcmF0aW9uczogW1xuICAgIEJ1dHRvblRvZ2dsZUlucHV0Q29tcG9uZW50LFxuICAgIEJ1dHRvblRvZ2dsZURlbW9Db21wb25lbnRcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIEJ1dHRvblRvZ2dsZUlucHV0Q29tcG9uZW50LFxuICAgIEJ1dHRvblRvZ2dsZURlbW9Db21wb25lbnRcbiAgXVxufSlcbmV4cG9ydCBjbGFzcyBCdXR0b25Ub2dnbGVJbnB1dE1vZHVsZSB7IH1cbiJdfQ==
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class ListItem {
|
|
2
|
+
constructor(value = '', label, icon, tootTip, selected, disabled) {
|
|
3
|
+
this.value = value;
|
|
4
|
+
this.label = label;
|
|
5
|
+
this.icon = icon;
|
|
6
|
+
this.tootTip = tootTip;
|
|
7
|
+
this.selected = selected;
|
|
8
|
+
this.disabled = disabled;
|
|
9
|
+
}
|
|
10
|
+
static adapt(item) {
|
|
11
|
+
return new ListItem(item?.value, (item?.label) ? item.label : (item?.icon) ? '' : item?.value, item?.icon, (item?.tootTip) ? item.tootTip : (item?.label) ? item.label : item?.value, item?.selected, item?.disabled);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdC1pdGVtLm1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYnV0dG9uLXRvZ2dsZS1pbnB1dC9zcmMvbGliL21vZGVscy9saXN0LWl0ZW0ubW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBU0EsTUFBTSxPQUFPLFFBQVE7SUFFbkIsWUFDUyxRQUFRLEVBQUUsRUFDVixLQUFj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b290VGlwPzogc3RyaW5nXG4gIHNlbGVjdGVkPzogc3RyaW5nXG4gIGRpc2FibGVkPzogc3RyaW5nXG59XG5cbmV4cG9ydCBjbGFzcyBMaXN0SXRlbSBpbXBsZW1lbnRzIExpc3RJdGVtSW50ZXJmYWNlIHtcblxuICBjb25zdHJ1Y3RvcihcbiAgICBwdWJsaWMgdmFsdWUgPSAnJyxcbiAgICBwdWJsaWMgbGFiZWw/OiBzdHJpbmcsXG4gICAgcHVibGljIGljb24/OiBzdHJpbmcsXG4gICAgcHVibGljIHRvb3RUaXA/OiBzdHJpbmcsXG4gICAgcHVibGljIHNlbGVjdGVkPzogc3RyaW5nLFxuICAgIHB1YmxpYyBkaXNhYmxlZD86IHN0cmluZyxcbiAgKSB7fVxuXG4gIHN0YXRpYyBhZGFwdChpdGVtPzogYW55KTogTGlzdEl0ZW0ge1xuXG4gICAgcmV0dXJuIG5ldyBMaXN0SXRlbShcbiAgICAgIGl0ZW0/LnZhbHVlLFxuICAgICAgKGl0ZW0/LmxhYmVsKSA/IGl0ZW0ubGFiZWwgOiAoaXRlbT8uaWNvbikgPyAnJyA6IGl0ZW0/LnZhbHVlLFxuICAgICAgaXRlbT8uaWNvbixcbiAgICAgIChpdGVtPy50b290VGlwKSA/IGl0ZW0udG9vdFRpcCA6IChpdGVtPy5sYWJlbCkgPyBpdGVtLmxhYmVsIDogaXRlbT8udmFsdWUsXG4gICAgICBpdGVtPy5zZWxlY3RlZCxcbiAgICAgIGl0ZW0/LmRpc2FibGVkLFxuICAgIClcblxuICB9XG5cbn1cblxuXG4iXX0=
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of button-toggle-input
|
|
3
|
+
*/
|
|
4
|
+
export * from './lib/button-toggle-input-demo/button-toggle-input-demo.component';
|
|
5
|
+
export * from './lib/button-toggle-input.module';
|
|
6
|
+
export * from './lib/button-toggle-input.component';
|
|
7
|
+
export * from './lib/models/list-item.model';
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2J1dHRvbi10b2dnbGUtaW5wdXQvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLG1FQUFtRSxDQUFDO0FBRWxGLGNBQWMsa0NBQWtDLENBQUM7QUFDakQsY0FBYyxxQ0FBcUMsQ0FBQztBQUVwRCxjQUFjLDhCQUE4QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBidXR0b24tdG9nZ2xlLWlucHV0XG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvYnV0dG9uLXRvZ2dsZS1pbnB1dC1kZW1vL2J1dHRvbi10b2dnbGUtaW5wdXQtZGVtby5jb21wb25lbnQnO1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9idXR0b24tdG9nZ2xlLWlucHV0Lm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9idXR0b24tdG9nZ2xlLWlucHV0LmNvbXBvbmVudCc7XG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL21vZGVscy9saXN0LWl0ZW0ubW9kZWwnO1xuIl19
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, forwardRef, Component, Input, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/forms';
|
|
4
|
+
import { FormBuilder, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import * as i2$1 from '@angular/material/button';
|
|
6
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
7
|
+
import * as i5 from '@angular/material/button-toggle';
|
|
8
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
9
|
+
import * as i4$1 from '@angular/material/slide-toggle';
|
|
10
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
11
|
+
import * as i5$1 from '@angular/material/divider';
|
|
12
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
13
|
+
import { Subscription } from 'rxjs';
|
|
14
|
+
import * as i1 from '@angular/common';
|
|
15
|
+
import { CommonModule } from '@angular/common';
|
|
16
|
+
import * as i3 from '@angular/material/icon';
|
|
17
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
18
|
+
import * as i4 from '@angular/material/tooltip';
|
|
19
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
20
|
+
|
|
21
|
+
class ListItem {
|
|
22
|
+
constructor(value = '', label, icon, tootTip, selected, disabled) {
|
|
23
|
+
this.value = value;
|
|
24
|
+
this.label = label;
|
|
25
|
+
this.icon = icon;
|
|
26
|
+
this.tootTip = tootTip;
|
|
27
|
+
this.selected = selected;
|
|
28
|
+
this.disabled = disabled;
|
|
29
|
+
}
|
|
30
|
+
static adapt(item) {
|
|
31
|
+
return new ListItem(item?.value, (item?.label) ? item.label : (item?.icon) ? '' : item?.value, item?.icon, (item?.tootTip) ? item.tootTip : (item?.label) ? item.label : item?.value, item?.selected, item?.disabled);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
class ButtonToggleInputComponent {
|
|
36
|
+
set noBorder(value) {
|
|
37
|
+
this._noBorder = value !== null && `${value}` !== 'false';
|
|
38
|
+
}
|
|
39
|
+
get noBorder() {
|
|
40
|
+
return this._noBorder;
|
|
41
|
+
}
|
|
42
|
+
set iconPrefix(value) {
|
|
43
|
+
this._iconPrefix = (value !== undefined) ? value : false;
|
|
44
|
+
}
|
|
45
|
+
get iconPrefix() {
|
|
46
|
+
return this._iconPrefix;
|
|
47
|
+
}
|
|
48
|
+
set iconSuffix(value) {
|
|
49
|
+
this._iconSuffix = (value !== undefined) ? value : false;
|
|
50
|
+
this.iconPrefix = !this.iconSuffix;
|
|
51
|
+
}
|
|
52
|
+
get iconSuffix() {
|
|
53
|
+
return this._iconSuffix;
|
|
54
|
+
}
|
|
55
|
+
set fullWidth(value) {
|
|
56
|
+
this._fullWidth = value !== null && `${value}` !== 'false';
|
|
57
|
+
}
|
|
58
|
+
get fullWidth() {
|
|
59
|
+
return this._fullWidth;
|
|
60
|
+
}
|
|
61
|
+
set data(value) {
|
|
62
|
+
const isString = this.isArrayOfStrings(value);
|
|
63
|
+
this._data = (isString) ? value.map(item => ListItem.adapt({ value: item, label: item })) : value.map(item => ListItem.adapt(item));
|
|
64
|
+
this.hasLabels = this.data.some(item => item['label']);
|
|
65
|
+
this.hasIcons = this.data.some((item) => item["icon"]);
|
|
66
|
+
}
|
|
67
|
+
get selected() {
|
|
68
|
+
return this.data.filter(item => item.selected).map(item => item.value);
|
|
69
|
+
}
|
|
70
|
+
get hasSelected() {
|
|
71
|
+
return (this.selected.length > 0);
|
|
72
|
+
}
|
|
73
|
+
get data() {
|
|
74
|
+
return this._data;
|
|
75
|
+
}
|
|
76
|
+
constructor() {
|
|
77
|
+
this.multiple = false;
|
|
78
|
+
this.toolTips = false;
|
|
79
|
+
this.toolTipPosition = 'above';
|
|
80
|
+
this.toolTipShowDelay = 1;
|
|
81
|
+
this.color = "#333333";
|
|
82
|
+
this.lightColor = "white";
|
|
83
|
+
this.darkColor = "black";
|
|
84
|
+
this._noBorder = false;
|
|
85
|
+
this._iconPrefix = true;
|
|
86
|
+
this._iconSuffix = false;
|
|
87
|
+
this._fullWidth = false;
|
|
88
|
+
this.formInitialized = false;
|
|
89
|
+
this.isArrayOfStrings = (arr) => {
|
|
90
|
+
const isArray = Array.isArray(arr) && arr.every(item => typeof item === 'string');
|
|
91
|
+
return (arr.length > 0) ? isArray : false;
|
|
92
|
+
};
|
|
93
|
+
this.hasLabels = false;
|
|
94
|
+
this.hasIcons = false;
|
|
95
|
+
this._data = [];
|
|
96
|
+
this.subscription = new Subscription();
|
|
97
|
+
this.sample = "orange";
|
|
98
|
+
this.test = 'red';
|
|
99
|
+
this.fb = inject(FormBuilder);
|
|
100
|
+
this.display = this.fb.control(null);
|
|
101
|
+
this.disabled = false;
|
|
102
|
+
this.onChange = () => { };
|
|
103
|
+
this.onTouch = () => { };
|
|
104
|
+
}
|
|
105
|
+
ngOnInit() {
|
|
106
|
+
this.subscription.add(this.display.valueChanges.subscribe(data => this.onChange(data)));
|
|
107
|
+
}
|
|
108
|
+
writeValue(value) {
|
|
109
|
+
if (!this.formInitialized) {
|
|
110
|
+
this.display.patchValue(this.selected, { emitEvent: false });
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const valuePatch = (value) ? (this.multiple) ? value : value[0] : null;
|
|
114
|
+
this.display.patchValue(valuePatch, { emitEvent: false });
|
|
115
|
+
}
|
|
116
|
+
this.formInitialized = true;
|
|
117
|
+
}
|
|
118
|
+
registerOnChange(fn) {
|
|
119
|
+
this.onChange = fn;
|
|
120
|
+
}
|
|
121
|
+
registerOnTouched(fn) {
|
|
122
|
+
this.onTouch = fn;
|
|
123
|
+
}
|
|
124
|
+
setDisabledState(isDisabled) {
|
|
125
|
+
this.disabled = isDisabled;
|
|
126
|
+
if (this.disabled) {
|
|
127
|
+
this.display.disable();
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
this.display.enable();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
ngOnDestroy() {
|
|
134
|
+
this.subscription.unsubscribe();
|
|
135
|
+
}
|
|
136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
137
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonToggleInputComponent, selector: "app-button-toggle-input", inputs: { multiple: "multiple", toolTips: "toolTips", toolTipPosition: "toolTipPosition", toolTipShowDelay: "toolTipShowDelay", color: "color", lightColor: "lightColor", darkColor: "darkColor", noBorder: "noBorder", iconPrefix: "iconPrefix", iconSuffix: "iconSuffix", fullWidth: "fullWidth", data: "data" }, providers: [
|
|
138
|
+
{
|
|
139
|
+
provide: NG_VALUE_ACCESSOR,
|
|
140
|
+
useExisting: forwardRef(() => ButtonToggleInputComponent),
|
|
141
|
+
multi: true
|
|
142
|
+
}
|
|
143
|
+
], ngImport: i0, template: "<mat-button-toggle-group\n style=\"height: 44px;\"\n [class.stretch]=\"fullWidth\"\n [style.background-color]=\"(noBorder) ? '' : 'white'\"\n [style.border-radius]=\"(noBorder) ? 'none' : '5rem'\"\n [style.border]=\"(noBorder) ? 'none' : ''\"\n [formControl]=\"display\"\n [multiple]=\"multiple\"\n>\n <ng-container *ngFor=\"let item of data;\">\n\n <mat-button-toggle\n [disableRipple]=\"true\"\n color=\"primary\"\n style=\"border-radius: 5rem;\"\n [style.flex]=\"(fullWidth) ? '1' : ''\"\n [style.opacity]=\"disabled ? '0.3' : ''\"\n [style.padding-left]=\"(hasLabels && !fullWidth) ? '.5rem' : ''\"\n [style.padding-right]=\"(hasLabels && !fullWidth)? '.5rem' : ''\"\n [value]=\"item.value\"\n [matTooltip]=\"(toolTips) ? item.tootTip : ''\"\n [matTooltipPosition]=\"toolTipPosition\"\n [matTooltipShowDelay]=\"toolTipShowDelay * 1000\"\n [disabled]=\"item.disabled\"\n >\n <div\n style=\"display: flex; gap: 0.5rem; padding-top: 0.25rem\"\n [style.padding-top]=\"iconSuffix && (hasIcons && hasLabels) ? '' : '.25rem'\">\n <div class=\"icon\" *ngIf=\"hasIcons && iconPrefix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n\n <div class=\"overflow-content\" *ngIf=\"item.label !== ''\">{{ item.label }}</div>\n\n <div class=\"icon\" *ngIf=\"hasIcons && iconSuffix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n </div>\n\n </mat-button-toggle>\n\n </ng-container>\n</mat-button-toggle-group>\n", styles: [".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-button-toggle-checked{background-color:#333!important;color:#fff!important;transition:all .2s ease;font-weight:600}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border:none!important;white-space:pre-wrap!important}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{border:none!important;white-space:pre-wrap!important}.mat-button-toggle-label-content{line-height:32px!important}.mat-checkbox span.mat-checkbox-ripple{display:none}mat-button-toggle{display:flex;align-items:center;justify-content:center;text-align:center}mat-button-toggle .overflow-content{display:flex;align-items:center;justify-content:center;white-space:normal;word-wrap:break-word;line-height:1.2rem;font-size:1rem}.stretch{display:flex}.icon{display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i5.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }] }); }
|
|
144
|
+
}
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputComponent, decorators: [{
|
|
146
|
+
type: Component,
|
|
147
|
+
args: [{ selector: 'app-button-toggle-input', providers: [
|
|
148
|
+
{
|
|
149
|
+
provide: NG_VALUE_ACCESSOR,
|
|
150
|
+
useExisting: forwardRef(() => ButtonToggleInputComponent),
|
|
151
|
+
multi: true
|
|
152
|
+
}
|
|
153
|
+
], template: "<mat-button-toggle-group\n style=\"height: 44px;\"\n [class.stretch]=\"fullWidth\"\n [style.background-color]=\"(noBorder) ? '' : 'white'\"\n [style.border-radius]=\"(noBorder) ? 'none' : '5rem'\"\n [style.border]=\"(noBorder) ? 'none' : ''\"\n [formControl]=\"display\"\n [multiple]=\"multiple\"\n>\n <ng-container *ngFor=\"let item of data;\">\n\n <mat-button-toggle\n [disableRipple]=\"true\"\n color=\"primary\"\n style=\"border-radius: 5rem;\"\n [style.flex]=\"(fullWidth) ? '1' : ''\"\n [style.opacity]=\"disabled ? '0.3' : ''\"\n [style.padding-left]=\"(hasLabels && !fullWidth) ? '.5rem' : ''\"\n [style.padding-right]=\"(hasLabels && !fullWidth)? '.5rem' : ''\"\n [value]=\"item.value\"\n [matTooltip]=\"(toolTips) ? item.tootTip : ''\"\n [matTooltipPosition]=\"toolTipPosition\"\n [matTooltipShowDelay]=\"toolTipShowDelay * 1000\"\n [disabled]=\"item.disabled\"\n >\n <div\n style=\"display: flex; gap: 0.5rem; padding-top: 0.25rem\"\n [style.padding-top]=\"iconSuffix && (hasIcons && hasLabels) ? '' : '.25rem'\">\n <div class=\"icon\" *ngIf=\"hasIcons && iconPrefix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n\n <div class=\"overflow-content\" *ngIf=\"item.label !== ''\">{{ item.label }}</div>\n\n <div class=\"icon\" *ngIf=\"hasIcons && iconSuffix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n </div>\n\n </mat-button-toggle>\n\n </ng-container>\n</mat-button-toggle-group>\n", styles: [".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-button-toggle-checked{background-color:#333!important;color:#fff!important;transition:all .2s ease;font-weight:600}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border:none!important;white-space:pre-wrap!important}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{border:none!important;white-space:pre-wrap!important}.mat-button-toggle-label-content{line-height:32px!important}.mat-checkbox span.mat-checkbox-ripple{display:none}mat-button-toggle{display:flex;align-items:center;justify-content:center;text-align:center}mat-button-toggle .overflow-content{display:flex;align-items:center;justify-content:center;white-space:normal;word-wrap:break-word;line-height:1.2rem;font-size:1rem}.stretch{display:flex}.icon{display:flex;align-items:center}\n"] }]
|
|
154
|
+
}], ctorParameters: function () { return []; }, propDecorators: { multiple: [{
|
|
155
|
+
type: Input
|
|
156
|
+
}], toolTips: [{
|
|
157
|
+
type: Input
|
|
158
|
+
}], toolTipPosition: [{
|
|
159
|
+
type: Input
|
|
160
|
+
}], toolTipShowDelay: [{
|
|
161
|
+
type: Input
|
|
162
|
+
}], color: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}], lightColor: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}], darkColor: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], noBorder: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], iconPrefix: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], iconSuffix: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}], fullWidth: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}], data: [{
|
|
177
|
+
type: Input
|
|
178
|
+
}] } });
|
|
179
|
+
|
|
180
|
+
class ButtonToggleDemoComponent {
|
|
181
|
+
constructor() {
|
|
182
|
+
this.fb = inject(FormBuilder);
|
|
183
|
+
this.type = 'icons';
|
|
184
|
+
this.data_1 = [
|
|
185
|
+
{ id: 1, icon: 'home', value: 'option_1', disabled: true },
|
|
186
|
+
{ id: 2, icon: 'layers', value: 'option_2' },
|
|
187
|
+
{ id: 3, icon: 'add', value: 'option_3' },
|
|
188
|
+
{ id: 3, icon: 'build', value: 'option_4', disabled: true },
|
|
189
|
+
{ id: 3, icon: 'list', value: 'option_5', selected: true },
|
|
190
|
+
{ id: 3, icon: 'business', value: 'option_6' },
|
|
191
|
+
];
|
|
192
|
+
this.data_2 = [
|
|
193
|
+
{ id: 1, label: 'Home', value: 'option_1', disabled: true },
|
|
194
|
+
{ id: 2, label: 'Samples', value: 'option_2' },
|
|
195
|
+
{ id: 3, label: 'Demos 1 is here', value: 'option_3' },
|
|
196
|
+
{ id: 3, label: 'Demos 2A', value: 'option_4', disabled: true },
|
|
197
|
+
{ id: 3, label: 'Demos 2B', value: 'option_5', selected: true },
|
|
198
|
+
{ id: 3, label: 'Demos 3', value: 'option_6' },
|
|
199
|
+
];
|
|
200
|
+
this.data_3 = [
|
|
201
|
+
{ id: 1, label: 'Home', icon: 'home', value: 'option_1', disabled: true },
|
|
202
|
+
{ id: 2, label: 'Samples', icon: 'layers', value: 'option_2' },
|
|
203
|
+
{ id: 3, label: 'Demos 1', icon: 'add', value: 'option_3' },
|
|
204
|
+
{ id: 3, label: 'Demos 2A', icon: 'network', value: 'option_4', disabled: true },
|
|
205
|
+
{ id: 3, label: 'Demos 2B', icon: 'list', value: 'option_5', selected: true },
|
|
206
|
+
{ id: 3, label: 'Demos 3', icon: 'business', value: 'option_6' },
|
|
207
|
+
];
|
|
208
|
+
this.data = this.data_1;
|
|
209
|
+
this.selectionControl_1 = this.fb.control(null);
|
|
210
|
+
this.selectionControl_2 = this.fb.control(null);
|
|
211
|
+
this.changeDetection_1 = this.fb.control(true);
|
|
212
|
+
this.changeDetection_2 = this.fb.control(false);
|
|
213
|
+
}
|
|
214
|
+
ngOnInit() {
|
|
215
|
+
this.selectionControl_1.valueChanges.subscribe(data => {
|
|
216
|
+
if (this.changeDetection_1.value)
|
|
217
|
+
console.log('CHANGE:', data);
|
|
218
|
+
});
|
|
219
|
+
this.selectionControl_2.valueChanges.subscribe(data => {
|
|
220
|
+
if (this.changeDetection_2.value)
|
|
221
|
+
console.log('CHANGE:', data);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
onPerformPatch() {
|
|
225
|
+
this.selectionControl_1.patchValue(['option_3']);
|
|
226
|
+
this.selectionControl_2.patchValue(['option_3', 'option_5']);
|
|
227
|
+
}
|
|
228
|
+
onChangeDataType(type) {
|
|
229
|
+
if (type === 'icons') {
|
|
230
|
+
this.data = this.data_1;
|
|
231
|
+
}
|
|
232
|
+
else if (type === 'labels') {
|
|
233
|
+
this.data = this.data_2;
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
this.data = this.data_3;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// DISABLE
|
|
240
|
+
onDisabled_1(disable) {
|
|
241
|
+
if (disable) {
|
|
242
|
+
this.selectionControl_1.disable();
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
this.selectionControl_1.enable();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
onDisabled_2(disable) {
|
|
249
|
+
if (disable) {
|
|
250
|
+
this.selectionControl_2.disable();
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
this.selectionControl_2.enable();
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleDemoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
257
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonToggleDemoComponent, selector: "app-button-toggle-demo", ngImport: i0, template: "<h1 style=\"flex: 1;\">Button Toggle Input</h1>\n\n\n<div style=\"display: flex; flex-direction: column; margin-top: 1rem;\">\n <div style=\"flex:1; text-align: right;\">\n <div style=\"display: flex; gap: 2rem; flex-direction: row-reverse;\">\n <mat-button-toggle (click)=\"onPerformPatch()\">Patch</mat-button-toggle>\n <mat-button-toggle-group #varTypes=\"matButtonToggleGroup\" (change)=\"onChangeDataType(varTypes.value)\">\n <mat-button-toggle value=\"icons\" checked=\"true\">Icons</mat-button-toggle>\n <mat-button-toggle value=\"labels\" checked=\"false\">Labels</mat-button-toggle>\n <mat-button-toggle value=\"combo\" checked=\"false\">Combo</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <!-- MAIN DEMOS -->\n <div style=\"margin: 1rem; margin-right: 0;\">\n <h3 style=\"margin-bottom: 0;\">Button Toggle Selection - {{ varTypes.value | uppercase }}</h3>\n\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_1.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n <app-button-toggle-input\n [formControl]=\"selectionControl_1\"\n [data]=\"data\"\n [toolTips]=\"tooltip1.checked\"\n [fullWidth]=\"width1.value\"\n [noBorder]=\"!border1.checked\"\n [iconSuffix]=\"suffix1.checked\"\n ></app-button-toggle-input>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_1\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable1 (change)=\"onDisabled_1(disable1.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix1>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip1>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border1 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Single Selection<br>\n ToolTips<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width1=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n </div>\n\n\n <div style=\"margin: 1rem; margin-right: 0;\">\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_2.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n\n <app-button-toggle-input\n [formControl]=\"selectionControl_2\"\n [data]=\"data\"\n [toolTips]=\"tooltip2.checked\"\n toolTipPosition=\"above\"\n [multiple]=\"true\"\n [fullWidth]=\"width2.value\"\n [noBorder]=\"!border2.checked\"\n [iconSuffix]=\"suffix2.checked\"\n ></app-button-toggle-input>\n\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_2\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable2 (change)=\"onDisabled_2(disable2.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix2>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip2>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border2 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Multiple Selection<br>\n ToolTips<br>\n ToolTip Position ABOVE<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width2=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <div style=\"margin-top: .5rem; margin-bottom: 1rem;\">\n <mat-divider></mat-divider>\n </div>\n </div>\n\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i5.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i4$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: ButtonToggleInputComponent, selector: "app-button-toggle-input", inputs: ["multiple", "toolTips", "toolTipPosition", "toolTipShowDelay", "color", "lightColor", "darkColor", "noBorder", "iconPrefix", "iconSuffix", "fullWidth", "data"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
258
|
+
}
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleDemoComponent, decorators: [{
|
|
260
|
+
type: Component,
|
|
261
|
+
args: [{ selector: 'app-button-toggle-demo', changeDetection: ChangeDetectionStrategy.OnPush, template: "<h1 style=\"flex: 1;\">Button Toggle Input</h1>\n\n\n<div style=\"display: flex; flex-direction: column; margin-top: 1rem;\">\n <div style=\"flex:1; text-align: right;\">\n <div style=\"display: flex; gap: 2rem; flex-direction: row-reverse;\">\n <mat-button-toggle (click)=\"onPerformPatch()\">Patch</mat-button-toggle>\n <mat-button-toggle-group #varTypes=\"matButtonToggleGroup\" (change)=\"onChangeDataType(varTypes.value)\">\n <mat-button-toggle value=\"icons\" checked=\"true\">Icons</mat-button-toggle>\n <mat-button-toggle value=\"labels\" checked=\"false\">Labels</mat-button-toggle>\n <mat-button-toggle value=\"combo\" checked=\"false\">Combo</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <!-- MAIN DEMOS -->\n <div style=\"margin: 1rem; margin-right: 0;\">\n <h3 style=\"margin-bottom: 0;\">Button Toggle Selection - {{ varTypes.value | uppercase }}</h3>\n\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_1.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n <app-button-toggle-input\n [formControl]=\"selectionControl_1\"\n [data]=\"data\"\n [toolTips]=\"tooltip1.checked\"\n [fullWidth]=\"width1.value\"\n [noBorder]=\"!border1.checked\"\n [iconSuffix]=\"suffix1.checked\"\n ></app-button-toggle-input>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_1\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable1 (change)=\"onDisabled_1(disable1.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix1>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip1>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border1 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Single Selection<br>\n ToolTips<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width1=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n </div>\n\n\n <div style=\"margin: 1rem; margin-right: 0;\">\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_2.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n\n <app-button-toggle-input\n [formControl]=\"selectionControl_2\"\n [data]=\"data\"\n [toolTips]=\"tooltip2.checked\"\n toolTipPosition=\"above\"\n [multiple]=\"true\"\n [fullWidth]=\"width2.value\"\n [noBorder]=\"!border2.checked\"\n [iconSuffix]=\"suffix2.checked\"\n ></app-button-toggle-input>\n\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_2\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable2 (change)=\"onDisabled_2(disable2.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix2>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip2>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border2 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Multiple Selection<br>\n ToolTips<br>\n ToolTip Position ABOVE<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width2=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <div style=\"margin-top: .5rem; margin-bottom: 1rem;\">\n <mat-divider></mat-divider>\n </div>\n </div>\n\n</div>\n" }]
|
|
262
|
+
}], ctorParameters: function () { return []; } });
|
|
263
|
+
|
|
264
|
+
class ButtonToggleInputModule {
|
|
265
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
266
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputModule, declarations: [ButtonToggleInputComponent,
|
|
267
|
+
ButtonToggleDemoComponent], imports: [CommonModule,
|
|
268
|
+
FormsModule,
|
|
269
|
+
MatIconModule,
|
|
270
|
+
MatButtonModule,
|
|
271
|
+
MatTooltipModule,
|
|
272
|
+
ReactiveFormsModule,
|
|
273
|
+
MatButtonToggleModule,
|
|
274
|
+
MatSlideToggleModule,
|
|
275
|
+
MatDividerModule], exports: [ButtonToggleInputComponent,
|
|
276
|
+
ButtonToggleDemoComponent] }); }
|
|
277
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputModule, imports: [CommonModule,
|
|
278
|
+
FormsModule,
|
|
279
|
+
MatIconModule,
|
|
280
|
+
MatButtonModule,
|
|
281
|
+
MatTooltipModule,
|
|
282
|
+
ReactiveFormsModule,
|
|
283
|
+
MatButtonToggleModule,
|
|
284
|
+
MatSlideToggleModule,
|
|
285
|
+
MatDividerModule] }); }
|
|
286
|
+
}
|
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonToggleInputModule, decorators: [{
|
|
288
|
+
type: NgModule,
|
|
289
|
+
args: [{
|
|
290
|
+
imports: [
|
|
291
|
+
CommonModule,
|
|
292
|
+
FormsModule,
|
|
293
|
+
MatIconModule,
|
|
294
|
+
MatButtonModule,
|
|
295
|
+
MatTooltipModule,
|
|
296
|
+
ReactiveFormsModule,
|
|
297
|
+
MatButtonToggleModule,
|
|
298
|
+
MatSlideToggleModule,
|
|
299
|
+
MatDividerModule,
|
|
300
|
+
],
|
|
301
|
+
declarations: [
|
|
302
|
+
ButtonToggleInputComponent,
|
|
303
|
+
ButtonToggleDemoComponent
|
|
304
|
+
],
|
|
305
|
+
exports: [
|
|
306
|
+
ButtonToggleInputComponent,
|
|
307
|
+
ButtonToggleDemoComponent
|
|
308
|
+
]
|
|
309
|
+
}]
|
|
310
|
+
}] });
|
|
311
|
+
|
|
312
|
+
/*
|
|
313
|
+
* Public API Surface of button-toggle-input
|
|
314
|
+
*/
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Generated bundle index. Do not edit.
|
|
318
|
+
*/
|
|
319
|
+
|
|
320
|
+
export { ButtonToggleDemoComponent, ButtonToggleInputComponent, ButtonToggleInputModule, ListItem };
|
|
321
|
+
//# sourceMappingURL=button-toggle-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-toggle-input.mjs","sources":["../../../projects/button-toggle-input/src/lib/models/list-item.model.ts","../../../projects/button-toggle-input/src/lib/button-toggle-input.component.ts","../../../projects/button-toggle-input/src/lib/button-toggle-input.component.html","../../../projects/button-toggle-input/src/lib/button-toggle-input-demo/button-toggle-input-demo.component.ts","../../../projects/button-toggle-input/src/lib/button-toggle-input-demo/button-toggle-input-demo.component.html","../../../projects/button-toggle-input/src/lib/button-toggle-input.module.ts","../../../projects/button-toggle-input/src/public-api.ts","../../../projects/button-toggle-input/src/button-toggle-input.ts"],"sourcesContent":["export interface ListItemInterface {\n value: any\n label?: string\n icon?: string\n tootTip?: string\n selected?: string\n disabled?: string\n}\n\nexport class ListItem implements ListItemInterface {\n\n constructor(\n public value = '',\n public label?: string,\n public icon?: string,\n public tootTip?: string,\n public selected?: string,\n public disabled?: string,\n ) {}\n\n static adapt(item?: any): ListItem {\n\n return new ListItem(\n item?.value,\n (item?.label) ? item.label : (item?.icon) ? '' : item?.value,\n item?.icon,\n (item?.tootTip) ? item.tootTip : (item?.label) ? item.label : item?.value,\n item?.selected,\n item?.disabled,\n )\n\n }\n\n}\n\n\n","import { Component, Input, OnDestroy, OnInit, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, FormBuilder, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { ListItem } from './models/list-item.model';\nimport { Subscription } from 'rxjs';\nimport { TooltipPosition } from '@angular/material/tooltip';\n\n@Component({\n selector: 'app-button-toggle-input',\n templateUrl: './button-toggle-input.component.html',\n styleUrls: ['./button-toggle-input.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ButtonToggleInputComponent),\n multi: true\n }\n ]\n})\nexport class ButtonToggleInputComponent implements OnInit, OnDestroy, ControlValueAccessor {\n\n @Input() multiple = false\n\n @Input() toolTips = false\n @Input() toolTipPosition: TooltipPosition = 'above'\n @Input() toolTipShowDelay = 1\n\n @Input() color = \"#333333\";\n\n @Input() lightColor = \"white\";\n @Input() darkColor = \"black\";\n\n private _noBorder: boolean = false;\n\n @Input()\n set noBorder(value: any) {\n this._noBorder = value !== null && `${value}` !== 'false';\n }\n\n get noBorder(): boolean {\n return this._noBorder;\n }\n\n private _iconPrefix: boolean = true;\n\n @Input()\n set iconPrefix(value: any) {\n this._iconPrefix = (value !== undefined) ? value : false\n }\n\n get iconPrefix(): boolean {\n return this._iconPrefix\n }\n\n private _iconSuffix: boolean = false;\n\n @Input()\n set iconSuffix(value: any) {\n this._iconSuffix = (value !== undefined) ? value : false\n this.iconPrefix = !this.iconSuffix\n }\n\n get iconSuffix(): boolean {\n return this._iconSuffix\n }\n\n private _fullWidth: boolean = false;\n\n @Input()\n set fullWidth(value: any) {\n this._fullWidth = value !== null && `${value}` !== 'false';\n }\n\n get fullWidth(): boolean {\n return this._fullWidth\n }\n\n formInitialized = false\n\n isArrayOfStrings = (arr: any[]) => {\n const isArray = Array.isArray(arr) && arr.every(item => typeof item === 'string');\n return (arr.length > 0) ? isArray : false\n }\n\n hasLabels = false\n hasIcons = false\n\n _data: ListItem[] = []\n @Input() set data(value: any[]) {\n\n const isString = this.isArrayOfStrings(value);\n this._data = (isString) ? value.map(item => ListItem.adapt({ value: item, label: item })) : value.map(item => ListItem.adapt(item))\n\n this.hasLabels = this.data.some(item => item['label'])\n this.hasIcons = this.data.some((item) => item[\"icon\"])\n\n }\n\n subscription = new Subscription()\n\n get selected() {\n return this.data.filter(item => item.selected).map(item => item.value)\n }\n\n get hasSelected() {\n return (this.selected.length > 0)\n }\n\n get data() {\n return this._data\n }\n\n sample = \"orange\"\n test = 'red'\n\n fb = inject(FormBuilder)\n\n display = this.fb.control<string|string[]|null>(null)\n\n disabled = false\n\n onChange: any = () => {}\n onTouch: any = () => {}\n\n constructor() { }\n\n ngOnInit() {\n\n this.subscription.add(\n this.display.valueChanges.subscribe(data => this.onChange(data))\n )\n\n }\n\n writeValue(value: string[]){\n\n if(!this.formInitialized) {\n this.display.patchValue(this.selected, { emitEvent: false })\n } else {\n const valuePatch = (value) ? (this.multiple) ? value : value[0] : null\n this.display.patchValue(valuePatch, { emitEvent: false })\n }\n\n this.formInitialized = true\n\n }\n\n registerOnChange(fn: any){\n this.onChange = fn\n }\n\n registerOnTouched(fn: any){\n this.onTouch = fn\n }\n\n setDisabledState(isDisabled: boolean) {\n\n this.disabled = isDisabled\n\n if(this.disabled) {\n this.display.disable()\n } else {\n this.display.enable()\n }\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe()\n }\n\n}\n","<mat-button-toggle-group\n style=\"height: 44px;\"\n [class.stretch]=\"fullWidth\"\n [style.background-color]=\"(noBorder) ? '' : 'white'\"\n [style.border-radius]=\"(noBorder) ? 'none' : '5rem'\"\n [style.border]=\"(noBorder) ? 'none' : ''\"\n [formControl]=\"display\"\n [multiple]=\"multiple\"\n>\n <ng-container *ngFor=\"let item of data;\">\n\n <mat-button-toggle\n [disableRipple]=\"true\"\n color=\"primary\"\n style=\"border-radius: 5rem;\"\n [style.flex]=\"(fullWidth) ? '1' : ''\"\n [style.opacity]=\"disabled ? '0.3' : ''\"\n [style.padding-left]=\"(hasLabels && !fullWidth) ? '.5rem' : ''\"\n [style.padding-right]=\"(hasLabels && !fullWidth)? '.5rem' : ''\"\n [value]=\"item.value\"\n [matTooltip]=\"(toolTips) ? item.tootTip : ''\"\n [matTooltipPosition]=\"toolTipPosition\"\n [matTooltipShowDelay]=\"toolTipShowDelay * 1000\"\n [disabled]=\"item.disabled\"\n >\n <div\n style=\"display: flex; gap: 0.5rem; padding-top: 0.25rem\"\n [style.padding-top]=\"iconSuffix && (hasIcons && hasLabels) ? '' : '.25rem'\">\n <div class=\"icon\" *ngIf=\"hasIcons && iconPrefix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n\n <div class=\"overflow-content\" *ngIf=\"item.label !== ''\">{{ item.label }}</div>\n\n <div class=\"icon\" *ngIf=\"hasIcons && iconSuffix\">\n <mat-icon>{{item.icon}}</mat-icon>\n </div>\n </div>\n\n </mat-button-toggle>\n\n </ng-container>\n</mat-button-toggle-group>\n","import { ChangeDetectionStrategy, Component, OnInit, inject } from '@angular/core';\nimport { FormBuilder } from '@angular/forms';\n\n@Component({\n selector: 'app-button-toggle-demo',\n templateUrl: './button-toggle-input-demo.component.html',\n styleUrls: ['./button-toggle-input-demo.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonToggleDemoComponent implements OnInit {\n\n fb = inject(FormBuilder)\n\n type = 'icons'\n\n data_1 = [\n {id: 1, icon: 'home', value: 'option_1', disabled: true },\n {id: 2, icon: 'layers', value: 'option_2'},\n {id: 3, icon: 'add', value: 'option_3' },\n {id: 3, icon: 'build', value: 'option_4', disabled: true },\n {id: 3, icon: 'list', value: 'option_5', selected: true },\n {id: 3, icon: 'business', value: 'option_6'},\n ]\n\n data_2 = [\n {id: 1, label: 'Home', value: 'option_1', disabled: true },\n {id: 2, label: 'Samples', value: 'option_2' },\n {id: 3, label: 'Demos 1 is here', value: 'option_3' },\n {id: 3, label: 'Demos 2A', value: 'option_4', disabled: true },\n {id: 3, label: 'Demos 2B', value: 'option_5', selected: true },\n {id: 3, label: 'Demos 3', value: 'option_6' },\n ]\n\n data_3 = [\n {id: 1, label: 'Home', icon: 'home', value: 'option_1', disabled: true },\n {id: 2, label: 'Samples', icon: 'layers', value: 'option_2'},\n {id: 3, label: 'Demos 1', icon: 'add', value: 'option_3' },\n {id: 3, label: 'Demos 2A', icon: 'network', value: 'option_4', disabled: true },\n {id: 3, label: 'Demos 2B', icon: 'list', value: 'option_5', selected: true },\n {id: 3, label: 'Demos 3', icon: 'business', value: 'option_6'},\n ]\n\n data: any[] = this.data_1\n\n selectionControl_1 = this.fb.control<any>(null)\n selectionControl_2 = this.fb.control<any>(null)\n\n changeDetection_1 = this.fb.control(true)\n changeDetection_2 = this.fb.control(false)\n\n constructor() { }\n\n ngOnInit() {\n\n this.selectionControl_1.valueChanges.subscribe(data => {\n if(this.changeDetection_1.value) console.log('CHANGE:',data)\n })\n\n this.selectionControl_2.valueChanges.subscribe(data => {\n if(this.changeDetection_2.value) console.log('CHANGE:',data)\n })\n\n }\n\n onPerformPatch() {\n this.selectionControl_1.patchValue(['option_3'])\n this.selectionControl_2.patchValue(['option_3', 'option_5'])\n }\n\n onChangeDataType(type: string) {\n if(type === 'icons') {\n this.data = this.data_1\n } else if(type === 'labels') {\n this.data = this.data_2\n } else {\n this.data = this.data_3\n }\n }\n\n // DISABLE\n onDisabled_1(disable: boolean) {\n\n if(disable) {\n this.selectionControl_1.disable()\n } else {\n this.selectionControl_1.enable()\n }\n\n }\n\n onDisabled_2(disable: boolean) {\n\n if(disable) {\n this.selectionControl_2.disable()\n } else {\n this.selectionControl_2.enable()\n }\n\n }\n\n}\n","<h1 style=\"flex: 1;\">Button Toggle Input</h1>\n\n\n<div style=\"display: flex; flex-direction: column; margin-top: 1rem;\">\n <div style=\"flex:1; text-align: right;\">\n <div style=\"display: flex; gap: 2rem; flex-direction: row-reverse;\">\n <mat-button-toggle (click)=\"onPerformPatch()\">Patch</mat-button-toggle>\n <mat-button-toggle-group #varTypes=\"matButtonToggleGroup\" (change)=\"onChangeDataType(varTypes.value)\">\n <mat-button-toggle value=\"icons\" checked=\"true\">Icons</mat-button-toggle>\n <mat-button-toggle value=\"labels\" checked=\"false\">Labels</mat-button-toggle>\n <mat-button-toggle value=\"combo\" checked=\"false\">Combo</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <!-- MAIN DEMOS -->\n <div style=\"margin: 1rem; margin-right: 0;\">\n <h3 style=\"margin-bottom: 0;\">Button Toggle Selection - {{ varTypes.value | uppercase }}</h3>\n\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_1.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n <app-button-toggle-input\n [formControl]=\"selectionControl_1\"\n [data]=\"data\"\n [toolTips]=\"tooltip1.checked\"\n [fullWidth]=\"width1.value\"\n [noBorder]=\"!border1.checked\"\n [iconSuffix]=\"suffix1.checked\"\n ></app-button-toggle-input>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_1\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable1 (change)=\"onDisabled_1(disable1.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix1>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip1>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border1 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Single Selection<br>\n ToolTips<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width1=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n </div>\n\n\n <div style=\"margin: 1rem; margin-right: 0;\">\n <div style=\"display: flex;\">\n <span style=\"flex:1\"></span>\n <button mat-button (click)=\"selectionControl_2.reset()\">Reset</button>\n </div>\n\n <div style=\"margin-top: 1rem;\">\n\n <app-button-toggle-input\n [formControl]=\"selectionControl_2\"\n [data]=\"data\"\n [toolTips]=\"tooltip2.checked\"\n toolTipPosition=\"above\"\n [multiple]=\"true\"\n [fullWidth]=\"width2.value\"\n [noBorder]=\"!border2.checked\"\n [iconSuffix]=\"suffix2.checked\"\n ></app-button-toggle-input>\n\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <mat-slide-toggle [formControl]=\"changeDetection_2\">Change Detection</mat-slide-toggle>\n <mat-slide-toggle #disable2 (change)=\"onDisabled_2(disable2.checked)\">Disable</mat-slide-toggle>\n <span style=\"flex:1\"></span>\n <mat-slide-toggle #suffix2>Icon Suffix</mat-slide-toggle>\n <mat-slide-toggle #tooltip2>ToolTip</mat-slide-toggle>\n <mat-slide-toggle #border2 checked=\"true\">Border</mat-slide-toggle>\n </div>\n\n <div style=\"display: flex; gap: 2rem; margin-top: 2rem;\">\n <div>\n Multiple Selection<br>\n ToolTips<br>\n ToolTip Position ABOVE<br>\n </div>\n <span style=\"flex:1\"></span>\n <div>\n <mat-button-toggle-group #width2=\"matButtonToggleGroup\">\n <mat-button-toggle value=\"false\" checked=\"false\">Normal Width</mat-button-toggle>\n <mat-button-toggle value=\"true\" checked=\"true\">Full Width</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n\n <div style=\"margin-top: .5rem; margin-bottom: 1rem;\">\n <mat-divider></mat-divider>\n </div>\n </div>\n\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { ButtonToggleInputComponent } from './button-toggle-input.component';\nimport { ButtonToggleDemoComponent } from './button-toggle-input-demo/button-toggle-input-demo.component';\n\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n MatIconModule,\n MatButtonModule,\n MatTooltipModule,\n ReactiveFormsModule,\n MatButtonToggleModule,\n MatSlideToggleModule,\n MatDividerModule,\n ],\n declarations: [\n ButtonToggleInputComponent,\n ButtonToggleDemoComponent\n ],\n exports: [\n ButtonToggleInputComponent,\n ButtonToggleDemoComponent\n ]\n})\nexport class ButtonToggleInputModule { }\n","/*\n * Public API Surface of button-toggle-input\n */\n\nexport * from './lib/button-toggle-input-demo/button-toggle-input-demo.component';\n\nexport * from './lib/button-toggle-input.module';\nexport * from './lib/button-toggle-input.component';\n\nexport * from './lib/models/list-item.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i3","i4","i5","i6.ButtonToggleInputComponent","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;MASa,QAAQ,CAAA;IAEnB,WACS,CAAA,KAAA,GAAQ,EAAE,EACV,KAAc,EACd,IAAa,EACb,OAAgB,EAChB,QAAiB,EACjB,QAAiB,EAAA;QALjB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAK;QACV,IAAK,CAAA,KAAA,GAAL,KAAK,CAAS;QACd,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAS;QACb,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS;QAChB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAS;QACjB,IAAQ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A,YAAY,EAAE;wBACZ,0BAA0B;wBAC1B,yBAAyB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,0BAA0B;wBAC1B,yBAAyB;AAC1B,qBAAA;AACF,iBAAA,CAAA;;;ACnCD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormBuilder } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ButtonToggleDemoComponent implements OnInit {
|
|
5
|
+
fb: FormBuilder;
|
|
6
|
+
type: string;
|
|
7
|
+
data_1: ({
|
|
8
|
+
id: number;
|
|
9
|
+
icon: string;
|
|
10
|
+
value: string;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
selected?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
id: number;
|
|
15
|
+
icon: string;
|
|
16
|
+
value: string;
|
|
17
|
+
disabled?: undefined;
|
|
18
|
+
selected?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
id: number;
|
|
21
|
+
icon: string;
|
|
22
|
+
value: string;
|
|
23
|
+
selected: boolean;
|
|
24
|
+
disabled?: undefined;
|
|
25
|
+
})[];
|
|
26
|
+
data_2: ({
|
|
27
|
+
id: number;
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
selected?: undefined;
|
|
32
|
+
} | {
|
|
33
|
+
id: number;
|
|
34
|
+
label: string;
|
|
35
|
+
value: string;
|
|
36
|
+
disabled?: undefined;
|
|
37
|
+
selected?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
id: number;
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
selected: boolean;
|
|
43
|
+
disabled?: undefined;
|
|
44
|
+
})[];
|
|
45
|
+
data_3: ({
|
|
46
|
+
id: number;
|
|
47
|
+
label: string;
|
|
48
|
+
icon: string;
|
|
49
|
+
value: string;
|
|
50
|
+
disabled: boolean;
|
|
51
|
+
selected?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
id: number;
|
|
54
|
+
label: string;
|
|
55
|
+
icon: string;
|
|
56
|
+
value: string;
|
|
57
|
+
disabled?: undefined;
|
|
58
|
+
selected?: undefined;
|
|
59
|
+
} | {
|
|
60
|
+
id: number;
|
|
61
|
+
label: string;
|
|
62
|
+
icon: string;
|
|
63
|
+
value: string;
|
|
64
|
+
selected: boolean;
|
|
65
|
+
disabled?: undefined;
|
|
66
|
+
})[];
|
|
67
|
+
data: any[];
|
|
68
|
+
selectionControl_1: import("@angular/forms").FormControl<any>;
|
|
69
|
+
selectionControl_2: import("@angular/forms").FormControl<any>;
|
|
70
|
+
changeDetection_1: import("@angular/forms").FormControl<boolean | null>;
|
|
71
|
+
changeDetection_2: import("@angular/forms").FormControl<boolean | null>;
|
|
72
|
+
constructor();
|
|
73
|
+
ngOnInit(): void;
|
|
74
|
+
onPerformPatch(): void;
|
|
75
|
+
onChangeDataType(type: string): void;
|
|
76
|
+
onDisabled_1(disable: boolean): void;
|
|
77
|
+
onDisabled_2(disable: boolean): void;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonToggleDemoComponent, never>;
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonToggleDemoComponent, "app-button-toggle-demo", never, {}, {}, never, never, false, never>;
|
|
80
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, FormBuilder } from '@angular/forms';
|
|
3
|
+
import { ListItem } from './models/list-item.model';
|
|
4
|
+
import { Subscription } from 'rxjs';
|
|
5
|
+
import { TooltipPosition } from '@angular/material/tooltip';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ButtonToggleInputComponent implements OnInit, OnDestroy, ControlValueAccessor {
|
|
8
|
+
multiple: boolean;
|
|
9
|
+
toolTips: boolean;
|
|
10
|
+
toolTipPosition: TooltipPosition;
|
|
11
|
+
toolTipShowDelay: number;
|
|
12
|
+
color: string;
|
|
13
|
+
lightColor: string;
|
|
14
|
+
darkColor: string;
|
|
15
|
+
private _noBorder;
|
|
16
|
+
set noBorder(value: any);
|
|
17
|
+
get noBorder(): boolean;
|
|
18
|
+
private _iconPrefix;
|
|
19
|
+
set iconPrefix(value: any);
|
|
20
|
+
get iconPrefix(): boolean;
|
|
21
|
+
private _iconSuffix;
|
|
22
|
+
set iconSuffix(value: any);
|
|
23
|
+
get iconSuffix(): boolean;
|
|
24
|
+
private _fullWidth;
|
|
25
|
+
set fullWidth(value: any);
|
|
26
|
+
get fullWidth(): boolean;
|
|
27
|
+
formInitialized: boolean;
|
|
28
|
+
isArrayOfStrings: (arr: any[]) => boolean;
|
|
29
|
+
hasLabels: boolean;
|
|
30
|
+
hasIcons: boolean;
|
|
31
|
+
_data: ListItem[];
|
|
32
|
+
set data(value: any[]);
|
|
33
|
+
subscription: Subscription;
|
|
34
|
+
get selected(): any[];
|
|
35
|
+
get hasSelected(): boolean;
|
|
36
|
+
get data(): any[];
|
|
37
|
+
sample: string;
|
|
38
|
+
test: string;
|
|
39
|
+
fb: FormBuilder;
|
|
40
|
+
display: import("@angular/forms").FormControl<string | string[] | null>;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
onChange: any;
|
|
43
|
+
onTouch: any;
|
|
44
|
+
constructor();
|
|
45
|
+
ngOnInit(): void;
|
|
46
|
+
writeValue(value: string[]): void;
|
|
47
|
+
registerOnChange(fn: any): void;
|
|
48
|
+
registerOnTouched(fn: any): void;
|
|
49
|
+
setDisabledState(isDisabled: boolean): void;
|
|
50
|
+
ngOnDestroy(): void;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonToggleInputComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonToggleInputComponent, "app-button-toggle-input", never, { "multiple": { "alias": "multiple"; "required": false; }; "toolTips": { "alias": "toolTips"; "required": false; }; "toolTipPosition": { "alias": "toolTipPosition"; "required": false; }; "toolTipShowDelay": { "alias": "toolTipShowDelay"; "required": false; }; "color": { "alias": "color"; "required": false; }; "lightColor": { "alias": "lightColor"; "required": false; }; "darkColor": { "alias": "darkColor"; "required": false; }; "noBorder": { "alias": "noBorder"; "required": false; }; "iconPrefix": { "alias": "iconPrefix"; "required": false; }; "iconSuffix": { "alias": "iconSuffix"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, {}, never, never, false, never>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./button-toggle-input.component";
|
|
3
|
+
import * as i2 from "./button-toggle-input-demo/button-toggle-input-demo.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
6
|
+
import * as i5 from "@angular/material/icon";
|
|
7
|
+
import * as i6 from "@angular/material/button";
|
|
8
|
+
import * as i7 from "@angular/material/tooltip";
|
|
9
|
+
import * as i8 from "@angular/material/button-toggle";
|
|
10
|
+
import * as i9 from "@angular/material/slide-toggle";
|
|
11
|
+
import * as i10 from "@angular/material/divider";
|
|
12
|
+
export declare class ButtonToggleInputModule {
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonToggleInputModule, never>;
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonToggleInputModule, [typeof i1.ButtonToggleInputComponent, typeof i2.ButtonToggleDemoComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.MatIconModule, typeof i6.MatButtonModule, typeof i7.MatTooltipModule, typeof i4.ReactiveFormsModule, typeof i8.MatButtonToggleModule, typeof i9.MatSlideToggleModule, typeof i10.MatDividerModule], [typeof i1.ButtonToggleInputComponent, typeof i2.ButtonToggleDemoComponent]>;
|
|
15
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ButtonToggleInputModule>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ListItemInterface {
|
|
2
|
+
value: any;
|
|
3
|
+
label?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
tootTip?: string;
|
|
6
|
+
selected?: string;
|
|
7
|
+
disabled?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class ListItem implements ListItemInterface {
|
|
10
|
+
value: string;
|
|
11
|
+
label?: string | undefined;
|
|
12
|
+
icon?: string | undefined;
|
|
13
|
+
tootTip?: string | undefined;
|
|
14
|
+
selected?: string | undefined;
|
|
15
|
+
disabled?: string | undefined;
|
|
16
|
+
constructor(value?: string, label?: string | undefined, icon?: string | undefined, tootTip?: string | undefined, selected?: string | undefined, disabled?: string | undefined);
|
|
17
|
+
static adapt(item?: any): ListItem;
|
|
18
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "button-toggle-input",
|
|
3
|
+
"version": "15.0.3",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^15.2.0",
|
|
6
|
+
"@angular/core": "^15.2.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
13
|
+
"dest": "../../dist/button-toggle-input",
|
|
14
|
+
"lib": {
|
|
15
|
+
"entryFile": "src/public-api.ts"
|
|
16
|
+
},
|
|
17
|
+
"module": "fesm2022/button-toggle-input.mjs",
|
|
18
|
+
"typings": "index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
"./package.json": {
|
|
21
|
+
"default": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./index.d.ts",
|
|
25
|
+
"esm2022": "./esm2022/button-toggle-input.mjs",
|
|
26
|
+
"esm": "./esm2022/button-toggle-input.mjs",
|
|
27
|
+
"default": "./fesm2022/button-toggle-input.mjs"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
package/public-api.d.ts
ADDED