@duetds/cli 2.6.12 → 2.7.1
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.
- package/package.json +7 -8
- package/src/index.js +21 -0
- package/src/main.js +19 -19
- package/templates/angular/12.2.16/.browserlistrc +16 -0
- package/templates/angular/12.2.16/.depcheckrc +2 -0
- package/templates/angular/12.2.16/.editorconfig +16 -0
- package/templates/angular/12.2.16/.eslintrc.json +51 -0
- package/templates/angular/{.prettierignore → 12.2.16/.prettierignore} +0 -0
- package/templates/angular/12.2.16/.prettierrc +14 -0
- package/templates/angular/12.2.16/LICENSE.md +29 -0
- package/templates/angular/{README.md → 12.2.16/README.md} +5 -3
- package/templates/angular/{angular.json → 12.2.16/angular.json} +15 -4
- package/templates/angular/12.2.16/config/jest.base.ts +17 -0
- package/templates/angular/12.2.16/config/jest.setup.ts +24 -0
- package/templates/angular/12.2.16/package.file +58 -0
- package/templates/angular/12.2.16/playwright.config.ts +26 -0
- package/templates/angular/12.2.16/src/app/agreement.model.ts +3 -0
- package/templates/angular/12.2.16/src/app/app-routing.module.ts +11 -0
- package/templates/angular/{src → 12.2.16/src}/app/app.component.html +0 -0
- package/templates/angular/{src → 12.2.16/src}/app/app.component.scss +0 -0
- package/templates/angular/{src → 12.2.16/src}/app/app.component.ts +1 -1
- package/templates/angular/{src → 12.2.16/src}/app/app.module.ts +5 -11
- package/templates/angular/12.2.16/src/app/currency-formatter.service.ts +12 -0
- package/templates/angular/12.2.16/src/app/footer/footer.component.html +22 -0
- package/templates/angular/{src → 12.2.16/src}/app/footer/footer.component.scss +0 -0
- package/templates/angular/{src → 12.2.16/src}/app/footer/footer.component.ts +1 -1
- package/templates/angular/12.2.16/src/app/header/header.component.html +1 -0
- package/templates/angular/{src/app/index-page/index-page.component.scss → 12.2.16/src/app/header/header.component.scss} +0 -0
- package/templates/angular/12.2.16/src/app/header/header.component.ts +10 -0
- package/templates/angular/12.2.16/src/app/index-page/index-page.component.html +49 -0
- package/templates/angular/{src/app/injuries-page/injuries-page.component.scss → 12.2.16/src/app/index-page/index-page.component.scss} +0 -0
- package/templates/angular/12.2.16/src/app/index-page/index-page.component.ts +61 -0
- package/templates/angular/12.2.16/src/app/investment-amount/investment-amount.component.html +87 -0
- package/templates/angular/{src/app/insurance-page/insurance-page.component.scss → 12.2.16/src/app/investment-amount/investment-amount.component.scss} +0 -0
- package/templates/angular/12.2.16/src/app/investment-amount/investment-amount.component.ts +31 -0
- package/templates/angular/12.2.16/src/app/investment-origin/investment-origin.component.html +12 -0
- package/templates/angular/{src/assets/.gitkeep → 12.2.16/src/app/investment-origin/investment-origin.component.scss} +0 -0
- package/templates/angular/12.2.16/src/app/investment-origin/investment-origin.component.ts +24 -0
- package/templates/angular/12.2.16/src/app/summary/summary.component.html +74 -0
- package/templates/angular/12.2.16/src/app/summary/summary.component.scss +0 -0
- package/templates/angular/12.2.16/src/app/summary/summary.component.ts +16 -0
- package/templates/angular/12.2.16/src/assets/.gitkeep +0 -0
- package/templates/angular/{src → 12.2.16/src}/assets/img/android-chrome-192x192.png +0 -0
- package/templates/angular/{src → 12.2.16/src}/assets/img/apple-touch-icon-180x180.png +0 -0
- package/templates/angular/{src → 12.2.16/src}/assets/img/splash-screen-icon-512x512.png +0 -0
- package/templates/angular/{src → 12.2.16/src}/environments/environment.prod.ts +1 -1
- package/templates/angular/{src → 12.2.16/src}/environments/environment.ts +1 -1
- package/templates/angular/{src → 12.2.16/src}/favicon.ico +0 -0
- package/templates/angular/{src → 12.2.16/src}/index.html +1 -1
- package/templates/angular/{src → 12.2.16/src}/main.ts +0 -0
- package/templates/angular/{src → 12.2.16/src}/manifest.json +0 -0
- package/templates/angular/{src → 12.2.16/src}/polyfills.ts +0 -0
- package/templates/angular/{src → 12.2.16/src}/styles.scss +0 -0
- package/templates/angular/12.2.16/src/tests/app.test.ts +13 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts +54 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-1-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-2-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-3-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-4-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-5-chromium-darwin.png +0 -0
- package/templates/angular/12.2.16/src/tests/playwright/playwright.test.ts-snapshots/code-chromium-darwin.json +16 -0
- package/templates/angular/12.2.16/src/utils/string.utils.ts +1 -0
- package/templates/angular/{tsconfig.app.json → 12.2.16/tsconfig.app.json} +0 -1
- package/templates/angular/{tsconfig.base.json → 12.2.16/tsconfig.base.json} +1 -1
- package/templates/angular/12.2.16/tsconfig.json +8 -0
- package/templates/angular/12.2.16/tsconfig.spec.json +15 -0
- package/templates/angular/{tslint.json → 12.2.16/tslint.json} +0 -0
- package/templates/angular/13.2.4/.browserlistrc +16 -0
- package/templates/angular/13.2.4/.depcheckrc +2 -0
- package/templates/angular/13.2.4/.editorconfig +16 -0
- package/templates/angular/13.2.4/.eslintrc.json +51 -0
- package/templates/{html → angular/13.2.4}/.prettierignore +0 -0
- package/templates/angular/13.2.4/.prettierrc +14 -0
- package/templates/angular/13.2.4/LICENSE.md +29 -0
- package/templates/angular/13.2.4/README.md +32 -0
- package/templates/angular/13.2.4/angular.json +122 -0
- package/templates/angular/13.2.4/config/jest.base.ts +17 -0
- package/templates/angular/13.2.4/config/jest.setup.ts +24 -0
- package/templates/angular/13.2.4/package.file +59 -0
- package/templates/angular/13.2.4/playwright.config.ts +26 -0
- package/templates/angular/13.2.4/src/app/agreement.model.ts +3 -0
- package/templates/angular/13.2.4/src/app/app-routing.module.ts +11 -0
- package/templates/angular/13.2.4/src/app/app.component.html +5 -0
- package/templates/angular/13.2.4/src/app/app.component.scss +0 -0
- package/templates/angular/13.2.4/src/app/app.component.ts +10 -0
- package/templates/angular/13.2.4/src/app/app.module.ts +21 -0
- package/templates/angular/13.2.4/src/app/currency-formatter.service.ts +12 -0
- package/templates/angular/13.2.4/src/app/footer/footer.component.html +22 -0
- package/templates/angular/13.2.4/src/app/footer/footer.component.scss +0 -0
- package/templates/angular/13.2.4/src/app/footer/footer.component.ts +10 -0
- package/templates/angular/13.2.4/src/app/header/header.component.html +1 -0
- package/templates/angular/13.2.4/src/app/header/header.component.scss +0 -0
- package/templates/angular/13.2.4/src/app/header/header.component.ts +10 -0
- package/templates/angular/13.2.4/src/app/index-page/index-page.component.html +49 -0
- package/templates/angular/13.2.4/src/app/index-page/index-page.component.scss +0 -0
- package/templates/angular/13.2.4/src/app/index-page/index-page.component.ts +61 -0
- package/templates/angular/13.2.4/src/app/investment-amount/investment-amount.component.html +87 -0
- package/templates/angular/13.2.4/src/app/investment-amount/investment-amount.component.scss +0 -0
- package/templates/angular/13.2.4/src/app/investment-amount/investment-amount.component.ts +31 -0
- package/templates/angular/13.2.4/src/app/investment-origin/investment-origin.component.html +12 -0
- package/templates/angular/13.2.4/src/app/investment-origin/investment-origin.component.scss +0 -0
- package/templates/angular/13.2.4/src/app/investment-origin/investment-origin.component.ts +24 -0
- package/templates/angular/13.2.4/src/app/summary/summary.component.html +74 -0
- package/templates/angular/13.2.4/src/app/summary/summary.component.scss +0 -0
- package/templates/angular/13.2.4/src/app/summary/summary.component.ts +16 -0
- package/templates/angular/13.2.4/src/assets/.gitkeep +0 -0
- package/templates/{eleventy-ssr → angular/13.2.4}/src/assets/img/android-chrome-192x192.png +0 -0
- package/templates/{eleventy-ssr → angular/13.2.4}/src/assets/img/apple-touch-icon-180x180.png +0 -0
- package/templates/{eleventy-ssr → angular/13.2.4}/src/assets/img/splash-screen-icon-512x512.png +0 -0
- package/templates/angular/13.2.4/src/environments/environment.prod.ts +3 -0
- package/templates/angular/13.2.4/src/environments/environment.ts +16 -0
- package/templates/{eleventy-ssr → angular/13.2.4}/src/favicon.ico +0 -0
- package/templates/angular/13.2.4/src/index.html +24 -0
- package/templates/angular/13.2.4/src/main.ts +13 -0
- package/templates/{react/public → angular/13.2.4/src}/manifest.json +0 -0
- package/templates/angular/13.2.4/src/polyfills.ts +62 -0
- package/templates/angular/13.2.4/src/styles.scss +3 -0
- package/templates/angular/13.2.4/src/tests/app.test.ts +13 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts +54 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-1-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-2-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-3-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-4-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/angular-13-2-4-5-chromium-darwin.png +0 -0
- package/templates/angular/13.2.4/src/tests/playwright/playwright.test.ts-snapshots/code-chromium-darwin.json +16 -0
- package/templates/angular/13.2.4/src/utils/string.utils.ts +1 -0
- package/templates/angular/13.2.4/tsconfig.app.json +9 -0
- package/templates/angular/13.2.4/tsconfig.base.json +17 -0
- package/templates/angular/13.2.4/tsconfig.json +8 -0
- package/templates/angular/13.2.4/tsconfig.spec.json +15 -0
- package/templates/eleventy/{.eleventy.js → 0.10.0/.eleventy.js} +0 -0
- package/templates/eleventy/{.prettierignore → 0.10.0/.prettierignore} +0 -0
- package/templates/eleventy/{README.md → 0.10.0/README.md} +0 -0
- package/templates/eleventy/{gulpfile.js → 0.10.0/gulpfile.js} +0 -0
- package/templates/eleventy/{package.file → 0.10.0/package.file} +0 -0
- package/templates/{react/public → eleventy/0.10.0/src}/assets/img/android-chrome-192x192.png +0 -0
- package/templates/{react/public → eleventy/0.10.0/src}/assets/img/apple-touch-icon-180x180.png +0 -0
- package/templates/{react/public → eleventy/0.10.0/src}/assets/img/splash-screen-icon-512x512.png +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/css/main.scss +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/css/partials/_example.scss +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/data/duet.js +0 -0
- package/templates/{html → eleventy/0.10.0}/src/favicon.ico +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/includes/footer.njk +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/includes/header.njk +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/includes/layout.njk +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/index.njk +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/js/scripts.js +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/manifest.json +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/robots.txt +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/vahinkoasiat.njk +0 -0
- package/templates/eleventy/{src → 0.10.0/src}/vakuutukset.njk +0 -0
- package/templates/eleventy-ssr/{.eleventy.js → 0.10.0/.eleventy.js} +0 -0
- package/templates/eleventy-ssr/{.prettierignore → 0.10.0/.prettierignore} +0 -0
- package/templates/eleventy-ssr/{README.md → 0.10.0/README.md} +0 -0
- package/templates/eleventy-ssr/{gulpfile.js → 0.10.0/gulpfile.js} +0 -0
- package/templates/eleventy-ssr/{package.file → 0.10.0/package.file} +0 -0
- package/templates/{eleventy → eleventy-ssr/0.10.0}/src/assets/img/android-chrome-192x192.png +0 -0
- package/templates/{eleventy → eleventy-ssr/0.10.0}/src/assets/img/apple-touch-icon-180x180.png +0 -0
- package/templates/{eleventy → eleventy-ssr/0.10.0}/src/assets/img/splash-screen-icon-512x512.png +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/css/main.scss +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/css/partials/_example.scss +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/data/duet.js +0 -0
- package/templates/{eleventy → eleventy-ssr/0.10.0}/src/favicon.ico +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/includes/footer.njk +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/includes/header.njk +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/includes/layout.njk +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/index.njk +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/js/scripts.js +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/manifest.json +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/robots.txt +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/vahinkoasiat.njk +0 -0
- package/templates/eleventy-ssr/{src → 0.10.0/src}/vakuutukset.njk +0 -0
- package/templates/{react → html/2.0.0}/.prettierignore +0 -0
- package/templates/html/{README.md → 2.0.0/README.md} +0 -0
- package/templates/html/{package.file → 2.0.0/package.file} +0 -0
- package/templates/{react/public → html/2.0.0/src}/favicon.ico +0 -0
- package/templates/html/{src → 2.0.0/src}/index.html +0 -0
- package/templates/react/16.14.0/.prettierignore +3 -0
- package/templates/react/16.14.0/LICENSE.md +29 -0
- package/templates/react/{README.md → 16.14.0/README.md} +2 -2
- package/templates/react/16.14.0/package-lock.json +15324 -0
- package/templates/react/16.14.0/package.file +39 -0
- package/templates/react/16.14.0/playwright.config.mjs +26 -0
- package/templates/react/16.14.0/public/assets/img/android-chrome-192x192.png +0 -0
- package/templates/react/16.14.0/public/assets/img/apple-touch-icon-180x180.png +0 -0
- package/templates/react/16.14.0/public/assets/img/splash-screen-icon-512x512.png +0 -0
- package/templates/react/16.14.0/public/favicon.ico +0 -0
- package/templates/react/{public → 16.14.0/public}/index.html +1 -1
- package/templates/react/16.14.0/public/manifest.json +19 -0
- package/templates/react/16.14.0/src/App.js +138 -0
- package/templates/react/16.14.0/src/components/Footer.js +24 -0
- package/templates/react/16.14.0/src/components/Header.js +7 -0
- package/templates/react/16.14.0/src/components/InvestmentAmount.js +139 -0
- package/templates/react/16.14.0/src/components/InvestmentOrigin.js +89 -0
- package/templates/react/16.14.0/src/components/Summary.js +96 -0
- package/templates/react/{src → 16.14.0/src}/index.js +0 -0
- package/templates/react/{src → 16.14.0/src}/index.scss +0 -0
- package/templates/react/{src → 16.14.0/src}/serviceWorker.js +0 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs +54 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/app-1-chromium-darwin.png +0 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/app-2-chromium-darwin.png +0 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/app-3-chromium-darwin.png +0 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/app-4-chromium-darwin.png +0 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/app-5-chromium-darwin.png +0 -0
- package/templates/react/16.14.0/src/tests/playwright/playwright.test.mjs-snapshots/code-chromium-darwin.json +16 -0
- package/templates/react/17.0.2/LICENSE.md +29 -0
- package/templates/react/17.0.2/README.md +54 -0
- package/templates/react/17.0.2/package-lock.json +10713 -0
- package/templates/react/17.0.2/package.file +39 -0
- package/templates/react/17.0.2/playwright.config.mjs +26 -0
- package/templates/react/17.0.2/public/assets/img/android-chrome-192x192.png +0 -0
- package/templates/react/17.0.2/public/assets/img/apple-touch-icon-180x180.png +0 -0
- package/templates/react/17.0.2/public/assets/img/splash-screen-icon-512x512.png +0 -0
- package/templates/react/17.0.2/public/favicon.ico +0 -0
- package/templates/react/17.0.2/public/index.html +48 -0
- package/templates/react/17.0.2/public/manifest.json +19 -0
- package/templates/react/17.0.2/src/App.js +138 -0
- package/templates/react/17.0.2/src/components/Footer.js +24 -0
- package/templates/react/17.0.2/src/components/Header.js +7 -0
- package/templates/react/17.0.2/src/components/InvestmentAmount.js +139 -0
- package/templates/react/17.0.2/src/components/InvestmentOrigin.js +89 -0
- package/templates/react/17.0.2/src/components/Summary.js +96 -0
- package/templates/react/17.0.2/src/index.js +17 -0
- package/templates/react/17.0.2/src/index.scss +2 -0
- package/templates/react/17.0.2/src/serviceWorker.js +141 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs +54 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/app-1-chromium-darwin.png +0 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/app-2-chromium-darwin.png +0 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/app-3-chromium-darwin.png +0 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/app-4-chromium-darwin.png +0 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/app-5-chromium-darwin.png +0 -0
- package/templates/react/17.0.2/src/tests/playwright/playwright.test.mjs-snapshots/code-chromium-darwin.json +16 -0
- package/templates/angular/package.file +0 -49
- package/templates/angular/src/app/app-routing.module.ts +0 -17
- package/templates/angular/src/app/footer/footer.component.html +0 -15
- package/templates/angular/src/app/header/header.component.html +0 -22
- package/templates/angular/src/app/header/header.component.scss +0 -3
- package/templates/angular/src/app/header/header.component.ts +0 -54
- package/templates/angular/src/app/index-page/index-page.component.html +0 -53
- package/templates/angular/src/app/index-page/index-page.component.ts +0 -30
- package/templates/angular/src/app/injuries-page/injuries-page.component.html +0 -37
- package/templates/angular/src/app/injuries-page/injuries-page.component.ts +0 -18
- package/templates/angular/src/app/insurance-page/insurance-page.component.html +0 -43
- package/templates/angular/src/app/insurance-page/insurance-page.component.ts +0 -18
- package/templates/angular/tsconfig.json +0 -14
- package/templates/react/package.file +0 -48
- package/templates/react/src/App.js +0 -67
- package/templates/react/src/components/Footer.js +0 -17
- package/templates/react/src/components/Header.js +0 -38
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "duet-react-template",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "react-scripts start",
|
|
7
|
+
"build": "react-scripts build",
|
|
8
|
+
"eject": "react-scripts eject",
|
|
9
|
+
"playwright": "playwright test"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@playwright/test": "1.19.2"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@duetds/css": "latest",
|
|
16
|
+
"@duetds/icons": "latest",
|
|
17
|
+
"@duetds/react": "latest",
|
|
18
|
+
"@duetds/tokens": "latest",
|
|
19
|
+
"react": "17.0.2",
|
|
20
|
+
"react-dom": "17.0.2",
|
|
21
|
+
"react-scripts": "5.0.0",
|
|
22
|
+
"sass": "1.49.9"
|
|
23
|
+
},
|
|
24
|
+
"eslintConfig": {
|
|
25
|
+
"extends": "react-app"
|
|
26
|
+
},
|
|
27
|
+
"browserslist": {
|
|
28
|
+
"production": [
|
|
29
|
+
">0.2%",
|
|
30
|
+
"not dead",
|
|
31
|
+
"not op_mini all"
|
|
32
|
+
],
|
|
33
|
+
"development": [
|
|
34
|
+
"last 1 chrome version",
|
|
35
|
+
"last 1 firefox version",
|
|
36
|
+
"last 1 safari version"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { devices } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
const config = {
|
|
4
|
+
testDir:"src/tests/playwright",
|
|
5
|
+
retries: process.env.CI ? 2 : 0,
|
|
6
|
+
use: {
|
|
7
|
+
trace: 'on-first-retry',
|
|
8
|
+
viewport: { width: 2080, height: 2020 },
|
|
9
|
+
ignoreHTTPSErrors: true,
|
|
10
|
+
video: 'on-first-retry'
|
|
11
|
+
},
|
|
12
|
+
webServer: {
|
|
13
|
+
command: 'npm start',
|
|
14
|
+
url:"http://0.0.0.0:3000/",
|
|
15
|
+
timeout: 120 * 1000,
|
|
16
|
+
reuseExistingServer: false
|
|
17
|
+
},
|
|
18
|
+
projects: [
|
|
19
|
+
{
|
|
20
|
+
name: 'chromium',
|
|
21
|
+
use: { ...devices['Desktop Chrome'] },
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default config;
|
|
Binary file
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fi" class="duet-bg-gradient">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="author" content="LähiTapiola" />
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
<meta name="format-detection" content="telephone=no" />
|
|
8
|
+
<meta name="robots" content="noindex,nofollow" />
|
|
9
|
+
<title>LähiTapiola</title>
|
|
10
|
+
|
|
11
|
+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
12
|
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/assets/img/apple-touch-icon-180x180.png" />
|
|
13
|
+
<link
|
|
14
|
+
rel="stylesheet"
|
|
15
|
+
href="https://cdn.duetds.com/api/fonts/1.3.12/lib/localtapiola.css"
|
|
16
|
+
integrity="sha384-5JYmtSD7nykpUvSmTW1CHMoBDkBZUpUmG0vuh+NUVtZag3F75Kr7+/JU3J7JV6Wq"
|
|
17
|
+
crossorigin="anonymous"
|
|
18
|
+
/>
|
|
19
|
+
<!--
|
|
20
|
+
manifest.json provides metadata used when your web app is installed on a
|
|
21
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
22
|
+
-->
|
|
23
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
24
|
+
<!--
|
|
25
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
26
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
27
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
28
|
+
|
|
29
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
30
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
31
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
32
|
+
-->
|
|
33
|
+
</head>
|
|
34
|
+
<body>
|
|
35
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
36
|
+
<div id="root"></div>
|
|
37
|
+
<!--
|
|
38
|
+
This HTML file is a template.
|
|
39
|
+
If you open it directly in the browser, you will see an empty page.
|
|
40
|
+
|
|
41
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
42
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
43
|
+
|
|
44
|
+
To begin the development, run `npm start` or `yarn start`.
|
|
45
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
|
46
|
+
-->
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"icons": [
|
|
3
|
+
{
|
|
4
|
+
"src": "assets/img/apple-touch-icon-180x180.png",
|
|
5
|
+
"sizes": "180x180",
|
|
6
|
+
"type": "image/png"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"src": "assets/img/android-chrome-192x192.png",
|
|
10
|
+
"sizes": "192x192",
|
|
11
|
+
"type": "image/png"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"src": "assets/img/splash-screen-icon-512x512.png",
|
|
15
|
+
"sizes": "512x512",
|
|
16
|
+
"type": "image/png"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import Header from "./components/Header"
|
|
3
|
+
import Footer from "./components/Footer"
|
|
4
|
+
import {
|
|
5
|
+
DuetLayout,
|
|
6
|
+
DuetHeading,
|
|
7
|
+
DuetParagraph,
|
|
8
|
+
DuetSpacer,
|
|
9
|
+
DuetStepper,
|
|
10
|
+
DuetStep,
|
|
11
|
+
DuetButton,
|
|
12
|
+
DuetModal
|
|
13
|
+
} from "@duetds/react"
|
|
14
|
+
import InvestmentAmount from "./components/InvestmentAmount"
|
|
15
|
+
import InvestmentOrigin from "./components/InvestmentOrigin"
|
|
16
|
+
import Summary from "./components/Summary"
|
|
17
|
+
|
|
18
|
+
const agreementOptions = {
|
|
19
|
+
1: { label: "Vakuutus 1", price: 2500 },
|
|
20
|
+
2: { label: "Vakuutus 2", price: 1000 }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const formatter = new Intl.NumberFormat("fi-FI", { style: "currency", currency: "EUR" })
|
|
24
|
+
|
|
25
|
+
function App() {
|
|
26
|
+
const [currentStep, setCurrentStep] = React.useState(0)
|
|
27
|
+
const [formData, setFormData] = React.useState({
|
|
28
|
+
investmentAmount: {
|
|
29
|
+
agreement: "",
|
|
30
|
+
additionalInvestment: 50
|
|
31
|
+
},
|
|
32
|
+
investmentOrigin: {
|
|
33
|
+
salary: false,
|
|
34
|
+
gift: false,
|
|
35
|
+
heritage: false,
|
|
36
|
+
entrepreneurialIncome: false,
|
|
37
|
+
assets: false,
|
|
38
|
+
otherIncome: false,
|
|
39
|
+
investment: false,
|
|
40
|
+
extras: ""
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
const [complete, setComplete] = React.useState(false)
|
|
44
|
+
|
|
45
|
+
function handleInvestmentAmountChange(investmentAmount) {
|
|
46
|
+
setFormData(data => ({
|
|
47
|
+
...data,
|
|
48
|
+
investmentAmount
|
|
49
|
+
}))
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function handleInvestmentOriginChange(investmentOrigin) {
|
|
53
|
+
setFormData(data => ({
|
|
54
|
+
...data,
|
|
55
|
+
investmentOrigin
|
|
56
|
+
}))
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function handleNextClick() {
|
|
60
|
+
setCurrentStep(step => step + 1)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (window.innerWidth > 992) {
|
|
65
|
+
window.scrollTo(0, 160)
|
|
66
|
+
} else {
|
|
67
|
+
window.scrollTo(0, 110)
|
|
68
|
+
}
|
|
69
|
+
}, [currentStep])
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<>
|
|
73
|
+
<Header />
|
|
74
|
+
<DuetLayout center>
|
|
75
|
+
<div slot="top" role="region">
|
|
76
|
+
<DuetSpacer breakpoint="large" size="x-large" />
|
|
77
|
+
<DuetHeading level="h1" visual-level="h2">
|
|
78
|
+
Pääotsikko
|
|
79
|
+
</DuetHeading>
|
|
80
|
+
<DuetSpacer />
|
|
81
|
+
</div>
|
|
82
|
+
<div slot="main">
|
|
83
|
+
<DuetStepper selected={currentStep} onDuetStepChange={e => setCurrentStep(e.detail.toStep)}>
|
|
84
|
+
<DuetStep heading="Perustiedot">
|
|
85
|
+
<DuetParagraph>
|
|
86
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
|
87
|
+
etdolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
|
88
|
+
aliquip.
|
|
89
|
+
</DuetParagraph>
|
|
90
|
+
<InvestmentAmount
|
|
91
|
+
value={formData.investmentAmount}
|
|
92
|
+
onChange={handleInvestmentAmountChange}
|
|
93
|
+
agreementOptions={agreementOptions}
|
|
94
|
+
formatter={formatter}
|
|
95
|
+
/>
|
|
96
|
+
<DuetSpacer></DuetSpacer>
|
|
97
|
+
<DuetButton
|
|
98
|
+
id="step1"
|
|
99
|
+
disabled={!formData.investmentAmount.agreement}
|
|
100
|
+
margin="none"
|
|
101
|
+
variation="primary"
|
|
102
|
+
onClick={handleNextClick}
|
|
103
|
+
>
|
|
104
|
+
Seuraava
|
|
105
|
+
</DuetButton>
|
|
106
|
+
</DuetStep>
|
|
107
|
+
<DuetStep heading="Tarkemmat tiedot">
|
|
108
|
+
<DuetParagraph>
|
|
109
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
|
110
|
+
etdolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
|
111
|
+
aliquip.
|
|
112
|
+
</DuetParagraph>
|
|
113
|
+
<InvestmentOrigin value={formData.investmentOrigin} onChange={handleInvestmentOriginChange} />
|
|
114
|
+
<DuetSpacer></DuetSpacer>
|
|
115
|
+
<DuetButton id="step2" margin="none" variation="primary" onClick={handleNextClick}>
|
|
116
|
+
Seuraava
|
|
117
|
+
</DuetButton>
|
|
118
|
+
</DuetStep>
|
|
119
|
+
<DuetStep heading="Yhteenveto">
|
|
120
|
+
<DuetSpacer></DuetSpacer>
|
|
121
|
+
<Summary agreement={agreementOptions[formData.investmentAmount.agreement]} formatter={formatter} />
|
|
122
|
+
<DuetSpacer></DuetSpacer>
|
|
123
|
+
<DuetButton id="step3" margin="none" variation="primary" expand onClick={() => setComplete(true)}>
|
|
124
|
+
Lähetä
|
|
125
|
+
</DuetButton>
|
|
126
|
+
</DuetStep>
|
|
127
|
+
</DuetStepper>
|
|
128
|
+
</div>
|
|
129
|
+
</DuetLayout>
|
|
130
|
+
<Footer />
|
|
131
|
+
<DuetModal heading="You entered the following data:" active={complete}>
|
|
132
|
+
<pre>{JSON.stringify(formData, null, " ")}</pre>
|
|
133
|
+
</DuetModal>
|
|
134
|
+
</>
|
|
135
|
+
)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export default App
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { DuetFooter } from "@duetds/react"
|
|
3
|
+
|
|
4
|
+
const menu = [
|
|
5
|
+
{
|
|
6
|
+
label: "Turvallisuus ja käyttöehdot",
|
|
7
|
+
href: "#",
|
|
8
|
+
external: "true"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: "Evästeet",
|
|
12
|
+
href: "#",
|
|
13
|
+
external: "true"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "Henkilötietojen käsittely",
|
|
17
|
+
href: "#",
|
|
18
|
+
external: "true"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
export default function Footer() {
|
|
23
|
+
return <DuetFooter variation="simple" menu={menu}></DuetFooter>
|
|
24
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import {
|
|
3
|
+
DuetCard,
|
|
4
|
+
DuetSpacer,
|
|
5
|
+
DuetSelect,
|
|
6
|
+
DuetTable,
|
|
7
|
+
DuetButton,
|
|
8
|
+
DuetIcon,
|
|
9
|
+
DuetInput,
|
|
10
|
+
DuetVisuallyHidden
|
|
11
|
+
} from "@duetds/react"
|
|
12
|
+
|
|
13
|
+
function AgreementDetails({ agreement, formatter }) {
|
|
14
|
+
return (
|
|
15
|
+
<DuetTable variation="plain" className="hidden">
|
|
16
|
+
<table>
|
|
17
|
+
<thead>
|
|
18
|
+
<tr>
|
|
19
|
+
<th>Sijoituskohde</th>
|
|
20
|
+
<th className="duet-text-right">Osuus</th>
|
|
21
|
+
</tr>
|
|
22
|
+
</thead>
|
|
23
|
+
<tbody>
|
|
24
|
+
<tr>
|
|
25
|
+
<td>
|
|
26
|
+
<DuetButton
|
|
27
|
+
variation="plain"
|
|
28
|
+
margin="none"
|
|
29
|
+
padding="none"
|
|
30
|
+
url="https://www.duetds.com/assets/downloads/localtapiola-brand-guidelines.pdf"
|
|
31
|
+
external
|
|
32
|
+
>
|
|
33
|
+
Kohde 1<DuetSpacer size="xx-small" direction="horizontal"></DuetSpacer>
|
|
34
|
+
<DuetIcon name="action-new-window-small" margin="none" size="xx-small"></DuetIcon>
|
|
35
|
+
<DuetVisuallyHidden>, avautuu uuteen ikkunaan</DuetVisuallyHidden>
|
|
36
|
+
</DuetButton>
|
|
37
|
+
</td>
|
|
38
|
+
<td className="duet-text-right">25%</td>
|
|
39
|
+
</tr>
|
|
40
|
+
<tr>
|
|
41
|
+
<td>
|
|
42
|
+
<DuetButton
|
|
43
|
+
variation="plain"
|
|
44
|
+
margin="none"
|
|
45
|
+
padding="none"
|
|
46
|
+
url="https://www.duetds.com/assets/downloads/localtapiola-brand-guidelines.pdf"
|
|
47
|
+
external
|
|
48
|
+
>
|
|
49
|
+
Kohde 2<DuetSpacer size="xx-small" direction="horizontal"></DuetSpacer>
|
|
50
|
+
<DuetIcon name="action-new-window-small" margin="none" size="xx-small"></DuetIcon>
|
|
51
|
+
<DuetVisuallyHidden>, avautuu uuteen ikkunaan</DuetVisuallyHidden>
|
|
52
|
+
</DuetButton>
|
|
53
|
+
</td>
|
|
54
|
+
<td className="duet-text-right">25%</td>
|
|
55
|
+
</tr>
|
|
56
|
+
<tr>
|
|
57
|
+
<td>
|
|
58
|
+
<DuetButton
|
|
59
|
+
variation="plain"
|
|
60
|
+
margin="none"
|
|
61
|
+
padding="none"
|
|
62
|
+
url="https://www.duetds.com/assets/downloads/localtapiola-brand-guidelines.pdf"
|
|
63
|
+
external
|
|
64
|
+
>
|
|
65
|
+
Kohde 3<DuetSpacer size="xx-small" direction="horizontal"></DuetSpacer>
|
|
66
|
+
<DuetIcon name="action-new-window-small" margin="none" size="xx-small"></DuetIcon>
|
|
67
|
+
<DuetVisuallyHidden>, avautuu uuteen ikkunaan</DuetVisuallyHidden>
|
|
68
|
+
</DuetButton>
|
|
69
|
+
</td>
|
|
70
|
+
<td className="duet-text-right">50%</td>
|
|
71
|
+
</tr>
|
|
72
|
+
</tbody>
|
|
73
|
+
<tfoot>
|
|
74
|
+
<tr>
|
|
75
|
+
<td className="duet-font-weight-semi-bold">Yhteisarvo</td>
|
|
76
|
+
<td className="duet-text-right duet-font-weight-semi-bold duet-font-size-large">
|
|
77
|
+
{formatter.format(agreement.price)}
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
</tfoot>
|
|
81
|
+
</table>
|
|
82
|
+
</DuetTable>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export default function InvestmentAmount({ value, onChange, agreementOptions, formatter }) {
|
|
87
|
+
function handleAdditionalInvestmentChange(e) {
|
|
88
|
+
const additionalInvestment = e.target.value === "" ? 0 : parseInt(e.target.value)
|
|
89
|
+
e.target.value = additionalInvestment
|
|
90
|
+
|
|
91
|
+
onChange({
|
|
92
|
+
...value,
|
|
93
|
+
additionalInvestment
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function handleAgreementChange(e) {
|
|
98
|
+
onChange({
|
|
99
|
+
...value,
|
|
100
|
+
agreement: e.detail.value
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const items = Object.entries(agreementOptions).map(([value, { label, price }]) => {
|
|
105
|
+
return {
|
|
106
|
+
value,
|
|
107
|
+
label: `${label} - ${formatter.format(price)}`
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<div>
|
|
113
|
+
<DuetSelect
|
|
114
|
+
value={value.agreement}
|
|
115
|
+
items={items}
|
|
116
|
+
onDuetChange={handleAgreementChange}
|
|
117
|
+
expand
|
|
118
|
+
label="Valitse sopimus"
|
|
119
|
+
placeholder="Valitse…"
|
|
120
|
+
></DuetSelect>
|
|
121
|
+
|
|
122
|
+
{value.agreement && <AgreementDetails agreement={agreementOptions[value.agreement]} formatter={formatter} />}
|
|
123
|
+
<DuetSpacer></DuetSpacer>
|
|
124
|
+
|
|
125
|
+
<DuetCard variation="plain" background="gray-lighter">
|
|
126
|
+
<DuetInput
|
|
127
|
+
value={value.additionalInvestment}
|
|
128
|
+
onDuetChange={handleAdditionalInvestmentChange}
|
|
129
|
+
numericKeyboard
|
|
130
|
+
expand
|
|
131
|
+
label="Syötä summa"
|
|
132
|
+
placeholder="50"
|
|
133
|
+
icon="form-money"
|
|
134
|
+
type="number"
|
|
135
|
+
></DuetInput>
|
|
136
|
+
</DuetCard>
|
|
137
|
+
</div>
|
|
138
|
+
)
|
|
139
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { DuetInput, DuetCheckbox } from "@duetds/react"
|
|
3
|
+
|
|
4
|
+
export default function InvestmentOrigin({ value, onChange }) {
|
|
5
|
+
const [hasExtras, setHasExtras] = React.useState(false)
|
|
6
|
+
|
|
7
|
+
function handleAssetOriginChange(e) {
|
|
8
|
+
onChange({
|
|
9
|
+
...value,
|
|
10
|
+
[e.target.name]: e.detail.checked
|
|
11
|
+
})
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function handleExtraDetailsChange(e) {
|
|
15
|
+
onChange({
|
|
16
|
+
...value,
|
|
17
|
+
extras: e.detail.value
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function handleExtrasChange(e) {
|
|
22
|
+
setHasExtras(e.target.checked)
|
|
23
|
+
|
|
24
|
+
if (!e.target.checked) {
|
|
25
|
+
onChange({
|
|
26
|
+
...value,
|
|
27
|
+
extras: ""
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div>
|
|
34
|
+
<DuetCheckbox
|
|
35
|
+
name="salary"
|
|
36
|
+
checked={value.salary}
|
|
37
|
+
onDuetChange={handleAssetOriginChange}
|
|
38
|
+
label="Valinta 1"
|
|
39
|
+
></DuetCheckbox>
|
|
40
|
+
<DuetCheckbox
|
|
41
|
+
name="gift"
|
|
42
|
+
checked={value.gift}
|
|
43
|
+
onDuetChange={handleAssetOriginChange}
|
|
44
|
+
label="Valinta 2"
|
|
45
|
+
></DuetCheckbox>
|
|
46
|
+
<DuetCheckbox
|
|
47
|
+
name="heritage"
|
|
48
|
+
checked={value.heritage}
|
|
49
|
+
onDuetChange={handleAssetOriginChange}
|
|
50
|
+
label="Valinta 3"
|
|
51
|
+
></DuetCheckbox>
|
|
52
|
+
<DuetCheckbox
|
|
53
|
+
name="entrepreneurialIncome"
|
|
54
|
+
checked={value.entrepreneurialIncome}
|
|
55
|
+
onDuetChange={handleAssetOriginChange}
|
|
56
|
+
label="Valinta 4"
|
|
57
|
+
></DuetCheckbox>
|
|
58
|
+
<DuetCheckbox
|
|
59
|
+
name="assets"
|
|
60
|
+
checked={value.assets}
|
|
61
|
+
onDuetChange={handleAssetOriginChange}
|
|
62
|
+
label="Valinta 5"
|
|
63
|
+
></DuetCheckbox>
|
|
64
|
+
<DuetCheckbox
|
|
65
|
+
name="otherIncome"
|
|
66
|
+
checked={value.otherIncome}
|
|
67
|
+
onDuetChange={handleAssetOriginChange}
|
|
68
|
+
label="Valinta 6"
|
|
69
|
+
></DuetCheckbox>
|
|
70
|
+
|
|
71
|
+
<DuetCheckbox
|
|
72
|
+
name="extras"
|
|
73
|
+
checked={hasExtras}
|
|
74
|
+
onDuetChange={handleExtrasChange}
|
|
75
|
+
label="Muu, mikä?"
|
|
76
|
+
></DuetCheckbox>
|
|
77
|
+
{hasExtras && (
|
|
78
|
+
<div>
|
|
79
|
+
<DuetInput
|
|
80
|
+
value={value.extras}
|
|
81
|
+
onDuetChange={handleExtraDetailsChange}
|
|
82
|
+
label="Kerro sijoitettavien varojen muu alkuperä"
|
|
83
|
+
labelHidden
|
|
84
|
+
></DuetInput>
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
87
|
+
</div>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import {
|
|
3
|
+
DuetParagraph,
|
|
4
|
+
DuetSpacer,
|
|
5
|
+
DuetTable,
|
|
6
|
+
DuetButton,
|
|
7
|
+
DuetIcon,
|
|
8
|
+
DuetInput,
|
|
9
|
+
DuetVisuallyHidden
|
|
10
|
+
} from "@duetds/react"
|
|
11
|
+
|
|
12
|
+
export default function Summary({ agreement, formatter }) {
|
|
13
|
+
agreement = agreement || { label: "", price: 0 }
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<div>
|
|
17
|
+
<DuetInput expand disabled label="Sopimus" value={agreement.label}></DuetInput>
|
|
18
|
+
<DuetSpacer></DuetSpacer>
|
|
19
|
+
<DuetParagraph>Valitsemasi vaihtoehto jakautuu seuraavasti:</DuetParagraph>
|
|
20
|
+
<DuetTable variation="plain">
|
|
21
|
+
<table>
|
|
22
|
+
<thead>
|
|
23
|
+
<tr>
|
|
24
|
+
<th>Sijoituskohde</th>
|
|
25
|
+
<th>Osuus</th>
|
|
26
|
+
<th className="duet-text-right">Summa</th>
|
|
27
|
+
</tr>
|
|
28
|
+
</thead>
|
|
29
|
+
<tbody>
|
|
30
|
+
<tr>
|
|
31
|
+
<td>
|
|
32
|
+
<DuetButton
|
|
33
|
+
variation="plain"
|
|
34
|
+
margin="none"
|
|
35
|
+
padding="none"
|
|
36
|
+
url="https://www.duetds.com/assets/downloads/localtapiola-brand-guidelines.pdf"
|
|
37
|
+
external
|
|
38
|
+
>
|
|
39
|
+
Kohde 1<DuetSpacer size="xx-small" direction="horizontal"></DuetSpacer>
|
|
40
|
+
<DuetIcon name="action-new-window-small" margin="none" size="xx-small"></DuetIcon>
|
|
41
|
+
<DuetVisuallyHidden>, avautuu uuteen ikkunaan</DuetVisuallyHidden>
|
|
42
|
+
</DuetButton>
|
|
43
|
+
</td>
|
|
44
|
+
<td>25%</td>
|
|
45
|
+
<td className="duet-text-right">{formatter.format(agreement.price * 0.25)}</td>
|
|
46
|
+
</tr>
|
|
47
|
+
<tr>
|
|
48
|
+
<td>
|
|
49
|
+
<DuetButton
|
|
50
|
+
variation="plain"
|
|
51
|
+
margin="none"
|
|
52
|
+
padding="none"
|
|
53
|
+
url="https://www.duetds.com/assets/downloads/localtapiola-brand-guidelines.pdf"
|
|
54
|
+
external
|
|
55
|
+
>
|
|
56
|
+
Kohde 2<DuetSpacer size="xx-small" direction="horizontal"></DuetSpacer>
|
|
57
|
+
<DuetIcon name="action-new-window-small" margin="none" size="xx-small"></DuetIcon>
|
|
58
|
+
<DuetVisuallyHidden>, avautuu uuteen ikkunaan</DuetVisuallyHidden>
|
|
59
|
+
</DuetButton>
|
|
60
|
+
</td>
|
|
61
|
+
<td>25%</td>
|
|
62
|
+
<td className="duet-text-right">{formatter.format(agreement.price * 0.25)}</td>
|
|
63
|
+
</tr>
|
|
64
|
+
<tr>
|
|
65
|
+
<td>
|
|
66
|
+
<DuetButton
|
|
67
|
+
variation="plain"
|
|
68
|
+
margin="none"
|
|
69
|
+
padding="none"
|
|
70
|
+
url="https://www.duetds.com/assets/downloads/localtapiola-brand-guidelines.pdf"
|
|
71
|
+
external
|
|
72
|
+
>
|
|
73
|
+
Kohde 3<DuetSpacer size="xx-small" direction="horizontal"></DuetSpacer>
|
|
74
|
+
<DuetIcon name="action-new-window-small" margin="none" size="xx-small"></DuetIcon>
|
|
75
|
+
<DuetVisuallyHidden>, avautuu uuteen ikkunaan</DuetVisuallyHidden>
|
|
76
|
+
</DuetButton>
|
|
77
|
+
</td>
|
|
78
|
+
<td>50%</td>
|
|
79
|
+
<td className="duet-text-right">{formatter.format(agreement.price * 0.5)}</td>
|
|
80
|
+
</tr>
|
|
81
|
+
</tbody>
|
|
82
|
+
<tfoot>
|
|
83
|
+
<tr>
|
|
84
|
+
<td colSpan="2" className="duet-font-weight-semi-bold">
|
|
85
|
+
Sijoitettava summa
|
|
86
|
+
</td>
|
|
87
|
+
<td className="duet-text-right duet-font-weight-semi-bold duet-font-size-large">
|
|
88
|
+
{formatter.format(agreement.price)}
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
</tfoot>
|
|
92
|
+
</table>
|
|
93
|
+
</DuetTable>
|
|
94
|
+
</div>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import ReactDOM from "react-dom"
|
|
3
|
+
import "./index.scss"
|
|
4
|
+
import App from "./App"
|
|
5
|
+
import * as serviceWorker from "./serviceWorker"
|
|
6
|
+
|
|
7
|
+
ReactDOM.render(
|
|
8
|
+
<React.StrictMode>
|
|
9
|
+
<App />
|
|
10
|
+
</React.StrictMode>,
|
|
11
|
+
document.getElementById("root")
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
// If you want your app to work offline and load faster, you can change
|
|
15
|
+
// unregister() to register() below. Note this comes with some pitfalls.
|
|
16
|
+
// Learn more about service workers: https://bit.ly/CRA-PWA
|
|
17
|
+
serviceWorker.unregister()
|