@yinuo-ngm/server 1.0.15 → 1.0.16
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/plugins/error-handler.plugin.js +5 -0
- package/lib/routes/api-client/hub-token.routes.js +22 -0
- package/lib/routes/index.js +2 -0
- 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 +5 -0
- package/lib/routes/sprite-browse.routes.js +19 -5
- package/lib/routes/sprite.routes.js +17 -11
- package/lib/routes/static-files.routes.js +16 -0
- package/lib/routes/task.routes.js +7 -0
- package/package.json +3 -3
- package/www/3rdpartylicenses.txt +14 -66
- package/www/browser/chunk-2BZRE4G7.js +1 -0
- package/www/browser/chunk-2X3MRS27.js +1 -0
- package/www/browser/chunk-4KETC6EB.js +1 -0
- package/www/browser/chunk-5T5KA5PG.js +1 -0
- package/www/browser/chunk-6CGHNKJI.js +1 -0
- package/www/browser/chunk-76TVIB33.js +63 -0
- package/www/browser/chunk-7J24TP36.js +1 -0
- package/www/browser/chunk-ACAZUX6C.js +1 -0
- package/www/browser/chunk-B6MBYCXI.js +1 -0
- package/www/browser/chunk-BYEU6KGP.js +2 -0
- package/www/browser/chunk-CZ5AZ3VW.js +1 -0
- package/www/browser/chunk-DW7F5PEA.js +1 -0
- package/www/browser/chunk-DXF7BVK5.js +1 -0
- package/www/browser/chunk-EEVPZGEY.js +1 -0
- package/www/browser/chunk-G2W3B7TJ.js +1 -0
- package/www/browser/chunk-GDWS2L66.js +1 -0
- package/www/browser/chunk-HFZLJHYR.js +1 -0
- package/www/browser/chunk-HGONFYP6.js +1 -0
- package/www/browser/chunk-HHBPULJW.js +2 -0
- package/www/browser/chunk-HRXCR3IN.js +1 -0
- package/www/browser/chunk-INL2PELS.js +1 -0
- package/www/browser/chunk-JHMEKUZ5.js +1 -0
- package/www/browser/chunk-JU3TEDBV.js +37 -0
- package/www/browser/chunk-JZULA5JV.js +1 -0
- package/www/browser/chunk-KVFR7GFV.js +20 -0
- package/www/browser/chunk-L5D75AMV.js +1 -0
- package/www/browser/chunk-L7TMCSHV.js +1 -0
- package/www/browser/chunk-LQ5OXSW7.js +3 -0
- package/www/browser/chunk-MVQTKINJ.js +1 -0
- package/www/browser/chunk-N4LRZJBP.js +1 -0
- package/www/browser/chunk-O2EYEF7J.js +1 -0
- package/www/browser/chunk-OMDHJIUB.js +1 -0
- package/www/browser/chunk-OWUAAOHW.js +2 -0
- package/www/browser/chunk-PIK5YPIB.js +1 -0
- package/www/browser/chunk-RHLQRQDK.js +9 -0
- package/www/browser/chunk-RW2JPJV7.js +1 -0
- package/www/browser/chunk-S3SJ4VVM.js +11 -0
- package/www/browser/chunk-SIVPP74B.js +0 -0
- package/www/browser/chunk-SPRWNZHF.js +15 -0
- package/www/browser/chunk-SQQNR223.js +1 -0
- package/www/browser/chunk-SVQWPHF5.js +1 -0
- package/www/browser/chunk-SYCNSLAW.js +4 -0
- package/www/browser/chunk-T3KK7ZXB.js +2 -0
- package/www/browser/chunk-TMX5TTV3.js +1 -0
- package/www/browser/chunk-UFY3FLDK.js +1 -0
- package/www/browser/chunk-UJOHBN2Y.js +1 -0
- package/www/browser/chunk-UQGCUFNM.js +1 -0
- package/www/browser/chunk-UXXWRMM6.js +1 -0
- package/www/browser/chunk-UZRJGJTD.js +2 -0
- package/www/browser/chunk-WD4IAQR3.js +1 -0
- package/www/browser/chunk-WF2QTF5L.js +1 -0
- package/www/browser/chunk-WI67LAOV.js +4 -0
- package/www/browser/chunk-WNCM6QKB.js +1 -0
- package/www/browser/chunk-XJ5KZQNN.js +1 -0
- package/www/browser/chunk-YETDFSQE.js +1 -0
- package/www/browser/chunk-YMTC5GZK.js +1 -0
- package/www/browser/chunk-YVZHJ76K.js +1 -0
- package/www/browser/chunk-ZNTJRLVH.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-6LN5C22E.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,1674 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CdkConnectedOverlay,
|
|
3
|
-
CdkOverlayOrigin,
|
|
4
|
-
ConnectionPositionPair,
|
|
5
|
-
Directionality,
|
|
6
|
-
ESCAPE,
|
|
7
|
-
NzConfigService,
|
|
8
|
-
NzIconDirective,
|
|
9
|
-
NzIconModule,
|
|
10
|
-
NzNoAnimationDirective,
|
|
11
|
-
NzOutletModule,
|
|
12
|
-
NzStringTemplateOutletDirective,
|
|
13
|
-
OverlayModule,
|
|
14
|
-
POSITION_MAP,
|
|
15
|
-
Platform,
|
|
16
|
-
TOOLTIP_OFFSET_MAP,
|
|
17
|
-
TemplatePortal,
|
|
18
|
-
WithConfig,
|
|
19
|
-
collapseMotion,
|
|
20
|
-
createCloseScrollStrategy,
|
|
21
|
-
createFlexibleConnectedPositionStrategy,
|
|
22
|
-
createOverlayRef,
|
|
23
|
-
createRepositionScrollStrategy,
|
|
24
|
-
fromEventOutsideAngular,
|
|
25
|
-
getPlacementName,
|
|
26
|
-
hasModifierKey,
|
|
27
|
-
numberAttributeWithZeroFallback,
|
|
28
|
-
setConnectedPositionOffset,
|
|
29
|
-
slideMotion,
|
|
30
|
-
takeUntilDestroyed,
|
|
31
|
-
zoomBigMotion
|
|
32
|
-
} from "./chunk-RUXJCM3V.js";
|
|
33
|
-
import {
|
|
34
|
-
NavigationEnd,
|
|
35
|
-
Router,
|
|
36
|
-
RouterLink
|
|
37
|
-
} from "./chunk-665WC4RU.js";
|
|
38
|
-
import {
|
|
39
|
-
NgTemplateOutlet
|
|
40
|
-
} from "./chunk-3MCIETCQ.js";
|
|
41
|
-
import {
|
|
42
|
-
BehaviorSubject,
|
|
43
|
-
ChangeDetectionStrategy,
|
|
44
|
-
ChangeDetectorRef,
|
|
45
|
-
Component,
|
|
46
|
-
ContentChildren,
|
|
47
|
-
DestroyRef,
|
|
48
|
-
Directive,
|
|
49
|
-
EMPTY,
|
|
50
|
-
ElementRef,
|
|
51
|
-
EventEmitter,
|
|
52
|
-
FactoryTarget,
|
|
53
|
-
Injectable,
|
|
54
|
-
InjectionToken,
|
|
55
|
-
Injector,
|
|
56
|
-
Input,
|
|
57
|
-
NgModule,
|
|
58
|
-
NgZone,
|
|
59
|
-
Output,
|
|
60
|
-
Renderer2,
|
|
61
|
-
Subject,
|
|
62
|
-
Subscription,
|
|
63
|
-
TemplateRef,
|
|
64
|
-
ViewChild,
|
|
65
|
-
ViewContainerRef,
|
|
66
|
-
ViewEncapsulation,
|
|
67
|
-
__esDecorate,
|
|
68
|
-
__publicField,
|
|
69
|
-
__runInitializers,
|
|
70
|
-
auditTime,
|
|
71
|
-
booleanAttribute,
|
|
72
|
-
combineLatest,
|
|
73
|
-
core_exports,
|
|
74
|
-
distinctUntilChanged,
|
|
75
|
-
filter,
|
|
76
|
-
first,
|
|
77
|
-
forwardRef,
|
|
78
|
-
fromEvent,
|
|
79
|
-
inject,
|
|
80
|
-
map,
|
|
81
|
-
merge,
|
|
82
|
-
mergeMap,
|
|
83
|
-
startWith,
|
|
84
|
-
switchMap,
|
|
85
|
-
ɵɵngDeclareClassMetadata,
|
|
86
|
-
ɵɵngDeclareComponent,
|
|
87
|
-
ɵɵngDeclareDirective,
|
|
88
|
-
ɵɵngDeclareFactory,
|
|
89
|
-
ɵɵngDeclareInjectable,
|
|
90
|
-
ɵɵngDeclareInjector,
|
|
91
|
-
ɵɵngDeclareNgModule
|
|
92
|
-
} from "./chunk-XQY5SPGI.js";
|
|
93
|
-
|
|
94
|
-
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-menu.mjs
|
|
95
|
-
var MenuService = class _MenuService {
|
|
96
|
-
/** all descendant menu click **/
|
|
97
|
-
descendantMenuItemClick$ = new Subject();
|
|
98
|
-
/** child menu item click **/
|
|
99
|
-
childMenuItemClick$ = new Subject();
|
|
100
|
-
theme$ = new BehaviorSubject("light");
|
|
101
|
-
mode$ = new BehaviorSubject("vertical");
|
|
102
|
-
inlineIndent$ = new BehaviorSubject(24);
|
|
103
|
-
isChildSubMenuOpen$ = new BehaviorSubject(false);
|
|
104
|
-
onDescendantMenuItemClick(menu) {
|
|
105
|
-
this.descendantMenuItemClick$.next(menu);
|
|
106
|
-
}
|
|
107
|
-
onChildMenuItemClick(menu) {
|
|
108
|
-
this.childMenuItemClick$.next(menu);
|
|
109
|
-
}
|
|
110
|
-
setMode(mode) {
|
|
111
|
-
this.mode$.next(mode);
|
|
112
|
-
}
|
|
113
|
-
setTheme(theme) {
|
|
114
|
-
this.theme$.next(theme);
|
|
115
|
-
}
|
|
116
|
-
setInlineIndent(indent) {
|
|
117
|
-
this.inlineIndent$.next(indent);
|
|
118
|
-
}
|
|
119
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _MenuService, deps: [], target: FactoryTarget.Injectable });
|
|
120
|
-
static \u0275prov = \u0275\u0275ngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _MenuService });
|
|
121
|
-
};
|
|
122
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: MenuService, decorators: [{
|
|
123
|
-
type: Injectable
|
|
124
|
-
}] });
|
|
125
|
-
var NzIsMenuInsideDropDownToken = new InjectionToken(typeof ngDevMode !== "undefined" && ngDevMode ? "nz-is-in-dropdown-menu" : "");
|
|
126
|
-
var NzMenuServiceLocalToken = new InjectionToken(typeof ngDevMode !== "undefined" && ngDevMode ? "nz-menu-service-local" : "");
|
|
127
|
-
var NzSubmenuService = class _NzSubmenuService {
|
|
128
|
-
nzMenuService = inject(MenuService);
|
|
129
|
-
nzHostSubmenuService = inject(_NzSubmenuService, { optional: true, skipSelf: true });
|
|
130
|
-
mode$ = this.nzMenuService.mode$.pipe(map((mode) => {
|
|
131
|
-
if (mode === "inline") {
|
|
132
|
-
return "inline";
|
|
133
|
-
} else if (mode === "vertical" || this.nzHostSubmenuService) {
|
|
134
|
-
return "vertical";
|
|
135
|
-
} else {
|
|
136
|
-
return "horizontal";
|
|
137
|
-
}
|
|
138
|
-
}));
|
|
139
|
-
level = 1;
|
|
140
|
-
isMenuInsideDropDown = inject(NzIsMenuInsideDropDownToken);
|
|
141
|
-
isCurrentSubMenuOpen$ = new BehaviorSubject(false);
|
|
142
|
-
isChildSubMenuOpen$ = new BehaviorSubject(false);
|
|
143
|
-
/** submenu title & overlay mouse enter status **/
|
|
144
|
-
isMouseEnterTitleOrOverlay$ = new Subject();
|
|
145
|
-
childMenuItemClick$ = new Subject();
|
|
146
|
-
/**
|
|
147
|
-
* menu item inside submenu clicked
|
|
148
|
-
*/
|
|
149
|
-
onChildMenuItemClick(menu) {
|
|
150
|
-
this.childMenuItemClick$.next(menu);
|
|
151
|
-
}
|
|
152
|
-
setOpenStateWithoutDebounce(value) {
|
|
153
|
-
this.isCurrentSubMenuOpen$.next(value);
|
|
154
|
-
}
|
|
155
|
-
setMouseEnterTitleOrOverlayState(value) {
|
|
156
|
-
this.isMouseEnterTitleOrOverlay$.next(value);
|
|
157
|
-
}
|
|
158
|
-
constructor() {
|
|
159
|
-
if (this.nzHostSubmenuService) {
|
|
160
|
-
this.level = this.nzHostSubmenuService.level + 1;
|
|
161
|
-
}
|
|
162
|
-
const isClosedByMenuItemClick = this.childMenuItemClick$.pipe(mergeMap(() => this.mode$), filter((mode) => mode !== "inline" || this.isMenuInsideDropDown), map(() => false));
|
|
163
|
-
const isCurrentSubmenuOpen$ = merge(this.isMouseEnterTitleOrOverlay$, isClosedByMenuItemClick);
|
|
164
|
-
const isSubMenuOpenWithDebounce$ = combineLatest([this.isChildSubMenuOpen$, isCurrentSubmenuOpen$]).pipe(map(([isChildSubMenuOpen, isCurrentSubmenuOpen]) => isChildSubMenuOpen || isCurrentSubmenuOpen), auditTime(150));
|
|
165
|
-
isSubMenuOpenWithDebounce$.pipe(distinctUntilChanged(), takeUntilDestroyed()).subscribe((data) => {
|
|
166
|
-
this.setOpenStateWithoutDebounce(data);
|
|
167
|
-
if (this.nzHostSubmenuService) {
|
|
168
|
-
this.nzHostSubmenuService.isChildSubMenuOpen$.next(data);
|
|
169
|
-
} else {
|
|
170
|
-
this.nzMenuService.isChildSubMenuOpen$.next(data);
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSubmenuService, deps: [], target: FactoryTarget.Injectable });
|
|
175
|
-
static \u0275prov = \u0275\u0275ngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSubmenuService });
|
|
176
|
-
};
|
|
177
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSubmenuService, decorators: [{
|
|
178
|
-
type: Injectable
|
|
179
|
-
}], ctorParameters: () => [] });
|
|
180
|
-
var NzMenuItemComponent = class _NzMenuItemComponent {
|
|
181
|
-
nzMenuService = inject(MenuService);
|
|
182
|
-
destroyRef = inject(DestroyRef);
|
|
183
|
-
cdr = inject(ChangeDetectorRef);
|
|
184
|
-
nzSubmenuService = inject(NzSubmenuService, { optional: true });
|
|
185
|
-
directionality = inject(Directionality);
|
|
186
|
-
routerLink = inject(RouterLink, { optional: true });
|
|
187
|
-
router = inject(Router, { optional: true });
|
|
188
|
-
isMenuInsideDropDown = inject(NzIsMenuInsideDropDownToken);
|
|
189
|
-
level = this.nzSubmenuService ? this.nzSubmenuService.level + 1 : 1;
|
|
190
|
-
selected$ = new Subject();
|
|
191
|
-
inlinePaddingLeft = null;
|
|
192
|
-
dir = "ltr";
|
|
193
|
-
nzPaddingLeft;
|
|
194
|
-
nzDisabled = false;
|
|
195
|
-
nzSelected = false;
|
|
196
|
-
nzDanger = false;
|
|
197
|
-
nzMatchRouterExact = false;
|
|
198
|
-
nzMatchRouter = false;
|
|
199
|
-
listOfRouterLink;
|
|
200
|
-
/** clear all item selected status except this */
|
|
201
|
-
clickMenuItem(e) {
|
|
202
|
-
if (this.nzDisabled) {
|
|
203
|
-
e.preventDefault();
|
|
204
|
-
e.stopPropagation();
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
this.nzMenuService.onDescendantMenuItemClick(this);
|
|
208
|
-
if (this.nzSubmenuService) {
|
|
209
|
-
this.nzSubmenuService.onChildMenuItemClick(this);
|
|
210
|
-
} else {
|
|
211
|
-
this.nzMenuService.onChildMenuItemClick(this);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
setSelectedState(value) {
|
|
215
|
-
this.nzSelected = value;
|
|
216
|
-
this.selected$.next(value);
|
|
217
|
-
}
|
|
218
|
-
updateRouterActive() {
|
|
219
|
-
if (!this.listOfRouterLink || !this.router || !this.router.navigated || !this.nzMatchRouter) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
Promise.resolve().then(() => {
|
|
223
|
-
const hasActiveLinks = this.hasActiveLinks();
|
|
224
|
-
if (this.nzSelected !== hasActiveLinks) {
|
|
225
|
-
this.nzSelected = hasActiveLinks;
|
|
226
|
-
this.setSelectedState(this.nzSelected);
|
|
227
|
-
this.cdr.markForCheck();
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
hasActiveLinks() {
|
|
232
|
-
const isActiveCheckFn = this.isLinkActive(this.router);
|
|
233
|
-
return this.routerLink && isActiveCheckFn(this.routerLink) || this.listOfRouterLink.some(isActiveCheckFn);
|
|
234
|
-
}
|
|
235
|
-
isLinkActive(router) {
|
|
236
|
-
return (link) => router.isActive(link.urlTree || "", {
|
|
237
|
-
paths: this.nzMatchRouterExact ? "exact" : "subset",
|
|
238
|
-
queryParams: this.nzMatchRouterExact ? "exact" : "subset",
|
|
239
|
-
fragment: "ignored",
|
|
240
|
-
matrixParams: "ignored"
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
constructor() {
|
|
244
|
-
this.router?.events.pipe(takeUntilDestroyed(), filter((e) => e instanceof NavigationEnd)).subscribe(() => this.updateRouterActive());
|
|
245
|
-
}
|
|
246
|
-
ngOnInit() {
|
|
247
|
-
combineLatest([this.nzMenuService.mode$, this.nzMenuService.inlineIndent$]).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(([mode, inlineIndent]) => {
|
|
248
|
-
this.inlinePaddingLeft = mode === "inline" ? this.level * inlineIndent : null;
|
|
249
|
-
});
|
|
250
|
-
this.dir = this.directionality.value;
|
|
251
|
-
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
|
|
252
|
-
this.dir = direction;
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
ngAfterContentInit() {
|
|
256
|
-
this.listOfRouterLink.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.updateRouterActive());
|
|
257
|
-
this.updateRouterActive();
|
|
258
|
-
}
|
|
259
|
-
ngOnChanges(changes) {
|
|
260
|
-
const { nzSelected } = changes;
|
|
261
|
-
if (nzSelected) {
|
|
262
|
-
this.setSelectedState(this.nzSelected);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMenuItemComponent, deps: [], target: FactoryTarget.Component });
|
|
266
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "16.1.0", version: "20.3.0", type: _NzMenuItemComponent, isStandalone: true, selector: "[nz-menu-item]", inputs: { nzPaddingLeft: ["nzPaddingLeft", "nzPaddingLeft", numberAttributeWithZeroFallback], nzDisabled: ["nzDisabled", "nzDisabled", booleanAttribute], nzSelected: ["nzSelected", "nzSelected", booleanAttribute], nzDanger: ["nzDanger", "nzDanger", booleanAttribute], nzMatchRouterExact: ["nzMatchRouterExact", "nzMatchRouterExact", booleanAttribute], nzMatchRouter: ["nzMatchRouter", "nzMatchRouter", booleanAttribute] }, host: { listeners: { "click": "clickMenuItem($event)" }, properties: { "class.ant-dropdown-menu-item": "isMenuInsideDropDown", "class.ant-dropdown-menu-item-selected": "isMenuInsideDropDown && nzSelected", "class.ant-dropdown-menu-item-danger": "isMenuInsideDropDown && nzDanger", "class.ant-dropdown-menu-item-disabled": "isMenuInsideDropDown && nzDisabled", "class.ant-menu-item": "!isMenuInsideDropDown", "class.ant-menu-item-selected": "!isMenuInsideDropDown && nzSelected", "class.ant-menu-item-danger": "!isMenuInsideDropDown && nzDanger", "class.ant-menu-item-disabled": "!isMenuInsideDropDown && nzDisabled", "style.paddingLeft.px": "dir === 'rtl' ? null : nzPaddingLeft || inlinePaddingLeft", "style.paddingRight.px": "dir === 'rtl' ? nzPaddingLeft || inlinePaddingLeft : null" } }, queries: [{ propertyName: "listOfRouterLink", predicate: RouterLink, descendants: true }], exportAs: ["nzMenuItem"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
267
|
-
<span class="ant-menu-title-content">
|
|
268
|
-
<ng-content></ng-content>
|
|
269
|
-
</span>
|
|
270
|
-
`, isInline: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
271
|
-
};
|
|
272
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMenuItemComponent, decorators: [{
|
|
273
|
-
type: Component,
|
|
274
|
-
args: [{
|
|
275
|
-
selector: "[nz-menu-item]",
|
|
276
|
-
exportAs: "nzMenuItem",
|
|
277
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
278
|
-
encapsulation: ViewEncapsulation.None,
|
|
279
|
-
template: `
|
|
280
|
-
<span class="ant-menu-title-content">
|
|
281
|
-
<ng-content></ng-content>
|
|
282
|
-
</span>
|
|
283
|
-
`,
|
|
284
|
-
host: {
|
|
285
|
-
"[class.ant-dropdown-menu-item]": `isMenuInsideDropDown`,
|
|
286
|
-
"[class.ant-dropdown-menu-item-selected]": `isMenuInsideDropDown && nzSelected`,
|
|
287
|
-
"[class.ant-dropdown-menu-item-danger]": `isMenuInsideDropDown && nzDanger`,
|
|
288
|
-
"[class.ant-dropdown-menu-item-disabled]": `isMenuInsideDropDown && nzDisabled`,
|
|
289
|
-
"[class.ant-menu-item]": `!isMenuInsideDropDown`,
|
|
290
|
-
"[class.ant-menu-item-selected]": `!isMenuInsideDropDown && nzSelected`,
|
|
291
|
-
"[class.ant-menu-item-danger]": `!isMenuInsideDropDown && nzDanger`,
|
|
292
|
-
"[class.ant-menu-item-disabled]": `!isMenuInsideDropDown && nzDisabled`,
|
|
293
|
-
"[style.paddingLeft.px]": `dir === 'rtl' ? null : nzPaddingLeft || inlinePaddingLeft`,
|
|
294
|
-
"[style.paddingRight.px]": `dir === 'rtl' ? nzPaddingLeft || inlinePaddingLeft : null`,
|
|
295
|
-
"(click)": "clickMenuItem($event)"
|
|
296
|
-
}
|
|
297
|
-
}]
|
|
298
|
-
}], ctorParameters: () => [], propDecorators: { nzPaddingLeft: [{
|
|
299
|
-
type: Input,
|
|
300
|
-
args: [{ transform: numberAttributeWithZeroFallback }]
|
|
301
|
-
}], nzDisabled: [{
|
|
302
|
-
type: Input,
|
|
303
|
-
args: [{ transform: booleanAttribute }]
|
|
304
|
-
}], nzSelected: [{
|
|
305
|
-
type: Input,
|
|
306
|
-
args: [{ transform: booleanAttribute }]
|
|
307
|
-
}], nzDanger: [{
|
|
308
|
-
type: Input,
|
|
309
|
-
args: [{ transform: booleanAttribute }]
|
|
310
|
-
}], nzMatchRouterExact: [{
|
|
311
|
-
type: Input,
|
|
312
|
-
args: [{ transform: booleanAttribute }]
|
|
313
|
-
}], nzMatchRouter: [{
|
|
314
|
-
type: Input,
|
|
315
|
-
args: [{ transform: booleanAttribute }]
|
|
316
|
-
}], listOfRouterLink: [{
|
|
317
|
-
type: ContentChildren,
|
|
318
|
-
args: [RouterLink, { descendants: true }]
|
|
319
|
-
}] } });
|
|
320
|
-
var NzSubmenuInlineChildComponent = class _NzSubmenuInlineChildComponent {
|
|
321
|
-
elementRef = inject(ElementRef);
|
|
322
|
-
renderer = inject(Renderer2);
|
|
323
|
-
directionality = inject(Directionality);
|
|
324
|
-
destroyRef = inject(DestroyRef);
|
|
325
|
-
templateOutlet = null;
|
|
326
|
-
menuClass = "";
|
|
327
|
-
mode = "vertical";
|
|
328
|
-
nzOpen = false;
|
|
329
|
-
listOfCacheClassName = [];
|
|
330
|
-
expandState = "collapsed";
|
|
331
|
-
dir = "ltr";
|
|
332
|
-
calcMotionState() {
|
|
333
|
-
this.expandState = this.nzOpen ? "expanded" : "collapsed";
|
|
334
|
-
}
|
|
335
|
-
ngOnInit() {
|
|
336
|
-
this.calcMotionState();
|
|
337
|
-
this.dir = this.directionality.value;
|
|
338
|
-
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
|
|
339
|
-
this.dir = direction;
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
ngOnChanges(changes) {
|
|
343
|
-
const { mode, nzOpen, menuClass } = changes;
|
|
344
|
-
if (mode || nzOpen) {
|
|
345
|
-
this.calcMotionState();
|
|
346
|
-
}
|
|
347
|
-
if (menuClass) {
|
|
348
|
-
if (this.listOfCacheClassName.length) {
|
|
349
|
-
this.listOfCacheClassName.forEach((className) => {
|
|
350
|
-
if (className) {
|
|
351
|
-
this.renderer.removeClass(this.elementRef.nativeElement, className);
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
if (this.menuClass) {
|
|
356
|
-
this.listOfCacheClassName = this.menuClass.split(" ");
|
|
357
|
-
this.listOfCacheClassName.forEach((className) => {
|
|
358
|
-
if (className) {
|
|
359
|
-
this.renderer.addClass(this.elementRef.nativeElement, className);
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSubmenuInlineChildComponent, deps: [], target: FactoryTarget.Component });
|
|
366
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzSubmenuInlineChildComponent, isStandalone: true, selector: "[nz-submenu-inline-child]", inputs: { templateOutlet: "templateOutlet", menuClass: "menuClass", mode: "mode", nzOpen: "nzOpen" }, host: { properties: { "class.ant-menu-rtl": "dir === 'rtl'", "@collapseMotion": "expandState" }, classAttribute: "ant-menu ant-menu-inline ant-menu-sub" }, exportAs: ["nzSubmenuInlineChild"], usesOnChanges: true, ngImport: core_exports, template: `<ng-template [ngTemplateOutlet]="templateOutlet"></ng-template>`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [collapseMotion], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
367
|
-
};
|
|
368
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSubmenuInlineChildComponent, decorators: [{
|
|
369
|
-
type: Component,
|
|
370
|
-
args: [{
|
|
371
|
-
selector: "[nz-submenu-inline-child]",
|
|
372
|
-
animations: [collapseMotion],
|
|
373
|
-
exportAs: "nzSubmenuInlineChild",
|
|
374
|
-
encapsulation: ViewEncapsulation.None,
|
|
375
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
376
|
-
template: `<ng-template [ngTemplateOutlet]="templateOutlet"></ng-template>`,
|
|
377
|
-
host: {
|
|
378
|
-
class: "ant-menu ant-menu-inline ant-menu-sub",
|
|
379
|
-
"[class.ant-menu-rtl]": `dir === 'rtl'`,
|
|
380
|
-
"[@collapseMotion]": "expandState"
|
|
381
|
-
},
|
|
382
|
-
imports: [NgTemplateOutlet]
|
|
383
|
-
}]
|
|
384
|
-
}], propDecorators: { templateOutlet: [{
|
|
385
|
-
type: Input
|
|
386
|
-
}], menuClass: [{
|
|
387
|
-
type: Input
|
|
388
|
-
}], mode: [{
|
|
389
|
-
type: Input
|
|
390
|
-
}], nzOpen: [{
|
|
391
|
-
type: Input
|
|
392
|
-
}] } });
|
|
393
|
-
var NzSubmenuNoneInlineChildComponent = class _NzSubmenuNoneInlineChildComponent {
|
|
394
|
-
directionality = inject(Directionality);
|
|
395
|
-
destroyRef = inject(DestroyRef);
|
|
396
|
-
menuClass = "";
|
|
397
|
-
theme = "light";
|
|
398
|
-
templateOutlet = null;
|
|
399
|
-
isMenuInsideDropDown = false;
|
|
400
|
-
mode = "vertical";
|
|
401
|
-
nzTriggerSubMenuAction = "hover";
|
|
402
|
-
position = "right";
|
|
403
|
-
nzDisabled = false;
|
|
404
|
-
nzOpen = false;
|
|
405
|
-
subMenuMouseState = new EventEmitter();
|
|
406
|
-
expandState = "collapsed";
|
|
407
|
-
dir = "ltr";
|
|
408
|
-
setMouseState(state) {
|
|
409
|
-
if (!this.nzDisabled && this.nzTriggerSubMenuAction === "hover") {
|
|
410
|
-
this.subMenuMouseState.next(state);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
calcMotionState() {
|
|
414
|
-
if (this.nzOpen) {
|
|
415
|
-
if (this.mode === "horizontal") {
|
|
416
|
-
this.expandState = "bottom";
|
|
417
|
-
} else if (this.mode === "vertical") {
|
|
418
|
-
this.expandState = "active";
|
|
419
|
-
}
|
|
420
|
-
} else {
|
|
421
|
-
this.expandState = "collapsed";
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
ngOnInit() {
|
|
425
|
-
this.calcMotionState();
|
|
426
|
-
this.dir = this.directionality.value;
|
|
427
|
-
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
|
|
428
|
-
this.dir = direction;
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
ngOnChanges(changes) {
|
|
432
|
-
const { mode, nzOpen } = changes;
|
|
433
|
-
if (mode || nzOpen) {
|
|
434
|
-
this.calcMotionState();
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSubmenuNoneInlineChildComponent, deps: [], target: FactoryTarget.Component });
|
|
438
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzSubmenuNoneInlineChildComponent, isStandalone: true, selector: "[nz-submenu-none-inline-child]", inputs: { menuClass: "menuClass", theme: "theme", templateOutlet: "templateOutlet", isMenuInsideDropDown: "isMenuInsideDropDown", mode: "mode", nzTriggerSubMenuAction: "nzTriggerSubMenuAction", position: "position", nzDisabled: "nzDisabled", nzOpen: "nzOpen" }, outputs: { subMenuMouseState: "subMenuMouseState" }, host: { listeners: { "mouseenter": "setMouseState(true)", "mouseleave": "setMouseState(false)" }, properties: { "class.ant-menu-light": "theme === 'light'", "class.ant-menu-dark": "theme === 'dark'", "class.ant-menu-submenu-placement-bottom": "mode === 'horizontal'", "class.ant-menu-submenu-placement-right": "mode === 'vertical' && position === 'right'", "class.ant-menu-submenu-placement-left": "mode === 'vertical' && position === 'left'", "class.ant-menu-submenu-rtl": 'dir ==="rtl"', "@slideMotion": "expandState", "@zoomBigMotion": "expandState" }, classAttribute: "ant-menu-submenu ant-menu-submenu-popup" }, exportAs: ["nzSubmenuNoneInlineChild"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
439
|
-
<div
|
|
440
|
-
[class.ant-dropdown-menu]="isMenuInsideDropDown"
|
|
441
|
-
[class.ant-menu]="!isMenuInsideDropDown"
|
|
442
|
-
[class.ant-dropdown-menu-vertical]="isMenuInsideDropDown"
|
|
443
|
-
[class.ant-menu-vertical]="!isMenuInsideDropDown"
|
|
444
|
-
[class.ant-dropdown-menu-sub]="isMenuInsideDropDown"
|
|
445
|
-
[class.ant-menu-sub]="!isMenuInsideDropDown"
|
|
446
|
-
[class.ant-menu-rtl]="dir === 'rtl'"
|
|
447
|
-
[class]="menuClass"
|
|
448
|
-
>
|
|
449
|
-
<ng-template [ngTemplateOutlet]="templateOutlet"></ng-template>
|
|
450
|
-
</div>
|
|
451
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [zoomBigMotion, slideMotion], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
452
|
-
};
|
|
453
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSubmenuNoneInlineChildComponent, decorators: [{
|
|
454
|
-
type: Component,
|
|
455
|
-
args: [{
|
|
456
|
-
selector: "[nz-submenu-none-inline-child]",
|
|
457
|
-
exportAs: "nzSubmenuNoneInlineChild",
|
|
458
|
-
encapsulation: ViewEncapsulation.None,
|
|
459
|
-
animations: [zoomBigMotion, slideMotion],
|
|
460
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
461
|
-
template: `
|
|
462
|
-
<div
|
|
463
|
-
[class.ant-dropdown-menu]="isMenuInsideDropDown"
|
|
464
|
-
[class.ant-menu]="!isMenuInsideDropDown"
|
|
465
|
-
[class.ant-dropdown-menu-vertical]="isMenuInsideDropDown"
|
|
466
|
-
[class.ant-menu-vertical]="!isMenuInsideDropDown"
|
|
467
|
-
[class.ant-dropdown-menu-sub]="isMenuInsideDropDown"
|
|
468
|
-
[class.ant-menu-sub]="!isMenuInsideDropDown"
|
|
469
|
-
[class.ant-menu-rtl]="dir === 'rtl'"
|
|
470
|
-
[class]="menuClass"
|
|
471
|
-
>
|
|
472
|
-
<ng-template [ngTemplateOutlet]="templateOutlet"></ng-template>
|
|
473
|
-
</div>
|
|
474
|
-
`,
|
|
475
|
-
host: {
|
|
476
|
-
class: "ant-menu-submenu ant-menu-submenu-popup",
|
|
477
|
-
"[class.ant-menu-light]": "theme === 'light'",
|
|
478
|
-
"[class.ant-menu-dark]": "theme === 'dark'",
|
|
479
|
-
"[class.ant-menu-submenu-placement-bottom]": "mode === 'horizontal'",
|
|
480
|
-
"[class.ant-menu-submenu-placement-right]": "mode === 'vertical' && position === 'right'",
|
|
481
|
-
"[class.ant-menu-submenu-placement-left]": "mode === 'vertical' && position === 'left'",
|
|
482
|
-
"[class.ant-menu-submenu-rtl]": 'dir ==="rtl"',
|
|
483
|
-
"[@slideMotion]": "expandState",
|
|
484
|
-
"[@zoomBigMotion]": "expandState",
|
|
485
|
-
"(mouseenter)": "setMouseState(true)",
|
|
486
|
-
"(mouseleave)": "setMouseState(false)"
|
|
487
|
-
},
|
|
488
|
-
imports: [NgTemplateOutlet]
|
|
489
|
-
}]
|
|
490
|
-
}], propDecorators: { menuClass: [{
|
|
491
|
-
type: Input
|
|
492
|
-
}], theme: [{
|
|
493
|
-
type: Input
|
|
494
|
-
}], templateOutlet: [{
|
|
495
|
-
type: Input
|
|
496
|
-
}], isMenuInsideDropDown: [{
|
|
497
|
-
type: Input
|
|
498
|
-
}], mode: [{
|
|
499
|
-
type: Input
|
|
500
|
-
}], nzTriggerSubMenuAction: [{
|
|
501
|
-
type: Input
|
|
502
|
-
}], position: [{
|
|
503
|
-
type: Input
|
|
504
|
-
}], nzDisabled: [{
|
|
505
|
-
type: Input
|
|
506
|
-
}], nzOpen: [{
|
|
507
|
-
type: Input
|
|
508
|
-
}], subMenuMouseState: [{
|
|
509
|
-
type: Output
|
|
510
|
-
}] } });
|
|
511
|
-
var NzSubMenuTitleComponent = class _NzSubMenuTitleComponent {
|
|
512
|
-
destroyRef = inject(DestroyRef);
|
|
513
|
-
cdr = inject(ChangeDetectorRef);
|
|
514
|
-
directionality = inject(Directionality);
|
|
515
|
-
nzIcon = null;
|
|
516
|
-
nzTitle = null;
|
|
517
|
-
isMenuInsideDropDown = false;
|
|
518
|
-
nzDisabled = false;
|
|
519
|
-
paddingLeft = null;
|
|
520
|
-
mode = "vertical";
|
|
521
|
-
nzTriggerSubMenuAction = "hover";
|
|
522
|
-
toggleSubMenu = new EventEmitter();
|
|
523
|
-
subMenuMouseState = new EventEmitter();
|
|
524
|
-
dir = "ltr";
|
|
525
|
-
ngOnInit() {
|
|
526
|
-
this.dir = this.directionality.value;
|
|
527
|
-
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
|
|
528
|
-
this.dir = direction;
|
|
529
|
-
this.cdr.detectChanges();
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
setMouseState(state) {
|
|
533
|
-
if (!this.nzDisabled && this.nzTriggerSubMenuAction === "hover") {
|
|
534
|
-
this.subMenuMouseState.next(state);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
clickTitle() {
|
|
538
|
-
if ((this.mode === "inline" || this.nzTriggerSubMenuAction === "click") && !this.nzDisabled) {
|
|
539
|
-
this.subMenuMouseState.next(true);
|
|
540
|
-
this.toggleSubMenu.emit();
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSubMenuTitleComponent, deps: [], target: FactoryTarget.Component });
|
|
544
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzSubMenuTitleComponent, isStandalone: true, selector: "[nz-submenu-title]", inputs: { nzIcon: "nzIcon", nzTitle: "nzTitle", isMenuInsideDropDown: "isMenuInsideDropDown", nzDisabled: "nzDisabled", paddingLeft: "paddingLeft", mode: "mode", nzTriggerSubMenuAction: "nzTriggerSubMenuAction" }, outputs: { toggleSubMenu: "toggleSubMenu", subMenuMouseState: "subMenuMouseState" }, host: { listeners: { "click": "clickTitle()", "mouseenter": "setMouseState(true)", "mouseleave": "setMouseState(false)" }, properties: { "class.ant-dropdown-menu-submenu-title": "isMenuInsideDropDown", "class.ant-menu-submenu-title": "!isMenuInsideDropDown", "style.paddingLeft.px": "dir === 'rtl' ? null : paddingLeft ", "style.paddingRight.px": "dir === 'rtl' ? paddingLeft : null" } }, exportAs: ["nzSubmenuTitle"], ngImport: core_exports, template: `
|
|
545
|
-
@if (nzIcon) {
|
|
546
|
-
<nz-icon [nzType]="nzIcon" />
|
|
547
|
-
}
|
|
548
|
-
<ng-container *nzStringTemplateOutlet="nzTitle">
|
|
549
|
-
<span class="ant-menu-title-content">{{ nzTitle }}</span>
|
|
550
|
-
</ng-container>
|
|
551
|
-
<ng-content />
|
|
552
|
-
@if (isMenuInsideDropDown) {
|
|
553
|
-
<span class="ant-dropdown-menu-submenu-expand-icon">
|
|
554
|
-
@switch (dir) {
|
|
555
|
-
@case ('rtl') {
|
|
556
|
-
<nz-icon nzType="left" class="ant-dropdown-menu-submenu-arrow-icon" />
|
|
557
|
-
}
|
|
558
|
-
@default {
|
|
559
|
-
<nz-icon nzType="right" class="ant-dropdown-menu-submenu-arrow-icon" />
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
</span>
|
|
563
|
-
} @else {
|
|
564
|
-
<span class="ant-menu-submenu-arrow"></span>
|
|
565
|
-
}
|
|
566
|
-
`, 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 });
|
|
567
|
-
};
|
|
568
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSubMenuTitleComponent, decorators: [{
|
|
569
|
-
type: Component,
|
|
570
|
-
args: [{
|
|
571
|
-
selector: "[nz-submenu-title]",
|
|
572
|
-
exportAs: "nzSubmenuTitle",
|
|
573
|
-
encapsulation: ViewEncapsulation.None,
|
|
574
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
575
|
-
template: `
|
|
576
|
-
@if (nzIcon) {
|
|
577
|
-
<nz-icon [nzType]="nzIcon" />
|
|
578
|
-
}
|
|
579
|
-
<ng-container *nzStringTemplateOutlet="nzTitle">
|
|
580
|
-
<span class="ant-menu-title-content">{{ nzTitle }}</span>
|
|
581
|
-
</ng-container>
|
|
582
|
-
<ng-content />
|
|
583
|
-
@if (isMenuInsideDropDown) {
|
|
584
|
-
<span class="ant-dropdown-menu-submenu-expand-icon">
|
|
585
|
-
@switch (dir) {
|
|
586
|
-
@case ('rtl') {
|
|
587
|
-
<nz-icon nzType="left" class="ant-dropdown-menu-submenu-arrow-icon" />
|
|
588
|
-
}
|
|
589
|
-
@default {
|
|
590
|
-
<nz-icon nzType="right" class="ant-dropdown-menu-submenu-arrow-icon" />
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
</span>
|
|
594
|
-
} @else {
|
|
595
|
-
<span class="ant-menu-submenu-arrow"></span>
|
|
596
|
-
}
|
|
597
|
-
`,
|
|
598
|
-
host: {
|
|
599
|
-
"[class.ant-dropdown-menu-submenu-title]": "isMenuInsideDropDown",
|
|
600
|
-
"[class.ant-menu-submenu-title]": "!isMenuInsideDropDown",
|
|
601
|
-
"[style.paddingLeft.px]": `dir === 'rtl' ? null : paddingLeft `,
|
|
602
|
-
"[style.paddingRight.px]": `dir === 'rtl' ? paddingLeft : null`,
|
|
603
|
-
"(click)": "clickTitle()",
|
|
604
|
-
"(mouseenter)": "setMouseState(true)",
|
|
605
|
-
"(mouseleave)": "setMouseState(false)"
|
|
606
|
-
},
|
|
607
|
-
imports: [NzIconModule, NzOutletModule]
|
|
608
|
-
}]
|
|
609
|
-
}], propDecorators: { nzIcon: [{
|
|
610
|
-
type: Input
|
|
611
|
-
}], nzTitle: [{
|
|
612
|
-
type: Input
|
|
613
|
-
}], isMenuInsideDropDown: [{
|
|
614
|
-
type: Input
|
|
615
|
-
}], nzDisabled: [{
|
|
616
|
-
type: Input
|
|
617
|
-
}], paddingLeft: [{
|
|
618
|
-
type: Input
|
|
619
|
-
}], mode: [{
|
|
620
|
-
type: Input
|
|
621
|
-
}], nzTriggerSubMenuAction: [{
|
|
622
|
-
type: Input
|
|
623
|
-
}], toggleSubMenu: [{
|
|
624
|
-
type: Output
|
|
625
|
-
}], subMenuMouseState: [{
|
|
626
|
-
type: Output
|
|
627
|
-
}] } });
|
|
628
|
-
var listOfVerticalPositions = [
|
|
629
|
-
POSITION_MAP.rightTop,
|
|
630
|
-
POSITION_MAP.right,
|
|
631
|
-
POSITION_MAP.rightBottom,
|
|
632
|
-
POSITION_MAP.leftTop,
|
|
633
|
-
POSITION_MAP.left,
|
|
634
|
-
POSITION_MAP.leftBottom
|
|
635
|
-
];
|
|
636
|
-
var listOfHorizontalPositions = [
|
|
637
|
-
POSITION_MAP.bottomLeft,
|
|
638
|
-
POSITION_MAP.bottomRight,
|
|
639
|
-
POSITION_MAP.topRight,
|
|
640
|
-
POSITION_MAP.topLeft
|
|
641
|
-
];
|
|
642
|
-
var NzSubMenuComponent = class _NzSubMenuComponent {
|
|
643
|
-
nzSubmenuService = inject(NzSubmenuService);
|
|
644
|
-
isMenuInsideDropDown = inject(NzIsMenuInsideDropDownToken);
|
|
645
|
-
noAnimation = inject(NzNoAnimationDirective, { optional: true, host: true });
|
|
646
|
-
directionality = inject(Directionality);
|
|
647
|
-
destroyRef = inject(DestroyRef);
|
|
648
|
-
nzMenuService = inject(MenuService);
|
|
649
|
-
cdr = inject(ChangeDetectorRef);
|
|
650
|
-
platform = inject(Platform);
|
|
651
|
-
nzMenuClassName = "";
|
|
652
|
-
nzPaddingLeft = null;
|
|
653
|
-
nzTitle = null;
|
|
654
|
-
nzIcon = null;
|
|
655
|
-
nzTriggerSubMenuAction = "hover";
|
|
656
|
-
nzOpen = false;
|
|
657
|
-
nzDisabled = false;
|
|
658
|
-
nzPlacement = "bottomLeft";
|
|
659
|
-
nzOpenChange = new EventEmitter();
|
|
660
|
-
cdkOverlayOrigin = null;
|
|
661
|
-
// fix errors about circular dependency
|
|
662
|
-
// Can't construct a query for the property ... since the query selector wasn't defined
|
|
663
|
-
listOfNzSubMenuComponent = null;
|
|
664
|
-
listOfNzMenuItemDirective = null;
|
|
665
|
-
level = this.nzSubmenuService.level;
|
|
666
|
-
position = "right";
|
|
667
|
-
triggerWidth = null;
|
|
668
|
-
theme = "light";
|
|
669
|
-
mode = "vertical";
|
|
670
|
-
inlinePaddingLeft = null;
|
|
671
|
-
overlayPositions = listOfVerticalPositions;
|
|
672
|
-
isSelected = false;
|
|
673
|
-
isActive = false;
|
|
674
|
-
dir = "ltr";
|
|
675
|
-
/** set the submenu host open status directly **/
|
|
676
|
-
setOpenStateWithoutDebounce(open) {
|
|
677
|
-
this.nzSubmenuService.setOpenStateWithoutDebounce(open);
|
|
678
|
-
}
|
|
679
|
-
toggleSubMenu() {
|
|
680
|
-
this.setOpenStateWithoutDebounce(!this.nzOpen);
|
|
681
|
-
}
|
|
682
|
-
setMouseEnterState(value) {
|
|
683
|
-
this.isActive = value;
|
|
684
|
-
if (this.mode !== "inline") {
|
|
685
|
-
this.nzSubmenuService.setMouseEnterTitleOrOverlayState(value);
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
setTriggerWidth() {
|
|
689
|
-
if (this.mode === "horizontal" && this.platform.isBrowser && this.cdkOverlayOrigin && this.nzPlacement === "bottomLeft") {
|
|
690
|
-
this.triggerWidth = this.cdkOverlayOrigin.nativeElement.getBoundingClientRect().width;
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
onPositionChange(position) {
|
|
694
|
-
const placement = getPlacementName(position);
|
|
695
|
-
if (placement === "rightTop" || placement === "rightBottom" || placement === "right") {
|
|
696
|
-
this.position = "right";
|
|
697
|
-
} else if (placement === "leftTop" || placement === "leftBottom" || placement === "left") {
|
|
698
|
-
this.position = "left";
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
ngOnInit() {
|
|
702
|
-
this.nzMenuService.theme$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((theme) => {
|
|
703
|
-
this.theme = theme;
|
|
704
|
-
this.cdr.markForCheck();
|
|
705
|
-
});
|
|
706
|
-
this.nzSubmenuService.mode$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((mode) => {
|
|
707
|
-
this.mode = mode;
|
|
708
|
-
if (mode === "horizontal") {
|
|
709
|
-
this.overlayPositions = [POSITION_MAP[this.nzPlacement], ...listOfHorizontalPositions];
|
|
710
|
-
} else if (mode === "vertical") {
|
|
711
|
-
this.overlayPositions = listOfVerticalPositions;
|
|
712
|
-
}
|
|
713
|
-
this.cdr.markForCheck();
|
|
714
|
-
});
|
|
715
|
-
combineLatest([this.nzSubmenuService.mode$, this.nzMenuService.inlineIndent$]).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(([mode, inlineIndent]) => {
|
|
716
|
-
this.inlinePaddingLeft = mode === "inline" ? this.level * inlineIndent : null;
|
|
717
|
-
this.cdr.markForCheck();
|
|
718
|
-
});
|
|
719
|
-
this.nzSubmenuService.isCurrentSubMenuOpen$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((open) => {
|
|
720
|
-
this.isActive = open;
|
|
721
|
-
if (open !== this.nzOpen) {
|
|
722
|
-
this.setTriggerWidth();
|
|
723
|
-
this.nzOpen = open;
|
|
724
|
-
this.nzOpenChange.emit(this.nzOpen);
|
|
725
|
-
this.cdr.markForCheck();
|
|
726
|
-
}
|
|
727
|
-
});
|
|
728
|
-
this.dir = this.directionality.value;
|
|
729
|
-
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
|
|
730
|
-
this.dir = direction;
|
|
731
|
-
this.cdr.markForCheck();
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
ngAfterContentInit() {
|
|
735
|
-
this.setTriggerWidth();
|
|
736
|
-
const listOfNzMenuItemDirective = this.listOfNzMenuItemDirective;
|
|
737
|
-
const changes = listOfNzMenuItemDirective.changes;
|
|
738
|
-
const mergedObservable = merge(changes, ...listOfNzMenuItemDirective.map((menu) => menu.selected$));
|
|
739
|
-
changes.pipe(startWith(listOfNzMenuItemDirective), switchMap(() => mergedObservable), startWith(true), map(() => listOfNzMenuItemDirective.some((e) => e.nzSelected)), takeUntilDestroyed(this.destroyRef)).subscribe((selected) => {
|
|
740
|
-
this.isSelected = selected;
|
|
741
|
-
this.cdr.markForCheck();
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
ngOnChanges(changes) {
|
|
745
|
-
const { nzOpen } = changes;
|
|
746
|
-
if (nzOpen) {
|
|
747
|
-
this.nzSubmenuService.setOpenStateWithoutDebounce(this.nzOpen);
|
|
748
|
-
this.setTriggerWidth();
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzSubMenuComponent, deps: [], target: FactoryTarget.Component });
|
|
752
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzSubMenuComponent, isStandalone: true, selector: "[nz-submenu]", inputs: { nzMenuClassName: "nzMenuClassName", nzPaddingLeft: "nzPaddingLeft", nzTitle: "nzTitle", nzIcon: "nzIcon", nzTriggerSubMenuAction: "nzTriggerSubMenuAction", nzOpen: ["nzOpen", "nzOpen", booleanAttribute], nzDisabled: ["nzDisabled", "nzDisabled", booleanAttribute], nzPlacement: "nzPlacement" }, outputs: { nzOpenChange: "nzOpenChange" }, host: { properties: { "class.ant-dropdown-menu-submenu": "isMenuInsideDropDown", "class.ant-dropdown-menu-submenu-disabled": "isMenuInsideDropDown && nzDisabled", "class.ant-dropdown-menu-submenu-open": "isMenuInsideDropDown && nzOpen", "class.ant-dropdown-menu-submenu-selected": "isMenuInsideDropDown && isSelected", "class.ant-dropdown-menu-submenu-vertical": "isMenuInsideDropDown && mode === 'vertical'", "class.ant-dropdown-menu-submenu-horizontal": "isMenuInsideDropDown && mode === 'horizontal'", "class.ant-dropdown-menu-submenu-inline": "isMenuInsideDropDown && mode === 'inline'", "class.ant-dropdown-menu-submenu-active": "isMenuInsideDropDown && isActive", "class.ant-menu-submenu": "!isMenuInsideDropDown", "class.ant-menu-submenu-disabled": "!isMenuInsideDropDown && nzDisabled", "class.ant-menu-submenu-open": "!isMenuInsideDropDown && nzOpen", "class.ant-menu-submenu-selected": "!isMenuInsideDropDown && isSelected", "class.ant-menu-submenu-vertical": "!isMenuInsideDropDown && mode === 'vertical'", "class.ant-menu-submenu-horizontal": "!isMenuInsideDropDown && mode === 'horizontal'", "class.ant-menu-submenu-inline": "!isMenuInsideDropDown && mode === 'inline'", "class.ant-menu-submenu-active": "!isMenuInsideDropDown && isActive", "class.ant-menu-submenu-rtl": "dir === 'rtl'" } }, providers: [NzSubmenuService], queries: [{ propertyName: "listOfNzSubMenuComponent", predicate: forwardRef(() => _NzSubMenuComponent), descendants: true }, { propertyName: "listOfNzMenuItemDirective", predicate: NzMenuItemComponent, descendants: true }], viewQueries: [{ propertyName: "cdkOverlayOrigin", first: true, predicate: CdkOverlayOrigin, descendants: true, read: ElementRef, static: true }], exportAs: ["nzSubmenu"], usesOnChanges: true, ngImport: core_exports, template: `
|
|
753
|
-
<div
|
|
754
|
-
nz-submenu-title
|
|
755
|
-
cdkOverlayOrigin
|
|
756
|
-
#origin="cdkOverlayOrigin"
|
|
757
|
-
[nzIcon]="nzIcon"
|
|
758
|
-
[nzTitle]="nzTitle"
|
|
759
|
-
[mode]="mode"
|
|
760
|
-
[nzDisabled]="nzDisabled"
|
|
761
|
-
[isMenuInsideDropDown]="isMenuInsideDropDown"
|
|
762
|
-
[paddingLeft]="nzPaddingLeft || inlinePaddingLeft"
|
|
763
|
-
[nzTriggerSubMenuAction]="nzTriggerSubMenuAction"
|
|
764
|
-
(subMenuMouseState)="setMouseEnterState($event)"
|
|
765
|
-
(toggleSubMenu)="toggleSubMenu()"
|
|
766
|
-
>
|
|
767
|
-
@if (!nzTitle) {
|
|
768
|
-
<ng-content select="[title]" />
|
|
769
|
-
}
|
|
770
|
-
</div>
|
|
771
|
-
@if (mode === 'inline') {
|
|
772
|
-
<div
|
|
773
|
-
nz-submenu-inline-child
|
|
774
|
-
[mode]="mode"
|
|
775
|
-
[nzOpen]="nzOpen"
|
|
776
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
777
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
778
|
-
[menuClass]="nzMenuClassName"
|
|
779
|
-
[templateOutlet]="subMenuTemplate"
|
|
780
|
-
></div>
|
|
781
|
-
} @else {
|
|
782
|
-
<ng-template
|
|
783
|
-
cdkConnectedOverlay
|
|
784
|
-
(positionChange)="onPositionChange($event)"
|
|
785
|
-
[cdkConnectedOverlayPositions]="overlayPositions"
|
|
786
|
-
[cdkConnectedOverlayOrigin]="origin"
|
|
787
|
-
[cdkConnectedOverlayWidth]="triggerWidth!"
|
|
788
|
-
[cdkConnectedOverlayOpen]="nzOpen"
|
|
789
|
-
[cdkConnectedOverlayTransformOriginOn]="'.ant-menu-submenu'"
|
|
790
|
-
(overlayOutsideClick)="setMouseEnterState(false)"
|
|
791
|
-
>
|
|
792
|
-
<div
|
|
793
|
-
nz-submenu-none-inline-child
|
|
794
|
-
[theme]="theme"
|
|
795
|
-
[mode]="mode"
|
|
796
|
-
[nzOpen]="nzOpen"
|
|
797
|
-
[position]="position"
|
|
798
|
-
[nzDisabled]="nzDisabled"
|
|
799
|
-
[isMenuInsideDropDown]="isMenuInsideDropDown"
|
|
800
|
-
[nzTriggerSubMenuAction]="nzTriggerSubMenuAction"
|
|
801
|
-
[templateOutlet]="subMenuTemplate"
|
|
802
|
-
[menuClass]="nzMenuClassName"
|
|
803
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
804
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
805
|
-
(subMenuMouseState)="setMouseEnterState($event)"
|
|
806
|
-
></div>
|
|
807
|
-
</ng-template>
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
<ng-template #subMenuTemplate>
|
|
811
|
-
<ng-content />
|
|
812
|
-
</ng-template>
|
|
813
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NzSubMenuTitleComponent, selector: "[nz-submenu-title]", inputs: ["nzIcon", "nzTitle", "isMenuInsideDropDown", "nzDisabled", "paddingLeft", "mode", "nzTriggerSubMenuAction"], outputs: ["toggleSubMenu", "subMenuMouseState"], exportAs: ["nzSubmenuTitle"] }, { kind: "component", type: NzSubmenuInlineChildComponent, selector: "[nz-submenu-inline-child]", inputs: ["templateOutlet", "menuClass", "mode", "nzOpen"], exportAs: ["nzSubmenuInlineChild"] }, { kind: "directive", type: NzNoAnimationDirective, selector: "[nzNoAnimation]", inputs: ["nzNoAnimation"], exportAs: ["nzNoAnimation"] }, { kind: "component", type: NzSubmenuNoneInlineChildComponent, selector: "[nz-submenu-none-inline-child]", inputs: ["menuClass", "theme", "templateOutlet", "isMenuInsideDropDown", "mode", "nzTriggerSubMenuAction", "position", "nzDisabled", "nzOpen"], outputs: ["subMenuMouseState"], exportAs: ["nzSubmenuNoneInlineChild"] }, { kind: "ngmodule", type: OverlayModule }, { 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: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
814
|
-
};
|
|
815
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzSubMenuComponent, decorators: [{
|
|
816
|
-
type: Component,
|
|
817
|
-
args: [{
|
|
818
|
-
selector: "[nz-submenu]",
|
|
819
|
-
exportAs: "nzSubmenu",
|
|
820
|
-
providers: [NzSubmenuService],
|
|
821
|
-
encapsulation: ViewEncapsulation.None,
|
|
822
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
823
|
-
template: `
|
|
824
|
-
<div
|
|
825
|
-
nz-submenu-title
|
|
826
|
-
cdkOverlayOrigin
|
|
827
|
-
#origin="cdkOverlayOrigin"
|
|
828
|
-
[nzIcon]="nzIcon"
|
|
829
|
-
[nzTitle]="nzTitle"
|
|
830
|
-
[mode]="mode"
|
|
831
|
-
[nzDisabled]="nzDisabled"
|
|
832
|
-
[isMenuInsideDropDown]="isMenuInsideDropDown"
|
|
833
|
-
[paddingLeft]="nzPaddingLeft || inlinePaddingLeft"
|
|
834
|
-
[nzTriggerSubMenuAction]="nzTriggerSubMenuAction"
|
|
835
|
-
(subMenuMouseState)="setMouseEnterState($event)"
|
|
836
|
-
(toggleSubMenu)="toggleSubMenu()"
|
|
837
|
-
>
|
|
838
|
-
@if (!nzTitle) {
|
|
839
|
-
<ng-content select="[title]" />
|
|
840
|
-
}
|
|
841
|
-
</div>
|
|
842
|
-
@if (mode === 'inline') {
|
|
843
|
-
<div
|
|
844
|
-
nz-submenu-inline-child
|
|
845
|
-
[mode]="mode"
|
|
846
|
-
[nzOpen]="nzOpen"
|
|
847
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
848
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
849
|
-
[menuClass]="nzMenuClassName"
|
|
850
|
-
[templateOutlet]="subMenuTemplate"
|
|
851
|
-
></div>
|
|
852
|
-
} @else {
|
|
853
|
-
<ng-template
|
|
854
|
-
cdkConnectedOverlay
|
|
855
|
-
(positionChange)="onPositionChange($event)"
|
|
856
|
-
[cdkConnectedOverlayPositions]="overlayPositions"
|
|
857
|
-
[cdkConnectedOverlayOrigin]="origin"
|
|
858
|
-
[cdkConnectedOverlayWidth]="triggerWidth!"
|
|
859
|
-
[cdkConnectedOverlayOpen]="nzOpen"
|
|
860
|
-
[cdkConnectedOverlayTransformOriginOn]="'.ant-menu-submenu'"
|
|
861
|
-
(overlayOutsideClick)="setMouseEnterState(false)"
|
|
862
|
-
>
|
|
863
|
-
<div
|
|
864
|
-
nz-submenu-none-inline-child
|
|
865
|
-
[theme]="theme"
|
|
866
|
-
[mode]="mode"
|
|
867
|
-
[nzOpen]="nzOpen"
|
|
868
|
-
[position]="position"
|
|
869
|
-
[nzDisabled]="nzDisabled"
|
|
870
|
-
[isMenuInsideDropDown]="isMenuInsideDropDown"
|
|
871
|
-
[nzTriggerSubMenuAction]="nzTriggerSubMenuAction"
|
|
872
|
-
[templateOutlet]="subMenuTemplate"
|
|
873
|
-
[menuClass]="nzMenuClassName"
|
|
874
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
875
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
876
|
-
(subMenuMouseState)="setMouseEnterState($event)"
|
|
877
|
-
></div>
|
|
878
|
-
</ng-template>
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
<ng-template #subMenuTemplate>
|
|
882
|
-
<ng-content />
|
|
883
|
-
</ng-template>
|
|
884
|
-
`,
|
|
885
|
-
host: {
|
|
886
|
-
"[class.ant-dropdown-menu-submenu]": `isMenuInsideDropDown`,
|
|
887
|
-
"[class.ant-dropdown-menu-submenu-disabled]": `isMenuInsideDropDown && nzDisabled`,
|
|
888
|
-
"[class.ant-dropdown-menu-submenu-open]": `isMenuInsideDropDown && nzOpen`,
|
|
889
|
-
"[class.ant-dropdown-menu-submenu-selected]": `isMenuInsideDropDown && isSelected`,
|
|
890
|
-
"[class.ant-dropdown-menu-submenu-vertical]": `isMenuInsideDropDown && mode === 'vertical'`,
|
|
891
|
-
"[class.ant-dropdown-menu-submenu-horizontal]": `isMenuInsideDropDown && mode === 'horizontal'`,
|
|
892
|
-
"[class.ant-dropdown-menu-submenu-inline]": `isMenuInsideDropDown && mode === 'inline'`,
|
|
893
|
-
"[class.ant-dropdown-menu-submenu-active]": `isMenuInsideDropDown && isActive`,
|
|
894
|
-
"[class.ant-menu-submenu]": `!isMenuInsideDropDown`,
|
|
895
|
-
"[class.ant-menu-submenu-disabled]": `!isMenuInsideDropDown && nzDisabled`,
|
|
896
|
-
"[class.ant-menu-submenu-open]": `!isMenuInsideDropDown && nzOpen`,
|
|
897
|
-
"[class.ant-menu-submenu-selected]": `!isMenuInsideDropDown && isSelected`,
|
|
898
|
-
"[class.ant-menu-submenu-vertical]": `!isMenuInsideDropDown && mode === 'vertical'`,
|
|
899
|
-
"[class.ant-menu-submenu-horizontal]": `!isMenuInsideDropDown && mode === 'horizontal'`,
|
|
900
|
-
"[class.ant-menu-submenu-inline]": `!isMenuInsideDropDown && mode === 'inline'`,
|
|
901
|
-
"[class.ant-menu-submenu-active]": `!isMenuInsideDropDown && isActive`,
|
|
902
|
-
"[class.ant-menu-submenu-rtl]": `dir === 'rtl'`
|
|
903
|
-
},
|
|
904
|
-
imports: [
|
|
905
|
-
NzSubMenuTitleComponent,
|
|
906
|
-
NzSubmenuInlineChildComponent,
|
|
907
|
-
NzNoAnimationDirective,
|
|
908
|
-
NzSubmenuNoneInlineChildComponent,
|
|
909
|
-
OverlayModule
|
|
910
|
-
]
|
|
911
|
-
}]
|
|
912
|
-
}], propDecorators: { nzMenuClassName: [{
|
|
913
|
-
type: Input
|
|
914
|
-
}], nzPaddingLeft: [{
|
|
915
|
-
type: Input
|
|
916
|
-
}], nzTitle: [{
|
|
917
|
-
type: Input
|
|
918
|
-
}], nzIcon: [{
|
|
919
|
-
type: Input
|
|
920
|
-
}], nzTriggerSubMenuAction: [{
|
|
921
|
-
type: Input
|
|
922
|
-
}], nzOpen: [{
|
|
923
|
-
type: Input,
|
|
924
|
-
args: [{ transform: booleanAttribute }]
|
|
925
|
-
}], nzDisabled: [{
|
|
926
|
-
type: Input,
|
|
927
|
-
args: [{ transform: booleanAttribute }]
|
|
928
|
-
}], nzPlacement: [{
|
|
929
|
-
type: Input
|
|
930
|
-
}], nzOpenChange: [{
|
|
931
|
-
type: Output
|
|
932
|
-
}], cdkOverlayOrigin: [{
|
|
933
|
-
type: ViewChild,
|
|
934
|
-
args: [CdkOverlayOrigin, { static: true, read: ElementRef }]
|
|
935
|
-
}], listOfNzSubMenuComponent: [{
|
|
936
|
-
type: ContentChildren,
|
|
937
|
-
args: [forwardRef(() => NzSubMenuComponent), { descendants: true }]
|
|
938
|
-
}], listOfNzMenuItemDirective: [{
|
|
939
|
-
type: ContentChildren,
|
|
940
|
-
args: [NzMenuItemComponent, { descendants: true }]
|
|
941
|
-
}] } });
|
|
942
|
-
function MenuServiceFactory() {
|
|
943
|
-
const serviceInsideDropDown = inject(MenuService, { skipSelf: true, optional: true });
|
|
944
|
-
const serviceOutsideDropDown = inject(NzMenuServiceLocalToken);
|
|
945
|
-
return serviceInsideDropDown ?? serviceOutsideDropDown;
|
|
946
|
-
}
|
|
947
|
-
function MenuDropDownTokenFactory() {
|
|
948
|
-
const isMenuInsideDropDownToken = inject(NzIsMenuInsideDropDownToken, { skipSelf: true, optional: true });
|
|
949
|
-
return isMenuInsideDropDownToken ?? false;
|
|
950
|
-
}
|
|
951
|
-
var NzMenuDirective = class _NzMenuDirective {
|
|
952
|
-
nzMenuService = inject(MenuService);
|
|
953
|
-
destroyRef = inject(DestroyRef);
|
|
954
|
-
cdr = inject(ChangeDetectorRef);
|
|
955
|
-
directionality = inject(Directionality);
|
|
956
|
-
listOfNzMenuItemDirective;
|
|
957
|
-
isMenuInsideDropDown = inject(NzIsMenuInsideDropDownToken);
|
|
958
|
-
listOfNzSubMenuComponent;
|
|
959
|
-
nzInlineIndent = 24;
|
|
960
|
-
nzTheme = "light";
|
|
961
|
-
nzMode = "vertical";
|
|
962
|
-
nzInlineCollapsed = false;
|
|
963
|
-
nzSelectable = !this.isMenuInsideDropDown;
|
|
964
|
-
nzClick = new EventEmitter();
|
|
965
|
-
actualMode = "vertical";
|
|
966
|
-
dir = "ltr";
|
|
967
|
-
inlineCollapsed$ = new BehaviorSubject(this.nzInlineCollapsed);
|
|
968
|
-
mode$ = new BehaviorSubject(this.nzMode);
|
|
969
|
-
listOfOpenedNzSubMenuComponent = [];
|
|
970
|
-
setInlineCollapsed(inlineCollapsed) {
|
|
971
|
-
this.nzInlineCollapsed = inlineCollapsed;
|
|
972
|
-
this.inlineCollapsed$.next(inlineCollapsed);
|
|
973
|
-
}
|
|
974
|
-
updateInlineCollapse() {
|
|
975
|
-
if (this.listOfNzMenuItemDirective) {
|
|
976
|
-
if (this.nzInlineCollapsed) {
|
|
977
|
-
this.listOfOpenedNzSubMenuComponent = this.listOfNzSubMenuComponent.filter((submenu) => submenu.nzOpen);
|
|
978
|
-
this.listOfNzSubMenuComponent.forEach((submenu) => submenu.setOpenStateWithoutDebounce(false));
|
|
979
|
-
} else {
|
|
980
|
-
this.listOfOpenedNzSubMenuComponent.forEach((submenu) => submenu.setOpenStateWithoutDebounce(true));
|
|
981
|
-
this.listOfOpenedNzSubMenuComponent = [];
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
ngOnInit() {
|
|
986
|
-
combineLatest([this.inlineCollapsed$, this.mode$]).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(([inlineCollapsed, mode]) => {
|
|
987
|
-
this.actualMode = inlineCollapsed ? "vertical" : mode;
|
|
988
|
-
this.nzMenuService.setMode(this.actualMode);
|
|
989
|
-
this.cdr.markForCheck();
|
|
990
|
-
});
|
|
991
|
-
this.nzMenuService.descendantMenuItemClick$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((menu) => {
|
|
992
|
-
this.nzClick.emit(menu);
|
|
993
|
-
if (this.nzSelectable && !menu.nzMatchRouter) {
|
|
994
|
-
this.listOfNzMenuItemDirective.forEach((item) => item.setSelectedState(item === menu));
|
|
995
|
-
}
|
|
996
|
-
});
|
|
997
|
-
this.dir = this.directionality.value;
|
|
998
|
-
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
|
|
999
|
-
this.dir = direction;
|
|
1000
|
-
this.nzMenuService.setMode(this.actualMode);
|
|
1001
|
-
this.cdr.markForCheck();
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
ngAfterContentInit() {
|
|
1005
|
-
this.inlineCollapsed$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
1006
|
-
this.updateInlineCollapse();
|
|
1007
|
-
this.cdr.markForCheck();
|
|
1008
|
-
});
|
|
1009
|
-
}
|
|
1010
|
-
ngOnChanges(changes) {
|
|
1011
|
-
const { nzInlineCollapsed, nzInlineIndent, nzTheme, nzMode } = changes;
|
|
1012
|
-
if (nzInlineCollapsed) {
|
|
1013
|
-
this.inlineCollapsed$.next(this.nzInlineCollapsed);
|
|
1014
|
-
}
|
|
1015
|
-
if (nzInlineIndent) {
|
|
1016
|
-
this.nzMenuService.setInlineIndent(this.nzInlineIndent);
|
|
1017
|
-
}
|
|
1018
|
-
if (nzTheme) {
|
|
1019
|
-
this.nzMenuService.setTheme(this.nzTheme);
|
|
1020
|
-
}
|
|
1021
|
-
if (nzMode) {
|
|
1022
|
-
this.mode$.next(this.nzMode);
|
|
1023
|
-
if (!nzMode.isFirstChange() && this.listOfNzSubMenuComponent) {
|
|
1024
|
-
this.listOfNzSubMenuComponent.forEach((submenu) => submenu.setOpenStateWithoutDebounce(false));
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMenuDirective, deps: [], target: FactoryTarget.Directive });
|
|
1029
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "16.1.0", version: "20.3.0", type: _NzMenuDirective, isStandalone: true, selector: "[nz-menu]", inputs: { nzInlineIndent: "nzInlineIndent", nzTheme: "nzTheme", nzMode: "nzMode", nzInlineCollapsed: ["nzInlineCollapsed", "nzInlineCollapsed", booleanAttribute], nzSelectable: ["nzSelectable", "nzSelectable", booleanAttribute] }, outputs: { nzClick: "nzClick" }, host: { properties: { "class.ant-dropdown-menu": "isMenuInsideDropDown", "class.ant-dropdown-menu-root": "isMenuInsideDropDown", "class.ant-dropdown-menu-light": "isMenuInsideDropDown && nzTheme === 'light'", "class.ant-dropdown-menu-dark": "isMenuInsideDropDown && nzTheme === 'dark'", "class.ant-dropdown-menu-vertical": "isMenuInsideDropDown && actualMode === 'vertical'", "class.ant-dropdown-menu-horizontal": "isMenuInsideDropDown && actualMode === 'horizontal'", "class.ant-dropdown-menu-inline": "isMenuInsideDropDown && actualMode === 'inline'", "class.ant-dropdown-menu-inline-collapsed": "isMenuInsideDropDown && nzInlineCollapsed", "class.ant-menu": "!isMenuInsideDropDown", "class.ant-menu-root": "!isMenuInsideDropDown", "class.ant-menu-light": "!isMenuInsideDropDown && nzTheme === 'light'", "class.ant-menu-dark": "!isMenuInsideDropDown && nzTheme === 'dark'", "class.ant-menu-vertical": "!isMenuInsideDropDown && actualMode === 'vertical'", "class.ant-menu-horizontal": "!isMenuInsideDropDown && actualMode === 'horizontal'", "class.ant-menu-inline": "!isMenuInsideDropDown && actualMode === 'inline'", "class.ant-menu-inline-collapsed": "!isMenuInsideDropDown && nzInlineCollapsed", "class.ant-menu-rtl": "dir === 'rtl'" } }, providers: [
|
|
1030
|
-
{
|
|
1031
|
-
provide: NzMenuServiceLocalToken,
|
|
1032
|
-
useClass: MenuService
|
|
1033
|
-
},
|
|
1034
|
-
/** use the top level service **/
|
|
1035
|
-
{
|
|
1036
|
-
provide: MenuService,
|
|
1037
|
-
useFactory: MenuServiceFactory
|
|
1038
|
-
},
|
|
1039
|
-
/** check if menu inside dropdown-menu component **/
|
|
1040
|
-
{
|
|
1041
|
-
provide: NzIsMenuInsideDropDownToken,
|
|
1042
|
-
useFactory: MenuDropDownTokenFactory
|
|
1043
|
-
}
|
|
1044
|
-
], queries: [{ propertyName: "listOfNzMenuItemDirective", predicate: NzMenuItemComponent, descendants: true }, { propertyName: "listOfNzSubMenuComponent", predicate: NzSubMenuComponent, descendants: true }], exportAs: ["nzMenu"], usesOnChanges: true, ngImport: core_exports });
|
|
1045
|
-
};
|
|
1046
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMenuDirective, decorators: [{
|
|
1047
|
-
type: Directive,
|
|
1048
|
-
args: [{
|
|
1049
|
-
selector: "[nz-menu]",
|
|
1050
|
-
exportAs: "nzMenu",
|
|
1051
|
-
providers: [
|
|
1052
|
-
{
|
|
1053
|
-
provide: NzMenuServiceLocalToken,
|
|
1054
|
-
useClass: MenuService
|
|
1055
|
-
},
|
|
1056
|
-
/** use the top level service **/
|
|
1057
|
-
{
|
|
1058
|
-
provide: MenuService,
|
|
1059
|
-
useFactory: MenuServiceFactory
|
|
1060
|
-
},
|
|
1061
|
-
/** check if menu inside dropdown-menu component **/
|
|
1062
|
-
{
|
|
1063
|
-
provide: NzIsMenuInsideDropDownToken,
|
|
1064
|
-
useFactory: MenuDropDownTokenFactory
|
|
1065
|
-
}
|
|
1066
|
-
],
|
|
1067
|
-
host: {
|
|
1068
|
-
"[class.ant-dropdown-menu]": `isMenuInsideDropDown`,
|
|
1069
|
-
"[class.ant-dropdown-menu-root]": `isMenuInsideDropDown`,
|
|
1070
|
-
"[class.ant-dropdown-menu-light]": `isMenuInsideDropDown && nzTheme === 'light'`,
|
|
1071
|
-
"[class.ant-dropdown-menu-dark]": `isMenuInsideDropDown && nzTheme === 'dark'`,
|
|
1072
|
-
"[class.ant-dropdown-menu-vertical]": `isMenuInsideDropDown && actualMode === 'vertical'`,
|
|
1073
|
-
"[class.ant-dropdown-menu-horizontal]": `isMenuInsideDropDown && actualMode === 'horizontal'`,
|
|
1074
|
-
"[class.ant-dropdown-menu-inline]": `isMenuInsideDropDown && actualMode === 'inline'`,
|
|
1075
|
-
"[class.ant-dropdown-menu-inline-collapsed]": `isMenuInsideDropDown && nzInlineCollapsed`,
|
|
1076
|
-
"[class.ant-menu]": `!isMenuInsideDropDown`,
|
|
1077
|
-
"[class.ant-menu-root]": `!isMenuInsideDropDown`,
|
|
1078
|
-
"[class.ant-menu-light]": `!isMenuInsideDropDown && nzTheme === 'light'`,
|
|
1079
|
-
"[class.ant-menu-dark]": `!isMenuInsideDropDown && nzTheme === 'dark'`,
|
|
1080
|
-
"[class.ant-menu-vertical]": `!isMenuInsideDropDown && actualMode === 'vertical'`,
|
|
1081
|
-
"[class.ant-menu-horizontal]": `!isMenuInsideDropDown && actualMode === 'horizontal'`,
|
|
1082
|
-
"[class.ant-menu-inline]": `!isMenuInsideDropDown && actualMode === 'inline'`,
|
|
1083
|
-
"[class.ant-menu-inline-collapsed]": `!isMenuInsideDropDown && nzInlineCollapsed`,
|
|
1084
|
-
"[class.ant-menu-rtl]": `dir === 'rtl'`
|
|
1085
|
-
}
|
|
1086
|
-
}]
|
|
1087
|
-
}], propDecorators: { listOfNzMenuItemDirective: [{
|
|
1088
|
-
type: ContentChildren,
|
|
1089
|
-
args: [NzMenuItemComponent, { descendants: true }]
|
|
1090
|
-
}], listOfNzSubMenuComponent: [{
|
|
1091
|
-
type: ContentChildren,
|
|
1092
|
-
args: [NzSubMenuComponent, { descendants: true }]
|
|
1093
|
-
}], nzInlineIndent: [{
|
|
1094
|
-
type: Input
|
|
1095
|
-
}], nzTheme: [{
|
|
1096
|
-
type: Input
|
|
1097
|
-
}], nzMode: [{
|
|
1098
|
-
type: Input
|
|
1099
|
-
}], nzInlineCollapsed: [{
|
|
1100
|
-
type: Input,
|
|
1101
|
-
args: [{ transform: booleanAttribute }]
|
|
1102
|
-
}], nzSelectable: [{
|
|
1103
|
-
type: Input,
|
|
1104
|
-
args: [{ transform: booleanAttribute }]
|
|
1105
|
-
}], nzClick: [{
|
|
1106
|
-
type: Output
|
|
1107
|
-
}] } });
|
|
1108
|
-
function MenuGroupFactory() {
|
|
1109
|
-
const isMenuInsideDropDownToken = inject(NzIsMenuInsideDropDownToken, { optional: true, skipSelf: true });
|
|
1110
|
-
return isMenuInsideDropDownToken ?? false;
|
|
1111
|
-
}
|
|
1112
|
-
var NzMenuGroupComponent = class _NzMenuGroupComponent {
|
|
1113
|
-
renderer = inject(Renderer2);
|
|
1114
|
-
isMenuInsideDropDown = inject(NzIsMenuInsideDropDownToken);
|
|
1115
|
-
nzTitle;
|
|
1116
|
-
titleElement;
|
|
1117
|
-
ngAfterViewInit() {
|
|
1118
|
-
const ulElement = this.titleElement.nativeElement.nextElementSibling;
|
|
1119
|
-
if (ulElement) {
|
|
1120
|
-
const className = this.isMenuInsideDropDown ? "ant-dropdown-menu-item-group-list" : "ant-menu-item-group-list";
|
|
1121
|
-
this.renderer.addClass(ulElement, className);
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMenuGroupComponent, deps: [], target: FactoryTarget.Component });
|
|
1125
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzMenuGroupComponent, isStandalone: true, selector: "[nz-menu-group]", inputs: { nzTitle: "nzTitle" }, host: { properties: { "class.ant-menu-item-group": "!isMenuInsideDropDown", "class.ant-dropdown-menu-item-group": "isMenuInsideDropDown" } }, providers: [
|
|
1126
|
-
/** check if menu inside dropdown-menu component **/
|
|
1127
|
-
{
|
|
1128
|
-
provide: NzIsMenuInsideDropDownToken,
|
|
1129
|
-
useFactory: MenuGroupFactory
|
|
1130
|
-
}
|
|
1131
|
-
], viewQueries: [{ propertyName: "titleElement", first: true, predicate: ["titleElement"], descendants: true }], exportAs: ["nzMenuGroup"], ngImport: core_exports, template: `
|
|
1132
|
-
<div
|
|
1133
|
-
[class.ant-menu-item-group-title]="!isMenuInsideDropDown"
|
|
1134
|
-
[class.ant-dropdown-menu-item-group-title]="isMenuInsideDropDown"
|
|
1135
|
-
#titleElement
|
|
1136
|
-
>
|
|
1137
|
-
<ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>
|
|
1138
|
-
@if (!nzTitle) {
|
|
1139
|
-
<ng-content select="[title]" />
|
|
1140
|
-
}
|
|
1141
|
-
</div>
|
|
1142
|
-
<ng-content></ng-content>
|
|
1143
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
1144
|
-
};
|
|
1145
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMenuGroupComponent, decorators: [{
|
|
1146
|
-
type: Component,
|
|
1147
|
-
args: [{
|
|
1148
|
-
selector: "[nz-menu-group]",
|
|
1149
|
-
exportAs: "nzMenuGroup",
|
|
1150
|
-
providers: [
|
|
1151
|
-
/** check if menu inside dropdown-menu component **/
|
|
1152
|
-
{
|
|
1153
|
-
provide: NzIsMenuInsideDropDownToken,
|
|
1154
|
-
useFactory: MenuGroupFactory
|
|
1155
|
-
}
|
|
1156
|
-
],
|
|
1157
|
-
template: `
|
|
1158
|
-
<div
|
|
1159
|
-
[class.ant-menu-item-group-title]="!isMenuInsideDropDown"
|
|
1160
|
-
[class.ant-dropdown-menu-item-group-title]="isMenuInsideDropDown"
|
|
1161
|
-
#titleElement
|
|
1162
|
-
>
|
|
1163
|
-
<ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>
|
|
1164
|
-
@if (!nzTitle) {
|
|
1165
|
-
<ng-content select="[title]" />
|
|
1166
|
-
}
|
|
1167
|
-
</div>
|
|
1168
|
-
<ng-content></ng-content>
|
|
1169
|
-
`,
|
|
1170
|
-
imports: [NzOutletModule],
|
|
1171
|
-
host: {
|
|
1172
|
-
"[class.ant-menu-item-group]": "!isMenuInsideDropDown",
|
|
1173
|
-
"[class.ant-dropdown-menu-item-group]": "isMenuInsideDropDown"
|
|
1174
|
-
},
|
|
1175
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1176
|
-
encapsulation: ViewEncapsulation.None
|
|
1177
|
-
}]
|
|
1178
|
-
}], propDecorators: { nzTitle: [{
|
|
1179
|
-
type: Input
|
|
1180
|
-
}], titleElement: [{
|
|
1181
|
-
type: ViewChild,
|
|
1182
|
-
args: ["titleElement"]
|
|
1183
|
-
}] } });
|
|
1184
|
-
var NzMenuDividerDirective = class _NzMenuDividerDirective {
|
|
1185
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMenuDividerDirective, deps: [], target: FactoryTarget.Directive });
|
|
1186
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzMenuDividerDirective, isStandalone: true, selector: "[nz-menu-divider]", host: { classAttribute: "ant-dropdown-menu-item-divider" }, exportAs: ["nzMenuDivider"], ngImport: core_exports });
|
|
1187
|
-
};
|
|
1188
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMenuDividerDirective, decorators: [{
|
|
1189
|
-
type: Directive,
|
|
1190
|
-
args: [{
|
|
1191
|
-
selector: "[nz-menu-divider]",
|
|
1192
|
-
exportAs: "nzMenuDivider",
|
|
1193
|
-
host: {
|
|
1194
|
-
class: "ant-dropdown-menu-item-divider"
|
|
1195
|
-
}
|
|
1196
|
-
}]
|
|
1197
|
-
}] });
|
|
1198
|
-
var NzMenuModule = class _NzMenuModule {
|
|
1199
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMenuModule, deps: [], target: FactoryTarget.NgModule });
|
|
1200
|
-
static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMenuModule, imports: [
|
|
1201
|
-
NzMenuDirective,
|
|
1202
|
-
NzMenuItemComponent,
|
|
1203
|
-
NzSubMenuComponent,
|
|
1204
|
-
NzMenuDividerDirective,
|
|
1205
|
-
NzMenuGroupComponent,
|
|
1206
|
-
NzSubMenuTitleComponent,
|
|
1207
|
-
NzSubmenuInlineChildComponent,
|
|
1208
|
-
NzSubmenuNoneInlineChildComponent
|
|
1209
|
-
], exports: [NzMenuDirective, NzMenuItemComponent, NzSubMenuComponent, NzMenuDividerDirective, NzMenuGroupComponent] });
|
|
1210
|
-
static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMenuModule, imports: [
|
|
1211
|
-
NzSubMenuComponent,
|
|
1212
|
-
NzMenuGroupComponent,
|
|
1213
|
-
NzSubMenuTitleComponent
|
|
1214
|
-
] });
|
|
1215
|
-
};
|
|
1216
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMenuModule, decorators: [{
|
|
1217
|
-
type: NgModule,
|
|
1218
|
-
args: [{
|
|
1219
|
-
imports: [
|
|
1220
|
-
NzMenuDirective,
|
|
1221
|
-
NzMenuItemComponent,
|
|
1222
|
-
NzSubMenuComponent,
|
|
1223
|
-
NzMenuDividerDirective,
|
|
1224
|
-
NzMenuGroupComponent,
|
|
1225
|
-
NzSubMenuTitleComponent,
|
|
1226
|
-
NzSubmenuInlineChildComponent,
|
|
1227
|
-
NzSubmenuNoneInlineChildComponent
|
|
1228
|
-
],
|
|
1229
|
-
exports: [NzMenuDirective, NzMenuItemComponent, NzSubMenuComponent, NzMenuDividerDirective, NzMenuGroupComponent]
|
|
1230
|
-
}]
|
|
1231
|
-
}] });
|
|
1232
|
-
|
|
1233
|
-
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-dropdown.mjs
|
|
1234
|
-
var NZ_CONFIG_MODULE_NAME = "dropDown";
|
|
1235
|
-
var listOfPositions = ["bottomLeft", "bottomRight", "topRight", "topLeft"];
|
|
1236
|
-
var normalizePlacementForClass = (p) => {
|
|
1237
|
-
if (p === "topCenter") {
|
|
1238
|
-
return "top";
|
|
1239
|
-
}
|
|
1240
|
-
if (p === "bottomCenter") {
|
|
1241
|
-
return "bottom";
|
|
1242
|
-
}
|
|
1243
|
-
return p;
|
|
1244
|
-
};
|
|
1245
|
-
var NzDropDownDirective = (() => {
|
|
1246
|
-
var _a;
|
|
1247
|
-
let _nzBackdrop_decorators;
|
|
1248
|
-
let _nzBackdrop_initializers = [];
|
|
1249
|
-
let _nzBackdrop_extraInitializers = [];
|
|
1250
|
-
return _a = class {
|
|
1251
|
-
nzConfigService = inject(NzConfigService);
|
|
1252
|
-
renderer = inject(Renderer2);
|
|
1253
|
-
viewContainerRef = inject(ViewContainerRef);
|
|
1254
|
-
platform = inject(Platform);
|
|
1255
|
-
destroyRef = inject(DestroyRef);
|
|
1256
|
-
_nzModuleName = NZ_CONFIG_MODULE_NAME;
|
|
1257
|
-
elementRef = inject(ElementRef);
|
|
1258
|
-
injector = inject(Injector);
|
|
1259
|
-
portal;
|
|
1260
|
-
overlayRef = null;
|
|
1261
|
-
inputVisible$ = new BehaviorSubject(false);
|
|
1262
|
-
nzTrigger$ = new BehaviorSubject("hover");
|
|
1263
|
-
overlayClose$ = new Subject();
|
|
1264
|
-
nzDropdownMenu = null;
|
|
1265
|
-
nzTrigger = "hover";
|
|
1266
|
-
nzMatchWidthElement = null;
|
|
1267
|
-
nzBackdrop = __runInitializers(this, _nzBackdrop_initializers, false);
|
|
1268
|
-
nzClickHide = (__runInitializers(this, _nzBackdrop_extraInitializers), true);
|
|
1269
|
-
nzDisabled = false;
|
|
1270
|
-
nzVisible = false;
|
|
1271
|
-
nzArrow = false;
|
|
1272
|
-
nzOverlayClassName = "";
|
|
1273
|
-
nzOverlayStyle = {};
|
|
1274
|
-
nzPlacement = "bottomLeft";
|
|
1275
|
-
nzVisibleChange = new EventEmitter();
|
|
1276
|
-
constructor() {
|
|
1277
|
-
this.destroyRef.onDestroy(() => {
|
|
1278
|
-
this.overlayRef?.dispose();
|
|
1279
|
-
this.overlayRef = null;
|
|
1280
|
-
});
|
|
1281
|
-
}
|
|
1282
|
-
setDropdownMenuValue(key, value) {
|
|
1283
|
-
this.nzDropdownMenu?.setValue(key, value);
|
|
1284
|
-
}
|
|
1285
|
-
ngAfterViewInit() {
|
|
1286
|
-
if (this.nzDropdownMenu) {
|
|
1287
|
-
const nativeElement = this.elementRef.nativeElement;
|
|
1288
|
-
const hostMouseState$ = merge(fromEvent(nativeElement, "mouseenter").pipe(map(() => true)), fromEvent(nativeElement, "mouseleave").pipe(map(() => false)));
|
|
1289
|
-
const menuMouseState$ = this.nzDropdownMenu.mouseState$;
|
|
1290
|
-
const mergedMouseState$ = merge(menuMouseState$, hostMouseState$);
|
|
1291
|
-
const hostClickState$ = fromEvent(nativeElement, "click").pipe(map(() => !this.nzVisible));
|
|
1292
|
-
const visibleStateByTrigger$ = this.nzTrigger$.pipe(switchMap((trigger) => {
|
|
1293
|
-
if (trigger === "hover") {
|
|
1294
|
-
return mergedMouseState$;
|
|
1295
|
-
} else if (trigger === "click") {
|
|
1296
|
-
return hostClickState$;
|
|
1297
|
-
} else {
|
|
1298
|
-
return EMPTY;
|
|
1299
|
-
}
|
|
1300
|
-
}));
|
|
1301
|
-
const descendantMenuItemClick$ = this.nzDropdownMenu.descendantMenuItemClick$.pipe(filter(() => this.nzClickHide), map(() => false));
|
|
1302
|
-
const domTriggerVisible$ = merge(visibleStateByTrigger$, descendantMenuItemClick$, this.overlayClose$).pipe(filter(() => !this.nzDisabled));
|
|
1303
|
-
const visible$ = merge(this.inputVisible$, domTriggerVisible$);
|
|
1304
|
-
combineLatest([visible$, this.nzDropdownMenu.isChildSubMenuOpen$]).pipe(map(([visible, sub]) => visible || sub), auditTime(150), distinctUntilChanged(), filter(() => this.platform.isBrowser), takeUntilDestroyed(this.destroyRef)).subscribe((visible) => {
|
|
1305
|
-
const element = this.nzMatchWidthElement ? this.nzMatchWidthElement.nativeElement : nativeElement;
|
|
1306
|
-
const triggerWidth = element.getBoundingClientRect().width;
|
|
1307
|
-
if (this.nzVisible !== visible) {
|
|
1308
|
-
this.nzVisibleChange.emit(visible);
|
|
1309
|
-
}
|
|
1310
|
-
this.nzVisible = visible;
|
|
1311
|
-
if (visible) {
|
|
1312
|
-
const positionStrategy = createFlexibleConnectedPositionStrategy(this.injector, this.elementRef.nativeElement).withLockedPosition().withTransformOriginOn(".ant-dropdown");
|
|
1313
|
-
positionStrategy.positionChanges.pipe(filter(() => Boolean(this.overlayRef)), map((change) => getPlacementName(change)), takeUntilDestroyed(this.destroyRef)).subscribe((placement) => {
|
|
1314
|
-
if (placement) {
|
|
1315
|
-
this.setDropdownMenuValue("placement", normalizePlacementForClass(placement));
|
|
1316
|
-
}
|
|
1317
|
-
});
|
|
1318
|
-
if (!this.overlayRef) {
|
|
1319
|
-
this.overlayRef = createOverlayRef(this.injector, {
|
|
1320
|
-
positionStrategy,
|
|
1321
|
-
minWidth: triggerWidth,
|
|
1322
|
-
disposeOnNavigation: true,
|
|
1323
|
-
hasBackdrop: this.nzBackdrop && this.nzTrigger === "click",
|
|
1324
|
-
scrollStrategy: createRepositionScrollStrategy(this.injector)
|
|
1325
|
-
});
|
|
1326
|
-
merge(this.overlayRef.backdropClick(), this.overlayRef.detachments(), this.overlayRef.outsidePointerEvents().pipe(filter((e) => !this.elementRef.nativeElement.contains(e.target))), this.overlayRef.keydownEvents().pipe(filter((e) => e.keyCode === ESCAPE && !hasModifierKey(e)))).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
1327
|
-
this.overlayClose$.next(false);
|
|
1328
|
-
});
|
|
1329
|
-
} else {
|
|
1330
|
-
const overlayConfig = this.overlayRef.getConfig();
|
|
1331
|
-
overlayConfig.minWidth = triggerWidth;
|
|
1332
|
-
}
|
|
1333
|
-
const positions = [this.nzPlacement, ...listOfPositions].map((position) => {
|
|
1334
|
-
return this.nzArrow ? setConnectedPositionOffset(POSITION_MAP[position], TOOLTIP_OFFSET_MAP[position]) : POSITION_MAP[position];
|
|
1335
|
-
});
|
|
1336
|
-
positionStrategy.withPositions(positions);
|
|
1337
|
-
if (!this.portal || this.portal.templateRef !== this.nzDropdownMenu.templateRef) {
|
|
1338
|
-
this.portal = new TemplatePortal(this.nzDropdownMenu.templateRef, this.viewContainerRef);
|
|
1339
|
-
}
|
|
1340
|
-
this.setDropdownMenuValue("nzArrow", this.nzArrow);
|
|
1341
|
-
this.setDropdownMenuValue("placement", normalizePlacementForClass(this.nzPlacement));
|
|
1342
|
-
this.overlayRef.attach(this.portal);
|
|
1343
|
-
} else {
|
|
1344
|
-
this.overlayRef?.detach();
|
|
1345
|
-
}
|
|
1346
|
-
});
|
|
1347
|
-
this.nzDropdownMenu.animationStateChange$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
|
|
1348
|
-
if (event.toState === "void") {
|
|
1349
|
-
this.overlayRef?.dispose();
|
|
1350
|
-
this.overlayRef = null;
|
|
1351
|
-
}
|
|
1352
|
-
});
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
ngOnChanges(changes) {
|
|
1356
|
-
const { nzVisible, nzDisabled, nzOverlayClassName, nzOverlayStyle, nzTrigger, nzArrow, nzPlacement } = changes;
|
|
1357
|
-
if (nzTrigger) {
|
|
1358
|
-
this.nzTrigger$.next(this.nzTrigger);
|
|
1359
|
-
}
|
|
1360
|
-
if (nzVisible) {
|
|
1361
|
-
this.inputVisible$.next(this.nzVisible);
|
|
1362
|
-
}
|
|
1363
|
-
if (nzDisabled) {
|
|
1364
|
-
const nativeElement = this.elementRef.nativeElement;
|
|
1365
|
-
if (this.nzDisabled) {
|
|
1366
|
-
this.renderer.setAttribute(nativeElement, "disabled", "");
|
|
1367
|
-
this.inputVisible$.next(false);
|
|
1368
|
-
} else {
|
|
1369
|
-
this.renderer.removeAttribute(nativeElement, "disabled");
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
if (nzOverlayClassName) {
|
|
1373
|
-
this.setDropdownMenuValue("nzOverlayClassName", this.nzOverlayClassName);
|
|
1374
|
-
}
|
|
1375
|
-
if (nzOverlayStyle) {
|
|
1376
|
-
this.setDropdownMenuValue("nzOverlayStyle", this.nzOverlayStyle);
|
|
1377
|
-
}
|
|
1378
|
-
if (nzArrow) {
|
|
1379
|
-
this.setDropdownMenuValue("nzArrow", this.nzArrow);
|
|
1380
|
-
}
|
|
1381
|
-
if (nzPlacement) {
|
|
1382
|
-
this.setDropdownMenuValue("placement", normalizePlacementForClass(this.nzPlacement));
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
}, (() => {
|
|
1386
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
|
|
1387
|
-
_nzBackdrop_decorators = [WithConfig()];
|
|
1388
|
-
__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) => {
|
|
1389
|
-
obj.nzBackdrop = value;
|
|
1390
|
-
} }, metadata: _metadata }, _nzBackdrop_initializers, _nzBackdrop_extraInitializers);
|
|
1391
|
-
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1392
|
-
})(), __publicField(_a, "\u0275fac", \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _a, deps: [], target: FactoryTarget.Directive })), __publicField(_a, "\u0275dir", \u0275\u0275ngDeclareDirective({ minVersion: "16.1.0", version: "20.3.0", type: _a, isStandalone: true, selector: "[nz-dropdown]", inputs: { nzDropdownMenu: "nzDropdownMenu", nzTrigger: "nzTrigger", nzMatchWidthElement: "nzMatchWidthElement", nzBackdrop: ["nzBackdrop", "nzBackdrop", booleanAttribute], nzClickHide: ["nzClickHide", "nzClickHide", booleanAttribute], nzDisabled: ["nzDisabled", "nzDisabled", booleanAttribute], nzVisible: ["nzVisible", "nzVisible", booleanAttribute], nzArrow: ["nzArrow", "nzArrow", booleanAttribute], nzOverlayClassName: "nzOverlayClassName", nzOverlayStyle: "nzOverlayStyle", nzPlacement: "nzPlacement" }, outputs: { nzVisibleChange: "nzVisibleChange" }, host: { classAttribute: "ant-dropdown-trigger" }, exportAs: ["nzDropdown"], usesOnChanges: true, ngImport: core_exports })), _a;
|
|
1393
|
-
})();
|
|
1394
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzDropDownDirective, decorators: [{
|
|
1395
|
-
type: Directive,
|
|
1396
|
-
args: [{
|
|
1397
|
-
selector: "[nz-dropdown]",
|
|
1398
|
-
exportAs: "nzDropdown",
|
|
1399
|
-
host: {
|
|
1400
|
-
class: "ant-dropdown-trigger"
|
|
1401
|
-
}
|
|
1402
|
-
}]
|
|
1403
|
-
}], ctorParameters: () => [], propDecorators: { nzDropdownMenu: [{
|
|
1404
|
-
type: Input
|
|
1405
|
-
}], nzTrigger: [{
|
|
1406
|
-
type: Input
|
|
1407
|
-
}], nzMatchWidthElement: [{
|
|
1408
|
-
type: Input
|
|
1409
|
-
}], nzBackdrop: [{
|
|
1410
|
-
type: Input,
|
|
1411
|
-
args: [{ transform: booleanAttribute }]
|
|
1412
|
-
}], nzClickHide: [{
|
|
1413
|
-
type: Input,
|
|
1414
|
-
args: [{ transform: booleanAttribute }]
|
|
1415
|
-
}], nzDisabled: [{
|
|
1416
|
-
type: Input,
|
|
1417
|
-
args: [{ transform: booleanAttribute }]
|
|
1418
|
-
}], nzVisible: [{
|
|
1419
|
-
type: Input,
|
|
1420
|
-
args: [{ transform: booleanAttribute }]
|
|
1421
|
-
}], nzArrow: [{
|
|
1422
|
-
type: Input,
|
|
1423
|
-
args: [{ transform: booleanAttribute }]
|
|
1424
|
-
}], nzOverlayClassName: [{
|
|
1425
|
-
type: Input
|
|
1426
|
-
}], nzOverlayStyle: [{
|
|
1427
|
-
type: Input
|
|
1428
|
-
}], nzPlacement: [{
|
|
1429
|
-
type: Input
|
|
1430
|
-
}], nzVisibleChange: [{
|
|
1431
|
-
type: Output
|
|
1432
|
-
}] } });
|
|
1433
|
-
var NzContextMenuServiceModule = class _NzContextMenuServiceModule {
|
|
1434
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzContextMenuServiceModule, deps: [], target: FactoryTarget.NgModule });
|
|
1435
|
-
static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzContextMenuServiceModule });
|
|
1436
|
-
static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzContextMenuServiceModule });
|
|
1437
|
-
};
|
|
1438
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzContextMenuServiceModule, decorators: [{
|
|
1439
|
-
type: NgModule
|
|
1440
|
-
}] });
|
|
1441
|
-
var NzDropDownADirective = class _NzDropDownADirective {
|
|
1442
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzDropDownADirective, deps: [], target: FactoryTarget.Directive });
|
|
1443
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzDropDownADirective, isStandalone: true, selector: "a[nz-dropdown]", host: { classAttribute: "ant-dropdown-link" }, ngImport: core_exports });
|
|
1444
|
-
};
|
|
1445
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzDropDownADirective, decorators: [{
|
|
1446
|
-
type: Directive,
|
|
1447
|
-
args: [{
|
|
1448
|
-
selector: "a[nz-dropdown]",
|
|
1449
|
-
host: {
|
|
1450
|
-
class: "ant-dropdown-link"
|
|
1451
|
-
}
|
|
1452
|
-
}]
|
|
1453
|
-
}] });
|
|
1454
|
-
var NzDropdownButtonDirective = class _NzDropdownButtonDirective {
|
|
1455
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzDropdownButtonDirective, deps: [], target: FactoryTarget.Directive });
|
|
1456
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzDropdownButtonDirective, isStandalone: true, selector: "[nz-button][nz-dropdown]", ngImport: core_exports });
|
|
1457
|
-
};
|
|
1458
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzDropdownButtonDirective, decorators: [{
|
|
1459
|
-
type: Directive,
|
|
1460
|
-
args: [{
|
|
1461
|
-
selector: "[nz-button][nz-dropdown]"
|
|
1462
|
-
}]
|
|
1463
|
-
}] });
|
|
1464
|
-
var NzDropdownMenuComponent = class _NzDropdownMenuComponent {
|
|
1465
|
-
cdr = inject(ChangeDetectorRef);
|
|
1466
|
-
elementRef = inject(ElementRef);
|
|
1467
|
-
renderer = inject(Renderer2);
|
|
1468
|
-
viewContainerRef = inject(ViewContainerRef);
|
|
1469
|
-
directionality = inject(Directionality);
|
|
1470
|
-
destroyRef = inject(DestroyRef);
|
|
1471
|
-
noAnimation = inject(NzNoAnimationDirective, { host: true, optional: true });
|
|
1472
|
-
nzMenuService = inject(MenuService);
|
|
1473
|
-
isChildSubMenuOpen$ = this.nzMenuService.isChildSubMenuOpen$;
|
|
1474
|
-
descendantMenuItemClick$ = this.nzMenuService.descendantMenuItemClick$;
|
|
1475
|
-
mouseState$ = new BehaviorSubject(false);
|
|
1476
|
-
animationStateChange$ = new EventEmitter();
|
|
1477
|
-
templateRef;
|
|
1478
|
-
nzOverlayClassName = "";
|
|
1479
|
-
nzOverlayStyle = {};
|
|
1480
|
-
nzArrow = false;
|
|
1481
|
-
placement = "bottomLeft";
|
|
1482
|
-
dir = "ltr";
|
|
1483
|
-
onAnimationEvent(event) {
|
|
1484
|
-
this.animationStateChange$.emit(event);
|
|
1485
|
-
}
|
|
1486
|
-
setMouseState(visible) {
|
|
1487
|
-
this.mouseState$.next(visible);
|
|
1488
|
-
}
|
|
1489
|
-
setValue(key, value) {
|
|
1490
|
-
this[key] = value;
|
|
1491
|
-
this.cdr.markForCheck();
|
|
1492
|
-
}
|
|
1493
|
-
ngOnInit() {
|
|
1494
|
-
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
|
|
1495
|
-
this.dir = direction;
|
|
1496
|
-
this.cdr.detectChanges();
|
|
1497
|
-
});
|
|
1498
|
-
this.dir = this.directionality.value;
|
|
1499
|
-
}
|
|
1500
|
-
ngAfterContentInit() {
|
|
1501
|
-
this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement), this.elementRef.nativeElement);
|
|
1502
|
-
}
|
|
1503
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzDropdownMenuComponent, deps: [], target: FactoryTarget.Component });
|
|
1504
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzDropdownMenuComponent, isStandalone: true, selector: "nz-dropdown-menu", providers: [
|
|
1505
|
-
MenuService,
|
|
1506
|
-
/** menu is inside dropdown-menu component **/
|
|
1507
|
-
{
|
|
1508
|
-
provide: NzIsMenuInsideDropDownToken,
|
|
1509
|
-
useValue: true
|
|
1510
|
-
}
|
|
1511
|
-
], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: ["nzDropdownMenu"], ngImport: core_exports, template: `
|
|
1512
|
-
<ng-template>
|
|
1513
|
-
<div
|
|
1514
|
-
class="ant-dropdown"
|
|
1515
|
-
[class.ant-dropdown-rtl]="dir === 'rtl'"
|
|
1516
|
-
[class.ant-dropdown-show-arrow]="nzArrow"
|
|
1517
|
-
[class.ant-dropdown-placement-bottomLeft]="placement === 'bottomLeft'"
|
|
1518
|
-
[class.ant-dropdown-placement-bottomRight]="placement === 'bottomRight'"
|
|
1519
|
-
[class.ant-dropdown-placement-bottom]="placement === 'bottom'"
|
|
1520
|
-
[class.ant-dropdown-placement-topLeft]="placement === 'topLeft'"
|
|
1521
|
-
[class.ant-dropdown-placement-topRight]="placement === 'topRight'"
|
|
1522
|
-
[class.ant-dropdown-placement-top]="placement === 'top'"
|
|
1523
|
-
[class]="nzOverlayClassName"
|
|
1524
|
-
[style]="nzOverlayStyle"
|
|
1525
|
-
@slideMotion
|
|
1526
|
-
(@slideMotion.done)="onAnimationEvent($event)"
|
|
1527
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
1528
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
1529
|
-
(mouseenter)="setMouseState(true)"
|
|
1530
|
-
(mouseleave)="setMouseState(false)"
|
|
1531
|
-
>
|
|
1532
|
-
@if (nzArrow) {
|
|
1533
|
-
<div class="ant-dropdown-arrow"></div>
|
|
1534
|
-
}
|
|
1535
|
-
<ng-content></ng-content>
|
|
1536
|
-
</div>
|
|
1537
|
-
</ng-template>
|
|
1538
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NzNoAnimationDirective, selector: "[nzNoAnimation]", inputs: ["nzNoAnimation"], exportAs: ["nzNoAnimation"] }], animations: [slideMotion], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
1539
|
-
};
|
|
1540
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzDropdownMenuComponent, decorators: [{
|
|
1541
|
-
type: Component,
|
|
1542
|
-
args: [{
|
|
1543
|
-
selector: `nz-dropdown-menu`,
|
|
1544
|
-
exportAs: `nzDropdownMenu`,
|
|
1545
|
-
animations: [slideMotion],
|
|
1546
|
-
providers: [
|
|
1547
|
-
MenuService,
|
|
1548
|
-
/** menu is inside dropdown-menu component **/
|
|
1549
|
-
{
|
|
1550
|
-
provide: NzIsMenuInsideDropDownToken,
|
|
1551
|
-
useValue: true
|
|
1552
|
-
}
|
|
1553
|
-
],
|
|
1554
|
-
template: `
|
|
1555
|
-
<ng-template>
|
|
1556
|
-
<div
|
|
1557
|
-
class="ant-dropdown"
|
|
1558
|
-
[class.ant-dropdown-rtl]="dir === 'rtl'"
|
|
1559
|
-
[class.ant-dropdown-show-arrow]="nzArrow"
|
|
1560
|
-
[class.ant-dropdown-placement-bottomLeft]="placement === 'bottomLeft'"
|
|
1561
|
-
[class.ant-dropdown-placement-bottomRight]="placement === 'bottomRight'"
|
|
1562
|
-
[class.ant-dropdown-placement-bottom]="placement === 'bottom'"
|
|
1563
|
-
[class.ant-dropdown-placement-topLeft]="placement === 'topLeft'"
|
|
1564
|
-
[class.ant-dropdown-placement-topRight]="placement === 'topRight'"
|
|
1565
|
-
[class.ant-dropdown-placement-top]="placement === 'top'"
|
|
1566
|
-
[class]="nzOverlayClassName"
|
|
1567
|
-
[style]="nzOverlayStyle"
|
|
1568
|
-
@slideMotion
|
|
1569
|
-
(@slideMotion.done)="onAnimationEvent($event)"
|
|
1570
|
-
[@.disabled]="!!noAnimation?.nzNoAnimation"
|
|
1571
|
-
[nzNoAnimation]="noAnimation?.nzNoAnimation"
|
|
1572
|
-
(mouseenter)="setMouseState(true)"
|
|
1573
|
-
(mouseleave)="setMouseState(false)"
|
|
1574
|
-
>
|
|
1575
|
-
@if (nzArrow) {
|
|
1576
|
-
<div class="ant-dropdown-arrow"></div>
|
|
1577
|
-
}
|
|
1578
|
-
<ng-content></ng-content>
|
|
1579
|
-
</div>
|
|
1580
|
-
</ng-template>
|
|
1581
|
-
`,
|
|
1582
|
-
encapsulation: ViewEncapsulation.None,
|
|
1583
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1584
|
-
imports: [NzNoAnimationDirective]
|
|
1585
|
-
}]
|
|
1586
|
-
}], propDecorators: { templateRef: [{
|
|
1587
|
-
type: ViewChild,
|
|
1588
|
-
args: [TemplateRef, { static: true }]
|
|
1589
|
-
}] } });
|
|
1590
|
-
var NzDropDownModule = class _NzDropDownModule {
|
|
1591
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzDropDownModule, deps: [], target: FactoryTarget.NgModule });
|
|
1592
|
-
static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzDropDownModule, imports: [
|
|
1593
|
-
NzDropDownDirective,
|
|
1594
|
-
NzDropDownADirective,
|
|
1595
|
-
NzDropdownMenuComponent,
|
|
1596
|
-
NzDropdownButtonDirective,
|
|
1597
|
-
NzContextMenuServiceModule
|
|
1598
|
-
], exports: [NzMenuModule, NzDropDownDirective, NzDropDownADirective, NzDropdownMenuComponent, NzDropdownButtonDirective] });
|
|
1599
|
-
static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzDropDownModule, imports: [NzContextMenuServiceModule, NzMenuModule] });
|
|
1600
|
-
};
|
|
1601
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzDropDownModule, decorators: [{
|
|
1602
|
-
type: NgModule,
|
|
1603
|
-
args: [{
|
|
1604
|
-
imports: [
|
|
1605
|
-
NzDropDownDirective,
|
|
1606
|
-
NzDropDownADirective,
|
|
1607
|
-
NzDropdownMenuComponent,
|
|
1608
|
-
NzDropdownButtonDirective,
|
|
1609
|
-
NzContextMenuServiceModule
|
|
1610
|
-
],
|
|
1611
|
-
exports: [NzMenuModule, NzDropDownDirective, NzDropDownADirective, NzDropdownMenuComponent, NzDropdownButtonDirective]
|
|
1612
|
-
}]
|
|
1613
|
-
}] });
|
|
1614
|
-
var LIST_OF_POSITIONS = [
|
|
1615
|
-
new ConnectionPositionPair({ originX: "start", originY: "top" }, { overlayX: "start", overlayY: "top" }),
|
|
1616
|
-
new ConnectionPositionPair({ originX: "start", originY: "top" }, { overlayX: "start", overlayY: "bottom" }),
|
|
1617
|
-
new ConnectionPositionPair({ originX: "start", originY: "top" }, { overlayX: "end", overlayY: "bottom" }),
|
|
1618
|
-
new ConnectionPositionPair({ originX: "start", originY: "top" }, { overlayX: "end", overlayY: "top" })
|
|
1619
|
-
];
|
|
1620
|
-
var NzContextMenuService = class _NzContextMenuService {
|
|
1621
|
-
ngZone = inject(NgZone);
|
|
1622
|
-
injector = inject(Injector);
|
|
1623
|
-
overlayRef = null;
|
|
1624
|
-
closeSubscription = Subscription.EMPTY;
|
|
1625
|
-
create($event, nzDropdownMenuComponent) {
|
|
1626
|
-
this.close(true);
|
|
1627
|
-
const { x, y } = $event;
|
|
1628
|
-
if ($event instanceof MouseEvent) {
|
|
1629
|
-
$event.preventDefault();
|
|
1630
|
-
}
|
|
1631
|
-
this.overlayRef = createOverlayRef(this.injector, {
|
|
1632
|
-
positionStrategy: createFlexibleConnectedPositionStrategy(this.injector, { x, y }).withPositions(LIST_OF_POSITIONS).withTransformOriginOn(".ant-dropdown"),
|
|
1633
|
-
disposeOnNavigation: true,
|
|
1634
|
-
scrollStrategy: createCloseScrollStrategy(this.injector)
|
|
1635
|
-
});
|
|
1636
|
-
this.closeSubscription = new Subscription();
|
|
1637
|
-
this.closeSubscription.add(nzDropdownMenuComponent.descendantMenuItemClick$.subscribe(() => this.close()));
|
|
1638
|
-
this.closeSubscription.add(merge(fromEventOutsideAngular(document, "click").pipe(
|
|
1639
|
-
filter((event) => !!this.overlayRef && !this.overlayRef.overlayElement.contains(event.target)),
|
|
1640
|
-
/** handle firefox contextmenu event **/
|
|
1641
|
-
filter((event) => event.button !== 2)
|
|
1642
|
-
), fromEventOutsideAngular(document, "keydown").pipe(filter((event) => event.key === "Escape"))).pipe(first()).subscribe(() => this.ngZone.run(() => this.close())));
|
|
1643
|
-
return this.overlayRef.attach(new TemplatePortal(nzDropdownMenuComponent.templateRef, nzDropdownMenuComponent.viewContainerRef));
|
|
1644
|
-
}
|
|
1645
|
-
close(clear = false) {
|
|
1646
|
-
if (this.overlayRef) {
|
|
1647
|
-
this.overlayRef.detach();
|
|
1648
|
-
if (clear) {
|
|
1649
|
-
this.overlayRef.dispose();
|
|
1650
|
-
}
|
|
1651
|
-
this.overlayRef = null;
|
|
1652
|
-
this.closeSubscription.unsubscribe();
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1655
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzContextMenuService, deps: [], target: FactoryTarget.Injectable });
|
|
1656
|
-
static \u0275prov = \u0275\u0275ngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzContextMenuService, providedIn: NzContextMenuServiceModule });
|
|
1657
|
-
};
|
|
1658
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzContextMenuService, decorators: [{
|
|
1659
|
-
type: Injectable,
|
|
1660
|
-
args: [{
|
|
1661
|
-
providedIn: NzContextMenuServiceModule
|
|
1662
|
-
}]
|
|
1663
|
-
}] });
|
|
1664
|
-
|
|
1665
|
-
export {
|
|
1666
|
-
NzMenuItemComponent,
|
|
1667
|
-
NzMenuDirective,
|
|
1668
|
-
NzMenuModule,
|
|
1669
|
-
NzDropDownDirective,
|
|
1670
|
-
NzDropdownMenuComponent,
|
|
1671
|
-
NzDropDownModule,
|
|
1672
|
-
NzContextMenuService
|
|
1673
|
-
};
|
|
1674
|
-
//# sourceMappingURL=chunk-ZBZHXS46.js.map
|