@dr.pogodin/react-utils 1.43.13 → 1.43.14
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/server/renderer.js.map +1 -1
- package/build/development/shared/components/Button/index.js +4 -1
- package/build/development/shared/components/Button/index.js.map +1 -1
- package/build/development/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -1
- package/build/development/shared/components/selectors/CustomDropdown/index.js +1 -1
- package/build/development/shared/components/selectors/CustomDropdown/index.js.map +1 -1
- package/build/development/shared/components/selectors/NativeDropdown/index.js.map +1 -1
- package/build/development/shared/utils/index.js.map +1 -1
- package/build/development/shared/utils/jest/E2eSsrEnv.js.map +1 -1
- package/build/development/shared/utils/splitComponent.js.map +1 -1
- package/build/development/web.bundle.js +4 -4
- package/build/production/server/renderer.js.map +1 -1
- package/build/production/shared/components/Button/index.js +2 -2
- package/build/production/shared/components/Button/index.js.map +1 -1
- package/build/production/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -1
- package/build/production/shared/components/selectors/CustomDropdown/index.js +1 -1
- package/build/production/shared/components/selectors/CustomDropdown/index.js.map +1 -1
- package/build/production/shared/components/selectors/NativeDropdown/index.js.map +1 -1
- package/build/production/shared/utils/index.js.map +1 -1
- package/build/production/shared/utils/jest/E2eSsrEnv.js.map +1 -1
- package/build/production/shared/utils/splitComponent.js.map +1 -1
- package/build/production/web.bundle.js +1 -1
- package/build/production/web.bundle.js.map +1 -1
- package/build/types-code/server/renderer.d.ts +1 -1
- package/build/types-code/shared/components/Button/index.d.ts +4 -3
- package/build/types-code/shared/utils/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/server/renderer.tsx +5 -6
- package/src/shared/components/Button/index.tsx +15 -5
- package/src/shared/components/selectors/CustomDropdown/Options/index.tsx +2 -2
- package/src/shared/components/selectors/CustomDropdown/index.tsx +2 -2
- package/src/shared/components/selectors/NativeDropdown/index.tsx +2 -2
- package/src/shared/utils/index.ts +1 -1
- package/src/shared/utils/jest/E2eSsrEnv.ts +3 -3
- package/src/shared/utils/splitComponent.tsx +1 -1
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Request, RequestHandler } from 'express';
|
|
5
5
|
import type { ComponentType } from 'react';
|
|
6
|
+
import type { Configuration } from 'webpack';
|
|
6
7
|
import winston from 'winston';
|
|
7
8
|
import { SsrContext } from '@dr.pogodin/react-global-state';
|
|
8
9
|
import { type BuildInfoT } from '../shared/utils/isomorphy/buildInfo';
|
|
9
10
|
import type { ChunkGroupsT, SsrContextT } from '../shared/utils/globalState';
|
|
10
|
-
import type { Configuration } from 'webpack';
|
|
11
11
|
interface LogMethodI {
|
|
12
12
|
(level: string, message: string, ...meta: unknown[]): void;
|
|
13
13
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { FunctionComponent, PointerEventHandler, ReactNode } from 'react';
|
|
1
|
+
import type { FunctionComponent, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
3
|
type PropsT = {
|
|
4
4
|
active?: boolean;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
enforceA?: boolean;
|
|
8
|
-
onClick?:
|
|
9
|
-
onMouseDown?:
|
|
8
|
+
onClick?: MouseEventHandler & KeyboardEventHandler;
|
|
9
|
+
onMouseDown?: MouseEventHandler;
|
|
10
|
+
onMouseUp?: MouseEventHandler;
|
|
10
11
|
onPointerDown?: PointerEventHandler;
|
|
11
12
|
openNewTab?: boolean;
|
|
12
13
|
replace?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import themedImpl, {
|
|
1
|
+
import themedImpl, { COMPOSE, PRIORITY, type Theme, ThemeProvider } from '@dr.pogodin/react-themes';
|
|
2
2
|
import config from './config';
|
|
3
3
|
import * as isomorphy from './isomorphy';
|
|
4
4
|
import time from './time';
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.43.
|
|
2
|
+
"version": "1.43.14",
|
|
3
3
|
"bin": {
|
|
4
4
|
"react-utils-build": "bin/build.js",
|
|
5
5
|
"react-utils-setup": "bin/setup.js"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@babel/runtime": "^7.27.1",
|
|
12
|
-
"@dr.pogodin/babel-plugin-react-css-modules": "^6.13.
|
|
13
|
-
"@dr.pogodin/csurf": "^1.16.
|
|
12
|
+
"@dr.pogodin/babel-plugin-react-css-modules": "^6.13.6",
|
|
13
|
+
"@dr.pogodin/csurf": "^1.16.4",
|
|
14
14
|
"@dr.pogodin/js-utils": "^0.0.18",
|
|
15
15
|
"@dr.pogodin/react-global-state": "^0.19.2",
|
|
16
16
|
"@dr.pogodin/react-helmet": "^3.0.2",
|
|
@@ -54,25 +54,25 @@
|
|
|
54
54
|
"@babel/preset-react": "^7.27.1",
|
|
55
55
|
"@babel/preset-typescript": "^7.27.1",
|
|
56
56
|
"@babel/register": "^7.27.1",
|
|
57
|
-
"@dr.pogodin/babel-plugin-transform-assets": "^1.2.
|
|
58
|
-
"@dr.pogodin/babel-preset-svgr": "^1.9.
|
|
59
|
-
"@dr.pogodin/eslint-configs": "^0.0.
|
|
57
|
+
"@dr.pogodin/babel-plugin-transform-assets": "^1.2.5",
|
|
58
|
+
"@dr.pogodin/babel-preset-svgr": "^1.9.1",
|
|
59
|
+
"@dr.pogodin/eslint-configs": "^0.0.7",
|
|
60
60
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.0",
|
|
61
61
|
"@testing-library/dom": "^10.4.0",
|
|
62
62
|
"@testing-library/react": "^16.3.0",
|
|
63
63
|
"@testing-library/user-event": "^14.6.1",
|
|
64
64
|
"@tsconfig/recommended": "^1.0.8",
|
|
65
|
-
"@types/compression": "^1.
|
|
65
|
+
"@types/compression": "^1.8.0",
|
|
66
66
|
"@types/config": "^3.3.5",
|
|
67
67
|
"@types/cookie": "^0.6.0",
|
|
68
68
|
"@types/cookie-parser": "^1.4.8",
|
|
69
69
|
"@types/express": "^5.0.2",
|
|
70
70
|
"@types/jest": "^29.5.14",
|
|
71
|
-
"@types/lodash": "^4.17.
|
|
71
|
+
"@types/lodash": "^4.17.17",
|
|
72
72
|
"@types/morgan": "^1.9.9",
|
|
73
73
|
"@types/node-forge": "^1.3.11",
|
|
74
74
|
"@types/pretty": "^2.0.3",
|
|
75
|
-
"@types/react": "^19.1.
|
|
75
|
+
"@types/react": "^19.1.5",
|
|
76
76
|
"@types/react-dom": "^19.1.5",
|
|
77
77
|
"@types/request-ip": "^0.0.41",
|
|
78
78
|
"@types/serialize-javascript": "^5.0.4",
|
package/src/server/renderer.tsx
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import fs from 'fs';
|
|
6
6
|
import path from 'path';
|
|
7
|
+
import { Writable } from 'stream';
|
|
8
|
+
import { brotliCompress, brotliDecompress } from 'zlib';
|
|
7
9
|
|
|
8
10
|
import type { Request, RequestHandler } from 'express';
|
|
9
11
|
import type { ComponentType } from 'react';
|
|
10
|
-
import {
|
|
11
|
-
import { brotliCompress, brotliDecompress } from 'zlib';
|
|
12
|
+
import type { Configuration, Stats } from 'webpack';
|
|
12
13
|
import winston from 'winston';
|
|
13
14
|
|
|
14
15
|
import { GlobalStateProvider, SsrContext } from '@dr.pogodin/react-global-state';
|
|
@@ -18,8 +19,8 @@ import {
|
|
|
18
19
|
clone,
|
|
19
20
|
cloneDeep,
|
|
20
21
|
defaults,
|
|
21
|
-
isString,
|
|
22
22
|
get,
|
|
23
|
+
isString,
|
|
23
24
|
mapValues,
|
|
24
25
|
omit,
|
|
25
26
|
} from 'lodash';
|
|
@@ -28,15 +29,13 @@ import config from 'config';
|
|
|
28
29
|
import forge from 'node-forge';
|
|
29
30
|
|
|
30
31
|
import { prerenderToNodeStream } from 'react-dom/static';
|
|
31
|
-
import {
|
|
32
|
+
import { type HelmetDataContext, HelmetProvider } from '@dr.pogodin/react-helmet';
|
|
32
33
|
import { StaticRouter } from 'react-router';
|
|
33
34
|
import serializeJs from 'serialize-javascript';
|
|
34
35
|
import { type BuildInfoT, setBuildInfo } from 'utils/isomorphy/buildInfo';
|
|
35
36
|
|
|
36
37
|
import type { ChunkGroupsT, SsrContextT } from 'utils/globalState';
|
|
37
38
|
|
|
38
|
-
import type { Configuration, Stats } from 'webpack';
|
|
39
|
-
|
|
40
39
|
import Cache from './Cache';
|
|
41
40
|
|
|
42
41
|
const sanitizedConfig = omit(config, 'SECRET');
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
// The <Button> component implements a standard button / button-like link.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type {
|
|
4
|
+
FunctionComponent,
|
|
5
|
+
KeyboardEventHandler,
|
|
6
|
+
MouseEventHandler,
|
|
7
|
+
PointerEventHandler,
|
|
8
|
+
ReactNode,
|
|
9
|
+
} from 'react';
|
|
6
10
|
|
|
7
11
|
import themed, { type Theme } from '@dr.pogodin/react-themes';
|
|
8
12
|
|
|
13
|
+
import Link from 'components/Link';
|
|
14
|
+
|
|
9
15
|
import defaultTheme from './style.scss';
|
|
10
16
|
|
|
11
17
|
type PropsT = {
|
|
@@ -13,8 +19,9 @@ type PropsT = {
|
|
|
13
19
|
children?: ReactNode;
|
|
14
20
|
disabled?: boolean;
|
|
15
21
|
enforceA?: boolean;
|
|
16
|
-
onClick?:
|
|
17
|
-
onMouseDown?:
|
|
22
|
+
onClick?: MouseEventHandler & KeyboardEventHandler;
|
|
23
|
+
onMouseDown?: MouseEventHandler;
|
|
24
|
+
onMouseUp?: MouseEventHandler;
|
|
18
25
|
onPointerDown?: PointerEventHandler;
|
|
19
26
|
openNewTab?: boolean;
|
|
20
27
|
replace?: boolean;
|
|
@@ -31,6 +38,7 @@ export const BaseButton: FunctionComponent<PropsT> = ({
|
|
|
31
38
|
enforceA,
|
|
32
39
|
onClick,
|
|
33
40
|
onMouseDown,
|
|
41
|
+
onMouseUp,
|
|
34
42
|
onPointerDown,
|
|
35
43
|
openNewTab,
|
|
36
44
|
replace,
|
|
@@ -59,6 +67,7 @@ export const BaseButton: FunctionComponent<PropsT> = ({
|
|
|
59
67
|
enforceA={enforceA}
|
|
60
68
|
onClick={onClick}
|
|
61
69
|
onMouseDown={onMouseDown}
|
|
70
|
+
onMouseUp={onMouseUp}
|
|
62
71
|
onPointerDown={onPointerDown}
|
|
63
72
|
openNewTab={openNewTab}
|
|
64
73
|
replace={replace}
|
|
@@ -78,6 +87,7 @@ export const BaseButton: FunctionComponent<PropsT> = ({
|
|
|
78
87
|
if (e.key === 'Enter') onClick(e);
|
|
79
88
|
} : undefined}
|
|
80
89
|
onMouseDown={onMouseDown}
|
|
90
|
+
onMouseUp={onMouseUp}
|
|
81
91
|
onPointerDown={onPointerDown}
|
|
82
92
|
role="button"
|
|
83
93
|
tabIndex={0}
|
|
@@ -8,8 +8,6 @@ import {
|
|
|
8
8
|
|
|
9
9
|
import { BaseModal } from 'components/Modal';
|
|
10
10
|
|
|
11
|
-
import S from './style.scss';
|
|
12
|
-
|
|
13
11
|
import {
|
|
14
12
|
type OptionT,
|
|
15
13
|
type OptionsT,
|
|
@@ -17,6 +15,8 @@ import {
|
|
|
17
15
|
optionValueName,
|
|
18
16
|
} from '../../common';
|
|
19
17
|
|
|
18
|
+
import S from './style.scss';
|
|
19
|
+
|
|
20
20
|
export type ContainerPosT = {
|
|
21
21
|
left: number;
|
|
22
22
|
top: number;
|
|
@@ -2,12 +2,12 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import themed from '@dr.pogodin/react-themes';
|
|
4
4
|
|
|
5
|
+
import { type PropsT, type ValueT, optionValueName } from '../common';
|
|
6
|
+
|
|
5
7
|
import Options, { type ContainerPosT, type RefT, areEqual } from './Options';
|
|
6
8
|
|
|
7
9
|
import defaultTheme from './theme.scss';
|
|
8
10
|
|
|
9
|
-
import { type PropsT, type ValueT, optionValueName } from '../common';
|
|
10
|
-
|
|
11
11
|
const BaseCustomDropdown: React.FunctionComponent<
|
|
12
12
|
PropsT<React.ReactNode, (value: ValueT) => void>
|
|
13
13
|
> = ({
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import themed from '@dr.pogodin/react-themes';
|
|
4
4
|
|
|
5
|
-
import defaultTheme from './theme.scss';
|
|
6
|
-
|
|
7
5
|
import { type PropsT, optionValueName } from '../common';
|
|
8
6
|
|
|
7
|
+
import defaultTheme from './theme.scss';
|
|
8
|
+
|
|
9
9
|
/**
|
|
10
10
|
* Implements a themeable dropdown list. Internally it is rendered with help of
|
|
11
11
|
* the standard HTML `<select>` element, thus the styling support is somewhat
|
|
@@ -28,17 +28,17 @@ import type { ReactNode } from 'react';
|
|
|
28
28
|
import register from '@babel/register/experimental-worker';
|
|
29
29
|
|
|
30
30
|
import JsdomEnv from 'jest-environment-jsdom';
|
|
31
|
-
import {
|
|
31
|
+
import { Volume, createFsFromVolume } from 'memfs';
|
|
32
32
|
import webpack, { type Configuration } from 'webpack';
|
|
33
33
|
/* eslint-enable import/no-extraneous-dependencies */
|
|
34
34
|
|
|
35
|
-
import ssrFactory from 'server/renderer';
|
|
36
|
-
|
|
37
35
|
import type {
|
|
38
36
|
EnvironmentContext,
|
|
39
37
|
JestEnvironmentConfig,
|
|
40
38
|
} from '@jest/environment';
|
|
41
39
|
|
|
40
|
+
import ssrFactory from 'server/renderer';
|
|
41
|
+
|
|
42
42
|
import { setBuildInfo } from '../isomorphy/buildInfo';
|
|
43
43
|
|
|
44
44
|
export default class E2eSsrEnv extends JsdomEnv {
|