├── .gitignore
├── .npmignore
├── LICENSE
├── README.md
├── demo
├── .jshintrc
├── app
│ ├── App_Resources
│ │ ├── Android
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── app.gradle
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ ├── drawable-ldpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ ├── drawable-nodpi
│ │ │ │ ├── splash_screen.xml
│ │ │ │ └── splashscreen.9.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ ├── values-v21
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ └── iOS
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icon-29.png
│ │ │ │ ├── icon-29@2x.png
│ │ │ │ ├── icon-29@3x.png
│ │ │ │ ├── icon-40.png
│ │ │ │ ├── icon-40@2x.png
│ │ │ │ ├── icon-40@3x.png
│ │ │ │ ├── icon-50.png
│ │ │ │ ├── icon-50@2x.png
│ │ │ │ ├── icon-57.png
│ │ │ │ ├── icon-57@2x.png
│ │ │ │ ├── icon-60@2x.png
│ │ │ │ ├── icon-60@3x.png
│ │ │ │ ├── icon-72.png
│ │ │ │ ├── icon-72@2x.png
│ │ │ │ ├── icon-76.png
│ │ │ │ ├── icon-76@2x.png
│ │ │ │ └── icon-83.5@2x.png
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.launchimage
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Default-568h@2x.png
│ │ │ │ ├── Default-667h@2x.png
│ │ │ │ ├── Default-736h@3x.png
│ │ │ │ ├── Default-Landscape.png
│ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ ├── Default-Portrait.png
│ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ ├── Default.png
│ │ │ │ └── Default@2x.png
│ │ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ └── LaunchScreen-AspectFill@2x.png
│ │ │ └── LaunchScreen.Center.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ └── LaunchScreen-Center@2x.png
│ │ │ ├── Info.plist
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── build.xcconfig
│ ├── app.css
│ ├── app.js
│ ├── package.json
│ ├── references.d.ts
│ └── views
│ │ ├── colors
│ │ ├── blue.xml
│ │ ├── colors.js
│ │ ├── colors.xml
│ │ ├── green.xml
│ │ └── red.xml
│ │ ├── main-page.js
│ │ ├── main-page.xml
│ │ ├── spa
│ │ ├── spa.js
│ │ ├── spa.xml
│ │ ├── spa1.xml
│ │ ├── spa2.xml
│ │ ├── spa3.xml
│ │ └── spa4.xml
│ │ └── tabs
│ │ ├── newTab1.xml
│ │ ├── newTab2.js
│ │ ├── newTab2.xml
│ │ ├── newTab3.xml
│ │ ├── tabs.js
│ │ └── tabs.xml
├── package.json
└── readme.md
└── docs
├── nativescript-dl0.gif
├── nativescript-dl1.gif
├── nativescript-dl2.gif
└── nativescript-dl3.gif
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vscode/
3 | .tscache/
4 | /demo/node_modules/
5 | /demo/platforms/
6 | node_modules/
7 | .settings/
8 |
9 | .DS_Store
10 | *.js.map
11 | *.tar
12 | *.tgz
13 | *.gz
14 | *.zip
15 | /demo/go.bat
16 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | demo/
2 | .git/
3 | .idea/
4 | docs/
5 | bin/
6 | tests/
7 | graphics/
8 | screenshots/
9 | .vs/
10 | .settings/
11 | .vscode/
12 | node_modules/
13 | .tscache/
14 |
15 | .gitignore
16 | .npmignore
17 | .DS_Store
18 | .editorconfig
19 | .bablerc
20 | .eslintignore
21 | .travis.yml
22 | .jshintrc
23 | *.sln
24 | *.md
25 | *.tmp
26 | *.log
27 | *.ts
28 | *.js.map
29 | *.tar
30 | *.tgz
31 | *.gz
32 | *.zip
33 |
34 | references.d.ts
35 | tsconfig.json
36 | tslint.json
37 | karma.conf.js
38 | typings.json
39 | typedoc.json
40 | !dynamic.d.ts
41 |
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | NativeScript-dynamicLoader
3 | Copyright (c) 2016, Nathanael Anderson
4 |
5 | If you have purchased this plugin, then you have the rights to use it in any type of application(s)
6 | that you have built. Each developer on the team working on an app with this plugin needs to have
7 | a valid license.
8 |
9 | You MAY NOT sub-license this. So, if you have a customer that you need to provide the full source to;
10 | then they will need a valid licensed copy of this plugin.
11 |
12 | You MAY NOT release the plugin source in any public venue. So please if you need to commit this code;
13 | use a private repo.
14 |
15 | You MAY include this in any number of applications.
16 |
17 | You MAY put this plugin on as many computers as needed; including build servers, etc...
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Nativescript-DynamicLoader
3 | A NativeScript plugin to dynamically load/unload Declarative UI code (xml/js) into your existing UI.
4 |
5 | ## License
6 |
7 | This is released under a COMMERCIAL License PER developer -- you can purchase this plugin (and others) and support at [http://nativescript.tools](http://nativescript.tools).
8 |
9 | I also do contract work; so if you have a module you want built for NativeScript (or any other software projects) feel free to contact me [nathan@master-technology.com](mailto://nathan@master-technology.com).
10 |
11 | [](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=HN8DDMWVGBNQL&lc=US&item_name=Nathanael%20Anderson&item_number=nativescript%2dglobalevents&no_note=1&no_shipping=1¤cy_code=USD&bn=PP%2dDonationsBF%3ax%3aNonHosted)
12 | [](https://www.patreon.com/NathanaelA)
13 |
14 |
15 | ## Screen Shots Examples
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | ## Installation
26 |
27 | `tns plugin add nativescript-dynamicloader.tgz`
28 |
29 |
30 | ## Usage
31 |
32 | To use the module you just `require()` it:
33 |
34 | ```js
35 | require( "nativescript-dynamicloader" );
36 | or
37 | var dynamic = require('nativescript-dynamicloader');
38 | ```
39 |
40 | Notice: You do NOT need to keep a reference to it, unless you need the manual "load" version; and you only need to load it once.
41 |
42 | It will automatically attach its methods to all the proper classes in the NativeScript library making it act as if they are built in.
43 |
44 | Please note: for simplicity sake in these samples; I'm use helpers and methods from the NativeScript-DOM plugin.
45 |
46 | ```js
47 | require('nativescript-dynamicloader'); // need only once in the application total
48 |
49 | exports.onClickRed = function() {
50 | // Find any classes that have been tagged as "dynamicColros" and unload them..
51 | runAgainstClassNames('dynamicColors', function (elem) { elem.dynamicUnload(); });
52 |
53 | var parentElement = getElementById('parentWrapper');
54 | parentElement.dynamicLoad('~/views/colors/red');
55 | parentElement.dynamicLoad('~/views/colors/orange');
56 | parentElement.dynamicLoad('~/views/colors/pink');
57 | }
58 |
59 | ```
60 |
61 | ## Why use this?
62 | This allows you to dynamically load a part of the Declarative UI and its associated JS file into memory dynamically. The JS is its own module; so it does not effect the rest of the page nor does the other part of the pages JS affect it.
63 |
64 |
65 | ## Commands and functions
66 |
67 |
68 | ### someViewElement.dynamicLoad(path, options) -- Automatic Method
69 | - **path** - Your path from the app directory to the files you are loading
70 | - **Options** - Object of options
71 | - **page** - the page element, if not set it will attempt to use the currentPage; however depending on if you call this function during navigation, the current page maybe the old page.
72 | - **mergeSource** - False (default), True (for all), or an Array of function names exported from the Source page's exports to merge into the exports of the newly loaded JS file in the dynamically loaded file. (Only names not already existing.)
73 | - **mergeDynamic** - False (default), True (for all), or an Array of function names exported from the Dynamic page's exports to merge into the source's exports. (Only names not already existing.)
74 | - **mergeForce** - False (default), True - Force names to be cloned onto the other exports, even if they already exist on the destination exports.
75 | - **RETURNS** the top most element that was loaded and attached to the `someParentElement`
76 |
77 | Loads the path Declarative UI into the someViewElement children...
78 |
79 | Example:
80 | ```
81 | // Dynamically load and attach three tabs
82 | var tabView = getElementById('myTabView');
83 | tabView.dynamicLoad('~/colors/blue');
84 | tabView.dynamicLoad('~/colors/green');
85 | tabView.dynamicLoad('~/colors/red');
86 | ```
87 |
88 |
89 |
90 | ### dynamic.load(path, options) -- Manual Method
91 | - **path** - Your path from the app directory to the files you are loading
92 | - **Options** - Object of options
93 | - **page** - the page element, if not set it will attempt to use the currentPage; however depending on if you call this function during navigation, the current page maybe the old page.
94 | - **mergeSource** - False (default), True (for all), or an Array of function names exported from the Source page's exports to merge into the exports of the newly loaded JS file in the dynamically loaded file. (Only names not already existing.)
95 | - **mergeDynamic** - False (default), True (for all), or an Array of function names exported from the Dynamic page's exports to merge into the source's exports. (Only names not already existing.)
96 | - **mergeForce** - False (default), True - Force names to be cloned onto the other exports, even if they already exist on the destination exports.
97 | - **RETURNS** the top most element that was loaded. **YOU MUST ATTACH IT TO A PARENT for it to show**
98 |
99 | Loads the path declarative UI files and returns it only; the manual way is more useful when you need to dynamically load and deal with setting up the parent manually or creating an array of them.
100 | Remember the **MANUAL method does NOT** attach the returned elements to a parent; you must do that to show it...
101 | Example:
102 | ```
103 | var items = [];
104 | var dynamic = require('nativescript-dynamicloader');
105 |
106 | // Dynamically load three tabs
107 | items.push(dynamic.load('~/colors/blue'));
108 | items.push(dynamic.load('~/colors/green'));
109 | items.push(dynamic.load('~/colors/red'));
110 |
111 | var tabView = getElementById('myTabView');
112 | // Make our three dynamically loaded tabs the tabs... So we are setting up the parent now...
113 | tabView.items = items;
114 | ```
115 |
116 |
117 |
118 | ### someDynamicallyLoadedElement.dynamicUnload()
119 | ### someParentElement.dynamicUnload(dynamicallyLoadedChildElement)
120 | - element - the element you want unloaded
121 |
122 | Unloads the dynamically loaded element either passed in, or found.
123 | Example:
124 | ```
125 | var myLoadedElement = getElementById('myLoadedElement');
126 | myLoadedElement.dynamicUnload();
127 | console.log("Element has been unloaded");
128 | ```
129 |
130 |
--------------------------------------------------------------------------------
/demo/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "undef": true,
3 | "nonew": true,
4 | "curly": false,
5 | "noarg": true,
6 | "forin": true,
7 | "noempty": false,
8 | "eqeqeq": false,
9 | "strict": false,
10 | "bitwise": true,
11 | "newcap": false,
12 | "camelcase": true,
13 | "browser": true,
14 | "node": true,
15 | "devel": true,
16 | "shadow": true,
17 | "eqnull": true,
18 | "mocha": true,
19 | "jasmine": true,
20 | "qunit": true,
21 | "predef": [ "android", "__extends", "java", "javax", "Promise" ]
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // compile 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | android {
9 | defaultConfig {
10 | generatedDensities = []
11 | applicationId = "com.mastertechapps.dynamicLoader"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "icon-29.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "icon-29@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29@3x.png",
19 | "scale" : "3x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "icon-40@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-40@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "57x57",
35 | "idiom" : "iphone",
36 | "filename" : "icon-57.png",
37 | "scale" : "1x"
38 | },
39 | {
40 | "size" : "57x57",
41 | "idiom" : "iphone",
42 | "filename" : "icon-57@2x.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "29x29",
59 | "idiom" : "ipad",
60 | "filename" : "icon-29.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "29x29",
65 | "idiom" : "ipad",
66 | "filename" : "icon-29@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "40x40",
71 | "idiom" : "ipad",
72 | "filename" : "icon-40.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "40x40",
77 | "idiom" : "ipad",
78 | "filename" : "icon-40@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "50x50",
83 | "idiom" : "ipad",
84 | "filename" : "icon-50.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "50x50",
89 | "idiom" : "ipad",
90 | "filename" : "icon-50@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "72x72",
95 | "idiom" : "ipad",
96 | "filename" : "icon-72.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "72x72",
101 | "idiom" : "ipad",
102 | "filename" : "icon-72@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "76x76",
107 | "idiom" : "ipad",
108 | "filename" : "icon-76.png",
109 | "scale" : "1x"
110 | },
111 | {
112 | "size" : "76x76",
113 | "idiom" : "ipad",
114 | "filename" : "icon-76@2x.png",
115 | "scale" : "2x"
116 | },
117 | {
118 | "size" : "83.5x83.5",
119 | "idiom" : "ipad",
120 | "filename" : "icon-83.5@2x.png",
121 | "scale" : "2x"
122 | }
123 | ],
124 | "info" : {
125 | "version" : 1,
126 | "author" : "xcode"
127 | }
128 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "736h",
7 | "filename" : "Default-736h@3x.png",
8 | "minimum-system-version" : "8.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "736h",
16 | "filename" : "Default-Landscape@3x.png",
17 | "minimum-system-version" : "8.0",
18 | "orientation" : "landscape",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "667h",
25 | "filename" : "Default-667h@2x.png",
26 | "minimum-system-version" : "8.0",
27 | "orientation" : "portrait",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "filename" : "Default@2x.png",
34 | "extent" : "full-screen",
35 | "minimum-system-version" : "7.0",
36 | "scale" : "2x"
37 | },
38 | {
39 | "extent" : "full-screen",
40 | "idiom" : "iphone",
41 | "subtype" : "retina4",
42 | "filename" : "Default-568h@2x.png",
43 | "minimum-system-version" : "7.0",
44 | "orientation" : "portrait",
45 | "scale" : "2x"
46 | },
47 | {
48 | "orientation" : "portrait",
49 | "idiom" : "ipad",
50 | "filename" : "Default-Portrait.png",
51 | "extent" : "full-screen",
52 | "minimum-system-version" : "7.0",
53 | "scale" : "1x"
54 | },
55 | {
56 | "orientation" : "landscape",
57 | "idiom" : "ipad",
58 | "filename" : "Default-Landscape.png",
59 | "extent" : "full-screen",
60 | "minimum-system-version" : "7.0",
61 | "scale" : "1x"
62 | },
63 | {
64 | "orientation" : "portrait",
65 | "idiom" : "ipad",
66 | "filename" : "Default-Portrait@2x.png",
67 | "extent" : "full-screen",
68 | "minimum-system-version" : "7.0",
69 | "scale" : "2x"
70 | },
71 | {
72 | "orientation" : "landscape",
73 | "idiom" : "ipad",
74 | "filename" : "Default-Landscape@2x.png",
75 | "extent" : "full-screen",
76 | "minimum-system-version" : "7.0",
77 | "scale" : "2x"
78 | },
79 | {
80 | "orientation" : "portrait",
81 | "idiom" : "iphone",
82 | "filename" : "Default.png",
83 | "extent" : "full-screen",
84 | "scale" : "1x"
85 | },
86 | {
87 | "orientation" : "portrait",
88 | "idiom" : "iphone",
89 | "filename" : "Default@2x.png",
90 | "extent" : "full-screen",
91 | "scale" : "2x"
92 | },
93 | {
94 | "orientation" : "portrait",
95 | "idiom" : "iphone",
96 | "filename" : "Default-568h@2x.png",
97 | "extent" : "full-screen",
98 | "subtype" : "retina4",
99 | "scale" : "2x"
100 | },
101 | {
102 | "orientation" : "portrait",
103 | "idiom" : "ipad",
104 | "extent" : "to-status-bar",
105 | "scale" : "1x"
106 | },
107 | {
108 | "orientation" : "portrait",
109 | "idiom" : "ipad",
110 | "filename" : "Default-Portrait.png",
111 | "extent" : "full-screen",
112 | "scale" : "1x"
113 | },
114 | {
115 | "orientation" : "landscape",
116 | "idiom" : "ipad",
117 | "extent" : "to-status-bar",
118 | "scale" : "1x"
119 | },
120 | {
121 | "orientation" : "landscape",
122 | "idiom" : "ipad",
123 | "filename" : "Default-Landscape.png",
124 | "extent" : "full-screen",
125 | "scale" : "1x"
126 | },
127 | {
128 | "orientation" : "portrait",
129 | "idiom" : "ipad",
130 | "extent" : "to-status-bar",
131 | "scale" : "2x"
132 | },
133 | {
134 | "orientation" : "portrait",
135 | "idiom" : "ipad",
136 | "filename" : "Default-Portrait@2x.png",
137 | "extent" : "full-screen",
138 | "scale" : "2x"
139 | },
140 | {
141 | "orientation" : "landscape",
142 | "idiom" : "ipad",
143 | "extent" : "to-status-bar",
144 | "scale" : "2x"
145 | },
146 | {
147 | "orientation" : "landscape",
148 | "idiom" : "ipad",
149 | "filename" : "Default-Landscape@2x.png",
150 | "extent" : "full-screen",
151 | "scale" : "2x"
152 | }
153 | ],
154 | "info" : {
155 | "version" : 1,
156 | "author" : "xcode"
157 | }
158 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
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 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
6 |
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | Page {
2 | background-color: #dcdcdc;
3 | }
4 |
5 | #sv {
6 | margin: 5;
7 | background-color: lightblue;
8 | border-width: 1;
9 | border-color: #000000;
10 | }
11 |
12 | .animatingContent {
13 | height: 1000;
14 | }
15 |
16 | #content {
17 | padding: 5;
18 | height: 480;
19 | }
20 |
21 | .primary Button {
22 | width: 80%;
23 | }
24 |
25 | .primary .tabButton {
26 | width: 49%;
27 | }
28 |
29 | .copyright {
30 | color: black;
31 | font-size: 10;
32 | text-align: center;
33 | }
34 | .tools {
35 | margin-top: 1;
36 | color: blue;
37 | font-size: 10;
38 | }
39 |
40 | .notices {
41 | margin: 4;
42 | padding-right: 2;
43 | padding-left: 2;
44 | }
45 |
46 | .appProtect {
47 | margin-top: 10;
48 | color: blue;
49 | font-size: 10;
50 | text-align: center;
51 | }
52 |
53 | .title {
54 | color: black;
55 | font-weight: bold;
56 | }
57 |
58 | .blue {
59 | background-color: blue;
60 | color: white;
61 | }
62 |
63 | .cyan {
64 | background-color: cyan;
65 | }
66 |
67 | .navy {
68 | background-color: navy;
69 | color: white;
70 | }
71 |
72 | .green {
73 | background-color: green;
74 | }
75 |
76 | .seagreen {
77 | background-color: seagreen;
78 | }
79 |
80 | .lawngreen {
81 | background-color: lawngreen;
82 | }
83 |
84 | .red {
85 | background-color: red;
86 | }
87 |
88 | .orange {
89 | background-color: orange;
90 | }
91 |
92 | .pink {
93 | background-color: deeppink;
94 | }
95 |
96 | .box {
97 | margin: 10;
98 | padding-top: 40;
99 | text-align: center;
100 | width: 100;
101 | height: 100;
102 |
103 | horizontalalignment: center;
104 | }
--------------------------------------------------------------------------------
/demo/app/app.js:
--------------------------------------------------------------------------------
1 | var application = require("application");
2 | require('nativescript-dynamicloader');
3 | require('nativescript-dom');
4 |
5 | var le = require('nativescript-liveedit');
6 | le.addRestartFile('dynamic.js');
7 | le.addRestartFile('views/main-page.js');
8 |
9 | application.start({ moduleName: "views/main-page" });
10 |
--------------------------------------------------------------------------------
/demo/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-dynamicloader-demo",
3 | "main": "app.js",
4 | "version": "1.0.0",
5 | "author": {
6 | "name": "Nathanael Anderson",
7 | "email": "Nathan@master-technology.com"
8 | },
9 | "description": "Nativescript hello-world project template",
10 | "license": "MIT",
11 | "keywords": [
12 | "demo",
13 | "dynamic",
14 | "nativescript",
15 | "{N}",
16 | "dynamic loader"
17 | ],
18 | "repository": {
19 | "type": "git",
20 | "url": "git://github.com/NathanaelA/nativescript-dynamicloader.git"
21 | },
22 | "bugs": {
23 | "url": "https://github.com/NathanaelA/nativescript-dynamicloader"
24 | },
25 | "homepage": "https://github.com/NathanaelA/nativescript-dynamicloader",
26 | "android": {
27 | "v8Flags": "--expose_gc"
28 | },
29 | "readme": "README.md"
30 | }
--------------------------------------------------------------------------------
/demo/app/references.d.ts:
--------------------------------------------------------------------------------
1 | /// Enable smart suggestions and completions in Visual Studio Code JavaScript projects.
2 |
--------------------------------------------------------------------------------
/demo/app/views/colors/blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/app/views/colors/colors.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* global getElementById */
3 |
4 | var colorPage = 0, page;
5 |
6 | /**
7 | * Our on loaded event, this sets up everything
8 | * @param args
9 | */
10 | exports.loaded = function(args) {
11 | console.log("Colors onloaded!");
12 | colorPage = 0;
13 | page = args.object;
14 | exports.clicker();
15 | };
16 |
17 | /**
18 | * This does the REALLY hard work of dynamically unloading and loading the next page...
19 | */
20 | exports.clicker = function() {
21 | colorPage++;
22 | if (colorPage > 2) { colorPage = 0; }
23 | var me = page.getElementById('colors');
24 | me.runAgainstClasses('color', function(elem) { elem.dynamicUnload(); });
25 |
26 | var colorFile = "";
27 | switch (colorPage) {
28 | case 0: colorFile = "red"; break;
29 | case 1: colorFile = "green"; break;
30 | case 2: colorFile = "blue"; break;
31 | }
32 | me.dynamicLoad('~/views/colors/'+colorFile);
33 | };
--------------------------------------------------------------------------------
/demo/app/views/colors/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/app/views/colors/green.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/app/views/colors/red.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/app/views/main-page.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | // We need the utils for the openURL function
4 | var utils = require('utils/utils');
5 |
6 | // We want this to look cool, so we animate in and out the pages. ;-)
7 | var Animation = require('ui/animation').Animation;
8 |
9 | // We track our page and which demo
10 | var page, demoId=0;
11 |
12 | // Do you see how EASY it is to add another sample example
13 | var pageNames = ['spa', 'colors', 'tabs'];
14 |
15 | /**
16 | * NavigatingTo event
17 | * we setup the page; and load our first DynamicLoad DUI files
18 | * @param args
19 | */
20 | exports.onNavigatingTo = function(args) {
21 | page = args.object;
22 | exports.next();
23 | };
24 |
25 | /**
26 | * Increment the Demo Id, and then load that page...
27 | */
28 | exports.next = function() {
29 | demoId++;
30 | if (demoId > pageNames.length) { demoId = 1; }
31 | switchPage(demoId, 0);
32 | };
33 |
34 | /**
35 | * Decrement the demo Id, and load the next demo
36 | */
37 | exports.prior = function() {
38 | demoId--;
39 | if (demoId < 1) { demoId = pageNames.length; }
40 | switchPage(demoId, 1);
41 | };
42 |
43 | /**
44 | * Dynamically Unload the current page and Dynamically Load the next page
45 | * @param id - Page number
46 | * @param direction - direction
47 | */
48 | function switchPage(id, direction) {
49 | var oldPage=null;
50 | var content = page.getElementById('content');
51 | var oldPages = content.getElementsByClassName('primary');
52 | if (oldPages.length) {
53 | oldPage = oldPages[0];
54 | }
55 | oldPages = null;
56 | content.height = 1000;
57 |
58 | var curPageName = pageNames[id-1];
59 | var newPage = content.dynamicLoad('~/views/'+curPageName+'/'+curPageName);
60 | newPage.height = 480;
61 |
62 | if (oldPage) {
63 | newPage.translateX = direction === 0 ? 500 : -500;
64 | newPage.translateY = -480;
65 |
66 | var animated = [
67 | {target: oldPage, translate: {x: direction === 0 ? -500 : 500, y: 0}, duration: 400, curve: 'linear', delay: 0},
68 | {target: newPage, translate: {x: 0, y: -480}, duration: 400, curve: 'linear', delay: 0}
69 | ];
70 |
71 | var ani = new Animation(animated);
72 | ani.play().then(function() {
73 | oldPage.dynamicUnload();
74 | newPage.translateY = 0;
75 | content.height = 500;
76 |
77 | oldPage = null;
78 | });
79 |
80 | } else {
81 | content.height = 500;
82 | }
83 | }
84 |
85 | /**
86 | * Open the appProtection site
87 | */
88 | exports.appProtect = function() {
89 | utils.openUrl("https://AppProtection.net");
90 | };
91 |
92 | /**
93 | * Open our sales site
94 | */
95 | exports.tools = function() {
96 | utils.openUrl("http://nativescript.tools");
97 | };
--------------------------------------------------------------------------------
/demo/app/views/main-page.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/demo/app/views/spa/spa.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* global getElementById */
3 |
4 | // Tracking Variables for simplicity
5 | var spaDemo = 0;
6 | var page;
7 |
8 | /**
9 | * The OnLoaded event
10 | * @param args
11 | */
12 | exports.loaded = function(args) {
13 | spaDemo = 0;
14 | page = args.object;
15 | console.log("spa onLoaded!");
16 | exports.clicker();
17 | };
18 |
19 |
20 | /**
21 | * This does all the "oh so" HARD work to load the next Single Page DUI file
22 | */
23 | exports.clicker = function() {
24 | spaDemo++;
25 | if (spaDemo > 4) {
26 | spaDemo = 1;
27 | }
28 | var Scroller = page.getElementById('SPA');
29 | Scroller.dynamicLoad("~/views/spa/spa" + spaDemo);
30 | };
--------------------------------------------------------------------------------
/demo/app/views/spa/spa.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/views/spa/spa1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | `
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/demo/app/views/spa/spa2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/demo/app/views/spa/spa3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/demo/app/views/spa/spa4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/app/views/tabs/newTab1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/demo/app/views/tabs/newTab2.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* global getElementById */
3 |
4 | /**
5 | * Yep, everything dynamically loaded can have a loaded event!
6 | * @param args
7 | */
8 | exports.loaded = function(args) {
9 | console.log("tab2 onLoaded!");
10 | args.object.dynamicLoad('~/views/colors/green');
11 | };
12 |
13 |
--------------------------------------------------------------------------------
/demo/app/views/tabs/newTab2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/demo/app/views/tabs/newTab3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/views/tabs/tabs.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* global getElementById */
3 |
4 | // Setup Tracking
5 | var page, tabId=0;
6 |
7 | /**
8 | * Our loaded event sets up the defaults and loads TWO tabs!
9 | * @param args
10 | */
11 | exports.loaded = function(args) {
12 | tabId = 0;
13 | page = args.object;
14 | console.log("tabs onLoaded!");
15 | exports.clicker();
16 | exports.clicker();
17 | };
18 |
19 | /**
20 | * Uh Oh, this is really really hard work we are doing here -- Lets add a new Tab
21 | */
22 | exports.clicker = function() {
23 | var tabView = page.getElementById('tabView');
24 | tabId++;
25 | if (tabId > 3) { tabId = 1; }
26 |
27 | tabView.dynamicLoad("~/views/tabs/newTab"+tabId);
28 | };
29 |
30 | /**
31 | * Ok, maybe this is the really really hard work, lets remove a tab...
32 | */
33 | exports.remover = function() {
34 | var tabView = page.getElementById('tabView');
35 |
36 | // Actually there is no reason you can't remove the last tab; but then the page looks plain
37 | // So we force at least one to be remaining
38 | if (tabView.items.length > 1) {
39 | tabView.dynamicUnload(tabView.items[0]);
40 | }
41 | };
--------------------------------------------------------------------------------
/demo/app/views/tabs/tabs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "NativeScript DynamicLoader",
3 | "license": "Commercial",
4 | "readme": "NativeScript DynamicLoader Docs",
5 | "repository": "https://github.com/NathanaelA/nativescript-dynamicloader",
6 | "nativescript": {
7 | "id": "com.mastertechapps.dynamicLoader",
8 | "tns-android": {
9 | "version": "2.2.0"
10 | }
11 | },
12 | "dependencies": {
13 | "nativescript-dom": "latest",
14 | "nativescript-dynamicloader": "file:..",
15 | "nativescript-liveedit": "^2.2.0",
16 | "tns-core-modules": "latest"
17 | },
18 | "devDependencies": {
19 | "babel-traverse": "6.15.0",
20 | "babel-types": "6.15.0",
21 | "babylon": "6.9.1",
22 | "lazy": "1.0.11"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/demo/readme.md:
--------------------------------------------------------------------------------
1 | # Nativescript-DynamicLoader-Demo
2 |
3 | This shows off some of the functionality of being able to dynamically load files.
4 |
5 | The interesting thing about this demo is that it actually dynamically loads contents inside of dynamically loaded content. And in one example case it is three dynamic loads deep.
6 |
7 | The app is actually very straight forward; it loads the app.js, loads the two plugins and then starts main-page.xml and main-page.js as normal.
8 |
9 | ## Main-Page
10 |
11 | This page dedicates the majority of its space for dynamic content. The only fixed content is the bottom bar with the Prior / Next and copyright tags.
12 |
13 | By clicking next or prior you can change which Demo is dynamically loaded into the viewport.
14 |
15 | ## Demos
16 |
17 | ### Continuous dynamic loaded additions
18 | When the demo is dynamically loaded; it loads /views/spa/spa.xml & spa.js -- These are the primary files for this demo.
19 |
20 | You will notice this dynamically loaded file, will then load the first of the files that will be dynamically loaded each time you hit click the button.
21 |
22 | Then you click the **Load More...** button, it will then proceed to load a new file each time and add it to the scroll view...
23 |
24 |
25 | ### Color Dynamics
26 | When the demo is dynamically loaded; it loads /views/colors/colors.xml and colors.js -- These are the primary files for this demo.
27 |
28 | You will notice that again when this demo is loaded it will actually dynamically load the first of the color pages.
29 |
30 | When you click the **Next Colors** button, it will automatically unload the current color page; and load the next color page.
31 |
32 |
33 | ### Tab Dynamics
34 | When the demo is dynamically loaded; it loads /views/tabs/tabs.xml and tabs.js -- These are the primary files for this demo.
35 |
36 | You will notice on this demo that we actually trigger our load a tab twice at startup; just so you can see its a tab control..
37 |
38 | When you click the **Load a tab** we will load the next tab and append it to the tab list.
39 | When you click the **Remove a tab** we will unload the first tab in the list.
40 |
41 |
42 | ### Notes
43 | In the second tab; you will see it actually dynamically loads the green color file showing literally three dynamic loads in a row to make it work.
44 |
45 | Demo Files (Tab Demo) -> Tab 2 File -> Color Green File
46 |
47 |
48 | ### App Protection
49 | Why does it say "Protected by AppProtection.net"? Well I decided to use this as my sample for the AppProtection service also...
50 | Feel free to peruse the source code here; and compare it to the protected source...
51 |
52 |
53 |
--------------------------------------------------------------------------------
/docs/nativescript-dl0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/docs/nativescript-dl0.gif
--------------------------------------------------------------------------------
/docs/nativescript-dl1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/docs/nativescript-dl1.gif
--------------------------------------------------------------------------------
/docs/nativescript-dl2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/docs/nativescript-dl2.gif
--------------------------------------------------------------------------------
/docs/nativescript-dl3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NathanaelA/nativescript-dynamicloader/f299c7730202e6bb9f40bf796f35caca3961e7e7/docs/nativescript-dl3.gif
--------------------------------------------------------------------------------