From 2880d9dd4cf856d8e99fa7f1ea0f703cbd4399df Mon Sep 17 00:00:00 2001 From: cyber-dream Date: Wed, 24 Aug 2022 15:08:22 +0300 Subject: [PATCH] init --- .angular-playground/.gitignore | 1 + .angular-playground/angular-playground.json | 6 + .angular-playground/main.playground.ts | 12 + .angular-playground/tsconfig.playground.json | 15 + .browserslistrc | 16 + .devcontainer/Dockerfile | 16 + .devcontainer/devcontainer.json | 32 + .docker/config/nginx.conf | 20 + .docker/nginx.dev.dockerfile | 7 + .docker/nginx.dockerfile | 18 + .docker/node.dockerfile | 18 + .dockerignore | 2 + .editorconfig | 16 + ...e-static-web-apps-jolly-sand-0e24e951e.yml | 42 + .gitignore | 140 +- .k8s/nginx.deployment.yml | 24 + .k8s/nginx.service.yml | 17 + .k8s/node.deployment.yml | 45 + .k8s/node.service.yml | 14 + .storybook/main.js | 14 + .storybook/preview-head.html | 3 + .storybook/preview.js | 14 + .storybook/tsconfig.json | 20 + .storybook/typings.d.ts | 4 + .vscode/extensions.json | 5 + .vscode/launch.json | 12 + .vscode/setting.json | 11 + .vscode/settings.json | 8 + .vscode/tasks.json | 32 + LICENSE | 232 - LICENSE.txt | 21 + README.md | 183 +- angular.json | 143 + api/.funcignore | 7 + api/.gitignore | 94 + api/.vscode/extensions.json | 5 + api/.vscode/launch.json | 12 + api/.vscode/tasks.json | 23 + api/CustomerById/function.json | 19 + api/CustomerById/index.js | 16 + api/CustomerCreate/function.json | 19 + api/CustomerCreate/index.js | 17 + api/CustomerDelete/function.json | 19 + api/CustomerDelete/index.js | 24 + api/CustomerUpdate/function.json | 19 + api/CustomerUpdate/index.js | 33 + api/CustomersAll/function.json | 19 + api/CustomersAll/index.js | 11 + api/CustomersPage/function.json | 19 + api/CustomersPage/index.js | 24 + api/Login/function.json | 19 + api/Login/index.js | 11 + api/Logout/function.json | 19 + api/Logout/index.js | 10 + api/OrderById/function.json | 19 + api/OrderById/index.js | 13 + api/README.md | 35 + api/StatesAll/function.json | 19 + api/StatesAll/index.js | 11 + api/data/customers.json | 362 + api/data/states.json | 302 + api/host.json | 7 + api/package-lock.json | 5 + api/package.json | 11 + api/proxies.json | 4 + cypress.config.ts | 20 + cypress/e2e/customers.spec.cy.ts | 41 + cypress/e2e/login.spec.cy.ts | 27 + cypress/fixtures/example.json | 5 + cypress/support/commands.ts | 37 + cypress/support/e2e.ts | 20 + cypress/support/index.js | 20 + cypress/tsconfig.json | 7 + data/customers.json | 362 + data/states.json | 302 + deno/loadfile.ts | 6 + deno/routes.ts | 110 + deno/server.ts | 44 + docker-compose.yml | 54 + documentation.json | 10313 +++ package-lock.json | 65733 +++++++++++++++- package.json | 64 +- public/css/bootstrap.css | 6757 -- public/css/bootstrap.min.css | 6 - public/fonts/glyphicons-halflings-regular.eot | Bin 20127 -> 0 bytes public/fonts/glyphicons-halflings-regular.svg | 288 - public/fonts/glyphicons-halflings-regular.ttf | Bin 45404 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 23424 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 18028 -> 0 bytes public/js/bootstrap.js | 2377 - public/js/bootstrap.min.js | 7 - public/js/dashboard.js | 1 - public/js/jquery.js | 4 - server.js | 150 + skaffold.yaml | 26 + src/app.ts | 26 - src/app/about/about-routing.module.ts | 16 + src/app/about/about.component.html | 24 + src/app/about/about.component.sandbox.ts | 7 + src/app/about/about.component.ts | 15 + src/app/about/about.module.ts | 9 + src/app/app-routing.module.ts | 28 + src/app/app.component.css | 0 src/app/app.component.html | 10 + src/app/app.component.ts | 9 + src/app/app.module.ts | 22 + src/app/core/core.module.ts | 45 + .../core/ensure-module-loaded-once.guard.ts | 9 + src/app/core/growler/growler.component.css | 66 + src/app/core/growler/growler.component.ts | 94 + src/app/core/growler/growler.module.ts | 20 + src/app/core/growler/growler.service.ts | 17 + src/app/core/interceptors/auth.interceptor.ts | 15 + src/app/core/modal/modal.component.css | 3 + src/app/core/modal/modal.component.html | 18 + src/app/core/modal/modal.component.ts | 57 + src/app/core/modal/modal.module.ts | 21 + src/app/core/modal/modal.service.ts | 20 + src/app/core/navbar/navbar.component.html | 25 + src/app/core/navbar/navbar.component.ts | 60 + .../overlay-request-response.interceptor.ts | 41 + src/app/core/overlay/overlay.component.css | 50 + src/app/core/overlay/overlay.component.html | 6 + src/app/core/overlay/overlay.component.ts | 57 + src/app/core/overlay/overlay.module.ts | 28 + src/app/core/services/auth.service.ts | 58 + src/app/core/services/data.service.ts | 124 + src/app/core/services/dialog.service.ts | 19 + src/app/core/services/event-bus.service.ts | 39 + src/app/core/services/filter.service.ts | 32 + src/app/core/services/logger.service.ts | 31 + src/app/core/services/property-resolver.ts | 7 + src/app/core/services/sorter.service.ts | 55 + src/app/core/services/trackby.service.ts | 18 + src/app/core/services/utilities.service.ts | 31 + src/app/core/services/validation.service.ts | 47 + .../strategies/preload-modules.strategy.ts | 22 + .../customer-details.component.css | 3 + .../customer-details.component.html | 34 + .../customer-details.component.sandbox.ts | 33 + .../customer-details.component.ts | 56 + .../customer-edit/customer-edit.component.css | 14 + .../customer-edit.component.html | 47 + .../customer-edit/customer-edit.component.ts | 132 + .../customer-orders.component.html | 22 + .../customer-orders.component.sandbox.ts | 31 + .../customer-orders.component.ts | 32 + src/app/customer/customer-routing.module.ts | 36 + src/app/customer/customer.component.html | 39 + src/app/customer/customer.component.ts | 38 + src/app/customer/customer.module.ts | 10 + src/app/customer/guards/can-activate.guard.ts | 23 + .../customer/guards/can-deactivate.guard.ts | 24 + .../customers-card.component.css | 54 + .../customers-card.component.html | 33 + .../customers-card.component.sandbox.ts | 35 + .../customers-card.component.ts | 26 + .../customers-grid.component.css | 11 + .../customers-grid.component.html | 40 + .../customers-grid.component.sandbox.ts | 35 + .../customers-grid.component.ts | 30 + src/app/customers/customers-routing.module.ts | 18 + src/app/customers/customers.component.html | 76 + .../customers/customers.component.sandbox.ts | 24 + src/app/customers/customers.component.ts | 106 + src/app/customers/customers.module.ts | 10 + src/app/login/login-routing.module.ts | 16 + src/app/login/login.component.css | 13 + src/app/login/login.component.html | 49 + src/app/login/login.component.ts | 61 + src/app/login/login.module.ts | 11 + src/app/orders/orders-routing.module.ts | 16 + src/app/orders/orders.component.html | 43 + src/app/orders/orders.component.ts | 35 + src/app/orders/orders.module.ts | 10 + src/app/shared/directives/sortby.directive.ts | 29 + .../filter-textbox.component.css | 3 + .../filter-textbox.component.html | 6 + .../filter-textbox.component.ts | 19 + .../filter-textbox/filter-textbox.module.ts | 12 + src/app/shared/interfaces.ts | 53 + src/app/shared/map/map-point.component.ts | 19 + src/app/shared/map/map.component.html | 1 + src/app/shared/map/map.component.ts | 194 + src/app/shared/map/map.module.ts | 12 + src/app/shared/mocks.ts | 436 + .../pagination/pagination.component.css | 13 + .../pagination/pagination.component.html | 17 + .../shared/pagination/pagination.component.ts | 83 + .../shared/pagination/pagination.module.ts | 11 + src/app/shared/pipes/capitalize.pipe.ts | 9 + src/app/shared/pipes/trim.pipe.ts | 11 + src/app/shared/router.animations.ts | 78 + src/app/shared/shared.module.ts | 17 + src/assets/.gitkeep | 0 src/assets/images/female.png | Bin 0 -> 34965 bytes src/assets/images/male.png | Bin 0 -> 45778 bytes src/assets/images/people.png | Bin 0 -> 4102 bytes src/assets/images/screenshots/cards.png | Bin 0 -> 185359 bytes src/assets/images/screenshots/details.png | Bin 0 -> 526567 bytes src/assets/images/screenshots/grid.png | Bin 0 -> 166013 bytes src/assets/images/screenshots/orders.png | Bin 0 -> 58355 bytes src/assets/images/spinner.gif | Bin 0 -> 1924 bytes src/assets/staticwebapp.config.json | 5 + src/assets/styles.css | 190 + src/environments/environment.prod.ts | 3 + src/environments/environment.ts | 8 + src/favicon.ico | Bin 0 -> 5430 bytes src/index.html | 46 + src/main.ts | 12 + src/minecraft/1.12.2/heliosDistribution.ts | 55 - src/polyfills.ts | 71 + src/private_api.ts | 25 - src/public_api.ts | 29 - src/routes/minecraft/1_12_2/routes.ts | 17 - src/routes/minecraft/minecraft_routes.ts | 11 - src/routes/private_routes.ts | 9 - src/routes/public/minecraft/1_12_2/routes.ts | 17 - .../public/minecraft/minecraft_routes.ts | 11 - src/routes/public_routes.ts | 9 - src/routes/routes.ts | 9 - src/server.ts | 5 - src/stories/About.stories.ts | 24 + src/stories/Button.stories.ts | 42 + src/stories/Customers-card.stories.ts | 38 + src/stories/Header.stories.ts | 30 + src/stories/Introduction.stories.mdx | 211 + src/stories/Page.stories.ts | 34 + src/stories/User.ts | 2 + src/stories/assets/code-brackets.svg | 1 + src/stories/assets/colors.svg | 1 + src/stories/assets/comments.svg | 1 + src/stories/assets/direction.svg | 1 + src/stories/assets/flow.svg | 1 + src/stories/assets/plugin.svg | 1 + src/stories/assets/repo.svg | 1 + src/stories/assets/stackalt.svg | 1 + src/stories/button.component.ts | 53 + src/stories/button.css | 30 + src/stories/header.component.ts | 64 + src/stories/header.css | 26 + src/stories/page.component.ts | 91 + src/stories/page.css | 69 + src/styles.css | 1 + src/tsconfig.spec.json | 18 + tsconfig.app.json | 17 + tsconfig.json | 38 +- views/dashboard.ejs | 94 - views/minecraft.ejs | 94 - 249 files changed, 82992 insertions(+), 11345 deletions(-) create mode 100644 .angular-playground/.gitignore create mode 100644 .angular-playground/angular-playground.json create mode 100644 .angular-playground/main.playground.ts create mode 100644 .angular-playground/tsconfig.playground.json create mode 100644 .browserslistrc create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .docker/config/nginx.conf create mode 100644 .docker/nginx.dev.dockerfile create mode 100644 .docker/nginx.dockerfile create mode 100644 .docker/node.dockerfile create mode 100644 .dockerignore create mode 100644 .editorconfig create mode 100644 .github/workflows/azure-static-web-apps-jolly-sand-0e24e951e.yml create mode 100644 .k8s/nginx.deployment.yml create mode 100644 .k8s/nginx.service.yml create mode 100644 .k8s/node.deployment.yml create mode 100644 .k8s/node.service.yml create mode 100644 .storybook/main.js create mode 100644 .storybook/preview-head.html create mode 100644 .storybook/preview.js create mode 100644 .storybook/tsconfig.json create mode 100644 .storybook/typings.d.ts create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/setting.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json delete mode 100644 LICENSE create mode 100644 LICENSE.txt create mode 100644 angular.json create mode 100644 api/.funcignore create mode 100644 api/.gitignore create mode 100644 api/.vscode/extensions.json create mode 100644 api/.vscode/launch.json create mode 100644 api/.vscode/tasks.json create mode 100644 api/CustomerById/function.json create mode 100644 api/CustomerById/index.js create mode 100644 api/CustomerCreate/function.json create mode 100644 api/CustomerCreate/index.js create mode 100644 api/CustomerDelete/function.json create mode 100644 api/CustomerDelete/index.js create mode 100644 api/CustomerUpdate/function.json create mode 100644 api/CustomerUpdate/index.js create mode 100644 api/CustomersAll/function.json create mode 100644 api/CustomersAll/index.js create mode 100644 api/CustomersPage/function.json create mode 100644 api/CustomersPage/index.js create mode 100644 api/Login/function.json create mode 100644 api/Login/index.js create mode 100644 api/Logout/function.json create mode 100644 api/Logout/index.js create mode 100644 api/OrderById/function.json create mode 100644 api/OrderById/index.js create mode 100644 api/README.md create mode 100644 api/StatesAll/function.json create mode 100644 api/StatesAll/index.js create mode 100644 api/data/customers.json create mode 100644 api/data/states.json create mode 100644 api/host.json create mode 100644 api/package-lock.json create mode 100644 api/package.json create mode 100644 api/proxies.json create mode 100644 cypress.config.ts create mode 100644 cypress/e2e/customers.spec.cy.ts create mode 100644 cypress/e2e/login.spec.cy.ts create mode 100644 cypress/fixtures/example.json create mode 100644 cypress/support/commands.ts create mode 100644 cypress/support/e2e.ts create mode 100644 cypress/support/index.js create mode 100644 cypress/tsconfig.json create mode 100644 data/customers.json create mode 100644 data/states.json create mode 100644 deno/loadfile.ts create mode 100644 deno/routes.ts create mode 100644 deno/server.ts create mode 100644 docker-compose.yml create mode 100644 documentation.json delete mode 100644 public/css/bootstrap.css delete mode 100644 public/css/bootstrap.min.css delete mode 100644 public/fonts/glyphicons-halflings-regular.eot delete mode 100644 public/fonts/glyphicons-halflings-regular.svg delete mode 100644 public/fonts/glyphicons-halflings-regular.ttf delete mode 100644 public/fonts/glyphicons-halflings-regular.woff delete mode 100644 public/fonts/glyphicons-halflings-regular.woff2 delete mode 100644 public/js/bootstrap.js delete mode 100644 public/js/bootstrap.min.js delete mode 100644 public/js/dashboard.js delete mode 100644 public/js/jquery.js create mode 100644 server.js create mode 100644 skaffold.yaml delete mode 100644 src/app.ts create mode 100644 src/app/about/about-routing.module.ts create mode 100644 src/app/about/about.component.html create mode 100644 src/app/about/about.component.sandbox.ts create mode 100644 src/app/about/about.component.ts create mode 100644 src/app/about/about.module.ts create mode 100644 src/app/app-routing.module.ts create mode 100644 src/app/app.component.css create mode 100644 src/app/app.component.html create mode 100644 src/app/app.component.ts create mode 100644 src/app/app.module.ts create mode 100644 src/app/core/core.module.ts create mode 100644 src/app/core/ensure-module-loaded-once.guard.ts create mode 100644 src/app/core/growler/growler.component.css create mode 100644 src/app/core/growler/growler.component.ts create mode 100644 src/app/core/growler/growler.module.ts create mode 100644 src/app/core/growler/growler.service.ts create mode 100644 src/app/core/interceptors/auth.interceptor.ts create mode 100644 src/app/core/modal/modal.component.css create mode 100644 src/app/core/modal/modal.component.html create mode 100644 src/app/core/modal/modal.component.ts create mode 100644 src/app/core/modal/modal.module.ts create mode 100644 src/app/core/modal/modal.service.ts create mode 100644 src/app/core/navbar/navbar.component.html create mode 100644 src/app/core/navbar/navbar.component.ts create mode 100644 src/app/core/overlay/overlay-request-response.interceptor.ts create mode 100644 src/app/core/overlay/overlay.component.css create mode 100644 src/app/core/overlay/overlay.component.html create mode 100644 src/app/core/overlay/overlay.component.ts create mode 100644 src/app/core/overlay/overlay.module.ts create mode 100644 src/app/core/services/auth.service.ts create mode 100644 src/app/core/services/data.service.ts create mode 100644 src/app/core/services/dialog.service.ts create mode 100644 src/app/core/services/event-bus.service.ts create mode 100644 src/app/core/services/filter.service.ts create mode 100644 src/app/core/services/logger.service.ts create mode 100644 src/app/core/services/property-resolver.ts create mode 100644 src/app/core/services/sorter.service.ts create mode 100644 src/app/core/services/trackby.service.ts create mode 100644 src/app/core/services/utilities.service.ts create mode 100644 src/app/core/services/validation.service.ts create mode 100644 src/app/core/strategies/preload-modules.strategy.ts create mode 100644 src/app/customer/customer-details/customer-details.component.css create mode 100644 src/app/customer/customer-details/customer-details.component.html create mode 100644 src/app/customer/customer-details/customer-details.component.sandbox.ts create mode 100644 src/app/customer/customer-details/customer-details.component.ts create mode 100644 src/app/customer/customer-edit/customer-edit.component.css create mode 100644 src/app/customer/customer-edit/customer-edit.component.html create mode 100644 src/app/customer/customer-edit/customer-edit.component.ts create mode 100644 src/app/customer/customer-orders/customer-orders.component.html create mode 100644 src/app/customer/customer-orders/customer-orders.component.sandbox.ts create mode 100644 src/app/customer/customer-orders/customer-orders.component.ts create mode 100644 src/app/customer/customer-routing.module.ts create mode 100644 src/app/customer/customer.component.html create mode 100644 src/app/customer/customer.component.ts create mode 100644 src/app/customer/customer.module.ts create mode 100644 src/app/customer/guards/can-activate.guard.ts create mode 100644 src/app/customer/guards/can-deactivate.guard.ts create mode 100644 src/app/customers/customers-card/customers-card.component.css create mode 100644 src/app/customers/customers-card/customers-card.component.html create mode 100644 src/app/customers/customers-card/customers-card.component.sandbox.ts create mode 100644 src/app/customers/customers-card/customers-card.component.ts create mode 100644 src/app/customers/customers-grid/customers-grid.component.css create mode 100644 src/app/customers/customers-grid/customers-grid.component.html create mode 100644 src/app/customers/customers-grid/customers-grid.component.sandbox.ts create mode 100644 src/app/customers/customers-grid/customers-grid.component.ts create mode 100644 src/app/customers/customers-routing.module.ts create mode 100644 src/app/customers/customers.component.html create mode 100644 src/app/customers/customers.component.sandbox.ts create mode 100644 src/app/customers/customers.component.ts create mode 100644 src/app/customers/customers.module.ts create mode 100644 src/app/login/login-routing.module.ts create mode 100644 src/app/login/login.component.css create mode 100644 src/app/login/login.component.html create mode 100644 src/app/login/login.component.ts create mode 100644 src/app/login/login.module.ts create mode 100644 src/app/orders/orders-routing.module.ts create mode 100644 src/app/orders/orders.component.html create mode 100644 src/app/orders/orders.component.ts create mode 100644 src/app/orders/orders.module.ts create mode 100644 src/app/shared/directives/sortby.directive.ts create mode 100644 src/app/shared/filter-textbox/filter-textbox.component.css create mode 100644 src/app/shared/filter-textbox/filter-textbox.component.html create mode 100644 src/app/shared/filter-textbox/filter-textbox.component.ts create mode 100644 src/app/shared/filter-textbox/filter-textbox.module.ts create mode 100644 src/app/shared/interfaces.ts create mode 100644 src/app/shared/map/map-point.component.ts create mode 100644 src/app/shared/map/map.component.html create mode 100644 src/app/shared/map/map.component.ts create mode 100644 src/app/shared/map/map.module.ts create mode 100644 src/app/shared/mocks.ts create mode 100644 src/app/shared/pagination/pagination.component.css create mode 100644 src/app/shared/pagination/pagination.component.html create mode 100644 src/app/shared/pagination/pagination.component.ts create mode 100644 src/app/shared/pagination/pagination.module.ts create mode 100644 src/app/shared/pipes/capitalize.pipe.ts create mode 100644 src/app/shared/pipes/trim.pipe.ts create mode 100644 src/app/shared/router.animations.ts create mode 100644 src/app/shared/shared.module.ts create mode 100644 src/assets/.gitkeep create mode 100644 src/assets/images/female.png create mode 100644 src/assets/images/male.png create mode 100644 src/assets/images/people.png create mode 100644 src/assets/images/screenshots/cards.png create mode 100644 src/assets/images/screenshots/details.png create mode 100644 src/assets/images/screenshots/grid.png create mode 100644 src/assets/images/screenshots/orders.png create mode 100644 src/assets/images/spinner.gif create mode 100644 src/assets/staticwebapp.config.json create mode 100644 src/assets/styles.css create mode 100644 src/environments/environment.prod.ts create mode 100644 src/environments/environment.ts create mode 100644 src/favicon.ico create mode 100644 src/index.html create mode 100644 src/main.ts delete mode 100644 src/minecraft/1.12.2/heliosDistribution.ts create mode 100644 src/polyfills.ts delete mode 100644 src/private_api.ts delete mode 100644 src/public_api.ts delete mode 100644 src/routes/minecraft/1_12_2/routes.ts delete mode 100644 src/routes/minecraft/minecraft_routes.ts delete mode 100644 src/routes/private_routes.ts delete mode 100644 src/routes/public/minecraft/1_12_2/routes.ts delete mode 100644 src/routes/public/minecraft/minecraft_routes.ts delete mode 100644 src/routes/public_routes.ts delete mode 100644 src/routes/routes.ts delete mode 100644 src/server.ts create mode 100644 src/stories/About.stories.ts create mode 100644 src/stories/Button.stories.ts create mode 100644 src/stories/Customers-card.stories.ts create mode 100644 src/stories/Header.stories.ts create mode 100644 src/stories/Introduction.stories.mdx create mode 100644 src/stories/Page.stories.ts create mode 100644 src/stories/User.ts create mode 100644 src/stories/assets/code-brackets.svg create mode 100644 src/stories/assets/colors.svg create mode 100644 src/stories/assets/comments.svg create mode 100644 src/stories/assets/direction.svg create mode 100644 src/stories/assets/flow.svg create mode 100644 src/stories/assets/plugin.svg create mode 100644 src/stories/assets/repo.svg create mode 100644 src/stories/assets/stackalt.svg create mode 100644 src/stories/button.component.ts create mode 100644 src/stories/button.css create mode 100644 src/stories/header.component.ts create mode 100644 src/stories/header.css create mode 100644 src/stories/page.component.ts create mode 100644 src/stories/page.css create mode 100644 src/styles.css create mode 100644 src/tsconfig.spec.json create mode 100644 tsconfig.app.json delete mode 100644 views/dashboard.ejs delete mode 100644 views/minecraft.ejs diff --git a/.angular-playground/.gitignore b/.angular-playground/.gitignore new file mode 100644 index 0000000..1b0b752 --- /dev/null +++ b/.angular-playground/.gitignore @@ -0,0 +1 @@ +sandboxes.ts \ No newline at end of file diff --git a/.angular-playground/angular-playground.json b/.angular-playground/angular-playground.json new file mode 100644 index 0000000..4499b04 --- /dev/null +++ b/.angular-playground/angular-playground.json @@ -0,0 +1,6 @@ +{ + "sourceRoots": ["./src"], + "angularCli": { + "appName": "playground" + } +} diff --git a/.angular-playground/main.playground.ts b/.angular-playground/main.playground.ts new file mode 100644 index 0000000..78feeb9 --- /dev/null +++ b/.angular-playground/main.playground.ts @@ -0,0 +1,12 @@ +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { PlaygroundModule } from 'angular-playground'; +import { SandboxesDefined } from './sandboxes'; + +platformBrowserDynamic().bootstrapModule(PlaygroundModule + .configure({ + selector: 'cm-app-component', + overlay: false, + modules: [], + sandboxesDefined: SandboxesDefined + })) + .catch(err => console.error(err)); diff --git a/.angular-playground/tsconfig.playground.json b/.angular-playground/tsconfig.playground.json new file mode 100644 index 0000000..02d2db5 --- /dev/null +++ b/.angular-playground/tsconfig.playground.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "types": [] + }, + "files": [ + "./main.playground.ts", + "../src/polyfills.ts" + ], + "include": [ + "../src/**/*.d.ts", + "../src/**/*.sandbox.ts" + ] +} diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..4f9ac26 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,16 @@ +# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries + +# For the full list of supported browsers by the Angular framework, please see: +# https://angular.io/guide/browser-support + +# You can see what browsers were selected by your queries by running: +# npx browserslist + +last 1 Chrome version +last 1 Firefox version +last 2 Edge major versions +last 2 Safari major versions +last 2 iOS major versions +Firefox ESR diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..8332f19 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.205.2/containers/typescript-node/.devcontainer/base.Dockerfile + +# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster +ARG VARIANT="16-bullseye" +FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT} + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +# [Optional] Uncomment if you want to install an additional version of node using nvm +# ARG EXTRA_NODE_VERSION=10 +# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" + +# [Optional] Uncomment if you want to install more global node packages +RUN su node -c "npm install -g @angular/cli" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..deb982f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,32 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.205.2/containers/typescript-node +{ + "name": "Node.js & TypeScript", + "build": { + "dockerfile": "Dockerfile", + // Update 'VARIANT' to pick a Node version: 16, 14, 12. + // Append -bullseye or -buster to pin to an OS version. + // Use -bullseye variants on local on arm64/Apple Silicon. + "args": { + "VARIANT": "16-bullseye" + } + }, + + // Set *default* container specific settings.json values on container create. + "settings": {}, + + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "dbaeumer.vscode-eslint" + ], + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "yarn install", + + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "node" +} \ No newline at end of file diff --git a/.docker/config/nginx.conf b/.docker/config/nginx.conf new file mode 100644 index 0000000..c42ead1 --- /dev/null +++ b/.docker/config/nginx.conf @@ -0,0 +1,20 @@ +server { + listen 0.0.0.0:80; + listen [::]:80; + default_type application/octet-stream; + + gzip on; + gzip_comp_level 6; + gzip_vary on; + gzip_min_length 1000; + gzip_proxied any; + gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; + gzip_buffers 16 8k; + client_max_body_size 256M; + + root /usr/share/nginx/html; + + location / { + try_files $uri $uri/ /index.html =404; + } +} \ No newline at end of file diff --git a/.docker/nginx.dev.dockerfile b/.docker/nginx.dev.dockerfile new file mode 100644 index 0000000..18b4591 --- /dev/null +++ b/.docker/nginx.dev.dockerfile @@ -0,0 +1,7 @@ +FROM nginx:alpine +VOLUME /var/cache/nginx +COPY ./dist /usr/share/nginx/html +COPY ./.docker/config/nginx.conf /etc/nginx/conf.d/default.conf + +# docker build -t nginx-angular -f nginx.dockerfile . +# docker run -p 80:80 nginx-angular \ No newline at end of file diff --git a/.docker/nginx.dockerfile b/.docker/nginx.dockerfile new file mode 100644 index 0000000..ede440e --- /dev/null +++ b/.docker/nginx.dockerfile @@ -0,0 +1,18 @@ +##### Stage 1 +FROM node:16.17.0 as node +LABEL author="Dan Wahlin" +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm install --no-optional +COPY . . +RUN npm run build + +##### Stage 2 +FROM nginx:alpine +VOLUME /var/cache/nginx +COPY --from=node /app/dist /usr/share/nginx/html +COPY ./.docker/config/nginx.conf /etc/nginx/conf.d/default.conf + +# Run from project root +# docker build -t nginx-angular -f .docker/nginx.dockerfile . +# docker run -p 80:80 nginx-angular \ No newline at end of file diff --git a/.docker/node.dockerfile b/.docker/node.dockerfile new file mode 100644 index 0000000..7f6c271 --- /dev/null +++ b/.docker/node.dockerfile @@ -0,0 +1,18 @@ +FROM node:16.17.0-alpine + +LABEL author="Dan Wahlin" + +ENV CONTAINER=true + +WORKDIR /var/www/node-service + +COPY package.json package-lock.json ./ +RUN npm install --only=prod --no-optional + +COPY ./server.js . +COPY ./api . +COPY ./data . + +EXPOSE 8080 + +ENTRYPOINT ["node", "server.js"] \ No newline at end of file diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5171c54 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..59d9a3a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/.github/workflows/azure-static-web-apps-jolly-sand-0e24e951e.yml b/.github/workflows/azure-static-web-apps-jolly-sand-0e24e951e.yml new file mode 100644 index 0000000..2ba83ce --- /dev/null +++ b/.github/workflows/azure-static-web-apps-jolly-sand-0e24e951e.yml @@ -0,0 +1,42 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - master + +jobs: + build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - uses: actions/checkout@v1 + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v0.0.1-preview + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_JOLLY_SAND_0E24E951E }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: 'upload' + ###### Repository/Build Configurations - These values can be configured to match you app requirements. ###### + app_location: '/' # App source code path + api_location: 'api' # Api source code path - optional + app_artifact_location: 'dist' # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest + uses: Azure/static-web-apps-deploy@v0.0.1-preview + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_JOLLY_SAND_0E24E951E }} + action: 'close' diff --git a/.gitignore b/.gitignore index ceaea36..14e5f36 100644 --- a/.gitignore +++ b/.gitignore @@ -1,132 +1,24 @@ -# ---> Node -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* +/.angular/cache +# NPM +node_modules +npm-debug.log +sandboxes.ts -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +# Code Editor Settings +.idea +.vs -# Runtime data -pids -*.pid -*.seed -*.pid.lock +# Build Generated Files +src/app/**/*.js +src/app/**/*.js.map -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt +# Ignore any Webpack generated files dist +src/app/devDist +src/app/dist -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public +cypress/videos/ +cypress/screenshots/ -# vuepress build output -.vuepress/dist -# vuepress v2.x temp and cache directory -.temp -.cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* diff --git a/.k8s/nginx.deployment.yml b/.k8s/nginx.deployment.yml new file mode 100644 index 0000000..704d4e5 --- /dev/null +++ b/.k8s/nginx.deployment.yml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: nginx + name: nginx +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - image: nginx-angular-jumpstart + imagePullPolicy: IfNotPresent + name: nginx + ports: + - containerPort: 80 + - containerPort: 443 + resources: {} diff --git a/.k8s/nginx.service.yml b/.k8s/nginx.service.yml new file mode 100644 index 0000000..8a91427 --- /dev/null +++ b/.k8s/nginx.service.yml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: nginx + labels: + app: nginx +spec: + selector: + app: nginx + type: LoadBalancer + ports: + - name: "80" + port: 80 + targetPort: 80 + - name: "443" + port: 443 + targetPort: 443 diff --git a/.k8s/node.deployment.yml b/.k8s/node.deployment.yml new file mode 100644 index 0000000..ede4965 --- /dev/null +++ b/.k8s/node.deployment.yml @@ -0,0 +1,45 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: node-env + name: env-vars +data: + NODE_ENV: "production" + CONTAINER: "true" +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: node + name: node +spec: + replicas: 1 + selector: + matchLabels: + app: node + template: + metadata: + labels: + app: node + spec: + containers: + - env: + - name: NODE_ENV + valueFrom: + configMapKeyRef: + key: NODE_ENV + name: env-vars + - name: CONTAINER + valueFrom: + configMapKeyRef: + key: CONTAINER + name: env-vars + image: node-service-jumpstart + imagePullPolicy: IfNotPresent + name: node-service-jumpstart + ports: + - containerPort: 8080 + resources: {} diff --git a/.k8s/node.service.yml b/.k8s/node.service.yml new file mode 100644 index 0000000..7c20370 --- /dev/null +++ b/.k8s/node.service.yml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: node + labels: + app: node +spec: + selector: + app: node + type: LoadBalancer + ports: + - name: "8080" + port: 8080 + targetPort: 8080 diff --git a/.storybook/main.js b/.storybook/main.js new file mode 100644 index 0000000..2881fbc --- /dev/null +++ b/.storybook/main.js @@ -0,0 +1,14 @@ +module.exports = { + "stories": [ + "../src/**/*.stories.mdx", + "../src/**/*.stories.@(js|jsx|ts|tsx)" + ], + "addons": [ + "@storybook/addon-links", + "@storybook/addon-essentials" + ], + "framework": "@storybook/angular", + "core": { + "builder": "webpack5" + } +} \ No newline at end of file diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html new file mode 100644 index 0000000..62b8ebd --- /dev/null +++ b/.storybook/preview-head.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.storybook/preview.js b/.storybook/preview.js new file mode 100644 index 0000000..a20381a --- /dev/null +++ b/.storybook/preview.js @@ -0,0 +1,14 @@ +import { setCompodocJson } from "@storybook/addon-docs/angular"; +import docJson from "../documentation.json"; +setCompodocJson(docJson); + +export const parameters = { + actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, + docs: { inlineStories: true }, +} \ No newline at end of file diff --git a/.storybook/tsconfig.json b/.storybook/tsconfig.json new file mode 100644 index 0000000..0bcfc75 --- /dev/null +++ b/.storybook/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../tsconfig.app.json", + "compilerOptions": { + "types": [ + "node" + ] + }, + "exclude": [ + "../src/test.ts", + "../src/**/*.spec.ts", + "../projects/**/*.spec.ts" + ], + "include": [ + "../src/**/*", + "../projects/**/*" + ], + "files": [ + "./typings.d.ts" + ] +} diff --git a/.storybook/typings.d.ts b/.storybook/typings.d.ts new file mode 100644 index 0000000..f73d61b --- /dev/null +++ b/.storybook/typings.d.ts @@ -0,0 +1,4 @@ +declare module '*.md' { + const content: string; + export default content; +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..26786f9 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-azuretools.vscode-azurefunctions" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..e7be044 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Node Functions", + "type": "node", + "request": "attach", + "port": 9229, + "preLaunchTask": "func: host start" + } + ] +} \ No newline at end of file diff --git a/.vscode/setting.json b/.vscode/setting.json new file mode 100644 index 0000000..e5e9cd1 --- /dev/null +++ b/.vscode/setting.json @@ -0,0 +1,11 @@ +{ + "files.exclude": { + "**/app/**/*.js.map": true, + "**/app/**/*.js": true, + + "**/config/*.js.map": true, + "**/config/*.js": { + "when": "$(basename).js.map" + } + } +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1ef0ce4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "azureFunctions.deploySubpath": "api", + "azureFunctions.postDeployTask": "npm install", + "azureFunctions.projectLanguage": "JavaScript", + "azureFunctions.projectRuntime": "~2", + "debug.internalConsoleOptions": "neverOpen", + "azureFunctions.preDeployTask": "npm prune" +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..e78ad55 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,32 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "func", + "command": "host start", + "problemMatcher": "$func-watch", + "isBackground": true, + "dependsOn": "npm install", + "options": { + "cwd": "${workspaceFolder}/api" + } + }, + { + "type": "shell", + "label": "npm install", + "command": "npm install", + "options": { + "cwd": "${workspaceFolder}/api" + } + }, + { + "type": "shell", + "label": "npm prune", + "command": "npm prune --production", + "problemMatcher": [], + "options": { + "cwd": "${workspaceFolder}/api" + } + } + ] +} \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d41c0bd..0000000 --- a/LICENSE +++ /dev/null @@ -1,232 +0,0 @@ -GNU GENERAL PUBLIC LICENSE -Version 3, 29 June 2007 - -Copyright © 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - -Preamble - -The GNU General Public License is a free, copyleft license for software and other kinds of works. - -The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - -To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. - -For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - -Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. - -For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. - -Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. - -Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. - -The precise terms and conditions for copying, distribution and modification follow. - -TERMS AND CONDITIONS - -0. Definitions. - -“This License” refers to version 3 of the GNU General Public License. - -“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - -“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. - -To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. - -A “covered work” means either the unmodified Program or a work based on the Program. - -To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - -To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - -An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. - -1. Source Code. -The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. - -A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - -The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - -The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. - -2. Basic Permissions. -All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - -3. Protecting Users' Legal Rights From Anti-Circumvention Law. -No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. - -4. Conveying Verbatim Copies. -You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. - -5. Conveying Modified Source Versions. -You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. - - c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. - -6. Conveying Non-Source Forms. -You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - - a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. - - d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - -A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - -“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - -The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. - -7. Additional Terms. -“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - - e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. - -8. Termination. -You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. - -9. Acceptance Not Required for Having Copies. -You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. - -10. Automatic Licensing of Downstream Recipients. -Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - -An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. - -11. Patents. -A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. - -A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - -In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - -A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. - -12. No Surrender of Others' Freedom. -If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - -13. Use with the GNU Affero General Public License. -Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. - -14. Revised Versions of this License. -The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - -Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. - -15. Disclaimer of Warranty. -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. Limitation of Liability. -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -17. Interpretation of Sections 15 and 16. -If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - -If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. - -You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . - -The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..1746ded --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Dan Wahlin and Wahlin Consulting (http://github.com/DanWahlin) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 59c3f3a..3975b84 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,183 @@ -# SkirdaNodeBackend +# Angular JumpStart with TypeScript + +The goal of this jumpstart app is to provide +a simple way to get started with Angular 2+ while also showing several key Angular features. The sample +relies on the Angular CLI to build the application. + +Looking for expert onsite Angular/TypeScript training? We've trained the biggest (and smallest :-)) companies around the world for over 15 years. For more information visit https://codewithdan.com. + +## Angular Concepts Covered + +* TypeScript version that relies on classes and modules +* Modules are loaded with System.js +* Defining routes including child routes and lazy loaded routes +* Using Custom Components including custom input and output properties +* Using Custom Directives +* Using Custom Pipes +* Defining Properties and Using Events in Components/Directives +* Using the Http object for Ajax calls along with RxJS observables +* Working with Utility and Service classes (such as for sorting and Ajax calls) +* Using Angular databinding Syntax [], () and [()] +* Using template-driven and reactive forms functionality for capturing and validating data +* Optional: Webpack functionality is available for module loading and more (see below for details) +* Optional: Ahead-of-Time (AOT) functionality is available for a production build of the project (see below for details) + +## Running the Application with Node.js + +1. Install the latest LTS version of Node.js from https://nodejs.org. *IMPORTANT: The server uses ES2015 features AND the Angular CLI so you need a current version of Node.js.* + +1. Run `npm install` to install app dependencies + +1. Run `ng build --watch` to build and bundle the code + +1. Run `npm start` in a separate terminal window to launch the web and RESTful API server + +1. Go to http://localhost:8080 in your browser + +Simply clone the project or download and extract the .zip to get started. + +Once the app is running you can play around with editing customers after you login. Use any email address and any password that's at least 6 characters long (with 1 digit). + +Here are a few screenshots from the app: + +![](src/assets/images/screenshots/cards.png) + +

+ +![](src/assets/images/screenshots/grid.png) + +

+ +![](src/assets/images/screenshots/orders.png) + +

+ +![](src/assets/images/screenshots/details.png) + +## Running the Application with Deno + +1. Install the latest version of Deno from https://deno.land + +1. If using VS Code (Optional): + - Install the Deno language server extension: https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno + - Open `.vscode/settings.json` and add the following properties for Deno: + + ``` json + "deno.enable": true, + "deno.lint": true, + "deno.unstable": false + ``` + +1. Run `npm install` to install the Angular dependencies + +1. Run `ng build` to build and bundle the code + +1. `cd` into `./deno` and run the following command: + + `deno run --allow-net --allow-read --unstable server.ts` + +1. Go to http://localhost:8080 in your browser + +## Running Angular Playground + +This application includes Angular Playground (http://www.angularplayground.it) which provides a great way to isolate components in a sandbox rather than loading the +entire application to see a given component. To run the playground run the following command: + +`npm run playground` + +Then open a browser and visit `http://localhost:4201` and follow the directions there (or visit their website for more information). + +## Running in Kubernetes + +1. Install Docker Desktop from https://www.docker.com/get-started +1. Start Docker and enable Kubernetes in the Docker Desktop preferences/settings +1. Run `docker-compose build` to create the images +1. Run `kubectl apply -f .k8s` to start Kubernetes +1. Visit `http://localhost` +1. Stop Kubernetes using `kubectl delete -f .k8s` + +## Running with Skaffold + +If you'd like to use the [Skaffold tool](https://skaffold.dev/docs/install) to run the project in Kubernetes, install it, and run the following command: + +`skaffold dev` + +To generate the `skaffold.yaml` file that's included in the project the following command was run and the image context paths it defines were modified: + +``` +skaffold init -k '.k8s/*.yml' \ + -a '{"builder":"Docker","payload":{"path":".docker/nginx.dev.dockerfile"},"image":"nginx-angular-jumpstart"}' \ + -a '{"builder":"Docker","payload":{"path":".docker/node.dockerfile"},"image":"node-service-jumpstart"}' +``` + +If you wanted to generate the initial Kubernetes manifest files from an existing docker-compose.yml file you can use the following command. +It uses the [Kompose tool](https://kompose.io) behind the scenes to create the YAML files + +``` +skaffold init --compose-file docker-compose.yml \ + -a '{"builder":"Docker","payload":{"path":".docker/nginx.dev.dockerfile"},"image":"nginx-angular-jumpstart"}' \ + -a '{"builder":"Docker","payload":{"path":".docker/node.dockerfile"},"image":"node-service-jumpstart"}' +``` + + +## Running in the Azure Static Web Apps Service + +Check out my post on [Getting Started with Azure Static Web Apps](https://blog.codewithdan.com/getting-started-with-azure-static-web-apps). + + +## Kubernetes Day Zero Webinar: Deploying to Kubernetes + +Dan Wahlin + +Twitter: @DanWahlin + +https://codewithdan.com + +Resources mentioned: + +* https://github.com/danwahlin/angular-jumpstart +* https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands +* https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#-strong-api-overview-strong- +* https://kubernetes.io/docs/reference/kubectl/cheatsheet/ + +## Agenda + +1. Container Orchestration Options (Docker Swarm, Kubernetes) +2. Using Docker Compose + + ``` + docker-compose build + docker-compose up + docker-compose down + ``` + +3. Docker Stacks --> Docker Desktop --> Kubernetes + + ``` + docker stack deploy -c docker-compose.yml angular-jumpstart + docker stack ls + docker stack rm angular-jumpstart + ``` + +4. Deploying Containers to Kubernetes + + https://kompose.io/ + + ``` + kompose convert -h + kompose convert -f docker-compose.yml -o ./[your-folder-goes-here] + ``` + + Tweak the generated YAML. Then once ready run: + + ``` + kubectl apply -f [your-folder-name] + ``` + +My Kubernetes for Developers video courses on Pluralsight.com: + +https://pluralsight.pxf.io/danwahlin + + + diff --git a/angular.json b/angular.json new file mode 100644 index 0000000..c3d3e2a --- /dev/null +++ b/angular.json @@ -0,0 +1,143 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "angular-jumpstart": { + "root": "", + "sourceRoot": "src", + "projectType": "application", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist", + "index": "src/index.html", + "main": "src/main.ts", + "tsConfig": "tsconfig.app.json", + "polyfills": "src/polyfills.ts", + "assets": [ + "src/assets", + "src/favicon.ico" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [], + "vendorChunk": true, + "extractLicenses": false, + "buildOptimizer": false, + "sourceMap": true, + "optimization": false, + "namedChunks": true + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ] + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "angular-jumpstart:build" + }, + "configurations": { + "production": { + "browserTarget": "angular-jumpstart:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "angular-jumpstart:build" + } + } + } + }, + "playground": { + "projectType": "application", + "root": "", + "sourceRoot": "src", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/playground", + "index": "src/index.html", + "main": ".angular-playground/main.playground.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": ".angular-playground/tsconfig.playground.json", + "aot": false, + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "fileReplacements": [ + { + "replace": "environments/environment.ts", + "with": "environments/environment.prod.ts" + } + ], + "buildOptimizer": false, + "extractLicenses": false, + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "development" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "playground:build", + "port": 4201 + } + } + } + } + }, + "schematics": { + "@schematics/angular:component": { + "prefix": "cm", + "style": "css" + }, + "@schematics/angular:directive": { + "prefix": "cm" + } + }, + "defaultProject": "angular-jumpstart" +} \ No newline at end of file diff --git a/api/.funcignore b/api/.funcignore new file mode 100644 index 0000000..5179222 --- /dev/null +++ b/api/.funcignore @@ -0,0 +1,7 @@ +*.js.map +*.ts +.git* +.vscode +local.settings.json +test +tsconfig.json \ No newline at end of file diff --git a/api/.gitignore b/api/.gitignore new file mode 100644 index 0000000..772851c --- /dev/null +++ b/api/.gitignore @@ -0,0 +1,94 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TypeScript output +dist +out + +# Azure Functions artifacts +bin +obj +appsettings.json +local.settings.json \ No newline at end of file diff --git a/api/.vscode/extensions.json b/api/.vscode/extensions.json new file mode 100644 index 0000000..26786f9 --- /dev/null +++ b/api/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-azuretools.vscode-azurefunctions" + ] +} diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json new file mode 100644 index 0000000..1c6e50d --- /dev/null +++ b/api/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Node Functions", + "type": "node", + "request": "attach", + "port": 9229, + "preLaunchTask": "func: host start" + } + ] +} \ No newline at end of file diff --git a/api/.vscode/tasks.json b/api/.vscode/tasks.json new file mode 100644 index 0000000..ebbaf6e --- /dev/null +++ b/api/.vscode/tasks.json @@ -0,0 +1,23 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "func", + "command": "host start", + "problemMatcher": "$func-watch", + "isBackground": true, + "dependsOn": "npm install" + }, + { + "type": "shell", + "label": "npm install", + "command": "npm install" + }, + { + "type": "shell", + "label": "npm prune", + "command": "npm prune --production", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/api/CustomerById/function.json b/api/CustomerById/function.json new file mode 100644 index 0000000..7b68fa4 --- /dev/null +++ b/api/CustomerById/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "get" + ], + "route": "customers/{id}" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/CustomerById/index.js b/api/CustomerById/index.js new file mode 100644 index 0000000..7bb2216 --- /dev/null +++ b/api/CustomerById/index.js @@ -0,0 +1,16 @@ +const customers = require('../data/customers.json'); + +module.exports = async function (context, req) { + const { id } = context.bindingData; + let customerId = +id; + let selectedCustomer = customers.find(customer => customer.id === customerId); + let response = selectedCustomer ? selectedCustomer : null; + + context.res = { + // status: 200, /* Defaults to 200 */ + headers: { + 'Content-Type': 'application/json' + }, + body: response + }; +} \ No newline at end of file diff --git a/api/CustomerCreate/function.json b/api/CustomerCreate/function.json new file mode 100644 index 0000000..2843239 --- /dev/null +++ b/api/CustomerCreate/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "post" + ], + "route": "customers" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/CustomerCreate/index.js b/api/CustomerCreate/index.js new file mode 100644 index 0000000..95814c7 --- /dev/null +++ b/api/CustomerCreate/index.js @@ -0,0 +1,17 @@ +const customers = require('../data/customers.json'); + +module.exports = async function (context, req) { + let postedCustomer = req.body; + let maxId = Math.max.apply(Math, customers.map((cust) => cust.id)); + postedCustomer.id = ++maxId; + postedCustomer.gender = (postedCustomer.id % 2 === 0) ? 'female' : 'male'; + customers.push(postedCustomer); + + context.res = { + // status: 200, /* Defaults to 200 */ + headers: { + 'Content-Type': 'application/json' + }, + body: postedCustomer + }; +} \ No newline at end of file diff --git a/api/CustomerDelete/function.json b/api/CustomerDelete/function.json new file mode 100644 index 0000000..dadfaf5 --- /dev/null +++ b/api/CustomerDelete/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "delete" + ], + "route": "customers/{id}" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/CustomerDelete/index.js b/api/CustomerDelete/index.js new file mode 100644 index 0000000..674b2fb --- /dev/null +++ b/api/CustomerDelete/index.js @@ -0,0 +1,24 @@ +const customers = require('../data/customers.json'); + +module.exports = async function (context, req) { + const { id } = context.bindingData; + + let customerId = +id; + for (let i = 0, len = customers.length; i < len; i++) { + if (customers[i].id === customerId) { + customers.splice(i, 1); + break; + } + } + + + context.res = { + headers: { + 'Content-Type': 'application/json' + }, + // status: 200, /* Defaults to 200 */ + body: { + status: true + } + }; +} \ No newline at end of file diff --git a/api/CustomerUpdate/function.json b/api/CustomerUpdate/function.json new file mode 100644 index 0000000..67bff01 --- /dev/null +++ b/api/CustomerUpdate/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "put" + ], + "route": "customers/{id}" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/CustomerUpdate/index.js b/api/CustomerUpdate/index.js new file mode 100644 index 0000000..56d5ac4 --- /dev/null +++ b/api/CustomerUpdate/index.js @@ -0,0 +1,33 @@ +const customers = require('../data/customers.json'); +const states = require('../data/states.json'); + +module.exports = async function (context, req) { + let putCustomer = req.body; + let id = +req.params.id; + let status = false; + + //Ensure state name is in sync with state abbreviation + const filteredStates = states.filter((state) => state.abbreviation === putCustomer.state.abbreviation); + if (filteredStates && filteredStates.length) { + putCustomer.state.name = filteredStates[0].name; + console.log('Updated putCustomer state to ' + putCustomer.state.name); + } + + for (let i = 0, len = customers.length; i < len; i++) { + if (customers[i].id === id) { + customers[i] = putCustomer; + status = true; + break; + } + } + + context.res = { + headers : { + 'Content-Type': 'application/json' + }, + // status: 200, /* Defaults to 200 */ + body: { + status: status + } + }; +} \ No newline at end of file diff --git a/api/CustomersAll/function.json b/api/CustomersAll/function.json new file mode 100644 index 0000000..e8cac8f --- /dev/null +++ b/api/CustomersAll/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "get" + ], + "route": "customers" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/CustomersAll/index.js b/api/CustomersAll/index.js new file mode 100644 index 0000000..db95699 --- /dev/null +++ b/api/CustomersAll/index.js @@ -0,0 +1,11 @@ +const customers = require('../data/customers.json'); + +module.exports = async function (context, req) { + context.res = { + headers: { + 'Content-Type': 'application/json' + }, + // status: 200, /* Defaults to 200 */ + body: customers + }; +} \ No newline at end of file diff --git a/api/CustomersPage/function.json b/api/CustomersPage/function.json new file mode 100644 index 0000000..355243e --- /dev/null +++ b/api/CustomersPage/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "get" + ], + "route": "customers/page/{skip}/{top}" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/CustomersPage/index.js b/api/CustomersPage/index.js new file mode 100644 index 0000000..a7543ca --- /dev/null +++ b/api/CustomersPage/index.js @@ -0,0 +1,24 @@ +const customers = require('../data/customers.json'); + +module.exports = async function (context, req) { + const { skip: skipVal, top: topVal } = context.bindingData; + const skip = (isNaN(skipVal)) ? 0 : +skipVal; + let top = (isNaN(topVal)) ? 10 : skip + (+topVal); + + if (top > customers.length) { + top = skip + (customers.length - skip); + } + + console.log(`Skip: ${skip} Top: ${top}`); + + var pagedCustomers = customers.slice(skip, top); + + context.res = { + // status: 200, /* Defaults to 200 */ + headers : { + 'Content-Type': 'application/json', + 'X-InlineCount': customers.length + }, + body: pagedCustomers + }; +} \ No newline at end of file diff --git a/api/Login/function.json b/api/Login/function.json new file mode 100644 index 0000000..58da4e0 --- /dev/null +++ b/api/Login/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "post" + ], + "route": "auth/login" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/Login/index.js b/api/Login/index.js new file mode 100644 index 0000000..fda3a95 --- /dev/null +++ b/api/Login/index.js @@ -0,0 +1,11 @@ +module.exports = async function (context, req) { + const userLogin = req.body; + + context.res = { + headers: { + 'Content-Type': 'application/json' + }, + // status: 200, /* Defaults to 200 */ + body: 'true' + }; +} \ No newline at end of file diff --git a/api/Logout/function.json b/api/Logout/function.json new file mode 100644 index 0000000..48ca8ac --- /dev/null +++ b/api/Logout/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "post" + ], + "route": "auth/logout" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/Logout/index.js b/api/Logout/index.js new file mode 100644 index 0000000..47a630a --- /dev/null +++ b/api/Logout/index.js @@ -0,0 +1,10 @@ +module.exports = async function (context, req) { + + context.res = { + headers: { + 'Content-Type': 'application/json' + }, + // status: 200, /* Defaults to 200 */ + body: 'true' + }; +} \ No newline at end of file diff --git a/api/OrderById/function.json b/api/OrderById/function.json new file mode 100644 index 0000000..71e4653 --- /dev/null +++ b/api/OrderById/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "get" + ], + "route": "orders/{id}" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/OrderById/index.js b/api/OrderById/index.js new file mode 100644 index 0000000..6a115c0 --- /dev/null +++ b/api/OrderById/index.js @@ -0,0 +1,13 @@ +const customers = require('../data/customers.json'); + +module.exports = async function (context, req) { + const { id } = context.bindingData; + let customerId = +id; + + const foundCustomer = customers.find(customer => customer.id === id); + + context.res = { + // status: 200, /* Defaults to 200 */ + body: foundCustomer ? foundCustomer: [] + }; +} \ No newline at end of file diff --git a/api/README.md b/api/README.md new file mode 100644 index 0000000..15bce8d --- /dev/null +++ b/api/README.md @@ -0,0 +1,35 @@ +## Install dependencies + +```bash +https://github.com/Azure/azure-functions-core-tools +``` + +and the VS Code extension called `Azure Functions` + +## Run + +Run either with `Run/Start Debugging` + +or `npm start` or `func host start` from the command line + +## Interesting parts + +A Function app normally runs on URL `http://localhost:7071/api/` + +- `host.json`, this sets the `routePrefix` to empty string which means that the base URL is now `http://localhost:7071/` + +Every function is built up of a directory looking like so: + +```bash +--| +----| function.json +----| index.js +``` + +- `function.json`, this the configuration that set's up the function + - `authLevel`, this decided whether the user needs an API key or not, possible values `anonymous`, `function`, `admin` + - `type`, how the function is triggered, can be many things like a queue message a DB row etc, in this case it's a `httpTrigger` + - `direction`, this says whether this is incoming data or outgoing. We can for example have an incoming HTTP message but an outgoing DB row (we write to a DB). Read more about this on bindings + - `name`, name of the request/response object depending on + - `methods`, this is an array of supported methods + - `route`, this sets up what routing pattern we respond on \ No newline at end of file diff --git a/api/StatesAll/function.json b/api/StatesAll/function.json new file mode 100644 index 0000000..bce4e15 --- /dev/null +++ b/api/StatesAll/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "get" + ], + "route": "states" + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/api/StatesAll/index.js b/api/StatesAll/index.js new file mode 100644 index 0000000..b3acc98 --- /dev/null +++ b/api/StatesAll/index.js @@ -0,0 +1,11 @@ +const states = require('../data/states.json'); + +module.exports = async function (context, req) { + context.res = { + headers: { + 'Content-Type': 'application/json' + }, + // status: 200, /* Defaults to 200 */ + body: states + }; +} \ No newline at end of file diff --git a/api/data/customers.json b/api/data/customers.json new file mode 100644 index 0000000..30f3aae --- /dev/null +++ b/api/data/customers.json @@ -0,0 +1,362 @@ +[ + { + "id": 1, + "firstName": "ted", + "lastName": "james", + "gender": "male", + "address": "1234 Anywhere St.", + "city": " Phoenix ", + "state": { + "abbreviation": "AZ", + "name": "Arizona" + }, + "orders": [ + { "productName": "Basketball", "itemCost": 7.99 }, + { "productName": "Shoes", "itemCost": 199.99 } + ], + "latitude": 33.299, + "longitude": -111.963 + }, + { + "id": 2, + "firstName": "Michelle", + "lastName": "Thompson", + "gender": "female", + "address": "345 Cedar Point Ave.", + "city": "Encinitas ", + "state": { + "abbreviation": "CA", + "name": "California" + }, + "orders": [ + { "productName": "Frisbee", "itemCost": 2.99 }, + { "productName": "Hat", "itemCost": 5.99 } + ], + "latitude": 33.037, + "longitude": -117.291 + }, + { + "id": 3, + "firstName": "Zed", + "lastName": "Bishop", + "gender": "male", + "address": "1822 Long Bay Dr.", + "city": " Seattle ", + "state": { + "abbreviation": "WA", + "name": "Washington" + }, + "orders": [ + { "productName": "Boomerang", "itemCost": 29.99 }, + { "productName": "Helmet", "itemCost": 19.99 }, + { "productName": "Kangaroo Saddle", "itemCost": 179.99 } + ], + "latitude": 47.596, + "longitude": -122.331 + }, + { + "id": 4, + "firstName": "Tina", + "lastName": "Adams", + "gender": "female", + "address": "79455 Pinetop Way", + "city": "Chandler", + "state": { + "abbreviation": "AZ", + "name": " Arizona " + }, + "orders": [ + { "productName": "Budgie Smugglers", "itemCost": 19.99 }, + { "productName": "Swimming Cap", "itemCost": 5.49 } + ], + "latitude": 33.299, + "longitude": -111.963 + }, + { + "id": 5, + "firstName": "Igor", + "lastName": "Minar", + "gender": "male", + "address": "576 Crescent Blvd.", + "city": " Dallas", + "state": { + "abbreviation": "TX", + "name": "Texas" + }, + "orders": [ + { "productName": "Bow", "itemCost": 399.99 }, + { "productName": "Arrows", "itemCost": 69.99 } + ], + "latitude": 32.782927, + "longitude": -96.806191 + }, + { + "id": 6, + "firstName": "Brad", + "lastName": "Green", + "gender": "male", + "address": "9874 Center St.", + "city": "Orlando ", + "state": { + "abbreviation": "FL", + "name": "Florida" + }, + "orders": [ + { "productName": "Baseball", "itemCost": 9.99 }, + { "productName": "Bat", "itemCost": 19.99 } + ], + "latitude": 28.384238, + "longitude": -81.564103 + }, + { + "id": 7, + "firstName": "Misko", + "lastName": "Hevery", + "gender": "male", + "address": "9812 Builtway Appt #1", + "city": "Carey ", + "state": { + "abbreviation": "NC", + "name": "North Carolina" + }, + "orders": [ + { "productName": "Surfboard", "itemCost": 299.99 }, + { "productName": "Wax", "itemCost": 5.99 }, + { "productName": "Shark Repellent", "itemCost": 15.99 } + ], + "latitude": 35.727985, + "longitude": -78.797594 + }, + { + "id": 8, + "firstName": "Heedy", + "lastName": "Wahlin", + "gender": "female", + "address": "4651 Tuvo St.", + "city": "Anaheim", + "state": { + "abbreviation": "CA", + "name": "California" + }, + "orders": [ + { "productName": "Saddle", "itemCost": 599.99 }, + { "productName": "Riding cap", "itemCost": 79.99 } + ], + "latitude": 33.809898, + "longitude": -117.918757 + }, + { + "id": 9, + "firstName": "John", + "lastName": "Papa", + "gender": "male", + "address": "66 Ray St.", + "city": " Orlando", + "state": { + "abbreviation": "FL", + "name": "Florida" + }, + "orders": [ + { "productName": "Baseball", "itemCost": 9.99 }, + { "productName": "Bat", "itemCost": 19.99 } + ], + "latitude": 28.384238, + "longitude": -81.564103 + }, + { + "id": 10, + "firstName": "Tonya", + "lastName": "Smith", + "gender": "female", + "address": "1455 Chandler Blvd.", + "city": " Atlanta", + "state": { + "abbreviation": "GA", + "name": "Georgia" + }, + "orders": [ + { "productName": "Surfboard", "itemCost": 299.99 }, + { "productName": "Wax", "itemCost": 5.99 }, + { "productName": "Shark Repellent", "itemCost": 7.99 } + ], + "latitude": 33.762297, + "longitude": -84.392953 + }, + { + "id": 11, + "firstName": "ward", + "lastName": "bell", + "gender": "male", + "address": "888 Central St.", + "city": "Los Angeles", + "state": { + "abbreviation": "CA", + "name": "California" + }, + "latitude": 34.042552, + "longitude": -118.266429 + }, + { + "id": 12, + "firstName": "Marcus", + "lastName": "Hightower", + "gender": "male", + "address": "1699 Atomic St.", + "city": "Dallas", + "state": { + "abbreviation": "TX", + "name": "Texas" + }, + "latitude": 32.782927, + "longitude": -96.806191 + }, + { + "id": 13, + "firstName": "Thomas", + "lastName": "Martin", + "gender": "male", + "address": "98756 Center St.", + "city": "New York", + "state": { + "abbreviation": "NY", + "name": "New York City" + }, + "orders": [ + { "productName": "Car", "itemCost": 42999.99 }, + { "productName": "Wax", "itemCost": 5.99 }, + { "productName": "Shark Repellent", "itemCost": 7.99 } + ], + "latitude": 40.725037, + "longitude": -74.004903 + }, + { + "id": 14, + "firstName": "Jean", + "lastName": "Martin", + "gender": "female", + "address": "98756 Center St.", + "city": "New York City", + "state": { + "abbreviation": "NY", + "name": "New York" + }, + "latitude": 40.725037, + "longitude": -74.004903 + }, + { + "id": 15, + "firstName": "Pinal", + "lastName": "Dave", + "gender": "male", + "address": "23566 Directive Pl.", + "city": "White Plains", + "state": { + "abbreviation": "NY", + "name": "New York" + }, + "latitude": 41.028726, + "longitude": -73.758261 + }, + { + "id": 16, + "firstName": "Robin", + "lastName": "Cleark", + "gender": "female", + "address": "35632 Richmond Circle Apt B", + "city": "Las Vegas", + "state": { + "abbreviation": "NV", + "name": "Nevada" + }, + "latitude": 36.091824, + "longitude": -115.174247 + }, + { + "id": 17, + "firstName": "Fred", + "lastName": "Roberts", + "gender": "male", + "address": "12 Ocean View St.", + "city": "Houston", + "state": { + "abbreviation": "TX", + "name": "Texas" + }, + "latitude": 29.750163, + "longitude": -95.362769 + }, + { + "id": 18, + "firstName": "Robyn", + "lastName": "Flores", + "gender": "female", + "address": "23423 Adams St.", + "city": "Seattle", + "state": { + "abbreviation": "WA", + "name": "Washington" + }, + "latitude": 47.596, + "longitude": -122.331 + }, + { + "id": 19, + "firstName": "Elaine", + "lastName": "Jones", + "gender": "female", + "address": "98756 Center St.", + "city": "Barcelona", + "state": { + "abbreviation": "CAT", + "name": "Catalonia" + }, + "latitude": 41.386444, + "longitude": 2.111988 + }, + { + "id": 20, + "firstName": "Lilija", + "lastName": "Arnarson", + "gender": "female", + "address": "23423 Adams St.", + "city": "Reykjavik", + "state": { + "abbreviation": "IS", + "name": "Iceland" + }, + "latitude": 64.120278, + "longitude": -21.830471 + }, + { + "id": 21, + "firstName": "Laurent", + "lastName": "Bugnion", + "gender": "male", + "address": "9874 Lake Blvd.", + "city": "Zurich", + "state": { + "abbreviation": "COZ", + "name": "Canton of Zurick" + }, + "orders": [ + { "productName": "Baseball", "itemCost": 9.99 }, + { "productName": "Bat", "itemCost": 19.99 } + ], + "latitude": 47.341337, + "longitude": 8.582503 + }, + { + "id": 22, + "firstName": "Gabriel", + "lastName": "Flores", + "gender": "male", + "address": "2543 Cassiano", + "city": "Rio de Janeiro", + "state": { + "abbreviation": "WA", + "name": "Rio de Janeiro" + }, + "latitude": -22.919369, + "longitude": -43.181836 + } +] diff --git a/api/data/states.json b/api/data/states.json new file mode 100644 index 0000000..5ba421e --- /dev/null +++ b/api/data/states.json @@ -0,0 +1,302 @@ +[ + { + "_id": "56f861a8a38a3d28e63b6c6b", + "id": 1, + "name": "Alabama", + "abbreviation": "AL" + }, + { + "_id": "56f861a8a38a3d28e63b6c6d", + "id": 3, + "name": "Alaska", + "abbreviation": "AK" + }, + { + "_id": "56f861a8a38a3d28e63b6c6f", + "id": 5, + "name": "Arizona", + "abbreviation": "AZ" + }, + { + "_id": "56f861a8a38a3d28e63b6c71", + "id": 7, + "name": "Arkansas", + "abbreviation": "AR" + }, + { + "_id": "56f861a8a38a3d28e63b6c73", + "id": 9, + "name": "California", + "abbreviation": "CA" + }, + { + "_id": "56f861a8a38a3d28e63b6c75", + "id": 11, + "name": "Colorado", + "abbreviation": "CO" + }, + { + "_id": "56f861a8a38a3d28e63b6c77", + "id": 13, + "name": "Connecticut", + "abbreviation": "CT" + }, + { + "_id": "56f861a8a38a3d28e63b6c79", + "id": 15, + "name": "Delaware", + "abbreviation": "DE" + }, + { + "_id": "56f861a8a38a3d28e63b6c7b", + "id": 17, + "name": "Florida", + "abbreviation": "FL" + }, + { + "_id": "56f861a8a38a3d28e63b6c7d", + "id": 19, + "name": "Georgia", + "abbreviation": "GA" + }, + { + "_id": "56f861a8a38a3d28e63b6c7f", + "id": 21, + "name": "Hawaii", + "abbreviation": "HI" + }, + { + "_id": "56f861a8a38a3d28e63b6c81", + "id": 23, + "name": "Idaho", + "abbreviation": "ID" + }, + { + "_id": "56f861a8a38a3d28e63b6c83", + "id": 25, + "name": "Illinois", + "abbreviation": "IL" + }, + { + "_id": "56f861a8a38a3d28e63b6c85", + "id": 27, + "name": "Indiana", + "abbreviation": "IN" + }, + { + "_id": "56f861a8a38a3d28e63b6c87", + "id": 29, + "name": "Iowa", + "abbreviation": "IA" + }, + { + "_id": "56f861a8a38a3d28e63b6c89", + "id": 31, + "name": "Kansas", + "abbreviation": "KS" + }, + { + "_id": "56f861a8a38a3d28e63b6c8b", + "id": 33, + "name": "Kentucky", + "abbreviation": "KY" + }, + { + "_id": "56f861a8a38a3d28e63b6c8d", + "id": 35, + "name": "Louisiana", + "abbreviation": "LA" + }, + { + "_id": "56f861a8a38a3d28e63b6c8f", + "id": 37, + "name": "Maine", + "abbreviation": "ME" + }, + { + "_id": "56f861a8a38a3d28e63b6c91", + "id": 39, + "name": "Maryland", + "abbreviation": "MD" + }, + { + "_id": "56f861a8a38a3d28e63b6c93", + "id": 41, + "name": "Massachusetts", + "abbreviation": "MA" + }, + { + "_id": "56f861a8a38a3d28e63b6c95", + "id": 43, + "name": "Michigan", + "abbreviation": "MI" + }, + { + "_id": "56f861a8a38a3d28e63b6c97", + "id": 45, + "name": "Minnesota", + "abbreviation": "MN" + }, + { + "_id": "56f861a8a38a3d28e63b6c99", + "id": 47, + "name": "Mississippi", + "abbreviation": "MS" + }, + { + "_id": "56f861a8a38a3d28e63b6c9b", + "id": 49, + "name": "Missouri", + "abbreviation": "MO" + }, + { + "_id": "56f861a8a38a3d28e63b6c6c", + "id": 2, + "name": "Montana", + "abbreviation": "MT" + }, + { + "_id": "56f861a8a38a3d28e63b6c6e", + "id": 4, + "name": "Nebraska", + "abbreviation": "NE" + }, + { + "_id": "56f861a8a38a3d28e63b6c70", + "id": 6, + "name": "Nevada", + "abbreviation": "NV" + }, + { + "_id": "56f861a8a38a3d28e63b6c72", + "id": 8, + "name": "New Hampshire", + "abbreviation": "NH" + }, + { + "_id": "56f861a8a38a3d28e63b6c74", + "id": 10, + "name": "New Jersey", + "abbreviation": "NJ" + }, + { + "_id": "56f861a8a38a3d28e63b6c76", + "id": 12, + "name": "New Mexico", + "abbreviation": "NM" + }, + { + "_id": "56f861a8a38a3d28e63b6c78", + "id": 14, + "name": "New York", + "abbreviation": "NY" + }, + { + "_id": "56f861a8a38a3d28e63b6c7a", + "id": 16, + "name": "North Carolina", + "abbreviation": "NC" + }, + { + "_id": "56f861a8a38a3d28e63b6c7c", + "id": 18, + "name": "North Dakota", + "abbreviation": "ND" + }, + { + "_id": "56f861a8a38a3d28e63b6c7e", + "id": 20, + "name": "Ohio", + "abbreviation": "OH" + }, + { + "_id": "56f861a8a38a3d28e63b6c80", + "id": 22, + "name": "Oklahoma", + "abbreviation": "OK" + }, + { + "_id": "56f861a8a38a3d28e63b6c82", + "id": 24, + "name": "Oregon", + "abbreviation": "OR" + }, + { + "_id": "56f861a8a38a3d28e63b6c84", + "id": 26, + "name": "Pennsylvania", + "abbreviation": "PA" + }, + { + "_id": "56f861a8a38a3d28e63b6c86", + "id": 28, + "name": "Rhode Island", + "abbreviation": "RI" + }, + { + "_id": "56f861a8a38a3d28e63b6c88", + "id": 30, + "name": "South Carolina", + "abbreviation": "SC" + }, + { + "_id": "56f861a8a38a3d28e63b6c8a", + "id": 32, + "name": "South Dakota", + "abbreviation": "SD" + }, + { + "_id": "56f861a8a38a3d28e63b6c8c", + "id": 34, + "name": "Tennessee", + "abbreviation": "TN" + }, + { + "_id": "56f861a8a38a3d28e63b6c8e", + "id": 36, + "name": "Texas", + "abbreviation": "TX" + }, + { + "_id": "56f861a8a38a3d28e63b6c90", + "id": 38, + "name": "Utah", + "abbreviation": "UT" + }, + { + "_id": "56f861a8a38a3d28e63b6c92", + "id": 40, + "name": "Vermont", + "abbreviation": "VT" + }, + { + "_id": "56f861a8a38a3d28e63b6c94", + "id": 42, + "name": "Virginia", + "abbreviation": "VA" + }, + { + "_id": "56f861a8a38a3d28e63b6c96", + "id": 44, + "name": "Washington", + "abbreviation": "WA" + }, + { + "_id": "56f861a8a38a3d28e63b6c98", + "id": 46, + "name": "West Virginia", + "abbreviation": "WV" + }, + { + "_id": "56f861a8a38a3d28e63b6c9a", + "id": 48, + "name": "Wisconsin", + "abbreviation": "WI" + }, + { + "_id": "56f861a8a38a3d28e63b6c9c", + "id": 50, + "name": "Wyoming", + "abbreviation": "WY" + } +] diff --git a/api/host.json b/api/host.json new file mode 100644 index 0000000..d342a8e --- /dev/null +++ b/api/host.json @@ -0,0 +1,7 @@ +{ + "version": "2.0", + "extensionBundle": { + "id": "Microsoft.Azure.Functions.ExtensionBundle", + "version": "[1.*, 2.0.0)" + } +} diff --git a/api/package-lock.json b/api/package-lock.json new file mode 100644 index 0000000..75eea2c --- /dev/null +++ b/api/package-lock.json @@ -0,0 +1,5 @@ +{ + "name": "server", + "version": "1.0.0", + "lockfileVersion": 1 +} diff --git a/api/package.json b/api/package.json new file mode 100644 index 0000000..4f8fb1b --- /dev/null +++ b/api/package.json @@ -0,0 +1,11 @@ +{ + "name": "server", + "version": "1.0.0", + "description": "", + "scripts": { + "start": "func start", + "test": "echo \"No tests yet...\"" + }, + "dependencies": {}, + "devDependencies": {} +} diff --git a/api/proxies.json b/api/proxies.json new file mode 100644 index 0000000..b385252 --- /dev/null +++ b/api/proxies.json @@ -0,0 +1,4 @@ +{ + "$schema": "http://json.schemastore.org/proxies", + "proxies": {} +} diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 0000000..5e75a82 --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,20 @@ +import { defineConfig } from "cypress"; + +export default defineConfig({ + component: { + devServer: { + framework: "angular", + bundler: "webpack", + }, + specPattern: "**/*.cy.ts", + }, + e2e: { + baseUrl: 'http://localhost:8080', + setupNodeEvents(on, config) { + // implement node event listeners here + }, + }, + viewportWidth: 1024, + viewportHeight: 768, + chromeWebSecurity: false +}); diff --git a/cypress/e2e/customers.spec.cy.ts b/cypress/e2e/customers.spec.cy.ts new file mode 100644 index 0000000..da26d0f --- /dev/null +++ b/cypress/e2e/customers.spec.cy.ts @@ -0,0 +1,41 @@ + +describe("Customers", () => { + beforeEach(() => { + cy.visit("/customers"); + }); + + it("should display 10 customers", () => { + cy.get('.card').should('have.length', 10); + }); + + it("should filter and display 10 customers", () => { + cy.wait(200); // pause to let cards load + cy.get('[name="filter"]').type('ze'); + cy.get('.card').should('have.length', 1); + }); + + it("should navigate to page 3", () => { + cy.get('.pagination > :nth-child(4) > a').click(); + cy.get('.card').should('have.length', 2); + }); + + it("should display list view", () => { + // Click List View + cy.get('.navbar > .nav > :nth-child(2) > a').click(); + cy.get('tr').should('have.length.gt', 5); + }); + + it("should display map view", () => { + // Click Map View + cy.get('.navbar > .nav > :nth-child(3) > a').click(); + cy.get('cm-map').should('exist'); + }); + + it("should click New Customer and navigate to login", () => { + // Click New Customer + cy.get('.navbar > .nav > :nth-child(4) > a').click(); + cy.url().should('include', '/login'); + }); + + + }); \ No newline at end of file diff --git a/cypress/e2e/login.spec.cy.ts b/cypress/e2e/login.spec.cy.ts new file mode 100644 index 0000000..99f4a3c --- /dev/null +++ b/cypress/e2e/login.spec.cy.ts @@ -0,0 +1,27 @@ +describe("Login", () => { + beforeEach(() => { + // If we're logged in ensure we log out + cy.visit("/"); + cy.get('[data-cy="login-logout"]').click(); + cy.visit("/login"); + }); + + it("should login user", () => { + cy.get('[name="email"]').type('test@test.com'); + cy.get('[name="password').type('password1'); + cy.get('.btn-success').click(); + cy.url().should('include', '/customers'); + }); + + it("should show errors with invalid email or password", () => { + const emailSelector = '[name="email'; + const passwordSelector = '[name="password"]'; + cy.get(emailSelector).type('test'); + cy.get(emailSelector).blur(); + cy.get('[data-cy="email-error"]').should('contain', 'A valid email address is required'); + cy.get(passwordSelector).type('pwd'); + cy.get(passwordSelector).blur(); + cy.get('[data-cy="password-error"]').should('contain', 'Password is required'); + }); + + }); \ No newline at end of file diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json new file mode 100644 index 0000000..02e4254 --- /dev/null +++ b/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts new file mode 100644 index 0000000..698b01a --- /dev/null +++ b/cypress/support/commands.ts @@ -0,0 +1,37 @@ +/// +// *********************************************** +// This example commands.ts shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) +// +// declare global { +// namespace Cypress { +// interface Chainable { +// login(email: string, password: string): Chainable +// drag(subject: string, options?: Partial): Chainable +// dismiss(subject: string, options?: Partial): Chainable +// visit(originalFn: CommandOriginalFn, url: string, options: Partial): Chainable +// } +// } +// } \ No newline at end of file diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts new file mode 100644 index 0000000..f80f74f --- /dev/null +++ b/cypress/support/e2e.ts @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/e2e.ts is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') \ No newline at end of file diff --git a/cypress/support/index.js b/cypress/support/index.js new file mode 100644 index 0000000..d68db96 --- /dev/null +++ b/cypress/support/index.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/index.js is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json new file mode 100644 index 0000000..c3f8ab3 --- /dev/null +++ b/cypress/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig.json", + "include": [ + "../node_modules/cypress", + "*/*.ts" + ] +} diff --git a/data/customers.json b/data/customers.json new file mode 100644 index 0000000..64e3ede --- /dev/null +++ b/data/customers.json @@ -0,0 +1,362 @@ +[ + { + "id": 1, + "firstName": "ted", + "lastName": "james", + "gender": "male", + "address": "1234 Anywhere St.", + "city": " Phoenix ", + "state": { + "abbreviation": "AZ", + "name": "Arizona" + }, + "orders": [ + {"productName": "Basketball", "itemCost": 7.99}, + {"productName": "Shoes", "itemCost": 199.99} + ], + "latitude": 33.299, + "longitude": -111.963 + }, + { + "id": 2, + "firstName": "Michelle", + "lastName": "Thompson", + "gender": "female", + "address": "345 Cedar Point Ave.", + "city": "Encinitas ", + "state": { + "abbreviation": "CA", + "name": "California" + }, + "orders": [ + {"productName": "Frisbee", "itemCost": 2.99}, + {"productName": "Hat", "itemCost": 5.99} + ], + "latitude": 33.037, + "longitude": -117.291 + }, + { + "id": 3, + "firstName": "Zed", + "lastName": "Bishop", + "gender": "male", + "address": "1822 Long Bay Dr.", + "city": " Seattle ", + "state": { + "abbreviation": "WA", + "name": "Washington" + }, + "orders": [ + {"productName": "Boomerang", "itemCost": 29.99}, + {"productName": "Helmet", "itemCost": 19.99}, + {"productName": "Kangaroo Saddle", "itemCost": 179.99} + ], + "latitude": 47.596, + "longitude": -122.331 + }, + { + "id": 4, + "firstName": "Tina", + "lastName": "Adams", + "gender": "female", + "address": "79455 Pinetop Way", + "city": "Chandler", + "state": { + "abbreviation": "AZ", + "name": " Arizona " + }, + "orders": [ + {"productName": "Budgie Smugglers", "itemCost": 19.99}, + {"productName": "Swimming Cap", "itemCost": 5.49} + ], + "latitude": 33.299, + "longitude": -111.963 + }, + { + "id": 5, + "firstName": "Igor", + "lastName": "Minar", + "gender": "male", + "address": "576 Crescent Blvd.", + "city": " Dallas", + "state": { + "abbreviation": "TX", + "name": "Texas" + }, + "orders": [ + {"productName": "Bow", "itemCost": 399.99}, + {"productName": "Arrows", "itemCost": 69.99} + ], + "latitude": 32.782927, + "longitude": -96.806191 + }, + { + "id": 6, + "firstName": "Brad", + "lastName": "Green", + "gender": "male", + "address": "9874 Center St.", + "city": "Orlando ", + "state": { + "abbreviation": "FL", + "name": "Florida" + }, + "orders": [ + {"productName": "Baseball", "itemCost": 9.99}, + {"productName": "Bat", "itemCost": 19.99} + ], + "latitude": 28.384238, + "longitude": -81.564103 + }, + { + "id": 7, + "firstName": "Misko", + "lastName": "Hevery", + "gender": "male", + "address": "9812 Builtway Appt #1", + "city": "Carey ", + "state": { + "abbreviation": "NC", + "name": "North Carolina" + }, + "orders": [ + {"productName": "Surfboard", "itemCost": 299.99}, + {"productName": "Wax", "itemCost": 5.99}, + {"productName": "Shark Repellent", "itemCost": 15.99} + ], + "latitude": 35.727985, + "longitude": -78.797594 + }, + { + "id": 8, + "firstName": "Heedy", + "lastName": "Wahlin", + "gender": "female", + "address": "4651 Tuvo St.", + "city": "Anaheim", + "state": { + "abbreviation": "CA", + "name": "California" + }, + "orders": [ + {"productName": "Saddle", "itemCost": 599.99}, + {"productName": "Riding cap", "itemCost": 79.99} + ], + "latitude": 33.809898, + "longitude": -117.918757 + }, + { + "id": 9, + "firstName": "John", + "lastName": "Papa", + "gender": "male", + "address": "66 Ray St.", + "city": " Orlando", + "state": { + "abbreviation": "FL", + "name": "Florida" + }, + "orders": [ + {"productName": "Baseball", "itemCost": 9.99}, + {"productName": "Bat", "itemCost": 19.99} + ], + "latitude": 28.384238, + "longitude": -81.564103 + }, + { + "id": 10, + "firstName": "Tonya", + "lastName": "Smith", + "gender": "female", + "address": "1455 Chandler Blvd.", + "city": " Atlanta", + "state": { + "abbreviation": "GA", + "name": "Georgia" + }, + "orders": [ + {"productName": "Surfboard", "itemCost": 299.99}, + {"productName": "Wax", "itemCost": 5.99}, + {"productName": "Shark Repellent", "itemCost": 7.99} + ], + "latitude": 33.762297, + "longitude": -84.392953 + }, + { + "id": 11, + "firstName": "ward", + "lastName": "bell", + "gender": "male", + "address": "888 Central St.", + "city": "Los Angeles", + "state": { + "abbreviation": "CA", + "name": "California" + }, + "latitude": 34.042552, + "longitude": -118.266429 + }, + { + "id": 12, + "firstName": "Marcus", + "lastName": "Hightower", + "gender": "male", + "address": "1699 Atomic St.", + "city": "Dallas", + "state": { + "abbreviation": "TX", + "name": "Texas" + }, + "latitude": 32.782927, + "longitude": -96.806191 + }, + { + "id": 13, + "firstName": "Thomas", + "lastName": "Martin", + "gender": "male", + "address": "98756 Center St.", + "city": "New York", + "state": { + "abbreviation": "NY", + "name": "New York City" + }, + "orders": [ + {"productName": "Car", "itemCost": 42999.99}, + {"productName": "Wax", "itemCost": 5.99}, + {"productName": "Shark Repellent", "itemCost": 7.99} + ], + "latitude": 40.725037, + "longitude": -74.004903 + }, + { + "id": 14, + "firstName": "Jean", + "lastName": "Martin", + "gender": "female", + "address": "98756 Center St.", + "city": "New York City", + "state": { + "abbreviation": "NY", + "name": "New York" + }, + "latitude": 40.725037, + "longitude": -74.004903 + }, + { + "id": 15, + "firstName": "Pinal", + "lastName": "Dave", + "gender": "male", + "address": "23566 Directive Pl.", + "city": "White Plains", + "state": { + "abbreviation": "NY", + "name": "New York" + }, + "latitude": 41.028726, + "longitude": -73.758261 + }, + { + "id": 16, + "firstName": "Robin", + "lastName": "Cleark", + "gender": "female", + "address": "35632 Richmond Circle Apt B", + "city": "Las Vegas", + "state": { + "abbreviation": "NV", + "name": "Nevada" + }, + "latitude": 36.091824, + "longitude": -115.174247 + }, + { + "id": 17, + "firstName": "Fred", + "lastName": "Roberts", + "gender": "male", + "address": "12 Ocean View St.", + "city": "Houston", + "state": { + "abbreviation": "TX", + "name": "Texas" + }, + "latitude": 29.750163, + "longitude": -95.362769 + }, + { + "id": 18, + "firstName": "Robyn", + "lastName": "Flores", + "gender": "female", + "address": "23423 Adams St.", + "city": "Seattle", + "state": { + "abbreviation": "WA", + "name": "Washington" + }, + "latitude": 47.596, + "longitude": -122.331 + }, + { + "id": 19, + "firstName": "Elaine", + "lastName": "Jones", + "gender": "female", + "address": "98756 Center St.", + "city": "Barcelona", + "state": { + "abbreviation": "CAT", + "name": "Catalonia" + }, + "latitude": 41.386444, + "longitude": 2.111988 + }, + { + "id": 20, + "firstName": "Lilija", + "lastName": "Arnarson", + "gender": "female", + "address": "23423 Adams St.", + "city": "Reykjavik", + "state": { + "abbreviation": "IS", + "name": "Iceland" + }, + "latitude": 64.120278, + "longitude": -21.830471 + }, + { + "id": 21, + "firstName": "Laurent", + "lastName": "Bugnion", + "gender": "male", + "address": "9874 Lake Blvd.", + "city": "Zurich", + "state": { + "abbreviation": "COZ", + "name": "Canton of Zurick" + }, + "orders": [ + {"productName": "Baseball", "itemCost": 9.99}, + {"productName": "Bat", "itemCost": 19.99} + ], + "latitude": 47.341337, + "longitude": 8.582503 + }, + { + "id": 22, + "firstName": "Gabriel", + "lastName": "Flores", + "gender": "male", + "address": "2543 Cassiano", + "city": "Rio de Janeiro", + "state": { + "abbreviation": "WA", + "name": "Rio de Janeiro" + }, + "latitude": -22.919369, + "longitude": -43.181836 + } +] diff --git a/data/states.json b/data/states.json new file mode 100644 index 0000000..6256d7a --- /dev/null +++ b/data/states.json @@ -0,0 +1,302 @@ +[ + { + "_id": "56f861a8a38a3d28e63b6c6b", + "id": 1, + "name": "Alabama", + "abbreviation": "AL" + }, + { + "_id": "56f861a8a38a3d28e63b6c6d", + "id": 3, + "name": "Alaska", + "abbreviation": "AK" + }, + { + "_id": "56f861a8a38a3d28e63b6c6f", + "id": 5, + "name": "Arizona", + "abbreviation": "AZ" + }, + { + "_id": "56f861a8a38a3d28e63b6c71", + "id": 7, + "name": "Arkansas", + "abbreviation": "AR" + }, + { + "_id": "56f861a8a38a3d28e63b6c73", + "id": 9, + "name": "California", + "abbreviation": "CA" + }, + { + "_id": "56f861a8a38a3d28e63b6c75", + "id": 11, + "name": "Colorado", + "abbreviation": "CO" + }, + { + "_id": "56f861a8a38a3d28e63b6c77", + "id": 13, + "name": "Connecticut", + "abbreviation": "CT" + }, + { + "_id": "56f861a8a38a3d28e63b6c79", + "id": 15, + "name": "Delaware", + "abbreviation": "DE" + }, + { + "_id": "56f861a8a38a3d28e63b6c7b", + "id": 17, + "name": "Florida", + "abbreviation": "FL" + }, + { + "_id": "56f861a8a38a3d28e63b6c7d", + "id": 19, + "name": "Georgia", + "abbreviation": "GA" + }, + { + "_id": "56f861a8a38a3d28e63b6c7f", + "id": 21, + "name": "Hawaii", + "abbreviation": "HI" + }, + { + "_id": "56f861a8a38a3d28e63b6c81", + "id": 23, + "name": "Idaho", + "abbreviation": "ID" + }, + { + "_id": "56f861a8a38a3d28e63b6c83", + "id": 25, + "name": "Illinois", + "abbreviation": "IL" + }, + { + "_id": "56f861a8a38a3d28e63b6c85", + "id": 27, + "name": "Indiana", + "abbreviation": "IN" + }, + { + "_id": "56f861a8a38a3d28e63b6c87", + "id": 29, + "name": "Iowa", + "abbreviation": "IA" + }, + { + "_id": "56f861a8a38a3d28e63b6c89", + "id": 31, + "name": "Kansas", + "abbreviation": "KS" + }, + { + "_id": "56f861a8a38a3d28e63b6c8b", + "id": 33, + "name": "Kentucky", + "abbreviation": "KY" + }, + { + "_id": "56f861a8a38a3d28e63b6c8d", + "id": 35, + "name": "Louisiana", + "abbreviation": "LA" + }, + { + "_id": "56f861a8a38a3d28e63b6c8f", + "id": 37, + "name": "Maine", + "abbreviation": "ME" + }, + { + "_id": "56f861a8a38a3d28e63b6c91", + "id": 39, + "name": "Maryland", + "abbreviation": "MD" + }, + { + "_id": "56f861a8a38a3d28e63b6c93", + "id": 41, + "name": "Massachusetts", + "abbreviation": "MA" + }, + { + "_id": "56f861a8a38a3d28e63b6c95", + "id": 43, + "name": "Michigan", + "abbreviation": "MI" + }, + { + "_id": "56f861a8a38a3d28e63b6c97", + "id": 45, + "name": "Minnesota", + "abbreviation": "MN" + }, + { + "_id": "56f861a8a38a3d28e63b6c99", + "id": 47, + "name": "Mississippi", + "abbreviation": "MS" + }, + { + "_id": "56f861a8a38a3d28e63b6c9b", + "id": 49, + "name": "Missouri", + "abbreviation": "MO" + }, + { + "_id": "56f861a8a38a3d28e63b6c6c", + "id": 2, + "name": "Montana", + "abbreviation": "MT" + }, + { + "_id": "56f861a8a38a3d28e63b6c6e", + "id": 4, + "name": "Nebraska", + "abbreviation": "NE" + }, + { + "_id": "56f861a8a38a3d28e63b6c70", + "id": 6, + "name": "Nevada", + "abbreviation": "NV" + }, + { + "_id": "56f861a8a38a3d28e63b6c72", + "id": 8, + "name": "New Hampshire", + "abbreviation": "NH" + }, + { + "_id": "56f861a8a38a3d28e63b6c74", + "id": 10, + "name": "New Jersey", + "abbreviation": "NJ" + }, + { + "_id": "56f861a8a38a3d28e63b6c76", + "id": 12, + "name": "New Mexico", + "abbreviation": "NM" + }, + { + "_id": "56f861a8a38a3d28e63b6c78", + "id": 14, + "name": "New York", + "abbreviation": "NY" + }, + { + "_id": "56f861a8a38a3d28e63b6c7a", + "id": 16, + "name": "North Carolina", + "abbreviation": "NC" + }, + { + "_id": "56f861a8a38a3d28e63b6c7c", + "id": 18, + "name": "North Dakota", + "abbreviation": "ND" + }, + { + "_id": "56f861a8a38a3d28e63b6c7e", + "id": 20, + "name": "Ohio", + "abbreviation": "OH" + }, + { + "_id": "56f861a8a38a3d28e63b6c80", + "id": 22, + "name": "Oklahoma", + "abbreviation": "OK" + }, + { + "_id": "56f861a8a38a3d28e63b6c82", + "id": 24, + "name": "Oregon", + "abbreviation": "OR" + }, + { + "_id": "56f861a8a38a3d28e63b6c84", + "id": 26, + "name": "Pennsylvania", + "abbreviation": "PA" + }, + { + "_id": "56f861a8a38a3d28e63b6c86", + "id": 28, + "name": "Rhode Island", + "abbreviation": "RI" + }, + { + "_id": "56f861a8a38a3d28e63b6c88", + "id": 30, + "name": "South Carolina", + "abbreviation": "SC" + }, + { + "_id": "56f861a8a38a3d28e63b6c8a", + "id": 32, + "name": "South Dakota", + "abbreviation": "SD" + }, + { + "_id": "56f861a8a38a3d28e63b6c8c", + "id": 34, + "name": "Tennessee", + "abbreviation": "TN" + }, + { + "_id": "56f861a8a38a3d28e63b6c8e", + "id": 36, + "name": "Texas", + "abbreviation": "TX" + }, + { + "_id": "56f861a8a38a3d28e63b6c90", + "id": 38, + "name": "Utah", + "abbreviation": "UT" + }, + { + "_id": "56f861a8a38a3d28e63b6c92", + "id": 40, + "name": "Vermont", + "abbreviation": "VT" + }, + { + "_id": "56f861a8a38a3d28e63b6c94", + "id": 42, + "name": "Virginia", + "abbreviation": "VA" + }, + { + "_id": "56f861a8a38a3d28e63b6c96", + "id": 44, + "name": "Washington", + "abbreviation": "WA" + }, + { + "_id": "56f861a8a38a3d28e63b6c98", + "id": 46, + "name": "West Virginia", + "abbreviation": "WV" + }, + { + "_id": "56f861a8a38a3d28e63b6c9a", + "id": 48, + "name": "Wisconsin", + "abbreviation": "WI" + }, + { + "_id": "56f861a8a38a3d28e63b6c9c", + "id": 50, + "name": "Wyoming", + "abbreviation": "WY" + } +] \ No newline at end of file diff --git a/deno/loadfile.ts b/deno/loadfile.ts new file mode 100644 index 0000000..bd192e4 --- /dev/null +++ b/deno/loadfile.ts @@ -0,0 +1,6 @@ +declare var Deno: any; + +export default function loadFile(file: string) { + const decoder = new TextDecoder('utf-8'); + return decoder.decode(Deno.readFileSync(file)); +} \ No newline at end of file diff --git a/deno/routes.ts b/deno/routes.ts new file mode 100644 index 0000000..1f49822 --- /dev/null +++ b/deno/routes.ts @@ -0,0 +1,110 @@ +import { Router } from 'https://deno.land/x/oak/mod.ts'; +import loadFile from './loadfile.ts'; + +const customers = JSON.parse(loadFile('../data/customers.json')), + states = JSON.parse(loadFile('../data/states.json')), + router = new Router(); + +router.get('/api/customers/page/:skip/:top', (ctx: any) => { + const topVal = +ctx.request.top, + skipVal = +ctx.params.skip, + skip = (isNaN(skipVal)) ? 0 : skipVal; + let top = (isNaN(topVal)) ? 10 : skip + (topVal); + + if (top > customers.length) { + top = skip + (customers.length - skip); + } + + console.log(`Skip: ${skip} Top: ${top}`); + + const pagedCustomers = customers.slice(skip, top); + ctx.response.headers.set('X-InlineCount', customers.length); + ctx.response.body = pagedCustomers; +}); + +router.get('/api/customers', (ctx: any) => { + ctx.response.body = customers; +}); + +router.get('/api/customers/:id', (ctx: any) => { + const customerId = +ctx.params.id; + let selectedCustomer = null; + for (const customer of customers) { + if (customer.id === customerId) { + // found customer to create one to send + selectedCustomer = {}; + selectedCustomer = customer; + break; + } + } + ctx.response.body = selectedCustomer; +}); + +router.post('/api/customers', async (ctx: any) => { + const postedCustomer = (await ctx.request.body()).value; + let maxId = Math.max.apply(Math,customers.map((cust: any) => cust.id)); + postedCustomer.id = ++maxId; + postedCustomer.gender = (postedCustomer.id % 2 === 0) ? 'female' : 'male'; + customers.push(postedCustomer); + ctx.response.body = postedCustomer; +}); + +router.put('/api/customers/:id', async (ctx: any) => { + const putCustomer = (await ctx.request.body()).value; + console.log(putCustomer); + const id = +ctx.params.id; + let status = false; + + //Ensure state name is in sync with state abbreviation + const filteredStates = states.filter((state: any) => state.abbreviation === putCustomer.state.abbreviation); + if (filteredStates && filteredStates.length) { + putCustomer.state.name = filteredStates[0].name; + console.log('Updated putCustomer state to ' + putCustomer.state.name); + } + + for (let i=0,len=customers.length;i { + const customerId = +ctx.params.id; + for (let i=0,len=customers.length;i { + const customerId = +ctx.params.id; + for (const cust of customers) { + if (cust.customerId === customerId) { + return ctx.response.body = cust; + } + } + ctx.response.body = []; +}); + +router.get('/api/states', (ctx: any) => { + ctx.response.body = states; +}); + +router.post('/api/auth/login', async (ctx: any) => { + const userLogin = (await ctx.request.body()).value; + //Add "real" auth here. Simulating it by returning a simple boolean. + ctx.response.body = true; +}); + +router.post('/api/auth/logout', (ctx: any) => { + ctx.response.body = true; +}); + +export default router; \ No newline at end of file diff --git a/deno/server.ts b/deno/server.ts new file mode 100644 index 0000000..2876926 --- /dev/null +++ b/deno/server.ts @@ -0,0 +1,44 @@ +// NOTE: In a "real" app you'll want to add versions to the modules +import { Application } from 'https://deno.land/x/oak/mod.ts'; +import { join } from 'https://deno.land/std/path/mod.ts'; +import { exists } from 'https://deno.land/std/fs/mod.ts'; +import { oakCors } from 'https://deno.land/x/cors/mod.ts'; +import router from './routes.ts'; + +const port = 8080, + distFolder = join(`${Deno.cwd()}`, '../dist'), + app = new Application(); + +// Logger +// app.use(async (ctx, next) => { +// const start = Date.now(); +// await next(); +// const ms = Date.now() - start; +// console.log(`${ctx.request.method} ${ctx.request.url} - ${ms}ms`); +// }); + +app.use(router.routes()); +app.use(router.allowedMethods()); +app.use(oakCors({ origin: 'http://localhost:4200' })); +app.use(async (ctx) => { + const pathExists = await exists(distFolder + ctx.request.url.pathname); + const options = { + root: distFolder, + path: pathExists ? ctx.request.url.pathname : 'index.html', // Handle fallback + index: 'index.html' + } + await ctx.send(options); +}); +app.use(async (ctx: any, next: any) => { + try { + await next(); + } catch (err) { + console.error(err) + } +}); + +app.addEventListener("listen", ({ hostname, port }) => { + console.log(`Listening on port: ${port}`); +}); + +await app.listen({ port }); \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..062ba1a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,54 @@ +# Run docker-compose build +# Run docker-compose up +# Visit http://localhost +# Live long and prosper + +version: '3.7' + +services: + + nginx: + container_name: nginx-angular-jumpstart + image: nginx-angular-jumpstart + build: + context: . + dockerfile: .docker/nginx.dockerfile + ports: + - "80:80" + - "443:443" + depends_on: + - node + networks: + - app-network + + node: + container_name: node-service-jumpstart + image: node-service-jumpstart + build: + context: . + dockerfile: .docker/node.dockerfile + environment: + - NODE_ENV=production + - CONTAINER=true + ports: + - "8080:8080" + networks: + - app-network + + # Can uncomment to get cAdvisor going on Mac/Linux. Not for Windows though. + # cadvisor: + # container_name: cadvisor + # image: google/cadvisor + # volumes: + # - /:/rootfs:ro + # - /var/run:/var/run:rw + # - /sys:/sys:ro + # - /var/lib/docker/:/var/lib/docker:ro + # ports: + # - "9000:8080" + # networks: + # - app-network + +networks: + app-network: + driver: bridge \ No newline at end of file diff --git a/documentation.json b/documentation.json new file mode 100644 index 0000000..b9506c0 --- /dev/null +++ b/documentation.json @@ -0,0 +1,10313 @@ +{ + "pipes": [ + { + "name": "CapitalizePipe", + "id": "pipe-CapitalizePipe-77e8181fc318d34f561ef330a4019ae0ab3b71e4a99ef679e6ab32345cda951a4961961152b8e29b2c9ee298b7d42701bfa9ad4ed2390d61fd7c94c213a02105", + "file": "src/app/shared/pipes/capitalize.pipe.ts", + "type": "pipe", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "properties": [], + "methods": [ + { + "name": "transform", + "args": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 6, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "ngname": "capitalize", + "sourceCode": "import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'capitalize' })\nexport class CapitalizePipe implements PipeTransform {\n\n transform(value: any) {\n return typeof value === 'string' && value.charAt(0).toUpperCase() + value.slice(1) || value;\n }\n}\n" + }, + { + "name": "TrimPipe", + "id": "pipe-TrimPipe-5fc7c1a6d56cfb76dd6605f77ee2298c9509decaaeab9e9527071a761fffee11d521591e3194a213f9db5f914997af77cce6963aec4bf87cd85f93cfc4665704", + "file": "src/app/shared/pipes/trim.pipe.ts", + "type": "pipe", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "properties": [], + "methods": [ + { + "name": "transform", + "args": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 5, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "ngname": "trim", + "sourceCode": "import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({name: 'trim'})\nexport class TrimPipe implements PipeTransform {\n transform(value: any) {\n if (!value) {\n return '';\n }\n return value.trim();\n }\n}\n" + } + ], + "interfaces": [ + { + "name": "IApiResponse", + "id": "interface-IApiResponse-e438bbdb4fe2453206cd2a7f524078cf417ceb4f9276a9de071236951320220a072680af072c90413d1f856b8351119b161fdfecd0de91190a8cf0f3d7dc999a", + "file": "src/app/shared/interfaces.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ModuleWithProviders } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nexport interface ICustomer {\n id: number;\n firstName: string;\n lastName: string;\n gender: string;\n address: string;\n city: string;\n state: IState;\n orders?: IOrder[];\n orderTotal?: number;\n latitude?: number;\n longitude?: number;\n}\n\nexport interface IMapDataPoint {\n longitude: number;\n latitutde: number;\n markerText?: string;\n}\n\nexport interface IState {\n abbreviation: string;\n name: string;\n}\n\nexport interface IOrder {\n productName: string;\n itemCost: number;\n}\n\nexport interface IOrderItem {\n id: number;\n productName: string;\n itemCost: number;\n}\n\nexport interface IPagedResults {\n totalRecords: number;\n results: T;\n}\n\nexport interface IUserLogin {\n email: string;\n password: string;\n}\n\nexport interface IApiResponse {\n status: boolean;\n error?: string;\n}\n", + "properties": [ + { + "name": "error", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 52 + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 51 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ICustomer", + "id": "interface-ICustomer-e438bbdb4fe2453206cd2a7f524078cf417ceb4f9276a9de071236951320220a072680af072c90413d1f856b8351119b161fdfecd0de91190a8cf0f3d7dc999a", + "file": "src/app/shared/interfaces.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ModuleWithProviders } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nexport interface ICustomer {\n id: number;\n firstName: string;\n lastName: string;\n gender: string;\n address: string;\n city: string;\n state: IState;\n orders?: IOrder[];\n orderTotal?: number;\n latitude?: number;\n longitude?: number;\n}\n\nexport interface IMapDataPoint {\n longitude: number;\n latitutde: number;\n markerText?: string;\n}\n\nexport interface IState {\n abbreviation: string;\n name: string;\n}\n\nexport interface IOrder {\n productName: string;\n itemCost: number;\n}\n\nexport interface IOrderItem {\n id: number;\n productName: string;\n itemCost: number;\n}\n\nexport interface IPagedResults {\n totalRecords: number;\n results: T;\n}\n\nexport interface IUserLogin {\n email: string;\n password: string;\n}\n\nexport interface IApiResponse {\n status: boolean;\n error?: string;\n}\n", + "properties": [ + { + "name": "address", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "city", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "firstName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "gender", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "lastName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "latitude", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 14 + }, + { + "name": "longitude", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 15 + }, + { + "name": "orders", + "deprecated": false, + "deprecationMessage": "", + "type": "IOrder[]", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "orderTotal", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "type": "IState", + "optional": false, + "description": "", + "line": 11 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IMapDataPoint", + "id": "interface-IMapDataPoint-e438bbdb4fe2453206cd2a7f524078cf417ceb4f9276a9de071236951320220a072680af072c90413d1f856b8351119b161fdfecd0de91190a8cf0f3d7dc999a", + "file": "src/app/shared/interfaces.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ModuleWithProviders } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nexport interface ICustomer {\n id: number;\n firstName: string;\n lastName: string;\n gender: string;\n address: string;\n city: string;\n state: IState;\n orders?: IOrder[];\n orderTotal?: number;\n latitude?: number;\n longitude?: number;\n}\n\nexport interface IMapDataPoint {\n longitude: number;\n latitutde: number;\n markerText?: string;\n}\n\nexport interface IState {\n abbreviation: string;\n name: string;\n}\n\nexport interface IOrder {\n productName: string;\n itemCost: number;\n}\n\nexport interface IOrderItem {\n id: number;\n productName: string;\n itemCost: number;\n}\n\nexport interface IPagedResults {\n totalRecords: number;\n results: T;\n}\n\nexport interface IUserLogin {\n email: string;\n password: string;\n}\n\nexport interface IApiResponse {\n status: boolean;\n error?: string;\n}\n", + "properties": [ + { + "name": "latitutde", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "longitude", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "markerText", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 21 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IModalContent", + "id": "interface-IModalContent-936b74fdaaf3d605f1d258329b92f68d126a1e02f6b3fddb1148a1c28b7b815022a18f91068ffeee08bb99fb6340eb1439706e92f8f971c1583717b110b3379a", + "file": "src/app/core/modal/modal.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { ModalComponent } from './modal.component';\n\nexport interface IModalContent {\n header?: string;\n body?: string;\n cancelButtonText?: string;\n OKButtonText?: string;\n cancelButtonVisible?: boolean;\n}\n\n@Injectable()\nexport class ModalService {\n\n constructor() { }\n\n show: (modalContent: IModalContent) => Promise = () => { return {} as Promise; };\n hide: () => void = () => {};\n\n}\n", + "properties": [ + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "cancelButtonText", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "cancelButtonVisible", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "header", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "OKButtonText", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IOrder", + "id": "interface-IOrder-e438bbdb4fe2453206cd2a7f524078cf417ceb4f9276a9de071236951320220a072680af072c90413d1f856b8351119b161fdfecd0de91190a8cf0f3d7dc999a", + "file": "src/app/shared/interfaces.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ModuleWithProviders } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nexport interface ICustomer {\n id: number;\n firstName: string;\n lastName: string;\n gender: string;\n address: string;\n city: string;\n state: IState;\n orders?: IOrder[];\n orderTotal?: number;\n latitude?: number;\n longitude?: number;\n}\n\nexport interface IMapDataPoint {\n longitude: number;\n latitutde: number;\n markerText?: string;\n}\n\nexport interface IState {\n abbreviation: string;\n name: string;\n}\n\nexport interface IOrder {\n productName: string;\n itemCost: number;\n}\n\nexport interface IOrderItem {\n id: number;\n productName: string;\n itemCost: number;\n}\n\nexport interface IPagedResults {\n totalRecords: number;\n results: T;\n}\n\nexport interface IUserLogin {\n email: string;\n password: string;\n}\n\nexport interface IApiResponse {\n status: boolean;\n error?: string;\n}\n", + "properties": [ + { + "name": "itemCost", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "productName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 30 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IOrderItem", + "id": "interface-IOrderItem-e438bbdb4fe2453206cd2a7f524078cf417ceb4f9276a9de071236951320220a072680af072c90413d1f856b8351119b161fdfecd0de91190a8cf0f3d7dc999a", + "file": "src/app/shared/interfaces.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ModuleWithProviders } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nexport interface ICustomer {\n id: number;\n firstName: string;\n lastName: string;\n gender: string;\n address: string;\n city: string;\n state: IState;\n orders?: IOrder[];\n orderTotal?: number;\n latitude?: number;\n longitude?: number;\n}\n\nexport interface IMapDataPoint {\n longitude: number;\n latitutde: number;\n markerText?: string;\n}\n\nexport interface IState {\n abbreviation: string;\n name: string;\n}\n\nexport interface IOrder {\n productName: string;\n itemCost: number;\n}\n\nexport interface IOrderItem {\n id: number;\n productName: string;\n itemCost: number;\n}\n\nexport interface IPagedResults {\n totalRecords: number;\n results: T;\n}\n\nexport interface IUserLogin {\n email: string;\n password: string;\n}\n\nexport interface IApiResponse {\n status: boolean;\n error?: string;\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "itemCost", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "productName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 36 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IPagedResults", + "id": "interface-IPagedResults-e438bbdb4fe2453206cd2a7f524078cf417ceb4f9276a9de071236951320220a072680af072c90413d1f856b8351119b161fdfecd0de91190a8cf0f3d7dc999a", + "file": "src/app/shared/interfaces.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ModuleWithProviders } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nexport interface ICustomer {\n id: number;\n firstName: string;\n lastName: string;\n gender: string;\n address: string;\n city: string;\n state: IState;\n orders?: IOrder[];\n orderTotal?: number;\n latitude?: number;\n longitude?: number;\n}\n\nexport interface IMapDataPoint {\n longitude: number;\n latitutde: number;\n markerText?: string;\n}\n\nexport interface IState {\n abbreviation: string;\n name: string;\n}\n\nexport interface IOrder {\n productName: string;\n itemCost: number;\n}\n\nexport interface IOrderItem {\n id: number;\n productName: string;\n itemCost: number;\n}\n\nexport interface IPagedResults {\n totalRecords: number;\n results: T;\n}\n\nexport interface IUserLogin {\n email: string;\n password: string;\n}\n\nexport interface IApiResponse {\n status: boolean;\n error?: string;\n}\n", + "properties": [ + { + "name": "results", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "totalRecords", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 41 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IState", + "id": "interface-IState-e438bbdb4fe2453206cd2a7f524078cf417ceb4f9276a9de071236951320220a072680af072c90413d1f856b8351119b161fdfecd0de91190a8cf0f3d7dc999a", + "file": "src/app/shared/interfaces.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ModuleWithProviders } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nexport interface ICustomer {\n id: number;\n firstName: string;\n lastName: string;\n gender: string;\n address: string;\n city: string;\n state: IState;\n orders?: IOrder[];\n orderTotal?: number;\n latitude?: number;\n longitude?: number;\n}\n\nexport interface IMapDataPoint {\n longitude: number;\n latitutde: number;\n markerText?: string;\n}\n\nexport interface IState {\n abbreviation: string;\n name: string;\n}\n\nexport interface IOrder {\n productName: string;\n itemCost: number;\n}\n\nexport interface IOrderItem {\n id: number;\n productName: string;\n itemCost: number;\n}\n\nexport interface IPagedResults {\n totalRecords: number;\n results: T;\n}\n\nexport interface IUserLogin {\n email: string;\n password: string;\n}\n\nexport interface IApiResponse {\n status: boolean;\n error?: string;\n}\n", + "properties": [ + { + "name": "abbreviation", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IUserLogin", + "id": "interface-IUserLogin-e438bbdb4fe2453206cd2a7f524078cf417ceb4f9276a9de071236951320220a072680af072c90413d1f856b8351119b161fdfecd0de91190a8cf0f3d7dc999a", + "file": "src/app/shared/interfaces.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ModuleWithProviders } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nexport interface ICustomer {\n id: number;\n firstName: string;\n lastName: string;\n gender: string;\n address: string;\n city: string;\n state: IState;\n orders?: IOrder[];\n orderTotal?: number;\n latitude?: number;\n longitude?: number;\n}\n\nexport interface IMapDataPoint {\n longitude: number;\n latitutde: number;\n markerText?: string;\n}\n\nexport interface IState {\n abbreviation: string;\n name: string;\n}\n\nexport interface IOrder {\n productName: string;\n itemCost: number;\n}\n\nexport interface IOrderItem {\n id: number;\n productName: string;\n itemCost: number;\n}\n\nexport interface IPagedResults {\n totalRecords: number;\n results: T;\n}\n\nexport interface IUserLogin {\n email: string;\n password: string;\n}\n\nexport interface IApiResponse {\n status: boolean;\n error?: string;\n}\n", + "properties": [ + { + "name": "email", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "password", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 47 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "User", + "id": "interface-User-9c7e5f1bbbab702cb032307d130876cb68969b0cd4eedef32a0c8cad8081a54e5f8f577ed6ad4539c1b99a1d246cb34031d198c2ea8eba440e64e91b14f01fdc", + "file": "src/stories/User.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface User {}\n", + "properties": [], + "indexSignatures": [], + "methods": [] + } + ], + "injectables": [ + { + "name": "AuthService", + "id": "injectable-AuthService-200163aa207b432798031585907e81b04c821ed7fe174c22831be450a3c8abe7aaf0873ad8e70b6220ad0f319584d5c81e4f08d27b8c761a55185d25ff159c62", + "file": "src/app/core/services/auth.service.ts", + "properties": [ + { + "name": "authUrl", + "defaultValue": "this.baseUrl + '/api/auth'", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "baseUrl", + "defaultValue": "this.utilitiesService.getApiUrl()", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "isAuthenticated", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "redirectUrl", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + } + ], + "methods": [ + { + "name": "handleError", + "args": [ + { + "name": "error", + "type": "HttpErrorResponse", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 48, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "error", + "type": "HttpErrorResponse", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "login", + "args": [ + { + "name": "userLogin", + "type": "IUserLogin", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 24, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "userLogin", + "type": "IUserLogin", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "logout", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "userAuthChanged", + "args": [ + { + "name": "status", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 20, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "status", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable, Output, EventEmitter, Inject, Directive } from '@angular/core';\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\n\nimport { Observable, throwError } from 'rxjs';\nimport { map, catchError } from 'rxjs/operators';\n\nimport { IUserLogin } from '../../shared/interfaces';\nimport { UtilitiesService } from './utilities.service';\n\n@Injectable()\nexport class AuthService {\n baseUrl = this.utilitiesService.getApiUrl();\n authUrl = this.baseUrl + '/api/auth';\n isAuthenticated = false;\n redirectUrl: string = '';\n @Output() authChanged: EventEmitter = new EventEmitter();\n\n constructor(private http: HttpClient, private utilitiesService: UtilitiesService) { }\n\n private userAuthChanged(status: boolean) {\n this.authChanged.emit(status); // Raise changed event\n }\n\n login(userLogin: IUserLogin): Observable {\n return this.http.post(this.authUrl + '/login', userLogin)\n .pipe(\n map(loggedIn => {\n this.isAuthenticated = loggedIn;\n this.userAuthChanged(loggedIn);\n return loggedIn;\n }),\n catchError(this.handleError)\n );\n }\n\n logout(): Observable {\n return this.http.post(this.authUrl + '/logout', null)\n .pipe(\n map(loggedOut => {\n this.isAuthenticated = !loggedOut;\n this.userAuthChanged(!loggedOut); // Return loggedIn status\n return loggedOut;\n }),\n catchError(this.handleError)\n );\n }\n\n private handleError(error: HttpErrorResponse) {\n console.error('server error:', error);\n if (error.error instanceof Error) {\n const errMessage = error.error.message;\n return throwError(() => errMessage);\n // return Observable.throw(err.text() || 'backend server error');\n }\n return throwError(() => error || 'Server error');\n }\n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "utilitiesService", + "type": "UtilitiesService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 16, + "jsdoctags": [ + { + "name": "http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "utilitiesService", + "type": "UtilitiesService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DataService", + "id": "injectable-DataService-f4792b4c79a487ce89768fb18a1fa76c969a48c586a86d2245bba51ce079452cdb898a91a9b3e79faa0bc459aaf941acf258e5385c775e380c3b52fc26ad1798", + "file": "src/app/core/services/data.service.ts", + "properties": [ + { + "name": "baseUrl", + "defaultValue": "this.utilitiesService.getApiUrl()", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "customersBaseUrl", + "defaultValue": "this.baseUrl + '/api/customers'", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "orders", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "IOrder[]", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "ordersBaseUrl", + "defaultValue": "this.baseUrl + '/api/orders'", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "states", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "IState[]", + "optional": false, + "description": "", + "line": 16 + } + ], + "methods": [ + { + "name": "calculateCustomersOrderTotal", + "args": [ + { + "name": "customers", + "type": "ICustomer[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 98, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "customers", + "type": "ICustomer[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "deleteCustomer", + "args": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getCustomer", + "args": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 50, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getCustomers", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 39, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getCustomersPage", + "args": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "pageSize", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": [], + "line": 20, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "pageSize", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getStates", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 82, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "handleError", + "args": [ + { + "name": "error", + "type": "HttpErrorResponse", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 87, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "error", + "type": "HttpErrorResponse", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "insertCustomer", + "args": [ + { + "name": "customer", + "type": "ICustomer", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 61, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "customer", + "type": "ICustomer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateCustomer", + "args": [ + { + "name": "customer", + "type": "ICustomer", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 66, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "customer", + "type": "ICustomer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\n\nimport { Observable, throwError } from 'rxjs';\nimport { map, catchError } from 'rxjs/operators';\n\nimport { ICustomer, IOrder, IState, IPagedResults, IApiResponse } from '../../shared/interfaces';\nimport { UtilitiesService } from './utilities.service';\n\n@Injectable()\nexport class DataService {\n baseUrl = this.utilitiesService.getApiUrl();\n customersBaseUrl = this.baseUrl + '/api/customers';\n ordersBaseUrl = this.baseUrl + '/api/orders';\n orders: IOrder[] = [];\n states: IState[] = [];\n\n constructor(private http: HttpClient, private utilitiesService: UtilitiesService) { }\n\n getCustomersPage(page: number, pageSize: number): Observable> {\n return this.http.get(\n `${this.customersBaseUrl}/page/${page}/${pageSize}`,\n { observe: 'response' })\n .pipe(\n map(res => {\n const xInlineCount = res.headers.get('X-InlineCount');\n const totalRecords = Number(xInlineCount);\n const customers = res.body as ICustomer[];\n this.calculateCustomersOrderTotal(customers);\n return {\n results: customers,\n totalRecords: totalRecords\n };\n }),\n catchError(this.handleError)\n );\n }\n\n getCustomers(): Observable {\n return this.http.get(this.customersBaseUrl)\n .pipe(\n map(customers => {\n this.calculateCustomersOrderTotal(customers);\n return customers;\n }),\n catchError(this.handleError)\n );\n }\n\n getCustomer(id: number): Observable {\n return this.http.get(this.customersBaseUrl + '/' + id)\n .pipe(\n map(customer => {\n this.calculateCustomersOrderTotal([customer]);\n return customer;\n }),\n catchError(this.handleError)\n );\n }\n\n insertCustomer(customer: ICustomer): Observable {\n return this.http.post(this.customersBaseUrl, customer)\n .pipe(catchError(this.handleError));\n }\n\n updateCustomer(customer: ICustomer): Observable {\n return this.http.put(this.customersBaseUrl + '/' + customer.id, customer)\n .pipe(\n map(res => res.status),\n catchError(this.handleError)\n );\n }\n\n deleteCustomer(id: number): Observable {\n return this.http.delete(this.customersBaseUrl + '/' + id)\n .pipe(\n map(res => res.status),\n catchError(this.handleError)\n );\n }\n\n getStates(): Observable {\n return this.http.get(this.baseUrl + '/api/states')\n .pipe(catchError(this.handleError));\n }\n\n private handleError(error: HttpErrorResponse) {\n console.error('server error:', error);\n if (error.error instanceof Error) {\n const errMessage = error.error.message;\n return throwError(() => errMessage);\n // Use the following instead if using lite-server\n // return Observable.throw(err.text() || 'backend server error');\n }\n return throwError(() => error || 'Node.js server error');\n }\n\n calculateCustomersOrderTotal(customers: ICustomer[]) {\n for (const customer of customers) {\n if (customer && customer.orders) {\n let total = 0;\n for (const order of customer.orders) {\n total += order.itemCost;\n }\n customer.orderTotal = total;\n }\n }\n }\n\n // Not using now but leaving since they show how to create\n // and work with custom observables\n\n // Would need following import added:\n // import { Observer } from 'rxjs';\n\n // createObservable(data: any): Observable {\n // return Observable.create((observer: Observer) => {\n // observer.next(data);\n // observer.complete();\n // });\n // }\n \n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "utilitiesService", + "type": "UtilitiesService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 16, + "jsdoctags": [ + { + "name": "http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "utilitiesService", + "type": "UtilitiesService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DialogService", + "id": "injectable-DialogService-3bb4c252708dc41b02cfaec47711fcb523827ab5d7423b21779733508eb33ca1a8924ebdf36aae2b6516f2a54b58cd811ef9a4febf569fd4bcc1571165a7bc7c", + "file": "src/app/core/services/dialog.service.ts", + "properties": [ + { + "name": "message", + "defaultValue": "'Is it OK?'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "promise", + "defaultValue": "{} as Promise", + "deprecated": false, + "deprecationMessage": "", + "type": "Promise", + "optional": false, + "description": "", + "line": 6 + } + ], + "methods": [ + { + "name": "confirm", + "args": [ + { + "name": "message", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 9, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "message", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "resolver", + "args": [ + { + "name": "resolve", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "resolve", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class DialogService {\n\n promise: Promise = {} as Promise;\n message = 'Is it OK?';\n\n confirm(message?: string) {\n if (message) { this.message = message; }\n this.promise = new Promise(this.resolver);\n return this.promise;\n }\n\n resolver(resolve: any) {\n return resolve(window.confirm('Is it OK?'));\n }\n\n}\n", + "type": "injectable" + }, + { + "name": "EventBusService", + "id": "injectable-EventBusService-9c7b561e0e2116da23c54c08ee76ea2c8318ad31d705df23f0d544faac45864c183a333dd3e073a25793c3899e205b19d0e7c6cb456c722cae75194fa517cd69", + "file": "src/app/core/services/event-bus.service.ts", + "properties": [ + { + "name": "subject", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 8 + } + ], + "methods": [ + { + "name": "emit", + "args": [ + { + "name": "event", + "type": "EmitEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 25, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "EmitEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "on", + "args": [ + { + "name": "event", + "type": "Events", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "action", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Subscription", + "typeParameters": [], + "line": 12, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "Events", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "action", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Subject, Subscription, Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\n@Injectable()\nexport class EventBusService {\n\n subject = new Subject();\n\n constructor() { }\n\n on(event: Events, action: any): Subscription {\n return this.subject\n .pipe(\n filter((e: EmitEvent) => {\n return e.name === event;\n }),\n map((e: EmitEvent) => {\n return e.value;\n })\n )\n .subscribe(action);\n }\n\n emit(event: EmitEvent) {\n this.subject.next(event);\n }\n}\n\nexport class EmitEvent {\n\n constructor(public name: any, public value?: any) { }\n\n}\n\nexport enum Events {\n httpRequest,\n httpResponse\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 8 + }, + "type": "injectable" + }, + { + "name": "FilterService", + "id": "injectable-FilterService-7b23a479dd7cadb7a1663c8314ef5f87326dd5b35b767ea25cc0cc18fce88d685ba95dccda26617b23a8cde4a89c8c529f6ba3463de3564f3160398352b284ab", + "file": "src/app/core/services/filter.service.ts", + "properties": [], + "methods": [ + { + "name": "filter", + "args": [ + { + "name": "items", + "type": "T[]", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "data", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "props", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [ + "T" + ], + "line": 10, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "items", + "type": "T[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "data", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "props", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\n\nimport { PropertyResolver } from '../../core/services/property-resolver';\n\n@Injectable()\nexport class FilterService {\n\n constructor() { }\n\n filter(items: T[], data: string, props: string[]) {\n return items.filter((item: T) => {\n let match = false;\n for (const prop of props) {\n if (prop.indexOf('.') > -1) {\n const value = PropertyResolver.resolve(prop, item);\n if (value && value.toUpperCase().indexOf(data) > -1) {\n match = true;\n break;\n }\n continue;\n }\n\n if ((item as any)[prop].toString().toUpperCase().indexOf(data) > -1) {\n match = true;\n break;\n }\n }\n return match;\n });\n }\n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 6 + }, + "type": "injectable" + }, + { + "name": "GrowlerService", + "id": "injectable-GrowlerService-8b77dd919c477d27b1a41238443f396d97ed8bd8dc01e016985defc48b62217bb7654b0be5e7394379fae0f8148eebaec8c6b1e04ad1405fe26cf5158cf8308c", + "file": "src/app/core/growler/growler.service.ts", + "properties": [ + { + "name": "growl", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 8 + } + ], + "methods": [], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class GrowlerService {\n\n constructor() { }\n\n growl: (message: string, growlType: GrowlerMessageType) => number = () => 0;\n\n}\n\nexport enum GrowlerMessageType {\n Success,\n Danger,\n Warning,\n Info\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 4 + }, + "type": "injectable" + }, + { + "name": "LoggerService", + "id": "injectable-LoggerService-cdf70ace6f1d77e5fb658aa8dc4527e0fbc6e0b1e3741bef8749322614cbbffc248156ba0e8e927e9fe4fde8a0f70d4ed5777fd5cda3c15cae69cd37395f19f2", + "file": "src/app/core/services/logger.service.ts", + "properties": [], + "methods": [ + { + "name": "log", + "args": [ + { + "name": "msg", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 11, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "msg", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "logError", + "args": [ + { + "name": "msg", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "msg", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { environment } from '../../../environments/environment';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoggerService {\n\n constructor() { }\n\n log(msg: string) {\n if (!environment.production) {\n console.log(msg);\n }\n else {\n // AppInsights\n }\n\n }\n\n logError(msg: string) {\n if (!environment.production) {\n console.error(msg);\n }\n else {\n // AppInsights\n }\n\n }\n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 7 + }, + "type": "injectable" + }, + { + "name": "ModalService", + "id": "injectable-ModalService-936b74fdaaf3d605f1d258329b92f68d126a1e02f6b3fddb1148a1c28b7b815022a18f91068ffeee08bb99fb6340eb1439706e92f8f971c1583717b110b3379a", + "file": "src/app/core/modal/modal.service.ts", + "properties": [ + { + "name": "hide", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "show", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 17 + } + ], + "methods": [], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { ModalComponent } from './modal.component';\n\nexport interface IModalContent {\n header?: string;\n body?: string;\n cancelButtonText?: string;\n OKButtonText?: string;\n cancelButtonVisible?: boolean;\n}\n\n@Injectable()\nexport class ModalService {\n\n constructor() { }\n\n show: (modalContent: IModalContent) => Promise = () => { return {} as Promise; };\n hide: () => void = () => {};\n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 13 + }, + "type": "injectable" + }, + { + "name": "PreloadModulesStrategy", + "id": "injectable-PreloadModulesStrategy-5ab30a5e7b043ea092547924ea202594da951f5fb76ee12067041ff8d3067407d291d4c0983b7842cda33612b4f298a4ebc1a2563cccb8a207f07612668f9a86", + "file": "src/app/core/strategies/preload-modules.strategy.ts", + "properties": [], + "methods": [ + { + "name": "preload", + "args": [ + { + "name": "route", + "type": "Route", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "load", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "function": [] + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 13, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "route", + "type": "Route", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "load", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "function": [], + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { PreloadingStrategy, Route } from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport { LoggerService } from '../services/logger.service';\n\n@Injectable()\nexport class PreloadModulesStrategy implements PreloadingStrategy {\n\n constructor(private logger: LoggerService) {}\n\n preload(route: Route, load: () => Observable): Observable {\n if (route.data && route.data['preload']) {\n this.logger.log('Preloaded: ' + route.path);\n return load();\n } else {\n return of(null);\n }\n }\n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 9, + "jsdoctags": [ + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "SorterService", + "id": "injectable-SorterService-09eb6582e6eb9e1bf2d35828da80bcb3fb3545154c9333cf91edff880db0e3a176339ed09bd9c6635d5826faa76146590ffc7ee2e40d2cf149220c2ca2ab2a41", + "file": "src/app/core/services/sorter.service.ts", + "properties": [ + { + "name": "direction", + "defaultValue": "1", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "property", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + } + ], + "methods": [ + { + "name": "isString", + "args": [ + { + "name": "val", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 51, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "val", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "sort", + "args": [ + { + "name": "collection", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "prop", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reverseSort", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 13, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "collection", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "prop", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "reverseSort", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\n\nimport { PropertyResolver } from './property-resolver';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SorterService {\n\n property: string = '';\n direction = 1;\n\n sort(collection: any[], prop: any, reverseSort = true) {\n this.property = prop;\n if (reverseSort) {\n this.direction = (this.property === prop) ? this.direction * -1 : 1;\n }\n\n return collection.sort((a: any, b: any) => {\n let aVal: any;\n let bVal: any;\n\n // Handle resolving complex properties such as 'state.name' for prop value\n if (prop && prop.indexOf('.') > -1) {\n aVal = PropertyResolver.resolve(prop, a);\n bVal = PropertyResolver.resolve(prop, b);\n } else {\n aVal = a[prop];\n bVal = b[prop];\n }\n\n // Fix issues that spaces before/after string value can cause such as ' San Francisco'\n if (this.isString(aVal)) {\n aVal = aVal.trim().toUpperCase();\n }\n\n if (this.isString(bVal)) {\n bVal = bVal.trim().toUpperCase();\n }\n\n if (aVal === bVal) {\n return 0;\n } else if (aVal > bVal) {\n return this.direction * -1;\n } else {\n return this.direction * 1;\n }\n });\n }\n\n isString(val: any): boolean {\n return (val && (typeof val === 'string' || val instanceof String));\n }\n\n}\n", + "type": "injectable" + }, + { + "name": "TrackByService", + "id": "injectable-TrackByService-65c4ec81be84e32eac1bf42f4c0836731cc1ccf8f0d35e1f0a0f1ce11207438bc215bf4a40b84ddd5c9399133192f5c00954390d668452af45c33c0e81087869", + "file": "src/app/core/services/trackby.service.ts", + "properties": [], + "methods": [ + { + "name": "customer", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "customer", + "type": "ICustomer", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 8, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "customer", + "type": "ICustomer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "order", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "order", + "type": "IOrder", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 12, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "order", + "type": "IOrder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\n\nimport { ICustomer, IOrder } from '../../shared/interfaces';\n\n@Injectable()\nexport class TrackByService {\n\n customer(index: number, customer: ICustomer) {\n return customer.id;\n }\n\n order(index: number, order: IOrder) {\n return index;\n }\n\n\n\n}\n", + "type": "injectable" + }, + { + "name": "UtilitiesService", + "id": "injectable-UtilitiesService-5caa42b8139da6d20ced77064bf394822e1c577980abae6e67c06c31a079913f317b292a6c9d117a432704c34fb2b8fc61db3d391b0574082fad2cd31cbe6583", + "file": "src/app/core/services/utilities.service.ts", + "properties": [], + "methods": [ + { + "name": "getApiUrl", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 7, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getPort", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 12, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable, Inject } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class UtilitiesService { \n constructor(@Inject('Window') private window: Window) { }\n\n getApiUrl() {\n const port = this.getPort();\n return `${this.window.location.protocol}//${this.window.location.hostname}${port}`;\n }\n\n private getPort() {\n const port = this.window.location.port;\n if (port) {\n // for running with Azure Functions local emulator\n if (port === '4200') {\n // Local run with 'npm run' also started in api folder for Azure Functions\n return ':7071'; // for debugging Azure Functions locally\n }\n // Running with local node (which serves Angular and the API)\n return ':' + this.window.location.port;\n }\n else {\n // for running locally with Docker/Kubernetes\n if (this.window.location.hostname === 'localhost') {\n return ':8080';\n }\n }\n return '';\n }\n}", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "window", + "type": "Window", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 4, + "jsdoctags": [ + { + "name": "window", + "type": "Window", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + } + ], + "guards": [ + { + "name": "CanActivateGuard", + "id": "injectable-CanActivateGuard-db4c2e7add04a47ff4e12fae8a9397f4ae013a194408a9e41992866234dd405ee682b7b2365df3954cc9381b3d8fef17afb7e3060fcb53bf72b0e729510b3b1e", + "file": "src/app/customer/guards/can-activate.guard.ts", + "properties": [], + "methods": [ + { + "name": "canActivate", + "args": [ + { + "name": "route", + "type": "ActivatedRouteSnapshot", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "state", + "type": "RouterStateSnapshot", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable | Promise | boolean", + "typeParameters": [], + "line": 12, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "route", + "type": "ActivatedRouteSnapshot", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "state", + "type": "RouterStateSnapshot", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\n\nimport { AuthService } from '../../core/services/auth.service';\n\n@Injectable()\nexport class CanActivateGuard implements CanActivate {\n\n constructor(private authService: AuthService, private router: Router) { }\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean {\n if (this.authService.isAuthenticated) {\n return true;\n }\n\n // Track URL user is trying to go to so we can send them there after logging in\n this.authService.redirectUrl = state.url;\n this.router.navigate(['/login']);\n return false;\n }\n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "authService", + "type": "AuthService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 8, + "jsdoctags": [ + { + "name": "authService", + "type": "AuthService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "guard" + }, + { + "name": "CanDeactivateGuard", + "id": "injectable-CanDeactivateGuard-8e5e57f3c2d001a364929edbc55ef2cbe56630b3f41ab38e7cbef5d780c7bb6e6c6b42e88fd013eaa6d43fdfe9e73f6ce619436bbe1a3375f1fc681476eaa4a6", + "file": "src/app/customer/guards/can-deactivate.guard.ts", + "properties": [], + "methods": [ + { + "name": "canDeactivate", + "args": [ + { + "name": "component", + "type": "CustomerEditComponent", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "route", + "type": "ActivatedRouteSnapshot", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "state", + "type": "RouterStateSnapshot", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable | Promise | boolean", + "typeParameters": [], + "line": 13, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "component", + "type": "CustomerEditComponent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "route", + "type": "ActivatedRouteSnapshot", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "state", + "type": "RouterStateSnapshot", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { CanDeactivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\n\nimport { CustomerEditComponent } from '../customer-edit/customer-edit.component';\nimport { LoggerService } from '../../core/services/logger.service';\n\n@Injectable()\nexport class CanDeactivateGuard implements CanDeactivate {\n\n constructor(private logger: LoggerService) {}\n\n canDeactivate(\n component: CustomerEditComponent,\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable | Promise | boolean {\n\n this.logger.log(`CustomerId: ${route.parent?.params['id']} URL: ${state.url}`);\n\n // Check with component to see if we're able to deactivate\n return component.canDeactivate();\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 9, + "jsdoctags": [ + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "guard" + } + ], + "interceptors": [ + { + "name": "AuthInterceptor", + "id": "injectable-AuthInterceptor-816bf346cb49f9595e5cc3b0fa4e965034e48f2e6d366d7076b8428723ecb863eb728f9ebb93d5e301b483e69e34eb5298d870cbc272e7374ebb733d48bfdc54", + "file": "src/app/core/interceptors/auth.interceptor.ts", + "properties": [], + "methods": [ + { + "name": "intercept", + "args": [ + { + "name": "req", + "type": "HttpRequest", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "next", + "type": "HttpHandler", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": [], + "line": 9, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "req", + "type": "HttpRequest", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "next", + "type": "HttpHandler", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import {Injectable} from '@angular/core';\nimport {HttpEvent, HttpInterceptor, HttpHandler, HttpRequest} from '@angular/common/http';\nimport { Observable } from 'rxjs';\n\n@Injectable()\nexport class AuthInterceptor implements HttpInterceptor {\n constructor() {}\n\n intercept(req: HttpRequest, next: HttpHandler): Observable> {\n // Get the auth header (fake value is shown here)\n const authHeader = '49a5kdkv409fd39'; // this.authService.getAuthHeader();\n const authReq = req.clone({headers: req.headers.set('Authorization', authHeader)});\n return next.handle(authReq);\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 6 + }, + "type": "interceptor" + }, + { + "name": "OverlayRequestResponseInterceptor", + "id": "injectable-OverlayRequestResponseInterceptor-e875f0b06414b986d6b8e65d05479c768daf35e2409d7ee41ab0a8e5e765ec16210c48a7a61f98eb7e7bdde84993b2d567163d8d8a4d3323439f1ed6935ad07b", + "file": "src/app/core/overlay/overlay-request-response.interceptor.ts", + "properties": [], + "methods": [ + { + "name": "getRandomIntInclusive", + "args": [ + { + "name": "min", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "max", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 35, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "min", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "max", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "intercept", + "args": [ + { + "name": "req", + "type": "HttpRequest", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "next", + "type": "HttpHandler", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": [], + "line": 14, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "req", + "type": "HttpRequest", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "next", + "type": "HttpHandler", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse } from '@angular/common/http';\n\nimport { Observable, of } from 'rxjs';\nimport { tap, delay, catchError } from 'rxjs/operators';\n\nimport { EventBusService, EmitEvent, Events } from '../services/event-bus.service';\n\n@Injectable()\nexport class OverlayRequestResponseInterceptor implements HttpInterceptor {\n\n constructor(private eventBus: EventBusService) { }\n\n intercept(req: HttpRequest, next: HttpHandler): Observable> {\n const randomTime = this.getRandomIntInclusive(0, 1500);\n const started = Date.now();\n this.eventBus.emit(new EmitEvent(Events.httpRequest));\n return next\n .handle(req)\n .pipe(\n // delay(randomTime), // Simulate random Http call delays\n tap(event => {\n if (event instanceof HttpResponse) {\n const elapsed = Date.now() - started;\n this.eventBus.emit(new EmitEvent(Events.httpResponse));\n }\n }),\n catchError(err => {\n this.eventBus.emit(new EmitEvent(Events.httpResponse));\n return of({}) as Observable>;\n })\n );\n }\n\n getRandomIntInclusive(min: number, max: number) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min; // The maximum is inclusive and the minimum is inclusive\n}\n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "eventBus", + "type": "EventBusService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 10, + "jsdoctags": [ + { + "name": "eventBus", + "type": "EventBusService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "interceptor" + } + ], + "classes": [ + { + "name": "EmitEvent", + "id": "class-EmitEvent-9c7b561e0e2116da23c54c08ee76ea2c8318ad31d705df23f0d544faac45864c183a333dd3e073a25793c3899e205b19d0e7c6cb456c722cae75194fa517cd69", + "file": "src/app/core/services/event-bus.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Subject, Subscription, Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\n@Injectable()\nexport class EventBusService {\n\n subject = new Subject();\n\n constructor() { }\n\n on(event: Events, action: any): Subscription {\n return this.subject\n .pipe(\n filter((e: EmitEvent) => {\n return e.name === event;\n }),\n map((e: EmitEvent) => {\n return e.value;\n })\n )\n .subscribe(action);\n }\n\n emit(event: EmitEvent) {\n this.subject.next(event);\n }\n}\n\nexport class EmitEvent {\n\n constructor(public name: any, public value?: any) { }\n\n}\n\nexport enum Events {\n httpRequest,\n httpResponse\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "name", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "line": 30, + "jsdoctags": [ + { + "name": "name", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [ + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 32, + "modifierKind": [ + 123 + ] + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 32, + "modifierKind": [ + 123 + ] + } + ], + "methods": [], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + }, + { + "name": "EnsureModuleLoadedOnceGuard", + "id": "class-EnsureModuleLoadedOnceGuard-f4698f9bf50521a2dfc6773ec258384ea3f7c6bdd0bd2994037297f4af0bbe1aee27aa2f1a17ef9c59d774fc242920518865b917fbad61a4cb58497ac69405db", + "file": "src/app/core/ensure-module-loaded-once.guard.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "export class EnsureModuleLoadedOnceGuard {\n\n constructor(targetModule: any) {\n if (targetModule) {\n throw new Error(`${targetModule.constructor.name} has already been loaded. Import this module in the AppModule only.`);\n }\n }\n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "targetModule", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 1, + "jsdoctags": [ + { + "name": "targetModule", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [], + "methods": [], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + }, + { + "name": "Growl", + "id": "class-Growl-48f5a0fd816c6b355b58a3a34a66ea921f513fd639d282db7fb88d7513dc1548e823b9c2e4f04c042cca5cb26db31e7370ff0acea53d913e199b86691eb97ed0", + "file": "src/app/core/growler/growler.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { GrowlerService, GrowlerMessageType } from './growler.service';\nimport { LoggerService } from '../services/logger.service';\n\n@Component({\n selector: 'cm-growler',\n template: `\n
\n
\n {{ growl.message }}\n
\n
\n `,\n styleUrls: ['growler.component.css']\n})\nexport class GrowlerComponent implements OnInit {\n\n private growlCount = 0;\n growls: Growl[] = [];\n\n @Input() position = 'bottom-right';\n @Input() timeout = 3000;\n\n constructor(private growlerService: GrowlerService,\n private logger: LoggerService) {\n growlerService.growl = this.growl.bind(this);\n }\n\n ngOnInit() { }\n\n /**\n * Displays a growl message.\n *\n * @param {string} message - The message to display.\n * @param {GrowlMessageType} growlType - The type of message to display (a GrowlMessageType enumeration)\n * @return {number} id - Returns the ID for the generated growl\n */\n growl(message: string, growlType: GrowlerMessageType): number {\n this.growlCount++;\n const bootstrapAlertType = GrowlerMessageType[growlType].toLowerCase();\n const messageType = `alert-${ bootstrapAlertType }`;\n\n const growl = new Growl(this.growlCount, message, messageType, this.timeout, this);\n this.growls.push(growl);\n return growl.id;\n }\n\n removeGrowl(id: number) {\n this.growls.forEach((growl: Growl, index: number) => {\n if (growl.id === id) {\n this.growls.splice(index, 1);\n this.growlCount--;\n this.logger.log('removed ' + id);\n }\n });\n }\n}\n\nclass Growl {\n\n enabled: boolean = false;\n timeoutId: number = 0;\n\n constructor(public id: number,\n public message: string,\n public messageType: string,\n private timeout: number,\n private growlerContainer: GrowlerComponent) {\n this.show();\n }\n\n show() {\n window.setTimeout(() => {\n this.enabled = true;\n this.setTimeout();\n }, 0);\n }\n\n setTimeout() {\n window.setTimeout(() => {\n this.hide();\n }, this.timeout);\n }\n\n hide() {\n this.enabled = false;\n window.setTimeout(() => {\n this.growlerContainer.removeGrowl(this.id);\n }, this.timeout);\n }\n\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "message", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "messageType", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "timeout", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "growlerContainer", + "type": "GrowlerComponent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 64, + "jsdoctags": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "message", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "messageType", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "timeout", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "growlerContainer", + "type": "GrowlerComponent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [ + { + "name": "enabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 63 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 66, + "modifierKind": [ + 123 + ] + }, + { + "name": "message", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 67, + "modifierKind": [ + 123 + ] + }, + { + "name": "messageType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 68, + "modifierKind": [ + 123 + ] + }, + { + "name": "timeoutId", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 64 + } + ], + "methods": [ + { + "name": "hide", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 87, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setTimeout", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 81, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "show", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "" + } + ], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + }, + { + "name": "MockActivatedRoute", + "id": "class-MockActivatedRoute-4f0b5d60873d2354e3ac09535f8b2197d50c458fd3fbf19add86a9919944cc70cfee07c88dddee386c29abc842bf20e99b3cd988ec171591ff3b76894defe8d7", + "file": "src/app/shared/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { Type } from '@angular/core';\nimport { ActivatedRouteSnapshot, ActivatedRoute, UrlSegment, Params, Data, Route, ParamMap } from '@angular/router';\n\nimport { Observable, of } from 'rxjs';\n\nimport { ICustomer, IPagedResults } from './interfaces';\n\nexport class MockDataService {\n constructor() {}\n\n getCustomer(id: number): Observable {\n if (id === 1) {\n return of(customers.slice(0, 1)[0]);\n } else {\n return of({} as ICustomer);\n }\n }\n\n getCustomersPage(page: number, pageSize: number): Observable> {\n const topVal = pageSize,\n skipVal = page,\n skip = (isNaN(skipVal)) ? 0 : +skipVal;\n let top = (isNaN(topVal)) ? 10 : skip + (+topVal);\n\n if (top > customers.length) {\n top = skip + (customers.length - skip);\n }\n\n return of({\n totalRecords: customers.length,\n results: customers.slice(skip, top)\n });\n }\n\n getCustomers(): Observable {\n return of(customers);\n }\n}\n\nexport class MockActivatedRoute implements ActivatedRoute {\n snapshot: ActivatedRouteSnapshot = {} as ActivatedRouteSnapshot;\n url: Observable = {} as Observable;\n params: Observable = {} as Observable;\n queryParams: Observable = {} as Observable;\n fragment: Observable = {} as Observable;\n data: Observable = {} as Observable;\n outlet: string = '';\n component: Type | null = null;\n routeConfig: Route = {} as Route;\n root: ActivatedRoute = {} as ActivatedRoute;\n parent: ActivatedRoute = {} as ActivatedRoute;\n firstChild: ActivatedRoute = {} as ActivatedRoute;\n children: ActivatedRoute[] = [];\n pathFromRoot: ActivatedRoute[] = [];\n paramMap: Observable = {} as Observable;\n queryParamMap: Observable = {} as Observable;\n toString(): string {\n return '';\n }\n}\n\nexport function getActivatedRouteWithParent(params: any[]) {\n const route = new MockActivatedRoute();\n route.parent = new MockActivatedRoute() as ActivatedRoute;\n if (params) {\n for (const param of params) {\n // var keyNames = Object.keys(param);\n route.parent.params = of(param);\n }\n }\n\n return route;\n}\n\nexport const customers = [\n {\n 'id': 1,\n 'firstName': 'ted',\n 'lastName': 'james',\n 'gender': 'male',\n 'address': '1234 Anywhere St.',\n 'city': ' Phoenix ',\n 'state': {\n 'abbreviation': 'AZ',\n 'name': 'Arizona'\n },\n 'orders': [\n { 'productName': 'Basketball', 'itemCost': 7.99 },\n { 'productName': 'Shoes', 'itemCost': 199.99 }\n ],\n 'latitude': 33.299,\n 'longitude': -111.963\n },\n {\n 'id': 2,\n 'firstName': 'Michelle',\n 'lastName': 'Thompson',\n 'gender': 'female',\n 'address': '345 Cedar Point Ave.',\n 'city': 'Encinitas ',\n 'state': {\n 'abbreviation': 'CA',\n 'name': 'California'\n },\n 'orders': [\n { 'productName': 'Frisbee', 'itemCost': 2.99 },\n { 'productName': 'Hat', 'itemCost': 5.99 }\n ],\n 'latitude': 33.037,\n 'longitude': -117.291\n },\n {\n 'id': 3,\n 'firstName': 'Zed',\n 'lastName': 'Bishop',\n 'gender': 'male',\n 'address': '1822 Long Bay Dr.',\n 'city': ' Seattle ',\n 'state': {\n 'abbreviation': 'WA',\n 'name': 'Washington'\n },\n 'orders': [\n { 'productName': 'Boomerang', 'itemCost': 29.99 },\n { 'productName': 'Helmet', 'itemCost': 19.99 },\n { 'productName': 'Kangaroo Saddle', 'itemCost': 179.99 }\n ],\n 'latitude': 47.596,\n 'longitude': -122.331\n },\n {\n 'id': 4,\n 'firstName': 'Tina',\n 'lastName': 'Adams',\n 'gender': 'female',\n 'address': '79455 Pinetop Way',\n 'city': 'Chandler',\n 'state': {\n 'abbreviation': 'AZ',\n 'name': ' Arizona '\n },\n 'orders': [\n { 'productName': 'Budgie Smugglers', 'itemCost': 19.99 },\n { 'productName': 'Swimming Cap', 'itemCost': 5.49 }\n ],\n 'latitude': 33.299,\n 'longitude': -111.963\n },\n {\n 'id': 5,\n 'firstName': 'Igor',\n 'lastName': 'Minar',\n 'gender': 'male',\n 'address': '576 Crescent Blvd.',\n 'city': ' Dallas',\n 'state': {\n 'abbreviation': 'TX',\n 'name': 'Texas'\n },\n 'orders': [\n { 'productName': 'Bow', 'itemCost': 399.99 },\n { 'productName': 'Arrows', 'itemCost': 69.99 }\n ],\n 'latitude': 32.782927,\n 'longitude': -96.806191\n },\n {\n 'id': 6,\n 'firstName': 'Brad',\n 'lastName': 'Green',\n 'gender': 'male',\n 'address': '9874 Center St.',\n 'city': 'Orlando ',\n 'state': {\n 'abbreviation': 'FL',\n 'name': 'Florida'\n },\n 'orders': [\n { 'productName': 'Baseball', 'itemCost': 9.99 },\n { 'productName': 'Bat', 'itemCost': 19.99 }\n ],\n 'latitude': 28.384238,\n 'longitude': -81.564103\n },\n {\n 'id': 7,\n 'firstName': 'Misko',\n 'lastName': 'Hevery',\n 'gender': 'male',\n 'address': '9812 Builtway Appt #1',\n 'city': 'Carey ',\n 'state': {\n 'abbreviation': 'NC',\n 'name': 'North Carolina'\n },\n 'orders': [\n { 'productName': 'Surfboard', 'itemCost': 299.99 },\n { 'productName': 'Wax', 'itemCost': 5.99 },\n { 'productName': 'Shark Repellent', 'itemCost': 15.99 }\n ],\n 'latitude': 35.727985,\n 'longitude': -78.797594\n },\n {\n 'id': 8,\n 'firstName': 'Heedy',\n 'lastName': 'Wahlin',\n 'gender': 'female',\n 'address': '4651 Tuvo St.',\n 'city': 'Anaheim',\n 'state': {\n 'abbreviation': 'CA',\n 'name': 'California'\n },\n 'orders': [\n { 'productName': 'Saddle', 'itemCost': 599.99 },\n { 'productName': 'Riding cap', 'itemCost': 79.99 }\n ],\n 'latitude': 33.809898,\n 'longitude': -117.918757\n },\n {\n 'id': 9,\n 'firstName': 'John',\n 'lastName': 'Papa',\n 'gender': 'male',\n 'address': '66 Ray St.',\n 'city': ' Orlando',\n 'state': {\n 'abbreviation': 'FL',\n 'name': 'Florida'\n },\n 'orders': [\n { 'productName': 'Baseball', 'itemCost': 9.99 },\n { 'productName': 'Bat', 'itemCost': 19.99 }\n ],\n 'latitude': 28.384238,\n 'longitude': -81.564103\n },\n {\n 'id': 10,\n 'firstName': 'Tonya',\n 'lastName': 'Smith',\n 'gender': 'female',\n 'address': '1455 Chandler Blvd.',\n 'city': ' Atlanta',\n 'state': {\n 'abbreviation': 'GA',\n 'name': 'Georgia'\n },\n 'orders': [\n { 'productName': 'Surfboard', 'itemCost': 299.99 },\n { 'productName': 'Wax', 'itemCost': 5.99 },\n { 'productName': 'Shark Repellent', 'itemCost': 7.99 }\n ],\n 'latitude': 33.762297,\n 'longitude': -84.392953\n },\n {\n 'id': 11,\n 'firstName': 'ward',\n 'lastName': 'bell',\n 'gender': 'male',\n 'address': '888 Central St.',\n 'city': 'Los Angeles',\n 'state': {\n 'abbreviation': 'CA',\n 'name': 'California'\n },\n 'latitude': 34.042552,\n 'longitude': -118.266429\n },\n {\n 'id': 12,\n 'firstName': 'Marcus',\n 'lastName': 'Hightower',\n 'gender': 'male',\n 'address': '1699 Atomic St.',\n 'city': 'Dallas',\n 'state': {\n 'abbreviation': 'TX',\n 'name': 'Texas'\n },\n 'latitude': 32.782927,\n 'longitude': -96.806191\n },\n {\n 'id': 13,\n 'firstName': 'Thomas',\n 'lastName': 'Martin',\n 'gender': 'male',\n 'address': '98756 Center St.',\n 'city': 'New York',\n 'state': {\n 'abbreviation': 'NY',\n 'name': 'New York City'\n },\n 'orders': [\n { 'productName': 'Car', 'itemCost': 42999.99 },\n { 'productName': 'Wax', 'itemCost': 5.99 },\n { 'productName': 'Shark Repellent', 'itemCost': 7.99 }\n ],\n 'latitude': 40.725037,\n 'longitude': -74.004903\n },\n {\n 'id': 14,\n 'firstName': 'Jean',\n 'lastName': 'Martin',\n 'gender': 'female',\n 'address': '98756 Center St.',\n 'city': 'New York City',\n 'state': {\n 'abbreviation': 'NY',\n 'name': 'New York'\n },\n 'latitude': 40.725037,\n 'longitude': -74.004903\n },\n {\n 'id': 15,\n 'firstName': 'Pinal',\n 'lastName': 'Dave',\n 'gender': 'male',\n 'address': '23566 Directive Pl.',\n 'city': 'White Plains',\n 'state': {\n 'abbreviation': 'NY',\n 'name': 'New York'\n },\n 'latitude': 41.028726,\n 'longitude': -73.758261\n },\n {\n 'id': 16,\n 'firstName': 'Robin',\n 'lastName': 'Cleark',\n 'gender': 'female',\n 'address': '35632 Richmond Circle Apt B',\n 'city': 'Las Vegas',\n 'state': {\n 'abbreviation': 'NV',\n 'name': 'Nevada'\n },\n 'latitude': 36.091824,\n 'longitude': -115.174247\n },\n {\n 'id': 17,\n 'firstName': 'Fred',\n 'lastName': 'Roberts',\n 'gender': 'male',\n 'address': '12 Ocean View St.',\n 'city': 'Houston',\n 'state': {\n 'abbreviation': 'TX',\n 'name': 'Texas'\n },\n 'latitude': 29.750163,\n 'longitude': -95.362769\n },\n {\n 'id': 18,\n 'firstName': 'Robyn',\n 'lastName': 'Flores',\n 'gender': 'female',\n 'address': '23423 Adams St.',\n 'city': 'Seattle',\n 'state': {\n 'abbreviation': 'WA',\n 'name': 'Washington'\n },\n 'latitude': 47.596,\n 'longitude': -122.331\n },\n {\n 'id': 19,\n 'firstName': 'Elaine',\n 'lastName': 'Jones',\n 'gender': 'female',\n 'address': '98756 Center St.',\n 'city': 'Barcelona',\n 'state': {\n 'abbreviation': 'CAT',\n 'name': 'Catalonia'\n },\n 'latitude': 41.386444,\n 'longitude': 2.111988\n },\n {\n 'id': 20,\n 'firstName': 'Lilija',\n 'lastName': 'Arnarson',\n 'gender': 'female',\n 'address': '23423 Adams St.',\n 'city': 'Reykjavik',\n 'state': {\n 'abbreviation': 'IS',\n 'name': 'Iceland'\n },\n 'latitude': 64.120278,\n 'longitude': -21.830471\n },\n {\n 'id': 21,\n 'firstName': 'Laurent',\n 'lastName': 'Bugnion',\n 'gender': 'male',\n 'address': '9874 Lake Blvd.',\n 'city': 'Zurich',\n 'state': {\n 'abbreviation': 'COZ',\n 'name': 'Canton of Zurick'\n },\n 'orders': [\n { 'productName': 'Baseball', 'itemCost': 9.99 },\n { 'productName': 'Bat', 'itemCost': 19.99 }\n ],\n 'latitude': 47.341337,\n 'longitude': 8.582503\n },\n {\n 'id': 22,\n 'firstName': 'Gabriel',\n 'lastName': 'Flores',\n 'gender': 'male',\n 'address': '2543 Cassiano',\n 'city': 'Rio de Janeiro',\n 'state': {\n 'abbreviation': 'WA',\n 'name': 'Rio de Janeiro'\n },\n 'latitude': -22.919369,\n 'longitude': -43.181836\n }\n];\n", + "properties": [ + { + "name": "children", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "ActivatedRoute[]", + "optional": false, + "description": "", + "line": 53 + }, + { + "name": "component", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "Type | null", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "data", + "defaultValue": "{} as Observable", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "firstChild", + "defaultValue": "{} as ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "type": "ActivatedRoute", + "optional": false, + "description": "", + "line": 52 + }, + { + "name": "fragment", + "defaultValue": "{} as Observable", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 45 + }, + { + "name": "outlet", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 47 + }, + { + "name": "paramMap", + "defaultValue": "{} as Observable", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 55 + }, + { + "name": "params", + "defaultValue": "{} as Observable", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 43 + }, + { + "name": "parent", + "defaultValue": "{} as ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "type": "ActivatedRoute", + "optional": false, + "description": "", + "line": 51 + }, + { + "name": "pathFromRoot", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "ActivatedRoute[]", + "optional": false, + "description": "", + "line": 54 + }, + { + "name": "queryParamMap", + "defaultValue": "{} as Observable", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 56 + }, + { + "name": "queryParams", + "defaultValue": "{} as Observable", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 44 + }, + { + "name": "root", + "defaultValue": "{} as ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "type": "ActivatedRoute", + "optional": false, + "description": "", + "line": 50 + }, + { + "name": "routeConfig", + "defaultValue": "{} as Route", + "deprecated": false, + "deprecationMessage": "", + "type": "Route", + "optional": false, + "description": "", + "line": 49 + }, + { + "name": "snapshot", + "defaultValue": "{} as ActivatedRouteSnapshot", + "deprecated": false, + "deprecationMessage": "", + "type": "ActivatedRouteSnapshot", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "url", + "defaultValue": "{} as Observable", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 42 + } + ], + "methods": [ + { + "name": "toString", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 57, + "deprecated": false, + "deprecationMessage": "" + } + ], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [], + "implements": [ + "ActivatedRoute" + ] + }, + { + "name": "MockDataService", + "id": "class-MockDataService-4f0b5d60873d2354e3ac09535f8b2197d50c458fd3fbf19add86a9919944cc70cfee07c88dddee386c29abc842bf20e99b3cd988ec171591ff3b76894defe8d7", + "file": "src/app/shared/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { Type } from '@angular/core';\nimport { ActivatedRouteSnapshot, ActivatedRoute, UrlSegment, Params, Data, Route, ParamMap } from '@angular/router';\n\nimport { Observable, of } from 'rxjs';\n\nimport { ICustomer, IPagedResults } from './interfaces';\n\nexport class MockDataService {\n constructor() {}\n\n getCustomer(id: number): Observable {\n if (id === 1) {\n return of(customers.slice(0, 1)[0]);\n } else {\n return of({} as ICustomer);\n }\n }\n\n getCustomersPage(page: number, pageSize: number): Observable> {\n const topVal = pageSize,\n skipVal = page,\n skip = (isNaN(skipVal)) ? 0 : +skipVal;\n let top = (isNaN(topVal)) ? 10 : skip + (+topVal);\n\n if (top > customers.length) {\n top = skip + (customers.length - skip);\n }\n\n return of({\n totalRecords: customers.length,\n results: customers.slice(skip, top)\n });\n }\n\n getCustomers(): Observable {\n return of(customers);\n }\n}\n\nexport class MockActivatedRoute implements ActivatedRoute {\n snapshot: ActivatedRouteSnapshot = {} as ActivatedRouteSnapshot;\n url: Observable = {} as Observable;\n params: Observable = {} as Observable;\n queryParams: Observable = {} as Observable;\n fragment: Observable = {} as Observable;\n data: Observable = {} as Observable;\n outlet: string = '';\n component: Type | null = null;\n routeConfig: Route = {} as Route;\n root: ActivatedRoute = {} as ActivatedRoute;\n parent: ActivatedRoute = {} as ActivatedRoute;\n firstChild: ActivatedRoute = {} as ActivatedRoute;\n children: ActivatedRoute[] = [];\n pathFromRoot: ActivatedRoute[] = [];\n paramMap: Observable = {} as Observable;\n queryParamMap: Observable = {} as Observable;\n toString(): string {\n return '';\n }\n}\n\nexport function getActivatedRouteWithParent(params: any[]) {\n const route = new MockActivatedRoute();\n route.parent = new MockActivatedRoute() as ActivatedRoute;\n if (params) {\n for (const param of params) {\n // var keyNames = Object.keys(param);\n route.parent.params = of(param);\n }\n }\n\n return route;\n}\n\nexport const customers = [\n {\n 'id': 1,\n 'firstName': 'ted',\n 'lastName': 'james',\n 'gender': 'male',\n 'address': '1234 Anywhere St.',\n 'city': ' Phoenix ',\n 'state': {\n 'abbreviation': 'AZ',\n 'name': 'Arizona'\n },\n 'orders': [\n { 'productName': 'Basketball', 'itemCost': 7.99 },\n { 'productName': 'Shoes', 'itemCost': 199.99 }\n ],\n 'latitude': 33.299,\n 'longitude': -111.963\n },\n {\n 'id': 2,\n 'firstName': 'Michelle',\n 'lastName': 'Thompson',\n 'gender': 'female',\n 'address': '345 Cedar Point Ave.',\n 'city': 'Encinitas ',\n 'state': {\n 'abbreviation': 'CA',\n 'name': 'California'\n },\n 'orders': [\n { 'productName': 'Frisbee', 'itemCost': 2.99 },\n { 'productName': 'Hat', 'itemCost': 5.99 }\n ],\n 'latitude': 33.037,\n 'longitude': -117.291\n },\n {\n 'id': 3,\n 'firstName': 'Zed',\n 'lastName': 'Bishop',\n 'gender': 'male',\n 'address': '1822 Long Bay Dr.',\n 'city': ' Seattle ',\n 'state': {\n 'abbreviation': 'WA',\n 'name': 'Washington'\n },\n 'orders': [\n { 'productName': 'Boomerang', 'itemCost': 29.99 },\n { 'productName': 'Helmet', 'itemCost': 19.99 },\n { 'productName': 'Kangaroo Saddle', 'itemCost': 179.99 }\n ],\n 'latitude': 47.596,\n 'longitude': -122.331\n },\n {\n 'id': 4,\n 'firstName': 'Tina',\n 'lastName': 'Adams',\n 'gender': 'female',\n 'address': '79455 Pinetop Way',\n 'city': 'Chandler',\n 'state': {\n 'abbreviation': 'AZ',\n 'name': ' Arizona '\n },\n 'orders': [\n { 'productName': 'Budgie Smugglers', 'itemCost': 19.99 },\n { 'productName': 'Swimming Cap', 'itemCost': 5.49 }\n ],\n 'latitude': 33.299,\n 'longitude': -111.963\n },\n {\n 'id': 5,\n 'firstName': 'Igor',\n 'lastName': 'Minar',\n 'gender': 'male',\n 'address': '576 Crescent Blvd.',\n 'city': ' Dallas',\n 'state': {\n 'abbreviation': 'TX',\n 'name': 'Texas'\n },\n 'orders': [\n { 'productName': 'Bow', 'itemCost': 399.99 },\n { 'productName': 'Arrows', 'itemCost': 69.99 }\n ],\n 'latitude': 32.782927,\n 'longitude': -96.806191\n },\n {\n 'id': 6,\n 'firstName': 'Brad',\n 'lastName': 'Green',\n 'gender': 'male',\n 'address': '9874 Center St.',\n 'city': 'Orlando ',\n 'state': {\n 'abbreviation': 'FL',\n 'name': 'Florida'\n },\n 'orders': [\n { 'productName': 'Baseball', 'itemCost': 9.99 },\n { 'productName': 'Bat', 'itemCost': 19.99 }\n ],\n 'latitude': 28.384238,\n 'longitude': -81.564103\n },\n {\n 'id': 7,\n 'firstName': 'Misko',\n 'lastName': 'Hevery',\n 'gender': 'male',\n 'address': '9812 Builtway Appt #1',\n 'city': 'Carey ',\n 'state': {\n 'abbreviation': 'NC',\n 'name': 'North Carolina'\n },\n 'orders': [\n { 'productName': 'Surfboard', 'itemCost': 299.99 },\n { 'productName': 'Wax', 'itemCost': 5.99 },\n { 'productName': 'Shark Repellent', 'itemCost': 15.99 }\n ],\n 'latitude': 35.727985,\n 'longitude': -78.797594\n },\n {\n 'id': 8,\n 'firstName': 'Heedy',\n 'lastName': 'Wahlin',\n 'gender': 'female',\n 'address': '4651 Tuvo St.',\n 'city': 'Anaheim',\n 'state': {\n 'abbreviation': 'CA',\n 'name': 'California'\n },\n 'orders': [\n { 'productName': 'Saddle', 'itemCost': 599.99 },\n { 'productName': 'Riding cap', 'itemCost': 79.99 }\n ],\n 'latitude': 33.809898,\n 'longitude': -117.918757\n },\n {\n 'id': 9,\n 'firstName': 'John',\n 'lastName': 'Papa',\n 'gender': 'male',\n 'address': '66 Ray St.',\n 'city': ' Orlando',\n 'state': {\n 'abbreviation': 'FL',\n 'name': 'Florida'\n },\n 'orders': [\n { 'productName': 'Baseball', 'itemCost': 9.99 },\n { 'productName': 'Bat', 'itemCost': 19.99 }\n ],\n 'latitude': 28.384238,\n 'longitude': -81.564103\n },\n {\n 'id': 10,\n 'firstName': 'Tonya',\n 'lastName': 'Smith',\n 'gender': 'female',\n 'address': '1455 Chandler Blvd.',\n 'city': ' Atlanta',\n 'state': {\n 'abbreviation': 'GA',\n 'name': 'Georgia'\n },\n 'orders': [\n { 'productName': 'Surfboard', 'itemCost': 299.99 },\n { 'productName': 'Wax', 'itemCost': 5.99 },\n { 'productName': 'Shark Repellent', 'itemCost': 7.99 }\n ],\n 'latitude': 33.762297,\n 'longitude': -84.392953\n },\n {\n 'id': 11,\n 'firstName': 'ward',\n 'lastName': 'bell',\n 'gender': 'male',\n 'address': '888 Central St.',\n 'city': 'Los Angeles',\n 'state': {\n 'abbreviation': 'CA',\n 'name': 'California'\n },\n 'latitude': 34.042552,\n 'longitude': -118.266429\n },\n {\n 'id': 12,\n 'firstName': 'Marcus',\n 'lastName': 'Hightower',\n 'gender': 'male',\n 'address': '1699 Atomic St.',\n 'city': 'Dallas',\n 'state': {\n 'abbreviation': 'TX',\n 'name': 'Texas'\n },\n 'latitude': 32.782927,\n 'longitude': -96.806191\n },\n {\n 'id': 13,\n 'firstName': 'Thomas',\n 'lastName': 'Martin',\n 'gender': 'male',\n 'address': '98756 Center St.',\n 'city': 'New York',\n 'state': {\n 'abbreviation': 'NY',\n 'name': 'New York City'\n },\n 'orders': [\n { 'productName': 'Car', 'itemCost': 42999.99 },\n { 'productName': 'Wax', 'itemCost': 5.99 },\n { 'productName': 'Shark Repellent', 'itemCost': 7.99 }\n ],\n 'latitude': 40.725037,\n 'longitude': -74.004903\n },\n {\n 'id': 14,\n 'firstName': 'Jean',\n 'lastName': 'Martin',\n 'gender': 'female',\n 'address': '98756 Center St.',\n 'city': 'New York City',\n 'state': {\n 'abbreviation': 'NY',\n 'name': 'New York'\n },\n 'latitude': 40.725037,\n 'longitude': -74.004903\n },\n {\n 'id': 15,\n 'firstName': 'Pinal',\n 'lastName': 'Dave',\n 'gender': 'male',\n 'address': '23566 Directive Pl.',\n 'city': 'White Plains',\n 'state': {\n 'abbreviation': 'NY',\n 'name': 'New York'\n },\n 'latitude': 41.028726,\n 'longitude': -73.758261\n },\n {\n 'id': 16,\n 'firstName': 'Robin',\n 'lastName': 'Cleark',\n 'gender': 'female',\n 'address': '35632 Richmond Circle Apt B',\n 'city': 'Las Vegas',\n 'state': {\n 'abbreviation': 'NV',\n 'name': 'Nevada'\n },\n 'latitude': 36.091824,\n 'longitude': -115.174247\n },\n {\n 'id': 17,\n 'firstName': 'Fred',\n 'lastName': 'Roberts',\n 'gender': 'male',\n 'address': '12 Ocean View St.',\n 'city': 'Houston',\n 'state': {\n 'abbreviation': 'TX',\n 'name': 'Texas'\n },\n 'latitude': 29.750163,\n 'longitude': -95.362769\n },\n {\n 'id': 18,\n 'firstName': 'Robyn',\n 'lastName': 'Flores',\n 'gender': 'female',\n 'address': '23423 Adams St.',\n 'city': 'Seattle',\n 'state': {\n 'abbreviation': 'WA',\n 'name': 'Washington'\n },\n 'latitude': 47.596,\n 'longitude': -122.331\n },\n {\n 'id': 19,\n 'firstName': 'Elaine',\n 'lastName': 'Jones',\n 'gender': 'female',\n 'address': '98756 Center St.',\n 'city': 'Barcelona',\n 'state': {\n 'abbreviation': 'CAT',\n 'name': 'Catalonia'\n },\n 'latitude': 41.386444,\n 'longitude': 2.111988\n },\n {\n 'id': 20,\n 'firstName': 'Lilija',\n 'lastName': 'Arnarson',\n 'gender': 'female',\n 'address': '23423 Adams St.',\n 'city': 'Reykjavik',\n 'state': {\n 'abbreviation': 'IS',\n 'name': 'Iceland'\n },\n 'latitude': 64.120278,\n 'longitude': -21.830471\n },\n {\n 'id': 21,\n 'firstName': 'Laurent',\n 'lastName': 'Bugnion',\n 'gender': 'male',\n 'address': '9874 Lake Blvd.',\n 'city': 'Zurich',\n 'state': {\n 'abbreviation': 'COZ',\n 'name': 'Canton of Zurick'\n },\n 'orders': [\n { 'productName': 'Baseball', 'itemCost': 9.99 },\n { 'productName': 'Bat', 'itemCost': 19.99 }\n ],\n 'latitude': 47.341337,\n 'longitude': 8.582503\n },\n {\n 'id': 22,\n 'firstName': 'Gabriel',\n 'lastName': 'Flores',\n 'gender': 'male',\n 'address': '2543 Cassiano',\n 'city': 'Rio de Janeiro',\n 'state': {\n 'abbreviation': 'WA',\n 'name': 'Rio de Janeiro'\n },\n 'latitude': -22.919369,\n 'longitude': -43.181836\n }\n];\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 8 + }, + "properties": [], + "methods": [ + { + "name": "getCustomer", + "args": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 11, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getCustomers", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 35, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getCustomersPage", + "args": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "pageSize", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": [], + "line": 19, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "pageSize", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + }, + { + "name": "PropertyResolver", + "id": "class-PropertyResolver-7e0697300ab11c6109865465d62e623dbdf7dce93a77978c33b5126933b5615e3eddc8d8f43f5c8616c6bb596073cefe2eb6c5fa022b5549b3b02ecf212cb430", + "file": "src/app/core/services/property-resolver.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "export class PropertyResolver {\n static resolve(path: string, obj: any) {\n return path.split('.').reduce((prev, curr) => {\n return (prev ? prev[curr] : undefined);\n }, obj || self);\n }\n}\n", + "properties": [], + "methods": [ + { + "name": "resolve", + "args": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "obj", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 2, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 124 + ], + "jsdoctags": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "obj", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + }, + { + "name": "SandboxesDefined", + "id": "class-SandboxesDefined-357c44ad5077ccc1d066390c137a148d64ba2688fcd4cdb1ba1e85b67ccdd93f8ad98280fe6c10fbc02dabeb844a2ec27ec7b3681a68dc67e569fc09682407c4", + "file": ".angular-playground/sandboxes.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "export class SandboxesDefined {\n getSandbox(path: string): any {\n /*GET_SANDBOX*/\n switch(path) {\ncase './app/about/about.component.sandbox':\n return import( /* webpackMode: \"lazy\" */ '/Users/danwahlin/Desktop/demos/angular-jumpstart/src/app/about/about.component.sandbox').then(function(_){ return _.default.serialize('./app/about/about.component.sandbox'); });\ncase './app/customer/customer-details/customer-details.component.sandbox':\n return import( /* webpackMode: \"lazy\" */ '/Users/danwahlin/Desktop/demos/angular-jumpstart/src/app/customer/customer-details/customer-details.component.sandbox').then(function(_){ return _.default.serialize('./app/customer/customer-details/customer-details.component.sandbox'); });\ncase './app/customer/customer-orders/customer-orders.component.sandbox':\n return import( /* webpackMode: \"lazy\" */ '/Users/danwahlin/Desktop/demos/angular-jumpstart/src/app/customer/customer-orders/customer-orders.component.sandbox').then(function(_){ return _.default.serialize('./app/customer/customer-orders/customer-orders.component.sandbox'); });\ncase './app/customers/customers-card/customers-card.component.sandbox':\n return import( /* webpackMode: \"lazy\" */ '/Users/danwahlin/Desktop/demos/angular-jumpstart/src/app/customers/customers-card/customers-card.component.sandbox').then(function(_){ return _.default.serialize('./app/customers/customers-card/customers-card.component.sandbox'); });\ncase './app/customers/customers-grid/customers-grid.component.sandbox':\n return import( /* webpackMode: \"lazy\" */ '/Users/danwahlin/Desktop/demos/angular-jumpstart/src/app/customers/customers-grid/customers-grid.component.sandbox').then(function(_){ return _.default.serialize('./app/customers/customers-grid/customers-grid.component.sandbox'); });\ncase './app/customers/customers.component.sandbox':\n return import( /* webpackMode: \"lazy\" */ '/Users/danwahlin/Desktop/demos/angular-jumpstart/src/app/customers/customers.component.sandbox').then(function(_){ return _.default.serialize('./app/customers/customers.component.sandbox'); });\n}\n \n/*END_GET_SANDBOX*/\n }\n getSandboxMenuItems(): any {\n /*GET_SANDBOX_MENU_ITEMS*/\n return [{\"key\":\"./app/about/about.component.sandbox\",\"srcPath\":\"/Users/danwahlin/Desktop/demos/angular-jumpstart/src\",\"searchKey\":\"AboutComponent\",\"name\":\"AboutComponent\",\"label\":\"\",\"scenarioMenuItems\":[{\"key\":1,\"description\":\"About Component\"}]},{\"key\":\"./app/customer/customer-details/customer-details.component.sandbox\",\"srcPath\":\"/Users/danwahlin/Desktop/demos/angular-jumpstart/src\",\"searchKey\":\"CustomerDetailsComponent\",\"name\":\"CustomerDetailsComponent\",\"label\":\"\",\"scenarioMenuItems\":[{\"key\":1,\"description\":\"With a Customer\"},{\"key\":2,\"description\":\"Without a Customer\"}]},{\"key\":\"./app/customer/customer-orders/customer-orders.component.sandbox\",\"srcPath\":\"/Users/danwahlin/Desktop/demos/angular-jumpstart/src\",\"searchKey\":\"CustomerOrdersComponent\",\"name\":\"CustomerOrdersComponent\",\"label\":\"\",\"scenarioMenuItems\":[{\"key\":1,\"description\":\"With Orders\"},{\"key\":2,\"description\":\"Without Orders\"}]},{\"key\":\"./app/customers/customers-card/customers-card.component.sandbox\",\"srcPath\":\"/Users/danwahlin/Desktop/demos/angular-jumpstart/src\",\"searchKey\":\"CustomersCardComponent\",\"name\":\"CustomersCardComponent\",\"label\":\"\",\"scenarioMenuItems\":[{\"key\":1,\"description\":\"With Many Customers\"},{\"key\":2,\"description\":\"With 10 Customers\"},{\"key\":3,\"description\":\"With 4 Customers\"},{\"key\":4,\"description\":\"Without Customers\"}]},{\"key\":\"./app/customers/customers-grid/customers-grid.component.sandbox\",\"srcPath\":\"/Users/danwahlin/Desktop/demos/angular-jumpstart/src\",\"searchKey\":\"CustomersGridComponent\",\"name\":\"CustomersGridComponent\",\"label\":\"\",\"scenarioMenuItems\":[{\"key\":1,\"description\":\"With Many Customers\"},{\"key\":2,\"description\":\"With 10 Customers\"},{\"key\":3,\"description\":\"With 4 Customers\"},{\"key\":4,\"description\":\"Without Customers\"}]},{\"key\":\"./app/customers/customers.component.sandbox\",\"srcPath\":\"/Users/danwahlin/Desktop/demos/angular-jumpstart/src\",\"searchKey\":\"CustomersComponent\",\"name\":\"CustomersComponent\",\"label\":\"\",\"scenarioMenuItems\":[{\"key\":1,\"description\":\"With Customers\"}]}]; \n/*END_GET_SANDBOX_MENU_ITEMS*/\n }\n}", + "properties": [], + "methods": [ + { + "name": "getSandbox", + "args": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 5, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getSandboxMenuItems", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 24, + "deprecated": false, + "deprecationMessage": "" + } + ], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + }, + { + "name": "ValidationService", + "id": "class-ValidationService-c76cbeeceb5e22667127e797db450d820dded1a974490d4b1e69daa1991163f93db5a41d41ad42d45784f960843cb55ea87a383c81c4c5dd8eb1a1c1a8543674", + "file": "src/app/core/services/validation.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { AbstractControl } from '@angular/forms';\n\nexport class ValidationService {\n\n static getValidatorErrorMessage(code: string) {\n const config: any = {\n 'required': 'Required',\n 'invalidCreditCard': 'Is invalid credit card number',\n 'invalidEmailAddress': 'Invalid email address',\n 'invalidPassword': 'Invalid password. Password must be at least 6 characters long, and contain a number.'\n };\n return config[code];\n }\n\n static creditCardValidator(control: AbstractControl) {\n // Visa, MasterCard, American Express, Diners Club, Discover, JCB\n // tslint:disable-next-line\n if (control.value.match(/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$/)) {\n return null;\n } else {\n return { 'invalidCreditCard': true };\n }\n }\n\n static emailValidator(control: AbstractControl) {\n // RFC 2822 compliant regex\n // tslint:disable-next-line\n if (control.value.match(/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/)) {\n return null;\n } else {\n return { 'invalidEmailAddress': true };\n }\n }\n\n static passwordValidator(control: AbstractControl) {\n // {6,100} - Assert password is between 6 and 100 characters\n // (?=.*[0-9]) - Assert a string has at least one number\n // (?!.*\\s) - Spaces are not allowed\n // tslint:disable-next-line\n if (control.value.match(/^(?=.*\\d)(?=.*[a-zA-Z!@#$%^&*])(?!.*\\s).{6,100}$/)) {\n return null;\n } else {\n return { 'invalidPassword': true };\n }\n }\n}\n", + "properties": [], + "methods": [ + { + "name": "creditCardValidator", + "args": [ + { + "name": "control", + "type": "AbstractControl", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "{ invalidCreditCard: boolean; }", + "typeParameters": [], + "line": 16, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 124 + ], + "jsdoctags": [ + { + "name": "control", + "type": "AbstractControl", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "emailValidator", + "args": [ + { + "name": "control", + "type": "AbstractControl", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "{ invalidEmailAddress: boolean; }", + "typeParameters": [], + "line": 26, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 124 + ], + "jsdoctags": [ + { + "name": "control", + "type": "AbstractControl", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getValidatorErrorMessage", + "args": [ + { + "name": "code", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 6, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 124 + ], + "jsdoctags": [ + { + "name": "code", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "passwordValidator", + "args": [ + { + "name": "control", + "type": "AbstractControl", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "{ invalidPassword: boolean; }", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 124 + ], + "jsdoctags": [ + { + "name": "control", + "type": "AbstractControl", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + } + ], + "directives": [ + { + "name": "SortByDirective", + "id": "directive-SortByDirective-3185cd9e0f59b504b68db8d5e28b9917cb15bdaf674a55a11446e89ff0b806ca13efe3759cef5fa5ee7484482a49fc81587c1d787bda97acd45e4d58e71d212c", + "file": "src/app/shared/directives/sortby.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Directive, Input, Output, EventEmitter, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[cmSortBy]'\n})\nexport class SortByDirective {\n\n private sortProperty: string = '';\n\n @Output()\n sorted: EventEmitter = new EventEmitter();\n\n constructor() { }\n\n @Input('cmSortBy')\n set sortBy(value: string) {\n this.sortProperty = value;\n }\n\n @HostListener('click', ['$event'])\n onClick(e: Event) {\n e.preventDefault();\n this.sorted.next(this.sortProperty); // Raise clicked event\n }\n\n\n\n\n}\n", + "selector": "[cmSortBy]", + "providers": [], + "inputsClass": [ + { + "name": "cmSortBy", + "deprecated": false, + "deprecationMessage": "", + "line": 16, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "sorted", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 11, + "type": "EventEmitter" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [ + { + "name": "click", + "args": [ + { + "name": "e", + "type": "Event", + "deprecated": false, + "deprecationMessage": "" + } + ], + "argsDecorator": [ + "$event" + ], + "deprecated": false, + "deprecationMessage": "", + "line": 21 + } + ], + "propertiesClass": [ + { + "name": "sortProperty", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8, + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "onClick", + "args": [ + { + "name": "e", + "type": "Event", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "HostListener", + "stringifiedArguments": "'click', ['$event']" + } + ], + "jsdoctags": [ + { + "name": "e", + "type": "Event", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 11 + }, + "accessors": { + "sortBy": { + "name": "sortBy", + "setSignature": { + "name": "sortBy", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 16, + "jsdoctags": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + } + } + } + ], + "components": [ + { + "name": "AboutComponent", + "id": "component-AboutComponent-d59d9dbb433115546c5cfccf8f010c3cc21815a3d500350d960451d8edd2997d43b36896c4e63cb3641df045ad6fe391320aff3d56cc1cc87974955dfb89e1a0", + "file": "src/app/about/about.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-about", + "styleUrls": [], + "styles": [], + "templateUrl": [ + "./about.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 11, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'cm-about',\n templateUrl: './about.component.html'\n})\nexport class AboutComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 7 + }, + "implements": [ + "OnInit" + ], + "templateData": "
\n
\n
\n

About

\n
\n
\n
\n
\n
Created by:
\n \n
\n
\n \n
\n \n
\n
\n
" + }, + { + "name": "AppComponent", + "id": "component-AppComponent-3a385b85c0341a84bb09ccf96cd3dca77a277dbd79ec8eaa657f8be897200c5cb11af701293a9327a7dddf0b65d2c61135b51961cd67f3dfe430fe58df63643f", + "file": "src/app/app.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-app-component", + "styleUrls": [], + "styles": [], + "templateUrl": [ + "./app.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'cm-app-component',\n templateUrl: './app.component.html'\n})\nexport class AppComponent {\n\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "templateData": "
\n \n \n \n \n \n    Loading\n \n
\n

" + }, + { + "name": "ButtonComponent", + "id": "component-ButtonComponent-4ef205c97a334c309aa4001c8ab4a6d9571dcae18d0e85aaf0d367467ab5d3a9f13ab3573726f1fcb409bc9b49894dadfb80b1bbe1b6ba7041455ad9d4922004", + "file": "src/stories/button.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "storybook-button", + "styleUrls": [ + "./button.css" + ], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "backgroundColor", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWhat background color to use\n", + "description": "

What background color to use

\n", + "line": 26, + "type": "string", + "decorators": [] + }, + { + "name": "label", + "defaultValue": "'Button'", + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "pos": 711, + "end": 724, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 325, + "tagName": { + "pos": 712, + "end": 720, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "required" + }, + "comment": "" + } + ], + "rawdescription": "\n\nButton contents\n\n", + "description": "

Button contents

\n", + "line": 40, + "type": "string", + "decorators": [] + }, + { + "name": "primary", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nIs this the principal call to action on the page?\n", + "description": "

Is this the principal call to action on the page?

\n", + "line": 20, + "type": "boolean", + "decorators": [] + }, + { + "name": "size", + "defaultValue": "'medium'", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHow large should the button be?\n", + "description": "

How large should the button be?

\n", + "line": 32, + "type": "\"small\" | \"medium\" | \"large\"", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "onClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nOptional click handler\n", + "description": "

Optional click handler

\n", + "line": 46, + "type": "EventEmitter" + } + ], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'storybook-button',\n template: ` \n {{ label }}\n `,\n styleUrls: ['./button.css'],\n})\nexport default class ButtonComponent {\n /**\n * Is this the principal call to action on the page?\n */\n @Input()\n primary = false;\n\n /**\n * What background color to use\n */\n @Input()\n backgroundColor?: string;\n\n /**\n * How large should the button be?\n */\n @Input()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Button contents\n *\n * @required\n */\n @Input()\n label = 'Button';\n\n /**\n * Optional click handler\n */\n @Output()\n onClick = new EventEmitter();\n\n public get classes(): string[] {\n const mode = this.primary ? 'storybook-button--primary' : 'storybook-button--secondary';\n\n return ['storybook-button', `storybook-button--${this.size}`, mode];\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".storybook-button {\n font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-weight: 700;\n border: 0;\n border-radius: 3em;\n cursor: pointer;\n display: inline-block;\n line-height: 1;\n}\n.storybook-button--primary {\n color: white;\n background-color: #1ea7fd;\n}\n.storybook-button--secondary {\n color: #333;\n background-color: transparent;\n box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;\n}\n.storybook-button--small {\n font-size: 12px;\n padding: 10px 16px;\n}\n.storybook-button--medium {\n font-size: 14px;\n padding: 11px 20px;\n}\n.storybook-button--large {\n font-size: 16px;\n padding: 12px 24px;\n}\n", + "styleUrl": "./button.css" + } + ], + "stylesData": "", + "accessors": { + "classes": { + "name": "classes", + "getSignature": { + "name": "classes", + "type": "[]", + "returnType": "string[]", + "line": 48 + } + } + } + }, + { + "name": "CustomerComponent", + "id": "component-CustomerComponent-67de2143a23dc7ea05a550a21135e444028fdaeeb210f5fde5f8b5a393d771d314961d34469e295d362f0a4706a25c2d7411ed3837652083a74a670e0e2c1a45", + "file": "src/app/customer/customer.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-orders", + "styleUrls": [], + "styles": [], + "templateUrl": [ + "./customer.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'cm-orders',\n templateUrl: './customer.component.html'\n})\nexport class CustomerComponent implements OnInit {\n\n // displayMode: CustomerDisplayModeEnum;\n // displayModeEnum = CustomerDisplayModeEnum;\n\n constructor(private router: Router) { }\n\n ngOnInit() {\n\n // No longer needed due to routerLinkActive feature in Angular\n // const path = this.router.url.split('/')[3];\n // switch (path) {\n // case 'details':\n // this.displayMode = CustomerDisplayModeEnum.Details;\n // break;\n // case 'orders':\n // this.displayMode = CustomerDisplayModeEnum.Orders;\n // break;\n // case 'edit':\n // this.displayMode = CustomerDisplayModeEnum.Edit;\n // break;\n // }\n }\n\n}\n\n// enum CustomerDisplayModeEnum {\n// Details=0,\n// Orders=1,\n// Edit=2\n// }\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 8, + "jsdoctags": [ + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "templateData": "
\n
\n
\n

  Customer Information

\n
\n
\n \n
\n \n
\n
\n View all Customers\n
\n
\n
\n\n\n\n\n\n\n" + }, + { + "name": "CustomerDetailsComponent", + "id": "component-CustomerDetailsComponent-ce986c8d87c666bbf715cc597382142bb020d6e2a8cbd3de73860519054e8e1788f993e51e0ecfe60515d518a944ef60297f9673b5f754dc0a884103c5d324f1", + "file": "src/app/customer/customer-details/customer-details.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-customer-details", + "styleUrls": [ + "./customer-details.component.css" + ], + "styles": [], + "templateUrl": [ + "./customer-details.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "customer", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "ICustomer | null", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "mapComponentRef", + "defaultValue": "{} as ComponentRef", + "deprecated": false, + "deprecationMessage": "", + "type": "ComponentRef", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "mapEnabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "mapsViewContainerRef", + "defaultValue": "{} as ViewContainerRef", + "deprecated": false, + "deprecationMessage": "", + "type": "ViewContainerRef", + "optional": false, + "description": "", + "line": 19, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'mapsContainer', {read: ViewContainerRef}" + } + ], + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "lazyLoadMapComponent", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 131 + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 25, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, ComponentRef, ViewChild, ViewContainerRef, ComponentFactoryResolver } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\n\nimport { ICustomer } from '../../shared/interfaces';\nimport { DataService } from '../../core/services/data.service';\n\n@Component({\n selector: 'cm-customer-details',\n templateUrl: './customer-details.component.html',\n styleUrls: ['./customer-details.component.css']\n})\nexport class CustomerDetailsComponent implements OnInit {\n\n customer: ICustomer | null = null;\n mapEnabled: boolean = false;\n mapComponentRef: ComponentRef = {} as ComponentRef;\n\n @ViewChild('mapsContainer', { read: ViewContainerRef }) \n private mapsViewContainerRef: ViewContainerRef = {} as ViewContainerRef;\n\n constructor(private route: ActivatedRoute, \n private dataService: DataService,\n private componentFactoryResolver: ComponentFactoryResolver) { }\n\n ngOnInit() {\n // Subscribe to params so if it changes we pick it up. Could use this.route.parent.snapshot.params[\"id\"] to simplify it.\n this.route.parent?.params.subscribe((params: Params) => {\n const id = +params['id'];\n if (id) {\n this.dataService.getCustomer(id)\n .subscribe((customer: ICustomer) => {\n this.customer = customer;\n if (this.customer && this.customer.latitude) {\n this.lazyLoadMapComponent();\n // this.mapEnabled = true; // For eager loading map\n }\n });\n }\n });\n }\n\n async lazyLoadMapComponent() {\n if (!this.mapsViewContainerRef.length) {\n // Lazy load MapComponent\n const { MapComponent } = await import('../../shared/map/map.component');\n console.log('Lazy loaded map component!');\n const component = this.componentFactoryResolver.resolveComponentFactory(MapComponent);\n this.mapComponentRef = this.mapsViewContainerRef.createComponent(component);\n this.mapComponentRef.instance.zoom = 10;\n this.mapComponentRef.instance.customer = this.customer;\n this.mapComponentRef.instance.enabled = true;\n }\n }\n\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".details-image {\n height:100px;width:100px;margin-top:10px;\n}", + "styleUrl": "./customer-details.component.css" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentFactoryResolver", + "type": "ComponentFactoryResolver", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 19, + "jsdoctags": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "componentFactoryResolver", + "type": "ComponentFactoryResolver", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "templateData": "
\n
\n
\n \n
\n
\n

\n {{ customer.firstName | capitalize }} {{ customer.lastName | capitalize }}  \n

\n
\n {{ customer.address }}\n
\n {{ customer.city }}, {{ customer.state.name }}\n
\n
\n

\n
\n
\n \n \n \n
\n \n
\n
\n
\n
\n
\n No customer found\n
" + }, + { + "name": "CustomerEditComponent", + "id": "component-CustomerEditComponent-788d55b60c90741874c87b0c829b0768ffb360b610f730a58d3edcdb7336c5ef881a3a62e7520b6f0992e48b28e99bc7d5c694371590aefbda4f0063009f62f5", + "file": "src/app/customer/customer-edit/customer-edit.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-customer-edit", + "styleUrls": [ + "./customer-edit.component.css" + ], + "styles": [], + "templateUrl": [ + "./customer-edit.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "customer", + "defaultValue": "{\n id: 0,\n firstName: '',\n lastName: '',\n gender: '',\n address: '',\n city: '',\n state: {\n abbreviation: '',\n name: ''\n }\n }", + "deprecated": false, + "deprecationMessage": "", + "type": "ICustomer", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "customerForm", + "defaultValue": "{} as NgForm", + "deprecated": false, + "deprecationMessage": "", + "type": "NgForm", + "optional": false, + "description": "", + "line": 35, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'customerForm', {static: true}" + } + ] + }, + { + "name": "deleteMessageEnabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 33 + }, + { + "name": "errorMessage", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "operationText", + "defaultValue": "'Insert'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "states", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "IState[]", + "optional": false, + "description": "", + "line": 31 + } + ], + "methodsClass": [ + { + "name": "cancel", + "args": [ + { + "name": "event", + "type": "Event", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 98, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "Event", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "canDeactivate", + "args": [], + "optional": false, + "returnType": "Promise | boolean", + "typeParameters": [], + "line": 117, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "delete", + "args": [ + { + "name": "event", + "type": "Event", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 104, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "Event", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getCustomer", + "args": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 59, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 44, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "submit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, ViewChild } from '@angular/core';\nimport { Router, ActivatedRoute, Params } from '@angular/router';\nimport { NgForm } from '@angular/forms';\n\nimport { DataService } from '../../core/services/data.service';\nimport { ModalService, IModalContent } from '../../core/modal/modal.service';\nimport { ICustomer, IState } from '../../shared/interfaces';\nimport { GrowlerService, GrowlerMessageType } from '../../core/growler/growler.service';\nimport { LoggerService } from '../../core/services/logger.service';\n\n@Component({\n selector: 'cm-customer-edit',\n templateUrl: './customer-edit.component.html',\n styleUrls: ['./customer-edit.component.css']\n})\nexport class CustomerEditComponent implements OnInit {\n\n customer: ICustomer =\n {\n id: 0,\n firstName: '',\n lastName: '',\n gender: '',\n address: '',\n city: '',\n state: {\n abbreviation: '',\n name: ''\n }\n };\n states: IState[] = [];\n errorMessage: string = '';\n deleteMessageEnabled: boolean = false;\n operationText = 'Insert';\n @ViewChild('customerForm', { static: true }) customerForm: NgForm = {} as NgForm;\n\n constructor(private router: Router,\n private route: ActivatedRoute,\n private dataService: DataService,\n private growler: GrowlerService,\n private modalService: ModalService,\n private logger: LoggerService) { }\n\n ngOnInit() {\n // Subscribe to params so if it changes we pick it up. Don't technically need that here\n // since param won't be changing while component is alive.\n // Could use this.route.parent.snapshot.params[\"id\"] to simplify it.\n this.route.parent?.params.subscribe((params: Params) => {\n const id = +params['id'];\n if (id !== 0) {\n this.operationText = 'Update';\n this.getCustomer(id);\n }\n });\n\n this.dataService.getStates().subscribe((states: IState[]) => this.states = states);\n }\n\n getCustomer(id: number) {\n this.dataService.getCustomer(id).subscribe((customer: ICustomer) => {\n this.customer = customer;\n });\n }\n\n submit() {\n if (this.customer.id === 0) {\n this.dataService.insertCustomer(this.customer)\n .subscribe((insertedCustomer: ICustomer) => {\n if (insertedCustomer) {\n // Mark form as pristine so that CanDeactivateGuard won't prompt before navigation\n this.customerForm.form.markAsPristine();\n this.router.navigate(['/customers']);\n } else {\n const msg = 'Unable to insert customer';\n this.growler.growl(msg, GrowlerMessageType.Danger);\n this.errorMessage = msg;\n }\n },\n (err: any) => this.logger.log(err));\n } else {\n this.dataService.updateCustomer(this.customer)\n .subscribe((status: boolean) => {\n if (status) {\n // Mark form as pristine so that CanDeactivateGuard won't prompt before navigation\n this.customerForm.form.markAsPristine();\n this.growler.growl('Operation performed successfully.', GrowlerMessageType.Success);\n // this.router.navigate(['/customers']);\n } else {\n const msg = 'Unable to update customer';\n this.growler.growl(msg, GrowlerMessageType.Danger);\n this.errorMessage = msg;\n }\n },\n (err: any) => this.logger.log(err));\n }\n }\n\n cancel(event: Event) {\n event.preventDefault();\n // Route guard will take care of showing modal dialog service if data is dirty\n this.router.navigate(['/customers']);\n }\n\n delete(event: Event) {\n event.preventDefault();\n this.dataService.deleteCustomer(this.customer.id)\n .subscribe((status: boolean) => {\n if (status) {\n this.router.navigate(['/customers']);\n } else {\n this.errorMessage = 'Unable to delete customer';\n }\n },\n (err) => this.logger.log(err));\n }\n\n canDeactivate(): Promise | boolean {\n if (!this.customerForm.dirty) {\n return true;\n }\n\n // Dirty show display modal dialog to user to confirm leaving\n const modalContent: IModalContent = {\n header: 'Lose Unsaved Changes?',\n body: 'You have unsaved changes! Would you like to leave the page and lose them?',\n cancelButtonText: 'Cancel',\n OKButtonText: 'Leave'\n };\n return this.modalService.show(modalContent);\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".customer-form input[type='text'], \n.customer-form input[type='number'],\n.customer-form input[type='email'],\n.customer-form select {\n width:100%;\n}\n\n.customer-form .ng-invalid {\n border-left: 5px solid #a94442;\n}\n\n.customer-form .ng-valid {\n border-left: 5px solid #42A948;\n}", + "styleUrl": "./customer-edit.component.css" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "growler", + "type": "GrowlerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "modalService", + "type": "ModalService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 35, + "jsdoctags": [ + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "growler", + "type": "GrowlerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "modalService", + "type": "ModalService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "templateData": "
\n
\n
\n \n \n
First Name is required
\n
\n
\n \n \n
Last Name is required
\n
\n
\n \n \n
Address is required
\n
\n
\n \n \n
City is required
\n
\n
\n \n \n
\n
\n
\n Delete Customer?    \n \n
\n   \n\n
\n   \n \n
\n
\n
{{ errorMessage }}
\n
\n
\n
" + }, + { + "name": "CustomerOrdersComponent", + "id": "component-CustomerOrdersComponent-aa2cd65111fa0857835b46dd08abaf46db7cc879f29871f9a0709810e52c825612323c56913e35c5efb7937e9eb625335cdf438821ee66ea6c0823b46a1ee324", + "file": "src/app/customer/customer-orders/customer-orders.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-customer-orders", + "styleUrls": [], + "styles": [], + "templateUrl": [ + "./customer-orders.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "customer", + "defaultValue": "{} as ICustomer", + "deprecated": false, + "deprecationMessage": "", + "type": "ICustomer", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "orders", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "IOrder[]", + "optional": false, + "description": "", + "line": 13 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 18, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ordersTrackBy", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "orderItem", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 28, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "orderItem", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\n\nimport { DataService } from '../../core/services/data.service';\nimport { ICustomer, IOrder, IOrderItem } from '../../shared/interfaces';\n\n@Component({\n selector: 'cm-customer-orders',\n templateUrl: './customer-orders.component.html'\n})\nexport class CustomerOrdersComponent implements OnInit {\n\n orders: IOrder[] = [];\n customer: ICustomer = {} as ICustomer;\n\n constructor(private route: ActivatedRoute, private dataService: DataService) { }\n\n ngOnInit() {\n // Subscribe to params so if it changes we pick it up. Could use this.route.parent.snapshot.params[\"id\"] to simplify it.\n this.route.parent?.params.subscribe((params: Params) => {\n const id = +params['id'];\n this.dataService.getCustomer(id).subscribe((customer: ICustomer) => {\n this.customer = customer;\n });\n });\n }\n\n ordersTrackBy(index: number, orderItem: any) {\n return index;\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 14, + "jsdoctags": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "templateData": "
\n
\n

Orders for {{ customer.firstName | capitalize }} {{ customer.lastName | capitalize }}

\n
\n \n \n \n \n \n \n \n \n \n
{{ order.productName }}{{ order.itemCost | currency:'USD':'symbol' }}
 {{ customer.orderTotal | currency:'USD':'symbol' }}
\n
\n
\n No orders found\n
\n
\n No customer found\n
\n
" + }, + { + "name": "CustomersCardComponent", + "id": "component-CustomersCardComponent-424ec723b1dec94c993792252c9bd42db20da5c940d49b9202f4b3fae40e62faf4c2586d4270bb10ef614f83517d5b3db2745a524a44c26e3b05fad6a6c432d1", + "file": "src/app/customers/customers-card/customers-card.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-customers-card", + "styleUrls": [ + "./customers-card.component.css" + ], + "styles": [], + "templateUrl": [ + "./customers-card.component.html" + ], + "viewProviders": [], + "inputsClass": [ + { + "name": "customers", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "line": 17, + "type": "ICustomer[]", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "trackbyService", + "deprecated": false, + "deprecationMessage": "", + "type": "TrackByService", + "optional": false, + "description": "", + "line": 19, + "modifierKind": [ + 123 + ] + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, OnInit, ChangeDetectionStrategy } from '@angular/core';\n\nimport { ICustomer } from '../../shared/interfaces';\nimport { TrackByService } from '../../core/services/trackby.service';\n\n@Component({\n selector: 'cm-customers-card',\n templateUrl: './customers-card.component.html',\n styleUrls: [ './customers-card.component.css' ],\n // When using OnPush detectors, then the framework will check an OnPush\n // component when any of its input properties changes, when it fires\n // an event, or when an observable fires an event ~ Victor Savkin (Angular Team)\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CustomersCardComponent implements OnInit {\n\n @Input() customers: ICustomer[] = [];\n\n constructor(public trackbyService: TrackByService) { }\n\n ngOnInit() {\n\n }\n\n}\n\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".card-container {\n width:85%;\n}\n\n.card {\n background-color:#fff;\n border: 1px solid #d4d4d4;\n height:120px;\n margin-bottom: 20px;\n position: relative;\n}\n\n.card-header {\n background-color:#027FF4;\n font-size:14pt;\n color:white;\n padding:5px;\n width:100%;\n}\n\n.card-close {\n color: white;\n font-weight:bold;\n margin-right:5px;\n}\n\n.card-body {\n padding-left: 5px;\n}\n\n.card-body-left {\n margin-top: -5px;\n}\n\n.card-body-right {\n margin-left: 20px;\n margin-top: 2px;\n}\n\n.card-body-content {\n width: 100px;\n}\n\n.card-image {\n height:50px;width:50px;margin-top:10px;\n}\n\n.white {\n color: white;\n}\n\n.white:hover {\n color: white;\n}", + "styleUrl": "./customers-card.component.css" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "trackbyService", + "type": "TrackByService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 17, + "jsdoctags": [ + { + "name": "trackbyService", + "type": "TrackByService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "templateData": "
\n
\n
\n
\n \n
\n
\n
\n \n \n \n
\n
\n
{{customer.city | trim }}, {{customer.state.name}}
\n View Orders\n
\n
\n
\n
\n
\n
\n No Records Found\n
\n
\n
" + }, + { + "name": "CustomersComponent", + "id": "component-CustomersComponent-f18e3bc33e55e33862c69aeaaae28524d36ec718bfcababebf97fac194bf709fbe1b51a7a4d18c191b183bd626a5c87f931bd7dc4c8c3ff1058c6daf83615e21", + "file": "src/app/customers/customers.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-customers", + "styleUrls": [], + "styles": [], + "templateUrl": [ + "./customers.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_filteredCustomers", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "ICustomer[]", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "customers", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "ICustomer[]", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "displayMode", + "defaultValue": "DisplayModeEnum.Card", + "deprecated": false, + "deprecationMessage": "", + "type": "DisplayModeEnum", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "displayModeEnum", + "defaultValue": "DisplayModeEnum", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "filterText", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "mapComponentRef", + "defaultValue": "{} as ComponentRef", + "deprecated": false, + "deprecationMessage": "", + "type": "ComponentRef", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "mapsViewContainerRef", + "defaultValue": "{} as ViewContainerRef", + "deprecated": false, + "deprecationMessage": "", + "type": "ViewContainerRef", + "optional": false, + "description": "", + "line": 36, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'mapsContainer', {read: ViewContainerRef}" + } + ], + "modifierKind": [ + 121 + ] + }, + { + "name": "pageSize", + "defaultValue": "10", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "title", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "totalRecords", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 21 + } + ], + "methodsClass": [ + { + "name": "changeDisplayMode", + "args": [ + { + "name": "mode", + "type": "DisplayModeEnum", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 51, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "mode", + "type": "DisplayModeEnum", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "filterChanged", + "args": [ + { + "name": "data", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 69, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "data", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getCustomersPage", + "args": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 59, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "lazyLoadMapComponent", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 79, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 131 + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 43, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "pageChanged", + "args": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 55, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateMapComponentDataPoints", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 93, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, ViewChild, \n ViewContainerRef, ComponentFactoryResolver, ComponentRef } from '@angular/core';\n\nimport { DataService } from '../core/services/data.service';\nimport { ICustomer, IPagedResults } from '../shared/interfaces';\nimport { FilterService } from '../core/services/filter.service';\nimport { LoggerService } from '../core/services/logger.service';\n\n\n@Component({\n selector: 'cm-customers',\n templateUrl: './customers.component.html'\n})\nexport class CustomersComponent implements OnInit {\n\n title: string = '';\n filterText: string = '';\n customers: ICustomer[] = [];\n displayMode: DisplayModeEnum = DisplayModeEnum.Card;\n displayModeEnum = DisplayModeEnum;\n totalRecords = 0;\n pageSize = 10;\n mapComponentRef: ComponentRef = {} as ComponentRef;\n _filteredCustomers: ICustomer[] = [];\n\n get filteredCustomers() {\n return this._filteredCustomers;\n }\n\n set filteredCustomers(value: ICustomer[]) {\n this._filteredCustomers = value;\n this.updateMapComponentDataPoints();\n }\n\n @ViewChild('mapsContainer', { read: ViewContainerRef }) \n private mapsViewContainerRef: ViewContainerRef = {} as ViewContainerRef;\n\n constructor(private componentFactoryResolver: ComponentFactoryResolver,\n private dataService: DataService,\n private filterService: FilterService,\n private logger: LoggerService) { }\n\n ngOnInit() {\n this.title = 'Customers';\n this.filterText = 'Filter Customers:';\n this.displayMode = DisplayModeEnum.Card;\n\n this.getCustomersPage(1);\n }\n\n changeDisplayMode(mode: DisplayModeEnum) {\n this.displayMode = mode;\n }\n\n pageChanged(page: number) {\n this.getCustomersPage(page);\n }\n\n getCustomersPage(page: number) {\n this.dataService.getCustomersPage((page - 1) * this.pageSize, this.pageSize)\n .subscribe((response: IPagedResults) => {\n this.customers = this.filteredCustomers = response.results;\n this.totalRecords = response.totalRecords;\n },\n (err: any) => this.logger.log(err),\n () => this.logger.log('getCustomersPage() retrieved customers for page: ' + page));\n }\n\n filterChanged(data: string) {\n if (data && this.customers) {\n data = data.toUpperCase();\n const props = ['firstName', 'lastName', 'city', 'state.name'];\n this.filteredCustomers = this.filterService.filter(this.customers, data, props);\n } else {\n this.filteredCustomers = this.customers;\n }\n }\n\n async lazyLoadMapComponent() {\n this.changeDisplayMode(DisplayModeEnum.Map);\n if (!this.mapsViewContainerRef.length) {\n // Lazy load MapComponent\n const { MapComponent } = await import('../shared/map/map.component');\n console.log('Lazy loaded map component!');\n const component = this.componentFactoryResolver.resolveComponentFactory(MapComponent);\n this.mapComponentRef = this.mapsViewContainerRef.createComponent(component);\n this.mapComponentRef.instance.zoom = 2;\n this.mapComponentRef.instance.dataPoints = this.filteredCustomers;\n this.mapComponentRef.instance.enabled = true;\n }\n }\n\n updateMapComponentDataPoints() {\n if (this.mapComponentRef && this.mapComponentRef.instance) {\n this.mapComponentRef.instance.dataPoints = this.filteredCustomers;\n }\n }\n\n\n}\n\nenum DisplayModeEnum {\n Card = 0,\n Grid = 1,\n Map = 2\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "componentFactoryResolver", + "type": "ComponentFactoryResolver", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "filterService", + "type": "FilterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 36, + "jsdoctags": [ + { + "name": "componentFactoryResolver", + "type": "ComponentFactoryResolver", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "filterService", + "type": "FilterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "accessors": { + "filteredCustomers": { + "name": "filteredCustomers", + "setSignature": { + "name": "filteredCustomers", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "value", + "type": "ICustomer[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 30, + "jsdoctags": [ + { + "name": "value", + "type": "ICustomer[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "getSignature": { + "name": "filteredCustomers", + "type": "", + "returnType": "", + "line": 26 + } + } + }, + "templateData": "
\n
\n
\n

\n \n {{ title }}\n

\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n \n \n\n \n
\n \n
\n\n \n \n\n \n \n
\n
\n" + }, + { + "name": "CustomersGridComponent", + "id": "component-CustomersGridComponent-2badf79b81a214e9c258a754a8785406dd41079dbeea26df6000e870f653b56ecb34b6a2c8d13a29664e171a0af1e4dd3c16ab6e69859f6146bac03e6657e1f7", + "file": "src/app/customers/customers-grid/customers-grid.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-customers-grid", + "styleUrls": [ + "./customers-grid.component.css" + ], + "styles": [], + "templateUrl": [ + "./customers-grid.component.html" + ], + "viewProviders": [], + "inputsClass": [ + { + "name": "customers", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "line": 18, + "type": "ICustomer[]", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "trackbyService", + "deprecated": false, + "deprecationMessage": "", + "type": "TrackByService", + "optional": false, + "description": "", + "line": 20, + "modifierKind": [ + 123 + ] + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 22, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "sort", + "args": [ + { + "name": "prop", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 26, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "prop", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, OnInit, ChangeDetectionStrategy } from '@angular/core';\n\nimport { SorterService } from '../../core/services/sorter.service';\nimport { TrackByService } from '../../core/services/trackby.service';\nimport { ICustomer } from '../../shared/interfaces';\n\n@Component({\n selector: 'cm-customers-grid',\n templateUrl: './customers-grid.component.html',\n styleUrls: ['./customers-grid.component.css'],\n // When using OnPush detectors, then the framework will check an OnPush\n // component when any of its input properties changes, when it fires\n // an event, or when an observable fires an event ~ Victor Savkin (Angular Team)\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CustomersGridComponent implements OnInit {\n\n @Input() customers: ICustomer[] = [];\n\n constructor(private sorterService: SorterService, public trackbyService: TrackByService) { }\n\n ngOnInit() {\n\n }\n\n sort(prop: string) {\n this.customers = this.sorterService.sort(this.customers, prop);\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".grid-container div {\n padding-left: 0px;\n}\n\n.grid-container td {\n vertical-align: middle;\n}\n\n.grid-image {\n height:50px;width:50px;margin-top:10px;\n}", + "styleUrl": "./customers-grid.component.css" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "sorterService", + "type": "SorterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "trackbyService", + "type": "TrackByService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 18, + "jsdoctags": [ + { + "name": "sorterService", + "type": "SorterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "trackbyService", + "type": "TrackByService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "templateData": "
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 First NameLast NameAddressCityStateOrder Total 
\"Customer{{ customer.firstName | capitalize }}{{ customer.lastName | capitalize }}{{ customer.address }}{{ customer.city | trim }}{{ customer.state.name }}{{ customer.orderTotal | currency:'USD':'symbol' }}View Orders
 No Records Found
\n
\n
\n
\n
\n" + }, + { + "name": "FilterTextboxComponent", + "id": "component-FilterTextboxComponent-b2a344cc26c99bbaf1a353392bfa472a08caa5a7181fa02d717029d741db26fa45e96cccb9ae6d5f3ea6647b095ed5b8f3b1531b49b6d4dbf88617db133e9ebf", + "file": "src/app/shared/filter-textbox/filter-textbox.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-filter-textbox", + "styleUrls": [ + "./filter-textbox.component.css" + ], + "styles": [], + "templateUrl": [ + "./filter-textbox.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [ + { + "name": "changed", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 13, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "model", + "defaultValue": "{ filter: '' }", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 10 + } + ], + "methodsClass": [ + { + "name": "filterChanged", + "args": [ + { + "name": "event", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'cm-filter-textbox',\n templateUrl: './filter-textbox.component.html',\n styleUrls: [ './filter-textbox.component.css' ]\n})\nexport class FilterTextboxComponent {\n\n model: { filter: string } = { filter: '' };\n\n @Output()\n changed: EventEmitter = new EventEmitter();\n\n filterChanged(event: any) {\n event.preventDefault();\n this.changed.emit(this.model.filter); // Raise changed event\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "cm-filter-textbox {\n margin-top: 5px;\n}\n", + "styleUrl": "./filter-textbox.component.css" + } + ], + "stylesData": "", + "templateData": "
\n Filter:\n \n
" + }, + { + "name": "GrowlerComponent", + "id": "component-GrowlerComponent-48f5a0fd816c6b355b58a3a34a66ea921f513fd639d282db7fb88d7513dc1548e823b9c2e4f04c042cca5cb26db31e7370ff0acea53d913e199b86691eb97ed0", + "file": "src/app/core/growler/growler.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-growler", + "styleUrls": [ + "growler.component.css" + ], + "styles": [], + "template": "
\n
\n {{ growl.message }}\n
\n
\n", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "position", + "defaultValue": "'bottom-right'", + "deprecated": false, + "deprecationMessage": "", + "line": 23, + "type": "string", + "decorators": [] + }, + { + "name": "timeout", + "defaultValue": "3000", + "deprecated": false, + "deprecationMessage": "", + "line": 24, + "type": "number", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "growlCount", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 20, + "modifierKind": [ + 121 + ] + }, + { + "name": "growls", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "Growl[]", + "optional": false, + "description": "", + "line": 21 + } + ], + "methodsClass": [ + { + "name": "growl", + "args": [ + { + "name": "message", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "growlType", + "type": "GrowlerMessageType", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisplays a growl message.\n\n", + "description": "

Displays a growl message.

\n", + "jsdoctags": [ + { + "name": { + "pos": 973, + "end": 980, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "message" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 958, + "end": 963, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "
    \n
  • The message to display.
  • \n
\n", + "typeExpression": { + "pos": 964, + "end": 972, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 965, + "end": 971, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": { + "pos": 1037, + "end": 1046, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "growlType" + }, + "type": "GrowlerMessageType", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1012, + "end": 1017, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "
    \n
  • The type of message to display (a GrowlMessageType enumeration)
  • \n
\n", + "typeExpression": { + "pos": 1018, + "end": 1036, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1019, + "end": 1035, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 1019, + "end": 1035, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "GrowlMessageType" + } + } + } + }, + { + "tagName": { + "pos": 1118, + "end": 1124, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "

id - Returns the ID for the generated growl

\n", + "returnType": "number" + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 31, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "removeGrowl", + "args": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 50, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\nimport { GrowlerService, GrowlerMessageType } from './growler.service';\nimport { LoggerService } from '../services/logger.service';\n\n@Component({\n selector: 'cm-growler',\n template: `\n
\n
\n {{ growl.message }}\n
\n
\n `,\n styleUrls: ['growler.component.css']\n})\nexport class GrowlerComponent implements OnInit {\n\n private growlCount = 0;\n growls: Growl[] = [];\n\n @Input() position = 'bottom-right';\n @Input() timeout = 3000;\n\n constructor(private growlerService: GrowlerService,\n private logger: LoggerService) {\n growlerService.growl = this.growl.bind(this);\n }\n\n ngOnInit() { }\n\n /**\n * Displays a growl message.\n *\n * @param {string} message - The message to display.\n * @param {GrowlMessageType} growlType - The type of message to display (a GrowlMessageType enumeration)\n * @return {number} id - Returns the ID for the generated growl\n */\n growl(message: string, growlType: GrowlerMessageType): number {\n this.growlCount++;\n const bootstrapAlertType = GrowlerMessageType[growlType].toLowerCase();\n const messageType = `alert-${ bootstrapAlertType }`;\n\n const growl = new Growl(this.growlCount, message, messageType, this.timeout, this);\n this.growls.push(growl);\n return growl.id;\n }\n\n removeGrowl(id: number) {\n this.growls.forEach((growl: Growl, index: number) => {\n if (growl.id === id) {\n this.growls.splice(index, 1);\n this.growlCount--;\n this.logger.log('removed ' + id);\n }\n });\n }\n}\n\nclass Growl {\n\n enabled: boolean = false;\n timeoutId: number = 0;\n\n constructor(public id: number,\n public message: string,\n public messageType: string,\n private timeout: number,\n private growlerContainer: GrowlerComponent) {\n this.show();\n }\n\n show() {\n window.setTimeout(() => {\n this.enabled = true;\n this.setTimeout();\n }, 0);\n }\n\n setTimeout() {\n window.setTimeout(() => {\n this.hide();\n }, this.timeout);\n }\n\n hide() {\n this.enabled = false;\n window.setTimeout(() => {\n this.growlerContainer.removeGrowl(this.id);\n }, this.timeout);\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": " .growler {\n position: fixed;\n z-index: 999999;\n }\n \n .growler.close-button:focus {\n outline: 0;\n }\n \n .growler.top-left {\n top: 12px;\n left: 12px;\n }\n \n .growler.top-right {\n top: 12px;\n right: 12px;\n }\n \n .growler.bottom-right {\n bottom: 12px;\n right: 12px;\n }\n \n .growler.bottom-left {\n bottom: 12px;\n left: 12px;\n }\n \n .growler.top-center {\n top: 12px;\n left: 50%;\n -webkit-transform: translate(-50%, 0%);\n transform: translate(-50%, 0%);\n }\n \n .growler.bottom-center {\n bottom: 12px;\n left: 50%;\n -webkit-transform: translate(-50%, 0%);\n transform: translate(-50%, 0%);\n }\n \n .growl {\n cursor: pointer;\n padding: 5;\n width: 285px;\n height: 65px; \n opacity: 0; \n display: flex;\n align-items: center;\n justify-content: center;\n \n -webkit-transition: opacity 1s;\n -moz-transition: opacity 1s; \n -o-transition: opacity 1s;\n transition: opacity 1s; \n } \n \n .growl.active { \n opacity: 1;\n } \n \n .growl-message {\n\n }", + "styleUrl": "growler.component.css" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "growlerService", + "type": "GrowlerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 24, + "jsdoctags": [ + { + "name": "growlerService", + "type": "GrowlerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ] + }, + { + "name": "HeaderComponent", + "id": "component-HeaderComponent-0cd94fbc94a83702e45bf987cb3b3f9074d69cd27e6ca2e4fbac0dc5b5047bd4dc3a9ce8a77f6bd9ab7ae3e6ca8e49b34bed529ca0da0fa428fec544a0324870", + "file": "src/stories/header.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "storybook-header", + "styleUrls": [ + "./header.css" + ], + "styles": [], + "template": "
\n
\n \n \n \n \n \n \n \n

Acme

\n
\n
\n \n \n \n
\n
\n
", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "user", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "line": 54, + "type": "User | null", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "onCreateAccount", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 63, + "type": "EventEmitter" + }, + { + "name": "onLogin", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 57, + "type": "EventEmitter" + }, + { + "name": "onLogout", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 60, + "type": "EventEmitter" + } + ], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { User } from './User';\n\n@Component({\n selector: 'storybook-header',\n template: `
\n
\n
\n \n \n \n \n \n \n \n

Acme

\n
\n
\n \n \n \n
\n
\n
`,\n styleUrls: ['./header.css'],\n})\nexport default class HeaderComponent {\n @Input()\n user: User | null = null;\n\n @Output()\n onLogin = new EventEmitter();\n\n @Output()\n onLogout = new EventEmitter();\n\n @Output()\n onCreateAccount = new EventEmitter();\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".wrapper {\n font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n padding: 15px 20px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\nsvg {\n display: inline-block;\n vertical-align: top;\n}\n\nh1 {\n font-weight: 900;\n font-size: 20px;\n line-height: 1;\n margin: 6px 0 6px 10px;\n display: inline-block;\n vertical-align: top;\n}\n\nbutton + button {\n margin-left: 10px;\n}\n", + "styleUrl": "./header.css" + } + ], + "stylesData": "" + }, + { + "name": "LoginComponent", + "id": "component-LoginComponent-622a1dd2024a9df9bc64681d3068855fac9c5b278dd4fd0a4c0eb956ec4d9e419f7ceb2679d2306ec3535a8743bb04c36d89db4312141f93737a50c61c68025e", + "file": "src/app/login/login.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-login", + "styleUrls": [ + "./login.component.css" + ], + "styles": [], + "templateUrl": [ + "./login.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "errorMessage", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "loginForm", + "defaultValue": "{} as FormGroup", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 17 + } + ], + "methodsClass": [ + { + "name": "buildForm", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 33, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 29, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "submit", + "args": [ + { + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';\n\nimport { AuthService } from '../core/services/auth.service';\nimport { ValidationService } from '../core/services/validation.service';\nimport { IUserLogin } from '../shared/interfaces';\nimport { GrowlerService, GrowlerMessageType } from '../core/growler/growler.service';\nimport { LoggerService } from '../core/services/logger.service';\n\n@Component({\n selector: 'cm-login',\n templateUrl: './login.component.html',\n styleUrls: [ './login.component.css' ]\n})\nexport class LoginComponent implements OnInit {\n loginForm: FormGroup = {} as FormGroup;\n errorMessage: string = '';\n get f(): { [key: string]: AbstractControl } {\n return this.loginForm.controls;\n }\n\n constructor(private formBuilder: FormBuilder,\n private router: Router,\n private authService: AuthService,\n private growler: GrowlerService,\n private logger: LoggerService) { }\n\n ngOnInit() {\n this.buildForm();\n }\n\n buildForm() {\n this.loginForm = this.formBuilder.group({\n email: ['', [ Validators.required, ValidationService.emailValidator ]],\n password: ['', [ Validators.required, ValidationService.passwordValidator ]]\n });\n }\n\n submit({ value, valid }: { value: IUserLogin, valid: boolean }) {\n this.authService.login(value)\n .subscribe((status: boolean) => {\n if (status) {\n this.growler.growl('Logged in', GrowlerMessageType.Info);\n if (this.authService.redirectUrl) {\n const redirectUrl = this.authService.redirectUrl;\n this.authService.redirectUrl = '';\n this.router.navigate([redirectUrl]);\n } else {\n this.router.navigate(['/customers']);\n }\n } else {\n const loginError = 'Unable to login';\n this.errorMessage = loginError;\n this.growler.growl(loginError, GrowlerMessageType.Danger);\n }\n },\n (err: any) => this.logger.log(err));\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".login-form input[type='text'], \n.login-form input[type='email'],\n.login-form input[type='password'] {\n width:75%;\n}\n\n.login-form .ng-invalid {\n border-left: 5px solid #a94442;\n}\n\n.login-form .ng-valid {\n border-left: 5px solid #42A948;\n}\n", + "styleUrl": "./login.component.css" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "formBuilder", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "authService", + "type": "AuthService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "growler", + "type": "GrowlerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 21, + "jsdoctags": [ + { + "name": "formBuilder", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "authService", + "type": "AuthService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "growler", + "type": "GrowlerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "accessors": { + "f": { + "name": "f", + "getSignature": { + "name": "f", + "type": "literal type", + "returnType": "literal type", + "line": 19 + } + } + }, + "templateData": "
\n
\n
\n

Login

\n
\n
\n
\n
\n
\n
\n Email:\n
\n
\n \n
\n A valid email address is required\n
\n
\n
\n
\n
\n
\n Password:\n
\n
\n \n
\n Password is required (6 or more characters with at least one number)\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n   Error: {{ errorMessage }}\n
\n
\n
\n
\n \n
\n
" + }, + { + "name": "MapComponent", + "id": "component-MapComponent-4e80d23935688ca0ef1d36ac7b747c2fb38e342c198ed0054b6a445e1bb0c226fea55ce172ca39b2c44da657cce29e61aaf25b6e0e24d36678d5ae0738ec4139", + "file": "src/app/shared/map/map.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-map", + "styleUrls": [], + "styles": [], + "templateUrl": [ + "./map.component.html" + ], + "viewProviders": [], + "inputsClass": [ + { + "name": "dataPoints", + "deprecated": false, + "deprecationMessage": "", + "line": 36, + "type": "{}", + "decorators": [] + }, + { + "name": "enabled", + "deprecated": false, + "deprecationMessage": "", + "line": 47, + "type": "boolean", + "decorators": [] + }, + { + "name": "height", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "line": 29, + "type": "number", + "decorators": [] + }, + { + "name": "latitude", + "defaultValue": "34.5133", + "deprecated": false, + "deprecationMessage": "", + "line": 31, + "type": "number", + "decorators": [] + }, + { + "name": "longitude", + "defaultValue": "-94.1629", + "deprecated": false, + "deprecationMessage": "", + "line": 32, + "type": "number", + "decorators": [] + }, + { + "name": "markerText", + "defaultValue": "'Your Location'", + "deprecated": false, + "deprecationMessage": "", + "line": 33, + "type": "string", + "decorators": [] + }, + { + "name": "width", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "line": 30, + "type": "number", + "decorators": [] + }, + { + "name": "zoom", + "defaultValue": "8", + "deprecated": false, + "deprecationMessage": "", + "line": 34, + "type": "number", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_dataPoints", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "IMapDataPoint[]", + "optional": false, + "description": "", + "line": 35, + "modifierKind": [ + 121 + ] + }, + { + "name": "isEnabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 22, + "modifierKind": [ + 121 + ] + }, + { + "name": "loadingScript", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 23, + "modifierKind": [ + 121 + ] + }, + { + "name": "map", + "defaultValue": "{} as google.maps.Map", + "deprecated": false, + "deprecationMessage": "", + "type": "google.maps.Map", + "optional": false, + "description": "", + "line": 24, + "modifierKind": [ + 121 + ] + }, + { + "name": "mapDiv", + "defaultValue": "{} as ElementRef", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 56, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'mapContainer', {static: true}" + } + ] + }, + { + "name": "mapHeight", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "string | null", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "mapPoints", + "defaultValue": "{} as QueryList", + "deprecated": false, + "deprecationMessage": "", + "type": "QueryList", + "optional": false, + "description": "", + "line": 57, + "decorators": [ + { + "name": "ContentChildren", + "stringifiedArguments": "MapPointComponent" + } + ] + }, + { + "name": "mapWidth", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "string | null", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "markers", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "google.maps.Marker[]", + "optional": false, + "description": "", + "line": 25, + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "clearMapPoints", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 169, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "createLatLong", + "args": [ + { + "name": "latitude", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "longitude", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 148, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "latitude", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "longitude", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "createMarker", + "args": [ + { + "name": "position", + "type": "google.maps.LatLng", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "title", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 176, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "position", + "type": "google.maps.LatLng", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "title", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ensureScript", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 108, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "getWindowHeightWidth", + "args": [ + { + "name": "document", + "type": "Document", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "{ height: any; width: any; }", + "typeParameters": [], + "line": 94, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "document", + "type": "Document", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "init", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 86, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngAfterContentInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 61, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "renderMap", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 129, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "renderMapPoints", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 152, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component, OnInit, AfterContentInit, Input, ViewChild,\n ContentChildren, ElementRef, QueryList, ChangeDetectionStrategy\n} from '@angular/core';\n\nimport { debounceTime } from 'rxjs/operators';\nimport { MapPointComponent } from './map-point.component';\nimport { IMapDataPoint } from '../../shared/interfaces';\n\n@Component({\n selector: 'cm-map',\n templateUrl: './map.component.html',\n // When using OnPush detectors, then the framework will check an OnPush\n // component when any of its input properties changes, when it fires\n // an event, or when an observable fires an event ~ Victor Savkin (Angular Team)\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MapComponent implements OnInit, AfterContentInit {\n\n private isEnabled: boolean = false;\n private loadingScript: boolean = false;\n private map: google.maps.Map = {} as google.maps.Map;\n private markers: google.maps.Marker[] = [];\n mapHeight: string | null = null;\n mapWidth: string | null = null;\n\n @Input() height: number = 0;\n @Input() width: number = 0;\n @Input() latitude = 34.5133;\n @Input() longitude = -94.1629;\n @Input() markerText = 'Your Location';\n @Input() zoom = 8;\n private _dataPoints: IMapDataPoint[] = [];\n @Input() public get dataPoints() {\n return this._dataPoints as IMapDataPoint[];\n }\n\n public set dataPoints(value: any[]) {\n this._dataPoints = value;\n this.renderMapPoints();\n }\n\n // Necessary since a map rendered while container is hidden\n // will not load the map tiles properly and show a grey screen\n @Input() get enabled(): boolean {\n return this.isEnabled;\n }\n\n set enabled(isEnabled: boolean) {\n this.isEnabled = isEnabled;\n this.init();\n }\n\n @ViewChild('mapContainer', { static: true }) mapDiv: ElementRef = {} as ElementRef;\n @ContentChildren(MapPointComponent) mapPoints: QueryList = {} as QueryList;\n\n constructor() { }\n\n ngOnInit() {\n if (this.latitude && this.longitude) {\n if (this.mapHeight && this.mapWidth) {\n this.mapHeight = this.height + 'px';\n this.mapWidth = this.width + 'px';\n } else {\n const hw = this.getWindowHeightWidth(this.mapDiv.nativeElement.ownerDocument);\n this.mapHeight = hw.height / 2 + 'px';\n this.mapWidth = hw.width + 'px';\n }\n }\n }\n\n ngAfterContentInit() {\n this.mapPoints.changes\n .pipe(\n debounceTime(500)\n )\n .subscribe(() => {\n if (this.enabled) { \n this.renderMapPoints(); \n }\n });\n }\n\n init() {\n // Need slight delay to avoid grey box when google script has previously been loaded.\n // Otherwise map
container may not be visible yet which causes the grey box.\n setTimeout(() => {\n this.ensureScript();\n }, 200);\n }\n\n private getWindowHeightWidth(document: Document) {\n let width = window.innerWidth\n || document.documentElement.clientWidth\n || document.body.clientWidth;\n\n const height = window.innerHeight\n || document.documentElement.clientHeight\n || document.body.clientHeight;\n\n if (width > 900) { width = 900; }\n\n return { height: height, width: width };\n }\n\n private ensureScript() {\n this.loadingScript = true;\n const document = this.mapDiv.nativeElement.ownerDocument;\n const script = document.querySelector('script[id=\"googlemaps\"]');\n if (script) {\n if (this.isEnabled) { this.renderMap(); }\n } else {\n const mapsScript = document.createElement('script');\n mapsScript.id = 'googlemaps';\n mapsScript.type = 'text/javascript';\n mapsScript.async = true;\n mapsScript.defer = true;\n mapsScript.src = 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCG1KDldeF_2GzaTXrEHR0l6cyCS7AnmBw';\n mapsScript.onload = () => {\n this.loadingScript = false;\n if (this.isEnabled) { this.renderMap(); }\n };\n document.body.appendChild(mapsScript);\n }\n }\n\n private renderMap() {\n const latlng = this.createLatLong(this.latitude, this.longitude) as google.maps.LatLng;\n const options = {\n zoom: this.zoom,\n center: latlng,\n mapTypeControl: true,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n } as google.maps.MapOptions;\n\n this.map = new google.maps.Map(this.mapDiv.nativeElement, options);\n\n // See if we have any mapPoints (child content) or dataPoints (@Input property)\n if ((this.mapPoints && this.mapPoints.length) || (this.dataPoints && this.dataPoints.length)) {\n this.renderMapPoints();\n } else {\n this.createMarker(latlng, this.markerText);\n }\n }\n\n private createLatLong(latitude: number, longitude: number) {\n return (latitude && longitude) ? new google.maps.LatLng(latitude, longitude) : null;\n }\n\n private renderMapPoints() {\n if (this.map && this.isEnabled) {\n this.clearMapPoints();\n\n // lon/lat can be passed as child content or via the dataPoints @Input property\n const mapPoints = (this.mapPoints && this.mapPoints.length) ? this.mapPoints : this.dataPoints;\n\n if (mapPoints) {\n for (const point of mapPoints) {\n let markerText = (point.markerText) ? point.markerText : `

${point.firstName} ${point.lastName}

`;\n const mapPointLatlng = this.createLatLong(point.latitude, point.longitude) as google.maps.LatLng;\n this.createMarker(mapPointLatlng, markerText);\n }\n }\n }\n }\n\n private clearMapPoints() {\n this.markers.forEach((marker: google.maps.Marker) => {\n marker.setMap(null);\n });\n this.markers = [];\n }\n\n private createMarker(position: google.maps.LatLng, title: string) {\n const infowindow = new google.maps.InfoWindow({\n content: title\n });\n\n const marker = new google.maps.Marker({\n position: position,\n map: this.map,\n title: title,\n animation: google.maps.Animation.DROP\n });\n\n this.markers.push(marker);\n\n marker.addListener('click', () => {\n infowindow.open(this.map, marker);\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 57 + }, + "implements": [ + "OnInit", + "AfterContentInit" + ], + "accessors": { + "dataPoints": { + "name": "dataPoints", + "setSignature": { + "name": "dataPoints", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "value", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 40, + "jsdoctags": [ + { + "name": "value", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "getSignature": { + "name": "dataPoints", + "type": "", + "returnType": "", + "line": 36 + } + }, + "enabled": { + "name": "enabled", + "setSignature": { + "name": "enabled", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "isEnabled", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 51, + "jsdoctags": [ + { + "name": "isEnabled", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "getSignature": { + "name": "enabled", + "type": "boolean", + "returnType": "boolean", + "line": 47 + } + } + }, + "templateData": "
Map Loading....
" + }, + { + "name": "MapPointComponent", + "id": "component-MapPointComponent-9d0dda82f8b14d746691ec7b5c35f93579646c251262cabdfd39767d10e0d43bff9b2e5588453ea00d2bfbd39a3bbe29e457f496d49e932bdf9fc76dcca3efcb", + "file": "src/app/shared/map/map-point.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-map-point", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "latitude", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "line": 10, + "type": "number", + "decorators": [] + }, + { + "name": "longitude", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "line": 9, + "type": "number", + "decorators": [] + }, + { + "name": "markerText", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 11, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, Input } from '@angular/core';\n\n@Component({\n selector: 'cm-map-point',\n template: ``\n})\nexport class MapPointComponent implements OnInit {\n\n @Input() longitude: number = 0;\n @Input() latitude: number = 0;\n @Input() markerText: string = '';\n\n constructor() { }\n\n ngOnInit() {\n\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 11 + }, + "implements": [ + "OnInit" + ] + }, + { + "name": "ModalComponent", + "id": "component-ModalComponent-de3d00e35a66a8586f0cb3dfe75ae003765ef56ccec320f3303917db2bd0f04b7c134f2636f290465310fc211047fd3885cb54502fcaeb0a49fcf4ec1572a0f8", + "file": "src/app/core/modal/modal.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-modal", + "styleUrls": [ + "./modal.component.css" + ], + "styles": [], + "templateUrl": [ + "./modal.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "cancel", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "defaultModalContent", + "defaultValue": "{\n header: 'Please Confirm',\n body: 'Are you sure you want to continue?',\n cancelButtonText: 'Cancel',\n OKButtonText: 'OK',\n cancelButtonVisible: true\n }", + "deprecated": false, + "deprecationMessage": "", + "type": "IModalContent", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "modalContent", + "defaultValue": "{}", + "deprecated": false, + "deprecationMessage": "", + "type": "IModalContent", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "modalVisible", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "modalVisibleAnimate", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "ok", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 16 + } + ], + "methodsClass": [ + { + "name": "hide", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 52, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 30, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "show", + "args": [ + { + "name": "modalContent", + "type": "IModalContent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 34, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "modalContent", + "type": "IModalContent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, EventEmitter } from '@angular/core';\n\nimport { ModalService, IModalContent } from './modal.service';\n\n@Component({\n selector: 'cm-modal',\n templateUrl: './modal.component.html',\n styleUrls: [ './modal.component.css' ]\n})\nexport class ModalComponent implements OnInit {\n\n modalVisible = false;\n modalVisibleAnimate = false;\n modalContent: IModalContent = {};\n cancel: () => void = () => {};\n ok: () => void = () => {};\n defaultModalContent: IModalContent = {\n header: 'Please Confirm',\n body: 'Are you sure you want to continue?',\n cancelButtonText: 'Cancel',\n OKButtonText: 'OK',\n cancelButtonVisible: true\n };\n\n constructor(private modalService: ModalService) {\n modalService.show = this.show.bind(this);\n modalService.hide = this.hide.bind(this);\n }\n\n ngOnInit() {\n\n }\n\n show(modalContent: IModalContent) {\n this.modalContent = Object.assign(this.defaultModalContent, modalContent);\n this.modalVisible = true;\n setTimeout(() => this.modalVisibleAnimate = true);\n\n const promise = new Promise((resolve, reject) => {\n this.cancel = () => {\n this.hide();\n resolve(false);\n };\n this.ok = () => {\n this.hide();\n resolve(true);\n };\n });\n return promise;\n }\n\n hide() {\n this.modalVisibleAnimate = false;\n setTimeout(() => this.modalVisible = false, 300);\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".modal {\n background: rgba(0,0,0,0.6);\n}", + "styleUrl": "./modal.component.css" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "modalService", + "type": "ModalService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 23, + "jsdoctags": [ + { + "name": "modalService", + "type": "ModalService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "templateData": "
\n
\n
\n
\n \n

{{ modalContent.header }}

\n
\n
\n {{ modalContent.body }}\n
\n
\n \n \n
\n
\n
\n
" + }, + { + "name": "NavbarComponent", + "id": "component-NavbarComponent-901352739697484dbf90386032c04c046aac0e6ade40da8b84a015e65638ab8a13a38e5e7da17f02b7c2e0787820a7ecd709ac65d391f8e3e67c2d703d45d2e8", + "file": "src/app/core/navbar/navbar.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-navbar", + "styleUrls": [], + "styles": [], + "templateUrl": [ + "./navbar.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "isCollapsed", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "loginLogoutText", + "defaultValue": "'Login'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "sub", + "defaultValue": "{} as Subscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 18 + } + ], + "methodsClass": [ + { + "name": "loginOrOut", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 37, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 33, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 25, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "redirectToLogin", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 52, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setLoginLogoutText", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 56, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { Subscription } from 'rxjs';\n\nimport { AuthService } from '../services/auth.service';\nimport { GrowlerService, GrowlerMessageType } from '../growler/growler.service';\nimport { LoggerService } from '../services/logger.service';\n\n@Component({\n selector: 'cm-navbar',\n templateUrl: './navbar.component.html'\n})\nexport class NavbarComponent implements OnInit, OnDestroy {\n\n isCollapsed: boolean = false;\n loginLogoutText = 'Login';\n sub: Subscription = {} as Subscription;\n\n constructor(private router: Router,\n private authservice: AuthService,\n private growler: GrowlerService,\n private logger: LoggerService) { }\n\n ngOnInit() {\n this.sub = this.authservice.authChanged\n .subscribe((loggedIn: boolean) => {\n this.setLoginLogoutText();\n },\n (err: any) => this.logger.log(err));\n }\n\n ngOnDestroy() {\n this.sub.unsubscribe();\n }\n\n loginOrOut() {\n const isAuthenticated = this.authservice.isAuthenticated;\n if (isAuthenticated) {\n this.authservice.logout()\n .subscribe((status: boolean) => {\n this.setLoginLogoutText();\n this.growler.growl('Logged Out', GrowlerMessageType.Info);\n this.router.navigate(['/customers']);\n return;\n },\n (err: any) => this.logger.log(err));\n }\n this.redirectToLogin();\n }\n\n redirectToLogin() {\n this.router.navigate(['/login']);\n }\n\n setLoginLogoutText() {\n this.loginLogoutText = (this.authservice.isAuthenticated) ? 'Logout' : 'Login';\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "authservice", + "type": "AuthService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "growler", + "type": "GrowlerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 18, + "jsdoctags": [ + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "authservice", + "type": "AuthService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "growler", + "type": "GrowlerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "logger", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit", + "OnDestroy" + ], + "templateData": "" + }, + { + "name": "OrdersComponent", + "id": "component-OrdersComponent-a1a1b3700af6429febeabb8e679fcf87efcf921d5c6bad2a6e73055856b4e0d5a411eb3b7a82d2450aa99ac4b8a8304400d7a550babe75cb2842466032ab9d64", + "file": "src/app/orders/orders.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-customers-orders", + "styleUrls": [], + "styles": [], + "templateUrl": [ + "./orders.component.html" + ], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "customers", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "ICustomer[]", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "pageSize", + "defaultValue": "5", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "totalRecords", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "trackbyService", + "deprecated": false, + "deprecationMessage": "", + "type": "TrackByService", + "optional": false, + "description": "", + "line": 17, + "modifierKind": [ + 123 + ] + } + ], + "methodsClass": [ + { + "name": "getCustomersPage", + "args": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 27, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 19, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "pageChanged", + "args": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 23, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\n\nimport { DataService } from '../core/services/data.service';\nimport { ICustomer, IPagedResults } from '../shared/interfaces';\nimport { TrackByService } from '../core/services/trackby.service';\n\n@Component({\n selector: 'cm-customers-orders',\n templateUrl: './orders.component.html'\n})\nexport class OrdersComponent implements OnInit {\n\n customers: ICustomer[] = [];\n totalRecords = 0;\n pageSize = 5;\n\n constructor(private dataService: DataService, public trackbyService: TrackByService) { }\n\n ngOnInit() {\n this.getCustomersPage(1);\n }\n\n pageChanged(page: number) {\n this.getCustomersPage(page);\n }\n\n getCustomersPage(page: number) {\n this.dataService.getCustomersPage((page - 1) * this.pageSize, this.pageSize)\n .subscribe((response: IPagedResults) => {\n this.totalRecords = response.totalRecords;\n this.customers = response.results;\n });\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "trackbyService", + "type": "TrackByService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 15, + "jsdoctags": [ + { + "name": "dataService", + "type": "DataService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "trackbyService", + "type": "TrackByService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "templateData": "
\n
\n
\n

\n   Orders\n

\n
\n
\n\n
\n
\n\n
\n

{{ customer.firstName | capitalize }} {{ customer.lastName | capitalize }}

\n
\n \n \n \n \n \n \n \n \n
{{order.productName}}{{ order.itemCost | currency:'USD':'symbol' }}
 {{ customer.orderTotal | currency:'USD':'symbol' }}\n
\n
\n No orders found\n
\n
\n\n \n\n
\n
\n No customers found\n
\n
\n\n
\n
\n" + }, + { + "name": "OverlayComponent", + "id": "component-OverlayComponent-4fdb15e2ea429e8c5a6c9a1c3e4c60bc832f57ecdd1d6ba9f6f881cf6e90e3e4a7321a0856b40f29ff9b2d92083f749583988b41dd3d63db34abcf243b916394", + "file": "src/app/core/overlay/overlay.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-overlay", + "styleUrls": [ + "./overlay.component.css" + ], + "styles": [], + "templateUrl": [ + "./overlay.component.html" + ], + "viewProviders": [], + "inputsClass": [ + { + "name": "delay", + "defaultValue": "500", + "deprecated": false, + "deprecationMessage": "", + "line": 20, + "type": "number", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "enabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "httpRequestSub", + "defaultValue": "{} as Subscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "httpResponseSub", + "defaultValue": "{} as Subscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "queue", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "timerHideId", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "timerId", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 17 + } + ], + "methodsClass": [ + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 52, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 24, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, Input, OnDestroy } from '@angular/core';\n\nimport { EventBusService, Events } from '../services/event-bus.service';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'cm-overlay',\n templateUrl: './overlay.component.html',\n styleUrls: ['./overlay.component.css']\n})\nexport class OverlayComponent implements OnInit, OnDestroy {\n\n httpRequestSub: Subscription = {} as Subscription;\n httpResponseSub: Subscription = {} as Subscription;\n enabled = false;\n queue: any[] = [];\n timerId: number = 0;\n timerHideId: number = 0;\n\n @Input() delay = 500;\n\n constructor(private eventBus: EventBusService) { }\n\n ngOnInit() {\n // Handle request\n this.httpRequestSub = this.eventBus.on(Events.httpRequest, (() => {\n this.queue.push({});\n if (this.queue.length === 1) {\n // Only show if we have an item in the queue after the delay time\n setTimeout(() => {\n if (this.queue.length) { this.enabled = true; }\n }, this.delay);\n }\n }));\n\n // Handle response\n this.httpResponseSub = this.eventBus.on(Events.httpResponse, (() => {\n this.queue.pop();\n if (this.queue.length === 0) {\n // Since we don't know if another XHR request will be made, pause before\n // hiding the overlay. If another XHR request comes in then the overlay\n // will stay visible which prevents a flicker\n setTimeout(() => {\n // Make sure queue is still 0 since a new XHR request may have come in\n // while timer was running\n if (this.queue.length === 0) { this.enabled = false; }\n }, this.delay);\n }\n }));\n }\n\n ngOnDestroy() {\n this.httpRequestSub.unsubscribe();\n this.httpResponseSub.unsubscribe();\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".overlay {\n display:none;\n}\n\n.overlay.active { \n display: block;\n} \n\n.overlay-background {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n display: block;\n overflow: hidden;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n background-color:rgba(0,0,0,0.6);\n}\n\n.overlay-content {\n\n}\n\n.overlay-content {\n position: fixed;\n z-index: 999999;\n top: 50%;\n left: 50%;\n background-color: white;\n border: 1px solid rgb(94, 94, 94);\n -webkit-transform: translate(-50%, 0%);\n transform: translate(-50%, 0%);\n\n cursor: pointer;\n padding: 5;\n width: 285px;\n height: 100px; \n display: flex;\n align-items: center;\n justify-content: center;\n \n \n -webkit-transition: opacity 1s;\n -moz-transition: opacity 1s; \n -o-transition: opacity 1s;\n transition: opacity 1s; \n} \n", + "styleUrl": "./overlay.component.css" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "eventBus", + "type": "EventBusService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 20, + "jsdoctags": [ + { + "name": "eventBus", + "type": "EventBusService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit", + "OnDestroy" + ], + "templateData": "
\n
\n
\n \n
\n
" + }, + { + "name": "PageComponent", + "id": "component-PageComponent-432c9ae0bcf6e2e1f46701f7565a67376cb10145b7d049c5fe930cf8f075c6e02e24151589750b18cbaa8266f7c61393b95c4d833fbfd71ee228904aa014349f", + "file": "src/stories/page.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "storybook-page", + "styleUrls": [ + "./page.css" + ], + "styles": [], + "template": "
\n
\n

Pages in Storybook

\n

\n We recommend building UIs with a\n \n component-driven\n \n process starting with atomic components and ending with pages.\n

\n

\n Render pages with mock data. This makes it easy to build and review page states without\n needing to navigate to them in your app. Here are some handy patterns for managing page data\n in Storybook:\n

\n
    \n
  • \n Use a higher-level connected component. Storybook helps you compose such data from the\n \"args\" of child component stories\n
  • \n
  • \n Assemble data in the page component from your services. You can mock these services out\n using Storybook.\n
  • \n
\n

\n Get a guided tutorial on component-driven development at\n \n Storybook tutorials\n \n . Read more in the\n docs \n .\n

\n
\n Tip Adjust the width of the canvas with the\n \n \n \n \n \n Viewports addon in the toolbar\n
\n
\n
", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "user", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "line": 65, + "type": "User | null", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "onCreateAccount", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 74, + "type": "EventEmitter" + }, + { + "name": "onLogin", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 68, + "type": "EventEmitter" + }, + { + "name": "onLogout", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 71, + "type": "EventEmitter" + } + ], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { User } from './User';\n\n@Component({\n selector: 'storybook-page',\n template: `
\n \n
\n

Pages in Storybook

\n

\n We recommend building UIs with a\n \n component-driven\n \n process starting with atomic components and ending with pages.\n

\n

\n Render pages with mock data. This makes it easy to build and review page states without\n needing to navigate to them in your app. Here are some handy patterns for managing page data\n in Storybook:\n

\n
    \n
  • \n Use a higher-level connected component. Storybook helps you compose such data from the\n \"args\" of child component stories\n
  • \n
  • \n Assemble data in the page component from your services. You can mock these services out\n using Storybook.\n
  • \n
\n

\n Get a guided tutorial on component-driven development at\n \n Storybook tutorials\n \n . Read more in the\n docs \n .\n

\n
\n Tip Adjust the width of the canvas with the\n \n \n \n \n \n Viewports addon in the toolbar\n
\n
\n
`,\n styleUrls: ['./page.css'],\n})\nexport default class PageComponent {\n @Input()\n user: User | null = null;\n\n @Output()\n onLogin = new EventEmitter();\n\n @Output()\n onLogout = new EventEmitter();\n\n @Output()\n onCreateAccount = new EventEmitter();\n}\n\n// export const Page = ({ user, onLogin, onLogout, onCreateAccount }) => (\n//
\n//
\n\n// );\n// Page.propTypes = {\n// user: PropTypes.shape({}),\n// onLogin: PropTypes.func.isRequired,\n// onLogout: PropTypes.func.isRequired,\n// onCreateAccount: PropTypes.func.isRequired,\n// };\n\n// Page.defaultProps = {\n// user: null,\n// };\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "section {\n font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 24px;\n padding: 48px 20px;\n margin: 0 auto;\n max-width: 600px;\n color: #333;\n}\n\nsection h2 {\n font-weight: 900;\n font-size: 32px;\n line-height: 1;\n margin: 0 0 4px;\n display: inline-block;\n vertical-align: top;\n}\n\nsection p {\n margin: 1em 0;\n}\n\nsection a {\n text-decoration: none;\n color: #1ea7fd;\n}\n\nsection ul {\n padding-left: 30px;\n margin: 1em 0;\n}\n\nsection li {\n margin-bottom: 8px;\n}\n\nsection .tip {\n display: inline-block;\n border-radius: 1em;\n font-size: 11px;\n line-height: 12px;\n font-weight: 700;\n background: #e7fdd8;\n color: #66bf3c;\n padding: 4px 12px;\n margin-right: 10px;\n vertical-align: top;\n}\n\nsection .tip-wrapper {\n font-size: 13px;\n line-height: 20px;\n margin-top: 40px;\n margin-bottom: 40px;\n}\n\nsection .tip-wrapper svg {\n display: inline-block;\n height: 12px;\n width: 12px;\n margin-right: 4px;\n vertical-align: top;\n margin-top: 3px;\n}\n\nsection .tip-wrapper svg path {\n fill: #1ea7fd;\n}\n", + "styleUrl": "./page.css" + } + ], + "stylesData": "" + }, + { + "name": "PaginationComponent", + "id": "component-PaginationComponent-9d67a1888117b51b7c6c7ffda5140d3d462020b73f441cb3123618279e4d16527c9c430850e82dbb106e67f62e396eb6bdd2c72ef5b007ffc4422ea77810a45b", + "file": "src/app/shared/pagination/pagination.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cm-pagination", + "styleUrls": [ + "./pagination.component.css" + ], + "styles": [], + "templateUrl": [ + "./pagination.component.html" + ], + "viewProviders": [], + "inputsClass": [ + { + "name": "pageSize", + "deprecated": false, + "deprecationMessage": "", + "line": 21, + "type": "number", + "decorators": [] + }, + { + "name": "totalItems", + "deprecated": false, + "deprecationMessage": "", + "line": 30, + "type": "number", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "pageChanged", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 39, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "currentPage", + "defaultValue": "1", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "isVisible", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "nextEnabled", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "pagerPageSize", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 12, + "modifierKind": [ + 121 + ] + }, + { + "name": "pagerTotalItems", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 11, + "modifierKind": [ + 121 + ] + }, + { + "name": "pages", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "number[]", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "previousEnabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "totalPages", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 14 + } + ], + "methodsClass": [ + { + "name": "changePage", + "args": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 72, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 43, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "previousNext", + "args": [ + { + "name": "direction", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 62, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "direction", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "update", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 47, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'cm-pagination',\n templateUrl: './pagination.component.html',\n styleUrls: [ './pagination.component.css' ]\n})\n\nexport class PaginationComponent implements OnInit {\n\n private pagerTotalItems: number = 0;\n private pagerPageSize: number = 0;\n\n totalPages: number = 0;\n pages: number[] = [];\n currentPage = 1;\n isVisible = false;\n previousEnabled = false;\n nextEnabled = true;\n\n @Input() get pageSize(): number {\n return this.pagerPageSize;\n }\n\n set pageSize(size: number) {\n this.pagerPageSize = size;\n this.update();\n }\n\n @Input() get totalItems(): number {\n return this.pagerTotalItems;\n }\n\n set totalItems(itemCount: number) {\n this.pagerTotalItems = itemCount;\n this.update();\n }\n\n @Output() pageChanged: EventEmitter = new EventEmitter();\n\n constructor() { }\n\n ngOnInit() {\n\n }\n\n update() {\n if (this.pagerTotalItems && this.pagerPageSize) {\n this.totalPages = Math.ceil(this.pagerTotalItems / this.pageSize);\n this.isVisible = true;\n if (this.totalItems >= this.pageSize) {\n for (let i = 1; i < this.totalPages + 1; i++) {\n this.pages.push(i);\n }\n }\n return;\n }\n\n this.isVisible = false;\n }\n\n previousNext(direction: number, event?: MouseEvent) {\n let page: number = this.currentPage;\n if (direction === -1) {\n if (page > 1) { page--; }\n } else {\n if (page < this.totalPages) { page++; }\n }\n this.changePage(page, event);\n }\n\n changePage(page: number, event?: MouseEvent) {\n if (event) {\n event.preventDefault();\n }\n if (this.currentPage === page) { return; }\n this.currentPage = page;\n this.previousEnabled = this.currentPage > 1;\n this.nextEnabled = this.currentPage < this.totalPages;\n this.pageChanged.emit(page);\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".pagination>.active>a, \n.pagination>.active>a:focus, \n.pagination>.active>a:hover, \n.pagination>.active>span, \n.pagination>.active>span:focus, \n.pagination>.active>span:hover {\n background-color: #027FF4;\n border-color: #027FF4;\n}\n\n.pagination a {\n cursor: pointer;\n}", + "styleUrl": "./pagination.component.css" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 39 + }, + "implements": [ + "OnInit" + ], + "accessors": { + "pageSize": { + "name": "pageSize", + "setSignature": { + "name": "pageSize", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "size", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 25, + "jsdoctags": [ + { + "name": "size", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "getSignature": { + "name": "pageSize", + "type": "number", + "returnType": "number", + "line": 21 + } + }, + "totalItems": { + "name": "totalItems", + "setSignature": { + "name": "totalItems", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "itemCount", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 34, + "jsdoctags": [ + { + "name": "itemCount", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "getSignature": { + "name": "totalItems", + "type": "number", + "returnType": "number", + "line": 30 + } + } + }, + "templateData": "" + } + ], + "modules": [ + { + "name": "AboutModule", + "id": "module-AboutModule-0fea291390caa7f43aa6fee82c3524a69be0bdb7bcb3e1e8aa4a24d94501d8705886ca69d2183d6c9cd974c31a5f9efdee16935758dd19d9232c28f7dee04344", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/about/about.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\n\nimport { AboutRoutingModule } from './about-routing.module';\n\n@NgModule({\n imports: [ AboutRoutingModule ],\n declarations: [ AboutRoutingModule.components ]\n})\nexport class AboutModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "AboutRoutingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "AboutRoutingModule", + "id": "module-AboutRoutingModule-b31000df8518ebc794d2d58b2990d54e4bf492d013de9a02448ef296b784c01cafa463bce6f1b77372415edaead19ef97e8f262e51ce9ddb9a0c351f6df19479", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/about/about-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { AboutComponent } from './about.component';\n\nconst routes: Routes = [\n { path: '', component: AboutComponent }\n];\n\n@NgModule({\n imports: [ RouterModule.forChild(routes) ],\n exports: [ RouterModule ]\n})\nexport class AboutRoutingModule {\n static components = [ AboutComponent ];\n}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "AppModule", + "id": "module-AppModule-68be586abe9e86cfae85c65b0923858ee7b95fd2d43d01a8150cf22efcf534a4fffa11d75cdcbb190396b5694e7b554ad20ae58780feed767f32a74d4fd25b2d", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/app.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { AppComponent } from './app.component';\nimport { AppRoutingModule } from './app-routing.module';\n\nimport { LoginModule } from './login/login.module';\nimport { CoreModule } from './core/core.module';\nimport { SharedModule } from './shared/shared.module';\n\n@NgModule({\n imports: [\n BrowserModule,\n LoginModule, // Eager loaded since we may need to go here right away as browser loads based on route user enters\n AppRoutingModule, // Main routes for application\n CoreModule, // Singleton objects (services, components that are loaded only once, etc.)\n SharedModule // Shared (multi-instance) objects\n ],\n declarations: [AppComponent],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "AppComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "AppRoutingModule" + }, + { + "name": "CoreModule" + }, + { + "name": "LoginModule" + }, + { + "name": "SharedModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [ + { + "name": "AppComponent" + } + ] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "AppRoutingModule", + "id": "module-AppRoutingModule-bca749a297d1e5fca526deeac0e6436565579c0a1f4692c63e5c177b9a4a49c447cc6b9923c6096f1a338a299bb9ddbe141cbc4bbb61d15547545491e8abf9fa", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/app-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes, PreloadAllModules, NoPreloading } from '@angular/router';\n\nimport { PreloadModulesStrategy } from './core/strategies/preload-modules.strategy';\n\nconst app_routes: Routes = [\n { path: '', pathMatch: 'full', redirectTo: '/customers' },\n { path: 'customers/:id', data: { preload: true }, loadChildren: () => \"import('./customer/customer.module').then(m => m.CustomerModule)\" },\n { path: 'customers', loadChildren: () => \"import('./customers/customers.module').then(m => m.CustomersModule)\" },\n { path: 'orders', data: { preload: true }, loadChildren: () => \"import('./orders/orders.module').then(m => m.OrdersModule)\" },\n { path: 'about', loadChildren: () => \"import('./about/about.module').then(m => m.AboutModule)\" },\n { path: '**', pathMatch: 'full', redirectTo: '/customers' } // catch any unfound routes and redirect to home page\n\n // NOTE: If you're using Angular 7 or lower you'll lazy loads routes the following way\n \n // { path: 'customers/:id', data: { preload: true }, loadChildren: 'app/customer/customer.module#CustomerModule' },\n // { path: 'customers', loadChildren: 'app/customers/customers.module#CustomersModule' },\n // { path: 'orders', data: { preload: true }, loadChildren: 'app/orders/orders.module#OrdersModule' },\n // { path: 'about', loadChildren: 'app/about/about.module#AboutModule' },\n\n];\n\n@NgModule({\n imports: [ RouterModule.forRoot(app_routes, { preloadingStrategy: PreloadModulesStrategy, relativeLinkResolution: 'legacy' }) ],\n exports: [ RouterModule ],\n providers: [PreloadModulesStrategy]\n})\nexport class AppRoutingModule { }\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "PreloadModulesStrategy" + } + ] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "CoreModule", + "id": "module-CoreModule-5ff30bacdd1eae65a6dcc9fae6da4c5c1ceb988ab595ed429f2272c168e6a122b9782c94e4095351db63cfef4bef462f4ed9630f14fc177e15c217664b357660", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/core/core.module.ts", + "methods": [], + "sourceCode": "import { NgModule, Optional, SkipSelf } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';\n\nimport { GrowlerModule } from './growler/growler.module';\nimport { ModalModule } from './modal/modal.module';\nimport { OverlayModule } from './overlay/overlay.module';\n\nimport { DataService } from './services/data.service';\nimport { NavbarComponent } from './navbar/navbar.component';\nimport { FilterService } from './services/filter.service';\nimport { SorterService } from './services/sorter.service';\nimport { TrackByService } from './services/trackby.service';\nimport { DialogService } from './services/dialog.service';\nimport { EnsureModuleLoadedOnceGuard } from './ensure-module-loaded-once.guard';\nimport { AuthService } from './services/auth.service';\nimport { EventBusService } from './services/event-bus.service';\nimport { AuthInterceptor } from './interceptors/auth.interceptor';\n\n@NgModule({\n imports: [CommonModule, RouterModule, HttpClientModule, GrowlerModule, ModalModule, OverlayModule],\n exports: [GrowlerModule, RouterModule, HttpClientModule, ModalModule, OverlayModule, NavbarComponent],\n declarations: [NavbarComponent],\n providers: [SorterService, FilterService, DataService, TrackByService,\n DialogService, AuthService, EventBusService,\n {\n provide: HTTP_INTERCEPTORS,\n useClass: AuthInterceptor,\n multi: true,\n },\n { provide: 'Window', useFactory: () => window }\n ] // these should be singleton\n})\nexport class CoreModule extends EnsureModuleLoadedOnceGuard { // Ensure that CoreModule is only loaded into AppModule\n\n // Looks for the module in the parent injector to see if it's already been loaded (only want it loaded once)\n constructor(@Optional() @SkipSelf() parentModule: CoreModule) {\n super(parentModule);\n }\n\n}\n\n\n\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "AuthInterceptor" + }, + { + "name": "AuthService" + }, + { + "name": "DataService" + }, + { + "name": "DialogService" + }, + { + "name": "EventBusService" + }, + { + "name": "FilterService" + }, + { + "name": "SorterService" + }, + { + "name": "TrackByService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "NavbarComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "GrowlerModule" + }, + { + "name": "ModalModule" + }, + { + "name": "OverlayModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "GrowlerModule" + }, + { + "name": "ModalModule" + }, + { + "name": "NavbarComponent" + }, + { + "name": "OverlayModule" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "CustomerModule", + "id": "module-CustomerModule-67ce9acfa01b363ad76b831c2c11d3ee2d7710e09c72a3c58c1b56d5e0c31785a44675839affa398d0aee4091dce861c04e98629a8c96b213061e49f9ad66efe", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/customer/customer.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\n\nimport { SharedModule } from '../shared/shared.module';\nimport { CustomerRoutingModule } from './customer-routing.module';\n\n@NgModule({\n imports: [CustomerRoutingModule, SharedModule],\n declarations: [CustomerRoutingModule.components]\n})\nexport class CustomerModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "CustomerRoutingModule" + }, + { + "name": "SharedModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "CustomerRoutingModule", + "id": "module-CustomerRoutingModule-40d7c0dad5fe26168799f8c66dca4e1f3e2e14f1abd8eb2250988b00c3cf750aee23922ecbeca5529ff0ddca10ce4a29e21c7d3c648de82bd9925395a8ea6fc3", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/customer/customer-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { CustomerComponent } from './customer.component';\nimport { CustomerOrdersComponent } from './customer-orders/customer-orders.component';\nimport { CustomerDetailsComponent } from './customer-details/customer-details.component';\nimport { CustomerEditComponent } from './customer-edit/customer-edit.component';\nimport { CanActivateGuard } from './guards/can-activate.guard';\nimport { CanDeactivateGuard } from './guards/can-deactivate.guard';\n\nconst routes: Routes = [\n {\n path: '',\n component: CustomerComponent,\n children: [\n { path: 'orders', component: CustomerOrdersComponent },\n { path: 'details', component: CustomerDetailsComponent },\n {\n path: 'edit',\n component: CustomerEditComponent,\n canActivate: [CanActivateGuard],\n canDeactivate: [CanDeactivateGuard]\n }\n ]\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n providers: [CanActivateGuard, CanDeactivateGuard]\n})\nexport class CustomerRoutingModule {\n static components = [CustomerComponent, CustomerOrdersComponent, CustomerDetailsComponent, CustomerEditComponent];\n}\n\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "CustomersModule", + "id": "module-CustomersModule-1f20e9d2ae07be87cb3c143a26e3a069f62037e0f4a681bf8cc2e2abcff0cf905782cf450ab9a5b41c37340b3e4013cde16ea61168f825e9212adacf31bfd9a8", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/customers/customers.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\n\nimport { SharedModule } from '../shared/shared.module';\nimport { CustomersRoutingModule } from './customers-routing.module';\n\n@NgModule({\n imports: [CustomersRoutingModule, SharedModule],\n declarations: [CustomersRoutingModule.components]\n})\nexport class CustomersModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "CustomersRoutingModule" + }, + { + "name": "SharedModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "CustomersRoutingModule", + "id": "module-CustomersRoutingModule-0dbad897e9bc4ae3b2fb0221460d0d4aa4caaca66c15b880b623beb28c5391fc87d9127072d33478f382d85fbf1179838cd6e6b6483b75c3dcbeaaacc6fe6044", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/customers/customers-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { CustomersComponent } from './customers.component';\nimport { CustomersCardComponent } from './customers-card/customers-card.component';\nimport { CustomersGridComponent } from './customers-grid/customers-grid.component';\n\nconst routes: Routes = [\n { path: '', component: CustomersComponent }\n];\n\n@NgModule({\n imports: [ RouterModule.forChild(routes) ],\n exports: [ RouterModule ]\n})\nexport class CustomersRoutingModule {\n static components = [ CustomersComponent, CustomersCardComponent, CustomersGridComponent ];\n}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "FilterTextboxModule", + "id": "module-FilterTextboxModule-9498405e6eb7280d1d0f88ab49c6f8c167686681547ecc3125885cf9422bbbbce9e2e504e0b620306f70904a7cc0fa9ee4bdf6de06e84e460b44e4882474febc", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/shared/filter-textbox/filter-textbox.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { FilterTextboxComponent } from './filter-textbox.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule],\n exports: [FilterTextboxComponent],\n declarations: [FilterTextboxComponent]\n})\nexport class FilterTextboxModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "FilterTextboxComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "FilterTextboxComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "GrowlerModule", + "id": "module-GrowlerModule-50ebdeee66ddbdd8f9caab4e8bb229e5d2d47868c62ca6c9e9efa34f7897a0a0091f9c7a729809035abaca9501de4cd5b4de4890fb890b17ede99358c02ae1b8", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/core/growler/growler.module.ts", + "methods": [], + "sourceCode": "import { NgModule, Optional, SkipSelf } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { GrowlerComponent } from './growler.component';\nimport { GrowlerService } from './growler.service';\nimport { EnsureModuleLoadedOnceGuard } from '../ensure-module-loaded-once.guard';\n\n@NgModule({\n imports: [CommonModule],\n exports: [GrowlerComponent],\n providers: [GrowlerService],\n declarations: [GrowlerComponent]\n})\nexport class GrowlerModule extends EnsureModuleLoadedOnceGuard { // Ensure that GrowlerModule is only loaded into AppModule\n\n // Looks for the module in the parent injector to see if it's already been loaded (only want it loaded once)\n constructor(@Optional() @SkipSelf() parentModule: GrowlerModule) {\n super(parentModule);\n }\n}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "GrowlerService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "GrowlerComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "GrowlerComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "LoginModule", + "id": "module-LoginModule-d32af22e0466dc8064d533f73b8afb6ddadfb9ef2062cc87094845d20d545e90087294d93a3181568f66b21c4d911d9e90f5e8bde0919c42403d8a9d91516762", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/login/login.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { SharedModule } from '../shared/shared.module';\nimport { LoginRoutingModule } from './login-routing.module';\n\n@NgModule({\n imports: [ ReactiveFormsModule, SharedModule, LoginRoutingModule ],\n declarations: [ LoginRoutingModule.components ]\n})\nexport class LoginModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "LoginRoutingModule" + }, + { + "name": "SharedModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "LoginRoutingModule", + "id": "module-LoginRoutingModule-ce23cb8d718e090c5ff0712dbb32a8bec2b544b38963350fdf667e7adae289bce47bc7223577b83689ad0a5f5998242ccea3ab6538e1628db538fc645f4dc97d", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/login/login-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { LoginComponent } from './login.component';\n\nconst routes: Routes = [\n { path: 'login', component: LoginComponent }\n];\n\n@NgModule({\n imports: [ RouterModule.forChild(routes) ],\n exports: [ RouterModule ]\n})\nexport class LoginRoutingModule {\n static components = [ LoginComponent ];\n}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "MapModule", + "id": "module-MapModule-8359c4f9ceaaf2924ca7a2ea687067552228b27e549b8dc0a6249a6c5a29c0098319a6c28263a9d56091171fdd96302b0a056646758a1920ee34ae9970c80d4c", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/shared/map/map.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MapComponent } from './map.component';\nimport { MapPointComponent } from './map-point.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [MapComponent, MapPointComponent],\n declarations: [MapComponent, MapPointComponent]\n})\nexport class MapModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "MapComponent" + }, + { + "name": "MapPointComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "MapComponent" + }, + { + "name": "MapPointComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "ModalModule", + "id": "module-ModalModule-954364f74ce2d08ac40b82051df2b9150dcfa6f7ff40362e0904fe9266283831abd2db5ca02453a81d630be3e5c566c2a2633f55c49b4a8fb9879863f3505a41", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/core/modal/modal.module.ts", + "methods": [], + "sourceCode": "import { NgModule, Optional, SkipSelf } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ModalComponent } from './modal.component';\nimport { ModalService } from './modal.service';\nimport { EnsureModuleLoadedOnceGuard } from '../ensure-module-loaded-once.guard';\n\n@NgModule({\n imports: [CommonModule],\n exports: [ModalComponent],\n declarations: [ModalComponent],\n providers: [ModalService]\n})\nexport class ModalModule extends EnsureModuleLoadedOnceGuard { // Ensure that ModalModule is only loaded into AppModule\n\n // Looks for the module in the parent injector to see if it's already been loaded (only want it loaded once)\n constructor(@Optional() @SkipSelf() parentModule: ModalModule) {\n super(parentModule);\n }\n\n}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "ModalService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "ModalComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "ModalComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "OrdersModule", + "id": "module-OrdersModule-f4173d321d33f832ac88c7bf2296c7f784f7592a26201448b398f68b6837c10897e499461aa08ec42dfcf35891df07b9afb61516c1fb865c80c6988fba74b485", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/orders/orders.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\n\nimport { SharedModule } from '../shared/shared.module';\nimport { OrdersRoutingModule } from './orders-routing.module';\n\n@NgModule({\n imports: [SharedModule, OrdersRoutingModule],\n declarations: [OrdersRoutingModule.components]\n})\nexport class OrdersModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "OrdersRoutingModule" + }, + { + "name": "SharedModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "OrdersRoutingModule", + "id": "module-OrdersRoutingModule-81be2ea31907871cdc8e917db526014ebcdcf50a885b2a382ec2e94f90be2d903c1acd512488fb30ac70162215f55d9574bcfcb832a181c39a771cba806539cc", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/orders/orders-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { OrdersComponent } from './orders.component';\n\nconst routes: Routes = [\n { path: '', component: OrdersComponent }\n];\n\n@NgModule({\n imports: [ RouterModule.forChild(routes) ],\n exports: [ RouterModule ]\n})\nexport class OrdersRoutingModule {\n static components = [ OrdersComponent ];\n}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "OverlayModule", + "id": "module-OverlayModule-2a15c24a5315b7a743bef4ff68eeab7519d79fce69a6919939f9f7ed3bf0e04157090d3d55b7594f6af69b96e4af9fa312c12b75e6e2ce7729b0dd86de8edac9", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/core/overlay/overlay.module.ts", + "methods": [], + "sourceCode": "import { NgModule, Optional, SkipSelf } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\n\nimport { OverlayRequestResponseInterceptor } from './overlay-request-response.interceptor';\nimport { OverlayComponent } from './overlay.component';\nimport { EnsureModuleLoadedOnceGuard } from '../ensure-module-loaded-once.guard';\n\n\n@NgModule({\n imports: [CommonModule],\n exports: [OverlayComponent],\n declarations: [OverlayComponent],\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: OverlayRequestResponseInterceptor,\n multi: true,\n }\n ]\n})\nexport class OverlayModule extends EnsureModuleLoadedOnceGuard { // Ensure that OverlayModule is only loaded into AppModule\n\n // Looks for the module in the parent injector to see if it's already been loaded (only want it loaded once)\n constructor(@Optional() @SkipSelf() parentModule: OverlayModule) {\n super(parentModule);\n }\n}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "OverlayRequestResponseInterceptor" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "OverlayComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "OverlayComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "PaginationModule", + "id": "module-PaginationModule-1e2b267f0a4ace0dd7f2e53a3260f0b151ed3baedb479b1c7673287e9b09d6f38439a57a5eccce8bc60658ac9a371eb1e16cea46eeae75a492ae0f6d0dd3c258", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/shared/pagination/pagination.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PaginationComponent } from './pagination.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [PaginationComponent],\n declarations: [PaginationComponent]\n})\nexport class PaginationModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "PaginationComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "PaginationComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "SharedModule", + "id": "module-SharedModule-bbf26de0130a6a081ab35faa1e77a704e1cf8cc3308ea8cec17e74435b0b4924a5be2a5eeb1698423cf6074cc78fb36013f4d6ff290d974fed2767dc610a49e1", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "src/app/shared/shared.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { FilterTextboxModule } from './filter-textbox/filter-textbox.module';\nimport { PaginationModule } from './pagination/pagination.module';\n\nimport { CapitalizePipe } from './pipes/capitalize.pipe';\nimport { TrimPipe } from './pipes/trim.pipe';\nimport { SortByDirective } from './directives/sortby.directive';\n\n@NgModule({\n imports: [CommonModule, FilterTextboxModule, PaginationModule ],\n exports: [ CommonModule, FormsModule, CapitalizePipe, TrimPipe, SortByDirective, FilterTextboxModule, PaginationModule ],\n declarations: [ CapitalizePipe, TrimPipe, SortByDirective ]\n})\nexport class SharedModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "CapitalizePipe" + }, + { + "name": "SortByDirective" + }, + { + "name": "TrimPipe" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "FilterTextboxModule" + }, + { + "name": "PaginationModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "CapitalizePipe" + }, + { + "name": "FilterTextboxModule" + }, + { + "name": "PaginationModule" + }, + { + "name": "SortByDirective" + }, + { + "name": "TrimPipe" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + } + ], + "miscellaneous": { + "variables": [ + { + "name": "About", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/About.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "context", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "require.context('./', true, /\\.spec\\.ts$/)" + }, + { + "name": "CustomerCards", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Customers-card.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "CustomerCards10", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Customers-card.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "CustomerCards4", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Customers-card.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "CustomerCardsNone", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Customers-card.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "customers", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "deno/routes.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "JSON.parse(loadFile('../data/customers.json'))" + }, + { + "name": "customers", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/app/shared/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "[\n {\n 'id': 1,\n 'firstName': 'ted',\n 'lastName': 'james',\n 'gender': 'male',\n 'address': '1234 Anywhere St.',\n 'city': ' Phoenix ',\n 'state': {\n 'abbreviation': 'AZ',\n 'name': 'Arizona'\n },\n 'orders': [\n { 'productName': 'Basketball', 'itemCost': 7.99 },\n { 'productName': 'Shoes', 'itemCost': 199.99 }\n ],\n 'latitude': 33.299,\n 'longitude': -111.963\n },\n {\n 'id': 2,\n 'firstName': 'Michelle',\n 'lastName': 'Thompson',\n 'gender': 'female',\n 'address': '345 Cedar Point Ave.',\n 'city': 'Encinitas ',\n 'state': {\n 'abbreviation': 'CA',\n 'name': 'California'\n },\n 'orders': [\n { 'productName': 'Frisbee', 'itemCost': 2.99 },\n { 'productName': 'Hat', 'itemCost': 5.99 }\n ],\n 'latitude': 33.037,\n 'longitude': -117.291\n },\n {\n 'id': 3,\n 'firstName': 'Zed',\n 'lastName': 'Bishop',\n 'gender': 'male',\n 'address': '1822 Long Bay Dr.',\n 'city': ' Seattle ',\n 'state': {\n 'abbreviation': 'WA',\n 'name': 'Washington'\n },\n 'orders': [\n { 'productName': 'Boomerang', 'itemCost': 29.99 },\n { 'productName': 'Helmet', 'itemCost': 19.99 },\n { 'productName': 'Kangaroo Saddle', 'itemCost': 179.99 }\n ],\n 'latitude': 47.596,\n 'longitude': -122.331\n },\n {\n 'id': 4,\n 'firstName': 'Tina',\n 'lastName': 'Adams',\n 'gender': 'female',\n 'address': '79455 Pinetop Way',\n 'city': 'Chandler',\n 'state': {\n 'abbreviation': 'AZ',\n 'name': ' Arizona '\n },\n 'orders': [\n { 'productName': 'Budgie Smugglers', 'itemCost': 19.99 },\n { 'productName': 'Swimming Cap', 'itemCost': 5.49 }\n ],\n 'latitude': 33.299,\n 'longitude': -111.963\n },\n {\n 'id': 5,\n 'firstName': 'Igor',\n 'lastName': 'Minar',\n 'gender': 'male',\n 'address': '576 Crescent Blvd.',\n 'city': ' Dallas',\n 'state': {\n 'abbreviation': 'TX',\n 'name': 'Texas'\n },\n 'orders': [\n { 'productName': 'Bow', 'itemCost': 399.99 },\n { 'productName': 'Arrows', 'itemCost': 69.99 }\n ],\n 'latitude': 32.782927,\n 'longitude': -96.806191\n },\n {\n 'id': 6,\n 'firstName': 'Brad',\n 'lastName': 'Green',\n 'gender': 'male',\n 'address': '9874 Center St.',\n 'city': 'Orlando ',\n 'state': {\n 'abbreviation': 'FL',\n 'name': 'Florida'\n },\n 'orders': [\n { 'productName': 'Baseball', 'itemCost': 9.99 },\n { 'productName': 'Bat', 'itemCost': 19.99 }\n ],\n 'latitude': 28.384238,\n 'longitude': -81.564103\n },\n {\n 'id': 7,\n 'firstName': 'Misko',\n 'lastName': 'Hevery',\n 'gender': 'male',\n 'address': '9812 Builtway Appt #1',\n 'city': 'Carey ',\n 'state': {\n 'abbreviation': 'NC',\n 'name': 'North Carolina'\n },\n 'orders': [\n { 'productName': 'Surfboard', 'itemCost': 299.99 },\n { 'productName': 'Wax', 'itemCost': 5.99 },\n { 'productName': 'Shark Repellent', 'itemCost': 15.99 }\n ],\n 'latitude': 35.727985,\n 'longitude': -78.797594\n },\n {\n 'id': 8,\n 'firstName': 'Heedy',\n 'lastName': 'Wahlin',\n 'gender': 'female',\n 'address': '4651 Tuvo St.',\n 'city': 'Anaheim',\n 'state': {\n 'abbreviation': 'CA',\n 'name': 'California'\n },\n 'orders': [\n { 'productName': 'Saddle', 'itemCost': 599.99 },\n { 'productName': 'Riding cap', 'itemCost': 79.99 }\n ],\n 'latitude': 33.809898,\n 'longitude': -117.918757\n },\n {\n 'id': 9,\n 'firstName': 'John',\n 'lastName': 'Papa',\n 'gender': 'male',\n 'address': '66 Ray St.',\n 'city': ' Orlando',\n 'state': {\n 'abbreviation': 'FL',\n 'name': 'Florida'\n },\n 'orders': [\n { 'productName': 'Baseball', 'itemCost': 9.99 },\n { 'productName': 'Bat', 'itemCost': 19.99 }\n ],\n 'latitude': 28.384238,\n 'longitude': -81.564103\n },\n {\n 'id': 10,\n 'firstName': 'Tonya',\n 'lastName': 'Smith',\n 'gender': 'female',\n 'address': '1455 Chandler Blvd.',\n 'city': ' Atlanta',\n 'state': {\n 'abbreviation': 'GA',\n 'name': 'Georgia'\n },\n 'orders': [\n { 'productName': 'Surfboard', 'itemCost': 299.99 },\n { 'productName': 'Wax', 'itemCost': 5.99 },\n { 'productName': 'Shark Repellent', 'itemCost': 7.99 }\n ],\n 'latitude': 33.762297,\n 'longitude': -84.392953\n },\n {\n 'id': 11,\n 'firstName': 'ward',\n 'lastName': 'bell',\n 'gender': 'male',\n 'address': '888 Central St.',\n 'city': 'Los Angeles',\n 'state': {\n 'abbreviation': 'CA',\n 'name': 'California'\n },\n 'latitude': 34.042552,\n 'longitude': -118.266429\n },\n {\n 'id': 12,\n 'firstName': 'Marcus',\n 'lastName': 'Hightower',\n 'gender': 'male',\n 'address': '1699 Atomic St.',\n 'city': 'Dallas',\n 'state': {\n 'abbreviation': 'TX',\n 'name': 'Texas'\n },\n 'latitude': 32.782927,\n 'longitude': -96.806191\n },\n {\n 'id': 13,\n 'firstName': 'Thomas',\n 'lastName': 'Martin',\n 'gender': 'male',\n 'address': '98756 Center St.',\n 'city': 'New York',\n 'state': {\n 'abbreviation': 'NY',\n 'name': 'New York City'\n },\n 'orders': [\n { 'productName': 'Car', 'itemCost': 42999.99 },\n { 'productName': 'Wax', 'itemCost': 5.99 },\n { 'productName': 'Shark Repellent', 'itemCost': 7.99 }\n ],\n 'latitude': 40.725037,\n 'longitude': -74.004903\n },\n {\n 'id': 14,\n 'firstName': 'Jean',\n 'lastName': 'Martin',\n 'gender': 'female',\n 'address': '98756 Center St.',\n 'city': 'New York City',\n 'state': {\n 'abbreviation': 'NY',\n 'name': 'New York'\n },\n 'latitude': 40.725037,\n 'longitude': -74.004903\n },\n {\n 'id': 15,\n 'firstName': 'Pinal',\n 'lastName': 'Dave',\n 'gender': 'male',\n 'address': '23566 Directive Pl.',\n 'city': 'White Plains',\n 'state': {\n 'abbreviation': 'NY',\n 'name': 'New York'\n },\n 'latitude': 41.028726,\n 'longitude': -73.758261\n },\n {\n 'id': 16,\n 'firstName': 'Robin',\n 'lastName': 'Cleark',\n 'gender': 'female',\n 'address': '35632 Richmond Circle Apt B',\n 'city': 'Las Vegas',\n 'state': {\n 'abbreviation': 'NV',\n 'name': 'Nevada'\n },\n 'latitude': 36.091824,\n 'longitude': -115.174247\n },\n {\n 'id': 17,\n 'firstName': 'Fred',\n 'lastName': 'Roberts',\n 'gender': 'male',\n 'address': '12 Ocean View St.',\n 'city': 'Houston',\n 'state': {\n 'abbreviation': 'TX',\n 'name': 'Texas'\n },\n 'latitude': 29.750163,\n 'longitude': -95.362769\n },\n {\n 'id': 18,\n 'firstName': 'Robyn',\n 'lastName': 'Flores',\n 'gender': 'female',\n 'address': '23423 Adams St.',\n 'city': 'Seattle',\n 'state': {\n 'abbreviation': 'WA',\n 'name': 'Washington'\n },\n 'latitude': 47.596,\n 'longitude': -122.331\n },\n {\n 'id': 19,\n 'firstName': 'Elaine',\n 'lastName': 'Jones',\n 'gender': 'female',\n 'address': '98756 Center St.',\n 'city': 'Barcelona',\n 'state': {\n 'abbreviation': 'CAT',\n 'name': 'Catalonia'\n },\n 'latitude': 41.386444,\n 'longitude': 2.111988\n },\n {\n 'id': 20,\n 'firstName': 'Lilija',\n 'lastName': 'Arnarson',\n 'gender': 'female',\n 'address': '23423 Adams St.',\n 'city': 'Reykjavik',\n 'state': {\n 'abbreviation': 'IS',\n 'name': 'Iceland'\n },\n 'latitude': 64.120278,\n 'longitude': -21.830471\n },\n {\n 'id': 21,\n 'firstName': 'Laurent',\n 'lastName': 'Bugnion',\n 'gender': 'male',\n 'address': '9874 Lake Blvd.',\n 'city': 'Zurich',\n 'state': {\n 'abbreviation': 'COZ',\n 'name': 'Canton of Zurick'\n },\n 'orders': [\n { 'productName': 'Baseball', 'itemCost': 9.99 },\n { 'productName': 'Bat', 'itemCost': 19.99 }\n ],\n 'latitude': 47.341337,\n 'longitude': 8.582503\n },\n {\n 'id': 22,\n 'firstName': 'Gabriel',\n 'lastName': 'Flores',\n 'gender': 'male',\n 'address': '2543 Cassiano',\n 'city': 'Rio de Janeiro',\n 'state': {\n 'abbreviation': 'WA',\n 'name': 'Rio de Janeiro'\n },\n 'latitude': -22.919369,\n 'longitude': -43.181836\n }\n]" + }, + { + "name": "Deno", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "deno/loadfile.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/environments/environment.prod.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: true\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/environments/environment.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: false\n}" + }, + { + "name": "Large", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Button.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "LoggedIn", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Header.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "LoggedIn", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Page.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "LoggedOut", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Header.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "LoggedOut", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Page.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "port", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "deno/server.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "8080" + }, + { + "name": "Primary", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Button.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "require", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type" + }, + { + "name": "sandboxConfig", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/app/customers/customers.component.sandbox.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n imports: [ SharedModule, CoreModule, RouterTestingModule ],\n declarations: [ CustomersCardComponent, CustomersGridComponent ],\n providers: [\n { provide: DataService, useClass: MockDataService }\n],\n label: 'Customers Component'\n}" + }, + { + "name": "sandboxConfig", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/app/customers/customers-grid/customers-grid.component.sandbox.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n imports: [ SharedModule, CoreModule, RouterTestingModule ],\n label: 'Customers Grid Component'\n}" + }, + { + "name": "sandboxConfig", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/app/customers/customers-card/customers-card.component.sandbox.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n imports: [ SharedModule, CoreModule, RouterTestingModule ],\n label: 'Customers Card Component'\n}" + }, + { + "name": "sandboxConfig", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/app/customer/customer-details/customer-details.component.sandbox.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n imports: [ SharedModule, CoreModule ],\n providers: [\n { provide: DataService, useClass: MockDataService },\n { provide: ActivatedRoute, useFactory: () => {\n const route = getActivatedRouteWithParent([{ id: '1' }]);\n return route;\n }}\n ],\n label: 'Customer Details Component'\n}" + }, + { + "name": "sandboxConfig", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/app/customer/customer-orders/customer-orders.component.sandbox.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n imports: [ SharedModule, CoreModule ],\n providers: [\n { provide: DataService, useClass: MockDataService },\n { provide: ActivatedRoute, useFactory: () => {\n const route = getActivatedRouteWithParent([{ id: '1' }]);\n return route;\n }}\n ],\n label: 'Customer Orders Component'\n}" + }, + { + "name": "Secondary", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Button.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "Small", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Button.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "Template.bind({})" + }, + { + "name": "Template", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/About.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "(args: AboutComponent) => ({\n component: AboutComponent,\n props: args,\n})" + }, + { + "name": "Template", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "src/stories/Button.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/public/js/dashboard.js b/public/js/dashboard.js deleted file mode 100644 index af2f975..0000000 --- a/public/js/dashboard.js +++ /dev/null @@ -1 +0,0 @@ -console.log("asdasd") \ No newline at end of file diff --git a/public/js/jquery.js b/public/js/jquery.js deleted file mode 100644 index d1608e3..0000000 --- a/public/js/jquery.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; -if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("