@ws-ui/shared 1.11.12-rc13 → 1.11.12-rc14
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/Checkbox/index.d.ts +1 -0
- package/dist/components/FloatingTooltip/index.d.ts +11 -0
- package/dist/components/Grid.d.ts +26 -0
- package/dist/components/Image.d.ts +5 -0
- package/dist/components/InvalidJsonError.d.ts +1 -0
- package/dist/components/Panel.d.ts +3 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/declarations/datasources/interfaces/catalog.d.ts +114 -114
- package/dist/declarations/webform/webform.d.ts +2 -0
- package/dist/hooks/index.d.ts +6 -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-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 +84 -85
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10716 -9659
- package/dist/index.es.js.map +1 -1
- package/dist/providers/index.d.ts +1 -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 +5 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/shared.d.ts +2 -0
- package/dist/types/webform-editor.d.ts +75 -0
- package/dist/types/welcome-tour.d.ts +3 -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 +2 -0
- package/dist/utils/webform-editor.d.ts +91 -0
- package/package.json +3 -3
|
@@ -11,5 +11,6 @@ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement
|
|
|
11
11
|
isInvalid?: boolean;
|
|
12
12
|
icon?: ReactElement<BaseCheckboxIconProps>;
|
|
13
13
|
label?: ReactNode;
|
|
14
|
+
indeterminate?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare function Checkbox({ isChecked: controlledIsChecked, isIndeterminate, isInvalid, icon, label, className, style, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
type TooltipProps = {
|
|
3
|
+
message?: string | JSX.Element;
|
|
4
|
+
delayDuration?: number;
|
|
5
|
+
open?: boolean;
|
|
6
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
sideOffset?: number;
|
|
8
|
+
alignOffset?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function FloatingTooltip(props: PropsWithChildren<TooltipProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -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
|
}
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
declare namespace catalog {
|
|
2
|
-
enum EAttributeKind {
|
|
3
|
-
STORAGE = 'storage',
|
|
4
|
-
RELATEDENTITY = 'relatedEntity',
|
|
5
|
-
RELATEDENTITIES = 'relatedEntities',
|
|
6
|
-
CALCULATED = 'calculated',
|
|
7
|
-
COMPOSITION = 'composition',
|
|
8
|
-
ALIAS = 'alias',
|
|
9
|
-
}
|
|
10
|
-
type AttributeType =
|
|
11
|
-
| 'bool'
|
|
12
|
-
| 'word'
|
|
13
|
-
| '
|
|
14
|
-
| '
|
|
15
|
-
| '
|
|
16
|
-
| '
|
|
17
|
-
| '
|
|
18
|
-
| '
|
|
19
|
-
| '
|
|
20
|
-
| '
|
|
21
|
-
| '
|
|
22
|
-
| '
|
|
23
|
-
| '
|
|
24
|
-
| '
|
|
25
|
-
| '
|
|
26
|
-
|
|
27
|
-
type
|
|
28
|
-
type
|
|
29
|
-
|
|
30
|
-
| '
|
|
31
|
-
| '
|
|
32
|
-
| '
|
|
33
|
-
| '
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
interface IMethod {
|
|
52
|
-
name: string;
|
|
53
|
-
applyTo: ApplyTo;
|
|
54
|
-
scope: Scope;
|
|
55
|
-
from: 'remoteServer';
|
|
56
|
-
allowedOnHTTPGET: boolean;
|
|
57
|
-
startingLine: number;
|
|
58
|
-
paramsText: string;
|
|
59
|
-
filePath: string;
|
|
60
|
-
userDefined: boolean;
|
|
61
|
-
endingLine: number;
|
|
62
|
-
exposed: boolean;
|
|
63
|
-
}
|
|
64
|
-
type IDataClass = {
|
|
65
|
-
name: string;
|
|
66
|
-
className: string;
|
|
67
|
-
collectionName: string;
|
|
68
|
-
scope: DataclassScope;
|
|
69
|
-
attributes: IAttribute[];
|
|
70
|
-
uuid?: string;
|
|
71
|
-
virtual?: boolean;
|
|
72
|
-
} & Partial<{
|
|
73
|
-
defaultTopSize: number;
|
|
74
|
-
leave_tag_on_delete: boolean;
|
|
75
|
-
prevent_journaling: boolean;
|
|
76
|
-
comment: string;
|
|
77
|
-
extraProperties: IDataClassProperties;
|
|
78
|
-
}>;
|
|
79
|
-
type IEvent = {
|
|
80
|
-
kind: string;
|
|
81
|
-
from: string;
|
|
82
|
-
userDefined: boolean;
|
|
83
|
-
};
|
|
84
|
-
export type AttributeIndexKind = 'btree' | 'cluster' | 'auto' | 'none';
|
|
85
|
-
type IAttribute = {
|
|
86
|
-
name: string;
|
|
87
|
-
type: string;
|
|
88
|
-
kind: AttributeKind;
|
|
89
|
-
scope: Scope;
|
|
90
|
-
uuid?: string;
|
|
91
|
-
} & Partial<{
|
|
92
|
-
indexKind?: AttributeIndexKind | null;
|
|
93
|
-
invalidAlias: boolean;
|
|
94
|
-
autogenerate: boolean;
|
|
95
|
-
unique: boolean;
|
|
96
|
-
primKey: boolean;
|
|
97
|
-
exposed: boolean;
|
|
98
|
-
behavior: string;
|
|
99
|
-
autosequence: boolean;
|
|
100
|
-
indexed: boolean;
|
|
101
|
-
reversePath: boolean;
|
|
102
|
-
keywordIndexed: boolean;
|
|
103
|
-
not_null: boolean; // TODO: to be renamed to mandatory
|
|
104
|
-
minValue: number;
|
|
105
|
-
maxValue: number;
|
|
106
|
-
simpleDate: boolean;
|
|
107
|
-
defaultValue: any;
|
|
108
|
-
events: any[];
|
|
109
|
-
path: string;
|
|
110
|
-
extraProperties: IAttributeProperties;
|
|
111
|
-
styled_text: boolean;
|
|
112
|
-
comment: string;
|
|
113
|
-
}>;
|
|
114
|
-
}
|
|
1
|
+
declare namespace catalog {
|
|
2
|
+
enum EAttributeKind {
|
|
3
|
+
STORAGE = 'storage',
|
|
4
|
+
RELATEDENTITY = 'relatedEntity',
|
|
5
|
+
RELATEDENTITIES = 'relatedEntities',
|
|
6
|
+
CALCULATED = 'calculated',
|
|
7
|
+
COMPOSITION = 'composition',
|
|
8
|
+
ALIAS = 'alias',
|
|
9
|
+
}
|
|
10
|
+
type AttributeType =
|
|
11
|
+
| 'bool'
|
|
12
|
+
| 'word'
|
|
13
|
+
| 'time'
|
|
14
|
+
| 'blob'
|
|
15
|
+
| 'string'
|
|
16
|
+
| 'text'
|
|
17
|
+
| 'uuid'
|
|
18
|
+
| 'short'
|
|
19
|
+
| 'long'
|
|
20
|
+
| 'number'
|
|
21
|
+
| 'byte'
|
|
22
|
+
| 'long64'
|
|
23
|
+
| 'duration'
|
|
24
|
+
| 'object'
|
|
25
|
+
| 'date'
|
|
26
|
+
| 'image';
|
|
27
|
+
type Scope = 'public' | 'publicOnServer';
|
|
28
|
+
type ApplyTo = 'dataClass' | 'entity' | 'entityCollection' | 'dataStore';
|
|
29
|
+
type AttributeKind =
|
|
30
|
+
| 'storage'
|
|
31
|
+
| 'alias'
|
|
32
|
+
| 'calculated'
|
|
33
|
+
| 'relatedEntity'
|
|
34
|
+
| 'relatedEntities';
|
|
35
|
+
|
|
36
|
+
type IDataClassProperties = Partial<{
|
|
37
|
+
panelColor: string;
|
|
38
|
+
position: {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
};
|
|
42
|
+
}>;
|
|
43
|
+
type IAttributeProperties = Partial<{}>;
|
|
44
|
+
interface IModelProperties extends Partial<{
|
|
45
|
+
version: string;
|
|
46
|
+
backgroundColor: string;
|
|
47
|
+
backgroundImage: string;
|
|
48
|
+
backgroundVariant: 'dotted' | 'grid' | 'none';
|
|
49
|
+
viewport?: { zoom: number; x: number; y: number };
|
|
50
|
+
}> {}
|
|
51
|
+
interface IMethod {
|
|
52
|
+
name: string;
|
|
53
|
+
applyTo: ApplyTo;
|
|
54
|
+
scope: Scope;
|
|
55
|
+
from: 'remoteServer';
|
|
56
|
+
allowedOnHTTPGET: boolean;
|
|
57
|
+
startingLine: number;
|
|
58
|
+
paramsText: string;
|
|
59
|
+
filePath: string;
|
|
60
|
+
userDefined: boolean;
|
|
61
|
+
endingLine: number;
|
|
62
|
+
exposed: boolean;
|
|
63
|
+
}
|
|
64
|
+
type IDataClass = {
|
|
65
|
+
name: string;
|
|
66
|
+
className: string;
|
|
67
|
+
collectionName: string;
|
|
68
|
+
scope: DataclassScope;
|
|
69
|
+
attributes: IAttribute[];
|
|
70
|
+
uuid?: string;
|
|
71
|
+
virtual?: boolean;
|
|
72
|
+
} & Partial<{
|
|
73
|
+
defaultTopSize: number;
|
|
74
|
+
leave_tag_on_delete: boolean;
|
|
75
|
+
prevent_journaling: boolean;
|
|
76
|
+
comment: string;
|
|
77
|
+
extraProperties: IDataClassProperties;
|
|
78
|
+
}>;
|
|
79
|
+
type IEvent = {
|
|
80
|
+
kind: string;
|
|
81
|
+
from: string;
|
|
82
|
+
userDefined: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type AttributeIndexKind = 'btree' | 'cluster' | 'auto' | 'none';
|
|
85
|
+
type IAttribute = {
|
|
86
|
+
name: string;
|
|
87
|
+
type: string;
|
|
88
|
+
kind: AttributeKind;
|
|
89
|
+
scope: Scope;
|
|
90
|
+
uuid?: string;
|
|
91
|
+
} & Partial<{
|
|
92
|
+
indexKind?: AttributeIndexKind | null;
|
|
93
|
+
invalidAlias: boolean;
|
|
94
|
+
autogenerate: boolean;
|
|
95
|
+
unique: boolean;
|
|
96
|
+
primKey: boolean;
|
|
97
|
+
exposed: boolean;
|
|
98
|
+
behavior: string;
|
|
99
|
+
autosequence: boolean;
|
|
100
|
+
indexed: boolean;
|
|
101
|
+
reversePath: boolean;
|
|
102
|
+
keywordIndexed: boolean;
|
|
103
|
+
not_null: boolean; // TODO: to be renamed to mandatory
|
|
104
|
+
minValue: number;
|
|
105
|
+
maxValue: number;
|
|
106
|
+
simpleDate: boolean;
|
|
107
|
+
defaultValue: any;
|
|
108
|
+
events: any[];
|
|
109
|
+
path: string;
|
|
110
|
+
extraProperties: IAttributeProperties;
|
|
111
|
+
styled_text: boolean;
|
|
112
|
+
comment: string;
|
|
113
|
+
}>;
|
|
114
|
+
}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -11,3 +11,9 @@ export * from './useDoubleClick';
|
|
|
11
11
|
export * from './use-enhanced-state/useEnhancedState';
|
|
12
12
|
export * from './use-ds-renderer';
|
|
13
13
|
export * from './use-ds-change-renderer';
|
|
14
|
+
export * from './use-boolean';
|
|
15
|
+
export * from './use-callback-ref';
|
|
16
|
+
export * from './use-controllable-state';
|
|
17
|
+
export * from './use-safe-layout-effect';
|
|
18
|
+
export * from './use-update-effect';
|
|
19
|
+
export * from './use-form-control-props';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
export declare function useControllableProp<T>(prop: T | undefined, state: T): readonly [boolean, T];
|
|
3
|
+
export declare function useControllableState<T>({ value, defaultValue, onChange, }: {
|
|
4
|
+
value?: T;
|
|
5
|
+
defaultValue: T;
|
|
6
|
+
onChange?: (value: T) => void;
|
|
7
|
+
}): readonly [T, Dispatch<SetStateAction<T>>];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type FormControlLikeProps = {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
isReadOnly?: boolean;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
isRequired?: boolean;
|
|
8
|
+
isInvalid?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function useFormControlProps<T extends FormControlLikeProps>(props: T): T & {
|
|
11
|
+
isDisabled: boolean | undefined;
|
|
12
|
+
isReadOnly: boolean | undefined;
|
|
13
|
+
isRequired: boolean | undefined;
|
|
14
|
+
};
|
|
15
|
+
export {};
|