@opentinyvue/vue-huicharts-core 2.21.0

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 - present TinyVue Authors.
4
+ Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1,68 @@
1
+ declare const DEFAULT_THEME: {
2
+ categoryAxis: {
3
+ axisLine: {
4
+ show: boolean;
5
+ };
6
+ axisTick: {
7
+ show: boolean;
8
+ };
9
+ splitLine: {
10
+ show: boolean;
11
+ };
12
+ };
13
+ valueAxis: {
14
+ axisLine: {
15
+ show: boolean;
16
+ };
17
+ };
18
+ line: {
19
+ smooth: boolean;
20
+ };
21
+ grid: {
22
+ containLabel: boolean;
23
+ left: number;
24
+ right: number;
25
+ };
26
+ };
27
+ declare const DEFAULT_COLORS: string[];
28
+ declare const HEAT_MAP_COLOR: string[];
29
+ declare const HEAT_BMAP_COLOR: string[];
30
+ declare const SAAS_DEFAULT_COLORS: string[];
31
+ declare const SAAS_DEFAULT_SAME_COLORS: {
32
+ blue: {
33
+ color: string;
34
+ idx: number;
35
+ }[];
36
+ green: {
37
+ color: string;
38
+ idx: number;
39
+ }[];
40
+ };
41
+ declare const DEFAULT_CONFIG: {
42
+ tooltip: {
43
+ backgroundColor: string;
44
+ borderColor: string;
45
+ padding: number[];
46
+ textStyle: {
47
+ color: string;
48
+ fontSize: string;
49
+ };
50
+ extraCssText: string;
51
+ };
52
+ legend: {
53
+ icon: string;
54
+ bottom: number;
55
+ itemGap: number;
56
+ itemWidth: number;
57
+ itemHeight: number;
58
+ itemStyle: {
59
+ borderColor: string;
60
+ };
61
+ };
62
+ };
63
+ declare const itemPoint: (color: any) => string;
64
+ declare const itemLabel: (seriesName: any, onlyLabel: any) => string;
65
+ declare const itemContent: (content: any) => string;
66
+ declare const STATIC_PROPS: string[];
67
+ declare const ECHARTS_SETTINGS: string[];
68
+ export { DEFAULT_THEME, DEFAULT_COLORS, HEAT_MAP_COLOR, HEAT_BMAP_COLOR, itemPoint, itemLabel, itemContent, STATIC_PROPS, ECHARTS_SETTINGS, DEFAULT_CONFIG, SAAS_DEFAULT_COLORS, SAAS_DEFAULT_SAME_COLORS };
@@ -0,0 +1,4 @@
1
+ declare function escapeHtml(string: any): string;
2
+ declare const defendXSS: (obj: any) => any;
3
+ export default defendXSS;
4
+ export { escapeHtml };
@@ -0,0 +1,5 @@
1
+ declare const _default: ({ huiChartOption, extend }: {
2
+ huiChartOption: any;
3
+ extend: any;
4
+ }) => any;
5
+ export default _default;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) 2022 - present TinyVue Authors.
3
+ * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license.
6
+ *
7
+ * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8
+ * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9
+ * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
+ *
11
+ */
12
+ declare let numerify: any;
13
+ export default numerify;
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Copyright (c) 2022 - present TinyVue Authors.
3
+ * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license.
6
+ *
7
+ * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8
+ * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9
+ * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
+ *
11
+ */
12
+ /**
13
+ * 将对象的每个属性值进行循环处理。
14
+ *
15
+ * @param {Object} obj 要处理的对象
16
+ * @param {Function} handle 进行循环处理的函数,参数为对象属性名及属性值
17
+ */
18
+ export declare const each: (obj: any, handle: any) => void;
19
+ declare let extend: any;
20
+ /**
21
+ * 获得指定的命名空间的值对象。
22
+ *
23
+ *
24
+ * @param {Object} data 查找数据源
25
+ * @param {String} names 查找属性命名空间字符串
26
+ * @param {Boolean} [isExceptRoot] 是否排除 names 的第一个节点,默认 false
27
+ * @returns {Object}
28
+ */
29
+ export declare const getObj: (data: any, names: any, isExceptRoot: any) => any;
30
+ /**
31
+ * 设置指定的命名空间的值对象。
32
+ *
33
+ * @param {Object} data 设置数据源
34
+ * @param {String} names 查找属性命名空间字符串
35
+ * @param {Object} value 设置的值
36
+ * @param {boolean} [isMerge] 是否覆盖还是合并,默认覆盖
37
+ * @returns {Object}
38
+ */
39
+ export declare const setObj: (data: any, names: any, value: any, isMerge: any) => any;
40
+ /**
41
+ * 根据指定的字段属性名,复制对应的数据。
42
+ *
43
+ * @param {Object} data 源数据,合并数据源
44
+ * @param {Array} [fields] 指定的值得命名空间字符串的数值
45
+ * @param {Boolean} [isMerge] 是否覆盖还是合并,默认false覆盖
46
+ * @param {Boolean} [isExclude] 是否排除指定的fields复制,默认false
47
+ * @returns {Array}
48
+ */
49
+ export declare const copyField: (data: any, fields: any, isMerge: any, isExclude: any) => any;
50
+ /**
51
+ * 复制数组数据,数据如包含对象,则深度复制,并返回一个新数组,如果不是数组则直接返回原对象。
52
+ *
53
+ * @param {Array} arr 要复制的数组
54
+ * @returns {Array}
55
+ */
56
+ export declare const copyArray: (arr: any) => any;
57
+ declare let isEachEqual: any;
58
+ /**
59
+ * 比较两个对象是否相等。
60
+ *
61
+ * isEqual({ a: { b: 1 } }, { a: { b: 1, c: 2 } }, false, [ 'a.b' ]) // false
62
+ * isEqual({ a: { b: 1 } }, { a: { b: 1, c: 2 } }, true, [ 'a.b' ]) // true
63
+ *
64
+ * @param {Object} sourceData 源对象
65
+ * @param {Object} targetData 目标对象
66
+ * @param {Boolean} [deep] 是否深度比较,默认深度比较, 只有指定false才不进行深度比较
67
+ * @param {Array} [fields] 指定需要比较的字段的数组
68
+ * @returns {Boolean}
69
+ */
70
+ export declare const isEqual: (sourceData: any, targetData: any, deep: any, fields: any) => any;
71
+ export { isEachEqual, extend };
72
+ /**
73
+ * 将json对象序列化为字符串。
74
+
75
+ *
76
+ * @param {Object} obj
77
+ * @returns {String}
78
+ */
79
+ export declare const toJsonStr: (obj: any) => string | undefined;
80
+ /**
81
+ * 将一个或多个源对象简单合并到目标对象中,合并时排除非 OwnProperty 及 undefined 属性。
82
+ *
83
+ * @param {Object} target 目标对象
84
+ * @param {Object} [source] 源对象
85
+ * @returns {Object}
86
+ */
87
+ export declare const merge: (target: any) => any;
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Copyright (c) 2022 - present TinyVue Authors.
3
+ * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license.
6
+ *
7
+ * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8
+ * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9
+ * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
+ *
11
+ */
12
+ export declare const toString: () => string;
13
+ export declare const hasOwn: (v: PropertyKey) => boolean;
14
+ export declare const isNull: (x: any) => boolean;
15
+ /**
16
+ * 返回 JavaScript 对象的类型。
17
+ *
18
+ * 如果对象是 undefined 或 null,则返回相应的'undefined'或'null'。
19
+ *
20
+ * 其他一切都将返回它的类型'object'。
21
+ *
22
+ * @param {Object} obj 对象
23
+ * @returns {String}
24
+ */
25
+ export declare const typeOf: (obj: any) => any;
26
+ /**
27
+ * 判断对象是否为 object 类型。
28
+ *
29
+ * isObject({}) // true
30
+ *
31
+ * @param {Object} obj 对象
32
+ * @returns {Boolean}
33
+ */
34
+ export declare const isObject: (obj: any) => boolean;
35
+ /**
36
+ * 判断对象是否为 function 类型。
37
+ *
38
+ * isObject(function (){) // true
39
+ *
40
+ * @param {Object} fn 函数
41
+ * @returns {Boolean}
42
+ */
43
+ export declare const isFunction: (fn: any) => boolean;
44
+ /**
45
+ * 判断对象是否为简单对象。
46
+ *
47
+ * 即不是 HTML 节点对象,也不是 window 对象,而是纯粹的对象(通过 '{}' 或者 'new Object' 创建的)。
48
+ *
49
+ *
50
+ * @param {Object} obj 对象
51
+ * @returns {Boolean}
52
+ */
53
+ export declare const isPlainObject: (obj: any) => boolean;
54
+ /**
55
+ * 检查对象是否为空(不包含任何属性)。
56
+ *
57
+ * @param {Object} obj 对象
58
+ * @returns {Boolean}
59
+ */
60
+ export declare const isEmptyObject: (obj: any) => boolean;
61
+ /**
62
+ * 判断对象是否为数字类型。
63
+ *
64
+ * isNumber(369) // true
65
+ *
66
+ * @param {Object} value 对象
67
+ * @returns {Boolean}
68
+ */
69
+ export declare const isNumber: (value: any) => boolean;
70
+ /**
71
+ * 判断对象是否代表一个数值。
72
+ *
73
+ * @param {Object} value 对象
74
+ * @returns {Boolean}
75
+ */
76
+ export declare const isNumeric: (value: any) => boolean;
77
+ /**
78
+ * 判断对象是否为日期类型。
79
+ *
80
+ *
81
+ * @param {Object} value 对象
82
+ * @returns {Boolean}
83
+ */
84
+ export declare const isDate: (value: any) => boolean;
85
+ /**
86
+ * 判断两个值是否值相同且类型相同。
87
+ *
88
+ * 注:在 JavaScript 里 NaN === NaN 为 false,因此不能简单的用 === 来判断。
89
+ *
90
+ *
91
+ * @param {Object} x 对象
92
+ * @param {Object} y 对象
93
+ * @returns {Boolean}
94
+ */
95
+ export declare const isSame: (x: any, y: any) => boolean;
96
+ export declare const isRegExp: (value: any) => boolean;
@@ -0,0 +1,25 @@
1
+ export { setObj as set, getObj as get, isEqual } from './object';
2
+ export declare const $prefix = "Tiny";
3
+ export declare function toUpperCase(str: any): any;
4
+ export declare const getFormatted: (value: any, type: any, digit: any, defaultVal?: string) => any;
5
+ export declare const cloneDeep: (data: any) => any;
6
+ export declare const getStackMap: (stack: any) => {};
7
+ export declare const merge: (source: any, other: any) => any;
8
+ export declare const getMapJSON: ({ position, positionJsonLink, beforeRegisterMapOnce, mapURLProfix }: {
9
+ position: any;
10
+ positionJsonLink: any;
11
+ beforeRegisterMapOnce: any;
12
+ mapURLProfix?: string | undefined;
13
+ }) => any;
14
+ export declare const getBmap: ({ key, version, url }: {
15
+ key: any;
16
+ version: any;
17
+ url: any;
18
+ }) => null;
19
+ export declare const getAmap: ({ key, version, url }: {
20
+ key: any;
21
+ version: any;
22
+ url: any;
23
+ }) => null;
24
+ export declare const getLegend: (args: any, legendItemStyle: any) => any;
25
+ export declare const htmlHandler: (data: any) => any;
package/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import Core from './src/chart-core';
2
+ import { getFormatted, cloneDeep, getStackMap, get, set, merge, getMapJSON, htmlHandler } from './common/util';
3
+ import { isNull, isObject } from './common/type';
4
+ import { deepCopy } from './utils/deep-clone';
5
+ import { getRows, getYAxis, getTooltip } from './utils/options';
6
+ import { itemPoint, itemLabel, itemContent, HEAT_MAP_COLOR } from './common/constants';
7
+ import { isDefined } from './utils/type';
8
+ export default Core;
9
+ export { getFormatted, cloneDeep, getStackMap, get, set, merge, getMapJSON, getRows, getYAxis, getTooltip, isNull, isObject, deepCopy, itemPoint, itemLabel, itemContent, isDefined, htmlHandler, HEAT_MAP_COLOR };