Skip to content

Commit 938e1cb

Browse files
author
unknown
committed
1.0.0-beta4
1 parent 076d77e commit 938e1cb

File tree

11 files changed

+78
-52
lines changed

11 files changed

+78
-52
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 1.0.0-beta4 (04.05.2021)
2+
3+
### New components:
4+
5+
- [Charts](https://mdbootstrap.com/docs/b5/angular/data/charts/)
6+
7+
### Bug fixes:
8+
9+
- Animations - resolved problem with parameters in HTML template,
10+
- Sidenav - resolved problems with `mode` and `hidden` inputs,
11+
- Sidenav - resolved problem with `show` method.
12+
13+
---
14+
115
## 1.0.0-beta3 (19.04.2021)
216

317
### New components:

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MDB 5 Angular
22

3-
Version: FREE 1.0.0 Beta 3
3+
Version: FREE 1.0.0 Beta 4
44

55
Documentation:
66
https://mdbootstrap.com/docs/b5/angular/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-angular-ui-kit-free",
3-
"version": "1.0.0-beta3",
3+
"version": "1.0.0-beta4",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

projects/mdb-angular-ui-kit/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 1.0.0-beta4 (04.05.2021)
2+
3+
### New components:
4+
5+
- [Charts](https://mdbootstrap.com/docs/b5/angular/data/charts/)
6+
7+
### Bug fixes:
8+
9+
- Animations - resolved problem with parameters in HTML template,
10+
- Sidenav - resolved problems with `mode` and `hidden` inputs,
11+
- Sidenav - resolved problem with `show` method.
12+
13+
---
14+
115
## 1.0.0-beta3 (19.04.2021)
216

317
### New components:

projects/mdb-angular-ui-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"repository": "https://github.com/mdbootstrap/mdb-angular-ui-kit",
44
"author": "MDBootstrap",
55
"license": "MIT",
6-
"version": "1.0.0-beta3",
6+
"version": "1.0.0-beta4",
77
"peerDependencies": {
88
"@angular/common": "^11.0.0",
99
"@angular/core": "^11.0.0",

projects/mdb-angular-ui-kit/schematics/ng-add/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export function ngAdd(options: Schema): Rule {
1616
addPackageToPackageJson(tree, '@fortawesome/fontawesome-free', '^5.15.1');
1717
}
1818

19+
if (options.charts) {
20+
addPackageToPackageJson(tree, 'chart.js', '^3.1.1');
21+
}
22+
1923
const installMainDependenciesTask = context.addTask(new NodePackageInstallTask());
2024

2125
context.addTask(new RunSchematicTask('ng-add-mdb-setup', options), [

projects/mdb-angular-ui-kit/schematics/ng-add/mdb-setup.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function (options: Schema): any {
2424
addMdbModuleImport(options),
2525
addAngularAnimationsModule(options),
2626
addStylesImports(options),
27+
addChartsToScripts(options),
2728
addRobotoFontToIndexHtml(options),
2829
updateAppComponentContent(),
2930
]);
@@ -144,6 +145,33 @@ function addStylesImports(options: Schema): any {
144145
};
145146
}
146147

148+
function addChartsToScripts(options: Schema): any {
149+
return async (host: Tree, context: SchematicContext) => {
150+
const logger = context.logger;
151+
152+
const chartsPath = 'node_modules/chart.js/dist/chart.js';
153+
154+
if (options.charts) {
155+
const angularJsonFile = host.read('angular.json');
156+
157+
if (angularJsonFile) {
158+
const angularJsonFileObject = JSON.parse(angularJsonFile.toString('utf-8'));
159+
const project = options.project
160+
? options.project
161+
: Object.keys(angularJsonFileObject.projects)[0];
162+
const projectObject = angularJsonFileObject.projects[project];
163+
const scripts = projectObject.architect.build.options.scripts;
164+
165+
scripts.push(chartsPath);
166+
167+
host.overwrite('angular.json', JSON.stringify(angularJsonFileObject, null, 2));
168+
} else {
169+
logger.error('Failed to add charts script to angular.json');
170+
}
171+
}
172+
};
173+
}
174+
147175
function updateAppComponentContent(): any {
148176
return async (host: Tree, context: SchematicContext) => {
149177
const filePath = './src/app/app.component.html';

projects/mdb-angular-ui-kit/schematics/ng-add/schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
"default": true,
2929
"description": "Whether to install and configure Font Awesome.",
3030
"x-prompt": "Set up Font Awesome?"
31+
},
32+
"charts": {
33+
"type": "boolean",
34+
"default": true,
35+
"description": "Whether to install and configure Charts.",
36+
"x-prompt": "Set up Charts?"
3137
}
3238
},
3339
"required": []

projects/mdb-angular-ui-kit/schematics/ng-add/schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export interface Schema {
33
robotoFont: boolean;
44
animations: boolean;
55
fontAwesome: boolean;
6+
charts: boolean;
67
}

src/app/app.component.html

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,14 @@
11
<div class="container">
22
<div class="d-flex justify-content-center align-items-center" style="height: 100vh;">
33
<div class="text-center">
4-
<h2>Release surprise! </h2>
5-
<p class="h4 fw-bold">50% OFF MDB PRO</p>
6-
<div class="row justify-content-center">
7-
<div class="col-md-6">
8-
<img src="https://mdbootstrap.com/img/Marketing/campaigns/50off-SJARV.png" class="img-fluid" alt="" />
9-
</div>
10-
</div>
11-
12-
13-
<h5 class="mb-3">Use this coupon code before it expires and claim the reward</h5>
14-
<p class="mb-3">The coupon code will be valid until the end of the week</p>
15-
16-
<div class="mt-2">
17-
18-
<!--Coupon code-->
19-
<code class="h2 border rounded py-1 px-5 flex-item me-2">T9TTVSQB</code>
20-
<br>
21-
22-
<!--Copy to clipboard-->
23-
24-
<a (click)="copyToClipboard('T9TTVSQB')" id="disc-50" href="#" type="button" class="btn-lg btn-info me-2" style="background-color: #009FE7;">COPY TO
25-
CLIPBOARD <i class="far fa-copy ms-2"></i></a>
26-
<a class="btn btn-outline-primary btn-lg mt-3" href="https://mdbootstrap.com/docs/standard/getting-started/"
27-
target="_blank" style="border-color: #009FE7; color: #009FE7;" role="button">Start MDB tutorial</a>
28-
29-
30-
</div>
31-
<p class="mt-2">See <a href="https://mdbootstrap.com/pro/">prices</a></p>
32-
<div class=" my-2 alert alert-success" id="code-success" *ngIf="successAlert">
33-
Copied
34-
</div>
35-
4+
<img class="mb-4" src="https://mdbootstrap.com/img/logo/mdb-transparent-250px.png"
5+
style="width: 250px; height: 90px;" />
6+
<h5 class="mb-3">Thank you for using our product. We're glad you're with us.</h5>
7+
<p class="mb-3">MDB Team</p>
8+
<a class="btn btn-primary btn-lg" href="https://mdbootstrap.com/docs/standard/getting-started/" target="_blank"
9+
role="button">Start MDB tutorial</a>
10+
<p class="mt-4"><a href="https://mdbootstrap.com/sale/free/"><i class="far fa-lg fa-surprise"></i> Free users
11+
buy cheaper .. </a></p>
3612
</div>
3713
</div>
3814
</div>

src/app/app.component.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,4 @@ import { Component } from '@angular/core';
77
})
88
export class AppComponent {
99
title = 'mdb-angular-ui-kit-free';
10-
11-
successAlert = false;
12-
13-
copyToClipboard(value: string): void {
14-
const tempInput = document.createElement("input");
15-
tempInput.value = value;
16-
document.body.appendChild(tempInput);
17-
tempInput.select();
18-
document.execCommand("copy");
19-
document.body.removeChild(tempInput);
20-
21-
this.successAlert = true;
22-
23-
setTimeout(() => {
24-
this.successAlert = false;
25-
}, 900);
26-
}
2710
}

0 commit comments

Comments
 (0)