hfn-components 0.6.1 → 0.6.2

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.
Files changed (95) hide show
  1. package/dist/index.css +1 -0
  2. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  3. package/es/component.d.ts +3 -0
  4. package/es/component.mjs +14 -0
  5. package/es/components/chart/index.d.ts +201 -0
  6. package/es/components/chart/index.mjs +7 -0
  7. package/es/components/chart/src/HtChart.d.ts +77 -0
  8. package/es/components/chart/src/HtChart.mjs +93 -0
  9. package/es/components/chart/src/HtChart.vue.d.ts +207 -0
  10. package/es/components/chart/src/HtChart.vue.mjs +90 -0
  11. package/es/components/chart/src/HtChart.vue2.mjs +109 -0
  12. package/es/components/chart/src/chartConfig.d.ts +7 -0
  13. package/es/components/chart/src/chartConfig.mjs +88 -0
  14. package/es/components/chart/style/index.d.ts +1 -0
  15. package/es/components/chart/style/index.mjs +1 -0
  16. package/es/components/elTable/index.d.ts +821 -0
  17. package/es/components/elTable/index.mjs +7 -0
  18. package/es/components/elTable/src/columnDeal.vue.d.ts +65 -0
  19. package/es/components/elTable/src/columnDeal.vue.mjs +42 -0
  20. package/es/components/elTable/src/columnDeal.vue2.mjs +19 -0
  21. package/es/components/elTable/src/elTable.d.ts +56 -0
  22. package/es/components/elTable/src/elTable.mjs +49 -0
  23. package/es/components/elTable/src/elTable.vue.d.ts +820 -0
  24. package/es/components/elTable/src/elTable.vue.mjs +114 -0
  25. package/es/components/elTable/src/elTable.vue2.mjs +51 -0
  26. package/es/components/htTarget/index.d.ts +2028 -0
  27. package/es/components/htTarget/index.mjs +6 -0
  28. package/es/components/htTarget/src/htTarget.d.ts +25 -0
  29. package/es/components/htTarget/src/htTarget.mjs +20 -0
  30. package/es/components/htTarget/src/htTarget.vue.d.ts +2027 -0
  31. package/es/components/htTarget/src/htTarget.vue.mjs +240 -0
  32. package/es/components/htTarget/src/htTarget.vue2.mjs +158 -0
  33. package/es/components/htTarget/style/index.d.ts +1 -0
  34. package/es/components/htTarget/style/index.mjs +1 -0
  35. package/es/components/index.d.ts +4 -0
  36. package/es/components/index.mjs +7 -0
  37. package/es/components/pieChart/index.d.ts +104 -0
  38. package/es/components/pieChart/index.mjs +7 -0
  39. package/es/components/pieChart/src/HtPieChart.d.ts +36 -0
  40. package/es/components/pieChart/src/HtPieChart.mjs +42 -0
  41. package/es/components/pieChart/src/HtPieChart.vue.d.ts +109 -0
  42. package/es/components/pieChart/src/HtPieChart.vue.mjs +61 -0
  43. package/es/components/pieChart/src/HtPieChart.vue2.mjs +103 -0
  44. package/es/components/pieChart/style/index.d.ts +1 -0
  45. package/es/components/pieChart/style/index.mjs +1 -0
  46. package/es/components/table/HtTable.d.ts +142 -0
  47. package/es/components/table/HtTable.mjs +136 -0
  48. package/es/components/table/HtTable.vue.d.ts +1847 -0
  49. package/es/components/table/HtTable.vue.mjs +449 -0
  50. package/es/components/table/HtTable.vue2.mjs +124 -0
  51. package/es/components/table/index.d.ts +1845 -0
  52. package/es/components/table/index.mjs +7 -0
  53. package/es/constants/chartConfig.d.ts +8 -0
  54. package/es/constants/chartConfig.mjs +148 -0
  55. package/es/constants/index.d.ts +4 -0
  56. package/es/constants/index.mjs +4 -0
  57. package/es/constants/key.d.ts +1 -0
  58. package/es/constants/key.mjs +3 -0
  59. package/es/constants/table.d.ts +125 -0
  60. package/es/constants/table.mjs +156 -0
  61. package/es/constants/target.d.ts +15 -0
  62. package/es/constants/target.mjs +59 -0
  63. package/es/defaults.d.ts +4 -0
  64. package/es/defaults.mjs +7 -0
  65. package/es/index.d.ts +5 -0
  66. package/es/index.mjs +13 -0
  67. package/es/make-installer.d.ts +4 -0
  68. package/es/make-installer.mjs +15 -0
  69. package/es/plugin.d.ts +2 -0
  70. package/es/plugin.mjs +3 -0
  71. package/es/utils/chart.d.ts +8 -0
  72. package/es/utils/chart.mjs +197 -0
  73. package/es/utils/common.d.ts +3 -0
  74. package/es/utils/common.mjs +15 -0
  75. package/es/utils/index.d.ts +4 -0
  76. package/es/utils/index.mjs +4 -0
  77. package/es/utils/table.d.ts +2 -0
  78. package/es/utils/table.mjs +31 -0
  79. package/es/utils/tool.d.ts +2 -0
  80. package/es/utils/tool.mjs +42 -0
  81. package/global.d.ts +14 -0
  82. package/package.json +1 -1
  83. package/theme-chalk/ht-chart.css +1 -0
  84. package/theme-chalk/ht-table.css +1 -0
  85. package/theme-chalk/ht-target.css +1 -0
  86. package/theme-chalk/index.css +1 -0
  87. package/theme-chalk/src/chart.scss +58 -0
  88. package/theme-chalk/src/index.scss +3 -0
  89. package/theme-chalk/src/table.scss +45 -0
  90. package/theme-chalk/src/target.scss +39 -0
  91. package/component.ts +0 -15
  92. package/defaults.ts +0 -5
  93. package/index.ts +0 -6
  94. package/make-installer.ts +0 -17
  95. package/plugin.ts +0 -1
@@ -0,0 +1,114 @@
1
+ import _sfc_main from './elTable.vue2.mjs';
2
+ import { withDirectives, openBlock, createBlock, normalizeClass, withCtx, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, renderSlot } from 'vue';
3
+ import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
4
+
5
+ const _hoisted_1 = {
6
+ key: 0,
7
+ class: "header-text-wrap"
8
+ };
9
+ const _hoisted_2 = { key: 0 };
10
+ const _hoisted_3 = { key: 1 };
11
+ const _hoisted_4 = {
12
+ key: 1,
13
+ class: "header-text-wrap"
14
+ };
15
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
16
+ return withDirectives((openBlock(), createBlock($setup["ElTable"], {
17
+ data: $setup.props.dataSource,
18
+ style: { "width": "100%" },
19
+ height: "100%",
20
+ border: $setup.props.resizable,
21
+ class: normalizeClass({ "header-only-border": $setup.props.resizable }),
22
+ "header-cell-style": {
23
+ background: $setup.props.headerColor,
24
+ color: "#000",
25
+ "font-weight": 500,
26
+ "font-size": "12px"
27
+ }
28
+ }, {
29
+ default: withCtx(() => [
30
+ (openBlock(true), createElementBlock(
31
+ Fragment,
32
+ null,
33
+ renderList($setup.props.tableColumn, (item) => {
34
+ return openBlock(), createBlock($setup["ElTableColumn"], {
35
+ resizable: $setup.props.resizable,
36
+ key: item.key,
37
+ prop: item.key,
38
+ width: item.width
39
+ }, {
40
+ header: withCtx(() => [
41
+ item.customizeLabel ? (openBlock(), createElementBlock("span", _hoisted_1, [
42
+ item.customizeLabel === "target" ? (openBlock(), createElementBlock("div", _hoisted_2, [
43
+ createElementVNode(
44
+ "div",
45
+ null,
46
+ toDisplayString($setup.targetHead.filter((items) => items.key === item.key.split("_")[0])[0].name),
47
+ 1
48
+ /* TEXT */
49
+ ),
50
+ createElementVNode(
51
+ "div",
52
+ null,
53
+ toDisplayString($setup.TARGET_END_KEY.filter((items) => items.key === item.key.split("_")[1])[0].name),
54
+ 1
55
+ /* TEXT */
56
+ )
57
+ ])) : (openBlock(), createElementBlock(
58
+ "div",
59
+ _hoisted_3,
60
+ toDisplayString($setup.wrapText(item.customizeLabel)),
61
+ 1
62
+ /* TEXT */
63
+ ))
64
+ ])) : (openBlock(), createElementBlock(
65
+ "span",
66
+ _hoisted_4,
67
+ toDisplayString($setup.wrapText($setup.TABLE_KEY[item.key])),
68
+ 1
69
+ /* TEXT */
70
+ ))
71
+ ]),
72
+ default: withCtx((scope) => [
73
+ item.dealType === "other" ? (openBlock(), createBlock($setup["ColumnDeal"], {
74
+ key: 0,
75
+ dealType: scope.row.dealType,
76
+ text: $setup.convertKey(scope.row, item.key)
77
+ }, null, 8, ["dealType", "text"])) : item.dealType === "customSlot" ? (openBlock(), createBlock($setup["ColumnDeal"], {
78
+ key: 1,
79
+ dealType: item.dealType,
80
+ slot: item.slot
81
+ }, {
82
+ [item.slot]: withCtx(() => [
83
+ renderSlot(_ctx.$slots, item.slot, {
84
+ text: $setup.convertKey(scope.row, item.key),
85
+ row: scope.row
86
+ })
87
+ ]),
88
+ _: 2
89
+ /* DYNAMIC */
90
+ }, 1032, ["dealType", "slot"])) : (openBlock(), createBlock($setup["ColumnDeal"], {
91
+ key: 2,
92
+ dealType: item.dealType,
93
+ text: $setup.convertKey(scope.row, item.key),
94
+ row: scope.row,
95
+ "deal-function": item.dealFunction
96
+ }, null, 8, ["dealType", "text", "row", "deal-function"]))
97
+ ]),
98
+ _: 2
99
+ /* DYNAMIC */
100
+ }, 1032, ["resizable", "prop", "width"]);
101
+ }),
102
+ 128
103
+ /* KEYED_FRAGMENT */
104
+ ))
105
+ ]),
106
+ _: 3
107
+ /* FORWARDED */
108
+ }, 8, ["data", "border", "class", "header-cell-style"])), [
109
+ [$setup["vLoading"], $setup.props.loading]
110
+ ]);
111
+ }
112
+ var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/elTable/src/elTable.vue"]]);
113
+
114
+ export { elTable as default };
@@ -0,0 +1,51 @@
1
+ import { defineComponent, ref, onMounted } from 'vue';
2
+ import { ElTable, ElTableColumn, vLoading } from 'element-plus';
3
+ import { TABLE_KEY, convertKey } from '../../../constants/table.mjs';
4
+ import { TARGET_HEAD_KEY, TARGET_END_KEY } from '../../../constants/target.mjs';
5
+ import '../../../constants/chartConfig.mjs';
6
+ import cloneDeep from 'lodash.clonedeep';
7
+ import ColumnDeal from './columnDeal.vue.mjs';
8
+ import { elTableProps } from './elTable.mjs';
9
+
10
+ var _sfc_main = /* @__PURE__ */ defineComponent({
11
+ __name: "elTable",
12
+ props: elTableProps,
13
+ setup(__props, { expose: __expose }) {
14
+ __expose();
15
+ const targetHead = ref(cloneDeep(TARGET_HEAD_KEY));
16
+ onMounted(() => {
17
+ let startYear = 2018;
18
+ const nowYear = (/* @__PURE__ */ new Date()).getFullYear();
19
+ while (startYear <= nowYear) {
20
+ targetHead.value.push({
21
+ name: `${startYear}`,
22
+ key: `${startYear}`
23
+ });
24
+ startYear++;
25
+ }
26
+ });
27
+ const props = __props;
28
+ const wrapText = (text, charsPerLine = 6) => {
29
+ if (!text) return "";
30
+ const regex = new RegExp(`.{1,${charsPerLine}}`, "g");
31
+ return text.match(regex)?.join("\n") || text;
32
+ };
33
+ const __returned__ = { targetHead, props, wrapText, get ElTable() {
34
+ return ElTable;
35
+ }, get ElTableColumn() {
36
+ return ElTableColumn;
37
+ }, get vLoading() {
38
+ return vLoading;
39
+ }, get TABLE_KEY() {
40
+ return TABLE_KEY;
41
+ }, get convertKey() {
42
+ return convertKey;
43
+ }, get TARGET_END_KEY() {
44
+ return TARGET_END_KEY;
45
+ }, ColumnDeal };
46
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
47
+ return __returned__;
48
+ }
49
+ });
50
+
51
+ export { _sfc_main as default };