@delon/chart 12.4.0 → 13.0.0-beta.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 (360) hide show
  1. package/bar/bar.component.d.ts +4 -1
  2. package/bar/bar.d.ts +1 -0
  3. package/bar/bar.module.d.ts +8 -0
  4. package/bar/package.json +5 -6
  5. package/card/card.component.d.ts +7 -4
  6. package/card/card.d.ts +1 -0
  7. package/card/card.module.d.ts +9 -0
  8. package/card/package.json +5 -6
  9. package/card/style/index.less +11 -0
  10. package/chart-echarts/delon-chart-chart-echarts.d.ts +1 -0
  11. package/chart-echarts/echarts.component.d.ts +3 -0
  12. package/chart-echarts/echarts.module.d.ts +7 -0
  13. package/chart-echarts/echarts.service.d.ts +3 -0
  14. package/chart-echarts/package.json +5 -6
  15. package/chart.d.ts +1 -0
  16. package/core/delon-chart-core.d.ts +1 -0
  17. package/core/g2.base.component.d.ts +4 -1
  18. package/core/g2.servicce.d.ts +3 -0
  19. package/core/package.json +5 -6
  20. package/custom/custom.component.d.ts +4 -1
  21. package/custom/custom.module.d.ts +7 -0
  22. package/custom/delon-chart-custom.d.ts +5 -0
  23. package/custom/package.json +6 -7
  24. package/esm2020/bar/bar.component.mjs +143 -0
  25. package/{esm2015/bar/bar.js → esm2020/bar/bar.mjs} +0 -0
  26. package/esm2020/bar/bar.module.mjs +21 -0
  27. package/{esm2015/bar/public_api.js → esm2020/bar/public_api.mjs} +0 -0
  28. package/esm2020/card/card.component.mjs +55 -0
  29. package/{esm2015/card/card.js → esm2020/card/card.mjs} +0 -0
  30. package/esm2020/card/card.module.mjs +22 -0
  31. package/{esm2015/card/public_api.js → esm2020/card/public_api.mjs} +0 -0
  32. package/{esm2015/chart-echarts/delon-chart-chart-echarts.js → esm2020/chart-echarts/delon-chart-chart-echarts.mjs} +0 -0
  33. package/esm2020/chart-echarts/echarts.component.mjs +162 -0
  34. package/esm2020/chart-echarts/echarts.module.mjs +20 -0
  35. package/esm2020/chart-echarts/echarts.service.mjs +60 -0
  36. package/{esm2015/chart-echarts/echarts.types.js → esm2020/chart-echarts/echarts.types.mjs} +0 -0
  37. package/{esm2015/chart-echarts/public_api.js → esm2020/chart-echarts/public_api.mjs} +0 -0
  38. package/{esm2015/chart.js → esm2020/chart.mjs} +0 -0
  39. package/{esm2015/core/delon-chart-core.js → esm2020/core/delon-chart-core.mjs} +0 -0
  40. package/esm2020/core/g2.base.component.mjs +109 -0
  41. package/esm2020/core/g2.servicce.mjs +54 -0
  42. package/{esm2015/core/public_api.js → esm2020/core/public_api.mjs} +0 -0
  43. package/{esm2015/core/types/interaction.js → esm2020/core/types/interaction.mjs} +0 -0
  44. package/{esm2015/core/types/time.js → esm2020/core/types/time.mjs} +0 -0
  45. package/esm2020/core/utils.mjs +21 -0
  46. package/esm2020/custom/custom.component.mjs +70 -0
  47. package/esm2020/custom/custom.module.mjs +20 -0
  48. package/esm2020/custom/delon-chart-custom.mjs +5 -0
  49. package/{esm2015/custom/public_api.js → esm2020/custom/public_api.mjs} +0 -0
  50. package/{esm2015/mini-progress/mini-progress.js → esm2020/gauge/delon-chart-gauge.mjs} +1 -1
  51. package/esm2020/gauge/gauge.component.mjs +169 -0
  52. package/esm2020/gauge/gauge.module.mjs +20 -0
  53. package/{esm2015/gauge/public_api.js → esm2020/gauge/public_api.mjs} +0 -0
  54. package/esm2020/mini-area/delon-chart-mini-area.mjs +5 -0
  55. package/esm2020/mini-area/mini-area.component.mjs +133 -0
  56. package/esm2020/mini-area/mini-area.module.mjs +19 -0
  57. package/{esm2015/mini-area/public_api.js → esm2020/mini-area/public_api.mjs} +0 -0
  58. package/esm2020/mini-bar/delon-chart-mini-bar.mjs +5 -0
  59. package/esm2020/mini-bar/mini-bar.component.mjs +100 -0
  60. package/esm2020/mini-bar/mini-bar.module.mjs +19 -0
  61. package/{esm2015/mini-bar/public_api.js → esm2020/mini-bar/public_api.mjs} +0 -0
  62. package/{esm2015/gauge/gauge.js → esm2020/mini-progress/delon-chart-mini-progress.mjs} +1 -1
  63. package/esm2020/mini-progress/mini-progress.component.mjs +46 -0
  64. package/esm2020/mini-progress/mini-progress.module.mjs +21 -0
  65. package/{esm2015/mini-progress/public_api.js → esm2020/mini-progress/public_api.mjs} +0 -0
  66. package/{esm2015/pie/pie.js → esm2020/number-info/delon-chart-number-info.mjs} +1 -1
  67. package/esm2020/number-info/number-info.component.mjs +45 -0
  68. package/esm2020/number-info/number-info.module.mjs +21 -0
  69. package/{esm2015/number-info/public_api.js → esm2020/number-info/public_api.mjs} +0 -0
  70. package/{esm2015/number-info/number-info.js → esm2020/pie/delon-chart-pie.mjs} +1 -1
  71. package/esm2020/pie/pie.component.mjs +215 -0
  72. package/esm2020/pie/pie.module.mjs +22 -0
  73. package/{esm2015/pie/public_api.js → esm2020/pie/public_api.mjs} +0 -0
  74. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  75. package/esm2020/radar/delon-chart-radar.mjs +5 -0
  76. package/{esm2015/radar/public_api.js → esm2020/radar/public_api.mjs} +0 -0
  77. package/esm2020/radar/radar.component.mjs +148 -0
  78. package/esm2020/radar/radar.module.mjs +22 -0
  79. package/esm2020/single-bar/delon-chart-single-bar.mjs +5 -0
  80. package/{esm2015/single-bar/public_api.js → esm2020/single-bar/public_api.mjs} +0 -0
  81. package/esm2020/single-bar/single-bar.component.mjs +126 -0
  82. package/esm2020/single-bar/single-bar.module.mjs +19 -0
  83. package/esm2020/tag-cloud/delon-chart-tag-cloud.mjs +5 -0
  84. package/{esm2015/tag-cloud/public_api.js → esm2020/tag-cloud/public_api.mjs} +0 -0
  85. package/esm2020/tag-cloud/tag-cloud.component.mjs +161 -0
  86. package/esm2020/tag-cloud/tag-cloud.module.mjs +20 -0
  87. package/esm2020/timeline/delon-chart-timeline.mjs +5 -0
  88. package/{esm2015/timeline/public_api.js → esm2020/timeline/public_api.mjs} +0 -0
  89. package/esm2020/timeline/timeline.component.mjs +204 -0
  90. package/esm2020/timeline/timeline.module.mjs +21 -0
  91. package/esm2020/trend/delon-chart-trend.mjs +5 -0
  92. package/{esm2015/trend/public_api.js → esm2020/trend/public_api.mjs} +0 -0
  93. package/esm2020/trend/trend.component.mjs +52 -0
  94. package/esm2020/trend/trend.module.mjs +20 -0
  95. package/esm2020/water-wave/delon-chart-water-wave.mjs +5 -0
  96. package/{esm2015/water-wave/public_api.js → esm2020/water-wave/public_api.mjs} +0 -0
  97. package/esm2020/water-wave/water-wave.component.mjs +221 -0
  98. package/esm2020/water-wave/water-wave.module.mjs +20 -0
  99. package/fesm2015/{bar.js → bar.mjs} +57 -34
  100. package/fesm2015/bar.mjs.map +1 -0
  101. package/fesm2015/card.mjs +81 -0
  102. package/fesm2015/card.mjs.map +1 -0
  103. package/fesm2015/{chart.js → chart.mjs} +1 -1
  104. package/fesm2015/chart.mjs.map +1 -0
  105. package/fesm2015/{delon-chart-chart-echarts.js → delon-chart-chart-echarts.mjs} +62 -53
  106. package/fesm2015/delon-chart-chart-echarts.mjs.map +1 -0
  107. package/fesm2015/{delon-chart-core.js → delon-chart-core.mjs} +23 -29
  108. package/fesm2015/delon-chart-core.mjs.map +1 -0
  109. package/fesm2015/delon-chart-custom.mjs +94 -0
  110. package/fesm2015/delon-chart-custom.mjs.map +1 -0
  111. package/fesm2015/{gauge.js → delon-chart-gauge.mjs} +46 -31
  112. package/fesm2015/delon-chart-gauge.mjs.map +1 -0
  113. package/fesm2015/delon-chart-mini-area.mjs +156 -0
  114. package/fesm2015/delon-chart-mini-area.mjs.map +1 -0
  115. package/fesm2015/delon-chart-mini-bar.mjs +123 -0
  116. package/fesm2015/delon-chart-mini-bar.mjs.map +1 -0
  117. package/fesm2015/delon-chart-mini-progress.mjs +71 -0
  118. package/fesm2015/delon-chart-mini-progress.mjs.map +1 -0
  119. package/fesm2015/delon-chart-number-info.mjs +70 -0
  120. package/fesm2015/delon-chart-number-info.mjs.map +1 -0
  121. package/fesm2015/delon-chart-pie.mjs +241 -0
  122. package/fesm2015/delon-chart-pie.mjs.map +1 -0
  123. package/fesm2015/{radar.js → delon-chart-radar.mjs} +43 -33
  124. package/fesm2015/delon-chart-radar.mjs.map +1 -0
  125. package/fesm2015/delon-chart-single-bar.mjs +147 -0
  126. package/fesm2015/delon-chart-single-bar.mjs.map +1 -0
  127. package/fesm2015/{tag-cloud.js → delon-chart-tag-cloud.mjs} +39 -26
  128. package/fesm2015/delon-chart-tag-cloud.mjs.map +1 -0
  129. package/fesm2015/{timeline.js → delon-chart-timeline.mjs} +64 -36
  130. package/fesm2015/delon-chart-timeline.mjs.map +1 -0
  131. package/fesm2015/delon-chart-trend.mjs +76 -0
  132. package/fesm2015/delon-chart-trend.mjs.map +1 -0
  133. package/fesm2015/{water-wave.js → delon-chart-water-wave.mjs} +38 -37
  134. package/fesm2015/delon-chart-water-wave.mjs.map +1 -0
  135. package/fesm2020/bar.mjs +168 -0
  136. package/fesm2020/bar.mjs.map +1 -0
  137. package/fesm2020/card.mjs +81 -0
  138. package/fesm2020/card.mjs.map +1 -0
  139. package/fesm2020/chart.mjs +7 -0
  140. package/fesm2020/chart.mjs.map +1 -0
  141. package/fesm2020/delon-chart-chart-echarts.mjs +242 -0
  142. package/fesm2020/delon-chart-chart-echarts.mjs.map +1 -0
  143. package/fesm2020/delon-chart-core.mjs +187 -0
  144. package/fesm2020/delon-chart-core.mjs.map +1 -0
  145. package/fesm2020/delon-chart-custom.mjs +94 -0
  146. package/fesm2020/delon-chart-custom.mjs.map +1 -0
  147. package/fesm2020/delon-chart-gauge.mjs +193 -0
  148. package/fesm2020/delon-chart-gauge.mjs.map +1 -0
  149. package/fesm2020/delon-chart-mini-area.mjs +156 -0
  150. package/fesm2020/delon-chart-mini-area.mjs.map +1 -0
  151. package/fesm2020/delon-chart-mini-bar.mjs +123 -0
  152. package/fesm2020/delon-chart-mini-bar.mjs.map +1 -0
  153. package/fesm2020/delon-chart-mini-progress.mjs +71 -0
  154. package/fesm2020/delon-chart-mini-progress.mjs.map +1 -0
  155. package/fesm2020/delon-chart-number-info.mjs +70 -0
  156. package/fesm2020/delon-chart-number-info.mjs.map +1 -0
  157. package/fesm2020/delon-chart-pie.mjs +241 -0
  158. package/fesm2020/delon-chart-pie.mjs.map +1 -0
  159. package/fesm2020/delon-chart-radar.mjs +174 -0
  160. package/fesm2020/delon-chart-radar.mjs.map +1 -0
  161. package/fesm2020/delon-chart-single-bar.mjs +149 -0
  162. package/fesm2020/delon-chart-single-bar.mjs.map +1 -0
  163. package/fesm2020/delon-chart-tag-cloud.mjs +185 -0
  164. package/fesm2020/delon-chart-tag-cloud.mjs.map +1 -0
  165. package/fesm2020/delon-chart-timeline.mjs +229 -0
  166. package/fesm2020/delon-chart-timeline.mjs.map +1 -0
  167. package/fesm2020/delon-chart-trend.mjs +76 -0
  168. package/fesm2020/delon-chart-trend.mjs.map +1 -0
  169. package/fesm2020/delon-chart-water-wave.mjs +245 -0
  170. package/fesm2020/delon-chart-water-wave.mjs.map +1 -0
  171. package/{mini-bar/mini-bar.d.ts → gauge/delon-chart-gauge.d.ts} +1 -0
  172. package/gauge/gauge.component.d.ts +8 -5
  173. package/gauge/gauge.module.d.ts +7 -0
  174. package/gauge/package.json +6 -7
  175. package/mini-area/delon-chart-mini-area.d.ts +5 -0
  176. package/mini-area/mini-area.component.d.ts +3 -0
  177. package/mini-area/mini-area.module.d.ts +6 -0
  178. package/mini-area/package.json +6 -7
  179. package/mini-bar/delon-chart-mini-bar.d.ts +5 -0
  180. package/mini-bar/mini-bar.component.d.ts +3 -0
  181. package/mini-bar/mini-bar.module.d.ts +6 -0
  182. package/mini-bar/package.json +6 -7
  183. package/mini-progress/delon-chart-mini-progress.d.ts +5 -0
  184. package/mini-progress/mini-progress.component.d.ts +6 -3
  185. package/mini-progress/mini-progress.module.d.ts +8 -0
  186. package/mini-progress/package.json +6 -7
  187. package/mini-progress/style/index.less +5 -0
  188. package/number-info/delon-chart-number-info.d.ts +5 -0
  189. package/number-info/number-info.component.d.ts +9 -6
  190. package/number-info/number-info.module.d.ts +8 -0
  191. package/number-info/package.json +6 -7
  192. package/number-info/style/index.less +12 -0
  193. package/package.json +160 -12
  194. package/{custom/g2Custom.d.ts → pie/delon-chart-pie.d.ts} +1 -0
  195. package/pie/package.json +6 -7
  196. package/pie/pie.component.d.ts +8 -5
  197. package/pie/pie.module.d.ts +9 -0
  198. package/pie/style/index.less +14 -0
  199. package/{gauge/gauge.d.ts → radar/delon-chart-radar.d.ts} +1 -0
  200. package/radar/package.json +6 -7
  201. package/radar/radar.component.d.ts +4 -1
  202. package/radar/radar.module.d.ts +9 -0
  203. package/radar/style/index.less +6 -0
  204. package/single-bar/delon-chart-single-bar.d.ts +5 -0
  205. package/single-bar/package.json +6 -7
  206. package/single-bar/single-bar.component.d.ts +4 -1
  207. package/single-bar/single-bar.module.d.ts +6 -0
  208. package/tag-cloud/delon-chart-tag-cloud.d.ts +5 -0
  209. package/tag-cloud/package.json +6 -7
  210. package/tag-cloud/tag-cloud.component.d.ts +3 -0
  211. package/tag-cloud/tag-cloud.module.d.ts +7 -0
  212. package/timeline/delon-chart-timeline.d.ts +5 -0
  213. package/timeline/package.json +6 -7
  214. package/timeline/timeline.component.d.ts +5 -2
  215. package/timeline/timeline.module.d.ts +8 -0
  216. package/{mini-area/mini-area.d.ts → trend/delon-chart-trend.d.ts} +1 -0
  217. package/trend/package.json +6 -7
  218. package/trend/style/index.less +6 -0
  219. package/trend/trend.component.d.ts +4 -1
  220. package/trend/trend.module.d.ts +7 -0
  221. package/water-wave/delon-chart-water-wave.d.ts +5 -0
  222. package/water-wave/package.json +6 -7
  223. package/water-wave/style/index.less +4 -0
  224. package/water-wave/water-wave.component.d.ts +5 -2
  225. package/water-wave/water-wave.module.d.ts +7 -0
  226. package/bar/bar.metadata.json +0 -1
  227. package/bundles/bar.umd.js +0 -471
  228. package/bundles/bar.umd.js.map +0 -1
  229. package/bundles/card.umd.js +0 -408
  230. package/bundles/card.umd.js.map +0 -1
  231. package/bundles/chart.umd.js +0 -19
  232. package/bundles/chart.umd.js.map +0 -1
  233. package/bundles/delon-chart-chart-echarts.umd.js +0 -617
  234. package/bundles/delon-chart-chart-echarts.umd.js.map +0 -1
  235. package/bundles/delon-chart-core.umd.js +0 -550
  236. package/bundles/delon-chart-core.umd.js.map +0 -1
  237. package/bundles/g2Custom.umd.js +0 -407
  238. package/bundles/g2Custom.umd.js.map +0 -1
  239. package/bundles/gauge.umd.js +0 -511
  240. package/bundles/gauge.umd.js.map +0 -1
  241. package/bundles/mini-area.umd.js +0 -471
  242. package/bundles/mini-area.umd.js.map +0 -1
  243. package/bundles/mini-bar.umd.js +0 -444
  244. package/bundles/mini-bar.umd.js.map +0 -1
  245. package/bundles/mini-progress.umd.js +0 -401
  246. package/bundles/mini-progress.umd.js.map +0 -1
  247. package/bundles/number-info.umd.js +0 -392
  248. package/bundles/number-info.umd.js.map +0 -1
  249. package/bundles/pie.umd.js +0 -567
  250. package/bundles/pie.umd.js.map +0 -1
  251. package/bundles/radar.umd.js +0 -497
  252. package/bundles/radar.umd.js.map +0 -1
  253. package/bundles/single-bar.umd.js +0 -464
  254. package/bundles/single-bar.umd.js.map +0 -1
  255. package/bundles/tag-cloud.umd.js +0 -495
  256. package/bundles/tag-cloud.umd.js.map +0 -1
  257. package/bundles/timeline.umd.js +0 -524
  258. package/bundles/timeline.umd.js.map +0 -1
  259. package/bundles/trend.umd.js +0 -391
  260. package/bundles/trend.umd.js.map +0 -1
  261. package/bundles/water-wave.umd.js +0 -587
  262. package/bundles/water-wave.umd.js.map +0 -1
  263. package/card/card.metadata.json +0 -1
  264. package/chart-echarts/delon-chart-chart-echarts.metadata.json +0 -1
  265. package/chart.metadata.json +0 -1
  266. package/core/delon-chart-core.metadata.json +0 -1
  267. package/custom/g2Custom.metadata.json +0 -1
  268. package/esm2015/bar/bar.component.js +0 -124
  269. package/esm2015/bar/bar.module.js +0 -16
  270. package/esm2015/card/card.component.js +0 -52
  271. package/esm2015/card/card.module.js +0 -17
  272. package/esm2015/chart-echarts/echarts.component.js +0 -152
  273. package/esm2015/chart-echarts/echarts.module.js +0 -15
  274. package/esm2015/chart-echarts/echarts.service.js +0 -64
  275. package/esm2015/core/g2.base.component.js +0 -110
  276. package/esm2015/core/g2.servicce.js +0 -58
  277. package/esm2015/core/utils.js +0 -15
  278. package/esm2015/custom/custom.component.js +0 -58
  279. package/esm2015/custom/custom.module.js +0 -15
  280. package/esm2015/custom/g2Custom.js +0 -5
  281. package/esm2015/gauge/gauge.component.js +0 -158
  282. package/esm2015/gauge/gauge.module.js +0 -15
  283. package/esm2015/mini-area/mini-area.component.js +0 -117
  284. package/esm2015/mini-area/mini-area.js +0 -5
  285. package/esm2015/mini-area/mini-area.module.js +0 -14
  286. package/esm2015/mini-bar/mini-bar.component.js +0 -90
  287. package/esm2015/mini-bar/mini-bar.js +0 -5
  288. package/esm2015/mini-bar/mini-bar.module.js +0 -14
  289. package/esm2015/mini-progress/mini-progress.component.js +0 -50
  290. package/esm2015/mini-progress/mini-progress.module.js +0 -16
  291. package/esm2015/number-info/number-info.component.js +0 -40
  292. package/esm2015/number-info/number-info.module.js +0 -16
  293. package/esm2015/pie/pie.component.js +0 -197
  294. package/esm2015/pie/pie.module.js +0 -17
  295. package/esm2015/radar/radar.component.js +0 -142
  296. package/esm2015/radar/radar.js +0 -5
  297. package/esm2015/radar/radar.module.js +0 -17
  298. package/esm2015/single-bar/single-bar.component.js +0 -111
  299. package/esm2015/single-bar/single-bar.js +0 -5
  300. package/esm2015/single-bar/single-bar.module.js +0 -14
  301. package/esm2015/tag-cloud/tag-cloud.component.js +0 -142
  302. package/esm2015/tag-cloud/tag-cloud.js +0 -5
  303. package/esm2015/tag-cloud/tag-cloud.module.js +0 -15
  304. package/esm2015/timeline/timeline.component.js +0 -178
  305. package/esm2015/timeline/timeline.js +0 -5
  306. package/esm2015/timeline/timeline.module.js +0 -16
  307. package/esm2015/trend/trend.component.js +0 -42
  308. package/esm2015/trend/trend.js +0 -5
  309. package/esm2015/trend/trend.module.js +0 -15
  310. package/esm2015/water-wave/water-wave.component.js +0 -224
  311. package/esm2015/water-wave/water-wave.js +0 -5
  312. package/esm2015/water-wave/water-wave.module.js +0 -15
  313. package/fesm2015/bar.js.map +0 -1
  314. package/fesm2015/card.js +0 -74
  315. package/fesm2015/card.js.map +0 -1
  316. package/fesm2015/chart.js.map +0 -1
  317. package/fesm2015/delon-chart-chart-echarts.js.map +0 -1
  318. package/fesm2015/delon-chart-core.js.map +0 -1
  319. package/fesm2015/g2Custom.js +0 -78
  320. package/fesm2015/g2Custom.js.map +0 -1
  321. package/fesm2015/gauge.js.map +0 -1
  322. package/fesm2015/mini-area.js +0 -136
  323. package/fesm2015/mini-area.js.map +0 -1
  324. package/fesm2015/mini-bar.js +0 -109
  325. package/fesm2015/mini-bar.js.map +0 -1
  326. package/fesm2015/mini-progress.js +0 -70
  327. package/fesm2015/mini-progress.js.map +0 -1
  328. package/fesm2015/number-info.js +0 -61
  329. package/fesm2015/number-info.js.map +0 -1
  330. package/fesm2015/pie.js +0 -219
  331. package/fesm2015/pie.js.map +0 -1
  332. package/fesm2015/radar.js.map +0 -1
  333. package/fesm2015/single-bar.js +0 -130
  334. package/fesm2015/single-bar.js.map +0 -1
  335. package/fesm2015/tag-cloud.js.map +0 -1
  336. package/fesm2015/timeline.js.map +0 -1
  337. package/fesm2015/trend.js +0 -62
  338. package/fesm2015/trend.js.map +0 -1
  339. package/fesm2015/water-wave.js.map +0 -1
  340. package/gauge/gauge.metadata.json +0 -1
  341. package/mini-area/mini-area.metadata.json +0 -1
  342. package/mini-bar/mini-bar.metadata.json +0 -1
  343. package/mini-progress/mini-progress.d.ts +0 -4
  344. package/mini-progress/mini-progress.metadata.json +0 -1
  345. package/number-info/number-info.d.ts +0 -4
  346. package/number-info/number-info.metadata.json +0 -1
  347. package/pie/pie.d.ts +0 -4
  348. package/pie/pie.metadata.json +0 -1
  349. package/radar/radar.d.ts +0 -4
  350. package/radar/radar.metadata.json +0 -1
  351. package/single-bar/single-bar.d.ts +0 -4
  352. package/single-bar/single-bar.metadata.json +0 -1
  353. package/tag-cloud/tag-cloud.d.ts +0 -4
  354. package/tag-cloud/tag-cloud.metadata.json +0 -1
  355. package/timeline/timeline.d.ts +0 -4
  356. package/timeline/timeline.metadata.json +0 -1
  357. package/trend/trend.d.ts +0 -4
  358. package/trend/trend.metadata.json +0 -1
  359. package/water-wave/water-wave.d.ts +0 -4
  360. package/water-wave/water-wave.metadata.json +0 -1
@@ -0,0 +1,20 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { NgModule } from '@angular/core';
3
+ import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
4
+ import { G2WaterWaveComponent } from './water-wave.component';
5
+ import * as i0 from "@angular/core";
6
+ const COMPONENTS = [G2WaterWaveComponent];
7
+ export class G2WaterWaveModule {
8
+ }
9
+ G2WaterWaveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
+ G2WaterWaveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveModule, declarations: [G2WaterWaveComponent], imports: [CommonModule, NzOutletModule], exports: [G2WaterWaveComponent] });
11
+ G2WaterWaveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveModule, imports: [[CommonModule, NzOutletModule]] });
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2WaterWaveModule, decorators: [{
13
+ type: NgModule,
14
+ args: [{
15
+ imports: [CommonModule, NzOutletModule],
16
+ declarations: COMPONENTS,
17
+ exports: COMPONENTS
18
+ }]
19
+ }] });
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2F0ZXItd2F2ZS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic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VudCB9IGZyb20gJy4vd2F0ZXItd2F2ZS5jb21wb25lbnQnO1xuXG5jb25zdCBDT01QT05FTlRTID0gW0cyV2F0ZXJXYXZlQ29tcG9uZW50XTtcblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW0NvbW1vbk1vZHVsZSwgTnpPdXRsZXRNb2R1bGVdLFxuICBkZWNsYXJhdGlvbnM6IENPTVBPTkVOVFMsXG4gIGV4cG9ydHM6IENPTVBPTkVOVFNcbn0pXG5leHBvcnQgY2xhc3MgRzJXYXRlcldhdmVNb2R1bGUge31cbiJdfQ==
@@ -1,12 +1,16 @@
1
1
  import { __decorate } from 'tslib';
2
+ import * as i0 from '@angular/core';
2
3
  import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
3
4
  import { fromEvent } from 'rxjs';
4
5
  import { takeUntil, filter, debounceTime } from 'rxjs/operators';
5
6
  import { G2BaseComponent } from '@delon/chart/core';
6
7
  import { InputNumber, InputBoolean } from '@delon/util/decorator';
7
- import { CommonModule } from '@angular/common';
8
- import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
8
+ import * as i1 from 'ng-zorro-antd/skeleton';
9
9
  import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
10
+ import * as i2 from 'ng-zorro-antd/core/outlet';
11
+ import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
12
+ import * as i3 from '@angular/common';
13
+ import { CommonModule } from '@angular/common';
10
14
 
11
15
  const TITLE_HEIGHT = 41;
12
16
  class G2BarComponent extends G2BaseComponent {
@@ -90,56 +94,75 @@ class G2BarComponent extends G2BaseComponent {
90
94
  .subscribe(() => this.ngZone.runOutsideAngular(() => this.updatelabel()));
91
95
  }
92
96
  }
93
- G2BarComponent.decorators = [
94
- { type: Component, args: [{
95
- selector: 'g2-bar',
96
- exportAs: 'g2Bar',
97
- template: `
97
+ G2BarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
98
+ G2BarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: G2BarComponent, selector: "g2-bar", inputs: { title: "title", color: "color", height: "height", padding: "padding", data: "data", autoLabel: "autoLabel", interaction: "interaction" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Bar"], usesInheritance: true, ngImport: i0, template: `
98
99
  <ng-container *nzStringTemplateOutlet="title">
99
100
  <h4 style="margin-bottom: 20px;">{{ title }}</h4>
100
101
  </ng-container>
101
102
  <nz-skeleton *ngIf="!loaded"></nz-skeleton>
102
103
  <div #container></div>
103
- `,
104
- host: {
105
- '[style.height.px]': 'height'
106
- },
107
- preserveWhitespaces: false,
108
- changeDetection: ChangeDetectionStrategy.OnPush,
109
- encapsulation: ViewEncapsulation.None
110
- },] }
111
- ];
112
- G2BarComponent.propDecorators = {
113
- title: [{ type: Input }],
114
- color: [{ type: Input }],
115
- height: [{ type: Input }],
116
- padding: [{ type: Input }],
117
- data: [{ type: Input }],
118
- autoLabel: [{ type: Input }],
119
- interaction: [{ type: Input }],
120
- clickItem: [{ type: Output }]
121
- };
104
+ `, isInline: true, components: [{ type: i1.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
122
105
  __decorate([
123
106
  InputNumber()
124
107
  ], G2BarComponent.prototype, "height", void 0);
125
108
  __decorate([
126
109
  InputBoolean()
127
110
  ], G2BarComponent.prototype, "autoLabel", void 0);
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarComponent, decorators: [{
112
+ type: Component,
113
+ args: [{
114
+ selector: 'g2-bar',
115
+ exportAs: 'g2Bar',
116
+ template: `
117
+ <ng-container *nzStringTemplateOutlet="title">
118
+ <h4 style="margin-bottom: 20px;">{{ title }}</h4>
119
+ </ng-container>
120
+ <nz-skeleton *ngIf="!loaded"></nz-skeleton>
121
+ <div #container></div>
122
+ `,
123
+ host: {
124
+ '[style.height.px]': 'height'
125
+ },
126
+ preserveWhitespaces: false,
127
+ changeDetection: ChangeDetectionStrategy.OnPush,
128
+ encapsulation: ViewEncapsulation.None
129
+ }]
130
+ }], propDecorators: { title: [{
131
+ type: Input
132
+ }], color: [{
133
+ type: Input
134
+ }], height: [{
135
+ type: Input
136
+ }], padding: [{
137
+ type: Input
138
+ }], data: [{
139
+ type: Input
140
+ }], autoLabel: [{
141
+ type: Input
142
+ }], interaction: [{
143
+ type: Input
144
+ }], clickItem: [{
145
+ type: Output
146
+ }] } });
128
147
 
129
148
  const COMPONENTS = [G2BarComponent];
130
149
  class G2BarModule {
131
150
  }
132
- G2BarModule.decorators = [
133
- { type: NgModule, args: [{
134
- imports: [CommonModule, NzOutletModule, NzSkeletonModule],
135
- declarations: COMPONENTS,
136
- exports: COMPONENTS
137
- },] }
138
- ];
151
+ G2BarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
152
+ G2BarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarModule, declarations: [G2BarComponent], imports: [CommonModule, NzOutletModule, NzSkeletonModule], exports: [G2BarComponent] });
153
+ G2BarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarModule, imports: [[CommonModule, NzOutletModule, NzSkeletonModule]] });
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarModule, decorators: [{
155
+ type: NgModule,
156
+ args: [{
157
+ imports: [CommonModule, NzOutletModule, NzSkeletonModule],
158
+ declarations: COMPONENTS,
159
+ exports: COMPONENTS
160
+ }]
161
+ }] });
139
162
 
140
163
  /**
141
164
  * Generated bundle index. Do not edit.
142
165
  */
143
166
 
144
167
  export { G2BarComponent, G2BarModule };
145
- //# sourceMappingURL=bar.js.map
168
+ //# sourceMappingURL=bar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar.mjs","sources":["../../../../packages/chart/bar/bar.component.ts","../../../../packages/chart/bar/bar.module.ts","../../../../packages/chart/bar/bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Event } from '@antv/g2';\n\nimport { G2BaseComponent, G2InteractionType } from '@delon/chart/core';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nconst TITLE_HEIGHT = 41;\n\nexport interface G2BarData {\n x: NzSafeAny;\n y: NzSafeAny;\n color?: string | null;\n [key: string]: NzSafeAny;\n}\n\nexport interface G2BarClickItem {\n item: G2BarData;\n ev: Event;\n}\n\n@Component({\n selector: 'g2-bar',\n exportAs: 'g2Bar',\n template: `\n <ng-container *nzStringTemplateOutlet=\"title\">\n <h4 style=\"margin-bottom: 20px;\">{{ title }}</h4>\n </ng-container>\n <nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>\n <div #container></div>\n `,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2BarComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_autoLabel: BooleanInput;\n\n // #region fields\n\n @Input() title?: string | TemplateRef<void>;\n @Input() color = 'rgba(24, 144, 255, 0.85)';\n @Input() @InputNumber() height = 0;\n @Input() padding: number | number[] | 'auto' = 'auto';\n @Input() data: G2BarData[] = [];\n @Input() @InputBoolean() autoLabel = true;\n @Input() interaction: G2InteractionType = 'none';\n @Output() readonly clickItem = new EventEmitter<G2BarClickItem>();\n\n // #endregion\n\n private getHeight(): number {\n return this.title ? this.height - TITLE_HEIGHT : this.height;\n }\n\n install(): void {\n const { node, padding, interaction, theme } = this;\n\n const container = node.nativeElement as HTMLElement;\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container,\n autoFit: true,\n height: this.getHeight(),\n padding,\n theme\n }));\n this.updatelabel();\n chart.axis('y', {\n title: null,\n line: null,\n tickLine: null\n });\n chart.scale({\n x: {\n type: 'cat'\n },\n y: {\n min: 0\n }\n });\n chart.tooltip({\n showTitle: false\n });\n if (interaction !== 'none') {\n chart.interaction(interaction);\n }\n chart.legend(false);\n chart\n .interval()\n .position('x*y')\n .color('x*y', (x, y) => {\n const colorItem = this.data.find(w => w.x === x && w.y === y);\n return colorItem && colorItem.color ? colorItem.color : this.color;\n })\n .tooltip('x*y', (x, y) => ({ name: x, value: y }));\n\n chart.on(`interval:click`, (ev: Event) => {\n this.ngZone.run(() => this.clickItem.emit({ item: ev.data?.data, ev }));\n });\n\n this.changeData();\n chart.render();\n this.installResizeEvent();\n }\n\n changeData(): void {\n const { _chart, data } = this;\n if (!_chart || !Array.isArray(data) || data.length <= 0) return;\n\n _chart.changeData(data);\n }\n\n private updatelabel(): void {\n const { node, data, _chart } = this;\n const canvasWidth = node.nativeElement.clientWidth;\n const minWidth = data.length * 30;\n _chart.axis('x', canvasWidth > minWidth).render();\n }\n\n private installResizeEvent(): void {\n if (!this.autoLabel || this.resize$) return;\n\n this.resize$ = fromEvent(window, 'resize')\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !!this._chart),\n debounceTime(200)\n )\n .subscribe(() => this.ngZone.runOutsideAngular(() => this.updatelabel()));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { G2BarComponent } from './bar.component';\n\nconst COMPONENTS = [G2BarComponent];\n\n@NgModule({\n imports: [CommonModule, NzOutletModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2BarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,YAAY,GAAG,EAAE,CAAC;MA+BX,uBAAuB,eAAe;IAjBnD;;QAwBW,UAAK,GAAG,0BAA0B,CAAC;QACpB,WAAM,GAAG,CAAC,CAAC;QAC1B,YAAO,GAA+B,MAAM,CAAC;QAC7C,SAAI,GAAgB,EAAE,CAAC;QACP,cAAS,GAAG,IAAI,CAAC;QACjC,gBAAW,GAAsB,MAAM,CAAC;QAC9B,cAAS,GAAG,IAAI,YAAY,EAAkB,CAAC;KAmFnE;;IA/ES,SAAS;QACf,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;KAC9D;IAED,OAAO;QACL,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAEnD,MAAM,SAAS,GAAG,IAAI,CAAC,aAA4B,CAAC;QACpD,MAAM,KAAK,IAAW,IAAI,CAAC,MAAM,GAAG,IAAK,MAAoB,CAAC,EAAE,CAAC,KAAK,CAAC;YACrE,SAAS;YACT,OAAO,E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;KAC7E;;2GA/FU,cAAc;+FAAd,cAAc,0UAdf;;;;;;GAMT;AAgBuB;IAAd,WAAW,EAAE;8CAAY;AAGV;IAAf,YAAY,EAAE;iDAAkB;2FAX/B,cAAc;kBAjB1B,SAAS;mBAAC;oBACT,QAAQ,EAAE,QAAQ;oBAClB,QAAQ,EAAE,OAAO;oBACjB,QAAQ,EAAE;;;;;;GAMT;oBACD,IAAI,EAAE;wBACJ,mBAAmB,EAAE,QAAQ;qBAC9B;oBACD,mBAAmB,EAAE,KAAK;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BAOU,KAAK;sBAAb,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACkB,MAAM;sBAA7B,KAAK;gBACG,OAAO;sBAAf,KAAK;gBACG,IAAI;sBAAZ,KAAK;gBACmB,SAAS;sBAAjC,KAAK;gBACG,WAAW;sBAAnB,KAAK;gBACa,SAAS;sBAA3B,MAAM;;;ACtDT,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;MAOvB,WAAW;;wGAAX,WAAW;yGAAX,WAAW,iBAPJ,cAAc,aAGtB,YAAY,EAAE,cAAc,EAAE,gBAAgB,aAHtC,cAAc;yGAOrB,WAAW,YAJb,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAC;2FAI9C,WAAW;kBALvB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAC;oBACzD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACdD;;;;;;"}
@@ -0,0 +1,81 @@
1
+ import { __decorate } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';
4
+ import { InputBoolean } from '@delon/util/decorator';
5
+ import * as i1 from 'ng-zorro-antd/card';
6
+ import { NzCardModule } from 'ng-zorro-antd/card';
7
+ import * as i2 from 'ng-zorro-antd/spin';
8
+ import { NzSpinModule } from 'ng-zorro-antd/spin';
9
+ import * as i3 from 'ng-zorro-antd/core/outlet';
10
+ import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
11
+ import * as i4 from '@angular/common';
12
+ import { CommonModule } from '@angular/common';
13
+
14
+ class G2CardComponent {
15
+ constructor(cdr) {
16
+ this.cdr = cdr;
17
+ /** 是否显示边框 */
18
+ this.bordered = false;
19
+ this.total = '';
20
+ this._height = 'auto';
21
+ /** 是否显示Loading */
22
+ this.loading = false;
23
+ }
24
+ set contentHeight(value) {
25
+ this._orgHeight = value;
26
+ this._height = typeof value === 'number' ? (this._height = `${value}px`) : value;
27
+ }
28
+ ngOnChanges() {
29
+ this.cdr.detectChanges();
30
+ }
31
+ }
32
+ G2CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
33
+ G2CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: G2CardComponent, selector: "g2-card", inputs: { bordered: "bordered", avatar: "avatar", title: "title", action: "action", total: "total", contentHeight: "contentHeight", footer: "footer", loading: "loading" }, host: { properties: { "class.g2-card": "true" } }, exportAs: ["g2Card"], usesOnChanges: true, ngImport: i0, template: "<nz-card [nzBodyStyle]=\"{ padding: '20px 24px 8px 24px' }\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{ avatar }}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{ total }}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{ height: _height }\">\n <div [ngClass]=\"{ 'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n", components: [{ type: i1.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzBorderless", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { type: i2.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }], directives: [{ type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
34
+ __decorate([
35
+ InputBoolean()
36
+ ], G2CardComponent.prototype, "bordered", void 0);
37
+ __decorate([
38
+ InputBoolean()
39
+ ], G2CardComponent.prototype, "loading", void 0);
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardComponent, decorators: [{
41
+ type: Component,
42
+ args: [{ selector: 'g2-card', exportAs: 'g2Card', host: { '[class.g2-card]': 'true' }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<nz-card [nzBodyStyle]=\"{ padding: '20px 24px 8px 24px' }\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{ avatar }}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{ total }}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{ height: _height }\">\n <div [ngClass]=\"{ 'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n" }]
43
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { bordered: [{
44
+ type: Input
45
+ }], avatar: [{
46
+ type: Input
47
+ }], title: [{
48
+ type: Input
49
+ }], action: [{
50
+ type: Input
51
+ }], total: [{
52
+ type: Input
53
+ }], contentHeight: [{
54
+ type: Input
55
+ }], footer: [{
56
+ type: Input
57
+ }], loading: [{
58
+ type: Input
59
+ }] } });
60
+
61
+ const COMPONENTS = [G2CardComponent];
62
+ class G2CardModule {
63
+ }
64
+ G2CardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
65
+ G2CardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardModule, declarations: [G2CardComponent], imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule], exports: [G2CardComponent] });
66
+ G2CardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardModule, imports: [[CommonModule, NzCardModule, NzSpinModule, NzOutletModule]] });
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardModule, decorators: [{
68
+ type: NgModule,
69
+ args: [{
70
+ imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule],
71
+ declarations: COMPONENTS,
72
+ exports: COMPONENTS
73
+ }]
74
+ }] });
75
+
76
+ /**
77
+ * Generated bundle index. Do not edit.
78
+ */
79
+
80
+ export { G2CardComponent, G2CardModule };
81
+ //# sourceMappingURL=card.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.mjs","sources":["../../../../packages/chart/card/card.component.ts","../../../../packages/chart/card/card.component.html","../../../../packages/chart/card/card.module.ts","../../../../packages/chart/card/card.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnChanges,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { BooleanInput, InputBoolean } from '@delon/util/decorator';\n\n@Component({\n selector: 'g2-card',\n exportAs: 'g2Card',\n templateUrl: './card.component.html',\n host: { '[class.g2-card]': 'true' },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2CardComponent implements OnChanges {\n static ngAcceptInputType_bordered: BooleanInput;\n static ngAcceptInputType_loading: BooleanInput;\n\n /** 是否显示边框 */\n @Input() @InputBoolean() bordered = false;\n @Input() avatar?: string | TemplateRef<void> | null;\n @Input() title?: string | TemplateRef<void> | null;\n @Input() action?: string | TemplateRef<void> | null;\n @Input() total = '';\n _height = 'auto';\n _orgHeight!: number | string;\n @Input()\n set contentHeight(value: number | string) {\n this._orgHeight = value;\n this._height = typeof value === 'number' ? (this._height = `${value}px`) : value;\n }\n @Input() footer?: string | TemplateRef<void> | null;\n /** 是否显示Loading */\n @Input() @InputBoolean() loading = false;\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n ngOnChanges(): void {\n this.cdr.detectChanges();\n }\n}\n","<nz-card [nzBodyStyle]=\"{ padding: '20px 24px 8px 24px' }\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{ avatar }}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{ total }}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{ height: _height }\">\n <div [ngClass]=\"{ 'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzCardModule } from 'ng-zorro-antd/card';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\n\nimport { G2CardComponent } from './card.component';\n\nconst COMPONENTS = [G2CardComponent];\n\n@NgModule({\n imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2CardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAqBa,eAAe;IAqB1B,YAAoB,GAAsB;QAAtB,QAAG,GAAH,GAAG,CAAmB;;QAhBjB,aAAQ,GAAG,KAAK,CAAC;QAIjC,UAAK,GAAG,EAAE,CAAC;QACpB,YAAO,GAAG,MAAM,CAAC;;QASQ,YAAO,GAAG,KAAK,CAAC;KAEK;IAT9C,IACI,aAAa,CAAC,KAAsB;QACtC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,GAAG,GAAG,KAAK,IAAI,IAAI,KAAK,CAAC;KAClF;IAOD,WAAW;QACT,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;KAC1B;;4GAzBU,eAAe;gGAAf,eAAe,yTCrB5B,wrCA4BA;ADF2B;IAAf,YAAY,EAAE;iDAAkB;AAcjB;IAAf,YAAY,EAAE;gDAAiB;2FAnB9B,eAAe;kBAT3B,SAAS;+BACE,SAAS,YACT,QAAQ,QAEZ,EAAE,iBAAiB,EAAE,MAAM,EAAE,uBACd,KAAK,mBACT,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;wGAOZ,QAAQ;sBAAhC,KAAK;gBACG,MAAM;sBAAd,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACG,MAAM;sBAAd,KAAK;gBACG,KAAK;sBAAb,KAAK;gBAIF,aAAa;sBADhB,KAAK;gBAKG,MAAM;sBAAd,KAAK;gBAEmB,OAAO;sBAA/B,KAAK;;;AE/BR,MAAM,UAAU,GAAG,CAAC,eAAe,CAAC,CAAC;MAOxB,YAAY;;yGAAZ,YAAY;0GAAZ,YAAY,iBAPL,eAAe,aAGvB,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,aAHhD,eAAe;0GAOtB,YAAY,YAJd,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,CAAC;2FAIxD,YAAY;kBALxB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,CAAC;oBACnE,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACfD;;;;;;"}
@@ -4,4 +4,4 @@ var public_api = void 0;
4
4
  /**
5
5
  * Generated bundle index. Do not edit.
6
6
  */
7
- //# sourceMappingURL=chart.js.map
7
+ //# sourceMappingURL=chart.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.mjs","sources":["../../../../packages/chart/public_api.ts","../../../../packages/chart/chart.ts"],"sourcesContent":["// https://github.com/ng-packagr/ng-packagr/issues/1655\nexport default void 0;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"AAAA;AACA,iBAAe,KAAK,CAAC;;ACDrB;;"}
@@ -1,16 +1,16 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ChangeDetectorRef, NgZone, ViewChild, Input, Output, NgModule } from '@angular/core';
2
+ import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, Output, NgModule } from '@angular/core';
3
3
  import { Subject, fromEvent } from 'rxjs';
4
4
  import * as i1 from '@delon/util/config';
5
- import { AlainConfigService } from '@delon/util/config';
6
5
  import * as i2 from '@delon/util/other';
7
- import { LazyService } from '@delon/util/other';
8
6
  import { __decorate } from 'tslib';
9
- import { Platform } from '@angular/cdk/platform';
10
7
  import { takeUntil, filter, debounceTime } from 'rxjs/operators';
11
8
  import { ZoneOutside } from '@delon/util/decorator';
12
- import { CommonModule } from '@angular/common';
9
+ import * as i2$1 from '@angular/cdk/platform';
10
+ import * as i3 from 'ng-zorro-antd/skeleton';
13
11
  import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
12
+ import * as i4 from '@angular/common';
13
+ import { CommonModule } from '@angular/common';
14
14
 
15
15
  class ChartEChartsService {
16
16
  constructor(cogSrv, lazySrv) {
@@ -60,14 +60,12 @@ class ChartEChartsService {
60
60
  this.notify$.unsubscribe();
61
61
  }
62
62
  }
63
- ChartEChartsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ChartEChartsService_Factory() { return new ChartEChartsService(i0.ɵɵinject(i1.AlainConfigService), i0.ɵɵinject(i2.LazyService)); }, token: ChartEChartsService, providedIn: "root" });
64
- ChartEChartsService.decorators = [
65
- { type: Injectable, args: [{ providedIn: 'root' },] }
66
- ];
67
- ChartEChartsService.ctorParameters = () => [
68
- { type: AlainConfigService },
69
- { type: LazyService }
70
- ];
63
+ ChartEChartsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsService, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
64
+ ChartEChartsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsService, providedIn: 'root' });
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsService, decorators: [{
66
+ type: Injectable,
67
+ args: [{ providedIn: 'root' }]
68
+ }], ctorParameters: function () { return [{ type: i1.AlainConfigService }, { type: i2.LazyService }]; } });
71
69
 
72
70
  class ChartEChartsComponent {
73
71
  constructor(srv, cdr, ngZone, platform) {
@@ -176,58 +174,69 @@ class ChartEChartsComponent {
176
174
  this.destroy();
177
175
  }
178
176
  }
179
- ChartEChartsComponent.decorators = [
180
- { type: Component, args: [{
181
- selector: 'chart-echarts, [chart-echarts]',
182
- exportAs: 'chartECharts',
183
- template: `
177
+ ChartEChartsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsComponent, deps: [{ token: ChartEChartsService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i2$1.Platform }], target: i0.ɵɵFactoryTarget.Component });
178
+ ChartEChartsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ChartEChartsComponent, selector: "chart-echarts, [chart-echarts]", inputs: { width: "width", height: "height", theme: "theme", initOpt: "initOpt", option: "option", on: "on" }, outputs: { events: "events" }, host: { properties: { "style.display": "'inline-block'", "style.width": "_width", "style.height": "_height" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], exportAs: ["chartECharts"], ngImport: i0, template: `
184
179
  <nz-skeleton *ngIf="!loaded"></nz-skeleton>
185
180
  <div #container [style.width]="_width" [style.height]="_height"></div>
186
- `,
187
- host: {
188
- '[style.display]': `'inline-block'`,
189
- '[style.width]': `_width`,
190
- '[style.height]': `_height`
191
- },
192
- preserveWhitespaces: false,
193
- changeDetection: ChangeDetectionStrategy.OnPush,
194
- encapsulation: ViewEncapsulation.None
195
- },] }
196
- ];
197
- ChartEChartsComponent.ctorParameters = () => [
198
- { type: ChartEChartsService },
199
- { type: ChangeDetectorRef },
200
- { type: NgZone },
201
- { type: Platform }
202
- ];
203
- ChartEChartsComponent.propDecorators = {
204
- node: [{ type: ViewChild, args: ['container', { static: true },] }],
205
- width: [{ type: Input }],
206
- height: [{ type: Input }],
207
- theme: [{ type: Input }],
208
- initOpt: [{ type: Input }],
209
- option: [{ type: Input }],
210
- on: [{ type: Input }],
211
- events: [{ type: Output }]
212
- };
181
+ `, isInline: true, components: [{ type: i3.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
213
182
  __decorate([
214
183
  ZoneOutside()
215
184
  ], ChartEChartsComponent.prototype, "load", null);
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsComponent, decorators: [{
186
+ type: Component,
187
+ args: [{
188
+ selector: 'chart-echarts, [chart-echarts]',
189
+ exportAs: 'chartECharts',
190
+ template: `
191
+ <nz-skeleton *ngIf="!loaded"></nz-skeleton>
192
+ <div #container [style.width]="_width" [style.height]="_height"></div>
193
+ `,
194
+ host: {
195
+ '[style.display]': `'inline-block'`,
196
+ '[style.width]': `_width`,
197
+ '[style.height]': `_height`
198
+ },
199
+ preserveWhitespaces: false,
200
+ changeDetection: ChangeDetectionStrategy.OnPush,
201
+ encapsulation: ViewEncapsulation.None
202
+ }]
203
+ }], ctorParameters: function () { return [{ type: ChartEChartsService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i2$1.Platform }]; }, propDecorators: { node: [{
204
+ type: ViewChild,
205
+ args: ['container', { static: true }]
206
+ }], width: [{
207
+ type: Input
208
+ }], height: [{
209
+ type: Input
210
+ }], theme: [{
211
+ type: Input
212
+ }], initOpt: [{
213
+ type: Input
214
+ }], option: [{
215
+ type: Input
216
+ }], on: [{
217
+ type: Input
218
+ }], events: [{
219
+ type: Output
220
+ }], load: [] } });
216
221
 
217
222
  const COMPONENTS = [ChartEChartsComponent];
218
223
  class ChartEChartsModule {
219
224
  }
220
- ChartEChartsModule.decorators = [
221
- { type: NgModule, args: [{
222
- imports: [CommonModule, NzSkeletonModule],
223
- declarations: COMPONENTS,
224
- exports: COMPONENTS
225
- },] }
226
- ];
225
+ ChartEChartsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
226
+ ChartEChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsModule, declarations: [ChartEChartsComponent], imports: [CommonModule, NzSkeletonModule], exports: [ChartEChartsComponent] });
227
+ ChartEChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsModule, imports: [[CommonModule, NzSkeletonModule]] });
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsModule, decorators: [{
229
+ type: NgModule,
230
+ args: [{
231
+ imports: [CommonModule, NzSkeletonModule],
232
+ declarations: COMPONENTS,
233
+ exports: COMPONENTS
234
+ }]
235
+ }] });
227
236
 
228
237
  /**
229
238
  * Generated bundle index. Do not edit.
230
239
  */
231
240
 
232
241
  export { ChartEChartsComponent, ChartEChartsModule, ChartEChartsService };
233
- //# sourceMappingURL=delon-chart-chart-echarts.js.map
242
+ //# sourceMappingURL=delon-chart-chart-echarts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delon-chart-chart-echarts.mjs","sources":["../../../../packages/chart/chart-echarts/echarts.service.ts","../../../../packages/chart/chart-echarts/echarts.component.ts","../../../../packages/chart/chart-echarts/echarts.module.ts","../../../../packages/chart/chart-echarts/delon-chart-chart-echarts.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { AlainChartConfig, AlainConfigService } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\n\n@Injectable({ providedIn: 'root' })\nexport class ChartEChartsService implements OnDestroy {\n private _cog!: AlainChartConfig;\n private loading = false;\n private loaded = false;\n private notify$ = new Subject<void>();\n\n get cog(): AlainChartConfig {\n return this._cog;\n }\n set cog(val: AlainChartConfig) {\n this._cog = this.cogSrv.merge(\n 'chart',\n {\n theme: '',\n echartsLib: 'https://cdnjs.cloudflare.com/ajax/libs/echarts/5.1.0/echarts.min.js'\n } as AlainChartConfig,\n val\n )!;\n }\n\n constructor(private cogSrv: AlainConfigService, private lazySrv: LazyService) {\n this.cog = { theme: '' };\n }\n\n libLoad(): this {\n if (this.loading) {\n if (this.loaded) {\n this.notify$.next();\n }\n return this;\n }\n this.loading = true;\n this.lazySrv\n .load(this.cog.echartsLib!)\n .then(() => {\n const extensions = this.cog.echartsExtensions;\n if (Array.isArray(extensions) && extensions.length > 0) {\n return this.lazySrv.load(extensions).then(() => true);\n }\n return Promise.resolve(true);\n })\n .then(() => {\n this.loaded = true;\n this.notify$.next();\n });\n return this;\n }\n\n get notify(): Observable<void> {\n return this.notify$.asObservable();\n }\n\n ngOnDestroy(): void {\n this.notify$.unsubscribe();\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { fromEvent, Subject } from 'rxjs';\nimport { debounceTime, filter, takeUntil } from 'rxjs/operators';\n\nimport { NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { ChartEChartsService } from './echarts.service';\nimport {\n ChartECharts,\n ChartEChartsEvent,\n ChartEChartsEventType,\n ChartEChartsOn,\n ChartEChartsOption\n} from './echarts.types';\n\n@Component({\n selector: 'chart-echarts, [chart-echarts]',\n exportAs: 'chartECharts',\n template: `\n <nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>\n <div #container [style.width]=\"_width\" [style.height]=\"_height\"></div>\n `,\n host: {\n '[style.display]': `'inline-block'`,\n '[style.width]': `_width`,\n '[style.height]': `_height`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class ChartEChartsComponent implements OnInit, OnDestroy {\n static ngAcceptInputType_width: NumberInput;\n static ngAcceptInputType_height: NumberInput;\n\n @ViewChild('container', { static: true }) private node!: ElementRef;\n private destroy$ = new Subject<void>();\n private _chart: ChartECharts | null = null;\n private _theme?: string | Record<string, unknown> | null;\n private _initOpt?: {\n renderer?: NzSafeAny;\n devicePixelRatio?: number;\n width?: number;\n height?: number;\n locale?: NzSafeAny;\n };\n private _option!: ChartEChartsOption;\n _width = '100%';\n _height = '400px';\n\n @Input()\n set width(val: NumberInput) {\n this._width = typeof val === 'number' ? `${val}px` : `${val}`;\n }\n @Input() set height(val: NumberInput) {\n this._height = typeof val === 'number' ? `${val}px` : `${val}`;\n }\n @Input()\n set theme(value: string | Record<string, unknown> | null | undefined) {\n this._theme = value;\n if (this._chart) {\n this.install();\n }\n }\n @Input()\n set initOpt(value: NzSafeAny) {\n this._initOpt = value;\n if (this._chart) {\n this.install();\n }\n }\n @Input()\n set option(value: ChartEChartsOption) {\n this._option = value;\n if (this._chart) {\n this.setOption(value, true);\n }\n }\n @Input() on: ChartEChartsOn[] = [];\n @Output() readonly events = new EventEmitter<ChartEChartsEvent>();\n\n get chart(): ChartECharts | null {\n return this._chart;\n }\n loaded = false;\n\n constructor(\n private srv: ChartEChartsService,\n private cdr: ChangeDetectorRef,\n private ngZone: NgZone,\n private platform: Platform\n ) {\n this.srv.notify\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n\n this.theme = srv.cog.echartsTheme;\n }\n\n private emit(type: ChartEChartsEventType, other?: ChartEChartsEvent): void {\n this.events.emit({ type, chart: this.chart!!, ...other });\n }\n\n @ZoneOutside()\n private load(): void {\n this.ngZone.run(() => {\n this.loaded = true;\n this.cdr.detectChanges();\n });\n this.emit('ready');\n this.install();\n }\n\n install(): this {\n this.destroy();\n const chart = (this._chart = (window as NzSafeAny).echarts.init(\n this.node.nativeElement,\n this._theme,\n this._initOpt\n )) as ChartECharts;\n this.emit('init');\n this.setOption(this._option);\n // on\n this.on.forEach(item => {\n if (item.query != null) {\n chart.on(item.eventName, item.query, event => item.handler({ event, chart }));\n } else {\n chart.on(item.eventName, event => item.handler({ event, chart }));\n }\n });\n return this;\n }\n\n destroy(): this {\n if (this._chart) {\n this._chart.dispose();\n this.emit('destroy');\n }\n return this;\n }\n\n setOption(option: ChartEChartsOption, notMerge: boolean = false, lazyUpdate: boolean = false): this {\n if (this._chart) {\n this._chart.setOption(option, notMerge, lazyUpdate);\n this.emit('set-option', { option } as NzSafeAny);\n }\n return this;\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n if ((window as NzSafeAny).echarts) {\n this.load();\n } else {\n this.srv.libLoad();\n }\n\n fromEvent(window, 'resize')\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !!this._chart),\n debounceTime(200)\n )\n .subscribe(() => this._chart!!.resize());\n }\n\n ngOnDestroy(): void {\n this.on.forEach(item => this._chart?.off(item.eventName));\n this.destroy$.next();\n this.destroy$.complete();\n this.destroy();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { ChartEChartsComponent } from './echarts.component';\n\nconst COMPONENTS = [ChartEChartsComponent];\n\n@NgModule({\n imports: [CommonModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class ChartEChartsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAOa,mBAAmB;IAoB9B,YAAoB,MAA0B,EAAU,OAAoB;QAAxD,WAAM,GAAN,MAAM,CAAoB;QAAU,YAAO,GAAP,OAAO,CAAa;QAlBpE,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,KAAK,CAAC;QACf,YAAO,GAAG,IAAI,OAAO,EAAQ,CAAC;QAiBpC,IAAI,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;KAC1B;IAhBD,IA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AY,EAAE,gBAAgB,aAHtB,qBAAqB;gHAO5B,kBAAkB,YAJpB,CAAC,YAAY,EAAE,gBAAgB,CAAC;2FAI9B,kBAAkB;kBAL9B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
@@ -1,14 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Directive, ElementRef, NgZone, ChangeDetectorRef, Input, ViewChild } from '@angular/core';
2
+ import { Injectable, Directive, Input, ViewChild } from '@angular/core';
3
3
  import { Subject } from 'rxjs';
4
4
  import * as i1 from '@delon/util/config';
5
- import { AlainConfigService } from '@delon/util/config';
6
5
  import * as i2 from '@delon/util/other';
7
- import { LazyService } from '@delon/util/other';
8
6
  import { __decorate } from 'tslib';
9
- import { Platform } from '@angular/cdk/platform';
10
7
  import { takeUntil, filter } from 'rxjs/operators';
11
8
  import { InputBoolean, InputNumber, ZoneOutside } from '@delon/util/decorator';
9
+ import * as i2$1 from '@angular/cdk/platform';
12
10
 
13
11
  class G2Service {
14
12
  constructor(cogSrv, lazySrv) {
@@ -52,14 +50,12 @@ class G2Service {
52
50
  this.notify$.unsubscribe();
53
51
  }
54
52
  }
55
- G2Service.ɵprov = i0.ɵɵdefineInjectable({ factory: function G2Service_Factory() { return new G2Service(i0.ɵɵinject(i1.AlainConfigService), i0.ɵɵinject(i2.LazyService)); }, token: G2Service, providedIn: "root" });
56
- G2Service.decorators = [
57
- { type: Injectable, args: [{ providedIn: 'root' },] }
58
- ];
59
- G2Service.ctorParameters = () => [
60
- { type: AlainConfigService },
61
- { type: LazyService }
62
- ];
53
+ G2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2Service, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
54
+ G2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2Service, providedIn: 'root' });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2Service, decorators: [{
56
+ type: Injectable,
57
+ args: [{ providedIn: 'root' }]
58
+ }], ctorParameters: function () { return [{ type: i1.AlainConfigService }, { type: i2.LazyService }]; } });
63
59
 
64
60
  class G2BaseComponent {
65
61
  constructor(srv, el, ngZone, platform, cdr) {
@@ -135,22 +131,8 @@ class G2BaseComponent {
135
131
  this.destroyChart();
136
132
  }
137
133
  }
138
- G2BaseComponent.decorators = [
139
- { type: Directive }
140
- ];
141
- G2BaseComponent.ctorParameters = () => [
142
- { type: G2Service },
143
- { type: ElementRef },
144
- { type: NgZone },
145
- { type: Platform },
146
- { type: ChangeDetectorRef }
147
- ];
148
- G2BaseComponent.propDecorators = {
149
- repaint: [{ type: Input }],
150
- node: [{ type: ViewChild, args: ['container', { static: true },] }],
151
- delay: [{ type: Input }],
152
- theme: [{ type: Input }]
153
- };
134
+ G2BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BaseComponent, deps: [{ token: G2Service }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i2$1.Platform }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
135
+ G2BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: G2BaseComponent, inputs: { repaint: "repaint", delay: "delay", theme: "theme" }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
154
136
  __decorate([
155
137
  InputBoolean()
156
138
  ], G2BaseComponent.prototype, "repaint", void 0);
@@ -163,6 +145,18 @@ __decorate([
163
145
  __decorate([
164
146
  ZoneOutside()
165
147
  ], G2BaseComponent.prototype, "destroyChart", null);
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BaseComponent, decorators: [{
149
+ type: Directive
150
+ }], ctorParameters: function () { return [{ type: G2Service }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i2$1.Platform }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { repaint: [{
151
+ type: Input
152
+ }], node: [{
153
+ type: ViewChild,
154
+ args: ['container', { static: true }]
155
+ }], delay: [{
156
+ type: Input
157
+ }], theme: [{
158
+ type: Input
159
+ }], load: [], destroyChart: [] } });
166
160
 
167
161
  function genMiniTooltipOptions(type, options) {
168
162
  const res = Object.assign({ showTitle: false, showMarkers: true, enterable: true, domStyles: {
@@ -184,4 +178,4 @@ function genMiniTooltipOptions(type, options) {
184
178
  */
185
179
 
186
180
  export { G2BaseComponent, G2Service, genMiniTooltipOptions };
187
- //# sourceMappingURL=delon-chart-core.js.map
181
+ //# sourceMappingURL=delon-chart-core.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delon-chart-core.mjs","sources":["../../../../packages/chart/core/g2.servicce.ts","../../../../packages/chart/core/g2.base.component.ts","../../../../packages/chart/core/utils.ts","../../../../packages/chart/core/delon-chart-core.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { AlainChartConfig, AlainConfigService } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\n\n@Injectable({ providedIn: 'root' })\nexport class G2Service implements OnDestroy {\n private _cog!: AlainChartConfig;\n private loading = false;\n private loaded = false;\n private notify$ = new Subject<void>();\n\n get cog(): AlainChartConfig {\n return this._cog;\n }\n set cog(val: AlainChartConfig) {\n this._cog = this.cogSrv.merge(\n 'chart',\n {\n theme: '',\n libs: [\n 'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.14/dist/g2.min.js',\n 'https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.8/dist/data-set.js'\n ]\n } as AlainChartConfig,\n val\n )!;\n }\n\n constructor(private cogSrv: AlainConfigService, private lazySrv: LazyService) {\n this.cog = { theme: '' };\n }\n\n libLoad(): this {\n if (this.loading) {\n if (this.loaded) {\n this.notify$.next();\n }\n return this;\n }\n this.loading = true;\n this.lazySrv.load(this.cog.libs!).then(() => {\n this.loaded = true;\n this.notify$.next();\n });\n return this;\n }\n\n get notify(): Observable<void> {\n return this.notify$.asObservable();\n }\n\n ngOnDestroy(): void {\n this.notify$.unsubscribe();\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Types } from '@antv/g2';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { G2Service } from './g2.servicce';\n\n@Directive()\nexport abstract class G2BaseComponent implements OnInit, OnChanges, OnDestroy {\n get chart(): Chart {\n return this._chart;\n }\n\n constructor(\n protected srv: G2Service,\n protected el: ElementRef<HTMLElement>,\n protected ngZone: NgZone,\n protected platform: Platform,\n protected cdr: ChangeDetectorRef\n ) {\n this.theme = srv.cog.theme!;\n this.srv.notify\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n }\n static ngAcceptInputType_repaint: BooleanInput;\n static ngAcceptInputType_delay: NumberInput;\n @Input() @InputBoolean() repaint = true;\n\n @ViewChild('container', { static: true }) protected node!: ElementRef;\n protected resize$?: Subscription;\n protected destroy$ = new Subject<void>();\n protected _chart!: Chart;\n loaded = false;\n\n @Input() @InputNumber() delay = 0;\n @Input() theme: string | Types.LooseObject;\n\n /** 检查是否只变更数据 */\n onlyChangeData?: (changes: SimpleChanges) => boolean;\n\n abstract install(): void;\n\n /** G2数据变更 */\n changeData(): void {}\n\n /** 等同 `ngOnInit` */\n onInit(): void {}\n\n /** 等同 `ngOnChanges` */\n onChanges(_: SimpleChanges): void {}\n\n @ZoneOutside()\n private load(): void {\n this.ngZone.run(() => {\n this.loaded = true;\n this.cdr.detectChanges();\n });\n setTimeout(() => this.install(), this.delay);\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.onInit();\n if ((window as NzSafeAny).G2) {\n this.load();\n } else {\n this.srv.libLoad();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.onChanges(changes);\n\n const isOnlyChangeData = this.onlyChangeData\n ? this.onlyChangeData(changes)\n : Object.keys(changes).length === 1 && !!changes.data;\n if (isOnlyChangeData) {\n this.changeData();\n return;\n }\n if (!this.chart || !this.repaint) return;\n this.ngZone.runOutsideAngular(() => {\n this.destroyChart().install();\n });\n }\n\n @ZoneOutside()\n protected destroyChart(): this {\n if (this._chart) {\n this._chart.destroy();\n }\n return this;\n }\n\n ngOnDestroy(): void {\n if (this.resize$) {\n this.resize$.unsubscribe();\n }\n this.destroy$.next();\n this.destroy$.complete();\n this.destroyChart();\n }\n}\n","import type { Types } from '@antv/g2';\n\nexport function genMiniTooltipOptions(type: 'mini' | 'default', options?: Types.TooltipCfg): Types.TooltipCfg {\n const res: Types.TooltipCfg = {\n showTitle: false,\n showMarkers: true,\n enterable: true,\n domStyles: {\n 'g2-tooltip': { padding: '0px' },\n 'g2-tooltip-title': { display: 'none' },\n 'g2-tooltip-list-item': { margin: '4px' }\n },\n ...options\n };\n if (type === 'mini') {\n res.position = 'top';\n res.domStyles!['g2-tooltip'] = { padding: '0px', backgroundColor: 'transparent', boxShadow: 'none' };\n res.itemTpl = `<li>{value}</li>`;\n res.offset = 8;\n }\n\n return res;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,SAAS;IAuBpB,Y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