unsakini 0.0.4.pre.1 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -27
  3. data/angular/angular-cli.json +3 -5
  4. data/{public/unsakini/app → angular/dist}/favicon.ico +0 -0
  5. data/angular/dist/index.html +14 -0
  6. data/angular/dist/inline.bundle.js +139 -0
  7. data/angular/dist/inline.map +1 -0
  8. data/angular/dist/main.bundle.js +64689 -0
  9. data/angular/dist/main.map +1 -0
  10. data/angular/dist/styles.bundle.js +364 -0
  11. data/angular/dist/styles.map +1 -0
  12. data/angular/package.json +1 -4
  13. data/angular/src/app/app.component.html +4 -1
  14. data/angular/src/app/app.module.ts +7 -8
  15. data/angular/src/app/app.routes.module.ts +2 -12
  16. data/angular/src/app/index.ts +0 -2
  17. data/angular/src/app/registration/registration.component.html +12 -70
  18. data/angular/src/app/registration/registration.component.spec.ts +11 -8
  19. data/angular/src/app/registration/registration.component.ts +8 -10
  20. data/angular/src/environments/environment.prod.ts +1 -2
  21. data/angular/src/environments/environment.ts +1 -2
  22. data/angular/src/index.html +1 -1
  23. data/angular/src/styles.css +1 -0
  24. data/app/controllers/api/boards_controller.rb +73 -0
  25. data/app/controllers/api/comments_controller.rb +51 -0
  26. data/app/controllers/api/posts_controller.rb +58 -0
  27. data/app/controllers/api/share_board_controller.rb +118 -0
  28. data/app/controllers/api/users_controller.rb +40 -0
  29. data/app/controllers/application_controller.rb +2 -2
  30. data/app/controllers/concerns/board_owner_controller_concern.rb +38 -0
  31. data/app/controllers/concerns/comment_owner_controller_concern.rb +33 -0
  32. data/app/controllers/concerns/logged_in_controller_concern.rb +21 -0
  33. data/app/controllers/concerns/post_owner_controller_concern.rb +36 -0
  34. data/app/controllers/concerns/serializer_controller_concern.rb +11 -0
  35. data/app/controllers/user_token_controller.rb +2 -0
  36. data/app/controllers/web_base_controller.rb +23 -0
  37. data/app/models/application_record.rb +5 -0
  38. data/app/models/board.rb +14 -0
  39. data/app/models/comment.rb +9 -0
  40. data/app/models/concerns/encryptable_model_concern.rb +96 -0
  41. data/app/models/post.rb +12 -0
  42. data/app/models/user.rb +15 -0
  43. data/app/models/user_board.rb +82 -0
  44. data/app/serializers/board_serializer.rb +5 -0
  45. data/app/serializers/{unsakini/comment_serializer.rb → comment_serializer.rb} +3 -6
  46. data/app/serializers/post_serializer.rb +23 -0
  47. data/app/serializers/user_board_serializer.rb +11 -0
  48. data/app/serializers/{unsakini/user_serializer.rb → user_serializer.rb} +2 -5
  49. data/app/views/{unsakini/web → web_base}/index.html.erb +169 -65
  50. data/config/routes.rb +10 -10
  51. data/db/migrate/20161116114222_create_boards.rb +9 -0
  52. data/db/migrate/{20161116200034_create_unsakini_user_boards.rb → 20161116200034_create_user_boards.rb} +2 -3
  53. data/db/migrate/{20161118031023_create_unsakini_posts.rb → 20161118031023_create_posts.rb} +2 -2
  54. data/db/migrate/{20161118100454_create_unsakini_comments.rb → 20161118100454_create_comments.rb} +2 -2
  55. data/db/migrate/20161118221508_add_encrypted_password_to_user_board.rb +5 -0
  56. data/db/migrate/20161122211105_create_users.rb +12 -0
  57. data/db/migrate/20161124102633_add_is_shared_to_boards.rb +5 -0
  58. data/lib/generators/unsakini/angular/USAGE +8 -0
  59. data/lib/generators/unsakini/angular/angular_generator.rb +7 -0
  60. data/lib/generators/unsakini/config/config_generator.rb +1 -3
  61. data/lib/tasks/unsakini_tasks.rake +37 -6
  62. data/lib/unsakini/engine.rb +0 -2
  63. data/lib/unsakini/version.rb +1 -1
  64. data/public/css/custom.css +1 -5
  65. data/public/images/logo.svg +619 -0
  66. data/spec/concerns/models/encryptable_concern.rb +2 -3
  67. data/spec/controllers/{web_controller_spec.rb → web_base_controller_spec.rb} +3 -4
  68. data/spec/dummy/config/application.rb +1 -3
  69. data/spec/dummy/config/environments/development.rb +0 -2
  70. data/spec/dummy/config/initializers/assets.rb +11 -0
  71. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  72. data/spec/dummy/config/initializers/session_store.rb +3 -0
  73. data/spec/dummy/db/development.sqlite3 +0 -0
  74. data/spec/dummy/db/migrate/20161124210219_create_boards.unsakini_engine.rb +10 -0
  75. data/spec/dummy/db/migrate/20161124210220_create_user_boards.unsakini_engine.rb +12 -0
  76. data/spec/dummy/db/migrate/20161124210221_create_posts.unsakini_engine.rb +13 -0
  77. data/spec/dummy/db/migrate/20161124210222_create_comments.unsakini_engine.rb +12 -0
  78. data/spec/dummy/db/migrate/20161124210223_add_encrypted_password_to_user_board.unsakini_engine.rb +6 -0
  79. data/spec/dummy/db/migrate/20161124210224_create_users.unsakini_engine.rb +13 -0
  80. data/spec/dummy/db/migrate/20161124210225_add_is_shared_to_boards.unsakini_engine.rb +6 -0
  81. data/spec/dummy/db/schema.rb +14 -16
  82. data/spec/dummy/db/test.sqlite3 +0 -0
  83. data/spec/dummy/public/app/favicon.ico +0 -0
  84. data/spec/dummy/public/app/index.html +14 -0
  85. data/spec/dummy/public/app/inline.bundle.js +139 -0
  86. data/spec/dummy/public/app/inline.map +1 -0
  87. data/spec/dummy/public/app/main.bundle.js +64689 -0
  88. data/spec/dummy/public/app/main.map +1 -0
  89. data/spec/dummy/public/app/styles.bundle.js +364 -0
  90. data/spec/dummy/public/app/styles.map +1 -0
  91. data/spec/dummy/tmp/unsakini-ng2/LICENSE +21 -0
  92. data/spec/dummy/tmp/unsakini-ng2/README.md +1 -0
  93. data/spec/dummy/tmp/unsakini-ng2/angular-cli.json +59 -0
  94. data/spec/dummy/tmp/unsakini-ng2/e2e/app.e2e-spec.ts +14 -0
  95. data/spec/dummy/tmp/unsakini-ng2/e2e/app.po.ts +11 -0
  96. data/spec/dummy/tmp/unsakini-ng2/e2e/signup.e2e-spec.ts +28 -0
  97. data/spec/dummy/tmp/unsakini-ng2/e2e/signup.po.ts +31 -0
  98. data/spec/dummy/tmp/unsakini-ng2/e2e/tsconfig.json +16 -0
  99. data/spec/dummy/tmp/unsakini-ng2/karma.conf.js +45 -0
  100. data/spec/dummy/tmp/unsakini-ng2/package.json +49 -0
  101. data/spec/dummy/tmp/unsakini-ng2/protractor.conf.js +32 -0
  102. data/spec/dummy/tmp/unsakini-ng2/src/app/app.component.css +0 -0
  103. data/spec/dummy/tmp/unsakini-ng2/src/app/app.component.html +4 -0
  104. data/spec/dummy/tmp/unsakini-ng2/src/app/app.component.spec.ts +47 -0
  105. data/spec/dummy/tmp/unsakini-ng2/src/app/app.component.ts +10 -0
  106. data/spec/dummy/tmp/unsakini-ng2/src/app/app.module.ts +29 -0
  107. data/spec/dummy/tmp/unsakini-ng2/src/app/app.routes.module.ts +29 -0
  108. data/spec/dummy/tmp/unsakini-ng2/src/app/index.ts +2 -0
  109. data/spec/dummy/tmp/unsakini-ng2/src/app/registration/registration.component.css +0 -0
  110. data/spec/dummy/tmp/unsakini-ng2/src/app/registration/registration.component.html +14 -0
  111. data/spec/dummy/tmp/unsakini-ng2/src/app/registration/registration.component.spec.ts +157 -0
  112. data/spec/dummy/tmp/unsakini-ng2/src/app/registration/registration.component.ts +42 -0
  113. data/spec/dummy/tmp/unsakini-ng2/src/environments/environment.prod.ts +3 -0
  114. data/spec/dummy/tmp/unsakini-ng2/src/environments/environment.ts +8 -0
  115. data/spec/dummy/tmp/unsakini-ng2/src/favicon.ico +0 -0
  116. data/spec/dummy/tmp/unsakini-ng2/src/index.html +14 -0
  117. data/spec/dummy/tmp/unsakini-ng2/src/main.ts +12 -0
  118. data/spec/dummy/tmp/unsakini-ng2/src/polyfills.ts +19 -0
  119. data/spec/dummy/tmp/unsakini-ng2/src/styles.css +1 -0
  120. data/spec/dummy/tmp/unsakini-ng2/src/test.ts +31 -0
  121. data/spec/dummy/tmp/unsakini-ng2/src/tsconfig.json +18 -0
  122. data/spec/dummy/tmp/unsakini-ng2/src/typings.d.ts +2 -0
  123. data/spec/dummy/tmp/unsakini-ng2/tslint.json +114 -0
  124. data/spec/dummy/tmp/unsakini-ng2/typings.json +4 -0
  125. data/spec/factories/boards.rb +1 -1
  126. data/spec/factories/comments.rb +1 -1
  127. data/spec/factories/posts.rb +1 -1
  128. data/spec/factories/user_boards.rb +1 -1
  129. data/spec/factories/users.rb +1 -1
  130. data/spec/models/board_spec.rb +2 -2
  131. data/spec/models/comment_spec.rb +2 -2
  132. data/spec/models/post_spec.rb +2 -2
  133. data/spec/models/user_board_spec.rb +19 -19
  134. data/spec/models/user_spec.rb +1 -1
  135. data/spec/requests/{boards/boards_crud_spec.rb → api/boards/api_boards_crud_spec.rb} +26 -26
  136. data/spec/requests/{boards/boards_pagination_spec.rb → api/boards/api_boards_pagination_spec.rb} +7 -7
  137. data/spec/requests/{boards/private_board_spec.rb → api/boards/api_private_board_spec.rb} +26 -26
  138. data/spec/requests/{boards/shared_board_spec.rb → api/boards/api_shared_board_spec.rb} +9 -9
  139. data/spec/requests/{boards/sharing_board_spec.rb → api/boards/api_sharing_board_spec.rb} +13 -13
  140. data/spec/requests/{comments/comments_pagination_spec.rb → api/comments/api_comments_pagination_spec.rb} +3 -3
  141. data/spec/requests/{comments/comments_private_board_spec.rb → api/comments/api_comments_private_board_spec.rb} +20 -20
  142. data/spec/requests/{comments/comments_shared_board_spec.rb → api/comments/api_comments_shared_board_spec.rb} +17 -17
  143. data/spec/requests/{posts/posts_pagination_spec.rb → api/posts/api_posts_pagination_spec.rb} +3 -3
  144. data/spec/requests/{posts/posts_private_board_spec.rb → api/posts/api_posts_private_board_spec.rb} +22 -22
  145. data/spec/requests/{posts/posts_shared_board_spec.rb → api/posts/api_posts_shared_board_spec.rb} +24 -24
  146. data/spec/requests/{user/user_create_spec.rb → api/user/api_user_create_spec.rb} +23 -19
  147. data/spec/requests/{user/user_search_spec.rb → api/user/api_user_search_spec.rb} +9 -9
  148. data/spec/spec_helper.rb +0 -1
  149. data/spec/support/auth_helper.rb +2 -0
  150. metadata +202 -135
  151. data/angular/npm-debug.log +0 -54
  152. data/angular/src/app/confirm-account/confirm-account.component.ts +0 -27
  153. data/angular/src/app/confirm-account/confirm-account.html +0 -41
  154. data/angular/src/app/confirm-account/confirm-account.module.ts +0 -24
  155. data/angular/src/app/confirm-account/confirm-account.scss +0 -3
  156. data/angular/src/app/confirm-account/confirm-account.service.ts +0 -27
  157. data/angular/src/app/confirm-account/index.ts +0 -3
  158. data/angular/src/app/login/index.ts +0 -3
  159. data/angular/src/app/login/login.component.ts +0 -40
  160. data/angular/src/app/login/login.html +0 -43
  161. data/angular/src/app/login/login.module.ts +0 -27
  162. data/angular/src/app/login/login.service.ts +0 -48
  163. data/angular/src/app/registration/index.ts +0 -3
  164. data/angular/src/app/registration/registration.module.ts +0 -23
  165. data/angular/src/app/registration/registration.service.ts +0 -46
  166. data/angular/src/app/registration/registration.services.spec.ts +0 -71
  167. data/angular/src/app/services/auth-http/auth.http.service.ts +0 -35
  168. data/angular/src/app/services/auth-http/index.ts +0 -1
  169. data/angular/src/app/services/http/http.service.spec.ts +0 -205
  170. data/angular/src/app/services/http/http.service.ts +0 -40
  171. data/angular/src/app/services/http/index.ts +0 -1
  172. data/angular/src/app/services/index.ts +0 -3
  173. data/angular/src/app/services/services.module.ts +0 -33
  174. data/angular/src/assets/global.scss +0 -3
  175. data/angular/src/environments/custom.ts +0 -4
  176. data/app/controllers/concerns/unsakini/board_owner_controller_concern.rb +0 -42
  177. data/app/controllers/concerns/unsakini/comment_owner_controller_concern.rb +0 -36
  178. data/app/controllers/concerns/unsakini/logged_in_controller_concern.rb +0 -23
  179. data/app/controllers/concerns/unsakini/post_owner_controller_concern.rb +0 -38
  180. data/app/controllers/concerns/unsakini/serializer_controller_concern.rb +0 -13
  181. data/app/controllers/unsakini/base_controller.rb +0 -6
  182. data/app/controllers/unsakini/boards_controller.rb +0 -76
  183. data/app/controllers/unsakini/comments_controller.rb +0 -54
  184. data/app/controllers/unsakini/posts_controller.rb +0 -61
  185. data/app/controllers/unsakini/share_board_controller.rb +0 -122
  186. data/app/controllers/unsakini/user_token_controller.rb +0 -17
  187. data/app/controllers/unsakini/users_controller.rb +0 -69
  188. data/app/controllers/unsakini/web_controller.rb +0 -27
  189. data/app/mailers/unsakini/user_mailer.rb +0 -13
  190. data/app/models/concerns/unsakini/encryptable_model_concern.rb +0 -97
  191. data/app/models/unsakini/application_record.rb +0 -7
  192. data/app/models/unsakini/board.rb +0 -16
  193. data/app/models/unsakini/comment.rb +0 -12
  194. data/app/models/unsakini/post.rb +0 -15
  195. data/app/models/unsakini/user.rb +0 -43
  196. data/app/models/unsakini/user_board.rb +0 -84
  197. data/app/models/unsakini.rb +0 -5
  198. data/app/serializers/unsakini/board_serializer.rb +0 -7
  199. data/app/serializers/unsakini/post_serializer.rb +0 -26
  200. data/app/serializers/unsakini/user_board_serializer.rb +0 -14
  201. data/app/views/unsakini/user_mailer/confirm_account.html.erb +0 -3
  202. data/db/migrate/20161116114222_create_unsakini_boards.rb +0 -10
  203. data/db/migrate/20161126145352_create_unsakini_users.rb +0 -15
  204. data/lib/generators/unsakini/dependencies/USAGE +0 -5
  205. data/lib/generators/unsakini/dependencies/dependencies_generator.rb +0 -19
  206. data/public/images/unsakini.svg +0 -56
  207. data/public/unsakini/app/448c34a56d699c29117adc64c43affeb.woff2 +0 -0
  208. data/public/unsakini/app/89889688147bd7575d6327160d64e760.svg +0 -288
  209. data/public/unsakini/app/assets/global.scss +0 -3
  210. data/public/unsakini/app/e18bbf611f2a2e43afc071aa2f4e1512.ttf +0 -0
  211. data/public/unsakini/app/f4769f9bdb7466be65088239c12046d1.eot +0 -0
  212. data/public/unsakini/app/fa2772327f55d8198301fdb8bcfc8158.woff +0 -0
  213. data/public/unsakini/app/index.html +0 -14
  214. data/public/unsakini/app/inline.d41d8cd98f00b204e980.bundle.js +0 -2
  215. data/public/unsakini/app/inline.d41d8cd98f00b204e980.bundle.map +0 -1
  216. data/public/unsakini/app/main.54f49c65d3d20650a5d5.bundle.js +0 -2152
  217. data/public/unsakini/app/main.54f49c65d3d20650a5d5.bundle.js.gz +0 -0
  218. data/public/unsakini/app/main.54f49c65d3d20650a5d5.bundle.map +0 -1
  219. data/public/unsakini/app/styles.58e065928ed8ebd0b582.bundle.js +0 -2
  220. data/public/unsakini/app/styles.58e065928ed8ebd0b582.bundle.map +0 -1
  221. data/public/unsakini/app/styles.5dac0e986fce6f8738b300cb558b56a0.bundle.css +0 -8
  222. data/spec/dummy/config/initializers/knock.rb +0 -59
  223. data/spec/schema/jwt.json +0 -9
@@ -0,0 +1,364 @@
1
+ webpackJsonp([1,2],{
2
+
3
+ /***/ 379:
4
+ /***/ function(module, exports, __webpack_require__) {
5
+
6
+ // style-loader: Adds some css to the DOM by adding a <style> tag
7
+
8
+ // load the styles
9
+ var content = __webpack_require__(652);
10
+ if(typeof content === 'string') content = [[module.i, content, '']];
11
+ // add the styles to the DOM
12
+ var update = __webpack_require__(695)(content, {});
13
+ if(content.locals) module.exports = content.locals;
14
+ // Hot Module Replacement
15
+ if(false) {
16
+ // When the styles change, update the <style> tags
17
+ if(!content.locals) {
18
+ module.hot.accept("!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css", function() {
19
+ var newContent = require("!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css");
20
+ if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
21
+ update(newContent);
22
+ });
23
+ }
24
+ // When the module is disposed, remove the <style> tags
25
+ module.hot.dispose(function() { update(); });
26
+ }
27
+
28
+ /***/ },
29
+
30
+ /***/ 652:
31
+ /***/ function(module, exports, __webpack_require__) {
32
+
33
+ exports = module.exports = __webpack_require__(653)();
34
+ // imports
35
+
36
+
37
+ // module
38
+ exports.push([module.i, "/* You can add global styles to this file, and also import other style files */\n", ""]);
39
+
40
+ // exports
41
+
42
+
43
+ /***/ },
44
+
45
+ /***/ 653:
46
+ /***/ function(module, exports) {
47
+
48
+ /*
49
+ MIT License http://www.opensource.org/licenses/mit-license.php
50
+ Author Tobias Koppers @sokra
51
+ */
52
+ // css base code, injected by the css-loader
53
+ module.exports = function() {
54
+ var list = [];
55
+
56
+ // return the list of modules as css string
57
+ list.toString = function toString() {
58
+ var result = [];
59
+ for(var i = 0; i < this.length; i++) {
60
+ var item = this[i];
61
+ if(item[2]) {
62
+ result.push("@media " + item[2] + "{" + item[1] + "}");
63
+ } else {
64
+ result.push(item[1]);
65
+ }
66
+ }
67
+ return result.join("");
68
+ };
69
+
70
+ // import a list of modules into the list
71
+ list.i = function(modules, mediaQuery) {
72
+ if(typeof modules === "string")
73
+ modules = [[null, modules, ""]];
74
+ var alreadyImportedModules = {};
75
+ for(var i = 0; i < this.length; i++) {
76
+ var id = this[i][0];
77
+ if(typeof id === "number")
78
+ alreadyImportedModules[id] = true;
79
+ }
80
+ for(i = 0; i < modules.length; i++) {
81
+ var item = modules[i];
82
+ // skip already imported module
83
+ // this implementation is not 100% perfect for weird media query combinations
84
+ // when a module is imported multiple times with different media queries.
85
+ // I hope this will never occur (Hey this way we have smaller bundles)
86
+ if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
87
+ if(mediaQuery && !item[2]) {
88
+ item[2] = mediaQuery;
89
+ } else if(mediaQuery) {
90
+ item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
91
+ }
92
+ list.push(item);
93
+ }
94
+ }
95
+ };
96
+ return list;
97
+ };
98
+
99
+
100
+ /***/ },
101
+
102
+ /***/ 695:
103
+ /***/ function(module, exports) {
104
+
105
+ /*
106
+ MIT License http://www.opensource.org/licenses/mit-license.php
107
+ Author Tobias Koppers @sokra
108
+ */
109
+ var stylesInDom = {},
110
+ memoize = function(fn) {
111
+ var memo;
112
+ return function () {
113
+ if (typeof memo === "undefined") memo = fn.apply(this, arguments);
114
+ return memo;
115
+ };
116
+ },
117
+ isOldIE = memoize(function() {
118
+ return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
119
+ }),
120
+ getHeadElement = memoize(function () {
121
+ return document.head || document.getElementsByTagName("head")[0];
122
+ }),
123
+ singletonElement = null,
124
+ singletonCounter = 0,
125
+ styleElementsInsertedAtTop = [];
126
+
127
+ module.exports = function(list, options) {
128
+ if(typeof DEBUG !== "undefined" && DEBUG) {
129
+ if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
130
+ }
131
+
132
+ options = options || {};
133
+ // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
134
+ // tags it will allow on a page
135
+ if (typeof options.singleton === "undefined") options.singleton = isOldIE();
136
+
137
+ // By default, add <style> tags to the bottom of <head>.
138
+ if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
139
+
140
+ var styles = listToStyles(list);
141
+ addStylesToDom(styles, options);
142
+
143
+ return function update(newList) {
144
+ var mayRemove = [];
145
+ for(var i = 0; i < styles.length; i++) {
146
+ var item = styles[i];
147
+ var domStyle = stylesInDom[item.id];
148
+ domStyle.refs--;
149
+ mayRemove.push(domStyle);
150
+ }
151
+ if(newList) {
152
+ var newStyles = listToStyles(newList);
153
+ addStylesToDom(newStyles, options);
154
+ }
155
+ for(var i = 0; i < mayRemove.length; i++) {
156
+ var domStyle = mayRemove[i];
157
+ if(domStyle.refs === 0) {
158
+ for(var j = 0; j < domStyle.parts.length; j++)
159
+ domStyle.parts[j]();
160
+ delete stylesInDom[domStyle.id];
161
+ }
162
+ }
163
+ };
164
+ }
165
+
166
+ function addStylesToDom(styles, options) {
167
+ for(var i = 0; i < styles.length; i++) {
168
+ var item = styles[i];
169
+ var domStyle = stylesInDom[item.id];
170
+ if(domStyle) {
171
+ domStyle.refs++;
172
+ for(var j = 0; j < domStyle.parts.length; j++) {
173
+ domStyle.parts[j](item.parts[j]);
174
+ }
175
+ for(; j < item.parts.length; j++) {
176
+ domStyle.parts.push(addStyle(item.parts[j], options));
177
+ }
178
+ } else {
179
+ var parts = [];
180
+ for(var j = 0; j < item.parts.length; j++) {
181
+ parts.push(addStyle(item.parts[j], options));
182
+ }
183
+ stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
184
+ }
185
+ }
186
+ }
187
+
188
+ function listToStyles(list) {
189
+ var styles = [];
190
+ var newStyles = {};
191
+ for(var i = 0; i < list.length; i++) {
192
+ var item = list[i];
193
+ var id = item[0];
194
+ var css = item[1];
195
+ var media = item[2];
196
+ var sourceMap = item[3];
197
+ var part = {css: css, media: media, sourceMap: sourceMap};
198
+ if(!newStyles[id])
199
+ styles.push(newStyles[id] = {id: id, parts: [part]});
200
+ else
201
+ newStyles[id].parts.push(part);
202
+ }
203
+ return styles;
204
+ }
205
+
206
+ function insertStyleElement(options, styleElement) {
207
+ var head = getHeadElement();
208
+ var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
209
+ if (options.insertAt === "top") {
210
+ if(!lastStyleElementInsertedAtTop) {
211
+ head.insertBefore(styleElement, head.firstChild);
212
+ } else if(lastStyleElementInsertedAtTop.nextSibling) {
213
+ head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
214
+ } else {
215
+ head.appendChild(styleElement);
216
+ }
217
+ styleElementsInsertedAtTop.push(styleElement);
218
+ } else if (options.insertAt === "bottom") {
219
+ head.appendChild(styleElement);
220
+ } else {
221
+ throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
222
+ }
223
+ }
224
+
225
+ function removeStyleElement(styleElement) {
226
+ styleElement.parentNode.removeChild(styleElement);
227
+ var idx = styleElementsInsertedAtTop.indexOf(styleElement);
228
+ if(idx >= 0) {
229
+ styleElementsInsertedAtTop.splice(idx, 1);
230
+ }
231
+ }
232
+
233
+ function createStyleElement(options) {
234
+ var styleElement = document.createElement("style");
235
+ styleElement.type = "text/css";
236
+ insertStyleElement(options, styleElement);
237
+ return styleElement;
238
+ }
239
+
240
+ function createLinkElement(options) {
241
+ var linkElement = document.createElement("link");
242
+ linkElement.rel = "stylesheet";
243
+ insertStyleElement(options, linkElement);
244
+ return linkElement;
245
+ }
246
+
247
+ function addStyle(obj, options) {
248
+ var styleElement, update, remove;
249
+
250
+ if (options.singleton) {
251
+ var styleIndex = singletonCounter++;
252
+ styleElement = singletonElement || (singletonElement = createStyleElement(options));
253
+ update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
254
+ remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
255
+ } else if(obj.sourceMap &&
256
+ typeof URL === "function" &&
257
+ typeof URL.createObjectURL === "function" &&
258
+ typeof URL.revokeObjectURL === "function" &&
259
+ typeof Blob === "function" &&
260
+ typeof btoa === "function") {
261
+ styleElement = createLinkElement(options);
262
+ update = updateLink.bind(null, styleElement);
263
+ remove = function() {
264
+ removeStyleElement(styleElement);
265
+ if(styleElement.href)
266
+ URL.revokeObjectURL(styleElement.href);
267
+ };
268
+ } else {
269
+ styleElement = createStyleElement(options);
270
+ update = applyToTag.bind(null, styleElement);
271
+ remove = function() {
272
+ removeStyleElement(styleElement);
273
+ };
274
+ }
275
+
276
+ update(obj);
277
+
278
+ return function updateStyle(newObj) {
279
+ if(newObj) {
280
+ if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
281
+ return;
282
+ update(obj = newObj);
283
+ } else {
284
+ remove();
285
+ }
286
+ };
287
+ }
288
+
289
+ var replaceText = (function () {
290
+ var textStore = [];
291
+
292
+ return function (index, replacement) {
293
+ textStore[index] = replacement;
294
+ return textStore.filter(Boolean).join('\n');
295
+ };
296
+ })();
297
+
298
+ function applyToSingletonTag(styleElement, index, remove, obj) {
299
+ var css = remove ? "" : obj.css;
300
+
301
+ if (styleElement.styleSheet) {
302
+ styleElement.styleSheet.cssText = replaceText(index, css);
303
+ } else {
304
+ var cssNode = document.createTextNode(css);
305
+ var childNodes = styleElement.childNodes;
306
+ if (childNodes[index]) styleElement.removeChild(childNodes[index]);
307
+ if (childNodes.length) {
308
+ styleElement.insertBefore(cssNode, childNodes[index]);
309
+ } else {
310
+ styleElement.appendChild(cssNode);
311
+ }
312
+ }
313
+ }
314
+
315
+ function applyToTag(styleElement, obj) {
316
+ var css = obj.css;
317
+ var media = obj.media;
318
+
319
+ if(media) {
320
+ styleElement.setAttribute("media", media)
321
+ }
322
+
323
+ if(styleElement.styleSheet) {
324
+ styleElement.styleSheet.cssText = css;
325
+ } else {
326
+ while(styleElement.firstChild) {
327
+ styleElement.removeChild(styleElement.firstChild);
328
+ }
329
+ styleElement.appendChild(document.createTextNode(css));
330
+ }
331
+ }
332
+
333
+ function updateLink(linkElement, obj) {
334
+ var css = obj.css;
335
+ var sourceMap = obj.sourceMap;
336
+
337
+ if(sourceMap) {
338
+ // http://stackoverflow.com/a/26603875
339
+ css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
340
+ }
341
+
342
+ var blob = new Blob([css], { type: "text/css" });
343
+
344
+ var oldSrc = linkElement.href;
345
+
346
+ linkElement.href = URL.createObjectURL(blob);
347
+
348
+ if(oldSrc)
349
+ URL.revokeObjectURL(oldSrc);
350
+ }
351
+
352
+
353
+ /***/ },
354
+
355
+ /***/ 698:
356
+ /***/ function(module, exports, __webpack_require__) {
357
+
358
+ module.exports = __webpack_require__(379);
359
+
360
+
361
+ /***/ }
362
+
363
+ },[698]);
364
+ //# sourceMappingURL=styles.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:////home/adones/Projects/UNSAKINI/unsakini/angular/src/styles.css?95a1","webpack:////home/adones/Projects/UNSAKINI/unsakini/angular/src/styles.css","webpack:////home/adones/Projects/UNSAKINI/unsakini/angular/~/css-loader/lib/css-base.js","webpack:////home/adones/Projects/UNSAKINI/unsakini/angular/~/style-loader/addStyles.js"],"names":[],"mappings":";;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA,iDAAgF;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,gCAAgC,UAAU,EAAE;AAC5C,C;;;;;;;ACpBA;AACA;;;AAGA;AACA;;AAEA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA,wCAAwC,gBAAgB;AACxD,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,iBAAiB,2BAA2B;AAC5C;AACA;AACA,QAAQ,uBAAuB;AAC/B;AACA;AACA,GAAG;AACH;AACA,iBAAiB,uBAAuB;AACxC;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,gCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD;;AAEA,6BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;AACA","file":"styles.bundle.js","sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css\");\nif(typeof content === 'string') content = [[module.id, content, '']];\n// add the styles to the DOM\nvar update = require(\"!./../node_modules/style-loader/addStyles.js\")(content, {});\nif(content.locals) module.exports = content.locals;\n// Hot Module Replacement\nif(module.hot) {\n\t// When the styles change, update the <style> tags\n\tif(!content.locals) {\n\t\tmodule.hot.accept(\"!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css\", function() {\n\t\t\tvar newContent = require(\"!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css\");\n\t\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\t\t\tupdate(newContent);\n\t\t});\n\t}\n\t// When the module is disposed, remove the <style> tags\n\tmodule.hot.dispose(function() { update(); });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini/angular/src/styles.css\n// module id = 379\n// module chunks = 1","exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"/* You can add global styles to this file, and also import other style files */\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini/angular/~/css-loader?sourcemap!/home/adones/Projects/UNSAKINI/unsakini/angular/~/postcss-loader!/home/adones/Projects/UNSAKINI/unsakini/angular/src/styles.css\n// module id = 652\n// module chunks = 1","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t// when a module is imported multiple times with different media queries.\r\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini/angular/~/css-loader/lib/css-base.js\n// module id = 653\n// module chunks = 1","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\nvar stylesInDom = {},\r\n\tmemoize = function(fn) {\r\n\t\tvar memo;\r\n\t\treturn function () {\r\n\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\r\n\t\t\treturn memo;\r\n\t\t};\r\n\t},\r\n\tisOldIE = memoize(function() {\r\n\t\treturn /msie [6-9]\\b/.test(window.navigator.userAgent.toLowerCase());\r\n\t}),\r\n\tgetHeadElement = memoize(function () {\r\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\r\n\t}),\r\n\tsingletonElement = null,\r\n\tsingletonCounter = 0,\r\n\tstyleElementsInsertedAtTop = [];\r\n\r\nmodule.exports = function(list, options) {\r\n\tif(typeof DEBUG !== \"undefined\" && DEBUG) {\r\n\t\tif(typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\r\n\t}\r\n\r\n\toptions = options || {};\r\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\r\n\t// tags it will allow on a page\r\n\tif (typeof options.singleton === \"undefined\") options.singleton = isOldIE();\r\n\r\n\t// By default, add <style> tags to the bottom of <head>.\r\n\tif (typeof options.insertAt === \"undefined\") options.insertAt = \"bottom\";\r\n\r\n\tvar styles = listToStyles(list);\r\n\taddStylesToDom(styles, options);\r\n\r\n\treturn function update(newList) {\r\n\t\tvar mayRemove = [];\r\n\t\tfor(var i = 0; i < styles.length; i++) {\r\n\t\t\tvar item = styles[i];\r\n\t\t\tvar domStyle = stylesInDom[item.id];\r\n\t\t\tdomStyle.refs--;\r\n\t\t\tmayRemove.push(domStyle);\r\n\t\t}\r\n\t\tif(newList) {\r\n\t\t\tvar newStyles = listToStyles(newList);\r\n\t\t\taddStylesToDom(newStyles, options);\r\n\t\t}\r\n\t\tfor(var i = 0; i < mayRemove.length; i++) {\r\n\t\t\tvar domStyle = mayRemove[i];\r\n\t\t\tif(domStyle.refs === 0) {\r\n\t\t\t\tfor(var j = 0; j < domStyle.parts.length; j++)\r\n\t\t\t\t\tdomStyle.parts[j]();\r\n\t\t\t\tdelete stylesInDom[domStyle.id];\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction addStylesToDom(styles, options) {\r\n\tfor(var i = 0; i < styles.length; i++) {\r\n\t\tvar item = styles[i];\r\n\t\tvar domStyle = stylesInDom[item.id];\r\n\t\tif(domStyle) {\r\n\t\t\tdomStyle.refs++;\r\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\r\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\r\n\t\t\t}\r\n\t\t\tfor(; j < item.parts.length; j++) {\r\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar parts = [];\r\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\r\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\r\n\t\t\t}\r\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction listToStyles(list) {\r\n\tvar styles = [];\r\n\tvar newStyles = {};\r\n\tfor(var i = 0; i < list.length; i++) {\r\n\t\tvar item = list[i];\r\n\t\tvar id = item[0];\r\n\t\tvar css = item[1];\r\n\t\tvar media = item[2];\r\n\t\tvar sourceMap = item[3];\r\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\r\n\t\tif(!newStyles[id])\r\n\t\t\tstyles.push(newStyles[id] = {id: id, parts: [part]});\r\n\t\telse\r\n\t\t\tnewStyles[id].parts.push(part);\r\n\t}\r\n\treturn styles;\r\n}\r\n\r\nfunction insertStyleElement(options, styleElement) {\r\n\tvar head = getHeadElement();\r\n\tvar lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];\r\n\tif (options.insertAt === \"top\") {\r\n\t\tif(!lastStyleElementInsertedAtTop) {\r\n\t\t\thead.insertBefore(styleElement, head.firstChild);\r\n\t\t} else if(lastStyleElementInsertedAtTop.nextSibling) {\r\n\t\t\thead.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);\r\n\t\t} else {\r\n\t\t\thead.appendChild(styleElement);\r\n\t\t}\r\n\t\tstyleElementsInsertedAtTop.push(styleElement);\r\n\t} else if (options.insertAt === \"bottom\") {\r\n\t\thead.appendChild(styleElement);\r\n\t} else {\r\n\t\tthrow new Error(\"Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.\");\r\n\t}\r\n}\r\n\r\nfunction removeStyleElement(styleElement) {\r\n\tstyleElement.parentNode.removeChild(styleElement);\r\n\tvar idx = styleElementsInsertedAtTop.indexOf(styleElement);\r\n\tif(idx >= 0) {\r\n\t\tstyleElementsInsertedAtTop.splice(idx, 1);\r\n\t}\r\n}\r\n\r\nfunction createStyleElement(options) {\r\n\tvar styleElement = document.createElement(\"style\");\r\n\tstyleElement.type = \"text/css\";\r\n\tinsertStyleElement(options, styleElement);\r\n\treturn styleElement;\r\n}\r\n\r\nfunction createLinkElement(options) {\r\n\tvar linkElement = document.createElement(\"link\");\r\n\tlinkElement.rel = \"stylesheet\";\r\n\tinsertStyleElement(options, linkElement);\r\n\treturn linkElement;\r\n}\r\n\r\nfunction addStyle(obj, options) {\r\n\tvar styleElement, update, remove;\r\n\r\n\tif (options.singleton) {\r\n\t\tvar styleIndex = singletonCounter++;\r\n\t\tstyleElement = singletonElement || (singletonElement = createStyleElement(options));\r\n\t\tupdate = applyToSingletonTag.bind(null, styleElement, styleIndex, false);\r\n\t\tremove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);\r\n\t} else if(obj.sourceMap &&\r\n\t\ttypeof URL === \"function\" &&\r\n\t\ttypeof URL.createObjectURL === \"function\" &&\r\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\r\n\t\ttypeof Blob === \"function\" &&\r\n\t\ttypeof btoa === \"function\") {\r\n\t\tstyleElement = createLinkElement(options);\r\n\t\tupdate = updateLink.bind(null, styleElement);\r\n\t\tremove = function() {\r\n\t\t\tremoveStyleElement(styleElement);\r\n\t\t\tif(styleElement.href)\r\n\t\t\t\tURL.revokeObjectURL(styleElement.href);\r\n\t\t};\r\n\t} else {\r\n\t\tstyleElement = createStyleElement(options);\r\n\t\tupdate = applyToTag.bind(null, styleElement);\r\n\t\tremove = function() {\r\n\t\t\tremoveStyleElement(styleElement);\r\n\t\t};\r\n\t}\r\n\r\n\tupdate(obj);\r\n\r\n\treturn function updateStyle(newObj) {\r\n\t\tif(newObj) {\r\n\t\t\tif(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)\r\n\t\t\t\treturn;\r\n\t\t\tupdate(obj = newObj);\r\n\t\t} else {\r\n\t\t\tremove();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nvar replaceText = (function () {\r\n\tvar textStore = [];\r\n\r\n\treturn function (index, replacement) {\r\n\t\ttextStore[index] = replacement;\r\n\t\treturn textStore.filter(Boolean).join('\\n');\r\n\t};\r\n})();\r\n\r\nfunction applyToSingletonTag(styleElement, index, remove, obj) {\r\n\tvar css = remove ? \"\" : obj.css;\r\n\r\n\tif (styleElement.styleSheet) {\r\n\t\tstyleElement.styleSheet.cssText = replaceText(index, css);\r\n\t} else {\r\n\t\tvar cssNode = document.createTextNode(css);\r\n\t\tvar childNodes = styleElement.childNodes;\r\n\t\tif (childNodes[index]) styleElement.removeChild(childNodes[index]);\r\n\t\tif (childNodes.length) {\r\n\t\t\tstyleElement.insertBefore(cssNode, childNodes[index]);\r\n\t\t} else {\r\n\t\t\tstyleElement.appendChild(cssNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction applyToTag(styleElement, obj) {\r\n\tvar css = obj.css;\r\n\tvar media = obj.media;\r\n\r\n\tif(media) {\r\n\t\tstyleElement.setAttribute(\"media\", media)\r\n\t}\r\n\r\n\tif(styleElement.styleSheet) {\r\n\t\tstyleElement.styleSheet.cssText = css;\r\n\t} else {\r\n\t\twhile(styleElement.firstChild) {\r\n\t\t\tstyleElement.removeChild(styleElement.firstChild);\r\n\t\t}\r\n\t\tstyleElement.appendChild(document.createTextNode(css));\r\n\t}\r\n}\r\n\r\nfunction updateLink(linkElement, obj) {\r\n\tvar css = obj.css;\r\n\tvar sourceMap = obj.sourceMap;\r\n\r\n\tif(sourceMap) {\r\n\t\t// http://stackoverflow.com/a/26603875\r\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\r\n\t}\r\n\r\n\tvar blob = new Blob([css], { type: \"text/css\" });\r\n\r\n\tvar oldSrc = linkElement.href;\r\n\r\n\tlinkElement.href = URL.createObjectURL(blob);\r\n\r\n\tif(oldSrc)\r\n\t\tURL.revokeObjectURL(oldSrc);\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini/angular/~/style-loader/addStyles.js\n// module id = 695\n// module chunks = 1"],"sourceRoot":""}
data/angular/package.json CHANGED
@@ -21,11 +21,8 @@
21
21
  "@angular/platform-browser": "^2.1.0",
22
22
  "@angular/platform-browser-dynamic": "^2.1.0",
23
23
  "@angular/router": "^3.1.0",
24
- "angular2-jwt": "^0.1.25",
25
- "bootstrap": "^3.3.7",
26
- "bootstrap-sass": "^3.3.7",
24
+ "angular2-token": "^0.2.0-beta.3",
27
25
  "core-js": "^2.4.1",
28
- "ng2-bootstrap": "^1.1.16",
29
26
  "rxjs": "5.0.0-beta.12",
30
27
  "ts-helpers": "^1.1.1",
31
28
  "zone.js": "^0.6.23"
@@ -1 +1,4 @@
1
- <router-outlet></router-outlet>
1
+ <h1>
2
+ {{title}}
3
+ <router-outlet></router-outlet>
4
+ </h1>
@@ -2,28 +2,27 @@ import { BrowserModule } from '@angular/platform-browser';
2
2
  import { NgModule } from '@angular/core';
3
3
  import { FormsModule } from '@angular/forms';
4
4
  import { HttpModule } from '@angular/http';
5
+ import { Angular2TokenService, A2tUiModule } from 'angular2-token';
5
6
 
6
7
  import { AppRoutesModule } from './app.routes.module';
8
+
7
9
  import { AppComponent } from './app.component';
8
- import { RegistrationModule } from './registration/'
9
- import { LoginModule } from './login'
10
- import { ConfirmAccountModule } from './confirm-account'
10
+ import { RegistrationComponent } from './registration/registration.component';
11
11
 
12
12
  @NgModule({
13
13
  imports: [
14
14
  BrowserModule,
15
15
  FormsModule,
16
16
  HttpModule,
17
-
18
17
  AppRoutesModule,
19
- RegistrationModule,
20
- ConfirmAccountModule,
21
- LoginModule,
18
+ A2tUiModule,
22
19
  ],
23
20
  declarations: [
24
- AppComponent
21
+ AppComponent,
22
+ RegistrationComponent
25
23
  ],
26
24
  providers: [
25
+ Angular2TokenService,
27
26
  ],
28
27
  bootstrap: [AppComponent]
29
28
  })
@@ -2,27 +2,17 @@ import { NgModule } from '@angular/core';
2
2
  import { RouterModule } from '@angular/router';
3
3
 
4
4
  import { RegistrationComponent } from './registration/registration.component'
5
- import { LoginComponent } from './login/login.component'
6
- import { ConfirmAccountComponent } from './confirm-account/confirm-account.component'
7
5
 
8
6
 
9
7
  const routes = [
10
8
  {
11
9
  path: '',
12
- redirectTo: 'login',
10
+ redirectTo: 'registration',
13
11
  pathMatch: 'full'
14
12
  },
15
13
  {
16
- path: 'signup',
14
+ path: 'registration',
17
15
  component: RegistrationComponent
18
- },
19
- {
20
- path: 'login',
21
- component: LoginComponent
22
- },
23
- {
24
- path: 'account/confirm/:token',
25
- component: ConfirmAccountComponent
26
16
  }
27
17
  ];
28
18
 
@@ -1,4 +1,2 @@
1
1
  export * from './app.component';
2
2
  export * from './app.module';
3
- export * from './services';
4
- export * from './registration';
@@ -1,72 +1,14 @@
1
- <div class="container home-forms">
2
- <div class="row">
3
- <div class="col-md-4 col-md-offset-4">
4
- <h1 class="text-center">
5
- <a href="/">
6
- <img src="/images/unsakini.svg" width="300px" height="130px">
7
- </a>
8
- </h1>
9
- <hr>
10
- <p class="lead text-center">
11
- Create Account
12
- </p>
13
- <form #regForm="ngForm" (ngSubmit)="doSubmit($event); false">
14
- <div *ngIf="success" class="alert alert-success">
15
- <p>Success! A confirmation link has been sent to {{user.email}}.</p>
16
- </div>
17
- <div class="form-group" [ngClass]="(email.invalid && !email.pristine) || errors.email.length > 0 ? 'has-error' : ''">
18
- <label for="email">Email</label>
19
- <input type="email" class="form-control" id="email" placeholder="Email" required [(ngModel)]="user.email" name="email" #email="ngModel">
20
- <span class="help-block" *ngFor="let e of errors.email">
21
- Email {{e}}
22
- </span>
23
- <span [hidden]="email.valid || email.pristine" class=" help-block">
24
- Email is required
25
- </span>
26
- </div>
27
- <div class="form-group" [ngClass]="(name.invalid && !name.pristine) || errors.name.length > 0 ? 'has-error' : ''">
28
- <label for="name">name</label>
29
- <input type="text" class="form-control" id="name" placeholder="name" required [(ngModel)]="user.name" name="name" #name="ngModel">
30
- <span [hidden]="name.valid || name.pristine" class=" help-block">
31
- <span class="text-danger">Name is required</span>
32
- </span>
33
- <span class="help-block" *ngFor="let e of errors.name">
34
- Password {{e}}
35
- </span>
36
- </div>
37
- <div class="form-group" [ngClass]="(password.invalid && !password.pristine) || errors.password.length > 0 ? 'has-error' : ''">
38
- <label for="password">Password</label>
39
- <input type="password" class="form-control" id="password" placeholder="Password" required [(ngModel)]="user.password" name="password" #password="ngModel">
40
- <span [hidden]="password.valid || password.pristine" class="help-block">
41
- Password is required
42
- </span>
43
- <span class="help-block" *ngFor="let e of errors.password">
44
- Password {{e}}
45
- </span>
46
- </div>
47
- <div class="form-group" [ngClass]="(password_confirmation.invalid && !password_confirmation.pristine) || errors.password_confirmation.length > 0 ? 'has-error' : ''">
48
- <label for="password">Confirm Password</label>
49
- <input type="password" class="form-control" id="password_confirmation" placeholder="Confirm Password" required [(ngModel)]="user.password_confirmation" name="password_confirmation" #password_confirmation="ngModel">
50
- <span [hidden]="password_confirmation.valid || password_confirmation.pristine" class="help-block">
51
- Password confirmation is required
52
- </span>
53
- <span class="help-block" *ngFor="let e of errors.password_confirmation">
54
- Password Confirmation {{e}}
55
- </span>
56
- </div>
57
- <div class="form-group" style="margin-top: 20px;">
58
- <button type="submit" class="btn btn-primary" [disabled]="!regForm.form.valid || submitting">
59
- <span *ngIf="!submitting">Create Account</span>
60
- <span *ngIf="submitting">Submitting...</span>
61
- </button>
62
- </div>
63
- </form>
64
- <hr>
65
- <p>
66
- Already have an account? <a [routerLink]="['/login']">Login</a>
67
- </p>
68
- </div>
69
- </div>
70
- </div>
71
1
 
2
+ <form (ngSubmit)="doSubmit()">
3
+ <div class="alert alert-success" *ngIf="success">Registration successful. Please confirm your email sent to {{user.email}} to proceed.</div>
4
+ <div class="alert alert-danger" *ngIf="errors">
5
+ <p *ngFor="let e of errors">{{e}}</p>
6
+ </div>
7
+ <input type="text" name="name">
8
+ <input type="email" name="email">
9
+ <input type="password" name="password">
10
+ <input type="password" name="password_confirmation">
11
+ <button type="submit">Sign Up</button>
12
+ </form>
72
13
 
14
+ <div (click)="doSubmit()">CLICK ME</div>
@@ -6,9 +6,9 @@ import 'rxjs/add/observable/of';
6
6
  import 'rxjs/add/observable/throw';
7
7
  import { By } from '@angular/platform-browser';
8
8
  import { DebugElement } from '@angular/core';
9
+ import { Angular2TokenService } from 'angular2-token';
9
10
 
10
11
  import { RegistrationComponent } from './registration.component';
11
- import { RegistrationService } from './'
12
12
 
13
13
  let user = {
14
14
  name: 'first last',
@@ -20,11 +20,7 @@ let user = {
20
20
  let status = 0
21
21
  let errors = []
22
22
 
23
- class RegistrationServiceMock {
24
- success = false
25
- expect (success: boolean) {
26
- this.success = success;
27
- }
23
+ class Angular2TokenServiceMock {
28
24
  registerAccount(user) {
29
25
 
30
26
  if (status === 200) {
@@ -60,7 +56,10 @@ describe('RegistrationComponent', () => {
60
56
  ],
61
57
  declarations: [RegistrationComponent],
62
58
  providers: [
63
- {provide: RegistrationService, useClass: RegistrationServiceMock}
59
+ {
60
+ provide: Angular2TokenService,
61
+ useClass: Angular2TokenServiceMock
62
+ },
64
63
  ]
65
64
  })
66
65
  .compileComponents();
@@ -75,10 +74,14 @@ describe('RegistrationComponent', () => {
75
74
 
76
75
  describe('Component', () => {
77
76
 
78
- it('should be defined', () => {
77
+ it('should create', () => {
79
78
  expect(component).toBeTruthy();
80
79
  });
81
80
 
81
+ it('should have token service', () => {
82
+ expect(component.service).toBeDefined();
83
+ });
84
+
82
85
  it('should have user', () => {
83
86
  expect(component.user).toEqual({
84
87
  name: '',
@@ -1,5 +1,5 @@
1
1
  import { Component, OnInit } from '@angular/core';
2
- import { RegistrationService } from './registration.service';
2
+ import { Angular2TokenService } from 'angular2-token';
3
3
 
4
4
  @Component({
5
5
  selector: 'app-registration',
@@ -9,15 +9,10 @@ import { RegistrationService } from './registration.service';
9
9
  export class RegistrationComponent implements OnInit {
10
10
 
11
11
  user: any;
12
- errors = {
13
- name: [],
14
- email: [],
15
- password: [],
16
- password_confirmation: []
17
- };
12
+ errors: any;
18
13
  success = false;
19
14
 
20
- constructor(public service: RegistrationService) {
15
+ constructor(public service: Angular2TokenService) {
21
16
  this.user = {
22
17
  name: '',
23
18
  email: '',
@@ -32,8 +27,11 @@ export class RegistrationComponent implements OnInit {
32
27
  this.success = true;
33
28
  },
34
29
  (res) => {
35
- this.success = false;
36
- this.errors = res;
30
+ if (res.status == 422) {
31
+ this.errors = res.json().errors
32
+ } else {
33
+ this.errors = ['Something went wrong.']
34
+ }
37
35
  }
38
36
  );
39
37
  }
@@ -1,4 +1,3 @@
1
1
  export const environment = {
2
- production: true,
3
- api_base_url: 'https://www.unsakini.com'
2
+ production: true
4
3
  };