@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
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BridgeType } from '@emqx/shared-ui-constants';
|
|
2
|
+
|
|
3
|
+
export declare const waitAMoment: (ms?: number) => Promise<boolean>;
|
|
4
|
+
export declare const createRandomString: (length?: number) => any;
|
|
5
|
+
export declare const trimSpacesAndLFs: (input: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* do not support single/double quote and bracket
|
|
8
|
+
*/
|
|
9
|
+
export declare const splitOnSymbol: (input: string, symbol: string) => string[];
|
|
10
|
+
export declare const splitOnComma: (input: string) => string[];
|
|
11
|
+
export declare const ruleSelectionAliasPartReg: RegExp;
|
|
12
|
+
export declare const getRuleSelectionAlias: (selection: string) => string | undefined;
|
|
13
|
+
export declare const judgeRuleSelectionWithFunc: (selection: string) => boolean;
|
|
14
|
+
export declare const numToFixed: (number: number, digits?: number) => number;
|
|
15
|
+
/**
|
|
16
|
+
* will change original arr
|
|
17
|
+
*/
|
|
18
|
+
export declare const removeFromArr: <T>(arr: Array<T>, index: number) => Array<T>;
|
|
19
|
+
/**
|
|
20
|
+
* the title -> The Title
|
|
21
|
+
*/
|
|
22
|
+
export declare const titleCase: (str: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* for connector, action and bridge
|
|
25
|
+
*/
|
|
26
|
+
export declare const getTypeAndNameFromKey: (key: string) => {
|
|
27
|
+
type: BridgeType;
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const getBridgeIdFromInput: (input: string) => string;
|
|
31
|
+
export declare const getBridgeTypeFromId: (id: string) => string;
|
|
32
|
+
export declare const getBridgeNameFromId: (id: string) => string;
|
|
33
|
+
export declare const getKeyPartsFromSQL: (sqlStr: string) => {
|
|
34
|
+
fieldStr: string | undefined;
|
|
35
|
+
fromStr: string | undefined;
|
|
36
|
+
whereStr: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
export declare const isContainsAIExpression: (sql: string) => boolean;
|
|
39
|
+
export declare const getBridgeKey: ({ type, name }: {
|
|
40
|
+
type: string;
|
|
41
|
+
name: string;
|
|
42
|
+
} & unknown) => string;
|
|
43
|
+
export declare const checkNeedRequestAPI: (isChanged?: boolean) => isChanged is true | undefined;
|
package/dist/useLocale.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
declare const _default: [
|
|
2
|
-
"connection_accepted",
|
|
3
|
-
"unacceptable_protocol_version",
|
|
4
|
-
"client_identifier_not_valid",
|
|
5
|
-
"server_unavailable",
|
|
6
|
-
"malformed_username_or_password",
|
|
7
|
-
"unauthorized_client",
|
|
8
|
-
"success",
|
|
9
|
-
"unspecified_error",
|
|
10
|
-
"malformed_packet",
|
|
11
|
-
"protocol_error",
|
|
12
|
-
"implementation_specific_error",
|
|
13
|
-
"unsupported_protocol_version",
|
|
14
|
-
"bad_username_or_password",
|
|
15
|
-
"not_authorized",
|
|
16
|
-
"server_unavailable",
|
|
17
|
-
"server_busy",
|
|
18
|
-
"banned",
|
|
19
|
-
"bad_authentication_method",
|
|
20
|
-
"topic_name_invalid",
|
|
21
|
-
"packet_too_large",
|
|
22
|
-
"quota_exceeded",
|
|
23
|
-
"retain_not_supported",
|
|
24
|
-
"qos_not_supported",
|
|
25
|
-
"use_another_server",
|
|
26
|
-
"server_moved",
|
|
27
|
-
"connection_rate_exceeded",
|
|
28
|
-
"is_cache"
|
|
29
|
-
]
|
|
30
|
-
;
|
|
31
|
-
|
|
32
|
-
export default _default;
|