Skip to content

Commit ba54243

Browse files
author
a.idzikowski
committed
Release 13.0.0
1 parent 0f7a1dd commit ba54243

File tree

69 files changed

+917
-309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+917
-309
lines changed

angular-bootstrap-md-12.2.0.tgz

-921 KB
Binary file not shown.

angular-bootstrap-md-13.0.0.tgz

984 KB
Binary file not shown.

changelog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
13.0.0
2+
3+
In version 13.0.0 we added support for Angular 13 and Font Awesome 6. Check what changed below:
4+
5+
**Breaking changes:**
6+
7+
* Added support for Angular 13, this Angular version is now required,
8+
* Checkbox - changed id input name to checkboxId,
9+
* Checkbox - styles will be loaded with other core global styles. This will allow you to use checkbox not only as mdb-checkboxcomponent, but also as a standard HTML element with material styles. The mdb-checkbox offers more features but cancause someperformance problems after adding many elements in one application view.
10+
11+
**Dependencies:**
12+
13+
* Updated Font Awesome to v6.0.0.
14+
15+
**Fixes:**
16+
17+
* Added type coercion for boolean and number inputs to resolve problems with inputs types,
18+
* Select - resolved problem with option type.
19+
120
12.2.0
221
In version 12.2.0 we updated Bootstrap to v4.6.1 and added some fixes and new features for the existing components. Check what changed below:
322

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-bootstrap-md-lib",
3-
"version": "12.2.0",
3+
"version": "13.0.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
@@ -10,8 +10,8 @@
1010
"e2e": "ng e2e",
1111
"copy-scss": "cp -r projects/angular-bootstrap-md/src/lib/assets dist/angular-bootstrap-md/assets",
1212
"copy-files": "cp projects/angular-bootstrap-md/src/lib/changelog projects/angular-bootstrap-md/src/lib/License.pdf README.md dist/angular-bootstrap-md",
13-
"pack-archive": "cd dist/angular-bootstrap-md && npm pack . && cp angular-bootstrap-md-12.*.tgz ../..",
14-
"remove-archive": "rm dist/angular-bootstrap-md/angular-bootstrap-md-12.*.tgz && cd ../..",
13+
"pack-archive": "cd dist/angular-bootstrap-md && npm pack . && cp angular-bootstrap-md-13.*.tgz ../..",
14+
"remove-archive": "rm dist/angular-bootstrap-md/angular-bootstrap-md-13.*.tgz && cd ../..",
1515
"compile-lib": "ng-packagr -p projects/angular-bootstrap-md/ng-package.json && npm run copy-scss && npm run copy-files && npm run schematics:build && npm run pack-archive && npm run remove-archive",
1616
"schematics:build": "tsc -p projects/angular-bootstrap-md/tsconfig.schematics.json && npm run schematics:copy-schema && npm run schematics:copy-collection && npm run schematics:copy-migration",
1717
"schematics:copy-schema": "cp projects/angular-bootstrap-md/schematics/ng-add/schema.json dist/angular-bootstrap-md/schematics/ng-add",
@@ -32,7 +32,7 @@
3232
"@angular/router": "~13.2.6",
3333
"@fortawesome/fontawesome-free": "^6.0.0",
3434
"@types/chart.js": "^2.7.42",
35-
"angular-bootstrap-md": "file:angular-bootstrap-md-12.2.0.tgz",
35+
"angular-bootstrap-md": "file:angular-bootstrap-md-13.0.0.tgz",
3636
"chart.js": "^2.5.0",
3737
"hammerjs": "^2.0.8",
3838
"rxjs": "~7.5.0",
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
{
22
"name": "angular-bootstrap-md",
33
"repository": "https://github.com/mdbootstrap/Angular-Bootstrap-with-Material-Design",
4-
"version": "12.2.0",
4+
"version": "13.0.0",
55
"schematics": "./schematics/collection.json",
66
"ng-update": {
77
"migrations": "./schematics/migration.json"
88
},
9-
"files": [
10-
"**/*"
11-
],
129
"dependencies": {
1310
"tslib": "^2.0.0"
1411
},
1512
"peerDependencies": {
16-
"@angular/common": "^12.0.0",
17-
"@angular/core": "^12.0.0",
18-
"@angular/animations": "^12.0.0",
19-
"@angular/forms": "^12.0.0",
20-
"@angular/cdk": "^12.0.0"
13+
"@angular/common": "^13.0.0",
14+
"@angular/core": "^13.0.0",
15+
"@angular/animations": "^13.0.0",
16+
"@angular/forms": "^13.0.0",
17+
"@angular/cdk": "^13.0.0"
18+
},
19+
"exports": {
20+
"./assets/img/*": {
21+
"default": "./assets/img/*"
22+
},
23+
"./assets/scss/*": {
24+
"sass": "./assets/scss/*"
25+
}
2126
}
2227
}

projects/angular-bootstrap-md/schematics/ng-add/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { addPackageToPackageJson } from './package';
66
// Just return the tree
77
export function ngAdd(options: Schema): Rule {
88
return (tree: Tree, context: SchematicContext) => {
9-
const angularDependencyVersion = '^9.0.0';
9+
const angularDependencyVersion = '^13.0.0';
1010

1111
addPackageToPackageJson(tree, '@angular/cdk', angularDependencyVersion);
1212
addPackageToPackageJson(tree, '@angular/forms', angularDependencyVersion);
@@ -15,7 +15,7 @@ export function ngAdd(options: Schema): Rule {
1515
if (options.externalDependencies) {
1616
addPackageToPackageJson(tree, 'chart.js', '^2.7.2');
1717
addPackageToPackageJson(tree, '@types/chart.js', '^2.7.40');
18-
addPackageToPackageJson(tree, '@fortawesome/fontawesome-free', '~5.6.3');
18+
addPackageToPackageJson(tree, '@fortawesome/fontawesome-free', '~6.0.0');
1919
addPackageToPackageJson(tree, 'hammerjs', '~2.0.8');
2020
addPackageToPackageJson(tree, 'animate.css', '~3.7.2');
2121
}

projects/angular-bootstrap-md/src/lib/assets/scss/core/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $custom-mdb-file-text: (
6161
zh: '選擇',
6262
de: 'Wählen',
6363
ru: 'выбирать',
64-
);
64+
) !default;
6565

6666
// Blockquote
6767
$blockquote-padding-y: 0.5rem !default;

projects/angular-bootstrap-md/src/lib/assets/scss/msc.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
@import 'core/msc/switch';
88
@import 'core/msc/carousel';
99
@import 'core/msc/bootstrap-select';
10+
@import 'core/msc/checkbox';

projects/angular-bootstrap-md/src/lib/changelog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
13.0.0
2+
3+
In version 13.0.0 we added support for Angular 13 and Font Awesome 6. Check what changed below:
4+
5+
**Breaking changes:**
6+
7+
* Added support for Angular 13, this Angular version is now required,
8+
* Checkbox - changed id input name to checkboxId,
9+
* Checkbox - styles will be loaded with other core global styles. This will allow you to use checkbox not only as mdb-checkboxcomponent, but also as a standard HTML element with material styles. The mdb-checkbox offers more features but cancause someperformance problems after adding many elements in one application view.
10+
11+
**Dependencies:**
12+
13+
* Updated Font Awesome to v6.0.0.
14+
15+
**Fixes:**
16+
17+
* Added type coercion for boolean and number inputs to resolve problems with inputs types,
18+
* Select - resolved problem with option type.
19+
120
12.2.0
221
In version 12.2.0 we updated Bootstrap to v4.6.1 and added some fixes and new features for the existing components. Check what changed below:
322

projects/angular-bootstrap-md/src/lib/free/badge/mdb-badge.component.ts

Lines changed: 80 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';
12
import {
23
Component,
34
ElementRef,
@@ -17,14 +18,85 @@ import {
1718
changeDetection: ChangeDetectionStrategy.OnPush,
1819
})
1920
export class MDBBadgeComponent implements OnInit {
20-
@Input() @HostBinding('class.badge-default') default: boolean;
21-
@Input() @HostBinding('class.badge-primary') primary: boolean;
22-
@Input() @HostBinding('class.badge-secondary') secondary: boolean;
23-
@Input() @HostBinding('class.badge-success') success: boolean;
24-
@Input() @HostBinding('class.badge-info') info: boolean;
25-
@Input() @HostBinding('class.badge-warning') warning: boolean;
26-
@Input() @HostBinding('class.badge-danger') danger: boolean;
27-
@Input() @HostBinding('class.badge-pill') pill: boolean;
21+
@Input()
22+
@HostBinding('class.badge-default')
23+
get default(): boolean {
24+
return this._default;
25+
}
26+
set default(value: BooleanInput) {
27+
this._default = coerceBooleanProperty(value);
28+
}
29+
private _default = false;
30+
31+
@Input()
32+
@HostBinding('class.badge-primary')
33+
get primary(): boolean {
34+
return this._primary;
35+
}
36+
set primary(value: BooleanInput) {
37+
this._primary = coerceBooleanProperty(value);
38+
}
39+
private _primary = false;
40+
41+
@Input()
42+
@HostBinding('class.badge-secondary')
43+
get secondary(): boolean {
44+
return this._secondary;
45+
}
46+
set secondary(value: BooleanInput) {
47+
this._secondary = coerceBooleanProperty(value);
48+
}
49+
private _secondary = false;
50+
51+
@Input()
52+
@HostBinding('class.badge-success')
53+
get success(): boolean {
54+
return this._success;
55+
}
56+
set success(value: BooleanInput) {
57+
this._success = coerceBooleanProperty(value);
58+
}
59+
private _success = false;
60+
61+
@Input()
62+
@HostBinding('class.badge-info')
63+
get info(): boolean {
64+
return this._info;
65+
}
66+
set info(value: BooleanInput) {
67+
this._info = coerceBooleanProperty(value);
68+
}
69+
private _info = false;
70+
71+
@Input()
72+
@HostBinding('class.badge-warning')
73+
get warning(): boolean {
74+
return this._warning;
75+
}
76+
set warning(value: BooleanInput) {
77+
this._warning = coerceBooleanProperty(value);
78+
}
79+
private _warning = false;
80+
81+
@Input()
82+
@HostBinding('class.badge-danger')
83+
get danger(): boolean {
84+
return this._danger;
85+
}
86+
set danger(value: BooleanInput) {
87+
this._danger = coerceBooleanProperty(value);
88+
}
89+
private _danger = false;
90+
91+
@Input()
92+
@HostBinding('class.badge-pill')
93+
get pill(): boolean {
94+
return this._pill;
95+
}
96+
set pill(value: BooleanInput) {
97+
this._pill = coerceBooleanProperty(value);
98+
}
99+
private _pill = false;
28100

29101
@Input() classInside: string;
30102

projects/angular-bootstrap-md/src/lib/free/buttons/buttons.directive.ts

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';
12
import {
23
Component,
34
ElementRef,
@@ -10,22 +11,64 @@ import {
1011
} from '@angular/core';
1112

1213
@Component({
13-
// tslint:disable-next-line:component-selector
14+
// eslint-disable-next-line @angular-eslint/component-selector
1415
selector: '[mdbBtn]',
1516
template: '<ng-content></ng-content>',
1617
styleUrls: ['./buttons-module.scss'],
1718
encapsulation: ViewEncapsulation.None,
1819
})
19-
// tslint:disable-next-line:component-class-suffix
20+
// eslint-disable-next-line @angular-eslint/component-class-suffix
2021
export class MdbBtnDirective implements OnInit, OnChanges {
2122
@Input() color = '';
22-
@Input() rounded = false;
23+
24+
@Input()
25+
get rounded(): boolean {
26+
return this._rounded;
27+
}
28+
set rounded(value: BooleanInput) {
29+
this._rounded = coerceBooleanProperty(value);
30+
}
31+
private _rounded = false;
32+
2333
@Input() gradient = '';
24-
@Input() outline = false;
25-
@Input() flat = false;
34+
35+
@Input()
36+
get outline(): boolean {
37+
return this._outline;
38+
}
39+
set outline(value: BooleanInput) {
40+
this._outline = coerceBooleanProperty(value);
41+
}
42+
private _outline = false;
43+
44+
@Input()
45+
get flat(): boolean {
46+
return this._flat;
47+
}
48+
set flat(value: BooleanInput) {
49+
this._flat = coerceBooleanProperty(value);
50+
}
51+
private _flat = false;
52+
2653
@Input() size = '';
27-
@Input() block = false;
28-
@Input() floating = false;
54+
55+
@Input()
56+
get block(): boolean {
57+
return this._block;
58+
}
59+
set block(value: BooleanInput) {
60+
this._block = coerceBooleanProperty(value);
61+
}
62+
private _block = false;
63+
64+
@Input()
65+
get floating(): boolean {
66+
return this._floating;
67+
}
68+
set floating(value: BooleanInput) {
69+
this._floating = coerceBooleanProperty(value);
70+
}
71+
private _floating = false;
2972

3073
public simpleChange: string;
3174
public simpleChangeValue: string;

projects/angular-bootstrap-md/src/lib/free/buttons/checkbox.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
33

44
export const CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {
55
provide: NG_VALUE_ACCESSOR,
6-
// tslint:disable-next-line: no-use-before-declare
6+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
77
useExisting: forwardRef(() => ButtonCheckboxDirective),
88
multi: true,
99
};

projects/angular-bootstrap-md/src/lib/free/buttons/fixed-caption.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core';
33
@Directive({ selector: '[mdbFixedCaption]' })
44
export class FixedButtonCaptionDirective implements OnInit {
55
@Input('mdbFixedCaption') caption: string;
6-
// tslint:disable-next-line:no-input-rename
6+
// eslint-disable-next-line @angular-eslint/no-input-rename
77
@Input('collapseButton') collapseButtonActivator: any;
88
private paragraphEl: any;
99
constructor(private renderer: Renderer2, private el: ElementRef) {}

projects/angular-bootstrap-md/src/lib/free/buttons/radio.directive.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';
12
import {
23
Directive,
34
ElementRef,
@@ -12,7 +13,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
1213

1314
export const RADIO_CONTROL_VALUE_ACCESSOR: any = {
1415
provide: NG_VALUE_ACCESSOR,
15-
// tslint:disable-next-line: no-use-before-declare
16+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
1617
useExisting: forwardRef(() => ButtonRadioDirective),
1718
multi: true,
1819
};
@@ -30,7 +31,14 @@ export class ButtonRadioDirective implements ControlValueAccessor, OnInit {
3031
/** Radio button value, will be set to `ngModel` */
3132
@Input() public mdbRadio: any;
3233
/** If `true` — radio button can be unchecked */
33-
@Input() public uncheckable: boolean;
34+
@Input()
35+
get uncheckable(): boolean {
36+
return this._uncheckable;
37+
}
38+
set uncheckable(value: BooleanInput) {
39+
this._uncheckable = coerceBooleanProperty(value);
40+
}
41+
private _uncheckable = false;
3442
/** Current value of radio component or group */
3543
@Input() public value: any;
3644

@@ -52,7 +60,7 @@ export class ButtonRadioDirective implements ControlValueAccessor, OnInit {
5260
this.el.nativeElement.parentElement.childNodes.forEach((element: any) => {
5361
this.radioElementsArray.push(element);
5462
});
55-
this.radioElementsArray.forEach(element => {
63+
this.radioElementsArray.forEach((element) => {
5664
this.renderer.removeClass(element, 'active');
5765
});
5866
this.renderer.addClass(event.target, 'active');

0 commit comments

Comments
 (0)