@protacon/muster-booking-frontend 1.29.0 → 1.31.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.
@@ -0,0 +1 @@
1
+ * text eol=lf
@@ -0,0 +1,29 @@
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ # Configuration from environment variables. For example FRONTEND_apiurl -> apiurl.
6
+ if [ ! -f "$CONFIG_JS_PATH" ]; then
7
+ echo "Config file $CONFIG_JS_PATH not found! Set in env variable CONFIG_JS_PATH"
8
+ exit 1
9
+ fi
10
+
11
+ while IFS='' read -r line || [ -n "$line" ]; do
12
+ remainder="$line"
13
+ name="${remainder%%=*}"; remainder="${remainder#*=}"
14
+ value="${remainder}";
15
+
16
+ case $name in
17
+ "FRONTEND_"*)
18
+ echo "'$name' is FRONTEND configuration with value '$value', applying to config file."
19
+ field_name="${name#*_}"
20
+
21
+ sed -i "s|ENV_$field_name|$value|g" $CONFIG_JS_PATH
22
+ ;;
23
+ *) ;;
24
+ esac
25
+ done <<EOF
26
+ $(env)
27
+ EOF
28
+
29
+ nginx -g "daemon off;"
@@ -0,0 +1,49 @@
1
+ map $sent_http_content_type $expires {
2
+ default off;
3
+ text/html epoch;
4
+ text/css max;
5
+ application/javascript max;
6
+ ~image/ max;
7
+ }
8
+
9
+ server {
10
+ listen 80;
11
+ server_name localhost;
12
+ expires $expires;
13
+ root /usr/share/nginx/html;
14
+
15
+ if ($http_x_forwarded_proto = "http") {
16
+ return 301 https://$host$request_uri;
17
+ }
18
+
19
+ location ~ env.js {
20
+ expires -1;
21
+ add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
22
+ }
23
+
24
+ location / {
25
+ index index.html;
26
+ try_files $uri$args $uri$args/ $uri $uri/ /index.html =404;
27
+ }
28
+
29
+ gzip on;
30
+ gzip_disable "msie6";
31
+ gzip_vary on;
32
+ gzip_proxied any;
33
+ gzip_comp_level 6;
34
+ gzip_buffers 16 8k;
35
+ gzip_http_version 1.1;
36
+ gzip_min_length 256;
37
+ gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;
38
+
39
+ server_tokens off;
40
+ disable_symlinks off;
41
+
42
+ error_log /var/log/nginx/app_error.log;
43
+ access_log /var/log/nginx/app_access.log;
44
+
45
+ error_page 500 502 503 504 /50x.html;
46
+ location = /50x.html {
47
+ root /usr/share/nginx/html;
48
+ }
49
+ }
@@ -0,0 +1,91 @@
1
+ import js from "@eslint/js";
2
+ import tseslint from "typescript-eslint";
3
+ import prettierPlugin from "eslint-plugin-prettier";
4
+ import prettierConfig from "eslint-config-prettier";
5
+
6
+ export default [
7
+ {
8
+ ignores: [
9
+ "**/dist/**",
10
+ "**/node_modules/**",
11
+ "*.config.*",
12
+ "webpack.config.js",
13
+ "eslint.config.mjs",
14
+ "**/public/**",
15
+ ],
16
+ },
17
+
18
+ // Javascript configuration
19
+ js.configs.recommended,
20
+ {
21
+ files: ["**/*.js", "**/*.jsx"],
22
+ languageOptions: {
23
+ parserOptions: {
24
+ ecmaVersion: 2018,
25
+ sourceType: "module",
26
+ ecmaFeatures: {
27
+ jsx: true,
28
+ },
29
+ },
30
+ globals: {
31
+ React: "readonly",
32
+ window: "readonly",
33
+ document: "readonly",
34
+ localStorage: "readonly",
35
+ console: "readonly",
36
+ },
37
+ },
38
+ plugins: {
39
+ prettier: prettierPlugin,
40
+ },
41
+ rules: {
42
+ "prettier/prettier": "error",
43
+ "prefer-const": "error",
44
+ "no-console": ["error", { allow: ["warn", "error", "info"] }],
45
+ "no-unused-vars": [
46
+ "warn",
47
+ { varsIgnorePattern: "^(React|App|BookingComponent)$" },
48
+ ],
49
+ },
50
+ },
51
+
52
+ // Typescript configuration
53
+ ...tseslint.configs.recommendedTypeChecked.map((config) => ({
54
+ ...config,
55
+ files: ["**/*.ts", "**/*.tsx"],
56
+ })),
57
+ {
58
+ files: ["**/*.ts", "**/*.tsx"],
59
+ languageOptions: {
60
+ parser: tseslint.parser,
61
+ parserOptions: {
62
+ project: "./tsconfig.json",
63
+ tsconfigRootDir: import.meta.dirname,
64
+ },
65
+ },
66
+ plugins: {
67
+ "@typescript-eslint": tseslint.plugin,
68
+ prettier: prettierPlugin,
69
+ },
70
+ rules: {
71
+ "prettier/prettier": "error",
72
+ "@typescript-eslint/no-unused-vars": "warn",
73
+ "@typescript-eslint/no-explicit-any": "warn",
74
+ "@typescript-eslint/prefer-for-of": "error",
75
+ "@typescript-eslint/no-empty-function": "warn",
76
+ "@typescript-eslint/no-unsafe-member-access": "off",
77
+ "@typescript-eslint/no-unsafe-assignment": "off",
78
+ "@typescript-eslint/no-unsafe-argument": "off",
79
+ "@typescript-eslint/no-unsafe-call": "off",
80
+ "@typescript-eslint/no-unsafe-return": "off",
81
+ "@typescript-eslint/only-throw-error": "off",
82
+ "@typescript-eslint/unbound-method": "off",
83
+ "@typescript-eslint/no-floating-promises": "off",
84
+ "no-empty": "off",
85
+ "prefer-const": "error",
86
+ "no-console": ["error", { allow: ["warn", "error", "info"] }],
87
+ },
88
+ },
89
+
90
+ prettierConfig,
91
+ ];
package/package.json CHANGED
@@ -4,27 +4,30 @@
4
4
  "author": "Muster by Pinja",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "/dist/index.bundle.js",
7
- "version": "1.29.0",
7
+ "version": "1.31.0",
8
8
  "scripts": {
9
9
  "start": "webpack-dev-server",
10
10
  "build": "cross-env NODE_ENV=production OUTPUT=library webpack --progress",
11
11
  "build-web": "cross-env NODE_ENV=production webpack",
12
- "lint": "eslint --ext js,jsx,ts,tsx .",
13
- "test": "echo \"Error: no test specified\" && exit 1",
12
+ "lint": "tsc --noEmit && eslint .",
13
+ "fix-lint": "eslint . --fix",
14
+ "prettier": "npx prettier . --check",
15
+ "fix-prettier": "npx prettier . --write",
14
16
  "copywebconfig": "cp web.config dist\\web.config"
15
17
  },
16
18
  "dependencies": {
17
- "@react-google-maps/api": "^1.13.0",
18
- "@types/react": "^16.14.5",
19
- "@types/react-dom": "^16.9.12",
19
+ "@googlemaps/markerclusterer": "2.6.2",
20
+ "@types/react": "18.2.79",
21
+ "@types/react-dom": "18.2.25",
22
+ "@vis.gl/react-google-maps": "1.7.1",
20
23
  "immutable-ics": "^0.4.0",
21
24
  "js-sha256": "0.11.0",
22
25
  "mdi-react": "^5.6.0",
23
26
  "moment-timezone": "^0.5.40",
24
27
  "promise-polyfill": "^8.2.0",
25
28
  "react-bootstrap": "^1.5.2",
26
- "react-datepicker": "2.16.0",
27
- "react-select": "^3.2.0",
29
+ "react-datepicker": "4.25.0",
30
+ "react-select": "5.8.0",
28
31
  "redux": "^4.0.5",
29
32
  "whatwg-fetch": "^3.6.2"
30
33
  },
@@ -39,30 +42,34 @@
39
42
  "@babel/preset-react": "^7.12.13",
40
43
  "@babel/preset-typescript": "^7.13.0",
41
44
  "@babel/runtime": "^7.13.10",
42
- "@types/googlemaps": "^3.43.3",
45
+ "@babel/plugin-syntax-object-rest-spread": "7.8.3",
46
+ "@eslint/js": "^9.23.0",
47
+ "@types/google.maps": "3.58.1",
48
+ "@types/jasmine": "5.1.4",
43
49
  "@types/moment-timezone": "^0.5.30",
44
50
  "@types/react-redux": "^7.1.16",
45
- "@typescript-eslint/eslint-plugin": "^2.34.0",
46
- "@typescript-eslint/parser": "^1.13.0",
47
- "awesome-typescript-loader": "^5.2.1",
48
- "babel-eslint": "^10.1.0",
51
+ "ts-loader": "9.5.1",
49
52
  "babel-loader": "^8.2.2",
50
53
  "copy-webpack-plugin": "^9.0.0",
51
54
  "cross-env": "^5.2.1",
52
55
  "css-loader": "^3.6.0",
53
- "eslint": "^6.8.0",
54
- "eslint-plugin-react": "^7.23.1",
56
+ "eslint": "^9.23.0",
57
+ "eslint-config-prettier": "^10.1.8",
58
+ "eslint-plugin-prettier": "^5.5.4",
59
+ "eslint-plugin-react": "^7.37.4",
60
+ "globals": "^16.0.0",
55
61
  "html-webpack-plugin": "^5.5.0",
56
62
  "mini-css-extract-plugin": "^2.7.2",
57
63
  "react": "^18.2.0",
58
64
  "react-dom": "^18.2.0",
59
65
  "react-redux": "^7.2.3",
60
66
  "source-map-loader": "^0.2.4",
61
- "typescript": "^3.9.9",
67
+ "typescript": "^5.8.2",
68
+ "typescript-eslint": "^8.27.0",
62
69
  "webpack": "5.98.0",
63
70
  "webpack-bundle-analyzer": "4.10.2",
64
- "webpack-cli": "6.0.1",
65
- "webpack-dev-server": "5.2.1",
71
+ "webpack-cli": "^5.0.1",
72
+ "webpack-dev-server": "^4.11.1",
66
73
  "webpack-node-externals": "3.0.0"
67
74
  }
68
75
  }
package/slack.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
- "version": "1",
3
- "actions": [
4
- {
5
- "type": "pull_request",
6
- "channel": "#team-muster-dev",
7
- "enabled": false
8
- },
9
- {
10
- "type": "review_request",
11
- "channel": "#team-muster-dev"
12
- },
13
- {
14
- "type": "review_status",
15
- "channel": "#team-muster-dev"
16
- }
17
- ]
2
+ "version": "1",
3
+ "actions": [
4
+ {
5
+ "type": "pull_request",
6
+ "channel": "#team-muster-dev",
7
+ "enabled": false
8
+ },
9
+ {
10
+ "type": "review_request",
11
+ "channel": "#team-muster-dev"
12
+ },
13
+ {
14
+ "type": "review_status",
15
+ "channel": "#team-muster-dev"
16
+ }
17
+ ]
18
18
  }
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "module": "commonjs",
3
+ "esModuleInterop": true,
4
+ "resolveJsonModule": true,
5
+ "target": "es6",
6
+ "moduleResolution": "node",
7
+ "sourceMap": true,
8
+
9
+ "downlevelIteration": true,
10
+ "compilerOptions": {
11
+ "esModuleInterop": true,
12
+ "allowSyntheticDefaultImports": true,
13
+ "jsx": "react",
14
+ "skipLibCheck": true
15
+ }
16
+ }