@dr.pogodin/react-utils 1.26.3 → 1.26.4
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/build/development/shared/components/Button/index.js +3 -1
- package/build/development/shared/components/Button/index.js.map +1 -1
- package/build/development/shared/components/Throbber/index.js +4 -4
- package/build/development/shared/components/Throbber/index.js.map +1 -1
- package/build/development/web.bundle.js +2 -2
- package/build/production/shared/components/Button/index.js +1 -1
- package/build/production/shared/components/Button/index.js.map +1 -1
- package/build/production/shared/components/Throbber/index.js +1 -1
- package/build/production/shared/components/Throbber/index.js.map +1 -1
- package/build/production/web.bundle.js +1 -1
- package/build/production/web.bundle.js.map +1 -1
- package/config/webpack/app-development.d.ts +2 -0
- package/config/webpack/app-development.js +1 -4
- package/config/webpack/app-production.d.ts +4 -1
- package/config/webpack/app-production.js +1 -4
- package/config/webpack/lib-base.d.ts +2 -0
- package/config/webpack/lib-base.js +1 -1
- package/package.json +10 -10
- package/src/shared/components/Button/index.tsx +4 -1
- package/src/shared/components/Throbber/index.tsx +4 -4
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
1
2
|
import webpack from 'webpack';
|
|
2
3
|
import { type OptionsT as BaseOptionsT } from './app-base';
|
|
3
4
|
type OptionsT = BaseOptionsT & {
|
|
4
5
|
dontUseHmr?: boolean;
|
|
5
6
|
dontUseReactGlobalStateDebugging?: boolean;
|
|
7
|
+
cssExtractionOptions?: MiniCssExtractPlugin.PluginOptions;
|
|
6
8
|
};
|
|
7
9
|
/**
|
|
8
10
|
* @param ops
|
|
@@ -28,10 +28,7 @@ function configFactory(ops) {
|
|
|
28
28
|
entry.push('webpack-hot-middleware/client?reload=true');
|
|
29
29
|
entry.push(...Array.isArray(o.entry) ? o.entry : [o.entry]);
|
|
30
30
|
const plugins = [
|
|
31
|
-
new mini_css_extract_plugin_1.default({
|
|
32
|
-
chunkFilename: '[id].css',
|
|
33
|
-
filename: '[id].css',
|
|
34
|
-
}),
|
|
31
|
+
new mini_css_extract_plugin_1.default(Object.assign({ chunkFilename: '[id].css', filename: '[id].css' }, ops.cssExtractionOptions)),
|
|
35
32
|
new webpack_1.default.DefinePlugin({
|
|
36
33
|
'process.env.BABEL_ENV': JSON.stringify('development'),
|
|
37
34
|
'process.env.DEV_TOOLS': JSON.stringify(true),
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
* @module webpack/app-production
|
|
4
4
|
* @desc Production Webpack configuration for applications.
|
|
5
5
|
*/
|
|
6
|
+
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
6
7
|
import { type Configuration } from 'webpack';
|
|
7
8
|
import { type OptionsT as BaseOptionsT } from './app-base';
|
|
8
|
-
type OptionsT = BaseOptionsT
|
|
9
|
+
type OptionsT = BaseOptionsT & {
|
|
10
|
+
cssExtractionOptions?: MiniCssExtractPlugin.PluginOptions;
|
|
11
|
+
};
|
|
9
12
|
/**
|
|
10
13
|
* @param {object} ops
|
|
11
14
|
* @param {string} ops.context Base URL for resolution of relative config paths.
|
|
@@ -46,10 +46,7 @@ function configFactory(ops) {
|
|
|
46
46
|
'process.env.BABEL_ENV': JSON.stringify('production'),
|
|
47
47
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
48
48
|
}),
|
|
49
|
-
new mini_css_extract_plugin_1.default({
|
|
50
|
-
chunkFilename: '[contenthash].css',
|
|
51
|
-
filename: '[contenthash].css',
|
|
52
|
-
}),
|
|
49
|
+
new mini_css_extract_plugin_1.default(Object.assign({ chunkFilename: '[contenthash].css', filename: '[contenthash].css' }, ops.cssExtractionOptions)),
|
|
53
50
|
],
|
|
54
51
|
});
|
|
55
52
|
return res;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
1
2
|
import { type Configuration } from 'webpack';
|
|
2
3
|
export type OptionsT = {
|
|
3
4
|
babelEnv: string;
|
|
4
5
|
babelLoaderOptions?: object;
|
|
5
6
|
context: string;
|
|
7
|
+
cssExtractionOptions?: MiniCssExtractPlugin.PluginOptions;
|
|
6
8
|
cssLocalIdent?: string;
|
|
7
9
|
dontUseProgressPlugin?: boolean;
|
|
8
10
|
entry: string | string[];
|
|
@@ -17,7 +17,7 @@ const utils_1 = require("@dr.pogodin/babel-plugin-react-css-modules/utils");
|
|
|
17
17
|
*/
|
|
18
18
|
function configFactory(ops) {
|
|
19
19
|
const plugins = [
|
|
20
|
-
new mini_css_extract_plugin_1.default({ filename: 'style.css' }),
|
|
20
|
+
new mini_css_extract_plugin_1.default(Object.assign({ filename: 'style.css' }, ops.cssExtractionOptions)),
|
|
21
21
|
];
|
|
22
22
|
if (!ops.dontUseProgressPlugin)
|
|
23
23
|
plugins.push(new webpack_1.ProgressPlugin());
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.26.
|
|
2
|
+
"version": "1.26.4",
|
|
3
3
|
"bin": {
|
|
4
4
|
"react-utils-build": "bin/build.js",
|
|
5
5
|
"react-utils-setup": "bin/setup.js"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@dr.pogodin/react-global-state": "^0.10.0-alpha.5",
|
|
16
16
|
"@dr.pogodin/react-themes": "^1.5.1",
|
|
17
17
|
"@jest/environment": "^29.7.0",
|
|
18
|
-
"axios": "^1.
|
|
18
|
+
"axios": "^1.6.0",
|
|
19
19
|
"commander": "^11.1.0",
|
|
20
20
|
"compression": "^1.7.4",
|
|
21
21
|
"config": "^3.3.9",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"react": "^18.2.0",
|
|
37
37
|
"react-dom": "^18.2.0",
|
|
38
38
|
"react-helmet": "^6.1.0",
|
|
39
|
-
"react-router-dom": "^6.
|
|
39
|
+
"react-router-dom": "^6.18.0",
|
|
40
40
|
"request-ip": "^3.3.0",
|
|
41
41
|
"rimraf": "^5.0.5",
|
|
42
42
|
"serialize-javascript": "^6.0.1",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"@types/cookie-parser": "^1.4.5",
|
|
69
69
|
"@types/csurf": "^1.11.4",
|
|
70
70
|
"@types/express": "^4.17.20",
|
|
71
|
-
"@types/jest": "^29.5.
|
|
71
|
+
"@types/jest": "^29.5.7",
|
|
72
72
|
"@types/lodash": "^4.14.200",
|
|
73
73
|
"@types/morgan": "^1.9.7",
|
|
74
74
|
"@types/node-forge": "^1.3.8",
|
|
75
75
|
"@types/pretty": "^2.0.2",
|
|
76
|
-
"@types/react": "^18.2.
|
|
76
|
+
"@types/react": "^18.2.33",
|
|
77
77
|
"@types/react-dom": "^18.2.14",
|
|
78
78
|
"@types/react-helmet": "^6.1.8",
|
|
79
79
|
"@types/react-test-renderer": "^18.0.5",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"@types/supertest": "^2.0.15",
|
|
84
84
|
"@types/uuid": "^9.0.6",
|
|
85
85
|
"@types/webpack": "^5.28.4",
|
|
86
|
-
"@typescript-eslint/eslint-plugin": "^6.9.
|
|
87
|
-
"@typescript-eslint/parser": "^6.9.
|
|
86
|
+
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
|
87
|
+
"@typescript-eslint/parser": "^6.9.1",
|
|
88
88
|
"autoprefixer": "^10.4.16",
|
|
89
89
|
"babel-jest": "^29.7.0",
|
|
90
90
|
"babel-loader": "^9.1.3",
|
|
91
91
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
92
|
-
"core-js": "^3.33.
|
|
92
|
+
"core-js": "^3.33.2",
|
|
93
93
|
"css-loader": "^6.8.1",
|
|
94
94
|
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
95
95
|
"eslint": "^8.52.0",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
98
98
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
99
99
|
"eslint-plugin-import": "^2.29.0",
|
|
100
|
-
"eslint-plugin-jest": "^27.
|
|
100
|
+
"eslint-plugin-jest": "^27.6.0",
|
|
101
101
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
102
102
|
"eslint-plugin-react": "^7.33.2",
|
|
103
103
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"react-test-renderer": "^18.2.0",
|
|
117
117
|
"regenerator-runtime": "^0.14.0",
|
|
118
118
|
"resolve-url-loader": "^5.0.0",
|
|
119
|
-
"sass": "^1.69.
|
|
119
|
+
"sass": "^1.69.5",
|
|
120
120
|
"sass-loader": "^13.3.2",
|
|
121
121
|
"sitemap": "^7.1.1",
|
|
122
122
|
"stylelint": "^15.11.0",
|
|
@@ -65,11 +65,14 @@ const BaseButton: React.FunctionComponent<PropsT> = ({
|
|
|
65
65
|
</Link>
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
|
+
|
|
68
69
|
return (
|
|
69
70
|
<div
|
|
70
71
|
className={className}
|
|
71
72
|
onClick={onClick}
|
|
72
|
-
onKeyDown={onClick
|
|
73
|
+
onKeyDown={onClick && ((e) => {
|
|
74
|
+
if (e.key === 'Enter') onClick(e);
|
|
75
|
+
})}
|
|
73
76
|
onMouseDown={onMouseDown}
|
|
74
77
|
role="button"
|
|
75
78
|
tabIndex={0}
|
|
@@ -20,10 +20,10 @@ type PropsT = {
|
|
|
20
20
|
* [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)
|
|
21
21
|
*/
|
|
22
22
|
const Throbber: React.FunctionComponent<PropsT> = ({ theme }) => (
|
|
23
|
-
<span className={theme.container}
|
|
24
|
-
<span className={theme.circle}
|
|
25
|
-
<span className={theme.circle}
|
|
26
|
-
<span className={theme.circle}
|
|
23
|
+
<span className={theme.container}>
|
|
24
|
+
<span className={theme.circle} />
|
|
25
|
+
<span className={theme.circle} />
|
|
26
|
+
<span className={theme.circle} />
|
|
27
27
|
</span>
|
|
28
28
|
);
|
|
29
29
|
|