Skip to content

Commit 0fc4205

Browse files
committed
fix(grid-crm): fix imports for stackblit
1 parent 255ee24 commit 0fc4205

File tree

7 files changed

+22
-18
lines changed

7 files changed

+22
-18
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# samples assets
1212
/src/assets/samples
1313
/projects/app-lob/src/assets/samples
14+
/projects/app-crm/src/assets/samples
1415

1516
# IDEs and editors
1617
/.idea

gulpfile.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ const getSampleNameFromFileName = (fileName, sampleBaseDir) => fileName.replace(
139139
var assetsRegex = new RegExp(/([\.]{0,2}\/)*assets\//g);
140140

141141
const processApp = (projectPath, dest, directoriesToExclude) => {
142-
console.log('process start')
143142
if (!fs.existsSync(submodule)) {
144143
return console.error("No submodule found");
145144
}
@@ -186,16 +185,12 @@ const processApp = (projectPath, dest, directoriesToExclude) => {
186185

187186
// Configure sample application file structure
188187
const fileName = file.path.substring(file.base.length + 1).replace(".json", "");
189-
console.log(fileName)
190188
let sampleBaseDir = fileName.indexOf("--") !== -1 ? fileName.substring(0, fileName.indexOf("--")) : "";
191-
console.log(sampleBaseDir)
192189
if (sampleBaseDir && !fs.existsSync(submoduleAppDest + sampleBaseDir)) {
193190
fs.mkdirSync(submoduleAppDest + sampleBaseDir);
194191
}
195192
const sampleName = sampleBaseDir ? getSampleNameFromFileName(fileName, sampleBaseDir) : fileName;
196-
console.log(sampleName)
197193
const sampleAppPath = submoduleAppDest + sampleBaseDir + "/" + sampleName;
198-
console.log(sampleAppPath)
199194

200195
if (!fs.existsSync(sampleAppPath)) {
201196
fs.mkdirSync(sampleAppPath);
@@ -234,9 +229,11 @@ const processApp = (projectPath, dest, directoriesToExclude) => {
234229

235230
const processDemosWithScss = () => processApp("src", "angular-demos", "data");
236231
const processDemosLobWithScss = () => processApp("projects/app-lob/src", "angular-demos-lob", "services");
232+
const processDemosCrmWithScss = () => processApp("projects/app-crm/src", "angular-demos-grid-crm");
237233

238234
let repositoryfyAngularDemos;
239235
let repositoryfyAngularDemosLob;
236+
let repositoryfyAngularDemosCrm;
240237

241238
const cleanupAngularDemos = (cb) => {
242239
fsExtra.removeSync(submodule + "/angular-demos");
@@ -249,5 +246,13 @@ const cleanupAngularDemosLob = (cb) => {
249246
fsExtra.mkdirSync(submodule + "/angular-demos-lob");
250247
cb();
251248
}
249+
250+
const cleanupAngularDemosCrm = (cb) => {
251+
fsExtra.removeSync(submodule + "/angular-demos-grid-crm");
252+
fsExtra.mkdirSync(submodule + "/angular-demos-grid-crm");
253+
cb();
254+
}
255+
252256
exports.repositoryfyAngularDemos = repositoryfyAngularDemos = gulp.series(cleanupAngularDemos, processDemosWithScss);
253-
exports.repositoryfyAngularDemosLob = repositoryfyAngularDemosLob = gulp.series(cleanupAngularDemosLob, processDemosLobWithScss);
257+
exports.repositoryfyAngularDemosLob = repositoryfyAngularDemosLob = gulp.series(cleanupAngularDemosLob, processDemosLobWithScss);
258+
exports.repositoryfyAngularDemosCrm = repositoryfyAngularDemosCrm = gulp.series(cleanupAngularDemosCrm, processDemosCrmWithScss);

live-editing/configs/GridCRMConfigGenerator.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,21 @@ export class GridCRMConfigGenerator implements IConfigGenerator {
2828
'/src/app/directives/prevent-scroll.directive.ts',
2929
'/projects/app-crm/src/_app-layout.scss',
3030
'/projects/app-crm/src/_variables.scss',
31-
'/projects/app-crm/src/app/grid-crm/data.ts'
31+
'/projects/app-crm/src/app/grid-crm/data.ts',
32+
'/projects/app-crm/src/assets/images/propeller-logo.svg'
3233
],
3334
additionalDependencies: [],
3435
appModuleConfig: new AppModuleConfig({
3536
imports: [
3637
'RouterModule', 'HammerModule', 'IgxAutocompleteModule', 'IgxRippleModule',
3738
'IgxGridModule', 'IgxIconModule', 'IgxLayoutModule',
3839
'IgxAvatarModule', 'IgxInputGroupModule', 'IgxButtonModule',
39-
'IgxPreventDocumentScrollModule', 'GridsCrmModule'
40+
'IgxPreventDocumentScrollModule', 'GridCRMComponent'
4041
],
41-
ngDeclarations: [],
42+
ngDeclarations: ['GridCRMComponent'],
4243
ngImports: ['IgxPreventDocumentScrollModule', 'IgxRippleModule',
4344
'IgxGridModule', 'IgxIconModule', 'IgxLayoutModule',
44-
'IgxAvatarModule', 'IgxInputGroupModule', 'IgxButtonModule', 'GridsCrmModule']
45+
'IgxAvatarModule', 'IgxInputGroupModule', 'IgxButtonModule']
4546
})
4647
}));
4748

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
"repositoryfyAngularDemos:prod": "gulp repositoryfyAngularDemos --configuration production",
3535
"repositoryfyAngularDemosLob": "gulp repositoryfyAngularDemosLob",
3636
"repositoryfyAngularDemosLob:prod": "gulp repositoryfyAngularDemosLob --configuration production",
37+
"repositoryfyAngularDemosCrm": "gulp repositoryfyAngularDemosCrm",
38+
"repositoryfyAngularDemosCrm:prod": "gulp repositoryfyAngularDemosCrm --configuration production",
3739
"build:stats": "ng build --stats-json",
3840
"analyze": "webpack-bundle-analyzer dist/app/stats.json"
3941
},

projects/app-crm/src/app/grid-crm/grid-crm.component.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
QueryList,
88
ViewChild
99
} from '@angular/core';
10-
import { ActivatedRoute } from '@angular/router';
1110
import {
1211
CloseScrollStrategy,
1312
ConnectedPositioningStrategy,
@@ -133,8 +132,7 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
133132

134133
constructor(
135134
private csvExporter: IgxCsvExporterService,
136-
private excelExporter: IgxExcelExporterService,
137-
private activatedRoute: ActivatedRoute) {
135+
private excelExporter: IgxExcelExporterService) {
138136

139137
const exporterCb = (args: IColumnExportingEventArgs) => {
140138
if (args.field === 'Deals') { args.cancel = true; }
@@ -150,9 +148,6 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
150148
this.getDeals(employee);
151149
}
152150
this.localData = employees;
153-
this.activatedRoute.queryParams.subscribe(params => {
154-
this.dark = !!params.dark;
155-
});
156151
}
157152

158153
public toggleHiding() {

projects/app-crm/src/assets/samples/grid-crm.json

+1-1
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"generationTimeStamp":1670397625889}
1+
{"generationTimeStamp":1670402409865}

0 commit comments

Comments
 (0)