@delon/abc 12.3.0 → 13.0.0-beta.1

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 (729) hide show
  1. package/abc.d.ts +1 -0
  2. package/auto-focus/auto-focus.directive.d.ts +7 -2
  3. package/auto-focus/auto-focus.module.d.ts +5 -0
  4. package/auto-focus/autoFocus.d.ts +1 -0
  5. package/auto-focus/package.json +5 -6
  6. package/avatar-list/avatar-list-item.component.d.ts +7 -4
  7. package/avatar-list/avatar-list.component.d.ts +4 -1
  8. package/avatar-list/avatar-list.module.d.ts +9 -0
  9. package/avatar-list/avatarList.d.ts +1 -0
  10. package/avatar-list/package.json +5 -6
  11. package/avatar-list/style/index.less +6 -0
  12. package/count-down/count-down.component.d.ts +4 -1
  13. package/count-down/count-down.d.ts +1 -0
  14. package/count-down/count-down.module.d.ts +7 -0
  15. package/count-down/package.json +5 -6
  16. package/date-picker/date-picker.module.d.ts +9 -0
  17. package/date-picker/datePicker.d.ts +1 -1
  18. package/date-picker/package.json +5 -6
  19. package/date-picker/public_api.d.ts +1 -0
  20. package/date-picker/range-shortcut.component.d.ts +3 -0
  21. package/date-picker/range.directive.d.ts +3 -0
  22. package/down-file/down-file.directive.d.ts +5 -2
  23. package/down-file/down-file.module.d.ts +7 -0
  24. package/down-file/downFile.d.ts +1 -0
  25. package/down-file/package.json +5 -6
  26. package/ellipsis/ellipsis.component.d.ts +5 -2
  27. package/ellipsis/ellipsis.d.ts +1 -0
  28. package/ellipsis/ellipsis.module.d.ts +8 -0
  29. package/ellipsis/package.json +5 -6
  30. package/ellipsis/style/index.less +4 -0
  31. package/error-collect/error-collect.component.d.ts +3 -0
  32. package/error-collect/error-collect.module.d.ts +7 -0
  33. package/error-collect/errorCollect.d.ts +1 -0
  34. package/error-collect/package.json +5 -6
  35. package/error-collect/style/index.less +1 -0
  36. package/{esm2015/abc.js → esm2020/abc.mjs} +0 -0
  37. package/esm2020/auto-focus/auto-focus.directive.mjs +48 -0
  38. package/esm2020/auto-focus/auto-focus.module.mjs +17 -0
  39. package/{esm2015/auto-focus/autoFocus.js → esm2020/auto-focus/autoFocus.mjs} +0 -0
  40. package/{esm2015/auto-focus/index.js → esm2020/auto-focus/index.mjs} +0 -0
  41. package/esm2020/avatar-list/avatar-list-item.component.mjs +26 -0
  42. package/esm2020/avatar-list/avatar-list.component.mjs +89 -0
  43. package/esm2020/avatar-list/avatar-list.module.mjs +22 -0
  44. package/{esm2015/avatar-list/avatarList.js → esm2020/avatar-list/avatarList.mjs} +0 -0
  45. package/{esm2015/avatar-list/public_api.js → esm2020/avatar-list/public_api.mjs} +0 -0
  46. package/esm2020/count-down/count-down.component.mjs +45 -0
  47. package/{esm2015/count-down/count-down.js → esm2020/count-down/count-down.mjs} +0 -0
  48. package/esm2020/count-down/count-down.module.mjs +20 -0
  49. package/{esm2015/count-down/public_api.js → esm2020/count-down/public_api.mjs} +0 -0
  50. package/esm2020/date-picker/date-picker.module.mjs +22 -0
  51. package/esm2020/date-picker/datePicker.mjs +5 -0
  52. package/{esm2015/date-picker/public_api.js → esm2020/date-picker/public_api.mjs} +2 -1
  53. package/esm2020/date-picker/range-shortcut.component.mjs +40 -0
  54. package/esm2020/date-picker/range.directive.mjs +174 -0
  55. package/esm2020/down-file/down-file.directive.mjs +114 -0
  56. package/esm2020/down-file/down-file.module.mjs +20 -0
  57. package/{esm2015/down-file/downFile.js → esm2020/down-file/downFile.mjs} +0 -0
  58. package/{esm2015/down-file/public_api.js → esm2020/down-file/public_api.mjs} +0 -0
  59. package/esm2020/ellipsis/ellipsis.component.mjs +229 -0
  60. package/{esm2015/ellipsis/ellipsis.js → esm2020/ellipsis/ellipsis.mjs} +0 -0
  61. package/esm2020/ellipsis/ellipsis.module.mjs +21 -0
  62. package/{esm2015/ellipsis/public_api.js → esm2020/ellipsis/public_api.mjs} +0 -0
  63. package/esm2020/error-collect/error-collect.component.mjs +118 -0
  64. package/esm2020/error-collect/error-collect.module.mjs +20 -0
  65. package/{esm2015/error-collect/errorCollect.js → esm2020/error-collect/errorCollect.mjs} +0 -0
  66. package/{esm2015/error-collect/public_api.js → esm2020/error-collect/public_api.mjs} +0 -0
  67. package/esm2020/exception/exception.component.mjs +105 -0
  68. package/{esm2015/exception/exception.js → esm2020/exception/exception.mjs} +0 -0
  69. package/esm2020/exception/exception.module.mjs +23 -0
  70. package/{esm2015/exception/public_api.js → esm2020/exception/public_api.mjs} +0 -0
  71. package/esm2020/footer-toolbar/footer-toolbar.component.mjs +44 -0
  72. package/esm2020/footer-toolbar/footer-toolbar.module.mjs +21 -0
  73. package/{esm2015/footer-toolbar/footerToolbar.js → esm2020/footer-toolbar/footerToolbar.mjs} +0 -0
  74. package/{esm2015/footer-toolbar/public_api.js → esm2020/footer-toolbar/public_api.mjs} +0 -0
  75. package/esm2020/full-content/full-content-toggle.directive.mjs +24 -0
  76. package/esm2020/full-content/full-content.component.mjs +138 -0
  77. package/esm2020/full-content/full-content.module.mjs +20 -0
  78. package/esm2020/full-content/full-content.service.mjs +23 -0
  79. package/{esm2015/full-content/fullContent.js → esm2020/full-content/fullContent.mjs} +0 -0
  80. package/{esm2015/full-content/public_api.js → esm2020/full-content/public_api.mjs} +0 -0
  81. package/esm2020/global-footer/global-footer-item.component.mjs +30 -0
  82. package/esm2020/global-footer/global-footer.component.mjs +73 -0
  83. package/esm2020/global-footer/global-footer.module.mjs +21 -0
  84. package/{esm2015/global-footer/global-footer.types.js → esm2020/global-footer/global-footer.types.mjs} +0 -0
  85. package/{esm2015/global-footer/globalFooter.js → esm2020/global-footer/globalFooter.mjs} +0 -0
  86. package/{esm2015/global-footer/public_api.js → esm2020/global-footer/public_api.mjs} +0 -0
  87. package/esm2020/image/image.directive.mjs +146 -0
  88. package/{esm2015/image/image.js → esm2020/image/image.mjs} +0 -0
  89. package/esm2020/image/image.module.mjs +20 -0
  90. package/{esm2015/image/public_api.js → esm2020/image/public_api.mjs} +0 -0
  91. package/{esm2015/let/index.js → esm2020/let/index.mjs} +0 -0
  92. package/esm2020/let/let.directive.mjs +36 -0
  93. package/{esm2015/let/let.js → esm2020/let/let.mjs} +0 -0
  94. package/esm2020/let/let.module.mjs +17 -0
  95. package/esm2020/loading/loading.component.mjs +26 -0
  96. package/{esm2015/loading/loading.js → esm2020/loading/loading.mjs} +0 -0
  97. package/esm2020/loading/loading.module.mjs +24 -0
  98. package/esm2020/loading/loading.service.mjs +88 -0
  99. package/{esm2015/loading/loading.types.js → esm2020/loading/loading.types.mjs} +0 -0
  100. package/{esm2015/loading/public_api.js → esm2020/loading/public_api.mjs} +0 -0
  101. package/{esm2015/lodop/lodop.js → esm2020/lodop/lodop.mjs} +0 -0
  102. package/esm2020/lodop/lodop.module.mjs +12 -0
  103. package/esm2020/lodop/lodop.service.mjs +222 -0
  104. package/esm2020/lodop/lodop.types.mjs +2 -0
  105. package/{esm2015/lodop/public_api.js → esm2020/lodop/public_api.mjs} +0 -0
  106. package/esm2020/media/media.component.mjs +106 -0
  107. package/{esm2015/media/media.js → esm2020/media/media.mjs} +0 -0
  108. package/esm2020/media/media.module.mjs +19 -0
  109. package/esm2020/media/media.service.mjs +46 -0
  110. package/{esm2015/media/plyr.types.js → esm2020/media/plyr.types.mjs} +0 -0
  111. package/{esm2015/media/public_api.js → esm2020/media/public_api.mjs} +0 -0
  112. package/esm2020/notice-icon/notice-icon-tab.component.mjs +34 -0
  113. package/esm2020/notice-icon/notice-icon.component.mjs +80 -0
  114. package/esm2020/notice-icon/notice-icon.module.mjs +60 -0
  115. package/{esm2015/notice-icon/notice-icon.types.js → esm2020/notice-icon/notice-icon.types.mjs} +0 -0
  116. package/{esm2015/notice-icon/noticeIcon.js → esm2020/notice-icon/noticeIcon.mjs} +0 -0
  117. package/{esm2015/notice-icon/public_api.js → esm2020/notice-icon/public_api.mjs} +0 -0
  118. package/esm2020/onboarding/onboarding.component.mjs +134 -0
  119. package/{esm2015/onboarding/onboarding.js → esm2020/onboarding/onboarding.mjs} +0 -0
  120. package/esm2020/onboarding/onboarding.module.mjs +25 -0
  121. package/esm2020/onboarding/onboarding.service.mjs +185 -0
  122. package/{esm2015/onboarding/onboarding.types.js → esm2020/onboarding/onboarding.types.mjs} +0 -0
  123. package/{esm2015/onboarding/public_api.js → esm2020/onboarding/public_api.mjs} +0 -0
  124. package/esm2020/page-header/page-header.component.mjs +247 -0
  125. package/esm2020/page-header/page-header.module.mjs +24 -0
  126. package/{esm2015/page-header/pageHeader.js → esm2020/page-header/pageHeader.mjs} +0 -0
  127. package/{esm2015/page-header/public_api.js → esm2020/page-header/public_api.mjs} +0 -0
  128. package/esm2020/pdf/pdf.component.mjs +460 -0
  129. package/{esm2015/pdf/pdf.config.js → esm2020/pdf/pdf.config.mjs} +2 -2
  130. package/{esm2015/pdf/pdf.js → esm2020/pdf/pdf.mjs} +0 -0
  131. package/esm2020/pdf/pdf.module.mjs +20 -0
  132. package/{esm2015/pdf/pdf.types.js → esm2020/pdf/pdf.types.mjs} +0 -0
  133. package/{esm2015/pdf/public_api.js → esm2020/pdf/public_api.mjs} +0 -0
  134. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  135. package/{esm2015/qr/public_api.js → esm2020/qr/public_api.mjs} +0 -0
  136. package/esm2020/qr/qr.component.mjs +136 -0
  137. package/{esm2015/qr/qr.config.js → esm2020/qr/qr.config.mjs} +2 -2
  138. package/{esm2015/qr/qr.js → esm2020/qr/qr.mjs} +0 -0
  139. package/esm2020/qr/qr.module.mjs +19 -0
  140. package/{esm2015/qr/qr.types.js → esm2020/qr/qr.types.mjs} +0 -0
  141. package/{esm2015/quick-menu/public_api.js → esm2020/quick-menu/public_api.mjs} +0 -0
  142. package/esm2020/quick-menu/quick-menu.component.mjs +89 -0
  143. package/esm2020/quick-menu/quick-menu.module.mjs +21 -0
  144. package/{esm2015/quick-menu/quickMenu.js → esm2020/quick-menu/quickMenu.mjs} +0 -0
  145. package/{esm2015/result/public_api.js → esm2020/result/public_api.mjs} +0 -0
  146. package/esm2020/result/result.component.mjs +61 -0
  147. package/{esm2015/result/result.js → esm2020/result/result.mjs} +0 -0
  148. package/esm2020/result/result.module.mjs +21 -0
  149. package/{esm2015/reuse-tab/lifecycle_hooks.js → esm2020/reuse-tab/lifecycle_hooks.mjs} +0 -0
  150. package/{esm2015/reuse-tab/public_api.js → esm2020/reuse-tab/public_api.mjs} +0 -0
  151. package/esm2020/reuse-tab/reuse-tab-context-menu.component.mjs +76 -0
  152. package/esm2020/reuse-tab/reuse-tab-context.component.mjs +33 -0
  153. package/esm2020/reuse-tab/reuse-tab-context.directive.mjs +35 -0
  154. package/esm2020/reuse-tab/reuse-tab-context.service.mjs +55 -0
  155. package/esm2020/reuse-tab/reuse-tab.component.mjs +318 -0
  156. package/{esm2015/reuse-tab/reuse-tab.interfaces.js → esm2020/reuse-tab/reuse-tab.interfaces.mjs} +0 -0
  157. package/esm2020/reuse-tab/reuse-tab.module.mjs +29 -0
  158. package/esm2020/reuse-tab/reuse-tab.service.mjs +533 -0
  159. package/{esm2015/reuse-tab/reuse-tab.strategy.js → esm2020/reuse-tab/reuse-tab.strategy.mjs} +0 -0
  160. package/{esm2015/reuse-tab/reuseTab.js → esm2020/reuse-tab/reuseTab.mjs} +0 -0
  161. package/{esm2015/se/edit.js → esm2020/se/edit.mjs} +0 -0
  162. package/esm2020/se/public_api.mjs +5 -0
  163. package/esm2020/se/se-container.component.mjs +173 -0
  164. package/esm2020/se/se.component.mjs +233 -0
  165. package/esm2020/se/se.module.mjs +23 -0
  166. package/{esm2015/se/se.types.js → esm2020/se/se.types.mjs} +0 -0
  167. package/{esm2015/sg/grid.js → esm2020/sg/grid.mjs} +0 -0
  168. package/{esm2015/sg/public_api.js → esm2020/sg/public_api.mjs} +0 -0
  169. package/esm2020/sg/sg-container.component.mjs +52 -0
  170. package/esm2020/sg/sg.component.mjs +67 -0
  171. package/esm2020/sg/sg.module.mjs +20 -0
  172. package/{esm2015/st/public_api.js → esm2020/st/public_api.mjs} +0 -0
  173. package/esm2020/st/st-column-source.mjs +470 -0
  174. package/esm2020/st/st-data-source.mjs +448 -0
  175. package/esm2020/st/st-export.mjs +89 -0
  176. package/esm2020/st/st-filter.component.mjs +262 -0
  177. package/esm2020/st/st-row.directive.mjs +45 -0
  178. package/esm2020/st/st-widget-host.directive.mjs +31 -0
  179. package/esm2020/st/st-widget.mjs +26 -0
  180. package/esm2020/st/st.component.mjs +969 -0
  181. package/{esm2015/st/st.config.js → esm2020/st/st.config.mjs} +1 -2
  182. package/esm2020/st/st.interfaces.mjs +2 -0
  183. package/esm2020/st/st.module.mjs +98 -0
  184. package/esm2020/st/st.types.mjs +2 -0
  185. package/esm2020/st/table.mjs +5 -0
  186. package/esm2020/sv/public_api.mjs +5 -0
  187. package/esm2020/sv/sv-container.component.mjs +125 -0
  188. package/esm2020/sv/sv-value.component.mjs +44 -0
  189. package/esm2020/sv/sv.component.mjs +113 -0
  190. package/esm2020/sv/sv.module.mjs +25 -0
  191. package/{esm2015/sv/view.js → esm2020/sv/view.mjs} +0 -0
  192. package/{esm2015/tag-select/public_api.js → esm2020/tag-select/public_api.mjs} +0 -0
  193. package/esm2020/tag-select/tag-select.component.mjs +64 -0
  194. package/esm2020/tag-select/tag-select.module.mjs +21 -0
  195. package/{esm2015/tag-select/tagSelect.js → esm2020/tag-select/tagSelect.mjs} +0 -0
  196. package/{esm2015/xlsx/public_api.js → esm2020/xlsx/public_api.mjs} +0 -0
  197. package/esm2020/xlsx/xlsx.directive.mjs +27 -0
  198. package/{esm2015/xlsx/xlsx.js → esm2020/xlsx/xlsx.mjs} +0 -0
  199. package/esm2020/xlsx/xlsx.module.mjs +19 -0
  200. package/esm2020/xlsx/xlsx.service.mjs +128 -0
  201. package/{esm2015/xlsx/xlsx.types.js → esm2020/xlsx/xlsx.types.mjs} +0 -0
  202. package/{esm2015/zip/public_api.js → esm2020/zip/public_api.mjs} +0 -0
  203. package/{esm2015/zip/zip.js → esm2020/zip/zip.mjs} +0 -0
  204. package/esm2020/zip/zip.module.mjs +15 -0
  205. package/esm2020/zip/zip.service.mjs +114 -0
  206. package/{esm2015/zip/zip.types.js → esm2020/zip/zip.types.mjs} +0 -0
  207. package/exception/exception.component.d.ts +6 -2
  208. package/exception/exception.d.ts +1 -0
  209. package/exception/exception.module.d.ts +10 -0
  210. package/exception/package.json +5 -6
  211. package/exception/style/index.less +9 -0
  212. package/fesm2015/{abc.js → abc.mjs} +1 -1
  213. package/fesm2015/abc.mjs.map +1 -0
  214. package/fesm2015/autoFocus.mjs +69 -0
  215. package/fesm2015/autoFocus.mjs.map +1 -0
  216. package/fesm2015/avatarList.mjs +140 -0
  217. package/fesm2015/avatarList.mjs.map +1 -0
  218. package/fesm2015/count-down.mjs +69 -0
  219. package/fesm2015/count-down.mjs.map +1 -0
  220. package/fesm2015/{datePicker.js → datePicker.mjs} +63 -40
  221. package/fesm2015/datePicker.mjs.map +1 -0
  222. package/fesm2015/downFile.mjs +141 -0
  223. package/fesm2015/downFile.mjs.map +1 -0
  224. package/fesm2015/edit.mjs +443 -0
  225. package/fesm2015/edit.mjs.map +1 -0
  226. package/fesm2015/ellipsis.mjs +255 -0
  227. package/fesm2015/ellipsis.mjs.map +1 -0
  228. package/fesm2015/errorCollect.mjs +144 -0
  229. package/fesm2015/errorCollect.mjs.map +1 -0
  230. package/fesm2015/exception.mjs +135 -0
  231. package/fesm2015/exception.mjs.map +1 -0
  232. package/fesm2015/footerToolbar.mjs +70 -0
  233. package/fesm2015/footerToolbar.mjs.map +1 -0
  234. package/fesm2015/fullContent.mjs +202 -0
  235. package/fesm2015/fullContent.mjs.map +1 -0
  236. package/fesm2015/globalFooter.mjs +127 -0
  237. package/fesm2015/globalFooter.mjs.map +1 -0
  238. package/fesm2015/grid.mjs +139 -0
  239. package/fesm2015/grid.mjs.map +1 -0
  240. package/fesm2015/image.mjs +165 -0
  241. package/fesm2015/image.mjs.map +1 -0
  242. package/fesm2015/let.mjs +59 -0
  243. package/fesm2015/let.mjs.map +1 -0
  244. package/fesm2015/loading.mjs +140 -0
  245. package/fesm2015/loading.mjs.map +1 -0
  246. package/fesm2015/{lodop.js → lodop.mjs} +15 -15
  247. package/fesm2015/lodop.mjs.map +1 -0
  248. package/fesm2015/media.mjs +170 -0
  249. package/fesm2015/media.mjs.map +1 -0
  250. package/fesm2015/noticeIcon.mjs +173 -0
  251. package/fesm2015/noticeIcon.mjs.map +1 -0
  252. package/fesm2015/onboarding.mjs +335 -0
  253. package/fesm2015/onboarding.mjs.map +1 -0
  254. package/fesm2015/pageHeader.mjs +277 -0
  255. package/fesm2015/pageHeader.mjs.map +1 -0
  256. package/fesm2015/{pdf.js → pdf.mjs} +81 -54
  257. package/fesm2015/pdf.mjs.map +1 -0
  258. package/fesm2015/qr.mjs +171 -0
  259. package/fesm2015/qr.mjs.map +1 -0
  260. package/fesm2015/quickMenu.mjs +114 -0
  261. package/fesm2015/quickMenu.mjs.map +1 -0
  262. package/fesm2015/result.mjs +89 -0
  263. package/fesm2015/result.mjs.map +1 -0
  264. package/fesm2015/{reuseTab.js → reuseTab.mjs} +188 -174
  265. package/fesm2015/reuseTab.mjs.map +1 -0
  266. package/fesm2015/table.mjs +2426 -0
  267. package/fesm2015/table.mjs.map +1 -0
  268. package/fesm2015/tagSelect.mjs +92 -0
  269. package/fesm2015/tagSelect.mjs.map +1 -0
  270. package/fesm2015/view.mjs +302 -0
  271. package/fesm2015/view.mjs.map +1 -0
  272. package/fesm2015/{xlsx.js → xlsx.mjs} +42 -42
  273. package/fesm2015/xlsx.mjs.map +1 -0
  274. package/fesm2015/{zip.js → zip.mjs} +35 -32
  275. package/fesm2015/zip.mjs.map +1 -0
  276. package/fesm2020/abc.mjs +7 -0
  277. package/fesm2020/abc.mjs.map +1 -0
  278. package/fesm2020/autoFocus.mjs +69 -0
  279. package/fesm2020/autoFocus.mjs.map +1 -0
  280. package/fesm2020/avatarList.mjs +137 -0
  281. package/fesm2020/avatarList.mjs.map +1 -0
  282. package/fesm2020/count-down.mjs +69 -0
  283. package/fesm2020/count-down.mjs.map +1 -0
  284. package/fesm2020/datePicker.mjs +236 -0
  285. package/fesm2020/datePicker.mjs.map +1 -0
  286. package/fesm2020/downFile.mjs +138 -0
  287. package/fesm2020/downFile.mjs.map +1 -0
  288. package/fesm2020/edit.mjs +436 -0
  289. package/fesm2020/edit.mjs.map +1 -0
  290. package/fesm2020/ellipsis.mjs +253 -0
  291. package/fesm2020/ellipsis.mjs.map +1 -0
  292. package/fesm2020/errorCollect.mjs +141 -0
  293. package/fesm2020/errorCollect.mjs.map +1 -0
  294. package/fesm2020/exception.mjs +132 -0
  295. package/fesm2020/exception.mjs.map +1 -0
  296. package/fesm2020/footerToolbar.mjs +68 -0
  297. package/fesm2020/footerToolbar.mjs.map +1 -0
  298. package/fesm2020/fullContent.mjs +199 -0
  299. package/fesm2020/fullContent.mjs.map +1 -0
  300. package/fesm2020/globalFooter.mjs +124 -0
  301. package/fesm2020/globalFooter.mjs.map +1 -0
  302. package/fesm2020/grid.mjs +137 -0
  303. package/fesm2020/grid.mjs.map +1 -0
  304. package/fesm2020/image.mjs +170 -0
  305. package/fesm2020/image.mjs.map +1 -0
  306. package/fesm2020/let.mjs +57 -0
  307. package/fesm2020/let.mjs.map +1 -0
  308. package/fesm2020/loading.mjs +138 -0
  309. package/fesm2020/loading.mjs.map +1 -0
  310. package/fesm2020/lodop.mjs +239 -0
  311. package/fesm2020/lodop.mjs.map +1 -0
  312. package/fesm2020/media.mjs +172 -0
  313. package/fesm2020/media.mjs.map +1 -0
  314. package/fesm2020/noticeIcon.mjs +173 -0
  315. package/fesm2020/noticeIcon.mjs.map +1 -0
  316. package/fesm2020/onboarding.mjs +343 -0
  317. package/fesm2020/onboarding.mjs.map +1 -0
  318. package/fesm2020/pageHeader.mjs +274 -0
  319. package/fesm2020/pageHeader.mjs.map +1 -0
  320. package/fesm2020/pdf.mjs +506 -0
  321. package/fesm2020/pdf.mjs.map +1 -0
  322. package/fesm2020/qr.mjs +171 -0
  323. package/fesm2020/qr.mjs.map +1 -0
  324. package/fesm2020/quickMenu.mjs +114 -0
  325. package/fesm2020/quickMenu.mjs.map +1 -0
  326. package/fesm2020/result.mjs +86 -0
  327. package/fesm2020/result.mjs.map +1 -0
  328. package/fesm2020/reuseTab.mjs +1106 -0
  329. package/fesm2020/reuseTab.mjs.map +1 -0
  330. package/fesm2020/table.mjs +2469 -0
  331. package/fesm2020/table.mjs.map +1 -0
  332. package/fesm2020/tagSelect.mjs +89 -0
  333. package/fesm2020/tagSelect.mjs.map +1 -0
  334. package/fesm2020/view.mjs +298 -0
  335. package/fesm2020/view.mjs.map +1 -0
  336. package/fesm2020/xlsx.mjs +175 -0
  337. package/fesm2020/xlsx.mjs.map +1 -0
  338. package/fesm2020/zip.mjs +134 -0
  339. package/fesm2020/zip.mjs.map +1 -0
  340. package/footer-toolbar/footer-toolbar.component.d.ts +4 -1
  341. package/footer-toolbar/footer-toolbar.module.d.ts +8 -0
  342. package/footer-toolbar/footerToolbar.d.ts +1 -0
  343. package/footer-toolbar/package.json +5 -6
  344. package/footer-toolbar/style/index.less +1 -0
  345. package/full-content/full-content-toggle.directive.d.ts +3 -0
  346. package/full-content/full-content.component.d.ts +6 -3
  347. package/full-content/full-content.module.d.ts +7 -0
  348. package/full-content/full-content.service.d.ts +3 -0
  349. package/full-content/fullContent.d.ts +1 -0
  350. package/full-content/package.json +5 -6
  351. package/full-content/style/index.less +1 -0
  352. package/global-footer/global-footer-item.component.d.ts +5 -2
  353. package/global-footer/global-footer.component.d.ts +3 -0
  354. package/global-footer/global-footer.module.d.ts +8 -0
  355. package/global-footer/globalFooter.d.ts +1 -0
  356. package/global-footer/package.json +5 -6
  357. package/global-footer/style/index.less +5 -0
  358. package/image/image.d.ts +1 -0
  359. package/image/image.directive.d.ts +4 -1
  360. package/image/image.module.d.ts +7 -0
  361. package/image/package.json +5 -6
  362. package/let/let.d.ts +1 -0
  363. package/let/let.directive.d.ts +3 -0
  364. package/let/let.module.d.ts +5 -0
  365. package/let/package.json +5 -6
  366. package/loading/loading.component.d.ts +3 -0
  367. package/loading/loading.d.ts +1 -0
  368. package/loading/loading.module.d.ts +10 -0
  369. package/loading/loading.service.d.ts +4 -1
  370. package/loading/package.json +5 -6
  371. package/loading/style/index.less +3 -0
  372. package/lodop/lodop.d.ts +1 -0
  373. package/lodop/lodop.module.d.ts +4 -0
  374. package/lodop/lodop.service.d.ts +3 -0
  375. package/lodop/lodop.types.d.ts +4 -0
  376. package/lodop/package.json +5 -6
  377. package/media/media.component.d.ts +4 -1
  378. package/media/media.d.ts +1 -0
  379. package/media/media.module.d.ts +6 -0
  380. package/media/media.service.d.ts +3 -0
  381. package/media/package.json +5 -6
  382. package/notice-icon/notice-icon-tab.component.d.ts +3 -0
  383. package/notice-icon/notice-icon.component.d.ts +4 -1
  384. package/notice-icon/notice-icon.module.d.ts +16 -0
  385. package/notice-icon/noticeIcon.d.ts +1 -0
  386. package/notice-icon/package.json +5 -6
  387. package/notice-icon/style/index.less +17 -0
  388. package/onboarding/onboarding.component.d.ts +4 -1
  389. package/onboarding/onboarding.d.ts +1 -0
  390. package/onboarding/onboarding.module.d.ts +11 -0
  391. package/onboarding/onboarding.service.d.ts +3 -0
  392. package/onboarding/package.json +5 -6
  393. package/onboarding/schema.json +1 -1
  394. package/onboarding/style/index.less +6 -0
  395. package/package.json +274 -14
  396. package/page-header/package.json +5 -6
  397. package/page-header/page-header.component.d.ts +4 -1
  398. package/page-header/page-header.module.d.ts +11 -0
  399. package/page-header/pageHeader.d.ts +1 -0
  400. package/page-header/style/index.less +10 -0
  401. package/page-header/style/rtl.less +3 -0
  402. package/pdf/package.json +5 -6
  403. package/pdf/pdf.component.d.ts +5 -2
  404. package/pdf/pdf.d.ts +1 -0
  405. package/pdf/pdf.module.d.ts +7 -0
  406. package/qr/package.json +5 -6
  407. package/qr/qr.component.d.ts +13 -10
  408. package/qr/qr.d.ts +1 -0
  409. package/qr/qr.module.d.ts +6 -0
  410. package/quick-menu/package.json +5 -6
  411. package/quick-menu/quick-menu.component.d.ts +6 -3
  412. package/quick-menu/quick-menu.module.d.ts +8 -0
  413. package/quick-menu/quickMenu.d.ts +1 -0
  414. package/quick-menu/style/index.less +2 -0
  415. package/result/package.json +5 -6
  416. package/result/result.component.d.ts +6 -3
  417. package/result/result.d.ts +1 -0
  418. package/result/result.module.d.ts +8 -0
  419. package/result/style/index.less +7 -0
  420. package/reuse-tab/package.json +5 -6
  421. package/reuse-tab/reuse-tab-context-menu.component.d.ts +3 -0
  422. package/reuse-tab/reuse-tab-context.component.d.ts +4 -1
  423. package/reuse-tab/reuse-tab-context.directive.d.ts +3 -0
  424. package/reuse-tab/reuse-tab-context.service.d.ts +4 -1
  425. package/reuse-tab/reuse-tab.component.d.ts +14 -11
  426. package/reuse-tab/reuse-tab.module.d.ts +15 -0
  427. package/reuse-tab/reuse-tab.service.d.ts +7 -4
  428. package/reuse-tab/reuseTab.d.ts +1 -0
  429. package/reuse-tab/style/index.less +4 -0
  430. package/se/edit.d.ts +1 -0
  431. package/se/package.json +5 -6
  432. package/se/public_api.d.ts +0 -1
  433. package/se/se-container.component.d.ts +18 -4
  434. package/se/se.component.d.ts +13 -8
  435. package/se/se.module.d.ts +10 -0
  436. package/se/style/index.less +2 -0
  437. package/sg/grid.d.ts +1 -0
  438. package/sg/package.json +5 -6
  439. package/sg/sg-container.component.d.ts +4 -1
  440. package/sg/sg.component.d.ts +4 -1
  441. package/sg/sg.module.d.ts +7 -0
  442. package/st/package.json +5 -6
  443. package/st/st-column-source.d.ts +4 -1
  444. package/st/st-data-source.d.ts +3 -0
  445. package/st/st-export.d.ts +3 -0
  446. package/st/st-filter.component.d.ts +21 -0
  447. package/st/st-row.directive.d.ts +7 -2
  448. package/st/st-widget-host.directive.d.ts +5 -3
  449. package/st/st-widget.d.ts +3 -0
  450. package/st/st.component.d.ts +44 -31
  451. package/st/st.interfaces.d.ts +59 -5
  452. package/st/st.module.d.ts +27 -0
  453. package/st/st.types.d.ts +6 -0
  454. package/st/style/index.less +16 -0
  455. package/st/table.d.ts +1 -1
  456. package/sv/package.json +5 -6
  457. package/sv/public_api.d.ts +0 -1
  458. package/sv/style/index.less +9 -0
  459. package/sv/sv-container.component.d.ts +16 -3
  460. package/sv/sv-value.component.d.ts +3 -0
  461. package/sv/sv.component.d.ts +13 -10
  462. package/sv/sv.module.d.ts +12 -0
  463. package/sv/view.d.ts +1 -0
  464. package/tag-select/package.json +5 -6
  465. package/tag-select/style/index.less +4 -0
  466. package/tag-select/style/rtl.less +3 -0
  467. package/tag-select/tag-select.component.d.ts +3 -0
  468. package/tag-select/tag-select.module.d.ts +8 -0
  469. package/tag-select/tagSelect.d.ts +1 -0
  470. package/xlsx/package.json +5 -6
  471. package/xlsx/xlsx.d.ts +1 -0
  472. package/xlsx/xlsx.directive.d.ts +3 -0
  473. package/xlsx/xlsx.module.d.ts +6 -0
  474. package/xlsx/xlsx.service.d.ts +3 -0
  475. package/zip/package.json +5 -6
  476. package/zip/zip.d.ts +1 -0
  477. package/zip/zip.module.d.ts +5 -0
  478. package/zip/zip.service.d.ts +3 -0
  479. package/abc.metadata.json +0 -1
  480. package/auto-focus/autoFocus.metadata.json +0 -1
  481. package/avatar-list/avatarList.metadata.json +0 -1
  482. package/bundles/abc.umd.js +0 -19
  483. package/bundles/abc.umd.js.map +0 -1
  484. package/bundles/autoFocus.umd.js +0 -394
  485. package/bundles/autoFocus.umd.js.map +0 -1
  486. package/bundles/avatarList.umd.js +0 -465
  487. package/bundles/avatarList.umd.js.map +0 -1
  488. package/bundles/count-down.umd.js +0 -75
  489. package/bundles/count-down.umd.js.map +0 -1
  490. package/bundles/datePicker.umd.js +0 -552
  491. package/bundles/datePicker.umd.js.map +0 -1
  492. package/bundles/downFile.umd.js +0 -474
  493. package/bundles/downFile.umd.js.map +0 -1
  494. package/bundles/edit.umd.js +0 -776
  495. package/bundles/edit.umd.js.map +0 -1
  496. package/bundles/ellipsis.umd.js +0 -578
  497. package/bundles/ellipsis.umd.js.map +0 -1
  498. package/bundles/errorCollect.umd.js +0 -461
  499. package/bundles/errorCollect.umd.js.map +0 -1
  500. package/bundles/exception.umd.js +0 -147
  501. package/bundles/exception.umd.js.map +0 -1
  502. package/bundles/footerToolbar.umd.js +0 -401
  503. package/bundles/footerToolbar.umd.js.map +0 -1
  504. package/bundles/fullContent.umd.js +0 -550
  505. package/bundles/fullContent.umd.js.map +0 -1
  506. package/bundles/globalFooter.umd.js +0 -455
  507. package/bundles/globalFooter.umd.js.map +0 -1
  508. package/bundles/grid.umd.js +0 -470
  509. package/bundles/grid.umd.js.map +0 -1
  510. package/bundles/image.umd.js +0 -482
  511. package/bundles/image.umd.js.map +0 -1
  512. package/bundles/let.umd.js +0 -76
  513. package/bundles/let.umd.js.map +0 -1
  514. package/bundles/loading.umd.js +0 -181
  515. package/bundles/loading.umd.js.map +0 -1
  516. package/bundles/lodop.umd.js +0 -605
  517. package/bundles/lodop.umd.js.map +0 -1
  518. package/bundles/media.umd.js +0 -536
  519. package/bundles/media.umd.js.map +0 -1
  520. package/bundles/noticeIcon.umd.js +0 -468
  521. package/bundles/noticeIcon.umd.js.map +0 -1
  522. package/bundles/onboarding.umd.js +0 -370
  523. package/bundles/onboarding.umd.js.map +0 -1
  524. package/bundles/pageHeader.umd.js +0 -570
  525. package/bundles/pageHeader.umd.js.map +0 -1
  526. package/bundles/pdf.umd.js +0 -863
  527. package/bundles/pdf.umd.js.map +0 -1
  528. package/bundles/qr.umd.js +0 -491
  529. package/bundles/qr.umd.js.map +0 -1
  530. package/bundles/quickMenu.umd.js +0 -442
  531. package/bundles/quickMenu.umd.js.map +0 -1
  532. package/bundles/result.umd.js +0 -100
  533. package/bundles/result.umd.js.map +0 -1
  534. package/bundles/reuseTab.umd.js +0 -1531
  535. package/bundles/reuseTab.umd.js.map +0 -1
  536. package/bundles/table.umd.js +0 -2489
  537. package/bundles/table.umd.js.map +0 -1
  538. package/bundles/tagSelect.umd.js +0 -419
  539. package/bundles/tagSelect.umd.js.map +0 -1
  540. package/bundles/view.umd.js +0 -592
  541. package/bundles/view.umd.js.map +0 -1
  542. package/bundles/xlsx.umd.js +0 -529
  543. package/bundles/xlsx.umd.js.map +0 -1
  544. package/bundles/zip.umd.js +0 -482
  545. package/bundles/zip.umd.js.map +0 -1
  546. package/count-down/count-down.metadata.json +0 -1
  547. package/date-picker/datePicker.metadata.json +0 -1
  548. package/down-file/downFile.metadata.json +0 -1
  549. package/ellipsis/ellipsis.metadata.json +0 -1
  550. package/error-collect/errorCollect.metadata.json +0 -1
  551. package/esm2015/auto-focus/auto-focus.directive.js +0 -42
  552. package/esm2015/auto-focus/auto-focus.module.js +0 -12
  553. package/esm2015/avatar-list/avatar-list-item.component.js +0 -20
  554. package/esm2015/avatar-list/avatar-list.component.js +0 -89
  555. package/esm2015/avatar-list/avatar-list.module.js +0 -17
  556. package/esm2015/count-down/count-down.component.js +0 -36
  557. package/esm2015/count-down/count-down.module.js +0 -15
  558. package/esm2015/date-picker/date-picker.module.js +0 -17
  559. package/esm2015/date-picker/datePicker.js +0 -6
  560. package/esm2015/date-picker/range-shortcut.component.js +0 -26
  561. package/esm2015/date-picker/range.directive.js +0 -171
  562. package/esm2015/down-file/down-file.directive.js +0 -103
  563. package/esm2015/down-file/down-file.module.js +0 -15
  564. package/esm2015/ellipsis/ellipsis.component.js +0 -224
  565. package/esm2015/ellipsis/ellipsis.module.js +0 -16
  566. package/esm2015/error-collect/error-collect.component.js +0 -112
  567. package/esm2015/error-collect/error-collect.module.js +0 -15
  568. package/esm2015/exception/exception.component.js +0 -100
  569. package/esm2015/exception/exception.module.js +0 -17
  570. package/esm2015/footer-toolbar/footer-toolbar.component.js +0 -46
  571. package/esm2015/footer-toolbar/footer-toolbar.module.js +0 -16
  572. package/esm2015/full-content/full-content-toggle.directive.js +0 -23
  573. package/esm2015/full-content/full-content.component.js +0 -135
  574. package/esm2015/full-content/full-content.module.js +0 -15
  575. package/esm2015/full-content/full-content.service.js +0 -21
  576. package/esm2015/global-footer/global-footer-item.component.js +0 -24
  577. package/esm2015/global-footer/global-footer.component.js +0 -77
  578. package/esm2015/global-footer/global-footer.module.js +0 -16
  579. package/esm2015/image/image.directive.js +0 -133
  580. package/esm2015/image/image.module.js +0 -15
  581. package/esm2015/let/let.directive.js +0 -31
  582. package/esm2015/let/let.module.js +0 -12
  583. package/esm2015/loading/loading.component.js +0 -26
  584. package/esm2015/loading/loading.module.js +0 -19
  585. package/esm2015/loading/loading.service.js +0 -92
  586. package/esm2015/lodop/lodop.module.js +0 -7
  587. package/esm2015/lodop/lodop.service.js +0 -219
  588. package/esm2015/lodop/lodop.types.js +0 -2
  589. package/esm2015/media/media.component.js +0 -104
  590. package/esm2015/media/media.module.js +0 -14
  591. package/esm2015/media/media.service.js +0 -53
  592. package/esm2015/notice-icon/notice-icon-tab.component.js +0 -30
  593. package/esm2015/notice-icon/notice-icon.component.js +0 -74
  594. package/esm2015/notice-icon/notice-icon.module.js +0 -35
  595. package/esm2015/onboarding/onboarding.component.js +0 -130
  596. package/esm2015/onboarding/onboarding.module.js +0 -20
  597. package/esm2015/onboarding/onboarding.service.js +0 -178
  598. package/esm2015/page-header/page-header.component.js +0 -216
  599. package/esm2015/page-header/page-header.module.js +0 -19
  600. package/esm2015/pdf/pdf.component.js +0 -433
  601. package/esm2015/pdf/pdf.module.js +0 -15
  602. package/esm2015/qr/qr.component.js +0 -128
  603. package/esm2015/qr/qr.module.js +0 -14
  604. package/esm2015/quick-menu/quick-menu.component.js +0 -90
  605. package/esm2015/quick-menu/quick-menu.module.js +0 -16
  606. package/esm2015/result/result.component.js +0 -62
  607. package/esm2015/result/result.module.js +0 -16
  608. package/esm2015/reuse-tab/reuse-tab-context-menu.component.js +0 -74
  609. package/esm2015/reuse-tab/reuse-tab-context.component.js +0 -32
  610. package/esm2015/reuse-tab/reuse-tab-context.directive.js +0 -33
  611. package/esm2015/reuse-tab/reuse-tab-context.service.js +0 -62
  612. package/esm2015/reuse-tab/reuse-tab.component.js +0 -300
  613. package/esm2015/reuse-tab/reuse-tab.module.js +0 -24
  614. package/esm2015/reuse-tab/reuse-tab.service.js +0 -534
  615. package/esm2015/se/public_api.js +0 -6
  616. package/esm2015/se/se-container.component.js +0 -115
  617. package/esm2015/se/se-title.component.js +0 -40
  618. package/esm2015/se/se.component.js +0 -214
  619. package/esm2015/se/se.module.js +0 -19
  620. package/esm2015/sg/sg-container.component.js +0 -49
  621. package/esm2015/sg/sg.component.js +0 -65
  622. package/esm2015/sg/sg.module.js +0 -15
  623. package/esm2015/st/st-column-source.js +0 -410
  624. package/esm2015/st/st-data-source.js +0 -429
  625. package/esm2015/st/st-export.js +0 -90
  626. package/esm2015/st/st-row.directive.js +0 -40
  627. package/esm2015/st/st-widget-host.directive.js +0 -34
  628. package/esm2015/st/st-widget.js +0 -24
  629. package/esm2015/st/st.component.js +0 -874
  630. package/esm2015/st/st.interfaces.js +0 -2
  631. package/esm2015/st/st.module.js +0 -50
  632. package/esm2015/st/st.types.js +0 -2
  633. package/esm2015/st/table.js +0 -6
  634. package/esm2015/sv/public_api.js +0 -6
  635. package/esm2015/sv/sv-container.component.js +0 -63
  636. package/esm2015/sv/sv-title.component.js +0 -40
  637. package/esm2015/sv/sv-value.component.js +0 -32
  638. package/esm2015/sv/sv.component.js +0 -105
  639. package/esm2015/sv/sv.module.js +0 -21
  640. package/esm2015/tag-select/tag-select.component.js +0 -70
  641. package/esm2015/tag-select/tag-select.module.js +0 -16
  642. package/esm2015/xlsx/xlsx.directive.js +0 -26
  643. package/esm2015/xlsx/xlsx.module.js +0 -14
  644. package/esm2015/xlsx/xlsx.service.js +0 -129
  645. package/esm2015/zip/zip.module.js +0 -10
  646. package/esm2015/zip/zip.service.js +0 -115
  647. package/exception/exception.metadata.json +0 -1
  648. package/fesm2015/abc.js.map +0 -1
  649. package/fesm2015/autoFocus.js +0 -59
  650. package/fesm2015/autoFocus.js.map +0 -1
  651. package/fesm2015/avatarList.js +0 -128
  652. package/fesm2015/avatarList.js.map +0 -1
  653. package/fesm2015/count-down.js +0 -56
  654. package/fesm2015/count-down.js.map +0 -1
  655. package/fesm2015/datePicker.js.map +0 -1
  656. package/fesm2015/downFile.js +0 -122
  657. package/fesm2015/downFile.js.map +0 -1
  658. package/fesm2015/edit.js +0 -396
  659. package/fesm2015/edit.js.map +0 -1
  660. package/fesm2015/ellipsis.js +0 -244
  661. package/fesm2015/ellipsis.js.map +0 -1
  662. package/fesm2015/errorCollect.js +0 -131
  663. package/fesm2015/errorCollect.js.map +0 -1
  664. package/fesm2015/exception.js +0 -121
  665. package/fesm2015/exception.js.map +0 -1
  666. package/fesm2015/footerToolbar.js +0 -66
  667. package/fesm2015/footerToolbar.js.map +0 -1
  668. package/fesm2015/fullContent.js +0 -191
  669. package/fesm2015/fullContent.js.map +0 -1
  670. package/fesm2015/globalFooter.js +0 -118
  671. package/fesm2015/globalFooter.js.map +0 -1
  672. package/fesm2015/grid.js +0 -129
  673. package/fesm2015/grid.js.map +0 -1
  674. package/fesm2015/image.js +0 -152
  675. package/fesm2015/image.js.map +0 -1
  676. package/fesm2015/let.js +0 -48
  677. package/fesm2015/let.js.map +0 -1
  678. package/fesm2015/loading.js +0 -138
  679. package/fesm2015/loading.js.map +0 -1
  680. package/fesm2015/lodop.js.map +0 -1
  681. package/fesm2015/media.js +0 -174
  682. package/fesm2015/media.js.map +0 -1
  683. package/fesm2015/noticeIcon.js +0 -141
  684. package/fesm2015/noticeIcon.js.map +0 -1
  685. package/fesm2015/onboarding.js +0 -328
  686. package/fesm2015/onboarding.js.map +0 -1
  687. package/fesm2015/pageHeader.js +0 -239
  688. package/fesm2015/pageHeader.js.map +0 -1
  689. package/fesm2015/pdf.js.map +0 -1
  690. package/fesm2015/qr.js +0 -159
  691. package/fesm2015/qr.js.map +0 -1
  692. package/fesm2015/quickMenu.js +0 -111
  693. package/fesm2015/quickMenu.js.map +0 -1
  694. package/fesm2015/result.js +0 -83
  695. package/fesm2015/result.js.map +0 -1
  696. package/fesm2015/reuseTab.js.map +0 -1
  697. package/fesm2015/table.js +0 -2002
  698. package/fesm2015/table.js.map +0 -1
  699. package/fesm2015/tagSelect.js +0 -90
  700. package/fesm2015/tagSelect.js.map +0 -1
  701. package/fesm2015/view.js +0 -256
  702. package/fesm2015/view.js.map +0 -1
  703. package/fesm2015/xlsx.js.map +0 -1
  704. package/fesm2015/zip.js.map +0 -1
  705. package/footer-toolbar/footerToolbar.metadata.json +0 -1
  706. package/full-content/fullContent.metadata.json +0 -1
  707. package/global-footer/globalFooter.metadata.json +0 -1
  708. package/image/image.metadata.json +0 -1
  709. package/let/let.metadata.json +0 -1
  710. package/loading/loading.metadata.json +0 -1
  711. package/lodop/lodop.metadata.json +0 -1
  712. package/media/media.metadata.json +0 -1
  713. package/notice-icon/noticeIcon.metadata.json +0 -1
  714. package/onboarding/onboarding.metadata.json +0 -1
  715. package/page-header/pageHeader.metadata.json +0 -1
  716. package/pdf/pdf.metadata.json +0 -1
  717. package/qr/qr.metadata.json +0 -1
  718. package/quick-menu/quickMenu.metadata.json +0 -1
  719. package/result/result.metadata.json +0 -1
  720. package/reuse-tab/reuseTab.metadata.json +0 -1
  721. package/se/edit.metadata.json +0 -1
  722. package/se/se-title.component.d.ts +0 -10
  723. package/sg/grid.metadata.json +0 -1
  724. package/st/table.metadata.json +0 -1
  725. package/sv/sv-title.component.d.ts +0 -10
  726. package/sv/view.metadata.json +0 -1
  727. package/tag-select/tagSelect.metadata.json +0 -1
  728. package/xlsx/xlsx.metadata.json +0 -1
  729. package/zip/zip.metadata.json +0 -1
@@ -1,2489 +0,0 @@
1
- /**
2
- * @license ng-alain(cipchk@qq.com) v12.3.0
3
- * (c) 2020 cipchk https://ng-alain.com/
4
- * License: MIT
5
- */
6
- (function (global, factory) {
7
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser'), require('@delon/acl'), require('@delon/theme'), require('@delon/util/other'), require('@angular/common'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@delon/util/format'), require('@delon/abc/xlsx'), require('@angular/router'), require('@delon/util/config'), require('@delon/util/decorator'), require('ng-zorro-antd/dropdown'), require('@angular/forms'), require('@delon/abc/let'), require('ng-zorro-antd/badge'), require('ng-zorro-antd/checkbox'), require('ng-zorro-antd/divider'), require('ng-zorro-antd/icon'), require('ng-zorro-antd/input'), require('ng-zorro-antd/menu'), require('ng-zorro-antd/popconfirm'), require('ng-zorro-antd/radio'), require('ng-zorro-antd/resizable'), require('ng-zorro-antd/table'), require('ng-zorro-antd/tag'), require('ng-zorro-antd/tooltip')) :
8
- typeof define === 'function' && define.amd ? define('@delon/abc/st', ['exports', '@angular/core', '@angular/platform-browser', '@delon/acl', '@delon/theme', '@delon/util/other', '@angular/common', '@angular/common/http', 'rxjs', 'rxjs/operators', '@delon/util/format', '@delon/abc/xlsx', '@angular/router', '@delon/util/config', '@delon/util/decorator', 'ng-zorro-antd/dropdown', '@angular/forms', '@delon/abc/let', 'ng-zorro-antd/badge', 'ng-zorro-antd/checkbox', 'ng-zorro-antd/divider', 'ng-zorro-antd/icon', 'ng-zorro-antd/input', 'ng-zorro-antd/menu', 'ng-zorro-antd/popconfirm', 'ng-zorro-antd/radio', 'ng-zorro-antd/resizable', 'ng-zorro-antd/table', 'ng-zorro-antd/tag', 'ng-zorro-antd/tooltip'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.delon = global.delon || {}, global.delon.abc = global.delon.abc || {}, global.delon.abc.st = {}), global.ng.core, global.ng.platformBrowser, global.delon.acl, global.delon.theme, global.other, global.ng.common, global.ng.common.http, global.rxjs, global.rxjs.operators, global.format, global.delon.abc.xlsx, global.ng.router, global.config, global.decorator, global["ng-zorro-antd/dropdown"], global.ng.forms, global.delon.abc["let"], global["ng-zorro-antd/badge"], global["ng-zorro-antd/checkbox"], global["ng-zorro-antd/divider"], global["ng-zorro-antd/icon"], global["ng-zorro-antd/input"], global["ng-zorro-antd/menu"], global["ng-zorro-antd/popconfirm"], global["ng-zorro-antd/radio"], global.resizable, global["ng-zorro-antd/table"], global["ng-zorro-antd/tag"], global["ng-zorro-antd/tooltip"]));
10
- })(this, (function (exports, i0, platformBrowser, acl, theme, other, common, http, rxjs, operators, format, xlsx, router, config, decorator, dropdown, forms, _let, badge, checkbox, divider, icon, input, menu, popconfirm, radio, resizable, table, tag, tooltip) { 'use strict';
11
-
12
- function _interopNamespace(e) {
13
- if (e && e.__esModule) return e;
14
- var n = Object.create(null);
15
- if (e) {
16
- Object.keys(e).forEach(function (k) {
17
- if (k !== 'default') {
18
- var d = Object.getOwnPropertyDescriptor(e, k);
19
- Object.defineProperty(n, k, d.get ? d : {
20
- enumerable: true,
21
- get: function () { return e[k]; }
22
- });
23
- }
24
- });
25
- }
26
- n["default"] = e;
27
- return Object.freeze(n);
28
- }
29
-
30
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
31
-
32
- /*! *****************************************************************************
33
- Copyright (c) Microsoft Corporation.
34
-
35
- Permission to use, copy, modify, and/or distribute this software for any
36
- purpose with or without fee is hereby granted.
37
-
38
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
39
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
40
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
41
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
42
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
- PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
46
- /* global Reflect, Promise */
47
- var extendStatics = function (d, b) {
48
- extendStatics = Object.setPrototypeOf ||
49
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50
- function (d, b) { for (var p in b)
51
- if (Object.prototype.hasOwnProperty.call(b, p))
52
- d[p] = b[p]; };
53
- return extendStatics(d, b);
54
- };
55
- function __extends(d, b) {
56
- if (typeof b !== "function" && b !== null)
57
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
58
- extendStatics(d, b);
59
- function __() { this.constructor = d; }
60
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
61
- }
62
- var __assign = function () {
63
- __assign = Object.assign || function __assign(t) {
64
- for (var s, i = 1, n = arguments.length; i < n; i++) {
65
- s = arguments[i];
66
- for (var p in s)
67
- if (Object.prototype.hasOwnProperty.call(s, p))
68
- t[p] = s[p];
69
- }
70
- return t;
71
- };
72
- return __assign.apply(this, arguments);
73
- };
74
- function __rest(s, e) {
75
- var t = {};
76
- for (var p in s)
77
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
78
- t[p] = s[p];
79
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
80
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
81
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
82
- t[p[i]] = s[p[i]];
83
- }
84
- return t;
85
- }
86
- function __decorate(decorators, target, key, desc) {
87
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
88
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
89
- r = Reflect.decorate(decorators, target, key, desc);
90
- else
91
- for (var i = decorators.length - 1; i >= 0; i--)
92
- if (d = decorators[i])
93
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
94
- return c > 3 && r && Object.defineProperty(target, key, r), r;
95
- }
96
- function __param(paramIndex, decorator) {
97
- return function (target, key) { decorator(target, key, paramIndex); };
98
- }
99
- function __metadata(metadataKey, metadataValue) {
100
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
101
- return Reflect.metadata(metadataKey, metadataValue);
102
- }
103
- function __awaiter(thisArg, _arguments, P, generator) {
104
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
105
- return new (P || (P = Promise))(function (resolve, reject) {
106
- function fulfilled(value) { try {
107
- step(generator.next(value));
108
- }
109
- catch (e) {
110
- reject(e);
111
- } }
112
- function rejected(value) { try {
113
- step(generator["throw"](value));
114
- }
115
- catch (e) {
116
- reject(e);
117
- } }
118
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
119
- step((generator = generator.apply(thisArg, _arguments || [])).next());
120
- });
121
- }
122
- function __generator(thisArg, body) {
123
- var _ = { label: 0, sent: function () { if (t[0] & 1)
124
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
125
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
126
- function verb(n) { return function (v) { return step([n, v]); }; }
127
- function step(op) {
128
- if (f)
129
- throw new TypeError("Generator is already executing.");
130
- while (_)
131
- try {
132
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
133
- return t;
134
- if (y = 0, t)
135
- op = [op[0] & 2, t.value];
136
- switch (op[0]) {
137
- case 0:
138
- case 1:
139
- t = op;
140
- break;
141
- case 4:
142
- _.label++;
143
- return { value: op[1], done: false };
144
- case 5:
145
- _.label++;
146
- y = op[1];
147
- op = [0];
148
- continue;
149
- case 7:
150
- op = _.ops.pop();
151
- _.trys.pop();
152
- continue;
153
- default:
154
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
155
- _ = 0;
156
- continue;
157
- }
158
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
159
- _.label = op[1];
160
- break;
161
- }
162
- if (op[0] === 6 && _.label < t[1]) {
163
- _.label = t[1];
164
- t = op;
165
- break;
166
- }
167
- if (t && _.label < t[2]) {
168
- _.label = t[2];
169
- _.ops.push(op);
170
- break;
171
- }
172
- if (t[2])
173
- _.ops.pop();
174
- _.trys.pop();
175
- continue;
176
- }
177
- op = body.call(thisArg, _);
178
- }
179
- catch (e) {
180
- op = [6, e];
181
- y = 0;
182
- }
183
- finally {
184
- f = t = 0;
185
- }
186
- if (op[0] & 5)
187
- throw op[1];
188
- return { value: op[0] ? op[1] : void 0, done: true };
189
- }
190
- }
191
- var __createBinding = Object.create ? (function (o, m, k, k2) {
192
- if (k2 === undefined)
193
- k2 = k;
194
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
195
- }) : (function (o, m, k, k2) {
196
- if (k2 === undefined)
197
- k2 = k;
198
- o[k2] = m[k];
199
- });
200
- function __exportStar(m, o) {
201
- for (var p in m)
202
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
203
- __createBinding(o, m, p);
204
- }
205
- function __values(o) {
206
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
207
- if (m)
208
- return m.call(o);
209
- if (o && typeof o.length === "number")
210
- return {
211
- next: function () {
212
- if (o && i >= o.length)
213
- o = void 0;
214
- return { value: o && o[i++], done: !o };
215
- }
216
- };
217
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
218
- }
219
- function __read(o, n) {
220
- var m = typeof Symbol === "function" && o[Symbol.iterator];
221
- if (!m)
222
- return o;
223
- var i = m.call(o), r, ar = [], e;
224
- try {
225
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
226
- ar.push(r.value);
227
- }
228
- catch (error) {
229
- e = { error: error };
230
- }
231
- finally {
232
- try {
233
- if (r && !r.done && (m = i["return"]))
234
- m.call(i);
235
- }
236
- finally {
237
- if (e)
238
- throw e.error;
239
- }
240
- }
241
- return ar;
242
- }
243
- /** @deprecated */
244
- function __spread() {
245
- for (var ar = [], i = 0; i < arguments.length; i++)
246
- ar = ar.concat(__read(arguments[i]));
247
- return ar;
248
- }
249
- /** @deprecated */
250
- function __spreadArrays() {
251
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
252
- s += arguments[i].length;
253
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
254
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
255
- r[k] = a[j];
256
- return r;
257
- }
258
- function __spreadArray(to, from, pack) {
259
- if (pack || arguments.length === 2)
260
- for (var i = 0, l = from.length, ar; i < l; i++) {
261
- if (ar || !(i in from)) {
262
- if (!ar)
263
- ar = Array.prototype.slice.call(from, 0, i);
264
- ar[i] = from[i];
265
- }
266
- }
267
- return to.concat(ar || Array.prototype.slice.call(from));
268
- }
269
- function __await(v) {
270
- return this instanceof __await ? (this.v = v, this) : new __await(v);
271
- }
272
- function __asyncGenerator(thisArg, _arguments, generator) {
273
- if (!Symbol.asyncIterator)
274
- throw new TypeError("Symbol.asyncIterator is not defined.");
275
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
276
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
277
- function verb(n) { if (g[n])
278
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
279
- function resume(n, v) { try {
280
- step(g[n](v));
281
- }
282
- catch (e) {
283
- settle(q[0][3], e);
284
- } }
285
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
286
- function fulfill(value) { resume("next", value); }
287
- function reject(value) { resume("throw", value); }
288
- function settle(f, v) { if (f(v), q.shift(), q.length)
289
- resume(q[0][0], q[0][1]); }
290
- }
291
- function __asyncDelegator(o) {
292
- var i, p;
293
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
294
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
295
- }
296
- function __asyncValues(o) {
297
- if (!Symbol.asyncIterator)
298
- throw new TypeError("Symbol.asyncIterator is not defined.");
299
- var m = o[Symbol.asyncIterator], i;
300
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
301
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
302
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
303
- }
304
- function __makeTemplateObject(cooked, raw) {
305
- if (Object.defineProperty) {
306
- Object.defineProperty(cooked, "raw", { value: raw });
307
- }
308
- else {
309
- cooked.raw = raw;
310
- }
311
- return cooked;
312
- }
313
- ;
314
- var __setModuleDefault = Object.create ? (function (o, v) {
315
- Object.defineProperty(o, "default", { enumerable: true, value: v });
316
- }) : function (o, v) {
317
- o["default"] = v;
318
- };
319
- function __importStar(mod) {
320
- if (mod && mod.__esModule)
321
- return mod;
322
- var result = {};
323
- if (mod != null)
324
- for (var k in mod)
325
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
326
- __createBinding(result, mod, k);
327
- __setModuleDefault(result, mod);
328
- return result;
329
- }
330
- function __importDefault(mod) {
331
- return (mod && mod.__esModule) ? mod : { default: mod };
332
- }
333
- function __classPrivateFieldGet(receiver, state, kind, f) {
334
- if (kind === "a" && !f)
335
- throw new TypeError("Private accessor was defined without a getter");
336
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
337
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
338
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
339
- }
340
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
341
- if (kind === "m")
342
- throw new TypeError("Private method is not writable");
343
- if (kind === "a" && !f)
344
- throw new TypeError("Private accessor was defined without a setter");
345
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
346
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
347
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
348
- }
349
-
350
- var STRowSource = /** @class */ (function () {
351
- function STRowSource() {
352
- this.titles = {};
353
- this.rows = {};
354
- }
355
- STRowSource.prototype.add = function (type, path, ref) {
356
- this[type === 'title' ? 'titles' : 'rows'][path] = ref;
357
- };
358
- STRowSource.prototype.getTitle = function (path) {
359
- return this.titles[path];
360
- };
361
- STRowSource.prototype.getRow = function (path) {
362
- return this.rows[path];
363
- };
364
- return STRowSource;
365
- }());
366
- STRowSource.decorators = [
367
- { type: i0.Injectable }
368
- ];
369
- var STRowDirective = /** @class */ (function () {
370
- function STRowDirective(ref, source) {
371
- this.ref = ref;
372
- this.source = source;
373
- }
374
- STRowDirective.prototype.ngOnInit = function () {
375
- this.source.add(this.type, this.id, this.ref);
376
- };
377
- return STRowDirective;
378
- }());
379
- STRowDirective.decorators = [
380
- { type: i0.Directive, args: [{ selector: '[st-row]' },] }
381
- ];
382
- STRowDirective.ctorParameters = function () { return [
383
- { type: i0.TemplateRef },
384
- { type: STRowSource, decorators: [{ type: i0.Host }] }
385
- ]; };
386
- STRowDirective.propDecorators = {
387
- id: [{ type: i0.Input, args: ['st-row',] }],
388
- type: [{ type: i0.Input }]
389
- };
390
-
391
- var STWidgetRegistry = /** @class */ (function () {
392
- function STWidgetRegistry() {
393
- this._widgets = {};
394
- }
395
- Object.defineProperty(STWidgetRegistry.prototype, "widgets", {
396
- get: function () {
397
- return this._widgets;
398
- },
399
- enumerable: false,
400
- configurable: true
401
- });
402
- STWidgetRegistry.prototype.register = function (type, widget) {
403
- this._widgets[type] = widget;
404
- };
405
- STWidgetRegistry.prototype.has = function (type) {
406
- return this._widgets.hasOwnProperty(type);
407
- };
408
- STWidgetRegistry.prototype.get = function (type) {
409
- return this._widgets[type];
410
- };
411
- return STWidgetRegistry;
412
- }());
413
- STWidgetRegistry.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function STWidgetRegistry_Factory() { return new STWidgetRegistry(); }, token: STWidgetRegistry, providedIn: "root" });
414
- STWidgetRegistry.decorators = [
415
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
416
- ];
417
-
418
- var STColumnSource = /** @class */ (function () {
419
- function STColumnSource(dom, rowSource, acl, i18nSrv, stWidgetRegistry) {
420
- this.dom = dom;
421
- this.rowSource = rowSource;
422
- this.acl = acl;
423
- this.i18nSrv = i18nSrv;
424
- this.stWidgetRegistry = stWidgetRegistry;
425
- }
426
- STColumnSource.prototype.setCog = function (val) {
427
- this.cog = val;
428
- };
429
- STColumnSource.prototype.fixPop = function (i, def) {
430
- if (i.pop == null || i.pop === false) {
431
- i.pop = false;
432
- return;
433
- }
434
- var pop = Object.assign({}, def);
435
- if (typeof i.pop === 'string') {
436
- pop.title = i.pop;
437
- }
438
- else if (typeof i.pop === 'object') {
439
- pop = Object.assign(Object.assign({}, pop), i.pop);
440
- }
441
- if (typeof pop.condition !== 'function') {
442
- pop.condition = function () { return false; };
443
- }
444
- i.pop = pop;
445
- };
446
- STColumnSource.prototype.btnCoerce = function (list) {
447
- var e_1, _c;
448
- if (!list)
449
- return [];
450
- var ret = [];
451
- var _d = this.cog, modal = _d.modal, drawer = _d.drawer, pop = _d.pop, btnIcon = _d.btnIcon;
452
- try {
453
- for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) {
454
- var item = list_1_1.value;
455
- if (this.acl && item.acl && !this.acl.can(item.acl)) {
456
- continue;
457
- }
458
- if (item.type === 'modal' || item.type === 'static') {
459
- if (item.modal == null || item.modal.component == null) {
460
- console.warn("[st] Should specify modal parameter when type is modal or static");
461
- item.type = 'none';
462
- }
463
- else {
464
- item.modal = Object.assign(Object.assign({ paramsName: 'record', size: 'lg' }, modal), item.modal);
465
- }
466
- }
467
- if (item.type === 'drawer') {
468
- if (item.drawer == null || item.drawer.component == null) {
469
- console.warn("[st] Should specify drawer parameter when type is drawer");
470
- item.type = 'none';
471
- }
472
- else {
473
- item.drawer = Object.assign(Object.assign({ paramsName: 'record', size: 'lg' }, drawer), item.drawer);
474
- }
475
- }
476
- if (item.type === 'del' && typeof item.pop === 'undefined') {
477
- item.pop = true;
478
- }
479
- // pop
480
- this.fixPop(item, pop);
481
- if (item.icon) {
482
- item.icon = Object.assign(Object.assign({}, btnIcon), (typeof item.icon === 'string' ? { type: item.icon } : item.icon));
483
- }
484
- item.children = item.children && item.children.length > 0 ? this.btnCoerce(item.children) : [];
485
- // i18n
486
- if (item.i18n && this.i18nSrv) {
487
- item.text = this.i18nSrv.fanyi(item.i18n);
488
- }
489
- ret.push(item);
490
- }
491
- }
492
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
493
- finally {
494
- try {
495
- if (list_1_1 && !list_1_1.done && (_c = list_1.return)) _c.call(list_1);
496
- }
497
- finally { if (e_1) throw e_1.error; }
498
- }
499
- this.btnCoerceIf(ret);
500
- return ret;
501
- };
502
- STColumnSource.prototype.btnCoerceIf = function (list) {
503
- var e_2, _c;
504
- try {
505
- for (var list_2 = __values(list), list_2_1 = list_2.next(); !list_2_1.done; list_2_1 = list_2.next()) {
506
- var item = list_2_1.value;
507
- if (!item.iif)
508
- item.iif = function () { return true; };
509
- item.iifBehavior = item.iifBehavior || this.cog.iifBehavior;
510
- if (item.children && item.children.length > 0) {
511
- this.btnCoerceIf(item.children);
512
- }
513
- else {
514
- item.children = [];
515
- }
516
- }
517
- }
518
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
519
- finally {
520
- try {
521
- if (list_2_1 && !list_2_1.done && (_c = list_2.return)) _c.call(list_2);
522
- }
523
- finally { if (e_2) throw e_2.error; }
524
- }
525
- };
526
- STColumnSource.prototype.fixedCoerce = function (list) {
527
- var countReduce = function (a, b) { return a + +b.width.toString().replace('px', ''); };
528
- // left width
529
- list
530
- .filter(function (w) { return w.fixed && w.fixed === 'left' && w.width; })
531
- .forEach(function (item, idx) { return (item._left = list.slice(0, idx).reduce(countReduce, 0) + "px"); });
532
- // right width
533
- list
534
- .filter(function (w) { return w.fixed && w.fixed === 'right' && w.width; })
535
- .reverse()
536
- .forEach(function (item, idx) { return (item._right = (idx > 0 ? list.slice(-idx).reduce(countReduce, 0) : 0) + "px"); });
537
- };
538
- STColumnSource.prototype.sortCoerce = function (item) {
539
- var res = this.fixSortCoerce(item);
540
- res.reName = Object.assign(Object.assign({}, this.cog.sortReName), res.reName);
541
- return res;
542
- };
543
- STColumnSource.prototype.fixSortCoerce = function (item) {
544
- if (typeof item.sort === 'undefined') {
545
- return { enabled: false };
546
- }
547
- var res = {};
548
- if (typeof item.sort === 'string') {
549
- res.key = item.sort;
550
- }
551
- else if (typeof item.sort !== 'boolean') {
552
- res = item.sort;
553
- }
554
- else if (typeof item.sort === 'boolean') {
555
- res.compare = function (a, b) { return a[item.indexKey] - b[item.indexKey]; };
556
- }
557
- if (!res.key) {
558
- res.key = item.indexKey;
559
- }
560
- res.enabled = true;
561
- return res;
562
- };
563
- STColumnSource.prototype.filterCoerce = function (item) {
564
- var _this = this;
565
- if (item.filter == null) {
566
- return null;
567
- }
568
- var res = item.filter;
569
- res.type = res.type || 'default';
570
- var icon = 'filter';
571
- var iconTheme = 'fill';
572
- if (res.type === 'keyword') {
573
- if (res.menus == null || res.menus.length === 0) {
574
- res.menus = [{ value: '' }];
575
- }
576
- icon = 'search';
577
- iconTheme = 'outline';
578
- }
579
- if (res.menus.length === 0) {
580
- return null;
581
- }
582
- if (typeof res.multiple === 'undefined') {
583
- res.multiple = true;
584
- }
585
- res.confirmText = res.confirmText || this.cog.filterConfirmText;
586
- res.clearText = res.clearText || this.cog.filterClearText;
587
- res.key = res.key || item.indexKey;
588
- res.icon = res.icon || icon;
589
- var baseIcon = { type: icon, theme: iconTheme };
590
- if (typeof res.icon === 'string') {
591
- res.icon = Object.assign(Object.assign({}, baseIcon), { type: res.icon });
592
- }
593
- else {
594
- res.icon = Object.assign(Object.assign({}, baseIcon), res.icon);
595
- }
596
- this.updateDefault(res);
597
- if (this.acl) {
598
- res.menus = res.menus.filter(function (w) { return _this.acl.can(w.acl); });
599
- }
600
- if (res.menus.length <= 0) {
601
- res = null;
602
- }
603
- return res;
604
- };
605
- STColumnSource.prototype.restoreRender = function (item) {
606
- if (item.renderTitle) {
607
- item.__renderTitle =
608
- typeof item.renderTitle === 'string'
609
- ? this.rowSource.getTitle(item.renderTitle)
610
- : item.renderTitle;
611
- }
612
- if (item.render) {
613
- item.__render =
614
- typeof item.render === 'string' ? this.rowSource.getRow(item.render) : item.render;
615
- }
616
- };
617
- STColumnSource.prototype.widgetCoerce = function (item) {
618
- var _a;
619
- if (item.type !== 'widget')
620
- return;
621
- if (item.widget == null || !this.stWidgetRegistry.has(item.widget.type)) {
622
- delete item.type;
623
- other.warn("st: No widget for type \"" + ((_a = item.widget) === null || _a === void 0 ? void 0 : _a.type) + "\"");
624
- }
625
- };
626
- STColumnSource.prototype.genHeaders = function (rootColumns) {
627
- var rows = [];
628
- var widths = [];
629
- var fillRowCells = function (columns, colIndex, rowIndex) {
630
- if (rowIndex === void 0) { rowIndex = 0; }
631
- // Init rows
632
- rows[rowIndex] = rows[rowIndex] || [];
633
- var currentColIndex = colIndex;
634
- var colSpans = columns.map(function (column) {
635
- var cell = {
636
- column: column,
637
- colStart: currentColIndex,
638
- hasSubColumns: false
639
- };
640
- var colSpan = 1;
641
- var subColumns = column.children;
642
- if (Array.isArray(subColumns) && subColumns.length > 0) {
643
- colSpan = fillRowCells(subColumns, currentColIndex, rowIndex + 1).reduce(function (total, count) { return total + count; }, 0);
644
- cell.hasSubColumns = true;
645
- }
646
- else {
647
- widths.push(cell.column.width || '');
648
- }
649
- if ('colSpan' in column) {
650
- colSpan = column.colSpan;
651
- }
652
- if ('rowSpan' in column) {
653
- cell.rowSpan = column.rowSpan;
654
- }
655
- cell.colSpan = colSpan;
656
- cell.colEnd = cell.colStart + colSpan - 1;
657
- rows[rowIndex].push(cell);
658
- currentColIndex += colSpan;
659
- return colSpan;
660
- });
661
- return colSpans;
662
- };
663
- fillRowCells(rootColumns, 0);
664
- // Handle `rowSpan`
665
- var rowCount = rows.length;
666
- var _loop_1 = function (rowIndex) {
667
- rows[rowIndex].forEach(function (cell) {
668
- if (!('rowSpan' in cell) && !cell.hasSubColumns) {
669
- cell.rowSpan = rowCount - rowIndex;
670
- }
671
- });
672
- };
673
- for (var rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
674
- _loop_1(rowIndex);
675
- }
676
- return { headers: rows, headerWidths: rowCount > 1 ? widths : null };
677
- };
678
- STColumnSource.prototype.cleanCond = function (list) {
679
- var e_3, _c;
680
- var res = [];
681
- var copyList = other.deepCopy(list);
682
- try {
683
- for (var copyList_1 = __values(copyList), copyList_1_1 = copyList_1.next(); !copyList_1_1.done; copyList_1_1 = copyList_1.next()) {
684
- var item = copyList_1_1.value;
685
- if (item.iif && !item.iif(item)) {
686
- continue;
687
- }
688
- if (this.acl && item.acl && !this.acl.can(item.acl)) {
689
- continue;
690
- }
691
- if (Array.isArray(item.children) && item.children.length > 0) {
692
- item.children = this.cleanCond(item.children);
693
- }
694
- res.push(item);
695
- }
696
- }
697
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
698
- finally {
699
- try {
700
- if (copyList_1_1 && !copyList_1_1.done && (_c = copyList_1.return)) _c.call(copyList_1);
701
- }
702
- finally { if (e_3) throw e_3.error; }
703
- }
704
- return res;
705
- };
706
- STColumnSource.prototype.process = function (list, options) {
707
- var _this = this;
708
- if (!list || list.length === 0)
709
- throw new Error("[st]: the columns property muse be define!");
710
- var noIndex = this.cog.noIndex;
711
- var checkboxCount = 0;
712
- var radioCount = 0;
713
- var point = 0;
714
- var columns = [];
715
- var processItem = function (item) {
716
- var _a, _b;
717
- // index
718
- if (item.index) {
719
- if (!Array.isArray(item.index)) {
720
- item.index = item.index.toString().split('.');
721
- }
722
- item.indexKey = item.index.join('.');
723
- }
724
- // #region title
725
- var tit = (typeof item.title === 'string' ? { text: item.title } : item.title) || {};
726
- if (tit.i18n && _this.i18nSrv) {
727
- tit.text = _this.i18nSrv.fanyi(tit.i18n);
728
- }
729
- if (tit.text) {
730
- tit._text = _this.dom.bypassSecurityTrustHtml(tit.text);
731
- }
732
- item.title = tit;
733
- // #endregion
734
- // no
735
- if (item.type === 'no') {
736
- item.noIndex = item.noIndex == null ? noIndex : item.noIndex;
737
- }
738
- // checkbox
739
- if (item.selections == null) {
740
- item.selections = [];
741
- }
742
- if (item.type === 'checkbox') {
743
- ++checkboxCount;
744
- if (!item.width) {
745
- item.width = (item.selections.length > 0 ? 62 : 50) + "px";
746
- }
747
- }
748
- if (_this.acl) {
749
- item.selections = item.selections.filter(function (w) { return _this.acl.can(w.acl); });
750
- }
751
- // radio
752
- if (item.type === 'radio') {
753
- ++radioCount;
754
- item.selections = [];
755
- if (!item.width) {
756
- item.width = '50px';
757
- }
758
- }
759
- // types
760
- if (item.type === 'yn') {
761
- item.yn = Object.assign(Object.assign({ truth: true }, _this.cog.yn), item.yn);
762
- }
763
- // date
764
- if (item.type === 'date') {
765
- item.dateFormat = item.dateFormat || ((_a = _this.cog.date) === null || _a === void 0 ? void 0 : _a.format);
766
- }
767
- if ((item.type === 'link' && typeof item.click !== 'function') ||
768
- (item.type === 'badge' && item.badge == null) ||
769
- (item.type === 'tag' && item.tag == null) ||
770
- (item.type === 'enum' && item.enum == null)) {
771
- item.type = '';
772
- }
773
- item._isTruncate = !!item.width && options.widthMode.strictBehavior === 'truncate' && item.type !== 'img';
774
- // className
775
- if (!item.className) {
776
- item.className = {
777
- number: 'text-right',
778
- currency: 'text-right',
779
- date: 'text-center'
780
- }[item.type];
781
- }
782
- item._className = item.className || (item._isTruncate ? 'text-truncate' : null);
783
- // width
784
- if (typeof item.width === 'number') {
785
- item._width = item.width;
786
- item.width = item.width + "px";
787
- }
788
- item._left = false;
789
- item._right = false;
790
- item.safeType = (_b = item.safeType) !== null && _b !== void 0 ? _b : options.safeType;
791
- // sorter
792
- item._sort = _this.sortCoerce(item);
793
- // filter
794
- item.filter = _this.filterCoerce(item);
795
- // buttons
796
- item.buttons = _this.btnCoerce(item.buttons);
797
- // widget
798
- _this.widgetCoerce(item);
799
- // restore custom row
800
- _this.restoreRender(item);
801
- // resizable
802
- item.resizable = Object.assign(Object.assign({ disabled: true, bounds: 'window', minWidth: 60, maxWidth: 360, preview: true }, options.resizable), (typeof item.resizable === 'boolean' ? { disabled: !item.resizable } : item.resizable));
803
- item.__point = point++;
804
- return item;
805
- };
806
- var processList = function (data) {
807
- var e_4, _c;
808
- try {
809
- for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {
810
- var item = data_1_1.value;
811
- columns.push(processItem(item));
812
- if (Array.isArray(item.children)) {
813
- processList(item.children);
814
- }
815
- }
816
- }
817
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
818
- finally {
819
- try {
820
- if (data_1_1 && !data_1_1.done && (_c = data_1.return)) _c.call(data_1);
821
- }
822
- finally { if (e_4) throw e_4.error; }
823
- }
824
- };
825
- var copyList = this.cleanCond(list);
826
- processList(copyList);
827
- if (checkboxCount > 1) {
828
- throw new Error("[st]: just only one column checkbox");
829
- }
830
- if (radioCount > 1) {
831
- throw new Error("[st]: just only one column radio");
832
- }
833
- this.fixedCoerce(columns);
834
- return Object.assign({ columns: columns.filter(function (w) { return !Array.isArray(w.children) || w.children.length === 0; }) }, this.genHeaders(copyList));
835
- };
836
- STColumnSource.prototype.restoreAllRender = function (columns) {
837
- var _this = this;
838
- columns.forEach(function (i) { return _this.restoreRender(i); });
839
- };
840
- STColumnSource.prototype.updateDefault = function (filter) {
841
- if (filter.type === 'default') {
842
- filter.default = filter.menus.findIndex(function (w) { return w.checked; }) !== -1;
843
- }
844
- else {
845
- filter.default = !!filter.menus[0].value;
846
- }
847
- return this;
848
- };
849
- STColumnSource.prototype.cleanFilter = function (col) {
850
- var f = col.filter;
851
- f.default = false;
852
- if (f.type === 'default') {
853
- f.menus.forEach(function (i) { return (i.checked = false); });
854
- }
855
- else {
856
- f.menus[0].value = undefined;
857
- }
858
- return this;
859
- };
860
- return STColumnSource;
861
- }());
862
- STColumnSource.decorators = [
863
- { type: i0.Injectable }
864
- ];
865
- STColumnSource.ctorParameters = function () { return [
866
- { type: platformBrowser.DomSanitizer },
867
- { type: STRowSource, decorators: [{ type: i0.Host }] },
868
- { type: acl.ACLService, decorators: [{ type: i0.Optional }] },
869
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [theme.ALAIN_I18N_TOKEN,] }] },
870
- { type: STWidgetRegistry }
871
- ]; };
872
-
873
- var STDataSource = /** @class */ (function () {
874
- function STDataSource(http, datePipe, ynPipe, numberPipe, currencySrv, dom) {
875
- this.http = http;
876
- this.datePipe = datePipe;
877
- this.ynPipe = ynPipe;
878
- this.numberPipe = numberPipe;
879
- this.currencySrv = currencySrv;
880
- this.dom = dom;
881
- this.sortTick = 0;
882
- }
883
- STDataSource.prototype.process = function (options) {
884
- var _this = this;
885
- var data$;
886
- var isRemote = false;
887
- var data = options.data, res = options.res, total = options.total, page = options.page, pi = options.pi, ps = options.ps, paginator = options.paginator, columns = options.columns;
888
- var retTotal;
889
- var retPs;
890
- var retList;
891
- var retPi;
892
- var rawData;
893
- var showPage = page.show;
894
- if (typeof data === 'string') {
895
- isRemote = true;
896
- data$ = this.getByRemote(data, options).pipe(operators.map(function (result) {
897
- rawData = result;
898
- var ret;
899
- if (Array.isArray(result)) {
900
- ret = result;
901
- retTotal = ret.length;
902
- retPs = retTotal;
903
- showPage = false;
904
- }
905
- else {
906
- // list
907
- ret = other.deepGet(result, res.reName.list, []);
908
- if (ret == null || !Array.isArray(ret)) {
909
- ret = [];
910
- }
911
- // total
912
- var resultTotal = res.reName.total && other.deepGet(result, res.reName.total, null);
913
- retTotal = resultTotal == null ? total || 0 : +resultTotal;
914
- }
915
- return other.deepCopy(ret);
916
- }));
917
- }
918
- else if (Array.isArray(data)) {
919
- data$ = rxjs.of(data);
920
- }
921
- else {
922
- // a cold observable
923
- data$ = data;
924
- }
925
- if (!isRemote) {
926
- data$ = data$.pipe(
927
- // sort
928
- operators.map(function (result) {
929
- rawData = result;
930
- var copyResult = other.deepCopy(result);
931
- var sorterFn = _this.getSorterFn(columns);
932
- if (sorterFn) {
933
- copyResult = copyResult.sort(sorterFn);
934
- }
935
- return copyResult;
936
- }),
937
- // filter
938
- operators.map(function (result) {
939
- columns
940
- .filter(function (w) { return w.filter; })
941
- .forEach(function (c) {
942
- var filter = c.filter;
943
- var values = _this.getFilteredData(filter);
944
- if (values.length === 0)
945
- return;
946
- var onFilter = filter.fn;
947
- if (typeof onFilter !== 'function') {
948
- console.warn("[st] Muse provide the fn function in filter");
949
- return;
950
- }
951
- result = result.filter(function (record) { return values.some(function (v) { return onFilter(v, record); }); });
952
- });
953
- return result;
954
- }),
955
- // paging
956
- operators.map(function (result) {
957
- if (paginator && page.front) {
958
- var maxPageIndex = Math.ceil(result.length / ps);
959
- retPi = Math.max(1, pi > maxPageIndex ? maxPageIndex : pi);
960
- retTotal = result.length;
961
- if (page.show === true) {
962
- return result.slice((retPi - 1) * ps, retPi * ps);
963
- }
964
- }
965
- return result;
966
- }));
967
- }
968
- // pre-process
969
- if (typeof res.process === 'function') {
970
- data$ = data$.pipe(operators.map(function (result) { return res.process(result, rawData); }));
971
- }
972
- data$ = data$.pipe(operators.map(function (result) { return _this.optimizeData({ result: result, columns: columns, rowClassName: options.rowClassName }); }));
973
- return data$.pipe(operators.map(function (result) {
974
- retList = result;
975
- var realTotal = retTotal || total;
976
- var realPs = retPs || ps;
977
- return {
978
- pi: retPi,
979
- ps: retPs,
980
- total: retTotal,
981
- list: retList,
982
- statistical: _this.genStatistical(columns, retList, rawData),
983
- pageShow: typeof showPage === 'undefined' ? realTotal > realPs : showPage
984
- };
985
- }));
986
- };
987
- STDataSource.prototype.get = function (item, col, idx) {
988
- var _a;
989
- try {
990
- var safeHtml = col.safeType === 'safeHtml';
991
- if (col.format) {
992
- var formatRes = col.format(item, col, idx) || '';
993
- return {
994
- text: formatRes,
995
- _text: safeHtml ? this.dom.bypassSecurityTrustHtml(formatRes) : formatRes,
996
- org: formatRes,
997
- safeType: col.safeType
998
- };
999
- }
1000
- var value = other.deepGet(item, col.index, col.default);
1001
- var text = value;
1002
- var color = void 0;
1003
- switch (col.type) {
1004
- case 'no':
1005
- text = this.getNoIndex(item, col, idx);
1006
- break;
1007
- case 'img':
1008
- text = value ? "<img src=\"" + value + "\" class=\"img\">" : '';
1009
- break;
1010
- case 'number':
1011
- text = this.numberPipe.transform(value, col.numberDigits);
1012
- break;
1013
- case 'currency':
1014
- text = this.currencySrv.format(value, (_a = col.currency) === null || _a === void 0 ? void 0 : _a.format);
1015
- break;
1016
- case 'date':
1017
- text = value === col.default ? col.default : this.datePipe.transform(value, col.dateFormat);
1018
- break;
1019
- case 'yn':
1020
- text = this.ynPipe.transform(value === col.yn.truth, col.yn.yes, col.yn.no, col.yn.mode, false);
1021
- break;
1022
- case 'enum':
1023
- text = col.enum[value];
1024
- break;
1025
- case 'tag':
1026
- case 'badge':
1027
- var data = col.type === 'tag' ? col.tag : col.badge;
1028
- if (data && data[text]) {
1029
- var dataItem = data[text];
1030
- text = dataItem.text;
1031
- color = dataItem.color;
1032
- }
1033
- else {
1034
- text = '';
1035
- }
1036
- break;
1037
- }
1038
- if (text == null)
1039
- text = '';
1040
- return {
1041
- text: text,
1042
- _text: safeHtml ? this.dom.bypassSecurityTrustHtml(text) : text,
1043
- org: value,
1044
- color: color,
1045
- safeType: col.safeType,
1046
- buttons: []
1047
- };
1048
- }
1049
- catch (ex) {
1050
- var text = "INVALID DATA";
1051
- console.error("Failed to get data", item, col, ex);
1052
- return { text: text, _text: text, org: text, buttons: [], safeType: 'text' };
1053
- }
1054
- };
1055
- STDataSource.prototype.getByRemote = function (url, options) {
1056
- var _b, _c;
1057
- var req = options.req, page = options.page, paginator = options.paginator, pi = options.pi, ps = options.ps, singleSort = options.singleSort, multiSort = options.multiSort, columns = options.columns;
1058
- var method = (req.method || 'GET').toUpperCase();
1059
- var params = {};
1060
- var reName = req.reName;
1061
- if (paginator) {
1062
- if (req.type === 'page') {
1063
- params = (_b = {},
1064
- _b[reName.pi] = page.zeroIndexed ? pi - 1 : pi,
1065
- _b[reName.ps] = ps,
1066
- _b);
1067
- }
1068
- else {
1069
- params = (_c = {},
1070
- _c[reName.skip] = (pi - 1) * ps,
1071
- _c[reName.limit] = ps,
1072
- _c);
1073
- }
1074
- }
1075
- params = Object.assign(Object.assign(Object.assign(Object.assign({}, params), req.params), this.getReqSortMap(singleSort, multiSort, columns)), this.getReqFilterMap(columns));
1076
- var reqOptions = {
1077
- params: params,
1078
- body: req.body,
1079
- headers: req.headers
1080
- };
1081
- if (method === 'POST' && req.allInBody === true) {
1082
- reqOptions = {
1083
- body: Object.assign(Object.assign({}, req.body), params),
1084
- headers: req.headers
1085
- };
1086
- }
1087
- if (typeof req.process === 'function') {
1088
- reqOptions = req.process(reqOptions);
1089
- }
1090
- if (!(reqOptions.params instanceof http.HttpParams)) {
1091
- reqOptions.params = new http.HttpParams({ fromObject: reqOptions.params });
1092
- }
1093
- if (typeof options.customRequest === 'function') {
1094
- return options.customRequest({ method: method, url: url, options: reqOptions });
1095
- }
1096
- return this.http.request(method, url, reqOptions);
1097
- };
1098
- STDataSource.prototype.optimizeData = function (options) {
1099
- var _this = this;
1100
- var result = options.result, columns = options.columns, rowClassName = options.rowClassName;
1101
- var _loop_1 = function (i, len) {
1102
- result[i]._values = columns.map(function (c) {
1103
- if (Array.isArray(c.buttons) && c.buttons.length > 0) {
1104
- return { buttons: _this.genButtons(c.buttons, result[i], c), _text: '' };
1105
- }
1106
- return _this.get(result[i], c, i);
1107
- });
1108
- if (rowClassName) {
1109
- result[i]._rowClassName = rowClassName(result[i], i);
1110
- }
1111
- };
1112
- for (var i = 0, len = result.length; i < len; i++) {
1113
- _loop_1(i, len);
1114
- }
1115
- return result;
1116
- };
1117
- STDataSource.prototype.getNoIndex = function (item, col, idx) {
1118
- return typeof col.noIndex === 'function' ? col.noIndex(item, col, idx) : col.noIndex + idx;
1119
- };
1120
- STDataSource.prototype.genButtons = function (_btns, item, col) {
1121
- var fn = function (btns) {
1122
- return other.deepCopy(btns).filter(function (btn) {
1123
- var result = btn.iif(item, btn, col);
1124
- var isRenderDisabled = btn.iifBehavior === 'disabled';
1125
- btn._result = result;
1126
- btn._disabled = !result && isRenderDisabled;
1127
- if (btn.children.length > 0) {
1128
- btn.children = fn(btn.children);
1129
- }
1130
- delete btn.iif;
1131
- return result || isRenderDisabled;
1132
- });
1133
- };
1134
- var res = fn(_btns);
1135
- var fnText = function (btns) {
1136
- var e_1, _b;
1137
- try {
1138
- for (var btns_1 = __values(btns), btns_1_1 = btns_1.next(); !btns_1_1.done; btns_1_1 = btns_1.next()) {
1139
- var btn = btns_1_1.value;
1140
- btn._text = typeof btn.text === 'function' ? btn.text(item, btn) : btn.text || '';
1141
- if (btn.children.length > 0) {
1142
- btn.children = fnText(btn.children);
1143
- }
1144
- }
1145
- }
1146
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1147
- finally {
1148
- try {
1149
- if (btns_1_1 && !btns_1_1.done && (_b = btns_1.return)) _b.call(btns_1);
1150
- }
1151
- finally { if (e_1) throw e_1.error; }
1152
- }
1153
- return btns;
1154
- };
1155
- return fnText(res);
1156
- };
1157
- // #region sort
1158
- STDataSource.prototype.getValidSort = function (columns) {
1159
- return columns.filter(function (item) { return item._sort && item._sort.enabled && item._sort.default; }).map(function (item) { return item._sort; });
1160
- };
1161
- STDataSource.prototype.getSorterFn = function (columns) {
1162
- var sortList = this.getValidSort(columns);
1163
- if (sortList.length === 0) {
1164
- return;
1165
- }
1166
- var sortItem = sortList[0];
1167
- if (sortItem.compare === null) {
1168
- return;
1169
- }
1170
- if (typeof sortItem.compare !== 'function') {
1171
- console.warn("[st] Muse provide the compare function in sort");
1172
- return;
1173
- }
1174
- return function (a, b) {
1175
- var result = sortItem.compare(a, b);
1176
- if (result !== 0) {
1177
- return sortItem.default === 'descend' ? -result : result;
1178
- }
1179
- return 0;
1180
- };
1181
- };
1182
- Object.defineProperty(STDataSource.prototype, "nextSortTick", {
1183
- get: function () {
1184
- return ++this.sortTick;
1185
- },
1186
- enumerable: false,
1187
- configurable: true
1188
- });
1189
- STDataSource.prototype.getReqSortMap = function (singleSort, multiSort, columns) {
1190
- var _b;
1191
- var ret = {};
1192
- var sortList = this.getValidSort(columns);
1193
- if (multiSort) {
1194
- var ms_1 = Object.assign({ key: 'sort', separator: '-', nameSeparator: '.', keepEmptyKey: true, arrayParam: false }, multiSort);
1195
- var sortMap = sortList
1196
- .sort(function (a, b) { return a.tick - b.tick; })
1197
- .map(function (item) { return item.key + ms_1.nameSeparator + ((item.reName || {})[item.default] || item.default); });
1198
- ret = (_b = {}, _b[ms_1.key] = ms_1.arrayParam ? sortMap : sortMap.join(ms_1.separator), _b);
1199
- return sortMap.length === 0 && ms_1.keepEmptyKey === false ? {} : ret;
1200
- }
1201
- if (sortList.length === 0)
1202
- return ret;
1203
- var mapData = sortList[0];
1204
- var sortFiled = mapData.key;
1205
- var sortValue = (sortList[0].reName || {})[mapData.default] || mapData.default;
1206
- if (singleSort) {
1207
- sortValue = sortFiled + (singleSort.nameSeparator || '.') + sortValue;
1208
- sortFiled = singleSort.key || 'sort';
1209
- }
1210
- ret[sortFiled] = sortValue;
1211
- return ret;
1212
- };
1213
- // #endregion
1214
- // #region filter
1215
- STDataSource.prototype.getFilteredData = function (filter) {
1216
- return filter.type === 'default' ? filter.menus.filter(function (f) { return f.checked === true; }) : filter.menus.slice(0, 1);
1217
- };
1218
- STDataSource.prototype.getReqFilterMap = function (columns) {
1219
- var _this = this;
1220
- var ret = {};
1221
- columns
1222
- .filter(function (w) { return w.filter && w.filter.default === true; })
1223
- .forEach(function (col) {
1224
- var filter = col.filter;
1225
- var values = _this.getFilteredData(filter);
1226
- var obj = {};
1227
- if (filter.reName) {
1228
- obj = filter.reName(filter.menus, col);
1229
- }
1230
- else {
1231
- obj[filter.key] = values.map(function (i) { return i.value; }).join(',');
1232
- }
1233
- ret = Object.assign(Object.assign({}, ret), obj);
1234
- });
1235
- return ret;
1236
- };
1237
- // #endregion
1238
- // #region statistical
1239
- STDataSource.prototype.genStatistical = function (columns, list, rawData) {
1240
- var _this = this;
1241
- var res = {};
1242
- columns.forEach(function (col, index) {
1243
- res[col.key || col.indexKey || index] =
1244
- col.statistical == null ? {} : _this.getStatistical(col, index, list, rawData);
1245
- });
1246
- return res;
1247
- };
1248
- STDataSource.prototype.getStatistical = function (col, index, list, rawData) {
1249
- var _a;
1250
- var val = col.statistical;
1251
- var item = Object.assign({ digits: 2, currency: undefined }, (typeof val === 'string' ? { type: val } : val));
1252
- var res = { value: 0 };
1253
- var currency = false;
1254
- if (typeof item.type === 'function') {
1255
- res = item.type(this.getValues(index, list), col, list, rawData);
1256
- currency = true;
1257
- }
1258
- else {
1259
- switch (item.type) {
1260
- case 'count':
1261
- res.value = list.length;
1262
- break;
1263
- case 'distinctCount':
1264
- res.value = this.getValues(index, list).filter(function (value, idx, self) { return self.indexOf(value) === idx; }).length;
1265
- break;
1266
- case 'sum':
1267
- res.value = this.toFixed(this.getSum(index, list), item.digits);
1268
- currency = true;
1269
- break;
1270
- case 'average':
1271
- res.value = this.toFixed(this.getSum(index, list) / list.length, item.digits);
1272
- currency = true;
1273
- break;
1274
- case 'max':
1275
- res.value = Math.max.apply(Math, __spreadArray([], __read(this.getValues(index, list))));
1276
- currency = true;
1277
- break;
1278
- case 'min':
1279
- res.value = Math.min.apply(Math, __spreadArray([], __read(this.getValues(index, list))));
1280
- currency = true;
1281
- break;
1282
- }
1283
- }
1284
- if (item.currency === true || (item.currency == null && currency === true)) {
1285
- res.text = this.currencySrv.format(res.value, (_a = col.currency) === null || _a === void 0 ? void 0 : _a.format);
1286
- }
1287
- else {
1288
- res.text = String(res.value);
1289
- }
1290
- return res;
1291
- };
1292
- STDataSource.prototype.toFixed = function (val, digits) {
1293
- if (isNaN(val) || !isFinite(val)) {
1294
- return 0;
1295
- }
1296
- return parseFloat(val.toFixed(digits));
1297
- };
1298
- STDataSource.prototype.getValues = function (index, list) {
1299
- return list.map(function (i) { return i._values[index].org; }).map(function (i) { return (i === '' || i == null ? 0 : i); });
1300
- };
1301
- STDataSource.prototype.getSum = function (index, list) {
1302
- return this.getValues(index, list).reduce(function (p, i) { return (p += parseFloat(String(i))); }, 0);
1303
- };
1304
- return STDataSource;
1305
- }());
1306
- STDataSource.decorators = [
1307
- { type: i0.Injectable }
1308
- ];
1309
- STDataSource.ctorParameters = function () { return [
1310
- { type: theme._HttpClient },
1311
- { type: theme.DatePipe, decorators: [{ type: i0.Host }] },
1312
- { type: theme.YNPipe, decorators: [{ type: i0.Host }] },
1313
- { type: common.DecimalPipe, decorators: [{ type: i0.Host }] },
1314
- { type: format.CurrencyService },
1315
- { type: platformBrowser.DomSanitizer }
1316
- ]; };
1317
-
1318
- var STExport = /** @class */ (function () {
1319
- function STExport(xlsxSrv) {
1320
- this.xlsxSrv = xlsxSrv;
1321
- }
1322
- STExport.prototype._stGet = function (item, col, index, colIndex) {
1323
- var ret = { t: 's', v: '' };
1324
- if (col.format) {
1325
- ret.v = col.format(item, col, index);
1326
- }
1327
- else {
1328
- var val = item._values ? item._values[colIndex].text : other.deepGet(item, col.index, '');
1329
- ret.v = val;
1330
- if (val != null) {
1331
- switch (col.type) {
1332
- case 'currency':
1333
- ret.t = 'n';
1334
- break;
1335
- case 'date':
1336
- // Can't be a empty value, it will cause `#NULL!`
1337
- // See https://github.com/SheetJS/sheetjs/blob/master/docbits/52_datatype.md
1338
- if (("" + val).length > 0) {
1339
- ret.t = 'd';
1340
- // Number Formats: https://github.com/SheetJS/sheetjs/blob/master/docbits/63_numfmt.md
1341
- ret.z = col.dateFormat;
1342
- }
1343
- break;
1344
- case 'yn':
1345
- var yn = col.yn;
1346
- ret.v = val === yn.truth ? yn.yes : yn.no;
1347
- break;
1348
- }
1349
- }
1350
- }
1351
- ret.v = ret.v || '';
1352
- return ret;
1353
- };
1354
- STExport.prototype.genSheet = function (opt) {
1355
- var sheets = {};
1356
- var sheet = (sheets[opt.sheetname || 'Sheet1'] = {});
1357
- var dataLen = opt.data.length;
1358
- var validColCount = 0;
1359
- var loseCount = 0;
1360
- var columns = opt.columens;
1361
- if (columns.findIndex(function (w) { return w._width != null; }) !== -1) {
1362
- // wpx: width in screen pixels https://github.com/SheetJS/sheetjs#column-properties
1363
- sheet['!cols'] = columns.map(function (col) { return ({ wpx: col._width }); });
1364
- }
1365
- for (var colIdx = 0; colIdx < columns.length; colIdx++) {
1366
- var col = columns[colIdx];
1367
- if (col.exported === false || !col.index || !(!col.buttons || col.buttons.length === 0)) {
1368
- ++loseCount;
1369
- continue;
1370
- }
1371
- ++validColCount;
1372
- var columnName = this.xlsxSrv.numberToSchema(colIdx + 1 - loseCount);
1373
- sheet[columnName + "1"] = {
1374
- t: 's',
1375
- v: typeof col.title === 'object' ? col.title.text : col.title
1376
- };
1377
- for (var dataIdx = 0; dataIdx < dataLen; dataIdx++) {
1378
- sheet["" + columnName + (dataIdx + 2)] = this._stGet(opt.data[dataIdx], col, dataIdx, colIdx);
1379
- }
1380
- }
1381
- if (validColCount > 0 && dataLen > 0) {
1382
- sheet['!ref'] = "A1:" + this.xlsxSrv.numberToSchema(validColCount) + (dataLen + 1);
1383
- }
1384
- return sheets;
1385
- };
1386
- STExport.prototype.export = function (opt) {
1387
- return __awaiter(this, void 0, void 0, function () {
1388
- var sheets;
1389
- return __generator(this, function (_a) {
1390
- sheets = this.genSheet(opt);
1391
- return [2 /*return*/, this.xlsxSrv.export({
1392
- sheets: sheets,
1393
- filename: opt.filename,
1394
- callback: opt.callback
1395
- })];
1396
- });
1397
- });
1398
- };
1399
- return STExport;
1400
- }());
1401
- STExport.decorators = [
1402
- { type: i0.Injectable }
1403
- ];
1404
- STExport.ctorParameters = function () { return [
1405
- { type: xlsx.XlsxService, decorators: [{ type: i0.Optional }] }
1406
- ]; };
1407
-
1408
- var STWidgetHostDirective = /** @class */ (function () {
1409
- function STWidgetHostDirective(stWidgetRegistry, viewContainerRef, componentFactoryResolver) {
1410
- this.stWidgetRegistry = stWidgetRegistry;
1411
- this.viewContainerRef = viewContainerRef;
1412
- this.componentFactoryResolver = componentFactoryResolver;
1413
- }
1414
- STWidgetHostDirective.prototype.ngOnInit = function () {
1415
- var widget = this.column.widget;
1416
- var componentType = this.stWidgetRegistry.get(widget.type);
1417
- var componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);
1418
- this.viewContainerRef.clear();
1419
- var componentRef = this.viewContainerRef.createComponent(componentFactory);
1420
- var _a = this, record = _a.record, column = _a.column;
1421
- var data = widget.params ? widget.params({ record: record, column: column }) : { record: record };
1422
- Object.keys(data).forEach(function (key) {
1423
- componentRef.instance[key] = data[key];
1424
- });
1425
- };
1426
- return STWidgetHostDirective;
1427
- }());
1428
- STWidgetHostDirective.decorators = [
1429
- { type: i0.Directive, args: [{ selector: '[st-widget-host]' },] }
1430
- ];
1431
- STWidgetHostDirective.ctorParameters = function () { return [
1432
- { type: STWidgetRegistry },
1433
- { type: i0.ViewContainerRef },
1434
- { type: i0.ComponentFactoryResolver }
1435
- ]; };
1436
- STWidgetHostDirective.propDecorators = {
1437
- record: [{ type: i0.Input }],
1438
- column: [{ type: i0.Input }]
1439
- };
1440
-
1441
- var ST_DEFAULT_CONFIG = {
1442
- pi: 1,
1443
- ps: 10,
1444
- size: 'default',
1445
- responsive: true,
1446
- responsiveHideHeaderFooter: false,
1447
- req: {
1448
- type: 'page',
1449
- method: 'GET',
1450
- allInBody: false,
1451
- lazyLoad: false,
1452
- reName: { pi: 'pi', ps: 'ps', skip: 'skip', limit: 'limit' }
1453
- },
1454
- res: {
1455
- reName: { list: ['list'], total: ['total'] }
1456
- },
1457
- page: {
1458
- front: true,
1459
- zeroIndexed: false,
1460
- position: 'bottom',
1461
- placement: 'right',
1462
- show: true,
1463
- showSize: false,
1464
- pageSizes: [10, 20, 30, 40, 50],
1465
- showQuickJumper: false,
1466
- total: true,
1467
- toTop: true,
1468
- toTopOffset: 100,
1469
- itemRender: null,
1470
- simple: false
1471
- },
1472
- modal: {
1473
- paramsName: 'record',
1474
- size: 'lg',
1475
- exact: true
1476
- },
1477
- drawer: {
1478
- paramsName: 'record',
1479
- size: 'md',
1480
- footer: true,
1481
- footerHeight: 55
1482
- },
1483
- pop: {
1484
- title: '确认删除吗?',
1485
- trigger: 'click',
1486
- placement: 'top'
1487
- },
1488
- rowClickTime: 200,
1489
- btnIcon: {
1490
- theme: 'outline',
1491
- spin: false
1492
- },
1493
- noIndex: 1,
1494
- expandRowByClick: false,
1495
- expandAccordion: false,
1496
- widthMode: {
1497
- type: 'default',
1498
- strictBehavior: 'truncate'
1499
- },
1500
- virtualItemSize: 54,
1501
- virtualMaxBufferPx: 200,
1502
- virtualMinBufferPx: 100,
1503
- iifBehavior: 'hide',
1504
- loadingDelay: 0,
1505
- safeType: 'safeHtml',
1506
- date: {
1507
- format: "yyyy-MM-dd HH:mm"
1508
- },
1509
- yn: {
1510
- truth: true,
1511
- yes: '是',
1512
- mode: 'icon'
1513
- }
1514
- };
1515
-
1516
- var STComponent = /** @class */ (function () {
1517
- function STComponent(i18nSrv, cdr, router, el, exportSrv, modalHelper, drawerHelper, doc, columnSource, dataSource, delonI18n, configSrv, cms) {
1518
- var _this = this;
1519
- this.cdr = cdr;
1520
- this.router = router;
1521
- this.el = el;
1522
- this.exportSrv = exportSrv;
1523
- this.modalHelper = modalHelper;
1524
- this.drawerHelper = drawerHelper;
1525
- this.doc = doc;
1526
- this.columnSource = columnSource;
1527
- this.dataSource = dataSource;
1528
- this.delonI18n = delonI18n;
1529
- this.cms = cms;
1530
- this.destroy$ = new rxjs.Subject();
1531
- this.totalTpl = "";
1532
- this.rowClickCount = 0;
1533
- this.customWidthConfig = false;
1534
- this._widthConfig = [];
1535
- this.locale = {};
1536
- this._loading = false;
1537
- this._data = [];
1538
- this._statistical = {};
1539
- this._isPagination = true;
1540
- this._allChecked = false;
1541
- this._allCheckedDisabled = false;
1542
- this._indeterminate = false;
1543
- this._headers = [];
1544
- this._columns = [];
1545
- this.contextmenuList = [];
1546
- this.columns = [];
1547
- this.ps = 10;
1548
- this.pi = 1;
1549
- this.total = 0;
1550
- this.loading = null;
1551
- this.loadingDelay = 0;
1552
- this.bordered = false;
1553
- this.showHeader = true;
1554
- this.expandRowByClick = false;
1555
- this.expandAccordion = false;
1556
- this.rowClickTime = 200;
1557
- this.responsive = true;
1558
- this.error = new i0.EventEmitter();
1559
- this.change = new i0.EventEmitter();
1560
- this.virtualScroll = false;
1561
- this.virtualItemSize = 54;
1562
- this.virtualMaxBufferPx = 200;
1563
- this.virtualMinBufferPx = 100;
1564
- this.virtualForTrackBy = function (index) { return index; };
1565
- this.setCog(configSrv.merge('st', ST_DEFAULT_CONFIG));
1566
- this.delonI18n.change.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
1567
- _this.locale = _this.delonI18n.getData('st');
1568
- if (_this._columns.length > 0) {
1569
- _this.updateTotalTpl();
1570
- _this.cd();
1571
- }
1572
- });
1573
- i18nSrv.change
1574
- .pipe(operators.takeUntil(this.destroy$), operators.filter(function () { return _this._columns.length > 0; }))
1575
- .subscribe(function () { return _this.refreshColumns(); });
1576
- }
1577
- Object.defineProperty(STComponent.prototype, "req", {
1578
- get: function () {
1579
- return this._req;
1580
- },
1581
- set: function (value) {
1582
- this._req = other.deepMergeKey({}, true, this.cog.req, value);
1583
- },
1584
- enumerable: false,
1585
- configurable: true
1586
- });
1587
- Object.defineProperty(STComponent.prototype, "res", {
1588
- /** 返回体配置 */
1589
- get: function () {
1590
- return this._res;
1591
- },
1592
- set: function (value) {
1593
- var item = (this._res = other.deepMergeKey({}, true, this.cog.res, value));
1594
- var reName = item.reName;
1595
- if (!Array.isArray(reName.list))
1596
- reName.list = reName.list.split('.');
1597
- if (!Array.isArray(reName.total))
1598
- reName.total = reName.total.split('.');
1599
- this._res = item;
1600
- },
1601
- enumerable: false,
1602
- configurable: true
1603
- });
1604
- Object.defineProperty(STComponent.prototype, "page", {
1605
- get: function () {
1606
- return this._page;
1607
- },
1608
- set: function (value) {
1609
- this._page = Object.assign(Object.assign({}, this.cog.page), value);
1610
- this.updateTotalTpl();
1611
- },
1612
- enumerable: false,
1613
- configurable: true
1614
- });
1615
- Object.defineProperty(STComponent.prototype, "multiSort", {
1616
- get: function () {
1617
- return this._multiSort;
1618
- },
1619
- set: function (value) {
1620
- if ((typeof value === 'boolean' && !decorator.toBoolean(value)) ||
1621
- (typeof value === 'object' && Object.keys(value).length === 0)) {
1622
- this._multiSort = undefined;
1623
- return;
1624
- }
1625
- this._multiSort = Object.assign({}, (typeof value === 'object' ? value : {}));
1626
- },
1627
- enumerable: false,
1628
- configurable: true
1629
- });
1630
- Object.defineProperty(STComponent.prototype, "widthMode", {
1631
- get: function () {
1632
- return this._widthMode;
1633
- },
1634
- set: function (value) {
1635
- this._widthMode = Object.assign(Object.assign({}, this.cog.widthMode), value);
1636
- },
1637
- enumerable: false,
1638
- configurable: true
1639
- });
1640
- Object.defineProperty(STComponent.prototype, "widthConfig", {
1641
- set: function (val) {
1642
- this._widthConfig = val;
1643
- this.customWidthConfig = val && val.length > 0;
1644
- },
1645
- enumerable: false,
1646
- configurable: true
1647
- });
1648
- Object.defineProperty(STComponent.prototype, "resizable", {
1649
- set: function (val) {
1650
- this._resizable = typeof val === 'object' ? val : { disabled: !decorator.toBoolean(val) };
1651
- },
1652
- enumerable: false,
1653
- configurable: true
1654
- });
1655
- Object.defineProperty(STComponent.prototype, "count", {
1656
- /**
1657
- * Get the number of the current page
1658
- */
1659
- get: function () {
1660
- return this._data.length;
1661
- },
1662
- enumerable: false,
1663
- configurable: true
1664
- });
1665
- Object.defineProperty(STComponent.prototype, "list", {
1666
- /**
1667
- * Get the data of the current page
1668
- */
1669
- get: function () {
1670
- return this._data;
1671
- },
1672
- enumerable: false,
1673
- configurable: true
1674
- });
1675
- Object.defineProperty(STComponent.prototype, "routerState", {
1676
- get: function () {
1677
- var _b = this, pi = _b.pi, ps = _b.ps, total = _b.total;
1678
- return { pi: pi, ps: ps, total: total };
1679
- },
1680
- enumerable: false,
1681
- configurable: true
1682
- });
1683
- STComponent.prototype.setCog = function (cog) {
1684
- var copyMultiSort = Object.assign({}, cog.multiSort);
1685
- // Because multiSort.global will affect the result, it should be removed first, and multiSort will be operated again after processing.
1686
- delete cog.multiSort;
1687
- this.cog = cog;
1688
- Object.assign(this, cog);
1689
- if (copyMultiSort.global !== false) {
1690
- this.multiSort = copyMultiSort;
1691
- }
1692
- this.columnSource.setCog(cog);
1693
- };
1694
- STComponent.prototype.cd = function () {
1695
- this.cdr.detectChanges();
1696
- return this;
1697
- };
1698
- STComponent.prototype.renderTotal = function (total, range) {
1699
- return this.totalTpl
1700
- ? this.totalTpl.replace('{{total}}', total).replace('{{range[0]}}', range[0]).replace('{{range[1]}}', range[1])
1701
- : '';
1702
- };
1703
- STComponent.prototype.changeEmit = function (type, data) {
1704
- var res = {
1705
- type: type,
1706
- pi: this.pi,
1707
- ps: this.ps,
1708
- total: this.total
1709
- };
1710
- if (data != null) {
1711
- res[type] = data;
1712
- }
1713
- this.change.emit(res);
1714
- };
1715
- Object.defineProperty(STComponent.prototype, "filteredData", {
1716
- // #region data
1717
- /**
1718
- * 获取过滤后所有数据
1719
- * - 本地数据:包含排序、过滤后不分页数据
1720
- * - 远程数据:不传递 `pi`、`ps` 两个参数
1721
- */
1722
- get: function () {
1723
- return this.loadData({ paginator: false }).then(function (res) { return res.list; });
1724
- },
1725
- enumerable: false,
1726
- configurable: true
1727
- });
1728
- STComponent.prototype.updateTotalTpl = function () {
1729
- var total = this.page.total;
1730
- if (typeof total === 'string' && total.length) {
1731
- this.totalTpl = total;
1732
- }
1733
- else if (decorator.toBoolean(total)) {
1734
- this.totalTpl = this.locale.total;
1735
- }
1736
- else {
1737
- this.totalTpl = '';
1738
- }
1739
- };
1740
- STComponent.prototype.setLoading = function (val) {
1741
- if (this.loading == null) {
1742
- this._loading = val;
1743
- this.cdr.detectChanges();
1744
- }
1745
- };
1746
- STComponent.prototype.loadData = function (options) {
1747
- var _this = this;
1748
- var _b = this, pi = _b.pi, ps = _b.ps, data = _b.data, req = _b.req, res = _b.res, page = _b.page, total = _b.total, singleSort = _b.singleSort, multiSort = _b.multiSort, rowClassName = _b.rowClassName;
1749
- return new Promise(function (resolvePromise, rejectPromise) {
1750
- if (_this.data$) {
1751
- _this.data$.unsubscribe();
1752
- }
1753
- _this.data$ = _this.dataSource
1754
- .process(Object.assign({ pi: pi, ps: ps, total: total, data: data, req: req, res: res, page: page, columns: _this._columns, singleSort: singleSort, multiSort: multiSort, rowClassName: rowClassName, paginator: true, customRequest: _this.customRequest || _this.cog.customRequest }, options))
1755
- .pipe(operators.takeUntil(_this.destroy$))
1756
- .subscribe(function (result) { return resolvePromise(result); }, function (error) {
1757
- console.warn('st.loadDate', error);
1758
- rejectPromise(error);
1759
- });
1760
- });
1761
- };
1762
- STComponent.prototype.loadPageData = function () {
1763
- return __awaiter(this, void 0, void 0, function () {
1764
- var result, error_1;
1765
- var _this = this;
1766
- return __generator(this, function (_b) {
1767
- switch (_b.label) {
1768
- case 0:
1769
- this.setLoading(true);
1770
- _b.label = 1;
1771
- case 1:
1772
- _b.trys.push([1, 3, , 4]);
1773
- return [4 /*yield*/, this.loadData()];
1774
- case 2:
1775
- result = _b.sent();
1776
- this.setLoading(false);
1777
- if (typeof result.pi !== 'undefined') {
1778
- this.pi = result.pi;
1779
- }
1780
- if (typeof result.ps !== 'undefined') {
1781
- this.ps = result.ps;
1782
- }
1783
- if (typeof result.total !== 'undefined') {
1784
- this.total = result.total;
1785
- }
1786
- if (typeof result.pageShow !== 'undefined') {
1787
- this._isPagination = result.pageShow;
1788
- }
1789
- this._data = result.list;
1790
- this._statistical = result.statistical;
1791
- this.changeEmit('loaded', result.list);
1792
- // Should be re-render in next tike when using virtual scroll
1793
- // https://github.com/ng-alain/ng-alain/issues/1836
1794
- if (this.cdkVirtualScrollViewport) {
1795
- Promise.resolve().then(function () { return _this.cdkVirtualScrollViewport.checkViewportSize(); });
1796
- }
1797
- return [2 /*return*/, this._refCheck()];
1798
- case 3:
1799
- error_1 = _b.sent();
1800
- this.setLoading(false);
1801
- if (!this.destroy$.isStopped) {
1802
- this.cdr.detectChanges();
1803
- this.error.emit({ type: 'req', error: error_1 });
1804
- }
1805
- return [2 /*return*/, this];
1806
- case 4: return [2 /*return*/];
1807
- }
1808
- });
1809
- });
1810
- };
1811
- /** 清空所有数据 */
1812
- STComponent.prototype.clear = function (cleanStatus) {
1813
- if (cleanStatus === void 0) { cleanStatus = true; }
1814
- if (cleanStatus) {
1815
- this.clearStatus();
1816
- }
1817
- this._data = [];
1818
- return this.cd();
1819
- };
1820
- /** 清空所有状态 */
1821
- STComponent.prototype.clearStatus = function () {
1822
- return this.clearCheck().clearRadio().clearFilter().clearSort();
1823
- };
1824
- /**
1825
- * 根据页码重新加载数据
1826
- *
1827
- * @param pi 指定当前页码,默认:`1`
1828
- * @param extraParams 重新指定 `extraParams` 值
1829
- * @param options 选项
1830
- */
1831
- STComponent.prototype.load = function (pi, extraParams, options) {
1832
- if (pi === void 0) { pi = 1; }
1833
- if (pi !== -1)
1834
- this.pi = pi;
1835
- if (typeof extraParams !== 'undefined') {
1836
- this.req.params = options && options.merge ? Object.assign(Object.assign({}, this.req.params), extraParams) : extraParams;
1837
- }
1838
- this._change('pi', options);
1839
- return this;
1840
- };
1841
- /**
1842
- * 重新刷新当前页
1843
- *
1844
- * @param extraParams 重新指定 `extraParams` 值
1845
- */
1846
- STComponent.prototype.reload = function (extraParams, options) {
1847
- return this.load(-1, extraParams, options);
1848
- };
1849
- /**
1850
- * 重置且重新设置 `pi` 为 `1`,包含以下值:
1851
- * - `check` 数据
1852
- * - `radio` 数据
1853
- * - `sort` 数据
1854
- * - `fileter` 数据
1855
- *
1856
- * @param extraParams 重新指定 `extraParams` 值
1857
- */
1858
- STComponent.prototype.reset = function (extraParams, options) {
1859
- this.clearStatus().load(1, extraParams, options);
1860
- return this;
1861
- };
1862
- STComponent.prototype._toTop = function (enforce) {
1863
- var _a;
1864
- if (!(enforce == null ? this.page.toTop : enforce))
1865
- return;
1866
- var el = this.el.nativeElement;
1867
- el.scrollIntoView();
1868
- // fix header height
1869
- this.doc.documentElement.scrollTop -= this.page.toTopOffset;
1870
- if (this.scroll) {
1871
- if (this.cdkVirtualScrollViewport) {
1872
- this.cdkVirtualScrollViewport.scrollTo({
1873
- top: 0,
1874
- left: 0
1875
- });
1876
- }
1877
- else {
1878
- (_a = el.querySelector('.ant-table-body, .ant-table-content')) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0);
1879
- }
1880
- }
1881
- };
1882
- STComponent.prototype._change = function (type, options) {
1883
- var _this = this;
1884
- if (type === 'pi' || (type === 'ps' && this.pi <= Math.ceil(this.total / this.ps))) {
1885
- this.loadPageData().then(function () { return _this._toTop(options === null || options === void 0 ? void 0 : options.toTop); });
1886
- }
1887
- this.changeEmit(type);
1888
- };
1889
- STComponent.prototype._click = function (e, item, col) {
1890
- e.preventDefault();
1891
- e.stopPropagation();
1892
- var res = col.click(item, this);
1893
- if (typeof res === 'string') {
1894
- this.router.navigateByUrl(res, { state: this.routerState });
1895
- }
1896
- return false;
1897
- };
1898
- STComponent.prototype.closeOtherExpand = function (item) {
1899
- if (this.expandAccordion === false)
1900
- return;
1901
- this._data.filter(function (i) { return i !== item; }).forEach(function (i) { return (i.expand = false); });
1902
- };
1903
- STComponent.prototype._rowClick = function (e, item, index) {
1904
- var _this = this;
1905
- var el = e.target;
1906
- if (el.nodeName === 'INPUT')
1907
- return;
1908
- var _b = this, expand = _b.expand, expandRowByClick = _b.expandRowByClick, rowClickTime = _b.rowClickTime;
1909
- if (!!expand && item.showExpand !== false && expandRowByClick) {
1910
- item.expand = !item.expand;
1911
- this.closeOtherExpand(item);
1912
- this.changeEmit('expand', item);
1913
- return;
1914
- }
1915
- ++this.rowClickCount;
1916
- if (this.rowClickCount !== 1)
1917
- return;
1918
- setTimeout(function () {
1919
- var data = { e: e, item: item, index: index };
1920
- if (_this.rowClickCount === 1) {
1921
- _this._clickRowClassName(el, item, index);
1922
- _this.changeEmit('click', data);
1923
- }
1924
- else {
1925
- _this.changeEmit('dblClick', data);
1926
- }
1927
- _this.rowClickCount = 0;
1928
- }, rowClickTime);
1929
- };
1930
- STComponent.prototype._clickRowClassName = function (el, item, index) {
1931
- var cr = this.clickRowClassName;
1932
- if (cr == null)
1933
- return;
1934
- var config = Object.assign({ exclusive: false }, (typeof cr === 'string' ? { fn: function () { return cr; } } : cr));
1935
- var className = config.fn(item, index);
1936
- var trEl = el.closest('tr');
1937
- if (config.exclusive) {
1938
- trEl.parentElement.querySelectorAll('tr').forEach(function (a) { return a.classList.remove(className); });
1939
- }
1940
- if (trEl.classList.contains(className)) {
1941
- trEl.classList.remove(className);
1942
- }
1943
- else {
1944
- trEl.classList.add(className);
1945
- }
1946
- };
1947
- STComponent.prototype._expandChange = function (item, expand) {
1948
- item.expand = expand;
1949
- this.closeOtherExpand(item);
1950
- this.changeEmit('expand', item);
1951
- };
1952
- STComponent.prototype._stopPropagation = function (ev) {
1953
- ev.stopPropagation();
1954
- };
1955
- /**
1956
- * Remove a row in the table, like this:
1957
- *
1958
- * ```
1959
- * this.st.removeRow(0)
1960
- * this.st.removeRow(stDataItem)
1961
- * ```
1962
- */
1963
- STComponent.prototype.removeRow = function (data) {
1964
- var _this = this;
1965
- if (typeof data === 'number') {
1966
- this._data.splice(data, 1);
1967
- }
1968
- else {
1969
- if (!Array.isArray(data)) {
1970
- data = [data];
1971
- }
1972
- data
1973
- .map(function (item) { return _this._data.indexOf(item); })
1974
- .filter(function (pos) { return pos !== -1; })
1975
- .forEach(function (pos) { return _this._data.splice(pos, 1); });
1976
- }
1977
- // recalculate no
1978
- this._columns
1979
- .filter(function (w) { return w.type === 'no'; })
1980
- .forEach(function (c) { return _this._data.forEach(function (i, idx) {
1981
- var text = "" + _this.dataSource.getNoIndex(i, c, idx);
1982
- i._values[c.__point] = { text: text, _text: text, org: idx, safeType: 'text' };
1983
- }); });
1984
- return this.cd();
1985
- };
1986
- /**
1987
- * Sets the row value for the `index` in the table, like this:
1988
- *
1989
- * - `optinos.refreshSchema` Whether to refresh of st schemas
1990
- * - `optinos.emitReload` Whether to trigger a reload http request when data is url
1991
- *
1992
- * ```
1993
- * this.st.setRow(0, { price: 100 })
1994
- * this.st.setRow(0, { price: 100, name: 'asdf' })
1995
- * this.st.setRow(item, { price: 100 })
1996
- * ```
1997
- */
1998
- STComponent.prototype.setRow = function (index, item, options) {
1999
- options = Object.assign({ refreshSchema: false, emitReload: false }, options);
2000
- if (typeof index !== 'number') {
2001
- index = this._data.indexOf(index);
2002
- }
2003
- this._data[index] = other.deepMergeKey(this._data[index], false, item);
2004
- this.optimizeData();
2005
- if (options.refreshSchema) {
2006
- this.resetColumns({ emitReload: options.emitReload });
2007
- return this;
2008
- }
2009
- this.cdr.detectChanges();
2010
- return this;
2011
- };
2012
- // #endregion
2013
- // #region sort
2014
- STComponent.prototype.sort = function (col, idx, value) {
2015
- if (this.multiSort) {
2016
- col._sort.default = value;
2017
- col._sort.tick = this.dataSource.nextSortTick;
2018
- }
2019
- else {
2020
- this._columns.forEach(function (item, index) { return (item._sort.default = index === idx ? value : null); });
2021
- }
2022
- this.cdr.detectChanges();
2023
- this.loadPageData();
2024
- var res = {
2025
- value: value,
2026
- map: this.dataSource.getReqSortMap(this.singleSort, this.multiSort, this._columns),
2027
- column: col
2028
- };
2029
- this.changeEmit('sort', res);
2030
- };
2031
- STComponent.prototype.clearSort = function () {
2032
- this._columns.forEach(function (item) { return (item._sort.default = null); });
2033
- return this;
2034
- };
2035
- // #endregion
2036
- // #region filter
2037
- STComponent.prototype.handleFilter = function (col) {
2038
- // 过滤表示一种数据的变化应重置页码为 `1`
2039
- this.pi = 1;
2040
- this.columnSource.updateDefault(col.filter);
2041
- this.loadPageData();
2042
- this.changeEmit('filter', col);
2043
- };
2044
- STComponent.prototype._filterConfirm = function (col) {
2045
- this.handleFilter(col);
2046
- };
2047
- STComponent.prototype._filterRadio = function (col, item, checked) {
2048
- col.filter.menus.forEach(function (i) { return (i.checked = false); });
2049
- item.checked = checked;
2050
- };
2051
- STComponent.prototype._filterClear = function (col) {
2052
- this.columnSource.cleanFilter(col);
2053
- this.handleFilter(col);
2054
- };
2055
- STComponent.prototype.clearFilter = function () {
2056
- var _this = this;
2057
- this._columns.filter(function (w) { return w.filter && w.filter.default === true; }).forEach(function (col) { return _this.columnSource.cleanFilter(col); });
2058
- return this;
2059
- };
2060
- STComponent.prototype._filterClick = function ($event) {
2061
- $event.stopPropagation();
2062
- };
2063
- // #endregion
2064
- // #region checkbox
2065
- /** 清除所有 `checkbox` */
2066
- STComponent.prototype.clearCheck = function () {
2067
- return this._checkAll(false);
2068
- };
2069
- STComponent.prototype._refCheck = function () {
2070
- var validData = this._data.filter(function (w) { return !w.disabled; });
2071
- var checkedList = validData.filter(function (w) { return w.checked === true; });
2072
- this._allChecked = checkedList.length > 0 && checkedList.length === validData.length;
2073
- var allUnChecked = validData.every(function (value) { return !value.checked; });
2074
- this._indeterminate = !this._allChecked && !allUnChecked;
2075
- this._allCheckedDisabled = this._data.length === this._data.filter(function (w) { return w.disabled; }).length;
2076
- return this.cd();
2077
- };
2078
- STComponent.prototype._checkAll = function (checked) {
2079
- checked = typeof checked === 'undefined' ? this._allChecked : checked;
2080
- this._data.filter(function (w) { return !w.disabled; }).forEach(function (i) { return (i.checked = checked); });
2081
- return this._refCheck()._checkNotify();
2082
- };
2083
- STComponent.prototype._checkSelection = function (i, value) {
2084
- i.checked = value;
2085
- return this._refCheck()._checkNotify();
2086
- };
2087
- STComponent.prototype._rowSelection = function (row) {
2088
- row.select(this._data);
2089
- return this._refCheck()._checkNotify();
2090
- };
2091
- STComponent.prototype._checkNotify = function () {
2092
- var res = this._data.filter(function (w) { return !w.disabled && w.checked === true; });
2093
- this.changeEmit('checkbox', res);
2094
- return this;
2095
- };
2096
- // #endregion
2097
- // #region radio
2098
- /** 清除所有 `radio` */
2099
- STComponent.prototype.clearRadio = function () {
2100
- this._data.filter(function (w) { return w.checked; }).forEach(function (item) { return (item.checked = false); });
2101
- this.changeEmit('radio', null);
2102
- return this;
2103
- };
2104
- STComponent.prototype._refRadio = function (checked, item) {
2105
- // if (item.disabled === true) return;
2106
- this._data.filter(function (w) { return !w.disabled; }).forEach(function (i) { return (i.checked = false); });
2107
- item.checked = checked;
2108
- this.changeEmit('radio', item);
2109
- return this;
2110
- };
2111
- // #endregion
2112
- // #region buttons
2113
- STComponent.prototype._btnClick = function (record, btn, ev) {
2114
- var _b, _c;
2115
- var _this = this;
2116
- if (ev) {
2117
- ev.stopPropagation();
2118
- }
2119
- if (btn.type === 'modal' || btn.type === 'static') {
2120
- var modal = btn.modal;
2121
- var obj = (_b = {}, _b[modal.paramsName] = record, _b);
2122
- this.modalHelper[btn.type === 'modal' ? 'create' : 'createStatic'](modal.component, Object.assign(Object.assign({}, obj), (modal.params && modal.params(record))), other.deepMergeKey({}, true, this.cog.modal, modal))
2123
- .pipe(operators.filter(function (w) { return typeof w !== 'undefined'; }))
2124
- .subscribe(function (res) { return _this.btnCallback(record, btn, res); });
2125
- return;
2126
- }
2127
- else if (btn.type === 'drawer') {
2128
- var drawer = btn.drawer;
2129
- var obj = (_c = {}, _c[drawer.paramsName] = record, _c);
2130
- this.drawerHelper
2131
- .create(drawer.title, drawer.component, Object.assign(Object.assign({}, obj), (drawer.params && drawer.params(record))), other.deepMergeKey({}, true, this.cog.drawer, drawer))
2132
- .pipe(operators.filter(function (w) { return typeof w !== 'undefined'; }))
2133
- .subscribe(function (res) { return _this.btnCallback(record, btn, res); });
2134
- return;
2135
- }
2136
- else if (btn.type === 'link') {
2137
- var clickRes = this.btnCallback(record, btn);
2138
- if (typeof clickRes === 'string') {
2139
- this.router.navigateByUrl(clickRes, { state: this.routerState });
2140
- }
2141
- return;
2142
- }
2143
- this.btnCallback(record, btn);
2144
- };
2145
- STComponent.prototype.btnCallback = function (record, btn, modal) {
2146
- if (!btn.click)
2147
- return;
2148
- if (typeof btn.click === 'string') {
2149
- switch (btn.click) {
2150
- case 'load':
2151
- this.load();
2152
- break;
2153
- case 'reload':
2154
- this.reload();
2155
- break;
2156
- }
2157
- }
2158
- else {
2159
- return btn.click(record, modal, this);
2160
- }
2161
- };
2162
- // #endregion
2163
- // #region export
2164
- /**
2165
- * 导出当前页,确保已经注册 `XlsxModule`
2166
- *
2167
- * @param newData 重新指定数据;若为 `true` 表示使用 `filteredData` 数据
2168
- * @param opt 额外参数
2169
- */
2170
- STComponent.prototype.export = function (newData, opt) {
2171
- var _this = this;
2172
- var data = Array.isArray(newData)
2173
- ? this.dataSource.optimizeData({ columns: this._columns, result: newData })
2174
- : this._data;
2175
- (newData === true ? rxjs.from(this.filteredData) : rxjs.of(data)).subscribe(function (res) { return _this.exportSrv.export(Object.assign(Object.assign({ columens: _this._columns }, opt), { data: res })); });
2176
- };
2177
- // #endregion
2178
- // #region resizable
2179
- STComponent.prototype.colResize = function (_b, column) {
2180
- var width = _b.width;
2181
- column.width = width + "px";
2182
- this.changeEmit('resize', column);
2183
- };
2184
- // #endregion
2185
- // #region contextmenu
2186
- STComponent.prototype.onContextmenu = function (event) {
2187
- var _this = this;
2188
- if (!this.contextmenu) {
2189
- return;
2190
- }
2191
- event.preventDefault();
2192
- event.stopPropagation();
2193
- var colEl = event.target.closest('[data-col-index]');
2194
- if (!colEl) {
2195
- return;
2196
- }
2197
- var colIndex = Number(colEl.dataset.colIndex);
2198
- var rowIndex = Number(colEl.closest('tr').dataset.index);
2199
- var isTitle = isNaN(rowIndex);
2200
- var obs$ = this.contextmenu({
2201
- event: event,
2202
- type: isTitle ? 'head' : 'body',
2203
- rowIndex: isTitle ? null : rowIndex,
2204
- colIndex: colIndex,
2205
- data: isTitle ? null : this.list[rowIndex],
2206
- column: this._columns[colIndex]
2207
- });
2208
- (rxjs.isObservable(obs$) ? obs$ : rxjs.of(obs$))
2209
- .pipe(operators.takeUntil(this.destroy$), operators.filter(function (res) { return res.length > 0; }))
2210
- .subscribe(function (res) {
2211
- _this.contextmenuList = res.map(function (i) {
2212
- if (!Array.isArray(i.children)) {
2213
- i.children = [];
2214
- }
2215
- return i;
2216
- });
2217
- _this.cdr.detectChanges();
2218
- _this.cms.create(event, _this.contextmenuTpl);
2219
- });
2220
- };
2221
- Object.defineProperty(STComponent.prototype, "cdkVirtualScrollViewport", {
2222
- // #endregion
2223
- get: function () {
2224
- return this.orgTable.cdkVirtualScrollViewport;
2225
- },
2226
- enumerable: false,
2227
- configurable: true
2228
- });
2229
- STComponent.prototype.resetColumns = function (options) {
2230
- options = Object.assign({ emitReload: true, preClearData: false }, options);
2231
- if (typeof options.columns !== 'undefined') {
2232
- this.columns = options.columns;
2233
- }
2234
- if (typeof options.pi !== 'undefined') {
2235
- this.pi = options.pi;
2236
- }
2237
- if (typeof options.ps !== 'undefined') {
2238
- this.ps = options.ps;
2239
- }
2240
- if (options.emitReload) {
2241
- // Should clean data, Because of changing columns may cause inaccurate data
2242
- options.preClearData = true;
2243
- }
2244
- if (options.preClearData) {
2245
- this._data = [];
2246
- }
2247
- this.refreshColumns();
2248
- if (options.emitReload) {
2249
- return this.loadPageData();
2250
- }
2251
- else {
2252
- this.cd();
2253
- return Promise.resolve(this);
2254
- }
2255
- };
2256
- STComponent.prototype.refreshColumns = function () {
2257
- var res = this.columnSource.process(this.columns, {
2258
- widthMode: this.widthMode,
2259
- resizable: this._resizable,
2260
- safeType: this.cog.safeType
2261
- });
2262
- this._columns = res.columns;
2263
- this._headers = res.headers;
2264
- if (this.customWidthConfig === false && res.headerWidths != null) {
2265
- this._widthConfig = res.headerWidths;
2266
- }
2267
- return this;
2268
- };
2269
- STComponent.prototype.optimizeData = function () {
2270
- this._data = this.dataSource.optimizeData({
2271
- columns: this._columns,
2272
- result: this._data,
2273
- rowClassName: this.rowClassName
2274
- });
2275
- };
2276
- /**
2277
- * Return pure data, `st` internally maintains a set of data for caching, this part of data may affect the backend
2278
- *
2279
- * 返回纯净数据,`st` 内部会维护一组用于缓存的数据,这部分数据可能会影响后端
2280
- */
2281
- STComponent.prototype.pureItem = function (itemOrIndex) {
2282
- if (typeof itemOrIndex === 'number') {
2283
- itemOrIndex = this._data[itemOrIndex];
2284
- }
2285
- if (!itemOrIndex) {
2286
- return null;
2287
- }
2288
- var copyItem = other.deepCopy(itemOrIndex);
2289
- delete copyItem._values;
2290
- return copyItem;
2291
- };
2292
- STComponent.prototype.ngAfterViewInit = function () {
2293
- this.columnSource.restoreAllRender(this._columns);
2294
- };
2295
- STComponent.prototype.ngOnChanges = function (changes) {
2296
- if (changes.columns) {
2297
- this.refreshColumns().optimizeData();
2298
- }
2299
- var changeData = changes.data;
2300
- if (changeData && changeData.currentValue && !(this.req.lazyLoad && changeData.firstChange)) {
2301
- this.loadPageData();
2302
- }
2303
- if (changes.loading) {
2304
- this._loading = changes.loading.currentValue;
2305
- }
2306
- };
2307
- STComponent.prototype.ngOnDestroy = function () {
2308
- this.destroy$.next();
2309
- this.destroy$.complete();
2310
- };
2311
- return STComponent;
2312
- }());
2313
- STComponent.decorators = [
2314
- { type: i0.Component, args: [{
2315
- selector: 'st',
2316
- exportAs: 'st',
2317
- template: "<ng-template #btnTpl let-i let-btn=\"btn\">\n <ng-container *ngIf=\"!btn.tooltip\">\n <ng-template [ngTemplateOutlet]=\"btnItemTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\"></ng-template>\n </ng-container>\n <span *ngIf=\"btn.tooltip\" nz-tooltip [nzTooltipTitle]=\"btn.tooltip\">\n <ng-template [ngTemplateOutlet]=\"btnItemTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\"></ng-template>\n </span>\n</ng-template>\n<ng-template #btnItemTpl let-i let-btn=\"btn\">\n <a\n *ngIf=\"btn.pop\"\n nz-popconfirm\n [nzPopconfirmTitle]=\"btn.pop.title\"\n [nzIcon]=\"btn.pop.icon\"\n [nzCondition]=\"btn.pop.condition(i)\"\n [nzCancelText]=\"btn.pop.cancelText\"\n [nzOkText]=\"btn.pop.okText\"\n [nzOkType]=\"btn.pop.okType\"\n (nzOnConfirm)=\"_btnClick(i, btn)\"\n class=\"st__btn-text\"\n [ngClass]=\"btn.className\"\n (click)=\"_stopPropagation($event)\"\n >\n <ng-template [ngTemplateOutlet]=\"btnTextTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\"></ng-template>\n </a>\n <a *ngIf=\"!btn.pop\" (click)=\"_btnClick(i, btn, $event)\" class=\"st__btn-text\" [ngClass]=\"btn.className\">\n <ng-template [ngTemplateOutlet]=\"btnTextTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\"></ng-template>\n </a>\n</ng-template>\n<ng-template #btnTextTpl let-i let-btn=\"btn\">\n <ng-container *ngIf=\"btn.icon\">\n <i\n *ngIf=\"!btn.icon.iconfont\"\n nz-icon\n [nzType]=\"btn.icon.type\"\n [nzTheme]=\"btn.icon.theme\"\n [nzSpin]=\"btn.icon.spin\"\n [nzTwotoneColor]=\"btn.icon.twoToneColor\"\n ></i>\n <i *ngIf=\"btn.icon.iconfont\" nz-icon [nzIconfont]=\"btn.icon.iconfont\"></i>\n </ng-container>\n <span [innerHTML]=\"btn._text\" [ngClass]=\"{ 'pl-xs': btn.icon }\"></span>\n</ng-template>\n<ng-template #titleTpl let-i>\n <span [innerHTML]=\"i._text\"></span>\n <small *ngIf=\"i.optional\" class=\"st__head-optional\" [innerHTML]=\"i.optional\"></small>\n <i\n *ngIf=\"i.optionalHelp\"\n class=\"st__head-tip\"\n nz-tooltip\n [nzTooltipTitle]=\"i.optionalHelp\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n</ng-template>\n<ng-template #chkAllTpl let-custom>\n <label\n nz-checkbox\n class=\"st__checkall\"\n [nzDisabled]=\"_allCheckedDisabled\"\n [(ngModel)]=\"_allChecked\"\n [nzIndeterminate]=\"_indeterminate\"\n (ngModelChange)=\"_checkAll()\"\n [class.ant-table-selection-select-all-custom]=\"custom\"\n ></label>\n</ng-template>\n<nz-table\n #table\n [nzData]=\"_data\"\n [(nzPageIndex)]=\"pi\"\n (nzPageIndexChange)=\"_change('pi')\"\n [(nzPageSize)]=\"ps\"\n (nzPageSizeChange)=\"_change('ps')\"\n [nzTotal]=\"total\"\n [nzShowPagination]=\"_isPagination\"\n [nzFrontPagination]=\"false\"\n [nzBordered]=\"bordered\"\n [nzSize]=\"size\"\n [nzLoading]=\"_loading\"\n [nzLoadingDelay]=\"loadingDelay\"\n [nzLoadingIndicator]=\"loadingIndicator\"\n [nzTitle]=\"header!\"\n [nzFooter]=\"footer!\"\n [nzScroll]=\"scroll\"\n [nzVirtualItemSize]=\"virtualItemSize\"\n [nzVirtualMaxBufferPx]=\"virtualMaxBufferPx\"\n [nzVirtualMinBufferPx]=\"virtualMinBufferPx\"\n [nzVirtualForTrackBy]=\"virtualForTrackBy\"\n [nzNoResult]=\"noResult!\"\n [nzPageSizeOptions]=\"page.pageSizes!\"\n [nzShowQuickJumper]=\"page.showQuickJumper\"\n [nzShowSizeChanger]=\"page.showSize\"\n [nzPaginationPosition]=\"page.position!\"\n [nzPaginationType]=\"page.type!\"\n [nzItemRender]=\"page.itemRender!\"\n [nzSimple]=\"page.simple\"\n [nzShowTotal]=\"totalTpl\"\n [nzWidthConfig]=\"_widthConfig\"\n (contextmenu)=\"onContextmenu($event)\"\n>\n <thead *ngIf=\"showHeader\">\n <tr *ngFor=\"let row of _headers; let rowFirst = first\">\n <th *ngIf=\"rowFirst && expand\" nzWidth=\"50px\" [rowSpan]=\"_headers.length\"></th>\n <ng-container *ngFor=\"let h of row; let index = index; let last = last\">\n <th\n *let=\"h.column as _c\"\n [colSpan]=\"h.colSpan\"\n [rowSpan]=\"h.rowSpan\"\n [nzWidth]=\"$any(_c).width\"\n [nzLeft]=\"_c._left!\"\n [nzRight]=\"_c._right!\"\n [ngClass]=\"_c.className!\"\n [attr.data-col]=\"_c.indexKey\"\n [attr.data-col-index]=\"index\"\n [nzShowSort]=\"_c._sort.enabled\"\n [nzSortOrder]=\"$any(_c)._sort.default\"\n (nzSortOrderChange)=\"sort(_c, index, $event)\"\n [nzCustomFilter]=\"$any(_c).filter\"\n nz-resizable\n [nzDisabled]=\"last || $any(_c).resizable.disabled\"\n [nzMaxWidth]=\"$any(_c).resizable.maxWidth\"\n [nzMinWidth]=\"$any(_c).resizable.minWidth\"\n [nzBounds]=\"$any(_c).resizable.bounds\"\n [nzPreview]=\"$any(_c).resizable.preview\"\n (nzResizeEnd)=\"colResize($event, _c)\"\n >\n <nz-resize-handle *ngIf=\"$any(!last && !$any(_c).resizable.disabled)\" nzDirection=\"right\">\n <i></i>\n </nz-resize-handle>\n <ng-template\n #renderTitle\n [ngTemplateOutlet]=\"_c.__renderTitle!\"\n [ngTemplateOutletContext]=\"{ $implicit: h.column, index: index }\"\n ></ng-template>\n <ng-container *ngIf=\"!_c.__renderTitle; else renderTitle\">\n <ng-container [ngSwitch]=\"_c.type\">\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <ng-container *ngIf=\"_c.selections!.length === 0\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: false }\">\n </ng-template>\n </ng-container>\n <div *ngIf=\"_c.selections!.length > 0\" class=\"ant-table-selection\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: true }\">\n </ng-template>\n <div\n *ngIf=\"_c.selections!.length\"\n nz-dropdown\n nzPlacement=\"bottomLeft\"\n [nzDropdownMenu]=\"selectionMenu\"\n class=\"ant-table-selection-down st__checkall-selection\"\n >\n <i nz-icon nzType=\"down\"></i>\n </div>\n <nz-dropdown-menu #selectionMenu=\"nzDropdownMenu\">\n <ul nz-menu class=\"ant-table-selection-menu\">\n <li\n nz-menu-item\n *ngFor=\"let rw of _c.selections\"\n (click)=\"_rowSelection(rw)\"\n [innerHTML]=\"rw.text\"\n ></li>\n </ul>\n </nz-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: _c.title }\"\n ></ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"_c.filter\">\n <div\n nz-th-extra\n *let=\"_c.filter as _f\"\n class=\"ant-table-filter-trigger-container st__filter\"\n [class.ant-table-filter-trigger-container-open]=\"$any(_f).visible\"\n >\n <span\n class=\"ant-table-filter-trigger\"\n [class.active]=\"$any(_f).visible || _f.default\"\n nz-dropdown\n [nzDropdownMenu]=\"filterMenu\"\n nzTrigger=\"click\"\n [nzClickHide]=\"false\"\n [(nzVisible)]=\"$any(_f).visible\"\n nzOverlayClassName=\"st__filter-wrap\"\n (click)=\"_filterClick($event)\"\n >\n <i nz-icon [nzType]=\"$any(_f).icon.type\" [nzTheme]=\"$any(_f).icon.theme\"></i>\n </span>\n <nz-dropdown-menu #filterMenu=\"nzDropdownMenu\">\n <div class=\"ant-table-filter-dropdown\">\n <ng-container [ngSwitch]=\"_f.type\">\n <div *ngSwitchCase=\"'keyword'\" class=\"st__filter-keyword\">\n <input\n type=\"text\"\n nz-input\n [attr.placeholder]=\"$any(_f).menus[0].text\"\n [(ngModel)]=\"$any(_f).menus[0].value\"\n />\n </div>\n <ul *ngSwitchDefault nz-menu>\n <ng-container *ngIf=\"_f.multiple\">\n <li nz-menu-item *ngFor=\"let filter of _f.menus\">\n <label nz-checkbox [(ngModel)]=\"filter.checked\">{{ filter.text }}</label>\n </li>\n </ng-container>\n <ng-container *ngIf=\"!_f.multiple\">\n <li nz-menu-item *ngFor=\"let filter of _f.menus\">\n <label\n nz-radio\n [ngModel]=\"filter.checked\"\n (ngModelChange)=\"_filterRadio(h.column, filter, $event)\"\n >{{ filter.text }}</label\n >\n </li>\n </ng-container>\n </ul>\n </ng-container>\n <div class=\"ant-table-filter-dropdown-btns\">\n <a class=\"ant-table-filter-dropdown-link confirm\" (click)=\"$any(_f).visible = false\">\n <span (click)=\"_filterConfirm(h.column)\">{{ _f.confirmText || locale.filterConfirm }}</span>\n </a>\n <a class=\"ant-table-filter-dropdown-link clear\" (click)=\"$any(_f).visible = false\">\n <span (click)=\"_filterClear(h.column)\">{{ _f.clearText || locale.filterReset }}</span>\n </a>\n </div>\n </div>\n </nz-dropdown-menu>\n </div>\n </ng-container>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody class=\"st__body\">\n <ng-container *ngIf=\"!_loading\">\n <ng-template\n [ngTemplateOutlet]=\"bodyHeader!\"\n [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"\n ></ng-template>\n </ng-container>\n <ng-template #bodyTpl let-i let-index=\"index\">\n <tr [attr.data-index]=\"index\" (click)=\"_rowClick($event, i, index)\" [ngClass]=\"i._rowClassName\">\n <td\n *ngIf=\"expand\"\n [nzShowExpand]=\"expand && i.showExpand !== false\"\n [nzExpand]=\"i.expand\"\n (nzExpandChange)=\"_expandChange(i, $event)\"\n (click)=\"_stopPropagation($event)\"\n nzWidth=\"50px\"\n ></td>\n <td\n *ngFor=\"let c of _columns; let cIdx = index\"\n [nzLeft]=\"!!c._left\"\n [nzRight]=\"!!c._right\"\n [attr.data-col-index]=\"cIdx\"\n [ngClass]=\"c._className!\"\n [attr.colspan]=\"c.colSpan\"\n >\n <span *ngIf=\"responsive\" class=\"ant-table-rep__title\">\n <ng-template [ngTemplateOutlet]=\"titleTpl\" [ngTemplateOutletContext]=\"{ $implicit: c.title }\"></ng-template>\n </span>\n <span>\n <ng-template\n #render\n [ngTemplateOutlet]=\"c.__render!\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index, column: c }\"\n ></ng-template>\n <ng-container *ngIf=\"!c.__render; else render\">\n <ng-container [ngSwitch]=\"c.type\">\n <label\n *ngSwitchCase=\"'checkbox'\"\n nz-checkbox\n [nzDisabled]=\"i.disabled\"\n [ngModel]=\"i.checked\"\n (ngModelChange)=\"_checkSelection(i, $event)\"\n ></label>\n <label\n *ngSwitchCase=\"'radio'\"\n nz-radio\n [nzDisabled]=\"i.disabled\"\n [ngModel]=\"i.checked\"\n (ngModelChange)=\"_refRadio($event, i)\"\n ></label>\n <a\n *ngSwitchCase=\"'link'\"\n (click)=\"_click($event, i, c)\"\n [innerHTML]=\"i._values[cIdx]._text\"\n [attr.title]=\"i._values[cIdx].text\"\n ></a>\n <ng-container *ngIf=\"i._values[cIdx].text\">\n <nz-tag *ngSwitchCase=\"'tag'\" [nzColor]=\"i._values[cIdx].color\">\n <span [innerHTML]=\"i._values[cIdx]._text\"></span>\n </nz-tag>\n <nz-badge\n *ngSwitchCase=\"'badge'\"\n [nzStatus]=\"i._values[cIdx].color\"\n [nzText]=\"i._values[cIdx].text\"\n ></nz-badge>\n </ng-container>\n <ng-template *ngSwitchCase=\"'widget'\" st-widget-host [record]=\"i\" [column]=\"c\"></ng-template>\n <ng-container *ngSwitchDefault>\n <span\n *ngIf=\"c.safeType !== 'text'\"\n [innerHTML]=\"i._values[cIdx]._text\"\n [attr.title]=\"c._isTruncate ? i._values[cIdx].text : null\"\n ></span>\n <span\n *ngIf=\"c.safeType === 'text'\"\n [innerText]=\"i._values[cIdx]._text\"\n [attr.title]=\"c._isTruncate ? i._values[cIdx].text : null\"\n ></span>\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let btn of i._values[cIdx].buttons; let last = last\">\n <a\n *ngIf=\"btn.children!.length > 0\"\n nz-dropdown\n [nzDropdownMenu]=\"btnMenu\"\n nzOverlayClassName=\"st__btn-sub\"\n >\n <span [innerHTML]=\"btn._text\"></span>\n <i nz-icon nzType=\"down\"></i>\n </a>\n <nz-dropdown-menu #btnMenu=\"nzDropdownMenu\">\n <ul nz-menu>\n <ng-container *ngFor=\"let subBtn of btn.children!\">\n <li *ngIf=\"subBtn.type !== 'divider'\" nz-menu-item [class.st__btn-disabled]=\"subBtn._disabled\">\n <ng-template\n [ngTemplateOutlet]=\"btnTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: i, btn: subBtn }\"\n >\n </ng-template>\n </li>\n <li *ngIf=\"subBtn.type === 'divider'\" nz-menu-divider></li>\n </ng-container>\n </ul>\n </nz-dropdown-menu>\n <span *ngIf=\"btn.children!.length === 0\" [class.st__btn-disabled]=\"btn._disabled\">\n <ng-template [ngTemplateOutlet]=\"btnTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, btn: btn }\">\n </ng-template>\n </span>\n <nz-divider *ngIf=\"!last\" nzType=\"vertical\"></nz-divider>\n </ng-container>\n </ng-container>\n </span>\n </td>\n </tr>\n <tr [nzExpand]=\"i.expand\">\n <ng-template\n [ngTemplateOutlet]=\"expand\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\"\n ></ng-template>\n </tr>\n </ng-template>\n <ng-container *ngIf=\"!virtualScroll\">\n <ng-container *ngFor=\"let i of _data; let index = index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"virtualScroll\">\n <ng-template nz-virtual-scroll let-i let-index=\"index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!_loading\">\n <ng-template [ngTemplateOutlet]=\"body!\" [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"></ng-template>\n </ng-container>\n </tbody>\n <ng-template #totalTpl let-range=\"range\" let-total>{{ renderTotal(total, range) }}</ng-template>\n</nz-table>\n<nz-dropdown-menu #contextmenuTpl=\"nzDropdownMenu\">\n <ul nz-menu class=\"st__contextmenu\">\n <ng-container *ngFor=\"let i of contextmenuList\">\n <li nz-menu-item *ngIf=\"i.children!.length === 0\" (click)=\"i.fn!(i)\" [innerHTML]=\"i.text\"></li>\n <li nz-submenu *ngIf=\"i.children!.length > 0\" [nzTitle]=\"i.text\">\n <ul>\n <li nz-menu-item *ngFor=\"let ci of i.children\" (click)=\"ci.fn!(ci)\" [innerHTML]=\"ci.text\"></li>\n </ul>\n </li>\n </ng-container>\n </ul>\n</nz-dropdown-menu>\n",
2318
- providers: [STDataSource, STRowSource, STColumnSource, STExport, theme.DatePipe, theme.YNPipe, common.DecimalPipe],
2319
- host: {
2320
- '[class.st]': "true",
2321
- '[class.st__p-left]': "page.placement === 'left'",
2322
- '[class.st__p-center]': "page.placement === 'center'",
2323
- '[class.st__width-strict]': "widthMode.type === 'strict'",
2324
- '[class.ant-table-rep]': "responsive",
2325
- '[class.ant-table-rep__hide-header-footer]': "responsiveHideHeaderFooter"
2326
- },
2327
- preserveWhitespaces: false,
2328
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2329
- encapsulation: i0.ViewEncapsulation.None
2330
- },] }
2331
- ];
2332
- STComponent.ctorParameters = function () { return [
2333
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [theme.ALAIN_I18N_TOKEN,] }] },
2334
- { type: i0.ChangeDetectorRef },
2335
- { type: router.Router },
2336
- { type: i0.ElementRef },
2337
- { type: STExport },
2338
- { type: theme.ModalHelper },
2339
- { type: theme.DrawerHelper },
2340
- { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] },
2341
- { type: STColumnSource },
2342
- { type: STDataSource },
2343
- { type: theme.DelonLocaleService },
2344
- { type: config.AlainConfigService },
2345
- { type: dropdown.NzContextMenuService }
2346
- ]; };
2347
- STComponent.propDecorators = {
2348
- orgTable: [{ type: i0.ViewChild, args: ['table',] }],
2349
- contextmenuTpl: [{ type: i0.ViewChild, args: ['contextmenuTpl',] }],
2350
- req: [{ type: i0.Input }],
2351
- res: [{ type: i0.Input }],
2352
- page: [{ type: i0.Input }],
2353
- data: [{ type: i0.Input }],
2354
- columns: [{ type: i0.Input }],
2355
- contextmenu: [{ type: i0.Input }],
2356
- ps: [{ type: i0.Input }],
2357
- pi: [{ type: i0.Input }],
2358
- total: [{ type: i0.Input }],
2359
- loading: [{ type: i0.Input }],
2360
- loadingDelay: [{ type: i0.Input }],
2361
- loadingIndicator: [{ type: i0.Input }],
2362
- bordered: [{ type: i0.Input }],
2363
- size: [{ type: i0.Input }],
2364
- scroll: [{ type: i0.Input }],
2365
- singleSort: [{ type: i0.Input }],
2366
- multiSort: [{ type: i0.Input }],
2367
- rowClassName: [{ type: i0.Input }],
2368
- clickRowClassName: [{ type: i0.Input }],
2369
- widthMode: [{ type: i0.Input }],
2370
- widthConfig: [{ type: i0.Input }],
2371
- resizable: [{ type: i0.Input }],
2372
- header: [{ type: i0.Input }],
2373
- showHeader: [{ type: i0.Input }],
2374
- footer: [{ type: i0.Input }],
2375
- bodyHeader: [{ type: i0.Input }],
2376
- body: [{ type: i0.Input }],
2377
- expandRowByClick: [{ type: i0.Input }],
2378
- expandAccordion: [{ type: i0.Input }],
2379
- expand: [{ type: i0.Input }],
2380
- noResult: [{ type: i0.Input }],
2381
- rowClickTime: [{ type: i0.Input }],
2382
- responsive: [{ type: i0.Input }],
2383
- responsiveHideHeaderFooter: [{ type: i0.Input }],
2384
- error: [{ type: i0.Output }],
2385
- change: [{ type: i0.Output }],
2386
- virtualScroll: [{ type: i0.Input }],
2387
- virtualItemSize: [{ type: i0.Input }],
2388
- virtualMaxBufferPx: [{ type: i0.Input }],
2389
- virtualMinBufferPx: [{ type: i0.Input }],
2390
- customRequest: [{ type: i0.Input }],
2391
- virtualForTrackBy: [{ type: i0.Input }]
2392
- };
2393
- __decorate([
2394
- decorator.InputNumber()
2395
- ], STComponent.prototype, "ps", void 0);
2396
- __decorate([
2397
- decorator.InputNumber()
2398
- ], STComponent.prototype, "pi", void 0);
2399
- __decorate([
2400
- decorator.InputNumber()
2401
- ], STComponent.prototype, "total", void 0);
2402
- __decorate([
2403
- decorator.InputNumber()
2404
- ], STComponent.prototype, "loadingDelay", void 0);
2405
- __decorate([
2406
- decorator.InputBoolean()
2407
- ], STComponent.prototype, "bordered", void 0);
2408
- __decorate([
2409
- decorator.InputBoolean()
2410
- ], STComponent.prototype, "showHeader", void 0);
2411
- __decorate([
2412
- decorator.InputBoolean()
2413
- ], STComponent.prototype, "expandRowByClick", void 0);
2414
- __decorate([
2415
- decorator.InputBoolean()
2416
- ], STComponent.prototype, "expandAccordion", void 0);
2417
- __decorate([
2418
- decorator.InputNumber()
2419
- ], STComponent.prototype, "rowClickTime", void 0);
2420
- __decorate([
2421
- decorator.InputBoolean()
2422
- ], STComponent.prototype, "responsive", void 0);
2423
- __decorate([
2424
- decorator.InputBoolean()
2425
- ], STComponent.prototype, "responsiveHideHeaderFooter", void 0);
2426
- __decorate([
2427
- decorator.InputBoolean()
2428
- ], STComponent.prototype, "virtualScroll", void 0);
2429
- __decorate([
2430
- decorator.InputNumber()
2431
- ], STComponent.prototype, "virtualItemSize", void 0);
2432
- __decorate([
2433
- decorator.InputNumber()
2434
- ], STComponent.prototype, "virtualMaxBufferPx", void 0);
2435
- __decorate([
2436
- decorator.InputNumber()
2437
- ], STComponent.prototype, "virtualMinBufferPx", void 0);
2438
-
2439
- var COMPONENTS = [STComponent, STRowDirective, STWidgetHostDirective];
2440
- var STModule = /** @class */ (function () {
2441
- function STModule() {
2442
- }
2443
- return STModule;
2444
- }());
2445
- STModule.decorators = [
2446
- { type: i0.NgModule, args: [{
2447
- imports: [
2448
- common.CommonModule,
2449
- forms.FormsModule,
2450
- acl.DelonACLModule,
2451
- _let.LetModule,
2452
- popconfirm.NzPopconfirmModule,
2453
- table.NzTableModule,
2454
- icon.NzIconModule,
2455
- badge.NzBadgeModule,
2456
- checkbox.NzCheckboxModule,
2457
- divider.NzDividerModule,
2458
- dropdown.NzDropDownModule,
2459
- menu.NzMenuModule,
2460
- radio.NzRadioModule,
2461
- tag.NzTagModule,
2462
- input.NzInputModule,
2463
- tooltip.NzToolTipModule,
2464
- resizable.NzResizableModule
2465
- ],
2466
- declarations: COMPONENTS,
2467
- exports: COMPONENTS
2468
- },] }
2469
- ];
2470
-
2471
- /**
2472
- * Generated bundle index. Do not edit.
2473
- */
2474
-
2475
- exports.STColumnSource = STColumnSource;
2476
- exports.STComponent = STComponent;
2477
- exports.STDataSource = STDataSource;
2478
- exports.STExport = STExport;
2479
- exports.STModule = STModule;
2480
- exports.STRowDirective = STRowDirective;
2481
- exports.STWidgetHostDirective = STWidgetHostDirective;
2482
- exports.STWidgetRegistry = STWidgetRegistry;
2483
- exports.ST_DEFAULT_CONFIG = ST_DEFAULT_CONFIG;
2484
- exports["ɵa"] = STRowSource;
2485
-
2486
- Object.defineProperty(exports, '__esModule', { value: true });
2487
-
2488
- }));
2489
- //# sourceMappingURL=table.umd.js.map