@emqx/shared-ui-utils 0.0.17 → 0.0.19
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/index.d.ts +1 -3
- package/dist/index.js +3875 -4697
- package/dist/index.umd.cjs +35 -35
- package/dist/tools.d.ts +43 -0
- package/dist/useLocale.d.ts +1 -0
- package/package.json +1 -1
- package/dist/rule/ruleField.json.d.ts +0 -32
- package/dist/rule/ruleFunc.json.d.ts +0 -1219
- package/dist/rule/useRuleFunc.d.ts +0 -76
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, WritableComputedRef } from 'vue';
|
|
2
|
-
|
|
3
|
-
export interface FunctionItem {
|
|
4
|
-
id: string;
|
|
5
|
-
field: string;
|
|
6
|
-
func: {
|
|
7
|
-
name: string;
|
|
8
|
-
args: Array<string | number>;
|
|
9
|
-
};
|
|
10
|
-
alias: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const enum ArgumentType {
|
|
13
|
-
Number = "number",
|
|
14
|
-
Any = "any",
|
|
15
|
-
Float = "float",
|
|
16
|
-
Integer = "integer",
|
|
17
|
-
String = "string",
|
|
18
|
-
Enum = "enum",
|
|
19
|
-
Object = "object",
|
|
20
|
-
Array = "array",
|
|
21
|
-
Binary = "binary"
|
|
22
|
-
}
|
|
23
|
-
export interface ArgItem {
|
|
24
|
-
name: string;
|
|
25
|
-
type: ArgumentType;
|
|
26
|
-
required: boolean;
|
|
27
|
-
optionalValues?: Array<string>;
|
|
28
|
-
/**
|
|
29
|
-
* for type number
|
|
30
|
-
*/
|
|
31
|
-
range?: [null | number, null | number];
|
|
32
|
-
default?: string | number;
|
|
33
|
-
/**
|
|
34
|
-
* For some functions, it is unclear which parameter is most likely to be a reference value,
|
|
35
|
-
* so it is specified manually.
|
|
36
|
-
*/
|
|
37
|
-
isReference?: boolean;
|
|
38
|
-
}
|
|
39
|
-
export interface FuncItem {
|
|
40
|
-
name: string;
|
|
41
|
-
args: Array<ArgItem>;
|
|
42
|
-
}
|
|
43
|
-
interface GroupFuncData {
|
|
44
|
-
groupLabel: string;
|
|
45
|
-
name: string;
|
|
46
|
-
value: string;
|
|
47
|
-
list: Array<FuncItem>;
|
|
48
|
-
}
|
|
49
|
-
type FuncData = Array<GroupFuncData>;
|
|
50
|
-
type FetchSuggestionsCallback = (result: Array<{
|
|
51
|
-
value: string;
|
|
52
|
-
}>) => void;
|
|
53
|
-
declare const useRuleFunc: (lang: string) => {
|
|
54
|
-
funcOptList: FuncData;
|
|
55
|
-
getFuncItemByName: (name: string) => FuncItem | null;
|
|
56
|
-
getFuncGroupByName: (name: string) => string | null;
|
|
57
|
-
getArgIndex: (func: FuncItem, groupLabel: string) => number;
|
|
58
|
-
};
|
|
59
|
-
export default useRuleFunc;
|
|
60
|
-
export declare const numberArgTypes: ArgumentType[];
|
|
61
|
-
type FunctionItemProps = Readonly<{
|
|
62
|
-
modelValue: FunctionItem;
|
|
63
|
-
readonly: boolean;
|
|
64
|
-
availableFields: Array<string>;
|
|
65
|
-
}>;
|
|
66
|
-
export declare const useFunctionItemData: (props: FunctionItemProps, emit: {
|
|
67
|
-
(e: "update:modelValue", value: FunctionItem): void;
|
|
68
|
-
} & unknown, lang: string) => {
|
|
69
|
-
record: WritableComputedRef<FunctionItem>;
|
|
70
|
-
getFieldList: (queryString: string, cb: FetchSuggestionsCallback) => void;
|
|
71
|
-
handleFieldChanged: (val: string) => void;
|
|
72
|
-
funcOptList: FuncData;
|
|
73
|
-
args: ComputedRef<ArgItem[]>;
|
|
74
|
-
handleSelectFunc: (funcName: string) => void;
|
|
75
|
-
handleArgChanged: (val: string, index: number, type: ArgumentType) => void;
|
|
76
|
-
};
|