Compare commits
1255 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a458b52cc | ||
|
|
a1a4ef94cc | ||
|
|
6e20137340 | ||
|
|
961727ee61 | ||
|
|
9c30a1d0dd | ||
|
|
ee79278503 | ||
|
|
544e7ef4fc | ||
|
|
01aece1fbb | ||
|
|
a7854b7fad | ||
|
|
27d3d2d1c9 | ||
|
|
9074362cae | ||
|
|
fd0a2e9acd | ||
|
|
9348415cf5 | ||
|
|
ad8c04bf9f | ||
|
|
667f9bdde9 | ||
|
|
aedc9d65c8 | ||
|
|
2869c644ed | ||
|
|
200618dee7 | ||
|
|
5d14b16d73 | ||
|
|
b08e3a8ee1 | ||
|
|
3511f24a26 | ||
|
|
fa803f2258 | ||
|
|
d23f13f837 | ||
|
|
d4c876d009 | ||
|
|
d2ef40ccb7 | ||
|
|
8cf332f0ff | ||
|
|
be345ea829 | ||
|
|
c52bb832b4 | ||
|
|
1eebea9df5 | ||
|
|
150b236468 | ||
|
|
df64486a13 | ||
|
|
a1e68a0934 | ||
|
|
a9a511d0f1 | ||
|
|
b6d0e3125d | ||
|
|
d4a9abfc61 | ||
|
|
a5ed62e56a | ||
|
|
7d0f1bd3ff | ||
|
|
a151295654 | ||
|
|
e4fc01a23c | ||
|
|
2fdf61ad5c | ||
|
|
25d5169251 | ||
|
|
cd7612e32e | ||
|
|
4e5b3fa910 | ||
|
|
5589f4d2ff | ||
|
|
841f151b4d | ||
|
|
ead99b1a4f | ||
|
|
cd5ff68bc1 | ||
|
|
261e9cc249 | ||
|
|
0e2d5ac1de | ||
|
|
87916aec20 | ||
|
|
072fe8df94 | ||
|
|
0750e03e04 | ||
|
|
bf2ba2e9e7 | ||
|
|
91c879af27 | ||
|
|
ee40475891 | ||
|
|
b012bb62d7 | ||
|
|
5ccc558380 | ||
|
|
5d775978c6 | ||
|
|
047c236191 | ||
|
|
1536e98ba4 | ||
|
|
baee422090 | ||
|
|
07de25c90f | ||
|
|
027b10a6dd | ||
|
|
bb4308e7d8 | ||
|
|
eb31e9b2a1 | ||
|
|
7af7715f90 | ||
|
|
934e63d34a | ||
|
|
baff7b3d7c | ||
|
|
acbb3382fe | ||
|
|
4bb44f1a18 | ||
|
|
edf4c75bbd | ||
|
|
fdffb055be | ||
|
|
d0c680fe3a | ||
|
|
5cd719d272 | ||
|
|
9c88cfb577 | ||
|
|
fa047d2171 | ||
|
|
3154fea2b9 | ||
|
|
7b069a3e58 | ||
|
|
602f14771c | ||
|
|
396bce1710 | ||
|
|
82d2ae8c4d | ||
|
|
0c9eb8e1dd | ||
|
|
3830de5d69 | ||
|
|
ec0e1ff3a1 | ||
|
|
5d35434866 | ||
|
|
016f174b53 | ||
|
|
997f7a03aa | ||
|
|
5bf1cbeba3 | ||
|
|
7e174b6e3a | ||
|
|
b52328c07b | ||
|
|
cb0a3664fd | ||
|
|
5be6a155e6 | ||
|
|
2e93c50b7d | ||
|
|
f122a14445 | ||
|
|
53f4ae8e6b | ||
|
|
073535102b | ||
|
|
5001b9bd25 | ||
|
|
3d5b9e71a5 | ||
|
|
fe3e31d580 | ||
|
|
da109514ae | ||
|
|
566cc08b1e | ||
|
|
62f658b722 | ||
|
|
49da235eb3 | ||
|
|
ad8589b5f2 | ||
|
|
096e284b56 | ||
|
|
d577b6f061 | ||
|
|
cd88c0aa0a | ||
|
|
648fc7e062 | ||
|
|
5da4732787 | ||
|
|
2f2d55f1d5 | ||
|
|
8cd648db5c | ||
|
|
f3407e5582 | ||
|
|
d845519361 | ||
|
|
26db2cfcf9 | ||
|
|
d0c0413140 | ||
|
|
234165c294 | ||
|
|
9bf4ee3fac | ||
|
|
f8df8769c9 | ||
|
|
510cea67b7 | ||
|
|
55d6d11721 | ||
|
|
97ba9b4fe1 | ||
|
|
96369db3a9 | ||
|
|
961cff185d | ||
|
|
9a733c3b4a | ||
|
|
95ac7e1855 | ||
|
|
6683aa450c | ||
|
|
d0cb3049e5 | ||
|
|
8036d6392d | ||
|
|
8602fde936 | ||
|
|
0f8c3ce376 | ||
|
|
5880491c0e | ||
|
|
62c7a60aee | ||
|
|
6fdeeaf6f2 | ||
|
|
16ff420bfa | ||
|
|
0009cbf3a0 | ||
|
|
74971feb98 | ||
|
|
683b808f27 | ||
|
|
f11be169b0 | ||
|
|
3a4dc73229 | ||
|
|
b851de9cc8 | ||
|
|
b8c8a1aa8d | ||
|
|
8f1e729f0e | ||
|
|
b4583271b8 | ||
|
|
50c03b2a49 | ||
|
|
27fdce7af2 | ||
|
|
3500d80b9c | ||
|
|
f599b0418d | ||
|
|
384dfc263d | ||
|
|
12280dda2b | ||
|
|
5d091d21fb | ||
|
|
b83c1bf767 | ||
|
|
6ebd2703ee | ||
|
|
3dfea7d02d | ||
|
|
44b7e301b5 | ||
|
|
906401b236 | ||
|
|
ffdbab7b26 | ||
|
|
5144345c9e | ||
|
|
47f48bae8d | ||
|
|
754c5ecbcb | ||
|
|
86097b0ce6 | ||
|
|
d46067764b | ||
|
|
7f368b61be | ||
|
|
af4d5e8968 | ||
|
|
0378b1d7fd | ||
|
|
57e2691889 | ||
|
|
09a7dcf594 | ||
|
|
fd8107b79a | ||
|
|
4f86320696 | ||
|
|
39f1971471 | ||
|
|
60db10c1d3 | ||
|
|
2a32624d9d | ||
|
|
2fba915b88 | ||
|
|
318ad3f4e0 | ||
|
|
c1748bbc28 | ||
|
|
06fa7452dd | ||
|
|
2eea3df2c4 | ||
|
|
13484f9843 | ||
|
|
91ee5bde5f | ||
|
|
21d40888d8 | ||
|
|
f0e219570e | ||
|
|
104532e1d7 | ||
|
|
97cf22eedb | ||
|
|
9c5b593d6b | ||
|
|
26394865fc | ||
|
|
07c867d98e | ||
|
|
fc879926b2 | ||
|
|
281e37ee04 | ||
|
|
8de37939fb | ||
|
|
448ec7a72b | ||
|
|
da72500c4b | ||
|
|
0c466d9739 | ||
|
|
8e0027b974 | ||
|
|
234ed6e9e7 | ||
|
|
4426e59176 | ||
|
|
f22874342a | ||
|
|
6bcd5d3183 | ||
|
|
407659a3ef | ||
|
|
5ef669ae91 | ||
|
|
4a39ebd873 | ||
|
|
23b97f6b4a | ||
|
|
093c8a8231 | ||
|
|
85a3a40795 | ||
|
|
b4b7cfa473 | ||
|
|
884ce54181 | ||
|
|
70847d1b2b | ||
|
|
ff26f2a019 | ||
|
|
f4b8236c8d | ||
|
|
03ff0a58cf | ||
|
|
c7a888e2de | ||
|
|
439cceea23 | ||
|
|
83f57b9820 | ||
|
|
78fcdc8d80 | ||
|
|
53f7056b16 | ||
|
|
b7701cdb16 | ||
|
|
94a4519f2b | ||
|
|
6fe52b610b | ||
|
|
434a6c8ad3 | ||
|
|
97489ba573 | ||
|
|
f525a25b49 | ||
|
|
add49e8b4d | ||
|
|
4ab87d8abb | ||
|
|
69ff7afb48 | ||
|
|
62a30c7d8f | ||
|
|
dc37d8f71c | ||
|
|
8864d1360a | ||
|
|
613141998a | ||
|
|
c2fbb4fb64 | ||
|
|
f0cf86076c | ||
|
|
a03afcf0fa | ||
|
|
3abe0bb97d | ||
|
|
a5b4632ceb | ||
|
|
1c78f77c0f | ||
|
|
cb7d3ef3e0 | ||
|
|
5e83a09056 | ||
|
|
b85393de89 | ||
|
|
68c535fd79 | ||
|
|
1c09ee1fbc | ||
|
|
8b921165bb | ||
|
|
0c837de499 | ||
|
|
a44500d206 | ||
|
|
e063613c8c | ||
|
|
416071a5a1 | ||
|
|
93fdb7eabb | ||
|
|
466437a683 | ||
|
|
a34723b53c | ||
|
|
b9bd5100a2 | ||
|
|
51bafccf38 | ||
|
|
c3127d35bb | ||
|
|
1322c1b089 | ||
|
|
9bf7895386 | ||
|
|
538dcb98eb | ||
|
|
3da0efe38e | ||
|
|
b983de2145 | ||
|
|
9f98f8ef46 | ||
|
|
3e2964b385 | ||
|
|
77ab2c21da | ||
|
|
94025a7fd2 | ||
|
|
8c021bcaa0 | ||
|
|
da7a3707fa | ||
|
|
cb293639bc | ||
|
|
16f0712462 | ||
|
|
e9b2b93486 | ||
|
|
a8258ec998 | ||
|
|
09747cd746 | ||
|
|
2f89ae0e84 | ||
|
|
ac748abf78 | ||
|
|
1279114b73 | ||
|
|
7c30718369 | ||
|
|
9c75a06131 | ||
|
|
1e38a6c005 | ||
|
|
23639ee859 | ||
|
|
be20c51996 | ||
|
|
1615b74065 | ||
|
|
5638f90783 | ||
|
|
47b6164e99 | ||
|
|
229f5509e9 | ||
|
|
70c15c31ca | ||
|
|
a98ccc726f | ||
|
|
538ebfe9fe | ||
|
|
8e98481609 | ||
|
|
0ec46b03b5 | ||
|
|
f10f152d2c | ||
|
|
d746a98ef4 | ||
|
|
dbf95ea4bd | ||
|
|
911537b61b | ||
|
|
db55342329 | ||
|
|
d54ce83c8f | ||
|
|
2e926f4a94 | ||
|
|
292a9f08e9 | ||
|
|
b2cd106aae | ||
|
|
ab681cccbe | ||
|
|
9008aa264b | ||
|
|
33ca56a151 | ||
|
|
d8892e195b | ||
|
|
0ab14a085e | ||
|
|
a88cf7034b | ||
|
|
c44071d117 | ||
|
|
fb275e0d9f | ||
|
|
5c7d7ac527 | ||
|
|
1134ac96b6 | ||
|
|
e902856089 | ||
|
|
67adb23a14 | ||
|
|
028a568515 | ||
|
|
7a8d30f4e1 | ||
|
|
9541009742 | ||
|
|
9dee2fbc0c | ||
|
|
60b9c69763 | ||
|
|
b98fa28b4b | ||
|
|
603aa9f6d2 | ||
|
|
f4fa8c31f0 | ||
|
|
8e787fdd5f | ||
|
|
c5ec7c33b5 | ||
|
|
c6dbf343fb | ||
|
|
fa311e6a7c | ||
|
|
04347c3df8 | ||
|
|
8adb36e2a0 | ||
|
|
c700c31127 | ||
|
|
5981622f3a | ||
|
|
77d6308bca | ||
|
|
92e0bb55c3 | ||
|
|
452aa5d8c9 | ||
|
|
2ddb8be775 | ||
|
|
ebf07161b6 | ||
|
|
6ddd2aa184 | ||
|
|
9974a1fbd8 | ||
|
|
67edb835f2 | ||
|
|
5b6cb6e19f | ||
|
|
9a5a62bc3a | ||
|
|
d192dee1ee | ||
|
|
0d6997cbdd | ||
|
|
49325e8b93 | ||
|
|
de07df6f20 | ||
|
|
ca60c5b912 | ||
|
|
54d1a9891b | ||
|
|
2c57bc965c | ||
|
|
d62779a2a6 | ||
|
|
009a20608e | ||
|
|
ca14bf6a75 | ||
|
|
49fe24dee2 | ||
|
|
d9d89341d2 | ||
|
|
bbf75bcbd7 | ||
|
|
9441928884 | ||
|
|
8eb656cce8 | ||
|
|
bf0486cb8b | ||
|
|
e681761f56 | ||
|
|
84ec3fa8d2 | ||
|
|
c618ceb693 | ||
|
|
46a9b6d50d | ||
|
|
44fe04bbbd | ||
|
|
3385c1b6dc | ||
|
|
a1b0f885a7 | ||
|
|
56e8eaeb5d | ||
|
|
ba77fd70c3 | ||
|
|
1841220359 | ||
|
|
c44fb75adc | ||
|
|
ad6badef1f | ||
|
|
7bcf1bfc74 | ||
|
|
0c36988544 | ||
|
|
71e49da8ad | ||
|
|
c28df732d5 | ||
|
|
d5dfdf83f3 | ||
|
|
e42f4d0079 | ||
|
|
cabe327e9b | ||
|
|
98d22a3079 | ||
|
|
3fffab6d6c | ||
|
|
60defd3e50 | ||
|
|
c79ffc4434 | ||
|
|
ec5e27be4b | ||
|
|
cf347cd369 | ||
|
|
28f316e408 | ||
|
|
9986e0d0b3 | ||
|
|
8b809de568 | ||
|
|
fa1f718412 | ||
|
|
3fabc4d72c | ||
|
|
3a11d290e5 | ||
|
|
700fb47b73 | ||
|
|
61dc8aa18e | ||
|
|
c3f92e92c2 | ||
|
|
54d2c46742 | ||
|
|
114a74d3ba | ||
|
|
b2d29dbde5 | ||
|
|
36bfe38a4c | ||
|
|
d4e2c10006 | ||
|
|
ae6a3cda7a | ||
|
|
d5ac89996f | ||
|
|
a4216fd8ca | ||
|
|
a38adf53c3 | ||
|
|
bd7ebaee3b | ||
|
|
d92fb1da8b | ||
|
|
acb7cd862d | ||
|
|
1976c38dc7 | ||
|
|
e522a25968 | ||
|
|
ad84e758be | ||
|
|
427527a129 | ||
|
|
3ba72e9f15 | ||
|
|
a693740f1a | ||
|
|
2a98be594a | ||
|
|
0787f69884 | ||
|
|
dadaf5831e | ||
|
|
2f9c5e6674 | ||
|
|
d02688971d | ||
|
|
95ca373e10 | ||
|
|
4abb6ec78e | ||
|
|
59a382d6df | ||
|
|
80d9fe2211 | ||
|
|
8b48d6c275 | ||
|
|
585d4ff37b | ||
|
|
6ba1d4908b | ||
|
|
3a8e958684 | ||
|
|
1358411b80 | ||
|
|
e26783b8c6 | ||
|
|
fff1dc45e2 | ||
|
|
4aec187e8c | ||
|
|
d9188446a0 | ||
|
|
7ae6e10375 | ||
|
|
ea53a1923a | ||
|
|
f45f34442a | ||
|
|
49de11e761 | ||
|
|
c29aaca857 | ||
|
|
9241339b2c | ||
|
|
9c8b0ceda6 | ||
|
|
78c226e83d | ||
|
|
ef148d2a68 | ||
|
|
7fa2f7f364 | ||
|
|
5ef96d4558 | ||
|
|
e39810b7d0 | ||
|
|
f211da7280 | ||
|
|
c1398eb54b | ||
|
|
1e1aaad7aa | ||
|
|
54ef50178b | ||
|
|
6f7171d26b | ||
|
|
cf75a53438 | ||
|
|
8ab1d13fb3 | ||
|
|
dd250a6d17 | ||
|
|
9082c5efbf | ||
|
|
b19f6d1ccd | ||
|
|
abc90f2e6a | ||
|
|
717c1438c4 | ||
|
|
67e0713f18 | ||
|
|
693d344dea | ||
|
|
914d1442b6 | ||
|
|
c4acbfe095 | ||
|
|
a26b8879f3 | ||
|
|
2e82320b4c | ||
|
|
e6700a360e | ||
|
|
3fdc4a8acd | ||
|
|
82e7bd65a6 | ||
|
|
9ab73602af | ||
|
|
9f557bee8a | ||
|
|
9c8259f659 | ||
|
|
db99482157 | ||
|
|
bb321057d2 | ||
|
|
853f425383 | ||
|
|
7cb3bc7542 | ||
|
|
3da2831779 | ||
|
|
1072ab115b | ||
|
|
efb2ee7880 | ||
|
|
5b98a80828 | ||
|
|
785646800b | ||
|
|
8d6c2dfb9a | ||
|
|
b7a562053a | ||
|
|
d76ad8803e | ||
|
|
13216d1f04 | ||
|
|
00e68ca990 | ||
|
|
c987a06f91 | ||
|
|
87049e9582 | ||
|
|
bab2971c58 | ||
|
|
fd0ac37ffc | ||
|
|
b64d61828a | ||
|
|
08d66ead9b | ||
|
|
9bd8997a31 | ||
|
|
156328c9de | ||
|
|
93696d53f7 | ||
|
|
78b3ec5b1f | ||
|
|
f07431a14c | ||
|
|
8439faf6b8 | ||
|
|
51ab03d097 | ||
|
|
abd910de67 | ||
|
|
24184a5a6a | ||
|
|
0b39ff8b7d | ||
|
|
6ad54ecf86 | ||
|
|
3dd863cb49 | ||
|
|
b719a0372b | ||
|
|
bdef1daba5 | ||
|
|
695099b2b0 | ||
|
|
28f4680575 | ||
|
|
40a7b138e2 | ||
|
|
fa624df1da | ||
|
|
5577c51dbc | ||
|
|
1ab76ae693 | ||
|
|
98bd5cee38 | ||
|
|
f6903cdcdf | ||
|
|
b5cc14c546 | ||
|
|
8988fad713 | ||
|
|
7b8b2d7136 | ||
|
|
dd2ccef0c7 | ||
|
|
e46f10878e | ||
|
|
2dacec0cb5 | ||
|
|
0c5fadee86 | ||
|
|
01b30c68e1 | ||
|
|
e5b0365d0c | ||
|
|
867400d1ac | ||
|
|
88f6ecf250 | ||
|
|
e6beaa49a4 | ||
|
|
fa03fa544f | ||
|
|
c22747fa2e | ||
|
|
fd8f80e92b | ||
|
|
17f2fcb829 | ||
|
|
6a412155a3 | ||
|
|
489d860264 | ||
|
|
ca43394185 | ||
|
|
b3eed47cbb | ||
|
|
71916a85dd | ||
|
|
0669ba5222 | ||
|
|
bec0eac122 | ||
|
|
00e63d9fc8 | ||
|
|
ac181c5439 | ||
|
|
8fbf1f2b34 | ||
|
|
685ac5c7a0 | ||
|
|
634843e1b2 | ||
|
|
d5310b0f73 | ||
|
|
a72cd59b99 | ||
|
|
6f4737190b | ||
|
|
c98b4f4c85 | ||
|
|
8f5532eb74 | ||
|
|
4340597fc9 | ||
|
|
7324246e6a | ||
|
|
55b6ab9c54 | ||
|
|
a5e591cfa6 | ||
|
|
48e5d46f1e | ||
|
|
62d8645468 | ||
|
|
0388ac3f6b | ||
|
|
24752652b7 | ||
|
|
eb03de96ba | ||
|
|
0317d4455f | ||
|
|
757d0961b9 | ||
|
|
693ba01137 | ||
|
|
fa0175d248 | ||
|
|
04d01ac1b3 | ||
|
|
77c7b9d00a | ||
|
|
ee4cfadff1 | ||
|
|
49d8348db3 | ||
|
|
6e445b1beb | ||
|
|
970eb755b6 | ||
|
|
1a803e70be | ||
|
|
6982a2d35f | ||
|
|
0660a3bc67 | ||
|
|
96776567eb | ||
|
|
d09018d2d4 | ||
|
|
0649d8ca8c | ||
|
|
41abaeb7c9 | ||
|
|
4dc82383a0 | ||
|
|
799e2f0b2e | ||
|
|
b95f88c165 | ||
|
|
bbda6e22a2 | ||
|
|
3edfafb6f9 | ||
|
|
99c1d499f7 | ||
|
|
37ed9a097a | ||
|
|
db3d5b63c6 | ||
|
|
6521e1833c | ||
|
|
debe6834ef | ||
|
|
292c8801ea | ||
|
|
b031ceed99 | ||
|
|
82d4ec2738 | ||
|
|
9c55358620 | ||
|
|
51bc5ef542 | ||
|
|
74a252b324 | ||
|
|
43c8592b40 | ||
|
|
babfb0dca3 | ||
|
|
ceb4217415 | ||
|
|
798625698d | ||
|
|
5cfb3b033b | ||
|
|
95d666c348 | ||
|
|
276d61bf3a | ||
|
|
397a209ad2 | ||
|
|
d2f42ef33a | ||
|
|
fe46907aaa | ||
|
|
5c92455ee9 | ||
|
|
046cbe7fca | ||
|
|
32f09275aa | ||
|
|
542ff4cf95 | ||
|
|
5710eb78a8 | ||
|
|
842a80d493 | ||
|
|
c2d4f1c0da | ||
|
|
e28e5b0f5f | ||
|
|
bff4862979 | ||
|
|
6bcef44d42 | ||
|
|
69c9b6f555 | ||
|
|
7f38cb5a16 | ||
|
|
cf7abe110d | ||
|
|
5b060345d2 | ||
|
|
1784036ef7 | ||
|
|
7a8577007c | ||
|
|
7c6e6d8b6b | ||
|
|
c5fd83ddb6 | ||
|
|
7b2fe69c7c | ||
|
|
f0961c7b23 | ||
|
|
35c8bbd49e | ||
|
|
1a343c1ea5 | ||
|
|
4fef8ff326 | ||
|
|
13681756ae | ||
|
|
4a798281e4 | ||
|
|
79670b7878 | ||
|
|
720084578d | ||
|
|
3dd6a92ccf | ||
|
|
7d1686ef93 | ||
|
|
b40b0fff98 | ||
|
|
4dba0580ac | ||
|
|
11653ce752 | ||
|
|
d3e6f3ba41 | ||
|
|
2c6cc37a5f | ||
|
|
4c7defb2ec | ||
|
|
2da02e6d46 | ||
|
|
7a91c87a72 | ||
|
|
598f8a9e7c | ||
|
|
6f0f02bb66 | ||
|
|
e4bde77bd4 | ||
|
|
c24b331866 | ||
|
|
4ac348bd0f | ||
|
|
f0026572e7 | ||
|
|
e30ccabf7b | ||
|
|
6b286db51a | ||
|
|
d79d62bfa0 | ||
|
|
2bdd3a3868 | ||
|
|
09d481e1d6 | ||
|
|
6f23bef5d1 | ||
|
|
84f54d64aa | ||
|
|
c9ddec3bb5 | ||
|
|
f62e1081e1 | ||
|
|
7dba41cbe1 | ||
|
|
77b0277290 | ||
|
|
40325cad9f | ||
|
|
ab5bbae2f6 | ||
|
|
5da746d2fc | ||
|
|
72a694a5e1 | ||
|
|
1ab0d2f915 | ||
|
|
083118aff4 | ||
|
|
ad373c93ae | ||
|
|
ac301c284f | ||
|
|
1e0509da98 | ||
|
|
ad3bef2e5a | ||
|
|
bbbbb3e8d0 | ||
|
|
0bc73e525d | ||
|
|
7ababc4d67 | ||
|
|
6ff8f03ef0 | ||
|
|
010a6ea304 | ||
|
|
973c80b264 | ||
|
|
b5f9ba588a | ||
|
|
c5724fdc4e | ||
|
|
ebda055444 | ||
|
|
7cf9bd8e5e | ||
|
|
ce710117f7 | ||
|
|
fcda04acf1 | ||
|
|
83ac4c7bbe | ||
|
|
2be7872cd6 | ||
|
|
97a7f1a4e7 | ||
|
|
e9e37f33f9 | ||
|
|
344ce11a3e | ||
|
|
7fcd1f85a3 | ||
|
|
5d13ba03d8 | ||
|
|
a99b753d2d | ||
|
|
8f26f4b3ef | ||
|
|
624bc1d9b5 | ||
|
|
0a07bef2d2 | ||
|
|
96bb4d38dc | ||
|
|
58a99a14d5 | ||
|
|
66e9e46458 | ||
|
|
d6060a95d7 | ||
|
|
80ff2f3bfa | ||
|
|
16f05c3b0d | ||
|
|
2ed84b1b71 | ||
|
|
8d21f5f225 | ||
|
|
be2c198259 | ||
|
|
dde011c8f6 | ||
|
|
47112c7c24 | ||
|
|
1b87af86bf | ||
|
|
d45a2b5407 | ||
|
|
49bf9b7cc5 | ||
|
|
79f0a3fc7b | ||
|
|
60b7c7469a | ||
|
|
c377489aba | ||
|
|
8bb22fb576 | ||
|
|
310e0942fd | ||
|
|
df06a24746 | ||
|
|
b9151bc062 | ||
|
|
972d63b2d2 | ||
|
|
440786a4f7 | ||
|
|
3a6ec05bef | ||
|
|
c5733326a9 | ||
|
|
f36b1c03cb | ||
|
|
3266d21ba4 | ||
|
|
62f1504514 | ||
|
|
f60d08b7a4 | ||
|
|
a092a31a1e | ||
|
|
6407518892 | ||
|
|
e7e45f608c | ||
|
|
c175badab6 | ||
|
|
05783be9ac | ||
|
|
6948eabc96 | ||
|
|
48196da281 | ||
|
|
a0b6b1084b | ||
|
|
4292959c87 | ||
|
|
e50b961bf9 | ||
|
|
0ba3957e8a | ||
|
|
c33842f8f0 | ||
|
|
f87237852f | ||
|
|
bfb63a77a2 | ||
|
|
b1ca6af2c3 | ||
|
|
2f20deacf2 | ||
|
|
de1086b894 | ||
|
|
6a19c8cf48 | ||
|
|
b6b0359fcf | ||
|
|
bb0d81a4e9 | ||
|
|
4014972feb | ||
|
|
3903fee2bf | ||
|
|
31706867c7 | ||
|
|
808a75e41c | ||
|
|
919e8dae30 | ||
|
|
763ad1bdb0 | ||
|
|
281575b961 | ||
|
|
42d1bbc7a8 | ||
|
|
a28667e751 | ||
|
|
505ff189d9 | ||
|
|
35c37c2d9e | ||
|
|
efbd11676f | ||
|
|
abf3335415 | ||
|
|
c83b0437fa | ||
|
|
23fc908eb6 | ||
|
|
9d35567cb5 | ||
|
|
7f77b8f069 | ||
|
|
410b3d261f | ||
|
|
d8baf3a814 | ||
|
|
c36b0a6b3f | ||
|
|
3385a46648 | ||
|
|
550b8289c9 | ||
|
|
2aa998f66f | ||
|
|
dff034a5b6 | ||
|
|
c407b6d4f0 | ||
|
|
58c9439a32 | ||
|
|
c75f89894a | ||
|
|
a566240266 | ||
|
|
d03d70ff0b | ||
|
|
7910493a6c | ||
|
|
c76de34b97 | ||
|
|
ddae67913d | ||
|
|
4f9716415b | ||
|
|
caf2d67443 | ||
|
|
393e9d0e00 | ||
|
|
bbbd0d52e9 | ||
|
|
26dead93ff | ||
|
|
1facde3966 | ||
|
|
d5513db9bb | ||
|
|
d135dc26e2 | ||
|
|
2dc68a4785 | ||
|
|
2f706deb26 | ||
|
|
54460e2362 | ||
|
|
1db1374226 | ||
|
|
3917a3f7b9 | ||
|
|
210346e1e3 | ||
|
|
f4efe1f6eb | ||
|
|
04b24d255e | ||
|
|
e34c25b490 | ||
|
|
ea36333497 | ||
|
|
f93f958d66 | ||
|
|
8f3d36f4bc | ||
|
|
51364f8edd | ||
|
|
cb176aae90 | ||
|
|
9d573a92ce | ||
|
|
877ac27868 | ||
|
|
9c8321d3b4 | ||
|
|
e8bfb77b3d | ||
|
|
87ab8980b2 | ||
|
|
13de69080a | ||
|
|
8d439ff0cf | ||
|
|
f6d5ac4621 | ||
|
|
f37a40e138 | ||
|
|
21d8122257 | ||
|
|
0cf7d6aca1 | ||
|
|
94a7dae863 | ||
|
|
4e9bc95fff | ||
|
|
ad57733daf | ||
|
|
f4acc35cba | ||
|
|
f2cf1d4e03 | ||
|
|
b91740a91a | ||
|
|
a006cdb77b | ||
|
|
c93d95132d | ||
|
|
dd0c9baffd | ||
|
|
661276467c | ||
|
|
cf8e3420c0 | ||
|
|
9fe5c196aa | ||
|
|
76aa8a6494 | ||
|
|
9bcc4ed80f | ||
|
|
cd82a5393e | ||
|
|
00d87dba98 | ||
|
|
759f8ef910 | ||
|
|
841b242fb9 | ||
|
|
ae03d7237e | ||
|
|
ff64c6e363 | ||
|
|
820e4d78bf | ||
|
|
c7a5f7d023 | ||
|
|
a4798b81a8 | ||
|
|
48334aa4cd | ||
|
|
8b2d47587a | ||
|
|
c04379af19 | ||
|
|
d26bc886cf | ||
|
|
905f988d43 | ||
|
|
eff7841ec2 | ||
|
|
8526e89e12 | ||
|
|
bde47eb37b | ||
|
|
61716467df | ||
|
|
efa222fb55 | ||
|
|
abfa8a5f0f | ||
|
|
a438967336 | ||
|
|
47a9b34ea2 | ||
|
|
c4110eedf4 | ||
|
|
27218cda86 | ||
|
|
8c059fc1d0 | ||
|
|
dd39ba8c48 | ||
|
|
aa76fac3af | ||
|
|
e4f198ae42 | ||
|
|
dfdaa157a4 | ||
|
|
ea58a78f62 | ||
|
|
34f34521d9 | ||
|
|
ffcbb6a355 | ||
|
|
2510c5fd4a | ||
|
|
ed8c67ce7e | ||
|
|
16628a49f7 | ||
|
|
38ff6f2a32 | ||
|
|
af39282191 | ||
|
|
eab0bf44b2 | ||
|
|
a94912912e | ||
|
|
55ba65ac68 | ||
|
|
f3e698f1be | ||
|
|
14e41a31ef | ||
|
|
62bcd313e3 | ||
|
|
7a53013819 | ||
|
|
4a0f082158 | ||
|
|
f2bf2b5626 | ||
|
|
4e87ac72ea | ||
|
|
95e256293f | ||
|
|
22ab575dd0 | ||
|
|
abd706f435 | ||
|
|
4c00e14cd4 | ||
|
|
e45d7c4ab1 | ||
|
|
c37fdf47a4 | ||
|
|
9a2ea25308 | ||
|
|
560e5ce7bb | ||
|
|
dc0039b820 | ||
|
|
8bc499f221 | ||
|
|
93ce443467 | ||
|
|
f3c5ebd28b | ||
|
|
bcd46eea9d | ||
|
|
689bfd9568 | ||
|
|
dcf3ab2787 | ||
|
|
b4158f4f85 | ||
|
|
0a54929169 | ||
|
|
e34f94e0c1 | ||
|
|
d4c6ea46e6 | ||
|
|
203d4c7669 | ||
|
|
8cd6686803 | ||
|
|
aaddd9eea2 | ||
|
|
1e300ae35f | ||
|
|
c9b76c4a9a | ||
|
|
0e5bdc2f1e | ||
|
|
4b08d854bd | ||
|
|
115c167cfa | ||
|
|
b8d7806843 | ||
|
|
4c2bb9e052 | ||
|
|
618d866bfe | ||
|
|
66d1da2b55 | ||
|
|
ecbe5faef8 | ||
|
|
2160a2d9e8 | ||
|
|
39385135de | ||
|
|
014038a678 | ||
|
|
c60c3b7671 | ||
|
|
154c029f79 | ||
|
|
4b8ab4a00f | ||
|
|
9b86ac637f | ||
|
|
6ed32efe27 | ||
|
|
43e8a6d3d2 | ||
|
|
cf3f0f63c3 | ||
|
|
7a84262fee | ||
|
|
3748bccad2 | ||
|
|
0c486b0965 | ||
|
|
306cb5d2a3 | ||
|
|
b413f21d4b | ||
|
|
36624aff9c | ||
|
|
225a44ca4d | ||
|
|
cabeeb8dab | ||
|
|
9d03a6009b | ||
|
|
93fb978a5c | ||
|
|
6a6c256e05 | ||
|
|
9ca38cd8a1 | ||
|
|
066821dbec | ||
|
|
8242c88cbb | ||
|
|
484f9a0076 | ||
|
|
049903222a | ||
|
|
7ae82f471d | ||
|
|
2503ef2ee5 | ||
|
|
899c695414 | ||
|
|
990c9c2a49 | ||
|
|
f23436fe6d | ||
|
|
29816f7ab5 | ||
|
|
09e6fc9738 | ||
|
|
4e206812f0 | ||
|
|
53b6d813d5 | ||
|
|
06c749ffab | ||
|
|
5162411b38 | ||
|
|
ea049ff82f | ||
|
|
838629db3a | ||
|
|
080c5a19e6 | ||
|
|
bd9366bdfe | ||
|
|
206fa625fd | ||
|
|
58c3fda956 | ||
|
|
ccf7fb56c8 | ||
|
|
eeb5393a3f | ||
|
|
8dfe0dbaf2 | ||
|
|
817a4340e7 | ||
|
|
5506e8a2e2 | ||
|
|
aa51c03c5c | ||
|
|
40bd9bb20d | ||
|
|
41c9adf55a | ||
|
|
2c9245c06c | ||
|
|
d3d14d0b86 | ||
|
|
1da35968de | ||
|
|
2c01d1998f | ||
|
|
08fe04e87e | ||
|
|
8b9e317519 | ||
|
|
e20c411dff | ||
|
|
c854c5a18c | ||
|
|
af97b7a362 | ||
|
|
cfcf9fbfd1 | ||
|
|
971ee4adda | ||
|
|
df326f773f | ||
|
|
b8f475f188 | ||
|
|
cb24876f23 | ||
|
|
075842d69d | ||
|
|
77d31cdf42 | ||
|
|
b95191af06 | ||
|
|
7952f9ef60 | ||
|
|
d4d30ab9c9 | ||
|
|
a279ee02e0 | ||
|
|
d4bee49678 | ||
|
|
8b27bed4df | ||
|
|
979838f4b7 | ||
|
|
5807dd7f09 | ||
|
|
a8fa61ddb9 | ||
|
|
5979e9a8b0 | ||
|
|
0aee6c88ce | ||
|
|
f59570e39d | ||
|
|
006bc70387 | ||
|
|
57725828a6 | ||
|
|
f982b40166 | ||
|
|
5afcbfc4bf | ||
|
|
fe74f9d277 | ||
|
|
41d335e4e9 | ||
|
|
f0bb4cfeff | ||
|
|
445570c241 | ||
|
|
1b161d8c9e | ||
|
|
074d16605d | ||
|
|
68db707f7b | ||
|
|
6c0aaa643e | ||
|
|
81a0696e70 | ||
|
|
70b30a390f | ||
|
|
f461a0f9bb | ||
|
|
9c25244bc6 | ||
|
|
499e89e254 | ||
|
|
13f10f7e19 | ||
|
|
c98f0fb125 | ||
|
|
45cf787625 | ||
|
|
fea162a468 | ||
|
|
313b6952ae | ||
|
|
d46f22d2a1 | ||
|
|
c771abc8c3 | ||
|
|
957fbd8193 | ||
|
|
8d82aff41f | ||
|
|
b329d9f36b | ||
|
|
88e05d663a | ||
|
|
494d80e9de | ||
|
|
1e69371648 | ||
|
|
df1d42fa99 | ||
|
|
6791754874 | ||
|
|
34e038d3ca | ||
|
|
0231220c6f | ||
|
|
24910aacee | ||
|
|
77447975b2 | ||
|
|
3f276580c6 | ||
|
|
c674940487 | ||
|
|
f21c49e293 | ||
|
|
1eed1a1cb3 | ||
|
|
28ee511437 | ||
|
|
712f201bf2 | ||
|
|
4841f31a92 | ||
|
|
0c0456ada6 | ||
|
|
dac013fe7b | ||
|
|
965d742bb6 | ||
|
|
4f85110f75 | ||
|
|
8bd906c1a7 | ||
|
|
46e3a0ecb3 | ||
|
|
6ee645a976 | ||
|
|
3a1a3ceabc | ||
|
|
29de6b394e | ||
|
|
6f625f9222 | ||
|
|
de14b0ea15 | ||
|
|
e55c0c3e15 | ||
|
|
1dbfd70724 | ||
|
|
4059035050 | ||
|
|
b4b3ec0d2a | ||
|
|
d03ff962e3 | ||
|
|
af5d4ad87f | ||
|
|
453374d4e7 | ||
|
|
daa6d4cbb9 | ||
|
|
2996da65c3 | ||
|
|
b5a2ffc6a5 | ||
|
|
f1988f67f5 | ||
|
|
2fe37c461c | ||
|
|
be1725d2eb | ||
|
|
a1ce39dfda | ||
|
|
0cb79d1cd1 | ||
|
|
e8f4b08f66 | ||
|
|
cdf9cdef54 | ||
|
|
72ec500ffd | ||
|
|
c23f5e90dc | ||
|
|
0315e63782 | ||
|
|
9a28b24a0b | ||
|
|
5c72340a37 | ||
|
|
360888563f | ||
|
|
b8a513301e | ||
|
|
4f0cd24476 | ||
|
|
00d35c636b | ||
|
|
e150224cda | ||
|
|
fa4721319e | ||
|
|
6229d4932e | ||
|
|
7c20bddd17 | ||
|
|
2b4e318072 | ||
|
|
dd97df19fe | ||
|
|
9eb63a0d74 | ||
|
|
08412feae0 | ||
|
|
7bc847a7f8 | ||
|
|
3e0b2c5b32 | ||
|
|
be3c579c49 | ||
|
|
31ec643126 | ||
|
|
c94ba61a66 | ||
|
|
6fcc109b6b | ||
|
|
27c02ecb82 | ||
|
|
63a1a34f97 | ||
|
|
dcd7ad430f | ||
|
|
bc3f10cbc1 | ||
|
|
17214ffba7 | ||
|
|
f8330daa8b | ||
|
|
b7fb2483bf | ||
|
|
6e8248a0b8 | ||
|
|
c40fec7ae3 | ||
|
|
7c39e91b68 | ||
|
|
6d87f6ecb0 | ||
|
|
8030f3d4be | ||
|
|
e52fb1cacc | ||
|
|
b995d7bc31 | ||
|
|
ff9b500938 | ||
|
|
8e91f2128f | ||
|
|
c122171dd5 | ||
|
|
35d083ed52 | ||
|
|
a0529ef0ed | ||
|
|
ca845d6b98 | ||
|
|
b811fad3a6 | ||
|
|
0412387d02 | ||
|
|
f362215dd3 | ||
|
|
85349696c2 | ||
|
|
a1fe6d7965 | ||
|
|
92a4608a5b | ||
|
|
b8afd70a42 | ||
|
|
c36c210e66 | ||
|
|
5b2a7b8618 | ||
|
|
71c3b19a71 | ||
|
|
de3f7c2335 | ||
|
|
ef977b7d9e | ||
|
|
347c8a0715 | ||
|
|
ba20dbe590 | ||
|
|
b8be1de068 | ||
|
|
592feb409e | ||
|
|
4a38c02c14 | ||
|
|
d84b83b42c | ||
|
|
38cea9da27 | ||
|
|
da28af024c | ||
|
|
c69f8203ff | ||
|
|
eee5fd0c17 | ||
|
|
ef960c8aec | ||
|
|
f2f3741819 | ||
|
|
e802571726 | ||
|
|
644e999d1e | ||
|
|
5a14ec01ef | ||
|
|
3a6210873e | ||
|
|
25fab64e3f | ||
|
|
f69d1755c6 | ||
|
|
3ddb728043 | ||
|
|
ab2816e214 | ||
|
|
a5f3d7a9bd | ||
|
|
e52c1f0cae | ||
|
|
def3914abe | ||
|
|
677b676c77 | ||
|
|
3936f81d8f | ||
|
|
ade3edace4 | ||
|
|
4251d1fba5 | ||
|
|
d2b2be6a70 | ||
|
|
88ed4e121f | ||
|
|
17da427a9d | ||
|
|
abf4983597 | ||
|
|
f1c8ce35e8 | ||
|
|
32661b791a | ||
|
|
d42780daca | ||
|
|
e8a108d92d | ||
|
|
9e0f569eba | ||
|
|
48ffcaeb61 | ||
|
|
4c6006b2e4 | ||
|
|
18b86e8c46 | ||
|
|
b96f066329 | ||
|
|
0ec7ad6d4f | ||
|
|
358c09c881 | ||
|
|
ff85c6ce5a | ||
|
|
895b5aaa95 | ||
|
|
260143c4fb | ||
|
|
a53ae8f257 | ||
|
|
f8c39c3584 | ||
|
|
b5065d68bd | ||
|
|
80e679f4dc | ||
|
|
4d101d8bf6 | ||
|
|
0e0150bd3a | ||
|
|
e7010fd903 | ||
|
|
df43b89201 | ||
|
|
57df29e3ca | ||
|
|
ab52c91f47 | ||
|
|
290d252bb9 | ||
|
|
0dc03be96b | ||
|
|
e73f57f190 | ||
|
|
71b89eef3d | ||
|
|
f6ebc7a8d5 | ||
|
|
2f38256bcd | ||
|
|
a3cfdea9da | ||
|
|
cbfc7968ed | ||
|
|
f91cb04585 | ||
|
|
c620e18491 | ||
|
|
9e3a866ba3 | ||
|
|
be7b9e2192 | ||
|
|
d624a37f55 | ||
|
|
4a8650e45e | ||
|
|
a15fb01a54 | ||
|
|
7cf622bca3 | ||
|
|
9bffc994e7 | ||
|
|
29d5632d62 | ||
|
|
10d7436051 | ||
|
|
4b121520dd | ||
|
|
bdd0260fda | ||
|
|
5076001e41 | ||
|
|
28e2f731f7 | ||
|
|
11226d7d51 | ||
|
|
3a2c8f3e26 | ||
|
|
97ad1bc92f | ||
|
|
b19567ca19 | ||
|
|
8587d47ae8 | ||
|
|
b9ae123d03 | ||
|
|
411e6fc2a1 | ||
|
|
a5ebfbfc5d | ||
|
|
75dfdd236c | ||
|
|
264c85cfba | ||
|
|
2d36c6b812 | ||
|
|
6d94c1dfa2 | ||
|
|
2c643de7cb | ||
|
|
0c8bcf8b21 | ||
|
|
596948eeb3 | ||
|
|
3efc81d470 | ||
|
|
b307690cca | ||
|
|
e9efc9a0a3 | ||
|
|
81f5d4acd1 | ||
|
|
b49efd89a7 | ||
|
|
0d624c4cb6 | ||
|
|
8dee02e234 | ||
|
|
c93cbed9d2 | ||
|
|
4875f66b7a | ||
|
|
46a656fcbc | ||
|
|
af8fbde892 | ||
|
|
aec95709bc | ||
|
|
dcfe04861e | ||
|
|
d57a2dc29b | ||
|
|
fea980f1d9 | ||
|
|
1e29166c41 | ||
|
|
d337cbdd69 | ||
|
|
62286db249 | ||
|
|
4fdcbb5726 | ||
|
|
dfd9d60dfc | ||
|
|
4c548581d6 | ||
|
|
3d5762de86 | ||
|
|
1e6828d0bb | ||
|
|
3e42bed84e | ||
|
|
32f779f53d | ||
|
|
186aace5dd | ||
|
|
fd06247b06 | ||
|
|
397515274b | ||
|
|
ab1d37d006 | ||
|
|
49eb13ddee | ||
|
|
c07e3f3e66 | ||
|
|
715a33dcee | ||
|
|
18692b1797 | ||
|
|
043f77a06c | ||
|
|
c5bfe0f83e | ||
|
|
66b7fa6312 | ||
|
|
6e42607423 | ||
|
|
0b9f5d3ff2 | ||
|
|
f83c8965e1 | ||
|
|
e708653136 | ||
|
|
55a7f1f377 | ||
|
|
22aae7422e | ||
|
|
4ce3b7a946 | ||
|
|
f54cfb8a97 | ||
|
|
01ae7ab3e6 | ||
|
|
82cfe33d86 | ||
|
|
d715d6a118 | ||
|
|
d40f8d868a | ||
|
|
02a658321a | ||
|
|
5df447a02f | ||
|
|
a250bd3e81 | ||
|
|
a9604c3bb9 | ||
|
|
09e5734720 | ||
|
|
5fa6d1d022 | ||
|
|
556125145d | ||
|
|
b444e5f316 | ||
|
|
4b9902300d | ||
|
|
6282d743a8 | ||
|
|
f659bd24f3 | ||
|
|
1286bdb5be | ||
|
|
1ba119b451 | ||
|
|
4eeb5b3525 | ||
|
|
f3509689db | ||
|
|
7e61e3bd7c | ||
|
|
6b5f216fa4 | ||
|
|
2e8b745576 | ||
|
|
16e3264c84 | ||
|
|
e884a9cb89 | ||
|
|
72d9047da8 | ||
|
|
bec74e6f44 | ||
|
|
5cf9fde505 | ||
|
|
1ff614edec | ||
|
|
531e616278 | ||
|
|
346ca3e403 | ||
|
|
3aefd5a46d | ||
|
|
c531114f46 | ||
|
|
5517e510dc | ||
|
|
fbb1353827 | ||
|
|
9f67fa79db | ||
|
|
6c485ed1f6 | ||
|
|
cc267038e6 | ||
|
|
dfdd476ac9 | ||
|
|
ab9af2bdc4 | ||
|
|
937138378b | ||
|
|
654cef2377 | ||
|
|
aada893f09 |
@@ -1,4 +1,5 @@
|
||||
# http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
19
.github/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# Contributing to Ionic Native
|
||||
|
||||
## Have an issue?
|
||||
#### There are no rules, but here are a few things to consider:
|
||||
###### Before you submit an issue:
|
||||
* Do a quick search to see if there are similar issues
|
||||
* Make sure that you are waiting for `deviceready` to fire before interacting with any plugin. If you are using Ionic 2, this can be done using [the `Platform.ready()` function](http://ionicframework.com/docs/v2/api/platform/Platform/#ready).
|
||||
* **Check that you are using the latest version of** `ionic-native`, you can install the latest version by running `npm i --save ionic-native@latest`
|
||||
|
||||
###### Still having problems? submit an issue with the following details:
|
||||
* Short description of the issue
|
||||
* Steps to reproduce
|
||||
* Stack trace (if available)
|
||||
|
||||
|
||||
## Feature request?
|
||||
Have a plugin you'd like to see supported? Since Ionic Native is a thin wrapper around existing Cordova plugins, adding support for new plugins is as easy as creating a new wrapper for whatever plugin you'd like to add.
|
||||
|
||||
Take a look at our [Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.
|
||||
4
.gitignore
vendored
@@ -1,3 +1,7 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
.idea
|
||||
.tmp
|
||||
aot/
|
||||
dist/
|
||||
scripts/ionic-native-bower
|
||||
|
||||
1217
CHANGELOG.md
@@ -1,5 +0,0 @@
|
||||
# Contributing to Ionic Native
|
||||
|
||||
Have a plugin you'd like to see supported? Because Ionic Native is a thin wrapper around existing Cordova plugins, adding support for new plugins is as easy as creating a new wrapper for whichever plugin you'd like to add.
|
||||
|
||||
Take a look at our [Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.
|
||||
61
DEVELOPER.md
@@ -5,6 +5,19 @@ This is a short guide on creating new plugin wrappers for Ionic Native.
|
||||
|
||||
## Creating Plugin Wrappers
|
||||
|
||||
First, let's start by creating a new plugin wrapper from template.
|
||||
|
||||
```
|
||||
// Call this command, and replace PluginName with the name of the plugin you wish to add
|
||||
// Make sure to capitalize the first letter, or use CamelCase if necessary.
|
||||
|
||||
gulp plugin:create -n PluginName
|
||||
|
||||
// add -m flag to get a minimal template to start with
|
||||
gulp plugin:create -m -n PluginName
|
||||
```
|
||||
|
||||
|
||||
Let's take a look at the existing plugin wrapper for Geolocation to see what goes into an Ionic Native plugin (comments have been removed for clarity):
|
||||
|
||||
```
|
||||
@@ -12,17 +25,18 @@ Let's take a look at the existing plugin wrapper for Geolocation to see what goe
|
||||
plugin: 'cordova-plugin-geolocation',
|
||||
pluginRef: 'navigator.geolocation'
|
||||
})
|
||||
@Injectable()
|
||||
export class Geolocation {
|
||||
|
||||
@Cordova()
|
||||
static getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return }
|
||||
getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return; }
|
||||
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
observable: true,
|
||||
clearFunction: 'clearWatch'
|
||||
})
|
||||
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> { return }
|
||||
watchPosition(options?: GeolocationOptions): Observable<Geoposition> { return; }
|
||||
}
|
||||
```
|
||||
|
||||
@@ -31,6 +45,7 @@ export class Geolocation {
|
||||
First and foremost, we want to create a class representing our plugin, in this case Geolocation.
|
||||
|
||||
```
|
||||
@Injectable()
|
||||
class Geolocation {
|
||||
|
||||
}
|
||||
@@ -47,6 +62,7 @@ For example, the `@Plugin` decorator adds information about the plugin to our Ge
|
||||
plugin: 'cordova-plugin-geolocation',
|
||||
pluginRef: 'navigator.geolocation'
|
||||
})
|
||||
@Injectable()
|
||||
export class Geolocation {
|
||||
|
||||
}
|
||||
@@ -64,7 +80,7 @@ Let's take a look at `getCurrentPosition` first.
|
||||
|
||||
```
|
||||
@Cordova()
|
||||
static getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return }
|
||||
getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return }
|
||||
```
|
||||
|
||||
It's just a stub. The `return` is only there to keep the TypeScript type-checker from complaining since we indicate that `getCurrentPosition` returns a `Promise<Geoposition>`.
|
||||
@@ -81,7 +97,7 @@ Next, let's look at the `watchPosition` method.
|
||||
observable: true,
|
||||
clearFunction: 'clearWatch'
|
||||
})
|
||||
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> { return }
|
||||
watchPosition(options?: GeolocationOptions): Observable<Geoposition> { return }
|
||||
```
|
||||
|
||||
The `@Cordova` decorator has a few more options now.
|
||||
@@ -94,8 +110,41 @@ The `@Cordova` decorator has a few more options now.
|
||||
|
||||
### Testing your changes
|
||||
|
||||
You need to run `npm run build_bundle` in the `ionic-native` project, this will create a `dist` directory. Then, you must go to your ionic application folder and replace your current `node_modules/ionic-native/dist/` with the newly generated one.
|
||||
You need to run `npm run build` in the `ionic-native` project, this will create a `dist` directory. Then, you must go to your ionic application folder and replace your current `node_modules/ionic-native/dist/` with the newly generated one.
|
||||
|
||||
### Cleaning the code
|
||||
|
||||
You need to run `npm run lint` to analyze the code and ensure it's consistency with the repository style. Fix any errors before submitting a PR.
|
||||
|
||||
### 'Wrapping' Up
|
||||
|
||||
That's it! The only thing left to do is rigorously document the plugin and it's usage. Take a look at some of the other plugins for good documentation styles.
|
||||
That's it! The only thing left to do is rigorously document the plugin and it's usage. Take a look at some of the other plugins for good documentation styles.
|
||||
|
||||
## Commit Message Format
|
||||
|
||||
We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the our change log. (Ok you got us, it's basically Angular's commit message format).
|
||||
|
||||
`type(scope): subject`
|
||||
|
||||
#### Type
|
||||
Must be one of the following:
|
||||
|
||||
* **fix**: A bug fix
|
||||
* **feat**: A new feature
|
||||
* **docs**: Documentation only changes
|
||||
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
* **refactor**: A code change that neither fixes a bug nor adds a feature
|
||||
* **perf**: A code change that improves performance
|
||||
* **test**: Adding missing tests
|
||||
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
|
||||
|
||||
#### Scope
|
||||
The scope could be anything specifying place of the commit change. For example, the name of the plugin being changed
|
||||
|
||||
#### Subject
|
||||
The subject contains succinct description of the change:
|
||||
|
||||
* use the imperative, present tense: "change" not "changed" nor "changes"
|
||||
* do not capitalize first letter
|
||||
* do not place a period (.) at the end
|
||||
* entire length of the commit message must not go over 50 characters
|
||||
23
LICENSE
Normal file
@@ -0,0 +1,23 @@
|
||||
Copyright 2015-present Drifty Co.
|
||||
http://drifty.com/
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
177
README.md
@@ -1,59 +1,186 @@
|
||||
[](https://circleci.com/gh/driftyco/ionic-native) [](http://commitizen.github.io/cz-cli/)
|
||||
[](https://www.npmjs.com/package/ionic-native-playground)
|
||||
|
||||
[](https://nodei.co/npm/ionic-native/)
|
||||
[](https://circleci.com/gh/driftyco/ionic-native) [](http://commitizen.github.io/cz-cli/) 
|
||||
|
||||
|
||||
# Ionic Native
|
||||
|
||||
Ionic Native is a curated set of wrappers for Cordova plugins that make adding any native functionality you need to your [Ionic](http://ionicframework.com/), Cordova, or Web View mobile app easy.
|
||||
Ionic Native is a curated set of wrappers for Cordova plugins that make adding any native functionality you need to your [Ionic 2](http://ionicframework.com/) mobile app easy.
|
||||
|
||||
### Documentation
|
||||
Ionic Native wraps plugin callbacks in a Promise or Observable, providing a common interface for all plugins and making it easy to use plugins with Angular change detection.
|
||||
|
||||
## Installation
|
||||
|
||||
Run following command to install Ionic Native in your project.
|
||||
```
|
||||
npm install @ionic-native/core --save
|
||||
```
|
||||
|
||||
You also need to install the Ionic Native package for each plugin you want to add. Please see the [Ionic Native documentation](http://ionicframework.com/docs/v2/native/) for complete instructions on how to add and use the plugins.
|
||||
|
||||
## Documentation
|
||||
|
||||
For the full Ionic Native documentation, please visit [http://ionicframework.com/docs/v2/native/](http://ionicframework.com/docs/v2/native/).
|
||||
|
||||
### Promises and Observables
|
||||
### Basic Usage
|
||||
|
||||
Ionic Native wraps plugin callbacks in a Promise or [Observable](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754), providing a common interface for all plugins and ensuring that native events trigger change detection in Angular 2.
|
||||
To use a plugin, import and add the plugin provider to your `@NgModule`, and then inject it where you wish to use it.
|
||||
|
||||
```typescript
|
||||
// app.module.ts
|
||||
import { Camera } from '@ionic-native/camera';
|
||||
|
||||
...
|
||||
|
||||
@NgModule({
|
||||
...
|
||||
|
||||
providers: [
|
||||
...
|
||||
Camera
|
||||
...
|
||||
]
|
||||
...
|
||||
})
|
||||
export class AppModule { }
|
||||
```
|
||||
import {Geolocation} from 'ionic-native';
|
||||
|
||||
Geolocation.getCurrentPosition().then(pos => {
|
||||
console.log('lat: ' + pos.coords.latitude + ', lon: ' + pos.coords.longitude);
|
||||
});
|
||||
```typescript
|
||||
import { Geolocation } from '@ionic-native/geolocation';
|
||||
import { Platform } from 'ionic-angular';
|
||||
|
||||
let watch = Geolocation.watchPosition();
|
||||
watch.subscribe(pos => {
|
||||
console.log('lat: ' + pos.coords.latitude + ', lon: ' + pos.coords.longitude);
|
||||
});
|
||||
import { NgZone } from '@angular/core';
|
||||
|
||||
// to stop watching
|
||||
watch.unsubscribe();
|
||||
@Component({ ... })
|
||||
export class MyComponent {
|
||||
|
||||
constructor(private geolocation: Geolocation, private platform: Platform, private ngZone: NgZone) {
|
||||
|
||||
platform.ready().then(() => {
|
||||
|
||||
// get position
|
||||
geolocation.getCurrentPosition().then(pos => {
|
||||
|
||||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
|
||||
|
||||
});
|
||||
|
||||
|
||||
// watch position
|
||||
const watch = geolocation.watchPosition().subscribe(pos => {
|
||||
|
||||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
|
||||
|
||||
// Currently, observables from Ionic Native plugins
|
||||
// need to run inside of zone to trigger change detection
|
||||
ngZone.run(() => {
|
||||
this.position = pos;
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// to stop watching
|
||||
watch.unsubscribe();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### Mocking and Browser Development
|
||||
|
||||
Ionic Native 3.x makes it possible to mock plugins and develop nearly the entirety of your app in the browser or in `ionic serve`.
|
||||
|
||||
To do this, you need to provide a mock implementation of the plugins you wish to use. Here's an example of mocking the `Camera` plugin to return a stock image while in development:
|
||||
|
||||
First import the `Camera` class in your `src/app/app.module.ts` file:
|
||||
|
||||
```ts
|
||||
import { Camera } from '@ionic-native/camera';
|
||||
```
|
||||
|
||||
Then create a new class that extends the `Camera` class with a mock implementation:
|
||||
|
||||
```ts
|
||||
class CameraMock extends Camera {
|
||||
getPicture(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve("BASE_64_ENCODED_DATA_GOES_HERE");
|
||||
})
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Finally, override the previous `Camera` class in your `providers` for this module:
|
||||
|
||||
```ts
|
||||
providers: [
|
||||
{ provide: Camera, useClass: CameraMock }
|
||||
]
|
||||
```
|
||||
|
||||
Here's the full example:
|
||||
|
||||
```ts
|
||||
import { NgModule, ErrorHandler } from '@angular/core';
|
||||
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
|
||||
import { MyApp } from './app.component';
|
||||
import { HomePage } from '../pages/home/home';
|
||||
|
||||
import { Camera } from '@ionic-native/camera';
|
||||
|
||||
class CameraMock extends Camera {
|
||||
getPicture(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve("BASE_64_ENCODED_DATA_GOES_HERE");
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
MyApp,
|
||||
HomePage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(MyApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
MyApp,
|
||||
HomePage
|
||||
],
|
||||
providers: [
|
||||
{provide: ErrorHandler, useClass: IonicErrorHandler},
|
||||
{ provide: Camera, useClass: CameraMock }
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
```
|
||||
|
||||
|
||||
### Runtime Diagnostics
|
||||
|
||||
Spent way too long diagnosing an issue only to realize a plugin wasn't firing or installed? Ionic Native lets you know what the issue is and how you can resolve it.
|
||||
|
||||
## Installation
|
||||
|
||||
Run following commmand to install ionic-native in your project.
|
||||
```
|
||||
npm install ionic-native --save
|
||||
```
|
||||

|
||||
|
||||
|
||||
## Plugin Missing?
|
||||
Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart:
|
||||
|
||||
## Ionic 1/Angular 1 support
|
||||
|
||||
Ionic Native 3.x supports Ionic 2.x and above. For Ionic/Angular 1 support, please use version 2 of Ionic Native. See the [2.x README](https://github.com/driftyco/ionic-native/blob/8cd648db5cddd7bdbe2bd78839b19c620cc8c04c/README.md) for usage information.
|
||||
|
||||
# Credits
|
||||
|
||||
Ibrahim Hadeed - [@ihadeed](http://github.com/ihadeed)
|
||||
Ibby Hadeed - [@ihadeed](http://github.com/ihadeed)
|
||||
|
||||
Tim Lancina - [@timlancina](http://twitter.com/timlancina)
|
||||
|
||||
Mike Hartington - [@mhartington](https://twitter.com/mhartington)
|
||||
|
||||
Max Lynch - [@maxlynch](http://twitter.com/maxlynch)
|
||||
|
||||
Rob Wormald - [@robwormald](https://twitter.com/robwormald)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
machine:
|
||||
node:
|
||||
version: 4.1.0
|
||||
version: 5.5.0
|
||||
ruby:
|
||||
version: 2.1.2
|
||||
|
||||
@@ -17,8 +17,7 @@ dependencies:
|
||||
|
||||
test:
|
||||
override:
|
||||
- echo "No tests are written at the moment. But we will attempt to build the library with the latest changes."
|
||||
- npm run build_bundle
|
||||
- echo "No tests to run"
|
||||
|
||||
deployment:
|
||||
staging:
|
||||
|
||||
31
demo/.gitignore
vendored
@@ -1,31 +0,0 @@
|
||||
# Specifies intentionally untracked files to ignore when using Git
|
||||
# http://git-scm.com/docs/gitignore
|
||||
|
||||
*~
|
||||
*.sw[mnpcod]
|
||||
*.log
|
||||
*.tmp
|
||||
*.tmp.*
|
||||
log.txt
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
|
||||
.idea/
|
||||
.sass-cache/
|
||||
.versions/
|
||||
coverage/
|
||||
dist/
|
||||
node_modules/
|
||||
tmp/
|
||||
temp/
|
||||
hooks/
|
||||
platforms/
|
||||
plugins/
|
||||
plugins/android.json
|
||||
plugins/ios.json
|
||||
www/build/
|
||||
$RECYCLE.BIN/
|
||||
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
UserInterfaceState.xcuserstate
|
||||
@@ -1,72 +0,0 @@
|
||||
## Getting Started
|
||||
|
||||
`ionic serve`
|
||||
|
||||
The `ionic serve` command compiles your ES6 files to ES5, your Sass files to CSS, bundles it all up for you, opens up a browser window and serves your app locally. After the initial build it will watch for changes and automatically rebuild and reload. The build output can be configured in your `ionic.config.js` file (which will be autogenerated by `ionic serve` if it doesn't exist yet).
|
||||
|
||||
#### Updating Ionic
|
||||
When you start your project with `ionic start`, the latest version of `ionic-framework` is installed automatically. To update your ionic version in an existing project, run `npm install --save ionic-framework@latest`. This will install the latest version of `ionic-framework` published to npm, and save it in your `package.json` file so if you are checking your project in to version control the correct version of the framework will be installed by [`npm install`](https://docs.npmjs.com/cli/install).
|
||||
|
||||
#### Developing Against Unstable Master
|
||||
- THIS IS NOT UPDATING YOUR APP. THIS IS FOR DEVELOPING AGAINST THE UNSTABLE MASTER BRANCH, WHICH WE DO NOT RECOMMEND. SEE [Updating Ionic](#updating-ionic) FOR INSTRUCTIONS ON UPDATING TO THE LATEST VERSION OF THE FRAMEWORK. To develop against a local version of ionic-framework (master) you'll need to do the following:
|
||||
```bash
|
||||
# if you haven't already, clone the ionic2 repo:
|
||||
$ git clone https://github.com/driftyco/ionic2.git
|
||||
$ cd ionic2
|
||||
$ npm install
|
||||
$ gulp src # build the source files
|
||||
$ npm link
|
||||
|
||||
# now go to your app directory
|
||||
$ cd /Users/Ionitron/git/MyIonic2App
|
||||
$ npm link ionic-framework
|
||||
```
|
||||
And then update your [`webpack.config.js`](https://github.com/driftyco/ionic2-app-base/blob/master/webpack.config.js#L68) file by uncommenting the lines for local development:
|
||||
```js
|
||||
resolve: {
|
||||
modulesDirectories: [
|
||||
"node_modules",
|
||||
"node_modules/ionic-framework/node_modules",
|
||||
"node_modules/ionic-framework/dist/src/es5/common",
|
||||
"node_modules/ionic-framework/dist/js",
|
||||
|
||||
"dist/src/es5/common" // <--- Uncomment me
|
||||
],
|
||||
}
|
||||
```
|
||||
Update the ionic2 [`gulpfile.js #L141`](https://github.com/driftyco/ionic2/blob/master/gulpfile.js#L141) to this in order to use `gulp watch` and make changes to the ionic2 repo:
|
||||
```js
|
||||
gulp.start('transpile.common');
|
||||
```
|
||||
|
||||
|
||||
### Missing Ionic 1 features
|
||||
|
||||
We are currently working on completing a few core Ionic 1 features:
|
||||
|
||||
- Collection repeat (known as Virtual Scrolling in v2) is not quite ready
|
||||
|
||||
### Current Angular 2 known issues:
|
||||
|
||||
- Angular 2 is still in alpha and is not production ready
|
||||
- Angular team has first focused on developing what the core of Angular 2 "is"
|
||||
- Angular 2 filesize has not been optimized for minification yet
|
||||
- Angular 2 bootstrap time has not been optimized yet
|
||||
- As Angular 2 reaches beta there will be significant performance improvements
|
||||
|
||||
|
||||
### ES6/Typescript
|
||||
|
||||
- Ionic's source is written using [Typescript](http://www.typescriptlang.org/)
|
||||
- Ionic apps can be written in ES6 or TypeScript
|
||||
- Typescript is an optional feature to be used at the developers discretion
|
||||
- Ionic 2 starters come with the necessary build tools to transpile both ES6 and Typescript
|
||||
|
||||
|
||||
### CSS Attribute Selectors:
|
||||
|
||||
- Simple
|
||||
- Smaller markup
|
||||
- Easier to read and understand
|
||||
- [Not an issue](https://twitter.com/paul_irish/status/311610425617838081) for today's mobile browsers
|
||||
- No performance impacts have been found
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="io.ionic.nativeDemo" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>V2 Test</name>
|
||||
<description>An Ionic Framework and Cordova project.</description>
|
||||
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
|
||||
<content src="index.html" />
|
||||
<access origin="*" />
|
||||
<allow-intent href="http://*/*" />
|
||||
<allow-intent href="https://*/*" />
|
||||
<allow-intent href="tel:*" />
|
||||
<allow-intent href="sms:*" />
|
||||
<allow-intent href="mailto:*" />
|
||||
<allow-intent href="geo:*" />
|
||||
<platform name="android">
|
||||
<allow-intent href="market:*" />
|
||||
</platform>
|
||||
<platform name="ios">
|
||||
<allow-intent href="itms:*" />
|
||||
<allow-intent href="itms-apps:*" />
|
||||
</platform>
|
||||
<preference name="webviewbounce" value="false" />
|
||||
<preference name="UIWebViewBounce" value="false" />
|
||||
<preference name="DisallowOverscroll" value="true" />
|
||||
<preference name="android-minSdkVersion" value="16" />
|
||||
<preference name="BackupWebStorage" value="none" />
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" onload="true" value="CDVStatusBar" />
|
||||
</feature>
|
||||
<plugin name="cordova-plugin-facebook4" spec="~1.3.0-0">
|
||||
<variable name="APP_ID" value="279000342284434" />
|
||||
<variable name="APP_NAME" value="ngCordova Test" />
|
||||
</plugin>
|
||||
</widget>
|
||||
@@ -1,16 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'demo',
|
||||
proxies: null,
|
||||
|
||||
// hooks execute before or after all project-related Ionic commands
|
||||
// (so not for start, docs, but serve, run, etc.) and take in the arguments
|
||||
// passed to the command as a parameter
|
||||
//
|
||||
// The format is 'before' or 'after' + commandName (uppercased)
|
||||
// ex: beforeServe, afterRun, beforePrepare, etc.
|
||||
hooks: {
|
||||
// beforeServe: function(argv) {
|
||||
// console.log('Arguments to ionic serve: "' + argv._ + '"');
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "demo",
|
||||
"app_id": ""
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"autoprefixer-loader": "^3.1.0",
|
||||
"awesome-typescript-loader": "0.12.0-rc.2",
|
||||
"css-loader": "^0.22.0",
|
||||
"file-loader": "^0.8.4",
|
||||
"node-sass": "^3.4.2",
|
||||
"resolve-url-loader": "^1.4.2",
|
||||
"sass-loader": "^3.1.1",
|
||||
"style-loader": "^0.13.0",
|
||||
"typescript": "1.5.3",
|
||||
"url-loader": "^0.5.6",
|
||||
"webpack": "^1.12.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"ionic-framework": "2.0.0-alpha.35",
|
||||
"ionic-native": "^1.0.7"
|
||||
},
|
||||
"name": "demo",
|
||||
"description": "demo: An Ionic project",
|
||||
"cordovaPlugins": [
|
||||
"cordova-plugin-x-toast",
|
||||
"cordova-plugin-device",
|
||||
"cordova-plugin-console",
|
||||
"cordova-plugin-whitelist",
|
||||
"cordova-plugin-splashscreen",
|
||||
"cordova-plugin-statusbar",
|
||||
"ionic-plugin-keyboard"
|
||||
],
|
||||
"cordovaPlatforms": [
|
||||
"ios"
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 818 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 61 KiB |
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES5",
|
||||
"allowNonTsExtensions": true,
|
||||
"module": "commonjs",
|
||||
"sourceMap": true,
|
||||
"isolatedModules": true,
|
||||
"noEmitOnError": false,
|
||||
"rootDir": ".",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true
|
||||
},
|
||||
"compileOnSave": false
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
var path = require('path');
|
||||
|
||||
var autoprefixerOptions = {
|
||||
browsers: [
|
||||
'last 2 versions',
|
||||
'iOS >= 7',
|
||||
'Android >= 4',
|
||||
'Explorer >= 10',
|
||||
'ExplorerMobile >= 11'
|
||||
],
|
||||
cascade: false
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
entry: [
|
||||
"es6-shim",
|
||||
"reflect-metadata",
|
||||
"web-animations.min",
|
||||
"zone.js",
|
||||
path.join(__dirname, 'www', 'app', 'app.js')
|
||||
],
|
||||
output: {
|
||||
path: path.join(__dirname, 'www', 'build', 'js'),
|
||||
filename: 'app.bundle.js',
|
||||
publicPath: 'build/js/'
|
||||
//pathinfo: true // show module paths in the bundle, handy for debugging
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: "awesome-typescript-loader?doTypeCheck=false&useWebpackText=true",
|
||||
include: [path.join(__dirname, 'www')],
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.ts$/,
|
||||
loader: "awesome-typescript-loader",
|
||||
include: [path.join(__dirname, 'www')],
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
// Loader to compile all of our SASS down.
|
||||
// Use the `resolve-url` pipe to convert the relative url paths to something this loader
|
||||
// can work with, e.g.: url('../my-file.png') => url('/path/to/my-file.png')
|
||||
// https://github.com/bholloway/resolve-url-loader
|
||||
test: /\.scss$/,
|
||||
loaders: [
|
||||
"style",
|
||||
"css",
|
||||
"autoprefixer?" + JSON.stringify(autoprefixerOptions),
|
||||
"resolve-url",
|
||||
"sass?sourceMap"
|
||||
]
|
||||
},
|
||||
// Any png-image or woff-font below or equal to 100K will be converted
|
||||
// to inline base64 instead
|
||||
{ test: /\.(png|woff|ttf)$/, loader: 'url-loader?limit=100000' }
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
modulesDirectories: [
|
||||
"node_modules",
|
||||
"node_modules/ionic-framework/node_modules", // angular is a dependency of ionic
|
||||
"node_modules/ionic-framework/dist/js", // for web-animations polyfill
|
||||
"node_modules/ionic-framework/dist/src/es5/common" // ionic-framework npm package (stable)
|
||||
// See README for steps on developing against ionic-framework locally
|
||||
// "dist/src/es5/common" // when developing against locally linked ionic-framework (master)
|
||||
],
|
||||
extensions: ["", ".js", ".ts"]
|
||||
},
|
||||
// Sass loader configuration to tell webpack where to find the additional SASS files
|
||||
// it needs for `ionic`, located in the ionic-framework node module folder.
|
||||
// https://github.com/jtangelder/sass-loader#sass-options
|
||||
sassLoader: {
|
||||
includePaths: [
|
||||
path.resolve(__dirname, "node_modules", 'ionic-framework', 'dist', 'src', 'scss')
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
import {App, Platform} from 'ionic/ionic';
|
||||
import {HomePage} from './home/home';
|
||||
import './app.scss';
|
||||
|
||||
import {StatusBar} from 'ionic-native';
|
||||
|
||||
@App({
|
||||
template: `
|
||||
<ion-nav [root]="root"></ion-nav>
|
||||
<ion-overlay></ion-overlay>
|
||||
`,
|
||||
})
|
||||
export class MyApp {
|
||||
constructor(platform: Platform) {
|
||||
this.platform = platform;
|
||||
this.initializeApp();
|
||||
this.root = HomePage;
|
||||
|
||||
}
|
||||
|
||||
initializeApp() {
|
||||
this.platform.ready().then(() => {
|
||||
console.log('Platform ready');
|
||||
StatusBar.styleDefault();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
// To customize the look and feel of Ionic, you can override
|
||||
// the Sass variables found in Ionic's source scss files.
|
||||
|
||||
// App Color Variables
|
||||
// ---------------------------------
|
||||
// It's highly recommended to change the default colors
|
||||
// to match your app's branding. Ionic uses a Sass map of
|
||||
// colors so you can add, rename and remove colors as needed.
|
||||
// The "primary" color is the only required color in the map.
|
||||
|
||||
$colors: (primary: #387ef5, secondary: #32db64, danger: #f53d3d, light: #f4f4f4, dark: #222222);
|
||||
|
||||
// Ionic Sass
|
||||
// ---------------------------------
|
||||
@import "ionic";
|
||||
|
||||
// App Sass
|
||||
// ---------------------------------
|
||||
// It is recommended to do all of your imports in your files to let webpack build them
|
||||
// in a module like manner.
|
||||
// For example - instead of adding the @imports here, create a sass file
|
||||
// in ./tabs/tabs.scss - then @import your variables there, along with any custom styles.
|
||||
// Webpack only rebuilds that specific sass file on changes,
|
||||
// and not the entire bundle, making rebuild times much faster for sass changes
|
||||
@@ -1,13 +0,0 @@
|
||||
<ion-navbar *navbar>
|
||||
<ion-title>
|
||||
Ionic Native
|
||||
</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<button ion-item *ng-for="#plugin of plugins" (click)="choosePlugin(plugin)">
|
||||
{{plugin.name}}
|
||||
</button>
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
@@ -1,51 +0,0 @@
|
||||
import {Page, NavController} from 'ionic/ionic'
|
||||
|
||||
import {
|
||||
ActionSheet,
|
||||
BarcodeScanner,
|
||||
BLE,
|
||||
Camera,
|
||||
Calendar,
|
||||
Contacts,
|
||||
Device,
|
||||
Facebook,
|
||||
Geolocation,
|
||||
Push,
|
||||
StatusBar,
|
||||
Toast,
|
||||
TouchID
|
||||
} from 'ionic-native';
|
||||
|
||||
import {Plugin} from '../plugin/plugin';
|
||||
|
||||
@Page({
|
||||
templateUrl: 'app/home/home.html',
|
||||
})
|
||||
export class HomePage {
|
||||
constructor(nav: NavController) {
|
||||
this.nav = nav;
|
||||
|
||||
this.plugins = [
|
||||
ActionSheet,
|
||||
BarcodeScanner,
|
||||
BLE,
|
||||
Camera,
|
||||
Calendar,
|
||||
Contacts,
|
||||
Device,
|
||||
Facebook,
|
||||
Geolocation,
|
||||
Push,
|
||||
StatusBar,
|
||||
Toast,
|
||||
TouchID
|
||||
];
|
||||
console.log('PLUGINS', this.plugins);
|
||||
}
|
||||
|
||||
choosePlugin(plugin) {
|
||||
this.nav.push(Plugin, {
|
||||
plugin: plugin
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<ion-navbar *navbar>
|
||||
<ion-title>
|
||||
{{plugin.name}}
|
||||
</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
<ion-content>
|
||||
<ion-input fixed-label>
|
||||
<textarea [(ng-model)]="content.value" style="height: 150px; font-size: 11px" placeholder="Plugin output will go here as you test methods..."></textarea>
|
||||
</ion-input>
|
||||
<ion-list>
|
||||
<button ion-item *ng-for="#method of methods" (click)="doMethod(method)">
|
||||
{{method}}()
|
||||
</button>
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
@@ -1,172 +0,0 @@
|
||||
import {ElementRef} from 'angular2/angular2';
|
||||
|
||||
import {Page, NavParams} from 'ionic/ionic';
|
||||
|
||||
import {Camera, Calendar, StatusBar, Toast, ActionSheet, Facebook, Push} from 'ionic-native';
|
||||
|
||||
import {safeJSONStringify} from '../util';
|
||||
|
||||
// To specify arguments for any plugin calls
|
||||
var demoArgs = {};
|
||||
demoArgs[ActionSheet] = {
|
||||
show: {
|
||||
'buttonLabels': ['Log out'],
|
||||
'androidEnableCancelButton' : true, // default false
|
||||
'winphoneEnableCancelButton' : true, // default false
|
||||
'addCancelButtonWithLabel': 'Cancel'
|
||||
}
|
||||
}
|
||||
|
||||
demoArgs[Toast] = {
|
||||
showWithOptions: [
|
||||
{
|
||||
message: "hey there",
|
||||
duration: "short",
|
||||
position: "bottom",
|
||||
addPixelsY: -40 // added a negative value to move it up a bit (default 0)
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
demoArgs[Facebook] = {
|
||||
login: [
|
||||
["public_profile"]
|
||||
]
|
||||
};
|
||||
|
||||
demoArgs[Push] = {
|
||||
init: [{
|
||||
android: {
|
||||
senderID: "12345679"
|
||||
},
|
||||
ios: {
|
||||
alert: "true",
|
||||
badge: true,
|
||||
sound: 'false'
|
||||
},
|
||||
windows: {}
|
||||
}]
|
||||
}
|
||||
|
||||
var demoCode = {};
|
||||
|
||||
demoCode[Calendar] = {
|
||||
createEventInteractively: function() {
|
||||
Calendar.createEventInteractively("Grab Coffee", "Johnson Public House", new Date(), new Date()).then((event) => {
|
||||
console.log("Created event", event);
|
||||
this.output('Created event', event);
|
||||
})
|
||||
}
|
||||
};
|
||||
demoCode[Facebook] = {
|
||||
login: function() {
|
||||
Facebook.login(["public_profile"]).then((userData) => {
|
||||
console.log("Facebook UserInfo: ", userData);
|
||||
this.output('Facebook UserInfo: ', userData);
|
||||
Facebook.getAccessToken().then((token) => {
|
||||
this.output('Facebook Token: ', token);
|
||||
console.log("Token: " + token);
|
||||
});
|
||||
}, (err) => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Page({
|
||||
templateUrl: 'app/plugin/plugin.html',
|
||||
})
|
||||
export class Plugin {
|
||||
constructor(params: NavParams, elementRef: ElementRef) {
|
||||
|
||||
let el = elementRef.nativeElement;
|
||||
|
||||
this.textArea = el.querySelector('textarea');
|
||||
|
||||
this.content = {
|
||||
items: [],
|
||||
value: ''
|
||||
};
|
||||
|
||||
this.plugin = params.get('plugin');
|
||||
console.log('Plugin', this.plugin);
|
||||
|
||||
this.methods = Object.keys(this.plugin).filter((k) => {
|
||||
if(typeof this.plugin[k] === 'function') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
output(...args) {
|
||||
var s = args.map((v) => {
|
||||
if(typeof v === 'object') {
|
||||
console.log('Stringifying', v);
|
||||
return safeJSONStringify(v, 4);//JSON.stringify(v);
|
||||
}
|
||||
return v;
|
||||
});
|
||||
|
||||
this.content.items.push(s.join(' '));
|
||||
|
||||
this.content.value = this.content.items.join();
|
||||
|
||||
setTimeout(() => {
|
||||
this.textArea.scrollTop = this.textArea.scrollHeight;
|
||||
})
|
||||
}
|
||||
|
||||
doMethod(method) {
|
||||
let pluginMethodArgEntry = demoArgs[this.plugin];
|
||||
let pluginCodeEntry = demoCode[this.plugin] && demoCode[this.plugin][method];
|
||||
|
||||
let args = [];
|
||||
if(pluginMethodArgEntry) {
|
||||
args = [pluginMethodArgEntry[method]] || [];
|
||||
console.log('Found some default args', args);
|
||||
}
|
||||
|
||||
Toast.showWithOptions({
|
||||
message: 'Doing ' + this.plugin.name + '.' + method + '()',
|
||||
duration: "short",
|
||||
position: "bottom",
|
||||
addPixelsY: -40 // added a negative value to move it up a bit (default 0)
|
||||
});
|
||||
console.log('Doing method', method, 'on Plugin', this.plugin, 'args:', args);
|
||||
|
||||
// Run the custom code
|
||||
if(pluginCodeEntry) {
|
||||
pluginCodeEntry.apply(this);
|
||||
return;
|
||||
}
|
||||
|
||||
let v = this.plugin[method].apply(this.plugin, args);
|
||||
|
||||
if(v && v.then) {
|
||||
v.then(() => {
|
||||
console.log('Success', arguments, this);
|
||||
this.output(arguments);
|
||||
}, (err) => {
|
||||
console.error('Error', err);
|
||||
this.output(err);
|
||||
});
|
||||
} else {
|
||||
console.log('Response: ', v);
|
||||
this.output(v);
|
||||
|
||||
if(v.subscribe) {
|
||||
console.log('Observable response, subscribing...');
|
||||
v.subscribe((val) => {
|
||||
console.log('Observable val', val);
|
||||
this.output(val);
|
||||
}, (err) => {
|
||||
this.output(err);
|
||||
console.log('ERROR: Observable', err);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
export function safeJSONStringify (input, maxDepth)
|
||||
{
|
||||
|
||||
var output,
|
||||
refs = [],
|
||||
refsPaths = [];
|
||||
|
||||
maxDepth = maxDepth || 5;
|
||||
|
||||
function recursion (input, path, depth)
|
||||
{
|
||||
var output = {},
|
||||
pPath,
|
||||
refIdx;
|
||||
|
||||
path = path || "";
|
||||
depth = depth || 0;
|
||||
depth++;
|
||||
|
||||
if (maxDepth && depth > maxDepth)
|
||||
{
|
||||
return "{depth over " + maxDepth + "}";
|
||||
}
|
||||
|
||||
for (var p in input)
|
||||
{
|
||||
pPath = (path ? (path+".") : "") + p;
|
||||
if (typeof input[p] === "function")
|
||||
{
|
||||
//output[p] = "{function}";
|
||||
}
|
||||
else if (typeof input[p] === "object")
|
||||
{
|
||||
/*
|
||||
refIdx = refs.indexOf(input[p]);
|
||||
|
||||
if (-1 !== refIdx)
|
||||
{
|
||||
output[p] = recursion(input[p])"{reference to " + refsPaths[refIdx] + "}";
|
||||
}
|
||||
else
|
||||
{
|
||||
*/
|
||||
refs.push(input[p]);
|
||||
refsPaths.push(pPath);
|
||||
output[p] = recursion(input[p], pPath, depth);
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
output[p] = input[p];
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
if (typeof input === "object")
|
||||
{
|
||||
output = recursion(input);
|
||||
}
|
||||
else
|
||||
{
|
||||
output = input;
|
||||
}
|
||||
|
||||
return JSON.stringify(output);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Ionic</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<!--
|
||||
Looking for a style sheet?
|
||||
Webpack loads styles as dependencies in your javascript
|
||||
See www/app/app.js as an example
|
||||
-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ion-app></ion-app>
|
||||
<script src="cordova.js"></script>
|
||||
<script src="build/js/app.bundle.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
65
gulpfile.js
@@ -1,32 +1,49 @@
|
||||
var gulp = require('gulp');
|
||||
var minimist = require('minimist');
|
||||
var uglify = require('gulp-uglify');
|
||||
var rename = require("gulp-rename");
|
||||
var tslint = require('gulp-tslint');
|
||||
"use strict";
|
||||
|
||||
var flagConfig = {
|
||||
string: ['port', 'version', 'ngVersion', 'animations'],
|
||||
boolean: ['dry-run'],
|
||||
alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
|
||||
default: { port: 8000 }
|
||||
};
|
||||
var flags = minimist(process.argv.slice(2), flagConfig);
|
||||
const gulp = require('gulp'),
|
||||
minimist = require('minimist'),
|
||||
rename = require("gulp-rename"),
|
||||
tslint = require('gulp-tslint'),
|
||||
decamelize = require('decamelize'),
|
||||
replace = require('gulp-replace'),
|
||||
_ = require('lodash');
|
||||
|
||||
const flagConfig = {
|
||||
string: ['port', 'version', 'ngVersion', 'animations'],
|
||||
boolean: ['dry-run'],
|
||||
alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
|
||||
default: { port: 8000 }
|
||||
},
|
||||
|
||||
flags = minimist(process.argv.slice(2), flagConfig);
|
||||
|
||||
/* Docs tasks */
|
||||
require('./scripts/docs/gulp-tasks')(gulp, flags);
|
||||
|
||||
|
||||
gulp.task("minify:dist", function(){
|
||||
gulp.src('./dist/ionic.native.js')
|
||||
.pipe(uglify())
|
||||
.pipe(rename({
|
||||
suffix: '.min'
|
||||
}))
|
||||
.pipe(gulp.dest('./dist'));
|
||||
gulp.task('lint', () => {
|
||||
return gulp.src('src/**/*.ts')
|
||||
.pipe(tslint({
|
||||
formatter: "verbose",
|
||||
configuration: 'tslint.json'
|
||||
}))
|
||||
.pipe(tslint.report());
|
||||
});
|
||||
|
||||
gulp.task("tslint", function(){
|
||||
gulp.src("src/**/*.ts")
|
||||
.pipe(tslint())
|
||||
.pipe(tslint.report('verbose'));
|
||||
gulp.task('plugin:create', () => {
|
||||
if (flags.n && flags.n !== ''){
|
||||
|
||||
const src = flags.m ? './scripts/templates/wrap-min.tmpl':'./scripts/templates/wrap.tmpl',
|
||||
pluginName = flags.n,
|
||||
pluginNameSpaced = pluginName.replace(/(?!^)([A-Z])/g, ' $1');
|
||||
|
||||
return gulp.src(src)
|
||||
.pipe(replace('$PluginName', pluginName))
|
||||
.pipe(replace('$Plugin_Name', pluginNameSpaced))
|
||||
.pipe(replace('$pluginName', _.lowerFirst(pluginName)))
|
||||
.pipe(rename('index.ts'))
|
||||
.pipe(gulp.dest('./src/@ionic-native/plugins/' + _.kebabCase(pluginName)));
|
||||
|
||||
} else {
|
||||
console.log("Usage is: gulp plugin:create -n PluginName");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"directory": "www/lib"
|
||||
}
|
||||
6
ng1demo/.gitignore
vendored
@@ -1,6 +0,0 @@
|
||||
# Specifies intentionally untracked files to ignore when using Git
|
||||
# http://git-scm.com/docs/gitignore
|
||||
|
||||
node_modules/
|
||||
platforms/
|
||||
plugins/
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "HelloIonic",
|
||||
"private": "true",
|
||||
"devDependencies": {
|
||||
"ionic": "driftyco/ionic-bower#1.1.1"
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<widget id="com.ionicframework.ng1demo111951" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>ng1demo</name>
|
||||
<description>
|
||||
An Ionic Framework and Cordova project.
|
||||
</description>
|
||||
<author email="hi@ionicframework" href="http://ionicframework.com/">
|
||||
Ionic Framework Team
|
||||
</author>
|
||||
<content src="index.html"/>
|
||||
<access origin="*"/>
|
||||
<preference name="webviewbounce" value="false"/>
|
||||
<preference name="UIWebViewBounce" value="false"/>
|
||||
<preference name="DisallowOverscroll" value="true"/>
|
||||
<preference name="android-minSdkVersion" value="16"/>
|
||||
<preference name="BackupWebStorage" value="none"/>
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true"/>
|
||||
</feature>
|
||||
</widget>
|
||||
@@ -1,51 +0,0 @@
|
||||
var gulp = require('gulp');
|
||||
var gutil = require('gulp-util');
|
||||
var bower = require('bower');
|
||||
var concat = require('gulp-concat');
|
||||
var sass = require('gulp-sass');
|
||||
var minifyCss = require('gulp-minify-css');
|
||||
var rename = require('gulp-rename');
|
||||
var sh = require('shelljs');
|
||||
|
||||
var paths = {
|
||||
sass: ['./scss/**/*.scss']
|
||||
};
|
||||
|
||||
gulp.task('default', ['sass']);
|
||||
|
||||
gulp.task('sass', function(done) {
|
||||
gulp.src('./scss/ionic.app.scss')
|
||||
.pipe(sass())
|
||||
.on('error', sass.logError)
|
||||
.pipe(gulp.dest('./www/css/'))
|
||||
.pipe(minifyCss({
|
||||
keepSpecialComments: 0
|
||||
}))
|
||||
.pipe(rename({ extname: '.min.css' }))
|
||||
.pipe(gulp.dest('./www/css/'))
|
||||
.on('end', done);
|
||||
});
|
||||
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch(paths.sass, ['sass']);
|
||||
});
|
||||
|
||||
gulp.task('install', ['git-check'], function() {
|
||||
return bower.commands.install()
|
||||
.on('log', function(data) {
|
||||
gutil.log('bower', gutil.colors.cyan(data.id), data.message);
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('git-check', function(done) {
|
||||
if (!sh.which('git')) {
|
||||
console.log(
|
||||
' ' + gutil.colors.red('Git is not installed.'),
|
||||
'\n Git, the version control system, is required to download Ionic.',
|
||||
'\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.',
|
||||
'\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.'
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
done();
|
||||
});
|
||||
@@ -1,83 +0,0 @@
|
||||
<!--
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
-->
|
||||
# Cordova Hooks
|
||||
|
||||
This directory may contain scripts used to customize cordova commands. This
|
||||
directory used to exist at `.cordova/hooks`, but has now been moved to the
|
||||
project root. Any scripts you add to these directories will be executed before
|
||||
and after the commands corresponding to the directory name. Useful for
|
||||
integrating your own build systems or integrating with version control systems.
|
||||
|
||||
__Remember__: Make your scripts executable.
|
||||
|
||||
## Hook Directories
|
||||
The following subdirectories will be used for hooks:
|
||||
|
||||
after_build/
|
||||
after_compile/
|
||||
after_docs/
|
||||
after_emulate/
|
||||
after_platform_add/
|
||||
after_platform_rm/
|
||||
after_platform_ls/
|
||||
after_plugin_add/
|
||||
after_plugin_ls/
|
||||
after_plugin_rm/
|
||||
after_plugin_search/
|
||||
after_prepare/
|
||||
after_run/
|
||||
after_serve/
|
||||
before_build/
|
||||
before_compile/
|
||||
before_docs/
|
||||
before_emulate/
|
||||
before_platform_add/
|
||||
before_platform_rm/
|
||||
before_platform_ls/
|
||||
before_plugin_add/
|
||||
before_plugin_ls/
|
||||
before_plugin_rm/
|
||||
before_plugin_search/
|
||||
before_prepare/
|
||||
before_run/
|
||||
before_serve/
|
||||
pre_package/ <-- Windows 8 and Windows Phone only.
|
||||
|
||||
## Script Interface
|
||||
|
||||
All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables:
|
||||
|
||||
* CORDOVA_VERSION - The version of the Cordova-CLI.
|
||||
* CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios).
|
||||
* CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer)
|
||||
* CORDOVA_HOOK - Path to the hook that is being executed.
|
||||
* CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate)
|
||||
|
||||
If a script returns a non-zero exit code, then the parent cordova command will be aborted.
|
||||
|
||||
|
||||
## Writing hooks
|
||||
|
||||
We highly recommend writting your hooks using Node.js so that they are
|
||||
cross-platform. Some good examples are shown here:
|
||||
|
||||
[http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/)
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// Add Platform Class
|
||||
// v1.0
|
||||
// Automatically adds the platform class to the body tag
|
||||
// after the `prepare` command. By placing the platform CSS classes
|
||||
// directly in the HTML built for the platform, it speeds up
|
||||
// rendering the correct layout/style for the specific platform
|
||||
// instead of waiting for the JS to figure out the correct classes.
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
var rootdir = process.argv[2];
|
||||
|
||||
function addPlatformBodyTag(indexPath, platform) {
|
||||
// add the platform class to the body tag
|
||||
try {
|
||||
var platformClass = 'platform-' + platform;
|
||||
var cordovaClass = 'platform-cordova platform-webview';
|
||||
|
||||
var html = fs.readFileSync(indexPath, 'utf8');
|
||||
|
||||
var bodyTag = findBodyTag(html);
|
||||
if(!bodyTag) return; // no opening body tag, something's wrong
|
||||
|
||||
if(bodyTag.indexOf(platformClass) > -1) return; // already added
|
||||
|
||||
var newBodyTag = bodyTag;
|
||||
|
||||
var classAttr = findClassAttr(bodyTag);
|
||||
if(classAttr) {
|
||||
// body tag has existing class attribute, add the classname
|
||||
var endingQuote = classAttr.substring(classAttr.length-1);
|
||||
var newClassAttr = classAttr.substring(0, classAttr.length-1);
|
||||
newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote;
|
||||
newBodyTag = bodyTag.replace(classAttr, newClassAttr);
|
||||
|
||||
} else {
|
||||
// add class attribute to the body tag
|
||||
newBodyTag = bodyTag.replace('>', ' class="' + platformClass + ' ' + cordovaClass + '">');
|
||||
}
|
||||
|
||||
html = html.replace(bodyTag, newBodyTag);
|
||||
|
||||
fs.writeFileSync(indexPath, html, 'utf8');
|
||||
|
||||
process.stdout.write('add to body class: ' + platformClass + '\n');
|
||||
} catch(e) {
|
||||
process.stdout.write(e);
|
||||
}
|
||||
}
|
||||
|
||||
function findBodyTag(html) {
|
||||
// get the body tag
|
||||
try{
|
||||
return html.match(/<body(?=[\s>])(.*?)>/gi)[0];
|
||||
}catch(e){}
|
||||
}
|
||||
|
||||
function findClassAttr(bodyTag) {
|
||||
// get the body tag's class attribute
|
||||
try{
|
||||
return bodyTag.match(/ class=["|'](.*?)["|']/gi)[0];
|
||||
}catch(e){}
|
||||
}
|
||||
|
||||
if (rootdir) {
|
||||
|
||||
// go through each of the platform directories that have been prepared
|
||||
var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);
|
||||
|
||||
for(var x=0; x<platforms.length; x++) {
|
||||
// open up the index.html file at the www root
|
||||
try {
|
||||
var platform = platforms[x].trim().toLowerCase();
|
||||
var indexPath;
|
||||
|
||||
if(platform == 'android') {
|
||||
indexPath = path.join('platforms', platform, 'assets', 'www', 'index.html');
|
||||
} else {
|
||||
indexPath = path.join('platforms', platform, 'www', 'index.html');
|
||||
}
|
||||
|
||||
if(fs.existsSync(indexPath)) {
|
||||
addPlatformBodyTag(indexPath, platform);
|
||||
}
|
||||
|
||||
} catch(e) {
|
||||
process.stdout.write(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "ng1demo",
|
||||
"app_id": ""
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "ng1demo",
|
||||
"version": "1.1.1",
|
||||
"description": "ng1demo: An Ionic project",
|
||||
"dependencies": {
|
||||
"gulp": "^3.5.6",
|
||||
"gulp-concat": "^2.2.0",
|
||||
"gulp-minify-css": "^0.3.0",
|
||||
"gulp-rename": "^1.2.0",
|
||||
"gulp-sass": "^2.0.4",
|
||||
"ionic-native": "^1.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bower": "^1.3.3",
|
||||
"gulp-util": "^2.2.14",
|
||||
"shelljs": "^0.3.0"
|
||||
},
|
||||
"cordovaPlugins": [
|
||||
"cordova-plugin-device",
|
||||
"cordova-plugin-console",
|
||||
"cordova-plugin-whitelist",
|
||||
"cordova-plugin-splashscreen",
|
||||
"cordova-plugin-statusbar",
|
||||
"ionic-plugin-keyboard"
|
||||
],
|
||||
"cordovaPlatforms": []
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
To customize the look and feel of Ionic, you can override the variables
|
||||
in ionic's _variables.scss file.
|
||||
|
||||
For example, you might change some of the default colors:
|
||||
|
||||
$light: #fff !default;
|
||||
$stable: #f8f8f8 !default;
|
||||
$positive: #387ef5 !default;
|
||||
$calm: #11c1f3 !default;
|
||||
$balanced: #33cd5f !default;
|
||||
$energized: #ffc900 !default;
|
||||
$assertive: #ef473a !default;
|
||||
$royal: #886aea !default;
|
||||
$dark: #444 !default;
|
||||
*/
|
||||
|
||||
// The path for our ionicons font files, relative to the built CSS in www/css
|
||||
$ionicons-font-path: "../lib/ionic/fonts" !default;
|
||||
|
||||
// Include all of Ionic
|
||||
@import "www/lib/ionic/scss/ionic";
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/* Empty. Add your own CSS if you like */
|
||||
|
Before Width: | Height: | Size: 4.6 KiB |
@@ -1,35 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
|
||||
<title></title>
|
||||
|
||||
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
|
||||
<link href="css/style.css" rel="stylesheet">
|
||||
|
||||
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
|
||||
<link href="css/ionic.app.css" rel="stylesheet">
|
||||
-->
|
||||
|
||||
<!-- ionic/angularjs js -->
|
||||
<script src="lib/ionic/js/ionic.bundle.js"></script>
|
||||
|
||||
<!-- cordova script (this will be a 404 during development) -->
|
||||
<script src="cordova.js"></script>
|
||||
|
||||
<!-- your app's js -->
|
||||
<script src="js/app.js"></script>
|
||||
<script src="js/bundle.js"></script>
|
||||
</head>
|
||||
<body ng-app="starter">
|
||||
|
||||
<ion-pane>
|
||||
<ion-header-bar class="bar-stable">
|
||||
<h1 class="title">Ionic Blank Starter</h1>
|
||||
</ion-header-bar>
|
||||
<ion-content>
|
||||
</ion-content>
|
||||
</ion-pane>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,19 +0,0 @@
|
||||
// Ionic Starter App
|
||||
|
||||
// angular.module is a global place for creating, registering and retrieving Angular modules
|
||||
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
|
||||
// the 2nd parameter is an array of 'requires'
|
||||
angular.module('starter', ['ionic'])
|
||||
|
||||
.run(function($ionicPlatform) {
|
||||
$ionicPlatform.ready(function() {
|
||||
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
|
||||
// for form inputs)
|
||||
if(window.cordova && window.cordova.plugins.Keyboard) {
|
||||
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
|
||||
}
|
||||
if(window.StatusBar) {
|
||||
StatusBar.styleDefault();
|
||||
}
|
||||
});
|
||||
})
|
||||
23
ng1demo/www/lib/ionic/css/ionic.min.css
vendored
|
Before Width: | Height: | Size: 326 KiB |
4232
ng1demo/www/lib/ionic/js/angular-ui/angular-ui-router.js
vendored
3721
ng1demo/www/lib/ionic/js/angular/angular-animate.js
vendored
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
AngularJS v1.4.3
|
||||
(c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(F,t,W){'use strict';function ua(a,b,c){if(!a)throw ngMinErr("areq",b||"?",c||"required");return a}function va(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;X(a)&&(a=a.join(" "));X(b)&&(b=b.join(" "));return a+" "+b}function Ea(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function ba(a,b,c){var d="";a=X(a)?a:a&&U(a)&&a.length?a.split(/\s+/):[];u(a,function(a,s){a&&0<a.length&&(d+=0<s?" ":"",d+=c?b+a:a+b)});return d}function Fa(a){if(a instanceof G)switch(a.length){case 0:return[];
|
||||
case 1:if(1===a[0].nodeType)return a;break;default:return G(ka(a))}if(1===a.nodeType)return G(a)}function ka(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1==c.nodeType)return c}}function Ga(a,b,c){u(b,function(b){a.addClass(b,c)})}function Ha(a,b,c){u(b,function(b){a.removeClass(b,c)})}function ha(a){return function(b,c){c.addClass&&(Ga(a,b,c.addClass),c.addClass=null);c.removeClass&&(Ha(a,b,c.removeClass),c.removeClass=null)}}function ia(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||
|
||||
H;a.domOperation=function(){a.$$domOperationFired=!0;b();b=H};a.$$prepared=!0}return a}function ca(a,b){wa(a,b);xa(a,b)}function wa(a,b){b.from&&(a.css(b.from),b.from=null)}function xa(a,b){b.to&&(a.css(b.to),b.to=null)}function R(a,b,c){var d=(b.addClass||"")+" "+(c.addClass||""),e=(b.removeClass||"")+" "+(c.removeClass||"");a=Ia(a.attr("class"),d,e);ya(b,c);b.addClass=a.addClass?a.addClass:null;b.removeClass=a.removeClass?a.removeClass:null;return b}function Ia(a,b,c){function d(a){U(a)&&(a=a.split(" "));
|
||||
var b={};u(a,function(a){a.length&&(b[a]=!0)});return b}var e={};a=d(a);b=d(b);u(b,function(a,b){e[b]=1});c=d(c);u(c,function(a,b){e[b]=1===e[b]?null:-1});var s={addClass:"",removeClass:""};u(e,function(b,c){var d,e;1===b?(d="addClass",e=!a[c]):-1===b&&(d="removeClass",e=a[c]);e&&(s[d].length&&(s[d]+=" "),s[d]+=c)});return s}function z(a){return a instanceof t.element?a[0]:a}function za(a,b,c){var d=Object.create(null),e=a.getComputedStyle(b)||{};u(c,function(a,b){var c=e[a];if(c){var k=c.charAt(0);
|
||||
if("-"===k||"+"===k||0<=k)c=Ja(c);0===c&&(c=null);d[b]=c}});return d}function Ja(a){var b=0;a=a.split(/\s*,\s*/);u(a,function(a){"s"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function la(a){return 0===a||null!=a}function Aa(a,b){var c=O,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function ja(a,b){var c=b?"-"+b+"s":"";da(a,[ea,c]);return[ea,c]}function ma(a,b){var c=b?"paused":"",d=V+"PlayState";da(a,[d,c]);return[d,c]}function da(a,
|
||||
b){a.style[b[0]]=b[1]}function Ba(){var a=Object.create(null);return{flush:function(){a=Object.create(null)},count:function(b){return(b=a[b])?b.total:0},get:function(b){return(b=a[b])&&b.value},put:function(b,c){a[b]?a[b].total++:a[b]={total:1,value:c}}}}var H=t.noop,ya=t.extend,G=t.element,u=t.forEach,X=t.isArray,U=t.isString,na=t.isObject,Ka=t.isUndefined,La=t.isDefined,Ca=t.isFunction,oa=t.isElement,O,pa,V,qa;F.ontransitionend===W&&F.onwebkittransitionend!==W?(O="WebkitTransition",pa="webkitTransitionEnd transitionend"):
|
||||
(O="transition",pa="transitionend");F.onanimationend===W&&F.onwebkitanimationend!==W?(V="WebkitAnimation",qa="webkitAnimationEnd animationend"):(V="animation",qa="animationend");var ra=V+"Delay",sa=V+"Duration",ea=O+"Delay";F=O+"Duration";var Ma={transitionDuration:F,transitionDelay:ea,transitionProperty:O+"Property",animationDuration:sa,animationDelay:ra,animationIterationCount:V+"IterationCount"},Na={transitionDuration:F,transitionDelay:ea,animationDuration:sa,animationDelay:ra};t.module("ngAnimate",
|
||||
[]).directive("ngAnimateChildren",[function(){return function(a,b,c){a=c.ngAnimateChildren;t.isString(a)&&0===a.length?b.data("$$ngAnimateChildren",!0):c.$observe("ngAnimateChildren",function(a){b.data("$$ngAnimateChildren","on"===a||"true"===a)})}}]).factory("$$rAFMutex",["$$rAF",function(a){return function(){var b=!1;a(function(){b=!0});return function(c){b?c():a(c)}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d.push([].concat(a));c()}function c(){if(d.length){for(var b=[],n=
|
||||
0;n<d.length;n++){var h=d[n];h.shift()();h.length&&b.push(h)}d=b;e||a(function(){e||c()})}}var d=[],e;b.waitUntilQuiet=function(b){e&&e();e=a(function(){e=null;b();c()})};return b}]).factory("$$AnimateRunner",["$q","$$rAFMutex",function(a,b){function c(a){this.setHost(a);this._doneCallbacks=[];this._runInAnimationFrame=b();this._state=0}c.chain=function(a,b){function c(){if(n===a.length)b(!0);else a[n](function(a){!1===a?b(!1):(n++,c())})}var n=0;c()};c.all=function(a,b){function c(s){h=h&&s;++n===
|
||||
a.length&&b(h)}var n=0,h=!0;u(a,function(a){a.done(c)})};c.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:H,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&
|
||||
this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._runInAnimationFrame(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(u(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return c}]).provider("$$animateQueue",["$animateProvider",
|
||||
function(a){function b(a,b,c,h){return d[a].some(function(a){return a(b,c,h)})}function c(a,b){a=a||{};var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var d=this.rules={skip:[],cancel:[],join:[]};d.join.push(function(a,b,d){return!b.structural&&c(b.options)});d.skip.push(function(a,b,d){return!b.structural&&!c(b.options)});d.skip.push(function(a,b,c){return"leave"==c.event&&b.structural});d.skip.push(function(a,b,c){return c.structural&&!b.structural});d.cancel.push(function(a,
|
||||
b,c){return c.structural&&b.structural});d.cancel.push(function(a,b,c){return 2===c.state&&b.structural});d.cancel.push(function(a,b,c){a=b.options;c=c.options;return a.addClass&&a.addClass===c.removeClass||a.removeClass&&a.removeClass===c.addClass});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite",function(d,s,n,h,k,D,A,Z,I){function w(a,b){var c=z(a),f=[],m=l[b];m&&u(m,function(a){a.node.contains(c)&&f.push(a.callback)});
|
||||
return f}function B(a,b,c,f){d(function(){u(w(b,a),function(a){a(b,c,f)})})}function r(a,S,p){function d(b,c,f,p){B(c,a,f,p);b.progress(c,f,p)}function g(b){Da(a,p);ca(a,p);p.domOperation();l.complete(!b)}var P,E;if(a=Fa(a))P=z(a),E=a.parent();p=ia(p);var l=new A;if(!P)return g(),l;X(p.addClass)&&(p.addClass=p.addClass.join(" "));X(p.removeClass)&&(p.removeClass=p.removeClass.join(" "));p.from&&!na(p.from)&&(p.from=null);p.to&&!na(p.to)&&(p.to=null);var e=[P.className,p.addClass,p.removeClass].join(" ");
|
||||
if(!v(e))return g(),l;var M=0<=["enter","move","leave"].indexOf(S),h=!x||L.get(P),e=!h&&m.get(P)||{},k=!!e.state;h||k&&1==e.state||(h=!ta(a,E,S));if(h)return g(),l;M&&K(a);h={structural:M,element:a,event:S,close:g,options:p,runner:l};if(k){if(b("skip",a,h,e)){if(2===e.state)return g(),l;R(a,e.options,p);return e.runner}if(b("cancel",a,h,e))2===e.state?e.runner.end():e.structural?e.close():R(a,h.options,e.options);else if(b("join",a,h,e))if(2===e.state)R(a,p,{});else return S=h.event=e.event,p=R(a,
|
||||
e.options,h.options),l}else R(a,p,{});(k=h.structural)||(k="animate"===h.event&&0<Object.keys(h.options.to||{}).length||c(h.options));if(!k)return g(),C(a),l;M&&f(E);var r=(e.counter||0)+1;h.counter=r;ga(a,1,h);s.$$postDigest(function(){var b=m.get(P),v=!b,b=b||{},e=a.parent()||[],E=0<e.length&&("animate"===b.event||b.structural||c(b.options));if(v||b.counter!==r||!E){v&&(Da(a,p),ca(a,p));if(v||M&&b.event!==S)p.domOperation(),l.end();E||C(a)}else S=!b.structural&&c(b.options,!0)?"setClass":b.event,
|
||||
b.structural&&f(e),ga(a,2),b=D(a,S,b.options),b.done(function(b){g(!b);(b=m.get(P))&&b.counter===r&&C(z(a));d(l,S,"close",{})}),l.setHost(b),d(l,S,"start",{})});return l}function K(a){a=z(a).querySelectorAll("[data-ng-animate]");u(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate")),c=m.get(a);switch(b){case 2:c.runner.end();case 1:c&&m.remove(a)}})}function C(a){a=z(a);a.removeAttribute("data-ng-animate");m.remove(a)}function E(a,b){return z(a)===z(b)}function f(a){a=z(a);do{if(!a||1!==
|
||||
a.nodeType)break;var b=m.get(a);if(b){var f=a;!b.structural&&c(b.options)&&(2===b.state&&b.runner.end(),C(f))}a=a.parentNode}while(1)}function ta(a,b,c){var f=c=!1,d=!1,v;for((a=a.data("$ngAnimatePin"))&&(b=a);b&&b.length;){f||(f=E(b,n));a=b[0];if(1!==a.nodeType)break;var e=m.get(a)||{};d||(d=e.structural||L.get(a));if(Ka(v)||!0===v)a=b.data("$$ngAnimateChildren"),La(a)&&(v=a);if(d&&!1===v)break;f||(f=E(b,n),f||(a=b.data("$ngAnimatePin"))&&(b=a));c||(c=E(b,g));b=b.parent()}return(!d||v)&&f&&c}function ga(a,
|
||||
b,c){c=c||{};c.state=b;a=z(a);a.setAttribute("data-ng-animate",b);c=(b=m.get(a))?ya(b,c):c;m.put(a,c)}var m=new k,L=new k,x=null,M=s.$watch(function(){return 0===Z.totalPendingRequests},function(a){a&&(M(),s.$$postDigest(function(){s.$$postDigest(function(){null===x&&(x=!0)})}))}),g=G(h[0].body),l={},P=a.classNameFilter(),v=P?function(a){return P.test(a)}:function(){return!0},Da=ha(I);return{on:function(a,b,c){b=ka(b);l[a]=l[a]||[];l[a].push({node:b,callback:c})},off:function(a,b,c){function f(a,
|
||||
b,c){var d=ka(b);return a.filter(function(a){return!(a.node===d&&(!c||a.callback===c))})}var d=l[a];d&&(l[a]=1===arguments.length?null:f(d,b,c))},pin:function(a,b){ua(oa(a),"element","not an element");ua(oa(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,f){c=c||{};c.domOperation=f;return r(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!x;else if(oa(a)){var f=z(a),d=L.get(f);1===c?b=!d:(b=!!b)?d&&L.remove(f):L.put(f,!0)}else b=x=!!a;return b}}}]}]).provider("$$animation",
|
||||
["$animateProvider",function(a){function b(a){return a.data("$$animationRunner")}var c=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$rAFScheduler",function(a,e,s,n,h){var k=[],D=ha(a),A=0,Z=0,I=[];return function(w,B,r){function K(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];u(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function C(a){var b=[],c={};u(a,function(a,f){var d=z(a.element),
|
||||
m=0<=["enter","move"].indexOf(a.event),d=a.structural?K(d):[];if(d.length){var g=m?"to":"from";u(d,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][g]={animationID:f,element:G(a)}})}else b.push(a)});var f={},d={};u(c,function(c,m){var g=c.from,e=c.to;if(g&&e){var l=a[g.animationID],h=a[e.animationID],x=g.animationID.toString();if(!d[x]){var B=d[x]={structural:!0,beforeStart:function(){l.beforeStart();h.beforeStart()},close:function(){l.close();h.close()},classes:E(l.classes,h.classes),
|
||||
from:l,to:h,anchors:[]};B.classes.length?b.push(B):(b.push(l),b.push(h))}d[x].anchors.push({out:g.element,"in":e.element})}else g=g?g.animationID:e.animationID,e=g.toString(),f[e]||(f[e]=!0,b.push(a[g]))});return b}function E(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],f=0;f<a.length;f++){var d=a[f];if("ng-"!==d.substring(0,3))for(var g=0;g<b.length;g++)if(d===b[g]){c.push(d);break}}return c.join(" ")}function f(a){for(var b=c.length-1;0<=b;b--){var f=c[b];if(s.has(f)&&(f=s.get(f)(a)))return f}}
|
||||
function ta(a,c){a.from&&a.to?(b(a.from.element).setHost(c),b(a.to.element).setHost(c)):b(a.element).setHost(c)}function ga(){var a=b(w);!a||"leave"===B&&r.$$domOperationFired||a.end()}function m(b){w.off("$destroy",ga);w.removeData("$$animationRunner");D(w,r);ca(w,r);r.domOperation();g&&a.removeClass(w,g);w.removeClass("ng-animate");x.complete(!b)}r=ia(r);var L=0<=["enter","move","leave"].indexOf(B),x=new n({end:function(){m()},cancel:function(){m(!0)}});if(!c.length)return m(),x;w.data("$$animationRunner",
|
||||
x);var M=va(w.attr("class"),va(r.addClass,r.removeClass)),g=r.tempClasses;g&&(M+=" "+g,r.tempClasses=null);var l;L||(l=A,A+=1);k.push({element:w,classes:M,event:B,classBasedIndex:l,structural:L,options:r,beforeStart:function(){w.addClass("ng-animate");g&&a.addClass(w,g)},close:m});w.on("$destroy",ga);if(1<k.length)return x;e.$$postDigest(function(){Z=A;A=0;I.length=0;var a=[];u(k,function(c){b(c.element)&&a.push(c)});k.length=0;u(C(a),function(a){function c(){a.beforeStart();var d,g=a.close,e=a.anchors?
|
||||
a.from.element||a.to.element:a.element;b(e)&&z(e).parentNode&&(e=f(a))&&(d=e.start);d?(d=d(),d.done(function(a){g(!a)}),ta(a,d)):g()}a.structural?c():(I.push({node:z(a.element),fn:c}),a.classBasedIndex===Z-1&&(I=I.sort(function(a,b){return b.node.contains(a.node)}).map(function(a){return a.fn}),h(I)))})});return x}}]}]).provider("$animateCss",["$animateProvider",function(a){var b=Ba(),c=Ba();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$document","$sniffer","$$rAFScheduler",function(a,
|
||||
e,s,n,h,k,D){function A(a,b){var c=a.parentNode;return(c.$$ngAnimateParentKey||(c.$$ngAnimateParentKey=++r))+"-"+a.getAttribute("class")+"-"+b}function Z(h,f,B,k){var m;0<b.count(B)&&(m=c.get(B),m||(f=ba(f,"-stagger"),e.addClass(h,f),m=za(a,h,k),m.animationDuration=Math.max(m.animationDuration,0),m.transitionDuration=Math.max(m.transitionDuration,0),e.removeClass(h,f),c.put(B,m)));return m||{}}function I(a){C.push(a);D.waitUntilQuiet(function(){b.flush();c.flush();for(var a=K.offsetWidth+1,d=0;d<
|
||||
C.length;d++)C[d](a);C.length=0})}function w(c,f,e){f=b.get(e);f||(f=za(a,c,Ma),"infinite"===f.animationIterationCount&&(f.animationIterationCount=1));b.put(e,f);c=f;e=c.animationDelay;f=c.transitionDelay;c.maxDelay=e&&f?Math.max(e,f):e||f;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var B=ha(e),r=0,K=z(h).body,C=[];return function(a,c){function d(){m()}function h(){m(!0)}function m(b){if(!(K||C&&D)){K=!0;D=!1;e.removeClass(a,Y);e.removeClass(a,
|
||||
W);ma(g,!1);ja(g,!1);u(l,function(a){g.style[a[0]]=""});B(a,c);ca(a,c);if(c.onDone)c.onDone();p&&p.complete(!b)}}function L(a){q.blockTransition&&ja(g,a);q.blockKeyframeAnimation&&ma(g,!!a)}function x(){p=new s({end:d,cancel:h});m();return{$$willAnimate:!1,start:function(){return p},end:d}}function M(){function b(){if(!K){L(!1);u(l,function(a){g.style[a[0]]=a[1]});B(a,c);e.addClass(a,W);if(q.recalculateTimingStyles){fa=g.className+" "+Y;$=A(g,fa);y=w(g,fa,$);Q=y.maxDelay;H=Math.max(Q,0);J=y.maxDuration;
|
||||
if(0===J){m();return}q.hasTransitions=0<y.transitionDuration;q.hasAnimations=0<y.animationDuration}if(q.applyTransitionDelay||q.applyAnimationDelay){Q="boolean"!==typeof c.delay&&la(c.delay)?parseFloat(c.delay):Q;H=Math.max(Q,0);var k;q.applyTransitionDelay&&(y.transitionDelay=Q,k=[ea,Q+"s"],l.push(k),g.style[k[0]]=k[1]);q.applyAnimationDelay&&(y.animationDelay=Q,k=[ra,Q+"s"],l.push(k),g.style[k[0]]=k[1])}F=1E3*H;G=1E3*J;if(c.easing){var r=c.easing;q.hasTransitions&&(k=O+"TimingFunction",l.push([k,
|
||||
r]),g.style[k]=r);q.hasAnimations&&(k=V+"TimingFunction",l.push([k,r]),g.style[k]=r)}y.transitionDuration&&p.push(pa);y.animationDuration&&p.push(qa);x=Date.now();a.on(p.join(" "),h);n(d,F+1.5*G);xa(a,c)}}function d(){m()}function h(a){a.stopPropagation();var b=a.originalEvent||a;a=b.$manualTimeStamp||b.timeStamp||Date.now();b=parseFloat(b.elapsedTime.toFixed(3));Math.max(a-x,0)>=F&&b>=J&&(C=!0,m())}if(!K)if(g.parentNode){var x,p=[],k=function(a){if(C)D&&a&&(D=!1,m());else if(D=!a,y.animationDuration)if(a=
|
||||
ma(g,D),D)l.push(a);else{var b=l,c=b.indexOf(a);0<=a&&b.splice(c,1)}},r=0<U&&(y.transitionDuration&&0===T.transitionDuration||y.animationDuration&&0===T.animationDuration)&&Math.max(T.animationDelay,T.transitionDelay);r?n(b,Math.floor(r*U*1E3),!1):b();t.resume=function(){k(!0)};t.pause=function(){k(!1)}}else m()}var g=z(a);if(!g||!g.parentNode)return x();c=ia(c);var l=[],r=a.attr("class"),v=Ea(c),K,D,C,p,t,H,F,J,G;if(0===c.duration||!k.animations&&!k.transitions)return x();var aa=c.event&&X(c.event)?
|
||||
c.event.join(" "):c.event,R="",N="";aa&&c.structural?R=ba(aa,"ng-",!0):aa&&(R=aa);c.addClass&&(N+=ba(c.addClass,"-add"));c.removeClass&&(N.length&&(N+=" "),N+=ba(c.removeClass,"-remove"));c.applyClassesEarly&&N.length&&(B(a,c),N="");var Y=[R,N].join(" ").trim(),fa=r+" "+Y,W=ba(Y,"-active"),r=v.to&&0<Object.keys(v.to).length;if(!(0<(c.keyframeStyle||"").length||r||Y))return x();var $,T;0<c.stagger?(v=parseFloat(c.stagger),T={transitionDelay:v,animationDelay:v,transitionDuration:0,animationDuration:0}):
|
||||
($=A(g,fa),T=Z(g,Y,$,Na));e.addClass(a,Y);c.transitionStyle&&(v=[O,c.transitionStyle],da(g,v),l.push(v));0<=c.duration&&(v=0<g.style[O].length,v=Aa(c.duration,v),da(g,v),l.push(v));c.keyframeStyle&&(v=[V,c.keyframeStyle],da(g,v),l.push(v));var U=T?0<=c.staggerIndex?c.staggerIndex:b.count($):0;(aa=0===U)&&ja(g,9999);var y=w(g,fa,$),Q=y.maxDelay;H=Math.max(Q,0);J=y.maxDuration;var q={};q.hasTransitions=0<y.transitionDuration;q.hasAnimations=0<y.animationDuration;q.hasTransitionAll=q.hasTransitions&&
|
||||
"all"==y.transitionProperty;q.applyTransitionDuration=r&&(q.hasTransitions&&!q.hasTransitionAll||q.hasAnimations&&!q.hasTransitions);q.applyAnimationDuration=c.duration&&q.hasAnimations;q.applyTransitionDelay=la(c.delay)&&(q.applyTransitionDuration||q.hasTransitions);q.applyAnimationDelay=la(c.delay)&&q.hasAnimations;q.recalculateTimingStyles=0<N.length;if(q.applyTransitionDuration||q.applyAnimationDuration)J=c.duration?parseFloat(c.duration):J,q.applyTransitionDuration&&(q.hasTransitions=!0,y.transitionDuration=
|
||||
J,v=0<g.style[O+"Property"].length,l.push(Aa(J,v))),q.applyAnimationDuration&&(q.hasAnimations=!0,y.animationDuration=J,l.push([sa,J+"s"]));if(0===J&&!q.recalculateTimingStyles)return x();null==c.duration&&0<y.transitionDuration&&(q.recalculateTimingStyles=q.recalculateTimingStyles||aa);F=1E3*H;G=1E3*J;c.skipBlocking||(q.blockTransition=0<y.transitionDuration,q.blockKeyframeAnimation=0<y.animationDuration&&0<T.animationDelay&&0===T.animationDuration);wa(a,c);q.blockTransition||ja(g,!1);L(J);return{$$willAnimate:!0,
|
||||
end:d,start:function(){if(!K)return t={end:d,cancel:h,resume:null,pause:null},p=new s(t),I(M),p}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$document","$sniffer",function(a,c,d,e,s,n){function h(a){return a.replace(/\bng-\S+\b/g,"")}function k(a,b){U(a)&&(a=a.split(" "));U(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}function D(c,
|
||||
e,A){function D(a){var b={},c=z(a).getBoundingClientRect();u(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=I.scrollTop;break;case "left":d+=I.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function s(){var c=h(A.attr("class")||""),d=k(c,t),c=k(t,c),d=a(n,{to:D(A),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate?d:null}function f(){n.remove();e.removeClass("ng-animate-shim");A.removeClass("ng-animate-shim")}var n=G(z(e).cloneNode(!0)),
|
||||
t=h(n.attr("class")||"");e.addClass("ng-animate-shim");A.addClass("ng-animate-shim");n.addClass("ng-anchor");w.append(n);var m;c=function(){var c=a(n,{addClass:"ng-anchor-out",delay:!0,from:D(e)});return c.$$willAnimate?c:null}();if(!c&&(m=s(),!m))return f();var L=c||m;return{start:function(){function a(){c&&c.end()}var b,c=L.start();c.done(function(){c=null;if(!m&&(m=s()))return c=m.start(),c.done(function(){c=null;f();b.complete()}),c;f();b.complete()});return b=new d({end:a,cancel:a})}}}function A(a,
|
||||
b,c,e){var h=t(a),f=t(b),k=[];u(e,function(a){(a=D(c,a.out,a["in"]))&&k.push(a)});if(h||f||0!==k.length)return{start:function(){function a(){u(b,function(a){a.end()})}var b=[];h&&b.push(h.start());f&&b.push(f.start());u(k,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function t(c){var d=c.element,e=c.options||{};c.structural?(e.structural=e.applyClassesEarly=!0,e.event=c.event,"leave"===e.event&&(e.onDone=e.domOperation)):e.event=null;
|
||||
c=a(d,e);return c.$$willAnimate?c:null}if(!n.animations&&!n.transitions)return H;var I=z(s).body;c=z(e);var w=G(I.parentNode===c?I:c);return function(a){return a.from&&a.to?A(a.from,a.to,a.classes,a.anchors):t(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=["$injector","$$AnimateRunner","$$rAFMutex","$$jqLite",function(b,c,d,e){function s(c){c=X(c)?c:c.split(" ");for(var d=[],e={},A=0;A<c.length;A++){var n=c[A],s=a.$$registeredAnimations[n];s&&!e[n]&&(d.push(b.get(s)),e[n]=
|
||||
!0)}return d}var n=ha(e);return function(a,b,d,e){function t(){e.domOperation();n(a,e)}function z(a,b,d,e,g){switch(d){case "animate":b=[b,e.from,e.to,g];break;case "setClass":b=[b,r,K,g];break;case "addClass":b=[b,r,g];break;case "removeClass":b=[b,K,g];break;default:b=[b,g]}b.push(e);if(a=a.apply(a,b))if(Ca(a.start)&&(a=a.start()),a instanceof c)a.done(g);else if(Ca(a))return a;return H}function w(a,b,d,e,g){var f=[];u(e,function(e){var h=e[g];h&&f.push(function(){var e,g,f=!1,l=function(a){f||
|
||||
(f=!0,(g||H)(a),e.complete(!a))};e=new c({end:function(){l()},cancel:function(){l(!0)}});g=z(h,a,b,d,function(a){l(!1===a)});return e})});return f}function B(a,b,d,e,g){var f=w(a,b,d,e,g);if(0===f.length){var h,k;"beforeSetClass"===g?(h=w(a,"removeClass",d,e,"beforeRemoveClass"),k=w(a,"addClass",d,e,"beforeAddClass")):"setClass"===g&&(h=w(a,"removeClass",d,e,"removeClass"),k=w(a,"addClass",d,e,"addClass"));h&&(f=f.concat(h));k&&(f=f.concat(k))}if(0!==f.length)return function(a){var b=[];f.length&&
|
||||
u(f,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){u(b,function(b){a?b.cancel():b.end()})}}}3===arguments.length&&na(d)&&(e=d,d=null);e=ia(e);d||(d=a.attr("class")||"",e.addClass&&(d+=" "+e.addClass),e.removeClass&&(d+=" "+e.removeClass));var r=e.addClass,K=e.removeClass,C=s(d),E,f;if(C.length){var F,G;"leave"==b?(G="leave",F="afterLeave"):(G="before"+b.charAt(0).toUpperCase()+b.substr(1),F=b);"enter"!==b&&"move"!==b&&(E=B(a,b,e,C,G));f=B(a,b,e,C,F)}if(E||f)return{start:function(){function b(c){n=
|
||||
!0;t();ca(a,e);g.complete(c)}var d,k=[];E&&k.push(function(a){d=E(a)});k.length?k.push(function(a){t();a(!0)}):t();f&&k.push(function(a){d=f(a)});var n=!1,g=new c({end:function(){n||((d||H)(void 0),b(void 0))},cancel:function(){n||((d||H)(!0),b(!0))}});c.chain(k,b);return g}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}
|
||||
return function(a){if(a.from&&a.to){var b=d(a.from),n=d(a.to);if(b||n)return{start:function(){function a(){return function(){u(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());n&&d.push(n.start());c.all(d,function(a){e.complete(a)});var e=new c({end:a(),cancel:a()});return e}}}else return d(a)}}]}])})(window,window.angular);
|
||||
//# sourceMappingURL=angular-animate.min.js.map
|
||||
669
ng1demo/www/lib/ionic/js/angular/angular-resource.js
vendored
@@ -1,669 +0,0 @@
|
||||
/**
|
||||
* @license AngularJS v1.4.3
|
||||
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
* License: MIT
|
||||
*/
|
||||
(function(window, angular, undefined) {'use strict';
|
||||
|
||||
var $resourceMinErr = angular.$$minErr('$resource');
|
||||
|
||||
// Helper functions and regex to lookup a dotted path on an object
|
||||
// stopping at undefined/null. The path must be composed of ASCII
|
||||
// identifiers (just like $parse)
|
||||
var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;
|
||||
|
||||
function isValidDottedPath(path) {
|
||||
return (path != null && path !== '' && path !== 'hasOwnProperty' &&
|
||||
MEMBER_NAME_REGEX.test('.' + path));
|
||||
}
|
||||
|
||||
function lookupDottedPath(obj, path) {
|
||||
if (!isValidDottedPath(path)) {
|
||||
throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path);
|
||||
}
|
||||
var keys = path.split('.');
|
||||
for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) {
|
||||
var key = keys[i];
|
||||
obj = (obj !== null) ? obj[key] : undefined;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a shallow copy of an object and clear other fields from the destination
|
||||
*/
|
||||
function shallowClearAndCopy(src, dst) {
|
||||
dst = dst || {};
|
||||
|
||||
angular.forEach(dst, function(value, key) {
|
||||
delete dst[key];
|
||||
});
|
||||
|
||||
for (var key in src) {
|
||||
if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
|
||||
dst[key] = src[key];
|
||||
}
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name ngResource
|
||||
* @description
|
||||
*
|
||||
* # ngResource
|
||||
*
|
||||
* The `ngResource` module provides interaction support with RESTful services
|
||||
* via the $resource service.
|
||||
*
|
||||
*
|
||||
* <div doc-module-components="ngResource"></div>
|
||||
*
|
||||
* See {@link ngResource.$resource `$resource`} for usage.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name $resource
|
||||
* @requires $http
|
||||
*
|
||||
* @description
|
||||
* A factory which creates a resource object that lets you interact with
|
||||
* [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
|
||||
*
|
||||
* The returned resource object has action methods which provide high-level behaviors without
|
||||
* the need to interact with the low level {@link ng.$http $http} service.
|
||||
*
|
||||
* Requires the {@link ngResource `ngResource`} module to be installed.
|
||||
*
|
||||
* By default, trailing slashes will be stripped from the calculated URLs,
|
||||
* which can pose problems with server backends that do not expect that
|
||||
* behavior. This can be disabled by configuring the `$resourceProvider` like
|
||||
* this:
|
||||
*
|
||||
* ```js
|
||||
app.config(['$resourceProvider', function($resourceProvider) {
|
||||
// Don't strip trailing slashes from calculated URLs
|
||||
$resourceProvider.defaults.stripTrailingSlashes = false;
|
||||
}]);
|
||||
* ```
|
||||
*
|
||||
* @param {string} url A parameterized URL template with parameters prefixed by `:` as in
|
||||
* `/user/:username`. If you are using a URL with a port number (e.g.
|
||||
* `http://example.com:8080/api`), it will be respected.
|
||||
*
|
||||
* If you are using a url with a suffix, just add the suffix, like this:
|
||||
* `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`
|
||||
* or even `$resource('http://example.com/resource/:resource_id.:format')`
|
||||
* If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be
|
||||
* collapsed down to a single `.`. If you need this sequence to appear and not collapse then you
|
||||
* can escape it with `/\.`.
|
||||
*
|
||||
* @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
|
||||
* `actions` methods. If any of the parameter value is a function, it will be executed every time
|
||||
* when a param value needs to be obtained for a request (unless the param was overridden).
|
||||
*
|
||||
* Each key value in the parameter object is first bound to url template if present and then any
|
||||
* excess keys are appended to the url search query after the `?`.
|
||||
*
|
||||
* Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
|
||||
* URL `/path/greet?salutation=Hello`.
|
||||
*
|
||||
* If the parameter value is prefixed with `@` then the value for that parameter will be extracted
|
||||
* from the corresponding property on the `data` object (provided when calling an action method). For
|
||||
* example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam`
|
||||
* will be `data.someProp`.
|
||||
*
|
||||
* @param {Object.<Object>=} actions Hash with declaration of custom actions that should extend
|
||||
* the default set of resource actions. The declaration should be created in the format of {@link
|
||||
* ng.$http#usage $http.config}:
|
||||
*
|
||||
* {action1: {method:?, params:?, isArray:?, headers:?, ...},
|
||||
* action2: {method:?, params:?, isArray:?, headers:?, ...},
|
||||
* ...}
|
||||
*
|
||||
* Where:
|
||||
*
|
||||
* - **`action`** – {string} – The name of action. This name becomes the name of the method on
|
||||
* your resource object.
|
||||
* - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,
|
||||
* `DELETE`, `JSONP`, etc).
|
||||
* - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of
|
||||
* the parameter value is a function, it will be executed every time when a param value needs to
|
||||
* be obtained for a request (unless the param was overridden).
|
||||
* - **`url`** – {string} – action specific `url` override. The url templating is supported just
|
||||
* like for the resource-level urls.
|
||||
* - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,
|
||||
* see `returns` section.
|
||||
* - **`transformRequest`** –
|
||||
* `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
|
||||
* transform function or an array of such functions. The transform function takes the http
|
||||
* request body and headers and returns its transformed (typically serialized) version.
|
||||
* By default, transformRequest will contain one function that checks if the request data is
|
||||
* an object and serializes to using `angular.toJson`. To prevent this behavior, set
|
||||
* `transformRequest` to an empty array: `transformRequest: []`
|
||||
* - **`transformResponse`** –
|
||||
* `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
|
||||
* transform function or an array of such functions. The transform function takes the http
|
||||
* response body and headers and returns its transformed (typically deserialized) version.
|
||||
* By default, transformResponse will contain one function that checks if the response looks like
|
||||
* a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, set
|
||||
* `transformResponse` to an empty array: `transformResponse: []`
|
||||
* - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
|
||||
* GET request, otherwise if a cache instance built with
|
||||
* {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
|
||||
* caching.
|
||||
* - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that
|
||||
* should abort the request when resolved.
|
||||
* - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
|
||||
* XHR object. See
|
||||
* [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)
|
||||
* for more information.
|
||||
* - **`responseType`** - `{string}` - see
|
||||
* [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).
|
||||
* - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -
|
||||
* `response` and `responseError`. Both `response` and `responseError` interceptors get called
|
||||
* with `http response` object. See {@link ng.$http $http interceptors}.
|
||||
*
|
||||
* @param {Object} options Hash with custom settings that should extend the
|
||||
* default `$resourceProvider` behavior. The only supported option is
|
||||
*
|
||||
* Where:
|
||||
*
|
||||
* - **`stripTrailingSlashes`** – {boolean} – If true then the trailing
|
||||
* slashes from any calculated URL will be stripped. (Defaults to true.)
|
||||
*
|
||||
* @returns {Object} A resource "class" object with methods for the default set of resource actions
|
||||
* optionally extended with custom `actions`. The default set contains these actions:
|
||||
* ```js
|
||||
* { 'get': {method:'GET'},
|
||||
* 'save': {method:'POST'},
|
||||
* 'query': {method:'GET', isArray:true},
|
||||
* 'remove': {method:'DELETE'},
|
||||
* 'delete': {method:'DELETE'} };
|
||||
* ```
|
||||
*
|
||||
* Calling these methods invoke an {@link ng.$http} with the specified http method,
|
||||
* destination and parameters. When the data is returned from the server then the object is an
|
||||
* instance of the resource class. The actions `save`, `remove` and `delete` are available on it
|
||||
* as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
|
||||
* read, update, delete) on server-side data like this:
|
||||
* ```js
|
||||
* var User = $resource('/user/:userId', {userId:'@id'});
|
||||
* var user = User.get({userId:123}, function() {
|
||||
* user.abc = true;
|
||||
* user.$save();
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* It is important to realize that invoking a $resource object method immediately returns an
|
||||
* empty reference (object or array depending on `isArray`). Once the data is returned from the
|
||||
* server the existing reference is populated with the actual data. This is a useful trick since
|
||||
* usually the resource is assigned to a model which is then rendered by the view. Having an empty
|
||||
* object results in no rendering, once the data arrives from the server then the object is
|
||||
* populated with the data and the view automatically re-renders itself showing the new data. This
|
||||
* means that in most cases one never has to write a callback function for the action methods.
|
||||
*
|
||||
* The action methods on the class object or instance object can be invoked with the following
|
||||
* parameters:
|
||||
*
|
||||
* - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
|
||||
* - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
|
||||
* - non-GET instance actions: `instance.$action([parameters], [success], [error])`
|
||||
*
|
||||
*
|
||||
* Success callback is called with (value, responseHeaders) arguments, where the value is
|
||||
* the populated resource instance or collection object. The error callback is called
|
||||
* with (httpResponse) argument.
|
||||
*
|
||||
* Class actions return empty instance (with additional properties below).
|
||||
* Instance actions return promise of the action.
|
||||
*
|
||||
* The Resource instances and collection have these additional properties:
|
||||
*
|
||||
* - `$promise`: the {@link ng.$q promise} of the original server interaction that created this
|
||||
* instance or collection.
|
||||
*
|
||||
* On success, the promise is resolved with the same resource instance or collection object,
|
||||
* updated with data from server. This makes it easy to use in
|
||||
* {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view
|
||||
* rendering until the resource(s) are loaded.
|
||||
*
|
||||
* On failure, the promise is resolved with the {@link ng.$http http response} object, without
|
||||
* the `resource` property.
|
||||
*
|
||||
* If an interceptor object was provided, the promise will instead be resolved with the value
|
||||
* returned by the interceptor.
|
||||
*
|
||||
* - `$resolved`: `true` after first server interaction is completed (either with success or
|
||||
* rejection), `false` before that. Knowing if the Resource has been resolved is useful in
|
||||
* data-binding.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* # Credit card resource
|
||||
*
|
||||
* ```js
|
||||
// Define CreditCard class
|
||||
var CreditCard = $resource('/user/:userId/card/:cardId',
|
||||
{userId:123, cardId:'@id'}, {
|
||||
charge: {method:'POST', params:{charge:true}}
|
||||
});
|
||||
|
||||
// We can retrieve a collection from the server
|
||||
var cards = CreditCard.query(function() {
|
||||
// GET: /user/123/card
|
||||
// server returns: [ {id:456, number:'1234', name:'Smith'} ];
|
||||
|
||||
var card = cards[0];
|
||||
// each item is an instance of CreditCard
|
||||
expect(card instanceof CreditCard).toEqual(true);
|
||||
card.name = "J. Smith";
|
||||
// non GET methods are mapped onto the instances
|
||||
card.$save();
|
||||
// POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
|
||||
// server returns: {id:456, number:'1234', name: 'J. Smith'};
|
||||
|
||||
// our custom method is mapped as well.
|
||||
card.$charge({amount:9.99});
|
||||
// POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
|
||||
});
|
||||
|
||||
// we can create an instance as well
|
||||
var newCard = new CreditCard({number:'0123'});
|
||||
newCard.name = "Mike Smith";
|
||||
newCard.$save();
|
||||
// POST: /user/123/card {number:'0123', name:'Mike Smith'}
|
||||
// server returns: {id:789, number:'0123', name: 'Mike Smith'};
|
||||
expect(newCard.id).toEqual(789);
|
||||
* ```
|
||||
*
|
||||
* The object returned from this function execution is a resource "class" which has "static" method
|
||||
* for each action in the definition.
|
||||
*
|
||||
* Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and
|
||||
* `headers`.
|
||||
* When the data is returned from the server then the object is an instance of the resource type and
|
||||
* all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
|
||||
* operations (create, read, update, delete) on server-side data.
|
||||
|
||||
```js
|
||||
var User = $resource('/user/:userId', {userId:'@id'});
|
||||
User.get({userId:123}, function(user) {
|
||||
user.abc = true;
|
||||
user.$save();
|
||||
});
|
||||
```
|
||||
*
|
||||
* It's worth noting that the success callback for `get`, `query` and other methods gets passed
|
||||
* in the response that came from the server as well as $http header getter function, so one
|
||||
* could rewrite the above example and get access to http headers as:
|
||||
*
|
||||
```js
|
||||
var User = $resource('/user/:userId', {userId:'@id'});
|
||||
User.get({userId:123}, function(u, getResponseHeaders){
|
||||
u.abc = true;
|
||||
u.$save(function(u, putResponseHeaders) {
|
||||
//u => saved user object
|
||||
//putResponseHeaders => $http header getter
|
||||
});
|
||||
});
|
||||
```
|
||||
*
|
||||
* You can also access the raw `$http` promise via the `$promise` property on the object returned
|
||||
*
|
||||
```
|
||||
var User = $resource('/user/:userId', {userId:'@id'});
|
||||
User.get({userId:123})
|
||||
.$promise.then(function(user) {
|
||||
$scope.user = user;
|
||||
});
|
||||
```
|
||||
|
||||
* # Creating a custom 'PUT' request
|
||||
* In this example we create a custom method on our resource to make a PUT request
|
||||
* ```js
|
||||
* var app = angular.module('app', ['ngResource', 'ngRoute']);
|
||||
*
|
||||
* // Some APIs expect a PUT request in the format URL/object/ID
|
||||
* // Here we are creating an 'update' method
|
||||
* app.factory('Notes', ['$resource', function($resource) {
|
||||
* return $resource('/notes/:id', null,
|
||||
* {
|
||||
* 'update': { method:'PUT' }
|
||||
* });
|
||||
* }]);
|
||||
*
|
||||
* // In our controller we get the ID from the URL using ngRoute and $routeParams
|
||||
* // We pass in $routeParams and our Notes factory along with $scope
|
||||
* app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',
|
||||
function($scope, $routeParams, Notes) {
|
||||
* // First get a note object from the factory
|
||||
* var note = Notes.get({ id:$routeParams.id });
|
||||
* $id = note.id;
|
||||
*
|
||||
* // Now call update passing in the ID first then the object you are updating
|
||||
* Notes.update({ id:$id }, note);
|
||||
*
|
||||
* // This will PUT /notes/ID with the note object in the request payload
|
||||
* }]);
|
||||
* ```
|
||||
*/
|
||||
angular.module('ngResource', ['ng']).
|
||||
provider('$resource', function() {
|
||||
var provider = this;
|
||||
|
||||
this.defaults = {
|
||||
// Strip slashes by default
|
||||
stripTrailingSlashes: true,
|
||||
|
||||
// Default actions configuration
|
||||
actions: {
|
||||
'get': {method: 'GET'},
|
||||
'save': {method: 'POST'},
|
||||
'query': {method: 'GET', isArray: true},
|
||||
'remove': {method: 'DELETE'},
|
||||
'delete': {method: 'DELETE'}
|
||||
}
|
||||
};
|
||||
|
||||
this.$get = ['$http', '$q', function($http, $q) {
|
||||
|
||||
var noop = angular.noop,
|
||||
forEach = angular.forEach,
|
||||
extend = angular.extend,
|
||||
copy = angular.copy,
|
||||
isFunction = angular.isFunction;
|
||||
|
||||
/**
|
||||
* We need our custom method because encodeURIComponent is too aggressive and doesn't follow
|
||||
* http://www.ietf.org/rfc/rfc3986.txt with regards to the character set
|
||||
* (pchar) allowed in path segments:
|
||||
* segment = *pchar
|
||||
* pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
|
||||
* pct-encoded = "%" HEXDIG HEXDIG
|
||||
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
||||
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
||||
* / "*" / "+" / "," / ";" / "="
|
||||
*/
|
||||
function encodeUriSegment(val) {
|
||||
return encodeUriQuery(val, true).
|
||||
replace(/%26/gi, '&').
|
||||
replace(/%3D/gi, '=').
|
||||
replace(/%2B/gi, '+');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method is intended for encoding *key* or *value* parts of query component. We need a
|
||||
* custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't
|
||||
* have to be encoded per http://tools.ietf.org/html/rfc3986:
|
||||
* query = *( pchar / "/" / "?" )
|
||||
* pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
|
||||
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
||||
* pct-encoded = "%" HEXDIG HEXDIG
|
||||
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
||||
* / "*" / "+" / "," / ";" / "="
|
||||
*/
|
||||
function encodeUriQuery(val, pctEncodeSpaces) {
|
||||
return encodeURIComponent(val).
|
||||
replace(/%40/gi, '@').
|
||||
replace(/%3A/gi, ':').
|
||||
replace(/%24/g, '$').
|
||||
replace(/%2C/gi, ',').
|
||||
replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
|
||||
}
|
||||
|
||||
function Route(template, defaults) {
|
||||
this.template = template;
|
||||
this.defaults = extend({}, provider.defaults, defaults);
|
||||
this.urlParams = {};
|
||||
}
|
||||
|
||||
Route.prototype = {
|
||||
setUrlParams: function(config, params, actionUrl) {
|
||||
var self = this,
|
||||
url = actionUrl || self.template,
|
||||
val,
|
||||
encodedVal;
|
||||
|
||||
var urlParams = self.urlParams = {};
|
||||
forEach(url.split(/\W/), function(param) {
|
||||
if (param === 'hasOwnProperty') {
|
||||
throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name.");
|
||||
}
|
||||
if (!(new RegExp("^\\d+$").test(param)) && param &&
|
||||
(new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) {
|
||||
urlParams[param] = true;
|
||||
}
|
||||
});
|
||||
url = url.replace(/\\:/g, ':');
|
||||
|
||||
params = params || {};
|
||||
forEach(self.urlParams, function(_, urlParam) {
|
||||
val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
|
||||
if (angular.isDefined(val) && val !== null) {
|
||||
encodedVal = encodeUriSegment(val);
|
||||
url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) {
|
||||
return encodedVal + p1;
|
||||
});
|
||||
} else {
|
||||
url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match,
|
||||
leadingSlashes, tail) {
|
||||
if (tail.charAt(0) == '/') {
|
||||
return tail;
|
||||
} else {
|
||||
return leadingSlashes + tail;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// strip trailing slashes and set the url (unless this behavior is specifically disabled)
|
||||
if (self.defaults.stripTrailingSlashes) {
|
||||
url = url.replace(/\/+$/, '') || '/';
|
||||
}
|
||||
|
||||
// then replace collapse `/.` if found in the last URL path segment before the query
|
||||
// E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`
|
||||
url = url.replace(/\/\.(?=\w+($|\?))/, '.');
|
||||
// replace escaped `/\.` with `/.`
|
||||
config.url = url.replace(/\/\\\./, '/.');
|
||||
|
||||
|
||||
// set params - delegate param encoding to $http
|
||||
forEach(params, function(value, key) {
|
||||
if (!self.urlParams[key]) {
|
||||
config.params = config.params || {};
|
||||
config.params[key] = value;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function resourceFactory(url, paramDefaults, actions, options) {
|
||||
var route = new Route(url, options);
|
||||
|
||||
actions = extend({}, provider.defaults.actions, actions);
|
||||
|
||||
function extractParams(data, actionParams) {
|
||||
var ids = {};
|
||||
actionParams = extend({}, paramDefaults, actionParams);
|
||||
forEach(actionParams, function(value, key) {
|
||||
if (isFunction(value)) { value = value(); }
|
||||
ids[key] = value && value.charAt && value.charAt(0) == '@' ?
|
||||
lookupDottedPath(data, value.substr(1)) : value;
|
||||
});
|
||||
return ids;
|
||||
}
|
||||
|
||||
function defaultResponseInterceptor(response) {
|
||||
return response.resource;
|
||||
}
|
||||
|
||||
function Resource(value) {
|
||||
shallowClearAndCopy(value || {}, this);
|
||||
}
|
||||
|
||||
Resource.prototype.toJSON = function() {
|
||||
var data = extend({}, this);
|
||||
delete data.$promise;
|
||||
delete data.$resolved;
|
||||
return data;
|
||||
};
|
||||
|
||||
forEach(actions, function(action, name) {
|
||||
var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
|
||||
|
||||
Resource[name] = function(a1, a2, a3, a4) {
|
||||
var params = {}, data, success, error;
|
||||
|
||||
/* jshint -W086 */ /* (purposefully fall through case statements) */
|
||||
switch (arguments.length) {
|
||||
case 4:
|
||||
error = a4;
|
||||
success = a3;
|
||||
//fallthrough
|
||||
case 3:
|
||||
case 2:
|
||||
if (isFunction(a2)) {
|
||||
if (isFunction(a1)) {
|
||||
success = a1;
|
||||
error = a2;
|
||||
break;
|
||||
}
|
||||
|
||||
success = a2;
|
||||
error = a3;
|
||||
//fallthrough
|
||||
} else {
|
||||
params = a1;
|
||||
data = a2;
|
||||
success = a3;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
if (isFunction(a1)) success = a1;
|
||||
else if (hasBody) data = a1;
|
||||
else params = a1;
|
||||
break;
|
||||
case 0: break;
|
||||
default:
|
||||
throw $resourceMinErr('badargs',
|
||||
"Expected up to 4 arguments [params, data, success, error], got {0} arguments",
|
||||
arguments.length);
|
||||
}
|
||||
/* jshint +W086 */ /* (purposefully fall through case statements) */
|
||||
|
||||
var isInstanceCall = this instanceof Resource;
|
||||
var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));
|
||||
var httpConfig = {};
|
||||
var responseInterceptor = action.interceptor && action.interceptor.response ||
|
||||
defaultResponseInterceptor;
|
||||
var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||
|
||||
undefined;
|
||||
|
||||
forEach(action, function(value, key) {
|
||||
if (key != 'params' && key != 'isArray' && key != 'interceptor') {
|
||||
httpConfig[key] = copy(value);
|
||||
}
|
||||
});
|
||||
|
||||
if (hasBody) httpConfig.data = data;
|
||||
route.setUrlParams(httpConfig,
|
||||
extend({}, extractParams(data, action.params || {}), params),
|
||||
action.url);
|
||||
|
||||
var promise = $http(httpConfig).then(function(response) {
|
||||
var data = response.data,
|
||||
promise = value.$promise;
|
||||
|
||||
if (data) {
|
||||
// Need to convert action.isArray to boolean in case it is undefined
|
||||
// jshint -W018
|
||||
if (angular.isArray(data) !== (!!action.isArray)) {
|
||||
throw $resourceMinErr('badcfg',
|
||||
'Error in resource configuration for action `{0}`. Expected response to ' +
|
||||
'contain an {1} but got an {2} (Request: {3} {4})', name, action.isArray ? 'array' : 'object',
|
||||
angular.isArray(data) ? 'array' : 'object', httpConfig.method, httpConfig.url);
|
||||
}
|
||||
// jshint +W018
|
||||
if (action.isArray) {
|
||||
value.length = 0;
|
||||
forEach(data, function(item) {
|
||||
if (typeof item === "object") {
|
||||
value.push(new Resource(item));
|
||||
} else {
|
||||
// Valid JSON values may be string literals, and these should not be converted
|
||||
// into objects. These items will not have access to the Resource prototype
|
||||
// methods, but unfortunately there
|
||||
value.push(item);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
shallowClearAndCopy(data, value);
|
||||
value.$promise = promise;
|
||||
}
|
||||
}
|
||||
|
||||
value.$resolved = true;
|
||||
|
||||
response.resource = value;
|
||||
|
||||
return response;
|
||||
}, function(response) {
|
||||
value.$resolved = true;
|
||||
|
||||
(error || noop)(response);
|
||||
|
||||
return $q.reject(response);
|
||||
});
|
||||
|
||||
promise = promise.then(
|
||||
function(response) {
|
||||
var value = responseInterceptor(response);
|
||||
(success || noop)(value, response.headers);
|
||||
return value;
|
||||
},
|
||||
responseErrorInterceptor);
|
||||
|
||||
if (!isInstanceCall) {
|
||||
// we are creating instance / collection
|
||||
// - set the initial promise
|
||||
// - return the instance / collection
|
||||
value.$promise = promise;
|
||||
value.$resolved = false;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
// instance call
|
||||
return promise;
|
||||
};
|
||||
|
||||
|
||||
Resource.prototype['$' + name] = function(params, success, error) {
|
||||
if (isFunction(params)) {
|
||||
error = success; success = params; params = {};
|
||||
}
|
||||
var result = Resource[name].call(this, params, this, success, error);
|
||||
return result.$promise || result;
|
||||
};
|
||||
});
|
||||
|
||||
Resource.bind = function(additionalParamDefaults) {
|
||||
return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
|
||||
};
|
||||
|
||||
return Resource;
|
||||
}
|
||||
|
||||
return resourceFactory;
|
||||
}];
|
||||
});
|
||||
|
||||
|
||||
})(window, window.angular);
|
||||
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
AngularJS v1.4.3
|
||||
(c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(I,d,B){'use strict';function D(f,q){q=q||{};d.forEach(q,function(d,h){delete q[h]});for(var h in f)!f.hasOwnProperty(h)||"$"===h.charAt(0)&&"$"===h.charAt(1)||(q[h]=f[h]);return q}var x=d.$$minErr("$resource"),C=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var f=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};
|
||||
this.$get=["$http","$q",function(q,h){function u(d,g){this.template=d;this.defaults=s({},f.defaults,g);this.urlParams={}}function w(y,g,l,m){function c(b,k){var c={};k=s({},g,k);r(k,function(a,k){v(a)&&(a=a());var d;if(a&&a.charAt&&"@"==a.charAt(0)){d=b;var e=a.substr(1);if(null==e||""===e||"hasOwnProperty"===e||!C.test("."+e))throw x("badmember",e);for(var e=e.split("."),n=0,g=e.length;n<g&&d!==B;n++){var h=e[n];d=null!==d?d[h]:B}}else d=a;c[k]=d});return c}function F(b){return b.resource}function e(b){D(b||
|
||||
{},this)}var G=new u(y,m);l=s({},f.defaults.actions,l);e.prototype.toJSON=function(){var b=s({},this);delete b.$promise;delete b.$resolved;return b};r(l,function(b,k){var g=/^(POST|PUT|PATCH)$/i.test(b.method);e[k]=function(a,z,m,y){var n={},f,l,A;switch(arguments.length){case 4:A=y,l=m;case 3:case 2:if(v(z)){if(v(a)){l=a;A=z;break}l=z;A=m}else{n=a;f=z;l=m;break}case 1:v(a)?l=a:g?f=a:n=a;break;case 0:break;default:throw x("badargs",arguments.length);}var u=this instanceof e,p=u?f:b.isArray?[]:new e(f),
|
||||
t={},w=b.interceptor&&b.interceptor.response||F,C=b.interceptor&&b.interceptor.responseError||B;r(b,function(b,a){"params"!=a&&"isArray"!=a&&"interceptor"!=a&&(t[a]=H(b))});g&&(t.data=f);G.setUrlParams(t,s({},c(f,b.params||{}),n),b.url);n=q(t).then(function(a){var c=a.data,g=p.$promise;if(c){if(d.isArray(c)!==!!b.isArray)throw x("badcfg",k,b.isArray?"array":"object",d.isArray(c)?"array":"object",t.method,t.url);b.isArray?(p.length=0,r(c,function(a){"object"===typeof a?p.push(new e(a)):p.push(a)})):
|
||||
(D(c,p),p.$promise=g)}p.$resolved=!0;a.resource=p;return a},function(a){p.$resolved=!0;(A||E)(a);return h.reject(a)});n=n.then(function(a){var b=w(a);(l||E)(b,a.headers);return b},C);return u?n:(p.$promise=n,p.$resolved=!1,p)};e.prototype["$"+k]=function(a,b,c){v(a)&&(c=b,b=a,a={});a=e[k].call(this,a,this,b,c);return a.$promise||a}});e.bind=function(b){return w(y,s({},g,b),l)};return e}var E=d.noop,r=d.forEach,s=d.extend,H=d.copy,v=d.isFunction;u.prototype={setUrlParams:function(f,g,l){var m=this,
|
||||
c=l||m.template,h,e,q=m.urlParams={};r(c.split(/\W/),function(b){if("hasOwnProperty"===b)throw x("badname");!/^\d+$/.test(b)&&b&&(new RegExp("(^|[^\\\\]):"+b+"(\\W|$)")).test(c)&&(q[b]=!0)});c=c.replace(/\\:/g,":");g=g||{};r(m.urlParams,function(b,k){h=g.hasOwnProperty(k)?g[k]:m.defaults[k];d.isDefined(h)&&null!==h?(e=encodeURIComponent(h).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,
|
||||
"+"),c=c.replace(new RegExp(":"+k+"(\\W|$)","g"),function(b,a){return e+a})):c=c.replace(new RegExp("(/?):"+k+"(\\W|$)","g"),function(b,a,c){return"/"==c.charAt(0)?c:a+c})});m.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");f.url=c.replace(/\/\\\./,"/.");r(g,function(b,c){m.urlParams[c]||(f.params=f.params||{},f.params[c]=b)})}};return w}]})})(window,window.angular);
|
||||
//# sourceMappingURL=angular-resource.min.js.map
|
||||