@ws-ui/shared 1.12.4 → 1.13.0-dev.1
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/dist/components/Grid.d.ts +26 -0
- package/dist/components/Image.d.ts +5 -0
- package/dist/components/Panel.d.ts +3 -2
- package/dist/components/SearchInput.d.ts +12 -0
- package/dist/components/ToolbarIcon/index.d.ts +2 -0
- package/dist/components/ToolbarIcon/interfaces.d.ts +21 -0
- package/dist/components/Tooltip.d.ts +7 -3
- package/dist/components/index.d.ts +4 -3
- package/dist/declarations/datasources/datasource.d.ts +393 -393
- package/dist/declarations/datasources/interfaces/catalog.d.ts +114 -114
- package/dist/declarations/datasources/methods.d.ts +110 -110
- package/dist/declarations/index.d.ts +11 -11
- package/dist/declarations/webform/webform.d.ts +304 -304
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/use-boolean.d.ts +5 -0
- package/dist/hooks/use-callback-ref.d.ts +1 -0
- package/dist/hooks/use-controllable-state.d.ts +7 -0
- package/dist/hooks/use-ds-change-renderer.d.ts +10 -0
- package/dist/hooks/use-ds-renderer.d.ts +7 -0
- package/dist/hooks/use-form-control-props.d.ts +15 -0
- package/dist/hooks/use-safe-layout-effect.d.ts +2 -0
- package/dist/hooks/use-update-effect.d.ts +2 -0
- package/dist/index.cjs.js +166 -115
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +25493 -14300
- package/dist/index.es.js.map +1 -1
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/studio-context.d.ts +7 -0
- package/dist/providers/toast-provider.d.ts +18 -0
- package/dist/shared.css +1 -1
- package/dist/types/adapter.d.ts +12 -0
- package/dist/types/explorer.d.ts +31 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/modal.d.ts +11 -4
- package/dist/types/roles.d.ts +111 -0
- package/dist/types/settings.d.ts +28 -0
- package/dist/types/webform-editor.d.ts +132 -1
- package/dist/types/welcome-tour.d.ts +3 -0
- package/dist/utils/catalog.d.ts +1 -0
- package/dist/utils/chakra-utils.d.ts +21 -0
- package/dist/utils/common.d.ts +1 -0
- package/dist/utils/explorer.d.ts +4 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/roles.d.ts +54 -0
- package/dist/utils/webform-editor.d.ts +91 -0
- package/package.json +6 -6
- package/dist/components/Checkbox/index.d.ts +0 -16
- package/dist/components/ControlledSwitch.d.ts +0 -10
- package/dist/components/FloatingTooltip/index.d.ts +0 -11
- package/dist/components/Modal/Button.d.ts +0 -10
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CSSProperties, HTMLAttributes } from 'react';
|
|
2
|
+
type GridValue = number | string | undefined;
|
|
3
|
+
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
rowGap?: GridValue;
|
|
5
|
+
columnGap?: GridValue;
|
|
6
|
+
templateColumns?: string;
|
|
7
|
+
templateRows?: string;
|
|
8
|
+
height?: GridValue;
|
|
9
|
+
width?: GridValue;
|
|
10
|
+
}
|
|
11
|
+
export declare function Grid({ rowGap, columnGap, templateColumns, templateRows, height, width, style, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export interface GridItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
colStart?: number;
|
|
14
|
+
colSpan?: number;
|
|
15
|
+
rowStart?: number;
|
|
16
|
+
rowSpan?: number;
|
|
17
|
+
sx?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
export declare function GridItem({ colStart, colSpan, rowStart, rowSpan, sx, style, ...props }: GridItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export interface SimpleGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
columns?: number;
|
|
22
|
+
spacingX?: GridValue;
|
|
23
|
+
spacingY?: GridValue;
|
|
24
|
+
}
|
|
25
|
+
export declare function SimpleGrid({ columns, spacingX, spacingY, style, ...props }: SimpleGridProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ImgHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'children'> {
|
|
3
|
+
fallback?: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare const Image: import('react').ForwardRefExoticComponent<ImageProps & import('react').RefAttributes<HTMLImageElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const PANEL_COLLAPSED_HEIGHT = 30;
|
|
3
|
+
export declare const PANEL_INITIAL_OPEN_RATIO = 0.3;
|
|
4
|
+
export declare const PANEL_MAX_RATIO = 0.6;
|
|
4
5
|
export interface ICommonPanelProps {
|
|
5
6
|
headerRightSide?: ReactNode;
|
|
6
7
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface ISearchInputProps {
|
|
2
|
+
onChange: (value: string) => void;
|
|
3
|
+
value: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
delay?: number;
|
|
6
|
+
containerClassName?: string;
|
|
7
|
+
onFocusInput?: () => void;
|
|
8
|
+
icon?: string;
|
|
9
|
+
'data-cy'?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const SearchInput: React.FC<ISearchInputProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IconType } from '@ws-ui/ui-components';
|
|
2
|
+
export type Omit<T, U> = Pick<T, Exclude<keyof T, keyof U>>;
|
|
3
|
+
export type ReplaceProps<Inner extends React.ElementType, P> = Omit<React.ComponentPropsWithRef<Inner>, P> & P;
|
|
4
|
+
export interface WithAsProps<As extends React.ElementType | string = React.ElementType> {
|
|
5
|
+
/** You can use a custom element for this component */
|
|
6
|
+
as?: As;
|
|
7
|
+
}
|
|
8
|
+
export interface RefForwardingComponent<T extends React.ElementType, P> {
|
|
9
|
+
<As extends React.ElementType = T>(props: React.PropsWithChildren<ReplaceProps<As, WithAsProps<As> & P>>, context?: any): React.ReactElement | null;
|
|
10
|
+
propTypes?: any;
|
|
11
|
+
contextTypes?: any;
|
|
12
|
+
displayName?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ToolbarIconProps<As extends React.ElementType | string = React.ElementType> {
|
|
15
|
+
label: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
disableHover?: boolean;
|
|
18
|
+
Icon: IconType;
|
|
19
|
+
iconClassname?: string;
|
|
20
|
+
as?: As;
|
|
21
|
+
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { Placement } from '@popperjs/core';
|
|
3
3
|
interface ITooltip {
|
|
4
|
-
label: string;
|
|
4
|
+
label: string | JSX.Element;
|
|
5
5
|
placement?: Placement;
|
|
6
6
|
className?: string;
|
|
7
7
|
isDisabled?: boolean;
|
|
8
8
|
container?: Element;
|
|
9
9
|
}
|
|
10
|
-
export declare const Tooltip:
|
|
10
|
+
export declare const Tooltip: FC<ITooltip>;
|
|
11
|
+
export declare const PopperTooltip: FC<{
|
|
12
|
+
referenceElement: HTMLElement | null;
|
|
13
|
+
label: string;
|
|
14
|
+
}>;
|
|
11
15
|
export {};
|
|
@@ -5,12 +5,13 @@ export * from './Tree';
|
|
|
5
5
|
export * from './Incase';
|
|
6
6
|
export * from './Tips';
|
|
7
7
|
export * from './Tips/provider';
|
|
8
|
-
export * from './ControlledSwitch';
|
|
9
8
|
export * from './Tooltip';
|
|
10
9
|
export * from './AppLoader';
|
|
11
10
|
export * from './Modal';
|
|
12
11
|
export * from './ZoomComponent';
|
|
13
|
-
export * from './FloatingTooltip';
|
|
14
12
|
export * from './Panel';
|
|
15
|
-
export * from './Checkbox';
|
|
16
13
|
export * from './InvalidJsonError';
|
|
14
|
+
export * from './SearchInput';
|
|
15
|
+
export * from './ToolbarIcon';
|
|
16
|
+
export * from './Grid';
|
|
17
|
+
export * from './Image';
|