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