Skip to content

Commit 85dd451

Browse files
authored
Merge branch 'master' into sstoychev/dark-crm-2-master
2 parents 174afcf + 8d9061e commit 85dd451

5 files changed

Lines changed: 178 additions & 8 deletions

File tree

gulpfile.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,66 @@ gulp.task("overwrite-package-json", (done) => {
5050
done();
5151
});
5252

53+
const createPrependerdLobStructure = (cb) => {
54+
const folders = [
55+
'./dist/app-lob/samples',
56+
'./dist/app-lob/samples/grid',
57+
'./dist/app-lob/samples/tree-grid',
58+
'./dist/app-lob/samples/grid-finjs-dock-manager',
59+
'./dist/app-lob/samples/hierarchical-grid',
60+
'./dist/app-lob/grid',
61+
'./dist/app-lob/tree-grid',
62+
'./dist/app-lob/grid-finjs-dock-manager',
63+
'./dist/app-lob/hierarchical-grid'
64+
];
65+
folders.forEach(dir => {
66+
if (!fs.existsSync(dir)) {
67+
fs.mkdirSync(dir);
68+
}
69+
});
70+
cb();
71+
}
72+
73+
const addPrerenderedLobPages = (cb) => {
74+
const { metadata } = require('./projects/app-lob/src/app/metadata');
75+
const indexFilePath = path.resolve(__dirname, './', 'dist/app-lob', 'index.html');
76+
77+
// read in the index.html file
78+
fs.readFile(indexFilePath, 'utf8', function (err, data) {
79+
if (err) {
80+
return console.error(err);
81+
}
82+
83+
metadata.forEach(({ url, title, description, og_url, folder }) => {
84+
let result = data;
85+
result = result.replace(/\$OG_TITLE/g, title);
86+
result = result.replace(/\$OG_DESCRIPTION/g, description);
87+
result = result.replace(/\$OG_URL/g, og_url);
88+
89+
let filename = url.substring(1).replace(/\//g, '-');
90+
if (filename.length) {
91+
filename = filename + '.html';
92+
} else {
93+
filename = 'index.html';
94+
}
95+
96+
fs.writeFile(path.resolve(__dirname, './', './dist/app-lob/samples/' + folder, filename), result, (err) => {
97+
if (err) {
98+
console.log(err);
99+
}
100+
});
101+
fs.writeFile(path.resolve(__dirname, './', './dist/app-lob/' + folder, filename), result, (err) => {
102+
if (err) {
103+
console.log(err);
104+
}
105+
});
106+
})
107+
})
108+
cb();
109+
}
110+
111+
exports.prerenderPages = gulp.series(createPrependerdLobStructure, addPrerenderedLobPages);
112+
53113
gulp.task("watch-live-editing", gulp.series("generate-live-editing", () => {
54114
gulp.watch(["./src/**/*.*", "!./src/assets/**", "./live-editing/**/*.*", "package.json"], function () {
55115
Object.keys(require.cache).forEach(function (key) {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"watch-live-editing": "gulp watch-live-editing",
1616
"sass-js-compile-check": "gulp sass-js-compile-check",
1717
"build": "gulp generate-live-editing && gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build --configuration production",
18-
"build:app-lob": "gulp generate-live-editing --appDv=true && gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-lob --configuration production",
18+
"build:app-lob": "gulp generate-live-editing --appDv=true && gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-lob --configuration production && gulp prerenderPages",
1919
"build:app-crm": "ng build app-crm --configuration production",
2020
"test": "ng test",
2121
"lint": "node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng lint",
@@ -26,7 +26,7 @@
2626
"start:app-lob:live-editing": "gulp generate-live-editing --appDv=true && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng serve app-lob -o",
2727
"lint:app-crm": "ng lint app-crm",
2828
"build-ci": "gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build --configuration production",
29-
"build-ci:app-lob": "gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-lob --configuration production",
29+
"build-ci:app-lob": "gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-lob --configuration production && gulp prerenderPages",
3030
"build-ci:app-crm": "gulp overwrite-package-json && node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng build app-crm --configuration production",
3131
"repositoryfyAngularDemos": "gulp repositoryfyAngularDemos",
3232
"repositoryfyAngularDemos:prod": "gulp repositoryfyAngularDemos --configuration production",
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
const Routes = {
2+
Landing: '/',
3+
GridFinjs: '/grid-finjs',
4+
TreeGridFinjs: '/treegrid-finjs',
5+
TreeGridChilddatakey: '/treegrid-childdatakey',
6+
TreeGridPrimaryforeignkey: '/treegrid-primaryforeignkey',
7+
BostonMarathon: '/grid',
8+
MasterDetail: '/grid-master-detail',
9+
FinJsDockManagerGrid: '/grid-finjs-dock-manager',
10+
HierarchicalGrid: '/hierarchical-grid-resizing',
11+
}
12+
13+
const defaultTitle = 'Data Grids built with Ignite UI for Angular';
14+
const defaultDescription = 'Data Grids built with Ignite UI for Angular Description';
15+
const defaultOgUrl = 'https://www.infragistics.com';
16+
17+
const metadata = [
18+
{
19+
url: Routes.Landing,
20+
title: defaultTitle,
21+
description: defaultDescription,
22+
og_url: defaultOgUrl,
23+
folder: ''
24+
},
25+
{
26+
url: Routes.GridFinjs,
27+
title: 'Real-Time Financial Analysis Data Grid built with Ignite UI for Angular',
28+
description: 'Real-Time Financial Analysis Data Grid built with Ignite UI for Angular',
29+
og_url: 'https://www.infragistics.com/angular-demos-lob/grid-finjs',
30+
folder: ''
31+
},
32+
{
33+
url: Routes.TreeGridFinjs,
34+
title: 'Angular Tree Grid Example built with Ignite UI for Angular',
35+
description: 'Angular Tree Grid Example built with Ignite UI for Angular',
36+
og_url: 'https://www.infragistics.com/angular-demos-lob/treegrid-finjs',
37+
folder: ''
38+
},
39+
{
40+
url: Routes.TreeGridChilddatakey,
41+
title: 'Build Better Modern Web Experiences, Faster with Angular Components',
42+
description: 'Create feature-rich, progressive web apps with Ignite UI for Angular! A complete library for Angular native UI components, including the fastest Angular data grid and 60+ high-performance charts.',
43+
og_url: 'https://www.infragistics.com/angular-demos-lob/tree-grid/treegrid-childdatakey',
44+
folder: 'tree-grid'
45+
},
46+
{
47+
url: Routes.TreeGridPrimaryforeignkey,
48+
title: 'Build Better Modern Web Experiences, Faster with Angular Components',
49+
description: 'Create feature-rich, progressive web apps with Ignite UI for Angular! A complete library for Angular native UI components, including the fastest Angular data grid and 60+ high-performance charts.',
50+
og_url: 'https://www.infragistics.com/angular-demos-lob/tree-grid/treegrid-primaryforeignkey',
51+
folder: 'tree-grid'
52+
},
53+
{
54+
url: Routes.BostonMarathon,
55+
title: 'Boston Marathon 2020 – Angular Data Grid Example',
56+
description: 'Boston Marathon 2020 – Angular Data Grid Example',
57+
og_url: 'https://www.infragistics.com/angular-demos-lob/grid/grid',
58+
folder: 'grid'
59+
},
60+
{
61+
url: Routes.MasterDetail,
62+
title: 'Angular Grid Master-Detail Example built with Ignite UI for Angular',
63+
description: 'Angular Grid Master-Detail Example built with Ignite UI for Angular',
64+
og_url: 'https://www.infragistics.com/angular-demos-lob/grid/grid-master-detail',
65+
folder: 'grid'
66+
},
67+
{
68+
url: Routes.FinJsDockManagerGrid,
69+
title: 'Build Better Modern Web Experiences, Faster with Angular Components',
70+
description: 'Create feature-rich, progressive web apps with Ignite UI for Angular! A complete library for Angular native UI components, including the fastest Angular data grid and 60+ high-performance charts.',
71+
og_url: 'https://www.infragistics.com/angular-demos-lob/grid-finjs-dock-manager/grid-finjs-dock-manager',
72+
folder: 'grid-finjs-dock-manager'
73+
},
74+
{
75+
url: Routes.HierarchicalGrid,
76+
title: 'Build Better Modern Web Experiences, Faster with Angular Components',
77+
description: 'Create feature-rich, progressive web apps with Ignite UI for Angular! A complete library for Angular native UI components, including the fastest Angular data grid and 60+ high-performance charts.',
78+
og_url: 'https://www.infragistics.com/angular-demos-lob/hierarchical-grid/hierarchical-grid-resizing',
79+
folder: 'hierarchical-grid'
80+
}
81+
];
82+
83+
const get = (route) => {
84+
const data = metadata.find(({ url }) => url === route);
85+
if (data) {
86+
return data;
87+
} else {
88+
return {
89+
url: route,
90+
title: defaultTitle,
91+
description: defaultDescription,
92+
og_url: defaultOgUrl
93+
}
94+
}
95+
}
96+
97+
module.exports = {
98+
metadata,
99+
Routes,
100+
get,
101+
};

projects/app-lob/src/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@
33

44
<head>
55
<meta charset="utf-8">
6-
<title>Angular Demos with DV</title>
76
<base href="/">
87

98
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<title>$OG_TITLE</title>
10+
<meta property="og:title" content="$OG_TITLE">
11+
<meta property="og:description" content="$OG_DESCRIPTION">
12+
<meta property="og:url" content="$OG_URL">
13+
<meta property="og:image" content="https://avatars0.githubusercontent.com/u/5366066?s=400&amp;amp;v=4">
14+
<meta property="og:image:width" content="300"/>
15+
<meta property="og:image:height" content="300"/>
16+
<meta property="twitter:image" content="https://avatars0.githubusercontent.com/u/5366066?s=400&amp;amp;v=4"/>
17+
<meta property="og:type" content="website">
18+
<meta name="twitter:card" content="summary">
1019
<link rel="icon" type="image/x-icon" href="favicon.ico">
1120
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
1221
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,600,700" rel="stylesheet">

src/app/grid/grid-editing-style-sample/grid-editing-style-sample.component.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $color-palette: palette($primary: $white, $secondary: $blue);
77

88
$grid-theme: grid-theme(
99
$cell-editing-background: $blue,
10-
$cell-active-border-color: $white,
10+
$cell-active-border-color: $blue,
1111
$cell-edited-value-color: $white,
1212
$edit-mode-color: color($color-palette, "secondary", 200)
1313
);
@@ -38,11 +38,11 @@ $input-theme: input-group-theme(
3838
:host {
3939
::ng-deep {
4040
.igx-grid__tbody{
41-
@include input-group($input-theme);
41+
@include css-vars($input-theme);
4242
}
43-
@include checkbox($checkbox-theme);
44-
@include calendar($datepicker-theme);
45-
@include grid($grid-theme);
43+
@include css-vars($checkbox-theme);
44+
@include css-vars($datepicker-theme);
45+
@include css-vars($grid-theme);
4646
}
4747
}
4848

0 commit comments

Comments
 (0)