@ws-ui/shared 0.3.7 → 0.3.8
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/README.md +4 -24
- package/dist/components/AppLoader.d.ts +5 -5
- package/dist/components/ControlledSwitch.d.ts +2 -2
- package/dist/components/Dialog.d.ts +2 -1
- package/dist/components/Incase/index.d.ts +2 -1
- package/dist/components/Modal/Button.d.ts +2 -1
- package/dist/components/Modal/Icon.d.ts +2 -1
- package/dist/components/Modal/index.d.ts +2 -1
- package/dist/components/Portal.d.ts +1 -0
- package/dist/components/Tips/components/CarouselTip.d.ts +2 -1
- package/dist/components/Tips/components/TextTip.d.ts +2 -1
- package/dist/components/Tips/components/VideoTip.d.ts +2 -1
- package/dist/components/Tips/components/index.d.ts +2 -1
- package/dist/components/Tips/index.d.ts +1 -0
- package/dist/components/Tips/provider.d.ts +2 -1
- package/dist/components/Toast.d.ts +2 -1
- package/dist/components/Tooltip.d.ts +2 -1
- package/dist/components/Tree/components/IndentLines.d.ts +1 -0
- package/dist/components/Tree/components/Switcher.d.ts +1 -0
- package/dist/components/Tree/components/Tree.d.ts +2 -1
- package/dist/components/Tree/components/TreeNode.d.ts +2 -1
- package/dist/components/Tree/index.d.ts +5 -4
- package/dist/components/Tree/interfaces.d.ts +1 -0
- package/dist/components/Tree/styled.d.ts +2 -1
- package/dist/constants.d.ts +1 -0
- package/dist/datasource-themes.d.ts +1 -0
- package/dist/declarations/datasources/datasource.d.ts +1 -1
- package/dist/hooks/use-didmounteffect.d.ts +1 -0
- package/dist/hooks/use-forwarded-ref.d.ts +2 -1
- package/dist/hooks/use-hotkeys.d.ts +2 -1
- package/dist/hooks/use-outside-click.d.ts +1 -1
- package/dist/hooks/use-state-ref.d.ts +1 -1
- package/dist/hooks/useDoubleClick.d.ts +2 -1
- package/dist/hooks/useIdentity.d.ts +2 -1
- package/dist/hooks/useStateObject.d.ts +1 -0
- package/dist/index.cjs.js +88 -115
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10612 -9297
- package/dist/index.es.js.map +1 -1
- package/dist/package.json +16 -0
- package/dist/services/api.d.ts +4 -3
- package/dist/services/explorer.d.ts +2 -1
- package/dist/services/tracking.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/tailwind.preset.js +1 -2
- package/dist/types/api.d.ts +4 -6
- package/dist/types/modal.d.ts +4 -4
- package/dist/types/shared.d.ts +4 -3
- package/dist/types/webform-editor.d.ts +2 -1
- package/dist/utils/code.d.ts +1 -0
- package/dist/utils/common.d.ts +6 -6
- package/dist/utils/explorer.d.ts +1 -0
- package/dist/utils/subjects.d.ts +2 -1
- package/package.json +4 -61
- package/dist/utils/parser.spec.d.ts +0 -1
- package/dist/utils/validation.test.d.ts +0 -1
- package/dist/utils/waiter/waiter.test.d.ts +0 -1
- package/dist/vite.svg +0 -1
package/README.md
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# shared
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Running unit tests
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
13
|
-
|
|
14
|
-
- Configure the top-level `parserOptions` property like this:
|
|
15
|
-
|
|
16
|
-
```js
|
|
17
|
-
parserOptions: {
|
|
18
|
-
ecmaVersion: 'latest',
|
|
19
|
-
sourceType: 'module',
|
|
20
|
-
project: ['./tsconfig.json', './tsconfig.node.json'],
|
|
21
|
-
tsconfigRootDir: __dirname,
|
|
22
|
-
},
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
|
|
26
|
-
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
|
|
27
|
-
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
|
|
7
|
+
Run `nx test shared` to execute the unit tests via [Vitest](https://vitest.dev/).
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const LogoSVG: import(
|
|
3
|
-
theme?: import(
|
|
4
|
-
as?: import(
|
|
5
|
-
}, import(
|
|
2
|
+
export declare const LogoSVG: import('@emotion/styled').StyledComponent<{
|
|
3
|
+
theme?: import('@emotion/react').Theme | undefined;
|
|
4
|
+
as?: import('react').ElementType<any> | undefined;
|
|
5
|
+
}, import('react').SVGProps<SVGSVGElement>, {}>;
|
|
6
6
|
export interface StudioProps {
|
|
7
7
|
}
|
|
8
8
|
export declare const AppLoader: ({ message, version, }: {
|
|
9
9
|
message: string;
|
|
10
10
|
version: string;
|
|
11
|
-
}) => JSX.Element;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SwitchProps } from '@headlessui/react';
|
|
2
|
+
|
|
3
3
|
export type SwitchSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
4
|
interface IControlledSwitchProps extends Omit<SwitchProps<'button'>, 'value' | 'size'> {
|
|
5
5
|
onChange: (val: boolean) => void;
|
|
@@ -7,5 +7,5 @@ interface IControlledSwitchProps extends Omit<SwitchProps<'button'>, 'value' | '
|
|
|
7
7
|
size?: SwitchSize;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const ControlledSwitch: import(
|
|
10
|
+
export declare const ControlledSwitch: import('react').ForwardRefExoticComponent<IControlledSwitchProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
export default ControlledSwitch;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { default as Switcher } from './components/Switcher';
|
|
2
|
+
import { default as IndentLines } from './components/IndentLines';
|
|
3
|
+
import { default as TreeNode } from './components/TreeNode';
|
|
4
|
+
import { default as Tree } from './components/Tree';
|
|
5
|
+
|
|
5
6
|
export { TreeNode, Tree, IndentLines, Switcher };
|
|
6
7
|
export * from './interfaces';
|
|
7
8
|
export * from './styled';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MouseEvent, ReactElement } from 'react';
|
|
2
|
+
|
|
2
3
|
export type RenderNodeHandler<T = any> = (node: ITreeNodeData<T>, depth: number, state: NodeState, actions: TreeActions, searchQuery: string) => JSX.Element;
|
|
3
4
|
export type NodeHandler = (node?: ITreeNodeData) => void;
|
|
4
5
|
export type NodeState = {
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const useOutsideClick: <T extends HTMLElement, R = void>(callback: (event: MouseEvent) => R) => import(
|
|
2
|
+
export declare const useOutsideClick: <T extends HTMLElement, R = void>(callback: (event: MouseEvent) => R) => import('react').MutableRefObject<T | null>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare function useStateRef<T>(state: T): import(
|
|
2
|
+
export declare function useStateRef<T>(state: T): import('react').MutableRefObject<T>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
|
+
|
|
2
3
|
type EventHandler<T = any> = (event: MouseEvent, ...params: T[]) => void;
|
|
3
4
|
interface IOptions {
|
|
4
5
|
timeout?: number;
|
|
5
6
|
}
|
|
6
|
-
export declare const useDoubleClick: <T = any>(doubleClick: EventHandler<T>, click?: EventHandler<T
|
|
7
|
+
export declare const useDoubleClick: <T = any>(doubleClick: EventHandler<T>, click?: EventHandler<T>, options?: IOptions) => (event: MouseEvent, ...params: T[]) => void;
|
|
7
8
|
export {};
|