Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop to master #510

Merged
merged 72 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
7d564f1
initial to typescript conversion
robertrytovuori May 17, 2024
657a954
typescript errors fixing progress
robertrytovuori May 17, 2024
50f60a0
sap invoice typescript fixes
robertrytovuori May 17, 2024
0cb0515
root and rentbasis typescript error fixes
robertrytovuori May 20, 2024
aafda7a
rentbasis typescript error fixes
robertrytovuori May 20, 2024
43f7970
typescript fixes relatedLEase and rentForPeriod
robertrytovuori May 20, 2024
4c02a32
add ts-loader to prod webpack
robertrytovuori May 21, 2024
01a8d0d
more typescript fixes
robertrytovuori May 21, 2024
aab461b
enable json loading in tsconfig
robertrytovuori May 21, 2024
6b4d058
plotsearch typescript errors fix
robertrytovuori May 21, 2024
3aa08f5
plotApplication typescript compile error fixes
robertrytovuori May 22, 2024
8279f27
penaltyInterest typescript compile error fixes
robertrytovuori May 22, 2024
0104af2
lease typescript fixes
robertrytovuori May 23, 2024
8a782e1
leaseholdTransfer typescript fixes
robertrytovuori May 23, 2024
708b18b
leasetype and leasestatisticreport typescript fixes
robertrytovuori May 23, 2024
92cb641
landUseInvoices and other typescript error fixes
robertrytovuori May 24, 2024
9cc421e
invoices and landUseAgreementAttachment typescript error fixes
robertrytovuori May 24, 2024
e4b0634
invoiceNote and invoiceSets typescript error fixes
robertrytovuori May 24, 2024
0274a3e
infillDevelopment typescript fixes
robertrytovuori May 24, 2024
2ab9786
index and foundation typescript error fixes
robertrytovuori May 24, 2024
3f2b15e
district and creditDecision typescript fixes
robertrytovuori May 24, 2024
7128663
createCollectionLetter and contractFile typescript fixes
robertrytovuori May 24, 2024
80003bd
contacts typescript fixes
robertrytovuori May 27, 2024
3d90df8
Related lease in create lease: remove service unit filter (#483)
NC-jsAhonen May 27, 2024
5856ee1
top nav title button: keep items in one line (#482)
NC-jsAhonen May 27, 2024
ce5e826
components typescript fixes
robertrytovuori May 27, 2024
e8e39c9
comments and collection typescript fixes
robertrytovuori May 27, 2024
5405059
batchrun and billingPeriod typescript fixes
robertrytovuori May 27, 2024
bfde8c7
auth and batchrun typescript fixes
robertrytovuori May 27, 2024
492e145
auditlog typescript fixes
robertrytovuori May 27, 2024
784242c
areaSearch typescript error fixes
robertrytovuori May 28, 2024
466eb80
areaNote and application typescript error fixes
robertrytovuori May 28, 2024
1b061e6
api and app typescript error fixes
robertrytovuori May 28, 2024
b2167a5
revert flowRight to decorated changes
robertrytovuori May 28, 2024
1a73b07
webpack fixes for path resolution
robertrytovuori May 28, 2024
3acd408
test run with typescript fixes
robertrytovuori May 28, 2024
e448eac
fix components test file
robertrytovuori May 28, 2024
43d65ec
merge develop
robertrytovuori May 28, 2024
aed1b07
test:coverage with typescript fixes
robertrytovuori May 28, 2024
7caf327
fixes to make baseUrl as src and more
robertrytovuori May 29, 2024
334ff8b
move ts-loader and file-loader to dev dependencies
robertrytovuori May 30, 2024
ebbc0f7
Merge pull request #485 from City-of-Helsinki/MVJ-249_flow-to-typescr…
robertrytovuori May 30, 2024
521b789
toggleable usergroup list (#484)
NC-jsAhonen May 30, 2024
ce9536b
change type for formatDecimalNumber to take in string (#486)
henrinie-nc May 31, 2024
3a94d33
createPaikkatietovipunenUrl to createPTPPlanReportUrl and createPTPPl…
robertrytovuori Jun 5, 2024
cf74544
ptp url constant fix
robertrytovuori Jun 5, 2024
692f51e
rename constant PTP_URL to PAIKKATIETOPALVELU_URL
robertrytovuori Jun 5, 2024
9dc2a57
Merge pull request #487 from City-of-Helsinki/MVJ-345_paikkatietovipu…
robertrytovuori Jun 11, 2024
547f4f3
change lease ordering fields (#488)
henrinie-nc Jun 11, 2024
b96077c
fetch intended use choices from api & query with leases service_unit …
henrinie-nc Jun 13, 2024
0edbdd8
add intended use filter for least list (#490)
henrinie-nc Jun 14, 2024
1e16005
fix boolean comparison, remove flow-types packages (#493)
henrinie-nc Jun 20, 2024
14a2b87
typescript bug fix
robertrytovuori Jun 24, 2024
7818378
fix typescript errors
robertrytovuori Jun 26, 2024
3267a3d
remove duplicate search identifier
robertrytovuori Jun 26, 2024
4684e11
Merge pull request #496 from City-of-Helsinki/MVJ-296_typescript-erro…
robertrytovuori Jun 26, 2024
cdc8682
Merge pull request #494 from City-of-Helsinki/MVJ-276_typescript-erro…
robertrytovuori Jun 26, 2024
1f49580
moving any away from types and closer to problem creditDecision
robertrytovuori Jun 27, 2024
97a1809
change TopNavigationSetting to TopNavigationState in setSettingsReducer
robertrytovuori Jun 27, 2024
85cc7b6
ahjo decision links (#498)
NC-jsAhonen Jun 28, 2024
e35ea7e
invoice edit: fetch receivable types by lease's service unit (#499)
NC-jsAhonen Jun 28, 2024
edc3696
typescript error fixes in table components
robertrytovuori Jul 1, 2024
cbdbcdc
Fix/ts errors 2024 07 02 (#504)
NC-jsAhonen Jul 2, 2024
1e83779
remove unused import
robertrytovuori Jul 2, 2024
d6ab377
Merge pull request #503 from City-of-Helsinki/mvj-299_typescript-erro…
robertrytovuori Jul 2, 2024
4686acd
Merge pull request #501 from City-of-Helsinki/typescript-error-top-na…
robertrytovuori Jul 2, 2024
d504085
error message and no save button for generated invoices edit view (#500)
NC-jsAhonen Jul 3, 2024
241850b
remove undefined size from ApiErrorModal (#505)
robertrytovuori Jul 3, 2024
2b3dbe7
Bump braces from 3.0.2 to 3.0.3 (#491)
dependabot[bot] Jul 16, 2024
9f164d0
Bump ws from 8.16.0 to 8.18.0 (#506)
dependabot[bot] Jul 16, 2024
b2f1d49
Mvj 277 typing fixes (#507)
henrinie-nc Aug 2, 2024
40ebb30
Replace geocoder address search with servicemap (#508)
henrinie-nc Aug 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 2 additions & 6 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-flow"
"@babel/preset-react"
],
"env": {
"test": {
Expand All @@ -21,10 +20,7 @@
"./src"
],
"alias": {
"$src": "./src",
"$assets": "./assets",
"$components": "./src/components",
"$util": "./src/util"
"src": "./src"
}
}
]
Expand Down
6 changes: 2 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:flowtype/recommended"
"plugin:react/recommended"
],
"env": {
"browser": true,
Expand Down Expand Up @@ -32,8 +31,7 @@
"no-case-declarations": "off"
},
"plugins": [
"react",
"flowtype"
"react"
],
"settings": {
"react": {
Expand Down
22 changes: 0 additions & 22 deletions .flowconfig

This file was deleted.

4 changes: 2 additions & 2 deletions config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ module.exports = {
dotenv: resolveApp('.env'),
appBuild: resolveApp('dist'),
appHtml: resolveApp('src/index.html'),
appIndexJs: resolveApp('src/index.js'),
appIndexJs: resolveApp('src/index.ts'),
appScss: resolveApp('src/main.scss'),
silentRenewJs: resolveApp('src/silent_renew.js'),
silentRenewJs: resolveApp('src/silent_renew.ts'),
silentRenewHtml: resolveApp('src/silent_renew.html'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
Expand Down
30 changes: 17 additions & 13 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,30 @@ module.exports = {
},
resolve: {
alias: {
'react-dom': '@hot-loader/react-dom',
'react-dom': '@hot-loader/react-dom'
},
modules: [
path.join(__dirname, 'src'),
path.resolve(__dirname, '../src'),
'node_modules',
],
extensions: ['.web.js', '.js', '.json', '.web.jsx', '.jsx'],
extensions: ['.ts', '.tsx', '.web.js', '.js', '.json', '.web.jsx', '.jsx'],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
fallback: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
}
},
module: {
strictExportPresence: true,
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.(js|jsx)$/,
loader: 'babel-loader',
Expand Down Expand Up @@ -138,16 +151,7 @@ module.exports = {
contextRegExp: /moment$/,
}),
],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
resolve: {
fallback: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
}
},

// Turn off performance hints during development because we don't do any
// splitting or minification in interest of speed. These warnings become
// cumbersome.
Expand Down
29 changes: 16 additions & 13 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,27 @@ module.exports = {
},
resolve: {
modules: [
path.join(__dirname, 'src'),
path.resolve(__dirname, '../src'),
'node_modules',
],
extensions: ['.web.js', '.js', '.json', '.web.jsx', '.jsx'],
extensions: ['.web.js', '.js', '.json', '.web.jsx', '.jsx', '.ts', '.tsx'],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
fallback: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
}
},
module: {
strictExportPresence: true,
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.(js|jsx)$/,
loader: 'babel-loader',
Expand Down Expand Up @@ -206,15 +219,5 @@ module.exports = {
},
extractComments: false,
})],
},
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
resolve: {
fallback: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
}
},
}
};
5 changes: 1 addition & 4 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"$assets/*": ["./assets/*"],
"$components/*": ["./src/components/*"],
"$src/*": ["./src/*"],
"$util/*": ["./src/util/*"]
"src/*": ["./src/*"],
}
}
}
34 changes: 22 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,26 @@
"name": "mvj-ui",
"version": "1.0.0",
"description": "City of Helsinki ground rent system UI",
"main": "src/index.js",
"main": "src/index.ts",
"author": "Jori Lindell <[email protected]>",
"license": "MIT",
"nyc": {
"require": [
"@babel/register",
"./src/test.js"
"./src/test.ts"
],
"sourceMap": false,
"instrument": false
},
"scripts": {
"flow": "flow; test $? -eq 0 -o $? -eq 2",
"flow-typed": "flow-typed install",
"lint": "eslint src",
"serve": "webpack serve",
"start": "node scripts/start.js",
"compile": "node scripts/compile.js",
"precommit": "npm-run-all flow lint",
"precommit": "npm-run-all lint",
"prepush": "npm-run-all test",
"test": "mocha --require @babel/register --require src/test.js \"src/**/*spec.js\"",
"test:coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha \"src/**/*spec.js\" --exit",
"test": "mocha --require @babel/register --require ts-node/register --require tsconfig-paths/register --require src/test.ts \"src/**/*spec.ts\"",
"test:coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text --require ts-node/register --require tsconfig-paths/register mocha \"src/**/*spec.ts\" --exit",
"test:watch": "npm run test -- --watch"
},
"dependencies": {
Expand All @@ -35,6 +33,7 @@
"file-saver": "^2.0.5",
"font-awesome": "^4.7.0",
"foundation-sites": "6.5.3",
"hds-react": "^3.8.0",
"history": "^4.9.0",
"leaflet": "^1.5.1",
"leaflet-draw": "^1.0.4",
Expand All @@ -53,7 +52,7 @@
"react-dom": "16.8.6",
"react-dual-listbox": "^2.0.0",
"react-foundation": "^0.9.6",
"react-leaflet": "^2.4.0",
"react-leaflet": "^2.8.0",
"react-leaflet-draw": "^0.19.0",
"react-leaflet-fullscreen": "1.0.1",
"react-redux": "^7.1.0",
Expand All @@ -69,6 +68,7 @@
"redux-form": "^8.2.5",
"redux-oidc": "^3.1.4",
"redux-saga": "^1.0.5",
"utility-types": "^3.11.0",
"whatwg-fetch": "^3.0.0"
},
"devDependencies": {
Expand All @@ -77,10 +77,19 @@
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.5.5",
"@babel/preset-flow": "^7.23.3",
"@babel/preset-react": "^7.23.3",
"@babel/register": "^7.23.7",
"@hot-loader/react-dom": "17.0.2",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/chai": "^4.3.16",
"@types/history": "^5.0.0",
"@types/leaflet": "1.5.23",
"@types/lodash": "^4.17.1",
"@types/mocha": "^10.0.6",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"@types/redux-actions": "^2.6.5",
"@types/webpack-env": "^1.18.5",
"babel-loader": "^9.1.3",
"babel-plugin-istanbul": "^6.1.1",
"babel-plugin-module-resolver": "^5.0.0",
Expand All @@ -96,12 +105,9 @@
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"eslint": "^8.56.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-react": "^7.14.3",
"favicons-webpack-plugin": "^6.0.1",
"file-loader": "^6.2.0",
"flow-bin": "^0.227.0",
"flow-typed": "^3.9.0",
"fs-extra": "^11.2.0",
"html-webpack-plugin": "^5.6.0",
"json-loader": "^0.5.7",
Expand All @@ -118,6 +124,10 @@
"sinon-chai": "^3.3.0",
"style-loader": "^3.3.4",
"terser-webpack-plugin": "^5.3.10",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.5.4",
"url": "^0.11.3",
"url-loader": "^4.1.1",
"webpack": "^5.9.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ choosePort(HOST, DEFAULT_PORT)
}
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const appName = require(paths.appPackageJson).name;
const useTypeScript = false;
const useTypeScript = true;
const urls = prepareUrls(protocol, HOST, port);
const devSocket = {
warnings: warnings =>
Expand Down
67 changes: 0 additions & 67 deletions src/api/ApiErrorModal.js

This file was deleted.

Loading
Loading