@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,2643 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BACKSPACE,
|
|
3
|
-
COMPOSITION_BUFFER_MODE,
|
|
4
|
-
CdkConnectedOverlay,
|
|
5
|
-
CdkFixedSizeVirtualScroll,
|
|
6
|
-
CdkOverlayOrigin,
|
|
7
|
-
CdkPortalOutlet,
|
|
8
|
-
CdkVirtualForOf,
|
|
9
|
-
CdkVirtualScrollViewport,
|
|
10
|
-
ComponentPortal,
|
|
11
|
-
DOWN_ARROW,
|
|
12
|
-
DefaultValueAccessor,
|
|
13
|
-
Directionality,
|
|
14
|
-
ENTER,
|
|
15
|
-
ESCAPE,
|
|
16
|
-
FocusMonitor,
|
|
17
|
-
FormsModule,
|
|
18
|
-
NG_VALUE_ACCESSOR,
|
|
19
|
-
NZ_SPACE_COMPACT_ITEM_TYPE,
|
|
20
|
-
NZ_SPACE_COMPACT_SIZE,
|
|
21
|
-
NgControlStatus,
|
|
22
|
-
NgModel,
|
|
23
|
-
NzConfigService,
|
|
24
|
-
NzConnectedOverlayDirective,
|
|
25
|
-
NzFormItemFeedbackIconComponent,
|
|
26
|
-
NzFormNoStatusService,
|
|
27
|
-
NzFormStatusService,
|
|
28
|
-
NzI18nService,
|
|
29
|
-
NzIconDirective,
|
|
30
|
-
NzIconModule,
|
|
31
|
-
NzNoAnimationDirective,
|
|
32
|
-
NzOutletModule,
|
|
33
|
-
NzOverlayModule,
|
|
34
|
-
NzSpaceCompactItemDirective,
|
|
35
|
-
NzStringTemplateOutletDirective,
|
|
36
|
-
OverlayModule,
|
|
37
|
-
POSITION_MAP,
|
|
38
|
-
Platform,
|
|
39
|
-
PortalModule,
|
|
40
|
-
SPACE,
|
|
41
|
-
TAB,
|
|
42
|
-
UP_ARROW,
|
|
43
|
-
WithConfig,
|
|
44
|
-
_getEventTarget,
|
|
45
|
-
cancelAnimationFrame,
|
|
46
|
-
fromEventOutsideAngular,
|
|
47
|
-
getPlacementName,
|
|
48
|
-
getStatusClassNames,
|
|
49
|
-
isNotNil,
|
|
50
|
-
numberAttributeWithInfinityFallback,
|
|
51
|
-
onConfigChangeEventForComponent,
|
|
52
|
-
requestAnimationFrame,
|
|
53
|
-
slideMotion,
|
|
54
|
-
takeUntilDestroyed
|
|
55
|
-
} from "./chunk-RUXJCM3V.js";
|
|
56
|
-
import {
|
|
57
|
-
NgTemplateOutlet,
|
|
58
|
-
isPlatformBrowser
|
|
59
|
-
} from "./chunk-3MCIETCQ.js";
|
|
60
|
-
import {
|
|
61
|
-
BehaviorSubject,
|
|
62
|
-
ChangeDetectionStrategy,
|
|
63
|
-
ChangeDetectorRef,
|
|
64
|
-
Component,
|
|
65
|
-
ContentChildren,
|
|
66
|
-
DestroyRef,
|
|
67
|
-
ElementRef,
|
|
68
|
-
EventEmitter,
|
|
69
|
-
FactoryTarget,
|
|
70
|
-
InjectionToken,
|
|
71
|
-
Injector,
|
|
72
|
-
Input,
|
|
73
|
-
NgModule,
|
|
74
|
-
NgZone,
|
|
75
|
-
Output,
|
|
76
|
-
PLATFORM_ID,
|
|
77
|
-
Renderer2,
|
|
78
|
-
Subject,
|
|
79
|
-
TemplateRef,
|
|
80
|
-
Type,
|
|
81
|
-
ViewChild,
|
|
82
|
-
ViewContainerRef,
|
|
83
|
-
ViewEncapsulation,
|
|
84
|
-
__esDecorate,
|
|
85
|
-
__publicField,
|
|
86
|
-
__runInitializers,
|
|
87
|
-
__spreadValues,
|
|
88
|
-
afterNextRender,
|
|
89
|
-
booleanAttribute,
|
|
90
|
-
combineLatest,
|
|
91
|
-
computed,
|
|
92
|
-
core_exports,
|
|
93
|
-
distinctUntilChanged,
|
|
94
|
-
forwardRef,
|
|
95
|
-
inject,
|
|
96
|
-
map,
|
|
97
|
-
merge,
|
|
98
|
-
numberAttribute,
|
|
99
|
-
of,
|
|
100
|
-
output,
|
|
101
|
-
signal,
|
|
102
|
-
startWith,
|
|
103
|
-
switchMap,
|
|
104
|
-
withLatestFrom,
|
|
105
|
-
ɵɵngDeclareClassMetadata,
|
|
106
|
-
ɵɵngDeclareComponent,
|
|
107
|
-
ɵɵngDeclareFactory,
|
|
108
|
-
ɵɵngDeclareInjector,
|
|
109
|
-
ɵɵngDeclareNgModule
|
|
110
|
-
} from "./chunk-XQY5SPGI.js";
|
|
111
|
-
|
|
112
|
-
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-empty.mjs
|
|
113
|
-
var NZ_EMPTY_COMPONENT_NAME = new InjectionToken(typeof ngDevMode !== "undefined" && ngDevMode ? "nz-empty-component-name" : "");
|
|
114
|
-
var NzEmptyDefaultComponent = class _NzEmptyDefaultComponent {
|
|
115
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzEmptyDefaultComponent, deps: [], target: FactoryTarget.Component });
|
|
116
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzEmptyDefaultComponent, isStandalone: true, selector: "nz-empty-default", exportAs: ["nzEmptyDefault"], ngImport: core_exports, template: `
|
|
117
|
-
<svg
|
|
118
|
-
class="ant-empty-img-default"
|
|
119
|
-
width="184"
|
|
120
|
-
height="152"
|
|
121
|
-
viewBox="0 0 184 152"
|
|
122
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
123
|
-
>
|
|
124
|
-
<g fill="none" fill-rule="evenodd">
|
|
125
|
-
<g transform="translate(24 31.67)">
|
|
126
|
-
<ellipse class="ant-empty-img-default-ellipse" cx="67.797" cy="106.89" rx="67.797" ry="12.668" />
|
|
127
|
-
<path
|
|
128
|
-
class="ant-empty-img-default-path-1"
|
|
129
|
-
d="M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"
|
|
130
|
-
/>
|
|
131
|
-
<path
|
|
132
|
-
class="ant-empty-img-default-path-2"
|
|
133
|
-
d="M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z"
|
|
134
|
-
transform="translate(13.56)"
|
|
135
|
-
/>
|
|
136
|
-
<path
|
|
137
|
-
class="ant-empty-img-default-path-3"
|
|
138
|
-
d="M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"
|
|
139
|
-
/>
|
|
140
|
-
<path
|
|
141
|
-
class="ant-empty-img-default-path-4"
|
|
142
|
-
d="M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"
|
|
143
|
-
/>
|
|
144
|
-
</g>
|
|
145
|
-
<path
|
|
146
|
-
class="ant-empty-img-default-path-5"
|
|
147
|
-
d="M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"
|
|
148
|
-
/>
|
|
149
|
-
<g class="ant-empty-img-default-g" transform="translate(149.65 15.383)">
|
|
150
|
-
<ellipse cx="20.654" cy="3.167" rx="2.849" ry="2.815" />
|
|
151
|
-
<path d="M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z" />
|
|
152
|
-
</g>
|
|
153
|
-
</g>
|
|
154
|
-
</svg>
|
|
155
|
-
`, isInline: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
156
|
-
};
|
|
157
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzEmptyDefaultComponent, decorators: [{
|
|
158
|
-
type: Component,
|
|
159
|
-
args: [{
|
|
160
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
161
|
-
encapsulation: ViewEncapsulation.None,
|
|
162
|
-
selector: "nz-empty-default",
|
|
163
|
-
exportAs: "nzEmptyDefault",
|
|
164
|
-
template: `
|
|
165
|
-
<svg
|
|
166
|
-
class="ant-empty-img-default"
|
|
167
|
-
width="184"
|
|
168
|
-
height="152"
|
|
169
|
-
viewBox="0 0 184 152"
|
|
170
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
171
|
-
>
|
|
172
|
-
<g fill="none" fill-rule="evenodd">
|
|
173
|
-
<g transform="translate(24 31.67)">
|
|
174
|
-
<ellipse class="ant-empty-img-default-ellipse" cx="67.797" cy="106.89" rx="67.797" ry="12.668" />
|
|
175
|
-
<path
|
|
176
|
-
class="ant-empty-img-default-path-1"
|
|
177
|
-
d="M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"
|
|
178
|
-
/>
|
|
179
|
-
<path
|
|
180
|
-
class="ant-empty-img-default-path-2"
|
|
181
|
-
d="M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z"
|
|
182
|
-
transform="translate(13.56)"
|
|
183
|
-
/>
|
|
184
|
-
<path
|
|
185
|
-
class="ant-empty-img-default-path-3"
|
|
186
|
-
d="M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"
|
|
187
|
-
/>
|
|
188
|
-
<path
|
|
189
|
-
class="ant-empty-img-default-path-4"
|
|
190
|
-
d="M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"
|
|
191
|
-
/>
|
|
192
|
-
</g>
|
|
193
|
-
<path
|
|
194
|
-
class="ant-empty-img-default-path-5"
|
|
195
|
-
d="M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"
|
|
196
|
-
/>
|
|
197
|
-
<g class="ant-empty-img-default-g" transform="translate(149.65 15.383)">
|
|
198
|
-
<ellipse cx="20.654" cy="3.167" rx="2.849" ry="2.815" />
|
|
199
|
-
<path d="M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z" />
|
|
200
|
-
</g>
|
|
201
|
-
</g>
|
|
202
|
-
</svg>
|
|
203
|
-
`
|
|
204
|
-
}]
|
|
205
|
-
}] });
|
|
206
|
-
var NzEmptySimpleComponent = class _NzEmptySimpleComponent {
|
|
207
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzEmptySimpleComponent, deps: [], target: FactoryTarget.Component });
|
|
208
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzEmptySimpleComponent, isStandalone: true, selector: "nz-empty-simple", exportAs: ["nzEmptySimple"], ngImport: core_exports, template: `
|
|
209
|
-
<svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
|
|
210
|
-
<g transform="translate(0 1)" fill="none" fill-rule="evenodd">
|
|
211
|
-
<ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7" />
|
|
212
|
-
<g class="ant-empty-img-simple-g" fill-rule="nonzero">
|
|
213
|
-
<path
|
|
214
|
-
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
|
215
|
-
/>
|
|
216
|
-
<path
|
|
217
|
-
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
|
218
|
-
class="ant-empty-img-simple-path"
|
|
219
|
-
/>
|
|
220
|
-
</g>
|
|
221
|
-
</g>
|
|
222
|
-
</svg>
|
|
223
|
-
`, isInline: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
224
|
-
};
|
|
225
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzEmptySimpleComponent, decorators: [{
|
|
226
|
-
type: Component,
|
|
227
|
-
args: [{
|
|
228
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
229
|
-
encapsulation: ViewEncapsulation.None,
|
|
230
|
-
selector: "nz-empty-simple",
|
|
231
|
-
exportAs: "nzEmptySimple",
|
|
232
|
-
template: `
|
|
233
|
-
<svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
|
|
234
|
-
<g transform="translate(0 1)" fill="none" fill-rule="evenodd">
|
|
235
|
-
<ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7" />
|
|
236
|
-
<g class="ant-empty-img-simple-g" fill-rule="nonzero">
|
|
237
|
-
<path
|
|
238
|
-
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
|
239
|
-
/>
|
|
240
|
-
<path
|
|
241
|
-
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
|
|
242
|
-
class="ant-empty-img-simple-path"
|
|
243
|
-
/>
|
|
244
|
-
</g>
|
|
245
|
-
</g>
|
|
246
|
-
</svg>
|
|
247
|
-
`
|
|
248
|
-
}]
|
|
249
|
-
}] });
|
|
250
|
-
var NzEmptyDefaultImages = ["default", "simple"];
|
|
251
|
-
var NzEmptyComponent = class _NzEmptyComponent {
|
|
252
|
-
i18n = inject(NzI18nService);
|
|
253
|
-
cdr = inject(ChangeDetectorRef);
|
|
254
|
-
destroyRef = inject(DestroyRef);
|
|
255
|
-
nzNotFoundImage = "default";
|
|
256
|
-
nzNotFoundContent;
|
|
257
|
-
nzNotFoundFooter;
|
|
258
|
-
isContentString = false;
|
|
259
|
-
isImageBuildIn = true;
|
|
260
|
-
locale;
|
|
261
|
-
ngOnChanges(changes) {
|
|
262
|
-
const { nzNotFoundContent, nzNotFoundImage } = changes;
|
|
263
|
-
if (nzNotFoundContent) {
|
|
264
|
-
const content = nzNotFoundContent.currentValue;
|
|
265
|
-
this.isContentString = typeof content === "string";
|
|
266
|
-
}
|
|
267
|
-
if (nzNotFoundImage) {
|
|
268
|
-
const image = nzNotFoundImage.currentValue || "default";
|
|
269
|
-
this.isImageBuildIn = NzEmptyDefaultImages.findIndex((i) => i === image) > -1;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
ngOnInit() {
|
|
273
|
-
this.i18n.localeChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
274
|
-
this.locale = this.i18n.getLocaleData("Empty");
|
|
275
|
-
this.cdr.markForCheck();
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzEmptyComponent, deps: [], target: FactoryTarget.Component });
|
|
279
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzEmptyComponent, isStandalone: true, selector: "nz-empty", inputs: { nzNotFoundImage: "nzNotFoundImage", nzNotFoundContent: "nzNotFoundContent", nzNotFoundFooter: "nzNotFoundFooter" }, host: { classAttribute: "ant-empty" }, exportAs: ["nzEmpty"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
280
|
-
<div class="ant-empty-image">
|
|
281
|
-
@if (!isImageBuildIn) {
|
|
282
|
-
<ng-container *nzStringTemplateOutlet="nzNotFoundImage">
|
|
283
|
-
<img [src]="nzNotFoundImage" [alt]="isContentString ? nzNotFoundContent : 'empty'" />
|
|
284
|
-
</ng-container>
|
|
285
|
-
} @else {
|
|
286
|
-
@if (nzNotFoundImage === 'simple') {
|
|
287
|
-
<nz-empty-simple />
|
|
288
|
-
} @else {
|
|
289
|
-
<nz-empty-default />
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
</div>
|
|
293
|
-
@if (nzNotFoundContent !== null) {
|
|
294
|
-
<p class="ant-empty-description">
|
|
295
|
-
<ng-container *nzStringTemplateOutlet="nzNotFoundContent">
|
|
296
|
-
{{ isContentString ? nzNotFoundContent : locale['description'] }}
|
|
297
|
-
</ng-container>
|
|
298
|
-
</p>
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
@if (nzNotFoundFooter) {
|
|
302
|
-
<div class="ant-empty-footer">
|
|
303
|
-
<ng-container *nzStringTemplateOutlet="nzNotFoundFooter">
|
|
304
|
-
{{ nzNotFoundFooter }}
|
|
305
|
-
</ng-container>
|
|
306
|
-
</div>
|
|
307
|
-
}
|
|
308
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzEmptyDefaultComponent, selector: "nz-empty-default", exportAs: ["nzEmptyDefault"] }, { kind: "component", type: NzEmptySimpleComponent, selector: "nz-empty-simple", exportAs: ["nzEmptySimple"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
309
|
-
};
|
|
310
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzEmptyComponent, decorators: [{
|
|
311
|
-
type: Component,
|
|
312
|
-
args: [{
|
|
313
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
314
|
-
encapsulation: ViewEncapsulation.None,
|
|
315
|
-
selector: "nz-empty",
|
|
316
|
-
exportAs: "nzEmpty",
|
|
317
|
-
template: `
|
|
318
|
-
<div class="ant-empty-image">
|
|
319
|
-
@if (!isImageBuildIn) {
|
|
320
|
-
<ng-container *nzStringTemplateOutlet="nzNotFoundImage">
|
|
321
|
-
<img [src]="nzNotFoundImage" [alt]="isContentString ? nzNotFoundContent : 'empty'" />
|
|
322
|
-
</ng-container>
|
|
323
|
-
} @else {
|
|
324
|
-
@if (nzNotFoundImage === 'simple') {
|
|
325
|
-
<nz-empty-simple />
|
|
326
|
-
} @else {
|
|
327
|
-
<nz-empty-default />
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
</div>
|
|
331
|
-
@if (nzNotFoundContent !== null) {
|
|
332
|
-
<p class="ant-empty-description">
|
|
333
|
-
<ng-container *nzStringTemplateOutlet="nzNotFoundContent">
|
|
334
|
-
{{ isContentString ? nzNotFoundContent : locale['description'] }}
|
|
335
|
-
</ng-container>
|
|
336
|
-
</p>
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
@if (nzNotFoundFooter) {
|
|
340
|
-
<div class="ant-empty-footer">
|
|
341
|
-
<ng-container *nzStringTemplateOutlet="nzNotFoundFooter">
|
|
342
|
-
{{ nzNotFoundFooter }}
|
|
343
|
-
</ng-container>
|
|
344
|
-
</div>
|
|
345
|
-
}
|
|
346
|
-
`,
|
|
347
|
-
host: {
|
|
348
|
-
class: "ant-empty"
|
|
349
|
-
},
|
|
350
|
-
imports: [NzOutletModule, NzEmptyDefaultComponent, NzEmptySimpleComponent]
|
|
351
|
-
}]
|
|
352
|
-
}], propDecorators: { nzNotFoundImage: [{
|
|
353
|
-
type: Input
|
|
354
|
-
}], nzNotFoundContent: [{
|
|
355
|
-
type: Input
|
|
356
|
-
}], nzNotFoundFooter: [{
|
|
357
|
-
type: Input
|
|
358
|
-
}] } });
|
|
359
|
-
function getEmptySize(componentName) {
|
|
360
|
-
switch (componentName) {
|
|
361
|
-
case "table":
|
|
362
|
-
case "list":
|
|
363
|
-
return "normal";
|
|
364
|
-
case "select":
|
|
365
|
-
case "tree-select":
|
|
366
|
-
case "cascader":
|
|
367
|
-
case "transfer":
|
|
368
|
-
return "small";
|
|
369
|
-
default:
|
|
370
|
-
return "";
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
var NzEmbedEmptyComponent = class _NzEmbedEmptyComponent {
|
|
374
|
-
configService = inject(NzConfigService);
|
|
375
|
-
viewContainerRef = inject(ViewContainerRef);
|
|
376
|
-
cdr = inject(ChangeDetectorRef);
|
|
377
|
-
injector = inject(Injector);
|
|
378
|
-
nzComponentName;
|
|
379
|
-
specificContent;
|
|
380
|
-
content;
|
|
381
|
-
contentType = "string";
|
|
382
|
-
contentPortal;
|
|
383
|
-
size = "";
|
|
384
|
-
constructor() {
|
|
385
|
-
onConfigChangeEventForComponent("empty", () => {
|
|
386
|
-
this.content = this.specificContent || this.getUserDefaultEmptyContent();
|
|
387
|
-
this.renderEmpty();
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
ngOnChanges(changes) {
|
|
391
|
-
if (changes.nzComponentName) {
|
|
392
|
-
this.size = getEmptySize(changes.nzComponentName.currentValue);
|
|
393
|
-
}
|
|
394
|
-
if (changes.specificContent && !changes.specificContent.isFirstChange()) {
|
|
395
|
-
this.content = changes.specificContent.currentValue;
|
|
396
|
-
this.renderEmpty();
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
ngOnInit() {
|
|
400
|
-
this.content = this.specificContent || this.getUserDefaultEmptyContent();
|
|
401
|
-
this.renderEmpty();
|
|
402
|
-
}
|
|
403
|
-
renderEmpty() {
|
|
404
|
-
const content = this.content;
|
|
405
|
-
if (typeof content === "string") {
|
|
406
|
-
this.contentType = "string";
|
|
407
|
-
} else if (content instanceof TemplateRef) {
|
|
408
|
-
this.contentType = "template";
|
|
409
|
-
this.contentPortal = void 0;
|
|
410
|
-
} else if (content instanceof Type) {
|
|
411
|
-
const injector = Injector.create({
|
|
412
|
-
parent: this.injector,
|
|
413
|
-
providers: [{ provide: NZ_EMPTY_COMPONENT_NAME, useValue: this.nzComponentName }]
|
|
414
|
-
});
|
|
415
|
-
this.contentType = "component";
|
|
416
|
-
this.contentPortal = new ComponentPortal(content, this.viewContainerRef, injector);
|
|
417
|
-
} else {
|
|
418
|
-
this.contentType = "string";
|
|
419
|
-
this.contentPortal = void 0;
|
|
420
|
-
}
|
|
421
|
-
this.cdr.detectChanges();
|
|
422
|
-
}
|
|
423
|
-
getUserDefaultEmptyContent() {
|
|
424
|
-
return (this.configService.getConfigForComponent("empty") || {}).nzDefaultEmptyContent;
|
|
425
|
-
}
|
|
426
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzEmbedEmptyComponent, deps: [], target: FactoryTarget.Component });
|
|
427
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzEmbedEmptyComponent, isStandalone: true, selector: "nz-embed-empty", inputs: { nzComponentName: "nzComponentName", specificContent: "specificContent" }, exportAs: ["nzEmbedEmpty"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
428
|
-
@if (content) {
|
|
429
|
-
@if (contentType === 'template' || contentType === 'string') {
|
|
430
|
-
<ng-container *nzStringTemplateOutlet="content; context: { $implicit: this.nzComponentName }">{{
|
|
431
|
-
content
|
|
432
|
-
}}</ng-container>
|
|
433
|
-
} @else {
|
|
434
|
-
<ng-template [cdkPortalOutlet]="contentPortal" />
|
|
435
|
-
}
|
|
436
|
-
} @else {
|
|
437
|
-
@if (specificContent !== null) {
|
|
438
|
-
@switch (size) {
|
|
439
|
-
@case ('normal') {
|
|
440
|
-
<nz-empty class="ant-empty-normal" nzNotFoundImage="simple" />
|
|
441
|
-
}
|
|
442
|
-
@case ('small') {
|
|
443
|
-
<nz-empty class="ant-empty-small" nzNotFoundImage="simple" />
|
|
444
|
-
}
|
|
445
|
-
@default {
|
|
446
|
-
<nz-empty />
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
452
|
-
};
|
|
453
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzEmbedEmptyComponent, decorators: [{
|
|
454
|
-
type: Component,
|
|
455
|
-
args: [{
|
|
456
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
457
|
-
encapsulation: ViewEncapsulation.None,
|
|
458
|
-
selector: "nz-embed-empty",
|
|
459
|
-
exportAs: "nzEmbedEmpty",
|
|
460
|
-
template: `
|
|
461
|
-
@if (content) {
|
|
462
|
-
@if (contentType === 'template' || contentType === 'string') {
|
|
463
|
-
<ng-container *nzStringTemplateOutlet="content; context: { $implicit: this.nzComponentName }">{{
|
|
464
|
-
content
|
|
465
|
-
}}</ng-container>
|
|
466
|
-
} @else {
|
|
467
|
-
<ng-template [cdkPortalOutlet]="contentPortal" />
|
|
468
|
-
}
|
|
469
|
-
} @else {
|
|
470
|
-
@if (specificContent !== null) {
|
|
471
|
-
@switch (size) {
|
|
472
|
-
@case ('normal') {
|
|
473
|
-
<nz-empty class="ant-empty-normal" nzNotFoundImage="simple" />
|
|
474
|
-
}
|
|
475
|
-
@case ('small') {
|
|
476
|
-
<nz-empty class="ant-empty-small" nzNotFoundImage="simple" />
|
|
477
|
-
}
|
|
478
|
-
@default {
|
|
479
|
-
<nz-empty />
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
`,
|
|
485
|
-
imports: [NzEmptyComponent, PortalModule, NzOutletModule]
|
|
486
|
-
}]
|
|
487
|
-
}], ctorParameters: () => [], propDecorators: { nzComponentName: [{
|
|
488
|
-
type: Input
|
|
489
|
-
}], specificContent: [{
|
|
490
|
-
type: Input
|
|
491
|
-
}] } });
|
|
492
|
-
var NzEmptyModule = class _NzEmptyModule {
|
|
493
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzEmptyModule, deps: [], target: FactoryTarget.NgModule });
|
|
494
|
-
static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzEmptyModule, imports: [NzEmptyComponent, NzEmbedEmptyComponent, NzEmptyDefaultComponent, NzEmptySimpleComponent], exports: [NzEmptyComponent, NzEmbedEmptyComponent] });
|
|
495
|
-
static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzEmptyModule, imports: [NzEmptyComponent, NzEmbedEmptyComponent] });
|
|
496
|
-
};
|
|
497
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzEmptyModule, decorators: [{
|
|
498
|
-
type: NgModule,
|
|
499
|
-
args: [{
|
|
500
|
-
imports: [NzEmptyComponent, NzEmbedEmptyComponent, NzEmptyDefaultComponent, NzEmptySimpleComponent],
|
|
501
|
-
exports: [NzEmptyComponent, NzEmbedEmptyComponent]
|
|
502
|
-
}]
|
|
503
|
-
}] });
|
|
504
|
-
|
|
505
|
-
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-select.mjs
|
|
506
|
-
var NzOptionGroupComponent = class _NzOptionGroupComponent {
|
|
507
|
-
nzLabel = null;
|
|
508
|
-
changes = new Subject();
|
|
509
|
-
ngOnChanges() {
|
|
510
|
-
this.changes.next();
|
|
511
|
-
}
|
|
512
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzOptionGroupComponent, deps: [], target: FactoryTarget.Component });
|
|
513
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzOptionGroupComponent, isStandalone: true, selector: "nz-option-group", inputs: { nzLabel: "nzLabel" }, exportAs: ["nzOptionGroup"], usesOnChanges: true, ngImport: core_exports, template: `<ng-content></ng-content>`, isInline: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
514
|
-
};
|
|
515
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzOptionGroupComponent, decorators: [{
|
|
516
|
-
type: Component,
|
|
517
|
-
args: [{
|
|
518
|
-
selector: "nz-option-group",
|
|
519
|
-
exportAs: "nzOptionGroup",
|
|
520
|
-
template: `<ng-content></ng-content>`,
|
|
521
|
-
encapsulation: ViewEncapsulation.None,
|
|
522
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
523
|
-
}]
|
|
524
|
-
}], propDecorators: { nzLabel: [{
|
|
525
|
-
type: Input
|
|
526
|
-
}] } });
|
|
527
|
-
var NzOptionItemGroupComponent = class _NzOptionItemGroupComponent {
|
|
528
|
-
nzLabel = null;
|
|
529
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzOptionItemGroupComponent, deps: [], target: FactoryTarget.Component });
|
|
530
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzOptionItemGroupComponent, isStandalone: true, selector: "nz-option-item-group", inputs: { nzLabel: "nzLabel" }, host: { classAttribute: "ant-select-item ant-select-item-group" }, ngImport: core_exports, template: `<ng-container *nzStringTemplateOutlet="nzLabel">{{ nzLabel }}</ng-container>`, isInline: true, dependencies: [{ kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
531
|
-
};
|
|
532
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzOptionItemGroupComponent, decorators: [{
|
|
533
|
-
type: Component,
|
|
534
|
-
args: [{
|
|
535
|
-
selector: "nz-option-item-group",
|
|
536
|
-
template: `<ng-container *nzStringTemplateOutlet="nzLabel">{{ nzLabel }}</ng-container>`,
|
|
537
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
538
|
-
encapsulation: ViewEncapsulation.None,
|
|
539
|
-
host: {
|
|
540
|
-
class: "ant-select-item ant-select-item-group"
|
|
541
|
-
},
|
|
542
|
-
imports: [NzOutletModule]
|
|
543
|
-
}]
|
|
544
|
-
}], propDecorators: { nzLabel: [{
|
|
545
|
-
type: Input
|
|
546
|
-
}] } });
|
|
547
|
-
var NzOptionItemComponent = class _NzOptionItemComponent {
|
|
548
|
-
el = inject(ElementRef).nativeElement;
|
|
549
|
-
ngZone = inject(NgZone);
|
|
550
|
-
destroyRef = inject(DestroyRef);
|
|
551
|
-
selected = false;
|
|
552
|
-
activated = false;
|
|
553
|
-
grouped = false;
|
|
554
|
-
customContent = false;
|
|
555
|
-
template = null;
|
|
556
|
-
disabled = false;
|
|
557
|
-
showState = false;
|
|
558
|
-
title;
|
|
559
|
-
label = null;
|
|
560
|
-
value = null;
|
|
561
|
-
activatedValue = null;
|
|
562
|
-
listOfSelectedValue = [];
|
|
563
|
-
icon = null;
|
|
564
|
-
compareWith;
|
|
565
|
-
itemClick = new EventEmitter();
|
|
566
|
-
itemHover = new EventEmitter();
|
|
567
|
-
ngOnChanges(changes) {
|
|
568
|
-
const { value, activatedValue, listOfSelectedValue } = changes;
|
|
569
|
-
if (value || listOfSelectedValue) {
|
|
570
|
-
this.selected = this.listOfSelectedValue.some((v) => this.compareWith(v, this.value));
|
|
571
|
-
}
|
|
572
|
-
if (value || activatedValue) {
|
|
573
|
-
this.activated = this.compareWith(this.activatedValue, this.value);
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
ngOnInit() {
|
|
577
|
-
fromEventOutsideAngular(this.el, "click").pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
578
|
-
if (!this.disabled) {
|
|
579
|
-
this.ngZone.run(() => this.itemClick.emit(this.value));
|
|
580
|
-
}
|
|
581
|
-
});
|
|
582
|
-
fromEventOutsideAngular(this.el, "mouseenter").pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
583
|
-
if (!this.disabled) {
|
|
584
|
-
this.ngZone.run(() => this.itemHover.emit(this.value));
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzOptionItemComponent, deps: [], target: FactoryTarget.Component });
|
|
589
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzOptionItemComponent, isStandalone: true, selector: "nz-option-item", inputs: { grouped: "grouped", customContent: ["customContent", "customContent", booleanAttribute], template: "template", disabled: "disabled", showState: "showState", title: "title", label: "label", value: "value", activatedValue: "activatedValue", listOfSelectedValue: "listOfSelectedValue", icon: "icon", compareWith: "compareWith" }, outputs: { itemClick: "itemClick", itemHover: "itemHover" }, host: { properties: { "attr.title": "title", "class.ant-select-item-option-grouped": "grouped", "class.ant-select-item-option-selected": "selected && !disabled", "class.ant-select-item-option-disabled": "disabled", "class.ant-select-item-option-active": "activated && !disabled" }, classAttribute: "ant-select-item ant-select-item-option" }, usesOnChanges: true, ngImport: core_exports, template: `
|
|
590
|
-
<div class="ant-select-item-option-content">
|
|
591
|
-
@if (customContent) {
|
|
592
|
-
<ng-template [ngTemplateOutlet]="template"></ng-template>
|
|
593
|
-
} @else {
|
|
594
|
-
{{ label }}
|
|
595
|
-
}
|
|
596
|
-
</div>
|
|
597
|
-
@if (showState && selected) {
|
|
598
|
-
<div class="ant-select-item-option-state" unselectable="on">
|
|
599
|
-
@if (!icon) {
|
|
600
|
-
<nz-icon nzType="check" class="ant-select-selected-icon" />
|
|
601
|
-
} @else {
|
|
602
|
-
<ng-template [ngTemplateOutlet]="icon"></ng-template>
|
|
603
|
-
}
|
|
604
|
-
</div>
|
|
605
|
-
}
|
|
606
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
607
|
-
};
|
|
608
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzOptionItemComponent, decorators: [{
|
|
609
|
-
type: Component,
|
|
610
|
-
args: [{
|
|
611
|
-
selector: "nz-option-item",
|
|
612
|
-
template: `
|
|
613
|
-
<div class="ant-select-item-option-content">
|
|
614
|
-
@if (customContent) {
|
|
615
|
-
<ng-template [ngTemplateOutlet]="template"></ng-template>
|
|
616
|
-
} @else {
|
|
617
|
-
{{ label }}
|
|
618
|
-
}
|
|
619
|
-
</div>
|
|
620
|
-
@if (showState && selected) {
|
|
621
|
-
<div class="ant-select-item-option-state" unselectable="on">
|
|
622
|
-
@if (!icon) {
|
|
623
|
-
<nz-icon nzType="check" class="ant-select-selected-icon" />
|
|
624
|
-
} @else {
|
|
625
|
-
<ng-template [ngTemplateOutlet]="icon"></ng-template>
|
|
626
|
-
}
|
|
627
|
-
</div>
|
|
628
|
-
}
|
|
629
|
-
`,
|
|
630
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
631
|
-
encapsulation: ViewEncapsulation.None,
|
|
632
|
-
host: {
|
|
633
|
-
class: "ant-select-item ant-select-item-option",
|
|
634
|
-
"[attr.title]": "title",
|
|
635
|
-
"[class.ant-select-item-option-grouped]": "grouped",
|
|
636
|
-
"[class.ant-select-item-option-selected]": "selected && !disabled",
|
|
637
|
-
"[class.ant-select-item-option-disabled]": "disabled",
|
|
638
|
-
"[class.ant-select-item-option-active]": "activated && !disabled"
|
|
639
|
-
},
|
|
640
|
-
imports: [NgTemplateOutlet, NzIconModule]
|
|
641
|
-
}]
|
|
642
|
-
}], propDecorators: { grouped: [{
|
|
643
|
-
type: Input
|
|
644
|
-
}], customContent: [{
|
|
645
|
-
type: Input,
|
|
646
|
-
args: [{ transform: booleanAttribute }]
|
|
647
|
-
}], template: [{
|
|
648
|
-
type: Input
|
|
649
|
-
}], disabled: [{
|
|
650
|
-
type: Input
|
|
651
|
-
}], showState: [{
|
|
652
|
-
type: Input
|
|
653
|
-
}], title: [{
|
|
654
|
-
type: Input
|
|
655
|
-
}], label: [{
|
|
656
|
-
type: Input
|
|
657
|
-
}], value: [{
|
|
658
|
-
type: Input
|
|
659
|
-
}], activatedValue: [{
|
|
660
|
-
type: Input
|
|
661
|
-
}], listOfSelectedValue: [{
|
|
662
|
-
type: Input
|
|
663
|
-
}], icon: [{
|
|
664
|
-
type: Input
|
|
665
|
-
}], compareWith: [{
|
|
666
|
-
type: Input
|
|
667
|
-
}], itemClick: [{
|
|
668
|
-
type: Output
|
|
669
|
-
}], itemHover: [{
|
|
670
|
-
type: Output
|
|
671
|
-
}] } });
|
|
672
|
-
var NzOptionContainerComponent = class _NzOptionContainerComponent {
|
|
673
|
-
ngZone = inject(NgZone);
|
|
674
|
-
platformId = inject(PLATFORM_ID);
|
|
675
|
-
notFoundContent = void 0;
|
|
676
|
-
menuItemSelectedIcon = null;
|
|
677
|
-
dropdownRender = null;
|
|
678
|
-
activatedValue = null;
|
|
679
|
-
listOfSelectedValue = [];
|
|
680
|
-
compareWith;
|
|
681
|
-
mode = "default";
|
|
682
|
-
matchWidth = true;
|
|
683
|
-
itemSize = 32;
|
|
684
|
-
maxItemLength = 8;
|
|
685
|
-
isMaxMultipleCountReached = false;
|
|
686
|
-
listOfContainerItem = [];
|
|
687
|
-
itemClick = new EventEmitter();
|
|
688
|
-
scrollToBottom = new EventEmitter();
|
|
689
|
-
cdkVirtualScrollViewport;
|
|
690
|
-
scrolledIndex = 0;
|
|
691
|
-
onItemClick(value) {
|
|
692
|
-
this.itemClick.emit(value);
|
|
693
|
-
}
|
|
694
|
-
onItemHover(value) {
|
|
695
|
-
this.activatedValue = value;
|
|
696
|
-
}
|
|
697
|
-
trackValue(_index, option) {
|
|
698
|
-
return option.key;
|
|
699
|
-
}
|
|
700
|
-
onScrolledIndexChange(index) {
|
|
701
|
-
this.scrolledIndex = index;
|
|
702
|
-
if (index === this.listOfContainerItem.length - this.maxItemLength - 1) {
|
|
703
|
-
this.scrollToBottom.emit();
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
scrollToActivatedValue() {
|
|
707
|
-
const index = this.listOfContainerItem.findIndex((item) => this.compareWith(item.key, this.activatedValue));
|
|
708
|
-
if (index < this.scrolledIndex || index >= this.scrolledIndex + this.maxItemLength) {
|
|
709
|
-
this.cdkVirtualScrollViewport.scrollToIndex(index || 0);
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
ngOnChanges(changes) {
|
|
713
|
-
const { listOfContainerItem, activatedValue } = changes;
|
|
714
|
-
if (listOfContainerItem || activatedValue) {
|
|
715
|
-
this.scrollToActivatedValue();
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
ngAfterViewInit() {
|
|
719
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
720
|
-
this.ngZone.runOutsideAngular(() => setTimeout(() => this.scrollToActivatedValue()));
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzOptionContainerComponent, deps: [], target: FactoryTarget.Component });
|
|
724
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzOptionContainerComponent, isStandalone: true, selector: "nz-option-container", inputs: { notFoundContent: "notFoundContent", menuItemSelectedIcon: "menuItemSelectedIcon", dropdownRender: "dropdownRender", activatedValue: "activatedValue", listOfSelectedValue: "listOfSelectedValue", compareWith: "compareWith", mode: "mode", matchWidth: "matchWidth", itemSize: "itemSize", maxItemLength: "maxItemLength", isMaxMultipleCountReached: "isMaxMultipleCountReached", listOfContainerItem: "listOfContainerItem" }, outputs: { itemClick: "itemClick", scrollToBottom: "scrollToBottom" }, host: { classAttribute: "ant-select-dropdown" }, viewQueries: [{ propertyName: "cdkVirtualScrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, static: true }], exportAs: ["nzOptionContainer"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
725
|
-
<div>
|
|
726
|
-
@if (listOfContainerItem.length === 0) {
|
|
727
|
-
<div class="ant-select-item-empty">
|
|
728
|
-
<nz-embed-empty nzComponentName="select" [specificContent]="notFoundContent!"></nz-embed-empty>
|
|
729
|
-
</div>
|
|
730
|
-
}
|
|
731
|
-
<cdk-virtual-scroll-viewport
|
|
732
|
-
[class.full-width]="!matchWidth"
|
|
733
|
-
[itemSize]="itemSize"
|
|
734
|
-
[maxBufferPx]="itemSize * maxItemLength"
|
|
735
|
-
[minBufferPx]="itemSize * maxItemLength"
|
|
736
|
-
(scrolledIndexChange)="onScrolledIndexChange($event)"
|
|
737
|
-
[style.height.px]="listOfContainerItem.length * itemSize"
|
|
738
|
-
[style.max-height.px]="itemSize * maxItemLength"
|
|
739
|
-
>
|
|
740
|
-
<ng-template
|
|
741
|
-
cdkVirtualFor
|
|
742
|
-
[cdkVirtualForOf]="listOfContainerItem"
|
|
743
|
-
[cdkVirtualForTrackBy]="trackValue"
|
|
744
|
-
[cdkVirtualForTemplateCacheSize]="0"
|
|
745
|
-
let-item
|
|
746
|
-
>
|
|
747
|
-
@switch (item.type) {
|
|
748
|
-
@case ('group') {
|
|
749
|
-
<nz-option-item-group [nzLabel]="item.groupLabel ?? null"></nz-option-item-group>
|
|
750
|
-
}
|
|
751
|
-
@case ('item') {
|
|
752
|
-
<nz-option-item
|
|
753
|
-
[icon]="menuItemSelectedIcon"
|
|
754
|
-
[customContent]="item.nzCustomContent"
|
|
755
|
-
[template]="item.template ?? null"
|
|
756
|
-
[grouped]="!!item.groupLabel"
|
|
757
|
-
[disabled]="
|
|
758
|
-
item.nzDisabled || (isMaxMultipleCountReached && !listOfSelectedValue.includes(item['nzValue']))
|
|
759
|
-
"
|
|
760
|
-
[showState]="mode === 'tags' || mode === 'multiple'"
|
|
761
|
-
[title]="item.nzTitle"
|
|
762
|
-
[label]="item.nzLabel"
|
|
763
|
-
[compareWith]="compareWith"
|
|
764
|
-
[activatedValue]="activatedValue"
|
|
765
|
-
[listOfSelectedValue]="listOfSelectedValue"
|
|
766
|
-
[value]="item.nzValue"
|
|
767
|
-
(itemHover)="onItemHover($event)"
|
|
768
|
-
(itemClick)="onItemClick($event)"
|
|
769
|
-
></nz-option-item>
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
</ng-template>
|
|
773
|
-
</cdk-virtual-scroll-viewport>
|
|
774
|
-
<ng-template [ngTemplateOutlet]="dropdownRender"></ng-template>
|
|
775
|
-
</div>
|
|
776
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: NzEmbedEmptyComponent, selector: "nz-embed-empty", inputs: ["nzComponentName", "specificContent"], exportAs: ["nzEmbedEmpty"] }, { kind: "component", type: NzOptionItemGroupComponent, selector: "nz-option-item-group", inputs: ["nzLabel"] }, { kind: "component", type: NzOptionItemComponent, selector: "nz-option-item", inputs: ["grouped", "customContent", "template", "disabled", "showState", "title", "label", "value", "activatedValue", "listOfSelectedValue", "icon", "compareWith"], outputs: ["itemClick", "itemHover"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: NzOverlayModule }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
777
|
-
};
|
|
778
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzOptionContainerComponent, decorators: [{
|
|
779
|
-
type: Component,
|
|
780
|
-
args: [{
|
|
781
|
-
selector: "nz-option-container",
|
|
782
|
-
exportAs: "nzOptionContainer",
|
|
783
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
784
|
-
encapsulation: ViewEncapsulation.None,
|
|
785
|
-
template: `
|
|
786
|
-
<div>
|
|
787
|
-
@if (listOfContainerItem.length === 0) {
|
|
788
|
-
<div class="ant-select-item-empty">
|
|
789
|
-
<nz-embed-empty nzComponentName="select" [specificContent]="notFoundContent!"></nz-embed-empty>
|
|
790
|
-
</div>
|
|
791
|
-
}
|
|
792
|
-
<cdk-virtual-scroll-viewport
|
|
793
|
-
[class.full-width]="!matchWidth"
|
|
794
|
-
[itemSize]="itemSize"
|
|
795
|
-
[maxBufferPx]="itemSize * maxItemLength"
|
|
796
|
-
[minBufferPx]="itemSize * maxItemLength"
|
|
797
|
-
(scrolledIndexChange)="onScrolledIndexChange($event)"
|
|
798
|
-
[style.height.px]="listOfContainerItem.length * itemSize"
|
|
799
|
-
[style.max-height.px]="itemSize * maxItemLength"
|
|
800
|
-
>
|
|
801
|
-
<ng-template
|
|
802
|
-
cdkVirtualFor
|
|
803
|
-
[cdkVirtualForOf]="listOfContainerItem"
|
|
804
|
-
[cdkVirtualForTrackBy]="trackValue"
|
|
805
|
-
[cdkVirtualForTemplateCacheSize]="0"
|
|
806
|
-
let-item
|
|
807
|
-
>
|
|
808
|
-
@switch (item.type) {
|
|
809
|
-
@case ('group') {
|
|
810
|
-
<nz-option-item-group [nzLabel]="item.groupLabel ?? null"></nz-option-item-group>
|
|
811
|
-
}
|
|
812
|
-
@case ('item') {
|
|
813
|
-
<nz-option-item
|
|
814
|
-
[icon]="menuItemSelectedIcon"
|
|
815
|
-
[customContent]="item.nzCustomContent"
|
|
816
|
-
[template]="item.template ?? null"
|
|
817
|
-
[grouped]="!!item.groupLabel"
|
|
818
|
-
[disabled]="
|
|
819
|
-
item.nzDisabled || (isMaxMultipleCountReached && !listOfSelectedValue.includes(item['nzValue']))
|
|
820
|
-
"
|
|
821
|
-
[showState]="mode === 'tags' || mode === 'multiple'"
|
|
822
|
-
[title]="item.nzTitle"
|
|
823
|
-
[label]="item.nzLabel"
|
|
824
|
-
[compareWith]="compareWith"
|
|
825
|
-
[activatedValue]="activatedValue"
|
|
826
|
-
[listOfSelectedValue]="listOfSelectedValue"
|
|
827
|
-
[value]="item.nzValue"
|
|
828
|
-
(itemHover)="onItemHover($event)"
|
|
829
|
-
(itemClick)="onItemClick($event)"
|
|
830
|
-
></nz-option-item>
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
</ng-template>
|
|
834
|
-
</cdk-virtual-scroll-viewport>
|
|
835
|
-
<ng-template [ngTemplateOutlet]="dropdownRender"></ng-template>
|
|
836
|
-
</div>
|
|
837
|
-
`,
|
|
838
|
-
host: { class: "ant-select-dropdown" },
|
|
839
|
-
imports: [
|
|
840
|
-
NzEmptyModule,
|
|
841
|
-
NzOptionItemGroupComponent,
|
|
842
|
-
NzOptionItemComponent,
|
|
843
|
-
NgTemplateOutlet,
|
|
844
|
-
OverlayModule,
|
|
845
|
-
NzOverlayModule
|
|
846
|
-
]
|
|
847
|
-
}]
|
|
848
|
-
}], propDecorators: { notFoundContent: [{
|
|
849
|
-
type: Input
|
|
850
|
-
}], menuItemSelectedIcon: [{
|
|
851
|
-
type: Input
|
|
852
|
-
}], dropdownRender: [{
|
|
853
|
-
type: Input
|
|
854
|
-
}], activatedValue: [{
|
|
855
|
-
type: Input
|
|
856
|
-
}], listOfSelectedValue: [{
|
|
857
|
-
type: Input
|
|
858
|
-
}], compareWith: [{
|
|
859
|
-
type: Input
|
|
860
|
-
}], mode: [{
|
|
861
|
-
type: Input
|
|
862
|
-
}], matchWidth: [{
|
|
863
|
-
type: Input
|
|
864
|
-
}], itemSize: [{
|
|
865
|
-
type: Input
|
|
866
|
-
}], maxItemLength: [{
|
|
867
|
-
type: Input
|
|
868
|
-
}], isMaxMultipleCountReached: [{
|
|
869
|
-
type: Input
|
|
870
|
-
}], listOfContainerItem: [{
|
|
871
|
-
type: Input
|
|
872
|
-
}], itemClick: [{
|
|
873
|
-
type: Output
|
|
874
|
-
}], scrollToBottom: [{
|
|
875
|
-
type: Output
|
|
876
|
-
}], cdkVirtualScrollViewport: [{
|
|
877
|
-
type: ViewChild,
|
|
878
|
-
args: [CdkVirtualScrollViewport, { static: true }]
|
|
879
|
-
}] } });
|
|
880
|
-
var NzOptionComponent = class _NzOptionComponent {
|
|
881
|
-
destroyRef = inject(DestroyRef);
|
|
882
|
-
nzOptionGroupComponent = inject(NzOptionGroupComponent, { optional: true });
|
|
883
|
-
changes = new Subject();
|
|
884
|
-
groupLabel = null;
|
|
885
|
-
template;
|
|
886
|
-
nzTitle;
|
|
887
|
-
nzLabel = null;
|
|
888
|
-
nzValue = null;
|
|
889
|
-
nzKey;
|
|
890
|
-
nzDisabled = false;
|
|
891
|
-
nzHide = false;
|
|
892
|
-
nzCustomContent = false;
|
|
893
|
-
ngOnInit() {
|
|
894
|
-
this.nzOptionGroupComponent?.changes.pipe(startWith(true), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
895
|
-
this.groupLabel = this.nzOptionGroupComponent?.nzLabel;
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
ngOnChanges() {
|
|
899
|
-
this.changes.next();
|
|
900
|
-
}
|
|
901
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzOptionComponent, deps: [], target: FactoryTarget.Component });
|
|
902
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "16.1.0", version: "20.3.0", type: _NzOptionComponent, isStandalone: true, selector: "nz-option", inputs: { nzTitle: "nzTitle", nzLabel: "nzLabel", nzValue: "nzValue", nzKey: "nzKey", nzDisabled: ["nzDisabled", "nzDisabled", booleanAttribute], nzHide: ["nzHide", "nzHide", booleanAttribute], nzCustomContent: ["nzCustomContent", "nzCustomContent", booleanAttribute] }, viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: ["nzOption"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
903
|
-
<ng-template>
|
|
904
|
-
<ng-content></ng-content>
|
|
905
|
-
</ng-template>
|
|
906
|
-
`, isInline: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
907
|
-
};
|
|
908
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzOptionComponent, decorators: [{
|
|
909
|
-
type: Component,
|
|
910
|
-
args: [{
|
|
911
|
-
selector: "nz-option",
|
|
912
|
-
exportAs: "nzOption",
|
|
913
|
-
encapsulation: ViewEncapsulation.None,
|
|
914
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
915
|
-
template: `
|
|
916
|
-
<ng-template>
|
|
917
|
-
<ng-content></ng-content>
|
|
918
|
-
</ng-template>
|
|
919
|
-
`
|
|
920
|
-
}]
|
|
921
|
-
}], propDecorators: { template: [{
|
|
922
|
-
type: ViewChild,
|
|
923
|
-
args: [TemplateRef, { static: true }]
|
|
924
|
-
}], nzTitle: [{
|
|
925
|
-
type: Input
|
|
926
|
-
}], nzLabel: [{
|
|
927
|
-
type: Input
|
|
928
|
-
}], nzValue: [{
|
|
929
|
-
type: Input
|
|
930
|
-
}], nzKey: [{
|
|
931
|
-
type: Input
|
|
932
|
-
}], nzDisabled: [{
|
|
933
|
-
type: Input,
|
|
934
|
-
args: [{ transform: booleanAttribute }]
|
|
935
|
-
}], nzHide: [{
|
|
936
|
-
type: Input,
|
|
937
|
-
args: [{ transform: booleanAttribute }]
|
|
938
|
-
}], nzCustomContent: [{
|
|
939
|
-
type: Input,
|
|
940
|
-
args: [{ transform: booleanAttribute }]
|
|
941
|
-
}] } });
|
|
942
|
-
var NzSelectArrowComponent = class _NzSelectArrowComponent {
|
|
943
|
-
listOfValue = [];
|
|
944
|
-
loading = false;
|
|
945
|
-
search = false;
|
|
946
|
-
showArrow = false;
|
|
947
|
-
isMaxMultipleCountSet = false;
|
|
948
|
-
suffixIcon = null;
|
|
949
|
-
feedbackIcon = null;
|
|
950
|
-
nzMaxMultipleCount = Infinity;
|
|
951
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSelectArrowComponent, deps: [], target: FactoryTarget.Component });
|
|
952
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzSelectArrowComponent, isStandalone: true, selector: "nz-select-arrow", inputs: { listOfValue: "listOfValue", loading: "loading", search: "search", showArrow: "showArrow", isMaxMultipleCountSet: "isMaxMultipleCountSet", suffixIcon: "suffixIcon", feedbackIcon: "feedbackIcon", nzMaxMultipleCount: ["nzMaxMultipleCount", "nzMaxMultipleCount", numberAttributeWithInfinityFallback] }, host: { properties: { "class.ant-select-arrow-loading": "loading" }, classAttribute: "ant-select-arrow" }, ngImport: core_exports, template: `
|
|
953
|
-
@if (isMaxMultipleCountSet) {
|
|
954
|
-
<span>{{ listOfValue.length }} / {{ nzMaxMultipleCount }}</span>
|
|
955
|
-
}
|
|
956
|
-
@if (loading) {
|
|
957
|
-
<nz-icon nzType="loading" />
|
|
958
|
-
} @else {
|
|
959
|
-
@if (showArrow && !suffixIcon) {
|
|
960
|
-
@if (search) {
|
|
961
|
-
<nz-icon nzType="search" />
|
|
962
|
-
} @else {
|
|
963
|
-
<nz-icon nzType="down" />
|
|
964
|
-
}
|
|
965
|
-
} @else {
|
|
966
|
-
<ng-container *nzStringTemplateOutlet="suffixIcon; let suffixIcon">
|
|
967
|
-
<nz-icon [nzType]="suffixIcon" />
|
|
968
|
-
</ng-container>
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
<ng-container *nzStringTemplateOutlet="feedbackIcon">{{ feedbackIcon }}</ng-container>
|
|
972
|
-
`, 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"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
973
|
-
};
|
|
974
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSelectArrowComponent, decorators: [{
|
|
975
|
-
type: Component,
|
|
976
|
-
args: [{
|
|
977
|
-
selector: "nz-select-arrow",
|
|
978
|
-
encapsulation: ViewEncapsulation.None,
|
|
979
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
980
|
-
template: `
|
|
981
|
-
@if (isMaxMultipleCountSet) {
|
|
982
|
-
<span>{{ listOfValue.length }} / {{ nzMaxMultipleCount }}</span>
|
|
983
|
-
}
|
|
984
|
-
@if (loading) {
|
|
985
|
-
<nz-icon nzType="loading" />
|
|
986
|
-
} @else {
|
|
987
|
-
@if (showArrow && !suffixIcon) {
|
|
988
|
-
@if (search) {
|
|
989
|
-
<nz-icon nzType="search" />
|
|
990
|
-
} @else {
|
|
991
|
-
<nz-icon nzType="down" />
|
|
992
|
-
}
|
|
993
|
-
} @else {
|
|
994
|
-
<ng-container *nzStringTemplateOutlet="suffixIcon; let suffixIcon">
|
|
995
|
-
<nz-icon [nzType]="suffixIcon" />
|
|
996
|
-
</ng-container>
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
<ng-container *nzStringTemplateOutlet="feedbackIcon">{{ feedbackIcon }}</ng-container>
|
|
1000
|
-
`,
|
|
1001
|
-
host: {
|
|
1002
|
-
class: "ant-select-arrow",
|
|
1003
|
-
"[class.ant-select-arrow-loading]": "loading"
|
|
1004
|
-
},
|
|
1005
|
-
imports: [NzIconModule, NzOutletModule]
|
|
1006
|
-
}]
|
|
1007
|
-
}], propDecorators: { listOfValue: [{
|
|
1008
|
-
type: Input
|
|
1009
|
-
}], loading: [{
|
|
1010
|
-
type: Input
|
|
1011
|
-
}], search: [{
|
|
1012
|
-
type: Input
|
|
1013
|
-
}], showArrow: [{
|
|
1014
|
-
type: Input
|
|
1015
|
-
}], isMaxMultipleCountSet: [{
|
|
1016
|
-
type: Input
|
|
1017
|
-
}], suffixIcon: [{
|
|
1018
|
-
type: Input
|
|
1019
|
-
}], feedbackIcon: [{
|
|
1020
|
-
type: Input
|
|
1021
|
-
}], nzMaxMultipleCount: [{
|
|
1022
|
-
type: Input,
|
|
1023
|
-
args: [{ transform: numberAttributeWithInfinityFallback }]
|
|
1024
|
-
}] } });
|
|
1025
|
-
var NzSelectClearComponent = class _NzSelectClearComponent {
|
|
1026
|
-
clearIcon = null;
|
|
1027
|
-
clear = new EventEmitter();
|
|
1028
|
-
onClick(e) {
|
|
1029
|
-
e.preventDefault();
|
|
1030
|
-
e.stopPropagation();
|
|
1031
|
-
this.clear.emit(e);
|
|
1032
|
-
}
|
|
1033
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSelectClearComponent, deps: [], target: FactoryTarget.Component });
|
|
1034
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzSelectClearComponent, isStandalone: true, selector: "nz-select-clear", inputs: { clearIcon: "clearIcon" }, outputs: { clear: "clear" }, host: { listeners: { "click": "onClick($event)" }, classAttribute: "ant-select-clear" }, ngImport: core_exports, template: `
|
|
1035
|
-
@if (clearIcon) {
|
|
1036
|
-
<ng-template [ngTemplateOutlet]="clearIcon"></ng-template>
|
|
1037
|
-
} @else {
|
|
1038
|
-
<nz-icon nzType="close-circle" nzTheme="fill" class="ant-select-close-icon" />
|
|
1039
|
-
}
|
|
1040
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
1041
|
-
};
|
|
1042
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSelectClearComponent, decorators: [{
|
|
1043
|
-
type: Component,
|
|
1044
|
-
args: [{
|
|
1045
|
-
selector: "nz-select-clear",
|
|
1046
|
-
encapsulation: ViewEncapsulation.None,
|
|
1047
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1048
|
-
template: `
|
|
1049
|
-
@if (clearIcon) {
|
|
1050
|
-
<ng-template [ngTemplateOutlet]="clearIcon"></ng-template>
|
|
1051
|
-
} @else {
|
|
1052
|
-
<nz-icon nzType="close-circle" nzTheme="fill" class="ant-select-close-icon" />
|
|
1053
|
-
}
|
|
1054
|
-
`,
|
|
1055
|
-
host: {
|
|
1056
|
-
class: "ant-select-clear",
|
|
1057
|
-
"(click)": "onClick($event)"
|
|
1058
|
-
},
|
|
1059
|
-
imports: [NgTemplateOutlet, NzIconModule]
|
|
1060
|
-
}]
|
|
1061
|
-
}], propDecorators: { clearIcon: [{
|
|
1062
|
-
type: Input
|
|
1063
|
-
}], clear: [{
|
|
1064
|
-
type: Output
|
|
1065
|
-
}] } });
|
|
1066
|
-
var NzSelectItemComponent = class _NzSelectItemComponent {
|
|
1067
|
-
disabled = false;
|
|
1068
|
-
label = null;
|
|
1069
|
-
/**
|
|
1070
|
-
* @internal Internally used, please do not use it directly.
|
|
1071
|
-
* @description Whether the label is in HTML format.
|
|
1072
|
-
*/
|
|
1073
|
-
displayLabelInHtml = false;
|
|
1074
|
-
deletable = false;
|
|
1075
|
-
removeIcon = null;
|
|
1076
|
-
contentTemplateOutletContext = null;
|
|
1077
|
-
contentTemplateOutlet = null;
|
|
1078
|
-
delete = new EventEmitter();
|
|
1079
|
-
get templateOutletContext() {
|
|
1080
|
-
return __spreadValues({
|
|
1081
|
-
$implicit: this.contentTemplateOutletContext
|
|
1082
|
-
}, this.contentTemplateOutletContext);
|
|
1083
|
-
}
|
|
1084
|
-
onDelete(e) {
|
|
1085
|
-
e.preventDefault();
|
|
1086
|
-
e.stopPropagation();
|
|
1087
|
-
if (!this.disabled) {
|
|
1088
|
-
this.delete.next(e);
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSelectItemComponent, deps: [], target: FactoryTarget.Component });
|
|
1092
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzSelectItemComponent, isStandalone: true, selector: "nz-select-item", inputs: { disabled: ["disabled", "disabled", booleanAttribute], label: "label", displayLabelInHtml: ["displayLabelInHtml", "displayLabelInHtml", booleanAttribute], deletable: ["deletable", "deletable", booleanAttribute], removeIcon: "removeIcon", contentTemplateOutletContext: "contentTemplateOutletContext", contentTemplateOutlet: "contentTemplateOutlet" }, outputs: { delete: "delete" }, host: { properties: { "attr.title": "label", "class.ant-select-selection-item-disabled": "disabled" }, classAttribute: "ant-select-selection-item" }, ngImport: core_exports, template: `
|
|
1093
|
-
<ng-container *nzStringTemplateOutlet="contentTemplateOutlet; context: templateOutletContext">
|
|
1094
|
-
@if (displayLabelInHtml) {
|
|
1095
|
-
<span [class.ant-select-selection-item-content]="deletable" [innerHTML]="label"></span>
|
|
1096
|
-
} @else {
|
|
1097
|
-
<span [class.ant-select-selection-item-content]="deletable">{{ label }}</span>
|
|
1098
|
-
}
|
|
1099
|
-
</ng-container>
|
|
1100
|
-
@if (deletable && !disabled) {
|
|
1101
|
-
<span class="ant-select-selection-item-remove" (click)="onDelete($event)">
|
|
1102
|
-
@if (!removeIcon) {
|
|
1103
|
-
<nz-icon nzType="close" />
|
|
1104
|
-
} @else {
|
|
1105
|
-
<ng-template [ngTemplateOutlet]="removeIcon"></ng-template>
|
|
1106
|
-
}
|
|
1107
|
-
</span>
|
|
1108
|
-
}
|
|
1109
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
1110
|
-
};
|
|
1111
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSelectItemComponent, decorators: [{
|
|
1112
|
-
type: Component,
|
|
1113
|
-
args: [{
|
|
1114
|
-
selector: "nz-select-item",
|
|
1115
|
-
encapsulation: ViewEncapsulation.None,
|
|
1116
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1117
|
-
template: `
|
|
1118
|
-
<ng-container *nzStringTemplateOutlet="contentTemplateOutlet; context: templateOutletContext">
|
|
1119
|
-
@if (displayLabelInHtml) {
|
|
1120
|
-
<span [class.ant-select-selection-item-content]="deletable" [innerHTML]="label"></span>
|
|
1121
|
-
} @else {
|
|
1122
|
-
<span [class.ant-select-selection-item-content]="deletable">{{ label }}</span>
|
|
1123
|
-
}
|
|
1124
|
-
</ng-container>
|
|
1125
|
-
@if (deletable && !disabled) {
|
|
1126
|
-
<span class="ant-select-selection-item-remove" (click)="onDelete($event)">
|
|
1127
|
-
@if (!removeIcon) {
|
|
1128
|
-
<nz-icon nzType="close" />
|
|
1129
|
-
} @else {
|
|
1130
|
-
<ng-template [ngTemplateOutlet]="removeIcon"></ng-template>
|
|
1131
|
-
}
|
|
1132
|
-
</span>
|
|
1133
|
-
}
|
|
1134
|
-
`,
|
|
1135
|
-
host: {
|
|
1136
|
-
class: "ant-select-selection-item",
|
|
1137
|
-
"[attr.title]": "label",
|
|
1138
|
-
"[class.ant-select-selection-item-disabled]": "disabled"
|
|
1139
|
-
},
|
|
1140
|
-
imports: [NgTemplateOutlet, NzOutletModule, NzIconModule]
|
|
1141
|
-
}]
|
|
1142
|
-
}], propDecorators: { disabled: [{
|
|
1143
|
-
type: Input,
|
|
1144
|
-
args: [{ transform: booleanAttribute }]
|
|
1145
|
-
}], label: [{
|
|
1146
|
-
type: Input
|
|
1147
|
-
}], displayLabelInHtml: [{
|
|
1148
|
-
type: Input,
|
|
1149
|
-
args: [{ transform: booleanAttribute }]
|
|
1150
|
-
}], deletable: [{
|
|
1151
|
-
type: Input,
|
|
1152
|
-
args: [{ transform: booleanAttribute }]
|
|
1153
|
-
}], removeIcon: [{
|
|
1154
|
-
type: Input
|
|
1155
|
-
}], contentTemplateOutletContext: [{
|
|
1156
|
-
type: Input
|
|
1157
|
-
}], contentTemplateOutlet: [{
|
|
1158
|
-
type: Input
|
|
1159
|
-
}], delete: [{
|
|
1160
|
-
type: Output
|
|
1161
|
-
}] } });
|
|
1162
|
-
var NzSelectPlaceholderComponent = class _NzSelectPlaceholderComponent {
|
|
1163
|
-
placeholder = null;
|
|
1164
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSelectPlaceholderComponent, deps: [], target: FactoryTarget.Component });
|
|
1165
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzSelectPlaceholderComponent, isStandalone: true, selector: "nz-select-placeholder", inputs: { placeholder: "placeholder" }, host: { classAttribute: "ant-select-selection-placeholder" }, ngImport: core_exports, template: `
|
|
1166
|
-
<ng-container *nzStringTemplateOutlet="placeholder">
|
|
1167
|
-
{{ placeholder }}
|
|
1168
|
-
</ng-container>
|
|
1169
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
1170
|
-
};
|
|
1171
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSelectPlaceholderComponent, decorators: [{
|
|
1172
|
-
type: Component,
|
|
1173
|
-
args: [{
|
|
1174
|
-
selector: "nz-select-placeholder",
|
|
1175
|
-
encapsulation: ViewEncapsulation.None,
|
|
1176
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1177
|
-
template: `
|
|
1178
|
-
<ng-container *nzStringTemplateOutlet="placeholder">
|
|
1179
|
-
{{ placeholder }}
|
|
1180
|
-
</ng-container>
|
|
1181
|
-
`,
|
|
1182
|
-
host: { class: "ant-select-selection-placeholder" },
|
|
1183
|
-
imports: [NzOutletModule]
|
|
1184
|
-
}]
|
|
1185
|
-
}], propDecorators: { placeholder: [{
|
|
1186
|
-
type: Input
|
|
1187
|
-
}] } });
|
|
1188
|
-
var NzSelectSearchComponent = class _NzSelectSearchComponent {
|
|
1189
|
-
elementRef = inject(ElementRef);
|
|
1190
|
-
renderer = inject(Renderer2);
|
|
1191
|
-
focusMonitor = inject(FocusMonitor);
|
|
1192
|
-
nzId = null;
|
|
1193
|
-
disabled = false;
|
|
1194
|
-
mirrorSync = false;
|
|
1195
|
-
showInput = true;
|
|
1196
|
-
focusTrigger = false;
|
|
1197
|
-
value = "";
|
|
1198
|
-
autofocus = false;
|
|
1199
|
-
valueChange = new EventEmitter();
|
|
1200
|
-
isComposingChange = new EventEmitter();
|
|
1201
|
-
inputElement;
|
|
1202
|
-
mirrorElement;
|
|
1203
|
-
constructor() {
|
|
1204
|
-
afterNextRender(() => {
|
|
1205
|
-
if (this.mirrorSync) {
|
|
1206
|
-
this.syncMirrorWidth();
|
|
1207
|
-
}
|
|
1208
|
-
if (this.autofocus) {
|
|
1209
|
-
this.focus();
|
|
1210
|
-
}
|
|
1211
|
-
});
|
|
1212
|
-
}
|
|
1213
|
-
setCompositionState(isComposing) {
|
|
1214
|
-
this.isComposingChange.next(isComposing);
|
|
1215
|
-
}
|
|
1216
|
-
onValueChange(value) {
|
|
1217
|
-
this.value = value;
|
|
1218
|
-
this.valueChange.next(value);
|
|
1219
|
-
if (this.mirrorSync) {
|
|
1220
|
-
this.syncMirrorWidth();
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
clearInputValue() {
|
|
1224
|
-
const inputDOM = this.inputElement.nativeElement;
|
|
1225
|
-
inputDOM.value = "";
|
|
1226
|
-
this.onValueChange("");
|
|
1227
|
-
}
|
|
1228
|
-
syncMirrorWidth() {
|
|
1229
|
-
const mirrorDOM = this.mirrorElement.nativeElement;
|
|
1230
|
-
const hostDOM = this.elementRef.nativeElement;
|
|
1231
|
-
const inputDOM = this.inputElement.nativeElement;
|
|
1232
|
-
this.renderer.removeStyle(hostDOM, "width");
|
|
1233
|
-
this.renderer.setProperty(mirrorDOM, "textContent", `${inputDOM.value}\xA0`);
|
|
1234
|
-
this.renderer.setStyle(hostDOM, "width", `${mirrorDOM.scrollWidth}px`);
|
|
1235
|
-
}
|
|
1236
|
-
focus() {
|
|
1237
|
-
this.focusMonitor.focusVia(this.inputElement, "keyboard");
|
|
1238
|
-
}
|
|
1239
|
-
blur() {
|
|
1240
|
-
this.inputElement.nativeElement.blur();
|
|
1241
|
-
}
|
|
1242
|
-
ngOnChanges(changes) {
|
|
1243
|
-
const inputDOM = this.inputElement.nativeElement;
|
|
1244
|
-
const { focusTrigger, showInput } = changes;
|
|
1245
|
-
if (showInput) {
|
|
1246
|
-
if (this.showInput) {
|
|
1247
|
-
this.renderer.removeAttribute(inputDOM, "readonly");
|
|
1248
|
-
} else {
|
|
1249
|
-
this.renderer.setAttribute(inputDOM, "readonly", "readonly");
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
if (focusTrigger && focusTrigger.currentValue === true && focusTrigger.previousValue === false) {
|
|
1253
|
-
inputDOM.focus();
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSelectSearchComponent, deps: [], target: FactoryTarget.Component });
|
|
1257
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzSelectSearchComponent, isStandalone: true, selector: "nz-select-search", inputs: { nzId: "nzId", disabled: "disabled", mirrorSync: "mirrorSync", showInput: "showInput", focusTrigger: "focusTrigger", value: "value", autofocus: "autofocus" }, outputs: { valueChange: "valueChange", isComposingChange: "isComposingChange" }, host: { properties: { "style.width.px": "mirrorSync ? 0 : null" }, classAttribute: "ant-select-selection-search" }, providers: [{ provide: COMPOSITION_BUFFER_MODE, useValue: false }], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }, { propertyName: "mirrorElement", first: true, predicate: ["mirrorElement"], descendants: true }], usesOnChanges: true, ngImport: core_exports, template: `
|
|
1258
|
-
<input
|
|
1259
|
-
#inputElement
|
|
1260
|
-
[attr.id]="nzId"
|
|
1261
|
-
autocomplete="off"
|
|
1262
|
-
class="ant-select-selection-search-input"
|
|
1263
|
-
[ngModel]="value"
|
|
1264
|
-
[attr.autofocus]="autofocus ? 'autofocus' : null"
|
|
1265
|
-
[disabled]="disabled"
|
|
1266
|
-
[style.opacity]="showInput ? null : 0"
|
|
1267
|
-
(ngModelChange)="onValueChange($event)"
|
|
1268
|
-
(compositionstart)="setCompositionState(true)"
|
|
1269
|
-
(compositionend)="setCompositionState(false)"
|
|
1270
|
-
/>
|
|
1271
|
-
@if (mirrorSync) {
|
|
1272
|
-
<span #mirrorElement class="ant-select-selection-search-mirror"></span>
|
|
1273
|
-
}
|
|
1274
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
1275
|
-
};
|
|
1276
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSelectSearchComponent, decorators: [{
|
|
1277
|
-
type: Component,
|
|
1278
|
-
args: [{
|
|
1279
|
-
selector: "nz-select-search",
|
|
1280
|
-
encapsulation: ViewEncapsulation.None,
|
|
1281
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1282
|
-
template: `
|
|
1283
|
-
<input
|
|
1284
|
-
#inputElement
|
|
1285
|
-
[attr.id]="nzId"
|
|
1286
|
-
autocomplete="off"
|
|
1287
|
-
class="ant-select-selection-search-input"
|
|
1288
|
-
[ngModel]="value"
|
|
1289
|
-
[attr.autofocus]="autofocus ? 'autofocus' : null"
|
|
1290
|
-
[disabled]="disabled"
|
|
1291
|
-
[style.opacity]="showInput ? null : 0"
|
|
1292
|
-
(ngModelChange)="onValueChange($event)"
|
|
1293
|
-
(compositionstart)="setCompositionState(true)"
|
|
1294
|
-
(compositionend)="setCompositionState(false)"
|
|
1295
|
-
/>
|
|
1296
|
-
@if (mirrorSync) {
|
|
1297
|
-
<span #mirrorElement class="ant-select-selection-search-mirror"></span>
|
|
1298
|
-
}
|
|
1299
|
-
`,
|
|
1300
|
-
host: {
|
|
1301
|
-
class: "ant-select-selection-search",
|
|
1302
|
-
"[style.width.px]": "mirrorSync ? 0 : null"
|
|
1303
|
-
},
|
|
1304
|
-
providers: [{ provide: COMPOSITION_BUFFER_MODE, useValue: false }],
|
|
1305
|
-
imports: [FormsModule]
|
|
1306
|
-
}]
|
|
1307
|
-
}], ctorParameters: () => [], propDecorators: { nzId: [{
|
|
1308
|
-
type: Input
|
|
1309
|
-
}], disabled: [{
|
|
1310
|
-
type: Input
|
|
1311
|
-
}], mirrorSync: [{
|
|
1312
|
-
type: Input
|
|
1313
|
-
}], showInput: [{
|
|
1314
|
-
type: Input
|
|
1315
|
-
}], focusTrigger: [{
|
|
1316
|
-
type: Input
|
|
1317
|
-
}], value: [{
|
|
1318
|
-
type: Input
|
|
1319
|
-
}], autofocus: [{
|
|
1320
|
-
type: Input
|
|
1321
|
-
}], valueChange: [{
|
|
1322
|
-
type: Output
|
|
1323
|
-
}], isComposingChange: [{
|
|
1324
|
-
type: Output
|
|
1325
|
-
}], inputElement: [{
|
|
1326
|
-
type: ViewChild,
|
|
1327
|
-
args: ["inputElement", { static: true }]
|
|
1328
|
-
}], mirrorElement: [{
|
|
1329
|
-
type: ViewChild,
|
|
1330
|
-
args: ["mirrorElement", { static: false }]
|
|
1331
|
-
}] } });
|
|
1332
|
-
var NzSelectTopControlComponent = class _NzSelectTopControlComponent {
|
|
1333
|
-
destroyRef = inject(DestroyRef);
|
|
1334
|
-
elementRef = inject(ElementRef);
|
|
1335
|
-
ngZone = inject(NgZone);
|
|
1336
|
-
noAnimation = inject(NzNoAnimationDirective, { host: true, optional: true });
|
|
1337
|
-
nzId = null;
|
|
1338
|
-
showSearch = false;
|
|
1339
|
-
placeHolder = null;
|
|
1340
|
-
open = false;
|
|
1341
|
-
maxTagCount = Infinity;
|
|
1342
|
-
autofocus = false;
|
|
1343
|
-
disabled = false;
|
|
1344
|
-
mode = "default";
|
|
1345
|
-
customTemplate = null;
|
|
1346
|
-
maxTagPlaceholder = null;
|
|
1347
|
-
removeIcon = null;
|
|
1348
|
-
listOfTopItem = [];
|
|
1349
|
-
tokenSeparators = [];
|
|
1350
|
-
prefix = null;
|
|
1351
|
-
tokenize = new EventEmitter();
|
|
1352
|
-
inputValueChange = new EventEmitter();
|
|
1353
|
-
deleteItem = new EventEmitter();
|
|
1354
|
-
nzSelectSearchComponent;
|
|
1355
|
-
listOfSlicedItem = [];
|
|
1356
|
-
isShowPlaceholder = true;
|
|
1357
|
-
isShowSingleLabel = false;
|
|
1358
|
-
isComposing = false;
|
|
1359
|
-
inputValue = null;
|
|
1360
|
-
updateTemplateVariable() {
|
|
1361
|
-
const isSelectedValueEmpty = this.listOfTopItem.length === 0;
|
|
1362
|
-
this.isShowPlaceholder = isSelectedValueEmpty && !this.isComposing && !this.inputValue;
|
|
1363
|
-
this.isShowSingleLabel = !isSelectedValueEmpty && !this.isComposing && !this.inputValue;
|
|
1364
|
-
}
|
|
1365
|
-
isComposingChange(isComposing) {
|
|
1366
|
-
this.isComposing = isComposing;
|
|
1367
|
-
this.updateTemplateVariable();
|
|
1368
|
-
}
|
|
1369
|
-
onInputValueChange(value) {
|
|
1370
|
-
if (value !== this.inputValue) {
|
|
1371
|
-
this.inputValue = value;
|
|
1372
|
-
this.updateTemplateVariable();
|
|
1373
|
-
this.inputValueChange.emit(value);
|
|
1374
|
-
this.tokenSeparate(value, this.tokenSeparators);
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
tokenSeparate(inputValue, tokenSeparators) {
|
|
1378
|
-
const includesSeparators = (str, separators) => {
|
|
1379
|
-
for (let i = 0; i < separators.length; ++i) {
|
|
1380
|
-
if (str.lastIndexOf(separators[i]) > 0) {
|
|
1381
|
-
return true;
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
return false;
|
|
1385
|
-
};
|
|
1386
|
-
const splitBySeparators = (str, separators) => {
|
|
1387
|
-
const reg = new RegExp(`[${separators.join()}]`);
|
|
1388
|
-
const array = str.split(reg).filter((token) => token);
|
|
1389
|
-
return [...new Set(array)];
|
|
1390
|
-
};
|
|
1391
|
-
if (inputValue && inputValue.length && tokenSeparators.length && this.mode !== "default" && includesSeparators(inputValue, tokenSeparators)) {
|
|
1392
|
-
const listOfLabel = splitBySeparators(inputValue, tokenSeparators);
|
|
1393
|
-
this.tokenize.next(listOfLabel);
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
clearInputValue() {
|
|
1397
|
-
this.nzSelectSearchComponent?.clearInputValue();
|
|
1398
|
-
}
|
|
1399
|
-
focus() {
|
|
1400
|
-
this.nzSelectSearchComponent?.focus();
|
|
1401
|
-
}
|
|
1402
|
-
blur() {
|
|
1403
|
-
this.nzSelectSearchComponent?.blur();
|
|
1404
|
-
}
|
|
1405
|
-
onDeleteItem(item) {
|
|
1406
|
-
if (!this.disabled && !item.nzDisabled) {
|
|
1407
|
-
this.deleteItem.next(item);
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
ngOnChanges(changes) {
|
|
1411
|
-
const { listOfTopItem, maxTagCount, customTemplate, maxTagPlaceholder } = changes;
|
|
1412
|
-
if (listOfTopItem) {
|
|
1413
|
-
this.updateTemplateVariable();
|
|
1414
|
-
}
|
|
1415
|
-
if (listOfTopItem || maxTagCount || customTemplate || maxTagPlaceholder) {
|
|
1416
|
-
const listOfSlicedItem = this.listOfTopItem.slice(0, this.maxTagCount).map((o) => ({
|
|
1417
|
-
nzLabel: o.nzLabel,
|
|
1418
|
-
nzValue: o.nzValue,
|
|
1419
|
-
nzDisabled: o.nzDisabled,
|
|
1420
|
-
contentTemplateOutlet: this.customTemplate,
|
|
1421
|
-
contentTemplateOutletContext: o
|
|
1422
|
-
}));
|
|
1423
|
-
if (this.listOfTopItem.length > this.maxTagCount) {
|
|
1424
|
-
const exceededLabel = `+ ${this.listOfTopItem.length - this.maxTagCount} ...`;
|
|
1425
|
-
const listOfSelectedValue = this.listOfTopItem.map((item) => item.nzValue);
|
|
1426
|
-
const exceededItem = {
|
|
1427
|
-
nzLabel: exceededLabel,
|
|
1428
|
-
nzValue: "$$__nz_exceeded_item",
|
|
1429
|
-
nzDisabled: true,
|
|
1430
|
-
contentTemplateOutlet: this.maxTagPlaceholder,
|
|
1431
|
-
contentTemplateOutletContext: listOfSelectedValue.slice(this.maxTagCount)
|
|
1432
|
-
};
|
|
1433
|
-
listOfSlicedItem.push(exceededItem);
|
|
1434
|
-
}
|
|
1435
|
-
this.listOfSlicedItem = listOfSlicedItem;
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
ngOnInit() {
|
|
1439
|
-
fromEventOutsideAngular(this.elementRef.nativeElement, "click").pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
|
|
1440
|
-
if (event.target !== this.nzSelectSearchComponent.inputElement.nativeElement) {
|
|
1441
|
-
this.nzSelectSearchComponent.focus();
|
|
1442
|
-
}
|
|
1443
|
-
});
|
|
1444
|
-
fromEventOutsideAngular(this.elementRef.nativeElement, "keydown").pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
|
|
1445
|
-
if (event.target instanceof HTMLInputElement) {
|
|
1446
|
-
const inputValue = event.target.value;
|
|
1447
|
-
if (event.keyCode === BACKSPACE && this.mode !== "default" && !inputValue && this.listOfTopItem.length > 0) {
|
|
1448
|
-
event.preventDefault();
|
|
1449
|
-
this.ngZone.run(() => this.onDeleteItem(this.listOfTopItem[this.listOfTopItem.length - 1]));
|
|
1450
|
-
}
|
|
1451
|
-
}
|
|
1452
|
-
});
|
|
1453
|
-
}
|
|
1454
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSelectTopControlComponent, deps: [], target: FactoryTarget.Component });
|
|
1455
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzSelectTopControlComponent, isStandalone: true, selector: "nz-select-top-control", inputs: { nzId: "nzId", showSearch: "showSearch", placeHolder: "placeHolder", open: "open", maxTagCount: ["maxTagCount", "maxTagCount", numberAttribute], autofocus: "autofocus", disabled: "disabled", mode: "mode", customTemplate: "customTemplate", maxTagPlaceholder: "maxTagPlaceholder", removeIcon: "removeIcon", listOfTopItem: "listOfTopItem", tokenSeparators: "tokenSeparators", prefix: "prefix" }, outputs: { tokenize: "tokenize", inputValueChange: "inputValueChange", deleteItem: "deleteItem" }, host: { classAttribute: "ant-select-selector" }, viewQueries: [{ propertyName: "nzSelectSearchComponent", first: true, predicate: NzSelectSearchComponent, descendants: true }], exportAs: ["nzSelectTopControl"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
1456
|
-
@if (prefix) {
|
|
1457
|
-
<div class="ant-select-prefix">
|
|
1458
|
-
<ng-container *nzStringTemplateOutlet="prefix">{{ prefix }}</ng-container>
|
|
1459
|
-
</div>
|
|
1460
|
-
}
|
|
1461
|
-
<span class="ant-select-selection-wrap">
|
|
1462
|
-
<!--single mode-->
|
|
1463
|
-
@switch (mode) {
|
|
1464
|
-
@case ('default') {
|
|
1465
|
-
<nz-select-search
|
|
1466
|
-
[nzId]="nzId"
|
|
1467
|
-
[disabled]="disabled"
|
|
1468
|
-
[value]="inputValue!"
|
|
1469
|
-
[showInput]="showSearch"
|
|
1470
|
-
[mirrorSync]="false"
|
|
1471
|
-
[autofocus]="autofocus"
|
|
1472
|
-
[focusTrigger]="open"
|
|
1473
|
-
(isComposingChange)="isComposingChange($event)"
|
|
1474
|
-
(valueChange)="onInputValueChange($event)"
|
|
1475
|
-
/>
|
|
1476
|
-
@if (isShowSingleLabel) {
|
|
1477
|
-
<nz-select-item
|
|
1478
|
-
[removeIcon]="removeIcon"
|
|
1479
|
-
[label]="listOfTopItem[0].nzLabel"
|
|
1480
|
-
[contentTemplateOutlet]="customTemplate"
|
|
1481
|
-
[contentTemplateOutletContext]="listOfTopItem[0]"
|
|
1482
|
-
/>
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
@default {
|
|
1486
|
-
<div class="ant-select-selection-overflow">
|
|
1487
|
-
<!--multiple or tags mode-->
|
|
1488
|
-
@for (item of listOfSlicedItem; track item.nzValue) {
|
|
1489
|
-
<div class="ant-select-selection-overflow-item">
|
|
1490
|
-
<nz-select-item
|
|
1491
|
-
[removeIcon]="removeIcon"
|
|
1492
|
-
[label]="item.nzLabel"
|
|
1493
|
-
[disabled]="item.nzDisabled || disabled"
|
|
1494
|
-
[contentTemplateOutlet]="item.contentTemplateOutlet"
|
|
1495
|
-
deletable
|
|
1496
|
-
[contentTemplateOutletContext]="item.contentTemplateOutletContext"
|
|
1497
|
-
(delete)="onDeleteItem(item.contentTemplateOutletContext)"
|
|
1498
|
-
/>
|
|
1499
|
-
</div>
|
|
1500
|
-
}
|
|
1501
|
-
<div class="ant-select-selection-overflow-item ant-select-selection-overflow-item-suffix">
|
|
1502
|
-
<nz-select-search
|
|
1503
|
-
[nzId]="nzId"
|
|
1504
|
-
[disabled]="disabled"
|
|
1505
|
-
[value]="inputValue!"
|
|
1506
|
-
[autofocus]="autofocus"
|
|
1507
|
-
[showInput]="true"
|
|
1508
|
-
[mirrorSync]="true"
|
|
1509
|
-
[focusTrigger]="open"
|
|
1510
|
-
(isComposingChange)="isComposingChange($event)"
|
|
1511
|
-
(valueChange)="onInputValueChange($event)"
|
|
1512
|
-
/>
|
|
1513
|
-
</div>
|
|
1514
|
-
</div>
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
@if (isShowPlaceholder) {
|
|
1518
|
-
<nz-select-placeholder [placeholder]="placeHolder" />
|
|
1519
|
-
}
|
|
1520
|
-
</span>
|
|
1521
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NzSelectSearchComponent, selector: "nz-select-search", inputs: ["nzId", "disabled", "mirrorSync", "showInput", "focusTrigger", "value", "autofocus"], outputs: ["valueChange", "isComposingChange"] }, { kind: "component", type: NzSelectItemComponent, selector: "nz-select-item", inputs: ["disabled", "label", "displayLabelInHtml", "deletable", "removeIcon", "contentTemplateOutletContext", "contentTemplateOutlet"], outputs: ["delete"] }, { kind: "component", type: NzSelectPlaceholderComponent, selector: "nz-select-placeholder", inputs: ["placeholder"] }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
1522
|
-
};
|
|
1523
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSelectTopControlComponent, decorators: [{
|
|
1524
|
-
type: Component,
|
|
1525
|
-
args: [{
|
|
1526
|
-
selector: "nz-select-top-control",
|
|
1527
|
-
exportAs: "nzSelectTopControl",
|
|
1528
|
-
imports: [
|
|
1529
|
-
NzSelectSearchComponent,
|
|
1530
|
-
NzSelectItemComponent,
|
|
1531
|
-
NzSelectPlaceholderComponent,
|
|
1532
|
-
NzStringTemplateOutletDirective
|
|
1533
|
-
],
|
|
1534
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1535
|
-
encapsulation: ViewEncapsulation.None,
|
|
1536
|
-
template: `
|
|
1537
|
-
@if (prefix) {
|
|
1538
|
-
<div class="ant-select-prefix">
|
|
1539
|
-
<ng-container *nzStringTemplateOutlet="prefix">{{ prefix }}</ng-container>
|
|
1540
|
-
</div>
|
|
1541
|
-
}
|
|
1542
|
-
<span class="ant-select-selection-wrap">
|
|
1543
|
-
<!--single mode-->
|
|
1544
|
-
@switch (mode) {
|
|
1545
|
-
@case ('default') {
|
|
1546
|
-
<nz-select-search
|
|
1547
|
-
[nzId]="nzId"
|
|
1548
|
-
[disabled]="disabled"
|
|
1549
|
-
[value]="inputValue!"
|
|
1550
|
-
[showInput]="showSearch"
|
|
1551
|
-
[mirrorSync]="false"
|
|
1552
|
-
[autofocus]="autofocus"
|
|
1553
|
-
[focusTrigger]="open"
|
|
1554
|
-
(isComposingChange)="isComposingChange($event)"
|
|
1555
|
-
(valueChange)="onInputValueChange($event)"
|
|
1556
|
-
/>
|
|
1557
|
-
@if (isShowSingleLabel) {
|
|
1558
|
-
<nz-select-item
|
|
1559
|
-
[removeIcon]="removeIcon"
|
|
1560
|
-
[label]="listOfTopItem[0].nzLabel"
|
|
1561
|
-
[contentTemplateOutlet]="customTemplate"
|
|
1562
|
-
[contentTemplateOutletContext]="listOfTopItem[0]"
|
|
1563
|
-
/>
|
|
1564
|
-
}
|
|
1565
|
-
}
|
|
1566
|
-
@default {
|
|
1567
|
-
<div class="ant-select-selection-overflow">
|
|
1568
|
-
<!--multiple or tags mode-->
|
|
1569
|
-
@for (item of listOfSlicedItem; track item.nzValue) {
|
|
1570
|
-
<div class="ant-select-selection-overflow-item">
|
|
1571
|
-
<nz-select-item
|
|
1572
|
-
[removeIcon]="removeIcon"
|
|
1573
|
-
[label]="item.nzLabel"
|
|
1574
|
-
[disabled]="item.nzDisabled || disabled"
|
|
1575
|
-
[contentTemplateOutlet]="item.contentTemplateOutlet"
|
|
1576
|
-
deletable
|
|
1577
|
-
[contentTemplateOutletContext]="item.contentTemplateOutletContext"
|
|
1578
|
-
(delete)="onDeleteItem(item.contentTemplateOutletContext)"
|
|
1579
|
-
/>
|
|
1580
|
-
</div>
|
|
1581
|
-
}
|
|
1582
|
-
<div class="ant-select-selection-overflow-item ant-select-selection-overflow-item-suffix">
|
|
1583
|
-
<nz-select-search
|
|
1584
|
-
[nzId]="nzId"
|
|
1585
|
-
[disabled]="disabled"
|
|
1586
|
-
[value]="inputValue!"
|
|
1587
|
-
[autofocus]="autofocus"
|
|
1588
|
-
[showInput]="true"
|
|
1589
|
-
[mirrorSync]="true"
|
|
1590
|
-
[focusTrigger]="open"
|
|
1591
|
-
(isComposingChange)="isComposingChange($event)"
|
|
1592
|
-
(valueChange)="onInputValueChange($event)"
|
|
1593
|
-
/>
|
|
1594
|
-
</div>
|
|
1595
|
-
</div>
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
@if (isShowPlaceholder) {
|
|
1599
|
-
<nz-select-placeholder [placeholder]="placeHolder" />
|
|
1600
|
-
}
|
|
1601
|
-
</span>
|
|
1602
|
-
`,
|
|
1603
|
-
host: {
|
|
1604
|
-
class: "ant-select-selector"
|
|
1605
|
-
}
|
|
1606
|
-
}]
|
|
1607
|
-
}], propDecorators: { nzId: [{
|
|
1608
|
-
type: Input
|
|
1609
|
-
}], showSearch: [{
|
|
1610
|
-
type: Input
|
|
1611
|
-
}], placeHolder: [{
|
|
1612
|
-
type: Input
|
|
1613
|
-
}], open: [{
|
|
1614
|
-
type: Input
|
|
1615
|
-
}], maxTagCount: [{
|
|
1616
|
-
type: Input,
|
|
1617
|
-
args: [{ transform: numberAttribute }]
|
|
1618
|
-
}], autofocus: [{
|
|
1619
|
-
type: Input
|
|
1620
|
-
}], disabled: [{
|
|
1621
|
-
type: Input
|
|
1622
|
-
}], mode: [{
|
|
1623
|
-
type: Input
|
|
1624
|
-
}], customTemplate: [{
|
|
1625
|
-
type: Input
|
|
1626
|
-
}], maxTagPlaceholder: [{
|
|
1627
|
-
type: Input
|
|
1628
|
-
}], removeIcon: [{
|
|
1629
|
-
type: Input
|
|
1630
|
-
}], listOfTopItem: [{
|
|
1631
|
-
type: Input
|
|
1632
|
-
}], tokenSeparators: [{
|
|
1633
|
-
type: Input
|
|
1634
|
-
}], prefix: [{
|
|
1635
|
-
type: Input
|
|
1636
|
-
}], tokenize: [{
|
|
1637
|
-
type: Output
|
|
1638
|
-
}], inputValueChange: [{
|
|
1639
|
-
type: Output
|
|
1640
|
-
}], deleteItem: [{
|
|
1641
|
-
type: Output
|
|
1642
|
-
}], nzSelectSearchComponent: [{
|
|
1643
|
-
type: ViewChild,
|
|
1644
|
-
args: [NzSelectSearchComponent]
|
|
1645
|
-
}] } });
|
|
1646
|
-
var defaultFilterOption = (searchValue, item) => {
|
|
1647
|
-
if (item && item.nzLabel) {
|
|
1648
|
-
return item.nzLabel.toString().toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
|
1649
|
-
} else {
|
|
1650
|
-
return false;
|
|
1651
|
-
}
|
|
1652
|
-
};
|
|
1653
|
-
var NZ_CONFIG_MODULE_NAME = "select";
|
|
1654
|
-
var NzSelectComponent = (() => {
|
|
1655
|
-
var _a;
|
|
1656
|
-
let _nzVariant_decorators;
|
|
1657
|
-
let _nzVariant_initializers = [];
|
|
1658
|
-
let _nzVariant_extraInitializers = [];
|
|
1659
|
-
let _nzOptionHeightPx_decorators;
|
|
1660
|
-
let _nzOptionHeightPx_initializers = [];
|
|
1661
|
-
let _nzOptionHeightPx_extraInitializers = [];
|
|
1662
|
-
let _nzSuffixIcon_decorators;
|
|
1663
|
-
let _nzSuffixIcon_initializers = [];
|
|
1664
|
-
let _nzSuffixIcon_extraInitializers = [];
|
|
1665
|
-
let _nzBorderless_decorators;
|
|
1666
|
-
let _nzBorderless_initializers = [];
|
|
1667
|
-
let _nzBorderless_extraInitializers = [];
|
|
1668
|
-
let _nzBackdrop_decorators;
|
|
1669
|
-
let _nzBackdrop_initializers = [];
|
|
1670
|
-
let _nzBackdrop_extraInitializers = [];
|
|
1671
|
-
return _a = class {
|
|
1672
|
-
_nzModuleName = NZ_CONFIG_MODULE_NAME;
|
|
1673
|
-
ngZone = inject(NgZone);
|
|
1674
|
-
cdr = inject(ChangeDetectorRef);
|
|
1675
|
-
host = inject(ElementRef);
|
|
1676
|
-
renderer = inject(Renderer2);
|
|
1677
|
-
platform = inject(Platform);
|
|
1678
|
-
focusMonitor = inject(FocusMonitor);
|
|
1679
|
-
directionality = inject(Directionality);
|
|
1680
|
-
destroyRef = inject(DestroyRef);
|
|
1681
|
-
nzId = null;
|
|
1682
|
-
nzSize = "default";
|
|
1683
|
-
nzStatus = "";
|
|
1684
|
-
nzVariant = __runInitializers(this, _nzVariant_initializers, "outlined");
|
|
1685
|
-
nzOptionHeightPx = (__runInitializers(this, _nzVariant_extraInitializers), __runInitializers(this, _nzOptionHeightPx_initializers, 32));
|
|
1686
|
-
nzOptionOverflowSize = (__runInitializers(this, _nzOptionHeightPx_extraInitializers), 8);
|
|
1687
|
-
nzDropdownClassName = null;
|
|
1688
|
-
nzDropdownMatchSelectWidth = true;
|
|
1689
|
-
nzDropdownStyle = null;
|
|
1690
|
-
nzNotFoundContent = void 0;
|
|
1691
|
-
nzPlaceHolder = null;
|
|
1692
|
-
nzPlacement = null;
|
|
1693
|
-
nzMaxTagCount = Infinity;
|
|
1694
|
-
nzDropdownRender = null;
|
|
1695
|
-
nzCustomTemplate = null;
|
|
1696
|
-
nzPrefix = null;
|
|
1697
|
-
nzSuffixIcon = __runInitializers(this, _nzSuffixIcon_initializers, null);
|
|
1698
|
-
nzClearIcon = (__runInitializers(this, _nzSuffixIcon_extraInitializers), null);
|
|
1699
|
-
nzRemoveIcon = null;
|
|
1700
|
-
nzMenuItemSelectedIcon = null;
|
|
1701
|
-
nzTokenSeparators = [];
|
|
1702
|
-
nzMaxTagPlaceholder = null;
|
|
1703
|
-
nzMaxMultipleCount = Infinity;
|
|
1704
|
-
nzMode = "default";
|
|
1705
|
-
nzFilterOption = defaultFilterOption;
|
|
1706
|
-
compareWith = (o1, o2) => o1 === o2;
|
|
1707
|
-
nzAllowClear = false;
|
|
1708
|
-
/**
|
|
1709
|
-
* @deprecated Will be removed in v21. It is recommended to use `nzVariant` instead.
|
|
1710
|
-
*/
|
|
1711
|
-
nzBorderless = __runInitializers(this, _nzBorderless_initializers, false);
|
|
1712
|
-
nzShowSearch = (__runInitializers(this, _nzBorderless_extraInitializers), false);
|
|
1713
|
-
nzLoading = false;
|
|
1714
|
-
nzAutoFocus = false;
|
|
1715
|
-
nzAutoClearSearchValue = true;
|
|
1716
|
-
nzServerSearch = false;
|
|
1717
|
-
nzDisabled = false;
|
|
1718
|
-
nzOpen = false;
|
|
1719
|
-
nzSelectOnTab = false;
|
|
1720
|
-
nzBackdrop = __runInitializers(this, _nzBackdrop_initializers, false);
|
|
1721
|
-
nzOptions = (__runInitializers(this, _nzBackdrop_extraInitializers), []);
|
|
1722
|
-
nzShowArrow = true;
|
|
1723
|
-
get showArrow() {
|
|
1724
|
-
return this.nzShowArrow || !!this.nzSuffixIcon;
|
|
1725
|
-
}
|
|
1726
|
-
get isMultiple() {
|
|
1727
|
-
return this.nzMode === "multiple" || this.nzMode === "tags";
|
|
1728
|
-
}
|
|
1729
|
-
get isMaxMultipleCountSet() {
|
|
1730
|
-
return this.isMultiple && this.nzMaxMultipleCount !== Infinity;
|
|
1731
|
-
}
|
|
1732
|
-
get isMaxMultipleCountReached() {
|
|
1733
|
-
return this.nzMaxMultipleCount !== Infinity && this.listOfValue.length === this.nzMaxMultipleCount;
|
|
1734
|
-
}
|
|
1735
|
-
nzOnSearch = new EventEmitter();
|
|
1736
|
-
nzScrollToBottom = new EventEmitter();
|
|
1737
|
-
nzOpenChange = new EventEmitter();
|
|
1738
|
-
nzBlur = new EventEmitter();
|
|
1739
|
-
nzFocus = new EventEmitter();
|
|
1740
|
-
nzOnClear = output();
|
|
1741
|
-
originElement;
|
|
1742
|
-
cdkConnectedOverlay;
|
|
1743
|
-
nzSelectTopControlComponent;
|
|
1744
|
-
listOfNzOptionComponent;
|
|
1745
|
-
listOfNzOptionGroupComponent;
|
|
1746
|
-
nzOptionGroupComponentElement;
|
|
1747
|
-
nzSelectTopControlComponentElement;
|
|
1748
|
-
finalSize = computed(() => {
|
|
1749
|
-
if (this.compactSize) {
|
|
1750
|
-
return this.compactSize();
|
|
1751
|
-
}
|
|
1752
|
-
return this.size();
|
|
1753
|
-
}, ...ngDevMode ? [{ debugName: "finalSize" }] : []);
|
|
1754
|
-
size = signal(this.nzSize, ...ngDevMode ? [{ debugName: "size" }] : []);
|
|
1755
|
-
compactSize = inject(NZ_SPACE_COMPACT_SIZE, { optional: true });
|
|
1756
|
-
listOfValue$ = new BehaviorSubject([]);
|
|
1757
|
-
listOfTemplateItem$ = new BehaviorSubject([]);
|
|
1758
|
-
listOfTagAndTemplateItem = [];
|
|
1759
|
-
searchValue = "";
|
|
1760
|
-
isReactiveDriven = false;
|
|
1761
|
-
value;
|
|
1762
|
-
requestId = -1;
|
|
1763
|
-
isNzDisableFirstChange = true;
|
|
1764
|
-
onChange = () => {
|
|
1765
|
-
};
|
|
1766
|
-
onTouched = () => {
|
|
1767
|
-
};
|
|
1768
|
-
dropdownPosition = "bottomLeft";
|
|
1769
|
-
triggerWidth = null;
|
|
1770
|
-
listOfContainerItem = [];
|
|
1771
|
-
listOfTopItem = [];
|
|
1772
|
-
activatedValue = null;
|
|
1773
|
-
listOfValue = [];
|
|
1774
|
-
focused = false;
|
|
1775
|
-
dir = "ltr";
|
|
1776
|
-
positions = [];
|
|
1777
|
-
// status
|
|
1778
|
-
prefixCls = "ant-select";
|
|
1779
|
-
statusCls = {};
|
|
1780
|
-
status = "";
|
|
1781
|
-
hasFeedback = false;
|
|
1782
|
-
generateTagItem(value) {
|
|
1783
|
-
return {
|
|
1784
|
-
nzValue: value,
|
|
1785
|
-
nzLabel: value,
|
|
1786
|
-
type: "item"
|
|
1787
|
-
};
|
|
1788
|
-
}
|
|
1789
|
-
onItemClick(value) {
|
|
1790
|
-
this.activatedValue = value;
|
|
1791
|
-
if (this.nzMode === "default") {
|
|
1792
|
-
if (this.listOfValue.length === 0 || !this.compareWith(this.listOfValue[0], value)) {
|
|
1793
|
-
this.updateListOfValue([value]);
|
|
1794
|
-
}
|
|
1795
|
-
this.setOpenState(false);
|
|
1796
|
-
} else {
|
|
1797
|
-
const targetIndex = this.listOfValue.findIndex((o) => this.compareWith(o, value));
|
|
1798
|
-
if (targetIndex !== -1) {
|
|
1799
|
-
const listOfValueAfterRemoved = this.listOfValue.filter((_, i) => i !== targetIndex);
|
|
1800
|
-
this.updateListOfValue(listOfValueAfterRemoved);
|
|
1801
|
-
} else if (this.listOfValue.length < this.nzMaxMultipleCount) {
|
|
1802
|
-
const listOfValueAfterAdded = [...this.listOfValue, value];
|
|
1803
|
-
this.updateListOfValue(listOfValueAfterAdded);
|
|
1804
|
-
}
|
|
1805
|
-
this.focus();
|
|
1806
|
-
if (this.nzAutoClearSearchValue) {
|
|
1807
|
-
this.clearInput();
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
onItemDelete(item) {
|
|
1812
|
-
const listOfSelectedValue = this.listOfValue.filter((v) => !this.compareWith(v, item.nzValue));
|
|
1813
|
-
this.updateListOfValue(listOfSelectedValue);
|
|
1814
|
-
this.clearInput();
|
|
1815
|
-
}
|
|
1816
|
-
updateListOfContainerItem() {
|
|
1817
|
-
let listOfContainerItem = this.listOfTagAndTemplateItem.filter((item) => !item.nzHide).filter((item) => {
|
|
1818
|
-
if (!this.nzServerSearch && this.searchValue) {
|
|
1819
|
-
return this.nzFilterOption(this.searchValue, item);
|
|
1820
|
-
} else {
|
|
1821
|
-
return true;
|
|
1822
|
-
}
|
|
1823
|
-
});
|
|
1824
|
-
if (this.nzMode === "tags" && this.searchValue) {
|
|
1825
|
-
const matchedItem = this.listOfTagAndTemplateItem.find((item) => item.nzLabel === this.searchValue);
|
|
1826
|
-
if (!matchedItem) {
|
|
1827
|
-
const tagItem = this.generateTagItem(this.searchValue);
|
|
1828
|
-
listOfContainerItem = [tagItem, ...listOfContainerItem];
|
|
1829
|
-
this.activatedValue = tagItem.nzValue;
|
|
1830
|
-
} else {
|
|
1831
|
-
this.activatedValue = matchedItem.nzValue;
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
const activatedItem = listOfContainerItem.find((item) => item.nzLabel === this.searchValue) || listOfContainerItem.find((item) => this.compareWith(item.nzValue, this.activatedValue)) || listOfContainerItem.find((item) => this.compareWith(item.nzValue, this.listOfValue[0])) || listOfContainerItem[0];
|
|
1835
|
-
this.activatedValue = activatedItem && activatedItem.nzValue || null;
|
|
1836
|
-
let listOfGroupLabel = [];
|
|
1837
|
-
if (this.isReactiveDriven) {
|
|
1838
|
-
listOfGroupLabel = [...new Set(this.nzOptions.filter((o) => o.groupLabel).map((o) => o.groupLabel))];
|
|
1839
|
-
} else {
|
|
1840
|
-
if (this.listOfNzOptionGroupComponent) {
|
|
1841
|
-
listOfGroupLabel = this.listOfNzOptionGroupComponent.map((o) => o.nzLabel);
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
listOfGroupLabel.forEach((label) => {
|
|
1845
|
-
const index = listOfContainerItem.findIndex((item) => label === item.groupLabel);
|
|
1846
|
-
if (index > -1) {
|
|
1847
|
-
const groupItem = { groupLabel: label, type: "group", key: label };
|
|
1848
|
-
listOfContainerItem.splice(index, 0, groupItem);
|
|
1849
|
-
}
|
|
1850
|
-
});
|
|
1851
|
-
this.listOfContainerItem = [...listOfContainerItem];
|
|
1852
|
-
this.updateCdkConnectedOverlayPositions();
|
|
1853
|
-
}
|
|
1854
|
-
clearInput() {
|
|
1855
|
-
this.nzSelectTopControlComponent.clearInputValue();
|
|
1856
|
-
}
|
|
1857
|
-
updateListOfValue(listOfValue) {
|
|
1858
|
-
const covertListToModel = (list, mode) => {
|
|
1859
|
-
if (mode === "default") {
|
|
1860
|
-
if (list.length > 0) {
|
|
1861
|
-
return list[0];
|
|
1862
|
-
} else {
|
|
1863
|
-
return null;
|
|
1864
|
-
}
|
|
1865
|
-
} else {
|
|
1866
|
-
return list;
|
|
1867
|
-
}
|
|
1868
|
-
};
|
|
1869
|
-
const model = covertListToModel(listOfValue, this.nzMode);
|
|
1870
|
-
if (this.value !== model) {
|
|
1871
|
-
this.listOfValue = listOfValue;
|
|
1872
|
-
this.listOfValue$.next(listOfValue);
|
|
1873
|
-
this.value = model;
|
|
1874
|
-
this.onChange(this.value);
|
|
1875
|
-
}
|
|
1876
|
-
}
|
|
1877
|
-
onTokenSeparate(listOfLabel) {
|
|
1878
|
-
const listOfMatchedValue = this.listOfTagAndTemplateItem.filter((item) => listOfLabel.findIndex((label) => label === item.nzLabel) !== -1).map((item) => item.nzValue).filter((item) => this.listOfValue.findIndex((v) => this.compareWith(v, item)) === -1);
|
|
1879
|
-
const limitWithinMaxCount = (value) => this.isMaxMultipleCountSet ? value.slice(0, this.nzMaxMultipleCount) : value;
|
|
1880
|
-
if (this.nzMode === "multiple") {
|
|
1881
|
-
const updateValue = limitWithinMaxCount([...this.listOfValue, ...listOfMatchedValue]);
|
|
1882
|
-
this.updateListOfValue(updateValue);
|
|
1883
|
-
} else if (this.nzMode === "tags") {
|
|
1884
|
-
const listOfUnMatchedLabel = listOfLabel.filter((label) => this.listOfTagAndTemplateItem.findIndex((item) => item.nzLabel === label) === -1);
|
|
1885
|
-
const updateValue = limitWithinMaxCount([...this.listOfValue, ...listOfMatchedValue, ...listOfUnMatchedLabel]);
|
|
1886
|
-
this.updateListOfValue(updateValue);
|
|
1887
|
-
}
|
|
1888
|
-
this.clearInput();
|
|
1889
|
-
}
|
|
1890
|
-
onKeyDown(e) {
|
|
1891
|
-
if (this.nzDisabled) {
|
|
1892
|
-
return;
|
|
1893
|
-
}
|
|
1894
|
-
const listOfFilteredOptionNotDisabled = this.listOfContainerItem.filter((item) => item.type === "item").filter((item) => !item.nzDisabled);
|
|
1895
|
-
const activatedIndex = listOfFilteredOptionNotDisabled.findIndex((item) => this.compareWith(item.nzValue, this.activatedValue));
|
|
1896
|
-
switch (e.keyCode) {
|
|
1897
|
-
case UP_ARROW:
|
|
1898
|
-
e.preventDefault();
|
|
1899
|
-
if (this.nzOpen && listOfFilteredOptionNotDisabled.length > 0) {
|
|
1900
|
-
const preIndex = activatedIndex > 0 ? activatedIndex - 1 : listOfFilteredOptionNotDisabled.length - 1;
|
|
1901
|
-
this.activatedValue = listOfFilteredOptionNotDisabled[preIndex].nzValue;
|
|
1902
|
-
}
|
|
1903
|
-
break;
|
|
1904
|
-
case DOWN_ARROW:
|
|
1905
|
-
e.preventDefault();
|
|
1906
|
-
if (this.nzOpen && listOfFilteredOptionNotDisabled.length > 0) {
|
|
1907
|
-
const nextIndex = activatedIndex < listOfFilteredOptionNotDisabled.length - 1 ? activatedIndex + 1 : 0;
|
|
1908
|
-
this.activatedValue = listOfFilteredOptionNotDisabled[nextIndex].nzValue;
|
|
1909
|
-
} else {
|
|
1910
|
-
this.setOpenState(true);
|
|
1911
|
-
}
|
|
1912
|
-
break;
|
|
1913
|
-
case ENTER:
|
|
1914
|
-
e.preventDefault();
|
|
1915
|
-
if (this.nzOpen) {
|
|
1916
|
-
if (isNotNil(this.activatedValue) && activatedIndex !== -1) {
|
|
1917
|
-
this.onItemClick(this.activatedValue);
|
|
1918
|
-
}
|
|
1919
|
-
} else {
|
|
1920
|
-
this.setOpenState(true);
|
|
1921
|
-
}
|
|
1922
|
-
break;
|
|
1923
|
-
case SPACE:
|
|
1924
|
-
if (!this.nzOpen) {
|
|
1925
|
-
this.setOpenState(true);
|
|
1926
|
-
e.preventDefault();
|
|
1927
|
-
}
|
|
1928
|
-
break;
|
|
1929
|
-
case TAB:
|
|
1930
|
-
if (this.nzSelectOnTab) {
|
|
1931
|
-
if (this.nzOpen) {
|
|
1932
|
-
e.preventDefault();
|
|
1933
|
-
if (isNotNil(this.activatedValue)) {
|
|
1934
|
-
this.onItemClick(this.activatedValue);
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
} else {
|
|
1938
|
-
this.setOpenState(false);
|
|
1939
|
-
}
|
|
1940
|
-
break;
|
|
1941
|
-
case ESCAPE:
|
|
1942
|
-
break;
|
|
1943
|
-
default:
|
|
1944
|
-
if (!this.nzOpen) {
|
|
1945
|
-
this.setOpenState(true);
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
setOpenState(value) {
|
|
1950
|
-
if (this.nzOpen !== value) {
|
|
1951
|
-
this.nzOpen = value;
|
|
1952
|
-
this.nzOpenChange.emit(value);
|
|
1953
|
-
this.onOpenChange();
|
|
1954
|
-
this.cdr.markForCheck();
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
onOpenChange() {
|
|
1958
|
-
this.updateCdkConnectedOverlayStatus();
|
|
1959
|
-
if (this.nzAutoClearSearchValue) {
|
|
1960
|
-
this.clearInput();
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
onInputValueChange(value) {
|
|
1964
|
-
this.searchValue = value;
|
|
1965
|
-
this.updateListOfContainerItem();
|
|
1966
|
-
this.nzOnSearch.emit(value);
|
|
1967
|
-
this.updateCdkConnectedOverlayPositions();
|
|
1968
|
-
}
|
|
1969
|
-
onClearSelection() {
|
|
1970
|
-
this.updateListOfValue([]);
|
|
1971
|
-
this.nzOnClear.emit();
|
|
1972
|
-
}
|
|
1973
|
-
onClickOutside(event) {
|
|
1974
|
-
const target = _getEventTarget(event);
|
|
1975
|
-
if (!this.host.nativeElement.contains(target)) {
|
|
1976
|
-
this.setOpenState(false);
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
focus() {
|
|
1980
|
-
this.nzSelectTopControlComponent.focus();
|
|
1981
|
-
}
|
|
1982
|
-
blur() {
|
|
1983
|
-
this.nzSelectTopControlComponent.blur();
|
|
1984
|
-
}
|
|
1985
|
-
onPositionChange(position) {
|
|
1986
|
-
const placement = getPlacementName(position);
|
|
1987
|
-
this.dropdownPosition = placement;
|
|
1988
|
-
}
|
|
1989
|
-
updateCdkConnectedOverlayStatus() {
|
|
1990
|
-
if (this.platform.isBrowser && this.originElement.nativeElement) {
|
|
1991
|
-
const triggerWidth = this.triggerWidth;
|
|
1992
|
-
cancelAnimationFrame(this.requestId);
|
|
1993
|
-
this.requestId = requestAnimationFrame(() => {
|
|
1994
|
-
this.triggerWidth = this.originElement.nativeElement.getBoundingClientRect().width;
|
|
1995
|
-
if (triggerWidth !== this.triggerWidth) {
|
|
1996
|
-
this.cdr.detectChanges();
|
|
1997
|
-
}
|
|
1998
|
-
});
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
updateCdkConnectedOverlayPositions() {
|
|
2002
|
-
requestAnimationFrame(() => {
|
|
2003
|
-
this.cdkConnectedOverlay?.overlayRef?.updatePosition();
|
|
2004
|
-
});
|
|
2005
|
-
}
|
|
2006
|
-
noAnimation = inject(NzNoAnimationDirective, { host: true, optional: true });
|
|
2007
|
-
nzFormStatusService = inject(NzFormStatusService, { optional: true });
|
|
2008
|
-
nzFormNoStatusService = inject(NzFormNoStatusService, { optional: true });
|
|
2009
|
-
constructor() {
|
|
2010
|
-
this.destroyRef.onDestroy(() => {
|
|
2011
|
-
cancelAnimationFrame(this.requestId);
|
|
2012
|
-
this.focusMonitor.stopMonitoring(this.host);
|
|
2013
|
-
});
|
|
2014
|
-
onConfigChangeEventForComponent(NZ_CONFIG_MODULE_NAME, () => {
|
|
2015
|
-
this.size.set(this.nzSize);
|
|
2016
|
-
this.cdr.markForCheck();
|
|
2017
|
-
});
|
|
2018
|
-
}
|
|
2019
|
-
writeValue(modelValue) {
|
|
2020
|
-
if (this.value !== modelValue) {
|
|
2021
|
-
this.value = modelValue;
|
|
2022
|
-
const covertModelToList = (model, mode) => {
|
|
2023
|
-
if (model === null || model === void 0) {
|
|
2024
|
-
return [];
|
|
2025
|
-
} else if (mode === "default") {
|
|
2026
|
-
return [model];
|
|
2027
|
-
} else {
|
|
2028
|
-
return model;
|
|
2029
|
-
}
|
|
2030
|
-
};
|
|
2031
|
-
const listOfValue = covertModelToList(modelValue, this.nzMode);
|
|
2032
|
-
this.listOfValue = listOfValue;
|
|
2033
|
-
this.listOfValue$.next(listOfValue);
|
|
2034
|
-
this.cdr.markForCheck();
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
registerOnChange(fn) {
|
|
2038
|
-
this.onChange = fn;
|
|
2039
|
-
}
|
|
2040
|
-
registerOnTouched(fn) {
|
|
2041
|
-
this.onTouched = fn;
|
|
2042
|
-
}
|
|
2043
|
-
setDisabledState(disabled) {
|
|
2044
|
-
this.nzDisabled = this.isNzDisableFirstChange && this.nzDisabled || disabled;
|
|
2045
|
-
this.isNzDisableFirstChange = false;
|
|
2046
|
-
if (this.nzDisabled) {
|
|
2047
|
-
this.setOpenState(false);
|
|
2048
|
-
}
|
|
2049
|
-
this.cdr.markForCheck();
|
|
2050
|
-
}
|
|
2051
|
-
ngOnChanges({ nzOpen, nzDisabled, nzOptions, nzStatus, nzPlacement, nzSize }) {
|
|
2052
|
-
if (nzOpen) {
|
|
2053
|
-
this.onOpenChange();
|
|
2054
|
-
}
|
|
2055
|
-
if (nzDisabled && this.nzDisabled) {
|
|
2056
|
-
this.setOpenState(false);
|
|
2057
|
-
}
|
|
2058
|
-
if (nzOptions) {
|
|
2059
|
-
this.isReactiveDriven = true;
|
|
2060
|
-
const listOfOptions = this.nzOptions || [];
|
|
2061
|
-
const listOfTransformedItem = listOfOptions.map((item) => {
|
|
2062
|
-
return {
|
|
2063
|
-
template: item.label instanceof TemplateRef ? item.label : null,
|
|
2064
|
-
nzTitle: this.getTitle(item.title, item.label),
|
|
2065
|
-
nzLabel: typeof item.label === "string" || typeof item.label === "number" ? item.label : null,
|
|
2066
|
-
nzValue: item.value,
|
|
2067
|
-
nzDisabled: item.disabled || false,
|
|
2068
|
-
nzHide: item.hide || false,
|
|
2069
|
-
nzCustomContent: item.label instanceof TemplateRef,
|
|
2070
|
-
groupLabel: item.groupLabel || null,
|
|
2071
|
-
type: "item",
|
|
2072
|
-
key: item.key === void 0 ? item.value : item.key
|
|
2073
|
-
};
|
|
2074
|
-
});
|
|
2075
|
-
this.listOfTemplateItem$.next(listOfTransformedItem);
|
|
2076
|
-
}
|
|
2077
|
-
if (nzStatus) {
|
|
2078
|
-
this.setStatusStyles(this.nzStatus, this.hasFeedback);
|
|
2079
|
-
}
|
|
2080
|
-
if (nzPlacement) {
|
|
2081
|
-
const { currentValue } = nzPlacement;
|
|
2082
|
-
this.dropdownPosition = currentValue;
|
|
2083
|
-
const listOfPlacement = ["bottomLeft", "topLeft", "bottomRight", "topRight"];
|
|
2084
|
-
if (currentValue && listOfPlacement.includes(currentValue)) {
|
|
2085
|
-
this.positions = [POSITION_MAP[currentValue]];
|
|
2086
|
-
} else {
|
|
2087
|
-
this.positions = listOfPlacement.map((e) => POSITION_MAP[e]);
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2090
|
-
if (nzSize) {
|
|
2091
|
-
this.size.set(nzSize.currentValue);
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
ngOnInit() {
|
|
2095
|
-
this.nzFormStatusService?.formStatusChanges.pipe(distinctUntilChanged((pre, cur) => {
|
|
2096
|
-
return pre.status === cur.status && pre.hasFeedback === cur.hasFeedback;
|
|
2097
|
-
}), withLatestFrom(this.nzFormNoStatusService ? this.nzFormNoStatusService.noFormStatus : of(false)), map(([{ status, hasFeedback }, noStatus]) => ({ status: noStatus ? "" : status, hasFeedback })), takeUntilDestroyed(this.destroyRef)).subscribe(({ status, hasFeedback }) => {
|
|
2098
|
-
this.setStatusStyles(status, hasFeedback);
|
|
2099
|
-
});
|
|
2100
|
-
this.focusMonitor.monitor(this.host, true).pipe(takeUntilDestroyed(this.destroyRef)).subscribe((focusOrigin) => {
|
|
2101
|
-
if (!focusOrigin) {
|
|
2102
|
-
this.focused = false;
|
|
2103
|
-
this.cdr.markForCheck();
|
|
2104
|
-
this.nzBlur.emit();
|
|
2105
|
-
Promise.resolve().then(() => {
|
|
2106
|
-
this.onTouched();
|
|
2107
|
-
});
|
|
2108
|
-
} else {
|
|
2109
|
-
this.focused = true;
|
|
2110
|
-
this.cdr.markForCheck();
|
|
2111
|
-
this.nzFocus.emit();
|
|
2112
|
-
}
|
|
2113
|
-
});
|
|
2114
|
-
combineLatest([this.listOfValue$, this.listOfTemplateItem$]).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(([listOfSelectedValue, listOfTemplateItem]) => {
|
|
2115
|
-
const listOfTagItem = listOfSelectedValue.filter(() => this.nzMode === "tags").filter((value) => listOfTemplateItem.findIndex((o) => this.compareWith(o.nzValue, value)) === -1).map((value) => this.listOfTopItem.find((o) => this.compareWith(o.nzValue, value)) || this.generateTagItem(value));
|
|
2116
|
-
this.listOfTagAndTemplateItem = [...listOfTemplateItem, ...listOfTagItem];
|
|
2117
|
-
this.listOfTopItem = this.listOfValue.map((v) => [...this.listOfTagAndTemplateItem, ...this.listOfTopItem].find((item) => this.compareWith(v, item.nzValue))).filter((item) => !!item);
|
|
2118
|
-
this.updateListOfContainerItem();
|
|
2119
|
-
});
|
|
2120
|
-
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
|
|
2121
|
-
this.dir = direction;
|
|
2122
|
-
this.cdr.detectChanges();
|
|
2123
|
-
});
|
|
2124
|
-
this.dir = this.directionality.value;
|
|
2125
|
-
fromEventOutsideAngular(this.host.nativeElement, "click").pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
2126
|
-
if (this.nzOpen && this.nzShowSearch || this.nzDisabled) {
|
|
2127
|
-
return;
|
|
2128
|
-
}
|
|
2129
|
-
this.ngZone.run(() => this.setOpenState(!this.nzOpen));
|
|
2130
|
-
});
|
|
2131
|
-
this.cdkConnectedOverlay.overlayKeydown.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
|
|
2132
|
-
if (event.keyCode === ESCAPE) {
|
|
2133
|
-
this.setOpenState(false);
|
|
2134
|
-
}
|
|
2135
|
-
});
|
|
2136
|
-
}
|
|
2137
|
-
ngAfterContentInit() {
|
|
2138
|
-
if (!this.isReactiveDriven) {
|
|
2139
|
-
merge(this.listOfNzOptionGroupComponent.changes, this.listOfNzOptionComponent.changes).pipe(startWith(true), switchMap(() => merge(...[
|
|
2140
|
-
this.listOfNzOptionComponent.changes,
|
|
2141
|
-
this.listOfNzOptionGroupComponent.changes,
|
|
2142
|
-
...this.listOfNzOptionComponent.map((option) => option.changes),
|
|
2143
|
-
...this.listOfNzOptionGroupComponent.map((option) => option.changes)
|
|
2144
|
-
]).pipe(startWith(true))), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
2145
|
-
const listOfOptionInterface = this.listOfNzOptionComponent.toArray().map((item) => {
|
|
2146
|
-
const { template, nzLabel, nzValue, nzKey, nzDisabled, nzHide, nzCustomContent, groupLabel } = item;
|
|
2147
|
-
return {
|
|
2148
|
-
template,
|
|
2149
|
-
nzLabel,
|
|
2150
|
-
nzValue,
|
|
2151
|
-
nzDisabled,
|
|
2152
|
-
nzHide,
|
|
2153
|
-
nzCustomContent,
|
|
2154
|
-
groupLabel,
|
|
2155
|
-
nzTitle: this.getTitle(item.nzTitle, item.nzLabel),
|
|
2156
|
-
type: "item",
|
|
2157
|
-
key: nzKey === void 0 ? nzValue : nzKey
|
|
2158
|
-
};
|
|
2159
|
-
});
|
|
2160
|
-
this.listOfTemplateItem$.next(listOfOptionInterface);
|
|
2161
|
-
this.cdr.markForCheck();
|
|
2162
|
-
});
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
setStatusStyles(status, hasFeedback) {
|
|
2166
|
-
this.status = status;
|
|
2167
|
-
this.hasFeedback = hasFeedback;
|
|
2168
|
-
this.cdr.markForCheck();
|
|
2169
|
-
this.statusCls = getStatusClassNames(this.prefixCls, status, hasFeedback);
|
|
2170
|
-
Object.keys(this.statusCls).forEach((status2) => {
|
|
2171
|
-
if (this.statusCls[status2]) {
|
|
2172
|
-
this.renderer.addClass(this.host.nativeElement, status2);
|
|
2173
|
-
} else {
|
|
2174
|
-
this.renderer.removeClass(this.host.nativeElement, status2);
|
|
2175
|
-
}
|
|
2176
|
-
});
|
|
2177
|
-
}
|
|
2178
|
-
getTitle(title, label) {
|
|
2179
|
-
let rawTitle = void 0;
|
|
2180
|
-
if (title === void 0) {
|
|
2181
|
-
if (typeof label === "string" || typeof label === "number") {
|
|
2182
|
-
rawTitle = label.toString();
|
|
2183
|
-
}
|
|
2184
|
-
} else if (typeof title === "string" || typeof title === "number") {
|
|
2185
|
-
rawTitle = title.toString();
|
|
2186
|
-
}
|
|
2187
|
-
return rawTitle;
|
|
2188
|
-
}
|
|
2189
|
-
}, (() => {
|
|
2190
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
|
|
2191
|
-
_nzVariant_decorators = [WithConfig()];
|
|
2192
|
-
_nzOptionHeightPx_decorators = [WithConfig()];
|
|
2193
|
-
_nzSuffixIcon_decorators = [WithConfig()];
|
|
2194
|
-
_nzBorderless_decorators = [WithConfig()];
|
|
2195
|
-
_nzBackdrop_decorators = [WithConfig()];
|
|
2196
|
-
__esDecorate(null, null, _nzVariant_decorators, { kind: "field", name: "nzVariant", static: false, private: false, access: { has: (obj) => "nzVariant" in obj, get: (obj) => obj.nzVariant, set: (obj, value) => {
|
|
2197
|
-
obj.nzVariant = value;
|
|
2198
|
-
} }, metadata: _metadata }, _nzVariant_initializers, _nzVariant_extraInitializers);
|
|
2199
|
-
__esDecorate(null, null, _nzOptionHeightPx_decorators, { kind: "field", name: "nzOptionHeightPx", static: false, private: false, access: { has: (obj) => "nzOptionHeightPx" in obj, get: (obj) => obj.nzOptionHeightPx, set: (obj, value) => {
|
|
2200
|
-
obj.nzOptionHeightPx = value;
|
|
2201
|
-
} }, metadata: _metadata }, _nzOptionHeightPx_initializers, _nzOptionHeightPx_extraInitializers);
|
|
2202
|
-
__esDecorate(null, null, _nzSuffixIcon_decorators, { kind: "field", name: "nzSuffixIcon", static: false, private: false, access: { has: (obj) => "nzSuffixIcon" in obj, get: (obj) => obj.nzSuffixIcon, set: (obj, value) => {
|
|
2203
|
-
obj.nzSuffixIcon = value;
|
|
2204
|
-
} }, metadata: _metadata }, _nzSuffixIcon_initializers, _nzSuffixIcon_extraInitializers);
|
|
2205
|
-
__esDecorate(null, null, _nzBorderless_decorators, { kind: "field", name: "nzBorderless", static: false, private: false, access: { has: (obj) => "nzBorderless" in obj, get: (obj) => obj.nzBorderless, set: (obj, value) => {
|
|
2206
|
-
obj.nzBorderless = value;
|
|
2207
|
-
} }, metadata: _metadata }, _nzBorderless_initializers, _nzBorderless_extraInitializers);
|
|
2208
|
-
__esDecorate(null, null, _nzBackdrop_decorators, { kind: "field", name: "nzBackdrop", static: false, private: false, access: { has: (obj) => "nzBackdrop" in obj, get: (obj) => obj.nzBackdrop, set: (obj, value) => {
|
|
2209
|
-
obj.nzBackdrop = value;
|
|
2210
|
-
} }, metadata: _metadata }, _nzBackdrop_initializers, _nzBackdrop_extraInitializers);
|
|
2211
|
-
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
2212
|
-
})(), __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-select", inputs: { nzId: "nzId", nzSize: "nzSize", nzStatus: "nzStatus", nzVariant: "nzVariant", nzOptionHeightPx: "nzOptionHeightPx", nzOptionOverflowSize: "nzOptionOverflowSize", nzDropdownClassName: "nzDropdownClassName", nzDropdownMatchSelectWidth: "nzDropdownMatchSelectWidth", nzDropdownStyle: "nzDropdownStyle", nzNotFoundContent: "nzNotFoundContent", nzPlaceHolder: "nzPlaceHolder", nzPlacement: "nzPlacement", nzMaxTagCount: "nzMaxTagCount", nzDropdownRender: "nzDropdownRender", nzCustomTemplate: "nzCustomTemplate", nzPrefix: "nzPrefix", nzSuffixIcon: "nzSuffixIcon", nzClearIcon: "nzClearIcon", nzRemoveIcon: "nzRemoveIcon", nzMenuItemSelectedIcon: "nzMenuItemSelectedIcon", nzTokenSeparators: "nzTokenSeparators", nzMaxTagPlaceholder: "nzMaxTagPlaceholder", nzMaxMultipleCount: ["nzMaxMultipleCount", "nzMaxMultipleCount", numberAttributeWithInfinityFallback], nzMode: "nzMode", nzFilterOption: "nzFilterOption", compareWith: "compareWith", nzAllowClear: ["nzAllowClear", "nzAllowClear", booleanAttribute], nzBorderless: ["nzBorderless", "nzBorderless", booleanAttribute], nzShowSearch: ["nzShowSearch", "nzShowSearch", booleanAttribute], nzLoading: ["nzLoading", "nzLoading", booleanAttribute], nzAutoFocus: ["nzAutoFocus", "nzAutoFocus", booleanAttribute], nzAutoClearSearchValue: ["nzAutoClearSearchValue", "nzAutoClearSearchValue", booleanAttribute], nzServerSearch: ["nzServerSearch", "nzServerSearch", booleanAttribute], nzDisabled: ["nzDisabled", "nzDisabled", booleanAttribute], nzOpen: ["nzOpen", "nzOpen", booleanAttribute], nzSelectOnTab: ["nzSelectOnTab", "nzSelectOnTab", booleanAttribute], nzBackdrop: ["nzBackdrop", "nzBackdrop", booleanAttribute], nzOptions: "nzOptions", nzShowArrow: ["nzShowArrow", "nzShowArrow", booleanAttribute] }, outputs: { nzOnSearch: "nzOnSearch", nzScrollToBottom: "nzScrollToBottom", nzOpenChange: "nzOpenChange", nzBlur: "nzBlur", nzFocus: "nzFocus", nzOnClear: "nzOnClear" }, host: { properties: { "class.ant-select-in-form-item": "!!nzFormStatusService", "class.ant-select-lg": 'finalSize() === "large"', "class.ant-select-sm": 'finalSize() === "small"', "class.ant-select-show-arrow": "showArrow", "class.ant-select-disabled": "nzDisabled", "class.ant-select-show-search": "(nzShowSearch || nzMode !== 'default') && !nzDisabled", "class.ant-select-allow-clear": "nzAllowClear", "class.ant-select-borderless": "nzVariant === 'borderless' || (nzVariant === 'outlined' && nzBorderless)", "class.ant-select-filled": "nzVariant === 'filled'", "class.ant-select-underlined": "nzVariant === 'underlined'", "class.ant-select-open": "nzOpen", "class.ant-select-focused": "nzOpen || focused", "class.ant-select-single": "nzMode === 'default'", "class.ant-select-multiple": "nzMode !== 'default'", "class.ant-select-rtl": "dir === 'rtl'" }, classAttribute: "ant-select" }, providers: [
|
|
2213
|
-
{
|
|
2214
|
-
provide: NG_VALUE_ACCESSOR,
|
|
2215
|
-
useExisting: forwardRef(() => _a),
|
|
2216
|
-
multi: true
|
|
2217
|
-
},
|
|
2218
|
-
{ provide: NZ_SPACE_COMPACT_ITEM_TYPE, useValue: "select" }
|
|
2219
|
-
], queries: [{ propertyName: "listOfNzOptionComponent", predicate: NzOptionComponent, descendants: true }, { propertyName: "listOfNzOptionGroupComponent", predicate: NzOptionGroupComponent, descendants: true }], viewQueries: [{ propertyName: "originElement", first: true, predicate: CdkOverlayOrigin, descendants: true, read: ElementRef, static: true }, { propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, static: true }, { propertyName: "nzSelectTopControlComponent", first: true, predicate: NzSelectTopControlComponent, descendants: true, static: true }, { propertyName: "nzOptionGroupComponentElement", first: true, predicate: NzOptionGroupComponent, descendants: true, read: ElementRef, static: true }, { propertyName: "nzSelectTopControlComponentElement", first: true, predicate: NzSelectTopControlComponent, descendants: true, read: ElementRef, static: true }], exportAs: ["nzSelect"], usesOnChanges: true, hostDirectives: [{ directive: NzSpaceCompactItemDirective }], ngImport: core_exports, template: `
|
|
2220
|
-
<nz-select-top-control
|
|
2221
|
-
cdkOverlayOrigin
|
|
2222
|
-
#origin="cdkOverlayOrigin"
|
|
2223
|
-
[nzId]="nzId"
|
|
2224
|
-
[open]="nzOpen"
|
|
2225
|
-
[disabled]="nzDisabled"
|
|
2226
|
-
[mode]="nzMode"
|
|
2227
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
2228
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
2229
|
-
[maxTagPlaceholder]="nzMaxTagPlaceholder"
|
|
2230
|
-
[removeIcon]="nzRemoveIcon"
|
|
2231
|
-
[placeHolder]="nzPlaceHolder"
|
|
2232
|
-
[maxTagCount]="nzMaxTagCount"
|
|
2233
|
-
[customTemplate]="nzCustomTemplate"
|
|
2234
|
-
[tokenSeparators]="nzTokenSeparators"
|
|
2235
|
-
[showSearch]="nzShowSearch"
|
|
2236
|
-
[autofocus]="nzAutoFocus"
|
|
2237
|
-
[listOfTopItem]="listOfTopItem"
|
|
2238
|
-
[prefix]="nzPrefix"
|
|
2239
|
-
(inputValueChange)="onInputValueChange($event)"
|
|
2240
|
-
(tokenize)="onTokenSeparate($event)"
|
|
2241
|
-
(deleteItem)="onItemDelete($event)"
|
|
2242
|
-
(keydown)="onKeyDown($event)"
|
|
2243
|
-
/>
|
|
2244
|
-
@if (showArrow || (hasFeedback && !!status) || isMaxMultipleCountSet) {
|
|
2245
|
-
<nz-select-arrow
|
|
2246
|
-
[showArrow]="nzShowArrow"
|
|
2247
|
-
[loading]="nzLoading"
|
|
2248
|
-
[search]="nzOpen && nzShowSearch"
|
|
2249
|
-
[suffixIcon]="nzSuffixIcon"
|
|
2250
|
-
[feedbackIcon]="feedbackIconTpl"
|
|
2251
|
-
[nzMaxMultipleCount]="nzMaxMultipleCount"
|
|
2252
|
-
[listOfValue]="listOfValue"
|
|
2253
|
-
[isMaxMultipleCountSet]="isMaxMultipleCountSet"
|
|
2254
|
-
>
|
|
2255
|
-
<ng-template #feedbackIconTpl>
|
|
2256
|
-
@if (hasFeedback && !!status) {
|
|
2257
|
-
<nz-form-item-feedback-icon [status]="status" />
|
|
2258
|
-
}
|
|
2259
|
-
</ng-template>
|
|
2260
|
-
</nz-select-arrow>
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
@if (nzAllowClear && !nzDisabled && listOfValue.length) {
|
|
2264
|
-
<nz-select-clear [clearIcon]="nzClearIcon" (clear)="onClearSelection()" />
|
|
2265
|
-
}
|
|
2266
|
-
<ng-template
|
|
2267
|
-
cdkConnectedOverlay
|
|
2268
|
-
nzConnectedOverlay
|
|
2269
|
-
[cdkConnectedOverlayHasBackdrop]="nzBackdrop"
|
|
2270
|
-
[cdkConnectedOverlayMinWidth]="$any(nzDropdownMatchSelectWidth ? null : triggerWidth)"
|
|
2271
|
-
[cdkConnectedOverlayWidth]="$any(nzDropdownMatchSelectWidth ? triggerWidth : null)"
|
|
2272
|
-
[cdkConnectedOverlayOrigin]="origin"
|
|
2273
|
-
[cdkConnectedOverlayTransformOriginOn]="'.ant-select-dropdown'"
|
|
2274
|
-
[cdkConnectedOverlayPanelClass]="nzDropdownClassName!"
|
|
2275
|
-
[cdkConnectedOverlayOpen]="nzOpen"
|
|
2276
|
-
[cdkConnectedOverlayPositions]="positions"
|
|
2277
|
-
(overlayOutsideClick)="onClickOutside($event)"
|
|
2278
|
-
(detach)="setOpenState(false)"
|
|
2279
|
-
(positionChange)="onPositionChange($event)"
|
|
2280
|
-
>
|
|
2281
|
-
<nz-option-container
|
|
2282
|
-
[style]="nzDropdownStyle"
|
|
2283
|
-
[itemSize]="nzOptionHeightPx"
|
|
2284
|
-
[maxItemLength]="nzOptionOverflowSize"
|
|
2285
|
-
[matchWidth]="nzDropdownMatchSelectWidth"
|
|
2286
|
-
[class.ant-select-dropdown-placement-bottomLeft]="dropdownPosition === 'bottomLeft'"
|
|
2287
|
-
[class.ant-select-dropdown-placement-topLeft]="dropdownPosition === 'topLeft'"
|
|
2288
|
-
[class.ant-select-dropdown-placement-bottomRight]="dropdownPosition === 'bottomRight'"
|
|
2289
|
-
[class.ant-select-dropdown-placement-topRight]="dropdownPosition === 'topRight'"
|
|
2290
|
-
[@slideMotion]="'enter'"
|
|
2291
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
2292
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
2293
|
-
[listOfContainerItem]="listOfContainerItem"
|
|
2294
|
-
[menuItemSelectedIcon]="nzMenuItemSelectedIcon"
|
|
2295
|
-
[notFoundContent]="nzNotFoundContent"
|
|
2296
|
-
[activatedValue]="activatedValue"
|
|
2297
|
-
[listOfSelectedValue]="listOfValue"
|
|
2298
|
-
[dropdownRender]="nzDropdownRender"
|
|
2299
|
-
[compareWith]="compareWith"
|
|
2300
|
-
[mode]="nzMode"
|
|
2301
|
-
[isMaxMultipleCountReached]="isMaxMultipleCountReached"
|
|
2302
|
-
(keydown)="onKeyDown($event)"
|
|
2303
|
-
(itemClick)="onItemClick($event)"
|
|
2304
|
-
(scrollToBottom)="nzScrollToBottom.emit()"
|
|
2305
|
-
/>
|
|
2306
|
-
</ng-template>
|
|
2307
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NzSelectTopControlComponent, selector: "nz-select-top-control", inputs: ["nzId", "showSearch", "placeHolder", "open", "maxTagCount", "autofocus", "disabled", "mode", "customTemplate", "maxTagPlaceholder", "removeIcon", "listOfTopItem", "tokenSeparators", "prefix"], outputs: ["tokenize", "inputValueChange", "deleteItem"], exportAs: ["nzSelectTopControl"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: NzNoAnimationDirective, selector: "[nzNoAnimation]", inputs: ["nzNoAnimation"], exportAs: ["nzNoAnimation"] }, { kind: "component", type: NzSelectArrowComponent, selector: "nz-select-arrow", inputs: ["listOfValue", "loading", "search", "showArrow", "isMaxMultipleCountSet", "suffixIcon", "feedbackIcon", "nzMaxMultipleCount"] }, { kind: "component", type: NzFormItemFeedbackIconComponent, selector: "nz-form-item-feedback-icon", inputs: ["status"], exportAs: ["nzFormFeedbackIcon"] }, { kind: "component", type: NzSelectClearComponent, selector: "nz-select-clear", inputs: ["clearIcon"], outputs: ["clear"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: NzOverlayModule }, { kind: "directive", type: NzConnectedOverlayDirective, selector: "[cdkConnectedOverlay][nzConnectedOverlay]", inputs: ["nzArrowPointAtCenter"], exportAs: ["nzConnectedOverlay"] }, { kind: "component", type: NzOptionContainerComponent, selector: "nz-option-container", inputs: ["notFoundContent", "menuItemSelectedIcon", "dropdownRender", "activatedValue", "listOfSelectedValue", "compareWith", "mode", "matchWidth", "itemSize", "maxItemLength", "isMaxMultipleCountReached", "listOfContainerItem"], outputs: ["itemClick", "scrollToBottom"], exportAs: ["nzOptionContainer"] }], animations: [slideMotion], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None })), _a;
|
|
2308
|
-
})();
|
|
2309
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSelectComponent, decorators: [{
|
|
2310
|
-
type: Component,
|
|
2311
|
-
args: [{
|
|
2312
|
-
selector: "nz-select",
|
|
2313
|
-
exportAs: "nzSelect",
|
|
2314
|
-
providers: [
|
|
2315
|
-
{
|
|
2316
|
-
provide: NG_VALUE_ACCESSOR,
|
|
2317
|
-
useExisting: forwardRef(() => NzSelectComponent),
|
|
2318
|
-
multi: true
|
|
2319
|
-
},
|
|
2320
|
-
{ provide: NZ_SPACE_COMPACT_ITEM_TYPE, useValue: "select" }
|
|
2321
|
-
],
|
|
2322
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2323
|
-
encapsulation: ViewEncapsulation.None,
|
|
2324
|
-
animations: [slideMotion],
|
|
2325
|
-
template: `
|
|
2326
|
-
<nz-select-top-control
|
|
2327
|
-
cdkOverlayOrigin
|
|
2328
|
-
#origin="cdkOverlayOrigin"
|
|
2329
|
-
[nzId]="nzId"
|
|
2330
|
-
[open]="nzOpen"
|
|
2331
|
-
[disabled]="nzDisabled"
|
|
2332
|
-
[mode]="nzMode"
|
|
2333
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
2334
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
2335
|
-
[maxTagPlaceholder]="nzMaxTagPlaceholder"
|
|
2336
|
-
[removeIcon]="nzRemoveIcon"
|
|
2337
|
-
[placeHolder]="nzPlaceHolder"
|
|
2338
|
-
[maxTagCount]="nzMaxTagCount"
|
|
2339
|
-
[customTemplate]="nzCustomTemplate"
|
|
2340
|
-
[tokenSeparators]="nzTokenSeparators"
|
|
2341
|
-
[showSearch]="nzShowSearch"
|
|
2342
|
-
[autofocus]="nzAutoFocus"
|
|
2343
|
-
[listOfTopItem]="listOfTopItem"
|
|
2344
|
-
[prefix]="nzPrefix"
|
|
2345
|
-
(inputValueChange)="onInputValueChange($event)"
|
|
2346
|
-
(tokenize)="onTokenSeparate($event)"
|
|
2347
|
-
(deleteItem)="onItemDelete($event)"
|
|
2348
|
-
(keydown)="onKeyDown($event)"
|
|
2349
|
-
/>
|
|
2350
|
-
@if (showArrow || (hasFeedback && !!status) || isMaxMultipleCountSet) {
|
|
2351
|
-
<nz-select-arrow
|
|
2352
|
-
[showArrow]="nzShowArrow"
|
|
2353
|
-
[loading]="nzLoading"
|
|
2354
|
-
[search]="nzOpen && nzShowSearch"
|
|
2355
|
-
[suffixIcon]="nzSuffixIcon"
|
|
2356
|
-
[feedbackIcon]="feedbackIconTpl"
|
|
2357
|
-
[nzMaxMultipleCount]="nzMaxMultipleCount"
|
|
2358
|
-
[listOfValue]="listOfValue"
|
|
2359
|
-
[isMaxMultipleCountSet]="isMaxMultipleCountSet"
|
|
2360
|
-
>
|
|
2361
|
-
<ng-template #feedbackIconTpl>
|
|
2362
|
-
@if (hasFeedback && !!status) {
|
|
2363
|
-
<nz-form-item-feedback-icon [status]="status" />
|
|
2364
|
-
}
|
|
2365
|
-
</ng-template>
|
|
2366
|
-
</nz-select-arrow>
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
@if (nzAllowClear && !nzDisabled && listOfValue.length) {
|
|
2370
|
-
<nz-select-clear [clearIcon]="nzClearIcon" (clear)="onClearSelection()" />
|
|
2371
|
-
}
|
|
2372
|
-
<ng-template
|
|
2373
|
-
cdkConnectedOverlay
|
|
2374
|
-
nzConnectedOverlay
|
|
2375
|
-
[cdkConnectedOverlayHasBackdrop]="nzBackdrop"
|
|
2376
|
-
[cdkConnectedOverlayMinWidth]="$any(nzDropdownMatchSelectWidth ? null : triggerWidth)"
|
|
2377
|
-
[cdkConnectedOverlayWidth]="$any(nzDropdownMatchSelectWidth ? triggerWidth : null)"
|
|
2378
|
-
[cdkConnectedOverlayOrigin]="origin"
|
|
2379
|
-
[cdkConnectedOverlayTransformOriginOn]="'.ant-select-dropdown'"
|
|
2380
|
-
[cdkConnectedOverlayPanelClass]="nzDropdownClassName!"
|
|
2381
|
-
[cdkConnectedOverlayOpen]="nzOpen"
|
|
2382
|
-
[cdkConnectedOverlayPositions]="positions"
|
|
2383
|
-
(overlayOutsideClick)="onClickOutside($event)"
|
|
2384
|
-
(detach)="setOpenState(false)"
|
|
2385
|
-
(positionChange)="onPositionChange($event)"
|
|
2386
|
-
>
|
|
2387
|
-
<nz-option-container
|
|
2388
|
-
[style]="nzDropdownStyle"
|
|
2389
|
-
[itemSize]="nzOptionHeightPx"
|
|
2390
|
-
[maxItemLength]="nzOptionOverflowSize"
|
|
2391
|
-
[matchWidth]="nzDropdownMatchSelectWidth"
|
|
2392
|
-
[class.ant-select-dropdown-placement-bottomLeft]="dropdownPosition === 'bottomLeft'"
|
|
2393
|
-
[class.ant-select-dropdown-placement-topLeft]="dropdownPosition === 'topLeft'"
|
|
2394
|
-
[class.ant-select-dropdown-placement-bottomRight]="dropdownPosition === 'bottomRight'"
|
|
2395
|
-
[class.ant-select-dropdown-placement-topRight]="dropdownPosition === 'topRight'"
|
|
2396
|
-
[@slideMotion]="'enter'"
|
|
2397
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
2398
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
2399
|
-
[listOfContainerItem]="listOfContainerItem"
|
|
2400
|
-
[menuItemSelectedIcon]="nzMenuItemSelectedIcon"
|
|
2401
|
-
[notFoundContent]="nzNotFoundContent"
|
|
2402
|
-
[activatedValue]="activatedValue"
|
|
2403
|
-
[listOfSelectedValue]="listOfValue"
|
|
2404
|
-
[dropdownRender]="nzDropdownRender"
|
|
2405
|
-
[compareWith]="compareWith"
|
|
2406
|
-
[mode]="nzMode"
|
|
2407
|
-
[isMaxMultipleCountReached]="isMaxMultipleCountReached"
|
|
2408
|
-
(keydown)="onKeyDown($event)"
|
|
2409
|
-
(itemClick)="onItemClick($event)"
|
|
2410
|
-
(scrollToBottom)="nzScrollToBottom.emit()"
|
|
2411
|
-
/>
|
|
2412
|
-
</ng-template>
|
|
2413
|
-
`,
|
|
2414
|
-
host: {
|
|
2415
|
-
class: "ant-select",
|
|
2416
|
-
"[class.ant-select-in-form-item]": "!!nzFormStatusService",
|
|
2417
|
-
"[class.ant-select-lg]": 'finalSize() === "large"',
|
|
2418
|
-
"[class.ant-select-sm]": 'finalSize() === "small"',
|
|
2419
|
-
"[class.ant-select-show-arrow]": `showArrow`,
|
|
2420
|
-
"[class.ant-select-disabled]": "nzDisabled",
|
|
2421
|
-
"[class.ant-select-show-search]": `(nzShowSearch || nzMode !== 'default') && !nzDisabled`,
|
|
2422
|
-
"[class.ant-select-allow-clear]": "nzAllowClear",
|
|
2423
|
-
"[class.ant-select-borderless]": `nzVariant === 'borderless' || (nzVariant === 'outlined' && nzBorderless)`,
|
|
2424
|
-
"[class.ant-select-filled]": `nzVariant === 'filled'`,
|
|
2425
|
-
"[class.ant-select-underlined]": `nzVariant === 'underlined'`,
|
|
2426
|
-
"[class.ant-select-open]": "nzOpen",
|
|
2427
|
-
"[class.ant-select-focused]": "nzOpen || focused",
|
|
2428
|
-
"[class.ant-select-single]": `nzMode === 'default'`,
|
|
2429
|
-
"[class.ant-select-multiple]": `nzMode !== 'default'`,
|
|
2430
|
-
"[class.ant-select-rtl]": `dir === 'rtl'`
|
|
2431
|
-
},
|
|
2432
|
-
hostDirectives: [NzSpaceCompactItemDirective],
|
|
2433
|
-
imports: [
|
|
2434
|
-
NzSelectTopControlComponent,
|
|
2435
|
-
CdkOverlayOrigin,
|
|
2436
|
-
NzNoAnimationDirective,
|
|
2437
|
-
NzSelectArrowComponent,
|
|
2438
|
-
NzFormItemFeedbackIconComponent,
|
|
2439
|
-
NzSelectClearComponent,
|
|
2440
|
-
CdkConnectedOverlay,
|
|
2441
|
-
NzOverlayModule,
|
|
2442
|
-
NzOptionContainerComponent
|
|
2443
|
-
]
|
|
2444
|
-
}]
|
|
2445
|
-
}], ctorParameters: () => [], propDecorators: { nzId: [{
|
|
2446
|
-
type: Input
|
|
2447
|
-
}], nzSize: [{
|
|
2448
|
-
type: Input
|
|
2449
|
-
}], nzStatus: [{
|
|
2450
|
-
type: Input
|
|
2451
|
-
}], nzVariant: [{
|
|
2452
|
-
type: Input
|
|
2453
|
-
}], nzOptionHeightPx: [{
|
|
2454
|
-
type: Input
|
|
2455
|
-
}], nzOptionOverflowSize: [{
|
|
2456
|
-
type: Input
|
|
2457
|
-
}], nzDropdownClassName: [{
|
|
2458
|
-
type: Input
|
|
2459
|
-
}], nzDropdownMatchSelectWidth: [{
|
|
2460
|
-
type: Input
|
|
2461
|
-
}], nzDropdownStyle: [{
|
|
2462
|
-
type: Input
|
|
2463
|
-
}], nzNotFoundContent: [{
|
|
2464
|
-
type: Input
|
|
2465
|
-
}], nzPlaceHolder: [{
|
|
2466
|
-
type: Input
|
|
2467
|
-
}], nzPlacement: [{
|
|
2468
|
-
type: Input
|
|
2469
|
-
}], nzMaxTagCount: [{
|
|
2470
|
-
type: Input
|
|
2471
|
-
}], nzDropdownRender: [{
|
|
2472
|
-
type: Input
|
|
2473
|
-
}], nzCustomTemplate: [{
|
|
2474
|
-
type: Input
|
|
2475
|
-
}], nzPrefix: [{
|
|
2476
|
-
type: Input
|
|
2477
|
-
}], nzSuffixIcon: [{
|
|
2478
|
-
type: Input
|
|
2479
|
-
}], nzClearIcon: [{
|
|
2480
|
-
type: Input
|
|
2481
|
-
}], nzRemoveIcon: [{
|
|
2482
|
-
type: Input
|
|
2483
|
-
}], nzMenuItemSelectedIcon: [{
|
|
2484
|
-
type: Input
|
|
2485
|
-
}], nzTokenSeparators: [{
|
|
2486
|
-
type: Input
|
|
2487
|
-
}], nzMaxTagPlaceholder: [{
|
|
2488
|
-
type: Input
|
|
2489
|
-
}], nzMaxMultipleCount: [{
|
|
2490
|
-
type: Input,
|
|
2491
|
-
args: [{ transform: numberAttributeWithInfinityFallback }]
|
|
2492
|
-
}], nzMode: [{
|
|
2493
|
-
type: Input
|
|
2494
|
-
}], nzFilterOption: [{
|
|
2495
|
-
type: Input
|
|
2496
|
-
}], compareWith: [{
|
|
2497
|
-
type: Input
|
|
2498
|
-
}], nzAllowClear: [{
|
|
2499
|
-
type: Input,
|
|
2500
|
-
args: [{ transform: booleanAttribute }]
|
|
2501
|
-
}], nzBorderless: [{
|
|
2502
|
-
type: Input,
|
|
2503
|
-
args: [{ transform: booleanAttribute }]
|
|
2504
|
-
}], nzShowSearch: [{
|
|
2505
|
-
type: Input,
|
|
2506
|
-
args: [{ transform: booleanAttribute }]
|
|
2507
|
-
}], nzLoading: [{
|
|
2508
|
-
type: Input,
|
|
2509
|
-
args: [{ transform: booleanAttribute }]
|
|
2510
|
-
}], nzAutoFocus: [{
|
|
2511
|
-
type: Input,
|
|
2512
|
-
args: [{ transform: booleanAttribute }]
|
|
2513
|
-
}], nzAutoClearSearchValue: [{
|
|
2514
|
-
type: Input,
|
|
2515
|
-
args: [{ transform: booleanAttribute }]
|
|
2516
|
-
}], nzServerSearch: [{
|
|
2517
|
-
type: Input,
|
|
2518
|
-
args: [{ transform: booleanAttribute }]
|
|
2519
|
-
}], nzDisabled: [{
|
|
2520
|
-
type: Input,
|
|
2521
|
-
args: [{ transform: booleanAttribute }]
|
|
2522
|
-
}], nzOpen: [{
|
|
2523
|
-
type: Input,
|
|
2524
|
-
args: [{ transform: booleanAttribute }]
|
|
2525
|
-
}], nzSelectOnTab: [{
|
|
2526
|
-
type: Input,
|
|
2527
|
-
args: [{ transform: booleanAttribute }]
|
|
2528
|
-
}], nzBackdrop: [{
|
|
2529
|
-
type: Input,
|
|
2530
|
-
args: [{ transform: booleanAttribute }]
|
|
2531
|
-
}], nzOptions: [{
|
|
2532
|
-
type: Input
|
|
2533
|
-
}], nzShowArrow: [{
|
|
2534
|
-
type: Input,
|
|
2535
|
-
args: [{ transform: booleanAttribute }]
|
|
2536
|
-
}], nzOnSearch: [{
|
|
2537
|
-
type: Output
|
|
2538
|
-
}], nzScrollToBottom: [{
|
|
2539
|
-
type: Output
|
|
2540
|
-
}], nzOpenChange: [{
|
|
2541
|
-
type: Output
|
|
2542
|
-
}], nzBlur: [{
|
|
2543
|
-
type: Output
|
|
2544
|
-
}], nzFocus: [{
|
|
2545
|
-
type: Output
|
|
2546
|
-
}], originElement: [{
|
|
2547
|
-
type: ViewChild,
|
|
2548
|
-
args: [CdkOverlayOrigin, { static: true, read: ElementRef }]
|
|
2549
|
-
}], cdkConnectedOverlay: [{
|
|
2550
|
-
type: ViewChild,
|
|
2551
|
-
args: [CdkConnectedOverlay, { static: true }]
|
|
2552
|
-
}], nzSelectTopControlComponent: [{
|
|
2553
|
-
type: ViewChild,
|
|
2554
|
-
args: [NzSelectTopControlComponent, { static: true }]
|
|
2555
|
-
}], listOfNzOptionComponent: [{
|
|
2556
|
-
type: ContentChildren,
|
|
2557
|
-
args: [NzOptionComponent, { descendants: true }]
|
|
2558
|
-
}], listOfNzOptionGroupComponent: [{
|
|
2559
|
-
type: ContentChildren,
|
|
2560
|
-
args: [NzOptionGroupComponent, { descendants: true }]
|
|
2561
|
-
}], nzOptionGroupComponentElement: [{
|
|
2562
|
-
type: ViewChild,
|
|
2563
|
-
args: [NzOptionGroupComponent, { static: true, read: ElementRef }]
|
|
2564
|
-
}], nzSelectTopControlComponentElement: [{
|
|
2565
|
-
type: ViewChild,
|
|
2566
|
-
args: [NzSelectTopControlComponent, { static: true, read: ElementRef }]
|
|
2567
|
-
}] } });
|
|
2568
|
-
var NzSelectModule = class _NzSelectModule {
|
|
2569
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSelectModule, deps: [], target: FactoryTarget.NgModule });
|
|
2570
|
-
static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSelectModule, imports: [
|
|
2571
|
-
NzOptionComponent,
|
|
2572
|
-
NzSelectComponent,
|
|
2573
|
-
NzOptionContainerComponent,
|
|
2574
|
-
NzOptionGroupComponent,
|
|
2575
|
-
NzOptionItemComponent,
|
|
2576
|
-
NzSelectTopControlComponent,
|
|
2577
|
-
NzSelectSearchComponent,
|
|
2578
|
-
NzSelectItemComponent,
|
|
2579
|
-
NzSelectClearComponent,
|
|
2580
|
-
NzSelectArrowComponent,
|
|
2581
|
-
NzSelectPlaceholderComponent,
|
|
2582
|
-
NzOptionItemGroupComponent
|
|
2583
|
-
], exports: [
|
|
2584
|
-
NzOptionComponent,
|
|
2585
|
-
NzSelectComponent,
|
|
2586
|
-
NzOptionGroupComponent,
|
|
2587
|
-
NzSelectArrowComponent,
|
|
2588
|
-
NzSelectClearComponent,
|
|
2589
|
-
NzSelectItemComponent,
|
|
2590
|
-
NzSelectPlaceholderComponent,
|
|
2591
|
-
NzSelectSearchComponent
|
|
2592
|
-
] });
|
|
2593
|
-
static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSelectModule, imports: [
|
|
2594
|
-
NzSelectComponent,
|
|
2595
|
-
NzOptionContainerComponent,
|
|
2596
|
-
NzOptionItemComponent,
|
|
2597
|
-
NzSelectTopControlComponent,
|
|
2598
|
-
NzSelectSearchComponent,
|
|
2599
|
-
NzSelectItemComponent,
|
|
2600
|
-
NzSelectClearComponent,
|
|
2601
|
-
NzSelectArrowComponent,
|
|
2602
|
-
NzSelectPlaceholderComponent,
|
|
2603
|
-
NzOptionItemGroupComponent
|
|
2604
|
-
] });
|
|
2605
|
-
};
|
|
2606
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSelectModule, decorators: [{
|
|
2607
|
-
type: NgModule,
|
|
2608
|
-
args: [{
|
|
2609
|
-
imports: [
|
|
2610
|
-
NzOptionComponent,
|
|
2611
|
-
NzSelectComponent,
|
|
2612
|
-
NzOptionContainerComponent,
|
|
2613
|
-
NzOptionGroupComponent,
|
|
2614
|
-
NzOptionItemComponent,
|
|
2615
|
-
NzSelectTopControlComponent,
|
|
2616
|
-
NzSelectSearchComponent,
|
|
2617
|
-
NzSelectItemComponent,
|
|
2618
|
-
NzSelectClearComponent,
|
|
2619
|
-
NzSelectArrowComponent,
|
|
2620
|
-
NzSelectPlaceholderComponent,
|
|
2621
|
-
NzOptionItemGroupComponent
|
|
2622
|
-
],
|
|
2623
|
-
exports: [
|
|
2624
|
-
NzOptionComponent,
|
|
2625
|
-
NzSelectComponent,
|
|
2626
|
-
NzOptionGroupComponent,
|
|
2627
|
-
NzSelectArrowComponent,
|
|
2628
|
-
NzSelectClearComponent,
|
|
2629
|
-
NzSelectItemComponent,
|
|
2630
|
-
NzSelectPlaceholderComponent,
|
|
2631
|
-
NzSelectSearchComponent
|
|
2632
|
-
]
|
|
2633
|
-
}]
|
|
2634
|
-
}] });
|
|
2635
|
-
|
|
2636
|
-
export {
|
|
2637
|
-
NzEmbedEmptyComponent,
|
|
2638
|
-
NzEmptyModule,
|
|
2639
|
-
NzOptionComponent,
|
|
2640
|
-
NzSelectComponent,
|
|
2641
|
-
NzSelectModule
|
|
2642
|
-
};
|
|
2643
|
-
//# sourceMappingURL=chunk-ETTBRXVA.js.map
|