@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 {
@@ -74,9 +73,9 @@ class ReuseTabContextMenuComponent {
74
73
  this.notify(null);
75
74
  }
76
75
  }
77
- ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextMenuComponent, deps: [{ token: i1.DelonLocaleService }], target: i0.ɵɵFactoryTarget.Component });
78
- 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 });
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextMenuComponent, decorators: [{
76
+ ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextMenuComponent, deps: [{ token: i1.DelonLocaleService }], target: i0.ɵɵFactoryTarget.Component });
77
+ 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 });
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextMenuComponent, decorators: [{
80
79
  type: Component,
81
80
  args: [{ selector: 'reuse-tab-context-menu', host: {
82
81
  '(document:click)': 'closeMenu($event)',
@@ -136,9 +135,9 @@ class ReuseTabContextService {
136
135
  comp.onDestroy(() => sub$.unsubscribe());
137
136
  }
138
137
  }
139
- 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 });
140
- ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextService });
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextService, decorators: [{
138
+ 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 });
139
+ ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextService });
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextService, decorators: [{
142
141
  type: Injectable
143
142
  }], ctorParameters: function () { return [{ type: i1$1.Overlay }]; } });
144
143
 
@@ -157,9 +156,9 @@ class ReuseTabContextComponent {
157
156
  this.sub$.unsubscribe();
158
157
  }
159
158
  }
160
- ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextComponent, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Component });
161
- 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 });
162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextComponent, decorators: [{
159
+ ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextComponent, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Component });
160
+ 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 });
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextComponent, decorators: [{
163
162
  type: Component,
164
163
  args: [{
165
164
  selector: 'reuse-tab-context',
@@ -185,9 +184,9 @@ class ReuseTabContextDirective {
185
184
  event.stopPropagation();
186
185
  }
187
186
  }
188
- ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextDirective, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Directive });
189
- 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 });
190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabContextDirective, decorators: [{
187
+ ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextDirective, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Directive });
188
+ 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 });
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabContextDirective, decorators: [{
191
190
  type: Directive,
192
191
  args: [{
193
192
  selector: '[reuse-tab-context-menu]',
@@ -236,11 +235,28 @@ var ReuseTabMatchMode;
236
235
  ReuseTabMatchMode[ReuseTabMatchMode["URL"] = 2] = "URL";
237
236
  })(ReuseTabMatchMode || (ReuseTabMatchMode = {}));
238
237
 
238
+ const REUSE_TAB_STORAGE_KEY = new InjectionToken('REUSE_TAB_STORAGE_KEY');
239
+ const REUSE_TAB_STORAGE_STATE = new InjectionToken('REUSE_TAB_STORAGE_STATE');
240
+ class ReuseTabLocalStorageState {
241
+ get(key) {
242
+ return JSON.parse(localStorage.getItem(key) || '[]') || [];
243
+ }
244
+ update(key, value) {
245
+ localStorage.setItem(key, JSON.stringify(value));
246
+ return true;
247
+ }
248
+ remove(key) {
249
+ localStorage.removeItem(key);
250
+ }
251
+ }
252
+
239
253
  class ReuseTabService {
240
254
  // #endregion
241
- constructor(injector, menuService) {
255
+ constructor(injector, menuService, stateKey, stateSrv) {
242
256
  this.injector = injector;
243
257
  this.menuService = menuService;
258
+ this.stateKey = stateKey;
259
+ this.stateSrv = stateSrv;
244
260
  this._inited = false;
245
261
  this._max = 10;
246
262
  this._keepingScroll = false;
@@ -255,6 +271,7 @@ class ReuseTabService {
255
271
  this.mode = ReuseTabMatchMode.Menu;
256
272
  /** 排除规则,限 `mode=URL` */
257
273
  this.excludes = [];
274
+ this.storageState = false;
258
275
  }
259
276
  get snapshot() {
260
277
  return this.injector.get(ActivatedRoute).snapshot;
@@ -565,6 +582,17 @@ class ReuseTabService {
565
582
  init() {
566
583
  this.initScroll();
567
584
  this._inited = true;
585
+ this.loadState();
586
+ }
587
+ loadState() {
588
+ if (!this.storageState)
589
+ return;
590
+ this._cached = this.stateSrv.get(this.stateKey).map(v => ({
591
+ title: { text: v.title },
592
+ url: v.url,
593
+ position: v.position
594
+ }));
595
+ this._cachedChange.next({ active: 'loadState' });
568
596
  }
569
597
  getMenu(url) {
570
598
  const menus = this.menuService.getPathByUrl(url);
@@ -575,7 +603,7 @@ class ReuseTabService {
575
603
  runHook(method, comp, type = 'init') {
576
604
  if (typeof comp === 'number') {
577
605
  const item = this._cached[comp];
578
- comp = item._handle.componentRef;
606
+ comp = item._handle?.componentRef;
579
607
  }
580
608
  if (comp == null || !comp.instance) {
581
609
  return;
@@ -755,16 +783,26 @@ class ReuseTabService {
755
783
  }
756
784
  }
757
785
  }
758
- 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 });
759
- ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabService, providedIn: 'root' });
760
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabService, decorators: [{
786
+ 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 });
787
+ ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabService, providedIn: 'root' });
788
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabService, decorators: [{
761
789
  type: Injectable,
762
790
  args: [{ providedIn: 'root' }]
763
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.MenuService }]; } });
791
+ }], ctorParameters: function () { 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
+ }] }]; } });
764
802
 
765
803
  class ReuseTabComponent {
766
804
  // #endregion
767
- constructor(srv, cdr, router, route, i18nSrv, doc, platform, directionality) {
805
+ constructor(srv, cdr, router, route, i18nSrv, doc, platform, directionality, stateKey, stateSrv) {
768
806
  this.srv = srv;
769
807
  this.cdr = cdr;
770
808
  this.router = router;
@@ -773,6 +811,8 @@ class ReuseTabComponent {
773
811
  this.doc = doc;
774
812
  this.platform = platform;
775
813
  this.directionality = directionality;
814
+ this.stateKey = stateKey;
815
+ this.stateSrv = stateSrv;
776
816
  this.destroy$ = new Subject();
777
817
  this.list = [];
778
818
  this.pos = 0;
@@ -782,6 +822,7 @@ class ReuseTabComponent {
782
822
  this.debug = false;
783
823
  this.allowClose = true;
784
824
  this.keepingScroll = false;
825
+ this.storageState = false;
785
826
  this.customContextMenu = [];
786
827
  this.tabBarStyle = null;
787
828
  this.tabType = 'line';
@@ -816,6 +857,7 @@ class ReuseTabComponent {
816
857
  url: item.url,
817
858
  title: this.genTit(item.title),
818
859
  closable: this.allowClose && item.closable && this.srv.count > 0,
860
+ position: item.position,
819
861
  index,
820
862
  active: false,
821
863
  last: false
@@ -858,6 +900,11 @@ class ReuseTabComponent {
858
900
  refresh(item) {
859
901
  this.srv.runHook('_onReuseInit', this.pos === item.index ? this.srv.componentRef : item.index, 'refresh');
860
902
  }
903
+ saveState() {
904
+ if (!this.srv.inited || !this.storageState)
905
+ return;
906
+ this.stateSrv.update(this.stateKey, this.list);
907
+ }
861
908
  // #region UI
862
909
  contextMenuChange(res) {
863
910
  let fn = null;
@@ -910,9 +957,11 @@ class ReuseTabComponent {
910
957
  e.stopPropagation();
911
958
  }
912
959
  const item = this.list[idx];
913
- this.srv.close(item.url, includeNonCloseable);
914
- this.close.emit(item);
915
- this.cdr.detectChanges();
960
+ (this.canClose ? this.canClose({ item, includeNonCloseable }) : of(true)).pipe(filter(v => v)).subscribe(() => {
961
+ this.srv.close(item.url, includeNonCloseable);
962
+ this.close.emit(item);
963
+ this.cdr.detectChanges();
964
+ });
916
965
  return false;
917
966
  }
918
967
  activate(instance) {
@@ -935,6 +984,7 @@ class ReuseTabComponent {
935
984
  this.tabset.nzSelectedIndex = pos;
936
985
  this.list = ls;
937
986
  this.cdr.detectChanges();
987
+ this.saveState();
938
988
  }
939
989
  // #endregion
940
990
  ngOnInit() {
@@ -981,6 +1031,8 @@ class ReuseTabComponent {
981
1031
  this.srv.keepingScroll = this.keepingScroll;
982
1032
  this.srv.keepingScrollContainer = this._keepingScrollContainer;
983
1033
  }
1034
+ if (changes.storageState)
1035
+ this.srv.storageState = this.storageState;
984
1036
  this.srv.debug = this.debug;
985
1037
  this.cdr.detectChanges();
986
1038
  }
@@ -990,8 +1042,8 @@ class ReuseTabComponent {
990
1042
  destroy$.complete();
991
1043
  }
992
1044
  }
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 });
1045
+ 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 });
1046
+ 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
1047
  __decorate([
996
1048
  InputBoolean()
997
1049
  ], ReuseTabComponent.prototype, "debug", void 0);
@@ -1007,10 +1059,13 @@ __decorate([
1007
1059
  __decorate([
1008
1060
  InputBoolean()
1009
1061
  ], ReuseTabComponent.prototype, "keepingScroll", void 0);
1062
+ __decorate([
1063
+ InputBoolean()
1064
+ ], ReuseTabComponent.prototype, "storageState", void 0);
1010
1065
  __decorate([
1011
1066
  InputBoolean()
1012
1067
  ], ReuseTabComponent.prototype, "disabled", void 0);
1013
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabComponent, decorators: [{
1068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabComponent, decorators: [{
1014
1069
  type: Component,
1015
1070
  args: [{ selector: 'reuse-tab, [reuse-tab]', exportAs: 'reuseTab', host: {
1016
1071
  '[class.reuse-tab]': 'true',
@@ -1019,7 +1074,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1019
1074
  '[class.reuse-tab__disabled]': `disabled`,
1020
1075
  '[class.reuse-tab-rtl]': `dir === 'rtl'`
1021
1076
  }, 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
- }], ctorParameters: function () { return [{ type: ReuseTabService }, { type: i0.ChangeDetectorRef }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }, { type: undefined, decorators: [{
1077
+ }], ctorParameters: function () { return [{ type: ReuseTabService }, { type: i0.ChangeDetectorRef }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: undefined, decorators: [{
1023
1078
  type: Optional
1024
1079
  }, {
1025
1080
  type: Inject,
@@ -1027,8 +1082,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1027
1082
  }] }, { type: undefined, decorators: [{
1028
1083
  type: Inject,
1029
1084
  args: [DOCUMENT]
1030
- }] }, { type: i3.Platform }, { type: i4.Directionality, decorators: [{
1085
+ }] }, { type: i3$1.Platform }, { type: i4.Directionality, decorators: [{
1086
+ type: Optional
1087
+ }] }, { type: undefined, decorators: [{
1031
1088
  type: Optional
1089
+ }, {
1090
+ type: Inject,
1091
+ args: [REUSE_TAB_STORAGE_KEY]
1092
+ }] }, { type: undefined, decorators: [{
1093
+ type: Optional
1094
+ }, {
1095
+ type: Inject,
1096
+ args: [REUSE_TAB_STORAGE_STATE]
1032
1097
  }] }]; }, propDecorators: { tabset: [{
1033
1098
  type: ViewChild,
1034
1099
  args: ['tabset']
@@ -1048,6 +1113,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1048
1113
  type: Input
1049
1114
  }], keepingScroll: [{
1050
1115
  type: Input
1116
+ }], storageState: [{
1117
+ type: Input
1051
1118
  }], keepingScrollContainer: [{
1052
1119
  type: Input
1053
1120
  }], customContextMenu: [{
@@ -1066,6 +1133,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1066
1133
  type: Input
1067
1134
  }], titleRender: [{
1068
1135
  type: Input
1136
+ }], canClose: [{
1137
+ type: Input
1069
1138
  }], change: [{
1070
1139
  type: Output
1071
1140
  }], close: [{
@@ -1097,14 +1166,33 @@ const COMPONENTS = [ReuseTabComponent];
1097
1166
  const NOEXPORTS = [ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective];
1098
1167
  class ReuseTabModule {
1099
1168
  }
1100
- ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1101
- 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] });
1102
- ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabModule, imports: [[CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule]] });
1103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ReuseTabModule, decorators: [{
1169
+ ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1170
+ 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] });
1171
+ ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabModule, providers: [
1172
+ {
1173
+ provide: REUSE_TAB_STORAGE_KEY,
1174
+ useValue: '_reuse-tab-state'
1175
+ },
1176
+ {
1177
+ provide: REUSE_TAB_STORAGE_STATE,
1178
+ useFactory: () => new ReuseTabLocalStorageState()
1179
+ }
1180
+ ], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule] });
1181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReuseTabModule, decorators: [{
1104
1182
  type: NgModule,
1105
1183
  args: [{
1106
1184
  imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule],
1107
1185
  declarations: [...COMPONENTS, ...NOEXPORTS],
1186
+ providers: [
1187
+ {
1188
+ provide: REUSE_TAB_STORAGE_KEY,
1189
+ useValue: '_reuse-tab-state'
1190
+ },
1191
+ {
1192
+ provide: REUSE_TAB_STORAGE_STATE,
1193
+ useFactory: () => new ReuseTabLocalStorageState()
1194
+ }
1195
+ ],
1108
1196
  exports: COMPONENTS
1109
1197
  }]
1110
1198
  }] });
@@ -1113,5 +1201,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
1113
1201
  * Generated bundle index. Do not edit.
1114
1202
  */
1115
1203
 
1116
- export { ReuseTabComponent, ReuseTabContextComponent, ReuseTabContextDirective, ReuseTabContextMenuComponent, ReuseTabContextService, ReuseTabMatchMode, ReuseTabModule, ReuseTabService, ReuseTabStrategy };
1204
+ export { REUSE_TAB_STORAGE_KEY, REUSE_TAB_STORAGE_STATE, ReuseTabComponent, ReuseTabContextComponent, ReuseTabContextDirective, ReuseTabContextMenuComponent, ReuseTabContextService, ReuseTabLocalStorageState, ReuseTabMatchMode, ReuseTabModule, ReuseTabService, ReuseTabStrategy };
1117
1205
  //# sourceMappingURL=reuse-tab.mjs.map