@yinuo-ngm/server 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app.js +3 -15
- package/lib/common/editor.js +2 -2
- package/lib/env.d.ts +1 -0
- package/lib/env.js +1 -0
- package/lib/plugins/error-handler.plugin.d.ts +2 -2
- package/lib/plugins/error-handler.plugin.js +97 -88
- package/lib/plugins/ws/topics/nginx.ws.js +2 -1
- package/lib/plugins/ws/topics/svn.ws.d.ts +2 -1
- package/lib/plugins/ws/topics/svn.ws.js +3 -2
- package/lib/plugins/ws/topics/syslog.ws.d.ts +1 -1
- package/lib/plugins/ws/topics/task.ws.d.ts +2 -1
- package/lib/plugins/ws/topics/task.ws.js +2 -1
- package/lib/plugins/ws/ws.context.d.ts +1 -1
- package/lib/plugins/ws/ws.plugin.js +4 -3
- package/lib/plugins/ws/ws.router.d.ts +2 -2
- package/lib/plugins/ws/ws.router.js +8 -7
- package/lib/routes/api-client/collection.routes.js +8 -6
- package/lib/routes/api-client/env.routes.js +4 -3
- package/lib/routes/api-client/history.routes.js +3 -2
- package/lib/routes/api-client/hub-token.routes.js +32 -10
- package/lib/routes/api-client/request.routes.js +7 -6
- package/lib/routes/api-client/send.routes.js +3 -2
- package/lib/routes/config.routes.js +5 -5
- package/lib/routes/hub.routes.js +10 -10
- package/lib/routes/index.js +2 -0
- package/lib/routes/nginx/nginx-lifecycle.routes.js +4 -0
- package/lib/routes/nginx/nginx-route.context.js +23 -7
- package/lib/routes/nginx/nginx-server.routes.js +158 -6
- package/lib/routes/node-version.routes.d.ts +2 -0
- package/lib/routes/node-version.routes.js +56 -0
- package/lib/routes/project.routes.js +14 -9
- package/lib/routes/rss.routes.js +3 -3
- package/lib/routes/sprite-browse.routes.js +21 -6
- package/lib/routes/sprite.routes.js +18 -12
- package/lib/routes/static-files.routes.js +21 -5
- package/lib/routes/svn.routes.js +5 -3
- package/lib/routes/system.routes.js +20 -1
- package/lib/routes/task.routes.js +10 -3
- package/package.json +13 -6
- package/www/3rdpartylicenses.txt +66 -118
- package/www/browser/chunk-2L7NUOMX.js +2 -0
- package/www/browser/chunk-2NZJ7CN2.js +20 -0
- package/www/browser/chunk-3CM4SKDO.js +15 -0
- package/www/browser/chunk-3I7BQCXS.js +1 -0
- package/www/browser/chunk-3M56F2S2.js +1 -0
- package/www/browser/chunk-3OHBKMAA.js +1 -0
- package/www/browser/chunk-3XNNQFWR.js +1 -0
- package/www/browser/chunk-4BRW6LCZ.js +4 -0
- package/www/browser/chunk-4LBSLURA.js +1 -0
- package/www/browser/chunk-4X42HB6N.js +2 -0
- package/www/browser/chunk-5DYX4DUX.js +11 -0
- package/www/browser/chunk-6SYVDN5L.js +1 -0
- package/www/browser/chunk-6YYNHZ2A.js +1 -0
- package/www/browser/chunk-75W3GVSO.js +1 -0
- package/www/browser/chunk-7U44RF5F.js +63 -0
- package/www/browser/chunk-AELTP6YN.js +1 -0
- package/www/browser/chunk-AMXRL4GR.js +1 -0
- package/www/browser/chunk-AV2ZODEH.js +1 -0
- package/www/browser/chunk-AZ6SIMYH.js +1 -0
- package/www/browser/chunk-B3C35ET3.js +2 -0
- package/www/browser/chunk-BTQIUVTQ.js +1 -0
- package/www/browser/chunk-CN5J4WNO.js +1 -0
- package/www/browser/chunk-D2ODDESN.js +1 -0
- package/www/browser/chunk-DE6E23ET.js +1 -0
- package/www/browser/chunk-DIJPUYIA.js +1 -0
- package/www/browser/chunk-DLGJD6YU.js +4 -0
- package/www/browser/chunk-EEDA5U4V.js +1 -0
- package/www/browser/chunk-FK6Z4HLL.js +1 -0
- package/www/browser/chunk-FL6GDGHW.js +1 -0
- package/www/browser/chunk-FXCG34QS.js +1 -0
- package/www/browser/chunk-H2USFIYR.js +1 -0
- package/www/browser/chunk-H5HGMOE6.js +1 -0
- package/www/browser/chunk-HB3HECPD.js +1 -0
- package/www/browser/chunk-HDNG236Q.js +1 -0
- package/www/browser/chunk-HFZLJHYR.js +1 -0
- package/www/browser/chunk-HJTXXSMC.js +1 -0
- package/www/browser/chunk-HUMCWAKJ.js +3 -0
- package/www/browser/chunk-IKB3EQCP.js +2 -0
- package/www/browser/chunk-K7PESFPY.js +1 -0
- package/www/browser/chunk-KRYMOHYF.js +2 -0
- package/www/browser/chunk-M4QRBV3K.js +1 -0
- package/www/browser/chunk-N2PELLMM.js +30 -0
- package/www/browser/chunk-ONXBYGIG.js +1 -0
- package/www/browser/chunk-OSBDR36P.js +1 -0
- package/www/browser/chunk-OZCK4XVV.js +1 -0
- package/www/browser/chunk-QJP5F735.js +1 -0
- package/www/browser/chunk-RGOYDY7H.js +1 -0
- package/www/browser/chunk-UJKK4A7Y.js +1 -0
- package/www/browser/chunk-WD2EKZQC.js +1 -0
- package/www/browser/chunk-WUA5JFDD.js +1 -0
- package/www/browser/chunk-XLFHB7RS.js +3 -0
- package/www/browser/chunk-YNW4HEJO.js +37 -0
- package/www/browser/chunk-ZTDLWBW5.js +1 -0
- package/www/browser/dark.css +1 -30433
- package/www/browser/default.css +1 -30149
- package/www/browser/index.html +3 -3
- package/www/browser/main-N64WJCHX.js +34 -0
- package/www/browser/scripts-U25HCVEI.js +6 -0
- package/www/browser/styles-ROAHD7MY.css +1 -0
- package/www/browser/add-widget-drawer.component.css.map +0 -7
- package/www/browser/advanced-editor.component.css.map +0 -7
- package/www/browser/api-client.component.css.map +0 -7
- package/www/browser/api-history-drawer.component.css.map +0 -7
- package/www/browser/app.css.map +0 -7
- package/www/browser/attachment-viewer.component.css.map +0 -7
- package/www/browser/auth-editor.component.css.map +0 -7
- package/www/browser/body-editor.component.css.map +0 -7
- package/www/browser/chunk-2YSUXBGC.js +0 -627
- package/www/browser/chunk-2YSUXBGC.js.map +0 -1
- package/www/browser/chunk-3G2GEOPV.js +0 -456
- package/www/browser/chunk-3G2GEOPV.js.map +0 -1
- package/www/browser/chunk-3L72DF3R.js +0 -1683
- package/www/browser/chunk-3L72DF3R.js.map +0 -1
- package/www/browser/chunk-3MCIETCQ.js +0 -8279
- package/www/browser/chunk-3MCIETCQ.js.map +0 -1
- package/www/browser/chunk-665WC4RU.js +0 -5383
- package/www/browser/chunk-665WC4RU.js.map +0 -1
- package/www/browser/chunk-6QMSEZPT.js +0 -10044
- package/www/browser/chunk-6QMSEZPT.js.map +0 -1
- package/www/browser/chunk-6TBQERYX.js +0 -280
- package/www/browser/chunk-6TBQERYX.js.map +0 -1
- package/www/browser/chunk-6UW4MRJZ.js +0 -43
- package/www/browser/chunk-6UW4MRJZ.js.map +0 -7
- package/www/browser/chunk-6XUMIL3W.js +0 -5495
- package/www/browser/chunk-6XUMIL3W.js.map +0 -1
- package/www/browser/chunk-724YOJI3.js +0 -903
- package/www/browser/chunk-724YOJI3.js.map +0 -1
- package/www/browser/chunk-766T7YES.js +0 -437
- package/www/browser/chunk-766T7YES.js.map +0 -1
- package/www/browser/chunk-7FC7DN65.js +0 -728
- package/www/browser/chunk-7FC7DN65.js.map +0 -1
- package/www/browser/chunk-APGQRYWX.js +0 -156
- package/www/browser/chunk-APGQRYWX.js.map +0 -7
- package/www/browser/chunk-AQHSGTHS.js +0 -1960
- package/www/browser/chunk-AQHSGTHS.js.map +0 -1
- package/www/browser/chunk-CTOEAJQK.js +0 -40
- package/www/browser/chunk-CTOEAJQK.js.map +0 -7
- package/www/browser/chunk-DEGQJKKZ.js +0 -409
- package/www/browser/chunk-DEGQJKKZ.js.map +0 -1
- package/www/browser/chunk-DIJX2663.js +0 -1166
- package/www/browser/chunk-DIJX2663.js.map +0 -1
- package/www/browser/chunk-E4XD4GLT.js +0 -427
- package/www/browser/chunk-E4XD4GLT.js.map +0 -1
- package/www/browser/chunk-EQOY6A3M.js +0 -212
- package/www/browser/chunk-EQOY6A3M.js.map +0 -1
- package/www/browser/chunk-ETTBRXVA.js +0 -2643
- package/www/browser/chunk-ETTBRXVA.js.map +0 -1
- package/www/browser/chunk-FLSUSPBD.js +0 -5569
- package/www/browser/chunk-FLSUSPBD.js.map +0 -1
- package/www/browser/chunk-FZNHBEAZ.js +0 -102
- package/www/browser/chunk-FZNHBEAZ.js.map +0 -1
- package/www/browser/chunk-GJC7CZIJ.js +0 -361
- package/www/browser/chunk-GJC7CZIJ.js.map +0 -7
- package/www/browser/chunk-GMCNMOTD.js +0 -844
- package/www/browser/chunk-GMCNMOTD.js.map +0 -7
- package/www/browser/chunk-H43HGCRW.js +0 -198
- package/www/browser/chunk-H43HGCRW.js.map +0 -7
- package/www/browser/chunk-J447GBHM.js +0 -160
- package/www/browser/chunk-J447GBHM.js.map +0 -1
- package/www/browser/chunk-JN3VOWP7.js +0 -384
- package/www/browser/chunk-JN3VOWP7.js.map +0 -1
- package/www/browser/chunk-KSHAGY2M.js +0 -399
- package/www/browser/chunk-KSHAGY2M.js.map +0 -7
- package/www/browser/chunk-KV72AKOD.js +0 -59
- package/www/browser/chunk-KV72AKOD.js.map +0 -7
- package/www/browser/chunk-LAVMY2SJ.js +0 -26
- package/www/browser/chunk-LAVMY2SJ.js.map +0 -7
- package/www/browser/chunk-LLRVGHG5.js +0 -73
- package/www/browser/chunk-LLRVGHG5.js.map +0 -7
- package/www/browser/chunk-LPME4AJ3.js +0 -196
- package/www/browser/chunk-LPME4AJ3.js.map +0 -1
- package/www/browser/chunk-LVPSURVU.js +0 -4615
- package/www/browser/chunk-LVPSURVU.js.map +0 -1
- package/www/browser/chunk-MMPO7QLO.js +0 -4146
- package/www/browser/chunk-MMPO7QLO.js.map +0 -7
- package/www/browser/chunk-O7LB6VFM.js +0 -1953
- package/www/browser/chunk-O7LB6VFM.js.map +0 -1
- package/www/browser/chunk-P5CWA4FO.js +0 -685
- package/www/browser/chunk-P5CWA4FO.js.map +0 -1
- package/www/browser/chunk-RBWIWNTL.js +0 -203
- package/www/browser/chunk-RBWIWNTL.js.map +0 -7
- package/www/browser/chunk-RUXJCM3V.js +0 -26199
- package/www/browser/chunk-RUXJCM3V.js.map +0 -1
- package/www/browser/chunk-S77VVYUZ.js +0 -168
- package/www/browser/chunk-S77VVYUZ.js.map +0 -1
- package/www/browser/chunk-SCXPYFOB.js +0 -4316
- package/www/browser/chunk-SCXPYFOB.js.map +0 -1
- package/www/browser/chunk-SS73S33S.js +0 -471
- package/www/browser/chunk-SS73S33S.js.map +0 -7
- package/www/browser/chunk-T6UAOWNP.js +0 -600
- package/www/browser/chunk-T6UAOWNP.js.map +0 -1
- package/www/browser/chunk-TEW4MY4J.js +0 -148
- package/www/browser/chunk-TEW4MY4J.js.map +0 -7
- package/www/browser/chunk-TVORF3SF.js +0 -82
- package/www/browser/chunk-TVORF3SF.js.map +0 -7
- package/www/browser/chunk-UAN42EUZ.js +0 -2147
- package/www/browser/chunk-UAN42EUZ.js.map +0 -1
- package/www/browser/chunk-ULOHDK7Y.js +0 -1
- package/www/browser/chunk-ULOHDK7Y.js.map +0 -7
- package/www/browser/chunk-UYJ3FVRV.js +0 -3978
- package/www/browser/chunk-UYJ3FVRV.js.map +0 -1
- package/www/browser/chunk-VXHZMSDM.js +0 -5509
- package/www/browser/chunk-VXHZMSDM.js.map +0 -1
- package/www/browser/chunk-VYNQPZQO.js +0 -281
- package/www/browser/chunk-VYNQPZQO.js.map +0 -1
- package/www/browser/chunk-W3J23PZI.js +0 -9213
- package/www/browser/chunk-W3J23PZI.js.map +0 -1
- package/www/browser/chunk-W5HGHCQT.js +0 -1642
- package/www/browser/chunk-W5HGHCQT.js.map +0 -7
- package/www/browser/chunk-XF5H7E4L.js +0 -4723
- package/www/browser/chunk-XF5H7E4L.js.map +0 -1
- package/www/browser/chunk-XNFNEBMY.js +0 -398
- package/www/browser/chunk-XNFNEBMY.js.map +0 -7
- package/www/browser/chunk-XQY5SPGI.js +0 -30811
- package/www/browser/chunk-XQY5SPGI.js.map +0 -1
- package/www/browser/chunk-Y7JBZHNK.js +0 -514
- package/www/browser/chunk-Y7JBZHNK.js.map +0 -1
- package/www/browser/chunk-YWHRP4X3.js +0 -406
- package/www/browser/chunk-YWHRP4X3.js.map +0 -1
- package/www/browser/chunk-Z7FJIV62.js +0 -95
- package/www/browser/chunk-Z7FJIV62.js.map +0 -7
- package/www/browser/chunk-ZBZHXS46.js +0 -1674
- package/www/browser/chunk-ZBZHXS46.js.map +0 -1
- package/www/browser/chunk-ZZA5NVAI.js +0 -735
- package/www/browser/chunk-ZZA5NVAI.js.map +0 -1
- package/www/browser/collection-modal.component.css.map +0 -7
- package/www/browser/collection-tree-item.component.css.map +0 -7
- package/www/browser/collection-tree.component.css.map +0 -7
- package/www/browser/config-change-bar-component.css.map +0 -7
- package/www/browser/config-item-component.css.map +0 -7
- package/www/browser/config-nav-component.css.map +0 -7
- package/www/browser/config-section-component.css.map +0 -7
- package/www/browser/create-summary-aside.component.css.map +0 -7
- package/www/browser/curl-actions.component.css.map +0 -7
- package/www/browser/dark.css.map +0 -7
- package/www/browser/dashboard-canvas.component.css.map +0 -7
- package/www/browser/dashboard.component.css.map +0 -7
- package/www/browser/default.css.map +0 -7
- package/www/browser/detail-item-card.component.css.map +0 -7
- package/www/browser/ellipsis-text.component.css.map +0 -7
- package/www/browser/env-modal.component.css.map +0 -7
- package/www/browser/env-picker.component.css.map +0 -7
- package/www/browser/feedback.component.css.map +0 -7
- package/www/browser/fs-explorer.component.css.map +0 -7
- package/www/browser/git-import-modal.component.css.map +0 -7
- package/www/browser/hub-v2-personal-token-modal.component.css.map +0 -7
- package/www/browser/issue-action-area.component.css.map +0 -7
- package/www/browser/issue-add-participants-dialog.component.css.map +0 -7
- package/www/browser/issue-assign-dialog.component.css.map +0 -7
- package/www/browser/issue-attachment-area.component.css.map +0 -7
- package/www/browser/issue-base-info-area.component.css.map +0 -7
- package/www/browser/issue-branches.component.css.map +0 -7
- package/www/browser/issue-close-dialog.component.css.map +0 -7
- package/www/browser/issue-collaborators-panel.component.css.map +0 -7
- package/www/browser/issue-comment-editor.component.css.map +0 -7
- package/www/browser/issue-create-branch-dialog.component.css.map +0 -7
- package/www/browser/issue-description-area.component.css.map +0 -7
- package/www/browser/issue-detail.component.css.map +0 -7
- package/www/browser/issue-resolve-dialog.component.css.map +0 -7
- package/www/browser/issue-start-own-branch-dialog.component.css.map +0 -7
- package/www/browser/issues-list-table.component.css.map +0 -7
- package/www/browser/issues.component.css.map +0 -7
- package/www/browser/kill-port-widget.component.css.map +0 -7
- package/www/browser/kv-table.component.css.map +0 -7
- package/www/browser/layout-footer.component.css.map +0 -7
- package/www/browser/layout-header.component.css.map +0 -7
- package/www/browser/layout-menu.component.css.map +0 -7
- package/www/browser/layout-project-nav.component.css.map +0 -7
- package/www/browser/layout-sidebar.component.css.map +0 -7
- package/www/browser/layout.component.css.map +0 -7
- package/www/browser/less-viewport-component.css.map +0 -7
- package/www/browser/main.js +0 -1872
- package/www/browser/main.js.map +0 -1
- package/www/browser/markdown-viewer.component.css.map +0 -7
- package/www/browser/news-feed-widget.component.css.map +0 -7
- package/www/browser/ng-devtool.component.css.map +0 -7
- package/www/browser/nginx-config-editor.component.css.map +0 -7
- package/www/browser/nginx-log-viewer.component.css.map +0 -7
- package/www/browser/nginx-secondary-logs-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-perf-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-settings-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-ssl-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-test-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-traffic-tab.component.css.map +0 -7
- package/www/browser/nginx-secondary-upstream-tab.component.css.map +0 -7
- package/www/browser/nginx-section-card.component.css.map +0 -7
- package/www/browser/nginx-server-drawer.component.css.map +0 -7
- package/www/browser/nginx-server-list.component.css.map +0 -7
- package/www/browser/nginx-stat-card.component.css.map +0 -7
- package/www/browser/nginx.component.css.map +0 -7
- package/www/browser/page-layout.component.css.map +0 -7
- package/www/browser/pick-workspace-modal.component.css.map +0 -7
- package/www/browser/polyfills.js +0 -26584
- package/www/browser/polyfills.js.map +0 -7
- package/www/browser/project-conf.component.css.map +0 -7
- package/www/browser/project-create-modal.component.css.map +0 -7
- package/www/browser/project-create.component.css.map +0 -7
- package/www/browser/project-deps.component.css.map +0 -7
- package/www/browser/project-edit-modal.component.css.map +0 -7
- package/www/browser/project-import.component.css.map +0 -7
- package/www/browser/project-item-popover.component.css.map +0 -7
- package/www/browser/project-item.component.css.map +0 -7
- package/www/browser/project-list.component.css.map +0 -7
- package/www/browser/projects.component.css.map +0 -7
- package/www/browser/quick-task-widget.component.css.map +0 -7
- package/www/browser/rd-action-area.component.css.map +0 -7
- package/www/browser/rd-advance-stage-dialog.component.css.map +0 -7
- package/www/browser/rd-block-dialog.component.css.map +0 -7
- package/www/browser/rd-create-dialog.component.css.map +0 -7
- package/www/browser/rd-detail.component.css.map +0 -7
- package/www/browser/rd-item-card.component.css.map +0 -7
- package/www/browser/rd-list-board.component.css.map +0 -7
- package/www/browser/rd-list-table.component.css.map +0 -7
- package/www/browser/rd.component.css.map +0 -7
- package/www/browser/request-collections.component.css.map +0 -7
- package/www/browser/request-editor.component.css.map +0 -7
- package/www/browser/request-list-item.component.css.map +0 -7
- package/www/browser/request-list.component.css.map +0 -7
- package/www/browser/request-tabs-bar.component.css.map +0 -7
- package/www/browser/request-tabs.component.css.map +0 -7
- package/www/browser/request-urlbar.component.css.map +0 -7
- package/www/browser/response-viewer.component.css.map +0 -7
- package/www/browser/scripts.js +0 -245
- package/www/browser/scripts.js.map +0 -7
- package/www/browser/setting.component.css.map +0 -7
- package/www/browser/sprite-conf-modal.component.css.map +0 -7
- package/www/browser/sprite-icons-panel-component.css.map +0 -7
- package/www/browser/sprite-images-panel-component.css.map +0 -7
- package/www/browser/sprite-result-tabs.component.css.map +0 -7
- package/www/browser/sprite-viewport-component.css.map +0 -7
- package/www/browser/sprite.component.css.map +0 -7
- package/www/browser/step-advance.component.css.map +0 -7
- package/www/browser/step-basic.component.css.map +0 -7
- package/www/browser/step-config.component.css.map +0 -7
- package/www/browser/step-features.component.css.map +0 -7
- package/www/browser/step-preset.component.css.map +0 -7
- package/www/browser/step-summary-aside.component.css.map +0 -7
- package/www/browser/styles.css +0 -258
- package/www/browser/styles.css.map +0 -7
- package/www/browser/system-log.component.css.map +0 -7
- package/www/browser/task-actions.component.css.map +0 -7
- package/www/browser/task-console.component.css.map +0 -7
- package/www/browser/task-header.component.css.map +0 -7
- package/www/browser/task-list.component.css.map +0 -7
- package/www/browser/tasks.component.css.map +0 -7
- package/www/browser/terminal-view.component.css.map +0 -7
- package/www/browser/welcome-widget.component.css.map +0 -7
- package/www/browser/widget-base.component.css.map +0 -7
- package/www/browser/widget-host.component.css.map +0 -7
|
@@ -1,627 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ComponentPortal,
|
|
3
|
-
NzConfigService,
|
|
4
|
-
NzIconDirective,
|
|
5
|
-
NzIconModule,
|
|
6
|
-
NzOutletModule,
|
|
7
|
-
NzSingletonService,
|
|
8
|
-
NzStringTemplateOutletDirective,
|
|
9
|
-
createGlobalPositionStrategy,
|
|
10
|
-
createNoopScrollStrategy,
|
|
11
|
-
createOverlayRef,
|
|
12
|
-
moveUpMotion,
|
|
13
|
-
onConfigChangeEventForComponent,
|
|
14
|
-
toCssPixel
|
|
15
|
-
} from "./chunk-RUXJCM3V.js";
|
|
16
|
-
import {
|
|
17
|
-
HttpClient
|
|
18
|
-
} from "./chunk-3MCIETCQ.js";
|
|
19
|
-
import {
|
|
20
|
-
ChangeDetectionStrategy,
|
|
21
|
-
ChangeDetectorRef,
|
|
22
|
-
Component,
|
|
23
|
-
DestroyRef,
|
|
24
|
-
Directive,
|
|
25
|
-
EventEmitter,
|
|
26
|
-
FactoryTarget,
|
|
27
|
-
Injectable,
|
|
28
|
-
Injector,
|
|
29
|
-
Input,
|
|
30
|
-
Output,
|
|
31
|
-
Subject,
|
|
32
|
-
ViewEncapsulation,
|
|
33
|
-
__decorate,
|
|
34
|
-
__spreadValues,
|
|
35
|
-
core_exports,
|
|
36
|
-
filter,
|
|
37
|
-
firstValueFrom,
|
|
38
|
-
inject,
|
|
39
|
-
map,
|
|
40
|
-
take,
|
|
41
|
-
ɵɵngDeclareClassMetadata,
|
|
42
|
-
ɵɵngDeclareComponent,
|
|
43
|
-
ɵɵngDeclareDirective,
|
|
44
|
-
ɵɵngDeclareFactory,
|
|
45
|
-
ɵɵngDeclareInjectable
|
|
46
|
-
} from "./chunk-XQY5SPGI.js";
|
|
47
|
-
|
|
48
|
-
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-message.mjs
|
|
49
|
-
var globalCounter = 0;
|
|
50
|
-
var NzMNService = class {
|
|
51
|
-
container;
|
|
52
|
-
nzSingletonService = inject(NzSingletonService);
|
|
53
|
-
injector = inject(Injector);
|
|
54
|
-
remove(id) {
|
|
55
|
-
if (this.container) {
|
|
56
|
-
if (id) {
|
|
57
|
-
this.container.remove(id);
|
|
58
|
-
} else {
|
|
59
|
-
this.container.removeAll();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
getInstanceId() {
|
|
64
|
-
return `${this.componentPrefix}-${globalCounter++}`;
|
|
65
|
-
}
|
|
66
|
-
withContainer(ctor) {
|
|
67
|
-
let containerInstance = this.nzSingletonService.getSingletonWithKey(this.componentPrefix);
|
|
68
|
-
if (containerInstance) {
|
|
69
|
-
return containerInstance;
|
|
70
|
-
}
|
|
71
|
-
const overlayRef = createOverlayRef(this.injector, {
|
|
72
|
-
hasBackdrop: false,
|
|
73
|
-
scrollStrategy: createNoopScrollStrategy(),
|
|
74
|
-
positionStrategy: createGlobalPositionStrategy(this.injector)
|
|
75
|
-
});
|
|
76
|
-
const componentPortal = new ComponentPortal(ctor, null, this.injector);
|
|
77
|
-
const componentRef = overlayRef.attach(componentPortal);
|
|
78
|
-
const overlayWrapper = overlayRef.hostElement;
|
|
79
|
-
overlayWrapper.style.zIndex = "1010";
|
|
80
|
-
if (!containerInstance) {
|
|
81
|
-
this.container = containerInstance = componentRef.instance;
|
|
82
|
-
this.nzSingletonService.registerSingletonWithKey(this.componentPrefix, containerInstance);
|
|
83
|
-
this.container.afterAllInstancesRemoved.subscribe(() => {
|
|
84
|
-
this.container = void 0;
|
|
85
|
-
this.nzSingletonService.unregisterSingletonWithKey(this.componentPrefix);
|
|
86
|
-
overlayRef.dispose();
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
return containerInstance;
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
var NzMNContainerComponent = class _NzMNContainerComponent {
|
|
93
|
-
config;
|
|
94
|
-
instances = [];
|
|
95
|
-
_afterAllInstancesRemoved = new Subject();
|
|
96
|
-
afterAllInstancesRemoved = this._afterAllInstancesRemoved.asObservable();
|
|
97
|
-
cdr = inject(ChangeDetectorRef);
|
|
98
|
-
nzConfigService = inject(NzConfigService);
|
|
99
|
-
constructor() {
|
|
100
|
-
this.subscribeConfigChange();
|
|
101
|
-
}
|
|
102
|
-
create(data) {
|
|
103
|
-
const instance = this.onCreate(data);
|
|
104
|
-
if (this.instances.length >= this.config.nzMaxStack) {
|
|
105
|
-
this.instances = this.instances.slice(1);
|
|
106
|
-
}
|
|
107
|
-
this.instances = [...this.instances, instance];
|
|
108
|
-
this.readyInstances();
|
|
109
|
-
return instance;
|
|
110
|
-
}
|
|
111
|
-
remove(id, userAction = false) {
|
|
112
|
-
this.instances.map((instance, index) => ({ index, instance })).filter(({ instance }) => instance.messageId === id).forEach(({ index, instance }) => {
|
|
113
|
-
this.instances.splice(index, 1);
|
|
114
|
-
this.instances = [...this.instances];
|
|
115
|
-
this.onRemove(instance, userAction);
|
|
116
|
-
this.readyInstances();
|
|
117
|
-
});
|
|
118
|
-
if (!this.instances.length) {
|
|
119
|
-
this.onAllInstancesRemoved();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
removeAll() {
|
|
123
|
-
this.instances.forEach((i) => this.onRemove(i, false));
|
|
124
|
-
this.instances = [];
|
|
125
|
-
this.readyInstances();
|
|
126
|
-
this.onAllInstancesRemoved();
|
|
127
|
-
}
|
|
128
|
-
onCreate(instance) {
|
|
129
|
-
instance.options = this.mergeOptions(instance.options);
|
|
130
|
-
instance.onClose = new Subject();
|
|
131
|
-
return instance;
|
|
132
|
-
}
|
|
133
|
-
onRemove(instance, userAction) {
|
|
134
|
-
instance.onClose.next(userAction);
|
|
135
|
-
instance.onClose.complete();
|
|
136
|
-
}
|
|
137
|
-
onAllInstancesRemoved() {
|
|
138
|
-
this._afterAllInstancesRemoved.next();
|
|
139
|
-
this._afterAllInstancesRemoved.complete();
|
|
140
|
-
}
|
|
141
|
-
readyInstances() {
|
|
142
|
-
this.cdr.detectChanges();
|
|
143
|
-
}
|
|
144
|
-
mergeOptions(options) {
|
|
145
|
-
const { nzDuration, nzAnimate, nzPauseOnHover } = this.config;
|
|
146
|
-
return __spreadValues({ nzDuration, nzAnimate, nzPauseOnHover }, options);
|
|
147
|
-
}
|
|
148
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMNContainerComponent, deps: [], target: FactoryTarget.Directive });
|
|
149
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzMNContainerComponent, isStandalone: true, ngImport: core_exports });
|
|
150
|
-
};
|
|
151
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMNContainerComponent, decorators: [{
|
|
152
|
-
type: Directive
|
|
153
|
-
}], ctorParameters: () => [] });
|
|
154
|
-
var NzMNComponent = class _NzMNComponent {
|
|
155
|
-
cdr = inject(ChangeDetectorRef);
|
|
156
|
-
destroyRef = inject(DestroyRef);
|
|
157
|
-
animationStateChanged = new Subject();
|
|
158
|
-
options;
|
|
159
|
-
autoClose;
|
|
160
|
-
closeTimer;
|
|
161
|
-
userAction = false;
|
|
162
|
-
eraseTimer;
|
|
163
|
-
eraseTimingStart;
|
|
164
|
-
eraseTTL;
|
|
165
|
-
constructor() {
|
|
166
|
-
this.destroyRef.onDestroy(() => {
|
|
167
|
-
if (this.autoClose) {
|
|
168
|
-
this.clearEraseTimeout();
|
|
169
|
-
}
|
|
170
|
-
this.animationStateChanged.complete();
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
ngOnInit() {
|
|
174
|
-
this.options = this.instance.options;
|
|
175
|
-
if (this.options.nzAnimate) {
|
|
176
|
-
this.instance.state = "enter";
|
|
177
|
-
this.animationStateChanged.pipe(filter((event) => event.phaseName === "done" && event.toState === "leave"), take(1)).subscribe(() => {
|
|
178
|
-
clearTimeout(this.closeTimer);
|
|
179
|
-
this.destroyed.next({ id: this.instance.messageId, userAction: this.userAction });
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
this.autoClose = this.options.nzDuration > 0;
|
|
183
|
-
if (this.autoClose) {
|
|
184
|
-
this.initErase();
|
|
185
|
-
this.startEraseTimeout();
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
onEnter() {
|
|
189
|
-
if (this.autoClose && this.options.nzPauseOnHover) {
|
|
190
|
-
this.clearEraseTimeout();
|
|
191
|
-
this.updateTTL();
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
onLeave() {
|
|
195
|
-
if (this.autoClose && this.options.nzPauseOnHover) {
|
|
196
|
-
this.startEraseTimeout();
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
destroy(userAction = false) {
|
|
200
|
-
this.userAction = userAction;
|
|
201
|
-
if (this.options.nzAnimate) {
|
|
202
|
-
this.instance.state = "leave";
|
|
203
|
-
this.cdr.detectChanges();
|
|
204
|
-
this.closeTimer = setTimeout(() => {
|
|
205
|
-
this.closeTimer = void 0;
|
|
206
|
-
this.destroyed.next({ id: this.instance.messageId, userAction });
|
|
207
|
-
}, 200);
|
|
208
|
-
} else {
|
|
209
|
-
this.destroyed.next({ id: this.instance.messageId, userAction });
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
initErase() {
|
|
213
|
-
this.eraseTTL = this.options.nzDuration;
|
|
214
|
-
this.eraseTimingStart = Date.now();
|
|
215
|
-
}
|
|
216
|
-
updateTTL() {
|
|
217
|
-
if (this.autoClose) {
|
|
218
|
-
this.eraseTTL -= Date.now() - this.eraseTimingStart;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
startEraseTimeout() {
|
|
222
|
-
if (this.eraseTTL > 0) {
|
|
223
|
-
this.clearEraseTimeout();
|
|
224
|
-
this.eraseTimer = setTimeout(() => this.destroy(), this.eraseTTL);
|
|
225
|
-
this.eraseTimingStart = Date.now();
|
|
226
|
-
} else {
|
|
227
|
-
this.destroy();
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
clearEraseTimeout() {
|
|
231
|
-
if (this.eraseTimer !== null) {
|
|
232
|
-
clearTimeout(this.eraseTimer);
|
|
233
|
-
this.eraseTimer = void 0;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMNComponent, deps: [], target: FactoryTarget.Directive });
|
|
237
|
-
static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzMNComponent, isStandalone: true, ngImport: core_exports });
|
|
238
|
-
};
|
|
239
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMNComponent, decorators: [{
|
|
240
|
-
type: Directive
|
|
241
|
-
}], ctorParameters: () => [] });
|
|
242
|
-
var NzMessageComponent = class _NzMessageComponent extends NzMNComponent {
|
|
243
|
-
instance;
|
|
244
|
-
destroyed = new EventEmitter();
|
|
245
|
-
index;
|
|
246
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMessageComponent, deps: null, target: FactoryTarget.Component });
|
|
247
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzMessageComponent, isStandalone: true, selector: "nz-message", inputs: { instance: "instance" }, outputs: { destroyed: "destroyed" }, exportAs: ["nzMessage"], usesInheritance: true, ngImport: core_exports, template: `
|
|
248
|
-
<div
|
|
249
|
-
class="ant-message-notice"
|
|
250
|
-
[class]="instance.options?.nzClass"
|
|
251
|
-
[style]="instance.options?.nzStyle"
|
|
252
|
-
[@moveUpMotion]="instance.state"
|
|
253
|
-
(@moveUpMotion.done)="animationStateChanged.next($event)"
|
|
254
|
-
(mouseenter)="onEnter()"
|
|
255
|
-
(mouseleave)="onLeave()"
|
|
256
|
-
>
|
|
257
|
-
<div class="ant-message-notice-content">
|
|
258
|
-
<div class="ant-message-custom-content" [class]="'ant-message-' + instance.type">
|
|
259
|
-
@switch (instance.type) {
|
|
260
|
-
@case ('success') {
|
|
261
|
-
<nz-icon nzType="check-circle" />
|
|
262
|
-
}
|
|
263
|
-
@case ('info') {
|
|
264
|
-
<nz-icon nzType="info-circle" />
|
|
265
|
-
}
|
|
266
|
-
@case ('warning') {
|
|
267
|
-
<nz-icon nzType="exclamation-circle" />
|
|
268
|
-
}
|
|
269
|
-
@case ('error') {
|
|
270
|
-
<nz-icon nzType="close-circle" />
|
|
271
|
-
}
|
|
272
|
-
@case ('loading') {
|
|
273
|
-
<nz-icon nzType="loading" />
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
<ng-container
|
|
277
|
-
*nzStringTemplateOutlet="instance.content; context: { $implicit: this, data: instance.options?.nzData }"
|
|
278
|
-
>
|
|
279
|
-
<span [innerHTML]="instance.content"></span>
|
|
280
|
-
</ng-container>
|
|
281
|
-
</div>
|
|
282
|
-
</div>
|
|
283
|
-
</div>
|
|
284
|
-
`, 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"] }], animations: [moveUpMotion], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
285
|
-
};
|
|
286
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMessageComponent, decorators: [{
|
|
287
|
-
type: Component,
|
|
288
|
-
args: [{
|
|
289
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
290
|
-
encapsulation: ViewEncapsulation.None,
|
|
291
|
-
selector: "nz-message",
|
|
292
|
-
exportAs: "nzMessage",
|
|
293
|
-
animations: [moveUpMotion],
|
|
294
|
-
template: `
|
|
295
|
-
<div
|
|
296
|
-
class="ant-message-notice"
|
|
297
|
-
[class]="instance.options?.nzClass"
|
|
298
|
-
[style]="instance.options?.nzStyle"
|
|
299
|
-
[@moveUpMotion]="instance.state"
|
|
300
|
-
(@moveUpMotion.done)="animationStateChanged.next($event)"
|
|
301
|
-
(mouseenter)="onEnter()"
|
|
302
|
-
(mouseleave)="onLeave()"
|
|
303
|
-
>
|
|
304
|
-
<div class="ant-message-notice-content">
|
|
305
|
-
<div class="ant-message-custom-content" [class]="'ant-message-' + instance.type">
|
|
306
|
-
@switch (instance.type) {
|
|
307
|
-
@case ('success') {
|
|
308
|
-
<nz-icon nzType="check-circle" />
|
|
309
|
-
}
|
|
310
|
-
@case ('info') {
|
|
311
|
-
<nz-icon nzType="info-circle" />
|
|
312
|
-
}
|
|
313
|
-
@case ('warning') {
|
|
314
|
-
<nz-icon nzType="exclamation-circle" />
|
|
315
|
-
}
|
|
316
|
-
@case ('error') {
|
|
317
|
-
<nz-icon nzType="close-circle" />
|
|
318
|
-
}
|
|
319
|
-
@case ('loading') {
|
|
320
|
-
<nz-icon nzType="loading" />
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
<ng-container
|
|
324
|
-
*nzStringTemplateOutlet="instance.content; context: { $implicit: this, data: instance.options?.nzData }"
|
|
325
|
-
>
|
|
326
|
-
<span [innerHTML]="instance.content"></span>
|
|
327
|
-
</ng-container>
|
|
328
|
-
</div>
|
|
329
|
-
</div>
|
|
330
|
-
</div>
|
|
331
|
-
`,
|
|
332
|
-
imports: [NzIconModule, NzOutletModule]
|
|
333
|
-
}]
|
|
334
|
-
}], propDecorators: { instance: [{
|
|
335
|
-
type: Input
|
|
336
|
-
}], destroyed: [{
|
|
337
|
-
type: Output
|
|
338
|
-
}] } });
|
|
339
|
-
var NZ_CONFIG_COMPONENT_NAME = "message";
|
|
340
|
-
var NZ_MESSAGE_DEFAULT_CONFIG = {
|
|
341
|
-
nzAnimate: true,
|
|
342
|
-
nzDuration: 3e3,
|
|
343
|
-
nzMaxStack: 7,
|
|
344
|
-
nzPauseOnHover: true,
|
|
345
|
-
nzTop: 24,
|
|
346
|
-
nzDirection: "ltr"
|
|
347
|
-
};
|
|
348
|
-
var NzMessageContainerComponent = class _NzMessageContainerComponent extends NzMNContainerComponent {
|
|
349
|
-
dir = this.nzConfigService.getConfigForComponent(NZ_CONFIG_COMPONENT_NAME)?.nzDirection || "ltr";
|
|
350
|
-
top;
|
|
351
|
-
constructor() {
|
|
352
|
-
super();
|
|
353
|
-
this.updateConfig();
|
|
354
|
-
}
|
|
355
|
-
subscribeConfigChange() {
|
|
356
|
-
onConfigChangeEventForComponent(NZ_CONFIG_COMPONENT_NAME, () => {
|
|
357
|
-
this.updateConfig();
|
|
358
|
-
this.dir = this.nzConfigService.getConfigForComponent(NZ_CONFIG_COMPONENT_NAME)?.nzDirection || this.dir;
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
updateConfig() {
|
|
362
|
-
this.config = __spreadValues(__spreadValues(__spreadValues({}, NZ_MESSAGE_DEFAULT_CONFIG), this.config), this.nzConfigService.getConfigForComponent(NZ_CONFIG_COMPONENT_NAME));
|
|
363
|
-
this.top = toCssPixel(this.config.nzTop);
|
|
364
|
-
this.cdr.markForCheck();
|
|
365
|
-
}
|
|
366
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMessageContainerComponent, deps: [], target: FactoryTarget.Component });
|
|
367
|
-
static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzMessageContainerComponent, isStandalone: true, selector: "nz-message-container", exportAs: ["nzMessageContainer"], usesInheritance: true, ngImport: core_exports, template: `
|
|
368
|
-
<div class="ant-message" [class.ant-message-rtl]="dir === 'rtl'" [style.top]="top">
|
|
369
|
-
@for (instance of instances; track instance) {
|
|
370
|
-
<nz-message [instance]="instance" (destroyed)="remove($event.id, $event.userAction)" />
|
|
371
|
-
}
|
|
372
|
-
</div>
|
|
373
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NzMessageComponent, selector: "nz-message", inputs: ["instance"], outputs: ["destroyed"], exportAs: ["nzMessage"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
|
|
374
|
-
};
|
|
375
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMessageContainerComponent, decorators: [{
|
|
376
|
-
type: Component,
|
|
377
|
-
args: [{
|
|
378
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
379
|
-
encapsulation: ViewEncapsulation.None,
|
|
380
|
-
selector: "nz-message-container",
|
|
381
|
-
exportAs: "nzMessageContainer",
|
|
382
|
-
template: `
|
|
383
|
-
<div class="ant-message" [class.ant-message-rtl]="dir === 'rtl'" [style.top]="top">
|
|
384
|
-
@for (instance of instances; track instance) {
|
|
385
|
-
<nz-message [instance]="instance" (destroyed)="remove($event.id, $event.userAction)" />
|
|
386
|
-
}
|
|
387
|
-
</div>
|
|
388
|
-
`,
|
|
389
|
-
imports: [NzMessageComponent]
|
|
390
|
-
}]
|
|
391
|
-
}], ctorParameters: () => [] });
|
|
392
|
-
var NzMessageService = class _NzMessageService extends NzMNService {
|
|
393
|
-
componentPrefix = "message-";
|
|
394
|
-
success(content, options) {
|
|
395
|
-
return this.createInstance({ type: "success", content }, options);
|
|
396
|
-
}
|
|
397
|
-
error(content, options) {
|
|
398
|
-
return this.createInstance({ type: "error", content }, options);
|
|
399
|
-
}
|
|
400
|
-
info(content, options) {
|
|
401
|
-
return this.createInstance({ type: "info", content }, options);
|
|
402
|
-
}
|
|
403
|
-
warning(content, options) {
|
|
404
|
-
return this.createInstance({ type: "warning", content }, options);
|
|
405
|
-
}
|
|
406
|
-
loading(content, options) {
|
|
407
|
-
return this.createInstance({ type: "loading", content }, options);
|
|
408
|
-
}
|
|
409
|
-
create(type, content, options) {
|
|
410
|
-
return this.createInstance({ type, content }, options);
|
|
411
|
-
}
|
|
412
|
-
createInstance(message, options) {
|
|
413
|
-
this.container = this.withContainer(NzMessageContainerComponent);
|
|
414
|
-
return this.container.create(__spreadValues(__spreadValues({}, message), {
|
|
415
|
-
createdAt: /* @__PURE__ */ new Date(),
|
|
416
|
-
messageId: this.getInstanceId(),
|
|
417
|
-
options
|
|
418
|
-
}));
|
|
419
|
-
}
|
|
420
|
-
static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMessageService, deps: null, target: FactoryTarget.Injectable });
|
|
421
|
-
static \u0275prov = \u0275\u0275ngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzMessageService, providedIn: "root" });
|
|
422
|
-
};
|
|
423
|
-
\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzMessageService, decorators: [{
|
|
424
|
-
type: Injectable,
|
|
425
|
-
args: [{
|
|
426
|
-
providedIn: "root"
|
|
427
|
-
}]
|
|
428
|
-
}] });
|
|
429
|
-
|
|
430
|
-
// src/app/core/local-state/local-state.keys.ts
|
|
431
|
-
var LS_KEYS = {
|
|
432
|
-
project: {
|
|
433
|
-
currentProjectId: "ngm:project:currentProjectId"
|
|
434
|
-
},
|
|
435
|
-
token: {
|
|
436
|
-
hubV2PersonalToken: "ngm:token:hubV2PersonalToken"
|
|
437
|
-
},
|
|
438
|
-
fs: {
|
|
439
|
-
explorer: {
|
|
440
|
-
lastPath: "ngm:fs:explorer:lastPath",
|
|
441
|
-
favorites: "ngm:fs:explorer:favorites"
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
|
-
dashboard: {
|
|
445
|
-
layout: "ngm:dashboard:layout"
|
|
446
|
-
// + projectId
|
|
447
|
-
}
|
|
448
|
-
// 未来可加:
|
|
449
|
-
// ui: { sidebarCollapsed: "ngm:ui:sidebarCollapsed" },
|
|
450
|
-
// task: { logPanelHeight: "ngm:task:logPanelHeight" },
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
// src/app/core/local-state/local-state.store.ts
|
|
454
|
-
var LocalStorageDriver = class LocalStorageDriver2 {
|
|
455
|
-
get(key) {
|
|
456
|
-
const raw = localStorage.getItem(key);
|
|
457
|
-
if (raw == null)
|
|
458
|
-
return null;
|
|
459
|
-
try {
|
|
460
|
-
return JSON.parse(raw);
|
|
461
|
-
} catch {
|
|
462
|
-
return raw;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
set(key, value) {
|
|
466
|
-
localStorage.setItem(key, JSON.stringify(value));
|
|
467
|
-
}
|
|
468
|
-
remove(key) {
|
|
469
|
-
localStorage.removeItem(key);
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
LocalStorageDriver = __decorate([
|
|
473
|
-
Injectable({ providedIn: "root" })
|
|
474
|
-
], LocalStorageDriver);
|
|
475
|
-
var LocalStateStore = class LocalStateStore2 {
|
|
476
|
-
driver;
|
|
477
|
-
constructor(driver) {
|
|
478
|
-
this.driver = driver;
|
|
479
|
-
}
|
|
480
|
-
get(key, fallback) {
|
|
481
|
-
const v = this.driver.get(key);
|
|
482
|
-
return v ?? fallback;
|
|
483
|
-
}
|
|
484
|
-
getNullable(key) {
|
|
485
|
-
return this.driver.get(key);
|
|
486
|
-
}
|
|
487
|
-
set(key, value) {
|
|
488
|
-
this.driver.set(key, value);
|
|
489
|
-
}
|
|
490
|
-
remove(key) {
|
|
491
|
-
this.driver.remove(key);
|
|
492
|
-
}
|
|
493
|
-
static ctorParameters = () => [
|
|
494
|
-
{ type: LocalStorageDriver }
|
|
495
|
-
];
|
|
496
|
-
};
|
|
497
|
-
LocalStateStore = __decorate([
|
|
498
|
-
Injectable({ providedIn: "root" })
|
|
499
|
-
], LocalStateStore);
|
|
500
|
-
|
|
501
|
-
// src/app/core/api/api-biz-error.ts
|
|
502
|
-
var ApiBizError = class extends Error {
|
|
503
|
-
code;
|
|
504
|
-
details;
|
|
505
|
-
requestId;
|
|
506
|
-
constructor(code, message, details, requestId) {
|
|
507
|
-
super(message);
|
|
508
|
-
this.code = code;
|
|
509
|
-
this.details = details;
|
|
510
|
-
this.requestId = requestId;
|
|
511
|
-
this.name = "ApiBizError";
|
|
512
|
-
}
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
// src/app/core/api/api-executor.ts
|
|
516
|
-
function unwrapApi() {
|
|
517
|
-
return map((res) => {
|
|
518
|
-
if (res.ok) {
|
|
519
|
-
return res.data;
|
|
520
|
-
}
|
|
521
|
-
throw new ApiBizError(res.error.code, res.error.message, res.error.details, res.meta?.requestId);
|
|
522
|
-
});
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
// src/app/core/api/api-client.ts
|
|
526
|
-
var ApiClient = class ApiClient2 {
|
|
527
|
-
ls = inject(LocalStateStore);
|
|
528
|
-
http = inject(HttpClient);
|
|
529
|
-
base = "/api/client";
|
|
530
|
-
get(url, params) {
|
|
531
|
-
return this.http.get(url, { params }).pipe(unwrapApi());
|
|
532
|
-
}
|
|
533
|
-
post(url, body, params) {
|
|
534
|
-
return this.http.post(url, body, { params }).pipe(unwrapApi());
|
|
535
|
-
}
|
|
536
|
-
delete(url, params) {
|
|
537
|
-
return this.http.delete(url, { params }).pipe(unwrapApi());
|
|
538
|
-
}
|
|
539
|
-
put(url, body, params) {
|
|
540
|
-
return this.http.put(url, body, { params }).pipe(unwrapApi());
|
|
541
|
-
}
|
|
542
|
-
patch(url, body, params) {
|
|
543
|
-
return this.http.patch(url, body, { params }).pipe(unwrapApi());
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* 通过prjectId获取hub v2 的数据(读操作)
|
|
547
|
-
* token 已经本地配置完成
|
|
548
|
-
*/
|
|
549
|
-
async hubRequestWithPrjId(body) {
|
|
550
|
-
return await firstValueFrom(this.http.post(`${this.base}/hub-token/request`, {
|
|
551
|
-
projectId: body.projectId,
|
|
552
|
-
path: body.path,
|
|
553
|
-
method: body.method ?? "GET",
|
|
554
|
-
query: body.query,
|
|
555
|
-
body: body.payload,
|
|
556
|
-
headers: body.headers
|
|
557
|
-
}).pipe(unwrapApi()));
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
*
|
|
561
|
-
*/
|
|
562
|
-
async hubRequestWithPersonalToken(body) {
|
|
563
|
-
return await firstValueFrom(this.http.post(`${this.base}/hub-token/request`, {
|
|
564
|
-
projectId: body.projectId,
|
|
565
|
-
path: body.path,
|
|
566
|
-
method: body.method ?? "GET",
|
|
567
|
-
query: body.query,
|
|
568
|
-
body: body.payload,
|
|
569
|
-
headers: body.headers,
|
|
570
|
-
tokenType: "personal",
|
|
571
|
-
personalToken: this.ls.get(LS_KEYS.token.hubV2PersonalToken, "").trim() || void 0
|
|
572
|
-
}).pipe(unwrapApi()));
|
|
573
|
-
}
|
|
574
|
-
};
|
|
575
|
-
ApiClient = __decorate([
|
|
576
|
-
Injectable({ providedIn: "root" })
|
|
577
|
-
], ApiClient);
|
|
578
|
-
|
|
579
|
-
// src/app/core/ui-notifier.service.ts
|
|
580
|
-
var UiNotifierService = class UiNotifierService2 {
|
|
581
|
-
// private modalService: NzModalService = inject(NzModalService);
|
|
582
|
-
msg = inject(NzMessageService);
|
|
583
|
-
error(text, meta) {
|
|
584
|
-
console.error("[UI ERROR]", text, meta);
|
|
585
|
-
this.msg.error(text);
|
|
586
|
-
}
|
|
587
|
-
warn(text) {
|
|
588
|
-
this.msg.warning(text);
|
|
589
|
-
}
|
|
590
|
-
info(text) {
|
|
591
|
-
this.msg.info(text);
|
|
592
|
-
}
|
|
593
|
-
success(text) {
|
|
594
|
-
this.msg.success(text);
|
|
595
|
-
}
|
|
596
|
-
// modal(text: string, action?: any) {
|
|
597
|
-
// this.modalService.error({
|
|
598
|
-
// nzTitle: '错误',
|
|
599
|
-
// nzContent: text,
|
|
600
|
-
// nzOnOk: () => {
|
|
601
|
-
// if (action?.reload) {
|
|
602
|
-
// window.location.reload();
|
|
603
|
-
// } else if (action?.redirect) {
|
|
604
|
-
// window.location.href = action.redirect;
|
|
605
|
-
// }
|
|
606
|
-
// }
|
|
607
|
-
// });
|
|
608
|
-
// }
|
|
609
|
-
banner(text, action) {
|
|
610
|
-
}
|
|
611
|
-
// 系统提示
|
|
612
|
-
totast(text, action) {
|
|
613
|
-
}
|
|
614
|
-
};
|
|
615
|
-
UiNotifierService = __decorate([
|
|
616
|
-
Injectable({ providedIn: "root" })
|
|
617
|
-
], UiNotifierService);
|
|
618
|
-
|
|
619
|
-
export {
|
|
620
|
-
ApiBizError,
|
|
621
|
-
LS_KEYS,
|
|
622
|
-
LocalStateStore,
|
|
623
|
-
ApiClient,
|
|
624
|
-
NzMessageService,
|
|
625
|
-
UiNotifierService
|
|
626
|
-
};
|
|
627
|
-
//# sourceMappingURL=chunk-2YSUXBGC.js.map
|