@delon/abc 13.5.2 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) 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 +5 -5
  18. package/esm2020/avatar-list/avatar-list-item.component.mjs +4 -4
  19. package/esm2020/avatar-list/avatar-list.component.mjs +6 -6
  20. package/esm2020/avatar-list/avatar-list.module.mjs +5 -5
  21. package/esm2020/count-down/count-down.component.mjs +6 -6
  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 +5 -5
  25. package/esm2020/date-picker/range.directive.mjs +8 -10
  26. package/esm2020/down-file/down-file.directive.mjs +4 -4
  27. package/esm2020/down-file/down-file.module.mjs +5 -5
  28. package/esm2020/ellipsis/ellipsis.component.mjs +6 -6
  29. package/esm2020/ellipsis/ellipsis.module.mjs +5 -5
  30. package/esm2020/error-collect/error-collect.component.mjs +5 -5
  31. package/esm2020/error-collect/error-collect.module.mjs +5 -5
  32. package/esm2020/exception/exception.component.mjs +8 -8
  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 +4 -4
  37. package/esm2020/full-content/full-content.component.mjs +4 -4
  38. package/esm2020/full-content/full-content.module.mjs +5 -5
  39. package/esm2020/full-content/full-content.service.mjs +4 -4
  40. package/esm2020/global-footer/global-footer-item.component.mjs +4 -4
  41. package/esm2020/global-footer/global-footer.component.mjs +4 -4
  42. package/esm2020/global-footer/global-footer.module.mjs +5 -5
  43. package/esm2020/let/let.directive.mjs +4 -4
  44. package/esm2020/let/let.module.mjs +5 -5
  45. package/esm2020/loading/loading.component.mjs +7 -7
  46. package/esm2020/loading/loading.module.mjs +5 -5
  47. package/esm2020/loading/loading.service.mjs +8 -5
  48. package/esm2020/lodop/lodop.module.mjs +5 -5
  49. package/esm2020/lodop/lodop.service.mjs +4 -4
  50. package/esm2020/media/media.component.mjs +4 -4
  51. package/esm2020/media/media.module.mjs +5 -5
  52. package/esm2020/media/media.service.mjs +4 -4
  53. package/esm2020/notice-icon/notice-icon-tab.component.mjs +7 -7
  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 +10 -10
  60. package/esm2020/onboarding/onboarding.module.mjs +7 -5
  61. package/esm2020/onboarding/onboarding.service.mjs +8 -7
  62. package/esm2020/page-header/page-header.component.mjs +9 -9
  63. package/esm2020/page-header/page-header.module.mjs +5 -5
  64. package/esm2020/pdf/pdf.component.mjs +17 -14
  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 +4 -4
  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 +7 -7
  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 +6 -6
  75. package/esm2020/reuse-tab/reuse-tab-context.component.mjs +4 -4
  76. package/esm2020/reuse-tab/reuse-tab-context.directive.mjs +4 -4
  77. package/esm2020/reuse-tab/reuse-tab-context.service.mjs +4 -4
  78. package/esm2020/reuse-tab/reuse-tab.component.mjs +46 -14
  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 +8 -8
  84. package/esm2020/se/se.component.mjs +14 -10
  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 +4 -4
  90. package/esm2020/st/st-data-source.mjs +26 -11
  91. package/esm2020/st/st-export.mjs +4 -4
  92. package/esm2020/st/st-filter.component.mjs +13 -13
  93. package/esm2020/st/st-row.directive.mjs +7 -7
  94. package/esm2020/st/st-widget-host.directive.mjs +4 -4
  95. package/esm2020/st/st-widget.mjs +4 -4
  96. package/esm2020/st/st.component.mjs +28 -26
  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 +5 -5
  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 +4 -4
  105. package/esm2020/tag-select/tag-select.module.mjs +5 -5
  106. package/esm2020/xlsx/xlsx.directive.mjs +4 -4
  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 +13 -13
  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 +7 -7
  125. package/fesm2015/down-file.mjs.map +1 -1
  126. package/fesm2015/ellipsis.mjs +9 -9
  127. package/fesm2015/ellipsis.mjs.map +1 -1
  128. package/fesm2015/error-collect.mjs +8 -8
  129. package/fesm2015/error-collect.mjs.map +1 -1
  130. package/fesm2015/exception.mjs +14 -14
  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 +13 -13
  135. package/fesm2015/full-content.mjs.map +1 -1
  136. package/fesm2015/global-footer.mjs +10 -10
  137. package/fesm2015/global-footer.mjs.map +1 -1
  138. package/fesm2015/let.mjs +7 -7
  139. package/fesm2015/let.mjs.map +1 -1
  140. package/fesm2015/loading.mjs +18 -15
  141. package/fesm2015/loading.mjs.map +1 -1
  142. package/fesm2015/lodop.mjs +7 -7
  143. package/fesm2015/lodop.mjs.map +1 -1
  144. package/fesm2015/media.mjs +10 -10
  145. package/fesm2015/media.mjs.map +1 -1
  146. package/fesm2015/notice-icon.mjs +31 -33
  147. package/fesm2015/notice-icon.mjs.map +1 -1
  148. package/fesm2015/onboarding.mjs +23 -21
  149. package/fesm2015/onboarding.mjs.map +1 -1
  150. package/fesm2015/page-header.mjs +14 -14
  151. package/fesm2015/page-header.mjs.map +1 -1
  152. package/fesm2015/pdf.mjs +20 -17
  153. package/fesm2015/pdf.mjs.map +1 -1
  154. package/fesm2015/qr.mjs +7 -7
  155. package/fesm2015/qr.mjs.map +1 -1
  156. package/fesm2015/quick-menu.mjs +10 -10
  157. package/fesm2015/quick-menu.mjs.map +1 -1
  158. package/fesm2015/result.mjs +11 -11
  159. package/fesm2015/result.mjs.map +1 -1
  160. package/fesm2015/reuse-tab.mjs +133 -41
  161. package/fesm2015/reuse-tab.mjs.map +1 -1
  162. package/fesm2015/se.mjs +24 -20
  163. package/fesm2015/se.mjs.map +1 -1
  164. package/fesm2015/sg.mjs +10 -10
  165. package/fesm2015/sg.mjs.map +1 -1
  166. package/fesm2015/st.mjs +112 -96
  167. package/fesm2015/st.mjs.map +1 -1
  168. package/fesm2015/sv.mjs +20 -20
  169. package/fesm2015/sv.mjs.map +1 -1
  170. package/fesm2015/tag-select.mjs +7 -7
  171. package/fesm2015/tag-select.mjs.map +1 -1
  172. package/fesm2015/xlsx.mjs +10 -10
  173. package/fesm2015/xlsx.mjs.map +1 -1
  174. package/fesm2015/zip.mjs +17 -15
  175. package/fesm2015/zip.mjs.map +1 -1
  176. package/fesm2020/auto-focus.mjs +7 -7
  177. package/fesm2020/auto-focus.mjs.map +1 -1
  178. package/fesm2020/avatar-list.mjs +13 -13
  179. package/fesm2020/avatar-list.mjs.map +1 -1
  180. package/fesm2020/chart-observer-size.mjs +123 -0
  181. package/fesm2020/chart-observer-size.mjs.map +1 -0
  182. package/fesm2020/count-down.mjs +10 -10
  183. package/fesm2020/count-down.mjs.map +1 -1
  184. package/fesm2020/date-picker.mjs +15 -17
  185. package/fesm2020/date-picker.mjs.map +1 -1
  186. package/fesm2020/down-file.mjs +7 -7
  187. package/fesm2020/down-file.mjs.map +1 -1
  188. package/fesm2020/ellipsis.mjs +9 -9
  189. package/fesm2020/ellipsis.mjs.map +1 -1
  190. package/fesm2020/error-collect.mjs +8 -8
  191. package/fesm2020/error-collect.mjs.map +1 -1
  192. package/fesm2020/exception.mjs +14 -14
  193. package/fesm2020/exception.mjs.map +1 -1
  194. package/fesm2020/footer-toolbar.mjs +10 -10
  195. package/fesm2020/footer-toolbar.mjs.map +1 -1
  196. package/fesm2020/full-content.mjs +13 -13
  197. package/fesm2020/full-content.mjs.map +1 -1
  198. package/fesm2020/global-footer.mjs +10 -10
  199. package/fesm2020/global-footer.mjs.map +1 -1
  200. package/fesm2020/let.mjs +7 -7
  201. package/fesm2020/let.mjs.map +1 -1
  202. package/fesm2020/loading.mjs +18 -15
  203. package/fesm2020/loading.mjs.map +1 -1
  204. package/fesm2020/lodop.mjs +7 -7
  205. package/fesm2020/lodop.mjs.map +1 -1
  206. package/fesm2020/media.mjs +10 -10
  207. package/fesm2020/media.mjs.map +1 -1
  208. package/fesm2020/notice-icon.mjs +31 -33
  209. package/fesm2020/notice-icon.mjs.map +1 -1
  210. package/fesm2020/onboarding.mjs +23 -21
  211. package/fesm2020/onboarding.mjs.map +1 -1
  212. package/fesm2020/page-header.mjs +14 -14
  213. package/fesm2020/page-header.mjs.map +1 -1
  214. package/fesm2020/pdf.mjs +20 -17
  215. package/fesm2020/pdf.mjs.map +1 -1
  216. package/fesm2020/qr.mjs +7 -7
  217. package/fesm2020/qr.mjs.map +1 -1
  218. package/fesm2020/quick-menu.mjs +10 -10
  219. package/fesm2020/quick-menu.mjs.map +1 -1
  220. package/fesm2020/result.mjs +11 -11
  221. package/fesm2020/result.mjs.map +1 -1
  222. package/fesm2020/reuse-tab.mjs +130 -41
  223. package/fesm2020/reuse-tab.mjs.map +1 -1
  224. package/fesm2020/se.mjs +24 -20
  225. package/fesm2020/se.mjs.map +1 -1
  226. package/fesm2020/sg.mjs +10 -10
  227. package/fesm2020/sg.mjs.map +1 -1
  228. package/fesm2020/st.mjs +112 -96
  229. package/fesm2020/st.mjs.map +1 -1
  230. package/fesm2020/sv.mjs +20 -20
  231. package/fesm2020/sv.mjs.map +1 -1
  232. package/fesm2020/tag-select.mjs +7 -7
  233. package/fesm2020/tag-select.mjs.map +1 -1
  234. package/fesm2020/xlsx.mjs +10 -10
  235. package/fesm2020/xlsx.mjs.map +1 -1
  236. package/fesm2020/zip.mjs +17 -15
  237. package/fesm2020/zip.mjs.map +1 -1
  238. package/footer-toolbar/footer-toolbar.component.d.ts +1 -1
  239. package/footer-toolbar/{footer-toolbar.d.ts → index.d.ts} +0 -0
  240. package/full-content/full-content-toggle.directive.d.ts +1 -1
  241. package/full-content/full-content.component.d.ts +1 -1
  242. package/full-content/{full-content.d.ts → index.d.ts} +0 -0
  243. package/global-footer/global-footer-item.component.d.ts +1 -1
  244. package/global-footer/global-footer.component.d.ts +1 -1
  245. package/global-footer/{global-footer.d.ts → index.d.ts} +0 -0
  246. package/{abc.d.ts → index.d.ts} +0 -0
  247. package/let/let.directive.d.ts +1 -1
  248. package/loading/{loading.d.ts → index.d.ts} +0 -0
  249. package/loading/loading.component.d.ts +1 -1
  250. package/lodop/{lodop.d.ts → index.d.ts} +0 -0
  251. package/media/{media.d.ts → index.d.ts} +0 -0
  252. package/media/media.component.d.ts +1 -1
  253. package/notice-icon/{notice-icon.d.ts → index.d.ts} +0 -0
  254. package/notice-icon/notice-icon-tab.component.d.ts +1 -1
  255. package/notice-icon/notice-icon.component.d.ts +1 -1
  256. package/observers/index.d.ts +5 -0
  257. package/observers/observer-size.d.ts +32 -0
  258. package/observers/public-api.d.ts +1 -0
  259. package/onboarding/{onboarding.d.ts → index.d.ts} +0 -0
  260. package/onboarding/onboarding.component.d.ts +1 -1
  261. package/package.json +49 -49
  262. package/page-header/{page-header.d.ts → index.d.ts} +0 -0
  263. package/page-header/page-header.component.d.ts +1 -1
  264. package/page-header/style/index.less +3 -2
  265. package/pdf/{pdf.d.ts → index.d.ts} +0 -0
  266. package/pdf/pdf.component.d.ts +20 -13
  267. package/pdf/pdf.types.d.ts +2 -1
  268. package/qr/{qr.d.ts → index.d.ts} +0 -0
  269. package/qr/qr.component.d.ts +1 -1
  270. package/quick-menu/{quick-menu.d.ts → index.d.ts} +0 -0
  271. package/quick-menu/quick-menu.component.d.ts +1 -1
  272. package/result/{result.d.ts → index.d.ts} +0 -0
  273. package/result/result.component.d.ts +1 -1
  274. package/reuse-tab/{reuse-tab.d.ts → index.d.ts} +0 -0
  275. package/reuse-tab/public_api.d.ts +1 -0
  276. package/reuse-tab/reuse-tab-context-menu.component.d.ts +1 -1
  277. package/reuse-tab/reuse-tab-context.component.d.ts +1 -1
  278. package/reuse-tab/reuse-tab-context.directive.d.ts +1 -1
  279. package/reuse-tab/reuse-tab.component.d.ts +11 -4
  280. package/reuse-tab/reuse-tab.interfaces.d.ts +10 -3
  281. package/reuse-tab/reuse-tab.service.d.ts +7 -2
  282. package/reuse-tab/reuse-tab.state.d.ts +14 -0
  283. package/se/{se.d.ts → index.d.ts} +0 -0
  284. package/se/se-container.component.d.ts +2 -2
  285. package/se/se.component.d.ts +5 -3
  286. package/sg/{sg.d.ts → index.d.ts} +0 -0
  287. package/sg/sg-container.component.d.ts +1 -1
  288. package/sg/sg.component.d.ts +1 -1
  289. package/st/{st.d.ts → index.d.ts} +0 -0
  290. package/st/st-filter.component.d.ts +1 -1
  291. package/st/st-row.directive.d.ts +1 -1
  292. package/st/st-widget-host.directive.d.ts +1 -1
  293. package/st/st.component.d.ts +2 -2
  294. package/st/st.interfaces.d.ts +14 -1
  295. package/sv/{sv.d.ts → index.d.ts} +0 -0
  296. package/sv/sv-container.component.d.ts +2 -2
  297. package/sv/sv-value.component.d.ts +1 -1
  298. package/sv/sv.component.d.ts +1 -1
  299. package/tag-select/{tag-select.d.ts → index.d.ts} +0 -0
  300. package/tag-select/tag-select.component.d.ts +1 -1
  301. package/xlsx/{xlsx.d.ts → index.d.ts} +0 -0
  302. package/xlsx/xlsx.directive.d.ts +1 -1
  303. package/zip/{zip.d.ts → index.d.ts} +0 -0
  304. package/zip/zip.service.d.ts +5 -5
  305. package/zip/zip.types.d.ts +4 -4
  306. package/auto-focus/auto-focus.d.ts +0 -5
  307. package/auto-focus/package.json +0 -10
  308. package/avatar-list/package.json +0 -10
  309. package/count-down/package.json +0 -10
  310. package/date-picker/package.json +0 -10
  311. package/down-file/package.json +0 -10
  312. package/ellipsis/package.json +0 -10
  313. package/error-collect/package.json +0 -10
  314. package/esm2020/image/image.directive.mjs +0 -145
  315. package/esm2020/image/image.mjs +0 -5
  316. package/esm2020/image/image.module.mjs +0 -20
  317. package/esm2020/image/public_api.mjs +0 -3
  318. package/exception/package.json +0 -10
  319. package/fesm2015/image.mjs +0 -164
  320. package/fesm2015/image.mjs.map +0 -1
  321. package/fesm2020/image.mjs +0 -169
  322. package/fesm2020/image.mjs.map +0 -1
  323. package/footer-toolbar/package.json +0 -10
  324. package/full-content/package.json +0 -10
  325. package/global-footer/package.json +0 -10
  326. package/image/image.d.ts +0 -5
  327. package/image/image.directive.d.ts +0 -40
  328. package/image/image.module.d.ts +0 -9
  329. package/image/package.json +0 -10
  330. package/image/public_api.d.ts +0 -2
  331. package/let/let.d.ts +0 -5
  332. package/let/package.json +0 -10
  333. package/loading/package.json +0 -10
  334. package/lodop/package.json +0 -10
  335. package/media/package.json +0 -10
  336. package/notice-icon/package.json +0 -10
  337. package/onboarding/package.json +0 -10
  338. package/page-header/package.json +0 -10
  339. package/pdf/package.json +0 -10
  340. package/qr/package.json +0 -10
  341. package/quick-menu/package.json +0 -10
  342. package/result/package.json +0 -10
  343. package/reuse-tab/package.json +0 -10
  344. package/se/package.json +0 -10
  345. package/sg/package.json +0 -10
  346. package/st/package.json +0 -10
  347. package/sv/package.json +0 -10
  348. package/tag-select/package.json +0 -10
  349. package/xlsx/package.json +0 -10
  350. package/zip/package.json +0 -10
@@ -1,25 +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, takeUntil, filter, debounceTime } 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
14
  import { InputBoolean, InputNumber } from '@delon/util/decorator';
15
- import * as i2$1 from '@angular/router';
15
+ import * as i2 from '@angular/router';
16
16
  import { ActivatedRoute, Router, ROUTER_CONFIGURATION, NavigationStart, NavigationEnd, RouterModule } from '@angular/router';
17
17
  import { ScrollService } from '@delon/util/browser';
18
- import * as i3 from '@angular/cdk/platform';
18
+ import * as i3$1 from '@angular/cdk/platform';
19
19
  import * as i4 from '@angular/cdk/bidi';
20
- import * as i5 from 'ng-zorro-antd/tabs';
20
+ import * as i6 from 'ng-zorro-antd/tabs';
21
21
  import { NzTabsModule } from 'ng-zorro-antd/tabs';
22
- import * as i9 from 'ng-zorro-antd/icon';
22
+ import * as i7 from 'ng-zorro-antd/icon';
23
23
  import { NzIconModule } from 'ng-zorro-antd/icon';
24
24
 
25
25
  class ReuseTabContextMenuComponent {
@@ -70,9 +70,9 @@ class ReuseTabContextMenuComponent {
70
70
  this.notify(null);
71
71
  }
72
72
  }
73
- ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabContextMenuComponent, deps: [{ token: i1.DelonLocaleService }], target: i0.ɵɵFactoryTarget.Component });
74
- ReuseTabContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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 });
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", 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: [{
76
76
  type: Component,
77
77
  args: [{ selector: 'reuse-tab-context-menu', host: {
78
78
  '(document:click)': 'closeMenu($event)',
@@ -132,9 +132,9 @@ class ReuseTabContextService {
132
132
  comp.onDestroy(() => sub$.unsubscribe());
133
133
  }
134
134
  }
135
- ReuseTabContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabContextService, deps: [{ token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
136
- ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabContextService });
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", 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: [{
138
138
  type: Injectable
139
139
  }], ctorParameters: function () { return [{ type: i1$1.Overlay }]; } });
140
140
 
@@ -153,9 +153,9 @@ class ReuseTabContextComponent {
153
153
  this.sub$.unsubscribe();
154
154
  }
155
155
  }
156
- ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabContextComponent, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Component });
157
- ReuseTabContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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: "13.3.11", 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: [{
159
159
  type: Component,
160
160
  args: [{
161
161
  selector: 'reuse-tab-context',
@@ -181,9 +181,9 @@ class ReuseTabContextDirective {
181
181
  event.stopPropagation();
182
182
  }
183
183
  }
184
- ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabContextDirective, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Directive });
185
- ReuseTabContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", 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: "13.3.11", 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: [{
187
187
  type: Directive,
188
188
  args: [{
189
189
  selector: '[reuse-tab-context-menu]',
@@ -232,11 +232,28 @@ var ReuseTabMatchMode;
232
232
  ReuseTabMatchMode[ReuseTabMatchMode["URL"] = 2] = "URL";
233
233
  })(ReuseTabMatchMode || (ReuseTabMatchMode = {}));
234
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
+
235
250
  class ReuseTabService {
236
251
  // #endregion
237
- constructor(injector, menuService) {
252
+ constructor(injector, menuService, stateKey, stateSrv) {
238
253
  this.injector = injector;
239
254
  this.menuService = menuService;
255
+ this.stateKey = stateKey;
256
+ this.stateSrv = stateSrv;
240
257
  this._inited = false;
241
258
  this._max = 10;
242
259
  this._keepingScroll = false;
@@ -251,6 +268,7 @@ class ReuseTabService {
251
268
  this.mode = ReuseTabMatchMode.Menu;
252
269
  /** 排除规则,限 `mode=URL` */
253
270
  this.excludes = [];
271
+ this.storageState = false;
254
272
  }
255
273
  get snapshot() {
256
274
  return this.injector.get(ActivatedRoute).snapshot;
@@ -561,6 +579,17 @@ class ReuseTabService {
561
579
  init() {
562
580
  this.initScroll();
563
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' });
564
593
  }
565
594
  getMenu(url) {
566
595
  const menus = this.menuService.getPathByUrl(url);
@@ -569,9 +598,10 @@ class ReuseTabService {
569
598
  return menus.pop();
570
599
  }
571
600
  runHook(method, comp, type = 'init') {
601
+ var _a;
572
602
  if (typeof comp === 'number') {
573
603
  const item = this._cached[comp];
574
- comp = item._handle.componentRef;
604
+ comp = (_a = item._handle) === null || _a === void 0 ? void 0 : _a.componentRef;
575
605
  }
576
606
  if (comp == null || !comp.instance) {
577
607
  return;
@@ -752,16 +782,28 @@ class ReuseTabService {
752
782
  }
753
783
  }
754
784
  }
755
- ReuseTabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabService, deps: [{ token: i0.Injector }, { token: i1.MenuService }], target: i0.ɵɵFactoryTarget.Injectable });
756
- ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabService, providedIn: 'root' });
757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", 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: [{
758
788
  type: Injectable,
759
789
  args: [{ providedIn: 'root' }]
760
- }], 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
+ } });
761
803
 
762
804
  class ReuseTabComponent {
763
805
  // #endregion
764
- constructor(srv, cdr, router, route, i18nSrv, doc, platform, directionality) {
806
+ constructor(srv, cdr, router, route, i18nSrv, doc, platform, directionality, stateKey, stateSrv) {
765
807
  this.srv = srv;
766
808
  this.cdr = cdr;
767
809
  this.router = router;
@@ -770,6 +812,8 @@ class ReuseTabComponent {
770
812
  this.doc = doc;
771
813
  this.platform = platform;
772
814
  this.directionality = directionality;
815
+ this.stateKey = stateKey;
816
+ this.stateSrv = stateSrv;
773
817
  this.destroy$ = new Subject();
774
818
  this.list = [];
775
819
  this.pos = 0;
@@ -779,6 +823,7 @@ class ReuseTabComponent {
779
823
  this.debug = false;
780
824
  this.allowClose = true;
781
825
  this.keepingScroll = false;
826
+ this.storageState = false;
782
827
  this.customContextMenu = [];
783
828
  this.tabBarStyle = null;
784
829
  this.tabType = 'line';
@@ -813,6 +858,7 @@ class ReuseTabComponent {
813
858
  url: item.url,
814
859
  title: this.genTit(item.title),
815
860
  closable: this.allowClose && item.closable && this.srv.count > 0,
861
+ position: item.position,
816
862
  index,
817
863
  active: false,
818
864
  last: false
@@ -855,6 +901,11 @@ class ReuseTabComponent {
855
901
  refresh(item) {
856
902
  this.srv.runHook('_onReuseInit', this.pos === item.index ? this.srv.componentRef : item.index, 'refresh');
857
903
  }
904
+ saveState() {
905
+ if (!this.srv.inited || !this.storageState)
906
+ return;
907
+ this.stateSrv.update(this.stateKey, this.list);
908
+ }
858
909
  // #region UI
859
910
  contextMenuChange(res) {
860
911
  let fn = null;
@@ -907,9 +958,11 @@ class ReuseTabComponent {
907
958
  e.stopPropagation();
908
959
  }
909
960
  const item = this.list[idx];
910
- this.srv.close(item.url, includeNonCloseable);
911
- this.close.emit(item);
912
- 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
+ });
913
966
  return false;
914
967
  }
915
968
  activate(instance) {
@@ -932,6 +985,7 @@ class ReuseTabComponent {
932
985
  this.tabset.nzSelectedIndex = pos;
933
986
  this.list = ls;
934
987
  this.cdr.detectChanges();
988
+ this.saveState();
935
989
  }
936
990
  // #endregion
937
991
  ngOnInit() {
@@ -980,6 +1034,8 @@ class ReuseTabComponent {
980
1034
  this.srv.keepingScroll = this.keepingScroll;
981
1035
  this.srv.keepingScrollContainer = this._keepingScrollContainer;
982
1036
  }
1037
+ if (changes.storageState)
1038
+ this.srv.storageState = this.storageState;
983
1039
  this.srv.debug = this.debug;
984
1040
  this.cdr.detectChanges();
985
1041
  }
@@ -989,8 +1045,8 @@ class ReuseTabComponent {
989
1045
  destroy$.complete();
990
1046
  }
991
1047
  }
992
- ReuseTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", 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 });
993
- ReuseTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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 });
994
1050
  __decorate([
995
1051
  InputBoolean()
996
1052
  ], ReuseTabComponent.prototype, "debug", void 0);
@@ -1006,10 +1062,13 @@ __decorate([
1006
1062
  __decorate([
1007
1063
  InputBoolean()
1008
1064
  ], ReuseTabComponent.prototype, "keepingScroll", void 0);
1065
+ __decorate([
1066
+ InputBoolean()
1067
+ ], ReuseTabComponent.prototype, "storageState", void 0);
1009
1068
  __decorate([
1010
1069
  InputBoolean()
1011
1070
  ], ReuseTabComponent.prototype, "disabled", void 0);
1012
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabComponent, decorators: [{
1071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabComponent, decorators: [{
1013
1072
  type: Component,
1014
1073
  args: [{ selector: 'reuse-tab, [reuse-tab]', exportAs: 'reuseTab', host: {
1015
1074
  '[class.reuse-tab]': 'true',
@@ -1019,7 +1078,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1019
1078
  '[class.reuse-tab-rtl]': `dir === 'rtl'`
1020
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" }]
1021
1080
  }], ctorParameters: function () {
1022
- 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: [{
1023
1082
  type: Optional
1024
1083
  }, {
1025
1084
  type: Inject,
@@ -1027,8 +1086,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1027
1086
  }] }, { type: undefined, decorators: [{
1028
1087
  type: Inject,
1029
1088
  args: [DOCUMENT]
1030
- }] }, { type: i3.Platform }, { type: i4.Directionality, decorators: [{
1089
+ }] }, { type: i3$1.Platform }, { type: i4.Directionality, decorators: [{
1090
+ type: Optional
1091
+ }] }, { type: undefined, decorators: [{
1031
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]
1032
1101
  }] }];
1033
1102
  }, propDecorators: { tabset: [{
1034
1103
  type: ViewChild,
@@ -1049,6 +1118,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1049
1118
  type: Input
1050
1119
  }], keepingScroll: [{
1051
1120
  type: Input
1121
+ }], storageState: [{
1122
+ type: Input
1052
1123
  }], keepingScrollContainer: [{
1053
1124
  type: Input
1054
1125
  }], customContextMenu: [{
@@ -1067,6 +1138,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1067
1138
  type: Input
1068
1139
  }], titleRender: [{
1069
1140
  type: Input
1141
+ }], canClose: [{
1142
+ type: Input
1070
1143
  }], change: [{
1071
1144
  type: Output
1072
1145
  }], close: [{
@@ -1098,14 +1171,33 @@ const COMPONENTS = [ReuseTabComponent];
1098
1171
  const NOEXPORTS = [ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective];
1099
1172
  class ReuseTabModule {
1100
1173
  }
1101
- ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1102
- ReuseTabModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabModule, declarations: [ReuseTabComponent, ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule], exports: [ReuseTabComponent] });
1103
- ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ReuseTabModule, imports: [[CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule]] });
1104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", 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: [{
1105
1187
  type: NgModule,
1106
1188
  args: [{
1107
1189
  imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule],
1108
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
+ ],
1109
1201
  exports: COMPONENTS
1110
1202
  }]
1111
1203
  }] });
@@ -1114,5 +1206,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1114
1206
  * Generated bundle index. Do not edit.
1115
1207
  */
1116
1208
 
1117
- 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 };
1118
1210
  //# sourceMappingURL=reuse-tab.mjs.map