├── src ├── assets │ ├── .gitkeep │ ├── gopro.jpg │ ├── mouse.jpg │ ├── celular.jpg │ ├── full_dev.jpg │ ├── headset.jpg │ ├── laptop.jpg │ ├── monitor.jpg │ ├── mousepad.jpg │ ├── teclado.jpg │ ├── webcam.jpg │ ├── crossplat.jpg │ ├── performance.jpg │ └── produtividade.jpg ├── app │ ├── app.component.scss │ ├── components │ │ ├── about │ │ │ ├── about.component.scss │ │ │ ├── about.component.spec.ts │ │ │ ├── about.component.ts │ │ │ └── about.component.html │ │ ├── contact │ │ │ ├── contact.component.scss │ │ │ ├── contact.component.ts │ │ │ ├── contact.component.spec.ts │ │ │ └── contact.component.html │ │ ├── delivery │ │ │ ├── delivery.component.scss │ │ │ ├── delivery.component.spec.ts │ │ │ ├── delivery.component.ts │ │ │ └── delivery.component.html │ │ └── product-list │ │ │ ├── product-list.component.scss │ │ │ ├── product-list.component.spec.ts │ │ │ ├── product-list.component.ts │ │ │ └── product-list.component.html │ ├── shared │ │ └── components │ │ │ ├── navigation │ │ │ ├── menu │ │ │ │ ├── menu.component.scss │ │ │ │ ├── menu.component.ts │ │ │ │ ├── menu.component.spec.ts │ │ │ │ └── menu.component.html │ │ │ └── footer │ │ │ │ ├── footer.component.scss │ │ │ │ ├── footer.component.html │ │ │ │ ├── footer.component.ts │ │ │ │ └── footer.component.spec.ts │ │ │ ├── work-team │ │ │ ├── work-team.component.scss │ │ │ ├── work-team.component.spec.ts │ │ │ ├── work-team.component.ts │ │ │ └── work-team.component.html │ │ │ └── announcements │ │ │ ├── announcements.component.scss │ │ │ ├── announcements.component.html │ │ │ ├── announcements.component.ts │ │ │ └── announcements.component.spec.ts │ ├── app.component.html │ ├── interfaces │ │ ├── employee.interface.ts │ │ ├── announcement.interface.ts │ │ └── product.interface.ts │ ├── app.component.ts │ ├── services │ │ ├── products.service.spec.ts │ │ └── products.service.ts │ ├── app-routing.module.ts │ ├── app.component.spec.ts │ └── app.module.ts ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── styles.scss ├── main.ts ├── index.html ├── test.ts ├── polyfills.ts └── mocks │ └── db.json ├── .vscode ├── extensions.json ├── launch.json └── tasks.json ├── .editorconfig ├── tsconfig.app.json ├── tsconfig.spec.json ├── .browserslistrc ├── .gitignore ├── tsconfig.json ├── README.md ├── package.json ├── karma.conf.js └── angular.json /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/about/about.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/contact/contact.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/shared/components/navigation/menu/menu.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/shared/components/work-team/work-team.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/shared/components/navigation/footer/footer.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/delivery/delivery.component.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | margin-top: 20px; 3 | } -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/app/shared/components/announcements/announcements.component.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | margin-top: 16px; 3 | } -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /src/assets/gopro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/gopro.jpg -------------------------------------------------------------------------------- /src/assets/mouse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/mouse.jpg -------------------------------------------------------------------------------- /src/assets/celular.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/celular.jpg -------------------------------------------------------------------------------- /src/assets/full_dev.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/full_dev.jpg -------------------------------------------------------------------------------- /src/assets/headset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/headset.jpg -------------------------------------------------------------------------------- /src/assets/laptop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/laptop.jpg -------------------------------------------------------------------------------- /src/assets/monitor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/monitor.jpg -------------------------------------------------------------------------------- /src/assets/mousepad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/mousepad.jpg -------------------------------------------------------------------------------- /src/assets/teclado.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/teclado.jpg -------------------------------------------------------------------------------- /src/assets/webcam.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/webcam.jpg -------------------------------------------------------------------------------- /src/assets/crossplat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/crossplat.jpg -------------------------------------------------------------------------------- /src/assets/performance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/performance.jpg -------------------------------------------------------------------------------- /src/assets/produtividade.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camachoroberto/DIO-reusable-angular-components/HEAD/src/assets/produtividade.jpg -------------------------------------------------------------------------------- /src/app/components/product-list/product-list.component.scss: -------------------------------------------------------------------------------- 1 | .announcements{ 2 | ::ng-deep .alert{ 3 | top: 40px; 4 | } 5 | } -------------------------------------------------------------------------------- /src/app/interfaces/employee.interface.ts: -------------------------------------------------------------------------------- 1 | export interface Employee { 2 | picture: string; 3 | name: string; 4 | position: string; 5 | } 6 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 3 | "recommendations": ["angular.ng-template"] 4 | } 5 | -------------------------------------------------------------------------------- /src/app/interfaces/announcement.interface.ts: -------------------------------------------------------------------------------- 1 | export interface Announcement { 2 | typeAlert: string; 3 | titleText: string; 4 | bodyText: string; 5 | infoText?: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/interfaces/product.interface.ts: -------------------------------------------------------------------------------- 1 | export interface Product { 2 | id: string; 3 | nome: string; 4 | valor: string; 5 | promocao: boolean; 6 | valorPromo: string; 7 | imagem: string; 8 | } 9 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.scss'] 7 | }) 8 | export class AppComponent { 9 | title = 'reusable-angular-components'; 10 | } 11 | -------------------------------------------------------------------------------- /src/app/shared/components/navigation/footer/footer.component.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/app/components/contact/contact.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-contact', 5 | templateUrl: './contact.component.html', 6 | styleUrls: ['./contact.component.scss'] 7 | }) 8 | export class ContactComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit(): void { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/shared/components/navigation/menu/menu.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-menu', 5 | templateUrl: './menu.component.html', 6 | styleUrls: ['./menu.component.scss'] 7 | }) 8 | export class MenuComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit(): void { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | .main-container { 3 | padding-top: 100px; 4 | padding-right: 15px; 5 | padding-left: 15px; 6 | padding-bottom: 100px; 7 | margin-right: auto; 8 | margin-left: auto; 9 | overflow:hidden; 10 | } 11 | 12 | .footer { 13 | height: 50px; 14 | text-align: center; 15 | } -------------------------------------------------------------------------------- /src/app/shared/components/navigation/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-footer', 5 | templateUrl: './footer.component.html', 6 | styleUrls: ['./footer.component.scss'] 7 | }) 8 | export class FooterComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit(): void { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/shared/components/announcements/announcements.component.html: -------------------------------------------------------------------------------- 1 |
2 |

{{infoContext.titleText}}

3 |

{{infoContext.bodyText}}

4 |
5 |
6 |

7 | {{infoContext.infoText}} 8 |

9 |
10 |
-------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /src/app/services/products.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ProductsService } from './products.service'; 4 | 5 | describe('ProductsService', () => { 6 | let service: ProductsService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ProductsService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/shared/components/announcements/announcements.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, OnInit } from '@angular/core'; 2 | import { Announcement } from 'src/app/interfaces/announcement.interface'; 3 | 4 | @Component({ 5 | selector: 'app-announcements', 6 | templateUrl: './announcements.component.html', 7 | styleUrls: ['./announcements.component.scss'], 8 | }) 9 | export class AnnouncementsComponent implements OnInit { 10 | @Input() infoContext: Announcement; 11 | 12 | constructor() {} 13 | 14 | ngOnInit(): void {} 15 | } 16 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 3 | "version": "0.2.0", 4 | "configurations": [ 5 | { 6 | "name": "ng serve", 7 | "type": "pwa-chrome", 8 | "request": "launch", 9 | "preLaunchTask": "npm: start", 10 | "url": "http://localhost:4200/" 11 | }, 12 | { 13 | "name": "ng test", 14 | "type": "chrome", 15 | "request": "launch", 16 | "preLaunchTask": "npm: test", 17 | "url": "http://localhost:9876/debug.html" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ReusableAngularComponents 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | -------------------------------------------------------------------------------- /src/app/components/about/about.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AboutComponent } from './about.component'; 4 | 5 | describe('AboutComponent', () => { 6 | let component: AboutComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AboutComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(AboutComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/app/shared/components/navigation/menu/menu.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { MenuComponent } from './menu.component'; 4 | 5 | describe('MenuComponent', () => { 6 | let component: MenuComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ MenuComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(MenuComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # Compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | /bazel-out 8 | 9 | # Node 10 | /node_modules 11 | npm-debug.log 12 | yarn-error.log 13 | 14 | # IDEs and editors 15 | .idea/ 16 | .project 17 | .classpath 18 | .c9/ 19 | *.launch 20 | .settings/ 21 | *.sublime-workspace 22 | 23 | # Visual Studio Code 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | .history/* 30 | 31 | # Miscellaneous 32 | /.angular/cache 33 | .sass-cache/ 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | testem.log 38 | /typings 39 | 40 | # System files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /src/app/components/contact/contact.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ContactComponent } from './contact.component'; 4 | 5 | describe('ContactComponent', () => { 6 | let component: ContactComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ContactComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(ContactComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/app/components/delivery/delivery.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { DeliveryComponent } from './delivery.component'; 4 | 5 | describe('DeliveryComponent', () => { 6 | let component: DeliveryComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ DeliveryComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(DeliveryComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/app/shared/components/navigation/footer/footer.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { FooterComponent } from './footer.component'; 4 | 5 | describe('FooterComponent', () => { 6 | let component: FooterComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ FooterComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(FooterComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/app/shared/components/work-team/work-team.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { WorkTeamComponent } from './work-team.component'; 4 | 5 | describe('WorkTeamComponent', () => { 6 | let component: WorkTeamComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ WorkTeamComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(WorkTeamComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/app/components/product-list/product-list.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ProductListComponent } from './product-list.component'; 4 | 5 | describe('ProductListComponent', () => { 6 | let component: ProductListComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ProductListComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(ProductListComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/app/shared/components/announcements/announcements.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AnnouncementsComponent } from './announcements.component'; 4 | 5 | describe('AnnouncementsComponent', () => { 6 | let component: AnnouncementsComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AnnouncementsComponent ] 12 | }) 13 | .compileComponents(); 14 | 15 | fixture = TestBed.createComponent(AnnouncementsComponent); 16 | component = fixture.componentInstance; 17 | fixture.detectChanges(); 18 | }); 19 | 20 | it('should create', () => { 21 | expect(component).toBeTruthy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/app/components/delivery/delivery.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Announcement } from 'src/app/interfaces/announcement.interface'; 3 | 4 | @Component({ 5 | selector: 'app-delivery', 6 | templateUrl: './delivery.component.html', 7 | styleUrls: ['./delivery.component.scss'], 8 | }) 9 | export class DeliveryComponent implements OnInit { 10 | public announcementInfos: Announcement; 11 | 12 | constructor() {} 13 | 14 | ngOnInit(): void { 15 | this.setAnnouncement(); 16 | } 17 | 18 | private setAnnouncement(): void { 19 | this.announcementInfos = { 20 | typeAlert: 'alert-success', 21 | titleText: 'E tem mais...', 22 | bodyText: 'O frete fica por nossa conta na sua primeira compra!', 23 | infoText: 'Aproveite os nossos descontos especiais!', 24 | }; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | (id: string): T; 13 | keys(): string[]; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting(), 21 | ); 22 | 23 | // Then we find all the tests. 24 | const context = require.context('./', true, /\.spec\.ts$/); 25 | // And load the modules. 26 | context.keys().forEach(context); 27 | -------------------------------------------------------------------------------- /src/app/components/about/about.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, OnInit } from '@angular/core'; 2 | import { Announcement } from 'src/app/interfaces/announcement.interface'; 3 | 4 | @Component({ 5 | selector: 'app-about', 6 | templateUrl: './about.component.html', 7 | styleUrls: ['./about.component.scss'], 8 | }) 9 | export class AboutComponent implements OnInit { 10 | constructor() {} 11 | 12 | public announcementInfos: Announcement; 13 | 14 | ngOnInit(): void { 15 | this.setAnnouncement(); 16 | } 17 | 18 | private setAnnouncement(): void { 19 | this.announcementInfos = { 20 | typeAlert: 'alert-info', 21 | titleText: 'Quer GANHAR 20% de desconto?', 22 | bodyText: 'Aproveite essa promoção super especial pro resto da semana', 23 | infoText: 'Oferta válida para compras acima de R$1.000', 24 | }; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | import { DeliveryComponent } from './components/delivery/delivery.component'; 5 | import { AboutComponent } from './components/about/about.component'; 6 | import { ContactComponent } from './components/contact/contact.component'; 7 | import { ProductListComponent } from './components/product-list/product-list.component'; 8 | 9 | const routes: Routes = [ 10 | { path: '', redirectTo: '/products', pathMatch: 'full' }, 11 | { path: 'products', component: ProductListComponent }, 12 | { path: 'delivery', component: DeliveryComponent }, 13 | { path: 'contact', component: ContactComponent }, 14 | { path: 'about', component: AboutComponent }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forRoot(routes)], 19 | exports: [RouterModule], 20 | }) 21 | export class AppRoutingModule {} 22 | -------------------------------------------------------------------------------- /src/app/shared/components/work-team/work-team.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Employee } from 'src/app/interfaces/employee.interface'; 3 | import { ProductsService } from 'src/app/services/products.service'; 4 | 5 | @Component({ 6 | selector: 'app-work-team', 7 | templateUrl: './work-team.component.html', 8 | styleUrls: ['./work-team.component.scss'], 9 | }) 10 | export class WorkTeamComponent implements OnInit { 11 | public employes: Employee[] = []; 12 | 13 | constructor(private productsService: ProductsService) {} 14 | 15 | ngOnInit(): void { 16 | this.getEmployes(); 17 | } 18 | 19 | private getEmployes(): void { 20 | this.productsService.getEmployes().subscribe({ 21 | next: (employes) => { 22 | this.employes = employes; 23 | }, 24 | error: (err) => console.error(err), 25 | complete: () => console.info('complete:', this.employes), 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strictPropertyInitialization": false, 9 | "strict": true, 10 | "noImplicitOverride": true, 11 | "noPropertyAccessFromIndexSignature": true, 12 | "noImplicitReturns": true, 13 | "noFallthroughCasesInSwitch": true, 14 | "sourceMap": true, 15 | "declaration": false, 16 | "downlevelIteration": true, 17 | "experimentalDecorators": true, 18 | "moduleResolution": "node", 19 | "importHelpers": true, 20 | "target": "es2020", 21 | "module": "es2020", 22 | "lib": [ 23 | "es2020", 24 | "dom" 25 | ] 26 | }, 27 | "angularCompilerOptions": { 28 | "enableI18nLegacyMessageIdFormat": false, 29 | "strictInjectionParameters": true, 30 | "strictInputAccessModifiers": true, 31 | "strictTemplates": true 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/app/services/products.service.ts: -------------------------------------------------------------------------------- 1 | import { Employee } from './../interfaces/employee.interface'; 2 | import { Injectable } from '@angular/core'; 3 | import { HttpClient } from '@angular/common/http'; 4 | import { Observable } from 'rxjs'; 5 | 6 | import { Product } from '../interfaces/product.interface'; 7 | 8 | @Injectable({ 9 | providedIn: 'root', 10 | }) 11 | export class ProductsService { 12 | constructor(private http: HttpClient) {} 13 | 14 | protected UrlServiceV1: string = 'http://localhost:3000/'; 15 | 16 | /** 17 | * Método responsavel por chamar o serviço dos produtos 18 | * @returns Lista de Produtos 19 | */ 20 | public getProducts(): Observable { 21 | return this.http.get(this.UrlServiceV1 + 'products'); 22 | } 23 | 24 | /** 25 | * Método responsavel por chamar o serviço que lista a equipe de trabalho 26 | * @returns Lista de Trabalhadores 27 | */ 28 | public getEmployes(): Observable { 29 | return this.http.get(this.UrlServiceV1 + 'employes'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558 3 | "version": "2.0.0", 4 | "tasks": [ 5 | { 6 | "type": "npm", 7 | "script": "start", 8 | "isBackground": true, 9 | "problemMatcher": { 10 | "owner": "typescript", 11 | "pattern": "$tsc", 12 | "background": { 13 | "activeOnStart": true, 14 | "beginsPattern": { 15 | "regexp": "(.*?)" 16 | }, 17 | "endsPattern": { 18 | "regexp": "bundle generation complete" 19 | } 20 | } 21 | } 22 | }, 23 | { 24 | "type": "npm", 25 | "script": "test", 26 | "isBackground": true, 27 | "problemMatcher": { 28 | "owner": "typescript", 29 | "pattern": "$tsc", 30 | "background": { 31 | "activeOnStart": true, 32 | "beginsPattern": { 33 | "regexp": "(.*?)" 34 | }, 35 | "endsPattern": { 36 | "regexp": "bundle generation complete" 37 | } 38 | } 39 | } 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /src/app/shared/components/work-team/work-team.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
6 |
{{employee.name}}
{{employee.position}} 7 | 16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ReusableAngularComponents 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.0. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. 28 | # DIO-reusable-angular-components- 29 | -------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(async () => { 7 | await TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | }); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'reusable-angular-components'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.componentInstance; 26 | expect(app.title).toEqual('reusable-angular-components'); 27 | }); 28 | 29 | it('should render title', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.nativeElement as HTMLElement; 33 | expect(compiled.querySelector('.content span')?.textContent).toContain('reusable-angular-components app is running!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reusable-angular-components", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "watch": "ng build --watch --configuration development", 9 | "test": "ng test", 10 | "db": "json-server --watch src/mocks/db.json" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "^14.0.2", 15 | "@angular/common": "^14.0.2", 16 | "@angular/compiler": "^14.0.2", 17 | "@angular/core": "^14.0.2", 18 | "@angular/forms": "^14.0.2", 19 | "@angular/platform-browser": "^14.0.2", 20 | "@angular/platform-browser-dynamic": "^14.0.2", 21 | "@angular/router": "^14.0.2", 22 | "rxjs": "~7.5.5", 23 | "tslib": "^2.4.0", 24 | "zone.js": "~0.11.6" 25 | }, 26 | "devDependencies": { 27 | "@angular-devkit/build-angular": "^14.0.2", 28 | "@angular/cli": "~14.0.2", 29 | "@angular/compiler-cli": "^14.0.2", 30 | "@types/jasmine": "~4.0.3", 31 | "npm-check-updates": "^14.0.1", 32 | "jasmine-core": "~4.2.0", 33 | "json-server": "^0.17.0", 34 | "karma": "~6.4.0", 35 | "karma-chrome-launcher": "~3.1.1", 36 | "karma-coverage": "~2.2.0", 37 | "karma-jasmine": "~5.1.0", 38 | "karma-jasmine-html-reporter": "~2.0.0", 39 | "typescript": "~4.7.4" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/app/shared/components/navigation/menu/menu.component.html: -------------------------------------------------------------------------------- 1 | 2 | 27 | -------------------------------------------------------------------------------- /src/app/components/product-list/product-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | import { ProductsService } from '../../services/products.service'; 4 | import { Product } from '../../interfaces/product.interface'; 5 | import { Announcement } from '../../interfaces/announcement.interface'; 6 | 7 | @Component({ 8 | selector: 'app-product-list', 9 | templateUrl: './product-list.component.html', 10 | styleUrls: ['./product-list.component.scss'], 11 | }) 12 | export class ProductListComponent implements OnInit { 13 | public announcementInfos: Announcement; 14 | public products: Product[] = []; 15 | 16 | constructor(private productsService: ProductsService) {} 17 | 18 | ngOnInit(): void { 19 | this.setAnnouncement(); 20 | this.getProducts(); 21 | } 22 | 23 | private setAnnouncement(): void { 24 | this.announcementInfos = { 25 | typeAlert: 'alert-secondary', 26 | titleText: 'Quer GANHAR 20% de desconto?', 27 | bodyText: 'Aproveite essa promoção super especial pro resto da semana', 28 | infoText: 'Oferta válida para compras acima de R$1.000', 29 | }; 30 | } 31 | 32 | private getProducts(): void { 33 | this.productsService.getProducts().subscribe({ 34 | next: (products) => { 35 | this.products = products; 36 | }, 37 | error: (err) => console.error(err), 38 | complete: () => console.info('complete:', this.products), 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | jasmine: { 17 | // you can add configuration options for Jasmine here 18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html 19 | // for example, you can disable the random execution with `random: false` 20 | // or set a specific seed with `seed: 4321` 21 | }, 22 | clearContext: false // leave Jasmine Spec Runner output visible in browser 23 | }, 24 | jasmineHtmlReporter: { 25 | suppressAll: true // removes the duplicated traces 26 | }, 27 | coverageReporter: { 28 | dir: require('path').join(__dirname, './coverage/reusable-angular-components'), 29 | subdir: '.', 30 | reporters: [ 31 | { type: 'html' }, 32 | { type: 'text-summary' } 33 | ] 34 | }, 35 | reporters: ['progress', 'kjhtml'], 36 | port: 9876, 37 | colors: true, 38 | logLevel: config.LOG_INFO, 39 | autoWatch: true, 40 | browsers: ['Chrome'], 41 | singleRun: false, 42 | restartOnFileChange: true 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | 4 | import { registerLocaleData } from '@angular/common'; 5 | import localePt from '@angular/common/locales/pt'; 6 | 7 | import { AppRoutingModule } from './app-routing.module'; 8 | import { AppComponent } from './app.component'; 9 | import { DeliveryComponent } from './components/delivery/delivery.component'; 10 | import { MenuComponent } from './shared/components/navigation/menu/menu.component'; 11 | import { FooterComponent } from './shared/components/navigation/footer/footer.component'; 12 | import { ContactComponent } from './components/contact/contact.component'; 13 | import { AboutComponent } from './components/about/about.component'; 14 | import { ProductsService } from './services/products.service'; 15 | import { ProductListComponent } from './components/product-list/product-list.component'; 16 | import { HttpClientModule } from '@angular/common/http'; 17 | import { AnnouncementsComponent } from './shared/components/announcements/announcements.component'; 18 | import { WorkTeamComponent } from './shared/components/work-team/work-team.component'; 19 | 20 | registerLocaleData(localePt); 21 | 22 | @NgModule({ 23 | declarations: [ 24 | AppComponent, 25 | DeliveryComponent, 26 | MenuComponent, 27 | FooterComponent, 28 | ContactComponent, 29 | AboutComponent, 30 | ProductListComponent, 31 | AnnouncementsComponent, 32 | WorkTeamComponent, 33 | ], 34 | imports: [BrowserModule, AppRoutingModule, HttpClientModule], 35 | providers: [ProductsService], 36 | bootstrap: [AppComponent], 37 | }) 38 | export class AppModule {} 39 | -------------------------------------------------------------------------------- /src/app/components/product-list/product-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 |
7 | 8 |
9 | 10 |
11 |
12 | 13 |

{{ product.nome | titlecase }}

14 |
15 |

Promoção!

16 |

Por apenas:

17 |
18 | 19 |
20 |
21 |

De: 22 | 23 | {{ product.valor | currency:'BRL':'symbol':'1.2-2':'pt' }} 24 | 25 | 26 | 27 |
28 | Por: {{ product.valorPromo | currency:'BRL':'symbol':'1.2-2':'pt' }} 29 |

30 |
31 |
32 | 33 |
34 |
35 |

{{ product.valor | currency:'BRL':'symbol':'1.2-2':'pt' }}

36 |
37 |
38 | 39 | 44 |
45 |
46 |
47 |
-------------------------------------------------------------------------------- /src/app/components/contact/contact.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |
7 |

Formulário De Contato

8 |
9 | 10 |
11 |
12 |
13 |
14 | 15 | 17 |
18 |
19 |
20 |
21 | 22 | 24 |
25 |
26 |
27 |
28 | 29 | 30 |
31 |
32 |
33 |
34 | 35 | 37 |
38 | 39 | 40 | 41 | 42 |
43 |
-------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes recent versions of Safari, Chrome (including 12 | * Opera), Edge on the desktop, and iOS and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** 22 | * By default, zone.js will patch all possible macroTask and DomEvents 23 | * user can disable parts of macroTask/DomEvents patch by setting following flags 24 | * because those flags need to be set before `zone.js` being loaded, and webpack 25 | * will put import in the top of bundle, so user need to create a separate file 26 | * in this directory (for example: zone-flags.ts), and put the following flags 27 | * into that file, and then add the following code before importing zone.js. 28 | * import './zone-flags'; 29 | * 30 | * The flags allowed in zone-flags.ts are listed here. 31 | * 32 | * The following flags will work for all browsers. 33 | * 34 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 35 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 36 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 37 | * 38 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 39 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 40 | * 41 | * (window as any).__Zone_enable_cross_context_check = true; 42 | * 43 | */ 44 | 45 | /*************************************************************************************************** 46 | * Zone JS is required by default for Angular itself. 47 | */ 48 | import 'zone.js'; // Included with Angular CLI. 49 | 50 | 51 | /*************************************************************************************************** 52 | * APPLICATION IMPORTS 53 | */ 54 | -------------------------------------------------------------------------------- /src/app/components/about/about.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

Quem somos

6 |

Utilize a criatividade aqui!

7 |
8 |
11 |
12 |
13 |
14 | 15 |
16 |
17 |
18 |
19 |

Lorem ipsum dolor sit amet

20 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do 21 | eiusmod tempor incididunt ut labore et dolore magna aliqua.

Learn More 23 |
24 |
27 |
28 |
29 |
32 |
33 |

Lorem ipsum dolor sit amet

34 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do 35 | eiusmod tempor incididunt ut labore et dolore magna aliqua.

Learn More 37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 |
45 |
46 |

Our team

47 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

48 |
49 |
50 | 51 |
52 |
-------------------------------------------------------------------------------- /src/app/components/delivery/delivery.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 7 |
8 |
9 |

Serviço de entrega do jeito que você precisa

10 |

O jeito mais prático do seu pacote chegar em todo o Brasil

11 |
12 |
13 |
14 |
15 | 16 |
17 | 18 | 19 |
20 |
21 |
22 | 23 |
24 |

Ponta a ponta

25 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sapiente esse 26 | necessitatibus neque.

27 |
28 | 31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 |

Menor custo

39 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo magni 40 | sapiente, tempore debitis beatae culpa natus architecto.

41 |
42 | 45 |
46 |
47 | 48 |
49 |
50 | 51 |
52 |

3 vezes mais rápido

53 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sapiente esse 54 | necessitatibus neque.

55 |
56 | 59 |
60 |
61 | 62 |
63 |
64 | 65 |
66 |

Alta tecnologia

67 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo magni 68 | sapiente, tempore debitis beatae culpa natus architecto.

69 |
70 | 73 |
74 |
75 |
76 |
77 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "reusable-angular-components": { 7 | "projectType": "application", 8 | "schematics": { 9 | "@schematics/angular:component": { 10 | "style": "scss" 11 | }, 12 | "@schematics/angular:application": { 13 | "strict": true 14 | } 15 | }, 16 | "root": "", 17 | "sourceRoot": "src", 18 | "prefix": "app", 19 | "architect": { 20 | "build": { 21 | "builder": "@angular-devkit/build-angular:browser", 22 | "options": { 23 | "outputPath": "dist/reusable-angular-components", 24 | "index": "src/index.html", 25 | "main": "src/main.ts", 26 | "polyfills": "src/polyfills.ts", 27 | "tsConfig": "tsconfig.app.json", 28 | "inlineStyleLanguage": "scss", 29 | "assets": [ 30 | "src/favicon.ico", 31 | "src/assets" 32 | ], 33 | "styles": [ 34 | "src/styles.scss" 35 | ], 36 | "scripts": [] 37 | }, 38 | "configurations": { 39 | "production": { 40 | "budgets": [ 41 | { 42 | "type": "initial", 43 | "maximumWarning": "500kb", 44 | "maximumError": "1mb" 45 | }, 46 | { 47 | "type": "anyComponentStyle", 48 | "maximumWarning": "2kb", 49 | "maximumError": "4kb" 50 | } 51 | ], 52 | "fileReplacements": [ 53 | { 54 | "replace": "src/environments/environment.ts", 55 | "with": "src/environments/environment.prod.ts" 56 | } 57 | ], 58 | "outputHashing": "all" 59 | }, 60 | "development": { 61 | "buildOptimizer": false, 62 | "optimization": false, 63 | "vendorChunk": true, 64 | "extractLicenses": false, 65 | "sourceMap": true, 66 | "namedChunks": true 67 | } 68 | }, 69 | "defaultConfiguration": "production" 70 | }, 71 | "serve": { 72 | "builder": "@angular-devkit/build-angular:dev-server", 73 | "configurations": { 74 | "production": { 75 | "browserTarget": "reusable-angular-components:build:production" 76 | }, 77 | "development": { 78 | "browserTarget": "reusable-angular-components:build:development" 79 | } 80 | }, 81 | "defaultConfiguration": "development" 82 | }, 83 | "extract-i18n": { 84 | "builder": "@angular-devkit/build-angular:extract-i18n", 85 | "options": { 86 | "browserTarget": "reusable-angular-components:build" 87 | } 88 | }, 89 | "test": { 90 | "builder": "@angular-devkit/build-angular:karma", 91 | "options": { 92 | "main": "src/test.ts", 93 | "polyfills": "src/polyfills.ts", 94 | "tsConfig": "tsconfig.spec.json", 95 | "karmaConfig": "karma.conf.js", 96 | "inlineStyleLanguage": "scss", 97 | "assets": [ 98 | "src/favicon.ico", 99 | "src/assets" 100 | ], 101 | "styles": [ 102 | "src/styles.scss" 103 | ], 104 | "scripts": [] 105 | } 106 | } 107 | } 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/mocks/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "products": [ 3 | { 4 | "id": 1, 5 | "nome": "mouse Microsoft", 6 | "valor": 15.90, 7 | "promocao": false, 8 | "valorPromo": 0, 9 | "imagem": "mouse.jpg" 10 | }, 11 | { 12 | "id": 2, 13 | "nome": "Teclado Microsoft", 14 | "valor": 30.00, 15 | "promocao": false, 16 | "valorPromo": 0, 17 | "imagem": "teclado.jpg" 18 | }, 19 | { 20 | "id": 3, 21 | "nome": "Monitor Samsung", 22 | "valor": 250.00, 23 | "promocao": false, 24 | "valorPromo": 0, 25 | "imagem": "monitor.jpg" 26 | }, 27 | { 28 | "id": 4, 29 | "nome": "Laptop Asus", 30 | "valor": 3000.00, 31 | "promocao": true, 32 | "valorPromo": 999.90, 33 | "imagem": "laptop.jpg" 34 | }, 35 | { 36 | "id": 5, 37 | "nome": "Headset Microsoft", 38 | "valor": 10.50, 39 | "promocao": false, 40 | "valorPromo": 0, 41 | "imagem": "headset.jpg" 42 | }, 43 | { 44 | "id": 6, 45 | "nome": "Webcam Logitech", 46 | "valor": 90.00, 47 | "promocao": true, 48 | "valorPromo": 49.99, 49 | "imagem": "webcam.jpg" 50 | }, 51 | { 52 | "id": 7, 53 | "nome": "Galaxy S10+", 54 | "valor": 3000.00, 55 | "promocao": false, 56 | "valorPromo": 0, 57 | "imagem": "celular.jpg" 58 | }, 59 | { 60 | "id": 8, 61 | "nome": "Mousepad Microsoft", 62 | "valor": 5.50, 63 | "promocao": false, 64 | "valorPromo": 0, 65 | "imagem": "mousepad.jpg" 66 | }, 67 | { 68 | "id": 9, 69 | "nome": "Go Pro 8", 70 | "valor": 300.00, 71 | "promocao": false, 72 | "valorPromo": 0, 73 | "imagem": "gopro.jpg" 74 | } 75 | ], 76 | "employes": [ 77 | { 78 | "picture": "https://res.cloudinary.com/mhmd/image/upload/v1556834132/avatar-4_ozhrib.png", 79 | "name": "Mara Tristão Abasto", 80 | "position": "Diretor" 81 | }, 82 | { 83 | "picture": "https://user-images.githubusercontent.com/5709133/50445980-88299a80-0912-11e9-962a-6fd92fd18027.png", 84 | "name": "Mateo Lemes Ximenes", 85 | "position": "Diretor" 86 | }, 87 | { 88 | "picture": "https://res.cloudinary.com/mhmd/image/upload/v1556834130/avatar-3_hzlize.png", 89 | "name": "Rafael Gravato Pegado", 90 | "position": "Analista de Mídia" 91 | }, 92 | { 93 | "picture": "https://res.cloudinary.com/mhmd/image/upload/v1556834133/avatar-2_f8dowd.png", 94 | "name": "Éric Cortês Faustino", 95 | "position": "Analista de logística" 96 | }, 97 | { 98 | "picture": "https://res.cloudinary.com/mhmd/image/upload/v1556834133/avatar-1_s02nlg.png", 99 | "name": "Fausto Ornelas Setúbal", 100 | "position": "Analista de logística" 101 | }, 102 | { 103 | "picture": "https://freeiconshop.com/wp-content/uploads/edd/person-girl-flat.png", 104 | "name": "Riana Paulos Faleiro", 105 | "position": "Customer Service" 106 | }, 107 | { 108 | "picture": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQfZDabpYnE3St-xoZZgVSGgRMIn3km-RjzE4YooiGV5R4kklAzNzb8GVZwLGCHzPW4puQ&usqp=CAU", 109 | "name": "Mellyssa Granja Patrício", 110 | "position": "Customer Service" 111 | }, 112 | { 113 | "picture": "https://freeiconshop.com/wp-content/uploads/edd/person-girl-flat.png", 114 | "name": "Bruna Canhão Gabeira", 115 | "position": "Promotor de vendas" 116 | }, 117 | { 118 | "picture": "https://cdn.iconscout.com/icon/free/png-256/avatar-1659503-1410025.png", 119 | "name": "Lyah Doutel Varanda", 120 | "position": "Promotor de vendas" 121 | }, 122 | { 123 | "picture": "https://fiverr-res.cloudinary.com/images/t_main1,q_auto,f_auto,q_auto,f_auto/gigs/21760012/original/d4c0c142f91f012c9a8a9c9aeef3bac28036f15b/create-your-cartoon-style-flat-avatar-or-icon.jpg", 124 | "name": "Silvestre Boto Franca ", 125 | "position": "Promotor de vendas" 126 | }, 127 | { 128 | "picture": "https://freeiconshop.com/wp-content/uploads/edd/person-girl-flat.png", 129 | "name": "Rossana Frois Ribeiro", 130 | "position": "Promotor de vendas" 131 | }, 132 | { 133 | "picture": "https://res.cloudinary.com/mhmd/image/upload/v1556834132/avatar-4_ozhrib.png", 134 | "name": "Yasmim Malheiro Morgado", 135 | "position": "Promotor de vendas" 136 | } 137 | ] 138 | } --------------------------------------------------------------------------------