-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
203 changed files
with
15,927 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<title>404</title> | ||
|
||
<base href="/nebular/"> | ||
|
||
<script type="text/javascript" src="assets/ghspa.js"></script> | ||
</head> | ||
|
||
<body> | ||
| ||
| ||
| ||
| ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* @license | ||
* Copyright Akveo. All Rights Reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*/ | ||
|
||
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { throwIfAlreadyLoaded } from './module-import-guard'; | ||
import { DataModule } from './data/data.module'; | ||
|
||
const PIPES = [ | ||
]; | ||
|
||
const NB_CORE_PROVIDERS = [ | ||
...DataModule.forRoot().providers, | ||
]; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
], | ||
exports: [...PIPES], | ||
declarations: [...PIPES], | ||
}) | ||
export class CoreModule { | ||
constructor(@Optional() @SkipSelf() parentModule: CoreModule) { | ||
throwIfAlreadyLoaded(parentModule, 'CoreModule'); | ||
} | ||
|
||
static forRoot(): ModuleWithProviders { | ||
return <ModuleWithProviders>{ | ||
ngModule: CoreModule, | ||
providers: [ | ||
...NB_CORE_PROVIDERS, | ||
], | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* @license | ||
* Copyright Akveo. All Rights Reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*/ | ||
|
||
import { NgModule, ModuleWithProviders } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { HeaderMenuService } from './service/header-menu.service'; | ||
import { ReviewsService } from './service/reviews.service'; | ||
import { DescriptionsService } from './service/descriptions.service'; | ||
import { BundlesService } from './service/bundles.service'; | ||
|
||
const SERVICES = [ | ||
HeaderMenuService, | ||
ReviewsService, | ||
DescriptionsService, | ||
BundlesService, | ||
]; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
], | ||
providers: [ | ||
...SERVICES, | ||
], | ||
}) | ||
export class DataModule { | ||
static forRoot(): ModuleWithProviders { | ||
return <ModuleWithProviders>{ | ||
ngModule: DataModule, | ||
providers: [ | ||
...SERVICES, | ||
], | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { of as observableOf, Observable } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import { HttpClient } from '@angular/common/http'; | ||
|
||
export interface Product { | ||
id: string; | ||
imageUrl: string; | ||
storeUrl: string; | ||
tags: string[]; | ||
title: string; | ||
description: string; | ||
variants: ProductVariant[]; | ||
} | ||
|
||
export interface ProductVariant { | ||
available: boolean; | ||
compare_at_price: string; | ||
price: string; | ||
title: string; | ||
} | ||
|
||
export const BUNDLE_LICENSE = { | ||
single: 'single', | ||
multi: 'multi', | ||
}; | ||
|
||
export class Feature { | ||
text: string; | ||
availableInPersonalLicence: boolean; | ||
availableInCommercialLicence: boolean; | ||
} | ||
|
||
@Injectable() | ||
export class BundlesService { | ||
|
||
private readonly STORE_PRODUCTS: string = 'https://store.akveo.com/collections/frontpage/products.json'; | ||
private readonly STORE: string = 'https://store.akveo.com/collections/all/products'; | ||
|
||
private features: Feature[] = [ | ||
{ | ||
text: 'ngx-admin template with 100+ UI components integrated with Backend Services', | ||
availableInPersonalLicence: true, | ||
availableInCommercialLicence: true, | ||
}, | ||
{ | ||
text: 'Backend Services and Repository layers with data access', | ||
availableInPersonalLicence: true, | ||
availableInCommercialLicence: true, | ||
}, | ||
{ | ||
text: 'JWT Authentication setup for UI and Backend', | ||
availableInPersonalLicence: true, | ||
availableInCommercialLicence: true, | ||
}, | ||
{ | ||
text: 'Running instructions and code documentation', | ||
availableInPersonalLicence: true, | ||
availableInCommercialLicence: true, | ||
}, | ||
{ | ||
text: 'Commercial Usage', | ||
availableInPersonalLicence: true, | ||
availableInCommercialLicence: true, | ||
}, | ||
{ | ||
text: 'Create multiple end products using bundle', | ||
availableInPersonalLicence: false, | ||
availableInCommercialLicence: true, | ||
}, | ||
{ | ||
text: 'Bug fixes and questions according to license terms', | ||
availableInPersonalLicence: false, | ||
availableInCommercialLicence: true, | ||
}, | ||
]; | ||
|
||
constructor(private http: HttpClient) {} | ||
|
||
getFeatures(): Observable<Feature[]> { | ||
return observableOf(this.features); | ||
} | ||
|
||
getProducts(): Observable<Product[]> { | ||
return this.http.get(this.STORE_PRODUCTS) | ||
.pipe(map((result: any) => { | ||
return result.products.map((item: any) => { | ||
return { | ||
id: item.id, | ||
imageUrl: this.getDefaultImage(item.images), | ||
storeUrl: `${this.STORE}/${item.handle}`, | ||
tags: item.tags, | ||
title: item.title, | ||
description: (item.body_html as string).trim().replace(/^<p>/, '').replace(/<\/p>$/, ''), | ||
variants: item.variants.map(variant => { | ||
return { | ||
available: variant.available, | ||
compare_at_price: variant.compare_at_price, | ||
price: variant.price, | ||
title: variant.title, | ||
}; | ||
}), | ||
}; | ||
}); | ||
})); | ||
} | ||
|
||
getDefaultImage(images: any[]): any { | ||
const defaultImage = images.reduce((value, current) => { | ||
if (!value) { | ||
value = current; | ||
} | ||
return value; | ||
}); | ||
return defaultImage ? this.trimImageUrl(defaultImage.src) : undefined; | ||
} | ||
|
||
trimImageUrl(url: string): string { | ||
return url.substring(0, url.indexOf('?')); | ||
} | ||
} |
Oops, something went wrong.