@delon/abc 13.5.0 → 14.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/auto-focus/auto-focus.directive.d.ts +1 -1
  2. package/avatar-list/avatar-list-item.component.d.ts +1 -1
  3. package/avatar-list/avatar-list.component.d.ts +1 -1
  4. package/avatar-list/{avatar-list.d.ts → index.d.ts} +0 -0
  5. package/count-down/count-down.component.d.ts +1 -1
  6. package/count-down/{count-down.d.ts → index.d.ts} +0 -0
  7. package/date-picker/{date-picker.d.ts → index.d.ts} +0 -0
  8. package/date-picker/range-shortcut.component.d.ts +1 -1
  9. package/date-picker/range.directive.d.ts +5 -6
  10. package/down-file/down-file.directive.d.ts +1 -1
  11. package/down-file/{down-file.d.ts → index.d.ts} +0 -0
  12. package/ellipsis/ellipsis.component.d.ts +1 -1
  13. package/ellipsis/{ellipsis.d.ts → index.d.ts} +0 -0
  14. package/error-collect/error-collect.component.d.ts +1 -1
  15. package/error-collect/{error-collect.d.ts → index.d.ts} +0 -0
  16. package/esm2020/auto-focus/auto-focus.directive.mjs +4 -4
  17. package/esm2020/auto-focus/auto-focus.module.mjs +4 -4
  18. package/esm2020/avatar-list/avatar-list-item.component.mjs +3 -3
  19. package/esm2020/avatar-list/avatar-list.component.mjs +7 -8
  20. package/esm2020/avatar-list/avatar-list.module.mjs +5 -5
  21. package/esm2020/count-down/count-down.component.mjs +5 -5
  22. package/esm2020/count-down/count-down.module.mjs +5 -5
  23. package/esm2020/date-picker/date-picker.module.mjs +5 -5
  24. package/esm2020/date-picker/range-shortcut.component.mjs +4 -4
  25. package/esm2020/date-picker/range.directive.mjs +8 -10
  26. package/esm2020/down-file/down-file.directive.mjs +5 -5
  27. package/esm2020/down-file/down-file.module.mjs +5 -5
  28. package/esm2020/ellipsis/ellipsis.component.mjs +7 -7
  29. package/esm2020/ellipsis/ellipsis.module.mjs +5 -5
  30. package/esm2020/error-collect/error-collect.component.mjs +6 -7
  31. package/esm2020/error-collect/error-collect.module.mjs +5 -5
  32. package/esm2020/exception/exception.component.mjs +9 -10
  33. package/esm2020/exception/exception.module.mjs +5 -5
  34. package/esm2020/footer-toolbar/footer-toolbar.component.mjs +7 -7
  35. package/esm2020/footer-toolbar/footer-toolbar.module.mjs +5 -5
  36. package/esm2020/full-content/full-content-toggle.directive.mjs +3 -3
  37. package/esm2020/full-content/full-content.component.mjs +5 -6
  38. package/esm2020/full-content/full-content.module.mjs +5 -5
  39. package/esm2020/full-content/full-content.service.mjs +5 -6
  40. package/esm2020/global-footer/global-footer-item.component.mjs +4 -4
  41. package/esm2020/global-footer/global-footer.component.mjs +5 -6
  42. package/esm2020/global-footer/global-footer.module.mjs +5 -5
  43. package/esm2020/let/let.directive.mjs +3 -3
  44. package/esm2020/let/let.module.mjs +4 -4
  45. package/esm2020/loading/loading.component.mjs +6 -6
  46. package/esm2020/loading/loading.module.mjs +5 -5
  47. package/esm2020/loading/loading.service.mjs +9 -7
  48. package/esm2020/lodop/lodop.module.mjs +4 -4
  49. package/esm2020/lodop/lodop.service.mjs +3 -3
  50. package/esm2020/media/media.component.mjs +5 -6
  51. package/esm2020/media/media.module.mjs +5 -5
  52. package/esm2020/media/media.service.mjs +5 -6
  53. package/esm2020/notice-icon/notice-icon-tab.component.mjs +6 -6
  54. package/esm2020/notice-icon/notice-icon.component.mjs +11 -11
  55. package/esm2020/notice-icon/notice-icon.module.mjs +14 -16
  56. package/esm2020/observers/chart-observer-size.mjs +5 -0
  57. package/esm2020/observers/observer-size.mjs +116 -0
  58. package/esm2020/observers/public-api.mjs +2 -0
  59. package/esm2020/onboarding/onboarding.component.mjs +9 -9
  60. package/esm2020/onboarding/onboarding.module.mjs +7 -5
  61. package/esm2020/onboarding/onboarding.service.mjs +9 -9
  62. package/esm2020/page-header/page-header.component.mjs +10 -11
  63. package/esm2020/page-header/page-header.module.mjs +5 -5
  64. package/esm2020/pdf/pdf.component.mjs +18 -16
  65. package/esm2020/pdf/pdf.module.mjs +5 -5
  66. package/esm2020/pdf/pdf.types.mjs +1 -1
  67. package/esm2020/qr/qr.component.mjs +6 -6
  68. package/esm2020/qr/qr.module.mjs +5 -5
  69. package/esm2020/quick-menu/quick-menu.component.mjs +6 -6
  70. package/esm2020/quick-menu/quick-menu.module.mjs +5 -5
  71. package/esm2020/result/result.component.mjs +8 -9
  72. package/esm2020/result/result.module.mjs +5 -5
  73. package/esm2020/reuse-tab/public_api.mjs +2 -1
  74. package/esm2020/reuse-tab/reuse-tab-context-menu.component.mjs +5 -5
  75. package/esm2020/reuse-tab/reuse-tab-context.component.mjs +3 -3
  76. package/esm2020/reuse-tab/reuse-tab-context.directive.mjs +3 -3
  77. package/esm2020/reuse-tab/reuse-tab-context.service.mjs +3 -3
  78. package/esm2020/reuse-tab/reuse-tab.component.mjs +46 -15
  79. package/esm2020/reuse-tab/reuse-tab.interfaces.mjs +1 -1
  80. package/esm2020/reuse-tab/reuse-tab.module.mjs +25 -5
  81. package/esm2020/reuse-tab/reuse-tab.service.mjs +33 -8
  82. package/esm2020/reuse-tab/reuse-tab.state.mjs +16 -0
  83. package/esm2020/se/se-container.component.mjs +9 -10
  84. package/esm2020/se/se.component.mjs +15 -12
  85. package/esm2020/se/se.module.mjs +5 -5
  86. package/esm2020/sg/sg-container.component.mjs +4 -4
  87. package/esm2020/sg/sg.component.mjs +4 -4
  88. package/esm2020/sg/sg.module.mjs +5 -5
  89. package/esm2020/st/st-column-source.mjs +3 -3
  90. package/esm2020/st/st-data-source.mjs +27 -13
  91. package/esm2020/st/st-export.mjs +3 -3
  92. package/esm2020/st/st-filter.component.mjs +12 -12
  93. package/esm2020/st/st-row.directive.mjs +6 -6
  94. package/esm2020/st/st-widget-host.directive.mjs +3 -3
  95. package/esm2020/st/st-widget.mjs +3 -3
  96. package/esm2020/st/st.component.mjs +29 -28
  97. package/esm2020/st/st.config.mjs +2 -1
  98. package/esm2020/st/st.interfaces.mjs +1 -1
  99. package/esm2020/st/st.module.mjs +23 -25
  100. package/esm2020/sv/sv-container.component.mjs +8 -8
  101. package/esm2020/sv/sv-value.component.mjs +4 -4
  102. package/esm2020/sv/sv.component.mjs +7 -7
  103. package/esm2020/sv/sv.module.mjs +5 -5
  104. package/esm2020/tag-select/tag-select.component.mjs +5 -6
  105. package/esm2020/tag-select/tag-select.module.mjs +5 -5
  106. package/esm2020/xlsx/xlsx.directive.mjs +3 -3
  107. package/esm2020/xlsx/xlsx.module.mjs +5 -5
  108. package/esm2020/xlsx/xlsx.service.mjs +4 -4
  109. package/esm2020/zip/zip.module.mjs +5 -5
  110. package/esm2020/zip/zip.service.mjs +14 -12
  111. package/esm2020/zip/zip.types.mjs +1 -1
  112. package/exception/exception.component.d.ts +1 -1
  113. package/exception/{exception.d.ts → index.d.ts} +0 -0
  114. package/fesm2015/auto-focus.mjs +7 -7
  115. package/fesm2015/auto-focus.mjs.map +1 -1
  116. package/fesm2015/avatar-list.mjs +14 -15
  117. package/fesm2015/avatar-list.mjs.map +1 -1
  118. package/fesm2015/chart-observer-size.mjs +124 -0
  119. package/fesm2015/chart-observer-size.mjs.map +1 -0
  120. package/fesm2015/count-down.mjs +10 -10
  121. package/fesm2015/count-down.mjs.map +1 -1
  122. package/fesm2015/date-picker.mjs +15 -17
  123. package/fesm2015/date-picker.mjs.map +1 -1
  124. package/fesm2015/down-file.mjs +8 -8
  125. package/fesm2015/down-file.mjs.map +1 -1
  126. package/fesm2015/ellipsis.mjs +10 -10
  127. package/fesm2015/ellipsis.mjs.map +1 -1
  128. package/fesm2015/error-collect.mjs +9 -10
  129. package/fesm2015/error-collect.mjs.map +1 -1
  130. package/fesm2015/exception.mjs +15 -16
  131. package/fesm2015/exception.mjs.map +1 -1
  132. package/fesm2015/footer-toolbar.mjs +10 -10
  133. package/fesm2015/footer-toolbar.mjs.map +1 -1
  134. package/fesm2015/full-content.mjs +14 -15
  135. package/fesm2015/full-content.mjs.map +1 -1
  136. package/fesm2015/global-footer.mjs +11 -12
  137. package/fesm2015/global-footer.mjs.map +1 -1
  138. package/fesm2015/let.mjs +7 -7
  139. package/fesm2015/loading.mjs +19 -17
  140. package/fesm2015/loading.mjs.map +1 -1
  141. package/fesm2015/lodop.mjs +7 -7
  142. package/fesm2015/media.mjs +11 -12
  143. package/fesm2015/media.mjs.map +1 -1
  144. package/fesm2015/notice-icon.mjs +31 -33
  145. package/fesm2015/notice-icon.mjs.map +1 -1
  146. package/fesm2015/onboarding.mjs +24 -23
  147. package/fesm2015/onboarding.mjs.map +1 -1
  148. package/fesm2015/page-header.mjs +15 -16
  149. package/fesm2015/page-header.mjs.map +1 -1
  150. package/fesm2015/pdf.mjs +21 -19
  151. package/fesm2015/pdf.mjs.map +1 -1
  152. package/fesm2015/qr.mjs +9 -9
  153. package/fesm2015/qr.mjs.map +1 -1
  154. package/fesm2015/quick-menu.mjs +10 -10
  155. package/fesm2015/quick-menu.mjs.map +1 -1
  156. package/fesm2015/result.mjs +12 -13
  157. package/fesm2015/result.mjs.map +1 -1
  158. package/fesm2015/reuse-tab.mjs +133 -42
  159. package/fesm2015/reuse-tab.mjs.map +1 -1
  160. package/fesm2015/se.mjs +25 -22
  161. package/fesm2015/se.mjs.map +1 -1
  162. package/fesm2015/sg.mjs +10 -10
  163. package/fesm2015/sg.mjs.map +1 -1
  164. package/fesm2015/st.mjs +113 -98
  165. package/fesm2015/st.mjs.map +1 -1
  166. package/fesm2015/sv.mjs +20 -20
  167. package/fesm2015/sv.mjs.map +1 -1
  168. package/fesm2015/tag-select.mjs +8 -9
  169. package/fesm2015/tag-select.mjs.map +1 -1
  170. package/fesm2015/xlsx.mjs +10 -10
  171. package/fesm2015/xlsx.mjs.map +1 -1
  172. package/fesm2015/zip.mjs +17 -15
  173. package/fesm2015/zip.mjs.map +1 -1
  174. package/fesm2020/auto-focus.mjs +7 -7
  175. package/fesm2020/auto-focus.mjs.map +1 -1
  176. package/fesm2020/avatar-list.mjs +14 -15
  177. package/fesm2020/avatar-list.mjs.map +1 -1
  178. package/fesm2020/chart-observer-size.mjs +123 -0
  179. package/fesm2020/chart-observer-size.mjs.map +1 -0
  180. package/fesm2020/count-down.mjs +10 -10
  181. package/fesm2020/count-down.mjs.map +1 -1
  182. package/fesm2020/date-picker.mjs +15 -17
  183. package/fesm2020/date-picker.mjs.map +1 -1
  184. package/fesm2020/down-file.mjs +8 -8
  185. package/fesm2020/down-file.mjs.map +1 -1
  186. package/fesm2020/ellipsis.mjs +10 -10
  187. package/fesm2020/ellipsis.mjs.map +1 -1
  188. package/fesm2020/error-collect.mjs +9 -10
  189. package/fesm2020/error-collect.mjs.map +1 -1
  190. package/fesm2020/exception.mjs +15 -16
  191. package/fesm2020/exception.mjs.map +1 -1
  192. package/fesm2020/footer-toolbar.mjs +10 -10
  193. package/fesm2020/footer-toolbar.mjs.map +1 -1
  194. package/fesm2020/full-content.mjs +14 -15
  195. package/fesm2020/full-content.mjs.map +1 -1
  196. package/fesm2020/global-footer.mjs +11 -12
  197. package/fesm2020/global-footer.mjs.map +1 -1
  198. package/fesm2020/let.mjs +7 -7
  199. package/fesm2020/loading.mjs +19 -17
  200. package/fesm2020/loading.mjs.map +1 -1
  201. package/fesm2020/lodop.mjs +7 -7
  202. package/fesm2020/media.mjs +11 -12
  203. package/fesm2020/media.mjs.map +1 -1
  204. package/fesm2020/notice-icon.mjs +31 -33
  205. package/fesm2020/notice-icon.mjs.map +1 -1
  206. package/fesm2020/onboarding.mjs +24 -23
  207. package/fesm2020/onboarding.mjs.map +1 -1
  208. package/fesm2020/page-header.mjs +15 -16
  209. package/fesm2020/page-header.mjs.map +1 -1
  210. package/fesm2020/pdf.mjs +21 -19
  211. package/fesm2020/pdf.mjs.map +1 -1
  212. package/fesm2020/qr.mjs +9 -9
  213. package/fesm2020/qr.mjs.map +1 -1
  214. package/fesm2020/quick-menu.mjs +10 -10
  215. package/fesm2020/quick-menu.mjs.map +1 -1
  216. package/fesm2020/result.mjs +12 -13
  217. package/fesm2020/result.mjs.map +1 -1
  218. package/fesm2020/reuse-tab.mjs +130 -42
  219. package/fesm2020/reuse-tab.mjs.map +1 -1
  220. package/fesm2020/se.mjs +25 -22
  221. package/fesm2020/se.mjs.map +1 -1
  222. package/fesm2020/sg.mjs +10 -10
  223. package/fesm2020/sg.mjs.map +1 -1
  224. package/fesm2020/st.mjs +113 -98
  225. package/fesm2020/st.mjs.map +1 -1
  226. package/fesm2020/sv.mjs +20 -20
  227. package/fesm2020/sv.mjs.map +1 -1
  228. package/fesm2020/tag-select.mjs +8 -9
  229. package/fesm2020/tag-select.mjs.map +1 -1
  230. package/fesm2020/xlsx.mjs +10 -10
  231. package/fesm2020/xlsx.mjs.map +1 -1
  232. package/fesm2020/zip.mjs +17 -15
  233. package/fesm2020/zip.mjs.map +1 -1
  234. package/footer-toolbar/footer-toolbar.component.d.ts +1 -1
  235. package/footer-toolbar/{footer-toolbar.d.ts → index.d.ts} +0 -0
  236. package/full-content/full-content-toggle.directive.d.ts +1 -1
  237. package/full-content/full-content.component.d.ts +1 -1
  238. package/full-content/{full-content.d.ts → index.d.ts} +0 -0
  239. package/global-footer/global-footer-item.component.d.ts +1 -1
  240. package/global-footer/global-footer.component.d.ts +1 -1
  241. package/global-footer/{global-footer.d.ts → index.d.ts} +0 -0
  242. package/{abc.d.ts → index.d.ts} +0 -0
  243. package/let/let.directive.d.ts +1 -1
  244. package/loading/{loading.d.ts → index.d.ts} +0 -0
  245. package/loading/loading.component.d.ts +1 -1
  246. package/lodop/{lodop.d.ts → index.d.ts} +0 -0
  247. package/media/{media.d.ts → index.d.ts} +0 -0
  248. package/media/media.component.d.ts +1 -1
  249. package/notice-icon/{notice-icon.d.ts → index.d.ts} +0 -0
  250. package/notice-icon/notice-icon-tab.component.d.ts +1 -1
  251. package/notice-icon/notice-icon.component.d.ts +1 -1
  252. package/observers/index.d.ts +5 -0
  253. package/observers/observer-size.d.ts +32 -0
  254. package/observers/public-api.d.ts +1 -0
  255. package/onboarding/{onboarding.d.ts → index.d.ts} +0 -0
  256. package/onboarding/onboarding.component.d.ts +1 -1
  257. package/package.json +49 -48
  258. package/page-header/{page-header.d.ts → index.d.ts} +0 -0
  259. package/page-header/page-header.component.d.ts +1 -1
  260. package/page-header/style/index.less +3 -2
  261. package/pdf/{pdf.d.ts → index.d.ts} +0 -0
  262. package/pdf/pdf.component.d.ts +20 -13
  263. package/pdf/pdf.types.d.ts +2 -1
  264. package/qr/{qr.d.ts → index.d.ts} +0 -0
  265. package/qr/qr.component.d.ts +1 -1
  266. package/quick-menu/{quick-menu.d.ts → index.d.ts} +0 -0
  267. package/quick-menu/quick-menu.component.d.ts +1 -1
  268. package/result/{result.d.ts → index.d.ts} +0 -0
  269. package/result/result.component.d.ts +1 -1
  270. package/reuse-tab/{reuse-tab.d.ts → index.d.ts} +0 -0
  271. package/reuse-tab/public_api.d.ts +1 -0
  272. package/reuse-tab/reuse-tab-context-menu.component.d.ts +1 -1
  273. package/reuse-tab/reuse-tab-context.component.d.ts +1 -1
  274. package/reuse-tab/reuse-tab-context.directive.d.ts +1 -1
  275. package/reuse-tab/reuse-tab.component.d.ts +11 -4
  276. package/reuse-tab/reuse-tab.interfaces.d.ts +10 -3
  277. package/reuse-tab/reuse-tab.service.d.ts +7 -2
  278. package/reuse-tab/reuse-tab.state.d.ts +14 -0
  279. package/se/{se.d.ts → index.d.ts} +0 -0
  280. package/se/se-container.component.d.ts +2 -2
  281. package/se/se.component.d.ts +5 -3
  282. package/sg/{sg.d.ts → index.d.ts} +0 -0
  283. package/sg/sg-container.component.d.ts +1 -1
  284. package/sg/sg.component.d.ts +1 -1
  285. package/st/{st.d.ts → index.d.ts} +0 -0
  286. package/st/st-filter.component.d.ts +1 -1
  287. package/st/st-row.directive.d.ts +1 -1
  288. package/st/st-widget-host.directive.d.ts +1 -1
  289. package/st/st.component.d.ts +2 -2
  290. package/st/st.interfaces.d.ts +14 -1
  291. package/sv/{sv.d.ts → index.d.ts} +0 -0
  292. package/sv/sv-container.component.d.ts +2 -2
  293. package/sv/sv-value.component.d.ts +1 -1
  294. package/sv/sv.component.d.ts +1 -1
  295. package/tag-select/{tag-select.d.ts → index.d.ts} +0 -0
  296. package/tag-select/tag-select.component.d.ts +1 -1
  297. package/xlsx/{xlsx.d.ts → index.d.ts} +0 -0
  298. package/xlsx/xlsx.directive.d.ts +1 -1
  299. package/zip/{zip.d.ts → index.d.ts} +0 -0
  300. package/zip/zip.service.d.ts +5 -5
  301. package/zip/zip.types.d.ts +4 -4
  302. package/auto-focus/auto-focus.d.ts +0 -5
  303. package/auto-focus/package.json +0 -10
  304. package/avatar-list/package.json +0 -10
  305. package/count-down/package.json +0 -10
  306. package/date-picker/package.json +0 -10
  307. package/down-file/package.json +0 -10
  308. package/ellipsis/package.json +0 -10
  309. package/error-collect/package.json +0 -10
  310. package/esm2020/image/image.directive.mjs +0 -146
  311. package/esm2020/image/image.mjs +0 -5
  312. package/esm2020/image/image.module.mjs +0 -20
  313. package/esm2020/image/public_api.mjs +0 -3
  314. package/exception/package.json +0 -10
  315. package/fesm2015/image.mjs +0 -165
  316. package/fesm2015/image.mjs.map +0 -1
  317. package/fesm2020/image.mjs +0 -170
  318. package/fesm2020/image.mjs.map +0 -1
  319. package/footer-toolbar/package.json +0 -10
  320. package/full-content/package.json +0 -10
  321. package/global-footer/package.json +0 -10
  322. package/image/image.d.ts +0 -5
  323. package/image/image.directive.d.ts +0 -40
  324. package/image/image.module.d.ts +0 -9
  325. package/image/package.json +0 -10
  326. package/image/public_api.d.ts +0 -2
  327. package/let/let.d.ts +0 -5
  328. package/let/package.json +0 -10
  329. package/loading/package.json +0 -10
  330. package/lodop/package.json +0 -10
  331. package/media/package.json +0 -10
  332. package/notice-icon/package.json +0 -10
  333. package/onboarding/package.json +0 -10
  334. package/page-header/package.json +0 -10
  335. package/pdf/package.json +0 -10
  336. package/qr/package.json +0 -10
  337. package/quick-menu/package.json +0 -10
  338. package/result/package.json +0 -10
  339. package/reuse-tab/package.json +0 -10
  340. package/se/package.json +0 -10
  341. package/sg/package.json +0 -10
  342. package/st/package.json +0 -10
  343. package/sv/package.json +0 -10
  344. package/tag-select/package.json +0 -10
  345. package/xlsx/package.json +0 -10
  346. package/zip/package.json +0 -10
@@ -1,26 +1,25 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, Injectable, Directive, Optional, Inject, ViewChild, NgModule } from '@angular/core';
2
+ import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, Injectable, Directive, InjectionToken, Optional, Inject, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i1 from '@delon/theme';
4
4
  import { ALAIN_I18N_TOKEN, DelonLocaleModule } from '@delon/theme';
5
- import * as i2 from 'ng-zorro-antd/menu';
6
- import { NzMenuModule } from 'ng-zorro-antd/menu';
7
- import * as i7 from '@angular/common';
5
+ import * as i5 from '@angular/common';
8
6
  import { DOCUMENT, CommonModule } from '@angular/common';
9
- import { Subject, Subscription, BehaviorSubject, timer } from 'rxjs';
7
+ import * as i3 from 'ng-zorro-antd/menu';
8
+ import { NzMenuModule } from 'ng-zorro-antd/menu';
9
+ import { Subject, Subscription, BehaviorSubject, timer, of, filter, takeUntil, debounceTime } from 'rxjs';
10
10
  import * as i1$1 from '@angular/cdk/overlay';
11
11
  import { ConnectionPositionPair, OverlayModule } from '@angular/cdk/overlay';
12
12
  import { ComponentPortal } from '@angular/cdk/portal';
13
13
  import { __decorate } from 'tslib';
14
- import { takeUntil, filter, debounceTime } from 'rxjs/operators';
15
14
  import { InputBoolean, InputNumber } from '@delon/util/decorator';
16
- import * as i2$1 from '@angular/router';
15
+ import * as i2 from '@angular/router';
17
16
  import { ActivatedRoute, Router, ROUTER_CONFIGURATION, NavigationStart, NavigationEnd, RouterModule } from '@angular/router';
18
17
  import { ScrollService } from '@delon/util/browser';
19
- import * as i3 from '@angular/cdk/platform';
18
+ import * as i3$1 from '@angular/cdk/platform';
20
19
  import * as i4 from '@angular/cdk/bidi';
21
- import * as i5 from 'ng-zorro-antd/tabs';
20
+ import * as i6 from 'ng-zorro-antd/tabs';
22
21
  import { NzTabsModule } from 'ng-zorro-antd/tabs';
23
- import * as i9 from 'ng-zorro-antd/icon';
22
+ import * as i7 from 'ng-zorro-antd/icon';
24
23
  import { NzIconModule } from 'ng-zorro-antd/icon';
25
24
 
26
25
  class ReuseTabContextMenuComponent {
@@ -71,9 +70,9 @@ class ReuseTabContextMenuComponent {
71
70
  this.notify(null);
72
71
  }
73
72
  }
74
- ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextMenuComponent, deps: [{ token: i1.DelonLocaleService }], target: i0.ɵɵFactoryTarget.Component });
75
- ReuseTabContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: ReuseTabContextMenuComponent, selector: "reuse-tab-context-menu", inputs: { i18n: "i18n", item: "item", event: "event", customContextMenu: "customContextMenu" }, outputs: { close: "close" }, host: { listeners: { "document:click": "closeMenu($event)", "document:contextmenu": "closeMenu($event)" } }, ngImport: i0, template: "<ul nz-menu>\n <li\n *ngIf=\"item.active\"\n nz-menu-item\n (click)=\"click($event, 'refresh')\"\n data-type=\"refresh\"\n [innerHTML]=\"i18n.refresh\"\n ></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'close')\"\n data-type=\"close\"\n [nzDisabled]=\"!item.closable\"\n [innerHTML]=\"i18n.close\"\n ></li>\n <li nz-menu-item (click)=\"click($event, 'closeOther')\" data-type=\"closeOther\" [innerHTML]=\"i18n.closeOther\"></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'closeRight')\"\n data-type=\"closeRight\"\n [nzDisabled]=\"item.last\"\n [innerHTML]=\"i18n.closeRight\"\n ></li>\n <ng-container *ngIf=\"customContextMenu!.length > 0\">\n <li nz-menu-divider></li>\n <li\n *ngFor=\"let i of customContextMenu\"\n nz-menu-item\n [attr.data-type]=\"i.id\"\n [nzDisabled]=\"isDisabled(i)\"\n (click)=\"click($event, 'custom', i)\"\n [innerHTML]=\"i.title\"\n ></li>\n </ng-container>\n</ul>\n", directives: [{ type: i2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { type: i2.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextMenuComponent, decorators: [{
73
+ ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextMenuComponent, deps: [{ token: i1.DelonLocaleService }], target: i0.ɵɵFactoryTarget.Component });
74
+ ReuseTabContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ReuseTabContextMenuComponent, selector: "reuse-tab-context-menu", inputs: { i18n: "i18n", item: "item", event: "event", customContextMenu: "customContextMenu" }, outputs: { close: "close" }, host: { listeners: { "document:click": "closeMenu($event)", "document:contextmenu": "closeMenu($event)" } }, ngImport: i0, template: "<ul nz-menu>\n <li\n *ngIf=\"item.active\"\n nz-menu-item\n (click)=\"click($event, 'refresh')\"\n data-type=\"refresh\"\n [innerHTML]=\"i18n.refresh\"\n ></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'close')\"\n data-type=\"close\"\n [nzDisabled]=\"!item.closable\"\n [innerHTML]=\"i18n.close\"\n ></li>\n <li nz-menu-item (click)=\"click($event, 'closeOther')\" data-type=\"closeOther\" [innerHTML]=\"i18n.closeOther\"></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'closeRight')\"\n data-type=\"closeRight\"\n [nzDisabled]=\"item.last\"\n [innerHTML]=\"i18n.closeRight\"\n ></li>\n <ng-container *ngIf=\"customContextMenu!.length > 0\">\n <li nz-menu-divider></li>\n <li\n *ngFor=\"let i of customContextMenu\"\n nz-menu-item\n [attr.data-type]=\"i.id\"\n [nzDisabled]=\"isDisabled(i)\"\n (click)=\"click($event, 'custom', i)\"\n [innerHTML]=\"i.title\"\n ></li>\n </ng-container>\n</ul>\n", dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i3.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i3.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextMenuComponent, decorators: [{
77
76
  type: Component,
78
77
  args: [{ selector: 'reuse-tab-context-menu', host: {
79
78
  '(document:click)': 'closeMenu($event)',
@@ -133,9 +132,9 @@ class ReuseTabContextService {
133
132
  comp.onDestroy(() => sub$.unsubscribe());
134
133
  }
135
134
  }
136
- ReuseTabContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextService, deps: [{ token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
137
- ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextService });
138
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextService, decorators: [{
135
+ ReuseTabContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextService, deps: [{ token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
136
+ ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextService });
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextService, decorators: [{
139
138
  type: Injectable
140
139
  }], ctorParameters: function () { return [{ type: i1$1.Overlay }]; } });
141
140
 
@@ -154,9 +153,9 @@ class ReuseTabContextComponent {
154
153
  this.sub$.unsubscribe();
155
154
  }
156
155
  }
157
- ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextComponent, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Component });
158
- ReuseTabContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: { i18n: "i18n" }, outputs: { change: "change" }, ngImport: i0, template: ``, isInline: true });
159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextComponent, decorators: [{
156
+ ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextComponent, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Component });
157
+ ReuseTabContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: { i18n: "i18n" }, outputs: { change: "change" }, ngImport: i0, template: ``, isInline: true });
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextComponent, decorators: [{
160
159
  type: Component,
161
160
  args: [{
162
161
  selector: 'reuse-tab-context',
@@ -182,9 +181,9 @@ class ReuseTabContextDirective {
182
181
  event.stopPropagation();
183
182
  }
184
183
  }
185
- ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextDirective, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Directive });
186
- ReuseTabContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: { item: ["reuse-tab-context-menu", "item"], customContextMenu: "customContextMenu" }, host: { listeners: { "contextmenu": "_onContextMenu($event)" } }, exportAs: ["reuseTabContextMenu"], ngImport: i0 });
187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextDirective, decorators: [{
184
+ ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextDirective, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Directive });
185
+ ReuseTabContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: { item: ["reuse-tab-context-menu", "item"], customContextMenu: "customContextMenu" }, host: { listeners: { "contextmenu": "_onContextMenu($event)" } }, exportAs: ["reuseTabContextMenu"], ngImport: i0 });
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextDirective, decorators: [{
188
187
  type: Directive,
189
188
  args: [{
190
189
  selector: '[reuse-tab-context-menu]',
@@ -233,11 +232,28 @@ var ReuseTabMatchMode;
233
232
  ReuseTabMatchMode[ReuseTabMatchMode["URL"] = 2] = "URL";
234
233
  })(ReuseTabMatchMode || (ReuseTabMatchMode = {}));
235
234
 
235
+ const REUSE_TAB_STORAGE_KEY = new InjectionToken('REUSE_TAB_STORAGE_KEY');
236
+ const REUSE_TAB_STORAGE_STATE = new InjectionToken('REUSE_TAB_STORAGE_STATE');
237
+ class ReuseTabLocalStorageState {
238
+ get(key) {
239
+ return JSON.parse(localStorage.getItem(key) || '[]') || [];
240
+ }
241
+ update(key, value) {
242
+ localStorage.setItem(key, JSON.stringify(value));
243
+ return true;
244
+ }
245
+ remove(key) {
246
+ localStorage.removeItem(key);
247
+ }
248
+ }
249
+
236
250
  class ReuseTabService {
237
251
  // #endregion
238
- constructor(injector, menuService) {
252
+ constructor(injector, menuService, stateKey, stateSrv) {
239
253
  this.injector = injector;
240
254
  this.menuService = menuService;
255
+ this.stateKey = stateKey;
256
+ this.stateSrv = stateSrv;
241
257
  this._inited = false;
242
258
  this._max = 10;
243
259
  this._keepingScroll = false;
@@ -252,6 +268,7 @@ class ReuseTabService {
252
268
  this.mode = ReuseTabMatchMode.Menu;
253
269
  /** 排除规则,限 `mode=URL` */
254
270
  this.excludes = [];
271
+ this.storageState = false;
255
272
  }
256
273
  get snapshot() {
257
274
  return this.injector.get(ActivatedRoute).snapshot;
@@ -562,6 +579,17 @@ class ReuseTabService {
562
579
  init() {
563
580
  this.initScroll();
564
581
  this._inited = true;
582
+ this.loadState();
583
+ }
584
+ loadState() {
585
+ if (!this.storageState)
586
+ return;
587
+ this._cached = this.stateSrv.get(this.stateKey).map(v => ({
588
+ title: { text: v.title },
589
+ url: v.url,
590
+ position: v.position
591
+ }));
592
+ this._cachedChange.next({ active: 'loadState' });
565
593
  }
566
594
  getMenu(url) {
567
595
  const menus = this.menuService.getPathByUrl(url);
@@ -570,9 +598,10 @@ class ReuseTabService {
570
598
  return menus.pop();
571
599
  }
572
600
  runHook(method, comp, type = 'init') {
601
+ var _a;
573
602
  if (typeof comp === 'number') {
574
603
  const item = this._cached[comp];
575
- comp = item._handle.componentRef;
604
+ comp = (_a = item._handle) === null || _a === void 0 ? void 0 : _a.componentRef;
576
605
  }
577
606
  if (comp == null || !comp.instance) {
578
607
  return;
@@ -753,16 +782,28 @@ class ReuseTabService {
753
782
  }
754
783
  }
755
784
  }
756
- ReuseTabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabService, deps: [{ token: i0.Injector }, { token: i1.MenuService }], target: i0.ɵɵFactoryTarget.Injectable });
757
- ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabService, providedIn: 'root' });
758
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabService, decorators: [{
785
+ ReuseTabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabService, deps: [{ token: i0.Injector }, { token: i1.MenuService }, { token: REUSE_TAB_STORAGE_KEY, optional: true }, { token: REUSE_TAB_STORAGE_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
786
+ ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabService, providedIn: 'root' });
787
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabService, decorators: [{
759
788
  type: Injectable,
760
789
  args: [{ providedIn: 'root' }]
761
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.MenuService }]; } });
790
+ }], ctorParameters: function () {
791
+ return [{ type: i0.Injector }, { type: i1.MenuService }, { type: undefined, decorators: [{
792
+ type: Optional
793
+ }, {
794
+ type: Inject,
795
+ args: [REUSE_TAB_STORAGE_KEY]
796
+ }] }, { type: undefined, decorators: [{
797
+ type: Optional
798
+ }, {
799
+ type: Inject,
800
+ args: [REUSE_TAB_STORAGE_STATE]
801
+ }] }];
802
+ } });
762
803
 
763
804
  class ReuseTabComponent {
764
805
  // #endregion
765
- constructor(srv, cdr, router, route, i18nSrv, doc, platform, directionality) {
806
+ constructor(srv, cdr, router, route, i18nSrv, doc, platform, directionality, stateKey, stateSrv) {
766
807
  this.srv = srv;
767
808
  this.cdr = cdr;
768
809
  this.router = router;
@@ -771,6 +812,8 @@ class ReuseTabComponent {
771
812
  this.doc = doc;
772
813
  this.platform = platform;
773
814
  this.directionality = directionality;
815
+ this.stateKey = stateKey;
816
+ this.stateSrv = stateSrv;
774
817
  this.destroy$ = new Subject();
775
818
  this.list = [];
776
819
  this.pos = 0;
@@ -780,6 +823,7 @@ class ReuseTabComponent {
780
823
  this.debug = false;
781
824
  this.allowClose = true;
782
825
  this.keepingScroll = false;
826
+ this.storageState = false;
783
827
  this.customContextMenu = [];
784
828
  this.tabBarStyle = null;
785
829
  this.tabType = 'line';
@@ -814,6 +858,7 @@ class ReuseTabComponent {
814
858
  url: item.url,
815
859
  title: this.genTit(item.title),
816
860
  closable: this.allowClose && item.closable && this.srv.count > 0,
861
+ position: item.position,
817
862
  index,
818
863
  active: false,
819
864
  last: false
@@ -856,6 +901,11 @@ class ReuseTabComponent {
856
901
  refresh(item) {
857
902
  this.srv.runHook('_onReuseInit', this.pos === item.index ? this.srv.componentRef : item.index, 'refresh');
858
903
  }
904
+ saveState() {
905
+ if (!this.srv.inited || !this.storageState)
906
+ return;
907
+ this.stateSrv.update(this.stateKey, this.list);
908
+ }
859
909
  // #region UI
860
910
  contextMenuChange(res) {
861
911
  let fn = null;
@@ -908,9 +958,11 @@ class ReuseTabComponent {
908
958
  e.stopPropagation();
909
959
  }
910
960
  const item = this.list[idx];
911
- this.srv.close(item.url, includeNonCloseable);
912
- this.close.emit(item);
913
- this.cdr.detectChanges();
961
+ (this.canClose ? this.canClose({ item, includeNonCloseable }) : of(true)).pipe(filter(v => v)).subscribe(() => {
962
+ this.srv.close(item.url, includeNonCloseable);
963
+ this.close.emit(item);
964
+ this.cdr.detectChanges();
965
+ });
914
966
  return false;
915
967
  }
916
968
  activate(instance) {
@@ -933,6 +985,7 @@ class ReuseTabComponent {
933
985
  this.tabset.nzSelectedIndex = pos;
934
986
  this.list = ls;
935
987
  this.cdr.detectChanges();
988
+ this.saveState();
936
989
  }
937
990
  // #endregion
938
991
  ngOnInit() {
@@ -981,6 +1034,8 @@ class ReuseTabComponent {
981
1034
  this.srv.keepingScroll = this.keepingScroll;
982
1035
  this.srv.keepingScrollContainer = this._keepingScrollContainer;
983
1036
  }
1037
+ if (changes.storageState)
1038
+ this.srv.storageState = this.storageState;
984
1039
  this.srv.debug = this.debug;
985
1040
  this.cdr.detectChanges();
986
1041
  }
@@ -990,8 +1045,8 @@ class ReuseTabComponent {
990
1045
  destroy$.complete();
991
1046
  }
992
1047
  }
993
- ReuseTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabComponent, deps: [{ token: ReuseTabService }, { token: i0.ChangeDetectorRef }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }, { token: ALAIN_I18N_TOKEN, optional: true }, { token: DOCUMENT }, { token: i3.Platform }, { token: i4.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });
994
- ReuseTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: ReuseTabComponent, selector: "reuse-tab, [reuse-tab]", inputs: { mode: "mode", i18n: "i18n", debug: "debug", max: "max", tabMaxWidth: "tabMaxWidth", excludes: "excludes", allowClose: "allowClose", keepingScroll: "keepingScroll", keepingScrollContainer: "keepingScrollContainer", customContextMenu: "customContextMenu", tabBarExtraContent: "tabBarExtraContent", tabBarGutter: "tabBarGutter", tabBarStyle: "tabBarStyle", tabType: "tabType", routeParamMatchMode: "routeParamMatchMode", disabled: "disabled", titleRender: "titleRender" }, outputs: { change: "change", close: "close" }, host: { properties: { "class.reuse-tab": "true", "class.reuse-tab__line": "tabType === 'line'", "class.reuse-tab__card": "tabType === 'card'", "class.reuse-tab__disabled": "disabled", "class.reuse-tab-rtl": "dir === 'rtl'" } }, providers: [ReuseTabContextService], viewQueries: [{ propertyName: "tabset", first: true, predicate: ["tabset"], descendants: true }], exportAs: ["reuseTab"], usesOnChanges: true, ngImport: i0, template: "<nz-tabset\n #tabset\n [nzSelectedIndex]=\"pos\"\n [nzAnimated]=\"false\"\n [nzType]=\"tabType\"\n [nzTabBarExtraContent]=\"tabBarExtraContent\"\n [nzTabBarGutter]=\"tabBarGutter\"\n [nzTabBarStyle]=\"tabBarStyle\"\n>\n <nz-tab *ngFor=\"let i of list; let index = index\" [nzTitle]=\"titleTemplate\" (nzClick)=\"_to(index)\">\n <ng-template #titleTemplate>\n <div\n [reuse-tab-context-menu]=\"i\"\n [customContextMenu]=\"customContextMenu\"\n class=\"reuse-tab__name\"\n [attr.title]=\"i.title\"\n >\n <span [class.reuse-tab__name-width]=\"tabMaxWidth\" [style.max-width.px]=\"tabMaxWidth\">\n <ng-container\n *ngIf=\"titleRender; else defaultTitle\"\n [ngTemplateOutlet]=\"titleRender\"\n [ngTemplateOutletContext]=\"{ $implicit: i }\"\n ></ng-container>\n <ng-template #defaultTitle>{{ i.title }}</ng-template>\n </span>\n </div>\n <i *ngIf=\"i.closable\" nz-icon nzType=\"close\" class=\"reuse-tab__op\" (click)=\"_close($event, index, false)\"></i>\n </ng-template>\n </nz-tab>\n</nz-tabset>\n<reuse-tab-context [i18n]=\"i18n\" (change)=\"contextMenuChange($event)\"></reuse-tab-context>\n", components: [{ type: i5.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { type: i5.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: ["i18n"], outputs: ["change"] }], directives: [{ type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: ["reuse-tab-context-menu", "customContextMenu"], exportAs: ["reuseTabContextMenu"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1048
+ ReuseTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabComponent, deps: [{ token: ReuseTabService }, { token: i0.ChangeDetectorRef }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: ALAIN_I18N_TOKEN, optional: true }, { token: DOCUMENT }, { token: i3$1.Platform }, { token: i4.Directionality, optional: true }, { token: REUSE_TAB_STORAGE_KEY, optional: true }, { token: REUSE_TAB_STORAGE_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1049
+ ReuseTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ReuseTabComponent, selector: "reuse-tab, [reuse-tab]", inputs: { mode: "mode", i18n: "i18n", debug: "debug", max: "max", tabMaxWidth: "tabMaxWidth", excludes: "excludes", allowClose: "allowClose", keepingScroll: "keepingScroll", storageState: "storageState", keepingScrollContainer: "keepingScrollContainer", customContextMenu: "customContextMenu", tabBarExtraContent: "tabBarExtraContent", tabBarGutter: "tabBarGutter", tabBarStyle: "tabBarStyle", tabType: "tabType", routeParamMatchMode: "routeParamMatchMode", disabled: "disabled", titleRender: "titleRender", canClose: "canClose" }, outputs: { change: "change", close: "close" }, host: { properties: { "class.reuse-tab": "true", "class.reuse-tab__line": "tabType === 'line'", "class.reuse-tab__card": "tabType === 'card'", "class.reuse-tab__disabled": "disabled", "class.reuse-tab-rtl": "dir === 'rtl'" } }, providers: [ReuseTabContextService], viewQueries: [{ propertyName: "tabset", first: true, predicate: ["tabset"], descendants: true }], exportAs: ["reuseTab"], usesOnChanges: true, ngImport: i0, template: "<nz-tabset\n #tabset\n [nzSelectedIndex]=\"pos\"\n [nzAnimated]=\"false\"\n [nzType]=\"tabType\"\n [nzTabBarExtraContent]=\"tabBarExtraContent\"\n [nzTabBarGutter]=\"tabBarGutter\"\n [nzTabBarStyle]=\"tabBarStyle\"\n>\n <nz-tab *ngFor=\"let i of list; let index = index\" [nzTitle]=\"titleTemplate\" (nzClick)=\"_to(index)\">\n <ng-template #titleTemplate>\n <div\n [reuse-tab-context-menu]=\"i\"\n [customContextMenu]=\"customContextMenu\"\n class=\"reuse-tab__name\"\n [attr.title]=\"i.title\"\n >\n <span [class.reuse-tab__name-width]=\"tabMaxWidth\" [style.max-width.px]=\"tabMaxWidth\">\n <ng-container\n *ngIf=\"titleRender; else defaultTitle\"\n [ngTemplateOutlet]=\"titleRender\"\n [ngTemplateOutletContext]=\"{ $implicit: i }\"\n ></ng-container>\n <ng-template #defaultTitle>{{ i.title }}</ng-template>\n </span>\n </div>\n <i *ngIf=\"i.closable\" nz-icon nzType=\"close\" class=\"reuse-tab__op\" (click)=\"_close($event, index, false)\"></i>\n </ng-template>\n </nz-tab>\n</nz-tabset>\n<reuse-tab-context [i18n]=\"i18n\" (change)=\"contextMenuChange($event)\"></reuse-tab-context>\n", dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i6.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "directive", type: i7.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: ["i18n"], outputs: ["change"] }, { kind: "directive", type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: ["reuse-tab-context-menu", "customContextMenu"], exportAs: ["reuseTabContextMenu"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
995
1050
  __decorate([
996
1051
  InputBoolean()
997
1052
  ], ReuseTabComponent.prototype, "debug", void 0);
@@ -1007,10 +1062,13 @@ __decorate([
1007
1062
  __decorate([
1008
1063
  InputBoolean()
1009
1064
  ], ReuseTabComponent.prototype, "keepingScroll", void 0);
1065
+ __decorate([
1066
+ InputBoolean()
1067
+ ], ReuseTabComponent.prototype, "storageState", void 0);
1010
1068
  __decorate([
1011
1069
  InputBoolean()
1012
1070
  ], ReuseTabComponent.prototype, "disabled", void 0);
1013
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabComponent, decorators: [{
1071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabComponent, decorators: [{
1014
1072
  type: Component,
1015
1073
  args: [{ selector: 'reuse-tab, [reuse-tab]', exportAs: 'reuseTab', host: {
1016
1074
  '[class.reuse-tab]': 'true',
@@ -1020,7 +1078,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1020
1078
  '[class.reuse-tab-rtl]': `dir === 'rtl'`
1021
1079
  }, providers: [ReuseTabContextService], preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<nz-tabset\n #tabset\n [nzSelectedIndex]=\"pos\"\n [nzAnimated]=\"false\"\n [nzType]=\"tabType\"\n [nzTabBarExtraContent]=\"tabBarExtraContent\"\n [nzTabBarGutter]=\"tabBarGutter\"\n [nzTabBarStyle]=\"tabBarStyle\"\n>\n <nz-tab *ngFor=\"let i of list; let index = index\" [nzTitle]=\"titleTemplate\" (nzClick)=\"_to(index)\">\n <ng-template #titleTemplate>\n <div\n [reuse-tab-context-menu]=\"i\"\n [customContextMenu]=\"customContextMenu\"\n class=\"reuse-tab__name\"\n [attr.title]=\"i.title\"\n >\n <span [class.reuse-tab__name-width]=\"tabMaxWidth\" [style.max-width.px]=\"tabMaxWidth\">\n <ng-container\n *ngIf=\"titleRender; else defaultTitle\"\n [ngTemplateOutlet]=\"titleRender\"\n [ngTemplateOutletContext]=\"{ $implicit: i }\"\n ></ng-container>\n <ng-template #defaultTitle>{{ i.title }}</ng-template>\n </span>\n </div>\n <i *ngIf=\"i.closable\" nz-icon nzType=\"close\" class=\"reuse-tab__op\" (click)=\"_close($event, index, false)\"></i>\n </ng-template>\n </nz-tab>\n</nz-tabset>\n<reuse-tab-context [i18n]=\"i18n\" (change)=\"contextMenuChange($event)\"></reuse-tab-context>\n" }]
1022
1080
  }], ctorParameters: function () {
1023
- return [{ type: ReuseTabService }, { type: i0.ChangeDetectorRef }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }, { type: undefined, decorators: [{
1081
+ return [{ type: ReuseTabService }, { type: i0.ChangeDetectorRef }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: undefined, decorators: [{
1024
1082
  type: Optional
1025
1083
  }, {
1026
1084
  type: Inject,
@@ -1028,8 +1086,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1028
1086
  }] }, { type: undefined, decorators: [{
1029
1087
  type: Inject,
1030
1088
  args: [DOCUMENT]
1031
- }] }, { type: i3.Platform }, { type: i4.Directionality, decorators: [{
1089
+ }] }, { type: i3$1.Platform }, { type: i4.Directionality, decorators: [{
1090
+ type: Optional
1091
+ }] }, { type: undefined, decorators: [{
1032
1092
  type: Optional
1093
+ }, {
1094
+ type: Inject,
1095
+ args: [REUSE_TAB_STORAGE_KEY]
1096
+ }] }, { type: undefined, decorators: [{
1097
+ type: Optional
1098
+ }, {
1099
+ type: Inject,
1100
+ args: [REUSE_TAB_STORAGE_STATE]
1033
1101
  }] }];
1034
1102
  }, propDecorators: { tabset: [{
1035
1103
  type: ViewChild,
@@ -1050,6 +1118,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1050
1118
  type: Input
1051
1119
  }], keepingScroll: [{
1052
1120
  type: Input
1121
+ }], storageState: [{
1122
+ type: Input
1053
1123
  }], keepingScrollContainer: [{
1054
1124
  type: Input
1055
1125
  }], customContextMenu: [{
@@ -1068,6 +1138,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1068
1138
  type: Input
1069
1139
  }], titleRender: [{
1070
1140
  type: Input
1141
+ }], canClose: [{
1142
+ type: Input
1071
1143
  }], change: [{
1072
1144
  type: Output
1073
1145
  }], close: [{
@@ -1099,14 +1171,33 @@ const COMPONENTS = [ReuseTabComponent];
1099
1171
  const NOEXPORTS = [ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective];
1100
1172
  class ReuseTabModule {
1101
1173
  }
1102
- ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1103
- ReuseTabModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabModule, declarations: [ReuseTabComponent, ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule], exports: [ReuseTabComponent] });
1104
- ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabModule, imports: [[CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule]] });
1105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabModule, decorators: [{
1174
+ ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1175
+ ReuseTabModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabModule, declarations: [ReuseTabComponent, ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule], exports: [ReuseTabComponent] });
1176
+ ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabModule, providers: [
1177
+ {
1178
+ provide: REUSE_TAB_STORAGE_KEY,
1179
+ useValue: '_reuse-tab-state'
1180
+ },
1181
+ {
1182
+ provide: REUSE_TAB_STORAGE_STATE,
1183
+ useFactory: () => new ReuseTabLocalStorageState()
1184
+ }
1185
+ ], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule] });
1186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabModule, decorators: [{
1106
1187
  type: NgModule,
1107
1188
  args: [{
1108
1189
  imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule],
1109
1190
  declarations: [...COMPONENTS, ...NOEXPORTS],
1191
+ providers: [
1192
+ {
1193
+ provide: REUSE_TAB_STORAGE_KEY,
1194
+ useValue: '_reuse-tab-state'
1195
+ },
1196
+ {
1197
+ provide: REUSE_TAB_STORAGE_STATE,
1198
+ useFactory: () => new ReuseTabLocalStorageState()
1199
+ }
1200
+ ],
1110
1201
  exports: COMPONENTS
1111
1202
  }]
1112
1203
  }] });
@@ -1115,5 +1206,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1115
1206
  * Generated bundle index. Do not edit.
1116
1207
  */
1117
1208
 
1118
- export { ReuseTabComponent, ReuseTabContextComponent, ReuseTabContextDirective, ReuseTabContextMenuComponent, ReuseTabContextService, ReuseTabMatchMode, ReuseTabModule, ReuseTabService, ReuseTabStrategy };
1209
+ export { REUSE_TAB_STORAGE_KEY, REUSE_TAB_STORAGE_STATE, ReuseTabComponent, ReuseTabContextComponent, ReuseTabContextDirective, ReuseTabContextMenuComponent, ReuseTabContextService, ReuseTabLocalStorageState, ReuseTabMatchMode, ReuseTabModule, ReuseTabService, ReuseTabStrategy };
1119
1210
  //# sourceMappingURL=reuse-tab.mjs.map