@bravura/ui 2.0.1 → 2.1.0
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/CHANGELOG.md +8 -0
- package/esm2020/decimal-input/decimal-input.directive.mjs +3 -2
- package/esm2020/panel/bravura-ui-panel.mjs +5 -0
- package/esm2020/panel/panel.component.mjs +64 -0
- package/esm2020/panel/panel.module.mjs +20 -0
- package/esm2020/panel/public-api.mjs +2 -0
- package/fesm2015/bravura-ui-decimal-input.mjs +2 -1
- package/fesm2015/bravura-ui-decimal-input.mjs.map +1 -1
- package/fesm2015/bravura-ui-panel.mjs +87 -0
- package/fesm2015/bravura-ui-panel.mjs.map +1 -0
- package/fesm2020/bravura-ui-decimal-input.mjs +2 -1
- package/fesm2020/bravura-ui-decimal-input.mjs.map +1 -1
- package/fesm2020/bravura-ui-panel.mjs +87 -0
- package/fesm2020/bravura-ui-panel.mjs.map +1 -0
- package/package.json +9 -1
- package/panel/index.d.ts +5 -0
- package/panel/panel.component.d.ts +46 -0
- package/panel/panel.module.d.ts +11 -0
- package/panel/public-api.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change history
|
|
2
2
|
|
|
3
|
+
## 2.1.0 (2022-09-01)
|
|
4
|
+
|
|
5
|
+
* build(storybook): switch to new builders ([3145b86](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/3145b86))
|
|
6
|
+
* docs(storybook): fix stepper stories ([dcba870](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/dcba870))
|
|
7
|
+
* feat(panel): add a new panel component based on `mat-card` ([b73835c](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/b73835c))
|
|
8
|
+
* test(decimal-input): add tests ([2f33d5f](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/2f33d5f))
|
|
9
|
+
* fix(decimal-input): empty value should not be represented as 0 ([dcbf222](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/dcbf222))
|
|
10
|
+
|
|
3
11
|
## <small>2.0.1 (2022-08-18)</small>
|
|
4
12
|
|
|
5
13
|
* fix(currency-input): value should start being formatted ([e28b58d](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/e28b58d))
|
|
@@ -35,7 +35,8 @@ export class DecimalInputDirective {
|
|
|
35
35
|
const newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);
|
|
36
36
|
this._renderer.setProperty(this._el.nativeElement, 'value', newValue);
|
|
37
37
|
}
|
|
38
|
-
this.
|
|
38
|
+
const resolvedValue = this._el.nativeElement.value;
|
|
39
|
+
this.change(resolvedValue === '' || resolvedValue === null || resolvedValue === undefined ? null : Number(resolvedValue));
|
|
39
40
|
}
|
|
40
41
|
onKeypress(evt) {
|
|
41
42
|
const target = evt.target;
|
|
@@ -122,4 +123,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
122
123
|
type: HostListener,
|
|
123
124
|
args: ['blur']
|
|
124
125
|
}] } });
|
|
125
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
126
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjaW1hbC1pbnB1dC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy91aS9kZWNpbWFsLWlucHV0L2RlY2ltYWwtaW5wdXQuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUM5QyxPQUFPLEVBQ04sU0FBUyxFQUVULFVBQVUsRUFDVixXQUFXLEVBQ1gsWUFBWSxFQUNaLEtBQUssRUFHTCxJQUFJLEVBQ0osTUFBTSxlQUFlLENBQUM7QUFDdkIs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* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJhdnVyYS11aS1wYW5lbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3VpL3BhbmVsL2JyYXZ1cmEtdWktcGFuZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/material/card";
|
|
4
|
+
/**
|
|
5
|
+
* A `bui-panel` consists of a `mat-card` and a tinted backdrop.
|
|
6
|
+
*
|
|
7
|
+
* Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.
|
|
8
|
+
* The backdrop is nearly transparent, blending the theme palette `color`
|
|
9
|
+
* and the effective background color of the DOM ancestors.
|
|
10
|
+
*
|
|
11
|
+
* `bui-panel` supports all the content child directives of `mat-card`.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export class PanelComponent {
|
|
15
|
+
constructor(_cd) {
|
|
16
|
+
this._cd = _cd;
|
|
17
|
+
this._color = 'primary';
|
|
18
|
+
this._appearance = 'flat';
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* This property defines the background (shaded) and border colors of the panel
|
|
22
|
+
*/
|
|
23
|
+
get color() {
|
|
24
|
+
return this._color;
|
|
25
|
+
}
|
|
26
|
+
set color(value) {
|
|
27
|
+
this._color = value;
|
|
28
|
+
this._cd.markForCheck();
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.
|
|
32
|
+
*
|
|
33
|
+
* This property can change the default appearance to
|
|
34
|
+
*
|
|
35
|
+
* * `raised` - the original `mat-card` default
|
|
36
|
+
* * `outline` - a `mat-card` with borders
|
|
37
|
+
* * `flat` - no border or elevation
|
|
38
|
+
*/
|
|
39
|
+
get appearance() {
|
|
40
|
+
return this._appearance;
|
|
41
|
+
}
|
|
42
|
+
set appearance(value) {
|
|
43
|
+
this._appearance = value;
|
|
44
|
+
this._cd.markForCheck();
|
|
45
|
+
}
|
|
46
|
+
ngOnInit() { }
|
|
47
|
+
}
|
|
48
|
+
PanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
PanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: PanelComponent, selector: "bui-panel", inputs: { backdropClass: "backdropClass", cardClass: "cardClass", color: "color", appearance: "appearance" }, host: { classAttribute: "bui-panel bui-host" }, ngImport: i0, template: "<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n", styles: [":host{position:relative}:host .bui-panel-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:4px;opacity:.1}:host .mat-card{background-color:transparent}:host .bui-panel-border{border-width:1px;border-style:solid}\n"], dependencies: [{ kind: "component", type: i1.MatCard, selector: "mat-card", exportAs: ["matCard"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelComponent, decorators: [{
|
|
51
|
+
type: Component,
|
|
52
|
+
args: [{ selector: 'bui-panel', host: {
|
|
53
|
+
class: 'bui-panel bui-host'
|
|
54
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n", styles: [":host{position:relative}:host .bui-panel-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:4px;opacity:.1}:host .mat-card{background-color:transparent}:host .bui-panel-border{border-width:1px;border-style:solid}\n"] }]
|
|
55
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { backdropClass: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], cardClass: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], color: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], appearance: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}] } });
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFuZWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvcGFuZWwvcGFuZWwuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvcGFuZWwvcGFuZWwuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyx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i16IGJ1aS1wYW5lbC1ib3JkZXInIDogJydcblx0fX1cIlxuPlxuXHQ8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG48L21hdC1jYXJkPlxuIl19
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { PanelComponent } from './panel.component';
|
|
4
|
+
import { MatCardModule } from '@angular/material/card';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class PanelModule {
|
|
7
|
+
}
|
|
8
|
+
PanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
+
PanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, declarations: [PanelComponent], imports: [CommonModule, MatCardModule], exports: [MatCardModule, PanelComponent] });
|
|
10
|
+
PanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, imports: [CommonModule, MatCardModule, MatCardModule] });
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, decorators: [{
|
|
12
|
+
type: NgModule,
|
|
13
|
+
args: [{
|
|
14
|
+
declarations: [PanelComponent],
|
|
15
|
+
imports: [CommonModule, MatCardModule],
|
|
16
|
+
exports: [MatCardModule, PanelComponent]
|
|
17
|
+
}]
|
|
18
|
+
}] });
|
|
19
|
+
export { PanelComponent };
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFuZWwubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvcGFuZWwvcGFuZWwubW9kd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W50XSxcblx0aW1wb3J0czogW0NvbW1vbk1vZHVsZSwgTWF0Q2FyZE1vZHVsZV0sXG5cdGV4cG9ydHM6IFtNYXRDYXJkTW9kdWxlLCBQYW5lbENvbXBvbmVudF1cbn0pXG5leHBvcnQgY2xhc3MgUGFuZWxNb2R1bGUge31cblxuZXhwb3J0IHsgUGFuZWxDb21wb25lbnQgfTtcbiJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './panel.module';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3VpL3BhbmVsL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQkFBZ0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vcGFuZWwubW9kdWxlJztcbiJdfQ==
|
|
@@ -36,7 +36,8 @@ class DecimalInputDirective {
|
|
|
36
36
|
const newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);
|
|
37
37
|
this._renderer.setProperty(this._el.nativeElement, 'value', newValue);
|
|
38
38
|
}
|
|
39
|
-
this.
|
|
39
|
+
const resolvedValue = this._el.nativeElement.value;
|
|
40
|
+
this.change(resolvedValue === '' || resolvedValue === null || resolvedValue === undefined ? null : Number(resolvedValue));
|
|
40
41
|
}
|
|
41
42
|
onKeypress(evt) {
|
|
42
43
|
const target = evt.target;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-decimal-input.mjs","sources":["../../../projects/ui/decimal-input/decimal-input.directive.ts","../../../projects/ui/decimal-input/decimal-input.module.ts","../../../projects/ui/decimal-input/bravura-ui-decimal-input.ts"],"sourcesContent":["import { DecimalPipe } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tforwardRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tOnChanges,\n\tRenderer2,\n\tSelf\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { noop } from 'rxjs';\n\n/* tslint:disable:no-empty */\nexport const noop_consumer = (_: any) => {};\n\n/**\n * This directive will enhance an input element to format the numbers entered to a decimal amount.\n */\n@Directive({\n\tselector: 'input[buiDecimalInput]',\n\tproviders: [\n\t\tDecimalPipe,\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }\n\t]\n})\nexport class DecimalInputDirective implements OnChanges, ControlValueAccessor {\n\t/**\n\t * number of decimal places allowed\n\t */\n\t@Input()\n\tbuiDecimalInput: number = 2;\n\n\t@HostBinding('placeholder')\n\tprivate placeholder: string = '';\n\n\t@HostBinding('autocomplete')\n\tprivate autocomplete = 'off';\n\n\t@HostBinding('type')\n\tprivate type = 'number';\n\n\t@HostBinding('attr.inputmode')\n\tprivate inputMode = 'decimal';\n\n\tprivate change = noop_consumer;\n\tprivate onTouch = noop;\n\n\tconstructor(@Self() private _el: ElementRef<HTMLInputElement>, private _renderer: Renderer2) {}\n\n\tngOnChanges(): void {\n\t\tthis.buiDecimalInput = this.buiDecimalInput || 2;\n\t\tthis.onInput();\n\t}\n\n\t@HostListener('input')\n\tonInput() {\n\t\tconst value = this._el.nativeElement.value;\n\t\tconst decimalPart = value.split('.')[1];\n\n\t\tif (decimalPart && decimalPart.length > this.buiDecimalInput) {\n\t\t\tconst indexOfPeriod = value.indexOf('.');\n\t\t\tconst newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);\n\t\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t\t}\n\t\
|
|
1
|
+
{"version":3,"file":"bravura-ui-decimal-input.mjs","sources":["../../../projects/ui/decimal-input/decimal-input.directive.ts","../../../projects/ui/decimal-input/decimal-input.module.ts","../../../projects/ui/decimal-input/bravura-ui-decimal-input.ts"],"sourcesContent":["import { DecimalPipe } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tforwardRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tOnChanges,\n\tRenderer2,\n\tSelf\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { noop } from 'rxjs';\n\n/* tslint:disable:no-empty */\nexport const noop_consumer = (_: any) => {};\n\n/**\n * This directive will enhance an input element to format the numbers entered to a decimal amount.\n */\n@Directive({\n\tselector: 'input[buiDecimalInput]',\n\tproviders: [\n\t\tDecimalPipe,\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }\n\t]\n})\nexport class DecimalInputDirective implements OnChanges, ControlValueAccessor {\n\t/**\n\t * number of decimal places allowed\n\t */\n\t@Input()\n\tbuiDecimalInput: number = 2;\n\n\t@HostBinding('placeholder')\n\tprivate placeholder: string = '';\n\n\t@HostBinding('autocomplete')\n\tprivate autocomplete = 'off';\n\n\t@HostBinding('type')\n\tprivate type = 'number';\n\n\t@HostBinding('attr.inputmode')\n\tprivate inputMode = 'decimal';\n\n\tprivate change = noop_consumer;\n\tprivate onTouch = noop;\n\n\tconstructor(@Self() private _el: ElementRef<HTMLInputElement>, private _renderer: Renderer2) {}\n\n\tngOnChanges(): void {\n\t\tthis.buiDecimalInput = this.buiDecimalInput || 2;\n\t\tthis.onInput();\n\t}\n\n\t@HostListener('input')\n\tonInput() {\n\t\tconst value = this._el.nativeElement.value;\n\n\t\tconst decimalPart = value.split('.')[1];\n\n\t\tif (decimalPart && decimalPart.length > this.buiDecimalInput) {\n\t\t\tconst indexOfPeriod = value.indexOf('.');\n\t\t\tconst newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);\n\t\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t\t}\n\t\tconst resolvedValue = this._el.nativeElement.value;\n\t\tthis.change(\n\t\t\tresolvedValue === '' || resolvedValue === null || resolvedValue === undefined ? null : Number(resolvedValue)\n\t\t);\n\t}\n\n\t@HostListener('keypress', ['$event'])\n\tonKeypress(evt: KeyboardEvent) {\n\t\tconst target = evt.target as HTMLInputElement;\n\t\tconst value = target.value;\n\t\tconst isSpace = evt.key === ' ';\n\n\t\tif (\n\t\t\tisSpace ||\n\t\t\t(!['.', '-'].includes(evt.key) && isNaN(Number(evt.key))) ||\n\t\t\t(evt.key === '.' && value.indexOf('.') > 0)\n\t\t) {\n\t\t\tevt.preventDefault();\n\t\t}\n\t}\n\n\t@HostListener('focus')\n\tonFocus() {}\n\n\t@HostListener('blur')\n\tonblur() {\n\t\tthis.onTouch();\n\t\tthis._resetDecimalPlaces();\n\t}\n\n\twriteValue(value: any) {\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', value);\n\t\tthis._resetDecimalPlaces();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.change = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouch = fn;\n\t}\n\n\tprivate _resetDecimalPlaces() {\n\t\tconst value = this._el.nativeElement.value;\n\t\tif (value === '' || value === null || value === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tconst splitValues = value.split('.');\n\t\tlet newValue = '';\n\t\tif (splitValues[1] && splitValues[1].length > this.buiDecimalInput) {\n\t\t\tnewValue = value.substring(0, splitValues[0].length + 1 + this.buiDecimalInput);\n\t\t} else {\n\t\t\tthis.buiDecimalInput = this.buiDecimalInput < 0 ? 0 : this.buiDecimalInput;\n\t\t\tnewValue = Number(value).toFixed(this.buiDecimalInput);\n\t\t}\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DecimalInputDirective } from './decimal-input.directive';\n\n@NgModule({\n\tdeclarations: [DecimalInputDirective],\n\timports: [CommonModule],\n\texports: [DecimalInputDirective]\n})\nexport class D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,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/material/card';
|
|
5
|
+
import { MatCardModule } from '@angular/material/card';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A `bui-panel` consists of a `mat-card` and a tinted backdrop.
|
|
9
|
+
*
|
|
10
|
+
* Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.
|
|
11
|
+
* The backdrop is nearly transparent, blending the theme palette `color`
|
|
12
|
+
* and the effective background color of the DOM ancestors.
|
|
13
|
+
*
|
|
14
|
+
* `bui-panel` supports all the content child directives of `mat-card`.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
class PanelComponent {
|
|
18
|
+
constructor(_cd) {
|
|
19
|
+
this._cd = _cd;
|
|
20
|
+
this._color = 'primary';
|
|
21
|
+
this._appearance = 'flat';
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* This property defines the background (shaded) and border colors of the panel
|
|
25
|
+
*/
|
|
26
|
+
get color() {
|
|
27
|
+
return this._color;
|
|
28
|
+
}
|
|
29
|
+
set color(value) {
|
|
30
|
+
this._color = value;
|
|
31
|
+
this._cd.markForCheck();
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.
|
|
35
|
+
*
|
|
36
|
+
* This property can change the default appearance to
|
|
37
|
+
*
|
|
38
|
+
* * `raised` - the original `mat-card` default
|
|
39
|
+
* * `outline` - a `mat-card` with borders
|
|
40
|
+
* * `flat` - no border or elevation
|
|
41
|
+
*/
|
|
42
|
+
get appearance() {
|
|
43
|
+
return this._appearance;
|
|
44
|
+
}
|
|
45
|
+
set appearance(value) {
|
|
46
|
+
this._appearance = value;
|
|
47
|
+
this._cd.markForCheck();
|
|
48
|
+
}
|
|
49
|
+
ngOnInit() { }
|
|
50
|
+
}
|
|
51
|
+
PanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
PanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: PanelComponent, selector: "bui-panel", inputs: { backdropClass: "backdropClass", cardClass: "cardClass", color: "color", appearance: "appearance" }, host: { classAttribute: "bui-panel bui-host" }, ngImport: i0, template: "<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n", styles: [":host{position:relative}:host .bui-panel-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:4px;opacity:.1}:host .mat-card{background-color:transparent}:host .bui-panel-border{border-width:1px;border-style:solid}\n"], dependencies: [{ kind: "component", type: i1.MatCard, selector: "mat-card", exportAs: ["matCard"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelComponent, decorators: [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{ selector: 'bui-panel', host: {
|
|
56
|
+
class: 'bui-panel bui-host'
|
|
57
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n", styles: [":host{position:relative}:host .bui-panel-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:4px;opacity:.1}:host .mat-card{background-color:transparent}:host .bui-panel-border{border-width:1px;border-style:solid}\n"] }]
|
|
58
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { backdropClass: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], cardClass: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], color: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], appearance: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}] } });
|
|
67
|
+
|
|
68
|
+
class PanelModule {
|
|
69
|
+
}
|
|
70
|
+
PanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
71
|
+
PanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, declarations: [PanelComponent], imports: [CommonModule, MatCardModule], exports: [MatCardModule, PanelComponent] });
|
|
72
|
+
PanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, imports: [CommonModule, MatCardModule, MatCardModule] });
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, decorators: [{
|
|
74
|
+
type: NgModule,
|
|
75
|
+
args: [{
|
|
76
|
+
declarations: [PanelComponent],
|
|
77
|
+
imports: [CommonModule, MatCardModule],
|
|
78
|
+
exports: [MatCardModule, PanelComponent]
|
|
79
|
+
}]
|
|
80
|
+
}] });
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Generated bundle index. Do not edit.
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
export { PanelComponent, PanelModule };
|
|
87
|
+
//# sourceMappingURL=bravura-ui-panel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bravura-ui-panel.mjs","sources":["../../../projects/ui/panel/panel.component.ts","../../../projects/ui/panel/panel.component.html","../../../projects/ui/panel/panel.module.ts","../../../projects/ui/panel/bravura-ui-panel.ts"],"sourcesContent":["import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\n\n/**\n * A `bui-panel` consists of a `mat-card` and a tinted backdrop.\n *\n * Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.\n * The backdrop is nearly transparent, blending the theme palette `color`\n * and the effective background color of the DOM ancestors.\n *\n * `bui-panel` supports all the content child directives of `mat-card`.\n *\n */\n@Component({\n\tselector: 'bui-panel',\n\ttemplateUrl: './panel.component.html',\n\tstyleUrls: ['./panel.component.scss'],\n\thost: {\n\t\tclass: 'bui-panel bui-host'\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PanelComponent implements OnInit {\n\t/**\n\t * Additional style classes on the tinted backdrop element.\n\t */\n\t@Input()\n\tbackdropClass?: string;\n\n\t/**\n\t * Additional style classes on the `<mat-card>` element.\n\t */\n\t@Input()\n\tcardClass?: string;\n\n\t/**\n\t * This property defines the background (shaded) and border colors of the panel\n\t */\n\t@Input()\n\tget color(): ThemePalette {\n\t\treturn this._color;\n\t}\n\tset color(value: ThemePalette) {\n\t\tthis._color = value;\n\t\tthis._cd.markForCheck();\n\t}\n\n\t/**\n\t * In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.\n\t *\n\t * This property can change the default appearance to\n\t *\n\t * * `raised` - the original `mat-card` default\n\t * * `outline` - a `mat-card` with borders\n\t * * `flat` - no border or elevation\n\t */\n\t@Input()\n\tget appearance(): 'outlined' | 'raised' | 'flat' {\n\t\treturn this._appearance;\n\t}\n\tset appearance(value: 'outlined' | 'raised' | 'flat') {\n\t\tthis._appearance = value;\n\t\tthis._cd.markForCheck();\n\t}\n\n\tprivate _color: ThemePalette = 'primary';\n\n\tprivate _appearance: 'outlined' | 'raised' | 'flat' = 'flat';\n\n\tconstructor(private _cd: ChangeDetectorRef) {}\n\n\tngOnInit(): void {}\n}\n","<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PanelComponent } from './panel.component';\nimport { MatCardModule } from '@angular/material/card';\n\n@NgModule({\n\tdeclarations: [PanelComponent],\n\timports: [CommonModule, MatCardModule],\n\texports: [MatCardModule, PanelComponent]\n})\nexport class PanelModule {}\n\nexport { PanelComponent };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAGA;;;;;;;;;AASG;MAUU,cAAc,CAAA;AA+C1B,IAAA,WAAA,CAAoB,GAAsB,EAAA;AAAtB,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AAJlC,QAAA,IAAM,CAAA,MAAA,GAAiB,SAAS,CAAC;AAEjC,QAAA,IAAW,CAAA,WAAA,GAAmC,MAAM,CAAC;KAEf;AAlC9C;;AAEG;AACH,IAAA,IACI,KAAK,GAAA;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;KACnB;IACD,IAAI,KAAK,CAAC,KAAmB,EAAA;AAC5B,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;AACpB,QAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;KACxB;AAED;;;;;;;;AAQG;A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M,WAAW,CAAA;;wGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAX,WAAW,EAAA,YAAA,EAAA,CAJR,cAAc,CACnB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CAC3B,aAAa,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;AAE3B,WAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAHb,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAC3B,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,cAAc,CAAC;AAC9B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;AACtC,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;iBACxC,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -36,7 +36,8 @@ class DecimalInputDirective {
|
|
|
36
36
|
const newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);
|
|
37
37
|
this._renderer.setProperty(this._el.nativeElement, 'value', newValue);
|
|
38
38
|
}
|
|
39
|
-
this.
|
|
39
|
+
const resolvedValue = this._el.nativeElement.value;
|
|
40
|
+
this.change(resolvedValue === '' || resolvedValue === null || resolvedValue === undefined ? null : Number(resolvedValue));
|
|
40
41
|
}
|
|
41
42
|
onKeypress(evt) {
|
|
42
43
|
const target = evt.target;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-decimal-input.mjs","sources":["../../../projects/ui/decimal-input/decimal-input.directive.ts","../../../projects/ui/decimal-input/decimal-input.module.ts","../../../projects/ui/decimal-input/bravura-ui-decimal-input.ts"],"sourcesContent":["import { DecimalPipe } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tforwardRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tOnChanges,\n\tRenderer2,\n\tSelf\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { noop } from 'rxjs';\n\n/* tslint:disable:no-empty */\nexport const noop_consumer = (_: any) => {};\n\n/**\n * This directive will enhance an input element to format the numbers entered to a decimal amount.\n */\n@Directive({\n\tselector: 'input[buiDecimalInput]',\n\tproviders: [\n\t\tDecimalPipe,\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }\n\t]\n})\nexport class DecimalInputDirective implements OnChanges, ControlValueAccessor {\n\t/**\n\t * number of decimal places allowed\n\t */\n\t@Input()\n\tbuiDecimalInput: number = 2;\n\n\t@HostBinding('placeholder')\n\tprivate placeholder: string = '';\n\n\t@HostBinding('autocomplete')\n\tprivate autocomplete = 'off';\n\n\t@HostBinding('type')\n\tprivate type = 'number';\n\n\t@HostBinding('attr.inputmode')\n\tprivate inputMode = 'decimal';\n\n\tprivate change = noop_consumer;\n\tprivate onTouch = noop;\n\n\tconstructor(@Self() private _el: ElementRef<HTMLInputElement>, private _renderer: Renderer2) {}\n\n\tngOnChanges(): void {\n\t\tthis.buiDecimalInput = this.buiDecimalInput || 2;\n\t\tthis.onInput();\n\t}\n\n\t@HostListener('input')\n\tonInput() {\n\t\tconst value = this._el.nativeElement.value;\n\t\tconst decimalPart = value.split('.')[1];\n\n\t\tif (decimalPart && decimalPart.length > this.buiDecimalInput) {\n\t\t\tconst indexOfPeriod = value.indexOf('.');\n\t\t\tconst newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);\n\t\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t\t}\n\t\
|
|
1
|
+
{"version":3,"file":"bravura-ui-decimal-input.mjs","sources":["../../../projects/ui/decimal-input/decimal-input.directive.ts","../../../projects/ui/decimal-input/decimal-input.module.ts","../../../projects/ui/decimal-input/bravura-ui-decimal-input.ts"],"sourcesContent":["import { DecimalPipe } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tforwardRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tOnChanges,\n\tRenderer2,\n\tSelf\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { noop } from 'rxjs';\n\n/* tslint:disable:no-empty */\nexport const noop_consumer = (_: any) => {};\n\n/**\n * This directive will enhance an input element to format the numbers entered to a decimal amount.\n */\n@Directive({\n\tselector: 'input[buiDecimalInput]',\n\tproviders: [\n\t\tDecimalPipe,\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }\n\t]\n})\nexport class DecimalInputDirective implements OnChanges, ControlValueAccessor {\n\t/**\n\t * number of decimal places allowed\n\t */\n\t@Input()\n\tbuiDecimalInput: number = 2;\n\n\t@HostBinding('placeholder')\n\tprivate placeholder: string = '';\n\n\t@HostBinding('autocomplete')\n\tprivate autocomplete = 'off';\n\n\t@HostBinding('type')\n\tprivate type = 'number';\n\n\t@HostBinding('attr.inputmode')\n\tprivate inputMode = 'decimal';\n\n\tprivate change = noop_consumer;\n\tprivate onTouch = noop;\n\n\tconstructor(@Self() private _el: ElementRef<HTMLInputElement>, private _renderer: Renderer2) {}\n\n\tngOnChanges(): void {\n\t\tthis.buiDecimalInput = this.buiDecimalInput || 2;\n\t\tthis.onInput();\n\t}\n\n\t@HostListener('input')\n\tonInput() {\n\t\tconst value = this._el.nativeElement.value;\n\n\t\tconst decimalPart = value.split('.')[1];\n\n\t\tif (decimalPart && decimalPart.length > this.buiDecimalInput) {\n\t\t\tconst indexOfPeriod = value.indexOf('.');\n\t\t\tconst newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);\n\t\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t\t}\n\t\tconst resolvedValue = this._el.nativeElement.value;\n\t\tthis.change(\n\t\t\tresolvedValue === '' || resolvedValue === null || resolvedValue === undefined ? null : Number(resolvedValue)\n\t\t);\n\t}\n\n\t@HostListener('keypress', ['$event'])\n\tonKeypress(evt: KeyboardEvent) {\n\t\tconst target = evt.target as HTMLInputElement;\n\t\tconst value = target.value;\n\t\tconst isSpace = evt.key === ' ';\n\n\t\tif (\n\t\t\tisSpace ||\n\t\t\t(!['.', '-'].includes(evt.key) && isNaN(Number(evt.key))) ||\n\t\t\t(evt.key === '.' && value.indexOf('.') > 0)\n\t\t) {\n\t\t\tevt.preventDefault();\n\t\t}\n\t}\n\n\t@HostListener('focus')\n\tonFocus() {}\n\n\t@HostListener('blur')\n\tonblur() {\n\t\tthis.onTouch();\n\t\tthis._resetDecimalPlaces();\n\t}\n\n\twriteValue(value: any) {\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', value);\n\t\tthis._resetDecimalPlaces();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.change = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouch = fn;\n\t}\n\n\tprivate _resetDecimalPlaces() {\n\t\tconst value = this._el.nativeElement.value;\n\t\tif (value === '' || value === null || value === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tconst splitValues = value.split('.');\n\t\tlet newValue = '';\n\t\tif (splitValues[1] && splitValues[1].length > this.buiDecimalInput) {\n\t\t\tnewValue = value.substring(0, splitValues[0].length + 1 + this.buiDecimalInput);\n\t\t} else {\n\t\t\tthis.buiDecimalInput = this.buiDecimalInput < 0 ? 0 : this.buiDecimalInput;\n\t\t\tnewValue = Number(value).toFixed(this.buiDecimalInput);\n\t\t}\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DecimalInputDirective } from './decimal-input.directive';\n\n@NgModule({\n\tdeclarations: [DecimalInputDirective],\n\timports: [CommonModule],\n\texports: [DecimalInputDirective]\n})\nexport class DecimalInputModule {}\nexport { DecimalInputDirective };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAeA;AACO,MAAM,aAAa,GAAG,CAAC,CAAM,KAAM,GAAC,CAAC;AAE5C;;AAEG;MAQU,qBAAqB,CAAA;IAsBjC,WAA4B,CAAA,GAAiC,EAAU,SAAoB,EAAA;QAA/D,IAAG,CAAA,GAAA,GAAH,GAAG,CAA8B;QAAU,IAAS,CAAA,SAAA,GAAT,SAAS,CAAW;AArB3F;;AAEG;QAEH,IAAe,CAAA,eAAA,GAAW,CAAC,CAAC;QAGpB,IAAW,CAAA,WAAA,GAAW,EAAE,CAAC;QAGzB,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;QAGrB,IAAI,CAAA,IAAA,GAAG,QAAQ,CAAC;QAGhB,IAAS,CAAA,SAAA,GAAG,SAAS,CAAC;QAEtB,IAAM,CAAA,MAAA,GAAG,aAAa,CAAC;QACvB,IAAO,CAAA,OAAA,GAAG,IAAI,CAAC;KAEwE;IAE/F,WAAW,GAAA;QACV,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,EAAE,CAAC;KACf;IAGD,OAAO,GAAA;QACN,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC;QAE3C,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAExC,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE;YAC7D,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACzC,YAAA,MAAM,QAA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OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,qBAAqB,CAAC;AAChC,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/material/card';
|
|
5
|
+
import { MatCardModule } from '@angular/material/card';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A `bui-panel` consists of a `mat-card` and a tinted backdrop.
|
|
9
|
+
*
|
|
10
|
+
* Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.
|
|
11
|
+
* The backdrop is nearly transparent, blending the theme palette `color`
|
|
12
|
+
* and the effective background color of the DOM ancestors.
|
|
13
|
+
*
|
|
14
|
+
* `bui-panel` supports all the content child directives of `mat-card`.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
class PanelComponent {
|
|
18
|
+
constructor(_cd) {
|
|
19
|
+
this._cd = _cd;
|
|
20
|
+
this._color = 'primary';
|
|
21
|
+
this._appearance = 'flat';
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* This property defines the background (shaded) and border colors of the panel
|
|
25
|
+
*/
|
|
26
|
+
get color() {
|
|
27
|
+
return this._color;
|
|
28
|
+
}
|
|
29
|
+
set color(value) {
|
|
30
|
+
this._color = value;
|
|
31
|
+
this._cd.markForCheck();
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.
|
|
35
|
+
*
|
|
36
|
+
* This property can change the default appearance to
|
|
37
|
+
*
|
|
38
|
+
* * `raised` - the original `mat-card` default
|
|
39
|
+
* * `outline` - a `mat-card` with borders
|
|
40
|
+
* * `flat` - no border or elevation
|
|
41
|
+
*/
|
|
42
|
+
get appearance() {
|
|
43
|
+
return this._appearance;
|
|
44
|
+
}
|
|
45
|
+
set appearance(value) {
|
|
46
|
+
this._appearance = value;
|
|
47
|
+
this._cd.markForCheck();
|
|
48
|
+
}
|
|
49
|
+
ngOnInit() { }
|
|
50
|
+
}
|
|
51
|
+
PanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
PanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: PanelComponent, selector: "bui-panel", inputs: { backdropClass: "backdropClass", cardClass: "cardClass", color: "color", appearance: "appearance" }, host: { classAttribute: "bui-panel bui-host" }, ngImport: i0, template: "<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n", styles: [":host{position:relative}:host .bui-panel-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:4px;opacity:.1}:host .mat-card{background-color:transparent}:host .bui-panel-border{border-width:1px;border-style:solid}\n"], dependencies: [{ kind: "component", type: i1.MatCard, selector: "mat-card", exportAs: ["matCard"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelComponent, decorators: [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{ selector: 'bui-panel', host: {
|
|
56
|
+
class: 'bui-panel bui-host'
|
|
57
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n", styles: [":host{position:relative}:host .bui-panel-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:4px;opacity:.1}:host .mat-card{background-color:transparent}:host .bui-panel-border{border-width:1px;border-style:solid}\n"] }]
|
|
58
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { backdropClass: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], cardClass: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], color: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], appearance: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}] } });
|
|
67
|
+
|
|
68
|
+
class PanelModule {
|
|
69
|
+
}
|
|
70
|
+
PanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
71
|
+
PanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, declarations: [PanelComponent], imports: [CommonModule, MatCardModule], exports: [MatCardModule, PanelComponent] });
|
|
72
|
+
PanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, imports: [CommonModule, MatCardModule, MatCardModule] });
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PanelModule, decorators: [{
|
|
74
|
+
type: NgModule,
|
|
75
|
+
args: [{
|
|
76
|
+
declarations: [PanelComponent],
|
|
77
|
+
imports: [CommonModule, MatCardModule],
|
|
78
|
+
exports: [MatCardModule, PanelComponent]
|
|
79
|
+
}]
|
|
80
|
+
}] });
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Generated bundle index. Do not edit.
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
export { PanelComponent, PanelModule };
|
|
87
|
+
//# sourceMappingURL=bravura-ui-panel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bravura-ui-panel.mjs","sources":["../../../projects/ui/panel/panel.component.ts","../../../projects/ui/panel/panel.component.html","../../../projects/ui/panel/panel.module.ts","../../../projects/ui/panel/bravura-ui-panel.ts"],"sourcesContent":["import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\n\n/**\n * A `bui-panel` consists of a `mat-card` and a tinted backdrop.\n *\n * Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.\n * The backdrop is nearly transparent, blending the theme palette `color`\n * and the effective background color of the DOM ancestors.\n *\n * `bui-panel` supports all the content child directives of `mat-card`.\n *\n */\n@Component({\n\tselector: 'bui-panel',\n\ttemplateUrl: './panel.component.html',\n\tstyleUrls: ['./panel.component.scss'],\n\thost: {\n\t\tclass: 'bui-panel bui-host'\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PanelComponent implements OnInit {\n\t/**\n\t * Additional style classes on the tinted backdrop element.\n\t */\n\t@Input()\n\tbackdropClass?: string;\n\n\t/**\n\t * Additional style classes on the `<mat-card>` element.\n\t */\n\t@Input()\n\tcardClass?: string;\n\n\t/**\n\t * This property defines the background (shaded) and border colors of the panel\n\t */\n\t@Input()\n\tget color(): ThemePalette {\n\t\treturn this._color;\n\t}\n\tset color(value: ThemePalette) {\n\t\tthis._color = value;\n\t\tthis._cd.markForCheck();\n\t}\n\n\t/**\n\t * In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.\n\t *\n\t * This property can change the default appearance to\n\t *\n\t * * `raised` - the original `mat-card` default\n\t * * `outline` - a `mat-card` with borders\n\t * * `flat` - no border or elevation\n\t */\n\t@Input()\n\tget appearance(): 'outlined' | 'raised' | 'flat' {\n\t\treturn this._appearance;\n\t}\n\tset appearance(value: 'outlined' | 'raised' | 'flat') {\n\t\tthis._appearance = value;\n\t\tthis._cd.markForCheck();\n\t}\n\n\tprivate _color: ThemePalette = 'primary';\n\n\tprivate _appearance: 'outlined' | 'raised' | 'flat' = 'flat';\n\n\tconstructor(private _cd: ChangeDetectorRef) {}\n\n\tngOnInit(): void {}\n}\n","<div class=\"bui-panel-backdrop {{ backdropClass }} bui-bg-{{ color || 'none' }}\"></div>\n<mat-card\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\n\t}}\"\n>\n\t<ng-content></ng-content>\n</mat-card>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PanelComponent } from './panel.component';\nimport { MatCardModule } from '@angular/material/card';\n\n@NgModule({\n\tdeclarations: [PanelComponent],\n\timports: [CommonModule, MatCardModule],\n\texports: [MatCardModule, PanelComponent]\n})\nexport class PanelModule {}\n\nexport { PanelComponent };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAGA;;;;;;;;;AASG;MAUU,cAAc,CAAA;AA+C1B,IAAA,WAAA,CAAoB,GAAsB,EAAA;QAAtB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAJlC,IAAM,CAAA,MAAA,GAAiB,SAAS,CAAC;QAEjC,IAAW,CAAA,WAAA,GAAmC,MAAM,CAAC;KAEf;AAlC9C;;AAEG;AACH,IAAA,IACI,KAAK,GAAA;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;KACnB;IACD,IAAI,KAAK,CAAC,KAAmB,EAAA;AAC5B,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;AACpB,QAAA,IAAI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CAAA;sBADR,KAAK;gBAmBF,UAAU,EAAA,CAAA;sBADb,KAAK;;;ME9CM,WAAW,CAAA;;wGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAX,WAAW,EAAA,YAAA,EAAA,CAJR,cAAc,CACnB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CAC3B,aAAa,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;AAE3B,WAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAHb,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAC3B,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,cAAc,CAAC;AAC9B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;AACtC,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;AACxC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bravura/ui",
|
|
3
3
|
"description": "Bravura UI Components for Angular applications",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Angular",
|
|
7
7
|
"Angular Material",
|
|
@@ -113,6 +113,14 @@
|
|
|
113
113
|
"node": "./fesm2015/bravura-ui-icon-font.mjs",
|
|
114
114
|
"default": "./fesm2020/bravura-ui-icon-font.mjs"
|
|
115
115
|
},
|
|
116
|
+
"./panel": {
|
|
117
|
+
"types": "./panel/index.d.ts",
|
|
118
|
+
"esm2020": "./esm2020/panel/bravura-ui-panel.mjs",
|
|
119
|
+
"es2020": "./fesm2020/bravura-ui-panel.mjs",
|
|
120
|
+
"es2015": "./fesm2015/bravura-ui-panel.mjs",
|
|
121
|
+
"node": "./fesm2015/bravura-ui-panel.mjs",
|
|
122
|
+
"default": "./fesm2020/bravura-ui-panel.mjs"
|
|
123
|
+
},
|
|
116
124
|
"./phone-number": {
|
|
117
125
|
"types": "./phone-number/index.d.ts",
|
|
118
126
|
"esm2020": "./esm2020/phone-number/bravura-ui-phone-number.mjs",
|
package/panel/index.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
+
import { ThemePalette } from '@angular/material/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* A `bui-panel` consists of a `mat-card` and a tinted backdrop.
|
|
6
|
+
*
|
|
7
|
+
* Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.
|
|
8
|
+
* The backdrop is nearly transparent, blending the theme palette `color`
|
|
9
|
+
* and the effective background color of the DOM ancestors.
|
|
10
|
+
*
|
|
11
|
+
* `bui-panel` supports all the content child directives of `mat-card`.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare class PanelComponent implements OnInit {
|
|
15
|
+
private _cd;
|
|
16
|
+
/**
|
|
17
|
+
* Additional style classes on the tinted backdrop element.
|
|
18
|
+
*/
|
|
19
|
+
backdropClass?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Additional style classes on the `<mat-card>` element.
|
|
22
|
+
*/
|
|
23
|
+
cardClass?: string;
|
|
24
|
+
/**
|
|
25
|
+
* This property defines the background (shaded) and border colors of the panel
|
|
26
|
+
*/
|
|
27
|
+
get color(): ThemePalette;
|
|
28
|
+
set color(value: ThemePalette);
|
|
29
|
+
/**
|
|
30
|
+
* In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.
|
|
31
|
+
*
|
|
32
|
+
* This property can change the default appearance to
|
|
33
|
+
*
|
|
34
|
+
* * `raised` - the original `mat-card` default
|
|
35
|
+
* * `outline` - a `mat-card` with borders
|
|
36
|
+
* * `flat` - no border or elevation
|
|
37
|
+
*/
|
|
38
|
+
get appearance(): 'outlined' | 'raised' | 'flat';
|
|
39
|
+
set appearance(value: 'outlined' | 'raised' | 'flat');
|
|
40
|
+
private _color;
|
|
41
|
+
private _appearance;
|
|
42
|
+
constructor(_cd: ChangeDetectorRef);
|
|
43
|
+
ngOnInit(): void;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PanelComponent, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PanelComponent, "bui-panel", never, { "backdropClass": "backdropClass"; "cardClass": "cardClass"; "color": "color"; "appearance": "appearance"; }, {}, never, ["*"], false>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PanelComponent } from './panel.component';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./panel.component";
|
|
4
|
+
import * as i2 from "@angular/common";
|
|
5
|
+
import * as i3 from "@angular/material/card";
|
|
6
|
+
export declare class PanelModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PanelModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PanelModule, [typeof i1.PanelComponent], [typeof i2.CommonModule, typeof i3.MatCardModule], [typeof i3.MatCardModule, typeof i1.PanelComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PanelModule>;
|
|
10
|
+
}
|
|
11
|
+
export { PanelComponent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './panel.module';
|