@yoka-ui/ui 1.0.5 → 1.0.7
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/@Docs-yoka/exports.generated.md +6 -9
- package/README.md +39 -12
- package/dist/es/assets/image/skills.zip +0 -0
- package/dist/es/business/Empty/index.js.map +1 -1
- package/dist/es/business/YkCharts/Area.d.ts +18 -0
- package/dist/es/business/YkCharts/Area.js +336 -0
- package/dist/es/business/YkCharts/Area.js.map +7 -0
- package/dist/es/business/YkCharts/Bar.d.ts +21 -0
- package/dist/es/business/YkCharts/Bar.js +316 -0
- package/dist/es/business/YkCharts/Bar.js.map +7 -0
- package/dist/es/business/YkCharts/BarProperty.d.ts +21 -0
- package/dist/es/business/YkCharts/BarProperty.js +357 -0
- package/dist/es/business/YkCharts/BarProperty.js.map +7 -0
- package/dist/es/business/YkCharts/BarTotal.d.ts +21 -0
- package/dist/es/business/YkCharts/BarTotal.js +288 -0
- package/dist/es/business/YkCharts/BarTotal.js.map +7 -0
- package/dist/es/business/YkCharts/Line.d.ts +21 -0
- package/dist/es/business/YkCharts/Line.js +342 -0
- package/dist/es/business/YkCharts/Line.js.map +7 -0
- package/dist/es/business/YkCharts/Pie.d.ts +19 -0
- package/dist/es/business/YkCharts/Pie.js +107 -0
- package/dist/es/business/YkCharts/Pie.js.map +7 -0
- package/dist/es/business/YkCharts/PieProperty.d.ts +18 -0
- package/dist/es/business/YkCharts/PieProperty.js +180 -0
- package/dist/es/business/YkCharts/PieProperty.js.map +7 -0
- package/dist/es/business/YkCharts/Pies.d.ts +26 -0
- package/dist/es/business/YkCharts/Pies.js +348 -0
- package/dist/es/business/YkCharts/Pies.js.map +7 -0
- package/dist/es/business/YkCharts/constants.d.ts +1 -0
- package/dist/es/business/YkCharts/constants.js +47 -0
- package/dist/es/business/YkCharts/constants.js.map +7 -0
- package/dist/es/business/YkCharts/hooks.d.ts +4 -0
- package/dist/es/business/YkCharts/hooks.js +37 -0
- package/dist/es/business/YkCharts/hooks.js.map +7 -0
- package/dist/es/business/YkCharts/index.d.ts +9 -0
- package/dist/es/business/YkCharts/index.js +20 -0
- package/dist/es/business/YkCharts/index.js.map +7 -0
- package/dist/es/business/YkCharts/index.module.less +164 -0
- package/dist/es/business/YkCharts/tooltip.less +92 -0
- package/dist/es/business/YkCharts/transformData.js +16 -0
- package/dist/es/business/YkCharts/transformData.js.map +7 -0
- package/dist/es/business/YkCharts/typing.d.ts +74 -0
- package/dist/es/business/YkCharts/typing.js +1 -0
- package/dist/es/business/YkCharts/typing.js.map +7 -0
- package/dist/es/business/YkCharts/utils.d.ts +4 -0
- package/dist/es/business/YkCharts/utils.js +109 -0
- package/dist/es/business/YkCharts/utils.js.map +7 -0
- package/dist/es/business/YkCharts/variables.less +13 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.js +178 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.js.map +7 -0
- package/dist/es/business/YkLoginModule/index.d.ts +48 -0
- package/dist/es/business/YkLoginModule/index.js +198 -0
- package/dist/es/business/YkLoginModule/index.js.map +7 -0
- package/dist/es/business/YkLoginModule/styles.module.less +169 -0
- package/dist/es/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
- package/dist/es/business/YkSqlEdit/index.d.ts +20 -0
- package/dist/es/business/YkSqlEdit/index.js +180 -0
- package/dist/es/business/YkSqlEdit/index.js.map +7 -0
- package/dist/es/business/YkSqlEdit/sql-language.d.ts +11 -0
- package/dist/es/business/YkSqlEdit/sql-language.js +1460 -0
- package/dist/es/business/YkSqlEdit/sql-language.js.map +7 -0
- package/dist/es/components/YKMarkdown/index.d.ts +11 -0
- package/dist/es/components/YKMarkdown/index.js +236 -0
- package/dist/es/components/YKMarkdown/index.js.map +7 -0
- package/dist/es/components/YKMarkdown/index.module.less +83 -0
- package/dist/es/components/YkDateRangePicker/YkDateRangePicker.mdx +3 -3
- package/dist/es/creative/GlassSegmentedRadio/index.d.ts +1 -1
- package/dist/es/creative/SkillsWriter/index.d.ts +3 -0
- package/dist/es/creative/SkillsWriter/index.js +191 -0
- package/dist/es/creative/SkillsWriter/index.js.map +7 -0
- package/dist/es/creative/SkillsWriter/index.module.less +21 -0
- package/dist/es/index.d.ts +4 -2
- package/dist/es/index.js +80 -76
- package/dist/es/index.js.map +2 -2
- package/dist/es/index.less +8 -1
- package/dist/es/utils/ykStorybookDoc.d.ts +15 -0
- package/dist/es/utils/ykStorybookDoc.js +24 -2
- package/dist/es/utils/ykStorybookDoc.js.map +2 -2
- package/dist/lib/assets/image/skills.zip +0 -0
- package/dist/lib/business/Empty/index.js.map +1 -1
- package/dist/lib/business/YkCharts/Area.d.ts +18 -0
- package/dist/lib/business/YkCharts/Area.js +346 -0
- package/dist/lib/business/YkCharts/Area.js.map +7 -0
- package/dist/lib/business/YkCharts/Bar.d.ts +21 -0
- package/dist/lib/business/YkCharts/Bar.js +323 -0
- package/dist/lib/business/YkCharts/Bar.js.map +7 -0
- package/dist/lib/business/YkCharts/BarProperty.d.ts +21 -0
- package/dist/lib/business/YkCharts/BarProperty.js +370 -0
- package/dist/lib/business/YkCharts/BarProperty.js.map +7 -0
- package/dist/lib/business/YkCharts/BarTotal.d.ts +21 -0
- package/dist/lib/business/YkCharts/BarTotal.js +295 -0
- package/dist/lib/business/YkCharts/BarTotal.js.map +7 -0
- package/dist/lib/business/YkCharts/Line.d.ts +21 -0
- package/dist/lib/business/YkCharts/Line.js +349 -0
- package/dist/lib/business/YkCharts/Line.js.map +7 -0
- package/dist/lib/business/YkCharts/Pie.d.ts +19 -0
- package/dist/lib/business/YkCharts/Pie.js +117 -0
- package/dist/lib/business/YkCharts/Pie.js.map +7 -0
- package/dist/lib/business/YkCharts/PieProperty.d.ts +18 -0
- package/dist/lib/business/YkCharts/PieProperty.js +193 -0
- package/dist/lib/business/YkCharts/PieProperty.js.map +7 -0
- package/dist/lib/business/YkCharts/Pies.d.ts +26 -0
- package/dist/lib/business/YkCharts/Pies.js +337 -0
- package/dist/lib/business/YkCharts/Pies.js.map +7 -0
- package/dist/lib/business/YkCharts/constants.d.ts +1 -0
- package/dist/lib/business/YkCharts/constants.js +71 -0
- package/dist/lib/business/YkCharts/constants.js.map +7 -0
- package/dist/lib/business/YkCharts/hooks.d.ts +4 -0
- package/dist/lib/business/YkCharts/hooks.js +62 -0
- package/dist/lib/business/YkCharts/hooks.js.map +7 -0
- package/dist/lib/business/YkCharts/index.d.ts +9 -0
- package/dist/lib/business/YkCharts/index.js +61 -0
- package/dist/lib/business/YkCharts/index.js.map +7 -0
- package/dist/lib/business/YkCharts/index.module.less +164 -0
- package/dist/lib/business/YkCharts/tooltip.less +92 -0
- package/dist/lib/business/YkCharts/transformData.js +40 -0
- package/dist/lib/business/YkCharts/transformData.js.map +7 -0
- package/dist/lib/business/YkCharts/typing.d.ts +74 -0
- package/dist/lib/business/YkCharts/typing.js +18 -0
- package/dist/lib/business/YkCharts/typing.js.map +7 -0
- package/dist/lib/business/YkCharts/utils.d.ts +4 -0
- package/dist/lib/business/YkCharts/utils.js +143 -0
- package/dist/lib/business/YkCharts/utils.js.map +7 -0
- package/dist/lib/business/YkCharts/variables.less +13 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.js +171 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.js.map +7 -0
- package/dist/lib/business/YkLoginModule/index.d.ts +48 -0
- package/dist/lib/business/YkLoginModule/index.js +206 -0
- package/dist/lib/business/YkLoginModule/index.js.map +7 -0
- package/dist/lib/business/YkLoginModule/styles.module.less +169 -0
- package/dist/lib/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
- package/dist/lib/business/YkSqlEdit/index.d.ts +20 -0
- package/dist/lib/business/YkSqlEdit/index.js +202 -0
- package/dist/lib/business/YkSqlEdit/index.js.map +7 -0
- package/dist/lib/business/YkSqlEdit/sql-language.d.ts +11 -0
- package/dist/lib/business/YkSqlEdit/sql-language.js +1493 -0
- package/dist/lib/business/YkSqlEdit/sql-language.js.map +7 -0
- package/dist/lib/components/YKMarkdown/index.d.ts +11 -0
- package/dist/lib/components/YKMarkdown/index.js +188 -0
- package/dist/lib/components/YKMarkdown/index.js.map +7 -0
- package/dist/lib/components/YKMarkdown/index.module.less +83 -0
- package/dist/lib/components/YkDateRangePicker/YkDateRangePicker.mdx +3 -3
- package/dist/lib/creative/GlassSegmentedRadio/index.d.ts +1 -1
- package/dist/lib/creative/SkillsWriter/index.d.ts +3 -0
- package/dist/lib/creative/SkillsWriter/index.js +200 -0
- package/dist/lib/creative/SkillsWriter/index.js.map +7 -0
- package/dist/lib/creative/SkillsWriter/index.module.less +21 -0
- package/dist/lib/index.d.ts +4 -2
- package/dist/lib/index.js +6 -0
- package/dist/lib/index.js.map +2 -2
- package/dist/lib/index.less +8 -1
- package/dist/lib/utils/ykStorybookDoc.d.ts +15 -0
- package/dist/lib/utils/ykStorybookDoc.js +23 -1
- package/dist/lib/utils/ykStorybookDoc.js.map +2 -2
- package/package.json +16 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/business/YkCharts/constants.ts
|
|
20
|
+
var constants_exports = {};
|
|
21
|
+
__export(constants_exports, {
|
|
22
|
+
chartColors: () => chartColors
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(constants_exports);
|
|
25
|
+
var chartColors = [
|
|
26
|
+
"#3b82fe",
|
|
27
|
+
"#FF9A30",
|
|
28
|
+
"#60C9A3",
|
|
29
|
+
"#8A97EE ",
|
|
30
|
+
"#19A9AA",
|
|
31
|
+
"#FFC765",
|
|
32
|
+
"#9661BC",
|
|
33
|
+
"#F6903D",
|
|
34
|
+
"#008685",
|
|
35
|
+
"#F08BB4",
|
|
36
|
+
"#CDDDFD",
|
|
37
|
+
"#ff005c",
|
|
38
|
+
"#eb00ff",
|
|
39
|
+
"#3300ff",
|
|
40
|
+
"#0085ff",
|
|
41
|
+
"#00ffc2",
|
|
42
|
+
"#00ff0a",
|
|
43
|
+
"#adff00",
|
|
44
|
+
"#ff9900",
|
|
45
|
+
"#ff003d",
|
|
46
|
+
"#2ec7c9",
|
|
47
|
+
"#b6a2de",
|
|
48
|
+
"#5ab1ef",
|
|
49
|
+
"#ffb980",
|
|
50
|
+
"#d87a80",
|
|
51
|
+
"#8d98b3",
|
|
52
|
+
"#e5cf0d",
|
|
53
|
+
"#97b552",
|
|
54
|
+
"#95706d",
|
|
55
|
+
"#dc69aa",
|
|
56
|
+
"#07a2a4",
|
|
57
|
+
"#9a7fd1",
|
|
58
|
+
"#588dd5",
|
|
59
|
+
"#f5994e",
|
|
60
|
+
"#c05050",
|
|
61
|
+
"#59678c",
|
|
62
|
+
"#c9ab00",
|
|
63
|
+
"#7eb00a",
|
|
64
|
+
"#6f5553",
|
|
65
|
+
"#c14089"
|
|
66
|
+
];
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
chartColors
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/YkCharts/constants.ts"],
|
|
4
|
+
"sourcesContent": ["// 生成颜色数组\nexport const chartColors = [\n '#3b82fe',\n '#FF9A30',\n '#60C9A3',\n '#8A97EE ',\n '#19A9AA',\n '#FFC765',\n '#9661BC',\n '#F6903D',\n '#008685',\n '#F08BB4',\n '#CDDDFD',\n '#ff005c',\n '#eb00ff',\n '#3300ff',\n '#0085ff',\n '#00ffc2',\n '#00ff0a',\n '#adff00',\n '#ff9900',\n '#ff003d',\n '#2ec7c9',\n '#b6a2de',\n '#5ab1ef',\n '#ffb980',\n '#d87a80',\n '#8d98b3',\n '#e5cf0d',\n '#97b552',\n '#95706d',\n '#dc69aa',\n '#07a2a4',\n '#9a7fd1',\n '#588dd5',\n '#f5994e',\n '#c05050',\n '#59678c',\n '#c9ab00',\n '#7eb00a',\n '#6f5553',\n '#c14089',\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GroupByItem } from './typing';
|
|
2
|
+
export declare function cartesianProduct(metric: string[], groupBy: GroupByItem[]): Array<Record<string, string>>;
|
|
3
|
+
/** 解析区间字符串的下界数值,用于排序,如 "(-∞, 2)" -> -∞, "[2,5)" -> 2 */
|
|
4
|
+
export declare function getIntervalLower(s: string): number;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/business/YkCharts/hooks.ts
|
|
20
|
+
var hooks_exports = {};
|
|
21
|
+
__export(hooks_exports, {
|
|
22
|
+
cartesianProduct: () => cartesianProduct,
|
|
23
|
+
getIntervalLower: () => getIntervalLower
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(hooks_exports);
|
|
26
|
+
function cartesianProduct(metric, groupBy) {
|
|
27
|
+
const validGroups = groupBy.filter((g) => Array.isArray(g.selected) && g.selected.length > 0);
|
|
28
|
+
const keys = ["category", ...validGroups.map((g) => g.key)];
|
|
29
|
+
const arrays = [metric, ...validGroups.map((g) => g.selected)];
|
|
30
|
+
const product = arrays.reduce(
|
|
31
|
+
(acc, curr) => {
|
|
32
|
+
const res = [];
|
|
33
|
+
acc.forEach((a) => {
|
|
34
|
+
curr.forEach((b) => {
|
|
35
|
+
res.push([...a, b]);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
return res;
|
|
39
|
+
},
|
|
40
|
+
[[]]
|
|
41
|
+
);
|
|
42
|
+
return product.map((arr) => {
|
|
43
|
+
const obj = {};
|
|
44
|
+
arr.forEach((val, idx) => {
|
|
45
|
+
obj[keys[idx]] = val;
|
|
46
|
+
});
|
|
47
|
+
return obj;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function getIntervalLower(s) {
|
|
51
|
+
const str = String(s).trim();
|
|
52
|
+
if (str.includes("-∞") && str.startsWith("("))
|
|
53
|
+
return Number.NEGATIVE_INFINITY;
|
|
54
|
+
const match = str.match(/\[([-\d.]+)/);
|
|
55
|
+
return match ? Number(match[1]) : NaN;
|
|
56
|
+
}
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
59
|
+
cartesianProduct,
|
|
60
|
+
getIntervalLower
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/YkCharts/hooks.ts"],
|
|
4
|
+
"sourcesContent": ["import type { GroupByItem } from './typing';\n\n// 笛卡尔积,处理维度交叉\nexport function cartesianProduct(metric: string[], groupBy: GroupByItem[]): Array<Record<string, string>> {\n const validGroups = groupBy.filter((g) => Array.isArray(g.selected) && g.selected.length > 0);\n const keys = ['category', ...validGroups.map((g) => g.key)];\n const arrays = [metric, ...validGroups.map((g) => g.selected)];\n const product = arrays.reduce<string[][]>(\n (acc, curr) => {\n const res: string[][] = [];\n acc.forEach((a) => {\n curr.forEach((b) => {\n res.push([...a, b]);\n });\n });\n return res;\n },\n [[]],\n );\n return product.map((arr) => {\n const obj: Record<string, string> = {};\n arr.forEach((val, idx) => {\n obj[keys[idx]] = val;\n });\n return obj;\n });\n}\n\n/** 解析区间字符串的下界数值,用于排序,如 \"(-∞, 2)\" -> -∞, \"[2,5)\" -> 2 */\nexport function getIntervalLower(s: string): number {\n const str = String(s).trim();\n if (str.includes('-∞') && str.startsWith('(')) return Number.NEGATIVE_INFINITY;\n const match = str.match(/\\[([-\\d.]+)/);\n return match ? Number(match[1]) : NaN;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,SAAS,iBAAiB,QAAkB,SAAuD;AACxG,QAAM,cAAc,QAAQ,OAAO,CAAC,MAAM,MAAM,QAAQ,EAAE,QAAQ,KAAK,EAAE,SAAS,SAAS,CAAC;AAC5F,QAAM,OAAO,CAAC,YAAY,GAAG,YAAY,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;AAC1D,QAAM,SAAS,CAAC,QAAQ,GAAG,YAAY,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC7D,QAAM,UAAU,OAAO;AAAA,IACrB,CAAC,KAAK,SAAS;AACb,YAAM,MAAkB,CAAC;AACzB,UAAI,QAAQ,CAAC,MAAM;AACjB,aAAK,QAAQ,CAAC,MAAM;AAClB,cAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;AAAA,QACpB,CAAC;AAAA,MACH,CAAC;AACD,aAAO;AAAA,IACT;AAAA,IACA,CAAC,CAAC,CAAC;AAAA,EACL;AACA,SAAO,QAAQ,IAAI,CAAC,QAAQ;AAC1B,UAAM,MAA8B,CAAC;AACrC,QAAI,QAAQ,CAAC,KAAK,QAAQ;AACxB,UAAI,KAAK,GAAG,CAAC,IAAI;AAAA,IACnB,CAAC;AACD,WAAO;AAAA,EACT,CAAC;AACH;AAGO,SAAS,iBAAiB,GAAmB;AAClD,QAAM,MAAM,OAAO,CAAC,EAAE,KAAK;AAC3B,MAAI,IAAI,SAAS,IAAI,KAAK,IAAI,WAAW,GAAG;AAAG,WAAO,OAAO;AAC7D,QAAM,QAAQ,IAAI,MAAM,aAAa;AACrC,SAAO,QAAQ,OAAO,MAAM,CAAC,CAAC,IAAI;AACpC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as YkArea } from './Area';
|
|
2
|
+
export { default as YkBar } from './Bar';
|
|
3
|
+
export { default as YkBarProperty } from './BarProperty';
|
|
4
|
+
export { default as YkBarTotal } from './BarTotal';
|
|
5
|
+
export { default as YkLine } from './Line';
|
|
6
|
+
export { default as YkPie } from './Pie';
|
|
7
|
+
export { default as YkPieProperty } from './PieProperty';
|
|
8
|
+
export { default as YkPies } from './Pies';
|
|
9
|
+
export type { ColumnConfig, Format, GroupByItem, SqlFormat, SqlMetaConfig, TableData } from './typing';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/business/YkCharts/index.ts
|
|
30
|
+
var YkCharts_exports = {};
|
|
31
|
+
__export(YkCharts_exports, {
|
|
32
|
+
YkArea: () => import_Area.default,
|
|
33
|
+
YkBar: () => import_Bar.default,
|
|
34
|
+
YkBarProperty: () => import_BarProperty.default,
|
|
35
|
+
YkBarTotal: () => import_BarTotal.default,
|
|
36
|
+
YkLine: () => import_Line.default,
|
|
37
|
+
YkPie: () => import_Pie.default,
|
|
38
|
+
YkPieProperty: () => import_PieProperty.default,
|
|
39
|
+
YkPies: () => import_Pies.default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(YkCharts_exports);
|
|
42
|
+
var import_Area = __toESM(require("./Area"));
|
|
43
|
+
var import_Bar = __toESM(require("./Bar"));
|
|
44
|
+
var import_BarProperty = __toESM(require("./BarProperty"));
|
|
45
|
+
var import_BarTotal = __toESM(require("./BarTotal"));
|
|
46
|
+
var import_Line = __toESM(require("./Line"));
|
|
47
|
+
var import_Pie = __toESM(require("./Pie"));
|
|
48
|
+
var import_PieProperty = __toESM(require("./PieProperty"));
|
|
49
|
+
var import_Pies = __toESM(require("./Pies"));
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
YkArea,
|
|
53
|
+
YkBar,
|
|
54
|
+
YkBarProperty,
|
|
55
|
+
YkBarTotal,
|
|
56
|
+
YkLine,
|
|
57
|
+
YkPie,
|
|
58
|
+
YkPieProperty,
|
|
59
|
+
YkPies
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/YkCharts/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { default as YkArea } from './Area';\nexport { default as YkBar } from './Bar';\nexport { default as YkBarProperty } from './BarProperty';\nexport { default as YkBarTotal } from './BarTotal';\nexport { default as YkLine } from './Line';\nexport { default as YkPie } from './Pie';\nexport { default as YkPieProperty } from './PieProperty';\nexport { default as YkPies } from './Pies';\n\nexport type { ColumnConfig, Format, GroupByItem, SqlFormat, SqlMetaConfig, TableData } from './typing';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAkC;AAClC,iBAAiC;AACjC,yBAAyC;AACzC,sBAAsC;AACtC,kBAAkC;AAClC,iBAAiC;AACjC,yBAAyC;AACzC,kBAAkC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
.chartBody {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
width: 100%;
|
|
8
|
+
|
|
9
|
+
.chartBodyHeader {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
gap: 10px;
|
|
14
|
+
margin-bottom: 20px;
|
|
15
|
+
|
|
16
|
+
.chartType {
|
|
17
|
+
position: relative;
|
|
18
|
+
margin-left: auto;
|
|
19
|
+
|
|
20
|
+
.radioButton {
|
|
21
|
+
position: relative;
|
|
22
|
+
height: 30px;
|
|
23
|
+
line-height: 28px;
|
|
24
|
+
|
|
25
|
+
&:first-child {
|
|
26
|
+
border-start-start-radius: 2px;
|
|
27
|
+
border-end-start-radius: 2px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:last-child {
|
|
31
|
+
border-start-end-radius: 2px;
|
|
32
|
+
border-end-end-radius: 2px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.chartBodyContent {
|
|
39
|
+
position: relative;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex: 1;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
min-height: 300px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.echarts {
|
|
49
|
+
position: relative;
|
|
50
|
+
flex: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tooltip {
|
|
54
|
+
position: relative;
|
|
55
|
+
min-width: 200px;
|
|
56
|
+
padding: 10px 0 0 10px;
|
|
57
|
+
box-shadow: rgb(71 71 71 / 10%) 0 2px 12px 0;
|
|
58
|
+
|
|
59
|
+
.title {
|
|
60
|
+
position: relative;
|
|
61
|
+
z-index: 2;
|
|
62
|
+
display: flex;
|
|
63
|
+
gap: 10px;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
margin-bottom: 10px;
|
|
67
|
+
color: #333;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.content {
|
|
73
|
+
position: relative;
|
|
74
|
+
max-height: 200px;
|
|
75
|
+
overflow-y: auto;
|
|
76
|
+
|
|
77
|
+
.item {
|
|
78
|
+
position: relative;
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
height: 20px;
|
|
82
|
+
margin-bottom: 5px;
|
|
83
|
+
padding: 0 0 0 10px;
|
|
84
|
+
padding-right: 10px;
|
|
85
|
+
color: #666;
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
line-height: 20px;
|
|
89
|
+
border-radius: 4px;
|
|
90
|
+
|
|
91
|
+
.point {
|
|
92
|
+
position: relative;
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
width: 13px;
|
|
97
|
+
height: 2px;
|
|
98
|
+
margin-right: 10px;
|
|
99
|
+
border-top-width: 2px;
|
|
100
|
+
|
|
101
|
+
&.pointBar {
|
|
102
|
+
width: 10px;
|
|
103
|
+
height: 10px;
|
|
104
|
+
border-radius: 2px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.category {
|
|
109
|
+
margin-right: 20px;
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.value {
|
|
114
|
+
flex: 1;
|
|
115
|
+
color: #333;
|
|
116
|
+
text-align: right;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.pieLegend {
|
|
123
|
+
position: relative;
|
|
124
|
+
width: 100%;
|
|
125
|
+
height: 100%;
|
|
126
|
+
|
|
127
|
+
.pieSlider {
|
|
128
|
+
width: 100%;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:global {
|
|
133
|
+
.swiper-button-prev::after,
|
|
134
|
+
.swiper-button-next::after {
|
|
135
|
+
font-size: 30px !important;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.empty {
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
height: 100%;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.percentRadio {
|
|
148
|
+
position: relative;
|
|
149
|
+
margin-left: auto;
|
|
150
|
+
|
|
151
|
+
.radioButton {
|
|
152
|
+
position: relative;
|
|
153
|
+
|
|
154
|
+
&:first-child {
|
|
155
|
+
border-start-start-radius: 2px;
|
|
156
|
+
border-end-start-radius: 2px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:last-child {
|
|
160
|
+
border-start-end-radius: 2px;
|
|
161
|
+
border-end-end-radius: 2px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
.g2-tooltip {
|
|
4
|
+
background-color: transparent !important;
|
|
5
|
+
box-shadow: none !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.yk-charts-tooltip {
|
|
9
|
+
position: relative;
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
padding: 15px 20px 5px 15px;
|
|
12
|
+
border: none;
|
|
13
|
+
box-shadow: rgb(71 71 71 / 10%) 0 2px 12px 0;
|
|
14
|
+
|
|
15
|
+
.ant-card-body {
|
|
16
|
+
position: relative;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 5px;
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.yk-charts-tooltip-title {
|
|
24
|
+
margin-bottom: 10px;
|
|
25
|
+
color: #333;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
font-family: @ykFontFamilyMedium;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.yk-charts-tooltip-box {
|
|
32
|
+
margin-bottom: 5px;
|
|
33
|
+
|
|
34
|
+
.yk-charts-tooltip-item {
|
|
35
|
+
position: relative;
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
height: 20px;
|
|
39
|
+
margin-bottom: 5px;
|
|
40
|
+
padding: 0 0 0 10px;
|
|
41
|
+
color: #666;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
font-family: @ykFontFamilyRegular;
|
|
45
|
+
line-height: 20px;
|
|
46
|
+
border-radius: 4px;
|
|
47
|
+
|
|
48
|
+
.item-point {
|
|
49
|
+
position: relative;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
width: 13px;
|
|
54
|
+
height: 1px;
|
|
55
|
+
margin-right: 10px;
|
|
56
|
+
border-top-width: 2px;
|
|
57
|
+
|
|
58
|
+
&-svg {
|
|
59
|
+
width: 14px;
|
|
60
|
+
height: 5px;
|
|
61
|
+
margin-right: 10px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.item-square {
|
|
66
|
+
position: relative;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
width: 10px;
|
|
71
|
+
height: 10px;
|
|
72
|
+
margin-right: 10px;
|
|
73
|
+
background-size: 5px 5px !important;
|
|
74
|
+
border-top-width: 2px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.item-key {
|
|
78
|
+
margin-right: 5px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.item-category {
|
|
82
|
+
margin-right: 30px;
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.item-value {
|
|
87
|
+
flex: 1;
|
|
88
|
+
text-align: right;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/business/YkCharts/transformData.js
|
|
20
|
+
var transformData_exports = {};
|
|
21
|
+
__export(transformData_exports, {
|
|
22
|
+
transformBaseToSeries: () => transformBaseToSeries
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(transformData_exports);
|
|
25
|
+
var transformBaseToSeries = (baseData) => {
|
|
26
|
+
const intervals = Object.keys(baseData[0]).filter((key) => key !== "数据日期" && key !== "设备数");
|
|
27
|
+
return intervals.map((interval) => ({
|
|
28
|
+
name: interval,
|
|
29
|
+
type: "line",
|
|
30
|
+
smooth: true,
|
|
31
|
+
areaStyle: {},
|
|
32
|
+
showSymbol: false,
|
|
33
|
+
data: baseData.map((item) => item[interval])
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
transformBaseToSeries
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=transformData.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/YkCharts/transformData.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * 将base数据转换为series格式\n * @param {Array} baseData - 原始数据数组\n * @returns {Array} - 转换后的series数据\n */\nexport const transformBaseToSeries = (baseData) => {\n // 获取所有区间名称(排除数据日期和设备数字段)\n const intervals = Object.keys(baseData[0]).filter((key) => key !== '数据日期' && key !== '设备数');\n\n // 为每个区间创建series对象\n return intervals.map((interval) => ({\n name: interval,\n type: 'line',\n smooth: true,\n areaStyle: {},\n showSymbol: false,\n data: baseData.map((item) => item[interval]),\n }));\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,wBAAwB,CAAC,aAAa;AAEjD,QAAM,YAAY,OAAO,KAAK,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,QAAQ,UAAU,QAAQ,KAAK;AAG1F,SAAO,UAAU,IAAI,CAAC,cAAc;AAAA,IAClC,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,WAAW,CAAC;AAAA,IACZ,YAAY;AAAA,IACZ,MAAM,SAAS,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC;AAAA,EAC7C,EAAE;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export type GroupByItem = {
|
|
2
|
+
key: string;
|
|
3
|
+
options: string[];
|
|
4
|
+
selected: string[];
|
|
5
|
+
};
|
|
6
|
+
export type Format = 'integer' | 'string' | 'datetime' | 'decimal' | 'percent' | 'currency';
|
|
7
|
+
export type ColumnConfig = {
|
|
8
|
+
width?: number;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
sortable?: 'number' | 'string';
|
|
11
|
+
fixed?: 'left' | 'right';
|
|
12
|
+
hide_compare?: boolean;
|
|
13
|
+
align?: 'left' | 'right' | 'center';
|
|
14
|
+
name_group?: string;
|
|
15
|
+
format?: Format;
|
|
16
|
+
is_heatmap?: boolean;
|
|
17
|
+
sort_order?: 'ascend' | 'descend';
|
|
18
|
+
is_heap?: boolean;
|
|
19
|
+
hidden?: boolean;
|
|
20
|
+
resize?: boolean;
|
|
21
|
+
disable_sort?: boolean;
|
|
22
|
+
sort_method?: 'number' | 'string' | '';
|
|
23
|
+
show_icon?: boolean;
|
|
24
|
+
titletip?: string;
|
|
25
|
+
tip_id?: string | string;
|
|
26
|
+
type?: 'string' | 'numeric' | 'date' | 'boolean' | 'number';
|
|
27
|
+
};
|
|
28
|
+
type Compare = {
|
|
29
|
+
end: string;
|
|
30
|
+
start: string;
|
|
31
|
+
value: number | null;
|
|
32
|
+
label: string;
|
|
33
|
+
time: string;
|
|
34
|
+
};
|
|
35
|
+
type KpiData = {
|
|
36
|
+
huan_bi: Compare;
|
|
37
|
+
tong_bi: Compare;
|
|
38
|
+
last: Compare;
|
|
39
|
+
};
|
|
40
|
+
export type TableData = {
|
|
41
|
+
ds_id: number;
|
|
42
|
+
metric: string[];
|
|
43
|
+
group_by: string[] | null;
|
|
44
|
+
chart_types: string[];
|
|
45
|
+
column_config: ColumnConfig[];
|
|
46
|
+
x: string[];
|
|
47
|
+
x_field: string;
|
|
48
|
+
table_summary: (string | number)[];
|
|
49
|
+
table_body: (string | number | boolean)[][];
|
|
50
|
+
table_head: string[];
|
|
51
|
+
kpi_data?: KpiData;
|
|
52
|
+
last_refresh_time?: string;
|
|
53
|
+
total_column?: string;
|
|
54
|
+
duration_ms?: number;
|
|
55
|
+
debug_sql?: string;
|
|
56
|
+
meta_data?: SqlMetaConfig[];
|
|
57
|
+
};
|
|
58
|
+
export type SqlFormatType = 'normal' | 'number' | 'percent' | 'currency';
|
|
59
|
+
export type SqlFormat = {
|
|
60
|
+
type: SqlFormatType;
|
|
61
|
+
decimals: number;
|
|
62
|
+
thousand_separator: boolean;
|
|
63
|
+
unit: number;
|
|
64
|
+
prefix?: string;
|
|
65
|
+
suffix?: string;
|
|
66
|
+
};
|
|
67
|
+
export type SqlMetaConfig = {
|
|
68
|
+
show: boolean;
|
|
69
|
+
field: string;
|
|
70
|
+
display_name: string;
|
|
71
|
+
is_numeric: boolean;
|
|
72
|
+
format: SqlFormat;
|
|
73
|
+
};
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/business/YkCharts/typing.ts
|
|
16
|
+
var typing_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(typing_exports);
|
|
18
|
+
//# sourceMappingURL=typing.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/YkCharts/typing.ts"],
|
|
4
|
+
"sourcesContent": ["export type GroupByItem = {\n key: string;\n options: string[];\n selected: string[];\n};\n\nexport type Format = 'integer' | 'string' | 'datetime' | 'decimal' | 'percent' | 'currency';\n\nexport type ColumnConfig = {\n width?: number;\n tooltip?: string;\n sortable?: 'number' | 'string';\n fixed?: 'left' | 'right';\n hide_compare?: boolean;\n align?: 'left' | 'right' | 'center';\n name_group?: string;\n format?: Format;\n is_heatmap?: boolean;\n sort_order?: 'ascend' | 'descend';\n is_heap?: boolean;\n hidden?: boolean;\n resize?: boolean;\n disable_sort?: boolean;\n sort_method?: 'number' | 'string' | '';\n show_icon?: boolean;\n titletip?: string;\n tip_id?: string | string;\n type?: 'string' | 'numeric' | 'date' | 'boolean' | 'number';\n};\n\ntype Compare = {\n end: string;\n start: string;\n value: number | null;\n label: string;\n time: string;\n};\n\ntype KpiData = {\n huan_bi: Compare;\n tong_bi: Compare;\n last: Compare;\n};\n\nexport type TableData = {\n ds_id: number;\n metric: string[];\n group_by: string[] | null;\n chart_types: string[];\n column_config: ColumnConfig[];\n x: string[];\n x_field: string;\n table_summary: (string | number)[];\n table_body: (string | number | boolean)[][];\n table_head: string[];\n kpi_data?: KpiData;\n last_refresh_time?: string;\n total_column?: string;\n duration_ms?: number;\n debug_sql?: string;\n meta_data?: SqlMetaConfig[];\n};\n\nexport type SqlFormatType = 'normal' | 'number' | 'percent' | 'currency';\n\nexport type SqlFormat = {\n type: SqlFormatType;\n decimals: number;\n thousand_separator: boolean;\n unit: number;\n prefix?: string;\n suffix?: string;\n};\n\nexport type SqlMetaConfig = {\n show: boolean;\n field: string;\n display_name: string;\n is_numeric: boolean;\n format: SqlFormat;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Format, SqlFormat } from './typing';
|
|
2
|
+
export declare const formatValue: (value: string | number, format: Format | undefined | null) => string;
|
|
3
|
+
export declare function formatNumber(num: number | string, isInteger?: boolean): [string, string];
|
|
4
|
+
export declare function sqlFormat(value: string | number | boolean, format: SqlFormat | undefined | null): string;
|