├── www
├── build
│ ├── main.css.map
│ ├── sw-toolbox.js
│ └── polyfills.js
├── assets
│ ├── icon
│ │ └── favicon.ico
│ └── fonts
│ │ ├── ionicons.eot
│ │ ├── ionicons.ttf
│ │ ├── ionicons.woff
│ │ ├── ionicons.woff2
│ │ ├── roboto-bold.ttf
│ │ ├── roboto-bold.woff
│ │ ├── roboto-bold.woff2
│ │ ├── roboto-light.ttf
│ │ ├── roboto-light.woff
│ │ ├── roboto-medium.ttf
│ │ ├── noto-sans-bold.ttf
│ │ ├── noto-sans-bold.woff
│ │ ├── roboto-light.woff2
│ │ ├── roboto-medium.woff
│ │ ├── roboto-medium.woff2
│ │ ├── roboto-regular.ttf
│ │ ├── roboto-regular.woff
│ │ ├── roboto-regular.woff2
│ │ ├── noto-sans-regular.ttf
│ │ ├── noto-sans-regular.woff
│ │ ├── ionicons.scss
│ │ ├── noto-sans.scss
│ │ └── roboto.scss
├── manifest.json
├── service-worker.js
└── index.html
├── .gitignore
├── src
├── app
│ ├── app.html
│ ├── main.ts
│ ├── app.scss
│ ├── app.component.ts
│ └── app.module.ts
├── assets
│ └── icon
│ │ └── favicon.ico
├── pages
│ ├── tabs
│ │ ├── tabs.html
│ │ └── tabs.ts
│ ├── categories_list
│ │ ├── categories_list.html
│ │ └── categories_list.ts
│ └── products_list
│ │ ├── products_list.html
│ │ └── products_list.ts
├── manifest.json
├── declarations.d.ts
├── service-worker.js
├── index.html
└── theme
│ └── variables.scss
├── resources
├── icon.png
├── splash.png
├── ios
│ ├── icon
│ │ ├── icon.png
│ │ ├── icon-40.png
│ │ ├── icon-50.png
│ │ ├── icon-60.png
│ │ ├── icon-72.png
│ │ ├── icon-76.png
│ │ ├── icon@2x.png
│ │ ├── icon-40@2x.png
│ │ ├── icon-40@3x.png
│ │ ├── icon-50@2x.png
│ │ ├── icon-60@2x.png
│ │ ├── icon-60@3x.png
│ │ ├── icon-72@2x.png
│ │ ├── icon-76@2x.png
│ │ ├── icon-small.png
│ │ ├── icon-83.5@2x.png
│ │ ├── icon-small@2x.png
│ │ └── icon-small@3x.png
│ └── splash
│ │ ├── Default-667h.png
│ │ ├── Default-736h.png
│ │ ├── Default~iphone.png
│ │ ├── Default@2x~iphone.png
│ │ ├── Default-568h@2x~iphone.png
│ │ ├── Default-Landscape-736h.png
│ │ ├── Default-Landscape~ipad.png
│ │ ├── Default-Portrait~ipad.png
│ │ ├── Default-Portrait@2x~ipad.png
│ │ ├── Default-Landscape@2x~ipad.png
│ │ ├── Default-Landscape@~ipadpro.png
│ │ └── Default-Portrait@~ipadpro.png
└── android
│ ├── icon
│ ├── drawable-hdpi-icon.png
│ ├── drawable-ldpi-icon.png
│ ├── drawable-mdpi-icon.png
│ ├── drawable-xhdpi-icon.png
│ ├── drawable-xxhdpi-icon.png
│ └── drawable-xxxhdpi-icon.png
│ └── splash
│ ├── drawable-land-hdpi-screen.png
│ ├── drawable-land-ldpi-screen.png
│ ├── drawable-land-mdpi-screen.png
│ ├── drawable-port-hdpi-screen.png
│ ├── drawable-port-ldpi-screen.png
│ ├── drawable-port-mdpi-screen.png
│ ├── drawable-land-xhdpi-screen.png
│ ├── drawable-land-xxhdpi-screen.png
│ ├── drawable-land-xxxhdpi-screen.png
│ ├── drawable-port-xhdpi-screen.png
│ ├── drawable-port-xxhdpi-screen.png
│ └── drawable-port-xxxhdpi-screen.png
├── ionic.config.json
├── tslint.json
├── tsconfig.json
├── README.md
├── package.json
└── config.xml
/www/build/main.css.map:
--------------------------------------------------------------------------------
1 | null
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
--------------------------------------------------------------------------------
/src/app/app.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/icon.png
--------------------------------------------------------------------------------
/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cosmic-demo",
3 | "app_id": "",
4 | "type": "ionic-angular"
5 | }
6 |
--------------------------------------------------------------------------------
/resources/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/splash.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon.png
--------------------------------------------------------------------------------
/src/assets/icon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/src/assets/icon/favicon.ico
--------------------------------------------------------------------------------
/www/assets/icon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/icon/favicon.ico
--------------------------------------------------------------------------------
/www/assets/fonts/ionicons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/ionicons.eot
--------------------------------------------------------------------------------
/www/assets/fonts/ionicons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/ionicons.ttf
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-40.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-50.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-60.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-72.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-76.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon@2x.png
--------------------------------------------------------------------------------
/www/assets/fonts/ionicons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/ionicons.woff
--------------------------------------------------------------------------------
/www/assets/fonts/ionicons.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/ionicons.woff2
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-bold.ttf
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-40@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-40@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-50@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-60@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-60@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-72@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-76@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-small.png
--------------------------------------------------------------------------------
/src/pages/tabs/tabs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-bold.woff
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-bold.woff2
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-light.ttf
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-light.woff
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-medium.ttf
--------------------------------------------------------------------------------
/resources/ios/icon/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-83.5@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-small@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/icon/icon-small@3x.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-667h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-667h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-736h.png
--------------------------------------------------------------------------------
/www/assets/fonts/noto-sans-bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/noto-sans-bold.ttf
--------------------------------------------------------------------------------
/www/assets/fonts/noto-sans-bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/noto-sans-bold.woff
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-light.woff2
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-medium.woff
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-medium.woff2
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-regular.ttf
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-regular.woff
--------------------------------------------------------------------------------
/www/assets/fonts/roboto-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/roboto-regular.woff2
--------------------------------------------------------------------------------
/resources/ios/splash/Default~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default~iphone.png
--------------------------------------------------------------------------------
/www/assets/fonts/noto-sans-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/noto-sans-regular.ttf
--------------------------------------------------------------------------------
/www/assets/fonts/noto-sans-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/www/assets/fonts/noto-sans-regular.woff
--------------------------------------------------------------------------------
/resources/ios/splash/Default@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default@2x~iphone.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-hdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/icon/drawable-hdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-ldpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/icon/drawable-ldpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-mdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/icon/drawable-mdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/icon/drawable-xhdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/icon/drawable-xxhdpi-icon.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-568h@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-568h@2x~iphone.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-Landscape-736h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-Landscape~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-Portrait~ipad.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xxxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/icon/drawable-xxxhdpi-icon.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-Portrait@2x~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-Landscape@2x~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape@~ipadpro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-Landscape@~ipadpro.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait@~ipadpro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/ios/splash/Default-Portrait@~ipadpro.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-land-hdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-land-ldpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-land-mdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-port-hdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-port-ldpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-port-mdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-land-xhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-land-xxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-land-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-port-xhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-port-xxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/ionic-angular-app/master/resources/android/splash/drawable-port-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/src/app/main.ts:
--------------------------------------------------------------------------------
1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2 |
3 | import { AppModule } from './app.module';
4 |
5 | platformBrowserDynamic().bootstrapModule(AppModule);
6 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "no-duplicate-variable": true,
4 | "no-unused-variable": [
5 | true
6 | ]
7 | },
8 | "rulesDirectory": [
9 | "node_modules/tslint-eslint-rules/dist/rules"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/src/pages/tabs/tabs.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | import { CategoriesList } from '../categories_list/categories_list';
4 |
5 | @Component({
6 | templateUrl: 'tabs.html'
7 | })
8 | export class TabsPage {
9 |
10 | tab1Root = CategoriesList;
11 |
12 | constructor() {
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ionic",
3 | "short_name": "Ionic",
4 | "start_url": "index.html",
5 | "display": "standalone",
6 | "icons": [{
7 | "src": "assets/imgs/logo.png",
8 | "sizes": "512x512",
9 | "type": "image/png"
10 | }],
11 | "background_color": "#4e8ef7",
12 | "theme_color": "#4e8ef7"
13 | }
--------------------------------------------------------------------------------
/www/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ionic",
3 | "short_name": "Ionic",
4 | "start_url": "index.html",
5 | "display": "standalone",
6 | "icons": [{
7 | "src": "assets/imgs/logo.png",
8 | "sizes": "512x512",
9 | "type": "image/png"
10 | }],
11 | "background_color": "#4e8ef7",
12 | "theme_color": "#4e8ef7"
13 | }
--------------------------------------------------------------------------------
/src/pages/categories_list/categories_list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Categories
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "declaration": false,
5 | "emitDecoratorMetadata": true,
6 | "experimentalDecorators": true,
7 | "lib": [
8 | "dom",
9 | "es2015"
10 | ],
11 | "module": "es2015",
12 | "moduleResolution": "node",
13 | "sourceMap": true,
14 | "target": "es5"
15 | },
16 | "include": [
17 | "src/**/*.ts"
18 | ],
19 | "exclude": [
20 | "node_modules"
21 | ],
22 | "compileOnSave": false,
23 | "atom": {
24 | "rewriteTsconfig": false
25 | }
26 | }
--------------------------------------------------------------------------------
/src/pages/products_list/products_list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ category_title }}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{ product.title }}
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/declarations.d.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Declaration files are how the Typescript compiler knows about the type information(or shape) of an object.
3 | They're what make intellisense work and make Typescript know all about your code.
4 |
5 | A wildcard module is declared below to allow third party libraries to be used in an app even if they don't
6 | provide their own type declarations.
7 |
8 | To learn more about using third party libraries in an Ionic app, check out the docs here:
9 | http://ionicframework.com/docs/v2/resources/third-party-libs/
10 |
11 | For more info on type definition files, check out the Typescript docs here:
12 | https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html
13 | */
14 | declare module '*';
--------------------------------------------------------------------------------
/src/app/app.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/v2/theming/
2 |
3 |
4 | // App Global Sass
5 | // --------------------------------------------------
6 | // Put style rules here that you want to apply globally. These
7 | // styles are for the entire app and not just one component.
8 | // Additionally, this file can be also used as an entry point
9 | // to import other Sass files to be included in the output CSS.
10 | //
11 | // Shared Sass variables, which can be used to adjust Ionic's
12 | // default Sass variables, belong in "theme/variables.scss".
13 | //
14 | // To declare rules for a specific mode, create a child rule
15 | // for the .md, .ios, or .wp mode classes. The mode class is
16 | // automatically applied to the
element in the app.
17 |
--------------------------------------------------------------------------------
/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { Platform } from 'ionic-angular';
3 | import { StatusBar } from '@ionic-native/status-bar';
4 | import { SplashScreen } from '@ionic-native/splash-screen';
5 |
6 | import { TabsPage } from '../pages/tabs/tabs';
7 |
8 | @Component({
9 | templateUrl: 'app.html'
10 | })
11 | export class MyApp {
12 | rootPage:any = TabsPage;
13 |
14 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
15 | platform.ready().then(() => {
16 | // Okay, so the platform is ready and our plugins are available.
17 | // Here you can do any higher level native things you might need.
18 | statusBar.styleDefault();
19 | splashScreen.hide();
20 | });
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/service-worker.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Check out https://googlechrome.github.io/sw-toolbox/ for
3 | * more info on how to use sw-toolbox to custom configure your service worker.
4 | */
5 |
6 |
7 | 'use strict';
8 | importScripts('./build/sw-toolbox.js');
9 |
10 | self.toolbox.options.cache = {
11 | name: 'ionic-cache'
12 | };
13 |
14 | // pre-cache our key assets
15 | self.toolbox.precache(
16 | [
17 | './build/main.js',
18 | './build/main.css',
19 | './build/polyfills.js',
20 | 'index.html',
21 | 'manifest.json'
22 | ]
23 | );
24 |
25 | // dynamically cache any other local assets
26 | self.toolbox.router.any('/*', self.toolbox.cacheFirst);
27 |
28 | // for any other requests go to the network, cache,
29 | // and then only use that cached resource if your user goes offline
30 | self.toolbox.router.default = self.toolbox.networkFirst;
31 |
--------------------------------------------------------------------------------
/www/service-worker.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Check out https://googlechrome.github.io/sw-toolbox/ for
3 | * more info on how to use sw-toolbox to custom configure your service worker.
4 | */
5 |
6 |
7 | 'use strict';
8 | importScripts('./build/sw-toolbox.js');
9 |
10 | self.toolbox.options.cache = {
11 | name: 'ionic-cache'
12 | };
13 |
14 | // pre-cache our key assets
15 | self.toolbox.precache(
16 | [
17 | './build/main.js',
18 | './build/main.css',
19 | './build/polyfills.js',
20 | 'index.html',
21 | 'manifest.json'
22 | ]
23 | );
24 |
25 | // dynamically cache any other local assets
26 | self.toolbox.router.any('/*', self.toolbox.cacheFirst);
27 |
28 | // for any other requests go to the network, cache,
29 | // and then only use that cached resource if your user goes offline
30 | self.toolbox.router.default = self.toolbox.networkFirst;
31 |
--------------------------------------------------------------------------------
/src/pages/categories_list/categories_list.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { NavController } from 'ionic-angular';
3 | import Cosmic from 'cosmicjs';
4 | import { ProductsList } from '../products_list/products_list';
5 |
6 | @Component({
7 | selector: 'page-categories',
8 | templateUrl: 'categories_list.html'
9 | })
10 | export class CategoriesList {
11 | public categories;
12 |
13 | constructor(
14 | public navCtrl: NavController
15 | ) {
16 | this.categories = [];
17 |
18 | Cosmic.getObjectType({
19 | bucket: {
20 | slug: 'ionic-angular-app'
21 | }
22 | }, {
23 | type_slug: 'categories'
24 | }, (err, res) => {
25 | this.categories = res.objects.all;
26 | });
27 | }
28 |
29 | navToCategory(category) {
30 | this.navCtrl.push(ProductsList, { title: category.title, id: category._id });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/www/assets/fonts/ionicons.scss:
--------------------------------------------------------------------------------
1 |
2 | // Ionicons Icon Font CSS
3 | // --------------------------
4 | // Ionicons CSS for Ionic's element
5 | // ionicons-icons.scss has the icons and their unicode characters
6 |
7 | $ionicons-font-path: $font-path !default;
8 |
9 | @import "ionicons-icons";
10 | @import "ionicons-variables";
11 |
12 |
13 | @font-face {
14 | font-family: "Ionicons";
15 | src: url("#{$ionicons-font-path}/ionicons.woff2?v=#{$ionicons-version}") format("woff2"),
16 | url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"),
17 | url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype");
18 | font-weight: normal;
19 | font-style: normal;
20 | }
21 |
22 | ion-icon {
23 | display: inline-block;
24 |
25 | font-family: "Ionicons";
26 | -moz-osx-font-smoothing: grayscale;
27 | -webkit-font-smoothing: antialiased;
28 | font-style: normal;
29 | font-variant: normal;
30 | font-weight: normal;
31 | line-height: 1;
32 | text-rendering: auto;
33 | text-transform: none;
34 | speak: none;
35 | }
36 |
--------------------------------------------------------------------------------
/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, ErrorHandler } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { HttpModule } from '@angular/http';
4 | import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
5 | import { MyApp } from './app.component';
6 |
7 | import { ProductsList } from '../pages/products_list/products_list';
8 | import { CategoriesList } from '../pages/categories_list/categories_list';
9 | import { TabsPage } from '../pages/tabs/tabs';
10 |
11 | import { StatusBar } from '@ionic-native/status-bar';
12 | import { SplashScreen } from '@ionic-native/splash-screen';
13 |
14 | @NgModule({
15 | declarations: [
16 | MyApp,
17 | CategoriesList,
18 | TabsPage,
19 | ProductsList
20 | ],
21 | imports: [
22 | BrowserModule,
23 | HttpModule,
24 | IonicModule.forRoot(MyApp)
25 | ],
26 | bootstrap: [IonicApp],
27 | entryComponents: [
28 | MyApp,
29 | CategoriesList,
30 | TabsPage,
31 | ProductsList
32 | ],
33 | providers: [
34 | StatusBar,
35 | SplashScreen,
36 | {provide: ErrorHandler, useClass: IonicErrorHandler}
37 | ]
38 | })
39 |
40 | export class AppModule {}
41 |
--------------------------------------------------------------------------------
/www/assets/fonts/noto-sans.scss:
--------------------------------------------------------------------------------
1 | // Noto Sans Font
2 | // Google
3 | // Apache License, version 2.0
4 | // http://www.apache.org/licenses/LICENSE-2.0.html
5 |
6 | $noto-sans-font-path: $font-path !default;
7 |
8 | @font-face {
9 | font-family: "Noto Sans";
10 | font-style: normal;
11 | font-weight: 300;
12 | src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
13 | }
14 |
15 | @font-face {
16 | font-family: "Noto Sans";
17 | font-style: normal;
18 | font-weight: 400;
19 | src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
20 | }
21 |
22 | @font-face {
23 | font-family: "Noto Sans";
24 | font-style: normal;
25 | font-weight: 500;
26 | src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
27 | }
28 |
29 | @font-face {
30 | font-family: "Noto Sans";
31 | font-style: normal;
32 | font-weight: 700;
33 | src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
34 | }
35 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ionic App
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/pages/products_list/products_list.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { NavController, NavParams } from 'ionic-angular';
3 | import {Http} from '@angular/http';
4 | import { DomSanitizer } from '@angular/platform-browser'
5 |
6 | @Component({
7 | selector: 'page-products-list',
8 | templateUrl: 'products_list.html'
9 | })
10 | export class ProductsList {
11 | public products;
12 | public category_title;
13 |
14 | constructor(
15 | public navCtrl: NavController,
16 | public params: NavParams,
17 | public http: Http,
18 | private sanitizer: DomSanitizer
19 | ) {
20 | this.products = [];
21 | this.category_title = this.params.get('title');
22 |
23 | this.http.get(`https://api.cosmicjs.com/v1/ionic-angular-app/object-type/products/search?metafield_key=category&metafield_value=${this.params.get('id')}`).subscribe((resp) => {
24 | let data = resp.json();
25 | console.log(data);
26 | if (data.objects) {
27 | this.products = data.objects;
28 | }
29 | else {
30 | this.products = [];
31 | }
32 | });
33 | }
34 |
35 | getImageUrl(product) {
36 | let url = product.metafields.find((v) => { return (v.key == 'image') }).value;
37 | return `https://cosmicjs.imgix.net/${url}`;
38 | }
39 |
40 | sanContent(product): any {
41 | return this.sanitizer.bypassSecurityTrustHtml(product.content);
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Ionic Angular App
2 | A simple product catalog mobile app built with Angular JS, Ionic and Cosmic JS.
3 | 
4 | ## Tutorial
5 | View the blog article: [How to Build a Mobile Product Catalog App Using Angular JS, Ionic and Cosmic JS](https://cosmicjs.com/blog/how-to-build-a-mobile-product-catalog-app-using-angular-js-ionic-and-cosmic-js)
6 | ## Prerequisites
7 | You’ll need the node.js, npm and ionic cli pre-installed. Make sure you already have them before start. Please refer to ionic docs how to do this. You need Ionic framework >= 2.0 to run this example, so make sure you have the right Ionic version:
8 | ```
9 | ionic -v
10 | ```
11 | ## Getting Started
12 | 1. Go to Cosmic JS and [create an account](https://cosmicjs.com).
13 | 2. Create a Bucket to store the information for your products and categories.
14 | 3. Install the App located at Your Bucket > Apps > Ionic Angular App.
15 | ```
16 | git clone https://github.com/cosmicjs/ionic-angular-app
17 | ionic serve
18 | ```
19 | The installer will ask you some questions about installing node modules and ionic packages, click "y" through each. You app will open automatically at http://localhost:8100
20 |
21 | 
22 |
23 | ## Configure
24 | Edit config.ts to point to your Bucket:
25 | ```
26 | export default {
27 | bucket: {
28 | slug: 'ionic-angular-app'
29 | }
30 | }
31 | ```
32 |
--------------------------------------------------------------------------------
/www/assets/fonts/roboto.scss:
--------------------------------------------------------------------------------
1 | // Roboto Font
2 | // Google
3 | // Apache License, version 2.0
4 | // http://www.apache.org/licenses/LICENSE-2.0.html
5 |
6 | $roboto-font-path: $font-path !default;
7 |
8 | @font-face {
9 | font-family: "Roboto";
10 | font-style: normal;
11 | font-weight: 300;
12 | src: local("Roboto Light"), local("Roboto-Light"), url("#{$roboto-font-path}/roboto-light.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-light.woff") format("woff"), url("#{$roboto-font-path}/roboto-light.ttf") format("truetype");
13 | }
14 |
15 | @font-face {
16 | font-family: "Roboto";
17 | font-style: normal;
18 | font-weight: 400;
19 | src: local("Roboto"), local("Roboto-Regular"), url("#{$roboto-font-path}/roboto-regular.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-regular.woff") format("woff"), url("#{$roboto-font-path}/roboto-regular.ttf") format("truetype");
20 | }
21 |
22 | @font-face {
23 | font-family: "Roboto";
24 | font-style: normal;
25 | font-weight: 500;
26 | src: local("Roboto Medium"), local("Roboto-Medium"), url("#{$roboto-font-path}/roboto-medium.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-medium.woff") format("woff"), url("#{$roboto-font-path}/roboto-medium.ttf") format("truetype");
27 | }
28 |
29 | @font-face {
30 | font-family: "Roboto";
31 | font-style: normal;
32 | font-weight: 700;
33 | src: local("Roboto Bold"), local("Roboto-Bold"), url("#{$roboto-font-path}/roboto-bold.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-bold.woff") format("woff"), url("#{$roboto-font-path}/roboto-bold.ttf") format("truetype");
34 | }
35 |
--------------------------------------------------------------------------------
/www/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 | Ionic App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ionic-hello-world",
3 | "version": "0.0.0",
4 | "author": "Ionic Framework",
5 | "homepage": "http://ionicframework.com/",
6 | "private": true,
7 | "scripts": {
8 | "clean": "ionic-app-scripts clean",
9 | "build": "ionic-app-scripts build",
10 | "lint": "ionic-app-scripts lint",
11 | "ionic:build": "ionic-app-scripts build",
12 | "ionic:serve": "ionic-app-scripts serve"
13 | },
14 | "dependencies": {
15 | "@angular/common": "4.1.0",
16 | "@angular/compiler": "4.1.0",
17 | "@angular/compiler-cli": "4.1.0",
18 | "@angular/core": "4.1.0",
19 | "@angular/forms": "4.1.0",
20 | "@angular/http": "4.1.0",
21 | "@angular/platform-browser": "4.1.0",
22 | "@angular/platform-browser-dynamic": "4.1.0",
23 | "@ionic-native/core": "3.7.0",
24 | "@ionic-native/splash-screen": "3.7.0",
25 | "@ionic-native/status-bar": "3.7.0",
26 | "@ionic/storage": "2.0.1",
27 | "cosmicjs": "^2.39.0",
28 | "ionic-angular": "3.2.1",
29 | "ionicons": "3.0.0",
30 | "rxjs": "5.1.1",
31 | "sw-toolbox": "3.6.0",
32 | "zone.js": "0.8.10"
33 | },
34 | "devDependencies": {
35 | "@ionic/app-scripts": "1.3.7",
36 | "@ionic/cli-plugin-ionic-angular": "1.1.2",
37 | "typescript": "2.2.1"
38 | },
39 | "cordovaPlugins": [
40 | "cordova-plugin-whitelist",
41 | "cordova-plugin-console",
42 | "cordova-plugin-device",
43 | "cordova-plugin-statusbar",
44 | "cordova-plugin-splashscreen",
45 | "ionic-plugin-keyboard"
46 | ],
47 | "cordovaPlatforms": [
48 | "ios",
49 | {
50 | "platform": "ios",
51 | "version": "",
52 | "locator": "ios"
53 | }
54 | ],
55 | "description": "cosmic-demo: An Ionic project"
56 | }
57 |
--------------------------------------------------------------------------------
/src/theme/variables.scss:
--------------------------------------------------------------------------------
1 | // Ionic Variables and Theming. For more info, please see:
2 | // http://ionicframework.com/docs/v2/theming/
3 | $font-path: "../assets/fonts";
4 |
5 | @import "ionic.globals";
6 |
7 |
8 | // Shared Variables
9 | // --------------------------------------------------
10 | // To customize the look and feel of this app, you can override
11 | // the Sass variables found in Ionic's source scss files.
12 | // To view all the possible Ionic variables, see:
13 | // http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/
14 |
15 |
16 |
17 |
18 | // Named Color Variables
19 | // --------------------------------------------------
20 | // Named colors makes it easy to reuse colors on various components.
21 | // It's highly recommended to change the default colors
22 | // to match your app's branding. Ionic uses a Sass map of
23 | // colors so you can add, rename and remove colors as needed.
24 | // The "primary" color is the only required color in the map.
25 |
26 | $colors: (
27 | primary: #488aff,
28 | secondary: #32db64,
29 | danger: #f53d3d,
30 | light: #f4f4f4,
31 | dark: #222
32 | );
33 |
34 |
35 | // App iOS Variables
36 | // --------------------------------------------------
37 | // iOS only Sass variables can go here
38 |
39 |
40 |
41 |
42 | // App Material Design Variables
43 | // --------------------------------------------------
44 | // Material Design only Sass variables can go here
45 |
46 |
47 |
48 |
49 | // App Windows Variables
50 | // --------------------------------------------------
51 | // Windows only Sass variables can go here
52 |
53 |
54 |
55 |
56 | // App Theme
57 | // --------------------------------------------------
58 | // Ionic apps can have different themes applied, which can
59 | // then be future customized. This import comes last
60 | // so that the above variables are used and Ionic's
61 | // default are overridden.
62 |
63 | @import "ionic.theme.default";
64 |
65 |
66 | // Ionicons
67 | // --------------------------------------------------
68 | // The premium icon font for Ionic. For more info, please see:
69 | // http://ionicframework.com/docs/v2/ionicons/
70 |
71 | @import "ionic.ionicons";
72 |
73 |
74 | // Fonts
75 | // --------------------------------------------------
76 |
77 | @import "roboto";
78 | @import "noto-sans";
79 |
80 | .white-space-normal {
81 | white-space: normal;
82 | }
--------------------------------------------------------------------------------
/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | cosmic-demo
4 | An awesome Ionic/Cordova app.
5 | Ionic Framework Team
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/www/build/sw-toolbox.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.toolbox=e()}}(function(){return function e(t,n,r){function o(c,s){if(!n[c]){if(!t[c]){var a="function"==typeof require&&require;if(!s&&a)return a(c,!0);if(i)return i(c,!0);var u=new Error("Cannot find module '"+c+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[c]={exports:{}};t[c][0].call(f.exports,function(e){var n=t[c][1][e];return o(n?n:e)},f,f.exports,e,t,n,r)}return n[c].exports}for(var i="function"==typeof require&&require,c=0;ct.value[l]){var r=t.value[p];c.push(r),a.delete(r),t.continue()}},s.oncomplete=function(){r(c)},s.onabort=o}):Promise.resolve([])}function s(e,t){return t?new Promise(function(n,r){var o=[],i=e.transaction(h,"readwrite"),c=i.objectStore(h),s=c.index(l),a=s.count();s.count().onsuccess=function(){var e=a.result;e>t&&(s.openCursor().onsuccess=function(n){var r=n.target.result;if(r){var i=r.value[p];o.push(i),c.delete(i),e-o.length>t&&r.continue()}})},i.oncomplete=function(){n(o)},i.onabort=r}):Promise.resolve([])}function a(e,t,n,r){return c(e,n,r).then(function(n){return s(e,t).then(function(e){return n.concat(e)})})}var u="sw-toolbox-",f=1,h="store",p="url",l="timestamp",d={};t.exports={getDb:o,setTimestampForUrl:i,expireEntries:a}},{}],3:[function(e,t,n){"use strict";function r(e){var t=a.match(e.request);t?e.respondWith(t(e.request)):a.default&&"GET"===e.request.method&&0===e.request.url.indexOf("http")&&e.respondWith(a.default(e.request))}function o(e){s.debug("activate event fired");var t=u.cache.name+"$$$inactive$$$";e.waitUntil(s.renameCache(t,u.cache.name))}function i(e){return e.reduce(function(e,t){return e.concat(t)},[])}function c(e){var t=u.cache.name+"$$$inactive$$$";s.debug("install event fired"),s.debug("creating cache ["+t+"]"),e.waitUntil(s.openCache({cache:{name:t}}).then(function(e){return Promise.all(u.preCacheItems).then(i).then(s.validatePrecacheInput).then(function(t){return s.debug("preCache list: "+(t.join(", ")||"(none)")),e.addAll(t)})}))}e("serviceworker-cache-polyfill");var s=e("./helpers"),a=e("./router"),u=e("./options");t.exports={fetchListener:r,activateListener:o,installListener:c}},{"./helpers":1,"./options":4,"./router":6,"serviceworker-cache-polyfill":16}],4:[function(e,t,n){"use strict";var r;r=self.registration?self.registration.scope:self.scope||new URL("./",self.location).href,t.exports={cache:{name:"$$$toolbox-cache$$$"+r+"$$$",maxAgeSeconds:null,maxEntries:null},debug:!1,networkTimeoutSeconds:null,preCacheItems:[],successResponses:/^0|([123]\d\d)|(40[14567])|410$/}},{}],5:[function(e,t,n){"use strict";var r=new URL("./",self.location),o=r.pathname,i=e("path-to-regexp"),c=function(e,t,n,r){t instanceof RegExp?this.fullUrlRegExp=t:(0!==t.indexOf("/")&&(t=o+t),this.keys=[],this.regexp=i(t,this.keys)),this.method=e,this.options=r,this.handler=n};c.prototype.makeHandler=function(e){var t;if(this.regexp){var n=this.regexp.exec(e);t={},this.keys.forEach(function(e,r){t[e.name]=n[r+1]})}return function(e){return this.handler(e,t,this.options)}.bind(this)},t.exports=c},{"path-to-regexp":15}],6:[function(e,t,n){"use strict";function r(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var o=e("./route"),i=e("./helpers"),c=function(e,t){for(var n=e.entries(),r=n.next(),o=[];!r.done;){var i=new RegExp(r.value[0]);i.test(t)&&o.push(r.value[1]),r=n.next()}return o},s=function(){this.routes=new Map,this.routes.set(RegExp,new Map),this.default=null};["get","post","put","delete","head","any"].forEach(function(e){s.prototype[e]=function(t,n,r){return this.add(e,t,n,r)}}),s.prototype.add=function(e,t,n,c){c=c||{};var s;t instanceof RegExp?s=RegExp:(s=c.origin||self.location.origin,s=s instanceof RegExp?s.source:r(s)),e=e.toLowerCase();var a=new o(e,t,n,c);this.routes.has(s)||this.routes.set(s,new Map);var u=this.routes.get(s);u.has(e)||u.set(e,new Map);var f=u.get(e),h=a.regexp||a.fullUrlRegExp;f.has(h.source)&&i.debug('"'+t+'" resolves to same regex as existing route.'),f.set(h.source,a)},s.prototype.matchMethod=function(e,t){var n=new URL(t),r=n.origin,o=n.pathname;return this._match(e,c(this.routes,r),o)||this._match(e,[this.routes.get(RegExp)],t)},s.prototype._match=function(e,t,n){if(0===t.length)return null;for(var r=0;r0)return s[0].makeHandler(n)}}return null},s.prototype.match=function(e){return this.matchMethod(e.method,e.url)||this.matchMethod("any",e.url)},t.exports=new s},{"./helpers":1,"./route":5}],7:[function(e,t,n){"use strict";function r(e,t,n){return n=n||{},i.debug("Strategy: cache first ["+e.url+"]",n),i.openCache(n).then(function(t){return t.match(e).then(function(t){var r=n.cache||o.cache,c=Date.now();return i.isResponseFresh(t,r.maxAgeSeconds,c)?t:i.fetchAndCache(e,n)})})}var o=e("../options"),i=e("../helpers");t.exports=r},{"../helpers":1,"../options":4}],8:[function(e,t,n){"use strict";function r(e,t,n){return n=n||{},i.debug("Strategy: cache only ["+e.url+"]",n),i.openCache(n).then(function(t){return t.match(e).then(function(e){var t=n.cache||o.cache,r=Date.now();if(i.isResponseFresh(e,t.maxAgeSeconds,r))return e})})}var o=e("../options"),i=e("../helpers");t.exports=r},{"../helpers":1,"../options":4}],9:[function(e,t,n){"use strict";function r(e,t,n){return o.debug("Strategy: fastest ["+e.url+"]",n),new Promise(function(r,c){var s=!1,a=[],u=function(e){a.push(e.toString()),s?c(new Error('Both cache and network failed: "'+a.join('", "')+'"')):s=!0},f=function(e){e instanceof Response?r(e):u("No result returned")};o.fetchAndCache(e.clone(),n).then(f,u),i(e,t,n).then(f,u)})}var o=e("../helpers"),i=e("./cacheOnly");t.exports=r},{"../helpers":1,"./cacheOnly":8}],10:[function(e,t,n){t.exports={networkOnly:e("./networkOnly"),networkFirst:e("./networkFirst"),cacheOnly:e("./cacheOnly"),cacheFirst:e("./cacheFirst"),fastest:e("./fastest")}},{"./cacheFirst":7,"./cacheOnly":8,"./fastest":9,"./networkFirst":11,"./networkOnly":12}],11:[function(e,t,n){"use strict";function r(e,t,n){n=n||{};var r=n.successResponses||o.successResponses,c=n.networkTimeoutSeconds||o.networkTimeoutSeconds;return i.debug("Strategy: network first ["+e.url+"]",n),i.openCache(n).then(function(t){var s,a,u=[];if(c){var f=new Promise(function(r){s=setTimeout(function(){t.match(e).then(function(e){var t=n.cache||o.cache,c=Date.now(),s=t.maxAgeSeconds;i.isResponseFresh(e,s,c)&&r(e)})},1e3*c)});u.push(f)}var h=i.fetchAndCache(e,n).then(function(e){if(s&&clearTimeout(s),r.test(e.status))return e;throw i.debug("Response was an HTTP error: "+e.statusText,n),a=e,new Error("Bad response")}).catch(function(r){return i.debug("Network or response error, fallback to cache ["+e.url+"]",n),t.match(e).then(function(e){if(e)return e;if(a)return a;throw r})});return u.push(h),Promise.race(u)})}var o=e("../options"),i=e("../helpers");t.exports=r},{"../helpers":1,"../options":4}],12:[function(e,t,n){"use strict";function r(e,t,n){return o.debug("Strategy: network only ["+e.url+"]",n),fetch(e)}var o=e("../helpers");t.exports=r},{"../helpers":1}],13:[function(e,t,n){"use strict";var r=e("./options"),o=e("./router"),i=e("./helpers"),c=e("./strategies"),s=e("./listeners");i.debug("Service Worker Toolbox is loading"),self.addEventListener("install",s.installListener),self.addEventListener("activate",s.activateListener),self.addEventListener("fetch",s.fetchListener),t.exports={networkOnly:c.networkOnly,networkFirst:c.networkFirst,cacheOnly:c.cacheOnly,cacheFirst:c.cacheFirst,fastest:c.fastest,router:o,options:r,cache:i.cache,uncache:i.uncache,precache:i.precache}},{"./helpers":1,"./listeners":3,"./options":4,"./router":6,"./strategies":10}],14:[function(e,t,n){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],15:[function(e,t,n){function r(e,t){for(var n,r=[],o=0,i=0,c="",s=t&&t.delimiter||"/";null!=(n=x.exec(e));){var f=n[0],h=n[1],p=n.index;if(c+=e.slice(i,p),i=p+f.length,h)c+=h[1];else{var l=e[i],d=n[2],m=n[3],g=n[4],v=n[5],w=n[6],y=n[7];c&&(r.push(c),c="");var b=null!=d&&null!=l&&l!==d,E="+"===w||"*"===w,R="?"===w||"*"===w,k=n[2]||s,$=g||v;r.push({name:m||o++,prefix:d||"",delimiter:k,optional:R,repeat:E,partial:b,asterisk:!!y,pattern:$?u($):y?".*":"[^"+a(k)+"]+?"})}}return i=46||"Chrome"===n&&r>=50)||(Cache.prototype.addAll=function(e){function t(e){this.name="NetworkError",this.code=19,this.message=e}var n=this;return t.prototype=Object.create(Error.prototype),Promise.resolve().then(function(){if(arguments.length<1)throw new TypeError;return e=e.map(function(e){return e instanceof Request?e:String(e)}),Promise.all(e.map(function(e){"string"==typeof e&&(e=new Request(e));var n=new URL(e.url).protocol;if("http:"!==n&&"https:"!==n)throw new t("Invalid scheme");return fetch(e.clone())}))}).then(function(r){if(r.some(function(e){return!e.ok}))throw new t("Incorrect response status");return Promise.all(r.map(function(t,r){return n.put(e[r],t)}))}).then(function(){})},Cache.prototype.add=function(e){return this.addAll([e])})}()},{}]},{},[13])(13)});
16 | //# sourceMappingURL=sw-toolbox.js.map
17 |
--------------------------------------------------------------------------------
/www/build/polyfills.js:
--------------------------------------------------------------------------------
1 | !function(t){"use strict";function n(t,n){return n={exports:{}},t(n,n.exports),n.exports}function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}function r(t,n){var e,o,i=arguments.length<3?t:arguments[2];return v(t)===i?t[n]:(e=se.f(t,n))?P(e,"value")?e.value:void 0!==e.get?e.get.call(i):void 0:p(o=mt(t))?r(o,n,i):void 0}function o(t,n,e){var r,i,a=arguments.length<4?t:arguments[3],u=se.f(v(t),n);if(!u){if(p(i=mt(t)))return o(i,n,e,a);u=E(0)}return P(u,"value")?!(!1===u.writable||!p(a))&&(r=se.f(a,n)||E(0),r.value=e,T.f(a,n,r),!0):void 0!==u.set&&(u.set.call(a,e),!0)}var i=Math.ceil,a=Math.floor,u=function(t){return isNaN(t=+t)?0:(t>0?a:i)(t)},c=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},s=function(t){return function(n,e){var r,o,i=String(c(n)),a=u(e),s=i.length;return a<0||a>=s?t?"":void 0:(r=i.charCodeAt(a),r<55296||r>56319||a+1===s||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):r:t?i.slice(a,a+2):o-56320+(r-55296<<10)+65536)}},f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=n(function(t){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)}),h=n(function(t){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)}),p=function(t){return"object"==typeof t?null!==t:"function"==typeof t},v=function(t){if(!p(t))throw TypeError(t+" is not an object!");return t},d=function(t){try{return!!t()}catch(t){return!0}},y=!d(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),g=l.document,m=p(g)&&p(g.createElement),b=function(t){return m?g.createElement(t):{}},_=!y&&!d(function(){return 7!=Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a}),k=function(t,n){if(!p(t))return t;var e,r;if(n&&"function"==typeof(e=t.toString)&&!p(r=e.call(t)))return r;if("function"==typeof(e=t.valueOf)&&!p(r=e.call(t)))return r;if(!n&&"function"==typeof(e=t.toString)&&!p(r=e.call(t)))return r;throw TypeError("Can't convert object to primitive value")},w=Object.defineProperty,S=y?Object.defineProperty:function(t,n,e){if(v(t),n=k(n,!0),v(e),_)try{return w(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t},T={f:S},E=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},O=y?function(t,n,e){return T.f(t,n,E(1,e))}:function(t,n,e){return t[n]=e,t},F={}.hasOwnProperty,P=function(t,n){return F.call(t,n)},M=0,A=Math.random(),j=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++M+A).toString(36))},I=n(function(t){var n=j("src"),e=Function.toString,r=(""+e).split("toString");h.inspectSource=function(t){return e.call(t)},(t.exports=function(t,e,o,i){var a="function"==typeof o;a&&(P(o,"name")||O(o,"name",e)),t[e]!==o&&(a&&(P(o,n)||O(o,n,t[e]?""+t[e]:r.join(String(e)))),t===l?t[e]=o:i?t[e]?t[e]=o:O(t,e,o):(delete t[e],O(t,e,o)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[n]||e.call(this)})}),D=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},x=function(t,n,e){if(D(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}},N=function(t,n,e){var r,o,i,a,u=t&N.F,c=t&N.G,s=t&N.S,f=t&N.P,p=t&N.B,v=c?l:s?l[n]||(l[n]={}):(l[n]||{}).prototype,d=c?h:h[n]||(h[n]={}),y=d.prototype||(d.prototype={});c&&(e=n);for(r in e)o=!u&&v&&void 0!==v[r],i=(o?v:e)[r],a=p&&o?x(i,l):f&&"function"==typeof i?x(Function.call,i):i,v&&I(v,r,i,t&N.U),d[r]!=i&&O(d,r,a),f&&y[r]!=i&&(y[r]=i)};l.core=h,N.F=1,N.G=2,N.S=4,N.P=8,N.B=16,N.W=32,N.U=64,N.R=128;var C=N,R={},z={}.toString,Z=function(t){return z.call(t).slice(8,-1)},L=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==Z(t)?t.split(""):Object(t)},W=function(t){return L(c(t))},B=Math.min,U=function(t){return t>0?B(u(t),9007199254740991):0},H=Math.max,q=Math.min,V=function(t,n){return t=u(t),t<0?H(t+n,0):q(t,n)},X=function(t){return function(n,e,r){var o,i=W(n),a=U(i.length),u=V(r,a);if(t&&e!=e){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===e)return t||u||0;return!t&&-1}},G=l["__core-js_shared__"]||(l["__core-js_shared__"]={}),K=function(t){return G[t]||(G[t]={})},Y=K("keys"),J=function(t){return Y[t]||(Y[t]=j(t))},Q=X(!1),$=J("IE_PROTO"),tt=function(t,n){var e,r=W(t),o=0,i=[];for(e in r)e!=$&&P(r,e)&&i.push(e);for(;n.length>o;)P(r,e=n[o++])&&(~Q(i,e)||i.push(e));return i},nt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),et=Object.keys||function(t){return tt(t,nt)},rt=y?Object.defineProperties:function(t,n){v(t);for(var e,r=et(n),o=r.length,i=0;o>i;)T.f(t,e=r[i++],n[e]);return t},ot=l.document&&document.documentElement,it=J("IE_PROTO"),at=function(){},ut=function(){var t,n=b("iframe"),e=nt.length;for(n.style.display="none",ot.appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("