@tech4good/angular-schematics 17.0.3 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/README.md +8 -0
  2. package/package.json +4 -4
  3. package/src/collection.json +0 -16
  4. package/src/component/files/__name@dasherize__/__name@dasherize__.component.ts.template +22 -8
  5. package/src/component/index.js +2 -45
  6. package/src/component/index.js.map +1 -1
  7. package/src/component/schema.json +0 -5
  8. package/src/entity/files/__name@dasherize__/__name@dasherize__.mock.ts.template +12 -0
  9. package/src/entity/files/__name@dasherize__/__name@dasherize__.model.ts.template +1 -0
  10. package/src/entity/files/__name@dasherize__/__name@dasherize__.store.ts.template +41 -0
  11. package/src/entity/index.js +29 -50
  12. package/src/entity/index.js.map +1 -1
  13. package/src/init/files/.firebaserc.template +8 -0
  14. package/src/init/files/README.md.template +6 -6
  15. package/src/init/files/angular.json.template +18 -11
  16. package/src/init/files/package.json.template +28 -29
  17. package/src/init/files/src/app/admin/{waitlist/waitlist.animations.ts.template → admin-panel/admin-panel.animations.ts.template} +1 -1
  18. package/src/init/files/src/app/admin/{waitlist/waitlist.component.html.template → admin-panel/admin-panel.component.html.template} +3 -3
  19. package/src/init/files/src/app/admin/{waitlist/waitlist.component.scss.template → admin-panel/admin-panel.component.scss.template} +1 -1
  20. package/src/init/files/src/app/admin/admin-panel/admin-panel.component.spec.ts.template +25 -0
  21. package/src/init/files/src/app/admin/admin-panel/admin-panel.component.ts.template +99 -0
  22. package/src/init/files/src/app/app.component.html.template +1 -0
  23. package/src/init/files/src/app/app.component.ts.template +14 -8
  24. package/src/init/files/src/app/app.config.ts.template +63 -0
  25. package/src/init/files/src/app/app.routes.ts.template +32 -0
  26. package/src/init/files/src/app/core/analytics/log.service.ts.template +122 -89
  27. package/src/init/files/src/app/core/analytics/time-analytics.service.ts.template +9 -17
  28. package/src/init/files/src/app/core/auth/auth.guard.ts.template +25 -22
  29. package/src/init/files/src/app/core/firebase/cached-listeners.service.ts.template +291 -0
  30. package/src/init/files/src/app/core/firebase/database.service.ts.template +56 -0
  31. package/src/init/files/src/app/core/firebase/firebase.mock.service.ts.template +276 -0
  32. package/src/init/files/src/app/core/firebase/firebase.service.ts.template +265 -215
  33. package/src/init/files/src/app/core/local-storage/session.service.ts.template +3 -4
  34. package/src/init/files/src/app/core/store/app.model.ts.template +19 -0
  35. package/src/init/files/src/app/core/store/app.store.ts.template +1074 -0
  36. package/src/init/files/src/app/core/store/auth/auth.mock.ts.template +20 -0
  37. package/src/init/files/src/app/core/store/auth/auth.store.ts.template +136 -0
  38. package/src/init/files/src/app/core/store/batch-write.firebase.service.ts.template +58 -0
  39. package/src/init/files/src/app/core/store/batch-write.mock.service.ts.template +105 -0
  40. package/src/init/files/src/app/core/store/batch-write.service.ts.template +126 -0
  41. package/src/init/files/src/app/core/store/user/user.mock.ts.template +24 -0
  42. package/src/init/files/src/app/core/store/user/user.model.ts.template +1 -1
  43. package/src/init/files/src/app/core/store/user/user.store.ts.template +41 -0
  44. package/src/init/files/src/app/core/store/user-context/user-context.mock.ts.template +24 -0
  45. package/src/init/files/src/app/core/store/user-context/user-context.model.ts.template +1 -0
  46. package/src/init/files/src/app/core/store/user-context/user-context.store.ts.template +41 -0
  47. package/src/init/files/src/app/core/utils/rand.utils.ts.template +13 -0
  48. package/src/init/files/src/app/{onboarding → first-time}/consent/consent.component.html.template +8 -13
  49. package/src/init/files/src/app/first-time/consent/consent.component.ts.template +90 -0
  50. package/src/init/files/src/app/first-time/early-access/early-access.animations.ts.template +4 -0
  51. package/src/init/files/src/app/first-time/early-access/early-access.component.html.template +69 -0
  52. package/src/init/files/src/app/{onboarding/waiting/waiting.component.scss.template → first-time/early-access/early-access.component.scss.template} +1 -1
  53. package/src/init/files/src/app/first-time/early-access/early-access.component.spec.ts.template +25 -0
  54. package/src/init/files/src/app/first-time/early-access/early-access.component.ts.template +194 -0
  55. package/src/init/files/src/app/first-time/early-access/early-access.model.ts.template +7 -0
  56. package/src/init/files/src/app/{general → first-time}/landing/landing.component.html.template +1 -1
  57. package/src/init/files/src/app/first-time/landing/landing.component.ts.template +44 -0
  58. package/src/init/files/src/app/first-time/login/login.component.html.template +10 -0
  59. package/src/init/files/src/app/first-time/login/login.component.ts.template +45 -0
  60. package/src/init/files/src/app/first-time/onboarding/onboarding.animations.ts.template +4 -0
  61. package/src/init/files/src/app/first-time/onboarding/onboarding.component.html.template +2 -0
  62. package/src/init/files/src/app/first-time/onboarding/onboarding.component.scss.template +5 -0
  63. package/src/init/files/src/app/{admin/waitlist/waitlist.component.spec.ts.template → first-time/onboarding/onboarding.component.spec.ts.template} +6 -6
  64. package/src/init/files/src/app/first-time/onboarding/onboarding.component.ts.template +41 -0
  65. package/src/init/files/src/app/main/home/home.component.html.template +5 -0
  66. package/src/init/files/src/app/main/home/home.component.ts.template +51 -0
  67. package/src/init/files/src/app/shared/navbar/navbar.component.html.template +15 -0
  68. package/src/init/files/src/app/shared/navbar/navbar.component.scss.template +43 -0
  69. package/src/init/files/src/app/shared/navbar/navbar.component.spec.ts.template +25 -0
  70. package/src/init/files/src/app/shared/navbar/navbar.component.ts.template +40 -0
  71. package/src/init/files/src/app/shared/redeployment-warning/redeployment-warning.component.html.template +9 -0
  72. package/src/init/files/src/app/shared/{components/redeployment-warning → redeployment-warning}/redeployment-warning.component.ts.template +17 -6
  73. package/src/init/files/src/app/shared/{components/redeployment-warning → redeployment-warning}/redeployment-warning.service.ts.template +2 -2
  74. package/src/init/files/src/assets/images/close-x.svg +3 -0
  75. package/src/init/files/src/environments/environment.ts.template +1 -0
  76. package/src/init/files/src/index.html.template +1 -1
  77. package/src/init/files/tsconfig.json.template +0 -1
  78. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.actions.ts.template +0 -26
  79. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.effects.ts.template +0 -48
  80. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.model.ts.template +0 -0
  81. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.selectors.ts.template +0 -20
  82. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.state.ts.template +0 -13
  83. package/src/container/files/__name@dasherize__/__name@dasherize__.animations.ts.template +0 -4
  84. package/src/container/files/__name@dasherize__/__name@dasherize__.component.html.template +0 -3
  85. package/src/container/files/__name@dasherize__/__name@dasherize__.component.scss.template +0 -5
  86. package/src/container/files/__name@dasherize__/__name@dasherize__.component.spec.ts.template +0 -25
  87. package/src/container/files/__name@dasherize__/__name@dasherize__.component.ts.template +0 -90
  88. package/src/container/index.d.ts +0 -2
  89. package/src/container/index.js +0 -127
  90. package/src/container/index.js.map +0 -1
  91. package/src/container/index_spec.d.ts +0 -1
  92. package/src/container/index_spec.js +0 -23
  93. package/src/container/index_spec.js.map +0 -1
  94. package/src/container/schema.json +0 -50
  95. package/src/entity/files/__name@dasherize__/__name@dasherize__.actions.ts.template +0 -249
  96. package/src/entity/files/__name@dasherize__/__name@dasherize__.effects.ts.template +0 -131
  97. package/src/entity/files/__name@dasherize__/__name@dasherize__.reducer.spec.ts.template +0 -13
  98. package/src/entity/files/__name@dasherize__/__name@dasherize__.reducer.ts.template +0 -51
  99. package/src/entity/files/__name@dasherize__/__name@dasherize__.service.ts.template +0 -50
  100. package/src/entity-in-example/files/__name@dasherize__/__name@dasherize__.actions.ts.template +0 -270
  101. package/src/entity-in-example/files/__name@dasherize__/__name@dasherize__.effects.ts.template +0 -131
  102. package/src/entity-in-example/files/__name@dasherize__/__name@dasherize__.model.ts.template +0 -3
  103. package/src/entity-in-example/files/__name@dasherize__/__name@dasherize__.reducer.spec.ts.template +0 -13
  104. package/src/entity-in-example/files/__name@dasherize__/__name@dasherize__.reducer.ts.template +0 -51
  105. package/src/entity-in-example/files/__name@dasherize__/__name@dasherize__.service.ts.template +0 -50
  106. package/src/entity-in-example/index.d.ts +0 -2
  107. package/src/entity-in-example/index.js +0 -141
  108. package/src/entity-in-example/index.js.map +0 -1
  109. package/src/entity-in-example/index_spec.d.ts +0 -1
  110. package/src/entity-in-example/index_spec.js +0 -23
  111. package/src/entity-in-example/index_spec.js.map +0 -1
  112. package/src/entity-in-example/schema.json +0 -45
  113. package/src/init/files/CHANGELOG.md.template +0 -10
  114. package/src/init/files/src/app/admin/admin-routing.module.ts.template +0 -17
  115. package/src/init/files/src/app/admin/admin.module.spec.ts.template +0 -13
  116. package/src/init/files/src/app/admin/admin.module.ts.template +0 -28
  117. package/src/init/files/src/app/admin/waitlist/+state/waitlist.actions.ts.template +0 -23
  118. package/src/init/files/src/app/admin/waitlist/+state/waitlist.effects.ts.template +0 -50
  119. package/src/init/files/src/app/admin/waitlist/+state/waitlist.model.ts.template +0 -0
  120. package/src/init/files/src/app/admin/waitlist/+state/waitlist.selectors.ts.template +0 -39
  121. package/src/init/files/src/app/admin/waitlist/+state/waitlist.state.ts.template +0 -13
  122. package/src/init/files/src/app/admin/waitlist/waitlist.component.ts.template +0 -141
  123. package/src/init/files/src/app/app-routing.module.ts.template +0 -26
  124. package/src/init/files/src/app/app.module.ts.template +0 -34
  125. package/src/init/files/src/app/core/core.module.ts.template +0 -75
  126. package/src/init/files/src/app/core/setup/firebase-setup.ts.template +0 -25
  127. package/src/init/files/src/app/core/setup/module-import-guard.ts.template +0 -5
  128. package/src/init/files/src/app/core/snackbar/snackbar.actions.ts.template +0 -24
  129. package/src/init/files/src/app/core/snackbar/snackbar.effects.ts.template +0 -41
  130. package/src/init/files/src/app/core/store/app-state/app-state.actions.ts.template +0 -249
  131. package/src/init/files/src/app/core/store/app-state/app-state.effects.ts.template +0 -131
  132. package/src/init/files/src/app/core/store/app-state/app-state.model.ts.template +0 -8
  133. package/src/init/files/src/app/core/store/app-state/app-state.reducer.spec.ts.template +0 -13
  134. package/src/init/files/src/app/core/store/app-state/app-state.reducer.ts.template +0 -51
  135. package/src/init/files/src/app/core/store/app-state/app-state.service.ts.template +0 -50
  136. package/src/init/files/src/app/core/store/app.actions.ts.template +0 -92
  137. package/src/init/files/src/app/core/store/app.effects.ts.template +0 -175
  138. package/src/init/files/src/app/core/store/app.reducer.ts.template +0 -36
  139. package/src/init/files/src/app/core/store/app.selectors.ts.template +0 -42
  140. package/src/init/files/src/app/core/store/auth/auth.actions.ts.template +0 -77
  141. package/src/init/files/src/app/core/store/auth/auth.effects.ts.template +0 -163
  142. package/src/init/files/src/app/core/store/auth/auth.reducer.spec.ts.template +0 -13
  143. package/src/init/files/src/app/core/store/auth/auth.reducer.ts.template +0 -26
  144. package/src/init/files/src/app/core/store/auth/auth.selectors.ts.template +0 -25
  145. package/src/init/files/src/app/core/store/cached-load-connections.service.ts.template +0 -405
  146. package/src/init/files/src/app/core/store/cached-selectors.service.ts.template +0 -376
  147. package/src/init/files/src/app/core/store/effects.helpers.ts.template +0 -66
  148. package/src/init/files/src/app/core/store/user/user.actions.ts.template +0 -248
  149. package/src/init/files/src/app/core/store/user/user.effects.ts.template +0 -149
  150. package/src/init/files/src/app/core/store/user/user.reducer.spec.ts.template +0 -13
  151. package/src/init/files/src/app/core/store/user/user.reducer.ts.template +0 -50
  152. package/src/init/files/src/app/core/store/user/user.service.ts.template +0 -50
  153. package/src/init/files/src/app/core/store/user-context/user-context.actions.ts.template +0 -248
  154. package/src/init/files/src/app/core/store/user-context/user-context.effects.ts.template +0 -131
  155. package/src/init/files/src/app/core/store/user-context/user-context.reducer.spec.ts.template +0 -13
  156. package/src/init/files/src/app/core/store/user-context/user-context.reducer.ts.template +0 -51
  157. package/src/init/files/src/app/core/store/user-context/user-context.service.ts.template +0 -50
  158. package/src/init/files/src/app/core/utils/string-case.utils.ts.template +0 -96
  159. package/src/init/files/src/app/general/general-routing.module.ts.template +0 -25
  160. package/src/init/files/src/app/general/general.module.spec.ts.template +0 -13
  161. package/src/init/files/src/app/general/general.module.ts.template +0 -36
  162. package/src/init/files/src/app/general/home/+state/home.actions.ts.template +0 -26
  163. package/src/init/files/src/app/general/home/+state/home.effects.ts.template +0 -48
  164. package/src/init/files/src/app/general/home/+state/home.model.ts.template +0 -0
  165. package/src/init/files/src/app/general/home/+state/home.selectors.ts.template +0 -20
  166. package/src/init/files/src/app/general/home/+state/home.state.ts.template +0 -13
  167. package/src/init/files/src/app/general/home/home.component.html.template +0 -5
  168. package/src/init/files/src/app/general/home/home.component.ts.template +0 -88
  169. package/src/init/files/src/app/general/landing/+state/landing.actions.ts.template +0 -26
  170. package/src/init/files/src/app/general/landing/+state/landing.effects.ts.template +0 -48
  171. package/src/init/files/src/app/general/landing/+state/landing.model.ts.template +0 -0
  172. package/src/init/files/src/app/general/landing/+state/landing.selectors.ts.template +0 -20
  173. package/src/init/files/src/app/general/landing/+state/landing.state.ts.template +0 -13
  174. package/src/init/files/src/app/general/landing/landing.component.ts.template +0 -98
  175. package/src/init/files/src/app/general/login/login.component.html.template +0 -11
  176. package/src/init/files/src/app/general/login/login.component.ts.template +0 -80
  177. package/src/init/files/src/app/onboarding/consent/+state/consent.actions.ts.template +0 -23
  178. package/src/init/files/src/app/onboarding/consent/+state/consent.effects.ts.template +0 -47
  179. package/src/init/files/src/app/onboarding/consent/+state/consent.model.ts.template +0 -0
  180. package/src/init/files/src/app/onboarding/consent/+state/consent.selectors.ts.template +0 -20
  181. package/src/init/files/src/app/onboarding/consent/+state/consent.state.ts.template +0 -13
  182. package/src/init/files/src/app/onboarding/consent/consent.component.ts.template +0 -151
  183. package/src/init/files/src/app/onboarding/onboarding-routing.module.ts.template +0 -19
  184. package/src/init/files/src/app/onboarding/onboarding.module.spec.ts.template +0 -13
  185. package/src/init/files/src/app/onboarding/onboarding.module.ts.template +0 -32
  186. package/src/init/files/src/app/onboarding/waiting/+state/waiting.actions.ts.template +0 -26
  187. package/src/init/files/src/app/onboarding/waiting/+state/waiting.effects.ts.template +0 -52
  188. package/src/init/files/src/app/onboarding/waiting/+state/waiting.model.ts.template +0 -9
  189. package/src/init/files/src/app/onboarding/waiting/+state/waiting.selectors.ts.template +0 -42
  190. package/src/init/files/src/app/onboarding/waiting/+state/waiting.state.ts.template +0 -13
  191. package/src/init/files/src/app/onboarding/waiting/waiting.animations.ts.template +0 -4
  192. package/src/init/files/src/app/onboarding/waiting/waiting.component.html.template +0 -57
  193. package/src/init/files/src/app/onboarding/waiting/waiting.component.spec.ts.template +0 -25
  194. package/src/init/files/src/app/onboarding/waiting/waiting.component.ts.template +0 -281
  195. package/src/init/files/src/app/shared/components/redeployment-warning/redeployment-warning.component.html.template +0 -10
  196. package/src/init/files/src/app/shared/shared.module.ts.template +0 -87
  197. package/src/init/files/src/main.ts.template +0 -12
  198. package/src/module/files/__name@dasherize__/__name@dasherize__-routing.module.ts.template +0 -15
  199. package/src/module/files/__name@dasherize__/__name@dasherize__.module.spec.ts.template +0 -13
  200. package/src/module/files/__name@dasherize__/__name@dasherize__.module.ts.template +0 -24
  201. package/src/module/index.d.ts +0 -2
  202. package/src/module/index.js +0 -97
  203. package/src/module/index.js.map +0 -1
  204. package/src/module/index_spec.d.ts +0 -1
  205. package/src/module/index_spec.js +0 -23
  206. package/src/module/index_spec.js.map +0 -1
  207. package/src/module/schema.json +0 -38
  208. /package/src/init/files/src/app/{onboarding → first-time}/consent/consent.animations.ts.template +0 -0
  209. /package/src/init/files/src/app/{onboarding → first-time}/consent/consent.component.scss.template +0 -0
  210. /package/src/init/files/src/app/{onboarding → first-time}/consent/consent.component.spec.ts.template +0 -0
  211. /package/src/init/files/src/app/{general → first-time}/landing/landing.animations.ts.template +0 -0
  212. /package/src/init/files/src/app/{general → first-time}/landing/landing.component.scss.template +0 -0
  213. /package/src/init/files/src/app/{general → first-time}/landing/landing.component.spec.ts.template +0 -0
  214. /package/src/init/files/src/app/{general → first-time}/login/login.component.scss.template +0 -0
  215. /package/src/init/files/src/app/{general → first-time}/login/login.component.spec.ts.template +0 -0
  216. /package/src/init/files/src/app/{general → main}/home/home.animations.ts.template +0 -0
  217. /package/src/init/files/src/app/{general → main}/home/home.component.scss.template +0 -0
  218. /package/src/init/files/src/app/{general → main}/home/home.component.spec.ts.template +0 -0
  219. /package/src/init/files/src/app/shared/{components/redeployment-warning → redeployment-warning}/redeployment-warning.component.scss.template +0 -0
  220. /package/src/init/files/src/app/shared/{components/redeployment-warning → redeployment-warning}/redeployment-warning.component.spec.ts.template +0 -0
package/README.md CHANGED
@@ -8,6 +8,14 @@ This repository is used to generate modules, containers, components, and entitie
8
8
  2. Set the schematics to be the default using: `ng config cli.defaultCollection @tech4good/angular-schematics`
9
9
  3. Change directories to the directory you want to generate the files and run `ng generate <schematic> <name>`, where `schematic` = module, container, component, or entity (or if you did not make it the default, use `ng generate @tech4good/angular-schematics:<schematic> <name>`)
10
10
 
11
+ ### Setting up a new repository
12
+
13
+ 1. Create a new Angular repo using the CLI,
14
+ 2. Use `ng generate init` to add our base files to the new repo,
15
+ 3. Then add database configuration parameters:
16
+ * Update the environments files with your firebase configs
17
+ * Update .firebaserc with the firebase projects you're deploying to
18
+
11
19
  ### Developing
12
20
 
13
21
  1. Clone this repository.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tech4good/angular-schematics",
3
- "version": "17.0.3",
3
+ "version": "18.0.0",
4
4
  "description": "A set of schematics for generating modules, containers, components, and entities",
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
@@ -13,10 +13,10 @@
13
13
  "license": "MIT",
14
14
  "schematics": "./src/collection.json",
15
15
  "dependencies": {
16
- "@angular-devkit/core": "^17.3.2",
17
- "@angular-devkit/schematics": "^17.3.2",
16
+ "@angular-devkit/core": "^18.1.0",
17
+ "@angular-devkit/schematics": "^18.1.0",
18
18
  "@angular-devkit/schematics-cli": "^17.3.2",
19
- "@schematics/angular": "^17.3.2",
19
+ "@schematics/angular": "^18.1.0",
20
20
  "typescript": "~4.5.5"
21
21
  },
22
22
  "devDependencies": {
@@ -6,16 +6,6 @@
6
6
  "factory": "./init/index#init",
7
7
  "schema": "./init/schema.json"
8
8
  },
9
- "module": {
10
- "description": "Generate a new module.",
11
- "factory": "./module/index#module",
12
- "schema": "./module/schema.json"
13
- },
14
- "container": {
15
- "description": "Generate a new container.",
16
- "factory": "./container/index#container",
17
- "schema": "./container/schema.json"
18
- },
19
9
  "component": {
20
10
  "description": "Generate a new component.",
21
11
  "factory": "./component/index#component",
@@ -25,12 +15,6 @@
25
15
  "description": "Generate a new entity.",
26
16
  "factory": "./entity/index#entity",
27
17
  "schema": "./entity/schema.json"
28
- },
29
- "entity-in-example": {
30
- "description": "Generate a new entity within the example repository (with a mock DB).",
31
- "factory": "./entity-in-example/index#entity",
32
- "schema": "./entity-in-example/schema.json"
33
18
  }
34
-
35
19
  }
36
20
  }
@@ -1,5 +1,8 @@
1
- import { Component, OnInit, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';
1
+ import { Component, OnInit, ChangeDetectionStrategy, input, output, inject, WritableSignal, Signal, signal, computed, Inject, Injector } from '@angular/core';
2
2
  import { <%= classify(name) %>Animations } from './<%= dasherize(name) %>.animations';
3
+ import { User } from 'src/app/core/store/user/user.model';
4
+ import { AuthStore } from 'src/app/core/store/auth/auth.store';
5
+ import { BatchWriteService, BATCH_WRITE_SERVICE } from 'src/app/core/store/batch-write.service';
3
6
 
4
7
  @Component({
5
8
  selector: 'app-<%= dasherize(name) %>',
@@ -7,24 +10,35 @@ import { <%= classify(name) %>Animations } from './<%= dasherize(name) %>.animat
7
10
  styleUrls: ['./<%= dasherize(name) %>.component.scss'],
8
11
  changeDetection: ChangeDetectionStrategy.OnPush,
9
12
  animations: <%= classify(name) %>Animations,
13
+ standalone: true,
14
+ imports: [
15
+ ],
10
16
  })
11
17
  export class <%= classify(name) %>Component implements OnInit {
18
+ readonly authStore = inject(AuthStore);
12
19
  // --------------- INPUTS AND OUTPUTS ------------------
13
20
 
21
+ /** The current signed in user. */
22
+ currentUser: Signal<User> = this.authStore.user;
14
23
 
15
- // --------------- LOCAL AND GLOBAL STATE --------------
24
+ // --------------- LOCAL UI STATE ----------------------
16
25
 
26
+ /** Loading icon. */
27
+ loading: WritableSignal<boolean> = signal(false);
17
28
 
18
- // --------------- DATA BINDING ------------------------
29
+ // --------------- COMPUTED DATA -----------------------
19
30
 
31
+ // --------------- EVENT HANDLING ----------------------
20
32
 
21
- // --------------- EVENT BINDING -----------------------
33
+ // --------------- OTHER -------------------------------
22
34
 
35
+ constructor(
36
+ private injector: Injector,
37
+ @Inject(BATCH_WRITE_SERVICE) private batch: BatchWriteService,
38
+ ) { }
23
39
 
24
- // --------------- HELPER FUNCTIONS AND OTHER ----------
25
-
26
- constructor() { }
27
-
40
+ // --------------- LOAD AND CLEANUP --------------------
41
+
28
42
  ngOnInit(): void {
29
43
  }
30
44
  }
@@ -11,52 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.component = void 0;
13
13
  const schematics_1 = require("@angular-devkit/schematics");
14
- const change_1 = require("@schematics/angular/utility/change");
15
- const find_module_1 = require("@schematics/angular/utility/find-module");
16
14
  const parse_name_1 = require("@schematics/angular/utility/parse-name");
17
15
  const validation_1 = require("@schematics/angular/utility/validation");
18
16
  const workspace_1 = require("@schematics/angular/utility/workspace");
19
17
  const core_1 = require("@angular-devkit/core");
20
- const statements_adder_1 = require("../shared/statements-adder");
21
- function addInserts(options) {
22
- return (host, context) => {
23
- if (!options.module) {
24
- return host;
25
- }
26
- const modulePath = options.module;
27
- const sourceText = (0, statements_adder_1.getSourceText)(host, modulePath);
28
- context.logger.info(`modulePath: ${modulePath}`);
29
- // Get parameters for adding declaration to module (including import)
30
- context.logger.info(`options.path: ${options.path}`);
31
- const componentPath = `/${options.path}/` +
32
- core_1.strings.dasherize(options.name) + '/' +
33
- core_1.strings.dasherize(options.name) + '.component';
34
- context.logger.info(`componentPath: ${componentPath}`);
35
- const relativePath = (0, find_module_1.buildRelativePath)(modulePath, componentPath);
36
- context.logger.info(`relativePath: ${relativePath}`);
37
- const classifiedName = core_1.strings.classify(options.name) + 'Component';
38
- context.logger.info(`classifiedName: ${classifiedName}`);
39
- const isSharedModule = options.module.startsWith('/src/app/shared');
40
- let insertChanges = (0, statements_adder_1.simpleInsert)(sourceText, modulePath, [
41
- '// Components',
42
- '// Components',
43
- // If the module is shared, then add an export too
44
- ...isSharedModule ? ['// Components'] : [],
45
- ], [
46
- `import { ${classifiedName} } from '${relativePath}';`,
47
- ` ${classifiedName},`,
48
- ...isSharedModule ? [` ${classifiedName},`] : [],
49
- ]);
50
- const declarationRecorder = host.beginUpdate(modulePath);
51
- for (const change of insertChanges) {
52
- if (change instanceof change_1.InsertChange) {
53
- declarationRecorder.insertLeft(change.pos, change.toAdd);
54
- }
55
- }
56
- host.commitUpdate(declarationRecorder);
57
- return host;
58
- };
59
- }
60
18
  function component(options) {
61
19
  return (tree, context) => __awaiter(this, void 0, void 0, function* () {
62
20
  // Make sure the command is executed in the directory where the component should be generated
@@ -74,18 +32,17 @@ function component(options) {
74
32
  options.path = (0, workspace_1.buildDefaultPath)(project);
75
33
  }
76
34
  context.logger.info(`options.path: ${options.path}`);
77
- options.module = (0, find_module_1.findModuleFromOptions)(tree, options);
78
- context.logger.info(`options.module: ${options.module}`);
79
35
  const parsedPath = (0, parse_name_1.parseName)(options.path, options.name);
36
+ context.logger.info(`parsedPath: ${parsedPath.name} ${parsedPath.path}`);
80
37
  options.name = parsedPath.name;
81
38
  options.path = parsedPath.path;
39
+ context.logger.info(`options.selector: ${options.selector}`);
82
40
  (0, validation_1.validateHtmlSelector)(options.selector);
83
41
  const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
84
42
  (0, schematics_1.applyTemplates)(Object.assign(Object.assign({}, core_1.strings), options)),
85
43
  (0, schematics_1.move)(parsedPath.path),
86
44
  ]);
87
45
  return (0, schematics_1.chain)([
88
- addInserts(options),
89
46
  (0, schematics_1.mergeWith)(templateSource)
90
47
  ]);
91
48
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAIoC;AACpC,+DAAkE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C,QAAQ,CAAC,CAAC;QAEvC,MAAM,cAAc,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE;YAC3C,IAAA,2BAAc,kCACT,cAAO,GACP,OAAO,EACV;YACF,IAAA,iBAAI,EAAC,UAAU,CAAC,IAAI,CAAC;SACtB,CAAC,CAAC;QAEH,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,sBAAS,EAAC,cAAc,CAAC;SAC1B,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC;AA1CD,8BA0CC"}
@@ -34,11 +34,6 @@
34
34
  },
35
35
  "x-prompt": "What name would you like to use for the component?"
36
36
  },
37
- "module": {
38
- "type": "string",
39
- "description": "The declaring NgModule.",
40
- "alias": "m"
41
- },
42
37
  "inDirectory": {
43
38
  "type": "boolean",
44
39
  "x-prompt": "Are you currently in the directory where you want to generate the component? (please organize your components according to the view hierarchy to the extent possible)"
@@ -0,0 +1,12 @@
1
+ import { Timestamp } from '@angular/fire/firestore';
2
+ import { <%= classify(name) %> } from './<%= dasherize(name) %>.model';
3
+ import { withEntitiesForMockDB } from '../app.store';
4
+ import { signalStore } from '@ngrx/signals';
5
+
6
+ export const <%= classify(name) %>MockDB = signalStore(
7
+ { providedIn: 'root' },
8
+ withEntitiesForMockDB<<%= classify(name) %>>(),
9
+ );
10
+
11
+ export const <%= classify(name).toUpperCase() %>_DB = [
12
+ ];
@@ -4,4 +4,5 @@ export interface <%= classify(name) %> {
4
4
  __id: string;
5
5
  _createdAt?: Timestamp;
6
6
  _updatedAt?: Timestamp;
7
+ _deleted?: boolean;
7
8
  }
@@ -0,0 +1,41 @@
1
+ import { inject, effect, WritableSignal } from '@angular/core';
2
+ import { signalStore, patchState, withState, withMethods } from '@ngrx/signals';
3
+ import { withEntities, removeEntity, updateEntity, setEntity, removeEntities, setEntities } from '@ngrx/signals/entities';
4
+ import { EntityLoadQuery, EntityStreamQuery, selectEntities, processLoadQueries, withEntitiesAndDBMethods } from 'src/app/core/store/app.store';
5
+ import { QueryParams, QueryOptions, AnyEntity } from 'src/app/core/store/app.model';
6
+ import { <%= classify(name) %> } from './<%= dasherize(name) %>.model';
7
+
8
+ export class Load<%= classify(name) %> extends EntityLoadQuery<<%= classify(name) %>> {
9
+ constructor(
10
+ store,
11
+ queryParams: QueryParams,
12
+ queryOptions: QueryOptions,
13
+ loadQueries?: (entity: <%= classify(name) %>) => EntityLoadQuery<AnyEntity>[],
14
+ ) {
15
+ super('<%= camelize(name) %>s', store, queryParams, queryOptions, loadQueries);
16
+ }
17
+
18
+ static create(store, queryParams: QueryParams, queryOptions: QueryOptions, loadQueries?: (entity: <%= classify(name) %>) => EntityLoadQuery<AnyEntity>[]): Load<%= classify(name) %> {
19
+ return new Load<%= classify(name) %>(store, queryParams, queryOptions, loadQueries);
20
+ }
21
+ }
22
+
23
+ export class Stream<%= classify(name) %> extends EntityStreamQuery<<%= classify(name) %>> {
24
+ constructor(
25
+ store,
26
+ queryParams: QueryParams,
27
+ queryOptions: QueryOptions,
28
+ streamQueries?: (entity: <%= classify(name) %>) => EntityStreamQuery<AnyEntity>[],
29
+ ) {
30
+ super('<%= camelize(name) %>s', store, queryParams, queryOptions, streamQueries);
31
+ }
32
+
33
+ static create(store, queryParams: QueryParams, queryOptions: QueryOptions, streamQueries?: (entity: <%= classify(name) %>) => EntityStreamQuery<AnyEntity>[]): Stream<%= classify(name) %> {
34
+ return new Stream<%= classify(name) %>(store, queryParams, queryOptions, streamQueries);
35
+ }
36
+ }
37
+
38
+ export const <%= classify(name) %>Store = signalStore(
39
+ { providedIn: 'root' },
40
+ withEntitiesAndDBMethods<<%= classify(name) %>>('<%= camelize(name) %>s'),
41
+ );
@@ -21,64 +21,44 @@ function addInserts(options) {
21
21
  return (host, context) => {
22
22
  const classifiedName = core_1.strings.classify(options.name);
23
23
  const camelizedName = core_1.strings.camelize(options.name);
24
+ const dasherizedName = core_1.strings.dasherize(options.name);
25
+ const allcapsName = core_1.strings.classify(options.name).toUpperCase();
24
26
  context.logger.info(`names: ${classifiedName}, ${camelizedName}`);
25
- // Add core module changes
26
- const coreModulePath = options.module;
27
- const coreModuleText = (0, statements_adder_1.getSourceText)(host, coreModulePath);
28
- context.logger.info(`modulePath: ${coreModulePath}`);
29
- const entityEffectsPath = `/${options.path}/` +
27
+ // app.model.ts changes
28
+ const appModelPath = '//src/app/core/store/app.model.ts';
29
+ const appModelText = (0, statements_adder_1.getSourceText)(host, appModelPath);
30
+ context.logger.info(`appModelPath: ${appModelPath}`);
31
+ const entityModelPath = `/${options.path}/` +
30
32
  core_1.strings.dasherize(options.name) + '/' +
31
- core_1.strings.dasherize(options.name) + '.effects';
32
- context.logger.info(`entityEffectsPath: ${entityEffectsPath}`);
33
- const coreToEffectsPath = (0, find_module_1.buildRelativePath)(coreModulePath, entityEffectsPath);
34
- context.logger.info(`coreToEffectsPath: ${coreToEffectsPath}`);
35
- let insertChangesInCore = (0, statements_adder_1.simpleInsert)(coreModuleText, coreModulePath, [
36
- '// Entity Effects',
37
- '// Entity Effects'
33
+ core_1.strings.dasherize(options.name) + '.model';
34
+ context.logger.info(`entityModelPath: ${entityModelPath}`);
35
+ const appToEntityModelPath = (0, find_module_1.buildRelativePath)(appModelPath, entityModelPath);
36
+ context.logger.info(`appToEntityPath: ${appToEntityModelPath}`);
37
+ let insertChangesInAppModel = (0, statements_adder_1.simpleInsert)(appModelText, appModelPath, [
38
+ '// Entity Models',
39
+ 'export type AnyEntity =',
38
40
  ], [
39
- `import { ${classifiedName}Effects } from '${coreToEffectsPath}';`,
40
- ` ${classifiedName}Effects,`
41
+ `import { ${classifiedName} } from '${appToEntityModelPath}';`,
42
+ ` ${classifiedName} |`
41
43
  ]);
42
- // Add app reducer changes
43
- const appReducerPath = '//src/app/core/store/app.reducer.ts';
44
- const appReducerText = (0, statements_adder_1.getSourceText)(host, appReducerPath);
45
- context.logger.info(`appReducerPath: ${appReducerPath}`);
46
- const entityReducerPath = `/${options.path}/` +
47
- core_1.strings.dasherize(options.name) + '/' +
48
- core_1.strings.dasherize(options.name) + '.reducer';
49
- context.logger.info(`entityReducerPath: ${entityReducerPath}`);
50
- const appToEntityReducerPath = (0, find_module_1.buildRelativePath)(appReducerPath, entityReducerPath);
51
- let insertChangesInAppReducer = (0, statements_adder_1.simpleInsert)(appReducerText, appReducerPath, [
52
- '// Entity Reducers',
53
- '// Entity State',
54
- '// Entity Reducers'
55
- ], [
56
- `import * as from${classifiedName} from '${appToEntityReducerPath}';`,
57
- ` ${camelizedName}: from${classifiedName}.State;`,
58
- ` ${camelizedName}: from${classifiedName}.reducer,`
59
- ]);
60
- // Add app selector changes
61
- const appSelectorPath = '//src/app/core/store/app.selectors.ts';
62
- const appSelectorText = (0, statements_adder_1.getSourceText)(host, appSelectorPath);
63
- const entityServicePath = `/${options.path}/` +
64
- core_1.strings.dasherize(options.name) + '/' +
65
- core_1.strings.dasherize(options.name) + '.service';
66
- const appToEntityServicePath = (0, find_module_1.buildRelativePath)(appSelectorPath, entityServicePath);
67
- let insertChangesInAppSelector = (0, statements_adder_1.simpleInsert)(appSelectorText, appSelectorPath, [
68
- '// Entity Selectors',
69
- '// Entity Selectors',
70
- '// Entity Selectors'
44
+ // firebase.mock.service.ts changes
45
+ const fbMockPath = '//src/app/core/firebase/firebase.mock.service.ts';
46
+ const fbMockText = (0, statements_adder_1.getSourceText)(host, fbMockPath);
47
+ context.logger.info(`fbMockPath: ${fbMockPath}`);
48
+ let insertChangesInFbMock = (0, statements_adder_1.simpleInsert)(fbMockText, fbMockPath, [
49
+ '// Entity Model DB Data',
50
+ 'readonly DB = {',
51
+ '// Init Entity Models',
71
52
  ], [
72
- `import { ${classifiedName}Service } from '${appToEntityServicePath}';`,
73
- ` private ${camelizedName}: ${classifiedName}Service,`,
74
- ` public get${classifiedName} = this.${camelizedName}.get${classifiedName};\n public get${classifiedName}s = this.${camelizedName}.get${classifiedName}s;\n public select${classifiedName} = this.${camelizedName}.select${classifiedName};\n public select${classifiedName}s = this.${camelizedName}.select${classifiedName}s;`
53
+ `import { ${classifiedName}MockDB, ${allcapsName}_DB } from '../store/${dasherizedName}/${dasherizedName}.mock';`,
54
+ ` '${camelizedName}s': inject(${classifiedName}MockDB),`,
55
+ ` patchState(this.DB['${camelizedName}s'], setAllEntities(${allcapsName}_DB, { selectId }));`
75
56
  ]);
76
57
  context.logger.info(`about to start committing`);
77
58
  // For each of the files and corresponding set of changes, commit to the tree
78
59
  [
79
- [coreModulePath, insertChangesInCore],
80
- [appReducerPath, insertChangesInAppReducer],
81
- [appSelectorPath, insertChangesInAppSelector]
60
+ [appModelPath, insertChangesInAppModel],
61
+ [fbMockPath, insertChangesInFbMock],
82
62
  ].map(([filePath, insertChanges]) => {
83
63
  const declarationRecorder = host.beginUpdate(filePath);
84
64
  for (const change of insertChanges) {
@@ -106,7 +86,6 @@ function entity(options) {
106
86
  if (options.path === undefined) {
107
87
  options.path = (0, workspace_1.buildDefaultPath)(project);
108
88
  }
109
- options.module = (0, find_module_1.findModuleFromOptions)(tree, options);
110
89
  const parsedPath = (0, parse_name_1.parseName)(options.path, options.name);
111
90
  options.name = parsedPath.name;
112
91
  options.path = parsedPath.path;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAIoC;AAEpC,+DAA0E;AAC1E,yEAAmG;AACnG,uEAAmE;AACnE,qEAAuF;AACvF,+CAA+C;AAE/C,iEAAyE;AAEzE,SAAS,UAAU,CAAC,OAAY;IAC9B,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,cAAc,GAAG,cAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,aAAa,GAAG,cAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,cAAc,KAAK,aAAa,EAAE,CAAC,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EAAE;YACZ,MAAM,IAAI,gCAAmB,CAAC,YAAY,OAAO,CAAC,OAAO,mBAAmB,CAAC,CAAC;SAC/E;QAED,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE;YAC9B,OAAO,CAAC,IAAI,GAAG,IAAA,4BAAgB,EAAC,OAAO,CAAC,CAAC;SAC1C;QAED,MAAM,UAAU,GAAG,IAAA,sBAAS,EAAC,OAAO,CAAC,IAAc,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACnE,OAAO,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC/B,OAAO,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAE/B,MAAM,cAAc,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE;YAC3C,IAAA,2BAAc,kCACT,cAAO,GACP,OAAO,EACV;YACF,IAAA,iBAAI,EAAC,UAAU,CAAC,IAAI,CAAC;SACtB,CAAC,CAAC;QAEH,OAAO,IAAA,kBAAK,EAAC;YACX,UAAU,CAAC,OAAO,CAAC;YACnB,IAAA,sBAAS,EAAC,cAAc,CAAC;SAC1B,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC;AArCD,wBAqCC"}
@@ -0,0 +1,8 @@
1
+ {
2
+ "projects": {
3
+ "default": "<%= dasherize(project) %>",
4
+ "dev": "<%= dasherize(project) %>-dev"
5
+ },
6
+ "targets": {},
7
+ "etags": {}
8
+ }
@@ -9,16 +9,16 @@ Run `ng serve --configuration production` to run a prod server locally. Navigate
9
9
 
10
10
  ## Code scaffolding
11
11
 
12
- Run `ng generate component component-name` to generate a new component. You can also use `ng generate container|module|entity`.
12
+ Run `ng generate component component-name` to generate a new component. You can also use `ng generate container|entity`.
13
13
 
14
14
  ## Build
15
15
 
16
16
  Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
17
+ Run `firebase deploy` to deploy to production and `firebase deploy -P dev` to deploy to dev
17
18
 
18
19
  ## Version number
19
20
 
20
- We use the syntax `ANGULAR_MAJOR.MAJOR.MINOR-PATCH` for versioning, where
21
- * `ANGULAR_MAJOR` corresponds to angular's major version,
22
- * `MAJOR` contains significant new features, with some developer assistance needed, e.g. to write scripts that update the database for existing users.
23
- * `MINOR` contains new smaller features. Minor releases are fully backward-compatible in that we can immediately deploy to production without needing to make any updates to the database for existing users,
24
- * `PATCH` contains low risk bug fixes that do not require any updates to the database.
21
+ We use the syntax `MAJOR.MINOR.PATCH` for versioning, where
22
+ * `MAJOR` contains significant new features or overhauls of the user experience requiring user adaptation, removal of features, or data migration that could result in data loss
23
+ * `MINOR` contains performance improvements, non-disruptive ui enhancements, and new smaller features that enhance the application but don't interfere with existing features
24
+ * `PATCH` contains bug fixes, minor usability and performance fixes that don't add new capabilities
@@ -31,16 +31,23 @@
31
31
  "index": "src/index.html",
32
32
  "browser": "src/main.ts",
33
33
  "polyfills": [
34
- "zone.js"
34
+ "zone.js",
35
+ "core-js/stable",
36
+ "globalthis",
37
+ "cross-fetch",
38
+ "proxy-polyfill"
35
39
  ],
36
40
  "tsConfig": "tsconfig.app.json",
37
41
  "inlineStyleLanguage": "scss",
38
42
  "assets": [
39
- "src/favicon.ico",
43
+ {
44
+ "glob": "**/*",
45
+ "input": "public"
46
+ },
40
47
  "src/assets"
41
48
  ],
42
49
  "styles": [
43
- "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
50
+ "@angular/material/prebuilt-themes/azure-blue.css",
44
51
  "src/styles.scss"
45
52
  ],
46
53
  "scripts": [],
@@ -55,8 +62,8 @@
55
62
  "budgets": [
56
63
  {
57
64
  "type": "initial",
58
- "maximumWarning": "2mb",
59
- "maximumError": "5mb"
65
+ "maximumWarning": "1mb",
66
+ "maximumError": "2mb"
60
67
  },
61
68
  {
62
69
  "type": "anyComponentStyle",
@@ -93,10 +100,7 @@
93
100
  "defaultConfiguration": "development"
94
101
  },
95
102
  "extract-i18n": {
96
- "builder": "@angular-devkit/build-angular:extract-i18n",
97
- "options": {
98
- "buildTarget": "<%= dasherize(project) %>:build"
99
- }
103
+ "builder": "@angular-devkit/build-angular:extract-i18n"
100
104
  },
101
105
  "test": {
102
106
  "builder": "@angular-devkit/build-angular:karma",
@@ -108,11 +112,14 @@
108
112
  "tsConfig": "tsconfig.spec.json",
109
113
  "inlineStyleLanguage": "scss",
110
114
  "assets": [
111
- "src/favicon.ico",
115
+ {
116
+ "glob": "**/*",
117
+ "input": "public"
118
+ },
112
119
  "src/assets"
113
120
  ],
114
121
  "styles": [
115
- "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
122
+ "@angular/material/prebuilt-themes/azure-blue.css",
116
123
  "src/styles.scss"
117
124
  ],
118
125
  "scripts": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "<%= dasherize(project) %>",
3
- "version": "17.0.0-0",
3
+ "version": "0.0.0",
4
4
  "scripts": {
5
5
  "ng": "ng",
6
6
  "start": "ng serve",
@@ -12,43 +12,42 @@
12
12
  },
13
13
  "private": true,
14
14
  "dependencies": {
15
- "@angular/animations": "^17.3.0",
16
- "@angular/cdk": "^17.3.0",
17
- "@angular/common": "^17.3.0",
18
- "@angular/compiler": "^17.3.0",
19
- "@angular/core": "^17.3.0",
20
- "@angular/fire": "^17.0.0",
21
- "@angular/forms": "^17.3.0",
22
- "@angular/material": "^17.2.1",
23
- "@angular/platform-browser": "^17.3.0",
24
- "@angular/platform-browser-dynamic": "^17.3.0",
25
- "@angular/router": "^17.3.0",
26
- "@ngrx/effects": "^17.1.1",
27
- "@ngrx/entity": "^17.1.1",
28
- "@ngrx/router-store": "^17.1.1",
29
- "@ngrx/store": "^17.1.1",
30
- "@ngrx/store-devtools": "^17.1.1",
31
- "crypto-es": "^1.2.7",
15
+ "@angular/animations": "^18.0.0",
16
+ "@angular/cdk": "^18.0.6",
17
+ "@angular/common": "^18.0.0",
18
+ "@angular/compiler": "^18.0.0",
19
+ "@angular/core": "^18.0.0",
20
+ "@angular/fire": "^18.0.1",
21
+ "@angular/forms": "^18.0.0",
22
+ "@angular/material": "^18.0.6",
23
+ "@angular/platform-browser": "^18.0.0",
24
+ "@angular/platform-browser-dynamic": "^18.0.0",
25
+ "@angular/router": "^18.0.0",
26
+ "@ngrx/signals": "^18.0.0-rc.2",
27
+ "core-js": "^3.37.1",
28
+ "cross-fetch": "^4.0.0",
29
+ "crypto-es": "^2.1.0",
30
+ "globalthis": "^1.0.4",
31
+ "proxy-polyfill": "^0.3.2",
32
32
  "rxjs": "~7.8.0",
33
33
  "tslib": "^2.3.0",
34
34
  "zone.js": "~0.14.3"
35
35
  },
36
36
  "devDependencies": {
37
- "@angular-devkit/build-angular": "^17.3.2",
38
- "@angular-eslint/builder": "^17.2.1",
39
- "@angular-eslint/eslint-plugin": "^17.2.1",
40
- "@angular-eslint/eslint-plugin-template": "^17.2.1",
41
- "@angular-eslint/schematics": "^17.2.1",
42
- "@angular-eslint/template-parser": "^17.2.1",
43
- "@angular/cli": "^17.3.2",
44
- "@angular/compiler-cli": "^17.3.0",
45
- "@tech4good/angular-schematics": "^17.0.1",
37
+ "@angular-devkit/build-angular": "^18.0.7",
38
+ "@angular-eslint/builder": "^18.1.0",
39
+ "@angular-eslint/eslint-plugin": "^18.1.0",
40
+ "@angular-eslint/eslint-plugin-template": "^18.1.0",
41
+ "@angular-eslint/schematics": "^18.1.0",
42
+ "@angular-eslint/template-parser": "^18.1.0",
43
+ "@angular/cli": "^18.0.7",
44
+ "@angular/compiler-cli": "^18.0.0",
45
+ "@tech4good/angular-schematics": "^18.0.0",
46
+ "@types/estree": "^1.0.0",
46
47
  "@types/jasmine": "~5.1.0",
47
48
  "@types/node": "^18.18.0",
48
- "@types/estree": "^1.0.0",
49
49
  "@typescript-eslint/eslint-plugin": "6.10.0",
50
50
  "@typescript-eslint/parser": "6.10.0",
51
- "eslint": "^8.53.0",
52
51
  "eslint-config-google": "^0.14.0",
53
52
  "jasmine-core": "~5.1.0",
54
53
  "karma": "~6.4.0",
@@ -1,4 +1,4 @@
1
1
  import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
2
 
3
- export const WaitlistAnimations = [
3
+ export const AdminPanelAnimations = [
4
4
  ];
@@ -1,5 +1,5 @@
1
- <div class="waitlist-container">
2
- <table id="waitlist-table" mat-table [dataSource]="waitingUsers$" class="mat-elevation-z8">
1
+ <div class="admin-panel-container">
2
+ <table id="waitlist-table" mat-table [dataSource]="waitingUsers()" class="mat-elevation-z8">
3
3
 
4
4
  <!-- Author Column -->
5
5
  <ng-container matColumnDef="userName">
@@ -13,7 +13,7 @@
13
13
  <td mat-cell *matCellDef="let user">
14
14
  <span class="update-btn" [matMenuTriggerFor]="accessStateMenu" aria-label="accessState">{{ user.accessState }}</span>
15
15
  <mat-menu #accessStateMenu="matMenu">
16
- <button mat-menu-item (click)="updateState$.next({ user, key: 'accessState', value: option })" *ngFor="let option of accessOptions">{{ option }}</button>
16
+ <button mat-menu-item (click)="updateState(user, 'accessState', option)" *ngFor="let option of accessOptions">{{ option }}</button>
17
17
  </mat-menu>
18
18
  </td>
19
19
  </ng-container>