bp-aicc-editor 1.0.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.
Files changed (177) hide show
  1. package/LICENSE +21 -0
  2. package/README.EN.md +129 -0
  3. package/README.md +133 -0
  4. package/lib/accounting-BdNhlOvc.js +150 -0
  5. package/lib/arrow-right-ZYLcC6uE.js +24 -0
  6. package/lib/atlas-Dqnvg58g.js +27 -0
  7. package/lib/blueprint-7yYCtfFC.js +28 -0
  8. package/lib/border-box-BoVwKoLu.js +226 -0
  9. package/lib/browser_upgrade/chrome.png +0 -0
  10. package/lib/browser_upgrade/edge.png +0 -0
  11. package/lib/browser_upgrade/index.css +49 -0
  12. package/lib/btn-group-aVjYHP70.js +125 -0
  13. package/lib/btn-return-KOGYYoba.js +37 -0
  14. package/lib/button-base-CUvUtpPb.js +42 -0
  15. package/lib/cache-Cs2VtqJi.js +43 -0
  16. package/lib/capitalize-CJ7zhOsJ.js +46 -0
  17. package/lib/carousel-table-hn7W3uoD.js +163 -0
  18. package/lib/children-manager-CdxNQ6Oe.js +457 -0
  19. package/lib/circle-DdqdosvQ.js +10 -0
  20. package/lib/config-6kqKwjzS.js +783 -0
  21. package/lib/config-B1XQHD5S.js +110 -0
  22. package/lib/config-BqncRAOx.js +167 -0
  23. package/lib/config-CSUhHF5L.js +10 -0
  24. package/lib/config-CXGTRw74.js +743 -0
  25. package/lib/config-CjMfBTu9.js +75 -0
  26. package/lib/config-Cm22p_rY.js +40 -0
  27. package/lib/config-D3z2R85K.js +373 -0
  28. package/lib/config-D846M2Gv.js +813 -0
  29. package/lib/config-DHGpQmWe.js +695 -0
  30. package/lib/config-DJJlRxrQ.js +510 -0
  31. package/lib/config-DOtfpO43.js +64 -0
  32. package/lib/config-DS3NxQuJ.js +427 -0
  33. package/lib/config-DSw2PMKb.js +528 -0
  34. package/lib/config-DwVaqCyN.js +369 -0
  35. package/lib/config-Ec_zeOmT.js +10 -0
  36. package/lib/config-V6sABZH7.js +152 -0
  37. package/lib/config-XBAZDWTe.js +739 -0
  38. package/lib/config-ZZyCB-UG.js +210 -0
  39. package/lib/config-efyvf2nq.js +799 -0
  40. package/lib/context-Bl7hm9BN.js +5 -0
  41. package/lib/context-DXwgwPsi.js +5 -0
  42. package/lib/dashedLine-CJojzUDO.js +23 -0
  43. package/lib/data-CnP9NKXT.js +7 -0
  44. package/lib/data-field-DL4ZWkqD.js +17 -0
  45. package/lib/data-source-9Lgf-grI.js +78 -0
  46. package/lib/datav-BNctF3aF.js +89 -0
  47. package/lib/dater-BmOxJMnU.js +34 -0
  48. package/lib/db-rnJHM_q3.js +22 -0
  49. package/lib/decoration-ByPSHV8P.js +408 -0
  50. package/lib/delete-074QJWYN.js +112 -0
  51. package/lib/dialogBox-D3bwyGqh.js +21 -0
  52. package/lib/dialogSquare-C4KW-cRk.js +43 -0
  53. package/lib/dottedLine-CUbyTDpF.js +23 -0
  54. package/lib/doubleHeadedArrow-ph10_VNV.js +31 -0
  55. package/lib/ds-api-editor-uAArtQJI.js +115 -0
  56. package/lib/ds-global-editor-Cp80r2NN.js +121 -0
  57. package/lib/ds-sql-editor-ijeSFlXA.js +338 -0
  58. package/lib/ds-static-editor-CyEO_12Q.js +21592 -0
  59. package/lib/eightPointedStar-iyNwBma5.js +12 -0
  60. package/lib/empty-panel-C6Y6WgQ5.js +49 -0
  61. package/lib/event-DDj_G-ix.js +130 -0
  62. package/lib/favicon.svg +14 -0
  63. package/lib/filter-panel-BXIsc124.js +573 -0
  64. package/lib/fivePointedStar-CG-mQPKI.js +12 -0
  65. package/lib/fourPointedStar-Cjt9WMZi.js +12 -0
  66. package/lib/full-screen-By33Ud_D.js +34 -0
  67. package/lib/group-Bw2QYoqv.js +24 -0
  68. package/lib/heart-BS_j9yRq.js +4 -0
  69. package/lib/hexagon-BfE9vpeG.js +12 -0
  70. package/lib/hexagonalStar-CDF1zFRy.js +12 -0
  71. package/lib/icon/add.png +0 -0
  72. package/lib/icon/align-center.png +0 -0
  73. package/lib/icon/amplify.png +0 -0
  74. package/lib/icon/audio.png +0 -0
  75. package/lib/icon/bottomUp.png +0 -0
  76. package/lib/icon/carouselList.png +0 -0
  77. package/lib/icon/characters.png +0 -0
  78. package/lib/icon/delete.png +0 -0
  79. package/lib/icon/delete1.png +0 -0
  80. package/lib/icon/edit.png +0 -0
  81. package/lib/icon/file.png +0 -0
  82. package/lib/icon/graphic.png +0 -0
  83. package/lib/icon/icon/357/274/217/346/267/273/345/212/240 /347/231/275/350/211/262 1@2x.png +0 -0
  84. package/lib/icon/icon/357/274/217/346/267/273/345/212/240@2x.png +0 -0
  85. package/lib/icon/img.png +0 -0
  86. package/lib/icon/lock.png +0 -0
  87. package/lib/icon/multiline.png +0 -0
  88. package/lib/icon/navigate.png +0 -0
  89. package/lib/icon/next.png +0 -0
  90. package/lib/icon/pictureScrolling.png +0 -0
  91. package/lib/icon/previous.png +0 -0
  92. package/lib/icon/reduce.png +0 -0
  93. package/lib/icon/return.png +0 -0
  94. package/lib/icon/save.png +0 -0
  95. package/lib/icon/scBg.png +0 -0
  96. package/lib/icon/scrollText.png +0 -0
  97. package/lib/icon/search.png +0 -0
  98. package/lib/icon/share.png +0 -0
  99. package/lib/icon/topUp.png +0 -0
  100. package/lib/icon/upload.png +0 -0
  101. package/lib/icon/video.png +0 -0
  102. package/lib/icon/view.png +0 -0
  103. package/lib/icon//345/244/215/351/200/211/357/274/217/346/234/252/351/200/211@2x.png +0 -0
  104. package/lib/icon//345/244/215/351/200/211/357/274/217/351/200/211/344/270/255@2x(1).png +0 -0
  105. package/lib/icon//345/244/215/351/200/211/357/274/217/351/200/211/344/270/255@2x.png +0 -0
  106. package/lib/iking-utils.es-Ba74AedH.js +13822 -0
  107. package/lib/index-B76XXskt.js +225 -0
  108. package/lib/index-B9lRx-kg.js +85 -0
  109. package/lib/index-B9nm6Rgv.js +142 -0
  110. package/lib/index-BAN9B0Xt.js +176 -0
  111. package/lib/index-BH6iU67J.js +209 -0
  112. package/lib/index-BSeD4M2U.js +988 -0
  113. package/lib/index-BbUCT3bG.js +66 -0
  114. package/lib/index-Bjs1bW2W.js +6291 -0
  115. package/lib/index-Bzc3Ri47.js +472 -0
  116. package/lib/index-C2ezj_lw.js +19 -0
  117. package/lib/index-C8Ni1uMd.js +435 -0
  118. package/lib/index-CCCckUnm.js +19 -0
  119. package/lib/index-CGni9huM.js +339 -0
  120. package/lib/index-CI6xXcR0.js +47 -0
  121. package/lib/index-CTo4-44e.js +2013 -0
  122. package/lib/index-CX6tHoIu.js +208 -0
  123. package/lib/index-Cb06BDgi.js +48 -0
  124. package/lib/index-CuapA_N-.js +586 -0
  125. package/lib/index-D0Kh7c2E.js +142 -0
  126. package/lib/index-D8pryMlS.js +228 -0
  127. package/lib/index-DGErpAp1.js +245 -0
  128. package/lib/index-DHe-NWes.js +415 -0
  129. package/lib/index-DL5IJLR7.js +156 -0
  130. package/lib/index-DN_9YBN_.js +957 -0
  131. package/lib/index-DOYvASbD.js +121 -0
  132. package/lib/index-D_ojDCWy.js +52 -0
  133. package/lib/index-DcmokBSP.js +109 -0
  134. package/lib/index-Dm1le54W.js +226 -0
  135. package/lib/index-Dpg5we85.js +127 -0
  136. package/lib/index-IeVkGUKs.js +146 -0
  137. package/lib/index-VSfx-dDV.js +87 -0
  138. package/lib/index-_Ya8vNUb.js +79 -0
  139. package/lib/index.es.js +5 -0
  140. package/lib/index.umd.js +99 -0
  141. package/lib/kebabCase-CO6lu_Gu.js +250 -0
  142. package/lib/keyMap-wL6Ma83z.js +91 -0
  143. package/lib/layer-setting-panel-C86c3fN0.js +486 -0
  144. package/lib/main-graph-BjOO_j7Y.js +43 -0
  145. package/lib/marquee-B6qUH-Kc.js +49 -0
  146. package/lib/message-carousel-ToN1yK7K.js +34 -0
  147. package/lib/multi-layout-config-DWBvxtbQ.js +312 -0
  148. package/lib/number-title-flop-DUzpC1bo.js +112 -0
  149. package/lib/orderBy--EIhNVJu.js +388 -0
  150. package/lib/page-config-DT1C_kDM.js +5598 -0
  151. package/lib/page-table-U2Zv9dzo.js +169 -0
  152. package/lib/paragraph-D7CutH53.js +51 -0
  153. package/lib/pentagon-6sVh023X.js +12 -0
  154. package/lib/plus-DjE6l8qH.js +24 -0
  155. package/lib/rank-board-Cgj8rzLd.js +121 -0
  156. package/lib/rectangle-BQXP06pk.js +10 -0
  157. package/lib/roundedRectangle-DnEbzLph.js +10 -0
  158. package/lib/scroll-article-BC3pQhTm.js +130 -0
  159. package/lib/scroll-rank-BsbvGjIy.js +191 -0
  160. package/lib/scroll-rank-bar-BfceYhB-.js +189 -0
  161. package/lib/scroll-table-BTbnMVFS.js +303 -0
  162. package/lib/search-DkzwOoCx.js +24 -0
  163. package/lib/select-options-BTOkre7F.js +338 -0
  164. package/lib/setting-panel-CMKniQhs.js +397 -0
  165. package/lib/source-panel-ClGOmTVn.js +557 -0
  166. package/lib/straightLine-DPMRNFNz.js +23 -0
  167. package/lib/style.css +1 -0
  168. package/lib/table-bar-ciEVdDFG.js +117 -0
  169. package/lib/transform-layer.vue_vue_type_style_index_0_scoped_04cdae36_lang-6ixEI9oF.js +593 -0
  170. package/lib/triangle-NkNGdZCH.js +15 -0
  171. package/lib/use-border-BUij5e0F.js +29 -0
  172. package/lib/use-data-center-Cj9FGyCg.js +31 -0
  173. package/lib/use-series-Cmnkexlu.js +18 -0
  174. package/lib/use-swiper-B17v1vT0.js +12 -0
  175. package/lib/vue-util-oCdnLsQn.js +6 -0
  176. package/lib/warning-DYO0amRd.js +25 -0
  177. package/package.json +154 -0
@@ -0,0 +1,142 @@
1
+ import { computed as d, reactive as T } from "vue";
2
+ import { useDialog as O } from "naive-ui";
3
+ import { a as $, b, C as D, h as G, aE as J } from "./index-Bjs1bW2W.js";
4
+ import { ElMessage as l, ElMessageBox as B } from "element-plus";
5
+ const h = function(e, o, c, r = !1) {
6
+ e && o && c && e.addEventListener(o, c, r);
7
+ }, g = function(e, o, c) {
8
+ e && o && c && e.removeEventListener(o, c, !1);
9
+ }, Y = function(e, o, c) {
10
+ const r = (i) => {
11
+ c(i), g(e, o, r);
12
+ };
13
+ h(e, o, r);
14
+ };
15
+ function j(e, o) {
16
+ if (!e || !o) return !1;
17
+ if (o.indexOf(" ") !== -1)
18
+ throw new Error("className should not contain space.");
19
+ return e.classList ? e.classList.contains(o) : ` ${e.className} `.indexOf(` ${o} `) > -1;
20
+ }
21
+ function q(e, o) {
22
+ if (!e) return;
23
+ let c = e.className;
24
+ const r = (o || "").split(" ");
25
+ for (let i = 0, f = r.length; i < f; i++) {
26
+ const a = r[i];
27
+ a && (e.classList ? e.classList.add(a) : j(e, a) || (c += ` ${a}`));
28
+ }
29
+ e.classList || (e.className = c);
30
+ }
31
+ const C = T({ x: 0, y: 0 }), z = () => {
32
+ O();
33
+ const e = $(), o = b(), c = d(() => e.selectedComs.every((s) => s.locked)), r = d(() => e.selectedComs.every((s) => s.hided)), i = d(() => e.selectedComs.every((s) => s.type === D.layer)), f = d(() => !1), a = (s) => {
34
+ const t = e.selectedComs;
35
+ if (t.length === 0)
36
+ return;
37
+ const n = t[0].parentId;
38
+ t.map((m) => m.id).forEach((m) => {
39
+ e.move(s, m, n);
40
+ });
41
+ }, y = () => {
42
+ const s = e.selectedComs;
43
+ if (s.length === 0)
44
+ return;
45
+ const t = !c.value;
46
+ s.forEach((n) => {
47
+ n.locked = t;
48
+ });
49
+ }, x = () => {
50
+ const s = e.selectedComs;
51
+ if (s.length === 0)
52
+ return;
53
+ const t = !r.value;
54
+ s.forEach((n) => {
55
+ n.hided = t;
56
+ });
57
+ }, E = () => {
58
+ const s = e.selectedComs;
59
+ if (s.length === 0)
60
+ return;
61
+ const t = s.map((n) => n.alias);
62
+ B.confirm(
63
+ `删除后无法恢复,是否删除${t.join(",")},共${t.length}个组件`,
64
+ "删除提醒",
65
+ {
66
+ confirmButtonText: "确定",
67
+ cancelButtonText: "取消",
68
+ type: "warning"
69
+ }
70
+ ).then(async () => {
71
+ await e.deletes(s);
72
+ }).catch((n) => {
73
+ });
74
+ }, w = () => {
75
+ e.selectedComs[0].renameing = !0;
76
+ }, S = () => {
77
+ e.selectedComs.forEach((s) => {
78
+ e.copy(s);
79
+ });
80
+ }, L = () => {
81
+ if (e.selectedComs?.length > 1) {
82
+ l.info("每次仅可复制一个组件/组合");
83
+ return;
84
+ }
85
+ const s = G(e.selectedComs[0]), t = JSON.stringify(s);
86
+ J(t), l.success("复制成功");
87
+ }, N = async () => {
88
+ if (e.selectedComs?.length > 1) {
89
+ l.info("请选择一个组件/组合粘贴");
90
+ return;
91
+ }
92
+ const s = await navigator.clipboard.readText();
93
+ if (!s) {
94
+ l.info("无可用粘贴配置");
95
+ return;
96
+ }
97
+ const t = JSON.parse(s), n = e.selectedComs[0], p = e.coms.findIndex((m) => m.id === n.id);
98
+ p > -1 && (e.coms[p] = {
99
+ ...t,
100
+ attr: {
101
+ ...n.attr,
102
+ w: t.attr.w,
103
+ h: t.attr.h
104
+ },
105
+ id: n.id
106
+ });
107
+ }, k = () => {
108
+ e.selectedComs.length !== 0 && e.createGroup();
109
+ }, v = () => {
110
+ e.selectedComs.length !== 0 && e.cancelGroup();
111
+ }, M = (s, t) => {
112
+ s.preventDefault(), s.stopPropagation(), t.selected && (C.x = s.clientX, C.y = s.clientY, o.contextMenu.show = !0, h(document, "click", u));
113
+ }, u = () => {
114
+ g(document, "click", u), o.contextMenu.show = !1;
115
+ };
116
+ return {
117
+ pos: C,
118
+ isLocked: c,
119
+ isHided: r,
120
+ isGroup: i,
121
+ disableGroup: f,
122
+ showMenu: M,
123
+ hideMenu: u,
124
+ moveCom: a,
125
+ lockCom: y,
126
+ hideCom: x,
127
+ confirmDeleteCom: E,
128
+ renameCom: w,
129
+ copyCom: S,
130
+ composeComs: k,
131
+ decomposeComs: v,
132
+ copyComToScreen: L,
133
+ handCopyComToPage: N
134
+ };
135
+ };
136
+ export {
137
+ g as a,
138
+ q as b,
139
+ Y as c,
140
+ h as o,
141
+ z as u
142
+ };
@@ -0,0 +1,228 @@
1
+ import { s as X, o as H, _ as J, l as K } from "./index-Bjs1bW2W.js";
2
+ import { defineComponent as Q, computed as l, toRef as M, resolveComponent as Z, createElementBlock as c, openBlock as p, normalizeStyle as n, createVNode as tt, createSlots as et, renderList as ot, withCtx as lt, createElementVNode as g, withModifiers as at, createCommentVNode as v, toDisplayString as m } from "vue";
3
+ import "./iking-utils.es-Ba74AedH.js";
4
+ import { u as it, a as st, g as nt } from "./use-data-center-Cj9FGyCg.js";
5
+ import { u as rt } from "./event-DDj_G-ix.js";
6
+ const ut = ["onClick"], ct = ["src"], pt = ["src"], dt = ["title"], vt = ["title"], mt = /* @__PURE__ */ Q({
7
+ __name: "index",
8
+ props: {
9
+ com: {
10
+ type: Object,
11
+ required: !0
12
+ }
13
+ },
14
+ setup(f) {
15
+ const d = f, P = it(), B = rt();
16
+ st(d.com);
17
+ const _ = l(() => P.dataMap[d.com.id]?.source ?? []), N = l(() => nt(d.com.apis.source.fields)), e = M(d.com, "config"), k = M(d.com, "attr"), u = l(() => e.value.swiper), V = l(() => ({
18
+ width: `${k.value.w}px`,
19
+ height: `${k.value.h}px`
20
+ })), y = l(() => e.value.date.position), h = l(() => e.value.date.show), b = l(() => e.value.point.show), C = l(() => e.value.point.image.show), A = l(() => e.value.subTitle.show);
21
+ function w(t) {
22
+ return H(t).format(e.value.date.format);
23
+ }
24
+ const $ = l(() => {
25
+ const { title: t, subTitle: a, link: r, date: o, img: i } = N.value;
26
+ return _.value ? _.value.map((s) => ({
27
+ title: s[t],
28
+ subTitle: s[a],
29
+ link: s[r],
30
+ date: s[o],
31
+ img: X(s[i])
32
+ })) : [];
33
+ }), O = l(() => {
34
+ const { rowMargin: t, background: a, padding: r, justifyContent: o, alignItems: i } = e.value.global;
35
+ return {
36
+ marginBottom: `${t}px`,
37
+ ...setChartColor(a),
38
+ padding: useNumberToPx(r),
39
+ justifyContent: o,
40
+ alignItems: i,
41
+ display: "flex"
42
+ };
43
+ }), D = l(() => {
44
+ const { height: t, width: a, radius: r, position: o, background: i } = e.value.point;
45
+ let s = {};
46
+ return o === "middle" ? s = {
47
+ top: "50%",
48
+ transform: "translateY(-50%)"
49
+ } : o === "bottom" && (s = {
50
+ top: "auto",
51
+ bottom: 0
52
+ }), {
53
+ height: `${t}px`,
54
+ width: `${a}px`,
55
+ borderRadius: `${r}px`,
56
+ ...s,
57
+ ...setChartColor(i),
58
+ display: "flex",
59
+ "align-items": "center",
60
+ "justify-content": "center"
61
+ };
62
+ }), T = l(() => {
63
+ const { height: t, width: a, radius: r } = e.value.point.image, { position: o } = e.value.point;
64
+ let i = {};
65
+ return o === "middle" ? i = {
66
+ top: "50%",
67
+ transform: "translateY(-50%)"
68
+ } : o === "bottom" && (i = {
69
+ top: "auto",
70
+ bottom: 0
71
+ }), {
72
+ height: b.value ? t > e.value.point.height ? "100%" : `${t}px` : `${t}px`,
73
+ width: b.value ? a > e.value.point.width ? "100%" : `${a}px` : `${a}px`,
74
+ borderRadius: `${r}px`,
75
+ ...i
76
+ };
77
+ }), E = l(() => {
78
+ const { right: t } = e.value.global;
79
+ return {
80
+ marginLeft: `${t}px`
81
+ };
82
+ });
83
+ function x(t, a) {
84
+ const {
85
+ overRow: r,
86
+ fontFamily: o,
87
+ color: i,
88
+ fontWeight: s,
89
+ fontSize: G,
90
+ fontStyle: I,
91
+ letterSpacing: Y,
92
+ textShadowColor: F,
93
+ textShadowOffsetX: q,
94
+ textShadowOffsetY: U,
95
+ textShadowBlur: W
96
+ } = a;
97
+ return {
98
+ fontFamily: o,
99
+ fontWeight: s,
100
+ fontStyle: I,
101
+ letterSpacing: Y,
102
+ fontSize: useNumberToPx(G),
103
+ marginBottom: useNumberToPx(t),
104
+ textShadow: `${q}px ${U}px ${W}px ${F}`,
105
+ overflow: "hidden",
106
+ textOverflow: "ellipsis",
107
+ "word-break": "break-all",
108
+ display: "-webkit-box",
109
+ /* 控制在3行 */
110
+ "-webkit-line-clamp": r,
111
+ "-webkit-box-orient": "vertical",
112
+ ...setChartColor(i)
113
+ };
114
+ }
115
+ const L = l(() => {
116
+ const { subMargin: t } = e.value.global;
117
+ return x(t, e.value.title.font);
118
+ }), R = l(() => {
119
+ const { position: t } = e.value.date, { timeMargin: a } = e.value.global;
120
+ return x(t === "bottom" ? a : 0, e.value.subTitle.font);
121
+ }), S = l(() => {
122
+ const { timeMargin: t } = e.value.global, { position: a } = e.value.date;
123
+ return {
124
+ ...x(t, e.value.date.font),
125
+ marginBottom: 0,
126
+ marginLeft: a === "middle" ? `${t}px` : 0
127
+ };
128
+ });
129
+ function z(t) {
130
+ B.handleSubVariablesChange(d.com, "click", {
131
+ ...t
132
+ });
133
+ }
134
+ return (t, a) => {
135
+ const r = Z("GlSwiper");
136
+ return p(), c("div", {
137
+ class: "datav-wrapper",
138
+ style: n(V.value)
139
+ }, [
140
+ tt(r, {
141
+ length: $.value.length,
142
+ loop: u.value.loop,
143
+ row: u.value.row,
144
+ col: u.value.col,
145
+ "space-between": e.value.global.rowMargin,
146
+ autoplay: {
147
+ autoplay: u.value.autoplay.autoplay,
148
+ delay: u.value.autoplay.delay,
149
+ pauseOnMouseEnter: !0
150
+ },
151
+ direction: u.value.direction,
152
+ effect: u.value.effect,
153
+ "slides-per-group": u.value.slidesPerGroup
154
+ }, et({ _: 2 }, [
155
+ ot($.value, (o, i) => ({
156
+ name: i + 1,
157
+ fn: lt(() => [
158
+ g("div", {
159
+ style: n(O.value),
160
+ class: "article-item",
161
+ onClick: at((s) => z(o), ["stop"])
162
+ }, [
163
+ b.value ? (p(), c("div", {
164
+ key: 0,
165
+ class: "point",
166
+ style: n(D.value)
167
+ }, [
168
+ C.value ? (p(), c("img", {
169
+ key: 0,
170
+ src: o.img,
171
+ style: n(T.value)
172
+ }, null, 12, ct)) : v("", !0)
173
+ ], 4)) : C.value ? (p(), c("img", {
174
+ key: 1,
175
+ class: "point",
176
+ src: o.img,
177
+ style: n(T.value)
178
+ }, null, 12, pt)) : v("", !0),
179
+ g("div", {
180
+ class: "title",
181
+ style: n(E.value)
182
+ }, [
183
+ y.value === "top" && h.value ? (p(), c("div", {
184
+ key: 0,
185
+ class: "date",
186
+ style: n(S.value)
187
+ }, m(w(o.date)), 5)) : v("", !0),
188
+ g("div", {
189
+ class: "main-title",
190
+ title: o.title,
191
+ style: n(L.value)
192
+ }, m(o.title), 13, dt),
193
+ g("div", {
194
+ class: "data-center",
195
+ style: n({ justifyContent: e.value.subTitle.justifyContent })
196
+ }, [
197
+ A.value ? (p(), c("div", {
198
+ key: 0,
199
+ class: "sub-title",
200
+ title: o.subTitle,
201
+ style: n(R.value)
202
+ }, m(o.subTitle), 13, vt)) : v("", !0),
203
+ y.value === "middle" && h.value ? (p(), c("div", {
204
+ key: 1,
205
+ class: "date",
206
+ style: n(S.value)
207
+ }, m(w(o.date)), 5)) : v("", !0)
208
+ ], 4),
209
+ y.value === "bottom" && h.value ? (p(), c("div", {
210
+ key: 1,
211
+ class: "date",
212
+ style: n(S.value)
213
+ }, m(w(o.date)), 5)) : v("", !0)
214
+ ], 4)
215
+ ], 12, ut)
216
+ ])
217
+ }))
218
+ ]), 1032, ["length", "loop", "row", "col", "space-between", "autoplay", "direction", "effect", "slides-per-group"])
219
+ ], 4);
220
+ };
221
+ }
222
+ }), j = /* @__PURE__ */ J(mt, [["__scopeId", "data-v-4a6ed272"]]);
223
+ j.install = (f) => {
224
+ f.component("VScrollArticle", j), f.component("VScrollArticleProp", K(() => import("./config-D3z2R85K.js")));
225
+ };
226
+ export {
227
+ j as default
228
+ };
@@ -0,0 +1,245 @@
1
+ import { _ as K, l as Q } from "./index-Bjs1bW2W.js";
2
+ import { defineComponent as U, ref as z, computed as s, toRef as E, watchEffect as Y, createElementBlock as w, openBlock as C, normalizeStyle as h, createElementVNode as y, toDisplayString as S, Fragment as Z, renderList as ee } from "vue";
3
+ import { g as te } from "./index-CTo4-44e.js";
4
+ import { A as ne } from "./accounting-BdNhlOvc.js";
5
+ import { u as re, a as ie, g as ae } from "./use-data-center-Cj9FGyCg.js";
6
+ function A(e, n) {
7
+ return n === void 0 && (n = 15), +parseFloat(Number(e).toPrecision(n));
8
+ }
9
+ function f(e) {
10
+ var n = e.toString().split(/[eE]/), r = (n[0].split(".")[1] || "").length - +(n[1] || 0);
11
+ return r > 0 ? r : 0;
12
+ }
13
+ function x(e) {
14
+ if (e.toString().indexOf("e") === -1)
15
+ return Number(e.toString().replace(".", ""));
16
+ var n = f(e);
17
+ return n > 0 ? A(Number(e) * Math.pow(10, n)) : Number(e);
18
+ }
19
+ function N(e) {
20
+ B && (e > Number.MAX_SAFE_INTEGER || e < Number.MIN_SAFE_INTEGER) && console.warn(e + " is beyond boundary when transfer to integer, the results may not be accurate");
21
+ }
22
+ function b(e) {
23
+ return function() {
24
+ for (var n = [], r = 0; r < arguments.length; r++)
25
+ n[r] = arguments[r];
26
+ var o = n[0], m = n.slice(1);
27
+ return m.reduce(function(p, a) {
28
+ return e(p, a);
29
+ }, o);
30
+ };
31
+ }
32
+ var d = b(function(e, n) {
33
+ var r = x(e), o = x(n), m = f(e) + f(n), p = r * o;
34
+ return N(p), p / Math.pow(10, m);
35
+ }), oe = b(function(e, n) {
36
+ var r = Math.pow(10, Math.max(f(e), f(n)));
37
+ return (d(e, r) + d(n, r)) / r;
38
+ }), le = b(function(e, n) {
39
+ var r = Math.pow(10, Math.max(f(e), f(n)));
40
+ return (d(e, r) - d(n, r)) / r;
41
+ }), V = b(function(e, n) {
42
+ var r = x(e), o = x(n);
43
+ return N(r), N(o), d(r / o, A(Math.pow(10, f(n) - f(e))));
44
+ });
45
+ function se(e, n) {
46
+ var r = Math.pow(10, n), o = V(Math.round(Math.abs(d(e, r))), r);
47
+ return e < 0 && o !== 0 && (o = d(o, -1)), o;
48
+ }
49
+ var B = !0;
50
+ function ue(e) {
51
+ e === void 0 && (e = !0), B = e;
52
+ }
53
+ var ce = {
54
+ strip: A,
55
+ plus: oe,
56
+ minus: le,
57
+ times: d,
58
+ divide: V,
59
+ round: se,
60
+ digitLength: f,
61
+ float2Fixed: x,
62
+ enableBoundaryChecking: ue
63
+ };
64
+ let F = null;
65
+ const fe = (e, n) => {
66
+ F || (F = document.createElement("canvas"));
67
+ const r = F.getContext("2d");
68
+ return r.font = n, r.font, r.measureText(e).width;
69
+ }, me = U({
70
+ name: "VNumberTitleFlop",
71
+ props: {
72
+ com: {
73
+ type: Object,
74
+ required: !0
75
+ }
76
+ },
77
+ setup(e) {
78
+ const n = re();
79
+ ie(e.com);
80
+ const r = z(null), o = s(() => n.dataMap[e.com.id]?.source ?? {}), m = s(() => ae(e.com.apis.source.fields)), p = z(0), a = E(e.com, "config"), g = E(e.com, "attr"), W = s(() => o.value[m.value.title] || a.value.title.content), D = s(() => o.value[m.value.prefix] ?? a.value.counter.prefix.content), j = s(() => o.value[m.value.suffix] ?? a.value.counter.suffix.content), M = s(() => a.value.numbers.separatingSymbol ? a.value.numbers.separatingSymbol.charAt(0) : ","), R = s(() => a.value.numbers.decimalSymbol ? a.value.numbers.decimalSymbol.charAt(0) : "."), T = s(() => a.value.numbers.duration > 0 ? a.value.numbers.duration : 0), L = s(() => {
81
+ const { numbers: t } = a.value;
82
+ let i = ne.toFixed(p.value, t.decimal);
83
+ const c = i.includes(".");
84
+ let [u, l = ""] = i.split(".");
85
+ if (t.digit > 0) {
86
+ const v = t.digit - l.length;
87
+ v > 0 ? u = (Array(v).join("0") + u).slice(-v) : (u = "0", l = l.slice(0, v || -1));
88
+ }
89
+ return t.separatingChart && (u = u.replace(/(?=\B(\d{3})+($|\.))/g, M.value)), (c ? `${u}${R.value}${l}` : u).split("");
90
+ }), H = s(() => {
91
+ const t = a.value.global.arrangement;
92
+ let i = {};
93
+ return t === "top" ? i = {
94
+ display: "block",
95
+ alignItems: "start",
96
+ flexDirection: "column"
97
+ } : t === "left" ? i = {
98
+ display: "flex",
99
+ alignItems: "baseline",
100
+ flexDirection: "row"
101
+ } : t === "bottom" && (i = {
102
+ display: "flex",
103
+ alignItems: "start",
104
+ flexDirection: "column-reverse"
105
+ }), {
106
+ width: `${g.value.w}px`,
107
+ height: `${g.value.h}px`,
108
+ ...i
109
+ };
110
+ }), O = s(() => {
111
+ const { fontFamily: t, arrangement: i, distance: c } = a.value.global, { textStyle: u } = a.value.title, l = {
112
+ display: "flex",
113
+ alignItems: "center",
114
+ color: u.color,
115
+ fontWeight: u.fontWeight,
116
+ fontFamily: `${t}, Arial, sans-serif`,
117
+ fontSize: `${u.fontSize}px`,
118
+ textOverflow: "ellipsis",
119
+ whiteSpace: "nowrap",
120
+ overflow: "hidden",
121
+ lineHeight: "normal",
122
+ margin: "0px",
123
+ justifyContent: u.textAlign,
124
+ width: "100%"
125
+ };
126
+ return i === "top" ? l.margin = `0px 0px ${c}px` : i === "left" ? (l.width = "auto", l.margin = `0px ${c}px 0px 0px`) : i === "bottom" && (l.margin = `${c}px 0px 0px`), l;
127
+ }), G = s(() => {
128
+ const { title: t, counter: i, numbers: c, global: u } = a.value, l = {
129
+ display: "flex",
130
+ alignItems: "baseline",
131
+ color: c.textStyle.color,
132
+ textAlign: "center",
133
+ whiteSpace: "nowrap",
134
+ justifyContent: i.justifyContent,
135
+ fontFamily: i.fontFamily,
136
+ backgroundColor: "rgba(0, 0, 0, 0)"
137
+ }, k = `${t.textStyle.fontWeight} ${t.textStyle.fontSize}px ${u.fontFamily}, Arial, sans-serif`, v = fe(W.value, k), J = t.textStyle.fontSize + 10, $ = u.arrangement;
138
+ return $ === "top" || $ === "bottom" ? (l.width = `${g.value.w}px`, l.height = `${g.value.h - J}px`) : $ === "left" && (l.width = `${g.value.w - v}px`, l.height = `${g.value.h}px`), l;
139
+ }), P = s(() => {
140
+ const { prefix: t, margin: i } = a.value.counter;
141
+ return {
142
+ marginRight: `${i.preNum}px`,
143
+ color: t.textStyle.color,
144
+ fontSize: `${t.textStyle.fontSize}px`,
145
+ fontWeight: t.textStyle.fontWeight,
146
+ VerticalAlign: "super",
147
+ fontFamily: a.value.global.fontFamily
148
+ };
149
+ }), _ = s(() => {
150
+ const { suffix: t, margin: i } = a.value.counter;
151
+ return {
152
+ marginLeft: `${i.numSuff}px`,
153
+ color: t.textStyle.color,
154
+ fontSize: `${t.textStyle.fontSize}px`,
155
+ fontWeight: t.textStyle.fontWeight,
156
+ VerticalAlign: "super",
157
+ fontFamily: a.value.global.fontFamily
158
+ };
159
+ }), q = s(() => {
160
+ const { numbers: t } = a.value, i = {
161
+ display: "inline-block",
162
+ textIndent: "0.02em",
163
+ letterSpacing: "0.02em",
164
+ height: "auto",
165
+ lineHeight: "normal",
166
+ backgroundColor: t.bgColor,
167
+ fontSize: `${t.textStyle.fontSize}px`,
168
+ fontWeight: t.textStyle.fontWeight,
169
+ marginRight: `${t.marginRight}em`,
170
+ borderRadius: `${t.bgRadius}px`
171
+ };
172
+ return t.fixedWidth > 0 && (i.width = `${t.fixedWidth}px`), i;
173
+ }), X = s(() => {
174
+ const { numbers: t } = a.value, i = {
175
+ display: "inline-block",
176
+ textIndent: "0.02em",
177
+ letterSpacing: "0.02em",
178
+ height: "auto",
179
+ lineHeight: "normal",
180
+ fontSize: `${t.textStyle.fontSize}px`,
181
+ fontWeight: t.textStyle.fontWeight,
182
+ marginRight: `${t.marginRight}em`,
183
+ borderRadius: `${t.bgRadius}px`
184
+ };
185
+ return t.bgSeparating && (i.backgroundColor = t.bgColor), i;
186
+ });
187
+ return Y(() => {
188
+ const { numbers: t } = a.value;
189
+ let i = o.value[m.value.value] || 0;
190
+ const c = t.divisor || 0;
191
+ c !== 0 && (i = ce.divide(i, c)), t.animation ? te.to(p, {
192
+ duration: T.value / 1e3,
193
+ value: i
194
+ }) : p.value = i;
195
+ }), {
196
+ titleRef: r,
197
+ titleText: W,
198
+ prefixText: D,
199
+ suffixText: j,
200
+ separatingSymbol: M,
201
+ decimalSymbol: R,
202
+ duration: T,
203
+ realNumber: L,
204
+ wrapperStyle: H,
205
+ titleStyle: O,
206
+ counterStyle: G,
207
+ prefixStyle: P,
208
+ suffixStyle: _,
209
+ numberStyle: q,
210
+ separateCharStyle: X
211
+ };
212
+ }
213
+ });
214
+ function pe(e, n, r, o, m, p) {
215
+ return C(), w("div", {
216
+ class: "datav-wrapper",
217
+ style: h(e.wrapperStyle)
218
+ }, [
219
+ y("div", {
220
+ ref: "titleRef",
221
+ style: h(e.titleStyle)
222
+ }, S(e.titleText), 5),
223
+ y("div", {
224
+ style: h(e.counterStyle)
225
+ }, [
226
+ y("span", {
227
+ style: h(e.prefixStyle)
228
+ }, S(e.prefixText), 5),
229
+ (C(!0), w(Z, null, ee(e.realNumber, (a, g) => (C(), w("span", {
230
+ key: g,
231
+ style: h([a === e.separatingSymbol ? e.separateCharStyle : e.numberStyle])
232
+ }, S(a), 5))), 128)),
233
+ y("span", {
234
+ style: h(e.suffixStyle)
235
+ }, S(e.suffixText), 5)
236
+ ], 4)
237
+ ], 4);
238
+ }
239
+ const I = /* @__PURE__ */ K(me, [["render", pe]]);
240
+ I.install = (e) => {
241
+ e.component("VNumberTitleFlop", I), e.component("VNumberTitleFlopProp", Q(() => import("./config-DSw2PMKb.js")));
242
+ };
243
+ export {
244
+ I as default
245
+ };