@emqx/shared-ui-utils 0.0.13 → 0.0.15

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.
@@ -17,3 +17,18 @@ export declare const stringifyObjSafely: (obj: Record<string, any>, tabSpaces?:
17
17
  * @returns A boolean indicating whether the string is a valid JSON string or not.
18
18
  */
19
19
  export declare const isJSONString: (str: string) => boolean;
20
+ /**
21
+ * Parse JSON string with enhanced support for big numbers.
22
+ * @param value The string to parse as JSON
23
+ * @param reviver A function that transforms the results
24
+ * @returns Parsed JSON object
25
+ */
26
+ export declare const jsonBigIntParse: (value: string, reviver?: (this: any, key: string, value: any) => any) => any;
27
+ /**
28
+ * Stringify JSON with enhanced support for big numbers.
29
+ * @param value The value to convert to a JSON string
30
+ * @param replacer A function that alters the behavior of the stringification process
31
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text
32
+ * @returns JSON string
33
+ */
34
+ export declare const jsonBigIntStringify: (value: Record<string, unknown>, replacer?: (this: any, key: string, value: any) => any | (number | string)[] | null, space?: string | number) => string;
@@ -1,13 +1,15 @@
1
- export declare const useBatchSettings: (locale?: 'zh' | 'en') => {
1
+ export declare const useBatchSettings: (locale?: "zh" | "en") => {
2
2
  filenameMap: {
3
3
  influxdb: string;
4
4
  tdengine: string;
5
5
  iotdb: string;
6
+ datalayers: string;
6
7
  };
7
8
  templateContentMap: {
8
9
  tdengine: string;
9
10
  iotdb: string;
10
11
  influxdb: string;
12
+ datalayers: string;
11
13
  };
12
14
  handleDownloadTemp: (template?: string, filename?: string) => void;
13
15
  readFileAndParse: (file: File, maxRows: number) => Promise<string[][]>;
@@ -0,0 +1,5 @@
1
+ import { ComposerTranslation } from 'vue-i18n';
2
+
3
+ export declare const useLocale: (locale: string) => {
4
+ t: ComposerTranslation;
5
+ };
@@ -0,0 +1,20 @@
1
+ import { StreamOperation, StreamPermission, StreamResourceType } from '@emqx/shared-ui-constants';
2
+
3
+ export declare const useStreamingAuth: (lang: string) => {
4
+ permissionOptions: {
5
+ label: string;
6
+ value: StreamPermission;
7
+ }[];
8
+ resourceTypeOptions: {
9
+ label: string;
10
+ value: StreamResourceType;
11
+ }[];
12
+ operationOptions: {
13
+ label: string;
14
+ value: StreamOperation;
15
+ }[];
16
+ getValidOperations: (resourceType: StreamResourceType) => {
17
+ label: string;
18
+ value: StreamOperation;
19
+ }[];
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emqx/shared-ui-utils",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "homepage": "https://emqx.io",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -25,10 +25,14 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
+ "@emqx/shared-ui-constants": "link:../constants",
29
+ "@emqx/shared-ui-i18n": "link:../i18n",
30
+ "json-bigint": "^1.0.0",
28
31
  "papaparse": "^5.4.1",
29
32
  "vue-i18n": "^9.10.2"
30
33
  },
31
34
  "devDependencies": {
35
+ "@types/json-bigint": "^1.0.4",
32
36
  "@types/papaparse": "^5.3.14"
33
37
  },
34
38
  "scripts": {