├── src ├── material │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── app │ │ │ ├── app.component.css │ │ │ ├── components │ │ │ │ ├── grid │ │ │ │ │ ├── grid.component.css │ │ │ │ │ ├── grid.component.ts │ │ │ │ │ ├── grid.component.spec.ts │ │ │ │ │ └── grid.component.html │ │ │ │ ├── menu │ │ │ │ │ ├── menu.component.css │ │ │ │ │ ├── menu.component.ts │ │ │ │ │ ├── menu.component.spec.ts │ │ │ │ │ └── menu.component.html │ │ │ │ ├── select │ │ │ │ │ ├── select.component.css │ │ │ │ │ ├── select.component.spec.ts │ │ │ │ │ ├── select.component.ts │ │ │ │ │ └── select.component.html │ │ │ │ ├── slider │ │ │ │ │ ├── slider.component.css │ │ │ │ │ ├── slider.component.ts │ │ │ │ │ ├── slider.component.spec.ts │ │ │ │ │ └── slider.component.html │ │ │ │ ├── form-field │ │ │ │ │ ├── form-field.component.css │ │ │ │ │ ├── form-field.component.spec.ts │ │ │ │ │ ├── form-field.component.ts │ │ │ │ │ └── form-field.component.html │ │ │ │ ├── auto-complete │ │ │ │ │ ├── auto-complete.component.css │ │ │ │ │ ├── auto-complete.component.spec.ts │ │ │ │ │ ├── auto-complete.component.html │ │ │ │ │ └── auto-complete.component.ts │ │ │ │ ├── expansion-panel │ │ │ │ │ ├── expansion-panel.component.css │ │ │ │ │ ├── expansion-panel.component.ts │ │ │ │ │ ├── expansion-panel.component.spec.ts │ │ │ │ │ └── expansion-panel.component.html │ │ │ │ ├── check-input-radio-slide │ │ │ │ │ ├── check-input-radio-slide.component.css │ │ │ │ │ ├── check-input-radio-slide.component.ts │ │ │ │ │ ├── check-input-radio-slide.component.spec.ts │ │ │ │ │ └── check-input-radio-slide.component.html │ │ │ │ ├── card │ │ │ │ │ ├── card.component.css │ │ │ │ │ ├── card.component.ts │ │ │ │ │ ├── card.component.spec.ts │ │ │ │ │ └── card.component.html │ │ │ │ ├── date-picker │ │ │ │ │ ├── date-picker.component.css │ │ │ │ │ ├── date-picker.component.spec.ts │ │ │ │ │ ├── date-picker.component.ts │ │ │ │ │ └── date-picker.component.html │ │ │ │ └── sidenav │ │ │ │ │ ├── sidenav.component.ts │ │ │ │ │ ├── sidenav.component.css │ │ │ │ │ ├── sidenav.component.spec.ts │ │ │ │ │ └── sidenav.component.html │ │ │ ├── app.component.html │ │ │ ├── app.component.ts │ │ │ ├── app-routing.module.ts │ │ │ ├── app.component.spec.ts │ │ │ └── app.module.ts │ │ ├── favicon.ico │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── styles.css │ │ ├── tsconfig.app.json │ │ ├── tslint.json │ │ ├── tsconfig.spec.json │ │ ├── main.ts │ │ ├── browserslist │ │ ├── index.html │ │ ├── test.ts │ │ ├── karma.conf.js │ │ └── polyfills.ts │ ├── e2e │ │ ├── tsconfig.e2e.json │ │ ├── src │ │ │ ├── app.po.ts │ │ │ └── app.e2e-spec.ts │ │ └── protractor.conf.js │ ├── .editorconfig │ ├── tsconfig.json │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── tslint.json │ └── angular.json └── petshop │ ├── src │ ├── assets │ │ ├── .gitkeep │ │ └── js │ │ │ └── components │ │ │ ├── countdown.min.js │ │ │ ├── notification.min.js │ │ │ ├── upload.min.js │ │ │ ├── filter.min.js │ │ │ ├── notification.js │ │ │ ├── parallax.min.js │ │ │ ├── countdown.js │ │ │ ├── slider-parallax.min.js │ │ │ ├── tooltip.min.js │ │ │ ├── sortable.min.js │ │ │ └── upload.js │ ├── app │ │ ├── components │ │ │ ├── shared │ │ │ │ ├── loading │ │ │ │ │ ├── loading.component.css │ │ │ │ │ ├── loading.component.html │ │ │ │ │ └── loading.component.ts │ │ │ │ └── navbar │ │ │ │ │ ├── navbar.component.ts │ │ │ │ │ └── navbar.component.html │ │ │ └── store │ │ │ │ └── product-card │ │ │ │ ├── product-card.component.html │ │ │ │ └── product-card.component.ts │ │ ├── pages │ │ │ ├── account │ │ │ │ ├── pets-page │ │ │ │ │ ├── pets-page.component.css │ │ │ │ │ ├── pets-page.component.ts │ │ │ │ │ └── pets-page.component.html │ │ │ │ ├── profile-page │ │ │ │ │ ├── profile-page.component.css │ │ │ │ │ ├── profile-page.component.html │ │ │ │ │ └── profile-page.component.ts │ │ │ │ ├── signup-page │ │ │ │ │ ├── signup-page.component.css │ │ │ │ │ ├── signup-page.component.html │ │ │ │ │ └── signup-page.component.ts │ │ │ │ ├── login-page │ │ │ │ │ ├── login-page.component.css │ │ │ │ │ ├── login-page.component.html │ │ │ │ │ └── login-page.component.ts │ │ │ │ └── reset-password-page │ │ │ │ │ ├── reset-password-page.component.css │ │ │ │ │ ├── reset-password-page.component.html │ │ │ │ │ └── reset-password-page.component.ts │ │ │ ├── master │ │ │ │ └── frame-page │ │ │ │ │ ├── frame-page.component.css │ │ │ │ │ ├── frame-page.component.html │ │ │ │ │ └── frame-page.component.ts │ │ │ └── store │ │ │ │ ├── cart-page │ │ │ │ ├── cart-page.component.css │ │ │ │ ├── cart-page.component.ts │ │ │ │ └── cart-page.component.html │ │ │ │ ├── checkout-page │ │ │ │ ├── checkout-page.component.css │ │ │ │ ├── checkout-page.component.html │ │ │ │ ├── checkout-page.component.ts │ │ │ │ └── checkout-page.component.spec.ts │ │ │ │ └── products-page │ │ │ │ ├── products-page.component.css │ │ │ │ ├── products-page.component.html │ │ │ │ └── products-page.component.ts │ │ ├── models │ │ │ ├── cart.model.ts │ │ │ ├── user.model.ts │ │ │ ├── product.model.ts │ │ │ └── cart-item.ts │ │ ├── app.component.ts │ │ ├── services │ │ │ ├── auth.service.ts │ │ │ └── data.service.ts │ │ ├── utils │ │ │ ├── cart.util.ts │ │ │ └── security.util.ts │ │ ├── app-routing.module.ts │ │ ├── directives │ │ │ └── mask.directive.ts │ │ ├── app.module.ts │ │ └── validators │ │ │ └── custom.validator.ts │ ├── favicon.ico │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── tsconfig.app.json │ ├── styles.css │ ├── tsconfig.spec.json │ ├── tslint.json │ ├── main.ts │ ├── browserslist │ ├── test.ts │ ├── index.html │ ├── karma.conf.js │ └── polyfills.ts │ ├── e2e │ ├── tsconfig.e2e.json │ ├── src │ │ ├── app.po.ts │ │ └── app.e2e-spec.ts │ └── protractor.conf.js │ ├── .editorconfig │ ├── tsconfig.json │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── tslint.json │ └── angular.json └── assets ├── cores.PNG ├── favicon.ico ├── logo ├── bruce.ai ├── bruce.eps ├── bruce.png ├── bruce2.png └── icon.png ├── psd ├── bruce1.png ├── bruce1.psb ├── bruce2.png ├── bruce2.psb ├── ilustra1.png ├── ilustra1.psb ├── ilustra2.png ├── ilustra2.psb ├── ilustra3.png ├── ilustra3.psb ├── ilustra4.png └── ilustra4.psb ├── fonts ├── Nexa_Free_Bold.otf ├── Nexa_Free_Light.otf └── HoneyBee-Regular.ttf ├── style.txt └── 7181.json /src/material/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/material/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/material/src/app/components/grid/grid.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/material/src/app/components/menu/menu.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/material/src/app/components/select/select.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/material/src/app/components/slider/slider.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/material/src/app/components/form-field/form-field.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/app/components/shared/loading/loading.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/pets-page/pets-page.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/master/frame-page/frame-page.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/cart-page/cart-page.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/material/src/app/components/auto-complete/auto-complete.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/profile-page/profile-page.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/signup-page/signup-page.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/checkout-page/checkout-page.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/products-page/products-page.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/material/src/app/components/expansion-panel/expansion-panel.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/login-page/login-page.component.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /assets/cores.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/cores.PNG -------------------------------------------------------------------------------- /assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/favicon.ico -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/reset-password-page/reset-password-page.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/logo/bruce.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/logo/bruce.ai -------------------------------------------------------------------------------- /assets/logo/bruce.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/logo/bruce.eps -------------------------------------------------------------------------------- /assets/logo/bruce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/logo/bruce.png -------------------------------------------------------------------------------- /assets/logo/bruce2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/logo/bruce2.png -------------------------------------------------------------------------------- /assets/logo/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/logo/icon.png -------------------------------------------------------------------------------- /assets/psd/bruce1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/bruce1.png -------------------------------------------------------------------------------- /assets/psd/bruce1.psb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/bruce1.psb -------------------------------------------------------------------------------- /assets/psd/bruce2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/bruce2.png -------------------------------------------------------------------------------- /assets/psd/bruce2.psb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/bruce2.psb -------------------------------------------------------------------------------- /src/material/src/app/components/check-input-radio-slide/check-input-radio-slide.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/psd/ilustra1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/ilustra1.png -------------------------------------------------------------------------------- /assets/psd/ilustra1.psb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/ilustra1.psb -------------------------------------------------------------------------------- /assets/psd/ilustra2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/ilustra2.png -------------------------------------------------------------------------------- /assets/psd/ilustra2.psb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/ilustra2.psb -------------------------------------------------------------------------------- /assets/psd/ilustra3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/ilustra3.png -------------------------------------------------------------------------------- /assets/psd/ilustra3.psb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/ilustra3.psb -------------------------------------------------------------------------------- /assets/psd/ilustra4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/ilustra4.png -------------------------------------------------------------------------------- /assets/psd/ilustra4.psb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/psd/ilustra4.psb -------------------------------------------------------------------------------- /src/material/src/app/components/card/card.component.css: -------------------------------------------------------------------------------- 1 | .card-placeholder { 2 | width: 250px; 3 | } -------------------------------------------------------------------------------- /src/petshop/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/src/petshop/src/favicon.ico -------------------------------------------------------------------------------- /src/material/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/material/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/src/material/src/favicon.ico -------------------------------------------------------------------------------- /assets/fonts/Nexa_Free_Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/fonts/Nexa_Free_Bold.otf -------------------------------------------------------------------------------- /assets/fonts/Nexa_Free_Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/fonts/Nexa_Free_Light.otf -------------------------------------------------------------------------------- /src/material/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/petshop/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /assets/fonts/HoneyBee-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balta-io/7187/HEAD/assets/fonts/HoneyBee-Regular.ttf -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/checkout-page/checkout-page.component.html: -------------------------------------------------------------------------------- 1 |

2 | checkout-page works! 3 |

4 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/master/frame-page/frame-page.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /src/material/src/app/components/date-picker/date-picker.component.css: -------------------------------------------------------------------------------- 1 | .selected-date { 2 | background: orange; 3 | border-radius: 100%; 4 | } -------------------------------------------------------------------------------- /src/material/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import "~@angular/material/prebuilt-themes/indigo-pink.css"; 3 | -------------------------------------------------------------------------------- /src/petshop/src/app/models/cart.model.ts: -------------------------------------------------------------------------------- 1 | import { CartItem } from './cart-item'; 2 | 3 | export class Cart { 4 | constructor( 5 | public items: CartItem[] = [] 6 | ) { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /src/petshop/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | template: '' 6 | }) 7 | export class AppComponent { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/material/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/petshop/src/app/models/user.model.ts: -------------------------------------------------------------------------------- 1 | export class User { 2 | constructor( 3 | public _id: string, 4 | public name: string, 5 | public document: string, 6 | public email: string 7 | ) { 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /src/petshop/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/petshop/src/app/models/product.model.ts: -------------------------------------------------------------------------------- 1 | export class Product { 2 | public _id: string; 3 | public title: string; 4 | public category: string; 5 | public description: string; 6 | public price: number; 7 | public images: string[]; 8 | } -------------------------------------------------------------------------------- /src/petshop/src/app/components/shared/loading/loading.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 |

4 |
5 |

6 |

7 |

8 |

9 |
10 | -------------------------------------------------------------------------------- /src/petshop/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | .uk-form-danger { 3 | border: 2px solid #ff0000 !important; 4 | } 5 | 6 | button:disabled { 7 | background-color: rgba(0, 0, 0, 0.2) !important; 8 | } 9 | -------------------------------------------------------------------------------- /src/petshop/src/app/models/cart-item.ts: -------------------------------------------------------------------------------- 1 | export class CartItem { 2 | constructor( 3 | public id: string, 4 | public product: string, 5 | public quantity: number, 6 | public price: number, 7 | public image: string 8 | ) { 9 | 10 | } 11 | } -------------------------------------------------------------------------------- /src/material/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.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'material'; 10 | } 11 | -------------------------------------------------------------------------------- /src/material/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /src/petshop/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /src/material/.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 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /src/material/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/material/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | const routes: Routes = []; 5 | 6 | @NgModule({ 7 | imports: [RouterModule.forRoot(routes)], 8 | exports: [RouterModule] 9 | }) 10 | export class AppRoutingModule { } 11 | -------------------------------------------------------------------------------- /src/petshop/.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 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /src/petshop/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/material/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/products-page/products-page.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 | -------------------------------------------------------------------------------- /src/material/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/petshop/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/material/src/app/components/card/card.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-card', 5 | templateUrl: './card.component.html', 6 | styleUrls: ['./card.component.css'] 7 | }) 8 | export class CardComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/material/src/app/components/sidenav/sidenav.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-sidenav', 5 | templateUrl: './sidenav.component.html', 6 | styleUrls: ['./sidenav.component.css'] 7 | }) 8 | export class SidenavComponent implements OnInit { 9 | 10 | constructor() { 11 | } 12 | 13 | ngOnInit() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/petshop/src/app/components/shared/loading/loading.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-loading', 5 | templateUrl: './loading.component.html', 6 | styleUrls: ['./loading.component.css'] 7 | }) 8 | export class LoadingComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/pets-page/pets-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-pets-page', 5 | templateUrl: './pets-page.component.html', 6 | styleUrls: ['./pets-page.component.css'] 7 | }) 8 | export class PetsPageComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/material/src/app/components/sidenav/sidenav.component.css: -------------------------------------------------------------------------------- 1 | .container { 2 | position: absolute; 3 | top: 0; 4 | bottom: 0; 5 | left: 0; 6 | right: 0; 7 | } 8 | 9 | mat-sidenav { 10 | width: 280px; 11 | } 12 | 13 | .example-fill-remaining-space { 14 | /* This fills the remaining space, by using flexbox. 15 | Every toolbar row uses a flexbox row layout. */ 16 | flex: 1 1 auto; 17 | } 18 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/master/frame-page/frame-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-frame-page', 5 | templateUrl: './frame-page.component.html', 6 | styleUrls: ['./frame-page.component.css'] 7 | }) 8 | export class FramePageComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/petshop/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/checkout-page/checkout-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-checkout-page', 5 | templateUrl: './checkout-page.component.html', 6 | styleUrls: ['./checkout-page.component.css'] 7 | }) 8 | export class CheckoutPageComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/material/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/petshop/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/material/src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # 5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed 6 | 7 | > 0.5% 8 | last 2 versions 9 | Firefox ESR 10 | not dead 11 | not IE 9-11 -------------------------------------------------------------------------------- /src/petshop/src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # 5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed 6 | 7 | > 0.5% 8 | last 2 versions 9 | Firefox ESR 10 | not dead 11 | not IE 9-11 -------------------------------------------------------------------------------- /src/material/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Material 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/material/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "module": "es2015", 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "importHelpers": true, 13 | "target": "es5", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom" 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/petshop/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "module": "es2015", 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "importHelpers": true, 13 | "target": "es5", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom" 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/material/src/app/components/menu/menu.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | import { MatMenuTrigger } from '@angular/material'; 3 | 4 | @Component({ 5 | selector: 'app-menu', 6 | templateUrl: './menu.component.html', 7 | styleUrls: ['./menu.component.css'] 8 | }) 9 | export class MenuComponent implements OnInit { 10 | @ViewChild(MatMenuTrigger) trigger: MatMenuTrigger; 11 | 12 | open() { 13 | this.trigger.openMenu(); 14 | } 15 | constructor() { } 16 | 17 | ngOnInit() { 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/petshop/src/app/services/auth.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router, CanActivate } from '@angular/router'; 3 | import { Security } from '../utils/security.util'; 4 | 5 | @Injectable() 6 | export class AuthService implements CanActivate { 7 | constructor(private router: Router) { 8 | } 9 | 10 | canActivate() { 11 | const token = Security.getToken(); 12 | if (!token) { 13 | this.router.navigate(['/login']); 14 | return false; 15 | } 16 | 17 | return true; 18 | } 19 | } -------------------------------------------------------------------------------- /src/material/src/app/components/slider/slider.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-slider', 5 | templateUrl: './slider.component.html', 6 | styleUrls: ['./slider.component.css'] 7 | }) 8 | export class SliderComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | formatLabel(value: number | null) { 16 | if (!value) { 17 | return 0; 18 | } 19 | 20 | if (value >= 1000) { 21 | return Math.round(value / 1000) + 'k'; 22 | } 23 | 24 | return value; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/material/src/app/components/expansion-panel/expansion-panel.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-expansion-panel', 5 | templateUrl: './expansion-panel.component.html', 6 | styleUrls: ['./expansion-panel.component.css'] 7 | }) 8 | export class ExpansionPanelComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | step = 0; 15 | 16 | setStep(index: number) { 17 | this.step = index; 18 | } 19 | 20 | nextStep() { 21 | this.step++; 22 | } 23 | 24 | prevStep() { 25 | this.step--; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/material/src/app/components/grid/grid.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-grid', 5 | templateUrl: './grid.component.html', 6 | styleUrls: ['./grid.component.css'] 7 | }) 8 | export class GridComponent implements OnInit { 9 | tiles: any[] = [ 10 | { text: 'One', cols: 3, rows: 1, color: 'lightblue' }, 11 | { text: 'Two', cols: 1, rows: 2, color: 'lightgreen' }, 12 | { text: 'Three', cols: 1, rows: 1, color: 'lightpink' }, 13 | { text: 'Four', cols: 2, rows: 1, color: '#DDBDF1' }, 14 | ]; 15 | 16 | constructor() { } 17 | 18 | ngOnInit() { 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/petshop/src/app/components/shared/navbar/navbar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Security } from 'src/app/utils/security.util'; 3 | import { User } from 'src/app/models/user.model'; 4 | import { Router } from '@angular/router'; 5 | 6 | @Component({ 7 | selector: 'app-navbar', 8 | templateUrl: './navbar.component.html' 9 | }) 10 | export class NavbarComponent implements OnInit { 11 | public user: User; 12 | constructor(private router: Router) { } 13 | 14 | ngOnInit() { 15 | this.user = Security.getUser(); 16 | } 17 | 18 | logout() { 19 | Security.clear(); 20 | this.router.navigate(['/login']); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/products-page/products-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Observable } from 'rxjs'; 3 | import { DataService } from 'src/app/services/data.service'; 4 | import { Product } from 'src/app/models/product.model'; 5 | 6 | @Component({ 7 | selector: 'app-products-page', 8 | templateUrl: './products-page.component.html', 9 | styleUrls: ['./products-page.component.css'] 10 | }) 11 | export class ProductsPageComponent implements OnInit { 12 | products$: Observable = null; 13 | 14 | constructor(private service: DataService) { } 15 | 16 | ngOnInit() { 17 | this.products$ = this.service.getProducts(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/petshop/src/app/components/store/product-card/product-card.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 |

{{ product.price/100 | currency: 'BRL' }}

7 |

8 | {{ product.title }} 9 |

10 | 14 |
15 |
16 | -------------------------------------------------------------------------------- /src/material/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/dist/zone-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: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /src/petshop/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/dist/zone-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: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /src/petshop/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to petshop!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | })); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/material/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` 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/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /src/petshop/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` 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/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /src/material/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to material!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/material/src/app/components/card/card.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CardComponent } from './card.component'; 4 | 5 | describe('CardComponent', () => { 6 | let component: CardComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CardComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CardComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/material/src/app/components/grid/grid.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { GridComponent } from './grid.component'; 4 | 5 | describe('GridComponent', () => { 6 | let component: GridComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ GridComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(GridComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/material/src/app/components/menu/menu.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, 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 | TestBed.configureTestingModule({ 11 | declarations: [ MenuComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(MenuComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/material/src/app/components/grid/grid.component.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | Header 12 |

{{tile.text}}

13 | Footer 14 |
15 |
16 | -------------------------------------------------------------------------------- /src/material/src/app/components/select/select.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SelectComponent } from './select.component'; 4 | 5 | describe('SelectComponent', () => { 6 | let component: SelectComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SelectComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SelectComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/material/src/app/components/slider/slider.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SliderComponent } from './slider.component'; 4 | 5 | describe('SliderComponent', () => { 6 | let component: SliderComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SliderComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SliderComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/material/src/app/components/sidenav/sidenav.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SidenavComponent } from './sidenav.component'; 4 | 5 | describe('SidenavComponent', () => { 6 | let component: SidenavComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SidenavComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SidenavComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/material/src/app/components/slider/slider.component.html: -------------------------------------------------------------------------------- 1 |

Básico

2 | 3 | 4 |
5 | 6 |

Selecionando Valor

7 | 8 | 9 | 10 |
11 | 12 |

Orientação

13 | 14 | 15 | 16 |
17 | 18 |

Inversão

19 | 20 | 21 | 22 |
23 | 24 |

Thumb Label

25 | 26 | 27 | 28 |
29 | 30 |

Formatando Thumb Label

31 | 32 | 33 | 34 |
35 | 36 |

Thick Marks

37 | 38 | 39 | -------------------------------------------------------------------------------- /src/petshop/.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 | 8 | # dependencies 9 | /node_modules 10 | 11 | # profiling files 12 | chrome-profiler-events.json 13 | speed-measure-plugin.json 14 | 15 | # IDEs and editors 16 | /.idea 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | *.sublime-workspace 23 | 24 | # IDE - VSCode 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | .history/* 31 | 32 | # misc 33 | /.sass-cache 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | npm-debug.log 38 | yarn-error.log 39 | testem.log 40 | /typings 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /src/material/src/app/components/check-input-radio-slide/check-input-radio-slide.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormGroup, FormBuilder, Validators } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-check-input-radio-slide', 6 | templateUrl: './check-input-radio-slide.component.html', 7 | styleUrls: ['./check-input-radio-slide.component.css'] 8 | }) 9 | export class CheckInputRadioSlideComponent implements OnInit { 10 | form: FormGroup; 11 | 12 | constructor(private fb: FormBuilder) { } 13 | 14 | ngOnInit() { 15 | this.form = this.fb.group({ 16 | checkbox: true, 17 | email: ['', Validators.compose([ 18 | Validators.required, 19 | Validators.email 20 | ])], 21 | radio: '2', 22 | }); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/material/src/app/components/form-field/form-field.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { FormFieldComponent } from './form-field.component'; 4 | 5 | describe('FormFieldComponent', () => { 6 | let component: FormFieldComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ FormFieldComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(FormFieldComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/petshop/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | dachshop 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/material/src/app/components/date-picker/date-picker.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { DatePickerComponent } from './date-picker.component'; 4 | 5 | describe('DatePickerComponent', () => { 6 | let component: DatePickerComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ DatePickerComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(DatePickerComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/material/src/app/components/auto-complete/auto-complete.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AutoCompleteComponent } from './auto-complete.component'; 4 | 5 | describe('AutoCompleteComponent', () => { 6 | let component: AutoCompleteComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AutoCompleteComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AutoCompleteComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/checkout-page/checkout-page.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CheckoutPageComponent } from './checkout-page.component'; 4 | 5 | describe('CheckoutPageComponent', () => { 6 | let component: CheckoutPageComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CheckoutPageComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CheckoutPageComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/material/.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 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events.json 15 | speed-measure-plugin.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /src/material/src/app/components/date-picker/date-picker.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormControl } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-date-picker', 6 | templateUrl: './date-picker.component.html', 7 | styleUrls: ['./date-picker.component.css'] 8 | }) 9 | export class DatePickerComponent implements OnInit { 10 | date = new FormControl(new Date()); 11 | minDate = new Date(2000, 0, 1); 12 | maxDate = new Date(2020, 0, 1); 13 | 14 | constructor() { } 15 | 16 | ngOnInit() { 17 | } 18 | 19 | myFilter = (d: Date): boolean => { 20 | const day = d.getDay(); 21 | return day !== 0 && day !== 6; 22 | } 23 | 24 | dateClass = (d: Date) => { 25 | const date = d.getDate(); 26 | return (date === 1 || date === 20) ? 'selected-date' : undefined; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/material/src/app/components/expansion-panel/expansion-panel.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ExpansionPanelComponent } from './expansion-panel.component'; 4 | 5 | describe('ExpansionPanelComponent', () => { 6 | let component: ExpansionPanelComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ExpansionPanelComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ExpansionPanelComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/material/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /src/petshop/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /src/material/src/app/components/form-field/form-field.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-form-field', 6 | templateUrl: './form-field.component.html', 7 | styleUrls: ['./form-field.component.css'] 8 | }) 9 | export class FormFieldComponent implements OnInit { 10 | email = new FormControl('', [Validators.required, Validators.email]); 11 | options: FormGroup; 12 | 13 | constructor(fb: FormBuilder) { 14 | this.options = fb.group({ 15 | hideRequired: false, 16 | floatLabel: 'auto', 17 | }); 18 | } 19 | 20 | ngOnInit() { 21 | } 22 | 23 | getErrorMessage() { 24 | return this.email.hasError('required') ? 'Campo obrigatório' : 25 | this.email.hasError('email') ? 'E-mail inválido' : 26 | ''; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/material/src/app/components/check-input-radio-slide/check-input-radio-slide.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CheckInputRadioSlideComponent } from './check-input-radio-slide.component'; 4 | 5 | describe('CheckInputRadioSlideComponent', () => { 6 | let component: CheckInputRadioSlideComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CheckInputRadioSlideComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CheckInputRadioSlideComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/petshop/src/app/components/store/product-card/product-card.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, Input } from '@angular/core'; 2 | import { Product } from 'src/app/models/product.model'; 3 | import { CartUtil } from 'src/app/utils/cart.util'; 4 | import { ToastrService } from 'ngx-toastr'; 5 | 6 | @Component({ 7 | selector: 'app-product-card', 8 | templateUrl: './product-card.component.html' 9 | }) 10 | export class ProductCardComponent implements OnInit { 11 | @Input() product: Product; 12 | 13 | constructor( 14 | private toastr: ToastrService 15 | ) { } 16 | 17 | ngOnInit() { 18 | } 19 | 20 | addToCart() { 21 | CartUtil.add( 22 | this.product._id, 23 | this.product.title, 24 | 1, 25 | this.product.price, 26 | this.product.images[0] 27 | ) 28 | this.toastr.success(`${this.product.title} adicionado ao carrinho`, 'Produto Adicionado'); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/material/src/app/components/card/card.component.html: -------------------------------------------------------------------------------- 1 |
2 | Simple card 3 |
4 | 5 |
6 | 7 |
8 | 9 | 10 | 11 | 12 | Título 13 | Subtítulo 14 | 15 | 16 | 17 | 18 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce viverra commodo aliquet. Maecenas vitae ipsum et 19 | ipsum gravida varius. Aenean dignissim tempor scelerisque. Aenean sollicitudin luctus lectus. Aliquam hendrerit 20 | vestibulum sapien. 21 | 22 | 23 | 24 | 25 | 26 | 27 | Rodapé 28 | 29 | 30 |
31 | -------------------------------------------------------------------------------- /src/petshop/src/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-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/petshop'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /src/material/README.md: -------------------------------------------------------------------------------- 1 | # Material 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.9. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app 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. Use the `--prod` flag for a production build. 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 [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /src/petshop/README.md: -------------------------------------------------------------------------------- 1 | # Petshop 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.0. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app 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. Use the `--prod` flag for a production build. 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 [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /src/material/src/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-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/material'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false, 30 | restartOnFileChange: true 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/cart-page/cart-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Cart } from 'src/app/models/cart.model'; 3 | import { CartUtil } from 'src/app/utils/cart.util'; 4 | import { Router } from '@angular/router'; 5 | 6 | @Component({ 7 | selector: 'app-cart-page', 8 | templateUrl: './cart-page.component.html', 9 | styleUrls: ['./cart-page.component.css'] 10 | }) 11 | export class CartPageComponent implements OnInit { 12 | public cart: Cart = new Cart(); 13 | 14 | constructor( 15 | private router: Router, 16 | ) { } 17 | 18 | ngOnInit() { 19 | this.loadCart(); 20 | } 21 | 22 | public loadCart() { 23 | this.cart = CartUtil.get(); 24 | } 25 | 26 | public total() { 27 | let total = 0; 28 | this.cart.items.forEach((item) => { 29 | total += (item.price * item.quantity); 30 | }); 31 | return total; 32 | } 33 | 34 | public remove(item) { 35 | let index = this.cart.items.indexOf(item); 36 | this.cart.items.splice(index, 1); 37 | CartUtil.update(this.cart); 38 | } 39 | 40 | public clear() { 41 | CartUtil.clear(); 42 | this.loadCart(); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/material/src/app/components/auto-complete/auto-complete.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {{ city }} 31 | 32 | 33 |
34 | -------------------------------------------------------------------------------- /src/material/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } 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 | 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.debugElement.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'material'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.debugElement.componentInstance; 26 | expect(app.title).toEqual('material'); 27 | }); 28 | 29 | it('should render title in a h1 tag', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.debugElement.nativeElement; 33 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to material!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/profile-page/profile-page.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 |
6 |
7 |

Meu Perfil

8 |
9 | 11 |
12 |
13 | 15 |
16 |
17 | 18 |
19 |
20 | 21 |
22 |
23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /src/petshop/src/app/utils/cart.util.ts: -------------------------------------------------------------------------------- 1 | import { CartItem } from '../models/cart-item'; 2 | import { Cart } from '../models/cart.model'; 3 | 4 | export class CartUtil { 5 | public static get(): Cart { 6 | // Recupera os dados do LocalStorage 7 | const data = localStorage.getItem('petshopcart'); 8 | 9 | // Caso não haja dados, retorna um novo carrinho 10 | if (!data) 11 | return new Cart(); 12 | 13 | // Caso haja dados, retorna o carrinho 14 | return JSON.parse(data); 15 | } 16 | 17 | public static add(id: string, product: string, quantity: number, price: number, image: string) { 18 | // Obtém o carrinho 19 | let cart = this.get(); 20 | 21 | // Gera o novo item 22 | const item = new CartItem(id, product, quantity, price, image); 23 | 24 | // Adiciona ao carrinho 25 | cart.items.push(item); 26 | 27 | // Salva no localStorage 28 | localStorage.setItem('petshopcart', JSON.stringify(cart)); 29 | } 30 | 31 | public static update(cart: Cart) { 32 | // Salva no localStorage 33 | localStorage.setItem('petshopcart', JSON.stringify(cart)); 34 | } 35 | 36 | public static clear() { 37 | localStorage.removeItem('petshopcart'); 38 | } 39 | } -------------------------------------------------------------------------------- /src/material/src/app/components/check-input-radio-slide/check-input-radio-slide.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Checkbox

3 | Eu aceito 4 |
5 |

Input

6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 |
14 | 15 | 16 | Dica: Informe seu E-mail 17 | 18 | Campo obrigatório 19 | 20 | 21 | E-mail inválido 22 | 23 | 24 |
25 |

Radio

26 | 27 | Opção 1 28 | Opção 2 29 | 30 |
31 |

Slide Toggle

32 | Marcar 33 |
34 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/reset-password-page/reset-password-page.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | 5 |

6 | 7 | 8 | 9 |
10 |
11 |

Restauração de Senha

12 |
13 | 16 |
17 |
18 | 19 |
20 |
21 |
22 | 23 |

24 | Cancelar 25 |

26 |
27 |
28 | -------------------------------------------------------------------------------- /src/material/src/app/components/auto-complete/auto-complete.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormGroup, FormBuilder } from '@angular/forms'; 3 | import { Observable } from 'rxjs'; 4 | import { map, startWith } from 'rxjs/operators'; 5 | 6 | @Component({ 7 | selector: 'app-auto-complete', 8 | templateUrl: './auto-complete.component.html', 9 | styleUrls: ['./auto-complete.component.css'] 10 | }) 11 | export class AutoCompleteComponent implements OnInit { 12 | form: FormGroup; 13 | cities: string[] = []; 14 | filteredCities: Observable; 15 | 16 | constructor(private fb: FormBuilder) { } 17 | 18 | ngOnInit() { 19 | this.form = this.fb.group({ 20 | city: 'São Paulo' 21 | }); 22 | 23 | this.cities.push("São Paulo"); 24 | this.cities.push("Rio de Janeiro"); 25 | this.cities.push("Brasília"); 26 | this.cities.push("Belo Horizonte"); 27 | this.cities.push("Manaus"); 28 | 29 | this.filteredCities = this.form.controls['city'].valueChanges 30 | .pipe( 31 | startWith(''), 32 | map(value => this._filter(value)) 33 | ); 34 | } 35 | 36 | private _filter(value: string): string[] { 37 | const filterValue = value.toLowerCase(); 38 | return this.cities.filter(option => option.toLowerCase().includes(filterValue)); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/material/src/app/components/select/select.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormControl, Validators } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-select', 6 | templateUrl: './select.component.html', 7 | styleUrls: ['./select.component.css'] 8 | }) 9 | export class SelectComponent implements OnInit { 10 | foods: any[] = [ 11 | { value: 'steak-0', viewValue: 'Steak' }, 12 | { value: 'pizza-1', viewValue: 'Pizza' }, 13 | { value: 'tacos-2', viewValue: 'Tacos' } 14 | ]; 15 | 16 | cars: any[] = [ 17 | { value: 'volvo', viewValue: 'Volvo' }, 18 | { value: 'saab', viewValue: 'Saab' }, 19 | { value: 'mercedes', viewValue: 'Mercedes' } 20 | ]; 21 | 22 | animalControl = new FormControl('', [Validators.required]); 23 | selectFormControl = new FormControl('', Validators.required); 24 | animals: any[] = [ 25 | { name: 'Dog', sound: 'Woof!' }, 26 | { name: 'Cat', sound: 'Meow!' }, 27 | { name: 'Cow', sound: 'Moo!' }, 28 | { name: 'Fox', sound: 'Wa-pa-pa-pa-pa-pa-pow!' }, 29 | ]; 30 | 31 | disableSelect = new FormControl(false); 32 | 33 | toppings = new FormControl(); 34 | toppingList: string[] = ['Extra cheese', 'Mushroom', 'Onion', 'Pepperoni', 'Sausage', 'Tomato']; 35 | 36 | constructor() { } 37 | 38 | ngOnInit() { 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/petshop/src/app/components/shared/navbar/navbar.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 34 |
35 |
36 | -------------------------------------------------------------------------------- /src/petshop/src/app/utils/security.util.ts: -------------------------------------------------------------------------------- 1 | import { User } from "../models/user.model"; 2 | 3 | export class Security { 4 | public static set(user: User, token: string) { 5 | const data = JSON.stringify(user); 6 | 7 | localStorage.setItem('petshopuser', btoa(data)); 8 | localStorage.setItem('petshoptoken', token); 9 | } 10 | 11 | public static setUser(user: User) { 12 | const data = JSON.stringify(user); 13 | localStorage.setItem('petshopuser', btoa(data)); 14 | } 15 | 16 | public static setToken(token: string) { 17 | localStorage.setItem('petshoptoken', token); 18 | } 19 | 20 | public static getUser(): User { 21 | const data = localStorage.getItem('petshopuser'); 22 | if (data) { 23 | return JSON.parse(atob(data)); 24 | } else { 25 | return null; 26 | } 27 | } 28 | 29 | public static getToken(): string { 30 | const data = localStorage.getItem('petshoptoken'); 31 | if (data) { 32 | return data; 33 | } else { 34 | return null; 35 | } 36 | } 37 | 38 | public static hasToken(): boolean { 39 | if (this.getToken()) 40 | return true; 41 | else 42 | return false; 43 | } 44 | 45 | public static clear() { 46 | localStorage.removeItem('petshopuser'); 47 | localStorage.removeItem('petshoptoken'); 48 | } 49 | } -------------------------------------------------------------------------------- /src/petshop/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "petshop", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "^7.2.14", 15 | "@angular/common": "~7.2.0", 16 | "@angular/compiler": "~7.2.0", 17 | "@angular/core": "~7.2.0", 18 | "@angular/forms": "~7.2.0", 19 | "@angular/platform-browser": "~7.2.0", 20 | "@angular/platform-browser-dynamic": "~7.2.0", 21 | "@angular/router": "~7.2.0", 22 | "core-js": "^2.5.4", 23 | "ngx-toastr": "^10.0.2", 24 | "rxjs": "~6.3.3", 25 | "tslib": "^1.9.0", 26 | "zone.js": "~0.8.26" 27 | }, 28 | "devDependencies": { 29 | "@angular-devkit/build-angular": "~0.13.0", 30 | "@angular/cli": "~7.3.0", 31 | "@angular/compiler-cli": "~7.2.0", 32 | "@angular/language-service": "~7.2.0", 33 | "@types/node": "~8.9.4", 34 | "@types/jasmine": "~2.8.8", 35 | "@types/jasminewd2": "~2.0.3", 36 | "codelyzer": "~4.5.0", 37 | "jasmine-core": "~2.99.1", 38 | "jasmine-spec-reporter": "~4.2.1", 39 | "karma": "~3.1.1", 40 | "karma-chrome-launcher": "~2.2.0", 41 | "karma-coverage-istanbul-reporter": "~2.0.1", 42 | "karma-jasmine": "~1.1.2", 43 | "karma-jasmine-html-reporter": "^0.2.2", 44 | "protractor": "~5.4.0", 45 | "ts-node": "~7.0.0", 46 | "tslint": "~5.11.0", 47 | "typescript": "~3.2.2" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/petshop/src/app/services/data.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { HttpClient, HttpHeaders } from '@angular/common/http'; 3 | import { Product } from '../models/product.model'; 4 | 5 | @Injectable({ 6 | providedIn: 'root' 7 | }) 8 | export class DataService { 9 | 10 | public url = 'http://localhost:3000/v1'; 11 | 12 | constructor(private http: HttpClient) { } 13 | 14 | public composeHeaders() { 15 | const token = localStorage.getItem('petshop.token'); 16 | const headers = new HttpHeaders().set('Authorization', `bearer ${token}`); 17 | return headers; 18 | } 19 | 20 | getProducts() { 21 | return this.http.get(`${this.url}/products`); 22 | } 23 | 24 | authenticate(data) { 25 | return this.http.post(`${this.url}/accounts/authenticate`, data); 26 | } 27 | 28 | refreshToken() { 29 | return this.http.post( 30 | `${this.url}/accounts/refresh-token`, 31 | null, 32 | { headers: this.composeHeaders() } 33 | ); 34 | } 35 | 36 | create(data) { 37 | return this.http.post(`${this.url}/accounts`, data); 38 | } 39 | 40 | resetPassword(data) { 41 | return this.http.post(`${this.url}/accounts/reset-password`, data); 42 | } 43 | 44 | getProfile() { 45 | return this.http.get(`${this.url}/accounts`, { headers: this.composeHeaders() }); 46 | } 47 | 48 | updateProfile(data) { 49 | return this.http.put(`${this.url}/accounts`, data, { headers: this.composeHeaders() }); 50 | } 51 | } -------------------------------------------------------------------------------- /src/material/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "material", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "^7.2.15", 15 | "@angular/cdk": "^7.3.7", 16 | "@angular/common": "~7.2.0", 17 | "@angular/compiler": "~7.2.0", 18 | "@angular/core": "~7.2.0", 19 | "@angular/forms": "~7.2.0", 20 | "@angular/material": "^7.3.7", 21 | "@angular/platform-browser": "~7.2.0", 22 | "@angular/platform-browser-dynamic": "~7.2.0", 23 | "@angular/router": "~7.2.0", 24 | "core-js": "^2.5.4", 25 | "hammerjs": "^2.0.8", 26 | "rxjs": "~6.3.3", 27 | "tslib": "^1.9.0", 28 | "zone.js": "~0.8.26" 29 | }, 30 | "devDependencies": { 31 | "@angular-devkit/build-angular": "~0.13.0", 32 | "@angular/cli": "~7.3.9", 33 | "@angular/compiler-cli": "~7.2.0", 34 | "@angular/language-service": "~7.2.0", 35 | "@types/node": "~8.9.4", 36 | "@types/jasmine": "~2.8.8", 37 | "@types/jasminewd2": "~2.0.3", 38 | "codelyzer": "~4.5.0", 39 | "jasmine-core": "~2.99.1", 40 | "jasmine-spec-reporter": "~4.2.1", 41 | "karma": "~4.0.0", 42 | "karma-chrome-launcher": "~2.2.0", 43 | "karma-coverage-istanbul-reporter": "~2.0.1", 44 | "karma-jasmine": "~1.1.2", 45 | "karma-jasmine-html-reporter": "^0.2.2", 46 | "protractor": "~5.4.0", 47 | "ts-node": "~7.0.0", 48 | "tslint": "~5.11.0", 49 | "typescript": "~3.2.2" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/login-page/login-page.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | 5 |

6 | 7 | 8 | 9 |
10 |
11 |

Autentique-se

12 |
13 | 18 |
19 |
20 | 21 |
22 |
23 | 24 |
25 |
26 |
27 | 28 |

29 | Quero me 30 | Cadastrar 31 |
32 | Esqueci minha senha 33 |

34 |
35 |
36 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/reset-password-page/reset-password-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormGroup, FormBuilder, Validators } from '@angular/forms'; 3 | import { Router } from '@angular/router'; 4 | import { DataService } from 'src/app/services/data.service'; 5 | import { CustomValidator } from 'src/app/validators/custom.validator'; 6 | import { ToastrService } from 'ngx-toastr'; 7 | 8 | @Component({ 9 | selector: 'app-reset-password-page', 10 | templateUrl: './reset-password-page.component.html', 11 | styleUrls: ['./reset-password-page.component.css'] 12 | }) 13 | export class ResetPasswordPageComponent implements OnInit { 14 | public form: FormGroup; 15 | public busy = false; 16 | 17 | constructor( 18 | private router: Router, 19 | private service: DataService, 20 | private fb: FormBuilder, 21 | private toastr: ToastrService 22 | ) { 23 | this.form = this.fb.group({ 24 | document: ['', Validators.compose([ 25 | Validators.minLength(14), 26 | Validators.maxLength(14), 27 | Validators.required, 28 | CustomValidator.isCpf() 29 | ])] 30 | }); 31 | } 32 | 33 | ngOnInit() { 34 | } 35 | 36 | submit() { 37 | this.busy = true; 38 | this 39 | .service 40 | .resetPassword(this.form.value) 41 | .subscribe( 42 | (data: any) => { 43 | this.busy = false; 44 | this.toastr.success(data.message, 'Senha Restaurada'); 45 | this.router.navigate(['/login']); 46 | }, 47 | (err) => { 48 | console.log(err); 49 | this.busy = false; 50 | } 51 | ); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/store/cart-page/cart-page.component.html: -------------------------------------------------------------------------------- 1 |
2 | 19 |

20 |
21 |
22 | {{ item.product }} 23 | {{ item.product }}
24 | {{ item.quantity }} unidade(s) 25 |
26 |
27 |
28 | {{ item.price/100 | currency: 'BRL' }} 29 | 30 | 31 | 32 |
33 |
34 | 35 | 36 |
37 |

38 | {{ total()/100 | currency: 'BRL' }} 39 |

40 | 41 | FINALIZAR COMPRA 42 | 43 |
44 |
45 | 46 |
47 |
48 |
49 |
50 |

Seu carrinho está vazio

51 |
52 |
53 |
54 |
55 | -------------------------------------------------------------------------------- /src/petshop/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { LoginPageComponent } from './pages/account/login-page/login-page.component'; 4 | import { SignupPageComponent } from './pages/account/signup-page/signup-page.component'; 5 | import { ResetPasswordPageComponent } from './pages/account/reset-password-page/reset-password-page.component'; 6 | import { FramePageComponent } from './pages/master/frame-page/frame-page.component'; 7 | import { ProductsPageComponent } from './pages/store/products-page/products-page.component'; 8 | import { CartPageComponent } from './pages/store/cart-page/cart-page.component'; 9 | import { CheckoutPageComponent } from './pages/store/checkout-page/checkout-page.component'; 10 | import { PetsPageComponent } from './pages/account/pets-page/pets-page.component'; 11 | import { AuthService } from './services/auth.service'; 12 | import { ProfilePageComponent } from './pages/account/profile-page/profile-page.component'; 13 | 14 | const routes: Routes = [ 15 | { 16 | path: '', 17 | component: FramePageComponent, 18 | canActivate: [AuthService], 19 | children: [ 20 | { path: '', component: ProductsPageComponent }, 21 | { path: 'cart', component: CartPageComponent }, 22 | { path: 'checkout', component: CheckoutPageComponent } 23 | ] 24 | }, 25 | { 26 | path: 'account', 27 | component: FramePageComponent, 28 | children: [ 29 | { path: '', component: ProfilePageComponent }, 30 | { path: 'pets', component: PetsPageComponent }, 31 | ] 32 | }, 33 | { path: 'login', component: LoginPageComponent }, 34 | { path: 'signup', component: SignupPageComponent }, 35 | { path: 'reset-password', component: ResetPasswordPageComponent }, 36 | ]; 37 | 38 | @NgModule({ 39 | imports: [RouterModule.forRoot(routes)], 40 | exports: [RouterModule] 41 | }) 42 | export class AppRoutingModule { } 43 | -------------------------------------------------------------------------------- /src/material/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rulesDirectory": [ 4 | "codelyzer" 5 | ], 6 | "rules": { 7 | "array-type": false, 8 | "arrow-parens": false, 9 | "deprecation": { 10 | "severity": "warn" 11 | }, 12 | "import-blacklist": [ 13 | true, 14 | "rxjs/Rx" 15 | ], 16 | "interface-name": false, 17 | "max-classes-per-file": false, 18 | "max-line-length": [ 19 | true, 20 | 140 21 | ], 22 | "member-access": false, 23 | "member-ordering": [ 24 | true, 25 | { 26 | "order": [ 27 | "static-field", 28 | "instance-field", 29 | "static-method", 30 | "instance-method" 31 | ] 32 | } 33 | ], 34 | "no-consecutive-blank-lines": false, 35 | "no-console": [ 36 | true, 37 | "debug", 38 | "info", 39 | "time", 40 | "timeEnd", 41 | "trace" 42 | ], 43 | "no-empty": false, 44 | "no-inferrable-types": [ 45 | true, 46 | "ignore-params" 47 | ], 48 | "no-non-null-assertion": true, 49 | "no-redundant-jsdoc": true, 50 | "no-switch-case-fall-through": true, 51 | "no-use-before-declare": true, 52 | "no-var-requires": false, 53 | "object-literal-key-quotes": [ 54 | true, 55 | "as-needed" 56 | ], 57 | "object-literal-sort-keys": false, 58 | "ordered-imports": false, 59 | "quotemark": [ 60 | true, 61 | "single" 62 | ], 63 | "trailing-comma": false, 64 | "no-output-on-prefix": true, 65 | "use-input-property-decorator": true, 66 | "use-output-property-decorator": true, 67 | "use-host-property-decorator": true, 68 | "no-input-rename": true, 69 | "no-output-rename": true, 70 | "use-life-cycle-interface": true, 71 | "use-pipe-transform-interface": true, 72 | "component-class-suffix": true, 73 | "directive-class-suffix": true 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/petshop/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rulesDirectory": [ 4 | "codelyzer" 5 | ], 6 | "rules": { 7 | "array-type": false, 8 | "arrow-parens": false, 9 | "deprecation": { 10 | "severity": "warn" 11 | }, 12 | "import-blacklist": [ 13 | true, 14 | "rxjs/Rx" 15 | ], 16 | "interface-name": false, 17 | "max-classes-per-file": false, 18 | "max-line-length": [ 19 | true, 20 | 140 21 | ], 22 | "member-access": false, 23 | "member-ordering": [ 24 | true, 25 | { 26 | "order": [ 27 | "static-field", 28 | "instance-field", 29 | "static-method", 30 | "instance-method" 31 | ] 32 | } 33 | ], 34 | "no-consecutive-blank-lines": false, 35 | "no-console": [ 36 | true, 37 | "debug", 38 | "info", 39 | "time", 40 | "timeEnd", 41 | "trace" 42 | ], 43 | "no-empty": false, 44 | "no-inferrable-types": [ 45 | true, 46 | "ignore-params" 47 | ], 48 | "no-non-null-assertion": true, 49 | "no-redundant-jsdoc": true, 50 | "no-switch-case-fall-through": true, 51 | "no-use-before-declare": true, 52 | "no-var-requires": false, 53 | "object-literal-key-quotes": [ 54 | true, 55 | "as-needed" 56 | ], 57 | "object-literal-sort-keys": false, 58 | "ordered-imports": false, 59 | "quotemark": [ 60 | true, 61 | "single" 62 | ], 63 | "trailing-comma": false, 64 | "no-output-on-prefix": true, 65 | "use-input-property-decorator": true, 66 | "use-output-property-decorator": true, 67 | "use-host-property-decorator": true, 68 | "no-input-rename": true, 69 | "no-output-rename": true, 70 | "use-life-cycle-interface": true, 71 | "use-pipe-transform-interface": true, 72 | "component-class-suffix": true, 73 | "directive-class-suffix": true 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/petshop/src/assets/js/components/countdown.min.js: -------------------------------------------------------------------------------- 1 | /*! UIkit 3.0.3 | http://www.getuikit.com | (c) 2014 - 2018 YOOtheme | MIT License */ 2 | 3 | !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("uikit-util")):"function"==typeof define&&define.amd?define("uikitcountdown",["uikit-util"],n):(t=t||self).UIkitCountdown=n(t.UIkit.util)}(this,function(r){"use strict";var t={mixins:[{connected:function(){!r.hasClass(this.$el,this.$name)&&r.addClass(this.$el,this.$name)}}],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},computed:{date:function(t){var n=t.date;return Date.parse(n)},days:function(t,n){var e=t.clsWrapper;return r.$(e.replace("%unit%","days"),n)},hours:function(t,n){var e=t.clsWrapper;return r.$(e.replace("%unit%","hours"),n)},minutes:function(t,n){var e=t.clsWrapper;return r.$(e.replace("%unit%","minutes"),n)},seconds:function(t,n){var e=t.clsWrapper;return r.$(e.replace("%unit%","seconds"),n)},units:function(){var n=this;return["days","hours","minutes","seconds"].filter(function(t){return n[t]})}},connected:function(){this.start()},disconnected:function(){var n=this;this.stop(),this.units.forEach(function(t){return r.empty(n[t])})},events:[{name:"visibilitychange",el:document,handler:function(){document.hidden?this.stop():this.start()}}],update:{write:function(){var t,n,i=this,s=(t=this.date,{total:n=t-Date.now(),seconds:n/1e3%60,minutes:n/1e3/60%60,hours:n/1e3/60/60%24,days:n/1e3/60/60/24});s.total<=0&&(this.stop(),s.days=s.hours=s.minutes=s.seconds=0),this.units.forEach(function(t){var n=String(Math.floor(s[t]));n=n.length<2?"0"+n:n;var e=i[t];e.textContent!==n&&((n=n.split("")).length!==e.children.length&&r.html(e,n.map(function(){return""}).join("")),n.forEach(function(t,n){return e.children[n].textContent=t}))})}},methods:{start:function(){var t=this;this.stop(),this.date&&this.units.length&&(this.$emit(),this.timer=setInterval(function(){return t.$emit()},1e3))},stop:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}}};return"undefined"!=typeof window&&window.UIkit&&window.UIkit.component("countdown",t),t}); -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/signup-page/signup-page.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | 5 |

6 | 7 | 8 | 9 |
10 |
11 |

Cadastre-se

12 |
13 | 15 |
16 |
17 | 19 |
20 |
21 | 26 |
27 |
28 | 30 |
31 |
32 | 33 |
34 |
35 |
36 | 37 |

38 | Cancelar 39 |

40 |
41 |
42 | -------------------------------------------------------------------------------- /src/petshop/src/assets/js/components/notification.min.js: -------------------------------------------------------------------------------- 1 | /*! UIkit 3.0.3 | http://www.getuikit.com | (c) 2014 - 2018 YOOtheme | MIT License */ 2 | 3 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("uikit-util")):"function"==typeof define&&define.amd?define("uikitnotification",["uikit-util"],i):(t=t||self).UIkitNotification=i(t.UIkit.util)}(this,function(n){"use strict";var t,o={},i={functional:!0,args:["message","status"],data:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",clsClose:"uk-notification-close",clsMsg:"uk-notification-message"},install:function(e){e.notification.closeAll=function(s,o){n.apply(document.body,function(t){var i=e.getComponent(t,"notification");!i||s&&s!==i.group||i.close(o)})}},computed:{marginProp:function(t){var i=t.pos;return"margin"+(n.startsWith(i,"top")?"Top":"Bottom")},startProps:function(){var t;return(t={opacity:0})[this.marginProp]=-this.$el.offsetHeight,t}},created:function(){o[this.pos]||(o[this.pos]=n.append(this.$container,'
'));var t=n.css(o[this.pos],"display","block");this.$mount(n.append(t,'
'+this.message+"
"))},connected:function(){var t,i=this,s=n.toFloat(n.css(this.$el,this.marginProp));n.Transition.start(n.css(this.$el,this.startProps),(t={opacity:1},t[this.marginProp]=s,t)).then(function(){i.timeout&&(i.timer=setTimeout(i.close,i.timeout))})},events:(t={click:function(t){n.closest(t.target,'a[href="#"],a[href=""]')&&t.preventDefault(),this.close()}},t[n.pointerEnter]=function(){this.timer&&clearTimeout(this.timer)},t[n.pointerLeave]=function(){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},t),methods:{close:function(t){var i=this,s=function(){n.trigger(i.$el,"close",[i]),n.remove(i.$el),o[i.pos].children.length||n.css(o[i.pos],"display","none")};this.timer&&clearTimeout(this.timer),t?s():n.Transition.start(this.$el,this.startProps).then(s)}}};return"undefined"!=typeof window&&window.UIkit&&window.UIkit.component("notification",i),i}); -------------------------------------------------------------------------------- /src/petshop/src/app/directives/mask.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, ElementRef, HostListener, Input } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[mask]', 5 | }) 6 | export class MaskDirective { 7 | @Input('mask') mask: string; 8 | 9 | constructor(private element: ElementRef) { 10 | 11 | } 12 | 13 | @HostListener('input', ['$event']) onInputChange(event) { 14 | if (event.inputType == 'deleteContentBackward') 15 | return; 16 | 17 | const initalValue = this.element.nativeElement.value; 18 | initalValue.replace(/[^0-9]*/g, ''); 19 | if (initalValue !== this.element.nativeElement.value) { 20 | event.stopPropagation(); 21 | } 22 | 23 | this.element.nativeElement.value = this.format(this.mask, initalValue); 24 | } 25 | 26 | format(mask: string, value: any): string { 27 | let text = ''; 28 | let data = value; 29 | let c, m, i, x; 30 | 31 | for (i = 0, x = 1; x && i < mask.length; ++i) { 32 | c = data.charAt(i); 33 | m = mask.charAt(i); 34 | 35 | switch (mask.charAt(i)) { 36 | case '#': 37 | if (/\d/.test(c)) { 38 | text += c; 39 | } else { 40 | x = 0; 41 | } 42 | break; 43 | 44 | case 'A': 45 | if (/[a-z]/i.test(c)) { 46 | text += c; 47 | } else { 48 | x = 0; 49 | 50 | } 51 | break; 52 | 53 | case 'N': 54 | if (/[a-z0-9]/i.test(c)) { 55 | text += c; 56 | } else { 57 | x = 0; 58 | } 59 | break; 60 | 61 | case 'X': 62 | text += c; 63 | break; 64 | 65 | default: 66 | text += m; 67 | break; 68 | } 69 | } 70 | return text; 71 | } 72 | } -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/signup-page/signup-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormGroup, FormBuilder, Validators } from '@angular/forms'; 3 | import { Router } from '@angular/router'; 4 | import { DataService } from 'src/app/services/data.service'; 5 | import { CustomValidator } from 'src/app/validators/custom.validator'; 6 | import { ToastrService } from 'ngx-toastr'; 7 | 8 | @Component({ 9 | selector: 'app-signup-page', 10 | templateUrl: './signup-page.component.html', 11 | styleUrls: ['./signup-page.component.css'] 12 | }) 13 | export class SignupPageComponent implements OnInit { 14 | public form: FormGroup; 15 | public busy = false; 16 | 17 | constructor( 18 | private router: Router, 19 | private service: DataService, 20 | private fb: FormBuilder, 21 | private toastr: ToastrService 22 | ) { 23 | this.form = this.fb.group({ 24 | name: ['', Validators.compose([ 25 | Validators.minLength(3), 26 | Validators.maxLength(80), 27 | Validators.required 28 | ])], 29 | document: ['', Validators.compose([ 30 | Validators.minLength(14), 31 | Validators.maxLength(14), 32 | Validators.required, 33 | CustomValidator.isCpf() 34 | ])], 35 | email: ['', Validators.compose([ 36 | Validators.minLength(5), 37 | Validators.maxLength(120), 38 | Validators.required, 39 | CustomValidator.EmailValidator 40 | ])], 41 | password: ['', Validators.compose([ 42 | Validators.minLength(6), 43 | Validators.maxLength(20), 44 | Validators.required 45 | ])] 46 | }); 47 | } 48 | 49 | ngOnInit() { 50 | } 51 | 52 | submit() { 53 | this.busy = true; 54 | this 55 | .service 56 | .create(this.form.value) 57 | .subscribe( 58 | (data: any) => { 59 | this.busy = false; 60 | this.toastr.success(data.message, 'Bem-vindo!'); 61 | this.router.navigate(['/login']); 62 | }, 63 | (err) => { 64 | console.log(err); 65 | this.busy = false; 66 | } 67 | ); 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/pets-page/pets-page.component.html: -------------------------------------------------------------------------------- 1 |
2 | 15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |

23 |
24 |
25 |

Media Top

26 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.

27 |

28 | 29 | 30 | Editar 31 | 32 |

33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |

41 |
42 |
43 |

Media Top

44 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.

45 |

46 | 47 | 48 | Editar 49 | 50 |

51 |
52 |
53 |
54 |
55 |
56 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/login-page/login-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { DataService } from 'src/app/services/data.service'; 3 | import { FormGroup, FormBuilder, Validators } from '@angular/forms'; 4 | import { CustomValidator } from 'src/app/validators/custom.validator'; 5 | import { Security } from 'src/app/utils/security.util'; 6 | import { Router } from '@angular/router'; 7 | 8 | @Component({ 9 | selector: 'app-login-page', 10 | templateUrl: './login-page.component.html', 11 | styleUrls: ['./login-page.component.css'] 12 | }) 13 | export class LoginPageComponent implements OnInit { 14 | public form: FormGroup; 15 | public busy = false; 16 | 17 | constructor( 18 | private router: Router, 19 | private service: DataService, 20 | private fb: FormBuilder 21 | ) { 22 | this.form = this.fb.group({ 23 | username: ['', Validators.compose([ 24 | Validators.minLength(14), 25 | Validators.maxLength(14), 26 | Validators.required, 27 | CustomValidator.isCpf() 28 | ])], 29 | password: ['', Validators.compose([ 30 | Validators.minLength(6), 31 | Validators.maxLength(20), 32 | Validators.required 33 | ])] 34 | }); 35 | } 36 | 37 | ngOnInit() { 38 | const token = Security.getToken(); 39 | if (token) { 40 | this.busy = true; 41 | this 42 | .service 43 | .refreshToken() 44 | .subscribe( 45 | (data: any) => { 46 | this.busy = false; 47 | this.setUser(data.customer, data.token); 48 | }, 49 | (err) => { 50 | localStorage.clear(); 51 | this.busy = false; 52 | } 53 | ); 54 | } 55 | } 56 | 57 | submit() { 58 | this.busy = true; 59 | this 60 | .service 61 | .authenticate(this.form.value) 62 | .subscribe( 63 | (data: any) => { 64 | this.busy = false; 65 | this.setUser(data.customer, data.token); 66 | }, 67 | (err) => { 68 | console.log(err); 69 | this.busy = false; 70 | } 71 | ); 72 | } 73 | 74 | setUser(user, token) { 75 | Security.set(user, token); 76 | this.router.navigate(['/']); 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /src/petshop/src/app/pages/account/profile-page/profile-page.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormGroup, FormBuilder, Validators } from '@angular/forms'; 3 | import { Router } from '@angular/router'; 4 | import { DataService } from 'src/app/services/data.service'; 5 | import { ToastrService } from 'ngx-toastr'; 6 | import { CustomValidator } from 'src/app/validators/custom.validator'; 7 | 8 | @Component({ 9 | selector: 'app-profile-page', 10 | templateUrl: './profile-page.component.html', 11 | styleUrls: ['./profile-page.component.css'] 12 | }) 13 | export class ProfilePageComponent implements OnInit { 14 | public form: FormGroup; 15 | public busy = false; 16 | 17 | constructor( 18 | private router: Router, 19 | private service: DataService, 20 | private fb: FormBuilder, 21 | private toastr: ToastrService 22 | ) { 23 | this.form = this.fb.group({ 24 | name: ['', Validators.compose([ 25 | Validators.minLength(3), 26 | Validators.maxLength(80), 27 | Validators.required 28 | ])], 29 | document: [{ value: '', disabled: true }], 30 | email: ['', Validators.compose([ 31 | Validators.minLength(5), 32 | Validators.maxLength(120), 33 | Validators.required, 34 | CustomValidator.EmailValidator 35 | ])], 36 | }); 37 | } 38 | 39 | ngOnInit() { 40 | this.busy = true; 41 | this 42 | .service 43 | .getProfile() 44 | .subscribe( 45 | (data: any) => { 46 | this.busy = false; 47 | this.form.controls['name'].setValue(data.name); 48 | this.form.controls['document'].setValue(data.document); 49 | this.form.controls['email'].setValue(data.email); 50 | }, 51 | (err) => { 52 | console.log(err); 53 | this.busy = false; 54 | } 55 | ); 56 | } 57 | 58 | submit() { 59 | this.busy = true; 60 | this 61 | .service 62 | .updateProfile(this.form.value) 63 | .subscribe( 64 | (data: any) => { 65 | this.busy = false; 66 | this.toastr.success(data.message, 'Atualização Completa!'); 67 | }, 68 | (err) => { 69 | console.log(err); 70 | this.busy = false; 71 | } 72 | ); 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /assets/style.txt: -------------------------------------------------------------------------------- 1 | :root { 2 | --ion-color-primary: #ff8429; 3 | --ion-color-primary-rgb: 255,132,41; 4 | --ion-color-primary-contrast: #000000; 5 | --ion-color-primary-contrast-rgb: 0,0,0; 6 | --ion-color-primary-shade: #e07424; 7 | --ion-color-primary-tint: #ff903e; 8 | 9 | --ion-color-secondary: #ffc84d; 10 | --ion-color-secondary-rgb: 255,200,77; 11 | --ion-color-secondary-contrast: #000000; 12 | --ion-color-secondary-contrast-rgb: 0,0,0; 13 | --ion-color-secondary-shade: #e0b044; 14 | --ion-color-secondary-tint: #ffce5f; 15 | 16 | --ion-color-tertiary: #7044ff; 17 | --ion-color-tertiary-rgb: 112,68,255; 18 | --ion-color-tertiary-contrast: #ffffff; 19 | --ion-color-tertiary-contrast-rgb: 255,255,255; 20 | --ion-color-tertiary-shade: #633ce0; 21 | --ion-color-tertiary-tint: #7e57ff; 22 | 23 | --ion-color-success: #43ed7f; 24 | --ion-color-success-rgb: 67,237,127; 25 | --ion-color-success-contrast: #000000; 26 | --ion-color-success-contrast-rgb: 0,0,0; 27 | --ion-color-success-shade: #3bd170; 28 | --ion-color-success-tint: #56ef8c; 29 | 30 | --ion-color-warning: #f9d84b; 31 | --ion-color-warning-rgb: 249,216,75; 32 | --ion-color-warning-contrast: #000000; 33 | --ion-color-warning-contrast-rgb: 0,0,0; 34 | --ion-color-warning-shade: #dbbe42; 35 | --ion-color-warning-tint: #fadc5d; 36 | 37 | --ion-color-danger: #f04141; 38 | --ion-color-danger-rgb: 245,61,61; 39 | --ion-color-danger-contrast: #ffffff; 40 | --ion-color-danger-contrast-rgb: 255,255,255; 41 | --ion-color-danger-shade: #d33939; 42 | --ion-color-danger-tint: #f25454; 43 | 44 | --ion-color-dark: #c9bd97; 45 | --ion-color-dark-rgb: 201,189,151; 46 | --ion-color-dark-contrast: #000000; 47 | --ion-color-dark-contrast-rgb: 0,0,0; 48 | --ion-color-dark-shade: #b1a685; 49 | --ion-color-dark-tint: #cec4a1; 50 | 51 | --ion-color-medium: #e5dfca; 52 | --ion-color-medium-rgb: 229,223,202; 53 | --ion-color-medium-contrast: #000000; 54 | --ion-color-medium-contrast-rgb: 0,0,0; 55 | --ion-color-medium-shade: #cac4b2; 56 | --ion-color-medium-tint: #e8e2cf; 57 | 58 | --ion-color-light: #fcf9ed; 59 | --ion-color-light-rgb: 252,249,237; 60 | --ion-color-light-contrast: #000000; 61 | --ion-color-light-contrast-rgb: 0,0,0; 62 | --ion-color-light-shade: #dedbd1; 63 | --ion-color-light-tint: #fcfaef; 64 | } -------------------------------------------------------------------------------- /src/petshop/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { ReactiveFormsModule } from '@angular/forms'; 4 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 5 | import { ToastrModule } from 'ngx-toastr'; 6 | 7 | import { AppRoutingModule } from './app-routing.module'; 8 | import { AppComponent } from './app.component'; 9 | import { FramePageComponent } from './pages/master/frame-page/frame-page.component'; 10 | import { LoginPageComponent } from './pages/account/login-page/login-page.component'; 11 | import { SignupPageComponent } from './pages/account/signup-page/signup-page.component'; 12 | import { ResetPasswordPageComponent } from './pages/account/reset-password-page/reset-password-page.component'; 13 | import { ProductsPageComponent } from './pages/store/products-page/products-page.component'; 14 | import { CartPageComponent } from './pages/store/cart-page/cart-page.component'; 15 | import { CheckoutPageComponent } from './pages/store/checkout-page/checkout-page.component'; 16 | import { ProfilePageComponent } from './pages/account/profile-page/profile-page.component'; 17 | import { PetsPageComponent } from './pages/account/pets-page/pets-page.component'; 18 | import { DataService } from './services/data.service'; 19 | import { HttpClientModule } from '@angular/common/http'; 20 | import { ProductCardComponent } from './components/store/product-card/product-card.component'; 21 | import { LoadingComponent } from './components/shared/loading/loading.component'; 22 | import { MaskDirective } from './directives/mask.directive'; 23 | import { NavbarComponent } from './components/shared/navbar/navbar.component'; 24 | import { AuthService } from './services/auth.service'; 25 | 26 | @NgModule({ 27 | declarations: [ 28 | MaskDirective, 29 | AppComponent, 30 | FramePageComponent, 31 | LoginPageComponent, 32 | SignupPageComponent, 33 | ResetPasswordPageComponent, 34 | ProductsPageComponent, 35 | CartPageComponent, 36 | CheckoutPageComponent, 37 | ProfilePageComponent, 38 | PetsPageComponent, 39 | ProductCardComponent, 40 | LoadingComponent, 41 | NavbarComponent 42 | ], 43 | imports: [ 44 | BrowserModule, 45 | ReactiveFormsModule, 46 | HttpClientModule, 47 | BrowserAnimationsModule, // required animations module 48 | ToastrModule.forRoot(), //https://www.npmjs.com/package/ngx-toastr 49 | AppRoutingModule 50 | ], 51 | providers: [DataService, AuthService], 52 | bootstrap: [AppComponent] 53 | }) 54 | export class AppModule { } 55 | -------------------------------------------------------------------------------- /src/petshop/src/app/validators/custom.validator.ts: -------------------------------------------------------------------------------- 1 | import { AbstractControl, Validators, FormControl } from '@angular/forms'; 2 | 3 | export class CustomValidator { 4 | constructor() { } 5 | 6 | static isCpf() { 7 | return (control: AbstractControl): Validators => { 8 | const cpf = control.value.replace(/[^0-9]*/g, ''); 9 | if (cpf) { 10 | let numbers; 11 | let digits; 12 | let sum; 13 | let i; 14 | let result; 15 | let equalDigits; 16 | equalDigits = 1; 17 | if (cpf.length < 11) { 18 | return null; 19 | } 20 | 21 | for (i = 0; i < cpf.length - 1; i++) { 22 | if (cpf.charAt(i) !== cpf.charAt(i + 1)) { 23 | equalDigits = 0; 24 | break; 25 | } 26 | } 27 | 28 | if (!equalDigits) { 29 | numbers = cpf.substring(0, 9); 30 | digits = cpf.substring(9); 31 | sum = 0; 32 | for (i = 10; i > 1; i--) { 33 | sum += numbers.charAt(10 - i) * i; 34 | } 35 | 36 | result = sum % 11 < 2 ? 0 : 11 - (sum % 11); 37 | 38 | if (result !== Number(digits.charAt(0))) { 39 | return { cpfNotValid: true }; 40 | } 41 | numbers = cpf.substring(0, 10); 42 | sum = 0; 43 | 44 | for (i = 11; i > 1; i--) { 45 | sum += numbers.charAt(11 - i) * i; 46 | } 47 | result = sum % 11 < 2 ? 0 : 11 - (sum % 11); 48 | 49 | if (result !== Number(digits.charAt(1))) { 50 | return { cpfNotValid: true }; 51 | } 52 | return null; 53 | } else { 54 | return { cpfNotValid: true }; 55 | } 56 | } 57 | return null; 58 | }; 59 | } 60 | 61 | static EmailValidator(control: FormControl) { 62 | // tslint:disable-next-line:max-line-length 63 | const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; 64 | if (!re.test(control.value)) { 65 | return { 'E-mail inválido': true }; 66 | } 67 | 68 | return null; 69 | } 70 | } -------------------------------------------------------------------------------- /src/material/src/app/components/expansion-panel/expansion-panel.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Painel 1 6 | 7 | 8 | Descrição do Painel 9 | 10 | 11 |

12 | Conteúdo do Painel 1 13 |

14 |
15 | 16 | 17 | 18 | 19 | Painel 2 20 | 21 | 22 | Descrição do Painel 2 | Status: {{panelOpenState ? 'aberto' : 'fechado'}} 23 | 24 | 25 |

26 | Conteúdo do Painel 2 27 |

28 |
29 |
30 | 31 |
32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | Passo 1 40 | 41 | 42 | 43 |

44 | Conteúdo do Painel 45 |

46 | 47 | 48 | 49 | 50 |
51 | 52 | 53 | 54 | 55 | Passo 2 56 | 57 | 58 | 59 |

60 | Conteúdo do Painel 61 |

62 | 63 | 64 | 65 | 66 | 67 |
68 | 69 | 70 | 71 | 72 | Passo 3 73 | 74 | 75 | 76 |

77 | Conteúdo do Painel 78 |

79 | 80 | 81 | 82 | 83 | 84 |
85 | 86 |
87 | -------------------------------------------------------------------------------- /src/material/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 4 | import { MatAutocompleteModule, MatFormFieldModule, MatInputModule, MatCheckboxModule, MatRadioModule, MatSlideToggleModule, MatDatepickerModule, MatNativeDateModule, MatIconModule, MatButtonModule, MatSelectModule, MatSliderModule, MatMenuModule, MatSidenavModule, MatToolbar, MatToolbarModule, MatListModule, MatCardModule, MatExpansionModule, MatGridListModule } from '@angular/material'; 5 | 6 | import { AppRoutingModule } from './app-routing.module'; 7 | import { AppComponent } from './app.component'; 8 | import { AutoCompleteComponent } from './components/auto-complete/auto-complete.component'; 9 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 10 | import { CheckInputRadioSlideComponent } from './components/check-input-radio-slide/check-input-radio-slide.component'; 11 | import { DatePickerComponent } from './components/date-picker/date-picker.component'; 12 | import { FormFieldComponent } from './components/form-field/form-field.component'; 13 | import { SelectComponent } from './components/select/select.component'; 14 | import { SliderComponent } from './components/slider/slider.component'; 15 | import { MenuComponent } from './components/menu/menu.component'; 16 | import { SidenavComponent } from './components/sidenav/sidenav.component'; 17 | import { CardComponent } from './components/card/card.component'; 18 | import { ExpansionPanelComponent } from './components/expansion-panel/expansion-panel.component'; 19 | import { GridComponent } from './components/grid/grid.component'; 20 | 21 | @NgModule({ 22 | declarations: [ 23 | AppComponent, 24 | AutoCompleteComponent, 25 | CheckInputRadioSlideComponent, 26 | DatePickerComponent, 27 | FormFieldComponent, 28 | SelectComponent, 29 | SliderComponent, 30 | MenuComponent, 31 | SidenavComponent, 32 | CardComponent, 33 | ExpansionPanelComponent, 34 | GridComponent 35 | ], 36 | imports: [ 37 | BrowserModule, 38 | FormsModule, 39 | ReactiveFormsModule, 40 | BrowserAnimationsModule, 41 | MatIconModule, 42 | MatInputModule, 43 | MatAutocompleteModule, 44 | MatFormFieldModule, 45 | MatCheckboxModule, 46 | MatRadioModule, 47 | MatSlideToggleModule, 48 | MatDatepickerModule, 49 | MatNativeDateModule, 50 | MatButtonModule, 51 | MatSelectModule, 52 | MatSliderModule, 53 | MatMenuModule, 54 | MatSidenavModule, 55 | MatToolbarModule, 56 | MatListModule, 57 | MatCardModule, 58 | MatExpansionModule, 59 | MatGridListModule, 60 | AppRoutingModule 61 | ], 62 | providers: [], 63 | bootstrap: [AppComponent] 64 | }) 65 | export class AppModule { } 66 | -------------------------------------------------------------------------------- /src/petshop/src/assets/js/components/upload.min.js: -------------------------------------------------------------------------------- 1 | /*! UIkit 3.0.3 | http://www.getuikit.com | (c) 2014 - 2018 YOOtheme | MIT License */ 2 | 3 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("uikit-util")):"function"==typeof define&&define.amd?define("uikitupload",["uikit-util"],t):(e=e||self).UIkitUpload=t(e.UIkit.util)}(this,function(a){"use strict";var e={props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,msgInvalidMime:String,msgInvalidName:String,msgInvalidSize:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",msgInvalidSize:"Invalid File Size: %s Kilobytes Max",multiple:!1,name:"files[]",params:{},type:"",url:"",abort:a.noop,beforeAll:a.noop,beforeSend:a.noop,complete:a.noop,completeAll:a.noop,error:a.noop,fail:a.noop,load:a.noop,loadEnd:a.noop,loadStart:a.noop,progress:a.noop},events:{change:function(e){a.matches(e.target,'input[type="file"]')&&(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop:function(e){o(e);var t=e.dataTransfer;t&&t.files&&(a.removeClass(this.$el,this.clsDragover),this.upload(t.files))},dragenter:function(e){o(e)},dragover:function(e){o(e),a.addClass(this.$el,this.clsDragover)},dragleave:function(e){o(e),a.removeClass(this.$el,this.clsDragover)}},methods:{upload:function(e){var o=this;if(e.length){a.trigger(this.$el,"upload",[e]);for(var t=0;t= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 22 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 23 | 24 | /** 25 | * Web Animations `@angular/platform-browser/animations` 26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 28 | */ 29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 30 | 31 | /** 32 | * By default, zone.js will patch all possible macroTask and DomEvents 33 | * user can disable parts of macroTask/DomEvents patch by setting following flags 34 | * because those flags need to be set before `zone.js` being loaded, and webpack 35 | * will put import in the top of bundle, so user need to create a separate file 36 | * in this directory (for example: zone-flags.ts), and put the following flags 37 | * into that file, and then add the following code before importing zone.js. 38 | * import './zone-flags.ts'; 39 | * 40 | * The flags allowed in zone-flags.ts are listed here. 41 | * 42 | * The following flags will work for all browsers. 43 | * 44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 46 | * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 47 | * 48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 50 | * 51 | * (window as any).__Zone_enable_cross_context_check = true; 52 | * 53 | */ 54 | 55 | /*************************************************************************************************** 56 | * Zone JS is required by default for Angular itself. 57 | */ 58 | import 'zone.js/dist/zone'; // Included with Angular CLI. 59 | 60 | 61 | /*************************************************************************************************** 62 | * APPLICATION IMPORTS 63 | */ 64 | -------------------------------------------------------------------------------- /src/petshop/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 Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 22 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 23 | 24 | /** 25 | * Web Animations `@angular/platform-browser/animations` 26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 28 | */ 29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 30 | 31 | /** 32 | * By default, zone.js will patch all possible macroTask and DomEvents 33 | * user can disable parts of macroTask/DomEvents patch by setting following flags 34 | * because those flags need to be set before `zone.js` being loaded, and webpack 35 | * will put import in the top of bundle, so user need to create a separate file 36 | * in this directory (for example: zone-flags.ts), and put the following flags 37 | * into that file, and then add the following code before importing zone.js. 38 | * import './zone-flags.ts'; 39 | * 40 | * The flags allowed in zone-flags.ts are listed here. 41 | * 42 | * The following flags will work for all browsers. 43 | * 44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 46 | * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 47 | * 48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 50 | * 51 | * (window as any).__Zone_enable_cross_context_check = true; 52 | * 53 | */ 54 | 55 | /*************************************************************************************************** 56 | * Zone JS is required by default for Angular itself. 57 | */ 58 | import 'zone.js/dist/zone'; // Included with Angular CLI. 59 | 60 | 61 | /*************************************************************************************************** 62 | * APPLICATION IMPORTS 63 | */ 64 | -------------------------------------------------------------------------------- /src/material/src/app/components/sidenav/sidenav.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 7 |

Sidenav

8 |
9 | 10 | 11 | Application Title 12 | 13 | 14 | 15 | 16 | Right Aligned Text 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | Item X 25 | Item X 26 | Item X 27 | Item X 28 | Item X 29 | Item X 30 | Item X 31 | Item X 32 | Item X 33 | 34 |

35 | 38 |

39 |
40 | 41 | 42 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce viverra commodo aliquet. Maecenas vitae ipsum et 43 | ipsum gravida varius. Aenean dignissim tempor scelerisque. Aenean sollicitudin luctus lectus. Aliquam hendrerit 44 | vestibulum sapien. Proin bibendum ornare eros ac faucibus. Praesent eu scelerisque dolor, sit amet vehicula 45 | massa. Maecenas feugiat dolor at leo luctus bibendum. In malesuada quam ac sem euismod, at gravida turpis porta. 46 | Praesent euismod, quam ac vulputate bibendum, nulla ipsum auctor mauris, id tempor magna magna scelerisque erat. 47 | Aliquam augue nisl, suscipit sed ornare ac, commodo sit amet erat. Suspendisse vehicula est dolor, non rhoncus 48 | metus auctor eu. Cras ullamcorper lacus feugiat sodales laoreet. Proin egestas augue sem, id convallis ante 49 | dictum eget.
50 |
51 | Nam tempus bibendum elementum. Pellentesque vulputate dapibus lacus sit amet sodales. Nullam facilisis lacinia 52 | dui id maximus. Proin a luctus magna. Mauris facilisis urna a libero convallis feugiat. Praesent posuere libero 53 | dui, in venenatis ante interdum non. Nullam ac magna sodales lectus lobortis faucibus eu id risus. Nam et lacus 54 | nec lacus tincidunt lacinia eget in sem. Duis facilisis mi et consectetur eleifend. Integer venenatis erat non 55 | ante malesuada, at ultricies libero blandit. Aenean vel pretium elit. Etiam id mauris non lorem luctus maximus. 56 | Vivamus varius pulvinar fermentum. Maecenas tempus gravida ipsum id bibendum. Duis velit mauris, aliquet sit 57 | amet lacus a, facilisis convallis sapien. Mauris at consectetur sapien.
58 |
59 | Vestibulum in semper felis. Nunc gravida laoreet augue et gravida. Etiam quis arcu nec lacus vestibulum mattis 60 | eget eu nulla. Donec molestie arcu nisl, sit amet dapibus justo posuere sit amet. Quisque a ultricies ex. 61 | Quisque eleifend nisi vitae enim ultricies finibus. Nunc molestie nunc ac enim efficitur tincidunt. Sed at purus 62 | et diam consectetur tincidunt. Aenean ornare, mi nec venenatis accumsan, nisi sem accumsan libero, vel tempus 63 | diam nisi et ante. Fusce id consectetur enim. Pellentesque habitant morbi tristique senectus et netus et 64 | malesuada fames ac turpis egestas. Donec mattis mi vel commodo mollis. Morbi id gravida dolor, in posuere 65 | lectus. Vestibulum at sem semper nibh efficitur feugiat et molestie odio. Aenean et odio ut elit ullamcorper 66 | faucibus vel sed ligula. Nam vulputate sapien libero, a aliquet tellus dignissim sed.

67 |
68 |
69 |
70 | -------------------------------------------------------------------------------- /src/material/src/app/components/date-picker/date-picker.component.html: -------------------------------------------------------------------------------- 1 |

Básico

2 | 3 | 4 | 5 | 6 | 7 |
8 |

Ícone Customizado

9 | 10 | 11 | 12 | keyboard_arrow_down 13 | 14 | 15 | 16 |
17 |

Alterando a Visualização

18 | 19 | 20 | 21 | 22 | 23 |
24 |

Setando a Data

25 | 26 | 27 | 28 | 29 | 30 |
31 |

Alterando as Cores

32 | 33 | Data 34 | 35 | 36 | 37 | 38 |
39 | 40 | Data 41 | 42 | 43 | 44 | 45 |
46 |

Min/Max Date

47 | 48 | 49 | 50 | 51 | 52 |
53 |

Filtrando Datas

54 | 55 | 56 | 57 | 58 | 59 |
60 |

Desabilitando

61 |

62 | 63 | 64 | 65 | 66 | 67 |

68 | 69 |

70 | 71 | 72 | 73 | 74 | 75 |

76 | 77 |

78 | 79 | 80 | 81 | 82 | 83 |

84 |
85 |

Touch Mode

86 | 87 | 88 | 89 | 90 | 91 |
92 |

Abertura Manual

93 | 94 | 95 | 96 | 97 | 98 |
99 |

Datas Selecionadas

100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /src/petshop/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "petshop": { 7 | "root": "", 8 | "sourceRoot": "src", 9 | "projectType": "application", 10 | "prefix": "app", 11 | "schematics": {}, 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:browser", 15 | "options": { 16 | "outputPath": "dist/petshop", 17 | "index": "src/index.html", 18 | "main": "src/main.ts", 19 | "polyfills": "src/polyfills.ts", 20 | "tsConfig": "src/tsconfig.app.json", 21 | "assets": [ 22 | "src/favicon.ico", 23 | "src/assets" 24 | ], 25 | "styles": [ 26 | "src/styles.css" 27 | ], 28 | "scripts": [], 29 | "es5BrowserSupport": true 30 | }, 31 | "configurations": { 32 | "production": { 33 | "fileReplacements": [ 34 | { 35 | "replace": "src/environments/environment.ts", 36 | "with": "src/environments/environment.prod.ts" 37 | } 38 | ], 39 | "optimization": true, 40 | "outputHashing": "all", 41 | "sourceMap": false, 42 | "extractCss": true, 43 | "namedChunks": false, 44 | "aot": true, 45 | "extractLicenses": true, 46 | "vendorChunk": false, 47 | "buildOptimizer": true, 48 | "budgets": [ 49 | { 50 | "type": "initial", 51 | "maximumWarning": "2mb", 52 | "maximumError": "5mb" 53 | } 54 | ] 55 | } 56 | } 57 | }, 58 | "serve": { 59 | "builder": "@angular-devkit/build-angular:dev-server", 60 | "options": { 61 | "browserTarget": "petshop:build" 62 | }, 63 | "configurations": { 64 | "production": { 65 | "browserTarget": "petshop:build:production" 66 | } 67 | } 68 | }, 69 | "extract-i18n": { 70 | "builder": "@angular-devkit/build-angular:extract-i18n", 71 | "options": { 72 | "browserTarget": "petshop:build" 73 | } 74 | }, 75 | "test": { 76 | "builder": "@angular-devkit/build-angular:karma", 77 | "options": { 78 | "main": "src/test.ts", 79 | "polyfills": "src/polyfills.ts", 80 | "tsConfig": "src/tsconfig.spec.json", 81 | "karmaConfig": "src/karma.conf.js", 82 | "styles": [ 83 | "src/styles.css" 84 | ], 85 | "scripts": [], 86 | "assets": [ 87 | "src/favicon.ico", 88 | "src/assets" 89 | ] 90 | } 91 | }, 92 | "lint": { 93 | "builder": "@angular-devkit/build-angular:tslint", 94 | "options": { 95 | "tsConfig": [ 96 | "src/tsconfig.app.json", 97 | "src/tsconfig.spec.json" 98 | ], 99 | "exclude": [ 100 | "**/node_modules/**" 101 | ] 102 | } 103 | } 104 | } 105 | }, 106 | "petshop-e2e": { 107 | "root": "e2e/", 108 | "projectType": "application", 109 | "prefix": "", 110 | "architect": { 111 | "e2e": { 112 | "builder": "@angular-devkit/build-angular:protractor", 113 | "options": { 114 | "protractorConfig": "e2e/protractor.conf.js", 115 | "devServerTarget": "petshop:serve" 116 | }, 117 | "configurations": { 118 | "production": { 119 | "devServerTarget": "petshop:serve:production" 120 | } 121 | } 122 | }, 123 | "lint": { 124 | "builder": "@angular-devkit/build-angular:tslint", 125 | "options": { 126 | "tsConfig": "e2e/tsconfig.e2e.json", 127 | "exclude": [ 128 | "**/node_modules/**" 129 | ] 130 | } 131 | } 132 | } 133 | } 134 | }, 135 | "defaultProject": "petshop" 136 | } -------------------------------------------------------------------------------- /src/material/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "material": { 7 | "root": "", 8 | "sourceRoot": "src", 9 | "projectType": "application", 10 | "prefix": "app", 11 | "schematics": {}, 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:browser", 15 | "options": { 16 | "outputPath": "dist/material", 17 | "index": "src/index.html", 18 | "main": "src/main.ts", 19 | "polyfills": "src/polyfills.ts", 20 | "tsConfig": "src/tsconfig.app.json", 21 | "assets": [ 22 | "src/favicon.ico", 23 | "src/assets" 24 | ], 25 | "styles": [ 26 | "src/styles.css" 27 | ], 28 | "scripts": [], 29 | "es5BrowserSupport": true 30 | }, 31 | "configurations": { 32 | "production": { 33 | "fileReplacements": [ 34 | { 35 | "replace": "src/environments/environment.ts", 36 | "with": "src/environments/environment.prod.ts" 37 | } 38 | ], 39 | "optimization": true, 40 | "outputHashing": "all", 41 | "sourceMap": false, 42 | "extractCss": true, 43 | "namedChunks": false, 44 | "aot": true, 45 | "extractLicenses": true, 46 | "vendorChunk": false, 47 | "buildOptimizer": true, 48 | "budgets": [ 49 | { 50 | "type": "initial", 51 | "maximumWarning": "2mb", 52 | "maximumError": "5mb" 53 | } 54 | ] 55 | } 56 | } 57 | }, 58 | "serve": { 59 | "builder": "@angular-devkit/build-angular:dev-server", 60 | "options": { 61 | "browserTarget": "material:build" 62 | }, 63 | "configurations": { 64 | "production": { 65 | "browserTarget": "material:build:production" 66 | } 67 | } 68 | }, 69 | "extract-i18n": { 70 | "builder": "@angular-devkit/build-angular:extract-i18n", 71 | "options": { 72 | "browserTarget": "material:build" 73 | } 74 | }, 75 | "test": { 76 | "builder": "@angular-devkit/build-angular:karma", 77 | "options": { 78 | "main": "src/test.ts", 79 | "polyfills": "src/polyfills.ts", 80 | "tsConfig": "src/tsconfig.spec.json", 81 | "karmaConfig": "src/karma.conf.js", 82 | "styles": [ 83 | "src/styles.css" 84 | ], 85 | "scripts": [], 86 | "assets": [ 87 | "src/favicon.ico", 88 | "src/assets" 89 | ] 90 | } 91 | }, 92 | "lint": { 93 | "builder": "@angular-devkit/build-angular:tslint", 94 | "options": { 95 | "tsConfig": [ 96 | "src/tsconfig.app.json", 97 | "src/tsconfig.spec.json" 98 | ], 99 | "exclude": [ 100 | "**/node_modules/**" 101 | ] 102 | } 103 | } 104 | } 105 | }, 106 | "material-e2e": { 107 | "root": "e2e/", 108 | "projectType": "application", 109 | "prefix": "", 110 | "architect": { 111 | "e2e": { 112 | "builder": "@angular-devkit/build-angular:protractor", 113 | "options": { 114 | "protractorConfig": "e2e/protractor.conf.js", 115 | "devServerTarget": "material:serve" 116 | }, 117 | "configurations": { 118 | "production": { 119 | "devServerTarget": "material:serve:production" 120 | } 121 | } 122 | }, 123 | "lint": { 124 | "builder": "@angular-devkit/build-angular:tslint", 125 | "options": { 126 | "tsConfig": "e2e/tsconfig.e2e.json", 127 | "exclude": [ 128 | "**/node_modules/**" 129 | ] 130 | } 131 | } 132 | } 133 | } 134 | }, 135 | "defaultProject": "material" 136 | } -------------------------------------------------------------------------------- /src/material/src/app/components/select/select.component.html: -------------------------------------------------------------------------------- 1 |

Básico

2 | 3 | Favorite food 4 | 5 | 6 | {{food.viewValue}} 7 | 8 | 9 | 10 | 11 |
12 | 13 |

Nativo

14 | 15 | Cars 16 | 22 | 23 | 24 |
25 | 26 |

2-way binding

27 | 28 | Select an option 29 | 30 | None 31 | Option 1 32 | Option 2 33 | Option 3 34 | 35 | 36 | 37 |

You selected: {{selected}}

38 | 39 |
40 | 41 |

Selecionando valores

42 | 43 |
44 |

mat-select

45 | 46 | Favorite food 47 | 48 | 49 | {{food.viewValue}} 50 | 51 | 52 | 53 |

Selected food: {{selectedValue}}

54 |

native html select

55 | 56 | Favorite car 57 | 63 | 64 |

Selected car: {{selectedCar}}

65 |
66 | 67 |
68 | 69 |

Validação

70 | 71 |

mat select

72 | 73 | Favorite animal 74 | 75 | -- 76 | 77 | {{animal.name}} 78 | 79 | 80 | Please choose an animal 81 | {{animalControl.value?.sound}} 82 | 83 | 84 |

native html select

85 | 86 | Select your car (required) 87 | 93 | 94 | This field is required 95 | 96 | You can pick up your favorite car here 97 | 98 | 99 |
100 | 101 |

Disable

102 | 103 |

104 | Disable select 105 |

106 | 107 |

mat-select

108 | 109 | Choose an option 110 | 111 | Option 1 112 | Option 2 (disabled) 113 | Option 3 114 | 115 | 116 | 117 |

native html select

118 | 119 | Choose an option 120 | 127 | 128 | 129 |
130 | 131 |

Multiple

132 | 133 | Toppings 134 | 135 | {{topping}} 136 | 137 | -------------------------------------------------------------------------------- /src/material/src/app/components/form-field/form-field.component.html: -------------------------------------------------------------------------------- 1 |

Básico

2 |
3 | 4 | 5 | 6 |
7 | 8 | 9 | 10 |
11 | 12 | 13 | Option 14 | 15 | 16 |
17 | 18 |
19 | 20 |

Variando a Aparência

21 |

22 | 23 | Legado 24 | 25 | sentiment_very_satisfied 26 | Dica 27 | 28 |

29 |

30 | 31 | Padrão 32 | 33 | sentiment_very_satisfied 34 | Dica 35 | 36 |

37 |

38 | 39 | Fill 40 | 41 | sentiment_very_satisfied 42 | Hint 43 | 44 |

45 |

46 | 47 | Outline 48 | 49 | sentiment_very_satisfied 50 | Hint 51 | 52 |

53 | 54 |
55 | 56 |

Floating Label

57 | 58 |
59 |
60 | Esconder marcadores 61 |
62 | 63 | 64 | Auto 65 | Always 66 | Never 67 | 68 |
69 |
70 |
71 | 72 | 73 | 74 |
75 | 76 | Label e Placeholder 77 | 78 | 79 |
80 | 81 | 82 | -- Nenhum -- 83 | Opções 84 | 85 | 86 | favorite Fancy label 87 | 88 | 89 |
90 | 91 |
92 | 93 |

Hint Label

94 |
95 | 96 | 97 | {{input.value?.length || 0}}/10 98 | 99 |
100 | 101 | 102 | Option 103 | 104 | Here's the dropdown arrow ^ 105 | 106 |
107 | 108 |
109 | 110 |

Error Message

111 |
112 | 113 | 114 | {{getErrorMessage()}} 115 | 116 |
117 | 118 |
119 | 120 |

Prefixo e Sulfixo

121 |
122 | 123 | 124 | {{hide ? 'visibility_off' : 'visibility'}} 125 | 126 |
127 | 128 | 129 | 130 | .00 131 | 132 |
133 | -------------------------------------------------------------------------------- /src/petshop/src/assets/js/components/filter.min.js: -------------------------------------------------------------------------------- 1 | /*! UIkit 3.0.3 | http://www.getuikit.com | (c) 2014 - 2018 YOOtheme | MIT License */ 2 | 3 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("uikit-util")):"function"==typeof define&&define.amd?define("uikitfilter",["uikit-util"],e):(t=t||self).UIkitFilter=e(t.UIkit.util)}(this,function(h){"use strict";var c,u="uk-animation-target";function f(t,e){var i=h.css(t,"zIndex");return!!h.isVisible(t)&&h.assign({display:"",opacity:e?h.css(t,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:"auto"===i?h.index(t):i},d(t))}function l(t){h.css(t.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",width:""}),h.removeClass(t,u),h.css(t,"height","")}function d(t){var e=t.getBoundingClientRect(),i=e.height,n=e.width,r=h.position(t),a=r.top,o=r.left;return{top:a+=h.toFloat(h.css(t,"marginTop")),left:o,height:i,width:n}}var t={mixins:[{props:{animation:Number},data:{animation:150},computed:{target:function(){return this.$el}},methods:{animate:function(t){var n=this;c||(c=h.append(document.head,"