Skip to content

Commit

Permalink
Merge branch 'develop' into snyk-fix-2rzh7u
Browse files Browse the repository at this point in the history
  • Loading branch information
evereq authored May 6, 2019
2 parents a4423fd + 52acbd6 commit 470f508
Show file tree
Hide file tree
Showing 37 changed files with 5,259 additions and 2,387 deletions.
4 changes: 4 additions & 0 deletions admin/website-angular/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ Thumbs.db
.env.prod
/src/environments/environment.ts
/src/environments/environment.prod.ts

# storybook builds

/storybook-static
3 changes: 3 additions & 0 deletions admin/website-angular/.storybook/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
import '@storybook/addon-notes/register';
4 changes: 3 additions & 1 deletion admin/website-angular/.storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { configure } from '@storybook/angular';

// automatically import all files ending in *.stories.ts
const req = require.context('../src/', true, /\.stories\.ts$/);
function loadStories() {
require('../src/stories/index.ts');
req.keys().forEach((filename) => req(filename));
}

configure(loadStories, module);
13 changes: 10 additions & 3 deletions admin/website-angular/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"extends": "../tsconfig.json",
"exclude": ["../src/test.ts", "../src/**/*.spec.ts"],
"include": ["../src/**/*"]
"extends": "../src/tsconfig.app.json",
"compilerOptions": {
"types": ["node", "googlemaps"]
},
"exclude": [
"../src/test.ts",
"../src/**/*.spec.ts",
"../projects/**/*.spec.ts"
],
"include": ["../src/**/*", "../projects/**/*"]
}
160 changes: 83 additions & 77 deletions admin/website-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"config": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn ts-node ./scripts/configure.ts",
"config:dev": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config -- --environment=dev",
"config:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 yarn run config -- --environment=prod",
"start": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && yarn build && ng serve",
"start": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && ng serve",
"build": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && ng build",
"build:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 yarn run config:prod && yarn run build -- --prod --aot",
"test": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && ng test",
Expand All @@ -54,153 +54,159 @@
"docs": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && compodoc -p src/tsconfig.app.json -d docs",
"docs:serve": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && compodoc -p src/tsconfig.app.json -d docs -s",
"release:changelog": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && yarn run conventional-changelog -- -p angular -i CHANGELOG.md -s",
"storybook": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && start-storybook -p 9001 -c .storybook"
"storybook": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && start-storybook -p 9001 -c .storybook",
"build-storybook": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && build-storybook -c .storybook"
},
"dependencies": {
"@agm/core": "^1.0.0-beta.5",
"@angular/animations": "^7.2.11",
"@angular/cdk": "^7.3.6",
"@angular/common": "^7.2.11",
"@angular/compiler": "^7.2.11",
"@angular/core": "^7.2.11",
"@angular/forms": "^7.2.11",
"@angular/http": "^7.2.11",
"@angular/platform-browser": "^7.2.11",
"@angular/platform-browser-dynamic": "^7.2.11",
"@angular/router": "^7.2.11",
"@asymmetrik/ngx-leaflet": "^5.0.1",
"@fortawesome/fontawesome-free": "^5.7.2",
"@nebular/auth": "^3.2.1",
"@nebular/bootstrap": "^3.2.1",
"@nebular/security": "^3.2.1",
"@nebular/theme": "^3.2.1",
"@ng-bootstrap/ng-bootstrap": "^4.0.3",
"@ng-select/ng-select": "^2.15.3",
"@angular/animations": "^7.2.14",
"@angular/cdk": "^7.3.7",
"@angular/common": "^7.2.14",
"@angular/compiler": "^7.2.14",
"@angular/core": "^7.2.14",
"@angular/forms": "^7.2.14",
"@angular/http": "^7.2.14",
"@angular/platform-browser": "^7.2.14",
"@angular/platform-browser-dynamic": "^7.2.14",
"@angular/router": "^7.2.14",
"@asymmetrik/ngx-leaflet": "^5.0.2",
"@fortawesome/fontawesome-free": "^5.8.1",
"@nebular/auth": "^3.5.0",
"@nebular/bootstrap": "^3.5.0",
"@nebular/security": "^3.5.0",
"@nebular/theme": "^3.5.0",
"@ng-bootstrap/ng-bootstrap": "^4.1.1",
"@ng-select/ng-select": "^2.18.0",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"@swimlane/ngx-charts": "^10.0.0",
"@swimlane/ngx-charts": "^10.1.0",
"angular-2-dropdown-multiselect": "^1.9.0",
"angular-tree-component": "^8.2.0",
"angular-tree-component": "^8.3.0",
"angular2-chartjs": "^0.5.1",
"angular2-logger": "^0.7.0",
"angular2-toaster": "^7.0.0",
"angular2-wizard": "github:maiyaporn/angular2-wizard#pull/56/head",
"apollo-angular": "^1.5.0",
"apollo-angular-link-http": "^1.4.0",
"apollo-cache-inmemory": "^1.4.3",
"apollo-client": "^2.4.13",
"apollo-link": "^1.2.8",
"apollo-link-context": "^1.0.14",
"apollo-link-ws": "^1.0.14",
"apollo-angular-link-http": "^1.6.0",
"apollo-cache-inmemory": "^1.5.1",
"apollo-client": "^2.5.1",
"apollo-link": "^1.2.11",
"apollo-link-context": "^1.0.17",
"apollo-link-ws": "^1.0.17",
"apollo-upload-client": "^10.0.0",
"bootstrap": "^4.3.1",
"buffer": "^5.2.1",
"chart.js": "^2.7.3",
"ckeditor": "^4.11.2",
"chart.js": "^2.8.0",
"ckeditor": "^4.11.4",
"classlist.js": "1.1.20150312",
"core-js": "^2.6.4",
"core-js": "^3.0.1",
"cryptiles": "^4.1.3",
"echarts": "^4.2.1-rc.1",
"echarts": "^4.2.1",
"eva-icons": "^1.1.1",
"faker": "^4.1.0",
"fingerprintjs2": "^2.0.6",
"global": "^4.3.2",
"graphql": "^14.1.1",
"graphql": "^14.2.1",
"graphql-tag": "^2.10.1",
"highlight.js": "^9.14.2",
"intl": "1.2.5",
"ionicons": "^4.5.5",
"intl": "^1.2.5",
"ionicons": "^4.5.6",
"is-url": "^1.2.4",
"jquery": "^3.3.1",
"jquery": "^3.4.0",
"jsbarcode": "^3.11.0",
"leaflet": "^1.4.0",
"moment": "^2.24.0",
"nebular-icons": "1.1.0",
"ng-simple-slideshow": "^1.2.8",
"ng-simple-slideshow": "^1.2.9",
"ng2-ckeditor": "^1.2.2",
"ng2-completer": "2.0.8",
"ng2-file-upload": "^1.3.0",
"ng2-simple-timer": "^6.0.0",
"ng2-smart-table": "1.3.5",
"ng2-smart-table": "^1.4.0",
"ng2-tree": "^2.0.0-rc.11",
"ngx-echarts": "^4.1.0",
"ngx-echarts": "^4.1.1",
"ngx-highlightjs": "^2.1.4",
"ngx-moment": "^3.3.0",
"ngx-moment": "^3.4.0",
"ngx-translate-multi-http-loader": "^3.0.0",
"node-sass": "^4.11.0",
"normalize.css": "^8.0.1",
"pace-js": "1.0.2",
"popper.js": "^1.14.7",
"popper.js": "^1.15.0",
"qrcode": "^1.3.3",
"reflect-metadata": "^0.1.13",
"roboto-fontface": "^0.10.0",
"rxjs": "^6.4.0",
"rxjs-compat": "^6.4.0",
"socicon": "3.0.5",
"rxjs": "^6.5.1",
"rxjs-compat": "^6.5.1",
"socicon": "^3.0.5",
"socket.io-client": "^2.2.0",
"stripe": "^6.25.0",
"subscriptions-transport-ws": "^0.9.15",
"tinymce": "^5.0.0",
"stripe": "^6.31.0",
"subscriptions-transport-ws": "^0.9.16",
"tinymce": "^5.0.4",
"tslib": "^1.9.3",
"typeface-exo": "^0.0.61",
"uuid": "^3.3.2",
"web-animations-js": "^2.3.1",
"zen-observable": "^0.8.13",
"zone.js": "^0.8.29"
"zen-observable": "^0.8.14",
"zone.js": "^0.9.0"
},
"devDependencies": {
"conventional-changelog-cli": "^2.0.12",
"@angular-devkit/architect": "^0.13.8",
"@angular-devkit/build-angular": "^0.13.8",
"@angular-devkit/build-webpack": "^0.13.8",
"@angular-devkit/architect": "^0.13.8",
"@angular-devkit/core": "^7.3.8",
"@angular-devkit/schematics": "^7.3.8",
"@angular/cli": "^7.3.8",
"@angular/compiler-cli": "^7.2.11",
"@angular/language-service": "^7.2.11",
"@babel/core": "^7.4.0",
"@angular/compiler-cli": "^7.2.14",
"@angular/language-service": "^7.2.14",
"@babel/core": "^7.4.3",
"@compodoc/compodoc": "^1.1.9",
"@storybook/addon-actions": "^5.0.6",
"@storybook/angular": "^5.0.6",
"@storybook/addon-actions": "^5.0.10",
"@storybook/addon-knobs": "^5.0.10",
"@storybook/addon-links": "^5.0.10",
"@storybook/addon-notes": "^5.0.10",
"@storybook/addons": "^5.0.10",
"@storybook/angular": "^5.0.10",
"@types/async": "^2.4.1",
"@types/d3-color": "^1.2.2",
"@types/faker": "^4.1.5",
"@types/googlemaps": "^3.30.16",
"@types/googlemaps": "^3.30.19",
"@types/highlight.js": "^9.12.3",
"@types/jasmine": "^3.3.9",
"@types/jasmine": "^3.3.12",
"@types/jasminewd2": "^2.0.6",
"@types/leaflet": "^1.4.2",
"@types/mongodb": "^3.1.19",
"@types/mongoose": "^5.3.16",
"@types/leaflet": "^1.4.4",
"@types/mongodb": "^3.1.25",
"@types/mongoose": "^5.3.26",
"@types/node": "^11.9.3",
"@types/socket.io-client": "^1.4.32",
"@types/stripe": "^6.25.7",
"@types/stripe": "^6.25.12",
"@types/uuid": "^3.4.4",
"@types/yargs": "^13.0.0",
"babel-loader": "^8.0.5",
"codelyzer": "^4.5.0",
"codelyzer": "^5.0.1",
"conventional-changelog-cli": "^2.0.17",
"cross-env": "^5.2.0",
"dotenv": "^6.2.0",
"envalid": "^4.2.2",
"husky": "^1.3.1",
"jasmine-core": "^3.3.0",
"dotenv": "^7.0.0",
"envalid": "^5.0.0",
"husky": "^2.1.0",
"jasmine-core": "^3.4.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.0.0",
"karma": "^4.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "^2.0.0",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-jasmine-html-reporter": "^1.4.2",
"npm-run-all": "^4.1.5",
"protractor": "^5.4.2",
"rimraf": "^2.6.3",
"rxjs-tslint": "0.1.5",
"stylelint": "^9.10.1",
"ts-node": "^8.0.2",
"tslint": "^5.12.1",
"tslint-language-service": "^0.9.9",
"typescript": "~3.1.6",
"webpack-dev-server": "^3.2.1",
"yargs": "^13.1.0"
"stylelint": "^10.0.1",
"ts-node": "^8.1.0",
"tslint": "^5.16.0",
"typescript-tslint-plugin": "^0.3.1",
"typescript": "~3.2.4",
"webpack-dev-server": "^3.3.1",
"yargs": "^13.2.2"
},
"engines": {
"node": ">=10.15.0",
Expand Down
34 changes: 34 additions & 0 deletions admin/website-angular/src/app/@core/utils/i18n.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import {
TranslateModule,
TranslateLoader,
TranslateService
} from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';

// AoT requires an exported function for factories
export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http);
}

@NgModule({
declarations: [],
imports: [
HttpClientModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient]
}
})
],
exports: [TranslateModule]
})
export class I18nModule {
constructor(translate: TranslateService) {
translate.setDefaultLang('en');
translate.use('en');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export class CategoriesTableComponent implements OnInit, OnDestroy {
private readonly _modalService: NgbModal,
private readonly _notifyService: NotifyService,
private readonly modalService: NgbModal
) {}
) {
this._translateService.setDefaultLang('en');
this._translateService.use('en');
}

get hasSelectedCategories(): boolean {
return this._selectedCategories.length > 0;
Expand Down
Loading

0 comments on commit 470f508

Please sign in to comment.