@dr.pogodin/react-utils 1.35.3 → 1.36.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.
- package/LICENSE.md +1 -1
- package/bin/build.js +7 -6
- package/build/development/client/getInj.js +3 -10
- package/build/development/client/getInj.js.map +1 -1
- package/build/development/client/index.js +2 -9
- package/build/development/client/index.js.map +1 -1
- package/build/development/index.js +1 -15
- package/build/development/index.js.map +1 -1
- package/build/development/server/Cache.js +19 -19
- package/build/development/server/Cache.js.map +1 -1
- package/build/development/server/renderer.js +7 -4
- package/build/development/server/renderer.js.map +1 -1
- package/build/development/server/server.js +4 -1
- package/build/development/server/server.js.map +1 -1
- package/build/development/shared/components/Button/index.js +1 -16
- package/build/development/shared/components/Button/index.js.map +1 -1
- package/build/development/shared/components/Checkbox/index.js +1 -29
- package/build/development/shared/components/Checkbox/index.js.map +1 -1
- package/build/development/shared/components/GenericLink/index.js +0 -15
- package/build/development/shared/components/GenericLink/index.js.map +1 -1
- package/build/development/shared/components/Input/index.js +1 -8
- package/build/development/shared/components/Input/index.js.map +1 -1
- package/build/development/shared/components/MetaTags.js +0 -12
- package/build/development/shared/components/MetaTags.js.map +1 -1
- package/build/development/shared/components/Modal/index.js +2 -13
- package/build/development/shared/components/Modal/index.js.map +1 -1
- package/build/development/shared/components/PageLayout/index.js +1 -10
- package/build/development/shared/components/PageLayout/index.js.map +1 -1
- package/build/development/shared/components/TextArea/index.js +1 -12
- package/build/development/shared/components/TextArea/index.js.map +1 -1
- package/build/development/shared/components/Throbber/index.js +1 -6
- package/build/development/shared/components/Throbber/index.js.map +1 -1
- package/build/development/shared/components/WithTooltip/Tooltip.js +1 -8
- package/build/development/shared/components/WithTooltip/Tooltip.js.map +1 -1
- package/build/development/shared/components/WithTooltip/index.js +1 -9
- package/build/development/shared/components/WithTooltip/index.js.map +1 -1
- package/build/development/shared/components/YouTubeVideo/index.js +2 -11
- package/build/development/shared/components/YouTubeVideo/index.js.map +1 -1
- package/build/development/shared/components/selectors/CustomDropdown/Options/index.js +1 -16
- package/build/development/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -1
- package/build/development/shared/components/selectors/CustomDropdown/index.js +2 -12
- package/build/development/shared/components/selectors/CustomDropdown/index.js.map +1 -1
- package/build/development/shared/components/selectors/NativeDropdown/index.js +2 -12
- package/build/development/shared/components/selectors/NativeDropdown/index.js.map +1 -1
- package/build/development/shared/components/selectors/Switch/index.js +21 -28
- package/build/development/shared/components/selectors/Switch/index.js.map +1 -1
- package/build/development/shared/components/selectors/common.js +0 -19
- package/build/development/shared/components/selectors/common.js.map +1 -1
- package/build/development/shared/components/selectors/index.js +0 -13
- package/build/development/shared/components/selectors/index.js.map +1 -1
- package/build/development/shared/utils/globalState.js.map +1 -1
- package/build/development/shared/utils/jest/index.js +4 -2
- package/build/development/shared/utils/jest/index.js.map +1 -1
- package/build/development/shared/utils/splitComponent.js +21 -28
- package/build/development/shared/utils/splitComponent.js.map +1 -1
- package/build/development/web.bundle.js +28 -38
- package/build/production/client/getInj.js +3 -7
- package/build/production/client/getInj.js.map +1 -1
- package/build/production/client/index.js +1 -1
- package/build/production/client/index.js.map +1 -1
- package/build/production/index.js +1 -4
- package/build/production/index.js.map +1 -1
- package/build/production/server/Cache.js +3 -3
- package/build/production/server/Cache.js.map +1 -1
- package/build/production/server/renderer.js +2 -2
- package/build/production/server/renderer.js.map +1 -1
- package/build/production/server/server.js +1 -1
- package/build/production/server/server.js.map +1 -1
- package/build/production/shared/components/Button/index.js +3 -3
- package/build/production/shared/components/Button/index.js.map +1 -1
- package/build/production/shared/components/Checkbox/index.js +1 -16
- package/build/production/shared/components/Checkbox/index.js.map +1 -1
- package/build/production/shared/components/GenericLink/index.js +2 -2
- package/build/production/shared/components/GenericLink/index.js.map +1 -1
- package/build/production/shared/components/Input/index.js +2 -2
- package/build/production/shared/components/Input/index.js.map +1 -1
- package/build/production/shared/components/MetaTags.js +2 -2
- package/build/production/shared/components/MetaTags.js.map +1 -1
- package/build/production/shared/components/Modal/index.js +2 -2
- package/build/production/shared/components/Modal/index.js.map +1 -1
- package/build/production/shared/components/PageLayout/index.js +2 -2
- package/build/production/shared/components/PageLayout/index.js.map +1 -1
- package/build/production/shared/components/TextArea/index.js +2 -2
- package/build/production/shared/components/TextArea/index.js.map +1 -1
- package/build/production/shared/components/Throbber/index.js +2 -2
- package/build/production/shared/components/Throbber/index.js.map +1 -1
- package/build/production/shared/components/WithTooltip/Tooltip.js +3 -3
- package/build/production/shared/components/WithTooltip/Tooltip.js.map +1 -1
- package/build/production/shared/components/WithTooltip/index.js +2 -2
- package/build/production/shared/components/WithTooltip/index.js.map +1 -1
- package/build/production/shared/components/YouTubeVideo/index.js +3 -3
- package/build/production/shared/components/YouTubeVideo/index.js.map +1 -1
- package/build/production/shared/components/selectors/CustomDropdown/Options/index.js +2 -2
- package/build/production/shared/components/selectors/CustomDropdown/Options/index.js.map +1 -1
- package/build/production/shared/components/selectors/CustomDropdown/index.js +2 -2
- package/build/production/shared/components/selectors/CustomDropdown/index.js.map +1 -1
- package/build/production/shared/components/selectors/NativeDropdown/index.js +3 -3
- package/build/production/shared/components/selectors/NativeDropdown/index.js.map +1 -1
- package/build/production/shared/components/selectors/Switch/index.js +1 -1
- package/build/production/shared/components/selectors/Switch/index.js.map +1 -1
- package/build/production/shared/components/selectors/common.js +2 -4
- package/build/production/shared/components/selectors/common.js.map +1 -1
- package/build/production/shared/components/selectors/index.js +1 -1
- package/build/production/shared/components/selectors/index.js.map +1 -1
- package/build/production/shared/utils/globalState.js.map +1 -1
- package/build/production/shared/utils/jest/index.js +1 -1
- package/build/production/shared/utils/jest/index.js.map +1 -1
- package/build/production/shared/utils/splitComponent.js +10 -12
- 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/client/getInj.d.ts +0 -6
- package/build/types-code/client/index.d.ts +1 -2
- package/build/types-code/index.d.ts +2 -3
- package/build/types-code/server/Cache.d.ts +3 -11
- package/build/types-code/server/index.d.ts +0 -2
- package/build/types-code/server/renderer.d.ts +0 -1
- package/build/types-code/server/server.d.ts +0 -1
- package/build/types-code/shared/components/Button/index.d.ts +3 -4
- package/build/types-code/shared/components/Checkbox/index.d.ts +3 -12
- package/build/types-code/shared/components/Input/index.d.ts +4 -5
- package/build/types-code/shared/components/Link.d.ts +0 -1
- package/build/types-code/shared/components/Modal/index.d.ts +3 -4
- package/build/types-code/shared/components/NavLink.d.ts +0 -1
- package/build/types-code/shared/components/PageLayout/index.d.ts +4 -4
- package/build/types-code/shared/components/TextArea/index.d.ts +4 -5
- package/build/types-code/shared/components/Throbber/index.d.ts +4 -4
- package/build/types-code/shared/components/WithTooltip/Tooltip.d.ts +1 -1
- package/build/types-code/shared/components/WithTooltip/index.d.ts +2 -3
- package/build/types-code/shared/components/YouTubeVideo/index.d.ts +3 -4
- package/build/types-code/shared/components/selectors/CustomDropdown/Options/index.d.ts +1 -2
- package/build/types-code/shared/components/selectors/CustomDropdown/index.d.ts +2 -3
- package/build/types-code/shared/components/selectors/NativeDropdown/index.d.ts +2 -2
- package/build/types-code/shared/components/selectors/Switch/index.d.ts +4 -5
- package/build/types-code/shared/components/selectors/common.d.ts +5 -11
- package/build/types-code/shared/components/selectors/index.d.ts +1 -1
- package/build/types-code/shared/utils/globalState.d.ts +6 -2
- package/build/types-code/shared/utils/jest/index.d.ts +4 -1
- package/build/types-code/shared/utils/splitComponent.d.ts +0 -1
- package/build/types-code/shared/utils/webpack.d.ts +0 -1
- package/config/babel/node-ssr.js +1 -1
- package/config/babel/webpack.js +1 -1
- package/config/eslint/default.json +1 -0
- package/config/eslint/jest.json +1 -0
- package/config/eslint/typescript.js +7 -0
- package/config/typescript/base.json +9 -0
- package/config/webpack/app-base.d.ts +0 -1
- package/config/webpack/app-base.js +1 -1
- package/config/webpack/app-development.js +1 -1
- package/config/webpack/app-production.js +1 -1
- package/config/webpack/lib-base.js +1 -2
- package/config/webpack/lib-development.js +1 -1
- package/config/webpack/lib-production.js +1 -1
- package/package.json +28 -27
- package/src/client/getInj.ts +3 -9
- package/src/client/index.tsx +1 -3
- package/src/index.ts +1 -10
- package/src/server/Cache.ts +31 -30
- package/src/server/renderer.tsx +8 -5
- package/src/server/server.ts +6 -1
- package/src/shared/components/Button/index.tsx +2 -20
- package/src/shared/components/Checkbox/index.tsx +2 -37
- package/src/shared/components/GenericLink/index.tsx +0 -15
- package/src/shared/components/Input/index.tsx +6 -15
- package/src/shared/components/MetaTags.tsx +0 -12
- package/src/shared/components/Modal/index.tsx +3 -22
- package/src/shared/components/PageLayout/index.tsx +8 -24
- package/src/shared/components/TextArea/index.tsx +6 -24
- package/src/shared/components/Throbber/index.tsx +6 -18
- package/src/shared/components/WithTooltip/Tooltip.tsx +6 -14
- package/src/shared/components/WithTooltip/index.tsx +3 -24
- package/src/shared/components/YouTubeVideo/index.tsx +3 -20
- package/src/shared/components/selectors/CustomDropdown/Options/index.tsx +2 -20
- package/src/shared/components/selectors/CustomDropdown/index.tsx +3 -27
- package/src/shared/components/selectors/NativeDropdown/index.tsx +3 -27
- package/src/shared/components/selectors/Switch/index.tsx +34 -50
- package/src/shared/components/selectors/common.ts +13 -45
- package/src/shared/components/selectors/index.ts +0 -2
- package/src/shared/utils/globalState.ts +6 -0
- package/src/shared/utils/jest/index.tsx +13 -2
- package/src/shared/utils/splitComponent.tsx +24 -29
- package/tsconfig.configs.json +7 -3
- package/tsconfig.json +3 -10
- package/tsconfig.types.json +1 -7
- package/tstyche.config.json +6 -0
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import 'node-forge/lib/aes';
|
|
2
2
|
import type { InjT } from '../shared/utils/globalState';
|
|
3
3
|
export default function getInj(): InjT;
|
|
4
|
-
/**
|
|
5
|
-
* Allows to set a custom injection object instance,
|
|
6
|
-
* for server-less scenarios, for example, where it is not auto-injected
|
|
7
|
-
* into generated pages from the server side.
|
|
8
|
-
*/
|
|
9
|
-
export declare function setInj(value: InjT): void;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { type ComponentType } from 'react';
|
|
2
|
-
import { setInj } from './getInj';
|
|
3
2
|
type OptionsT = {
|
|
4
3
|
dontHydrate?: boolean;
|
|
5
4
|
initialState?: any;
|
|
6
5
|
};
|
|
7
|
-
export { setInj };
|
|
8
6
|
/**
|
|
9
7
|
* Prepares and launches the app at client side.
|
|
10
8
|
* @param Application Root application component
|
|
11
9
|
* @param [options={}] Optional. Additional settings.
|
|
12
10
|
*/
|
|
13
11
|
export default function Launch(Application: ComponentType, options?: OptionsT): void;
|
|
12
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import 'styles/global.scss';
|
|
2
2
|
import type ServerT from './server';
|
|
3
|
-
declare const server: typeof ServerT | null;
|
|
4
|
-
declare
|
|
3
|
+
declare const server: (typeof ServerT) | null;
|
|
4
|
+
declare const client: any;
|
|
5
5
|
export { default as api } from 'axios';
|
|
6
|
-
export * as PT from 'prop-types';
|
|
7
6
|
export { type AsyncCollectionLoaderT, type AsyncDataEnvelopeT, type AsyncDataLoaderT, type ForceT, type UseAsyncDataOptionsT, type UseAsyncDataResT, type UseGlobalStateResT, type ValueOrInitializerT, getGlobalState, GlobalStateProvider, newAsyncDataEnvelope, useAsyncCollection, useAsyncData, useGlobalState, withGlobalStateType, } from '@dr.pogodin/react-global-state';
|
|
8
7
|
export * from './shared/components';
|
|
9
8
|
export { type Listener, type Theme, config, Barrier, Emitter, isomorphy, getSsrContext, Semaphore, splitComponent, themed, ThemeProvider, time, webpack, withRetries, } from './shared/utils';
|
|
@@ -2,17 +2,9 @@
|
|
|
2
2
|
* Implements the static cache.
|
|
3
3
|
*/
|
|
4
4
|
export default class Cache<DatumT> {
|
|
5
|
-
private
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
data: DatumT;
|
|
9
|
-
size: number;
|
|
10
|
-
timestamp: number;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
maxSize: number;
|
|
14
|
-
size: number;
|
|
15
|
-
};
|
|
5
|
+
private items;
|
|
6
|
+
private maxSize;
|
|
7
|
+
private size;
|
|
16
8
|
constructor(maxSize: number);
|
|
17
9
|
/**
|
|
18
10
|
* Cache lookup.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
|
-
declare const validThemeKeys: readonly ["active", "button", "disabled"];
|
|
4
3
|
type PropsT = {
|
|
5
4
|
active?: boolean;
|
|
6
5
|
children?: ReactNode;
|
|
@@ -10,7 +9,7 @@ type PropsT = {
|
|
|
10
9
|
onMouseDown?: React.MouseEventHandler;
|
|
11
10
|
openNewTab?: boolean;
|
|
12
11
|
replace?: boolean;
|
|
13
|
-
theme: Theme<
|
|
12
|
+
theme: Theme<'active' | 'button' | 'disabled'>;
|
|
14
13
|
to?: object | string;
|
|
15
14
|
};
|
|
16
15
|
export declare const BaseButton: React.FunctionComponent<PropsT>;
|
|
@@ -21,5 +20,5 @@ export declare const BaseButton: React.FunctionComponent<PropsT>;
|
|
|
21
20
|
* @prop {string} [button] to the root element of any button.
|
|
22
21
|
* @prop {string} [disabled] to the root element of disabled button.
|
|
23
22
|
*/
|
|
24
|
-
declare const
|
|
25
|
-
export default
|
|
23
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropsT>;
|
|
24
|
+
export default _default;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
|
-
declare const validThemeKeys: readonly ["checkbox", "container", "label"];
|
|
4
2
|
type PropT = {
|
|
5
3
|
checked?: boolean;
|
|
6
4
|
label?: React.ReactNode;
|
|
7
5
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
8
|
-
theme: Theme<
|
|
6
|
+
theme: Theme<'checkbox' | 'container' | 'label'>;
|
|
9
7
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* CSS classes to append to its elements:
|
|
13
|
-
* @prop [checkbox] to the underlying checkbox `<input>` element.
|
|
14
|
-
* @prop [container] to the root checkbox element.
|
|
15
|
-
* @prop [label] to the checkbox label element.
|
|
16
|
-
*/
|
|
17
|
-
declare const ThemedCheckbox: import("@dr.pogodin/react-themes").ThemedComponent<PropT>;
|
|
18
|
-
export default ThemedCheckbox;
|
|
8
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropT>;
|
|
9
|
+
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
|
-
|
|
4
|
-
declare const
|
|
2
|
+
type ThemeKeyT = 'container' | 'input' | 'label';
|
|
3
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
5
4
|
label?: React.ReactNode;
|
|
6
|
-
theme: Theme<
|
|
5
|
+
theme: Theme<ThemeKeyT>;
|
|
7
6
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
8
|
-
export default
|
|
7
|
+
export default _default;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* - User opts to open the reference in a new tab;
|
|
6
6
|
* - User explicitely opts to use <a>.
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="react" />
|
|
9
8
|
import { type PropsT as GenericLinkPropsT } from './GenericLink';
|
|
10
9
|
type PropsT = Omit<GenericLinkPropsT, 'routerLinkType'>;
|
|
11
10
|
declare const Link: React.FunctionComponent<PropsT>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
|
-
declare const validThemeKeys: readonly ["container", "overlay"];
|
|
4
3
|
type PropsT = {
|
|
5
4
|
cancelOnScrolling?: boolean;
|
|
6
5
|
children?: ReactNode;
|
|
7
6
|
containerStyle?: React.CSSProperties;
|
|
8
7
|
dontDisableScrolling?: boolean;
|
|
9
8
|
onCancel?: () => void;
|
|
10
|
-
theme: Theme<
|
|
9
|
+
theme: Theme<'container' | 'overlay'>;
|
|
11
10
|
};
|
|
12
11
|
/**
|
|
13
12
|
* The `<Modal>` component implements a simple themeable modal window, wrapped
|
|
@@ -21,6 +20,6 @@ type PropsT = {
|
|
|
21
20
|
* @param {ModalTheme} [props.theme] _Ad hoc_ theme.
|
|
22
21
|
*/
|
|
23
22
|
declare const BaseModal: React.FunctionComponent<PropsT>;
|
|
24
|
-
declare const
|
|
25
|
-
export default
|
|
23
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropsT>;
|
|
24
|
+
export default _default;
|
|
26
25
|
export { BaseModal };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
|
-
|
|
3
|
+
type ThemeKeyT = 'container' | 'leftSidePanel' | 'mainPanel' | 'rightSidePanel' | 'sidePanel';
|
|
4
4
|
type PropsT = {
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
leftSidePanelContent?: ReactNode;
|
|
7
7
|
rightSidePanelContent?: ReactNode;
|
|
8
|
-
theme: Theme<
|
|
8
|
+
theme: Theme<ThemeKeyT>;
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropsT>;
|
|
11
|
+
export default _default;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
|
-
|
|
2
|
+
type ThemeKeyT = 'container' | 'hidden' | 'textarea';
|
|
4
3
|
type Props = {
|
|
5
4
|
disabled?: boolean;
|
|
6
5
|
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
7
6
|
onKeyDown?: React.KeyboardEventHandler<HTMLTextAreaElement>;
|
|
8
7
|
placeholder?: string;
|
|
9
|
-
theme: Theme<
|
|
8
|
+
theme: Theme<ThemeKeyT>;
|
|
10
9
|
value?: string;
|
|
11
10
|
};
|
|
12
|
-
declare const
|
|
13
|
-
export default
|
|
11
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<Props>;
|
|
12
|
+
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
2
|
-
|
|
2
|
+
type ThemeKeyT = 'bouncing' | 'circle' | 'container';
|
|
3
3
|
type PropsT = {
|
|
4
|
-
theme: Theme<
|
|
4
|
+
theme: Theme<ThemeKeyT>;
|
|
5
5
|
};
|
|
6
|
-
declare const
|
|
7
|
-
export default
|
|
6
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropsT>;
|
|
7
|
+
export default _default;
|
|
@@ -10,7 +10,7 @@ export declare enum PLACEMENTS {
|
|
|
10
10
|
BELOW_CURSOR = "BELOW_CURSOR",
|
|
11
11
|
BELOW_ELEMENT = "BELOW_ELEMENT"
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type ThemeKeysT = 'appearance' | 'arrow' | 'content' | 'container';
|
|
14
14
|
declare const Tooltip: React.ForwardRefExoticComponent<{
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
theme: any;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
|
-
import { PLACEMENTS } from './Tooltip';
|
|
4
|
-
declare const validThemeKeys: readonly ["appearance", "arrow", "content", "container", "wrapper"];
|
|
3
|
+
import { type ThemeKeysT as TooltipThemeKeysT, PLACEMENTS } from './Tooltip';
|
|
5
4
|
type PropsT = {
|
|
6
5
|
children?: ReactNode;
|
|
7
6
|
placement?: PLACEMENTS;
|
|
8
7
|
tip?: ReactNode;
|
|
9
|
-
theme: Theme<
|
|
8
|
+
theme: Theme<'wrapper' | TooltipThemeKeysT>;
|
|
10
9
|
};
|
|
11
10
|
declare const ThemedWrapper: import("@dr.pogodin/react-themes").ThemedComponent<PropsT>;
|
|
12
11
|
type ExportT = typeof ThemedWrapper & {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
2
|
-
|
|
3
|
-
type ComponentThemeT = Theme<typeof validThemeKeys>;
|
|
2
|
+
type ComponentThemeT = Theme<'container' | 'video'>;
|
|
4
3
|
type PropsT = {
|
|
5
4
|
autoplay?: boolean;
|
|
6
5
|
src: string;
|
|
7
6
|
theme: ComponentThemeT;
|
|
8
7
|
title?: string;
|
|
9
8
|
};
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
9
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropsT>;
|
|
10
|
+
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type OptionT, type OptionsT, type ValueT } from '../../common';
|
|
3
2
|
export type ContainerPosT = {
|
|
4
3
|
left: number;
|
|
@@ -14,7 +13,7 @@ type PropsT = {
|
|
|
14
13
|
containerStyle?: ContainerPosT;
|
|
15
14
|
filter?: (item: OptionT<React.ReactNode> | ValueT) => boolean;
|
|
16
15
|
optionClass: string;
|
|
17
|
-
options: OptionsT<React.ReactNode
|
|
16
|
+
options: Readonly<OptionsT<React.ReactNode>>;
|
|
18
17
|
onCancel: () => void;
|
|
19
18
|
onChange: (value: ValueT) => void;
|
|
20
19
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type PropsT, type ValueT } from '../common';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
2
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropsT<React.ReactNode, (value: ValueT) => void>>;
|
|
3
|
+
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type PropsT } from '../common';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropsT<string>>;
|
|
3
|
+
export default _default;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
2
|
import { type OptionsT, type ValueT } from '../common';
|
|
4
|
-
|
|
3
|
+
type ThemeKeyT = 'container' | 'label' | 'option' | 'options' | 'selected';
|
|
5
4
|
type PropsT = {
|
|
6
5
|
label?: React.ReactNode;
|
|
7
6
|
onChange?: (value: ValueT) => void;
|
|
8
7
|
options?: Readonly<OptionsT<React.ReactNode>>;
|
|
9
|
-
theme: Theme<
|
|
8
|
+
theme: Theme<ThemeKeyT>;
|
|
10
9
|
value?: ValueT;
|
|
11
10
|
};
|
|
12
|
-
declare const
|
|
13
|
-
export default
|
|
11
|
+
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropsT>;
|
|
12
|
+
export default _default;
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import PT from 'prop-types';
|
|
3
1
|
import type { Theme } from '@dr.pogodin/react-themes';
|
|
4
|
-
|
|
2
|
+
type ThemeKeyT = 'active' | 'arrow' | 'container' | 'dropdown' | 'hiddenOption' | 'label' | 'option' | 'select' | 'upward';
|
|
5
3
|
export type ValueT = number | string;
|
|
6
|
-
export declare const valueValidator: PT.Requireable<ValueT>;
|
|
7
4
|
export type OptionT<NameT> = {
|
|
8
5
|
name?: NameT | null;
|
|
9
6
|
value: ValueT;
|
|
10
7
|
};
|
|
11
|
-
export type OptionsT<NameT> = Array<OptionT<NameT> | ValueT
|
|
8
|
+
export type OptionsT<NameT> = Readonly<Array<OptionT<NameT> | ValueT>>;
|
|
12
9
|
export type PropsT<NameT, OnChangeT = React.ChangeEventHandler<HTMLSelectElement>> = {
|
|
13
10
|
filter?: (item: OptionT<NameT> | ValueT) => boolean;
|
|
14
11
|
label?: React.ReactNode;
|
|
15
12
|
onChange?: OnChangeT;
|
|
16
|
-
options?: OptionsT<NameT
|
|
17
|
-
theme: Theme<
|
|
13
|
+
options?: Readonly<OptionsT<NameT>>;
|
|
14
|
+
theme: Theme<ThemeKeyT>;
|
|
18
15
|
value?: ValueT;
|
|
19
16
|
};
|
|
20
|
-
export declare const optionValidator: PT.Requireable<OptionT<React.ReactNode> | ValueT>;
|
|
21
|
-
export declare const optionsValidator: PT.Requireable<NonNullable<ValueT | OptionT<React.ReactNode>>[]>;
|
|
22
|
-
export declare const stringOptionValidator: PT.Requireable<OptionT<string> | ValueT>;
|
|
23
|
-
export declare const stringOptionsValidator: PT.Requireable<NonNullable<ValueT | OptionT<string>>[]>;
|
|
24
17
|
/** Returns option value and name as a tuple. */
|
|
25
18
|
export declare function optionValueName<NameT>(option: OptionT<NameT> | ValueT): [ValueT, NameT | ValueT];
|
|
19
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as CustomDropdown } from './CustomDropdown';
|
|
2
2
|
export { default as Dropdown } from './NativeDropdown';
|
|
3
3
|
export { default as Switch } from './Switch';
|
|
4
|
-
export { type OptionT, type OptionsT,
|
|
4
|
+
export { type OptionT, type OptionsT, } from './common';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="cookie-parser" />
|
|
2
1
|
import type { Request } from 'express';
|
|
3
2
|
import { type SsrContext } from '@dr.pogodin/react-global-state';
|
|
4
3
|
export type ChunkGroupsT = {
|
|
@@ -11,11 +10,16 @@ export type InjT = {
|
|
|
11
10
|
};
|
|
12
11
|
ISTATE?: unknown;
|
|
13
12
|
};
|
|
13
|
+
declare global {
|
|
14
|
+
interface Window {
|
|
15
|
+
REACT_UTILS_INJECTION?: InjT;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
14
18
|
export interface SsrContextT<StateT> extends SsrContext<StateT> {
|
|
15
19
|
chunkGroups: ChunkGroupsT;
|
|
16
20
|
chunks: string[];
|
|
17
21
|
req: Request;
|
|
18
22
|
status: number;
|
|
19
23
|
}
|
|
20
|
-
declare const getSsrContext: (throwWithoutSsrContext?: boolean
|
|
24
|
+
declare const getSsrContext: (throwWithoutSsrContext?: boolean) => SsrContextT<unknown> | undefined;
|
|
21
25
|
export { getSsrContext, };
|
|
@@ -42,4 +42,7 @@ export type MountedSceneT = HTMLElement & {
|
|
|
42
42
|
* attached.
|
|
43
43
|
*/
|
|
44
44
|
export declare function mount(scene: ReactNode): MountedSceneT;
|
|
45
|
-
|
|
45
|
+
type SnapshotOptionsT = {
|
|
46
|
+
await?: Promise<void>;
|
|
47
|
+
};
|
|
48
|
+
export declare function snapshot(element: React.ReactElement, options?: SnapshotOptionsT): Promise<RenderResult>;
|
package/config/babel/node-ssr.js
CHANGED
|
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
return result;
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.default = getConfig;
|
|
27
28
|
const lodash_1 = require("lodash");
|
|
28
29
|
const webpack_1 = __importStar(require("./webpack"));
|
|
29
30
|
/**
|
|
@@ -88,4 +89,3 @@ function getConfig(babel, ops = {}) {
|
|
|
88
89
|
addStyling(config);
|
|
89
90
|
return config;
|
|
90
91
|
}
|
|
91
|
-
exports.default = getConfig;
|
package/config/babel/webpack.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ENVIRONMENTS = void 0;
|
|
4
|
+
exports.default = getPreset;
|
|
4
5
|
const { generateScopedNameFactory, } = require('@dr.pogodin/babel-plugin-react-css-modules/utils');
|
|
5
6
|
const generateScopedNameDev = generateScopedNameFactory('[package]___[path][name]___[local]___[hash:base64:6]');
|
|
6
7
|
const generateScopedNameProd = generateScopedNameFactory('[hash:base64:6]');
|
|
@@ -104,4 +105,3 @@ function getPreset(babel, ops = {}) {
|
|
|
104
105
|
}
|
|
105
106
|
return res;
|
|
106
107
|
}
|
|
107
|
-
exports.default = getPreset;
|
package/config/eslint/jest.json
CHANGED
|
@@ -24,6 +24,13 @@ module.exports = {
|
|
|
24
24
|
'react/no-unknown-property': ['error', {
|
|
25
25
|
ignore: ['styleName'],
|
|
26
26
|
}],
|
|
27
|
+
|
|
28
|
+
// TODO: propTypes checks will be silently ignored starting with React v19:
|
|
29
|
+
// https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-proptypes-and-defaultprops
|
|
30
|
+
// The rule is still enabled in the base ESLint configs, thus for now we
|
|
31
|
+
// override it here.
|
|
32
|
+
'react/prop-types': 'off',
|
|
33
|
+
|
|
27
34
|
'react/react-in-jsx-scope': 0,
|
|
28
35
|
|
|
29
36
|
// TODO: .defaultProps will be deprecated in React@19.
|
|
@@ -9,6 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.default = configFactory;
|
|
12
13
|
const fs_1 = __importDefault(require("fs"));
|
|
13
14
|
const path_1 = __importDefault(require("path"));
|
|
14
15
|
const sitemap_1 = __importDefault(require("sitemap"));
|
|
@@ -316,4 +317,3 @@ function configFactory(ops) {
|
|
|
316
317
|
},
|
|
317
318
|
};
|
|
318
319
|
}
|
|
319
|
-
exports.default = configFactory;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = configFactory;
|
|
6
7
|
/**
|
|
7
8
|
* @category Configs
|
|
8
9
|
* @module webpack/app-development
|
|
@@ -63,4 +64,3 @@ function configFactory(ops) {
|
|
|
63
64
|
});
|
|
64
65
|
return res;
|
|
65
66
|
}
|
|
66
|
-
exports.default = configFactory;
|
|
@@ -8,6 +8,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.default = configFactory;
|
|
11
12
|
const css_minimizer_webpack_plugin_1 = __importDefault(require("css-minimizer-webpack-plugin"));
|
|
12
13
|
const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
|
|
13
14
|
const webpack_1 = __importDefault(require("webpack"));
|
|
@@ -51,4 +52,3 @@ function configFactory(ops) {
|
|
|
51
52
|
});
|
|
52
53
|
return res;
|
|
53
54
|
}
|
|
54
|
-
exports.default = configFactory;
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = configFactory;
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const autoprefixer_1 = __importDefault(require("autoprefixer"));
|
|
9
10
|
const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
|
|
@@ -34,7 +35,6 @@ function configFactory(ops) {
|
|
|
34
35
|
'dayjs',
|
|
35
36
|
'lodash',
|
|
36
37
|
/node-forge/,
|
|
37
|
-
'prop-types',
|
|
38
38
|
'qs',
|
|
39
39
|
'react',
|
|
40
40
|
/react-dom/,
|
|
@@ -157,4 +157,3 @@ function configFactory(ops) {
|
|
|
157
157
|
},
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
exports.default = configFactory;
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = configFactory;
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const webpack_1 = __importDefault(require("webpack"));
|
|
9
10
|
const webpack_merge_1 = require("webpack-merge");
|
|
@@ -31,4 +32,3 @@ function configFactory(ops) {
|
|
|
31
32
|
},
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
exports.default = configFactory;
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.default = configFactory;
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const css_minimizer_webpack_plugin_1 = __importDefault(require("css-minimizer-webpack-plugin"));
|
|
9
10
|
const webpack_1 = __importDefault(require("webpack"));
|
|
@@ -38,4 +39,3 @@ function configFactory(ops) {
|
|
|
38
39
|
],
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
|
-
exports.default = configFactory;
|