@tech4good/angular-schematics 20.3.1 → 21.1.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 (146) hide show
  1. package/.agents/skills/publish-npm/SKILL.md +1 -1
  2. package/.agents/skills/publish-npm/eval.yaml +15 -0
  3. package/.agents/skills/publish-npm/fixtures/package-v21.json.template +8 -0
  4. package/.t4g/agent-memory.db +0 -0
  5. package/CHANGELOG.md +71 -0
  6. package/contributing-docs/commit-message.md +3 -6
  7. package/package.json +5 -5
  8. package/src/collection.json +8 -0
  9. package/src/component/files/__name@dasherize__/__name@dasherize__.component.ts.template +1 -3
  10. package/src/component/index_spec.js +57 -4
  11. package/src/component/index_spec.js.map +1 -1
  12. package/src/entity/files/__name@dasherize__/__name@dasherize__.mock.ts.template +15 -1
  13. package/src/entity/index.js +7 -1
  14. package/src/entity/index.js.map +1 -1
  15. package/src/entity/index_spec.js +108 -4
  16. package/src/entity/index_spec.js.map +1 -1
  17. package/src/guard/files/__name@dasherize__.guard.spec.ts.template +45 -0
  18. package/src/guard/files/__name@dasherize__.guard.ts.template +32 -0
  19. package/src/guard/index.d.ts +2 -0
  20. package/src/guard/index.js +38 -0
  21. package/src/guard/index.js.map +1 -0
  22. package/src/guard/index_spec.d.ts +1 -0
  23. package/src/guard/index_spec.js +64 -0
  24. package/src/guard/index_spec.js.map +1 -0
  25. package/src/guard/schema.json +46 -0
  26. package/src/ng-add/files/.firebaserc.template +3 -2
  27. package/src/ng-add/files/.github/workflows/angular-github-ci.yml.template +105 -39
  28. package/src/ng-add/files/.gitignore.template +1 -2
  29. package/src/ng-add/files/angular.json.template +1 -5
  30. package/src/ng-add/files/docs-infra/infrastructure-guide.md.template +390 -0
  31. package/src/ng-add/files/docs-infra/load-system-architecture.md.template +166 -0
  32. package/src/ng-add/files/docs-infra/querying-strategy.md.template +157 -0
  33. package/src/ng-add/files/docs-infra/stream-system-architecture.md.template +283 -0
  34. package/src/ng-add/files/eslint.config.js.template +4 -1
  35. package/src/ng-add/files/firebase.json.template +37 -0
  36. package/src/ng-add/files/firestore.rules.spec.ts.template +221 -0
  37. package/src/ng-add/files/firestore.rules.template +67 -0
  38. package/src/ng-add/files/jest.config.ts.template +6 -1
  39. package/src/ng-add/files/package.json.template +41 -31
  40. package/src/ng-add/files/setup-jest.ts.template +13 -5
  41. package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.spec.ts.template +76 -12
  42. package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.ts.template +1 -3
  43. package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.spec.ts.template +90 -0
  44. package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.ts.template +1 -1
  45. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.component.spec.ts.template +12 -17
  46. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.component.ts.template +2 -4
  47. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.spec.ts.template +40 -19
  48. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.ts.template +3 -5
  49. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.html.template +2 -2
  50. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.spec.ts.template +108 -0
  51. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.ts.template +11 -11
  52. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.html.template +6 -2
  53. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.spec.ts.template +136 -19
  54. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.ts.template +8 -5
  55. package/src/ng-add/files/src/app/app.component.html.template +1 -1
  56. package/src/ng-add/files/src/app/app.component.scss.template +10 -0
  57. package/src/ng-add/files/src/app/app.component.ts.template +1 -1
  58. package/src/ng-add/files/src/app/app.config.ts.template +11 -11
  59. package/src/ng-add/files/src/app/auth-routing.spec.ts.template +101 -0
  60. package/src/ng-add/files/src/app/core/analytics/log.service.ts.template +5 -8
  61. package/src/ng-add/files/src/app/core/analytics/time-analytics.service.spec.ts.template +140 -0
  62. package/src/ng-add/files/src/app/core/analytics/time-analytics.service.ts.template +25 -7
  63. package/src/ng-add/files/src/app/core/auth/guards/redirect-if-authenticated.guard.ts.template +1 -1
  64. package/src/ng-add/files/src/app/core/auth/guards/require-admin.guard.ts.template +1 -1
  65. package/src/ng-add/files/src/app/core/auth/guards/require-auth-and-consent.guard.ts.template +1 -1
  66. package/src/ng-add/files/src/app/core/auth/guards/require-auth.guard.ts.template +1 -1
  67. package/src/ng-add/files/src/app/core/firebase/cached-listeners.service.ts.template +229 -14
  68. package/src/ng-add/files/src/app/core/firebase/database.service.ts.template +1 -1
  69. package/src/ng-add/files/src/app/core/firebase/firebase.mock.service.ts.template +34 -9
  70. package/src/ng-add/files/src/app/core/firebase/firebase.service.ts.template +4 -4
  71. package/src/ng-add/files/src/app/core/firebase/query-logger.ts.template +11 -0
  72. package/src/ng-add/files/src/app/core/firebase/simulate-load.spec.ts.template +104 -0
  73. package/src/ng-add/files/src/app/core/firebase/simulate-stream.spec.ts.template +127 -0
  74. package/src/ng-add/files/src/app/core/firebase/simulation.mock.ts.template +38 -0
  75. package/src/ng-add/files/src/app/core/firebase/stream-multiplexer.ts.template +443 -0
  76. package/src/ng-add/files/src/app/core/store/app.store.spec.ts.template +920 -0
  77. package/src/ng-add/files/src/app/core/store/app.store.ts.template +303 -137
  78. package/src/ng-add/files/src/app/core/store/auth/auth.mock.ts.template +65 -23
  79. package/src/ng-add/files/src/app/core/store/auth/auth.store.ts.template +68 -67
  80. package/src/ng-add/files/src/app/core/store/user/user.mock.ts.template +46 -0
  81. package/src/ng-add/files/src/app/core/store/user-context/user-context.mock.ts.template +17 -0
  82. package/src/ng-add/files/src/app/core/testing/test-utils.ts.template +26 -0
  83. package/src/ng-add/files/src/app/first-time/consent/consent.component.html.template +3 -3
  84. package/src/ng-add/files/src/app/first-time/consent/consent.component.spec.ts.template +89 -13
  85. package/src/ng-add/files/src/app/first-time/consent/consent.component.ts.template +46 -17
  86. package/src/ng-add/files/src/app/first-time/consent/consent.guard.ts.template +1 -1
  87. package/src/ng-add/files/src/app/first-time/early-access/early-access.component.html.template +5 -63
  88. package/src/ng-add/files/src/app/first-time/early-access/early-access.component.scss.template +1 -94
  89. package/src/ng-add/files/src/app/first-time/early-access/early-access.component.spec.ts.template +150 -14
  90. package/src/ng-add/files/src/app/first-time/early-access/early-access.component.ts.template +15 -42
  91. package/src/ng-add/files/src/app/first-time/early-access/early-access.guard.ts.template +2 -2
  92. package/src/ng-add/files/src/app/first-time/early-access/early-access.model.ts.template +5 -0
  93. package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.html.template +42 -0
  94. package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.scss.template +96 -0
  95. package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.spec.ts.template +37 -0
  96. package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.ts.template +63 -0
  97. package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.html.template +16 -0
  98. package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.scss.template +7 -0
  99. package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.spec.ts.template +41 -0
  100. package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.ts.template +26 -0
  101. package/src/ng-add/files/src/app/first-time/first-time-routing.spec.ts.template +123 -0
  102. package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.html.template +11 -4
  103. package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.scss.template +17 -4
  104. package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.ts.template +5 -5
  105. package/src/ng-add/files/src/app/first-time/landing/landing.component.html.template +1 -1
  106. package/src/ng-add/files/src/app/first-time/landing/landing.component.scss.template +0 -1
  107. package/src/ng-add/files/src/app/first-time/landing/landing.component.spec.ts.template +25 -17
  108. package/src/ng-add/files/src/app/first-time/landing/landing.component.ts.template +4 -12
  109. package/src/ng-add/files/src/app/first-time/landing/rotating-quotes/rotating-quotes.component.ts.template +1 -1
  110. package/src/ng-add/files/src/app/first-time/login/login.component.spec.ts.template +36 -16
  111. package/src/ng-add/files/src/app/first-time/login/login.component.ts.template +1 -1
  112. package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.spec.ts.template +11 -15
  113. package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.ts.template +1 -3
  114. package/src/ng-add/files/src/app/main/home/home.component.ts.template +1 -3
  115. package/src/ng-add/files/src/app/shared/dev-status-bar/dev-status-bar.component.spec.ts.template +98 -0
  116. package/src/ng-add/files/src/app/shared/dev-status-bar/dev-status-bar.component.ts.template +9 -3
  117. package/src/ng-add/files/src/app/shared/hint-visibility/hint-visibility.directive.spec.ts.template +164 -0
  118. package/src/ng-add/files/src/app/shared/hint-visibility/hint-visibility.directive.ts.template +20 -18
  119. package/src/ng-add/files/src/app/shared/navbar/navbar.component.spec.ts.template +38 -17
  120. package/src/ng-add/files/src/app/shared/navbar/navbar.component.ts.template +1 -1
  121. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.html.template +1 -1
  122. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.spec.ts.template +49 -10
  123. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.ts.template +5 -5
  124. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.spec.ts.template +86 -0
  125. package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.ts.template +11 -9
  126. package/src/ng-add/files/src/environments/environment.prod.ts.template +1 -0
  127. package/src/ng-add/files/src/environments/environment.test.ts.template +1 -0
  128. package/src/ng-add/files/src/environments/environment.ts.template +2 -8
  129. package/src/ng-add/files/src/styles.scss.template +29 -1
  130. package/src/ng-add/files/tsconfig.app.json.template +6 -6
  131. package/src/ng-add/files/tsconfig.json.template +13 -8
  132. package/src/ng-add/files/tsconfig.spec.json.template +6 -5
  133. package/src/ng-add/index.js +19 -1
  134. package/src/ng-add/index.js.map +1 -1
  135. package/tech4good-angular-schematics-21.0.0.tgz +0 -0
  136. package/src/component/files/__name@dasherize__/__name@dasherize__.animations.ts.template +0 -4
  137. package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.animations.ts.template +0 -4
  138. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.animations.ts.template +0 -4
  139. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.animations.ts.template +0 -4
  140. package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.animations.ts.template +0 -4
  141. package/src/ng-add/files/src/app/first-time/consent/consent.animations.ts.template +0 -4
  142. package/src/ng-add/files/src/app/first-time/early-access/early-access.animations.ts.template +0 -10
  143. package/src/ng-add/files/src/app/first-time/landing/hero/hero.animations.ts.template +0 -15
  144. package/src/ng-add/files/src/app/first-time/landing/landing.animations.ts.template +0 -4
  145. package/src/ng-add/files/src/app/first-time/onboarding/onboarding.animations.ts.template +0 -4
  146. package/src/ng-add/files/src/app/main/home/home.animations.ts.template +0 -4
@@ -1,17 +1,17 @@
1
- import { Component, OnInit } from '@angular/core';
1
+ import { Component, OnInit, WritableSignal, signal } from '@angular/core';
2
2
  import { DetectRedeploymentService } from './redeployment-warning.service';
3
3
 
4
4
  @Component({
5
5
  selector: 'app-redeployment-warning',
6
6
  templateUrl: './redeployment-warning.component.html',
7
- styleUrls: ['./redeployment-warning.component.scss'],
7
+ styleUrl: './redeployment-warning.component.scss',
8
8
  })
9
9
  export class RedeploymentWarningComponent implements OnInit {
10
10
  // --------------- INPUTS AND OUTPUTS ------------------
11
11
 
12
12
  // --------------- LOCAL UI STATE ----------------------
13
13
 
14
- showRedeploymentWarning: boolean = false;
14
+ showRedeploymentWarning: WritableSignal<boolean> = signal(false);
15
15
 
16
16
  // --------------- COMPUTED DATA -----------------------
17
17
 
@@ -24,7 +24,7 @@ export class RedeploymentWarningComponent implements OnInit {
24
24
 
25
25
  /** Ignores the warning. */
26
26
  close() {
27
- this.showRedeploymentWarning = false;
27
+ this.showRedeploymentWarning.set(false);
28
28
  }
29
29
 
30
30
  // --------------- OTHER -------------------------------
@@ -33,7 +33,7 @@ export class RedeploymentWarningComponent implements OnInit {
33
33
 
34
34
  ngOnInit() {
35
35
  this.detectRedeployment.redeployed().subscribe(() => {
36
- this.showRedeploymentWarning = true;
36
+ this.showRedeploymentWarning.set(true);
37
37
  });
38
38
  }
39
39
  }
@@ -0,0 +1,86 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+ import { config } from 'rxjs';
3
+ import { DetectRedeploymentService } from './redeployment-warning.service';
4
+
5
+ describe('DetectRedeploymentService', () => {
6
+ let service: DetectRedeploymentService;
7
+ let originalFetch: any;
8
+ let fetchSpy: jest.Mock;
9
+
10
+ beforeEach(() => {
11
+ jest.useFakeTimers();
12
+ TestBed.configureTestingModule({
13
+ providers: [DetectRedeploymentService],
14
+ });
15
+ service = TestBed.inject(DetectRedeploymentService);
16
+
17
+ // Mock fetch
18
+ originalFetch = window.fetch;
19
+ fetchSpy = jest.fn().mockReturnValue(
20
+ Promise.resolve({
21
+ text: () => Promise.resolve('<script src="main-12345.js"></script>'),
22
+ }),
23
+ );
24
+ window.fetch = fetchSpy as any;
25
+ });
26
+
27
+ afterEach(() => {
28
+ window.fetch = originalFetch;
29
+ jest.useRealTimers();
30
+ });
31
+
32
+ it('should multicast the interval to multiple subscribers with share()', async () => {
33
+ service.init();
34
+
35
+ // The first fetch is triggered immediately due to startWith(0)
36
+ jest.advanceTimersByTime(1);
37
+ // await microtasks to resolve promises
38
+ await Promise.resolve();
39
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
40
+ fetchSpy.mockClear();
41
+
42
+ // Two different components subscribe to redeployed()
43
+ const sub1 = service.redeployed().subscribe();
44
+ const sub2 = service.redeployed().subscribe();
45
+
46
+ // Advance time by 2 minutes to trigger the next interval
47
+ jest.advanceTimersByTime(2 * 60 * 1000);
48
+ await Promise.resolve();
49
+
50
+ // Because of `share()`, the interval is multicasted, meaning the underlying
51
+ // `fetch` should only be called ONCE per interval, not twice.
52
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
53
+
54
+ sub1.unsubscribe();
55
+ sub2.unsubscribe();
56
+ });
57
+
58
+ it('should gracefully handle network errors without killing the polling interval', async () => {
59
+ // Force a network error for the first fetch
60
+ fetchSpy.mockRejectedValueOnce(new Error('Network error'));
61
+
62
+ // Start the interval
63
+ service.init();
64
+
65
+ // First tick encounters the network error, which is caught and returns null, keeping the interval alive
66
+ jest.advanceTimersByTime(1);
67
+ await Promise.resolve();
68
+
69
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
70
+ fetchSpy.mockClear();
71
+
72
+ // Now restore fetch to working order for the next interval
73
+ fetchSpy.mockReturnValue(
74
+ Promise.resolve({
75
+ text: () => Promise.resolve('<script src="main-12345.js"></script>'),
76
+ }),
77
+ );
78
+
79
+ // The interval is still alive! Advance time to the next 2-minute mark
80
+ jest.advanceTimersByTime(2 * 60 * 1000);
81
+ await Promise.resolve();
82
+
83
+ // Fetch should be called again, proving the interval survived
84
+ expect(fetchSpy).toHaveBeenCalledTimes(1);
85
+ });
86
+ });
@@ -1,6 +1,6 @@
1
1
  import { Injectable } from '@angular/core';
2
- import { BehaviorSubject, Observable, interval, Subject, ConnectableObservable } from 'rxjs';
3
- import { startWith, multicast, distinctUntilChanged, map, filter, mergeMap, skip } from 'rxjs/operators';
2
+ import { BehaviorSubject, Observable, interval, Subject, from } from 'rxjs';
3
+ import { startWith, share, distinctUntilChanged, tap, skip, map, filter, mergeMap } from 'rxjs/operators';
4
4
 
5
5
  @Injectable({
6
6
  providedIn: 'root',
@@ -17,13 +17,13 @@ export class DetectRedeploymentService {
17
17
  // Matches the filename of the main javascript file, which contains the hash in the name
18
18
  const regexp = /main[-a-zA-Z0-9]*\.js/;
19
19
 
20
- const observable: ConnectableObservable<void> = interval(2 * 60 * 1000) // every 2 minutes
20
+ const observable: Observable<void> = interval(2 * 60 * 1000) // every 2 minutes
21
21
  .pipe(
22
22
  startWith(0),
23
23
  // Fetch index.html with a timestamp query parameter so it definitely doesn't get cached anywhere.
24
- mergeMap(() => fetch('/index.html?t=' + Date.now())),
25
- mergeMap((urlResponse) => urlResponse.text()),
26
- map((responseText) => {
24
+ mergeMap(() => fetch('/index.html?t=' + Date.now()).catch(() => null)),
25
+ mergeMap((urlResponse: Response | null) => urlResponse ? urlResponse.text() : Promise.resolve('')),
26
+ map((responseText: string) => {
27
27
  const m = responseText.match(regexp);
28
28
  if (m === null) {
29
29
  // Probably running a dev build or something where there's no hash.
@@ -38,11 +38,13 @@ export class DetectRedeploymentService {
38
38
  distinctUntilChanged(),
39
39
  // Skip the first starting version so we only get changes
40
40
  skip(1),
41
+ // Map to void to match the return type
42
+ map(() => undefined as void),
41
43
  // Modeled after example 1 in: https://www.learnrxjs.io/operators/multicasting/multicast.html
42
- multicast(() => new Subject()),
43
- ) as ConnectableObservable<void>;
44
+ share(),
45
+ );
44
46
 
45
- observable.connect();
47
+ observable.subscribe();
46
48
 
47
49
  this.redeployed$ = observable;
48
50
  this.initialized$.next(true);
@@ -1,5 +1,6 @@
1
1
  export const environment = {
2
2
  production: true,
3
+ cacheMockData: false,
3
4
  firebase: {
4
5
  apiKey: import.meta.env.NG_APP_FIREBASE_API_KEY,
5
6
  // REPLACE WITH REMAINING CONFIG
@@ -3,6 +3,7 @@
3
3
  export const environment = {
4
4
  production: false,
5
5
  mockDB: true,
6
+ cacheMockData: false,
6
7
  firebase: {
7
8
  apiKey: 'mock-api-key',
8
9
  },
@@ -5,17 +5,11 @@
5
5
  export const environment = {
6
6
  production: false,
7
7
  mockDB: true,
8
+ cacheMockData: true,
8
9
  firebase: {
9
10
  apiKey: import.meta.env.NG_APP_FIREBASE_DEV_API_KEY,
10
11
  // REPLACE WITH CONFIG
11
12
  },
12
13
  };
13
14
 
14
- /*
15
- * For easier debugging in development mode, you can import the following file
16
- * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
17
- *
18
- * This import should be commented out in production mode because it will have a negative impact
19
- * on performance if an error is thrown.
20
- */
21
- import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
15
+
@@ -1,5 +1,4 @@
1
1
  /* You can add global styles to this file, and also import other style files */
2
-
3
2
  @use 'styles/variables' as *;
4
3
 
5
4
  html, body, app-root {
@@ -17,3 +16,32 @@ html, body, app-root {
17
16
  body {
18
17
  background-color: $bg-primary;
19
18
  }
19
+ /* --- Global Animations --- */
20
+ .animate-fade-in {
21
+ animation: fadeIn 400ms ease-in forwards;
22
+ }
23
+
24
+ @keyframes fadeIn {
25
+ from { opacity: 0; }
26
+ to { opacity: 1; }
27
+ }
28
+
29
+ .animate-fade-in-up {
30
+ opacity: 0;
31
+ animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
32
+ }
33
+
34
+ @keyframes fadeInUp {
35
+ from { opacity: 0; transform: translateY(30px); }
36
+ to { opacity: 1; transform: translateY(0); }
37
+ }
38
+
39
+ /* Stagger Utilities */
40
+ .stagger-container {
41
+ }
42
+
43
+ @for $i from 1 through 10 {
44
+ .stagger-container > :nth-child(#{$i}).animate-fade-in-up {
45
+ animation-delay: #{$i * 150 - 150}ms;
46
+ }
47
+ }
@@ -3,13 +3,13 @@
3
3
  {
4
4
  "extends": "./tsconfig.json",
5
5
  "compilerOptions": {
6
- "outDir": "./out-tsc/app",
7
- "types": ["node", "jest"]
6
+ "outDir": "./out-tsc/app"
8
7
  },
9
- "files": [
10
- "src/main.ts"
11
- ],
12
8
  "include": [
13
- "src/**/*.d.ts"
9
+ "src/**/*.d.ts",
10
+ "src/**/*.ts"
11
+ ],
12
+ "exclude": [
13
+ "src/**/*.spec.ts"
14
14
  ]
15
15
  }
@@ -10,24 +10,29 @@
10
10
  "noImplicitReturns": true,
11
11
  "noFallthroughCasesInSwitch": true,
12
12
  "skipLibCheck": true,
13
+ "isolatedModules": true,
13
14
  "esModuleInterop": true,
14
15
  "sourceMap": true,
15
16
  "declaration": false,
16
17
  "experimentalDecorators": true,
17
- "moduleResolution": "node",
18
18
  "importHelpers": true,
19
19
  "target": "ES2022",
20
- "module": "ES2022",
21
- "useDefineForClassFields": false,
22
- "lib": [
23
- "ES2022",
24
- "dom"
25
- ]
20
+ "module": "preserve",
21
+ "useDefineForClassFields": false
26
22
  },
27
23
  "angularCompilerOptions": {
28
24
  "enableI18nLegacyMessageIdFormat": false,
29
25
  "strictInjectionParameters": true,
30
26
  "strictInputAccessModifiers": true,
31
27
  "strictTemplates": true
32
- }
28
+ },
29
+ "files": [],
30
+ "references": [
31
+ {
32
+ "path": "./tsconfig.app.json"
33
+ },
34
+ {
35
+ "path": "./tsconfig.spec.json"
36
+ }
37
+ ]
33
38
  }
@@ -3,17 +3,18 @@
3
3
  {
4
4
  "extends": "./tsconfig.json",
5
5
  "compilerOptions": {
6
- "target": "ES2022",
7
- "module": "ES2022",
8
- "moduleResolution": "node",
9
6
  "esModuleInterop": true,
10
7
  "allowJs": true,
11
8
  "allowSyntheticDefaultImports": true,
12
- "types": ["jest", "node"],
9
+ "types": [
10
+ "jest",
11
+ "node",
12
+ "@testing-library/jest-dom"
13
+ ],
13
14
  "outDir": "./out-tsc/spec"
14
15
  },
15
16
  "include": [
16
17
  "src/**/*.spec.ts",
17
18
  "src/**/*.d.ts"
18
19
  ]
19
- }
20
+ }
@@ -35,7 +35,25 @@ function ngAdd(options) {
35
35
  //move(parsedPath.path),
36
36
  ]);
37
37
  return (0, schematics_1.chain)([
38
- (0, schematics_1.mergeWith)(templateSource, schematics_1.MergeStrategy.Overwrite)
38
+ // Angular v21's `ng new` generates root component files without the `.component`
39
+ // suffix (app.ts, app.html, app.scss, app.spec.ts). Our schematic uses the
40
+ // traditional app.component.* naming, so we delete the v21 defaults to avoid conflicts.
41
+ (tree) => {
42
+ const v21DefaultFiles = [
43
+ 'src/app/app.ts',
44
+ 'src/app/app.html',
45
+ 'src/app/app.scss',
46
+ 'src/app/app.spec.ts',
47
+ ];
48
+ for (const file of v21DefaultFiles) {
49
+ if (tree.exists(file)) {
50
+ tree.delete(file);
51
+ context.logger.info(`Deleted v21 default file: ${file}`);
52
+ }
53
+ }
54
+ return tree;
55
+ },
56
+ (0, schematics_1.mergeWith)(templateSource, schematics_1.MergeStrategy.Overwrite),
39
57
  ]);
40
58
  };
41
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAeA,sBAoCC;AAnDD,2DAIoC;AACpC,oEAAoE;AACpE,qGAAqG;AACrG,qEAAqE;AACrE,gFAAgF;AAChF,qEAAuF;AAEvF,+CAA+C;AAE/C,2EAA2E;AAE3E,SAAgB,KAAK,CAAC,OAAY;IAChC,OAAO,KAAK,EAAE,IAAU,EAAE,OAAyB,EAAE,EAAE;QAErD,wFAAwF;QACxF,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACrB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,iIAAiI,CAAC,CAAC;YACvJ,OAAO,IAAA,iBAAI,GAAE,CAAC;QAChB,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,MAAM,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,OAAiB,CAAC,CAAC;QAEl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}
@@ -1,4 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const <%= classify(name) %>Animations = [
4
- ];
@@ -1,4 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const AdminPanelAnimations = [
4
- ];
@@ -1,4 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const AdminCountPillAnimations = [
4
- ];
@@ -1,4 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const AdminUserCountsAnimations = [
4
- ];
@@ -1,4 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const AdminUserTableAnimations = [
4
- ];
@@ -1,4 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const ConsentAnimations = [
4
- ];
@@ -1,10 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const EarlyAccessAnimations = [
4
- trigger('fadeIn', [
5
- transition(':enter', [
6
- style({ opacity: 0 }),
7
- animate('400ms ease-in', style({ opacity: 1 }))
8
- ])
9
- ])
10
- ];
@@ -1,15 +0,0 @@
1
- import { trigger, query, animateChild, style, animate, transition, stagger } from '@angular/animations';
2
-
3
- export const HeroAnimations = [
4
- trigger('fadeInUp', [
5
- transition(':enter', [
6
- style({ opacity: 0, transform: 'translateY(30px)' }),
7
- animate('0.8s cubic-bezier(0.16, 1, 0.3, 1)', style({ opacity: 1, transform: 'translateY(0)' })),
8
- ]),
9
- ]),
10
- trigger('staggerContainer', [
11
- transition(':enter', [
12
- query('@fadeInUp', stagger(150, animateChild()), { optional: true }),
13
- ]),
14
- ]),
15
- ];
@@ -1,4 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const LandingAnimations = [
4
- ];
@@ -1,4 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const OnboardingAnimations = [
4
- ];
@@ -1,4 +0,0 @@
1
- import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
-
3
- export const HomeAnimations = [
4
- ];