├── .gitignore ├── Chapter1 ├── install-mac-deps.sh ├── install-sts.ps1 └── install-windows-deps.ps1 ├── Chapter10 └── lemon-mart │ ├── .circleci │ └── config.yml │ ├── .dockerignore │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── Dockerfile │ ├── Dockerfile.integration │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── app │ │ ├── app-material.module.spec.ts │ │ ├── app-material.module.ts │ │ ├── app-routing.module.ts │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── auth │ │ │ ├── auth-guard.service.spec.ts │ │ │ ├── auth-guard.service.ts │ │ │ ├── auth-http-interceptor.ts │ │ │ ├── auth.service.fake.ts │ │ │ ├── auth.service.spec.ts │ │ │ ├── auth.service.ts │ │ │ ├── cache.service.ts │ │ │ └── role.enum.ts │ │ ├── common │ │ │ ├── common.testing.ts │ │ │ ├── common.ts │ │ │ ├── simple-dialog │ │ │ │ ├── simple-dialog.component.spec.ts │ │ │ │ └── simple-dialog.component.ts │ │ │ ├── ui.service.spec.ts │ │ │ ├── ui.service.ts │ │ │ └── validations.ts │ │ ├── home │ │ │ ├── home.component.spec.ts │ │ │ └── home.component.ts │ │ ├── inventory │ │ │ ├── categories │ │ │ │ ├── categories.component.css │ │ │ │ ├── categories.component.html │ │ │ │ ├── categories.component.spec.ts │ │ │ │ └── categories.component.ts │ │ │ ├── inventory-home │ │ │ │ ├── inventory-home.component.spec.ts │ │ │ │ └── inventory-home.component.ts │ │ │ ├── inventory-routing.module.ts │ │ │ ├── inventory.component.spec.ts │ │ │ ├── inventory.component.ts │ │ │ ├── inventory.module.spec.ts │ │ │ ├── inventory.module.ts │ │ │ ├── products │ │ │ │ ├── products.component.css │ │ │ │ ├── products.component.html │ │ │ │ ├── products.component.spec.ts │ │ │ │ └── products.component.ts │ │ │ └── stock-entry │ │ │ │ ├── stock-entry.component.css │ │ │ │ ├── stock-entry.component.html │ │ │ │ ├── stock-entry.component.spec.ts │ │ │ │ └── stock-entry.component.ts │ │ ├── login │ │ │ ├── login.component.html │ │ │ ├── login.component.spec.ts │ │ │ └── login.component.ts │ │ ├── manager │ │ │ ├── manager-home │ │ │ │ ├── manager-home.component.spec.ts │ │ │ │ └── manager-home.component.ts │ │ │ ├── manager-material.module.spec.ts │ │ │ ├── manager-material.module.ts │ │ │ ├── manager-routing.module.ts │ │ │ ├── manager.component.spec.ts │ │ │ ├── manager.component.ts │ │ │ ├── manager.module.spec.ts │ │ │ ├── manager.module.ts │ │ │ ├── receipt-lookup │ │ │ │ ├── receipt-lookup.component.css │ │ │ │ ├── receipt-lookup.component.html │ │ │ │ ├── receipt-lookup.component.spec.ts │ │ │ │ └── receipt-lookup.component.ts │ │ │ ├── user-management │ │ │ │ ├── user-management.component.spec.ts │ │ │ │ └── user-management.component.ts │ │ │ └── user-table │ │ │ │ ├── user-table.component.css │ │ │ │ ├── user-table.component.html │ │ │ │ ├── user-table.component.spec.ts │ │ │ │ └── user-table.component.ts │ │ ├── navigation-menu │ │ │ ├── navigation-menu.component.spec.ts │ │ │ └── navigation-menu.component.ts │ │ ├── page-not-found │ │ │ ├── page-not-found.component.spec.ts │ │ │ └── page-not-found.component.ts │ │ ├── pos │ │ │ ├── pos-routing.module.ts │ │ │ ├── pos.module.spec.ts │ │ │ ├── pos.module.ts │ │ │ └── pos │ │ │ │ ├── pos.component.css │ │ │ │ ├── pos.component.html │ │ │ │ ├── pos.component.spec.ts │ │ │ │ └── pos.component.ts │ │ ├── shared-components.module.spec.ts │ │ ├── shared-components.module.ts │ │ └── user │ │ │ ├── logout │ │ │ ├── logout.component.spec.ts │ │ │ └── logout.component.ts │ │ │ ├── profile │ │ │ ├── data.ts │ │ │ ├── profile.component.css │ │ │ ├── profile.component.html │ │ │ ├── profile.component.spec.ts │ │ │ └── profile.component.ts │ │ │ ├── user-material.module.spec.ts │ │ │ ├── user-material.module.ts │ │ │ ├── user-routing.module.ts │ │ │ ├── user.module.spec.ts │ │ │ ├── user.module.ts │ │ │ ├── user │ │ │ ├── user.resolve.ts │ │ │ ├── user.service.fake.ts │ │ │ ├── user.service.spec.ts │ │ │ ├── user.service.ts │ │ │ └── user.ts │ │ │ └── view-user │ │ │ ├── view-user.component.spec.ts │ │ │ └── view-user.component.ts │ ├── apple-touch-icon.png │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── icons │ │ │ └── lemon.svg │ ├── browserconfig.xml │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── lemonmart-theme.scss │ ├── main.ts │ ├── manifest.json │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── polyfills.ts │ ├── safari-pinned-tab.svg │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Chapter11 └── lemon-mart │ ├── .circleci │ └── config.yml │ ├── .dockerignore │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── Dockerfile │ ├── Dockerfile.integration │ ├── Dockerfile.node │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── app │ │ ├── app-material.module.spec.ts │ │ ├── app-material.module.ts │ │ ├── app-routing.module.ts │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── auth │ │ │ ├── auth-guard.service.spec.ts │ │ │ ├── auth-guard.service.ts │ │ │ ├── auth-http-interceptor.ts │ │ │ ├── auth.service.fake.ts │ │ │ ├── auth.service.spec.ts │ │ │ ├── auth.service.ts │ │ │ ├── cache.service.ts │ │ │ └── role.enum.ts │ │ ├── common │ │ │ ├── common.testing.ts │ │ │ ├── common.ts │ │ │ ├── simple-dialog │ │ │ │ ├── simple-dialog.component.spec.ts │ │ │ │ └── simple-dialog.component.ts │ │ │ ├── ui.service.spec.ts │ │ │ ├── ui.service.ts │ │ │ └── validations.ts │ │ ├── home │ │ │ ├── home.component.spec.ts │ │ │ └── home.component.ts │ │ ├── inventory │ │ │ ├── categories │ │ │ │ ├── categories.component.css │ │ │ │ ├── categories.component.html │ │ │ │ ├── categories.component.spec.ts │ │ │ │ └── categories.component.ts │ │ │ ├── inventory-home │ │ │ │ ├── inventory-home.component.spec.ts │ │ │ │ └── inventory-home.component.ts │ │ │ ├── inventory-routing.module.ts │ │ │ ├── inventory.component.spec.ts │ │ │ ├── inventory.component.ts │ │ │ ├── inventory.module.spec.ts │ │ │ ├── inventory.module.ts │ │ │ ├── products │ │ │ │ ├── products.component.css │ │ │ │ ├── products.component.html │ │ │ │ ├── products.component.spec.ts │ │ │ │ └── products.component.ts │ │ │ └── stock-entry │ │ │ │ ├── stock-entry.component.css │ │ │ │ ├── stock-entry.component.html │ │ │ │ ├── stock-entry.component.spec.ts │ │ │ │ └── stock-entry.component.ts │ │ ├── login │ │ │ ├── login.component.html │ │ │ ├── login.component.spec.ts │ │ │ └── login.component.ts │ │ ├── manager │ │ │ ├── manager-home │ │ │ │ ├── manager-home.component.spec.ts │ │ │ │ └── manager-home.component.ts │ │ │ ├── manager-material.module.spec.ts │ │ │ ├── manager-material.module.ts │ │ │ ├── manager-routing.module.ts │ │ │ ├── manager.component.spec.ts │ │ │ ├── manager.component.ts │ │ │ ├── manager.module.spec.ts │ │ │ ├── manager.module.ts │ │ │ ├── receipt-lookup │ │ │ │ ├── receipt-lookup.component.css │ │ │ │ ├── receipt-lookup.component.html │ │ │ │ ├── receipt-lookup.component.spec.ts │ │ │ │ └── receipt-lookup.component.ts │ │ │ ├── user-management │ │ │ │ ├── user-management.component.spec.ts │ │ │ │ └── user-management.component.ts │ │ │ └── user-table │ │ │ │ ├── user-table.component.css │ │ │ │ ├── user-table.component.html │ │ │ │ ├── user-table.component.spec.ts │ │ │ │ └── user-table.component.ts │ │ ├── navigation-menu │ │ │ ├── navigation-menu.component.spec.ts │ │ │ └── navigation-menu.component.ts │ │ ├── page-not-found │ │ │ ├── page-not-found.component.spec.ts │ │ │ └── page-not-found.component.ts │ │ ├── pos │ │ │ ├── pos-routing.module.ts │ │ │ ├── pos.module.spec.ts │ │ │ ├── pos.module.ts │ │ │ └── pos │ │ │ │ ├── pos.component.css │ │ │ │ ├── pos.component.html │ │ │ │ ├── pos.component.spec.ts │ │ │ │ └── pos.component.ts │ │ ├── shared-components.module.spec.ts │ │ ├── shared-components.module.ts │ │ └── user │ │ │ ├── logout │ │ │ ├── logout.component.spec.ts │ │ │ └── logout.component.ts │ │ │ ├── profile │ │ │ ├── data.ts │ │ │ ├── profile.component.css │ │ │ ├── profile.component.html │ │ │ ├── profile.component.spec.ts │ │ │ └── profile.component.ts │ │ │ ├── user-material.module.spec.ts │ │ │ ├── user-material.module.ts │ │ │ ├── user-routing.module.ts │ │ │ ├── user.module.spec.ts │ │ │ ├── user.module.ts │ │ │ ├── user │ │ │ ├── user.resolve.ts │ │ │ ├── user.service.fake.ts │ │ │ ├── user.service.spec.ts │ │ │ ├── user.service.ts │ │ │ └── user.ts │ │ │ └── view-user │ │ │ ├── view-user.component.spec.ts │ │ │ └── view-user.component.ts │ ├── apple-touch-icon.png │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── icons │ │ │ └── lemon.svg │ ├── browserconfig.xml │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── lemonmart-theme.scss │ ├── main.ts │ ├── manifest.json │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── polyfills.ts │ ├── safari-pinned-tab.svg │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Chapter12 └── lemon-mart │ ├── .circleci │ └── config.yml │ ├── .dockerignore │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── Dockerfile │ ├── Dockerfile.integration │ ├── Dockerfile.node │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── app │ │ ├── app-material.module.spec.ts │ │ ├── app-material.module.ts │ │ ├── app-routing.module.ts │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── auth │ │ │ ├── auth-guard.service.spec.ts │ │ │ ├── auth-guard.service.ts │ │ │ ├── auth-http-interceptor.ts │ │ │ ├── auth.service.fake.ts │ │ │ ├── auth.service.spec.ts │ │ │ ├── auth.service.ts │ │ │ ├── cache.service.ts │ │ │ └── role.enum.ts │ │ ├── common │ │ │ ├── common.testing.ts │ │ │ ├── common.ts │ │ │ ├── simple-dialog │ │ │ │ ├── simple-dialog.component.spec.ts │ │ │ │ └── simple-dialog.component.ts │ │ │ ├── ui.service.spec.ts │ │ │ ├── ui.service.ts │ │ │ └── validations.ts │ │ ├── home │ │ │ ├── home.component.spec.ts │ │ │ └── home.component.ts │ │ ├── inventory │ │ │ ├── categories │ │ │ │ ├── categories.component.css │ │ │ │ ├── categories.component.html │ │ │ │ ├── categories.component.spec.ts │ │ │ │ └── categories.component.ts │ │ │ ├── inventory-home │ │ │ │ ├── inventory-home.component.spec.ts │ │ │ │ └── inventory-home.component.ts │ │ │ ├── inventory-routing.module.ts │ │ │ ├── inventory.component.spec.ts │ │ │ ├── inventory.component.ts │ │ │ ├── inventory.module.spec.ts │ │ │ ├── inventory.module.ts │ │ │ ├── products │ │ │ │ ├── products.component.css │ │ │ │ ├── products.component.html │ │ │ │ ├── products.component.spec.ts │ │ │ │ └── products.component.ts │ │ │ └── stock-entry │ │ │ │ ├── stock-entry.component.css │ │ │ │ ├── stock-entry.component.html │ │ │ │ ├── stock-entry.component.spec.ts │ │ │ │ └── stock-entry.component.ts │ │ ├── login │ │ │ ├── login.component.html │ │ │ ├── login.component.spec.ts │ │ │ └── login.component.ts │ │ ├── manager │ │ │ ├── manager-home │ │ │ │ ├── manager-home.component.spec.ts │ │ │ │ └── manager-home.component.ts │ │ │ ├── manager-material.module.spec.ts │ │ │ ├── manager-material.module.ts │ │ │ ├── manager-routing.module.ts │ │ │ ├── manager.component.spec.ts │ │ │ ├── manager.component.ts │ │ │ ├── manager.module.spec.ts │ │ │ ├── manager.module.ts │ │ │ ├── receipt-lookup │ │ │ │ ├── receipt-lookup.component.css │ │ │ │ ├── receipt-lookup.component.html │ │ │ │ ├── receipt-lookup.component.spec.ts │ │ │ │ └── receipt-lookup.component.ts │ │ │ ├── user-management │ │ │ │ ├── user-management.component.spec.ts │ │ │ │ └── user-management.component.ts │ │ │ └── user-table │ │ │ │ ├── user-table.component.css │ │ │ │ ├── user-table.component.html │ │ │ │ ├── user-table.component.spec.ts │ │ │ │ └── user-table.component.ts │ │ ├── navigation-menu │ │ │ ├── navigation-menu.component.spec.ts │ │ │ └── navigation-menu.component.ts │ │ ├── page-not-found │ │ │ ├── page-not-found.component.spec.ts │ │ │ └── page-not-found.component.ts │ │ ├── pos │ │ │ ├── pos-routing.module.ts │ │ │ ├── pos.module.spec.ts │ │ │ ├── pos.module.ts │ │ │ └── pos │ │ │ │ ├── pos.component.css │ │ │ │ ├── pos.component.html │ │ │ │ ├── pos.component.spec.ts │ │ │ │ └── pos.component.ts │ │ ├── shared-components.module.spec.ts │ │ ├── shared-components.module.ts │ │ └── user │ │ │ ├── logout │ │ │ ├── logout.component.spec.ts │ │ │ └── logout.component.ts │ │ │ ├── profile │ │ │ ├── data.ts │ │ │ ├── profile.component.css │ │ │ ├── profile.component.html │ │ │ ├── profile.component.spec.ts │ │ │ └── profile.component.ts │ │ │ ├── user-material.module.spec.ts │ │ │ ├── user-material.module.ts │ │ │ ├── user-routing.module.ts │ │ │ ├── user.module.spec.ts │ │ │ ├── user.module.ts │ │ │ ├── user │ │ │ ├── user.resolve.ts │ │ │ ├── user.service.fake.ts │ │ │ ├── user.service.spec.ts │ │ │ ├── user.service.ts │ │ │ └── user.ts │ │ │ └── view-user │ │ │ ├── view-user.component.spec.ts │ │ │ └── view-user.component.ts │ ├── apple-touch-icon.png │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── icons │ │ │ └── lemon.svg │ ├── browserconfig.xml │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── lemonmart-theme.scss │ ├── main.ts │ ├── manifest.json │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── polyfills.ts │ ├── safari-pinned-tab.svg │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Chapter2 └── local-weather-app │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── current-weather │ │ │ ├── current-weather.component.css │ │ │ ├── current-weather.component.html │ │ │ ├── current-weather.component.spec.ts │ │ │ └── current-weather.component.ts │ │ ├── interfaces.ts │ │ └── weather │ │ │ ├── weather.service.spec.ts │ │ │ └── weather.service.ts │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── sunny.svg │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Chapter3 └── local-weather-app │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── Dockerfile │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── now │ └── Dockerfile │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── current-weather │ │ │ ├── current-weather.component.css │ │ │ ├── current-weather.component.html │ │ │ ├── current-weather.component.spec.ts │ │ │ └── current-weather.component.ts │ │ ├── interfaces.ts │ │ └── weather │ │ │ ├── weather.service.fake.ts │ │ │ ├── weather.service.spec.ts │ │ │ └── weather.service.ts │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── sunny.svg │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Chapter4 └── readme.txt ├── Chapter5 └── local-weather-app │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── Dockerfile │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── now │ └── Dockerfile │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── current-weather │ │ │ ├── current-weather.component.css │ │ │ ├── current-weather.component.html │ │ │ ├── current-weather.component.spec.ts │ │ │ └── current-weather.component.ts │ │ ├── interfaces.ts │ │ ├── material.module.spec.ts │ │ ├── material.module.ts │ │ └── weather │ │ │ ├── weather.service.fake.ts │ │ │ ├── weather.service.spec.ts │ │ │ └── weather.service.ts │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── sunny.svg │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── localcast-theme.scss │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Chapter6 └── local-weather-app │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── Dockerfile │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── now │ └── Dockerfile │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── city-search-tpldriven │ │ │ ├── city-search-tpldriven.component.css │ │ │ ├── city-search-tpldriven.component.html │ │ │ ├── city-search-tpldriven.component.spec.ts │ │ │ └── city-search-tpldriven.component.ts │ │ ├── city-search │ │ │ ├── city-search.component.css │ │ │ ├── city-search.component.html │ │ │ ├── city-search.component.spec.ts │ │ │ └── city-search.component.ts │ │ ├── current-weather │ │ │ ├── current-weather.component.css │ │ │ ├── current-weather.component.html │ │ │ ├── current-weather.component.spec.ts │ │ │ └── current-weather.component.ts │ │ ├── interfaces.ts │ │ ├── material.module.spec.ts │ │ ├── material.module.ts │ │ └── weather │ │ │ ├── weather.service.fake.ts │ │ │ ├── weather.service.spec.ts │ │ │ └── weather.service.ts │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── sunny.svg │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── localcast-theme.scss │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Chapter7 └── lemon-mart │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── common │ │ │ └── common.testing.ts │ │ ├── home │ │ │ ├── home.component.spec.ts │ │ │ └── home.component.ts │ │ ├── inventory │ │ │ ├── categories │ │ │ │ ├── categories.component.css │ │ │ │ ├── categories.component.html │ │ │ │ ├── categories.component.spec.ts │ │ │ │ └── categories.component.ts │ │ │ ├── inventory-home │ │ │ │ ├── inventory-home.component.spec.ts │ │ │ │ └── inventory-home.component.ts │ │ │ ├── inventory-routing.module.ts │ │ │ ├── inventory.component.spec.ts │ │ │ ├── inventory.component.ts │ │ │ ├── inventory.module.spec.ts │ │ │ ├── inventory.module.ts │ │ │ ├── products │ │ │ │ ├── products.component.css │ │ │ │ ├── products.component.html │ │ │ │ ├── products.component.spec.ts │ │ │ │ └── products.component.ts │ │ │ └── stock-entry │ │ │ │ ├── stock-entry.component.css │ │ │ │ ├── stock-entry.component.html │ │ │ │ ├── stock-entry.component.spec.ts │ │ │ │ └── stock-entry.component.ts │ │ ├── manager │ │ │ ├── manager-home │ │ │ │ ├── manager-home.component.spec.ts │ │ │ │ └── manager-home.component.ts │ │ │ ├── manager-routing.module.ts │ │ │ ├── manager.component.spec.ts │ │ │ ├── manager.component.ts │ │ │ ├── manager.module.spec.ts │ │ │ ├── manager.module.ts │ │ │ ├── receipt-lookup │ │ │ │ ├── receipt-lookup.component.css │ │ │ │ ├── receipt-lookup.component.html │ │ │ │ ├── receipt-lookup.component.spec.ts │ │ │ │ └── receipt-lookup.component.ts │ │ │ └── user-management │ │ │ │ ├── user-management.component.css │ │ │ │ ├── user-management.component.html │ │ │ │ ├── user-management.component.spec.ts │ │ │ │ └── user-management.component.ts │ │ ├── material.module.spec.ts │ │ ├── material.module.ts │ │ ├── page-not-found │ │ │ ├── page-not-found.component.spec.ts │ │ │ └── page-not-found.component.ts │ │ ├── pos │ │ │ ├── pos-routing.module.ts │ │ │ ├── pos.module.spec.ts │ │ │ ├── pos.module.ts │ │ │ └── pos │ │ │ │ ├── pos.component.css │ │ │ │ ├── pos.component.html │ │ │ │ ├── pos.component.spec.ts │ │ │ │ └── pos.component.ts │ │ └── user │ │ │ ├── logout │ │ │ ├── logout.component.spec.ts │ │ │ └── logout.component.ts │ │ │ ├── navigation-menu │ │ │ ├── navigation-menu.component.spec.ts │ │ │ └── navigation-menu.component.ts │ │ │ ├── profile │ │ │ ├── profile.component.css │ │ │ ├── profile.component.html │ │ │ ├── profile.component.spec.ts │ │ │ └── profile.component.ts │ │ │ ├── user-routing.module.ts │ │ │ ├── user.module.spec.ts │ │ │ └── user.module.ts │ ├── apple-touch-icon.png │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── icons │ │ │ └── lemon.svg │ ├── browserconfig.xml │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── lemonmart-theme.scss │ ├── main.ts │ ├── manifest.json │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── polyfills.ts │ ├── safari-pinned-tab.svg │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Chapter8 ├── lemon-mart-swagger-server │ ├── .dockerignore │ ├── .gitattributes │ ├── .gitignore │ ├── .vscode │ │ └── extensions.json │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── server │ │ ├── .swagger-codegen-ignore │ │ ├── .swagger-codegen │ │ │ └── VERSION │ │ ├── README.md │ │ ├── api │ │ │ └── swagger.yaml │ │ ├── controllers │ │ │ └── Default.js │ │ ├── index.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── service │ │ │ └── DefaultService.js │ │ └── utils │ │ │ └── writer.js │ ├── swagger.2.yaml │ └── swagger.oas3.yaml └── lemon-mart │ ├── .circleci │ └── config.yml │ ├── .dockerignore │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── Dockerfile │ ├── Dockerfile.integration │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── common │ │ │ └── common.testing.ts │ │ ├── home │ │ │ ├── home.component.spec.ts │ │ │ └── home.component.ts │ │ ├── inventory │ │ │ ├── categories │ │ │ │ ├── categories.component.css │ │ │ │ ├── categories.component.html │ │ │ │ ├── categories.component.spec.ts │ │ │ │ └── categories.component.ts │ │ │ ├── inventory-home │ │ │ │ ├── inventory-home.component.spec.ts │ │ │ │ └── inventory-home.component.ts │ │ │ ├── inventory-routing.module.ts │ │ │ ├── inventory.component.spec.ts │ │ │ ├── inventory.component.ts │ │ │ ├── inventory.module.spec.ts │ │ │ ├── inventory.module.ts │ │ │ ├── products │ │ │ │ ├── products.component.css │ │ │ │ ├── products.component.html │ │ │ │ ├── products.component.spec.ts │ │ │ │ └── products.component.ts │ │ │ └── stock-entry │ │ │ │ ├── stock-entry.component.css │ │ │ │ ├── stock-entry.component.html │ │ │ │ ├── stock-entry.component.spec.ts │ │ │ │ └── stock-entry.component.ts │ │ ├── manager │ │ │ ├── manager-home │ │ │ │ ├── manager-home.component.spec.ts │ │ │ │ └── manager-home.component.ts │ │ │ ├── manager-routing.module.ts │ │ │ ├── manager.component.spec.ts │ │ │ ├── manager.component.ts │ │ │ ├── manager.module.spec.ts │ │ │ ├── manager.module.ts │ │ │ ├── receipt-lookup │ │ │ │ ├── receipt-lookup.component.css │ │ │ │ ├── receipt-lookup.component.html │ │ │ │ ├── receipt-lookup.component.spec.ts │ │ │ │ └── receipt-lookup.component.ts │ │ │ └── user-management │ │ │ │ ├── user-management.component.css │ │ │ │ ├── user-management.component.html │ │ │ │ ├── user-management.component.spec.ts │ │ │ │ └── user-management.component.ts │ │ ├── material.module.spec.ts │ │ ├── material.module.ts │ │ ├── page-not-found │ │ │ ├── page-not-found.component.spec.ts │ │ │ └── page-not-found.component.ts │ │ ├── pos │ │ │ ├── pos-routing.module.ts │ │ │ ├── pos.module.spec.ts │ │ │ ├── pos.module.ts │ │ │ └── pos │ │ │ │ ├── pos.component.css │ │ │ │ ├── pos.component.html │ │ │ │ ├── pos.component.spec.ts │ │ │ │ └── pos.component.ts │ │ └── user │ │ │ ├── logout │ │ │ ├── logout.component.spec.ts │ │ │ └── logout.component.ts │ │ │ ├── navigation-menu │ │ │ ├── navigation-menu.component.spec.ts │ │ │ └── navigation-menu.component.ts │ │ │ ├── profile │ │ │ ├── profile.component.css │ │ │ ├── profile.component.html │ │ │ ├── profile.component.spec.ts │ │ │ └── profile.component.ts │ │ │ ├── user-routing.module.ts │ │ │ ├── user.module.spec.ts │ │ │ └── user.module.ts │ ├── apple-touch-icon.png │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── icons │ │ │ └── lemon.svg │ ├── browserconfig.xml │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── lemonmart-theme.scss │ ├── main.ts │ ├── manifest.json │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── polyfills.ts │ ├── safari-pinned-tab.svg │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Chapter9 └── lemon-mart │ ├── .circleci │ └── config.yml │ ├── .dockerignore │ ├── .editorconfig │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── settings.json │ ├── Dockerfile │ ├── Dockerfile.integration │ ├── README.md │ ├── angular.json │ ├── dev-norms.md │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── auth │ │ │ ├── auth-guard.service.spec.ts │ │ │ ├── auth-guard.service.ts │ │ │ ├── auth-http-interceptor.ts │ │ │ ├── auth.service.fake.ts │ │ │ ├── auth.service.spec.ts │ │ │ ├── auth.service.ts │ │ │ ├── cache.service.ts │ │ │ └── role.enum.ts │ │ ├── common │ │ │ ├── common.testing.ts │ │ │ ├── common.ts │ │ │ ├── simple-dialog │ │ │ │ ├── simple-dialog.component.spec.ts │ │ │ │ └── simple-dialog.component.ts │ │ │ ├── ui.service.spec.ts │ │ │ ├── ui.service.ts │ │ │ └── validations.ts │ │ ├── home │ │ │ ├── home.component.spec.ts │ │ │ └── home.component.ts │ │ ├── inventory │ │ │ ├── categories │ │ │ │ ├── categories.component.css │ │ │ │ ├── categories.component.html │ │ │ │ ├── categories.component.spec.ts │ │ │ │ └── categories.component.ts │ │ │ ├── inventory-home │ │ │ │ ├── inventory-home.component.spec.ts │ │ │ │ └── inventory-home.component.ts │ │ │ ├── inventory-routing.module.ts │ │ │ ├── inventory.component.spec.ts │ │ │ ├── inventory.component.ts │ │ │ ├── inventory.module.spec.ts │ │ │ ├── inventory.module.ts │ │ │ ├── products │ │ │ │ ├── products.component.css │ │ │ │ ├── products.component.html │ │ │ │ ├── products.component.spec.ts │ │ │ │ └── products.component.ts │ │ │ └── stock-entry │ │ │ │ ├── stock-entry.component.css │ │ │ │ ├── stock-entry.component.html │ │ │ │ ├── stock-entry.component.spec.ts │ │ │ │ └── stock-entry.component.ts │ │ ├── login │ │ │ ├── login.component.html │ │ │ ├── login.component.spec.ts │ │ │ └── login.component.ts │ │ ├── manager │ │ │ ├── manager-home │ │ │ │ ├── manager-home.component.spec.ts │ │ │ │ └── manager-home.component.ts │ │ │ ├── manager-routing.module.ts │ │ │ ├── manager.component.spec.ts │ │ │ ├── manager.component.ts │ │ │ ├── manager.module.spec.ts │ │ │ ├── manager.module.ts │ │ │ ├── receipt-lookup │ │ │ │ ├── receipt-lookup.component.css │ │ │ │ ├── receipt-lookup.component.html │ │ │ │ ├── receipt-lookup.component.spec.ts │ │ │ │ └── receipt-lookup.component.ts │ │ │ └── user-management │ │ │ │ ├── user-management.component.css │ │ │ │ ├── user-management.component.html │ │ │ │ ├── user-management.component.spec.ts │ │ │ │ └── user-management.component.ts │ │ ├── material.module.spec.ts │ │ ├── material.module.ts │ │ ├── navigation-menu │ │ │ ├── navigation-menu.component.spec.ts │ │ │ └── navigation-menu.component.ts │ │ ├── page-not-found │ │ │ ├── page-not-found.component.spec.ts │ │ │ └── page-not-found.component.ts │ │ ├── pos │ │ │ ├── pos-routing.module.ts │ │ │ ├── pos.module.spec.ts │ │ │ ├── pos.module.ts │ │ │ └── pos │ │ │ │ ├── pos.component.css │ │ │ │ ├── pos.component.html │ │ │ │ ├── pos.component.spec.ts │ │ │ │ └── pos.component.ts │ │ └── user │ │ │ ├── logout │ │ │ ├── logout.component.spec.ts │ │ │ └── logout.component.ts │ │ │ ├── profile │ │ │ ├── profile.component.css │ │ │ ├── profile.component.html │ │ │ ├── profile.component.spec.ts │ │ │ └── profile.component.ts │ │ │ ├── user-routing.module.ts │ │ │ ├── user.module.spec.ts │ │ │ └── user.module.ts │ ├── apple-touch-icon.png │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── icons │ │ │ └── lemon.svg │ ├── browserconfig.xml │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── lemonmart-theme.scss │ ├── main.ts │ ├── manifest.json │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── polyfills.ts │ ├── safari-pinned-tab.svg │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /Chapter10/lemon-mart/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: docker:17.12.0-ce-git 6 | working_directory: /usr/src 7 | steps: 8 | - checkout 9 | - setup_remote_docker: 10 | docker_layer_caching: false 11 | - run: 12 | name: Build Docker Image 13 | command: | 14 | docker build -f Dockerfile.integration . 15 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-node-web-server:8.11.1 2 | WORKDIR /usr/src/app 3 | COPY dist public 4 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('LemonMart') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root mat-toolbar .mat-h2')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/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 | } -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/android-chrome-192x192.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/android-chrome-512x512.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/app-material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { AppMaterialModule } from './app-material.module' 2 | 3 | describe('MaterialModule', () => { 4 | let materialModule: AppMaterialModule 5 | 6 | beforeEach(() => { 7 | materialModule = new AppMaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(materialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/auth/role.enum.ts: -------------------------------------------------------------------------------- 1 | export enum Role { 2 | None = 'none', 3 | Clerk = 'clerk', 4 | Cashier = 'cashier', 5 | Manager = 'manager', 6 | } 7 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/common/ui.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { inject, TestBed } from '@angular/core/testing' 2 | 3 | import { commonTestingModules } from './common.testing' 4 | import { UiService } from './ui.service' 5 | 6 | describe('UiService', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | providers: [UiService], 10 | imports: commonTestingModules, 11 | }) 12 | }) 13 | 14 | it( 15 | 'should be created', 16 | inject([UiService], (service: UiService) => { 17 | expect(service).toBeTruthy() 18 | }) 19 | ) 20 | }) 21 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/categories/categories.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/app/inventory/categories/categories.component.css -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/categories/categories.component.html: -------------------------------------------------------------------------------- 1 |

2 | categories works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/categories/categories.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-categories', 5 | templateUrl: './categories.component.html', 6 | styleUrls: ['./categories.component.css'], 7 | }) 8 | export class CategoriesComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/inventory-home/inventory-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-inventory-home', 5 | template: ` 6 |

7 | inventory-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class InventoryHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/inventory.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { InventoryModule } from './inventory.module' 2 | 3 | describe('InventoryModule', () => { 4 | let inventoryModule: InventoryModule 5 | 6 | beforeEach(() => { 7 | inventoryModule = new InventoryModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(inventoryModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/products/products.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/app/inventory/products/products.component.css -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/products/products.component.html: -------------------------------------------------------------------------------- 1 |

2 | products works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/products/products.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-products', 5 | templateUrl: './products.component.html', 6 | styleUrls: ['./products.component.css'], 7 | }) 8 | export class ProductsComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.html: -------------------------------------------------------------------------------- 1 |

2 | stock-entry works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-stock-entry', 5 | templateUrl: './stock-entry.component.html', 6 | styleUrls: ['./stock-entry.component.css'], 7 | }) 8 | export class StockEntryComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/manager/manager-home/manager-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-manager-home', 5 | template: ` 6 |

7 | manager-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class ManagerHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/manager/manager-material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerMaterialModule } from './manager-material.module' 2 | 3 | describe('ManagerMaterialModule', () => { 4 | let managerMaterialModule: ManagerMaterialModule 5 | 6 | beforeEach(() => { 7 | managerMaterialModule = new ManagerMaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(managerMaterialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/manager/manager-material.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { 3 | MatPaginatorModule, 4 | MatProgressSpinnerModule, 5 | MatSortModule, 6 | MatTableModule, 7 | } from '@angular/material' 8 | 9 | @NgModule({ 10 | imports: [MatTableModule, MatSortModule, MatPaginatorModule, MatProgressSpinnerModule], 11 | exports: [MatTableModule, MatSortModule, MatPaginatorModule, MatProgressSpinnerModule], 12 | }) 13 | export class ManagerMaterialModule {} 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/manager/manager.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerModule } from './manager.module' 2 | 3 | describe('ManagerModule', () => { 4 | let managerModule: ManagerModule 5 | 6 | beforeEach(() => { 7 | managerModule = new ManagerModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(managerModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.html: -------------------------------------------------------------------------------- 1 |

2 | receipt-lookup works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-receipt-lookup', 5 | templateUrl: './receipt-lookup.component.html', 6 | styleUrls: ['./receipt-lookup.component.css'], 7 | }) 8 | export class ReceiptLookupComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/manager/user-management/user-management.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-user-management', 5 | template: ` 6 |
7 | 8 |
9 | 10 |
11 | `, 12 | }) 13 | export class UserManagementComponent implements OnInit { 14 | constructor() {} 15 | 16 | ngOnInit() {} 17 | } 18 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/manager/user-table/user-table.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/app/manager/user-table/user-table.component.css -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/page-not-found/page-not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-page-not-found', 5 | template: ` 6 |

7 | This page doesn't exist. Go back to home. 8 |

9 | `, 10 | }) 11 | export class PageNotFoundComponent implements OnInit { 12 | constructor() {} 13 | 14 | ngOnInit() {} 15 | } 16 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/pos/pos-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { Routes, RouterModule } from '@angular/router' 3 | import { PosComponent } from './pos/pos.component' 4 | 5 | const routes: Routes = [{ path: '', component: PosComponent }] 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forChild(routes)], 9 | exports: [RouterModule], 10 | }) 11 | export class PosRoutingModule {} 12 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/pos/pos.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { PosModule } from './pos.module' 2 | 3 | describe('PosModule', () => { 4 | let posModule: PosModule 5 | 6 | beforeEach(() => { 7 | posModule = new PosModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(posModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/pos/pos.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { CommonModule } from '@angular/common' 3 | 4 | import { PosRoutingModule } from './pos-routing.module' 5 | import { PosComponent } from './pos/pos.component' 6 | 7 | @NgModule({ 8 | imports: [CommonModule, PosRoutingModule], 9 | declarations: [PosComponent], 10 | }) 11 | export class PosModule {} 12 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/pos/pos/pos.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/app/pos/pos/pos.component.css -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/pos/pos/pos.component.html: -------------------------------------------------------------------------------- 1 |

2 | pos works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/pos/pos/pos.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-pos', 5 | templateUrl: './pos.component.html', 6 | styleUrls: ['./pos.component.css'], 7 | }) 8 | export class PosComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/shared-components.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { SharedComponentsModule } from './shared-components.module' 2 | 3 | describe('SharedComponentsModule', () => { 4 | let sharedComponentsModule: SharedComponentsModule 5 | 6 | beforeEach(() => { 7 | sharedComponentsModule = new SharedComponentsModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(sharedComponentsModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/user/logout/logout.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | import { Router } from '@angular/router' 3 | import { AuthService } from '../../auth/auth.service' 4 | 5 | @Component({ 6 | selector: 'app-logout', 7 | template: ` 8 |

9 | Logging out... 10 |

11 | `, 12 | styles: [], 13 | }) 14 | export class LogoutComponent implements OnInit { 15 | constructor(private router: Router, private authService: AuthService) {} 16 | 17 | ngOnInit() { 18 | this.authService.logout() 19 | this.router.navigate(['/']) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/user/profile/profile.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/app/user/profile/profile.component.css -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/user/user-material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserMaterialModule } from './user-material.module' 2 | 3 | describe('UserMaterialModule', () => { 4 | let userMaterialModule: UserMaterialModule 5 | 6 | beforeEach(() => { 7 | userMaterialModule = new UserMaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(userMaterialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/user/user.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserModule } from './user.module' 2 | 3 | describe('UserModule', () => { 4 | let userModule: UserModule 5 | 6 | beforeEach(() => { 7 | userModule = new UserModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(userModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/app/user/user/user.resolve.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core' 2 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' 3 | 4 | import { IUser } from './user' 5 | import { UserService } from './user.service' 6 | 7 | @Injectable() 8 | export class UserResolve implements Resolve { 9 | constructor(private userService: UserService) {} 10 | 11 | resolve(route: ActivatedRouteSnapshot) { 12 | return this.userService.getUser(route.paramMap.get('userId')) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/apple-touch-icon.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffc40d 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { production: true, baseUrl: 'http://localhost:3000' } 2 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/favicon-16x16.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/favicon-32x32.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/favicon.ico -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/lemonmart-theme.scss: -------------------------------------------------------------------------------- 1 | @import '~@angular/material/theming'; 2 | 3 | @include mat-core(); 4 | 5 | $localcast-primary: mat-palette($mat-green, 800); 6 | $localcast-accent: mat-palette($mat-lime, A400); 7 | 8 | $localcast-app-theme: mat-light-theme($localcast-primary, $localcast-accent); 9 | 10 | @include angular-material-theme($localcast-app-theme); 11 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "icons": [ 4 | { 5 | "src": "/android-chrome-192x192.png?v=rMlKOnvxlK", 6 | "sizes": "192x192", 7 | "type": "image/png" 8 | }, 9 | { 10 | "src": "/android-chrome-512x512.png?v=rMlKOnvxlK", 11 | "sizes": "512x512", 12 | "type": "image/png" 13 | } 14 | ], 15 | "theme_color": "#ffffff", 16 | "background_color": "#ffffff", 17 | "display": "standalone" 18 | } -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/mstile-144x144.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/mstile-150x150.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/mstile-310x150.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/mstile-310x310.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter10/lemon-mart/src/mstile-70x70.png -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .margin-top { 6 | margin-top: 16px; 7 | } 8 | 9 | .horizontal-padding { 10 | margin-left: 16px; 11 | margin-right: 16px; 12 | } 13 | 14 | .flex-spacer { 15 | flex: 1 1 auto; 16 | } 17 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/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 | -------------------------------------------------------------------------------- /Chapter10/lemon-mart/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: docker:17.12.0-ce-git 6 | working_directory: /usr/src 7 | steps: 8 | - checkout 9 | - setup_remote_docker: 10 | docker_layer_caching: false 11 | - run: 12 | name: Build Docker Image 13 | command: | 14 | docker build -f Dockerfile.integration . 15 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-nginx-web-server:1.13.8-alpine 2 | COPY dist /var/www 3 | CMD 'nginx' 4 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/Dockerfile.node: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-node-web-server:8.11.1 2 | WORKDIR /usr/src/app 3 | COPY dist public 4 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('LemonMart') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root mat-toolbar .mat-h2')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/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 | } -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/android-chrome-192x192.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/android-chrome-512x512.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/app-material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { AppMaterialModule } from './app-material.module' 2 | 3 | describe('MaterialModule', () => { 4 | let materialModule: AppMaterialModule 5 | 6 | beforeEach(() => { 7 | materialModule = new AppMaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(materialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/auth/role.enum.ts: -------------------------------------------------------------------------------- 1 | export enum Role { 2 | None = 'none', 3 | Clerk = 'clerk', 4 | Cashier = 'cashier', 5 | Manager = 'manager', 6 | } 7 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/common/ui.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { inject, TestBed } from '@angular/core/testing' 2 | 3 | import { commonTestingModules } from './common.testing' 4 | import { UiService } from './ui.service' 5 | 6 | describe('UiService', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | providers: [UiService], 10 | imports: commonTestingModules, 11 | }) 12 | }) 13 | 14 | it( 15 | 'should be created', 16 | inject([UiService], (service: UiService) => { 17 | expect(service).toBeTruthy() 18 | }) 19 | ) 20 | }) 21 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/categories/categories.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/app/inventory/categories/categories.component.css -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/categories/categories.component.html: -------------------------------------------------------------------------------- 1 |

2 | categories works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/categories/categories.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-categories', 5 | templateUrl: './categories.component.html', 6 | styleUrls: ['./categories.component.css'], 7 | }) 8 | export class CategoriesComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/inventory-home/inventory-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-inventory-home', 5 | template: ` 6 |

7 | inventory-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class InventoryHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/inventory.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { InventoryModule } from './inventory.module' 2 | 3 | describe('InventoryModule', () => { 4 | let inventoryModule: InventoryModule 5 | 6 | beforeEach(() => { 7 | inventoryModule = new InventoryModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(inventoryModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/products/products.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/app/inventory/products/products.component.css -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/products/products.component.html: -------------------------------------------------------------------------------- 1 |

2 | products works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/products/products.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-products', 5 | templateUrl: './products.component.html', 6 | styleUrls: ['./products.component.css'], 7 | }) 8 | export class ProductsComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.html: -------------------------------------------------------------------------------- 1 |

2 | stock-entry works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-stock-entry', 5 | templateUrl: './stock-entry.component.html', 6 | styleUrls: ['./stock-entry.component.css'], 7 | }) 8 | export class StockEntryComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/manager/manager-home/manager-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-manager-home', 5 | template: ` 6 |

7 | manager-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class ManagerHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/manager/manager-material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerMaterialModule } from './manager-material.module' 2 | 3 | describe('ManagerMaterialModule', () => { 4 | let managerMaterialModule: ManagerMaterialModule 5 | 6 | beforeEach(() => { 7 | managerMaterialModule = new ManagerMaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(managerMaterialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/manager/manager-material.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { 3 | MatPaginatorModule, 4 | MatProgressSpinnerModule, 5 | MatSortModule, 6 | MatTableModule, 7 | } from '@angular/material' 8 | 9 | @NgModule({ 10 | imports: [MatTableModule, MatSortModule, MatPaginatorModule, MatProgressSpinnerModule], 11 | exports: [MatTableModule, MatSortModule, MatPaginatorModule, MatProgressSpinnerModule], 12 | }) 13 | export class ManagerMaterialModule {} 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/manager/manager.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerModule } from './manager.module' 2 | 3 | describe('ManagerModule', () => { 4 | let managerModule: ManagerModule 5 | 6 | beforeEach(() => { 7 | managerModule = new ManagerModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(managerModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.html: -------------------------------------------------------------------------------- 1 |

2 | receipt-lookup works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-receipt-lookup', 5 | templateUrl: './receipt-lookup.component.html', 6 | styleUrls: ['./receipt-lookup.component.css'], 7 | }) 8 | export class ReceiptLookupComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/manager/user-management/user-management.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-user-management', 5 | template: ` 6 |
7 | 8 |
9 | 10 |
11 | `, 12 | }) 13 | export class UserManagementComponent implements OnInit { 14 | constructor() {} 15 | 16 | ngOnInit() {} 17 | } 18 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/manager/user-table/user-table.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/app/manager/user-table/user-table.component.css -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/page-not-found/page-not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-page-not-found', 5 | template: ` 6 |

7 | This page doesn't exist. Go back to home. 8 |

9 | `, 10 | }) 11 | export class PageNotFoundComponent implements OnInit { 12 | constructor() {} 13 | 14 | ngOnInit() {} 15 | } 16 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/pos/pos-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { Routes, RouterModule } from '@angular/router' 3 | import { PosComponent } from './pos/pos.component' 4 | 5 | const routes: Routes = [{ path: '', component: PosComponent }] 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forChild(routes)], 9 | exports: [RouterModule], 10 | }) 11 | export class PosRoutingModule {} 12 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/pos/pos.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { PosModule } from './pos.module' 2 | 3 | describe('PosModule', () => { 4 | let posModule: PosModule 5 | 6 | beforeEach(() => { 7 | posModule = new PosModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(posModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/pos/pos.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { CommonModule } from '@angular/common' 3 | 4 | import { PosRoutingModule } from './pos-routing.module' 5 | import { PosComponent } from './pos/pos.component' 6 | 7 | @NgModule({ 8 | imports: [CommonModule, PosRoutingModule], 9 | declarations: [PosComponent], 10 | }) 11 | export class PosModule {} 12 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/pos/pos/pos.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/app/pos/pos/pos.component.css -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/pos/pos/pos.component.html: -------------------------------------------------------------------------------- 1 |

2 | pos works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/pos/pos/pos.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-pos', 5 | templateUrl: './pos.component.html', 6 | styleUrls: ['./pos.component.css'], 7 | }) 8 | export class PosComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/shared-components.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { SharedComponentsModule } from './shared-components.module' 2 | 3 | describe('SharedComponentsModule', () => { 4 | let sharedComponentsModule: SharedComponentsModule 5 | 6 | beforeEach(() => { 7 | sharedComponentsModule = new SharedComponentsModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(sharedComponentsModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/user/logout/logout.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | import { Router } from '@angular/router' 3 | import { AuthService } from '../../auth/auth.service' 4 | 5 | @Component({ 6 | selector: 'app-logout', 7 | template: ` 8 |

9 | Logging out... 10 |

11 | `, 12 | styles: [], 13 | }) 14 | export class LogoutComponent implements OnInit { 15 | constructor(private router: Router, private authService: AuthService) {} 16 | 17 | ngOnInit() { 18 | this.authService.logout() 19 | this.router.navigate(['/']) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/user/profile/profile.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/app/user/profile/profile.component.css -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/user/user-material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserMaterialModule } from './user-material.module' 2 | 3 | describe('UserMaterialModule', () => { 4 | let userMaterialModule: UserMaterialModule 5 | 6 | beforeEach(() => { 7 | userMaterialModule = new UserMaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(userMaterialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/user/user.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserModule } from './user.module' 2 | 3 | describe('UserModule', () => { 4 | let userModule: UserModule 5 | 6 | beforeEach(() => { 7 | userModule = new UserModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(userModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/app/user/user/user.resolve.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core' 2 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' 3 | 4 | import { IUser } from './user' 5 | import { UserService } from './user.service' 6 | 7 | @Injectable() 8 | export class UserResolve implements Resolve { 9 | constructor(private userService: UserService) {} 10 | 11 | resolve(route: ActivatedRouteSnapshot) { 12 | return this.userService.getUser(route.paramMap.get('userId')) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/apple-touch-icon.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffc40d 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { production: true, baseUrl: 'http://localhost:3000' } 2 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/favicon-16x16.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/favicon-32x32.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/favicon.ico -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/lemonmart-theme.scss: -------------------------------------------------------------------------------- 1 | @import '~@angular/material/theming'; 2 | 3 | @include mat-core(); 4 | 5 | $localcast-primary: mat-palette($mat-green, 800); 6 | $localcast-accent: mat-palette($mat-lime, A400); 7 | 8 | $localcast-app-theme: mat-light-theme($localcast-primary, $localcast-accent); 9 | 10 | @include angular-material-theme($localcast-app-theme); 11 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "icons": [ 4 | { 5 | "src": "/android-chrome-192x192.png?v=rMlKOnvxlK", 6 | "sizes": "192x192", 7 | "type": "image/png" 8 | }, 9 | { 10 | "src": "/android-chrome-512x512.png?v=rMlKOnvxlK", 11 | "sizes": "512x512", 12 | "type": "image/png" 13 | } 14 | ], 15 | "theme_color": "#ffffff", 16 | "background_color": "#ffffff", 17 | "display": "standalone" 18 | } -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/mstile-144x144.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/mstile-150x150.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/mstile-310x150.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/mstile-310x310.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter11/lemon-mart/src/mstile-70x70.png -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .margin-top { 6 | margin-top: 16px; 7 | } 8 | 9 | .horizontal-padding { 10 | margin-left: 16px; 11 | margin-right: 16px; 12 | } 13 | 14 | .flex-spacer { 15 | flex: 1 1 auto; 16 | } 17 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/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 | -------------------------------------------------------------------------------- /Chapter11/lemon-mart/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: docker:17.12.0-ce-git 6 | working_directory: /usr/src 7 | steps: 8 | - checkout 9 | - setup_remote_docker: 10 | docker_layer_caching: false 11 | - run: 12 | name: Build Docker Image 13 | command: | 14 | docker build -f Dockerfile.integration . 15 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-nginx-web-server:1.13.8-alpine 2 | COPY dist /var/www 3 | CMD 'nginx' 4 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/Dockerfile.node: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-node-web-server:8.11.1 2 | WORKDIR /usr/src/app 3 | COPY dist public 4 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('LemonMart') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root mat-toolbar .mat-h2')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/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 | } -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/android-chrome-192x192.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/android-chrome-512x512.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/app-material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { AppMaterialModule } from './app-material.module' 2 | 3 | describe('MaterialModule', () => { 4 | let materialModule: AppMaterialModule 5 | 6 | beforeEach(() => { 7 | materialModule = new AppMaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(materialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/auth/role.enum.ts: -------------------------------------------------------------------------------- 1 | export enum Role { 2 | None = 'none', 3 | Clerk = 'clerk', 4 | Cashier = 'cashier', 5 | Manager = 'manager', 6 | } 7 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/common/ui.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { inject, TestBed } from '@angular/core/testing' 2 | 3 | import { commonTestingModules } from './common.testing' 4 | import { UiService } from './ui.service' 5 | 6 | describe('UiService', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | providers: [UiService], 10 | imports: commonTestingModules, 11 | }) 12 | }) 13 | 14 | it( 15 | 'should be created', 16 | inject([UiService], (service: UiService) => { 17 | expect(service).toBeTruthy() 18 | }) 19 | ) 20 | }) 21 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/categories/categories.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/app/inventory/categories/categories.component.css -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/categories/categories.component.html: -------------------------------------------------------------------------------- 1 |

2 | categories works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/categories/categories.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-categories', 5 | templateUrl: './categories.component.html', 6 | styleUrls: ['./categories.component.css'], 7 | }) 8 | export class CategoriesComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/inventory-home/inventory-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-inventory-home', 5 | template: ` 6 |

7 | inventory-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class InventoryHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/inventory.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { InventoryModule } from './inventory.module' 2 | 3 | describe('InventoryModule', () => { 4 | let inventoryModule: InventoryModule 5 | 6 | beforeEach(() => { 7 | inventoryModule = new InventoryModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(inventoryModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/products/products.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/app/inventory/products/products.component.css -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/products/products.component.html: -------------------------------------------------------------------------------- 1 |

2 | products works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/products/products.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-products', 5 | templateUrl: './products.component.html', 6 | styleUrls: ['./products.component.css'], 7 | }) 8 | export class ProductsComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.html: -------------------------------------------------------------------------------- 1 |

2 | stock-entry works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-stock-entry', 5 | templateUrl: './stock-entry.component.html', 6 | styleUrls: ['./stock-entry.component.css'], 7 | }) 8 | export class StockEntryComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/manager/manager-home/manager-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-manager-home', 5 | template: ` 6 |

7 | manager-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class ManagerHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/manager/manager-material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerMaterialModule } from './manager-material.module' 2 | 3 | describe('ManagerMaterialModule', () => { 4 | let managerMaterialModule: ManagerMaterialModule 5 | 6 | beforeEach(() => { 7 | managerMaterialModule = new ManagerMaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(managerMaterialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/manager/manager-material.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { 3 | MatPaginatorModule, 4 | MatProgressSpinnerModule, 5 | MatSortModule, 6 | MatTableModule, 7 | } from '@angular/material' 8 | 9 | @NgModule({ 10 | imports: [MatTableModule, MatSortModule, MatPaginatorModule, MatProgressSpinnerModule], 11 | exports: [MatTableModule, MatSortModule, MatPaginatorModule, MatProgressSpinnerModule], 12 | }) 13 | export class ManagerMaterialModule {} 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/manager/manager.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerModule } from './manager.module' 2 | 3 | describe('ManagerModule', () => { 4 | let managerModule: ManagerModule 5 | 6 | beforeEach(() => { 7 | managerModule = new ManagerModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(managerModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.html: -------------------------------------------------------------------------------- 1 |

2 | receipt-lookup works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-receipt-lookup', 5 | templateUrl: './receipt-lookup.component.html', 6 | styleUrls: ['./receipt-lookup.component.css'], 7 | }) 8 | export class ReceiptLookupComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/manager/user-management/user-management.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-user-management', 5 | template: ` 6 |
7 | 8 |
9 | 10 |
11 | `, 12 | }) 13 | export class UserManagementComponent implements OnInit { 14 | constructor() {} 15 | 16 | ngOnInit() {} 17 | } 18 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/manager/user-table/user-table.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/app/manager/user-table/user-table.component.css -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/page-not-found/page-not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-page-not-found', 5 | template: ` 6 |

7 | This page doesn't exist. Go back to home. 8 |

9 | `, 10 | }) 11 | export class PageNotFoundComponent implements OnInit { 12 | constructor() {} 13 | 14 | ngOnInit() {} 15 | } 16 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/pos/pos-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { Routes, RouterModule } from '@angular/router' 3 | import { PosComponent } from './pos/pos.component' 4 | 5 | const routes: Routes = [{ path: '', component: PosComponent }] 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forChild(routes)], 9 | exports: [RouterModule], 10 | }) 11 | export class PosRoutingModule {} 12 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/pos/pos.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { PosModule } from './pos.module' 2 | 3 | describe('PosModule', () => { 4 | let posModule: PosModule 5 | 6 | beforeEach(() => { 7 | posModule = new PosModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(posModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/pos/pos.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { CommonModule } from '@angular/common' 3 | 4 | import { PosRoutingModule } from './pos-routing.module' 5 | import { PosComponent } from './pos/pos.component' 6 | import { AppMaterialModule } from '../app-material.module' 7 | 8 | @NgModule({ 9 | imports: [CommonModule, PosRoutingModule, AppMaterialModule], 10 | declarations: [PosComponent], 11 | }) 12 | export class PosModule {} 13 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/pos/pos/pos.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/app/pos/pos/pos.component.css -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/pos/pos/pos.component.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/shared-components.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { SharedComponentsModule } from './shared-components.module' 2 | 3 | describe('SharedComponentsModule', () => { 4 | let sharedComponentsModule: SharedComponentsModule 5 | 6 | beforeEach(() => { 7 | sharedComponentsModule = new SharedComponentsModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(sharedComponentsModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/user/logout/logout.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | import { Router } from '@angular/router' 3 | import { AuthService } from '../../auth/auth.service' 4 | 5 | @Component({ 6 | selector: 'app-logout', 7 | template: ` 8 |

9 | Logging out... 10 |

11 | `, 12 | styles: [], 13 | }) 14 | export class LogoutComponent implements OnInit { 15 | constructor(private router: Router, private authService: AuthService) {} 16 | 17 | ngOnInit() { 18 | this.authService.logout() 19 | this.router.navigate(['/']) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/user/profile/profile.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/app/user/profile/profile.component.css -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/user/user-material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserMaterialModule } from './user-material.module' 2 | 3 | describe('UserMaterialModule', () => { 4 | let userMaterialModule: UserMaterialModule 5 | 6 | beforeEach(() => { 7 | userMaterialModule = new UserMaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(userMaterialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/user/user.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserModule } from './user.module' 2 | 3 | describe('UserModule', () => { 4 | let userModule: UserModule 5 | 6 | beforeEach(() => { 7 | userModule = new UserModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(userModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/app/user/user/user.resolve.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core' 2 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' 3 | 4 | import { IUser } from './user' 5 | import { UserService } from './user.service' 6 | 7 | @Injectable() 8 | export class UserResolve implements Resolve { 9 | constructor(private userService: UserService) {} 10 | 11 | resolve(route: ActivatedRouteSnapshot) { 12 | return this.userService.getUser(route.paramMap.get('userId')) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/apple-touch-icon.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffc40d 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { production: true, baseUrl: 'http://localhost:3000' } 2 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/favicon-16x16.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/favicon-32x32.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/favicon.ico -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/lemonmart-theme.scss: -------------------------------------------------------------------------------- 1 | @import '~@angular/material/theming'; 2 | 3 | @include mat-core(); 4 | 5 | $localcast-primary: mat-palette($mat-green, 800); 6 | $localcast-accent: mat-palette($mat-lime, A400); 7 | 8 | $localcast-app-theme: mat-light-theme($localcast-primary, $localcast-accent); 9 | 10 | @include angular-material-theme($localcast-app-theme); 11 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "icons": [ 4 | { 5 | "src": "/android-chrome-192x192.png?v=rMlKOnvxlK", 6 | "sizes": "192x192", 7 | "type": "image/png" 8 | }, 9 | { 10 | "src": "/android-chrome-512x512.png?v=rMlKOnvxlK", 11 | "sizes": "512x512", 12 | "type": "image/png" 13 | } 14 | ], 15 | "theme_color": "#ffffff", 16 | "background_color": "#ffffff", 17 | "display": "standalone" 18 | } -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/mstile-144x144.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/mstile-150x150.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/mstile-310x150.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/mstile-310x310.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter12/lemon-mart/src/mstile-70x70.png -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .margin-top { 6 | margin-top: 16px; 7 | } 8 | 9 | .horizontal-padding { 10 | margin-left: 16px; 11 | margin-right: 16px; 12 | } 13 | 14 | .flex-spacer { 15 | flex: 1 1 auto; 16 | } 17 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/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 | -------------------------------------------------------------------------------- /Chapter12/lemon-mart/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('Welcome to app!') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/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 | } -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter2/local-weather-app/src/app/app.component.css -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | LocalCast Weather 4 |

5 |
Your city, your forecast, right now!
6 |

Current Weather

7 | 8 |
9 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/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 = 'app' 10 | } 11 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/app/current-weather/current-weather.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter2/local-weather-app/src/app/current-weather/current-weather.component.css -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/app/current-weather/current-weather.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{current.city}}, {{current.country}} 4 | {{current.date | date:'fullDate'}} 5 |
6 |
7 | 8 | {{current.temperature | number:'1.0-0'}}℉ 9 |
10 |
11 | {{current.description}} 12 |
13 |
14 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/app/interfaces.ts: -------------------------------------------------------------------------------- 1 | export interface ICurrentWeather { 2 | city: string 3 | country: string 4 | date: number 5 | image: string 6 | temperature: number 7 | description: string 8 | } 9 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/app/weather/weather.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing' 2 | 3 | import { WeatherService } from './weather.service' 4 | 5 | describe('WeatherService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [WeatherService], 9 | }) 10 | }) 11 | 12 | it( 13 | 'should be created', 14 | inject([WeatherService], (service: WeatherService) => { 15 | expect(service).toBeTruthy() 16 | }) 17 | ) 18 | }) 19 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter2/local-weather-app/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter2/local-weather-app/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | } 4 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter2/local-weather-app/src/favicon.ico -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LocalWeatherApp 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/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 | -------------------------------------------------------------------------------- /Chapter2/local-weather-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-node-web-server:8.11.1 2 | WORKDIR /usr/src/app 3 | COPY dist public 4 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('LocalCast Weather') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/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 | } -------------------------------------------------------------------------------- /Chapter3/local-weather-app/now/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/localcast-weather:6.0.1 2 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter3/local-weather-app/src/app/app.component.css -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | LocalCast Weather 4 |

5 |
Your city, your forecast, right now!
6 |

Current Weather

7 | 8 |
9 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/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 = 'app' 10 | } 11 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/app/current-weather/current-weather.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter3/local-weather-app/src/app/current-weather/current-weather.component.css -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/app/current-weather/current-weather.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{current.city}}, {{current.country}} 4 | {{current.date | date:'fullDate'}} 5 |
6 |
7 | 8 | {{current.temperature | number:'1.0-0'}}℉ 9 |
10 |
11 | {{current.description}} 12 |
13 |
14 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/app/interfaces.ts: -------------------------------------------------------------------------------- 1 | export interface ICurrentWeather { 2 | city: string 3 | country: string 4 | date: number 5 | image: string 6 | temperature: number 7 | description: string 8 | } 9 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter3/local-weather-app/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter3/local-weather-app/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | appId: '01ff1417eeb4a81b09ac68b15958d453', 4 | baseUrl: 'https://', 5 | } 6 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter3/local-weather-app/src/favicon.ico -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LocalWeatherApp 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/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 | -------------------------------------------------------------------------------- /Chapter3/local-weather-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter4/readme.txt: -------------------------------------------------------------------------------- 1 | No code sample for this chapter. -------------------------------------------------------------------------------- /Chapter5/local-weather-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-node-web-server:8.11.1 2 | WORKDIR /usr/src/app 3 | COPY dist public 4 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('LocalCast Weather') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root mat-toolbar span')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/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 | } -------------------------------------------------------------------------------- /Chapter5/local-weather-app/now/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/localcast-weather:6.0.1 2 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/app/current-weather/current-weather.component.css: -------------------------------------------------------------------------------- 1 | .right { 2 | text-align: right 3 | } 4 | .no-margin { 5 | margin-bottom: 0 6 | } 7 | .unit { 8 | vertical-align: super; 9 | } 10 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/app/interfaces.ts: -------------------------------------------------------------------------------- 1 | export interface ICurrentWeather { 2 | city: string 3 | country: string 4 | date: number 5 | image: string 6 | temperature: number 7 | description: string 8 | } 9 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/app/material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { MaterialModule } from './material.module' 2 | 3 | describe('MaterialModule', () => { 4 | let materialModule: MaterialModule 5 | 6 | beforeEach(() => { 7 | materialModule = new MaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(materialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/app/material.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { 3 | MatButtonModule, 4 | MatCardModule, 5 | MatIconModule, 6 | MatToolbarModule, 7 | } from '@angular/material' 8 | 9 | @NgModule({ 10 | imports: [MatButtonModule, MatToolbarModule, MatIconModule, MatCardModule], 11 | exports: [MatButtonModule, MatToolbarModule, MatIconModule, MatCardModule], 12 | }) 13 | export class MaterialModule {} 14 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter5/local-weather-app/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter5/local-weather-app/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | appId: '01ff1417eeb4a81b09ac68b15958d453', 4 | baseUrl: 'https://', 5 | } 6 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter5/local-weather-app/src/favicon.ico -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | LocalWeatherApp 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/localcast-theme.scss: -------------------------------------------------------------------------------- 1 | @import '~@angular/material/theming'; 2 | 3 | @include mat-core(); 4 | 5 | $localcast-primary: mat-palette($mat-red, 500); 6 | $localcast-accent: mat-palette($mat-indigo, A400); 7 | 8 | $localcast-app-theme: mat-light-theme($localcast-primary, $localcast-accent); 9 | 10 | @include angular-material-theme($localcast-app-theme); 11 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .content-margin { 6 | margin-left: 8px; 7 | margin-right: 8px; 8 | } 9 | 10 | .vertical-margin { 11 | margin-top: 16px; 12 | margin-bottom: 16px; 13 | } 14 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/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 | -------------------------------------------------------------------------------- /Chapter5/local-weather-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-node-web-server:8.11.1 2 | WORKDIR /usr/src/app 3 | COPY dist public 4 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('LocalCast Weather') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root mat-toolbar span')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/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 | } -------------------------------------------------------------------------------- /Chapter6/local-weather-app/now/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/localcast-weather:6.0.1 2 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/app/city-search-tpldriven/city-search-tpldriven.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter6/local-weather-app/src/app/city-search-tpldriven/city-search-tpldriven.component.css -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/app/city-search-tpldriven/city-search-tpldriven.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | search 4 | 6 | Specify country code like 'Paris, US' 7 | 8 | Type more than one character to search 9 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/app/city-search/city-search.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter6/local-weather-app/src/app/city-search/city-search.component.css -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/app/city-search/city-search.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | search 4 | 5 | Specify country code like 'Paris, US' 6 | 7 | Type more than one character to search 8 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/app/current-weather/current-weather.component.css: -------------------------------------------------------------------------------- 1 | .right { 2 | text-align: right 3 | } 4 | .no-margin { 5 | margin-bottom: 0 6 | } 7 | .unit { 8 | vertical-align: super; 9 | } 10 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/app/interfaces.ts: -------------------------------------------------------------------------------- 1 | export interface ICurrentWeather { 2 | city: string 3 | country: string 4 | date: number 5 | image: string 6 | temperature: number 7 | description: string 8 | } 9 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/app/material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { MaterialModule } from './material.module' 2 | 3 | describe('MaterialModule', () => { 4 | let materialModule: MaterialModule 5 | 6 | beforeEach(() => { 7 | materialModule = new MaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(materialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter6/local-weather-app/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter6/local-weather-app/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | appId: '01ff1417eeb4a81b09ac68b15958d453', 4 | baseUrl: 'https://', 5 | } 6 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter6/local-weather-app/src/favicon.ico -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | LocalWeatherApp 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/localcast-theme.scss: -------------------------------------------------------------------------------- 1 | @import '~@angular/material/theming'; 2 | 3 | @include mat-core(); 4 | 5 | $localcast-primary: mat-palette($mat-red, 500); 6 | $localcast-accent: mat-palette($mat-indigo, A400); 7 | 8 | $localcast-app-theme: mat-light-theme($localcast-primary, $localcast-accent); 9 | 10 | @include angular-material-theme($localcast-app-theme); 11 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .content-margin { 6 | margin-left: 8px; 7 | margin-right: 8px; 8 | } 9 | 10 | .vertical-margin { 11 | margin-top: 16px; 12 | margin-bottom: 16px; 13 | } 14 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/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 | -------------------------------------------------------------------------------- /Chapter6/local-weather-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('LemonMart') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root mat-toolbar .mat-h2')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/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 | } -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/android-chrome-192x192.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/android-chrome-512x512.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/categories/categories.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/app/inventory/categories/categories.component.css -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/categories/categories.component.html: -------------------------------------------------------------------------------- 1 |

2 | categories works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/categories/categories.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-categories', 5 | templateUrl: './categories.component.html', 6 | styleUrls: ['./categories.component.css'], 7 | }) 8 | export class CategoriesComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/inventory-home/inventory-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-inventory-home', 5 | template: ` 6 |

7 | inventory-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class InventoryHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/inventory.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { InventoryModule } from './inventory.module' 2 | 3 | describe('InventoryModule', () => { 4 | let inventoryModule: InventoryModule 5 | 6 | beforeEach(() => { 7 | inventoryModule = new InventoryModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(inventoryModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/products/products.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/app/inventory/products/products.component.css -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/products/products.component.html: -------------------------------------------------------------------------------- 1 |

2 | products works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/products/products.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-products', 5 | templateUrl: './products.component.html', 6 | styleUrls: ['./products.component.css'], 7 | }) 8 | export class ProductsComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.html: -------------------------------------------------------------------------------- 1 |

2 | stock-entry works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-stock-entry', 5 | templateUrl: './stock-entry.component.html', 6 | styleUrls: ['./stock-entry.component.css'], 7 | }) 8 | export class StockEntryComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/manager/manager-home/manager-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-manager-home', 5 | template: ` 6 |

7 | manager-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class ManagerHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/manager/manager.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerModule } from './manager.module' 2 | 3 | describe('ManagerModule', () => { 4 | let managerModule: ManagerModule 5 | 6 | beforeEach(() => { 7 | managerModule = new ManagerModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(managerModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.html: -------------------------------------------------------------------------------- 1 |

2 | receipt-lookup works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-receipt-lookup', 5 | templateUrl: './receipt-lookup.component.html', 6 | styleUrls: ['./receipt-lookup.component.css'], 7 | }) 8 | export class ReceiptLookupComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/manager/user-management/user-management.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/app/manager/user-management/user-management.component.css -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/manager/user-management/user-management.component.html: -------------------------------------------------------------------------------- 1 |

2 | user-management works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/manager/user-management/user-management.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-user-management', 5 | templateUrl: './user-management.component.html', 6 | styleUrls: ['./user-management.component.css'], 7 | }) 8 | export class UserManagementComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { MaterialModule } from './material.module' 2 | 3 | describe('MaterialModule', () => { 4 | let materialModule: MaterialModule 5 | 6 | beforeEach(() => { 7 | materialModule = new MaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(materialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/material.module.ts: -------------------------------------------------------------------------------- 1 | import { MatButtonModule, MatToolbarModule, MatIconModule } from '@angular/material' 2 | import { NgModule } from '@angular/core' 3 | 4 | @NgModule({ 5 | imports: [MatButtonModule, MatToolbarModule, MatIconModule], 6 | exports: [MatButtonModule, MatToolbarModule, MatIconModule], 7 | }) 8 | export class MaterialModule {} 9 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/page-not-found/page-not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-page-not-found', 5 | template: ` 6 |

7 | This page doesn't exist. Go back to home. 8 |

9 | `, 10 | }) 11 | export class PageNotFoundComponent implements OnInit { 12 | constructor() {} 13 | 14 | ngOnInit() {} 15 | } 16 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/pos/pos-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { Routes, RouterModule } from '@angular/router' 3 | import { PosComponent } from './pos/pos.component' 4 | 5 | const routes: Routes = [{ path: '', component: PosComponent }] 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forChild(routes)], 9 | exports: [RouterModule], 10 | }) 11 | export class PosRoutingModule {} 12 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/pos/pos.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { PosModule } from './pos.module' 2 | 3 | describe('PosModule', () => { 4 | let posModule: PosModule 5 | 6 | beforeEach(() => { 7 | posModule = new PosModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(posModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/pos/pos.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { CommonModule } from '@angular/common' 3 | 4 | import { PosRoutingModule } from './pos-routing.module' 5 | import { PosComponent } from './pos/pos.component' 6 | 7 | @NgModule({ 8 | imports: [CommonModule, PosRoutingModule], 9 | declarations: [PosComponent], 10 | }) 11 | export class PosModule {} 12 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/pos/pos/pos.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/app/pos/pos/pos.component.css -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/pos/pos/pos.component.html: -------------------------------------------------------------------------------- 1 |

2 | pos works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/pos/pos/pos.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-pos', 5 | templateUrl: './pos.component.html', 6 | styleUrls: ['./pos.component.css'], 7 | }) 8 | export class PosComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/user/logout/logout.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-logout', 5 | template: ` 6 |

7 | logout works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class LogoutComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/user/navigation-menu/navigation-menu.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-navigation-menu', 5 | template: ` 6 |

7 | navigation-menu works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class NavigationMenuComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/user/profile/profile.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/app/user/profile/profile.component.css -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/user/profile/profile.component.html: -------------------------------------------------------------------------------- 1 |

2 | profile works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/user/profile/profile.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-profile', 5 | templateUrl: './profile.component.html', 6 | styleUrls: ['./profile.component.css'], 7 | }) 8 | export class ProfileComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/user/user-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { Routes, RouterModule } from '@angular/router' 3 | import { ProfileComponent } from './profile/profile.component' 4 | import { LogoutComponent } from './logout/logout.component' 5 | 6 | const routes: Routes = [ 7 | { path: 'profile', component: ProfileComponent }, 8 | { path: 'logout', component: LogoutComponent }, 9 | ] 10 | 11 | @NgModule({ 12 | imports: [RouterModule.forChild(routes)], 13 | exports: [RouterModule], 14 | }) 15 | export class UserRoutingModule {} 16 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/user/user.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserModule } from './user.module' 2 | 3 | describe('UserModule', () => { 4 | let userModule: UserModule 5 | 6 | beforeEach(() => { 7 | userModule = new UserModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(userModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/app/user/user.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { CommonModule } from '@angular/common' 3 | 4 | import { UserRoutingModule } from './user-routing.module' 5 | import { ProfileComponent } from './profile/profile.component' 6 | import { LogoutComponent } from './logout/logout.component' 7 | 8 | @NgModule({ 9 | imports: [CommonModule, UserRoutingModule], 10 | declarations: [ProfileComponent, LogoutComponent], 11 | }) 12 | export class UserModule {} 13 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/apple-touch-icon.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffc40d 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | } 4 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/favicon-16x16.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/favicon-32x32.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/favicon.ico -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/lemonmart-theme.scss: -------------------------------------------------------------------------------- 1 | @import '~@angular/material/theming'; 2 | 3 | @include mat-core(); 4 | 5 | $localcast-primary: mat-palette($mat-green, 800); 6 | $localcast-accent: mat-palette($mat-lime, A400); 7 | 8 | $localcast-app-theme: mat-light-theme($localcast-primary, $localcast-accent); 9 | 10 | @include angular-material-theme($localcast-app-theme); 11 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "icons": [ 4 | { 5 | "src": "/android-chrome-192x192.png?v=rMlKOnvxlK", 6 | "sizes": "192x192", 7 | "type": "image/png" 8 | }, 9 | { 10 | "src": "/android-chrome-512x512.png?v=rMlKOnvxlK", 11 | "sizes": "512x512", 12 | "type": "image/png" 13 | } 14 | ], 15 | "theme_color": "#ffffff", 16 | "background_color": "#ffffff", 17 | "display": "standalone" 18 | } -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/mstile-144x144.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/mstile-150x150.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/mstile-310x150.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/mstile-310x310.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter7/lemon-mart/src/mstile-70x70.png -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .margin-top { 6 | margin-top: 16px; 7 | } 8 | 9 | .horizontal-padding { 10 | margin-left: 16px; 11 | margin-right: 16px; 12 | } 13 | 14 | .flex-spacer { 15 | flex: 1 1 auto; 16 | } 17 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/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 | -------------------------------------------------------------------------------- /Chapter7/lemon-mart/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart-swagger-server/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /Chapter8/lemon-mart-swagger-server/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart-swagger-server/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Arjun.swagger-viewer"] 3 | } 4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart-swagger-server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-node-build-env:8.11.1 2 | 3 | RUN mkdir -p /usr/src 4 | WORKDIR /usr/src 5 | 6 | COPY server . 7 | 8 | RUN npm ci 9 | 10 | CMD ["node", "index"] -------------------------------------------------------------------------------- /Chapter8/lemon-mart-swagger-server/server/.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 2.4.0-SNAPSHOT -------------------------------------------------------------------------------- /Chapter8/lemon-mart-swagger-server/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lemonmart", 3 | "version": "1.0.0", 4 | "description": "LemonMart API", 5 | "main": "index.js", 6 | "scripts": { 7 | "prestart": "npm install", 8 | "start": "node index.js" 9 | }, 10 | "keywords": [ 11 | "swagger" 12 | ], 13 | "license": "Unlicense", 14 | "private": true, 15 | "dependencies": { 16 | "connect": "^3.2.0", 17 | "cors": "^2.8.4", 18 | "js-yaml": "^3.3.0", 19 | "swagger-tools": "0.10.1" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: docker:17.12.0-ce-git 6 | working_directory: /usr/src 7 | steps: 8 | - checkout 9 | - setup_remote_docker: 10 | docker_layer_caching: false 11 | - run: 12 | name: Build Docker Image 13 | command: | 14 | docker build -f Dockerfile.integration . 15 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-node-web-server:8.11.1 2 | WORKDIR /usr/src/app 3 | COPY dist public 4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('LemonMart') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root mat-toolbar .mat-h2')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/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 | } -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/android-chrome-192x192.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/android-chrome-512x512.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/categories/categories.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/app/inventory/categories/categories.component.css -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/categories/categories.component.html: -------------------------------------------------------------------------------- 1 |

2 | categories works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/categories/categories.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-categories', 5 | templateUrl: './categories.component.html', 6 | styleUrls: ['./categories.component.css'], 7 | }) 8 | export class CategoriesComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/inventory-home/inventory-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-inventory-home', 5 | template: ` 6 |

7 | inventory-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class InventoryHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/inventory.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { InventoryModule } from './inventory.module' 2 | 3 | describe('InventoryModule', () => { 4 | let inventoryModule: InventoryModule 5 | 6 | beforeEach(() => { 7 | inventoryModule = new InventoryModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(inventoryModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/products/products.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/app/inventory/products/products.component.css -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/products/products.component.html: -------------------------------------------------------------------------------- 1 |

2 | products works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/products/products.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-products', 5 | templateUrl: './products.component.html', 6 | styleUrls: ['./products.component.css'], 7 | }) 8 | export class ProductsComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.html: -------------------------------------------------------------------------------- 1 |

2 | stock-entry works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-stock-entry', 5 | templateUrl: './stock-entry.component.html', 6 | styleUrls: ['./stock-entry.component.css'], 7 | }) 8 | export class StockEntryComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/manager/manager-home/manager-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-manager-home', 5 | template: ` 6 |

7 | manager-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class ManagerHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/manager/manager.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerModule } from './manager.module' 2 | 3 | describe('ManagerModule', () => { 4 | let managerModule: ManagerModule 5 | 6 | beforeEach(() => { 7 | managerModule = new ManagerModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(managerModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.html: -------------------------------------------------------------------------------- 1 |

2 | receipt-lookup works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-receipt-lookup', 5 | templateUrl: './receipt-lookup.component.html', 6 | styleUrls: ['./receipt-lookup.component.css'], 7 | }) 8 | export class ReceiptLookupComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/manager/user-management/user-management.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/app/manager/user-management/user-management.component.css -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/manager/user-management/user-management.component.html: -------------------------------------------------------------------------------- 1 |

2 | user-management works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/manager/user-management/user-management.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-user-management', 5 | templateUrl: './user-management.component.html', 6 | styleUrls: ['./user-management.component.css'], 7 | }) 8 | export class UserManagementComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { MaterialModule } from './material.module' 2 | 3 | describe('MaterialModule', () => { 4 | let materialModule: MaterialModule 5 | 6 | beforeEach(() => { 7 | materialModule = new MaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(materialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/material.module.ts: -------------------------------------------------------------------------------- 1 | import { MatButtonModule, MatToolbarModule, MatIconModule } from '@angular/material' 2 | import { NgModule } from '@angular/core' 3 | 4 | @NgModule({ 5 | imports: [MatButtonModule, MatToolbarModule, MatIconModule], 6 | exports: [MatButtonModule, MatToolbarModule, MatIconModule], 7 | }) 8 | export class MaterialModule {} 9 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/page-not-found/page-not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-page-not-found', 5 | template: ` 6 |

7 | This page doesn't exist. Go back to home. 8 |

9 | `, 10 | }) 11 | export class PageNotFoundComponent implements OnInit { 12 | constructor() {} 13 | 14 | ngOnInit() {} 15 | } 16 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/pos/pos-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { Routes, RouterModule } from '@angular/router' 3 | import { PosComponent } from './pos/pos.component' 4 | 5 | const routes: Routes = [{ path: '', component: PosComponent }] 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forChild(routes)], 9 | exports: [RouterModule], 10 | }) 11 | export class PosRoutingModule {} 12 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/pos/pos.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { PosModule } from './pos.module' 2 | 3 | describe('PosModule', () => { 4 | let posModule: PosModule 5 | 6 | beforeEach(() => { 7 | posModule = new PosModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(posModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/pos/pos.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { CommonModule } from '@angular/common' 3 | 4 | import { PosRoutingModule } from './pos-routing.module' 5 | import { PosComponent } from './pos/pos.component' 6 | 7 | @NgModule({ 8 | imports: [CommonModule, PosRoutingModule], 9 | declarations: [PosComponent], 10 | }) 11 | export class PosModule {} 12 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/pos/pos/pos.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/app/pos/pos/pos.component.css -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/pos/pos/pos.component.html: -------------------------------------------------------------------------------- 1 |

2 | pos works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/pos/pos/pos.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-pos', 5 | templateUrl: './pos.component.html', 6 | styleUrls: ['./pos.component.css'], 7 | }) 8 | export class PosComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/user/logout/logout.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-logout', 5 | template: ` 6 |

7 | logout works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class LogoutComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/user/navigation-menu/navigation-menu.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-navigation-menu', 5 | template: ` 6 |

7 | navigation-menu works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class NavigationMenuComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/user/profile/profile.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/app/user/profile/profile.component.css -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/user/profile/profile.component.html: -------------------------------------------------------------------------------- 1 |

2 | profile works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/user/profile/profile.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-profile', 5 | templateUrl: './profile.component.html', 6 | styleUrls: ['./profile.component.css'], 7 | }) 8 | export class ProfileComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/user/user-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { Routes, RouterModule } from '@angular/router' 3 | import { ProfileComponent } from './profile/profile.component' 4 | import { LogoutComponent } from './logout/logout.component' 5 | 6 | const routes: Routes = [ 7 | { path: 'profile', component: ProfileComponent }, 8 | { path: 'logout', component: LogoutComponent }, 9 | ] 10 | 11 | @NgModule({ 12 | imports: [RouterModule.forChild(routes)], 13 | exports: [RouterModule], 14 | }) 15 | export class UserRoutingModule {} 16 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/user/user.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserModule } from './user.module' 2 | 3 | describe('UserModule', () => { 4 | let userModule: UserModule 5 | 6 | beforeEach(() => { 7 | userModule = new UserModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(userModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/app/user/user.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { CommonModule } from '@angular/common' 3 | 4 | import { UserRoutingModule } from './user-routing.module' 5 | import { ProfileComponent } from './profile/profile.component' 6 | import { LogoutComponent } from './logout/logout.component' 7 | 8 | @NgModule({ 9 | imports: [CommonModule, UserRoutingModule], 10 | declarations: [ProfileComponent, LogoutComponent], 11 | }) 12 | export class UserModule {} 13 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/apple-touch-icon.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffc40d 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | } 4 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/favicon-16x16.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/favicon-32x32.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/favicon.ico -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/lemonmart-theme.scss: -------------------------------------------------------------------------------- 1 | @import '~@angular/material/theming'; 2 | 3 | @include mat-core(); 4 | 5 | $localcast-primary: mat-palette($mat-green, 800); 6 | $localcast-accent: mat-palette($mat-lime, A400); 7 | 8 | $localcast-app-theme: mat-light-theme($localcast-primary, $localcast-accent); 9 | 10 | @include angular-material-theme($localcast-app-theme); 11 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "icons": [ 4 | { 5 | "src": "/android-chrome-192x192.png?v=rMlKOnvxlK", 6 | "sizes": "192x192", 7 | "type": "image/png" 8 | }, 9 | { 10 | "src": "/android-chrome-512x512.png?v=rMlKOnvxlK", 11 | "sizes": "512x512", 12 | "type": "image/png" 13 | } 14 | ], 15 | "theme_color": "#ffffff", 16 | "background_color": "#ffffff", 17 | "display": "standalone" 18 | } -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/mstile-144x144.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/mstile-150x150.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/mstile-310x150.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/mstile-310x310.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter8/lemon-mart/src/mstile-70x70.png -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .margin-top { 6 | margin-top: 16px; 7 | } 8 | 9 | .horizontal-padding { 10 | margin-left: 16px; 11 | margin-right: 16px; 12 | } 13 | 14 | .flex-spacer { 15 | flex: 1 1 auto; 16 | } 17 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/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 | -------------------------------------------------------------------------------- /Chapter8/lemon-mart/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | docker: 5 | - image: docker:17.12.0-ce-git 6 | working_directory: /usr/src 7 | steps: 8 | - checkout 9 | - setup_remote_docker: 10 | docker_layer_caching: false 11 | - run: 12 | name: Build Docker Image 13 | command: | 14 | docker build -f Dockerfile.integration . 15 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://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 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "johnpapa.angular-essentials", 4 | "PKief.material-icon-theme", 5 | "formulahendry.auto-close-tag", 6 | "PeterJausovec.vscode-docker", 7 | "eamodio.gitlens", 8 | "WallabyJs.quokka-vscode", 9 | "rbbit.typescript-hero", 10 | "DSKWRK.vscode-generate-getter-setter", 11 | "esbenp.prettier-vscode" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM duluca/minimal-node-web-server:8.11.1 2 | WORKDIR /usr/src/app 3 | COPY dist public 4 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po' 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage 5 | 6 | beforeEach(() => { 7 | page = new AppPage() 8 | }) 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo() 12 | expect(page.getParagraphText()).toEqual('LemonMart') 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor' 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/') 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root mat-toolbar .mat-h2')).getText() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/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 | } -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/android-chrome-192x192.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/android-chrome-512x512.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/auth/role.enum.ts: -------------------------------------------------------------------------------- 1 | export enum Role { 2 | None = 'none', 3 | Clerk = 'clerk', 4 | Cashier = 'cashier', 5 | Manager = 'manager', 6 | } 7 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/common/validations.ts: -------------------------------------------------------------------------------- 1 | import { Validators } from '@angular/forms' 2 | 3 | export const EmailValidation = [Validators.required, Validators.email] 4 | export const PasswordValidation = [ 5 | Validators.required, 6 | Validators.minLength(8), 7 | Validators.maxLength(50), 8 | ] 9 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/categories/categories.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/app/inventory/categories/categories.component.css -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/categories/categories.component.html: -------------------------------------------------------------------------------- 1 |

2 | categories works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/categories/categories.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-categories', 5 | templateUrl: './categories.component.html', 6 | styleUrls: ['./categories.component.css'], 7 | }) 8 | export class CategoriesComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/inventory-home/inventory-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-inventory-home', 5 | template: ` 6 |

7 | inventory-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class InventoryHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/inventory.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { InventoryModule } from './inventory.module' 2 | 3 | describe('InventoryModule', () => { 4 | let inventoryModule: InventoryModule 5 | 6 | beforeEach(() => { 7 | inventoryModule = new InventoryModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(inventoryModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/products/products.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/app/inventory/products/products.component.css -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/products/products.component.html: -------------------------------------------------------------------------------- 1 |

2 | products works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/products/products.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-products', 5 | templateUrl: './products.component.html', 6 | styleUrls: ['./products.component.css'], 7 | }) 8 | export class ProductsComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.css -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.html: -------------------------------------------------------------------------------- 1 |

2 | stock-entry works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/inventory/stock-entry/stock-entry.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-stock-entry', 5 | templateUrl: './stock-entry.component.html', 6 | styleUrls: ['./stock-entry.component.css'], 7 | }) 8 | export class StockEntryComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/manager/manager-home/manager-home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-manager-home', 5 | template: ` 6 |

7 | manager-home works! 8 |

9 | `, 10 | styles: [], 11 | }) 12 | export class ManagerHomeComponent implements OnInit { 13 | constructor() {} 14 | 15 | ngOnInit() {} 16 | } 17 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/manager/manager.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerModule } from './manager.module' 2 | 3 | describe('ManagerModule', () => { 4 | let managerModule: ManagerModule 5 | 6 | beforeEach(() => { 7 | managerModule = new ManagerModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(managerModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.css -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.html: -------------------------------------------------------------------------------- 1 |

2 | receipt-lookup works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/manager/receipt-lookup/receipt-lookup.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-receipt-lookup', 5 | templateUrl: './receipt-lookup.component.html', 6 | styleUrls: ['./receipt-lookup.component.css'], 7 | }) 8 | export class ReceiptLookupComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/manager/user-management/user-management.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/app/manager/user-management/user-management.component.css -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/manager/user-management/user-management.component.html: -------------------------------------------------------------------------------- 1 |

2 | user-management works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/manager/user-management/user-management.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-user-management', 5 | templateUrl: './user-management.component.html', 6 | styleUrls: ['./user-management.component.css'], 7 | }) 8 | export class UserManagementComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/material.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { MaterialModule } from './material.module' 2 | 3 | describe('MaterialModule', () => { 4 | let materialModule: MaterialModule 5 | 6 | beforeEach(() => { 7 | materialModule = new MaterialModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(materialModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/page-not-found/page-not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-page-not-found', 5 | template: ` 6 |

7 | This page doesn't exist. Go back to home. 8 |

9 | `, 10 | }) 11 | export class PageNotFoundComponent implements OnInit { 12 | constructor() {} 13 | 14 | ngOnInit() {} 15 | } 16 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/pos/pos-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { Routes, RouterModule } from '@angular/router' 3 | import { PosComponent } from './pos/pos.component' 4 | 5 | const routes: Routes = [{ path: '', component: PosComponent }] 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forChild(routes)], 9 | exports: [RouterModule], 10 | }) 11 | export class PosRoutingModule {} 12 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/pos/pos.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { PosModule } from './pos.module' 2 | 3 | describe('PosModule', () => { 4 | let posModule: PosModule 5 | 6 | beforeEach(() => { 7 | posModule = new PosModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(posModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/pos/pos.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { CommonModule } from '@angular/common' 3 | 4 | import { PosRoutingModule } from './pos-routing.module' 5 | import { PosComponent } from './pos/pos.component' 6 | 7 | @NgModule({ 8 | imports: [CommonModule, PosRoutingModule], 9 | declarations: [PosComponent], 10 | }) 11 | export class PosModule {} 12 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/pos/pos/pos.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/app/pos/pos/pos.component.css -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/pos/pos/pos.component.html: -------------------------------------------------------------------------------- 1 |

2 | pos works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/pos/pos/pos.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-pos', 5 | templateUrl: './pos.component.html', 6 | styleUrls: ['./pos.component.css'], 7 | }) 8 | export class PosComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/user/logout/logout.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | import { Router } from '@angular/router' 3 | import { AuthService } from '../../auth/auth.service' 4 | 5 | @Component({ 6 | selector: 'app-logout', 7 | template: ` 8 |

9 | Logging out... 10 |

11 | `, 12 | styles: [], 13 | }) 14 | export class LogoutComponent implements OnInit { 15 | constructor(private router: Router, private authService: AuthService) {} 16 | 17 | ngOnInit() { 18 | this.authService.logout() 19 | this.router.navigate(['/']) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/user/profile/profile.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/app/user/profile/profile.component.css -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/user/profile/profile.component.html: -------------------------------------------------------------------------------- 1 |

2 | profile works! 3 |

4 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/user/profile/profile.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core' 2 | 3 | @Component({ 4 | selector: 'app-profile', 5 | templateUrl: './profile.component.html', 6 | styleUrls: ['./profile.component.css'], 7 | }) 8 | export class ProfileComponent implements OnInit { 9 | constructor() {} 10 | 11 | ngOnInit() {} 12 | } 13 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/user/user.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserModule } from './user.module' 2 | 3 | describe('UserModule', () => { 4 | let userModule: UserModule 5 | 6 | beforeEach(() => { 7 | userModule = new UserModule() 8 | }) 9 | 10 | it('should create an instance', () => { 11 | expect(userModule).toBeTruthy() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/app/user/user.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core' 2 | import { CommonModule } from '@angular/common' 3 | 4 | import { UserRoutingModule } from './user-routing.module' 5 | import { ProfileComponent } from './profile/profile.component' 6 | import { LogoutComponent } from './logout/logout.component' 7 | 8 | @NgModule({ 9 | imports: [CommonModule, UserRoutingModule], 10 | declarations: [ProfileComponent, LogoutComponent], 11 | }) 12 | export class UserModule {} 13 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/apple-touch-icon.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/assets/.gitkeep -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffc40d 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/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 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | } 4 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/favicon-16x16.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/favicon-32x32.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/favicon.ico -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/lemonmart-theme.scss: -------------------------------------------------------------------------------- 1 | @import '~@angular/material/theming'; 2 | 3 | @include mat-core(); 4 | 5 | $localcast-primary: mat-palette($mat-green, 800); 6 | $localcast-accent: mat-palette($mat-lime, A400); 7 | 8 | $localcast-app-theme: mat-light-theme($localcast-primary, $localcast-accent); 9 | 10 | @include angular-material-theme($localcast-app-theme); 11 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/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() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.log(err)) 14 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "icons": [ 4 | { 5 | "src": "/android-chrome-192x192.png?v=rMlKOnvxlK", 6 | "sizes": "192x192", 7 | "type": "image/png" 8 | }, 9 | { 10 | "src": "/android-chrome-512x512.png?v=rMlKOnvxlK", 11 | "sizes": "512x512", 12 | "type": "image/png" 13 | } 14 | ], 15 | "theme_color": "#ffffff", 16 | "background_color": "#ffffff", 17 | "display": "standalone" 18 | } -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/mstile-144x144.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/mstile-150x150.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/mstile-310x150.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/mstile-310x310.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duluca/angular-for-enterprise-ready-web-apps/117269e61692c5e2c2f8437a79fea4c32bda4893/Chapter9/lemon-mart/src/mstile-70x70.png -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | 5 | .margin-top { 6 | margin-top: 16px; 7 | } 8 | 9 | .horizontal-padding { 10 | margin-left: 16px; 11 | margin-right: 16px; 12 | } 13 | 14 | .flex-spacer { 15 | flex: 1 1 auto; 16 | } 17 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/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 | -------------------------------------------------------------------------------- /Chapter9/lemon-mart/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | --------------------------------------------------------------------------------