@yinuo-ngm/server 1.0.15 → 1.0.17
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.
- package/lib/app.js +3 -15
- package/lib/common/editor.js +2 -2
- package/lib/env.d.ts +1 -0
- package/lib/env.js +1 -0
- package/lib/plugins/error-handler.plugin.d.ts +2 -2
- package/lib/plugins/error-handler.plugin.js +97 -88
- package/lib/plugins/ws/topics/nginx.ws.js +2 -1
- package/lib/plugins/ws/topics/svn.ws.d.ts +2 -1
- package/lib/plugins/ws/topics/svn.ws.js +3 -2
- package/lib/plugins/ws/topics/syslog.ws.d.ts +1 -1
- package/lib/plugins/ws/topics/task.ws.d.ts +2 -1
- package/lib/plugins/ws/topics/task.ws.js +2 -1
- package/lib/plugins/ws/ws.context.d.ts +1 -1
- package/lib/plugins/ws/ws.plugin.js +4 -3
- package/lib/plugins/ws/ws.router.d.ts +2 -2
- package/lib/plugins/ws/ws.router.js +8 -7
- package/lib/routes/api-client/collection.routes.js +8 -6
- package/lib/routes/api-client/env.routes.js +4 -3
- package/lib/routes/api-client/history.routes.js +3 -2
- package/lib/routes/api-client/hub-token.routes.js +32 -10
- package/lib/routes/api-client/request.routes.js +7 -6
- package/lib/routes/api-client/send.routes.js +3 -2
- package/lib/routes/config.routes.js +5 -5
- package/lib/routes/hub.routes.js +10 -10
- package/lib/routes/index.js +2 -0
- package/lib/routes/nginx/nginx-lifecycle.routes.js +4 -0
- package/lib/routes/nginx/nginx-route.context.js +23 -7
- package/lib/routes/nginx/nginx-server.routes.js +158 -6
- package/lib/routes/node-version.routes.d.ts +2 -0
- package/lib/routes/node-version.routes.js +56 -0
- package/lib/routes/project.routes.js +14 -9
- package/lib/routes/rss.routes.js +3 -3
- package/lib/routes/sprite-browse.routes.js +21 -6
- package/lib/routes/sprite.routes.js +18 -12
- package/lib/routes/static-files.routes.js +21 -5
- package/lib/routes/svn.routes.js +5 -3
- package/lib/routes/system.routes.js +20 -1
- package/lib/routes/task.routes.js +10 -3
- package/package.json +13 -6
- package/www/3rdpartylicenses.txt +66 -118
- package/www/browser/chunk-2L7NUOMX.js +2 -0
- package/www/browser/chunk-2NZJ7CN2.js +20 -0
- package/www/browser/chunk-3CM4SKDO.js +15 -0
- package/www/browser/chunk-3I7BQCXS.js +1 -0
- package/www/browser/chunk-3M56F2S2.js +1 -0
- package/www/browser/chunk-3OHBKMAA.js +1 -0
- package/www/browser/chunk-3XNNQFWR.js +1 -0
- package/www/browser/chunk-4BRW6LCZ.js +4 -0
- package/www/browser/chunk-4LBSLURA.js +1 -0
- package/www/browser/chunk-4X42HB6N.js +2 -0
- package/www/browser/chunk-5DYX4DUX.js +11 -0
- package/www/browser/chunk-6SYVDN5L.js +1 -0
- package/www/browser/chunk-6YYNHZ2A.js +1 -0
- package/www/browser/chunk-75W3GVSO.js +1 -0
- package/www/browser/chunk-7U44RF5F.js +63 -0
- package/www/browser/chunk-AELTP6YN.js +1 -0
- package/www/browser/chunk-AMXRL4GR.js +1 -0
- package/www/browser/chunk-AV2ZODEH.js +1 -0
- package/www/browser/chunk-AZ6SIMYH.js +1 -0
- package/www/browser/chunk-B3C35ET3.js +2 -0
- package/www/browser/chunk-BTQIUVTQ.js +1 -0
- package/www/browser/chunk-CN5J4WNO.js +1 -0
- package/www/browser/chunk-D2ODDESN.js +1 -0
- package/www/browser/chunk-DE6E23ET.js +1 -0
- package/www/browser/chunk-DIJPUYIA.js +1 -0
- package/www/browser/chunk-DLGJD6YU.js +4 -0
- package/www/browser/chunk-EEDA5U4V.js +1 -0
- package/www/browser/chunk-FK6Z4HLL.js +1 -0
- package/www/browser/chunk-FL6GDGHW.js +1 -0
- package/www/browser/chunk-FXCG34QS.js +1 -0
- package/www/browser/chunk-H2USFIYR.js +1 -0
- package/www/browser/chunk-H5HGMOE6.js +1 -0
- package/www/browser/chunk-HB3HECPD.js +1 -0
- package/www/browser/chunk-HDNG236Q.js +1 -0
- package/www/browser/chunk-HFZLJHYR.js +1 -0
- package/www/browser/chunk-HJTXXSMC.js +1 -0
- package/www/browser/chunk-HUMCWAKJ.js +3 -0
- package/www/browser/chunk-IKB3EQCP.js +2 -0
- package/www/browser/chunk-K7PESFPY.js +1 -0
- package/www/browser/chunk-KRYMOHYF.js +2 -0
- package/www/browser/chunk-M4QRBV3K.js +1 -0
- package/www/browser/chunk-N2PELLMM.js +30 -0
- package/www/browser/chunk-ONXBYGIG.js +1 -0
- package/www/browser/chunk-OSBDR36P.js +1 -0
- package/www/browser/chunk-OZCK4XVV.js +1 -0
- package/www/browser/chunk-QJP5F735.js +1 -0
- package/www/browser/chunk-RGOYDY7H.js +1 -0
- package/www/browser/chunk-UJKK4A7Y.js +1 -0
- package/www/browser/chunk-WD2EKZQC.js +1 -0
- package/www/browser/chunk-WUA5JFDD.js +1 -0
- package/www/browser/chunk-XLFHB7RS.js +3 -0
- package/www/browser/chunk-YNW4HEJO.js +37 -0
- package/www/browser/chunk-ZTDLWBW5.js +1 -0
- package/www/browser/dark.css +1 -30433
- package/www/browser/default.css +1 -30149
- package/www/browser/index.html +3 -3
- package/www/browser/main-N64WJCHX.js +34 -0
- package/www/browser/scripts-U25HCVEI.js +6 -0
- package/www/browser/styles-ROAHD7MY.css +1 -0
- package/www/browser/add-widget-drawer.component.css.map +0 -7
- package/www/browser/advanced-editor.component.css.map +0 -7
- package/www/browser/api-client.component.css.map +0 -7
- package/www/browser/api-history-drawer.component.css.map +0 -7
- package/www/browser/app.css.map +0 -7
- package/www/browser/attachment-viewer.component.css.map +0 -7
- package/www/browser/auth-editor.component.css.map +0 -7
- package/www/browser/body-editor.component.css.map +0 -7
- package/www/browser/chunk-2YSUXBGC.js +0 -627
- package/www/browser/chunk-2YSUXBGC.js.map +0 -1
- package/www/browser/chunk-3G2GEOPV.js +0 -456
- package/www/browser/chunk-3G2GEOPV.js.map +0 -1
- package/www/browser/chunk-3L72DF3R.js +0 -1683
- package/www/browser/chunk-3L72DF3R.js.map +0 -1
- package/www/browser/chunk-3MCIETCQ.js +0 -8279
- package/www/browser/chunk-3MCIETCQ.js.map +0 -1
- package/www/browser/chunk-665WC4RU.js +0 -5383
- package/www/browser/chunk-665WC4RU.js.map +0 -1
- package/www/browser/chunk-6QMSEZPT.js +0 -10044
- package/www/browser/chunk-6QMSEZPT.js.map +0 -1
- package/www/browser/chunk-6TBQERYX.js +0 -280
- package/www/browser/chunk-6TBQERYX.js.map +0 -1
- package/www/browser/chunk-6UW4MRJZ.js +0 -43
- package/www/browser/chunk-6UW4MRJZ.js.map +0 -7
- package/www/browser/chunk-6XUMIL3W.js +0 -5495
- package/www/browser/chunk-6XUMIL3W.js.map +0 -1
- package/www/browser/chunk-724YOJI3.js +0 -903
- package/www/browser/chunk-724YOJI3.js.map +0 -1
- package/www/browser/chunk-766T7YES.js +0 -437
- package/www/browser/chunk-766T7YES.js.map +0 -1
- package/www/browser/chunk-7FC7DN65.js +0 -728
- package/www/browser/chunk-7FC7DN65.js.map +0 -1
- package/www/browser/chunk-APGQRYWX.js +0 -156
- package/www/browser/chunk-APGQRYWX.js.map +0 -7
- package/www/browser/chunk-AQHSGTHS.js +0 -1960
- package/www/browser/chunk-AQHSGTHS.js.map +0 -1
- package/www/browser/chunk-CTOEAJQK.js +0 -40
- package/www/browser/chunk-CTOEAJQK.js.map +0 -7
- package/www/browser/chunk-DEGQJKKZ.js +0 -409
- package/www/browser/chunk-DEGQJKKZ.js.map +0 -1
- package/www/browser/chunk-DIJX2663.js +0 -1166
- package/www/browser/chunk-DIJX2663.js.map +0 -1
- package/www/browser/chunk-E4XD4GLT.js +0 -427
- package/www/browser/chunk-E4XD4GLT.js.map +0 -1
- package/www/browser/chunk-EQOY6A3M.js +0 -212
- package/www/browser/chunk-EQOY6A3M.js.map +0 -1
- package/www/browser/chunk-ETTBRXVA.js +0 -2643
- package/www/browser/chunk-ETTBRXVA.js.map +0 -1
- package/www/browser/chunk-FLSUSPBD.js +0 -5569
- package/www/browser/chunk-FLSUSPBD.js.map +0 -1
- package/www/browser/chunk-FZNHBEAZ.js +0 -102
- package/www/browser/chunk-FZNHBEAZ.js.map +0 -1
- package/www/browser/chunk-GJC7CZIJ.js +0 -361
- package/www/browser/chunk-GJC7CZIJ.js.map +0 -7
- package/www/browser/chunk-GMCNMOTD.js +0 -844
- package/www/browser/chunk-GMCNMOTD.js.map +0 -7
- package/www/browser/chunk-H43HGCRW.js +0 -198
- package/www/browser/chunk-H43HGCRW.js.map +0 -7
- package/www/browser/chunk-J447GBHM.js +0 -160
- package/www/browser/chunk-J447GBHM.js.map +0 -1
- package/www/browser/chunk-JN3VOWP7.js +0 -384
- package/www/browser/chunk-JN3VOWP7.js.map +0 -1
- package/www/browser/chunk-KSHAGY2M.js +0 -399
- package/www/browser/chunk-KSHAGY2M.js.map +0 -7
- package/www/browser/chunk-KV72AKOD.js +0 -59
- package/www/browser/chunk-KV72AKOD.js.map +0 -7
- package/www/browser/chunk-LAVMY2SJ.js +0 -26
- package/www/browser/chunk-LAVMY2SJ.js.map +0 -7
- package/www/browser/chunk-LLRVGHG5.js +0 -73
- package/www/browser/chunk-LLRVGHG5.js.map +0 -7
- package/www/browser/chunk-LPME4AJ3.js +0 -196
- package/www/browser/chunk-LPME4AJ3.js.map +0 -1
- package/www/browser/chunk-LVPSURVU.js +0 -4615
- package/www/browser/chunk-LVPSURVU.js.map +0 -1
- package/www/browser/chunk-MMPO7QLO.js +0 -4146
- package/www/browser/chunk-MMPO7QLO.js.map +0 -7
- package/www/browser/chunk-O7LB6VFM.js +0 -1953
- package/www/browser/chunk-O7LB6VFM.js.map +0 -1
- package/www/browser/chunk-P5CWA4FO.js +0 -685
- package/www/browser/chunk-P5CWA4FO.js.map +0 -1
- package/www/browser/chunk-RBWIWNTL.js +0 -203
- package/www/browser/chunk-RBWIWNTL.js.map +0 -7
- package/www/browser/chunk-RUXJCM3V.js +0 -26199
- package/www/browser/chunk-RUXJCM3V.js.map +0 -1
- package/www/browser/chunk-S77VVYUZ.js +0 -168
- package/www/browser/chunk-S77VVYUZ.js.map +0 -1
- package/www/browser/chunk-SCXPYFOB.js +0 -4316
- package/www/browser/chunk-SCXPYFOB.js.map +0 -1
- package/www/browser/chunk-SS73S33S.js +0 -471
- package/www/browser/chunk-SS73S33S.js.map +0 -7
- package/www/browser/chunk-T6UAOWNP.js +0 -600
- package/www/browser/chunk-T6UAOWNP.js.map +0 -1
- package/www/browser/chunk-TEW4MY4J.js +0 -148
- package/www/browser/chunk-TEW4MY4J.js.map +0 -7
- package/www/browser/chunk-TVORF3SF.js +0 -82
- package/www/browser/chunk-TVORF3SF.js.map +0 -7
- package/www/browser/chunk-UAN42EUZ.js +0 -2147
- package/www/browser/chunk-UAN42EUZ.js.map +0 -1
- package/www/browser/chunk-ULOHDK7Y.js +0 -1
- package/www/browser/chunk-ULOHDK7Y.js.map +0 -7
- package/www/browser/chunk-UYJ3FVRV.js +0 -3978
- package/www/browser/chunk-UYJ3FVRV.js.map +0 -1
- package/www/browser/chunk-VXHZMSDM.js +0 -5509
- package/www/browser/chunk-VXHZMSDM.js.map +0 -1
- package/www/browser/chunk-VYNQPZQO.js +0 -281
- package/www/browser/chunk-VYNQPZQO.js.map +0 -1
- package/www/browser/chunk-W3J23PZI.js +0 -9213
- package/www/browser/chunk-W3J23PZI.js.map +0 -1
- package/www/browser/chunk-W5HGHCQT.js +0 -1642
- package/www/browser/chunk-W5HGHCQT.js.map +0 -7
- package/www/browser/chunk-XF5H7E4L.js +0 -4723
- package/www/browser/chunk-XF5H7E4L.js.map +0 -1
- package/www/browser/chunk-XNFNEBMY.js +0 -398
- package/www/browser/chunk-XNFNEBMY.js.map +0 -7
- package/www/browser/chunk-XQY5SPGI.js +0 -30811
- package/www/browser/chunk-XQY5SPGI.js.map +0 -1
- package/www/browser/chunk-Y7JBZHNK.js +0 -514
- package/www/browser/chunk-Y7JBZHNK.js.map +0 -1
- package/www/browser/chunk-YWHRP4X3.js +0 -406
- package/www/browser/chunk-YWHRP4X3.js.map +0 -1
- package/www/browser/chunk-Z7FJIV62.js +0 -95
- package/www/browser/chunk-Z7FJIV62.js.map +0 -7
- package/www/browser/chunk-ZBZHXS46.js +0 -1674
- package/www/browser/chunk-ZBZHXS46.js.map +0 -1
- package/www/browser/chunk-ZZA5NVAI.js +0 -735
- package/www/browser/chunk-ZZA5NVAI.js.map +0 -1
- package/www/browser/collection-modal.component.css.map +0 -7
- package/www/browser/collection-tree-item.component.css.map +0 -7
- package/www/browser/collection-tree.component.css.map +0 -7
- package/www/browser/config-change-bar-component.css.map +0 -7
- package/www/browser/config-item-component.css.map +0 -7
- package/www/browser/config-nav-component.css.map +0 -7
- package/www/browser/config-section-component.css.map +0 -7
- package/www/browser/create-summary-aside.component.css.map +0 -7
- package/www/browser/curl-actions.component.css.map +0 -7
- package/www/browser/dark.css.map +0 -7
- package/www/browser/dashboard-canvas.component.css.map +0 -7
- package/www/browser/dashboard.component.css.map +0 -7
- package/www/browser/default.css.map +0 -7
- package/www/browser/detail-item-card.component.css.map +0 -7
- package/www/browser/ellipsis-text.component.css.map +0 -7
- package/www/browser/env-modal.component.css.map +0 -7
- package/www/browser/env-picker.component.css.map +0 -7
- package/www/browser/feedback.component.css.map +0 -7
- package/www/browser/fs-explorer.component.css.map +0 -7
- package/www/browser/git-import-modal.component.css.map +0 -7
- package/www/browser/hub-v2-personal-token-modal.component.css.map +0 -7
- package/www/browser/issue-action-area.component.css.map +0 -7
- package/www/browser/issue-add-participants-dialog.component.css.map +0 -7
- package/www/browser/issue-assign-dialog.component.css.map +0 -7
- package/www/browser/issue-attachment-area.component.css.map +0 -7
- package/www/browser/issue-base-info-area.component.css.map +0 -7
- package/www/browser/issue-branches.component.css.map +0 -7
- package/www/browser/issue-close-dialog.component.css.map +0 -7
- package/www/browser/issue-collaborators-panel.component.css.map +0 -7
- package/www/browser/issue-comment-editor.component.css.map +0 -7
- package/www/browser/issue-create-branch-dialog.component.css.map +0 -7
- package/www/browser/issue-description-area.component.css.map +0 -7
- package/www/browser/issue-detail.component.css.map +0 -7
- package/www/browser/issue-resolve-dialog.component.css.map +0 -7
- package/www/browser/issue-start-own-branch-dialog.component.css.map +0 -7
- package/www/browser/issues-list-table.component.css.map +0 -7
- package/www/browser/issues.component.css.map +0 -7
- package/www/browser/kill-port-widget.component.css.map +0 -7
- package/www/browser/kv-table.component.css.map +0 -7
- package/www/browser/layout-footer.component.css.map +0 -7
- package/www/browser/layout-header.component.css.map +0 -7
- package/www/browser/layout-menu.component.css.map +0 -7
- package/www/browser/layout-project-nav.component.css.map +0 -7
- package/www/browser/layout-sidebar.component.css.map +0 -7
- package/www/browser/layout.component.css.map +0 -7
- package/www/browser/less-viewport-component.css.map +0 -7
- package/www/browser/main.js +0 -1872
- package/www/browser/main.js.map +0 -1
- package/www/browser/markdown-viewer.component.css.map +0 -7
- package/www/browser/news-feed-widget.component.css.map +0 -7
- package/www/browser/ng-devtool.component.css.map +0 -7
- package/www/browser/nginx-config-editor.component.css.map +0 -7
- package/www/browser/nginx-log-viewer.component.css.map +0 -7
- package/www/browser/nginx-secondary-logs-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-perf-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-settings-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-ssl-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-test-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-traffic-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-upstream-tab.component.css.map +0 -7
- package/www/browser/nginx-section-card.component.css.map +0 -7
- package/www/browser/nginx-server-drawer.component.css.map +0 -7
- package/www/browser/nginx-server-list.component.css.map +0 -7
- package/www/browser/nginx-stat-card.component.css.map +0 -7
- package/www/browser/nginx.component.css.map +0 -7
- package/www/browser/page-layout.component.css.map +0 -7
- package/www/browser/pick-workspace-modal.component.css.map +0 -7
- package/www/browser/polyfills.js +0 -26584
- package/www/browser/polyfills.js.map +0 -7
- package/www/browser/project-conf.component.css.map +0 -7
- package/www/browser/project-create-modal.component.css.map +0 -7
- package/www/browser/project-create.component.css.map +0 -7
- package/www/browser/project-deps.component.css.map +0 -7
- package/www/browser/project-edit-modal.component.css.map +0 -7
- package/www/browser/project-import.component.css.map +0 -7
- package/www/browser/project-item-popover.component.css.map +0 -7
- package/www/browser/project-item.component.css.map +0 -7
- package/www/browser/project-list.component.css.map +0 -7
- package/www/browser/projects.component.css.map +0 -7
- package/www/browser/quick-task-widget.component.css.map +0 -7
- package/www/browser/rd-action-area.component.css.map +0 -7
- package/www/browser/rd-advance-stage-dialog.component.css.map +0 -7
- package/www/browser/rd-block-dialog.component.css.map +0 -7
- package/www/browser/rd-create-dialog.component.css.map +0 -7
- package/www/browser/rd-detail.component.css.map +0 -7
- package/www/browser/rd-item-card.component.css.map +0 -7
- package/www/browser/rd-list-board.component.css.map +0 -7
- package/www/browser/rd-list-table.component.css.map +0 -7
- package/www/browser/rd.component.css.map +0 -7
- package/www/browser/request-collections.component.css.map +0 -7
- package/www/browser/request-editor.component.css.map +0 -7
- package/www/browser/request-list-item.component.css.map +0 -7
- package/www/browser/request-list.component.css.map +0 -7
- package/www/browser/request-tabs-bar.component.css.map +0 -7
- package/www/browser/request-tabs.component.css.map +0 -7
- package/www/browser/request-urlbar.component.css.map +0 -7
- package/www/browser/response-viewer.component.css.map +0 -7
- package/www/browser/scripts.js +0 -245
- package/www/browser/scripts.js.map +0 -7
- package/www/browser/setting.component.css.map +0 -7
- package/www/browser/sprite-conf-modal.component.css.map +0 -7
- package/www/browser/sprite-icons-panel-component.css.map +0 -7
- package/www/browser/sprite-images-panel-component.css.map +0 -7
- package/www/browser/sprite-result-tabs.component.css.map +0 -7
- package/www/browser/sprite-viewport-component.css.map +0 -7
- package/www/browser/sprite.component.css.map +0 -7
- package/www/browser/step-advance.component.css.map +0 -7
- package/www/browser/step-basic.component.css.map +0 -7
- package/www/browser/step-config.component.css.map +0 -7
- package/www/browser/step-features.component.css.map +0 -7
- package/www/browser/step-preset.component.css.map +0 -7
- package/www/browser/step-summary-aside.component.css.map +0 -7
- package/www/browser/styles.css +0 -258
- package/www/browser/styles.css.map +0 -7
- package/www/browser/system-log.component.css.map +0 -7
- package/www/browser/task-actions.component.css.map +0 -7
- package/www/browser/task-console.component.css.map +0 -7
- package/www/browser/task-header.component.css.map +0 -7
- package/www/browser/task-list.component.css.map +0 -7
- package/www/browser/tasks.component.css.map +0 -7
- package/www/browser/terminal-view.component.css.map +0 -7
- package/www/browser/welcome-widget.component.css.map +0 -7
- package/www/browser/widget-base.component.css.map +0 -7
- package/www/browser/widget-host.component.css.map +0 -7
|
@@ -1,1953 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
NzResizeObserver
|
|
3
|
-
} from "./chunk-S77VVYUZ.js";
|
|
4
|
-
import {
|
|
5
|
-
NzDropDownDirective,
|
|
6
|
-
NzDropdownMenuComponent,
|
|
7
|
-
NzMenuDirective,
|
|
8
|
-
NzMenuItemComponent,
|
|
9
|
-
NzMenuModule
|
|
10
|
-
} from "./chunk-ZBZHXS46.js";
|
|
11
|
-
import {
|
|
12
|
-
A11yModule,
|
|
13
|
-
CdkMonitorFocus,
|
|
14
|
-
DOWN_ARROW,
|
|
15
|
-
Directionality,
|
|
16
|
-
ENTER,
|
|
17
|
-
FocusKeyManager,
|
|
18
|
-
LEFT_ARROW,
|
|
19
|
-
NzConfigService,
|
|
20
|
-
NzIconDirective,
|
|
21
|
-
NzIconModule,
|
|
22
|
-
NzOutletModule,
|
|
23
|
-
NzStringTemplateOutletDirective,
|
|
24
|
-
PREFIX,
|
|
25
|
-
RIGHT_ARROW,
|
|
26
|
-
SPACE,
|
|
27
|
-
UP_ARROW,
|
|
28
|
-
ViewportRuler,
|
|
29
|
-
WithConfig,
|
|
30
|
-
coerceNumberProperty,
|
|
31
|
-
fromEventOutsideAngular,
|
|
32
|
-
hasModifierKey,
|
|
33
|
-
requestAnimationFrame,
|
|
34
|
-
tabSwitchMotion,
|
|
35
|
-
takeUntilDestroyed,
|
|
36
|
-
warn,
|
|
37
|
-
wrapIntoObservable
|
|
38
|
-
} from "./chunk-RUXJCM3V.js";
|
|
39
|
-
import {
|
|
40
|
-
NavigationEnd,
|
|
41
|
-
Router,
|
|
42
|
-
RouterLink
|
|
43
|
-
} from "./chunk-665WC4RU.js";
|
|
44
|
-
import {
|
|
45
|
-
NgTemplateOutlet
|
|
46
|
-
} from "./chunk-3MCIETCQ.js";
|
|
47
|
-
import {
|
|
48
|
-
ANIMATION_MODULE_TYPE,
|
|
49
|
-
ChangeDetectionStrategy,
|
|
50
|
-
ChangeDetectorRef,
|
|
51
|
-
Component,
|
|
52
|
-
ContentChild,
|
|
53
|
-
ContentChildren,
|
|
54
|
-
DestroyRef,
|
|
55
|
-
Directive,
|
|
56
|
-
ElementRef,
|
|
57
|
-
EventEmitter,
|
|
58
|
-
FactoryTarget,
|
|
59
|
-
HOST_TAG_NAME,
|
|
60
|
-
InjectionToken,
|
|
61
|
-
Input,
|
|
62
|
-
NgModule,
|
|
63
|
-
NgZone,
|
|
64
|
-
Output,
|
|
65
|
-
QueryList,
|
|
66
|
-
Subject,
|
|
67
|
-
Subscription,
|
|
68
|
-
TemplateRef,
|
|
69
|
-
ViewChild,
|
|
70
|
-
ViewEncapsulation,
|
|
71
|
-
__esDecorate,
|
|
72
|
-
__publicField,
|
|
73
|
-
__runInitializers,
|
|
74
|
-
animationFrameScheduler,
|
|
75
|
-
asapScheduler,
|
|
76
|
-
auditTime,
|
|
77
|
-
booleanAttribute,
|
|
78
|
-
computed,
|
|
79
|
-
contentChildren,
|
|
80
|
-
core_exports,
|
|
81
|
-
delay,
|
|
82
|
-
filter,
|
|
83
|
-
first,
|
|
84
|
-
forwardRef,
|
|
85
|
-
inject,
|
|
86
|
-
input,
|
|
87
|
-
merge,
|
|
88
|
-
of,
|
|
89
|
-
startWith,
|
|
90
|
-
ɵɵngDeclareClassMetadata,
|
|
91
|
-
ɵɵngDeclareComponent,
|
|
92
|
-
ɵɵngDeclareDirective,
|
|
93
|
-
ɵɵngDeclareFactory,
|
|
94
|
-
ɵɵngDeclareInjector,
|
|
95
|
-
ɵɵngDeclareNgModule
|
|
96
|
-
} from "./chunk-XQY5SPGI.js";
|
|
97
|
-
|
|
98
|
-
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-tabs.mjs
|
|
99
|
-
var NzTabChangeEvent = class {
|
|
100
|
-
index;
|
|
101
|
-
tab;
|
|
102
|
-
};
|
|
103
|
-
var NzTabAddButtonComponent = class _NzTabAddButtonComponent {
|
|
104
|
-
addIcon = "plus";
|
|
105
|
-
element = inject(ElementRef).nativeElement;
|
|
106
|
-
getElementWidth() {
|
|
107
|
-
return this.element?.offsetWidth || 0;
|
|
108
|
-
}
|
|
109
|
-
getElementHeight() {
|
|
110
|
-
return this.element?.offsetHeight || 0;
|
|
111
|
-
}
|
|
112
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabAddButtonComponent, deps: [], target: FactoryTarget.Component });
|
|
113
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzTabAddButtonComponent, isStandalone: true, selector: "nz-tab-add-button, button[nz-tab-add-button]", inputs: { addIcon: "addIcon" }, host: { attributes: { "aria-label": "Add tab", "type": "button" }, classAttribute: "ant-tabs-nav-add" }, ngImport: core_exports, template: `
|
|
114
|
-
<ng-container *nzStringTemplateOutlet="addIcon; let icon">
|
|
115
|
-
<nz-icon [nzType]="icon" nzTheme="outline" />
|
|
116
|
-
</ng-container>
|
|
117
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] });
|
|
118
|
-
};
|
|
119
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabAddButtonComponent, decorators: [{
|
|
120
|
-
type: Component,
|
|
121
|
-
args: [{
|
|
122
|
-
selector: "nz-tab-add-button, button[nz-tab-add-button]",
|
|
123
|
-
template: `
|
|
124
|
-
<ng-container *nzStringTemplateOutlet="addIcon; let icon">
|
|
125
|
-
<nz-icon [nzType]="icon" nzTheme="outline" />
|
|
126
|
-
</ng-container>
|
|
127
|
-
`,
|
|
128
|
-
host: {
|
|
129
|
-
class: "ant-tabs-nav-add",
|
|
130
|
-
"aria-label": "Add tab",
|
|
131
|
-
type: "button"
|
|
132
|
-
},
|
|
133
|
-
imports: [NzOutletModule, NzIconModule]
|
|
134
|
-
}]
|
|
135
|
-
}], propDecorators: { addIcon: [{
|
|
136
|
-
type: Input
|
|
137
|
-
}] } });
|
|
138
|
-
var NzTabBarExtraContentDirective = class _NzTabBarExtraContentDirective {
|
|
139
|
-
position = input("end", ...ngDevMode ? [{ debugName: "position", alias: "nzTabBarExtraContent" }] : [{ alias: "nzTabBarExtraContent" }]);
|
|
140
|
-
templateRef = inject(TemplateRef);
|
|
141
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabBarExtraContentDirective, deps: [], target: FactoryTarget.Directive });
|
|
142
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: _NzTabBarExtraContentDirective, isStandalone: true, selector: "[nzTabBarExtraContent]:not(nz-tabset):not(nz-tabs)", inputs: { position: { classPropertyName: "position", publicName: "nzTabBarExtraContent", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: core_exports });
|
|
143
|
-
};
|
|
144
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabBarExtraContentDirective, decorators: [{
|
|
145
|
-
type: Directive,
|
|
146
|
-
args: [{
|
|
147
|
-
// TODO: Remove `nz-tabset` in 21.0.0
|
|
148
|
-
selector: "[nzTabBarExtraContent]:not(nz-tabset):not(nz-tabs)"
|
|
149
|
-
}]
|
|
150
|
-
}] });
|
|
151
|
-
var NzTabBodyComponent = class _NzTabBodyComponent {
|
|
152
|
-
content = null;
|
|
153
|
-
active = false;
|
|
154
|
-
animated = true;
|
|
155
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabBodyComponent, deps: [], target: FactoryTarget.Component });
|
|
156
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzTabBodyComponent, isStandalone: true, selector: "[nz-tab-body]", inputs: { content: "content", active: "active", animated: "animated" }, host: { properties: { "class.ant-tabs-tabpane-active": "active", "class.ant-tabs-tabpane-hidden": "animated ? null : !active", "attr.tabindex": "active ? 0 : -1", "attr.aria-hidden": "!active", "style.overflow-y": 'animated ? active ? null : "none" : null', "@tabSwitchMotion": "active ? 'enter' : 'leave'", "@.disabled": "!animated" }, classAttribute: "ant-tabs-tabpane" }, exportAs: ["nzTabBody"], ngImport: core_exports, template: `<ng-template [ngTemplateOutlet]="content"></ng-template>`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [tabSwitchMotion], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
157
|
-
};
|
|
158
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabBodyComponent, decorators: [{
|
|
159
|
-
type: Component,
|
|
160
|
-
args: [{
|
|
161
|
-
selector: "[nz-tab-body]",
|
|
162
|
-
exportAs: "nzTabBody",
|
|
163
|
-
encapsulation: ViewEncapsulation.None,
|
|
164
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
165
|
-
template: `<ng-template [ngTemplateOutlet]="content"></ng-template>`,
|
|
166
|
-
host: {
|
|
167
|
-
class: "ant-tabs-tabpane",
|
|
168
|
-
"[class.ant-tabs-tabpane-active]": "active",
|
|
169
|
-
"[class.ant-tabs-tabpane-hidden]": "animated ? null : !active",
|
|
170
|
-
"[attr.tabindex]": "active ? 0 : -1",
|
|
171
|
-
"[attr.aria-hidden]": "!active",
|
|
172
|
-
"[style.overflow-y]": 'animated ? active ? null : "none" : null',
|
|
173
|
-
"[@tabSwitchMotion]": `active ? 'enter' : 'leave'`,
|
|
174
|
-
"[@.disabled]": `!animated`
|
|
175
|
-
},
|
|
176
|
-
imports: [NgTemplateOutlet],
|
|
177
|
-
animations: [tabSwitchMotion]
|
|
178
|
-
}]
|
|
179
|
-
}], propDecorators: { content: [{
|
|
180
|
-
type: Input
|
|
181
|
-
}], active: [{
|
|
182
|
-
type: Input
|
|
183
|
-
}], animated: [{
|
|
184
|
-
type: Input
|
|
185
|
-
}] } });
|
|
186
|
-
var NzTabCloseButtonComponent = class _NzTabCloseButtonComponent {
|
|
187
|
-
closeIcon = "close";
|
|
188
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabCloseButtonComponent, deps: [], target: FactoryTarget.Component });
|
|
189
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzTabCloseButtonComponent, isStandalone: true, selector: "nz-tab-close-button, button[nz-tab-close-button]", inputs: { closeIcon: "closeIcon" }, host: { attributes: { "aria-label": "Close tab", "type": "button" }, classAttribute: "ant-tabs-tab-remove" }, ngImport: core_exports, template: `
|
|
190
|
-
<ng-container *nzStringTemplateOutlet="closeIcon; let icon">
|
|
191
|
-
<nz-icon [nzType]="icon" nzTheme="outline" />
|
|
192
|
-
</ng-container>
|
|
193
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] });
|
|
194
|
-
};
|
|
195
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabCloseButtonComponent, decorators: [{
|
|
196
|
-
type: Component,
|
|
197
|
-
args: [{
|
|
198
|
-
selector: "nz-tab-close-button, button[nz-tab-close-button]",
|
|
199
|
-
template: `
|
|
200
|
-
<ng-container *nzStringTemplateOutlet="closeIcon; let icon">
|
|
201
|
-
<nz-icon [nzType]="icon" nzTheme="outline" />
|
|
202
|
-
</ng-container>
|
|
203
|
-
`,
|
|
204
|
-
host: {
|
|
205
|
-
class: "ant-tabs-tab-remove",
|
|
206
|
-
"aria-label": "Close tab",
|
|
207
|
-
type: "button"
|
|
208
|
-
},
|
|
209
|
-
imports: [NzOutletModule, NzIconModule]
|
|
210
|
-
}]
|
|
211
|
-
}], propDecorators: { closeIcon: [{
|
|
212
|
-
type: Input
|
|
213
|
-
}] } });
|
|
214
|
-
var NzTabLinkTemplateDirective = class _NzTabLinkTemplateDirective {
|
|
215
|
-
templateRef = inject(TemplateRef, { host: true });
|
|
216
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabLinkTemplateDirective, deps: [], target: FactoryTarget.Directive });
|
|
217
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzTabLinkTemplateDirective, isStandalone: true, selector: "ng-template[nzTabLink]", exportAs: ["nzTabLinkTemplate"], ngImport: core_exports });
|
|
218
|
-
};
|
|
219
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabLinkTemplateDirective, decorators: [{
|
|
220
|
-
type: Directive,
|
|
221
|
-
args: [{
|
|
222
|
-
selector: "ng-template[nzTabLink]",
|
|
223
|
-
exportAs: "nzTabLinkTemplate"
|
|
224
|
-
}]
|
|
225
|
-
}] });
|
|
226
|
-
var NzTabLinkDirective = class _NzTabLinkDirective {
|
|
227
|
-
elementRef = inject(ElementRef);
|
|
228
|
-
routerLink = inject(RouterLink, { self: true, optional: true });
|
|
229
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabLinkDirective, deps: [], target: FactoryTarget.Directive });
|
|
230
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzTabLinkDirective, isStandalone: true, selector: "a[nz-tab-link]", exportAs: ["nzTabLink"], ngImport: core_exports });
|
|
231
|
-
};
|
|
232
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabLinkDirective, decorators: [{
|
|
233
|
-
type: Directive,
|
|
234
|
-
args: [{
|
|
235
|
-
selector: "a[nz-tab-link]",
|
|
236
|
-
exportAs: "nzTabLink"
|
|
237
|
-
}]
|
|
238
|
-
}] });
|
|
239
|
-
var NzTabNavItemDirective = class _NzTabNavItemDirective {
|
|
240
|
-
disabled = false;
|
|
241
|
-
tab;
|
|
242
|
-
active = false;
|
|
243
|
-
elementRef = inject(ElementRef);
|
|
244
|
-
el = this.elementRef.nativeElement;
|
|
245
|
-
parentElement = this.el.parentElement;
|
|
246
|
-
focus() {
|
|
247
|
-
this.el.focus({ preventScroll: true });
|
|
248
|
-
}
|
|
249
|
-
get width() {
|
|
250
|
-
return this.parentElement.offsetWidth;
|
|
251
|
-
}
|
|
252
|
-
get height() {
|
|
253
|
-
return this.parentElement.offsetHeight;
|
|
254
|
-
}
|
|
255
|
-
get left() {
|
|
256
|
-
return this.parentElement.offsetLeft;
|
|
257
|
-
}
|
|
258
|
-
get top() {
|
|
259
|
-
return this.parentElement.offsetTop;
|
|
260
|
-
}
|
|
261
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabNavItemDirective, deps: [], target: FactoryTarget.Directive });
|
|
262
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "16.1.0", version: "20.3.0", type: _NzTabNavItemDirective, isStandalone: true, selector: "[nzTabNavItem]", inputs: { disabled: ["disabled", "disabled", booleanAttribute], tab: "tab", active: ["active", "active", booleanAttribute] }, ngImport: core_exports });
|
|
263
|
-
};
|
|
264
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabNavItemDirective, decorators: [{
|
|
265
|
-
type: Directive,
|
|
266
|
-
args: [{
|
|
267
|
-
selector: "[nzTabNavItem]"
|
|
268
|
-
}]
|
|
269
|
-
}], propDecorators: { disabled: [{
|
|
270
|
-
type: Input,
|
|
271
|
-
args: [{ transform: booleanAttribute }]
|
|
272
|
-
}], tab: [{
|
|
273
|
-
type: Input
|
|
274
|
-
}], active: [{
|
|
275
|
-
type: Input,
|
|
276
|
-
args: [{ transform: booleanAttribute }]
|
|
277
|
-
}] } });
|
|
278
|
-
var NzTabNavOperationComponent = class _NzTabNavOperationComponent {
|
|
279
|
-
items = [];
|
|
280
|
-
addable = false;
|
|
281
|
-
addIcon = "plus";
|
|
282
|
-
addClicked = new EventEmitter();
|
|
283
|
-
selected = new EventEmitter();
|
|
284
|
-
closeAnimationWaitTimeoutId;
|
|
285
|
-
menuOpened = false;
|
|
286
|
-
cdr = inject(ChangeDetectorRef);
|
|
287
|
-
element = inject(ElementRef).nativeElement;
|
|
288
|
-
onSelect(item) {
|
|
289
|
-
if (!item.disabled) {
|
|
290
|
-
item.tab.nzClick.emit();
|
|
291
|
-
this.selected.emit(item);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
onContextmenu(item, e) {
|
|
295
|
-
if (!item.disabled) {
|
|
296
|
-
item.tab.nzContextmenu.emit(e);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
showItems() {
|
|
300
|
-
clearTimeout(this.closeAnimationWaitTimeoutId);
|
|
301
|
-
this.menuOpened = true;
|
|
302
|
-
this.cdr.markForCheck();
|
|
303
|
-
}
|
|
304
|
-
menuVisChange(visible) {
|
|
305
|
-
if (!visible) {
|
|
306
|
-
this.closeAnimationWaitTimeoutId = setTimeout(() => {
|
|
307
|
-
this.menuOpened = false;
|
|
308
|
-
this.cdr.markForCheck();
|
|
309
|
-
}, 150);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
getElementWidth() {
|
|
313
|
-
return this.element?.offsetWidth || 0;
|
|
314
|
-
}
|
|
315
|
-
getElementHeight() {
|
|
316
|
-
return this.element?.offsetHeight || 0;
|
|
317
|
-
}
|
|
318
|
-
ngOnDestroy() {
|
|
319
|
-
clearTimeout(this.closeAnimationWaitTimeoutId);
|
|
320
|
-
}
|
|
321
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabNavOperationComponent, deps: [], target: FactoryTarget.Component });
|
|
322
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTabNavOperationComponent, isStandalone: true, selector: "nz-tab-nav-operation", inputs: { items: "items", addable: ["addable", "addable", booleanAttribute], addIcon: "addIcon" }, outputs: { addClicked: "addClicked", selected: "selected" }, host: { properties: { "class.ant-tabs-nav-operations-hidden": "items.length === 0" }, classAttribute: "ant-tabs-nav-operations" }, exportAs: ["nzTabNavOperation"], ngImport: core_exports, template: `
|
|
323
|
-
<button
|
|
324
|
-
nz-dropdown
|
|
325
|
-
class="ant-tabs-nav-more"
|
|
326
|
-
type="button"
|
|
327
|
-
tabindex="-1"
|
|
328
|
-
aria-hidden="true"
|
|
329
|
-
nzOverlayClassName="nz-tabs-dropdown"
|
|
330
|
-
#dropdownTrigger="nzDropdown"
|
|
331
|
-
[nzDropdownMenu]="menu"
|
|
332
|
-
[nzOverlayStyle]="{ minWidth: '46px' }"
|
|
333
|
-
[nzMatchWidthElement]="null"
|
|
334
|
-
(nzVisibleChange)="menuVisChange($event)"
|
|
335
|
-
(mouseenter)="showItems()"
|
|
336
|
-
>
|
|
337
|
-
<nz-icon nzType="ellipsis" />
|
|
338
|
-
</button>
|
|
339
|
-
<nz-dropdown-menu #menu="nzDropdownMenu">
|
|
340
|
-
@if (menuOpened) {
|
|
341
|
-
<ul nz-menu>
|
|
342
|
-
@for (item of items; track item) {
|
|
343
|
-
<li
|
|
344
|
-
nz-menu-item
|
|
345
|
-
class="ant-tabs-dropdown-menu-item"
|
|
346
|
-
[class.ant-tabs-dropdown-menu-item-disabled]="item.disabled"
|
|
347
|
-
[nzSelected]="item.active"
|
|
348
|
-
[nzDisabled]="item.disabled"
|
|
349
|
-
(click)="onSelect(item)"
|
|
350
|
-
(contextmenu)="onContextmenu(item, $event)"
|
|
351
|
-
>
|
|
352
|
-
<ng-container *nzStringTemplateOutlet="item.tab.label; context: { visible: false }">
|
|
353
|
-
{{ item.tab.label }}
|
|
354
|
-
</ng-container>
|
|
355
|
-
</li>
|
|
356
|
-
}
|
|
357
|
-
</ul>
|
|
358
|
-
}
|
|
359
|
-
</nz-dropdown-menu>
|
|
360
|
-
@if (addable) {
|
|
361
|
-
<button nz-tab-add-button [addIcon]="addIcon" (click)="addClicked.emit()"></button>
|
|
362
|
-
}
|
|
363
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzTabAddButtonComponent, selector: "nz-tab-add-button, button[nz-tab-add-button]", inputs: ["addIcon"] }, { kind: "component", type: NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzMenuModule }, { kind: "directive", type: NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzArrow", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
364
|
-
};
|
|
365
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabNavOperationComponent, decorators: [{
|
|
366
|
-
type: Component,
|
|
367
|
-
args: [{
|
|
368
|
-
selector: "nz-tab-nav-operation",
|
|
369
|
-
exportAs: "nzTabNavOperation",
|
|
370
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
371
|
-
encapsulation: ViewEncapsulation.None,
|
|
372
|
-
template: `
|
|
373
|
-
<button
|
|
374
|
-
nz-dropdown
|
|
375
|
-
class="ant-tabs-nav-more"
|
|
376
|
-
type="button"
|
|
377
|
-
tabindex="-1"
|
|
378
|
-
aria-hidden="true"
|
|
379
|
-
nzOverlayClassName="nz-tabs-dropdown"
|
|
380
|
-
#dropdownTrigger="nzDropdown"
|
|
381
|
-
[nzDropdownMenu]="menu"
|
|
382
|
-
[nzOverlayStyle]="{ minWidth: '46px' }"
|
|
383
|
-
[nzMatchWidthElement]="null"
|
|
384
|
-
(nzVisibleChange)="menuVisChange($event)"
|
|
385
|
-
(mouseenter)="showItems()"
|
|
386
|
-
>
|
|
387
|
-
<nz-icon nzType="ellipsis" />
|
|
388
|
-
</button>
|
|
389
|
-
<nz-dropdown-menu #menu="nzDropdownMenu">
|
|
390
|
-
@if (menuOpened) {
|
|
391
|
-
<ul nz-menu>
|
|
392
|
-
@for (item of items; track item) {
|
|
393
|
-
<li
|
|
394
|
-
nz-menu-item
|
|
395
|
-
class="ant-tabs-dropdown-menu-item"
|
|
396
|
-
[class.ant-tabs-dropdown-menu-item-disabled]="item.disabled"
|
|
397
|
-
[nzSelected]="item.active"
|
|
398
|
-
[nzDisabled]="item.disabled"
|
|
399
|
-
(click)="onSelect(item)"
|
|
400
|
-
(contextmenu)="onContextmenu(item, $event)"
|
|
401
|
-
>
|
|
402
|
-
<ng-container *nzStringTemplateOutlet="item.tab.label; context: { visible: false }">
|
|
403
|
-
{{ item.tab.label }}
|
|
404
|
-
</ng-container>
|
|
405
|
-
</li>
|
|
406
|
-
}
|
|
407
|
-
</ul>
|
|
408
|
-
}
|
|
409
|
-
</nz-dropdown-menu>
|
|
410
|
-
@if (addable) {
|
|
411
|
-
<button nz-tab-add-button [addIcon]="addIcon" (click)="addClicked.emit()"></button>
|
|
412
|
-
}
|
|
413
|
-
`,
|
|
414
|
-
host: {
|
|
415
|
-
class: "ant-tabs-nav-operations",
|
|
416
|
-
"[class.ant-tabs-nav-operations-hidden]": "items.length === 0"
|
|
417
|
-
},
|
|
418
|
-
imports: [
|
|
419
|
-
NzIconModule,
|
|
420
|
-
NzOutletModule,
|
|
421
|
-
NzTabAddButtonComponent,
|
|
422
|
-
NzDropdownMenuComponent,
|
|
423
|
-
NzMenuModule,
|
|
424
|
-
NzDropDownDirective
|
|
425
|
-
]
|
|
426
|
-
}]
|
|
427
|
-
}], propDecorators: { items: [{
|
|
428
|
-
type: Input
|
|
429
|
-
}], addable: [{
|
|
430
|
-
type: Input,
|
|
431
|
-
args: [{ transform: booleanAttribute }]
|
|
432
|
-
}], addIcon: [{
|
|
433
|
-
type: Input
|
|
434
|
-
}], addClicked: [{
|
|
435
|
-
type: Output
|
|
436
|
-
}], selected: [{
|
|
437
|
-
type: Output
|
|
438
|
-
}] } });
|
|
439
|
-
var MIN_SWIPE_DISTANCE = 0.1;
|
|
440
|
-
var STOP_SWIPE_DISTANCE = 0.01;
|
|
441
|
-
var REFRESH_INTERVAL = 20;
|
|
442
|
-
var SPEED_OFF_MULTIPLE = 0.995 ** REFRESH_INTERVAL;
|
|
443
|
-
var NzTabScrollListDirective = class _NzTabScrollListDirective {
|
|
444
|
-
ngZone = inject(NgZone);
|
|
445
|
-
destroyRef = inject(DestroyRef);
|
|
446
|
-
el = inject(ElementRef).nativeElement;
|
|
447
|
-
lastWheelDirection = null;
|
|
448
|
-
lastWheelTimestamp = 0;
|
|
449
|
-
lastTimestamp = 0;
|
|
450
|
-
lastTimeDiff = 0;
|
|
451
|
-
lastMixedWheel = 0;
|
|
452
|
-
lastWheelPrevent = false;
|
|
453
|
-
touchPosition = null;
|
|
454
|
-
lastOffset = null;
|
|
455
|
-
motion = -1;
|
|
456
|
-
offsetChange = new EventEmitter();
|
|
457
|
-
tabScroll = new EventEmitter();
|
|
458
|
-
ngOnInit() {
|
|
459
|
-
const wheel$ = fromEventOutsideAngular(this.el, "wheel");
|
|
460
|
-
const touchstart$ = fromEventOutsideAngular(this.el, "touchstart");
|
|
461
|
-
const touchmove$ = fromEventOutsideAngular(this.el, "touchmove");
|
|
462
|
-
const touchend$ = fromEventOutsideAngular(this.el, "touchend");
|
|
463
|
-
this.subscribeWrap("wheel", wheel$, this.onWheel);
|
|
464
|
-
this.subscribeWrap("touchstart", touchstart$, this.onTouchStart);
|
|
465
|
-
this.subscribeWrap("touchmove", touchmove$, this.onTouchMove);
|
|
466
|
-
this.subscribeWrap("touchend", touchend$, this.onTouchEnd);
|
|
467
|
-
}
|
|
468
|
-
subscribeWrap(type, observable, handler) {
|
|
469
|
-
return observable.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
|
|
470
|
-
this.tabScroll.emit({
|
|
471
|
-
type,
|
|
472
|
-
event
|
|
473
|
-
});
|
|
474
|
-
if (!event.defaultPrevented) {
|
|
475
|
-
handler(event);
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
onTouchEnd = (e) => {
|
|
480
|
-
if (!this.touchPosition) {
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
const lastOffset = this.lastOffset;
|
|
484
|
-
const lastTimeDiff = this.lastTimeDiff;
|
|
485
|
-
this.lastOffset = this.touchPosition = null;
|
|
486
|
-
if (lastOffset) {
|
|
487
|
-
const distanceX = lastOffset.x / lastTimeDiff;
|
|
488
|
-
const distanceY = lastOffset.y / lastTimeDiff;
|
|
489
|
-
const absX = Math.abs(distanceX);
|
|
490
|
-
const absY = Math.abs(distanceY);
|
|
491
|
-
if (Math.max(absX, absY) < MIN_SWIPE_DISTANCE) {
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
let currentX = distanceX;
|
|
495
|
-
let currentY = distanceY;
|
|
496
|
-
this.motion = window.setInterval(() => {
|
|
497
|
-
if (Math.abs(currentX) < STOP_SWIPE_DISTANCE && Math.abs(currentY) < STOP_SWIPE_DISTANCE) {
|
|
498
|
-
window.clearInterval(this.motion);
|
|
499
|
-
return;
|
|
500
|
-
}
|
|
501
|
-
currentX *= SPEED_OFF_MULTIPLE;
|
|
502
|
-
currentY *= SPEED_OFF_MULTIPLE;
|
|
503
|
-
this.onOffset(currentX * REFRESH_INTERVAL, currentY * REFRESH_INTERVAL, e);
|
|
504
|
-
}, REFRESH_INTERVAL);
|
|
505
|
-
}
|
|
506
|
-
};
|
|
507
|
-
onTouchMove = (e) => {
|
|
508
|
-
if (!this.touchPosition) {
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
|
-
e.preventDefault();
|
|
512
|
-
const { screenX, screenY } = e.touches[0];
|
|
513
|
-
const offsetX = screenX - this.touchPosition.x;
|
|
514
|
-
const offsetY = screenY - this.touchPosition.y;
|
|
515
|
-
this.onOffset(offsetX, offsetY, e);
|
|
516
|
-
const now = Date.now();
|
|
517
|
-
this.lastTimeDiff = now - this.lastTimestamp;
|
|
518
|
-
this.lastTimestamp = now;
|
|
519
|
-
this.lastOffset = { x: offsetX, y: offsetY };
|
|
520
|
-
this.touchPosition = { x: screenX, y: screenY };
|
|
521
|
-
};
|
|
522
|
-
onTouchStart = (e) => {
|
|
523
|
-
const { screenX, screenY } = e.touches[0];
|
|
524
|
-
this.touchPosition = { x: screenX, y: screenY };
|
|
525
|
-
window.clearInterval(this.motion);
|
|
526
|
-
};
|
|
527
|
-
onWheel = (e) => {
|
|
528
|
-
const { deltaX, deltaY } = e;
|
|
529
|
-
let mixed;
|
|
530
|
-
const absX = Math.abs(deltaX);
|
|
531
|
-
const absY = Math.abs(deltaY);
|
|
532
|
-
if (absX === absY) {
|
|
533
|
-
mixed = this.lastWheelDirection === "x" ? deltaX : deltaY;
|
|
534
|
-
} else if (absX > absY) {
|
|
535
|
-
mixed = deltaX;
|
|
536
|
-
this.lastWheelDirection = "x";
|
|
537
|
-
} else {
|
|
538
|
-
mixed = deltaY;
|
|
539
|
-
this.lastWheelDirection = "y";
|
|
540
|
-
}
|
|
541
|
-
const now = Date.now();
|
|
542
|
-
const absMixed = Math.abs(mixed);
|
|
543
|
-
if (now - this.lastWheelTimestamp > 100 || absMixed - this.lastMixedWheel > 10) {
|
|
544
|
-
this.lastWheelPrevent = false;
|
|
545
|
-
}
|
|
546
|
-
this.onOffset(-mixed, -mixed, e);
|
|
547
|
-
if (e.defaultPrevented || this.lastWheelPrevent) {
|
|
548
|
-
this.lastWheelPrevent = true;
|
|
549
|
-
}
|
|
550
|
-
this.lastWheelTimestamp = now;
|
|
551
|
-
this.lastMixedWheel = absMixed;
|
|
552
|
-
};
|
|
553
|
-
onOffset(x, y, event) {
|
|
554
|
-
if (this.offsetChange.observers.length) {
|
|
555
|
-
this.ngZone.run(() => {
|
|
556
|
-
this.offsetChange.emit({
|
|
557
|
-
x,
|
|
558
|
-
y,
|
|
559
|
-
event
|
|
560
|
-
});
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabScrollListDirective, deps: [], target: FactoryTarget.Directive });
|
|
565
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzTabScrollListDirective, isStandalone: true, selector: "[nzTabScrollList]", outputs: { offsetChange: "offsetChange", tabScroll: "tabScroll" }, ngImport: core_exports });
|
|
566
|
-
};
|
|
567
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabScrollListDirective, decorators: [{
|
|
568
|
-
type: Directive,
|
|
569
|
-
args: [{
|
|
570
|
-
selector: "[nzTabScrollList]"
|
|
571
|
-
}]
|
|
572
|
-
}], propDecorators: { offsetChange: [{
|
|
573
|
-
type: Output
|
|
574
|
-
}], tabScroll: [{
|
|
575
|
-
type: Output
|
|
576
|
-
}] } });
|
|
577
|
-
var NzTabsInkBarDirective = class _NzTabsInkBarDirective {
|
|
578
|
-
ngZone = inject(NgZone);
|
|
579
|
-
el = inject(ElementRef).nativeElement;
|
|
580
|
-
position = "horizontal";
|
|
581
|
-
animated = true;
|
|
582
|
-
animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });
|
|
583
|
-
get _animated() {
|
|
584
|
-
return this.animationMode !== "NoopAnimations" && this.animated;
|
|
585
|
-
}
|
|
586
|
-
alignToElement(element) {
|
|
587
|
-
this.ngZone.runOutsideAngular(() => {
|
|
588
|
-
requestAnimationFrame(() => this.setStyles(element));
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
setStyles(element) {
|
|
592
|
-
if (this.position === "horizontal") {
|
|
593
|
-
this.el.style.top = "";
|
|
594
|
-
this.el.style.height = "";
|
|
595
|
-
this.el.style.left = this.getLeftPosition(element);
|
|
596
|
-
this.el.style.width = this.getElementWidth(element);
|
|
597
|
-
} else {
|
|
598
|
-
this.el.style.left = "";
|
|
599
|
-
this.el.style.width = "";
|
|
600
|
-
this.el.style.top = this.getTopPosition(element);
|
|
601
|
-
this.el.style.height = this.getElementHeight(element);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
getLeftPosition(element) {
|
|
605
|
-
return element ? `${element.offsetLeft || 0}px` : "0";
|
|
606
|
-
}
|
|
607
|
-
getElementWidth(element) {
|
|
608
|
-
return element ? `${element.offsetWidth || 0}px` : "0";
|
|
609
|
-
}
|
|
610
|
-
getTopPosition(element) {
|
|
611
|
-
return element ? `${element.offsetTop || 0}px` : "0";
|
|
612
|
-
}
|
|
613
|
-
getElementHeight(element) {
|
|
614
|
-
return element ? `${element.offsetHeight || 0}px` : "0";
|
|
615
|
-
}
|
|
616
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabsInkBarDirective, deps: [], target: FactoryTarget.Directive });
|
|
617
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzTabsInkBarDirective, isStandalone: true, selector: "nz-tabs-ink-bar, [nz-tabs-ink-bar]", inputs: { position: "position", animated: "animated" }, host: { properties: { "class.ant-tabs-ink-bar-animated": "_animated" }, classAttribute: "ant-tabs-ink-bar" }, ngImport: core_exports });
|
|
618
|
-
};
|
|
619
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabsInkBarDirective, decorators: [{
|
|
620
|
-
type: Directive,
|
|
621
|
-
args: [{
|
|
622
|
-
selector: "nz-tabs-ink-bar, [nz-tabs-ink-bar]",
|
|
623
|
-
host: {
|
|
624
|
-
class: "ant-tabs-ink-bar",
|
|
625
|
-
"[class.ant-tabs-ink-bar-animated]": "_animated"
|
|
626
|
-
}
|
|
627
|
-
}]
|
|
628
|
-
}], propDecorators: { position: [{
|
|
629
|
-
type: Input
|
|
630
|
-
}], animated: [{
|
|
631
|
-
type: Input
|
|
632
|
-
}] } });
|
|
633
|
-
var RESIZE_SCHEDULER = typeof requestAnimationFrame !== "undefined" ? animationFrameScheduler : asapScheduler;
|
|
634
|
-
var CSS_TRANSFORM_TIME = 150;
|
|
635
|
-
var NzTabNavBarComponent = class _NzTabNavBarComponent {
|
|
636
|
-
cdr = inject(ChangeDetectorRef);
|
|
637
|
-
ngZone = inject(NgZone);
|
|
638
|
-
viewportRuler = inject(ViewportRuler);
|
|
639
|
-
nzResizeObserver = inject(NzResizeObserver);
|
|
640
|
-
dir = inject(Directionality);
|
|
641
|
-
destroyRef = inject(DestroyRef);
|
|
642
|
-
indexFocused = new EventEmitter();
|
|
643
|
-
selectFocusedIndex = new EventEmitter();
|
|
644
|
-
addClicked = new EventEmitter();
|
|
645
|
-
tabScroll = new EventEmitter();
|
|
646
|
-
position = "horizontal";
|
|
647
|
-
addable = false;
|
|
648
|
-
hideBar = false;
|
|
649
|
-
addIcon = "plus";
|
|
650
|
-
inkBarAnimated = true;
|
|
651
|
-
extraTemplate;
|
|
652
|
-
extraContents = input.required(...ngDevMode ? [{ debugName: "extraContents" }] : []);
|
|
653
|
-
startExtraContent = computed(() => this.extraContents().find((item) => item.position() === "start"), ...ngDevMode ? [{ debugName: "startExtraContent" }] : []);
|
|
654
|
-
endExtraContent = computed(() => this.extraContents().find((item) => item.position() === "end"), ...ngDevMode ? [{ debugName: "endExtraContent" }] : []);
|
|
655
|
-
get selectedIndex() {
|
|
656
|
-
return this._selectedIndex;
|
|
657
|
-
}
|
|
658
|
-
set selectedIndex(value) {
|
|
659
|
-
const newValue = coerceNumberProperty(value);
|
|
660
|
-
if (this._selectedIndex !== newValue) {
|
|
661
|
-
this._selectedIndex = value;
|
|
662
|
-
this.selectedIndexChanged = true;
|
|
663
|
-
if (this.keyManager) {
|
|
664
|
-
this.keyManager.updateActiveItem(value);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
navWrapRef;
|
|
669
|
-
navListRef;
|
|
670
|
-
operationRef;
|
|
671
|
-
addBtnRef;
|
|
672
|
-
inkBar;
|
|
673
|
-
items;
|
|
674
|
-
/** Tracks which element has focus; used for keyboard navigation */
|
|
675
|
-
get focusIndex() {
|
|
676
|
-
return this.keyManager ? this.keyManager.activeItemIndex : 0;
|
|
677
|
-
}
|
|
678
|
-
/** When the focus index is set, we must manually send focus to the correct label */
|
|
679
|
-
set focusIndex(value) {
|
|
680
|
-
if (!this.isValidIndex(value) || this.focusIndex === value || !this.keyManager) {
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
|
-
this.keyManager.setActiveItem(value);
|
|
684
|
-
}
|
|
685
|
-
get showAddButton() {
|
|
686
|
-
return this.hiddenItems.length === 0 && this.addable;
|
|
687
|
-
}
|
|
688
|
-
translate = null;
|
|
689
|
-
transformX = 0;
|
|
690
|
-
transformY = 0;
|
|
691
|
-
pingLeft = false;
|
|
692
|
-
pingRight = false;
|
|
693
|
-
pingTop = false;
|
|
694
|
-
pingBottom = false;
|
|
695
|
-
hiddenItems = [];
|
|
696
|
-
keyManager;
|
|
697
|
-
_selectedIndex = 0;
|
|
698
|
-
wrapperWidth = 0;
|
|
699
|
-
wrapperHeight = 0;
|
|
700
|
-
scrollListWidth = 0;
|
|
701
|
-
scrollListHeight = 0;
|
|
702
|
-
operationWidth = 0;
|
|
703
|
-
operationHeight = 0;
|
|
704
|
-
addButtonWidth = 0;
|
|
705
|
-
addButtonHeight = 0;
|
|
706
|
-
selectedIndexChanged = false;
|
|
707
|
-
lockAnimationTimeoutId;
|
|
708
|
-
cssTransformTimeWaitingId;
|
|
709
|
-
constructor() {
|
|
710
|
-
this.destroyRef.onDestroy(() => {
|
|
711
|
-
clearTimeout(this.lockAnimationTimeoutId);
|
|
712
|
-
clearTimeout(this.cssTransformTimeWaitingId);
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
ngAfterViewInit() {
|
|
716
|
-
const dirChange = this.dir ? this.dir.change.asObservable() : of(null);
|
|
717
|
-
const resize = this.viewportRuler.change(150);
|
|
718
|
-
const realign = () => {
|
|
719
|
-
this.updateScrollListPosition();
|
|
720
|
-
this.alignInkBarToSelectedTab();
|
|
721
|
-
};
|
|
722
|
-
this.keyManager = new FocusKeyManager(this.items).withHorizontalOrientation(this.getLayoutDirection()).withWrap();
|
|
723
|
-
this.keyManager.updateActiveItem(this.selectedIndex);
|
|
724
|
-
requestAnimationFrame(realign);
|
|
725
|
-
merge(this.nzResizeObserver.observe(this.navWrapRef), this.nzResizeObserver.observe(this.navListRef)).pipe(takeUntilDestroyed(this.destroyRef), auditTime(16, RESIZE_SCHEDULER)).subscribe(() => {
|
|
726
|
-
realign();
|
|
727
|
-
});
|
|
728
|
-
merge(dirChange, resize, this.items.changes).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
729
|
-
Promise.resolve().then(realign);
|
|
730
|
-
this.keyManager.withHorizontalOrientation(this.getLayoutDirection());
|
|
731
|
-
});
|
|
732
|
-
this.keyManager.change.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((newFocusIndex) => {
|
|
733
|
-
this.indexFocused.emit(newFocusIndex);
|
|
734
|
-
this.scrollToTab(this.keyManager.activeItem);
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
ngAfterContentChecked() {
|
|
738
|
-
if (this.selectedIndexChanged) {
|
|
739
|
-
this.updateScrollListPosition();
|
|
740
|
-
this.alignInkBarToSelectedTab();
|
|
741
|
-
this.selectedIndexChanged = false;
|
|
742
|
-
this.cdr.markForCheck();
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
onSelectedFromMenu(tab) {
|
|
746
|
-
const tabIndex = this.items.toArray().findIndex((e) => e === tab);
|
|
747
|
-
if (tabIndex !== -1) {
|
|
748
|
-
this.keyManager.updateActiveItem(tabIndex);
|
|
749
|
-
if (this.focusIndex !== this.selectedIndex) {
|
|
750
|
-
this.selectFocusedIndex.emit(this.focusIndex);
|
|
751
|
-
this.scrollToTab(tab);
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
onOffsetChange(e) {
|
|
756
|
-
if (this.position === "horizontal") {
|
|
757
|
-
if (!this.lockAnimationTimeoutId) {
|
|
758
|
-
if (this.transformX >= 0 && e.x > 0) {
|
|
759
|
-
return;
|
|
760
|
-
}
|
|
761
|
-
if (this.transformX <= this.wrapperWidth - this.scrollListWidth && e.x < 0) {
|
|
762
|
-
return;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
e.event.preventDefault();
|
|
766
|
-
this.transformX = this.clampTransformX(this.transformX + e.x);
|
|
767
|
-
this.setTransform(this.transformX, 0);
|
|
768
|
-
} else {
|
|
769
|
-
if (!this.lockAnimationTimeoutId) {
|
|
770
|
-
if (this.transformY >= 0 && e.y > 0) {
|
|
771
|
-
return;
|
|
772
|
-
}
|
|
773
|
-
if (this.transformY <= this.wrapperHeight - this.scrollListHeight && e.y < 0) {
|
|
774
|
-
return;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
e.event.preventDefault();
|
|
778
|
-
this.transformY = this.clampTransformY(this.transformY + e.y);
|
|
779
|
-
this.setTransform(0, this.transformY);
|
|
780
|
-
}
|
|
781
|
-
this.lockAnimation();
|
|
782
|
-
this.setVisibleRange();
|
|
783
|
-
this.setPingStatus();
|
|
784
|
-
}
|
|
785
|
-
handleKeydown(event) {
|
|
786
|
-
const inNavigationList = this.navWrapRef.nativeElement.contains(event.target);
|
|
787
|
-
if (hasModifierKey(event) || !inNavigationList) {
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
switch (event.keyCode) {
|
|
791
|
-
case LEFT_ARROW:
|
|
792
|
-
case UP_ARROW:
|
|
793
|
-
case RIGHT_ARROW:
|
|
794
|
-
case DOWN_ARROW:
|
|
795
|
-
this.lockAnimation();
|
|
796
|
-
this.keyManager.onKeydown(event);
|
|
797
|
-
break;
|
|
798
|
-
case ENTER:
|
|
799
|
-
case SPACE:
|
|
800
|
-
if (this.focusIndex !== this.selectedIndex) {
|
|
801
|
-
this.selectFocusedIndex.emit(this.focusIndex);
|
|
802
|
-
}
|
|
803
|
-
break;
|
|
804
|
-
default:
|
|
805
|
-
this.keyManager.onKeydown(event);
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
isValidIndex(index) {
|
|
809
|
-
if (!this.items) {
|
|
810
|
-
return true;
|
|
811
|
-
}
|
|
812
|
-
const tab = this.items ? this.items.toArray()[index] : null;
|
|
813
|
-
return !!tab && !tab.disabled;
|
|
814
|
-
}
|
|
815
|
-
scrollToTab(tab) {
|
|
816
|
-
if (!this.items.find((e) => e === tab)) {
|
|
817
|
-
return;
|
|
818
|
-
}
|
|
819
|
-
const tabs = this.items.toArray();
|
|
820
|
-
if (this.position === "horizontal") {
|
|
821
|
-
let newTransform = this.transformX;
|
|
822
|
-
if (this.getLayoutDirection() === "rtl") {
|
|
823
|
-
const right = tabs[0].left + tabs[0].width - tab.left - tab.width;
|
|
824
|
-
if (right < this.transformX) {
|
|
825
|
-
newTransform = right;
|
|
826
|
-
} else if (right + tab.width > this.transformX + this.wrapperWidth) {
|
|
827
|
-
newTransform = right + tab.width - this.wrapperWidth;
|
|
828
|
-
}
|
|
829
|
-
} else if (tab.left < -this.transformX) {
|
|
830
|
-
newTransform = -tab.left;
|
|
831
|
-
} else if (tab.left + tab.width > -this.transformX + this.wrapperWidth) {
|
|
832
|
-
newTransform = -(tab.left + tab.width - this.wrapperWidth);
|
|
833
|
-
}
|
|
834
|
-
this.transformX = newTransform;
|
|
835
|
-
this.transformY = 0;
|
|
836
|
-
this.setTransform(newTransform, 0);
|
|
837
|
-
} else {
|
|
838
|
-
let newTransform = this.transformY;
|
|
839
|
-
if (tab.top < -this.transformY) {
|
|
840
|
-
newTransform = -tab.top;
|
|
841
|
-
} else if (tab.top + tab.height > -this.transformY + this.wrapperHeight) {
|
|
842
|
-
newTransform = -(tab.top + tab.height - this.wrapperHeight);
|
|
843
|
-
}
|
|
844
|
-
this.transformY = newTransform;
|
|
845
|
-
this.transformX = 0;
|
|
846
|
-
this.setTransform(0, newTransform);
|
|
847
|
-
}
|
|
848
|
-
clearTimeout(this.cssTransformTimeWaitingId);
|
|
849
|
-
this.cssTransformTimeWaitingId = setTimeout(() => {
|
|
850
|
-
this.setVisibleRange();
|
|
851
|
-
}, CSS_TRANSFORM_TIME);
|
|
852
|
-
}
|
|
853
|
-
lockAnimation() {
|
|
854
|
-
if (!this.lockAnimationTimeoutId) {
|
|
855
|
-
this.ngZone.runOutsideAngular(() => {
|
|
856
|
-
this.navListRef.nativeElement.style.transition = "none";
|
|
857
|
-
this.lockAnimationTimeoutId = setTimeout(() => {
|
|
858
|
-
this.navListRef.nativeElement.style.transition = "";
|
|
859
|
-
this.lockAnimationTimeoutId = void 0;
|
|
860
|
-
}, CSS_TRANSFORM_TIME);
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
setTransform(x, y) {
|
|
865
|
-
this.navListRef.nativeElement.style.transform = `translate(${x}px, ${y}px)`;
|
|
866
|
-
}
|
|
867
|
-
clampTransformX(transform) {
|
|
868
|
-
const scrollWidth = this.wrapperWidth - this.scrollListWidth;
|
|
869
|
-
if (this.getLayoutDirection() === "rtl") {
|
|
870
|
-
return Math.max(Math.min(scrollWidth, transform), 0);
|
|
871
|
-
} else {
|
|
872
|
-
return Math.min(Math.max(scrollWidth, transform), 0);
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
clampTransformY(transform) {
|
|
876
|
-
return Math.min(Math.max(this.wrapperHeight - this.scrollListHeight, transform), 0);
|
|
877
|
-
}
|
|
878
|
-
updateScrollListPosition() {
|
|
879
|
-
this.resetSizes();
|
|
880
|
-
this.transformX = this.clampTransformX(this.transformX);
|
|
881
|
-
this.transformY = this.clampTransformY(this.transformY);
|
|
882
|
-
this.setVisibleRange();
|
|
883
|
-
this.setPingStatus();
|
|
884
|
-
if (this.keyManager) {
|
|
885
|
-
this.keyManager.updateActiveItem(this.keyManager.activeItemIndex);
|
|
886
|
-
if (this.keyManager.activeItem) {
|
|
887
|
-
this.scrollToTab(this.keyManager.activeItem);
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
resetSizes() {
|
|
892
|
-
this.addButtonWidth = this.addBtnRef ? this.addBtnRef.getElementWidth() : 0;
|
|
893
|
-
this.addButtonHeight = this.addBtnRef ? this.addBtnRef.getElementHeight() : 0;
|
|
894
|
-
this.operationWidth = this.operationRef.getElementWidth();
|
|
895
|
-
this.operationHeight = this.operationRef.getElementHeight();
|
|
896
|
-
this.wrapperWidth = this.navWrapRef.nativeElement.offsetWidth || 0;
|
|
897
|
-
this.wrapperHeight = this.navWrapRef.nativeElement.offsetHeight || 0;
|
|
898
|
-
this.scrollListHeight = this.navListRef.nativeElement.offsetHeight || 0;
|
|
899
|
-
this.scrollListWidth = this.navListRef.nativeElement.offsetWidth || 0;
|
|
900
|
-
}
|
|
901
|
-
alignInkBarToSelectedTab() {
|
|
902
|
-
const selectedItem = this.items && this.items.length ? this.items.toArray()[this.selectedIndex] : null;
|
|
903
|
-
const selectedItemElement = selectedItem ? selectedItem.elementRef.nativeElement : null;
|
|
904
|
-
if (selectedItemElement) {
|
|
905
|
-
this.inkBar.alignToElement(selectedItemElement.parentElement);
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
setPingStatus() {
|
|
909
|
-
const ping = {
|
|
910
|
-
top: false,
|
|
911
|
-
right: false,
|
|
912
|
-
bottom: false,
|
|
913
|
-
left: false
|
|
914
|
-
};
|
|
915
|
-
const navWrap = this.navWrapRef.nativeElement;
|
|
916
|
-
if (this.position === "horizontal") {
|
|
917
|
-
if (this.getLayoutDirection() === "rtl") {
|
|
918
|
-
ping.right = this.transformX > 0;
|
|
919
|
-
ping.left = this.transformX + this.wrapperWidth < this.scrollListWidth;
|
|
920
|
-
} else {
|
|
921
|
-
ping.left = this.transformX < 0;
|
|
922
|
-
ping.right = -this.transformX + this.wrapperWidth < this.scrollListWidth;
|
|
923
|
-
}
|
|
924
|
-
} else {
|
|
925
|
-
ping.top = this.transformY < 0;
|
|
926
|
-
ping.bottom = -this.transformY + this.wrapperHeight < this.scrollListHeight;
|
|
927
|
-
}
|
|
928
|
-
Object.keys(ping).forEach((pos) => {
|
|
929
|
-
const className = `ant-tabs-nav-wrap-ping-${pos}`;
|
|
930
|
-
if (ping[pos]) {
|
|
931
|
-
navWrap.classList.add(className);
|
|
932
|
-
} else {
|
|
933
|
-
navWrap.classList.remove(className);
|
|
934
|
-
}
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
setVisibleRange() {
|
|
938
|
-
let unit;
|
|
939
|
-
let position;
|
|
940
|
-
let transformSize;
|
|
941
|
-
let basicSize;
|
|
942
|
-
let tabContentSize;
|
|
943
|
-
let addSize;
|
|
944
|
-
const tabs = this.items.toArray();
|
|
945
|
-
const DEFAULT_SIZE = { width: 0, height: 0, left: 0, top: 0, right: 0 };
|
|
946
|
-
const getOffset = (index) => {
|
|
947
|
-
let offset;
|
|
948
|
-
const size = tabs[index] || DEFAULT_SIZE;
|
|
949
|
-
if (position === "right") {
|
|
950
|
-
offset = tabs[0].left + tabs[0].width - tabs[index].left - tabs[index].width;
|
|
951
|
-
} else {
|
|
952
|
-
offset = size[position];
|
|
953
|
-
}
|
|
954
|
-
return offset;
|
|
955
|
-
};
|
|
956
|
-
if (this.position === "horizontal") {
|
|
957
|
-
unit = "width";
|
|
958
|
-
basicSize = this.wrapperWidth;
|
|
959
|
-
tabContentSize = this.scrollListWidth - (this.hiddenItems.length ? this.operationWidth : 0);
|
|
960
|
-
addSize = this.addButtonWidth;
|
|
961
|
-
transformSize = Math.abs(this.transformX);
|
|
962
|
-
if (this.getLayoutDirection() === "rtl") {
|
|
963
|
-
position = "right";
|
|
964
|
-
this.pingRight = this.transformX > 0;
|
|
965
|
-
this.pingLeft = this.transformX + this.wrapperWidth < this.scrollListWidth;
|
|
966
|
-
} else {
|
|
967
|
-
this.pingLeft = this.transformX < 0;
|
|
968
|
-
this.pingRight = -this.transformX + this.wrapperWidth < this.scrollListWidth;
|
|
969
|
-
position = "left";
|
|
970
|
-
}
|
|
971
|
-
} else {
|
|
972
|
-
unit = "height";
|
|
973
|
-
basicSize = this.wrapperHeight;
|
|
974
|
-
tabContentSize = this.scrollListHeight - (this.hiddenItems.length ? this.operationHeight : 0);
|
|
975
|
-
addSize = this.addButtonHeight;
|
|
976
|
-
position = "top";
|
|
977
|
-
transformSize = -this.transformY;
|
|
978
|
-
this.pingTop = this.transformY < 0;
|
|
979
|
-
this.pingBottom = -this.transformY + this.wrapperHeight < this.scrollListHeight;
|
|
980
|
-
}
|
|
981
|
-
let mergedBasicSize = basicSize;
|
|
982
|
-
if (tabContentSize + addSize > basicSize) {
|
|
983
|
-
mergedBasicSize = basicSize - addSize;
|
|
984
|
-
}
|
|
985
|
-
if (!tabs.length) {
|
|
986
|
-
this.hiddenItems = [];
|
|
987
|
-
this.cdr.markForCheck();
|
|
988
|
-
return;
|
|
989
|
-
}
|
|
990
|
-
const len = tabs.length;
|
|
991
|
-
let endIndex = len;
|
|
992
|
-
for (let i = 0; i < len; i += 1) {
|
|
993
|
-
const offset = getOffset(i);
|
|
994
|
-
const size = tabs[i] || DEFAULT_SIZE;
|
|
995
|
-
if (offset + size[unit] > transformSize + mergedBasicSize) {
|
|
996
|
-
endIndex = i - 1;
|
|
997
|
-
break;
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
let startIndex = 0;
|
|
1001
|
-
for (let i = len - 1; i >= 0; i -= 1) {
|
|
1002
|
-
const offset = getOffset(i);
|
|
1003
|
-
if (offset < transformSize) {
|
|
1004
|
-
startIndex = i + 1;
|
|
1005
|
-
break;
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
const startHiddenTabs = tabs.slice(0, startIndex);
|
|
1009
|
-
const endHiddenTabs = tabs.slice(endIndex + 1);
|
|
1010
|
-
this.hiddenItems = [...startHiddenTabs, ...endHiddenTabs];
|
|
1011
|
-
this.cdr.markForCheck();
|
|
1012
|
-
}
|
|
1013
|
-
getLayoutDirection() {
|
|
1014
|
-
return this.dir && this.dir.value === "rtl" ? "rtl" : "ltr";
|
|
1015
|
-
}
|
|
1016
|
-
ngOnChanges(changes) {
|
|
1017
|
-
const { position } = changes;
|
|
1018
|
-
if (position && !position.isFirstChange()) {
|
|
1019
|
-
this.alignInkBarToSelectedTab();
|
|
1020
|
-
this.lockAnimation();
|
|
1021
|
-
this.updateScrollListPosition();
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabNavBarComponent, deps: [], target: FactoryTarget.Component });
|
|
1025
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTabNavBarComponent, isStandalone: true, selector: "nz-tabs-nav", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: false, isRequired: false, transformFunction: null }, addable: { classPropertyName: "addable", publicName: "addable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, hideBar: { classPropertyName: "hideBar", publicName: "hideBar", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, addIcon: { classPropertyName: "addIcon", publicName: "addIcon", isSignal: false, isRequired: false, transformFunction: null }, inkBarAnimated: { classPropertyName: "inkBarAnimated", publicName: "inkBarAnimated", isSignal: false, isRequired: false, transformFunction: null }, extraTemplate: { classPropertyName: "extraTemplate", publicName: "extraTemplate", isSignal: false, isRequired: false, transformFunction: null }, extraContents: { classPropertyName: "extraContents", publicName: "extraContents", isSignal: true, isRequired: true, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { indexFocused: "indexFocused", selectFocusedIndex: "selectFocusedIndex", addClicked: "addClicked", tabScroll: "tabScroll" }, host: { listeners: { "keydown": "handleKeydown($event)" }, classAttribute: "ant-tabs-nav" }, queries: [{ propertyName: "items", predicate: NzTabNavItemDirective, descendants: true }], viewQueries: [{ propertyName: "navWrapRef", first: true, predicate: ["navWrap"], descendants: true, static: true }, { propertyName: "navListRef", first: true, predicate: ["navList"], descendants: true, static: true }, { propertyName: "operationRef", first: true, predicate: NzTabNavOperationComponent, descendants: true, static: true }, { propertyName: "addBtnRef", first: true, predicate: NzTabAddButtonComponent, descendants: true }, { propertyName: "inkBar", first: true, predicate: NzTabsInkBarDirective, descendants: true, static: true }], exportAs: ["nzTabsNav"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
1026
|
-
@if (startExtraContent()) {
|
|
1027
|
-
<div class="ant-tabs-extra-content">
|
|
1028
|
-
<ng-template [ngTemplateOutlet]="startExtraContent()!.templateRef"></ng-template>
|
|
1029
|
-
</div>
|
|
1030
|
-
}
|
|
1031
|
-
<div
|
|
1032
|
-
class="ant-tabs-nav-wrap"
|
|
1033
|
-
[class.ant-tabs-nav-wrap-ping-left]="pingLeft"
|
|
1034
|
-
[class.ant-tabs-nav-wrap-ping-right]="pingRight"
|
|
1035
|
-
[class.ant-tabs-nav-wrap-ping-top]="pingTop"
|
|
1036
|
-
[class.ant-tabs-nav-wrap-ping-bottom]="pingBottom"
|
|
1037
|
-
#navWrap
|
|
1038
|
-
>
|
|
1039
|
-
<div
|
|
1040
|
-
class="ant-tabs-nav-list"
|
|
1041
|
-
#navList
|
|
1042
|
-
nzTabScrollList
|
|
1043
|
-
(offsetChange)="onOffsetChange($event)"
|
|
1044
|
-
(tabScroll)="tabScroll.emit($event)"
|
|
1045
|
-
role="tablist"
|
|
1046
|
-
>
|
|
1047
|
-
<ng-content></ng-content>
|
|
1048
|
-
@if (showAddButton) {
|
|
1049
|
-
<button
|
|
1050
|
-
role="tab"
|
|
1051
|
-
[attr.tabindex]="-1"
|
|
1052
|
-
nz-tab-add-button
|
|
1053
|
-
[addIcon]="addIcon"
|
|
1054
|
-
(click)="addClicked.emit()"
|
|
1055
|
-
></button>
|
|
1056
|
-
}
|
|
1057
|
-
<div nz-tabs-ink-bar [hidden]="hideBar" [position]="position" [animated]="inkBarAnimated"></div>
|
|
1058
|
-
</div>
|
|
1059
|
-
</div>
|
|
1060
|
-
<nz-tab-nav-operation
|
|
1061
|
-
(addClicked)="addClicked.emit()"
|
|
1062
|
-
(selected)="onSelectedFromMenu($event)"
|
|
1063
|
-
[addIcon]="addIcon"
|
|
1064
|
-
[addable]="addable"
|
|
1065
|
-
[items]="hiddenItems"
|
|
1066
|
-
></nz-tab-nav-operation>
|
|
1067
|
-
@if (endExtraContent()) {
|
|
1068
|
-
<div class="ant-tabs-extra-content">
|
|
1069
|
-
<ng-template [ngTemplateOutlet]="endExtraContent()!.templateRef"></ng-template>
|
|
1070
|
-
</div>
|
|
1071
|
-
} @else if (extraTemplate) {
|
|
1072
|
-
<div class="ant-tabs-extra-content">
|
|
1073
|
-
<ng-template [ngTemplateOutlet]="extraTemplate"></ng-template>
|
|
1074
|
-
</div>
|
|
1075
|
-
}
|
|
1076
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NzTabScrollListDirective, selector: "[nzTabScrollList]", outputs: ["offsetChange", "tabScroll"] }, { kind: "component", type: NzTabAddButtonComponent, selector: "nz-tab-add-button, button[nz-tab-add-button]", inputs: ["addIcon"] }, { kind: "directive", type: NzTabsInkBarDirective, selector: "nz-tabs-ink-bar, [nz-tabs-ink-bar]", inputs: ["position", "animated"] }, { kind: "component", type: NzTabNavOperationComponent, selector: "nz-tab-nav-operation", inputs: ["items", "addable", "addIcon"], outputs: ["addClicked", "selected"], exportAs: ["nzTabNavOperation"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
1077
|
-
};
|
|
1078
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabNavBarComponent, decorators: [{
|
|
1079
|
-
type: Component,
|
|
1080
|
-
args: [{
|
|
1081
|
-
selector: "nz-tabs-nav",
|
|
1082
|
-
exportAs: "nzTabsNav",
|
|
1083
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1084
|
-
encapsulation: ViewEncapsulation.None,
|
|
1085
|
-
template: `
|
|
1086
|
-
@if (startExtraContent()) {
|
|
1087
|
-
<div class="ant-tabs-extra-content">
|
|
1088
|
-
<ng-template [ngTemplateOutlet]="startExtraContent()!.templateRef"></ng-template>
|
|
1089
|
-
</div>
|
|
1090
|
-
}
|
|
1091
|
-
<div
|
|
1092
|
-
class="ant-tabs-nav-wrap"
|
|
1093
|
-
[class.ant-tabs-nav-wrap-ping-left]="pingLeft"
|
|
1094
|
-
[class.ant-tabs-nav-wrap-ping-right]="pingRight"
|
|
1095
|
-
[class.ant-tabs-nav-wrap-ping-top]="pingTop"
|
|
1096
|
-
[class.ant-tabs-nav-wrap-ping-bottom]="pingBottom"
|
|
1097
|
-
#navWrap
|
|
1098
|
-
>
|
|
1099
|
-
<div
|
|
1100
|
-
class="ant-tabs-nav-list"
|
|
1101
|
-
#navList
|
|
1102
|
-
nzTabScrollList
|
|
1103
|
-
(offsetChange)="onOffsetChange($event)"
|
|
1104
|
-
(tabScroll)="tabScroll.emit($event)"
|
|
1105
|
-
role="tablist"
|
|
1106
|
-
>
|
|
1107
|
-
<ng-content></ng-content>
|
|
1108
|
-
@if (showAddButton) {
|
|
1109
|
-
<button
|
|
1110
|
-
role="tab"
|
|
1111
|
-
[attr.tabindex]="-1"
|
|
1112
|
-
nz-tab-add-button
|
|
1113
|
-
[addIcon]="addIcon"
|
|
1114
|
-
(click)="addClicked.emit()"
|
|
1115
|
-
></button>
|
|
1116
|
-
}
|
|
1117
|
-
<div nz-tabs-ink-bar [hidden]="hideBar" [position]="position" [animated]="inkBarAnimated"></div>
|
|
1118
|
-
</div>
|
|
1119
|
-
</div>
|
|
1120
|
-
<nz-tab-nav-operation
|
|
1121
|
-
(addClicked)="addClicked.emit()"
|
|
1122
|
-
(selected)="onSelectedFromMenu($event)"
|
|
1123
|
-
[addIcon]="addIcon"
|
|
1124
|
-
[addable]="addable"
|
|
1125
|
-
[items]="hiddenItems"
|
|
1126
|
-
></nz-tab-nav-operation>
|
|
1127
|
-
@if (endExtraContent()) {
|
|
1128
|
-
<div class="ant-tabs-extra-content">
|
|
1129
|
-
<ng-template [ngTemplateOutlet]="endExtraContent()!.templateRef"></ng-template>
|
|
1130
|
-
</div>
|
|
1131
|
-
} @else if (extraTemplate) {
|
|
1132
|
-
<div class="ant-tabs-extra-content">
|
|
1133
|
-
<ng-template [ngTemplateOutlet]="extraTemplate"></ng-template>
|
|
1134
|
-
</div>
|
|
1135
|
-
}
|
|
1136
|
-
`,
|
|
1137
|
-
host: {
|
|
1138
|
-
class: "ant-tabs-nav",
|
|
1139
|
-
"(keydown)": "handleKeydown($event)"
|
|
1140
|
-
},
|
|
1141
|
-
imports: [
|
|
1142
|
-
NzTabScrollListDirective,
|
|
1143
|
-
NzTabAddButtonComponent,
|
|
1144
|
-
NzTabsInkBarDirective,
|
|
1145
|
-
NzTabNavOperationComponent,
|
|
1146
|
-
NgTemplateOutlet
|
|
1147
|
-
]
|
|
1148
|
-
}]
|
|
1149
|
-
}], ctorParameters: () => [], propDecorators: { indexFocused: [{
|
|
1150
|
-
type: Output
|
|
1151
|
-
}], selectFocusedIndex: [{
|
|
1152
|
-
type: Output
|
|
1153
|
-
}], addClicked: [{
|
|
1154
|
-
type: Output
|
|
1155
|
-
}], tabScroll: [{
|
|
1156
|
-
type: Output
|
|
1157
|
-
}], position: [{
|
|
1158
|
-
type: Input
|
|
1159
|
-
}], addable: [{
|
|
1160
|
-
type: Input,
|
|
1161
|
-
args: [{ transform: booleanAttribute }]
|
|
1162
|
-
}], hideBar: [{
|
|
1163
|
-
type: Input,
|
|
1164
|
-
args: [{ transform: booleanAttribute }]
|
|
1165
|
-
}], addIcon: [{
|
|
1166
|
-
type: Input
|
|
1167
|
-
}], inkBarAnimated: [{
|
|
1168
|
-
type: Input
|
|
1169
|
-
}], extraTemplate: [{
|
|
1170
|
-
type: Input
|
|
1171
|
-
}], selectedIndex: [{
|
|
1172
|
-
type: Input
|
|
1173
|
-
}], navWrapRef: [{
|
|
1174
|
-
type: ViewChild,
|
|
1175
|
-
args: ["navWrap", { static: true }]
|
|
1176
|
-
}], navListRef: [{
|
|
1177
|
-
type: ViewChild,
|
|
1178
|
-
args: ["navList", { static: true }]
|
|
1179
|
-
}], operationRef: [{
|
|
1180
|
-
type: ViewChild,
|
|
1181
|
-
args: [NzTabNavOperationComponent, { static: true }]
|
|
1182
|
-
}], addBtnRef: [{
|
|
1183
|
-
type: ViewChild,
|
|
1184
|
-
args: [NzTabAddButtonComponent, { static: false }]
|
|
1185
|
-
}], inkBar: [{
|
|
1186
|
-
type: ViewChild,
|
|
1187
|
-
args: [NzTabsInkBarDirective, { static: true }]
|
|
1188
|
-
}], items: [{
|
|
1189
|
-
type: ContentChildren,
|
|
1190
|
-
args: [NzTabNavItemDirective, { descendants: true }]
|
|
1191
|
-
}] } });
|
|
1192
|
-
var NzTabDirective = class _NzTabDirective {
|
|
1193
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabDirective, deps: [], target: FactoryTarget.Directive });
|
|
1194
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzTabDirective, isStandalone: true, selector: "[nz-tab]", exportAs: ["nzTab"], ngImport: core_exports });
|
|
1195
|
-
};
|
|
1196
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabDirective, decorators: [{
|
|
1197
|
-
type: Directive,
|
|
1198
|
-
args: [{
|
|
1199
|
-
selector: "[nz-tab]",
|
|
1200
|
-
exportAs: "nzTab"
|
|
1201
|
-
}]
|
|
1202
|
-
}] });
|
|
1203
|
-
var NZ_TAB_SET = new InjectionToken(typeof ngDevMode !== "undefined" && ngDevMode ? "nz-tabs" : "");
|
|
1204
|
-
var NzTabComponent = class _NzTabComponent {
|
|
1205
|
-
nzTitle = "";
|
|
1206
|
-
nzClosable = false;
|
|
1207
|
-
nzCloseIcon = "close";
|
|
1208
|
-
nzDisabled = false;
|
|
1209
|
-
nzForceRender = false;
|
|
1210
|
-
nzSelect = new EventEmitter();
|
|
1211
|
-
nzDeselect = new EventEmitter();
|
|
1212
|
-
nzClick = new EventEmitter();
|
|
1213
|
-
nzContextmenu = new EventEmitter();
|
|
1214
|
-
nzTabLinkTemplateDirective;
|
|
1215
|
-
template = null;
|
|
1216
|
-
linkDirective;
|
|
1217
|
-
contentTemplate;
|
|
1218
|
-
isActive = false;
|
|
1219
|
-
hasBeenActive = false;
|
|
1220
|
-
position = null;
|
|
1221
|
-
origin = null;
|
|
1222
|
-
closestTabSet = inject(NZ_TAB_SET);
|
|
1223
|
-
stateChanges = new Subject();
|
|
1224
|
-
get content() {
|
|
1225
|
-
return this.template || this.contentTemplate;
|
|
1226
|
-
}
|
|
1227
|
-
get label() {
|
|
1228
|
-
return this.nzTitle || this.nzTabLinkTemplateDirective?.templateRef;
|
|
1229
|
-
}
|
|
1230
|
-
ngOnChanges(changes) {
|
|
1231
|
-
const { nzTitle, nzDisabled, nzForceRender } = changes;
|
|
1232
|
-
if (nzTitle || nzDisabled || nzForceRender) {
|
|
1233
|
-
this.stateChanges.next();
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
ngOnDestroy() {
|
|
1237
|
-
this.stateChanges.complete();
|
|
1238
|
-
}
|
|
1239
|
-
setActive(active) {
|
|
1240
|
-
this.isActive = active;
|
|
1241
|
-
if (active) {
|
|
1242
|
-
this.hasBeenActive = true;
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabComponent, deps: [], target: FactoryTarget.Component });
|
|
1246
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "16.1.0", version: "20.3.0", type: _NzTabComponent, isStandalone: true, selector: "nz-tab", inputs: { nzTitle: "nzTitle", nzClosable: ["nzClosable", "nzClosable", booleanAttribute], nzCloseIcon: "nzCloseIcon", nzDisabled: ["nzDisabled", "nzDisabled", booleanAttribute], nzForceRender: ["nzForceRender", "nzForceRender", booleanAttribute] }, outputs: { nzSelect: "nzSelect", nzDeselect: "nzDeselect", nzClick: "nzClick", nzContextmenu: "nzContextmenu" }, queries: [{ propertyName: "nzTabLinkTemplateDirective", first: true, predicate: NzTabLinkTemplateDirective, descendants: true }, { propertyName: "template", first: true, predicate: NzTabDirective, descendants: true, read: TemplateRef }, { propertyName: "linkDirective", first: true, predicate: NzTabLinkDirective, descendants: true }], viewQueries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true, static: true }], exportAs: ["nzTab"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
1247
|
-
<ng-template #tabLinkTemplate>
|
|
1248
|
-
<ng-content select="[nz-tab-link]"></ng-content>
|
|
1249
|
-
</ng-template>
|
|
1250
|
-
<ng-template #contentTemplate>
|
|
1251
|
-
<ng-content></ng-content>
|
|
1252
|
-
</ng-template>
|
|
1253
|
-
`, isInline: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
1254
|
-
};
|
|
1255
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabComponent, decorators: [{
|
|
1256
|
-
type: Component,
|
|
1257
|
-
args: [{
|
|
1258
|
-
selector: "nz-tab",
|
|
1259
|
-
exportAs: "nzTab",
|
|
1260
|
-
encapsulation: ViewEncapsulation.None,
|
|
1261
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1262
|
-
template: `
|
|
1263
|
-
<ng-template #tabLinkTemplate>
|
|
1264
|
-
<ng-content select="[nz-tab-link]"></ng-content>
|
|
1265
|
-
</ng-template>
|
|
1266
|
-
<ng-template #contentTemplate>
|
|
1267
|
-
<ng-content></ng-content>
|
|
1268
|
-
</ng-template>
|
|
1269
|
-
`
|
|
1270
|
-
}]
|
|
1271
|
-
}], propDecorators: { nzTitle: [{
|
|
1272
|
-
type: Input
|
|
1273
|
-
}], nzClosable: [{
|
|
1274
|
-
type: Input,
|
|
1275
|
-
args: [{ transform: booleanAttribute }]
|
|
1276
|
-
}], nzCloseIcon: [{
|
|
1277
|
-
type: Input
|
|
1278
|
-
}], nzDisabled: [{
|
|
1279
|
-
type: Input,
|
|
1280
|
-
args: [{ transform: booleanAttribute }]
|
|
1281
|
-
}], nzForceRender: [{
|
|
1282
|
-
type: Input,
|
|
1283
|
-
args: [{ transform: booleanAttribute }]
|
|
1284
|
-
}], nzSelect: [{
|
|
1285
|
-
type: Output
|
|
1286
|
-
}], nzDeselect: [{
|
|
1287
|
-
type: Output
|
|
1288
|
-
}], nzClick: [{
|
|
1289
|
-
type: Output
|
|
1290
|
-
}], nzContextmenu: [{
|
|
1291
|
-
type: Output
|
|
1292
|
-
}], nzTabLinkTemplateDirective: [{
|
|
1293
|
-
type: ContentChild,
|
|
1294
|
-
args: [NzTabLinkTemplateDirective, { static: false }]
|
|
1295
|
-
}], template: [{
|
|
1296
|
-
type: ContentChild,
|
|
1297
|
-
args: [NzTabDirective, { static: false, read: TemplateRef }]
|
|
1298
|
-
}], linkDirective: [{
|
|
1299
|
-
type: ContentChild,
|
|
1300
|
-
args: [NzTabLinkDirective, { static: false }]
|
|
1301
|
-
}], contentTemplate: [{
|
|
1302
|
-
type: ViewChild,
|
|
1303
|
-
args: ["contentTemplate", { static: true }]
|
|
1304
|
-
}] } });
|
|
1305
|
-
var NZ_CONFIG_MODULE_NAME = "tabs";
|
|
1306
|
-
var nextId = 0;
|
|
1307
|
-
var NzTabsComponent = (() => {
|
|
1308
|
-
var _a;
|
|
1309
|
-
let _nzType_decorators;
|
|
1310
|
-
let _nzType_initializers = [];
|
|
1311
|
-
let _nzType_extraInitializers = [];
|
|
1312
|
-
let _nzSize_decorators;
|
|
1313
|
-
let _nzSize_initializers = [];
|
|
1314
|
-
let _nzSize_extraInitializers = [];
|
|
1315
|
-
let _nzAnimated_decorators;
|
|
1316
|
-
let _nzAnimated_initializers = [];
|
|
1317
|
-
let _nzAnimated_extraInitializers = [];
|
|
1318
|
-
let _nzTabBarGutter_decorators;
|
|
1319
|
-
let _nzTabBarGutter_initializers = [];
|
|
1320
|
-
let _nzTabBarGutter_extraInitializers = [];
|
|
1321
|
-
return _a = class {
|
|
1322
|
-
_nzModuleName = NZ_CONFIG_MODULE_NAME;
|
|
1323
|
-
nzConfigService = inject(NzConfigService);
|
|
1324
|
-
ngZone = inject(NgZone);
|
|
1325
|
-
cdr = inject(ChangeDetectorRef);
|
|
1326
|
-
directionality = inject(Directionality);
|
|
1327
|
-
destroyRef = inject(DestroyRef);
|
|
1328
|
-
get nzSelectedIndex() {
|
|
1329
|
-
return this.selectedIndex;
|
|
1330
|
-
}
|
|
1331
|
-
set nzSelectedIndex(value) {
|
|
1332
|
-
this.indexToSelect = coerceNumberProperty(value, null);
|
|
1333
|
-
}
|
|
1334
|
-
nzTabPosition = "top";
|
|
1335
|
-
nzTabBarExtraContent;
|
|
1336
|
-
nzCanDeactivate = null;
|
|
1337
|
-
nzAddIcon = "plus";
|
|
1338
|
-
nzTabBarStyle = null;
|
|
1339
|
-
nzType = __runInitializers(this, _nzType_initializers, "line");
|
|
1340
|
-
nzSize = (__runInitializers(this, _nzType_extraInitializers), __runInitializers(this, _nzSize_initializers, "default"));
|
|
1341
|
-
nzAnimated = (__runInitializers(this, _nzSize_extraInitializers), __runInitializers(this, _nzAnimated_initializers, true));
|
|
1342
|
-
nzTabBarGutter = (__runInitializers(this, _nzAnimated_extraInitializers), __runInitializers(this, _nzTabBarGutter_initializers, void 0));
|
|
1343
|
-
nzHideAdd = (__runInitializers(this, _nzTabBarGutter_extraInitializers), false);
|
|
1344
|
-
nzCentered = false;
|
|
1345
|
-
nzHideAll = false;
|
|
1346
|
-
nzLinkRouter = false;
|
|
1347
|
-
nzLinkExact = true;
|
|
1348
|
-
nzDestroyInactiveTabPane = false;
|
|
1349
|
-
nzSelectChange = new EventEmitter(true);
|
|
1350
|
-
nzSelectedIndexChange = new EventEmitter();
|
|
1351
|
-
nzTabListScroll = new EventEmitter();
|
|
1352
|
-
nzClose = new EventEmitter();
|
|
1353
|
-
nzAdd = new EventEmitter();
|
|
1354
|
-
get position() {
|
|
1355
|
-
return ["top", "bottom"].indexOf(this.nzTabPosition) === -1 ? "vertical" : "horizontal";
|
|
1356
|
-
}
|
|
1357
|
-
get addable() {
|
|
1358
|
-
return this.nzType === "editable-card" && !this.nzHideAdd;
|
|
1359
|
-
}
|
|
1360
|
-
get closable() {
|
|
1361
|
-
return this.nzType === "editable-card";
|
|
1362
|
-
}
|
|
1363
|
-
get line() {
|
|
1364
|
-
return this.nzType === "line";
|
|
1365
|
-
}
|
|
1366
|
-
get inkBarAnimated() {
|
|
1367
|
-
return this.line && (typeof this.nzAnimated === "boolean" ? this.nzAnimated : this.nzAnimated.inkBar);
|
|
1368
|
-
}
|
|
1369
|
-
get tabPaneAnimated() {
|
|
1370
|
-
return typeof this.nzAnimated === "boolean" ? this.nzAnimated : this.nzAnimated.tabPane;
|
|
1371
|
-
}
|
|
1372
|
-
// Pick up only direct descendants under ivy rendering engine
|
|
1373
|
-
// We filter out only the tabs that belong to this tab set in `tabs`.
|
|
1374
|
-
allTabs = new QueryList();
|
|
1375
|
-
tabLinks = new QueryList();
|
|
1376
|
-
tabNavBarRef;
|
|
1377
|
-
// All the direct tabs for this tab set
|
|
1378
|
-
tabs = new QueryList();
|
|
1379
|
-
extraContents = contentChildren(NzTabBarExtraContentDirective, ...ngDevMode ? [{ debugName: "extraContents" }] : []);
|
|
1380
|
-
dir = "ltr";
|
|
1381
|
-
tabSetId;
|
|
1382
|
-
indexToSelect = 0;
|
|
1383
|
-
selectedIndex = null;
|
|
1384
|
-
tabLabelSubscription = Subscription.EMPTY;
|
|
1385
|
-
canDeactivateSubscription = Subscription.EMPTY;
|
|
1386
|
-
router = inject(Router, { optional: true });
|
|
1387
|
-
constructor() {
|
|
1388
|
-
this.tabSetId = nextId++;
|
|
1389
|
-
if (inject(HOST_TAG_NAME) === "nz-tabset") {
|
|
1390
|
-
warn(`${PREFIX} <nz-tabset> is deprecated, please use <nz-tabs> instead.`);
|
|
1391
|
-
}
|
|
1392
|
-
this.destroyRef.onDestroy(() => {
|
|
1393
|
-
this.tabs.destroy();
|
|
1394
|
-
this.tabLabelSubscription.unsubscribe();
|
|
1395
|
-
this.canDeactivateSubscription.unsubscribe();
|
|
1396
|
-
});
|
|
1397
|
-
}
|
|
1398
|
-
ngOnInit() {
|
|
1399
|
-
this.dir = this.directionality.value;
|
|
1400
|
-
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
|
|
1401
|
-
this.dir = direction;
|
|
1402
|
-
this.cdr.detectChanges();
|
|
1403
|
-
});
|
|
1404
|
-
}
|
|
1405
|
-
ngAfterContentInit() {
|
|
1406
|
-
this.ngZone.runOutsideAngular(() => {
|
|
1407
|
-
Promise.resolve().then(() => this.setUpRouter());
|
|
1408
|
-
});
|
|
1409
|
-
this.subscribeToTabLabels();
|
|
1410
|
-
this.subscribeToAllTabChanges();
|
|
1411
|
-
this.tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
1412
|
-
const indexToSelect = this.clampTabIndex(this.indexToSelect);
|
|
1413
|
-
if (indexToSelect === this.selectedIndex) {
|
|
1414
|
-
const tabs = this.tabs.toArray();
|
|
1415
|
-
for (let i = 0; i < tabs.length; i++) {
|
|
1416
|
-
if (tabs[i].isActive) {
|
|
1417
|
-
this.indexToSelect = this.selectedIndex = i;
|
|
1418
|
-
break;
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
|
-
this.subscribeToTabLabels();
|
|
1423
|
-
this.cdr.markForCheck();
|
|
1424
|
-
});
|
|
1425
|
-
}
|
|
1426
|
-
ngAfterContentChecked() {
|
|
1427
|
-
const indexToSelect = this.indexToSelect = this.clampTabIndex(this.indexToSelect);
|
|
1428
|
-
if (this.selectedIndex !== indexToSelect) {
|
|
1429
|
-
const isFirstRun = this.selectedIndex == null;
|
|
1430
|
-
if (!isFirstRun) {
|
|
1431
|
-
this.nzSelectChange.emit(this.createChangeEvent(indexToSelect));
|
|
1432
|
-
}
|
|
1433
|
-
Promise.resolve().then(() => {
|
|
1434
|
-
this.tabs.forEach((tab, index) => tab.setActive(index === indexToSelect));
|
|
1435
|
-
if (!isFirstRun) {
|
|
1436
|
-
this.nzSelectedIndexChange.emit(indexToSelect);
|
|
1437
|
-
}
|
|
1438
|
-
});
|
|
1439
|
-
}
|
|
1440
|
-
this.tabs.forEach((tab, index) => {
|
|
1441
|
-
tab.position = index - indexToSelect;
|
|
1442
|
-
if (this.selectedIndex != null && tab.position === 0 && !tab.origin) {
|
|
1443
|
-
tab.origin = indexToSelect - this.selectedIndex;
|
|
1444
|
-
}
|
|
1445
|
-
});
|
|
1446
|
-
if (this.selectedIndex !== indexToSelect) {
|
|
1447
|
-
this.selectedIndex = indexToSelect;
|
|
1448
|
-
this.cdr.markForCheck();
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
onClose(index, e) {
|
|
1452
|
-
e.preventDefault();
|
|
1453
|
-
e.stopPropagation();
|
|
1454
|
-
this.nzClose.emit({ index });
|
|
1455
|
-
}
|
|
1456
|
-
onAdd() {
|
|
1457
|
-
this.nzAdd.emit();
|
|
1458
|
-
}
|
|
1459
|
-
clampTabIndex(index) {
|
|
1460
|
-
return Math.min(this.tabs.length - 1, Math.max(index || 0, 0));
|
|
1461
|
-
}
|
|
1462
|
-
createChangeEvent(index) {
|
|
1463
|
-
const event = new NzTabChangeEvent();
|
|
1464
|
-
event.index = index;
|
|
1465
|
-
if (this.tabs && this.tabs.length) {
|
|
1466
|
-
event.tab = this.tabs.toArray()[index];
|
|
1467
|
-
this.tabs.forEach((tab, i) => {
|
|
1468
|
-
if (i !== index) {
|
|
1469
|
-
tab.nzDeselect.emit();
|
|
1470
|
-
}
|
|
1471
|
-
});
|
|
1472
|
-
event.tab.nzSelect.emit();
|
|
1473
|
-
}
|
|
1474
|
-
return event;
|
|
1475
|
-
}
|
|
1476
|
-
subscribeToTabLabels() {
|
|
1477
|
-
if (this.tabLabelSubscription) {
|
|
1478
|
-
this.tabLabelSubscription.unsubscribe();
|
|
1479
|
-
}
|
|
1480
|
-
this.tabLabelSubscription = merge(...this.tabs.map((tab) => tab.stateChanges)).subscribe(() => this.cdr.markForCheck());
|
|
1481
|
-
}
|
|
1482
|
-
subscribeToAllTabChanges() {
|
|
1483
|
-
this.allTabs.changes.pipe(startWith(this.allTabs)).subscribe((tabs) => {
|
|
1484
|
-
this.tabs.reset(tabs.filter((tab) => tab.closestTabSet === this));
|
|
1485
|
-
this.tabs.notifyOnChanges();
|
|
1486
|
-
});
|
|
1487
|
-
}
|
|
1488
|
-
canDeactivateFun(pre, next) {
|
|
1489
|
-
if (typeof this.nzCanDeactivate === "function") {
|
|
1490
|
-
const observable = wrapIntoObservable(this.nzCanDeactivate(pre, next));
|
|
1491
|
-
return observable.pipe(first(), takeUntilDestroyed(this.destroyRef));
|
|
1492
|
-
} else {
|
|
1493
|
-
return of(true);
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
clickNavItem(tab, index, e) {
|
|
1497
|
-
if (!tab.nzDisabled) {
|
|
1498
|
-
tab.nzClick.emit();
|
|
1499
|
-
if (!this.isRouterLinkClickEvent(index, e)) {
|
|
1500
|
-
this.setSelectedIndex(index);
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
isRouterLinkClickEvent(index, event) {
|
|
1505
|
-
const target = event.target;
|
|
1506
|
-
if (this.nzLinkRouter) {
|
|
1507
|
-
return !!this.tabs.toArray()[index]?.linkDirective?.elementRef.nativeElement.contains(target);
|
|
1508
|
-
} else {
|
|
1509
|
-
return false;
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
contextmenuNavItem(tab, e) {
|
|
1513
|
-
if (!tab.nzDisabled) {
|
|
1514
|
-
tab.nzContextmenu.emit(e);
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
setSelectedIndex(index) {
|
|
1518
|
-
this.canDeactivateSubscription.unsubscribe();
|
|
1519
|
-
this.canDeactivateSubscription = this.canDeactivateFun(this.selectedIndex, index).subscribe((can) => {
|
|
1520
|
-
if (can) {
|
|
1521
|
-
this.nzSelectedIndex = index;
|
|
1522
|
-
this.tabNavBarRef.focusIndex = index;
|
|
1523
|
-
this.cdr.markForCheck();
|
|
1524
|
-
}
|
|
1525
|
-
});
|
|
1526
|
-
}
|
|
1527
|
-
getTabIndex(tab, index) {
|
|
1528
|
-
if (tab.nzDisabled) {
|
|
1529
|
-
return null;
|
|
1530
|
-
}
|
|
1531
|
-
return this.selectedIndex === index ? 0 : -1;
|
|
1532
|
-
}
|
|
1533
|
-
getTabContentId(i) {
|
|
1534
|
-
return `nz-tabs-${this.tabSetId}-tab-${i}`;
|
|
1535
|
-
}
|
|
1536
|
-
setUpRouter() {
|
|
1537
|
-
if (this.nzLinkRouter) {
|
|
1538
|
-
if (!this.router) {
|
|
1539
|
-
throw new Error(`${PREFIX} you should import 'RouterModule' if you want to use 'nzLinkRouter'!`);
|
|
1540
|
-
}
|
|
1541
|
-
merge(this.router.events.pipe(filter((e) => e instanceof NavigationEnd)), this.tabLinks.changes).pipe(startWith(true), delay(0), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
1542
|
-
this.updateRouterActive();
|
|
1543
|
-
this.cdr.markForCheck();
|
|
1544
|
-
});
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
updateRouterActive() {
|
|
1548
|
-
if (this.router?.navigated) {
|
|
1549
|
-
const index = this.findShouldActiveTabIndex();
|
|
1550
|
-
if (index !== this.selectedIndex) {
|
|
1551
|
-
this.setSelectedIndex(index);
|
|
1552
|
-
}
|
|
1553
|
-
Promise.resolve().then(() => this.nzHideAll = index === -1);
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
findShouldActiveTabIndex() {
|
|
1557
|
-
const tabs = this.tabs.toArray();
|
|
1558
|
-
const isActive = this.isLinkActive(this.router);
|
|
1559
|
-
return tabs.findIndex((tab) => {
|
|
1560
|
-
const c = tab.linkDirective;
|
|
1561
|
-
return c ? isActive(c.routerLink) : false;
|
|
1562
|
-
});
|
|
1563
|
-
}
|
|
1564
|
-
isLinkActive(router) {
|
|
1565
|
-
return (link) => link ? !!router?.isActive(link.urlTree || "", {
|
|
1566
|
-
paths: this.nzLinkExact ? "exact" : "subset",
|
|
1567
|
-
queryParams: this.nzLinkExact ? "exact" : "subset",
|
|
1568
|
-
fragment: "ignored",
|
|
1569
|
-
matrixParams: "ignored"
|
|
1570
|
-
}) : false;
|
|
1571
|
-
}
|
|
1572
|
-
}, (() => {
|
|
1573
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
|
|
1574
|
-
_nzType_decorators = [WithConfig()];
|
|
1575
|
-
_nzSize_decorators = [WithConfig()];
|
|
1576
|
-
_nzAnimated_decorators = [WithConfig()];
|
|
1577
|
-
_nzTabBarGutter_decorators = [WithConfig()];
|
|
1578
|
-
__esDecorate(null, null, _nzType_decorators, { kind: "field", name: "nzType", static: false, private: false, access: { has: (obj) => "nzType" in obj, get: (obj) => obj.nzType, set: (obj, value) => {
|
|
1579
|
-
obj.nzType = value;
|
|
1580
|
-
} }, metadata: _metadata }, _nzType_initializers, _nzType_extraInitializers);
|
|
1581
|
-
__esDecorate(null, null, _nzSize_decorators, { kind: "field", name: "nzSize", static: false, private: false, access: { has: (obj) => "nzSize" in obj, get: (obj) => obj.nzSize, set: (obj, value) => {
|
|
1582
|
-
obj.nzSize = value;
|
|
1583
|
-
} }, metadata: _metadata }, _nzSize_initializers, _nzSize_extraInitializers);
|
|
1584
|
-
__esDecorate(null, null, _nzAnimated_decorators, { kind: "field", name: "nzAnimated", static: false, private: false, access: { has: (obj) => "nzAnimated" in obj, get: (obj) => obj.nzAnimated, set: (obj, value) => {
|
|
1585
|
-
obj.nzAnimated = value;
|
|
1586
|
-
} }, metadata: _metadata }, _nzAnimated_initializers, _nzAnimated_extraInitializers);
|
|
1587
|
-
__esDecorate(null, null, _nzTabBarGutter_decorators, { kind: "field", name: "nzTabBarGutter", static: false, private: false, access: { has: (obj) => "nzTabBarGutter" in obj, get: (obj) => obj.nzTabBarGutter, set: (obj, value) => {
|
|
1588
|
-
obj.nzTabBarGutter = value;
|
|
1589
|
-
} }, metadata: _metadata }, _nzTabBarGutter_initializers, _nzTabBarGutter_extraInitializers);
|
|
1590
|
-
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1591
|
-
})(), __publicField(_a, "\u0275fac", \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _a, deps: [], target: FactoryTarget.Component })), __publicField(_a, "\u0275cmp", \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _a, isStandalone: true, selector: "nz-tabs,nz-tabset", inputs: { nzSelectedIndex: "nzSelectedIndex", nzTabPosition: "nzTabPosition", nzTabBarExtraContent: "nzTabBarExtraContent", nzCanDeactivate: "nzCanDeactivate", nzAddIcon: "nzAddIcon", nzTabBarStyle: "nzTabBarStyle", nzType: "nzType", nzSize: "nzSize", nzAnimated: "nzAnimated", nzTabBarGutter: "nzTabBarGutter", nzHideAdd: ["nzHideAdd", "nzHideAdd", booleanAttribute], nzCentered: ["nzCentered", "nzCentered", booleanAttribute], nzHideAll: ["nzHideAll", "nzHideAll", booleanAttribute], nzLinkRouter: ["nzLinkRouter", "nzLinkRouter", booleanAttribute], nzLinkExact: ["nzLinkExact", "nzLinkExact", booleanAttribute], nzDestroyInactiveTabPane: ["nzDestroyInactiveTabPane", "nzDestroyInactiveTabPane", booleanAttribute] }, outputs: { nzSelectChange: "nzSelectChange", nzSelectedIndexChange: "nzSelectedIndexChange", nzTabListScroll: "nzTabListScroll", nzClose: "nzClose", nzAdd: "nzAdd" }, host: { properties: { "class.ant-tabs-card": "nzType === 'card' || nzType === 'editable-card'", "class.ant-tabs-editable": "nzType === 'editable-card'", "class.ant-tabs-editable-card": "nzType === 'editable-card'", "class.ant-tabs-centered": "nzCentered", "class.ant-tabs-rtl": "dir === 'rtl'", "class.ant-tabs-top": "nzTabPosition === 'top'", "class.ant-tabs-bottom": "nzTabPosition === 'bottom'", "class.ant-tabs-left": "nzTabPosition === 'left'", "class.ant-tabs-right": "nzTabPosition === 'right'", "class.ant-tabs-default": "nzSize === 'default'", "class.ant-tabs-small": "nzSize === 'small'", "class.ant-tabs-large": "nzSize === 'large'" }, classAttribute: "ant-tabs" }, providers: [
|
|
1592
|
-
{
|
|
1593
|
-
provide: NZ_TAB_SET,
|
|
1594
|
-
useExisting: forwardRef(() => _a)
|
|
1595
|
-
}
|
|
1596
|
-
], queries: [{ propertyName: "extraContents", predicate: NzTabBarExtraContentDirective, isSignal: true }, { propertyName: "allTabs", predicate: NzTabComponent, descendants: true }, { propertyName: "tabLinks", predicate: NzTabLinkDirective, descendants: true }], viewQueries: [{ propertyName: "tabNavBarRef", first: true, predicate: NzTabNavBarComponent, descendants: true }], exportAs: ["nzTabs"], ngImport: core_exports, template: `
|
|
1597
|
-
@if (tabs.length || addable) {
|
|
1598
|
-
<nz-tabs-nav
|
|
1599
|
-
[style]="nzTabBarStyle"
|
|
1600
|
-
[selectedIndex]="nzSelectedIndex || 0"
|
|
1601
|
-
[inkBarAnimated]="inkBarAnimated"
|
|
1602
|
-
[addable]="addable"
|
|
1603
|
-
[addIcon]="nzAddIcon"
|
|
1604
|
-
[hideBar]="nzHideAll"
|
|
1605
|
-
[position]="position"
|
|
1606
|
-
[extraTemplate]="nzTabBarExtraContent"
|
|
1607
|
-
[extraContents]="extraContents()"
|
|
1608
|
-
(tabScroll)="nzTabListScroll.emit($event)"
|
|
1609
|
-
(selectFocusedIndex)="setSelectedIndex($event)"
|
|
1610
|
-
(addClicked)="onAdd()"
|
|
1611
|
-
>
|
|
1612
|
-
@for (tab of tabs; track tab; let i = $index) {
|
|
1613
|
-
<div
|
|
1614
|
-
class="ant-tabs-tab"
|
|
1615
|
-
[style.margin-right.px]="position === 'horizontal' ? nzTabBarGutter : null"
|
|
1616
|
-
[style.margin-bottom.px]="position === 'vertical' ? nzTabBarGutter : null"
|
|
1617
|
-
[class.ant-tabs-tab-active]="nzSelectedIndex === i"
|
|
1618
|
-
[class.ant-tabs-tab-disabled]="tab.nzDisabled"
|
|
1619
|
-
(click)="clickNavItem(tab, i, $event)"
|
|
1620
|
-
(contextmenu)="contextmenuNavItem(tab, $event)"
|
|
1621
|
-
>
|
|
1622
|
-
<button
|
|
1623
|
-
type="button"
|
|
1624
|
-
role="tab"
|
|
1625
|
-
[id]="getTabContentId(i)"
|
|
1626
|
-
[attr.tabIndex]="getTabIndex(tab, i)"
|
|
1627
|
-
[attr.aria-disabled]="tab.nzDisabled"
|
|
1628
|
-
[attr.aria-selected]="nzSelectedIndex === i && !nzHideAll"
|
|
1629
|
-
[attr.aria-controls]="getTabContentId(i)"
|
|
1630
|
-
[disabled]="tab.nzDisabled"
|
|
1631
|
-
[tab]="tab"
|
|
1632
|
-
[active]="nzSelectedIndex === i"
|
|
1633
|
-
class="ant-tabs-tab-btn"
|
|
1634
|
-
nzTabNavItem
|
|
1635
|
-
cdkMonitorElementFocus
|
|
1636
|
-
>
|
|
1637
|
-
<ng-container *nzStringTemplateOutlet="tab.label; context: { visible: true }">
|
|
1638
|
-
{{ tab.label }}
|
|
1639
|
-
</ng-container>
|
|
1640
|
-
@if (tab.nzClosable && closable && !tab.nzDisabled) {
|
|
1641
|
-
<button
|
|
1642
|
-
type="button"
|
|
1643
|
-
nz-tab-close-button
|
|
1644
|
-
[closeIcon]="tab.nzCloseIcon"
|
|
1645
|
-
(click)="onClose(i, $event)"
|
|
1646
|
-
></button>
|
|
1647
|
-
}
|
|
1648
|
-
</button>
|
|
1649
|
-
</div>
|
|
1650
|
-
}
|
|
1651
|
-
</nz-tabs-nav>
|
|
1652
|
-
}
|
|
1653
|
-
<div class="ant-tabs-content-holder">
|
|
1654
|
-
<div
|
|
1655
|
-
class="ant-tabs-content"
|
|
1656
|
-
[class.ant-tabs-content-top]="nzTabPosition === 'top'"
|
|
1657
|
-
[class.ant-tabs-content-bottom]="nzTabPosition === 'bottom'"
|
|
1658
|
-
[class.ant-tabs-content-left]="nzTabPosition === 'left'"
|
|
1659
|
-
[class.ant-tabs-content-right]="nzTabPosition === 'right'"
|
|
1660
|
-
[class.ant-tabs-content-animated]="tabPaneAnimated"
|
|
1661
|
-
>
|
|
1662
|
-
@if (!nzHideAll) {
|
|
1663
|
-
@for (tab of tabs; track tab; let i = $index) {
|
|
1664
|
-
@if (tab.nzForceRender) {
|
|
1665
|
-
<ng-template [ngTemplateOutlet]="tabpaneTmpl"></ng-template>
|
|
1666
|
-
} @else if (nzDestroyInactiveTabPane) {
|
|
1667
|
-
@if (nzSelectedIndex === i) {
|
|
1668
|
-
<ng-template [ngTemplateOutlet]="tabpaneTmpl"></ng-template>
|
|
1669
|
-
}
|
|
1670
|
-
} @else {
|
|
1671
|
-
@if (nzSelectedIndex === i || tab.hasBeenActive) {
|
|
1672
|
-
<ng-template [ngTemplateOutlet]="tabpaneTmpl"></ng-template>
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
<ng-template #tabpaneTmpl>
|
|
1677
|
-
<div
|
|
1678
|
-
role="tabpanel"
|
|
1679
|
-
[id]="getTabContentId(i)"
|
|
1680
|
-
[attr.aria-labelledby]="getTabContentId(i)"
|
|
1681
|
-
nz-tab-body
|
|
1682
|
-
[active]="nzSelectedIndex === i"
|
|
1683
|
-
[content]="tab.content"
|
|
1684
|
-
[animated]="tabPaneAnimated"
|
|
1685
|
-
></div>
|
|
1686
|
-
</ng-template>
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
</div>
|
|
1690
|
-
</div>
|
|
1691
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NzTabNavBarComponent, selector: "nz-tabs-nav", inputs: ["position", "addable", "hideBar", "addIcon", "inkBarAnimated", "extraTemplate", "extraContents", "selectedIndex"], outputs: ["indexFocused", "selectFocusedIndex", "addClicked", "tabScroll"], exportAs: ["nzTabsNav"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NzTabNavItemDirective, selector: "[nzTabNavItem]", inputs: ["disabled", "tab", "active"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzTabCloseButtonComponent, selector: "nz-tab-close-button, button[nz-tab-close-button]", inputs: ["closeIcon"] }, { kind: "component", type: NzTabBodyComponent, selector: "[nz-tab-body]", inputs: ["content", "active", "animated"], exportAs: ["nzTabBody"] }], changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None })), _a;
|
|
1692
|
-
})();
|
|
1693
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabsComponent, decorators: [{
|
|
1694
|
-
type: Component,
|
|
1695
|
-
args: [{
|
|
1696
|
-
selector: "nz-tabs,nz-tabset",
|
|
1697
|
-
exportAs: "nzTabs",
|
|
1698
|
-
encapsulation: ViewEncapsulation.None,
|
|
1699
|
-
changeDetection: ChangeDetectionStrategy.Default,
|
|
1700
|
-
providers: [
|
|
1701
|
-
{
|
|
1702
|
-
provide: NZ_TAB_SET,
|
|
1703
|
-
useExisting: forwardRef(() => NzTabsComponent)
|
|
1704
|
-
}
|
|
1705
|
-
],
|
|
1706
|
-
template: `
|
|
1707
|
-
@if (tabs.length || addable) {
|
|
1708
|
-
<nz-tabs-nav
|
|
1709
|
-
[style]="nzTabBarStyle"
|
|
1710
|
-
[selectedIndex]="nzSelectedIndex || 0"
|
|
1711
|
-
[inkBarAnimated]="inkBarAnimated"
|
|
1712
|
-
[addable]="addable"
|
|
1713
|
-
[addIcon]="nzAddIcon"
|
|
1714
|
-
[hideBar]="nzHideAll"
|
|
1715
|
-
[position]="position"
|
|
1716
|
-
[extraTemplate]="nzTabBarExtraContent"
|
|
1717
|
-
[extraContents]="extraContents()"
|
|
1718
|
-
(tabScroll)="nzTabListScroll.emit($event)"
|
|
1719
|
-
(selectFocusedIndex)="setSelectedIndex($event)"
|
|
1720
|
-
(addClicked)="onAdd()"
|
|
1721
|
-
>
|
|
1722
|
-
@for (tab of tabs; track tab; let i = $index) {
|
|
1723
|
-
<div
|
|
1724
|
-
class="ant-tabs-tab"
|
|
1725
|
-
[style.margin-right.px]="position === 'horizontal' ? nzTabBarGutter : null"
|
|
1726
|
-
[style.margin-bottom.px]="position === 'vertical' ? nzTabBarGutter : null"
|
|
1727
|
-
[class.ant-tabs-tab-active]="nzSelectedIndex === i"
|
|
1728
|
-
[class.ant-tabs-tab-disabled]="tab.nzDisabled"
|
|
1729
|
-
(click)="clickNavItem(tab, i, $event)"
|
|
1730
|
-
(contextmenu)="contextmenuNavItem(tab, $event)"
|
|
1731
|
-
>
|
|
1732
|
-
<button
|
|
1733
|
-
type="button"
|
|
1734
|
-
role="tab"
|
|
1735
|
-
[id]="getTabContentId(i)"
|
|
1736
|
-
[attr.tabIndex]="getTabIndex(tab, i)"
|
|
1737
|
-
[attr.aria-disabled]="tab.nzDisabled"
|
|
1738
|
-
[attr.aria-selected]="nzSelectedIndex === i && !nzHideAll"
|
|
1739
|
-
[attr.aria-controls]="getTabContentId(i)"
|
|
1740
|
-
[disabled]="tab.nzDisabled"
|
|
1741
|
-
[tab]="tab"
|
|
1742
|
-
[active]="nzSelectedIndex === i"
|
|
1743
|
-
class="ant-tabs-tab-btn"
|
|
1744
|
-
nzTabNavItem
|
|
1745
|
-
cdkMonitorElementFocus
|
|
1746
|
-
>
|
|
1747
|
-
<ng-container *nzStringTemplateOutlet="tab.label; context: { visible: true }">
|
|
1748
|
-
{{ tab.label }}
|
|
1749
|
-
</ng-container>
|
|
1750
|
-
@if (tab.nzClosable && closable && !tab.nzDisabled) {
|
|
1751
|
-
<button
|
|
1752
|
-
type="button"
|
|
1753
|
-
nz-tab-close-button
|
|
1754
|
-
[closeIcon]="tab.nzCloseIcon"
|
|
1755
|
-
(click)="onClose(i, $event)"
|
|
1756
|
-
></button>
|
|
1757
|
-
}
|
|
1758
|
-
</button>
|
|
1759
|
-
</div>
|
|
1760
|
-
}
|
|
1761
|
-
</nz-tabs-nav>
|
|
1762
|
-
}
|
|
1763
|
-
<div class="ant-tabs-content-holder">
|
|
1764
|
-
<div
|
|
1765
|
-
class="ant-tabs-content"
|
|
1766
|
-
[class.ant-tabs-content-top]="nzTabPosition === 'top'"
|
|
1767
|
-
[class.ant-tabs-content-bottom]="nzTabPosition === 'bottom'"
|
|
1768
|
-
[class.ant-tabs-content-left]="nzTabPosition === 'left'"
|
|
1769
|
-
[class.ant-tabs-content-right]="nzTabPosition === 'right'"
|
|
1770
|
-
[class.ant-tabs-content-animated]="tabPaneAnimated"
|
|
1771
|
-
>
|
|
1772
|
-
@if (!nzHideAll) {
|
|
1773
|
-
@for (tab of tabs; track tab; let i = $index) {
|
|
1774
|
-
@if (tab.nzForceRender) {
|
|
1775
|
-
<ng-template [ngTemplateOutlet]="tabpaneTmpl"></ng-template>
|
|
1776
|
-
} @else if (nzDestroyInactiveTabPane) {
|
|
1777
|
-
@if (nzSelectedIndex === i) {
|
|
1778
|
-
<ng-template [ngTemplateOutlet]="tabpaneTmpl"></ng-template>
|
|
1779
|
-
}
|
|
1780
|
-
} @else {
|
|
1781
|
-
@if (nzSelectedIndex === i || tab.hasBeenActive) {
|
|
1782
|
-
<ng-template [ngTemplateOutlet]="tabpaneTmpl"></ng-template>
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
<ng-template #tabpaneTmpl>
|
|
1787
|
-
<div
|
|
1788
|
-
role="tabpanel"
|
|
1789
|
-
[id]="getTabContentId(i)"
|
|
1790
|
-
[attr.aria-labelledby]="getTabContentId(i)"
|
|
1791
|
-
nz-tab-body
|
|
1792
|
-
[active]="nzSelectedIndex === i"
|
|
1793
|
-
[content]="tab.content"
|
|
1794
|
-
[animated]="tabPaneAnimated"
|
|
1795
|
-
></div>
|
|
1796
|
-
</ng-template>
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
</div>
|
|
1800
|
-
</div>
|
|
1801
|
-
`,
|
|
1802
|
-
host: {
|
|
1803
|
-
class: "ant-tabs",
|
|
1804
|
-
"[class.ant-tabs-card]": `nzType === 'card' || nzType === 'editable-card'`,
|
|
1805
|
-
"[class.ant-tabs-editable]": `nzType === 'editable-card'`,
|
|
1806
|
-
"[class.ant-tabs-editable-card]": `nzType === 'editable-card'`,
|
|
1807
|
-
"[class.ant-tabs-centered]": `nzCentered`,
|
|
1808
|
-
"[class.ant-tabs-rtl]": `dir === 'rtl'`,
|
|
1809
|
-
"[class.ant-tabs-top]": `nzTabPosition === 'top'`,
|
|
1810
|
-
"[class.ant-tabs-bottom]": `nzTabPosition === 'bottom'`,
|
|
1811
|
-
"[class.ant-tabs-left]": `nzTabPosition === 'left'`,
|
|
1812
|
-
"[class.ant-tabs-right]": `nzTabPosition === 'right'`,
|
|
1813
|
-
"[class.ant-tabs-default]": `nzSize === 'default'`,
|
|
1814
|
-
"[class.ant-tabs-small]": `nzSize === 'small'`,
|
|
1815
|
-
"[class.ant-tabs-large]": `nzSize === 'large'`
|
|
1816
|
-
},
|
|
1817
|
-
imports: [
|
|
1818
|
-
NzTabNavBarComponent,
|
|
1819
|
-
NgTemplateOutlet,
|
|
1820
|
-
NzTabNavItemDirective,
|
|
1821
|
-
A11yModule,
|
|
1822
|
-
NzOutletModule,
|
|
1823
|
-
NzTabCloseButtonComponent,
|
|
1824
|
-
NzTabBodyComponent
|
|
1825
|
-
]
|
|
1826
|
-
}]
|
|
1827
|
-
}], ctorParameters: () => [], propDecorators: { nzSelectedIndex: [{
|
|
1828
|
-
type: Input
|
|
1829
|
-
}], nzTabPosition: [{
|
|
1830
|
-
type: Input
|
|
1831
|
-
}], nzTabBarExtraContent: [{
|
|
1832
|
-
type: Input
|
|
1833
|
-
}], nzCanDeactivate: [{
|
|
1834
|
-
type: Input
|
|
1835
|
-
}], nzAddIcon: [{
|
|
1836
|
-
type: Input
|
|
1837
|
-
}], nzTabBarStyle: [{
|
|
1838
|
-
type: Input
|
|
1839
|
-
}], nzType: [{
|
|
1840
|
-
type: Input
|
|
1841
|
-
}], nzSize: [{
|
|
1842
|
-
type: Input
|
|
1843
|
-
}], nzAnimated: [{
|
|
1844
|
-
type: Input
|
|
1845
|
-
}], nzTabBarGutter: [{
|
|
1846
|
-
type: Input
|
|
1847
|
-
}], nzHideAdd: [{
|
|
1848
|
-
type: Input,
|
|
1849
|
-
args: [{ transform: booleanAttribute }]
|
|
1850
|
-
}], nzCentered: [{
|
|
1851
|
-
type: Input,
|
|
1852
|
-
args: [{ transform: booleanAttribute }]
|
|
1853
|
-
}], nzHideAll: [{
|
|
1854
|
-
type: Input,
|
|
1855
|
-
args: [{ transform: booleanAttribute }]
|
|
1856
|
-
}], nzLinkRouter: [{
|
|
1857
|
-
type: Input,
|
|
1858
|
-
args: [{ transform: booleanAttribute }]
|
|
1859
|
-
}], nzLinkExact: [{
|
|
1860
|
-
type: Input,
|
|
1861
|
-
args: [{ transform: booleanAttribute }]
|
|
1862
|
-
}], nzDestroyInactiveTabPane: [{
|
|
1863
|
-
type: Input,
|
|
1864
|
-
args: [{ transform: booleanAttribute }]
|
|
1865
|
-
}], nzSelectChange: [{
|
|
1866
|
-
type: Output
|
|
1867
|
-
}], nzSelectedIndexChange: [{
|
|
1868
|
-
type: Output
|
|
1869
|
-
}], nzTabListScroll: [{
|
|
1870
|
-
type: Output
|
|
1871
|
-
}], nzClose: [{
|
|
1872
|
-
type: Output
|
|
1873
|
-
}], nzAdd: [{
|
|
1874
|
-
type: Output
|
|
1875
|
-
}], allTabs: [{
|
|
1876
|
-
type: ContentChildren,
|
|
1877
|
-
args: [NzTabComponent, { descendants: true }]
|
|
1878
|
-
}], tabLinks: [{
|
|
1879
|
-
type: ContentChildren,
|
|
1880
|
-
args: [NzTabLinkDirective, { descendants: true }]
|
|
1881
|
-
}], tabNavBarRef: [{
|
|
1882
|
-
type: ViewChild,
|
|
1883
|
-
args: [NzTabNavBarComponent, { static: false }]
|
|
1884
|
-
}] } });
|
|
1885
|
-
var DIRECTIVES = [
|
|
1886
|
-
NzTabsComponent,
|
|
1887
|
-
NzTabComponent,
|
|
1888
|
-
NzTabNavBarComponent,
|
|
1889
|
-
NzTabNavItemDirective,
|
|
1890
|
-
NzTabsInkBarDirective,
|
|
1891
|
-
NzTabScrollListDirective,
|
|
1892
|
-
NzTabNavOperationComponent,
|
|
1893
|
-
NzTabAddButtonComponent,
|
|
1894
|
-
NzTabCloseButtonComponent,
|
|
1895
|
-
NzTabDirective,
|
|
1896
|
-
NzTabBodyComponent,
|
|
1897
|
-
NzTabLinkDirective,
|
|
1898
|
-
NzTabLinkTemplateDirective,
|
|
1899
|
-
NzTabBarExtraContentDirective
|
|
1900
|
-
];
|
|
1901
|
-
var NzTabsModule = class _NzTabsModule {
|
|
1902
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabsModule, deps: [], target: FactoryTarget.NgModule });
|
|
1903
|
-
static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabsModule, imports: [
|
|
1904
|
-
NzTabsComponent,
|
|
1905
|
-
NzTabComponent,
|
|
1906
|
-
NzTabNavBarComponent,
|
|
1907
|
-
NzTabNavItemDirective,
|
|
1908
|
-
NzTabsInkBarDirective,
|
|
1909
|
-
NzTabScrollListDirective,
|
|
1910
|
-
NzTabNavOperationComponent,
|
|
1911
|
-
NzTabAddButtonComponent,
|
|
1912
|
-
NzTabCloseButtonComponent,
|
|
1913
|
-
NzTabDirective,
|
|
1914
|
-
NzTabBodyComponent,
|
|
1915
|
-
NzTabLinkDirective,
|
|
1916
|
-
NzTabLinkTemplateDirective,
|
|
1917
|
-
NzTabBarExtraContentDirective
|
|
1918
|
-
], exports: [
|
|
1919
|
-
NzTabsComponent,
|
|
1920
|
-
NzTabComponent,
|
|
1921
|
-
NzTabNavBarComponent,
|
|
1922
|
-
NzTabNavItemDirective,
|
|
1923
|
-
NzTabsInkBarDirective,
|
|
1924
|
-
NzTabScrollListDirective,
|
|
1925
|
-
NzTabNavOperationComponent,
|
|
1926
|
-
NzTabAddButtonComponent,
|
|
1927
|
-
NzTabCloseButtonComponent,
|
|
1928
|
-
NzTabDirective,
|
|
1929
|
-
NzTabBodyComponent,
|
|
1930
|
-
NzTabLinkDirective,
|
|
1931
|
-
NzTabLinkTemplateDirective,
|
|
1932
|
-
NzTabBarExtraContentDirective
|
|
1933
|
-
] });
|
|
1934
|
-
static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTabsModule, imports: [
|
|
1935
|
-
NzTabsComponent,
|
|
1936
|
-
NzTabNavBarComponent,
|
|
1937
|
-
NzTabNavOperationComponent,
|
|
1938
|
-
NzTabAddButtonComponent,
|
|
1939
|
-
NzTabCloseButtonComponent
|
|
1940
|
-
] });
|
|
1941
|
-
};
|
|
1942
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTabsModule, decorators: [{
|
|
1943
|
-
type: NgModule,
|
|
1944
|
-
args: [{
|
|
1945
|
-
imports: [DIRECTIVES],
|
|
1946
|
-
exports: [DIRECTIVES]
|
|
1947
|
-
}]
|
|
1948
|
-
}] });
|
|
1949
|
-
|
|
1950
|
-
export {
|
|
1951
|
-
NzTabsModule
|
|
1952
|
-
};
|
|
1953
|
-
//# sourceMappingURL=chunk-O7LB6VFM.js.map
|