@duetds/cli 4.0.50 → 4.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 (95) hide show
  1. package/package.json +2 -2
  2. package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-5-chromium-darwin.png +0 -0
  3. package/templates/angular/14.2.12/src/tests/playwright/playwright.test.ts-snapshots/angular-5-chromium-darwin.png +0 -0
  4. package/templates/angular/15.0.4/src/tests/playwright/playwright.test.ts-snapshots/angular-5-chromium-darwin.png +0 -0
  5. package/templates/angular/16.2.0/package.file +1 -1
  6. package/templates/angular/16.2.0/src/tests/playwright/playwright.test.ts-snapshots/angular-5-chromium-darwin.png +0 -0
  7. package/templates/angular/17.0.0/package.file +1 -1
  8. package/templates/angular/17.0.0/src/app/app.module.ts +10 -1
  9. package/templates/angular/17.0.0/src/app/investment-amount/investment-amount.component.html +2 -0
  10. package/templates/angular/17.0.0/src/app/investment-amount/investment-amount.component.ts +2 -12
  11. package/templates/angular/17.0.0/src/app/investment-origin/investment-origin.component.html +8 -8
  12. package/templates/angular/17.0.0/src/app/investment-origin/investment-origin.component.ts +2 -21
  13. package/templates/angular/17.0.0/src/app/value-accessors.ts +147 -0
  14. package/templates/angular/17.0.0/src/tests/playwright/playwright.test.ts-snapshots/angular-5-chromium-darwin.png +0 -0
  15. package/templates/react/16.14.0/package.file +1 -1
  16. package/templates/react/19rc/README.md +54 -0
  17. package/templates/react/19rc/package-lock.json +10713 -0
  18. package/templates/react/19rc/package.file +39 -0
  19. package/templates/{angular/12.2.16/playwright.config.ts → react/19rc/playwright.config.mjs} +7 -7
  20. package/templates/react/19rc/public/index.html +48 -0
  21. package/templates/react/19rc/src/App.js +140 -0
  22. package/templates/react/19rc/src/components/Footer.js +23 -0
  23. package/templates/react/19rc/src/components/Header.js +6 -0
  24. package/templates/react/19rc/src/components/InvestmentAmount.js +129 -0
  25. package/templates/react/19rc/src/components/InvestmentOrigin.js +88 -0
  26. package/templates/react/19rc/src/components/Summary.js +87 -0
  27. package/templates/react/19rc/src/index.js +17 -0
  28. package/templates/react/19rc/src/index.scss +2 -0
  29. package/templates/react/19rc/src/serviceWorker.js +141 -0
  30. package/templates/{angular/12.2.16/src/tests/playwright/playwright.test.ts → react/19rc/src/tests/playwright/playwright.test.mjs} +14 -14
  31. package/templates/react/19rc/src/tests/playwright/playwright.test.mjs-snapshots/app-1-chromium-darwin.png +0 -0
  32. package/templates/react/19rc/src/tests/playwright/playwright.test.mjs-snapshots/app-2-chromium-darwin.png +0 -0
  33. package/templates/react/19rc/src/tests/playwright/playwright.test.mjs-snapshots/app-3-chromium-darwin.png +0 -0
  34. package/templates/{angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-4-chromium-darwin.png → react/19rc/src/tests/playwright/playwright.test.mjs-snapshots/app-4-chromium-darwin.png} +0 -0
  35. package/templates/{angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-5-chromium-darwin.png → react/19rc/src/tests/playwright/playwright.test.mjs-snapshots/app-5-chromium-darwin.png} +0 -0
  36. package/templates/{angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots → react/19rc/src/tests/playwright/playwright.test.mjs-snapshots}/code-chromium-darwin.json +1 -1
  37. package/templates/angular/12.2.16/.browserlistrc +0 -16
  38. package/templates/angular/12.2.16/.depcheckrc +0 -2
  39. package/templates/angular/12.2.16/.editorconfig +0 -16
  40. package/templates/angular/12.2.16/.eslintrc.json +0 -51
  41. package/templates/angular/12.2.16/.prettierignore +0 -3
  42. package/templates/angular/12.2.16/.prettierrc +0 -14
  43. package/templates/angular/12.2.16/README.md +0 -32
  44. package/templates/angular/12.2.16/angular.json +0 -122
  45. package/templates/angular/12.2.16/config/jest.base.ts +0 -17
  46. package/templates/angular/12.2.16/config/jest.setup.ts +0 -24
  47. package/templates/angular/12.2.16/package.file +0 -58
  48. package/templates/angular/12.2.16/src/app/agreement.model.ts +0 -3
  49. package/templates/angular/12.2.16/src/app/app-routing.module.ts +0 -11
  50. package/templates/angular/12.2.16/src/app/app.component.html +0 -5
  51. package/templates/angular/12.2.16/src/app/app.component.scss +0 -0
  52. package/templates/angular/12.2.16/src/app/app.component.ts +0 -10
  53. package/templates/angular/12.2.16/src/app/app.module.ts +0 -21
  54. package/templates/angular/12.2.16/src/app/currency-formatter.service.ts +0 -12
  55. package/templates/angular/12.2.16/src/app/footer/footer.component.html +0 -22
  56. package/templates/angular/12.2.16/src/app/footer/footer.component.scss +0 -0
  57. package/templates/angular/12.2.16/src/app/footer/footer.component.ts +0 -10
  58. package/templates/angular/12.2.16/src/app/header/header.component.html +0 -1
  59. package/templates/angular/12.2.16/src/app/header/header.component.scss +0 -0
  60. package/templates/angular/12.2.16/src/app/header/header.component.ts +0 -10
  61. package/templates/angular/12.2.16/src/app/index-page/index-page.component.html +0 -49
  62. package/templates/angular/12.2.16/src/app/index-page/index-page.component.scss +0 -0
  63. package/templates/angular/12.2.16/src/app/index-page/index-page.component.ts +0 -61
  64. package/templates/angular/12.2.16/src/app/investment-amount/investment-amount.component.html +0 -87
  65. package/templates/angular/12.2.16/src/app/investment-amount/investment-amount.component.scss +0 -0
  66. package/templates/angular/12.2.16/src/app/investment-amount/investment-amount.component.ts +0 -31
  67. package/templates/angular/12.2.16/src/app/investment-origin/investment-origin.component.html +0 -12
  68. package/templates/angular/12.2.16/src/app/investment-origin/investment-origin.component.scss +0 -0
  69. package/templates/angular/12.2.16/src/app/investment-origin/investment-origin.component.ts +0 -24
  70. package/templates/angular/12.2.16/src/app/summary/summary.component.html +0 -74
  71. package/templates/angular/12.2.16/src/app/summary/summary.component.scss +0 -0
  72. package/templates/angular/12.2.16/src/app/summary/summary.component.ts +0 -16
  73. package/templates/angular/12.2.16/src/assets/.gitkeep +0 -0
  74. package/templates/angular/12.2.16/src/environments/environment.prod.ts +0 -3
  75. package/templates/angular/12.2.16/src/environments/environment.ts +0 -16
  76. package/templates/angular/12.2.16/src/index.html +0 -24
  77. package/templates/angular/12.2.16/src/main.ts +0 -13
  78. package/templates/angular/12.2.16/src/polyfills.ts +0 -62
  79. package/templates/angular/12.2.16/src/styles.scss +0 -3
  80. package/templates/angular/12.2.16/src/tests/app.test.ts +0 -13
  81. package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-1-chromium-darwin.png +0 -0
  82. package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-2-chromium-darwin.png +0 -0
  83. package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-3-chromium-darwin.png +0 -0
  84. package/templates/angular/12.2.16/src/utils/string.utils.ts +0 -1
  85. package/templates/angular/12.2.16/tsconfig.app.json +0 -9
  86. package/templates/angular/12.2.16/tsconfig.base.json +0 -17
  87. package/templates/angular/12.2.16/tsconfig.json +0 -8
  88. package/templates/angular/12.2.16/tsconfig.spec.json +0 -15
  89. package/templates/angular/12.2.16/tslint.json +0 -92
  90. /package/templates/{angular/12.2.16 → react/19rc}/LICENSE.md +0 -0
  91. /package/templates/{angular/12.2.16/src → react/19rc/public}/assets/img/android-chrome-192x192.png +0 -0
  92. /package/templates/{angular/12.2.16/src → react/19rc/public}/assets/img/apple-touch-icon-180x180.png +0 -0
  93. /package/templates/{angular/12.2.16/src → react/19rc/public}/assets/img/splash-screen-icon-512x512.png +0 -0
  94. /package/templates/{angular/12.2.16/src → react/19rc/public}/favicon.ico +0 -0
  95. /package/templates/{angular/12.2.16/src → react/19rc/public}/manifest.json +0 -0
@@ -0,0 +1,141 @@
1
+ // This optional code is used to register a service worker.
2
+ // register() is not called by default.
3
+
4
+ // This lets the app load faster on subsequent visits in production, and gives
5
+ // it offline capabilities. However, it also means that developers (and users)
6
+ // will only see deployed updates on subsequent visits to a page, after all the
7
+ // existing tabs open on the page have been closed, since previously cached
8
+ // resources are updated in the background.
9
+
10
+ // To learn more about the benefits of this model and instructions on how to
11
+ // opt-in, read https://bit.ly/CRA-PWA
12
+
13
+ const isLocalhost = Boolean(
14
+ window.location.hostname === 'localhost' ||
15
+ // [::1] is the IPv6 localhost address.
16
+ window.location.hostname === '[::1]' ||
17
+ // 127.0.0.0/8 are considered localhost for IPv4.
18
+ window.location.hostname.match(
19
+ /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20
+ )
21
+ );
22
+
23
+ export function register(config) {
24
+ if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25
+ // The URL constructor is available in all browsers that support SW.
26
+ const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27
+ if (publicUrl.origin !== window.location.origin) {
28
+ // Our service worker won't work if PUBLIC_URL is on a different origin
29
+ // from what our page is served on. This might happen if a CDN is used to
30
+ // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31
+ return;
32
+ }
33
+
34
+ window.addEventListener('load', () => {
35
+ const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36
+
37
+ if (isLocalhost) {
38
+ // This is running on localhost. Let's check if a service worker still exists or not.
39
+ checkValidServiceWorker(swUrl, config);
40
+
41
+ // Add some additional logging to localhost, pointing developers to the
42
+ // service worker/PWA documentation.
43
+ navigator.serviceWorker.ready.then(() => {
44
+ console.log(
45
+ 'This web app is being served cache-first by a service ' +
46
+ 'worker. To learn more, visit https://bit.ly/CRA-PWA'
47
+ );
48
+ });
49
+ } else {
50
+ // Is not localhost. Just register service worker
51
+ registerValidSW(swUrl, config);
52
+ }
53
+ });
54
+ }
55
+ }
56
+
57
+ function registerValidSW(swUrl, config) {
58
+ navigator.serviceWorker
59
+ .register(swUrl)
60
+ .then(registration => {
61
+ registration.onupdatefound = () => {
62
+ const installingWorker = registration.installing;
63
+ if (installingWorker == null) {
64
+ return;
65
+ }
66
+ installingWorker.onstatechange = () => {
67
+ if (installingWorker.state === 'installed') {
68
+ if (navigator.serviceWorker.controller) {
69
+ // At this point, the updated precached content has been fetched,
70
+ // but the previous service worker will still serve the older
71
+ // content until all client tabs are closed.
72
+ console.log(
73
+ 'New content is available and will be used when all ' +
74
+ 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
75
+ );
76
+
77
+ // Execute callback
78
+ if (config && config.onUpdate) {
79
+ config.onUpdate(registration);
80
+ }
81
+ } else {
82
+ // At this point, everything has been precached.
83
+ // It's the perfect time to display a
84
+ // "Content is cached for offline use." message.
85
+ console.log('Content is cached for offline use.');
86
+
87
+ // Execute callback
88
+ if (config && config.onSuccess) {
89
+ config.onSuccess(registration);
90
+ }
91
+ }
92
+ }
93
+ };
94
+ };
95
+ })
96
+ .catch(error => {
97
+ console.error('Error during service worker registration:', error);
98
+ });
99
+ }
100
+
101
+ function checkValidServiceWorker(swUrl, config) {
102
+ // Check if the service worker can be found. If it can't reload the page.
103
+ fetch(swUrl, {
104
+ headers: { 'Service-Worker': 'script' },
105
+ })
106
+ .then(response => {
107
+ // Ensure service worker exists, and that we really are getting a JS file.
108
+ const contentType = response.headers.get('content-type');
109
+ if (
110
+ response.status === 404 ||
111
+ (contentType != null && contentType.indexOf('javascript') === -1)
112
+ ) {
113
+ // No service worker found. Probably a different app. Reload the page.
114
+ navigator.serviceWorker.ready.then(registration => {
115
+ registration.unregister().then(() => {
116
+ window.location.reload();
117
+ });
118
+ });
119
+ } else {
120
+ // Service worker found. Proceed as normal.
121
+ registerValidSW(swUrl, config);
122
+ }
123
+ })
124
+ .catch(() => {
125
+ console.log(
126
+ 'No internet connection found. App is running in offline mode.'
127
+ );
128
+ });
129
+ }
130
+
131
+ export function unregister() {
132
+ if ('serviceWorker' in navigator) {
133
+ navigator.serviceWorker.ready
134
+ .then(registration => {
135
+ registration.unregister();
136
+ })
137
+ .catch(error => {
138
+ console.error(error.message);
139
+ });
140
+ }
141
+ }
@@ -1,29 +1,29 @@
1
1
  import { test, expect } from '@playwright/test';
2
2
 
3
3
  test.use({
4
- viewport: { width: 1800, height: 2500 },
5
- bypassCSP: true,
6
- deviceScaleFactor: 1,
7
- })
4
+ viewport: { width: 1800, height: 2500 },
5
+ bypassCSP: true,
6
+ deviceScaleFactor: 1,
7
+ })
8
8
 
9
9
 
10
- test('angular test', async ({ page }, testInfo) => {
10
+ test('app', async ({ page }, testInfo) => {
11
11
  await page.waitForLoadState("networkidle") // This resolves after 'networkidle'
12
12
  await page.waitForTimeout(1000 * testInfo.retry + 1)
13
13
  await page.setViewportSize({ width: 1600, height: 1200 })
14
14
 
15
15
 
16
16
  // initial loading
17
- await page.goto("http://localhost:4200/");
18
- await page.goto("http://localhost:4200/#/");
17
+ await page.goto("http://localhost:3000/");
19
18
  await page.locator('select');
20
- expect(await page.screenshot()).toMatchSnapshot("angular_1.png", {maxDiffPixelRatio: 0.01});
19
+ expect(await page.screenshot()).toMatchSnapshot("app_1.png");
21
20
 
22
21
 
23
22
  // Select 2
24
23
  await page.locator('select').selectOption('2');
25
24
  await page.waitForLoadState("networkidle")
26
- expect(await page.screenshot()).toMatchSnapshot("angular_2.png", {maxDiffPixelRatio: 0.01});
25
+ expect(await page.screenshot()).toMatchSnapshot("app_2.png");
26
+
27
27
 
28
28
 
29
29
  // Click input[type="number"]
@@ -31,24 +31,24 @@ test('angular test', async ({ page }, testInfo) => {
31
31
  await page.locator('input[type="number"]').fill('500');
32
32
  await page.locator('#step1').click();
33
33
  await page.waitForLoadState("networkidle")
34
- expect(await page.screenshot()).toMatchSnapshot("angular_3.png", {maxDiffPixelRatio: 0.01});
34
+ expect(await page.screenshot()).toMatchSnapshot("app_3.png");
35
35
 
36
36
 
37
37
  // summary loading
38
38
  await page.locator('#step2').click();
39
39
  await page.waitForLoadState("networkidle")
40
- expect(await page.screenshot()).toMatchSnapshot("angular_4.png", {maxDiffPixelRatio: 0.01});
40
+ expect(await page.screenshot()).toMatchSnapshot("app_4.png");
41
41
 
42
42
 
43
43
  // summary displaying
44
44
  await page.locator('#step3').click();
45
45
  await page.waitForLoadState("networkidle") // This resolves after 'networkidle'
46
- expect(await page.screenshot()).toMatchSnapshot("angular_5.png", {maxDiffPixelRatio: 0.01});
46
+ expect(await page.screenshot()).toMatchSnapshot("app_5.png");
47
47
 
48
48
 
49
49
 
50
50
  // Click code, store json
51
- await page.locator('code').click();
52
- expect(await page.textContent('code')).toMatchSnapshot('code.json');
51
+ await page.locator('pre').click();
52
+ expect(await page.textContent('pre')).toMatchSnapshot('code.json');
53
53
 
54
54
  });
@@ -11,6 +11,6 @@
11
11
  "assets": false,
12
12
  "otherIncome": false,
13
13
  "investment": false,
14
- "extras": null
14
+ "extras": ""
15
15
  }
16
16
  }
@@ -1,16 +0,0 @@
1
- # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2
- # For additional information regarding the format and rule options, please see:
3
- # https://github.com/browserslist/browserslist#queries
4
-
5
- # For the full list of supported browsers by the Angular framework, please see:
6
- # https://angular.io/guide/browser-support
7
-
8
- # You can see what browsers were selected by your queries by running:
9
- # npx browserslist
10
-
11
- last 1 Chrome version
12
- last 1 Firefox version
13
- last 2 Edge major versions
14
- last 2 Safari major versions
15
- last 2 iOS major versions
16
- Firefox ESR
@@ -1,2 +0,0 @@
1
- ignores: ["eslint*", "@angular-eslint/*","ngx-toastr","@types/*","husky","prettier", " @typescript-eslint/*"]
2
- skip-missing: true
@@ -1,16 +0,0 @@
1
- # Editor configuration, see https://editorconfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- indent_style = space
7
- indent_size = 2
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
10
-
11
- [*.ts]
12
- quote_type = single
13
-
14
- [*.md]
15
- max_line_length = off
16
- trim_trailing_whitespace = false
@@ -1,51 +0,0 @@
1
- {
2
- "root": true,
3
- "ignorePatterns": [
4
- "projects/**/*"
5
- ],
6
- "overrides": [
7
- {
8
- "files": [
9
- "*.ts"
10
- ],
11
- "parserOptions": {
12
- "project": [
13
- "tsconfig.json"
14
- ],
15
- "createDefaultProgram": true
16
- },
17
- "extends": [
18
- "plugin:@angular-eslint/recommended",
19
- "plugin:@angular-eslint/template/process-inline-templates"
20
- ],
21
- "rules": {
22
- "@angular-eslint/directive-selector": [
23
- "error",
24
- {
25
- "type": "attribute",
26
- "prefix": "app",
27
- "style": "camelCase"
28
- }
29
- ],
30
- "@angular-eslint/component-selector": [
31
- "error",
32
- {
33
- "type": "element",
34
- "prefix": "app",
35
- "style": "kebab-case"
36
- }
37
- ],
38
- "@angular-eslint/no-empty-lifecycle-method": "off"
39
- }
40
- },
41
- {
42
- "files": [
43
- "*.html"
44
- ],
45
- "extends": [
46
- "plugin:@angular-eslint/template/recommended"
47
- ],
48
- "rules": {}
49
- }
50
- ]
51
- }
@@ -1,3 +0,0 @@
1
- package.json
2
- package-lock.json
3
- node_modules/**/*
@@ -1,14 +0,0 @@
1
- {
2
- "printWidth": 120,
3
- "singleQuote": false,
4
- "trailingComma": "none",
5
- "bracketSpacing": true,
6
- "jsxBracketSameLine": false,
7
- "semi": false,
8
- "requirePragma": false,
9
- "insertPragma": false,
10
- "useTabs": false,
11
- "tabWidth": 2,
12
- "arrowParens": "avoid",
13
- "proseWrap": "preserve"
14
- }
@@ -1,32 +0,0 @@
1
- # Duet Angular Example
2
-
3
- An example app built with [@duetds/angular](https://www.npmjs.com/package/@duetds/angular), demonstrating basic form handling.
4
-
5
- ## Features
6
-
7
- - Comes with [Duet Web Components](https://www.duetds.com/components/).
8
- - Supports [Duet Design Tokens](https://www.duetds.com/tokens/) in SCSS without additional configuration.
9
- - Comes with automated build and deploy steps for prototyping.
10
- - Additionally comes with [Duet Fonts](https://www.duetds.com/typography/) and [Duet CSS Framework](https://www.duetds.com/css-framework/) preconfigured.
11
-
12
- ## Development server
13
-
14
- Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
15
-
16
- ## Code scaffolding
17
-
18
- Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
19
-
20
- ## Build
21
-
22
- Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
23
-
24
- ## Notes
25
- This has been tested using latest node at version 17.6.0, you may need to use `npm i --legacy-peer-deps` in order to complete installation
26
- ## Further help
27
-
28
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
29
-
30
- ## Copyright
31
-
32
- Copyright © 2020 LocalTapiola Services Ltd. For license, please see LICENSE.md.
@@ -1,122 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
- "version": 1,
4
- "newProjectRoot": "projects",
5
- "projects": {
6
- "duet-angular-template": {
7
- "projectType": "application",
8
- "schematics": {
9
- "@schematics/angular:component": {
10
- "style": "scss",
11
- "skipTests": true
12
- },
13
- "@schematics/angular:class": {
14
- "skipTests": true
15
- },
16
- "@schematics/angular:directive": {
17
- "skipTests": true
18
- },
19
- "@schematics/angular:guard": {
20
- "skipTests": true
21
- },
22
- "@schematics/angular:interceptor": {
23
- "skipTests": true
24
- },
25
- "@schematics/angular:module": {
26
- "skipTests": true
27
- },
28
- "@schematics/angular:pipe": {
29
- "skipTests": true
30
- },
31
- "@schematics/angular:service": {
32
- "skipTests": true
33
- }
34
- },
35
- "root": "",
36
- "sourceRoot": "src",
37
- "prefix": "app",
38
- "architect": {
39
- "build": {
40
- "builder": "@angular-devkit/build-angular:browser",
41
- "options": {
42
- "outputPath": "dist/duet-angular-template",
43
- "index": "src/index.html",
44
- "main": "src/main.ts",
45
- "polyfills": "src/polyfills.ts",
46
- "tsConfig": "tsconfig.app.json",
47
- "aot": true,
48
- "assets": ["src/favicon.ico", "src/assets", "src/manifest.json"],
49
- "styles": ["src/styles.scss"],
50
- "scripts": []
51
- },
52
- "configurations": {
53
- "production": {
54
- "fileReplacements": [
55
- {
56
- "replace": "src/environments/environment.ts",
57
- "with": "src/environments/environment.prod.ts"
58
- }
59
- ],
60
- "optimization": true,
61
- "outputHashing": "all",
62
- "sourceMap": false,
63
- "extractCss": true,
64
- "namedChunks": false,
65
- "extractLicenses": true,
66
- "vendorChunk": false,
67
- "buildOptimizer": true,
68
- "budgets": [
69
- {
70
- "type": "initial",
71
- "maximumWarning": "2mb",
72
- "maximumError": "5mb"
73
- },
74
- {
75
- "type": "anyComponentStyle",
76
- "maximumWarning": "6kb",
77
- "maximumError": "10kb"
78
- }
79
- ]
80
- }
81
- }
82
- },
83
- "serve": {
84
- "builder": "@angular-devkit/build-angular:dev-server",
85
- "options": {
86
- "browserTarget": "duet-angular-template:build",
87
- "port": 4200
88
- },
89
- "configurations": {
90
- "production": {
91
- "browserTarget": "duet-angular-template:build:production"
92
- }
93
- }
94
- },
95
- "extract-i18n": {
96
- "builder": "@angular-devkit/build-angular:extract-i18n",
97
- "options": {
98
- "browserTarget": "duet-angular-template:build"
99
- }
100
- },
101
- "lint": {
102
- "builder": "@angular-eslint/builder:lint",
103
- "options": {
104
- "lintFilePatterns": [
105
- "src/**/*.ts",
106
- "src/**/*.html"
107
- ]
108
- }
109
- },
110
- "test": {
111
- "builder": "@angular-builders/jest:run",
112
- "options": {
113
- "tsConfig": "tsconfig.spec.json",
114
- "configPath" : "config/jest.base.ts",
115
- "globalMocks": ["getComputedStyle", "doctype", "styleTransform", "matchMedia"]
116
- }
117
- }
118
- }
119
- }
120
- },
121
- "defaultProject": "duet-angular-template"
122
- }
@@ -1,17 +0,0 @@
1
- const { pathsToModuleNameMapper } = require('ts-jest');
2
- const { compilerOptions } = require('../tsconfig.spec.json');
3
-
4
- module.exports = {
5
- preset: 'jest-preset-angular',
6
- roots: ['<rootDir>/src/'],
7
- setupFilesAfterEnv: ["<rootDir>/config/jest.setup.ts"],
8
- collectCoverage: true,
9
- coverageReporters: ['html'],
10
- coverageDirectory: 'coverage/my-app',
11
- moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, {
12
- prefix: '<rootDir>/'
13
- }),
14
- testPathIgnorePatterns : [
15
- "<rootDir>/src/tests/playwright/"
16
- ]
17
- };
@@ -1,24 +0,0 @@
1
- import 'jest-preset-angular/setup-jest';
2
-
3
-
4
- Object.defineProperty(window, 'CSS', {value: null});
5
- Object.defineProperty(window, 'getComputedStyle', {
6
- value: () => {
7
- return {
8
- display: 'none',
9
- appearance: ['-webkit-appearance']
10
- };
11
- }
12
- });
13
-
14
- Object.defineProperty(document, 'doctype', {
15
- value: '<!DOCTYPE html>'
16
- });
17
- Object.defineProperty(document.body.style, 'transform', {
18
- value: () => {
19
- return {
20
- enumerable: true,
21
- configurable: true
22
- };
23
- }
24
- });
@@ -1,58 +0,0 @@
1
- {
2
- "name": "duet-angular-template",
3
- "version": "13.2.4",
4
- "scripts": {
5
- "ng": "ng",
6
- "start": "ng lint; npm run serve",
7
- "serve": "ng serve --host=0.0.0.0 --poll 500 --disableHostCheck=true",
8
- "serve:daemon": "ng serve --host=0.0.0.0 --poll 500 --disableHostCheck=true &",
9
- "build": "ng build",
10
- "test": "ng test --watch=true --source-map=true --code-coverage --browsers Chrome",
11
- "test:ci": "DEBUG=pw:webserver npx playwright test",
12
- "lint": "ng lint"
13
- },
14
- "private": true,
15
- "dependencies": {
16
- "@angular/animations": "12.2.16",
17
- "@angular/common": "12.2.16",
18
- "@angular/compiler": "12.2.16",
19
- "@angular/core": "12.2.16",
20
- "@angular/forms": "12.2.16",
21
- "@angular/platform-browser": "12.2.16",
22
- "@angular/platform-browser-dynamic": "12.2.16",
23
- "@angular/router": "12.2.16",
24
- "@duetds/angular": "latest",
25
- "@duetds/css": "latest",
26
- "@duetds/icons": "latest",
27
- "@duetds/tokens": "latest",
28
- "rxjs": "7.5.4",
29
- "tslib": "2.3.1",
30
- "zone.js": "0.11.4"
31
- },
32
- "devDependencies": {
33
- "@angular-builders/jest": "12.1.2",
34
- "@angular-devkit/build-angular": "12.2.16",
35
- "@angular-eslint/builder": "12.7.0",
36
- "@angular-eslint/eslint-plugin": "12.7.0",
37
- "@angular-eslint/eslint-plugin-template": "12.7.0",
38
- "@angular-eslint/schematics": "12.7.0",
39
- "@angular-eslint/template-parser": "12.7.0",
40
- "@angular/cli": "12.2.16",
41
- "@angular/compiler-cli": "12.2.16",
42
- "@playwright/test": "1.25.0",
43
- "@types/jest": "27.4.1",
44
- "@types/node": "17.0.21",
45
- "@typescript-eslint/eslint-plugin": "5.13.0",
46
- "@typescript-eslint/parser": "5.13.0",
47
- "codelyzer": "6.0.2",
48
- "eslint": "8.10.0",
49
- "eslint-config-prettier": "8.4.0",
50
- "eslint-plugin-import": "2.25.4",
51
- "eslint-plugin-prefer-arrow": "1.2.3",
52
- "eslint-plugin-prettier": "4.0.0",
53
- "eslint-plugin-unused-imports": "2.0.0",
54
- "jest": "27.5.1",
55
- "ts-node": "10.6.0",
56
- "typescript": "4.3.5"
57
- }
58
- }
@@ -1,3 +0,0 @@
1
- export class Agreement {
2
- constructor(public readonly label: string, public readonly price: number) {}
3
- }
@@ -1,11 +0,0 @@
1
- import { NgModule } from "@angular/core"
2
- import { Routes, RouterModule } from "@angular/router"
3
- import { IndexPageComponent } from "./index-page/index-page.component"
4
-
5
- const routes: Routes = [{ path: "", component: IndexPageComponent }]
6
-
7
- @NgModule({
8
- imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: "enabled", useHash: true })],
9
- exports: [RouterModule]
10
- })
11
- export class AppRoutingModule {}
@@ -1,5 +0,0 @@
1
- <app-header></app-header>
2
- <div class="duet-sticky-content">
3
- <router-outlet></router-outlet>
4
- </div>
5
- <app-footer></app-footer>
@@ -1,10 +0,0 @@
1
- import { Component } from "@angular/core"
2
-
3
- @Component({
4
- selector: "app-root",
5
- templateUrl: "./app.component.html",
6
- styleUrls: ["./app.component.scss"]
7
- })
8
- export class AppComponent {
9
- constructor() {}
10
- }
@@ -1,21 +0,0 @@
1
- import { BrowserModule } from "@angular/platform-browser"
2
- import { NgModule } from "@angular/core"
3
- import { DuetComponents } from "@duetds/angular"
4
-
5
- import { AppRoutingModule } from "./app-routing.module"
6
- import { AppComponent } from "./app.component"
7
- import { FormsModule, ReactiveFormsModule } from "@angular/forms"
8
- import { IndexPageComponent } from "./index-page/index-page.component"
9
- import { HeaderComponent } from "./header/header.component"
10
- import { FooterComponent } from "./footer/footer.component"
11
- import { InvestmentAmountComponent } from './investment-amount/investment-amount.component';
12
- import { InvestmentOriginComponent } from './investment-origin/investment-origin.component';
13
- import { SummaryComponent } from './summary/summary.component'
14
-
15
- @NgModule({
16
- declarations: [AppComponent, IndexPageComponent, HeaderComponent, FooterComponent, InvestmentAmountComponent, InvestmentOriginComponent, SummaryComponent],
17
- imports: [BrowserModule, FormsModule, ReactiveFormsModule, DuetComponents, AppRoutingModule],
18
- providers: [],
19
- bootstrap: [AppComponent]
20
- })
21
- export class AppModule {}