@bravura/ui 9.0.5 → 9.0.6
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
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Change history
|
|
2
2
|
|
|
3
|
+
## <small>9.0.6 (2026-07-15)</small>
|
|
4
|
+
|
|
5
|
+
* fix(form-field): export as standalone ([a058e55](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/a058e55))
|
|
6
|
+
|
|
3
7
|
## <small>9.0.5 (2026-07-15)</small>
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
- fix(form-field): export styles ([d00217b](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/d00217b))
|
|
6
10
|
|
|
7
11
|
## <small>9.0.4 (2026-07-15)</small>
|
|
8
12
|
|
|
@@ -1,40 +1,22 @@
|
|
|
1
1
|
import { ObserversModule } from '@angular/cdk/observers';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken,
|
|
4
|
+
import { InjectionToken, Input, Host, Inject, Directive, NgModule } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/material/form-field';
|
|
6
|
-
import { MatFormField
|
|
6
|
+
import { MatFormField } from '@angular/material/form-field';
|
|
7
7
|
|
|
8
8
|
const BUI_FORM_FIELD_CONFIG = new InjectionToken('@bravura/ui/buiFormFieldConfig', {
|
|
9
9
|
factory: () => ({ appearance: 'fill' }),
|
|
10
10
|
providedIn: 'root'
|
|
11
11
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* ** IMPORTANT NOTICE **
|
|
20
|
-
*
|
|
21
|
-
* From version 3.0 onward, the selector `bui-form-field` is deprecated and will be removed in later releases. You no longer need to use this tag name
|
|
22
|
-
* for the new appearances. As long as you import the `NgModule` from this package, the new appearances will be supported by Material's `mat-form-field`
|
|
23
|
-
* component.
|
|
24
|
-
*/
|
|
25
|
-
class FormFieldComponent extends MatFormField {
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: FormFieldComponent, isStandalone: true, selector: "bui-dummy-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
12
|
+
function provideFormFieldConfig(config) {
|
|
13
|
+
const conf = { ...config };
|
|
14
|
+
conf.appearance = conf.appearance || 'fill';
|
|
15
|
+
return {
|
|
16
|
+
provide: BUI_FORM_FIELD_CONFIG,
|
|
17
|
+
useValue: conf
|
|
18
|
+
};
|
|
28
19
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
30
|
-
type: Component,
|
|
31
|
-
args: [{
|
|
32
|
-
selector: 'bui-dummy-component',
|
|
33
|
-
template: ``,
|
|
34
|
-
encapsulation: ViewEncapsulation.None,
|
|
35
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
36
|
-
}]
|
|
37
|
-
}] });
|
|
38
20
|
/**
|
|
39
21
|
* @ignore
|
|
40
22
|
*/
|
|
@@ -82,8 +64,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
82
64
|
type: Input
|
|
83
65
|
}] } });
|
|
84
66
|
const matFormFieldRef = MatFormField.ɵcmp;
|
|
85
|
-
const formFieldRef = FormFieldComponent.ɵcmp;
|
|
86
|
-
matFormFieldRef.styles.push(...formFieldRef.styles);
|
|
87
67
|
matFormFieldRef.selectors.push(['bui-form-field']);
|
|
88
68
|
delete matFormFieldRef.inputs.appearance;
|
|
89
69
|
delete matFormFieldRef.declaredInputs.appearance;
|
|
@@ -103,14 +83,14 @@ class FormFieldModule {
|
|
|
103
83
|
};
|
|
104
84
|
}
|
|
105
85
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
106
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, imports: [CommonModule,
|
|
107
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, imports: [CommonModule,
|
|
86
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, imports: [CommonModule, ObserversModule, FormFieldStyleDirective], exports: [FormFieldStyleDirective] }); }
|
|
87
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, imports: [CommonModule, ObserversModule] }); }
|
|
108
88
|
}
|
|
109
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, decorators: [{
|
|
110
90
|
type: NgModule,
|
|
111
91
|
args: [{
|
|
112
|
-
imports: [CommonModule,
|
|
113
|
-
exports: [
|
|
92
|
+
imports: [CommonModule, ObserversModule, FormFieldStyleDirective],
|
|
93
|
+
exports: [FormFieldStyleDirective]
|
|
114
94
|
}]
|
|
115
95
|
}] });
|
|
116
96
|
|
|
@@ -118,5 +98,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
118
98
|
* Generated bundle index. Do not edit.
|
|
119
99
|
*/
|
|
120
100
|
|
|
121
|
-
export {
|
|
101
|
+
export { FormFieldModule, FormFieldStyleDirective, provideFormFieldConfig };
|
|
122
102
|
//# sourceMappingURL=bravura-ui-form-field.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-form-field.mjs","sources":["../../../projects/ui/form-field/form-field.component.ts","../../../projects/ui/form-field/form-field.module.ts","../../../projects/ui/form-field/bravura-ui-form-field.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"bravura-ui-form-field.mjs","sources":["../../../projects/ui/form-field/form-field.component.ts","../../../projects/ui/form-field/form-field.module.ts","../../../projects/ui/form-field/bravura-ui-form-field.ts"],"sourcesContent":["import { Directive, ElementRef, Host, Inject, InjectionToken, Input, Provider } from '@angular/core';\nimport { MatFormField } from '@angular/material/form-field';\n\nexport interface BuiFormFieldConfig {\n\tappearance?: 'fill' | 'outline' | 'bound';\n}\n\nexport const BUI_FORM_FIELD_CONFIG = new InjectionToken<BuiFormFieldConfig>('@bravura/ui/buiFormFieldConfig', {\n\tfactory: () => ({ appearance: 'fill' }),\n\tprovidedIn: 'root'\n});\n\nexport function provideFormFieldConfig(config: BuiFormFieldConfig): Provider {\n\tconst conf = { ...config };\n\tconf.appearance = conf.appearance || 'fill';\n\n\treturn {\n\t\tprovide: BUI_FORM_FIELD_CONFIG,\n\t\tuseValue: conf\n\t};\n}\n\n/**\n * @ignore\n */\n@Directive({\n\tselector: 'bui-form-field, mat-form-field',\n\thost: {\n\t\tclass: 'bui-host'\n\t}\n})\nexport class FormFieldStyleDirective {\n\tprivate _appearance: any;\n\tprivate _flowDetection: any;\n\n\t/** The form field appearance style. */\n\t@Input()\n\tget appearance(): any {\n\t\treturn this._appearance;\n\t}\n\tset appearance(value: any) {\n\t\tthis._appearance = value;\n\t\tthis.elemRef.nativeElement.classList.remove('bui-form-field-bound', 'bui-form-field-detach');\n\t\tif (['bound', 'detach'].includes(this._appearance)) {\n\t\t\tthis.matFormField.appearance = 'outline';\n\t\t\tthis.elemRef.nativeElement.classList.add(`bui-form-field-${value}`);\n\t\t\tthis.matFormField._shouldAlwaysFloat = () => true;\n\t\t} else {\n\t\t\tthis.matFormField.appearance = ['outline', 'fill'].includes(this._appearance) ? this._appearance : undefined;\n\t\t\tthis.matFormField._shouldAlwaysFloat = this._flowDetection;\n\t\t}\n\t}\n\n\tconstructor(\n\t\t@Host() private matFormField: MatFormField,\n\t\tprivate elemRef: ElementRef<HTMLElement>,\n\t\t@Inject(BUI_FORM_FIELD_CONFIG) config: BuiFormFieldConfig\n\t) {\n\t\tthis._flowDetection = matFormField._shouldAlwaysFloat;\n\t\tthis.appearance = config.appearance;\n\t}\n}\n\nconst matFormFieldRef: any = MatFormField.ɵcmp;\nmatFormFieldRef.selectors.push(['bui-form-field']);\ndelete matFormFieldRef.inputs.appearance;\ndelete matFormFieldRef.declaredInputs.appearance;\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { BuiFormFieldConfig, BUI_FORM_FIELD_CONFIG, FormFieldStyleDirective } from './form-field.component';\n\n@NgModule({\n\timports: [CommonModule, ObserversModule, FormFieldStyleDirective],\n\texports: [FormFieldStyleDirective]\n})\nexport class FormFieldModule {\n\tstatic forConfig(config: BuiFormFieldConfig): ModuleWithProviders<FormFieldModule> {\n\t\tconst cfg = { ...config };\n\t\tcfg.appearance = cfg.appearance || 'fill';\n\t\treturn {\n\t\t\tngModule: FormFieldModule,\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tprovide: BUI_FORM_FIELD_CONFIG,\n\t\t\t\t\tuseValue: cfg\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAOO,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAqB,g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AAE;QACzB,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,IAAI,MAAM;QACzC,OAAO;AACN,YAAA,QAAQ,EAAE,eAAe;AACzB,YAAA,SAAS,EAAE;AACV,gBAAA;AACC,oBAAA,OAAO,EAAE,qBAAqB;AAC9B,oBAAA,QAAQ,EAAE;AACV;AACD;SACD;IACF;8GAbY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHjB,YAAY,EAAE,eAAe,EAAE,uBAAuB,aACtD,uBAAuB,CAAA,EAAA,CAAA,CAAA;+GAErB,eAAe,EAAA,OAAA,EAAA,CAHjB,YAAY,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAG3B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,uBAAuB,CAAC;oBACjE,OAAO,EAAE,CAAC,uBAAuB;AACjC,iBAAA;;;ACTD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,30 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, ModuleWithProviders } from '@angular/core';
|
|
3
|
-
import * as i2 from '@angular/material/form-field';
|
|
2
|
+
import { ElementRef, Provider, ModuleWithProviders } from '@angular/core';
|
|
4
3
|
import { MatFormField } from '@angular/material/form-field';
|
|
5
4
|
import * as i1 from '@angular/common';
|
|
6
|
-
import * as
|
|
5
|
+
import * as i2 from '@angular/cdk/observers';
|
|
7
6
|
|
|
8
7
|
interface BuiFormFieldConfig {
|
|
9
8
|
appearance?: 'fill' | 'outline' | 'bound';
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
* Container for form controls that applies Material Design styling and behavior.
|
|
13
|
-
*
|
|
14
|
-
* This component extends Angular Material's [mat-form-field](https://material.angular.io/components/form-field) and provides two additional appearances
|
|
15
|
-
* `bound` and `detach`. `bound` renders the label outside the outlined area of the field, while `detach` remove the borders all together. `detach`
|
|
16
|
-
* is generally used with form controls that render their own borders.
|
|
17
|
-
*
|
|
18
|
-
* ** IMPORTANT NOTICE **
|
|
19
|
-
*
|
|
20
|
-
* From version 3.0 onward, the selector `bui-form-field` is deprecated and will be removed in later releases. You no longer need to use this tag name
|
|
21
|
-
* for the new appearances. As long as you import the `NgModule` from this package, the new appearances will be supported by Material's `mat-form-field`
|
|
22
|
-
* component.
|
|
23
|
-
*/
|
|
24
|
-
declare class FormFieldComponent extends MatFormField {
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "bui-dummy-component", never, {}, {}, never, never, true, never>;
|
|
27
|
-
}
|
|
10
|
+
declare function provideFormFieldConfig(config: BuiFormFieldConfig): Provider;
|
|
28
11
|
/**
|
|
29
12
|
* @ignore
|
|
30
13
|
*/
|
|
@@ -44,8 +27,8 @@ declare class FormFieldStyleDirective {
|
|
|
44
27
|
declare class FormFieldModule {
|
|
45
28
|
static forConfig(config: BuiFormFieldConfig): ModuleWithProviders<FormFieldModule>;
|
|
46
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldModule, never>;
|
|
47
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormFieldModule, never, [typeof i1.CommonModule, typeof i2.
|
|
30
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormFieldModule, never, [typeof i1.CommonModule, typeof i2.ObserversModule, typeof FormFieldStyleDirective], [typeof FormFieldStyleDirective]>;
|
|
48
31
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormFieldModule>;
|
|
49
32
|
}
|
|
50
33
|
|
|
51
|
-
export {
|
|
34
|
+
export { FormFieldModule, FormFieldStyleDirective, provideFormFieldConfig };
|