@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.
Files changed (326) hide show
  1. package/lib/plugins/error-handler.plugin.js +5 -0
  2. package/lib/routes/api-client/hub-token.routes.js +22 -0
  3. package/lib/routes/index.js +2 -0
  4. package/lib/routes/node-version.routes.d.ts +2 -0
  5. package/lib/routes/node-version.routes.js +56 -0
  6. package/lib/routes/project.routes.js +5 -0
  7. package/lib/routes/sprite-browse.routes.js +19 -5
  8. package/lib/routes/sprite.routes.js +17 -11
  9. package/lib/routes/static-files.routes.js +16 -0
  10. package/lib/routes/task.routes.js +7 -0
  11. package/package.json +3 -3
  12. package/www/3rdpartylicenses.txt +14 -66
  13. package/www/browser/chunk-2BZRE4G7.js +1 -0
  14. package/www/browser/chunk-2X3MRS27.js +1 -0
  15. package/www/browser/chunk-4KETC6EB.js +1 -0
  16. package/www/browser/chunk-5T5KA5PG.js +1 -0
  17. package/www/browser/chunk-6CGHNKJI.js +1 -0
  18. package/www/browser/chunk-76TVIB33.js +63 -0
  19. package/www/browser/chunk-7J24TP36.js +1 -0
  20. package/www/browser/chunk-ACAZUX6C.js +1 -0
  21. package/www/browser/chunk-B6MBYCXI.js +1 -0
  22. package/www/browser/chunk-BYEU6KGP.js +2 -0
  23. package/www/browser/chunk-CZ5AZ3VW.js +1 -0
  24. package/www/browser/chunk-DW7F5PEA.js +1 -0
  25. package/www/browser/chunk-DXF7BVK5.js +1 -0
  26. package/www/browser/chunk-EEVPZGEY.js +1 -0
  27. package/www/browser/chunk-G2W3B7TJ.js +1 -0
  28. package/www/browser/chunk-GDWS2L66.js +1 -0
  29. package/www/browser/chunk-HFZLJHYR.js +1 -0
  30. package/www/browser/chunk-HGONFYP6.js +1 -0
  31. package/www/browser/chunk-HHBPULJW.js +2 -0
  32. package/www/browser/chunk-HRXCR3IN.js +1 -0
  33. package/www/browser/chunk-INL2PELS.js +1 -0
  34. package/www/browser/chunk-JHMEKUZ5.js +1 -0
  35. package/www/browser/chunk-JU3TEDBV.js +37 -0
  36. package/www/browser/chunk-JZULA5JV.js +1 -0
  37. package/www/browser/chunk-KVFR7GFV.js +20 -0
  38. package/www/browser/chunk-L5D75AMV.js +1 -0
  39. package/www/browser/chunk-L7TMCSHV.js +1 -0
  40. package/www/browser/chunk-LQ5OXSW7.js +3 -0
  41. package/www/browser/chunk-MVQTKINJ.js +1 -0
  42. package/www/browser/chunk-N4LRZJBP.js +1 -0
  43. package/www/browser/chunk-O2EYEF7J.js +1 -0
  44. package/www/browser/chunk-OMDHJIUB.js +1 -0
  45. package/www/browser/chunk-OWUAAOHW.js +2 -0
  46. package/www/browser/chunk-PIK5YPIB.js +1 -0
  47. package/www/browser/chunk-RHLQRQDK.js +9 -0
  48. package/www/browser/chunk-RW2JPJV7.js +1 -0
  49. package/www/browser/chunk-S3SJ4VVM.js +11 -0
  50. package/www/browser/chunk-SIVPP74B.js +0 -0
  51. package/www/browser/chunk-SPRWNZHF.js +15 -0
  52. package/www/browser/chunk-SQQNR223.js +1 -0
  53. package/www/browser/chunk-SVQWPHF5.js +1 -0
  54. package/www/browser/chunk-SYCNSLAW.js +4 -0
  55. package/www/browser/chunk-T3KK7ZXB.js +2 -0
  56. package/www/browser/chunk-TMX5TTV3.js +1 -0
  57. package/www/browser/chunk-UFY3FLDK.js +1 -0
  58. package/www/browser/chunk-UJOHBN2Y.js +1 -0
  59. package/www/browser/chunk-UQGCUFNM.js +1 -0
  60. package/www/browser/chunk-UXXWRMM6.js +1 -0
  61. package/www/browser/chunk-UZRJGJTD.js +2 -0
  62. package/www/browser/chunk-WD4IAQR3.js +1 -0
  63. package/www/browser/chunk-WF2QTF5L.js +1 -0
  64. package/www/browser/chunk-WI67LAOV.js +4 -0
  65. package/www/browser/chunk-WNCM6QKB.js +1 -0
  66. package/www/browser/chunk-XJ5KZQNN.js +1 -0
  67. package/www/browser/chunk-YETDFSQE.js +1 -0
  68. package/www/browser/chunk-YMTC5GZK.js +1 -0
  69. package/www/browser/chunk-YVZHJ76K.js +1 -0
  70. package/www/browser/chunk-ZNTJRLVH.js +1 -0
  71. package/www/browser/dark.css +1 -30433
  72. package/www/browser/default.css +1 -30149
  73. package/www/browser/index.html +3 -3
  74. package/www/browser/main-6LN5C22E.js +34 -0
  75. package/www/browser/scripts-U25HCVEI.js +6 -0
  76. package/www/browser/styles-ROAHD7MY.css +1 -0
  77. package/www/browser/add-widget-drawer.component.css.map +0 -7
  78. package/www/browser/advanced-editor.component.css.map +0 -7
  79. package/www/browser/api-client.component.css.map +0 -7
  80. package/www/browser/api-history-drawer.component.css.map +0 -7
  81. package/www/browser/app.css.map +0 -7
  82. package/www/browser/attachment-viewer.component.css.map +0 -7
  83. package/www/browser/auth-editor.component.css.map +0 -7
  84. package/www/browser/body-editor.component.css.map +0 -7
  85. package/www/browser/chunk-2YSUXBGC.js +0 -627
  86. package/www/browser/chunk-2YSUXBGC.js.map +0 -1
  87. package/www/browser/chunk-3G2GEOPV.js +0 -456
  88. package/www/browser/chunk-3G2GEOPV.js.map +0 -1
  89. package/www/browser/chunk-3L72DF3R.js +0 -1683
  90. package/www/browser/chunk-3L72DF3R.js.map +0 -1
  91. package/www/browser/chunk-3MCIETCQ.js +0 -8279
  92. package/www/browser/chunk-3MCIETCQ.js.map +0 -1
  93. package/www/browser/chunk-665WC4RU.js +0 -5383
  94. package/www/browser/chunk-665WC4RU.js.map +0 -1
  95. package/www/browser/chunk-6QMSEZPT.js +0 -10044
  96. package/www/browser/chunk-6QMSEZPT.js.map +0 -1
  97. package/www/browser/chunk-6TBQERYX.js +0 -280
  98. package/www/browser/chunk-6TBQERYX.js.map +0 -1
  99. package/www/browser/chunk-6UW4MRJZ.js +0 -43
  100. package/www/browser/chunk-6UW4MRJZ.js.map +0 -7
  101. package/www/browser/chunk-6XUMIL3W.js +0 -5495
  102. package/www/browser/chunk-6XUMIL3W.js.map +0 -1
  103. package/www/browser/chunk-724YOJI3.js +0 -903
  104. package/www/browser/chunk-724YOJI3.js.map +0 -1
  105. package/www/browser/chunk-766T7YES.js +0 -437
  106. package/www/browser/chunk-766T7YES.js.map +0 -1
  107. package/www/browser/chunk-7FC7DN65.js +0 -728
  108. package/www/browser/chunk-7FC7DN65.js.map +0 -1
  109. package/www/browser/chunk-APGQRYWX.js +0 -156
  110. package/www/browser/chunk-APGQRYWX.js.map +0 -7
  111. package/www/browser/chunk-AQHSGTHS.js +0 -1960
  112. package/www/browser/chunk-AQHSGTHS.js.map +0 -1
  113. package/www/browser/chunk-CTOEAJQK.js +0 -40
  114. package/www/browser/chunk-CTOEAJQK.js.map +0 -7
  115. package/www/browser/chunk-DEGQJKKZ.js +0 -409
  116. package/www/browser/chunk-DEGQJKKZ.js.map +0 -1
  117. package/www/browser/chunk-DIJX2663.js +0 -1166
  118. package/www/browser/chunk-DIJX2663.js.map +0 -1
  119. package/www/browser/chunk-E4XD4GLT.js +0 -427
  120. package/www/browser/chunk-E4XD4GLT.js.map +0 -1
  121. package/www/browser/chunk-EQOY6A3M.js +0 -212
  122. package/www/browser/chunk-EQOY6A3M.js.map +0 -1
  123. package/www/browser/chunk-ETTBRXVA.js +0 -2643
  124. package/www/browser/chunk-ETTBRXVA.js.map +0 -1
  125. package/www/browser/chunk-FLSUSPBD.js +0 -5569
  126. package/www/browser/chunk-FLSUSPBD.js.map +0 -1
  127. package/www/browser/chunk-FZNHBEAZ.js +0 -102
  128. package/www/browser/chunk-FZNHBEAZ.js.map +0 -1
  129. package/www/browser/chunk-GJC7CZIJ.js +0 -361
  130. package/www/browser/chunk-GJC7CZIJ.js.map +0 -7
  131. package/www/browser/chunk-GMCNMOTD.js +0 -844
  132. package/www/browser/chunk-GMCNMOTD.js.map +0 -7
  133. package/www/browser/chunk-H43HGCRW.js +0 -198
  134. package/www/browser/chunk-H43HGCRW.js.map +0 -7
  135. package/www/browser/chunk-J447GBHM.js +0 -160
  136. package/www/browser/chunk-J447GBHM.js.map +0 -1
  137. package/www/browser/chunk-JN3VOWP7.js +0 -384
  138. package/www/browser/chunk-JN3VOWP7.js.map +0 -1
  139. package/www/browser/chunk-KSHAGY2M.js +0 -399
  140. package/www/browser/chunk-KSHAGY2M.js.map +0 -7
  141. package/www/browser/chunk-KV72AKOD.js +0 -59
  142. package/www/browser/chunk-KV72AKOD.js.map +0 -7
  143. package/www/browser/chunk-LAVMY2SJ.js +0 -26
  144. package/www/browser/chunk-LAVMY2SJ.js.map +0 -7
  145. package/www/browser/chunk-LLRVGHG5.js +0 -73
  146. package/www/browser/chunk-LLRVGHG5.js.map +0 -7
  147. package/www/browser/chunk-LPME4AJ3.js +0 -196
  148. package/www/browser/chunk-LPME4AJ3.js.map +0 -1
  149. package/www/browser/chunk-LVPSURVU.js +0 -4615
  150. package/www/browser/chunk-LVPSURVU.js.map +0 -1
  151. package/www/browser/chunk-MMPO7QLO.js +0 -4146
  152. package/www/browser/chunk-MMPO7QLO.js.map +0 -7
  153. package/www/browser/chunk-O7LB6VFM.js +0 -1953
  154. package/www/browser/chunk-O7LB6VFM.js.map +0 -1
  155. package/www/browser/chunk-P5CWA4FO.js +0 -685
  156. package/www/browser/chunk-P5CWA4FO.js.map +0 -1
  157. package/www/browser/chunk-RBWIWNTL.js +0 -203
  158. package/www/browser/chunk-RBWIWNTL.js.map +0 -7
  159. package/www/browser/chunk-RUXJCM3V.js +0 -26199
  160. package/www/browser/chunk-RUXJCM3V.js.map +0 -1
  161. package/www/browser/chunk-S77VVYUZ.js +0 -168
  162. package/www/browser/chunk-S77VVYUZ.js.map +0 -1
  163. package/www/browser/chunk-SCXPYFOB.js +0 -4316
  164. package/www/browser/chunk-SCXPYFOB.js.map +0 -1
  165. package/www/browser/chunk-SS73S33S.js +0 -471
  166. package/www/browser/chunk-SS73S33S.js.map +0 -7
  167. package/www/browser/chunk-T6UAOWNP.js +0 -600
  168. package/www/browser/chunk-T6UAOWNP.js.map +0 -1
  169. package/www/browser/chunk-TEW4MY4J.js +0 -148
  170. package/www/browser/chunk-TEW4MY4J.js.map +0 -7
  171. package/www/browser/chunk-TVORF3SF.js +0 -82
  172. package/www/browser/chunk-TVORF3SF.js.map +0 -7
  173. package/www/browser/chunk-UAN42EUZ.js +0 -2147
  174. package/www/browser/chunk-UAN42EUZ.js.map +0 -1
  175. package/www/browser/chunk-ULOHDK7Y.js +0 -1
  176. package/www/browser/chunk-ULOHDK7Y.js.map +0 -7
  177. package/www/browser/chunk-UYJ3FVRV.js +0 -3978
  178. package/www/browser/chunk-UYJ3FVRV.js.map +0 -1
  179. package/www/browser/chunk-VXHZMSDM.js +0 -5509
  180. package/www/browser/chunk-VXHZMSDM.js.map +0 -1
  181. package/www/browser/chunk-VYNQPZQO.js +0 -281
  182. package/www/browser/chunk-VYNQPZQO.js.map +0 -1
  183. package/www/browser/chunk-W3J23PZI.js +0 -9213
  184. package/www/browser/chunk-W3J23PZI.js.map +0 -1
  185. package/www/browser/chunk-W5HGHCQT.js +0 -1642
  186. package/www/browser/chunk-W5HGHCQT.js.map +0 -7
  187. package/www/browser/chunk-XF5H7E4L.js +0 -4723
  188. package/www/browser/chunk-XF5H7E4L.js.map +0 -1
  189. package/www/browser/chunk-XNFNEBMY.js +0 -398
  190. package/www/browser/chunk-XNFNEBMY.js.map +0 -7
  191. package/www/browser/chunk-XQY5SPGI.js +0 -30811
  192. package/www/browser/chunk-XQY5SPGI.js.map +0 -1
  193. package/www/browser/chunk-Y7JBZHNK.js +0 -514
  194. package/www/browser/chunk-Y7JBZHNK.js.map +0 -1
  195. package/www/browser/chunk-YWHRP4X3.js +0 -406
  196. package/www/browser/chunk-YWHRP4X3.js.map +0 -1
  197. package/www/browser/chunk-Z7FJIV62.js +0 -95
  198. package/www/browser/chunk-Z7FJIV62.js.map +0 -7
  199. package/www/browser/chunk-ZBZHXS46.js +0 -1674
  200. package/www/browser/chunk-ZBZHXS46.js.map +0 -1
  201. package/www/browser/chunk-ZZA5NVAI.js +0 -735
  202. package/www/browser/chunk-ZZA5NVAI.js.map +0 -1
  203. package/www/browser/collection-modal.component.css.map +0 -7
  204. package/www/browser/collection-tree-item.component.css.map +0 -7
  205. package/www/browser/collection-tree.component.css.map +0 -7
  206. package/www/browser/config-change-bar-component.css.map +0 -7
  207. package/www/browser/config-item-component.css.map +0 -7
  208. package/www/browser/config-nav-component.css.map +0 -7
  209. package/www/browser/config-section-component.css.map +0 -7
  210. package/www/browser/create-summary-aside.component.css.map +0 -7
  211. package/www/browser/curl-actions.component.css.map +0 -7
  212. package/www/browser/dark.css.map +0 -7
  213. package/www/browser/dashboard-canvas.component.css.map +0 -7
  214. package/www/browser/dashboard.component.css.map +0 -7
  215. package/www/browser/default.css.map +0 -7
  216. package/www/browser/detail-item-card.component.css.map +0 -7
  217. package/www/browser/ellipsis-text.component.css.map +0 -7
  218. package/www/browser/env-modal.component.css.map +0 -7
  219. package/www/browser/env-picker.component.css.map +0 -7
  220. package/www/browser/feedback.component.css.map +0 -7
  221. package/www/browser/fs-explorer.component.css.map +0 -7
  222. package/www/browser/git-import-modal.component.css.map +0 -7
  223. package/www/browser/hub-v2-personal-token-modal.component.css.map +0 -7
  224. package/www/browser/issue-action-area.component.css.map +0 -7
  225. package/www/browser/issue-add-participants-dialog.component.css.map +0 -7
  226. package/www/browser/issue-assign-dialog.component.css.map +0 -7
  227. package/www/browser/issue-attachment-area.component.css.map +0 -7
  228. package/www/browser/issue-base-info-area.component.css.map +0 -7
  229. package/www/browser/issue-branches.component.css.map +0 -7
  230. package/www/browser/issue-close-dialog.component.css.map +0 -7
  231. package/www/browser/issue-collaborators-panel.component.css.map +0 -7
  232. package/www/browser/issue-comment-editor.component.css.map +0 -7
  233. package/www/browser/issue-create-branch-dialog.component.css.map +0 -7
  234. package/www/browser/issue-description-area.component.css.map +0 -7
  235. package/www/browser/issue-detail.component.css.map +0 -7
  236. package/www/browser/issue-resolve-dialog.component.css.map +0 -7
  237. package/www/browser/issue-start-own-branch-dialog.component.css.map +0 -7
  238. package/www/browser/issues-list-table.component.css.map +0 -7
  239. package/www/browser/issues.component.css.map +0 -7
  240. package/www/browser/kill-port-widget.component.css.map +0 -7
  241. package/www/browser/kv-table.component.css.map +0 -7
  242. package/www/browser/layout-footer.component.css.map +0 -7
  243. package/www/browser/layout-header.component.css.map +0 -7
  244. package/www/browser/layout-menu.component.css.map +0 -7
  245. package/www/browser/layout-project-nav.component.css.map +0 -7
  246. package/www/browser/layout-sidebar.component.css.map +0 -7
  247. package/www/browser/layout.component.css.map +0 -7
  248. package/www/browser/less-viewport-component.css.map +0 -7
  249. package/www/browser/main.js +0 -1872
  250. package/www/browser/main.js.map +0 -1
  251. package/www/browser/markdown-viewer.component.css.map +0 -7
  252. package/www/browser/news-feed-widget.component.css.map +0 -7
  253. package/www/browser/ng-devtool.component.css.map +0 -7
  254. package/www/browser/nginx-config-editor.component.css.map +0 -7
  255. package/www/browser/nginx-log-viewer.component.css.map +0 -7
  256. package/www/browser/nginx-secondary-logs-tab.component.css.map +0 -7
  257. package/www/browser/nginx-secondary-perf-tab.component.css.map +0 -7
  258. package/www/browser/nginx-secondary-settings-tab.component.css.map +0 -7
  259. package/www/browser/nginx-secondary-ssl-tab.component.css.map +0 -7
  260. package/www/browser/nginx-secondary-test-tab.component.css.map +0 -7
  261. package/www/browser/nginx-secondary-traffic-tab.component.css.map +0 -7
  262. package/www/browser/nginx-secondary-upstream-tab.component.css.map +0 -7
  263. package/www/browser/nginx-section-card.component.css.map +0 -7
  264. package/www/browser/nginx-server-drawer.component.css.map +0 -7
  265. package/www/browser/nginx-server-list.component.css.map +0 -7
  266. package/www/browser/nginx-stat-card.component.css.map +0 -7
  267. package/www/browser/nginx.component.css.map +0 -7
  268. package/www/browser/page-layout.component.css.map +0 -7
  269. package/www/browser/pick-workspace-modal.component.css.map +0 -7
  270. package/www/browser/polyfills.js +0 -26584
  271. package/www/browser/polyfills.js.map +0 -7
  272. package/www/browser/project-conf.component.css.map +0 -7
  273. package/www/browser/project-create-modal.component.css.map +0 -7
  274. package/www/browser/project-create.component.css.map +0 -7
  275. package/www/browser/project-deps.component.css.map +0 -7
  276. package/www/browser/project-edit-modal.component.css.map +0 -7
  277. package/www/browser/project-import.component.css.map +0 -7
  278. package/www/browser/project-item-popover.component.css.map +0 -7
  279. package/www/browser/project-item.component.css.map +0 -7
  280. package/www/browser/project-list.component.css.map +0 -7
  281. package/www/browser/projects.component.css.map +0 -7
  282. package/www/browser/quick-task-widget.component.css.map +0 -7
  283. package/www/browser/rd-action-area.component.css.map +0 -7
  284. package/www/browser/rd-advance-stage-dialog.component.css.map +0 -7
  285. package/www/browser/rd-block-dialog.component.css.map +0 -7
  286. package/www/browser/rd-create-dialog.component.css.map +0 -7
  287. package/www/browser/rd-detail.component.css.map +0 -7
  288. package/www/browser/rd-item-card.component.css.map +0 -7
  289. package/www/browser/rd-list-board.component.css.map +0 -7
  290. package/www/browser/rd-list-table.component.css.map +0 -7
  291. package/www/browser/rd.component.css.map +0 -7
  292. package/www/browser/request-collections.component.css.map +0 -7
  293. package/www/browser/request-editor.component.css.map +0 -7
  294. package/www/browser/request-list-item.component.css.map +0 -7
  295. package/www/browser/request-list.component.css.map +0 -7
  296. package/www/browser/request-tabs-bar.component.css.map +0 -7
  297. package/www/browser/request-tabs.component.css.map +0 -7
  298. package/www/browser/request-urlbar.component.css.map +0 -7
  299. package/www/browser/response-viewer.component.css.map +0 -7
  300. package/www/browser/scripts.js +0 -245
  301. package/www/browser/scripts.js.map +0 -7
  302. package/www/browser/setting.component.css.map +0 -7
  303. package/www/browser/sprite-conf-modal.component.css.map +0 -7
  304. package/www/browser/sprite-icons-panel-component.css.map +0 -7
  305. package/www/browser/sprite-images-panel-component.css.map +0 -7
  306. package/www/browser/sprite-result-tabs.component.css.map +0 -7
  307. package/www/browser/sprite-viewport-component.css.map +0 -7
  308. package/www/browser/sprite.component.css.map +0 -7
  309. package/www/browser/step-advance.component.css.map +0 -7
  310. package/www/browser/step-basic.component.css.map +0 -7
  311. package/www/browser/step-config.component.css.map +0 -7
  312. package/www/browser/step-features.component.css.map +0 -7
  313. package/www/browser/step-preset.component.css.map +0 -7
  314. package/www/browser/step-summary-aside.component.css.map +0 -7
  315. package/www/browser/styles.css +0 -258
  316. package/www/browser/styles.css.map +0 -7
  317. package/www/browser/system-log.component.css.map +0 -7
  318. package/www/browser/task-actions.component.css.map +0 -7
  319. package/www/browser/task-console.component.css.map +0 -7
  320. package/www/browser/task-header.component.css.map +0 -7
  321. package/www/browser/task-list.component.css.map +0 -7
  322. package/www/browser/tasks.component.css.map +0 -7
  323. package/www/browser/terminal-view.component.css.map +0 -7
  324. package/www/browser/welcome-widget.component.css.map +0 -7
  325. package/www/browser/widget-base.component.css.map +0 -7
  326. package/www/browser/widget-host.component.css.map +0 -7
@@ -1,1683 +0,0 @@
1
- import {
2
- NzTableModule
3
- } from "./chunk-UYJ3FVRV.js";
4
- import {
5
- NzLayoutModule
6
- } from "./chunk-YWHRP4X3.js";
7
- import "./chunk-Z7FJIV62.js";
8
- import {
9
- NzFormModule
10
- } from "./chunk-P5CWA4FO.js";
11
- import {
12
- NzSwitchModule
13
- } from "./chunk-6TBQERYX.js";
14
- import {
15
- NzModalModule,
16
- NzModalService
17
- } from "./chunk-FLSUSPBD.js";
18
- import {
19
- Clipboard
20
- } from "./chunk-LPME4AJ3.js";
21
- import "./chunk-JN3VOWP7.js";
22
- import "./chunk-766T7YES.js";
23
- import "./chunk-S77VVYUZ.js";
24
- import "./chunk-EQOY6A3M.js";
25
- import {
26
- NzMenuModule
27
- } from "./chunk-ZBZHXS46.js";
28
- import {
29
- require_lodash
30
- } from "./chunk-VXHZMSDM.js";
31
- import {
32
- NzSelectModule
33
- } from "./chunk-ETTBRXVA.js";
34
- import {
35
- NgDevtoolComponent,
36
- NzPopoverModule,
37
- PageLayoutComponent
38
- } from "./chunk-6QMSEZPT.js";
39
- import {
40
- ProjectContextStore
41
- } from "./chunk-TEW4MY4J.js";
42
- import {
43
- ApiClient,
44
- NzMessageService
45
- } from "./chunk-2YSUXBGC.js";
46
- import {
47
- Directionality,
48
- ENTER,
49
- ESCAPE,
50
- FormsModule,
51
- NzAutosizeDirective,
52
- NzButtonModule,
53
- NzConfigService,
54
- NzI18nService,
55
- NzIconDirective,
56
- NzIconModule,
57
- NzInputDirective,
58
- NzInputModule,
59
- NzOutletModule,
60
- NzResizeService,
61
- NzSpaceModule,
62
- NzStringTemplateOutletDirective,
63
- NzTooltipDirective,
64
- NzTooltipModule,
65
- Platform,
66
- ReactiveFormsModule,
67
- WithConfig,
68
- cancelAnimationFrame,
69
- fromEventOutsideAngular,
70
- isStyleSupport,
71
- measure,
72
- requestAnimationFrame,
73
- takeUntilDestroyed
74
- } from "./chunk-RUXJCM3V.js";
75
- import "./chunk-VYNQPZQO.js";
76
- import {
77
- RouterModule
78
- } from "./chunk-665WC4RU.js";
79
- import {
80
- CommonModule,
81
- NgTemplateOutlet
82
- } from "./chunk-3MCIETCQ.js";
83
- import {
84
- BehaviorSubject,
85
- ChangeDetectionStrategy,
86
- ChangeDetectorRef,
87
- Component,
88
- DOCUMENT,
89
- DestroyRef,
90
- Directive,
91
- ElementRef,
92
- EventEmitter,
93
- FactoryTarget,
94
- Injectable,
95
- Injector,
96
- Input,
97
- NgModule,
98
- NgZone,
99
- Output,
100
- Renderer2,
101
- Subscription,
102
- ViewChild,
103
- ViewContainerRef,
104
- ViewEncapsulation,
105
- __decorate,
106
- __esDecorate,
107
- __publicField,
108
- __runInitializers,
109
- __spreadProps,
110
- __spreadValues,
111
- __toESM,
112
- afterNextRender,
113
- booleanAttribute,
114
- computed,
115
- core_exports,
116
- effect,
117
- first,
118
- firstValueFrom,
119
- inject,
120
- input,
121
- numberAttribute,
122
- signal,
123
- switchMap,
124
- ɵɵngDeclareClassMetadata,
125
- ɵɵngDeclareComponent,
126
- ɵɵngDeclareDirective,
127
- ɵɵngDeclareFactory,
128
- ɵɵngDeclareInjector,
129
- ɵɵngDeclareNgModule
130
- } from "./chunk-XQY5SPGI.js";
131
-
132
- // angular:jit:style:src\app\pages\configuration\project-conf.component.less
133
- var project_conf_component_default = "/* src/app/pages/configuration/project-conf.component.less */\n.panel {\n border-radius: 10px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n display: flex;\n}\n.panel app-config-nav-component {\n flex: 0 0 300px;\n}\n.panel .content {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n padding: 8px 16px;\n}\n.panel .content app-config-section-component {\n flex: 1 1 auto;\n overflow: hidden;\n}\n.panel .content app-config-change-bar-component {\n flex: 0 0 auto;\n position: sticky;\n bottom: 0;\n}\n/*# sourceMappingURL=project-conf.component.css.map */\n";
134
-
135
- // node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-trans-button.mjs
136
- var NzTransButtonDirective = class _NzTransButtonDirective {
137
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTransButtonDirective, deps: [], target: FactoryTarget.Directive });
138
- static \u0275dir = \u0275\u0275ngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: _NzTransButtonDirective, isStandalone: true, selector: "button[nz-trans-button]", host: { properties: { "style.border": '"0"', "style.background": '"transparent"', "style.padding": '"0"', "style.line-height": '"inherit"' } }, ngImport: core_exports });
139
- };
140
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTransButtonDirective, decorators: [{
141
- type: Directive,
142
- args: [{
143
- selector: "button[nz-trans-button]",
144
- host: {
145
- "[style.border]": '"0"',
146
- "[style.background]": '"transparent"',
147
- "[style.padding]": '"0"',
148
- "[style.line-height]": '"inherit"'
149
- }
150
- }]
151
- }] });
152
- var NzTransButtonModule = class _NzTransButtonModule {
153
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTransButtonModule, deps: [], target: FactoryTarget.NgModule });
154
- static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTransButtonModule, imports: [NzTransButtonDirective], exports: [NzTransButtonDirective] });
155
- static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTransButtonModule });
156
- };
157
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTransButtonModule, decorators: [{
158
- type: NgModule,
159
- args: [{
160
- imports: [NzTransButtonDirective],
161
- exports: [NzTransButtonDirective]
162
- }]
163
- }] });
164
-
165
- // node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-typography.mjs
166
- var NzTextCopyComponent = class _NzTextCopyComponent {
167
- cdr = inject(ChangeDetectorRef);
168
- clipboard = inject(Clipboard);
169
- i18n = inject(NzI18nService);
170
- destroyRef = inject(DestroyRef);
171
- copied = false;
172
- copyId;
173
- locale;
174
- nativeElement = inject(ElementRef).nativeElement;
175
- copyTooltip = null;
176
- copedTooltip = null;
177
- copyIcon = "copy";
178
- copedIcon = "check";
179
- text;
180
- tooltips;
181
- icons = ["copy", "check"];
182
- textCopy = new EventEmitter();
183
- constructor() {
184
- this.destroyRef.onDestroy(() => {
185
- clearTimeout(this.copyId);
186
- });
187
- }
188
- ngOnInit() {
189
- this.i18n.localeChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
190
- this.locale = this.i18n.getLocaleData("Text");
191
- this.updateTooltips();
192
- this.cdr.markForCheck();
193
- });
194
- }
195
- ngOnChanges(changes) {
196
- const { tooltips, icons } = changes;
197
- if (tooltips) {
198
- this.updateTooltips();
199
- }
200
- if (icons) {
201
- this.updateIcons();
202
- }
203
- }
204
- onClick() {
205
- if (this.copied) {
206
- return;
207
- }
208
- this.copied = true;
209
- this.cdr.detectChanges();
210
- const text = this.text;
211
- this.textCopy.emit(text);
212
- this.clipboard.copy(text);
213
- this.onCopied();
214
- }
215
- onCopied() {
216
- clearTimeout(this.copyId);
217
- this.copyId = setTimeout(() => {
218
- this.copied = false;
219
- this.cdr.detectChanges();
220
- }, 3e3);
221
- }
222
- updateTooltips() {
223
- if (this.tooltips === null) {
224
- this.copedTooltip = null;
225
- this.copyTooltip = null;
226
- } else if (Array.isArray(this.tooltips)) {
227
- const [copyTooltip, copedTooltip] = this.tooltips;
228
- this.copyTooltip = copyTooltip || this.locale?.copy;
229
- this.copedTooltip = copedTooltip || this.locale?.copied;
230
- } else {
231
- this.copyTooltip = this.locale?.copy;
232
- this.copedTooltip = this.locale?.copied;
233
- }
234
- this.cdr.markForCheck();
235
- }
236
- updateIcons() {
237
- const [copyIcon, copedIcon] = this.icons;
238
- this.copyIcon = copyIcon;
239
- this.copedIcon = copedIcon;
240
- this.cdr.markForCheck();
241
- }
242
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTextCopyComponent, deps: [], target: FactoryTarget.Component });
243
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: _NzTextCopyComponent, isStandalone: true, selector: "nz-text-copy", inputs: { text: "text", tooltips: "tooltips", icons: "icons" }, outputs: { textCopy: "textCopy" }, exportAs: ["nzTextCopy"], usesOnChanges: true, ngImport: core_exports, template: `
244
- <button
245
- type="button"
246
- nz-tooltip
247
- nz-trans-button
248
- [nzTooltipTitle]="copied ? copedTooltip : copyTooltip"
249
- class="ant-typography-copy"
250
- [class.ant-typography-copy-success]="copied"
251
- (click)="onClick()"
252
- >
253
- <ng-container *nzStringTemplateOutlet="copied ? copedIcon : copyIcon; let icon">
254
- <nz-icon [nzType]="icon" />
255
- </ng-container>
256
- </button>
257
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzTransButtonModule }, { kind: "directive", type: NzTransButtonDirective, selector: "button[nz-trans-button]" }, { 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 });
258
- };
259
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTextCopyComponent, decorators: [{
260
- type: Component,
261
- args: [{
262
- selector: "nz-text-copy",
263
- exportAs: "nzTextCopy",
264
- template: `
265
- <button
266
- type="button"
267
- nz-tooltip
268
- nz-trans-button
269
- [nzTooltipTitle]="copied ? copedTooltip : copyTooltip"
270
- class="ant-typography-copy"
271
- [class.ant-typography-copy-success]="copied"
272
- (click)="onClick()"
273
- >
274
- <ng-container *nzStringTemplateOutlet="copied ? copedIcon : copyIcon; let icon">
275
- <nz-icon [nzType]="icon" />
276
- </ng-container>
277
- </button>
278
- `,
279
- changeDetection: ChangeDetectionStrategy.OnPush,
280
- encapsulation: ViewEncapsulation.None,
281
- imports: [NzTooltipModule, NzTransButtonModule, NzIconModule, NzOutletModule]
282
- }]
283
- }], ctorParameters: () => [], propDecorators: { text: [{
284
- type: Input
285
- }], tooltips: [{
286
- type: Input
287
- }], icons: [{
288
- type: Input
289
- }], textCopy: [{
290
- type: Output
291
- }] } });
292
- var NzTextEditComponent = class _NzTextEditComponent {
293
- ngZone = inject(NgZone);
294
- cdr = inject(ChangeDetectorRef);
295
- i18n = inject(NzI18nService);
296
- destroyRef = inject(DestroyRef);
297
- editing = false;
298
- locale;
299
- text;
300
- icon = "edit";
301
- tooltip;
302
- startEditing = new EventEmitter();
303
- endEditing = new EventEmitter(true);
304
- set textarea(textarea) {
305
- this.textarea$.next(textarea);
306
- }
307
- autosizeDirective;
308
- beforeText;
309
- currentText;
310
- nativeElement = inject(ElementRef).nativeElement;
311
- // We could've saved the textarea within some private property (e.g. `_textarea`) and have a getter,
312
- // but having subject makes the code more reactive and cancellable (e.g., event listeners will be
313
- // automatically removed and re-added through the `switchMap` below).
314
- textarea$ = new BehaviorSubject(null);
315
- injector = inject(Injector);
316
- ngOnInit() {
317
- this.i18n.localeChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
318
- this.locale = this.i18n.getLocaleData("Text");
319
- this.cdr.markForCheck();
320
- });
321
- this.textarea$.pipe(switchMap((textarea) => fromEventOutsideAngular(textarea?.nativeElement, "keydown")), takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
322
- if (event.keyCode !== ESCAPE && event.keyCode !== ENTER) {
323
- return;
324
- }
325
- this.ngZone.run(() => {
326
- if (event.keyCode === ESCAPE) {
327
- this.onCancel();
328
- } else {
329
- this.onEnter(event);
330
- }
331
- this.cdr.markForCheck();
332
- });
333
- });
334
- this.textarea$.pipe(switchMap((textarea) => fromEventOutsideAngular(textarea?.nativeElement, "input")), takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
335
- this.currentText = event.target.value;
336
- });
337
- }
338
- onClick() {
339
- this.beforeText = this.text;
340
- this.currentText = this.beforeText;
341
- this.editing = true;
342
- this.startEditing.emit();
343
- this.focusAndSetValue();
344
- }
345
- confirm() {
346
- this.editing = false;
347
- this.endEditing.emit(this.currentText);
348
- }
349
- onEnter(event) {
350
- event.stopPropagation();
351
- event.preventDefault();
352
- this.confirm();
353
- }
354
- onCancel() {
355
- this.currentText = this.beforeText;
356
- this.confirm();
357
- }
358
- focusAndSetValue() {
359
- const { injector } = this;
360
- afterNextRender(() => {
361
- this.textarea$.pipe(
362
- // It may still not be available, so we need to wait until view queries
363
- // are executed during the change detection. It's safer to wait until
364
- // the query runs, and the textarea is set on the behavior subject.
365
- first((textarea) => textarea != null),
366
- takeUntilDestroyed(this.destroyRef)
367
- ).subscribe((textarea) => {
368
- textarea.nativeElement.focus();
369
- textarea.nativeElement.value = this.currentText || "";
370
- this.autosizeDirective.resizeToFitContent();
371
- this.cdr.markForCheck();
372
- });
373
- }, { injector });
374
- }
375
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTextEditComponent, deps: [], target: FactoryTarget.Component });
376
- static \u0275cmp = \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _NzTextEditComponent, isStandalone: true, selector: "nz-text-edit", inputs: { text: "text", icon: "icon", tooltip: "tooltip" }, outputs: { startEditing: "startEditing", endEditing: "endEditing" }, viewQueries: [{ propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true }, { propertyName: "autosizeDirective", first: true, predicate: NzAutosizeDirective, descendants: true }], exportAs: ["nzTextEdit"], ngImport: core_exports, template: `
377
- @if (editing) {
378
- <textarea #textarea nz-input nzAutosize (blur)="confirm()"></textarea>
379
- <button nz-trans-button class="ant-typography-edit-content-confirm" (click)="confirm()">
380
- <nz-icon nzType="enter" />
381
- </button>
382
- } @else {
383
- <button
384
- nz-tooltip
385
- nz-trans-button
386
- class="ant-typography-edit"
387
- [nzTooltipTitle]="tooltip === null ? null : tooltip || locale?.edit"
388
- (click)="onClick()"
389
- >
390
- <ng-container *nzStringTemplateOutlet="icon; let icon">
391
- <nz-icon [nzType]="icon" />
392
- </ng-container>
393
- </button>
394
- }
395
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }, { kind: "directive", type: NzAutosizeDirective, selector: "textarea[nzAutosize]", inputs: ["nzAutosize"], exportAs: ["nzAutosize"] }, { kind: "ngmodule", type: NzTransButtonModule }, { kind: "directive", type: NzTransButtonDirective, selector: "button[nz-trans-button]" }, { 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: NzTooltipModule }, { kind: "directive", type: NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None });
396
- };
397
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTextEditComponent, decorators: [{
398
- type: Component,
399
- args: [{
400
- selector: "nz-text-edit",
401
- exportAs: "nzTextEdit",
402
- template: `
403
- @if (editing) {
404
- <textarea #textarea nz-input nzAutosize (blur)="confirm()"></textarea>
405
- <button nz-trans-button class="ant-typography-edit-content-confirm" (click)="confirm()">
406
- <nz-icon nzType="enter" />
407
- </button>
408
- } @else {
409
- <button
410
- nz-tooltip
411
- nz-trans-button
412
- class="ant-typography-edit"
413
- [nzTooltipTitle]="tooltip === null ? null : tooltip || locale?.edit"
414
- (click)="onClick()"
415
- >
416
- <ng-container *nzStringTemplateOutlet="icon; let icon">
417
- <nz-icon [nzType]="icon" />
418
- </ng-container>
419
- </button>
420
- }
421
- `,
422
- changeDetection: ChangeDetectionStrategy.OnPush,
423
- encapsulation: ViewEncapsulation.None,
424
- imports: [NzInputModule, NzTransButtonModule, NzIconModule, NzTooltipModule, NzOutletModule]
425
- }]
426
- }], propDecorators: { text: [{
427
- type: Input
428
- }], icon: [{
429
- type: Input
430
- }], tooltip: [{
431
- type: Input
432
- }], startEditing: [{
433
- type: Output
434
- }], endEditing: [{
435
- type: Output
436
- }], textarea: [{
437
- type: ViewChild,
438
- args: ["textarea", { static: false }]
439
- }], autosizeDirective: [{
440
- type: ViewChild,
441
- args: [NzAutosizeDirective, { static: false }]
442
- }] } });
443
- var NZ_CONFIG_MODULE_NAME = "typography";
444
- var EXPAND_ELEMENT_CLASSNAME = "ant-typography-expand";
445
- var NzTypographyComponent = (() => {
446
- var _a;
447
- let _nzCopyTooltips_decorators;
448
- let _nzCopyTooltips_initializers = [];
449
- let _nzCopyTooltips_extraInitializers = [];
450
- let _nzCopyIcons_decorators;
451
- let _nzCopyIcons_initializers = [];
452
- let _nzCopyIcons_extraInitializers = [];
453
- let _nzEditTooltip_decorators;
454
- let _nzEditTooltip_initializers = [];
455
- let _nzEditTooltip_extraInitializers = [];
456
- let _nzEditIcon_decorators;
457
- let _nzEditIcon_initializers = [];
458
- let _nzEditIcon_extraInitializers = [];
459
- let _nzEllipsisRows_decorators;
460
- let _nzEllipsisRows_initializers = [];
461
- let _nzEllipsisRows_extraInitializers = [];
462
- return _a = class {
463
- _nzModuleName = NZ_CONFIG_MODULE_NAME;
464
- nzConfigService = inject(NzConfigService);
465
- el = inject(ElementRef).nativeElement;
466
- cdr = inject(ChangeDetectorRef);
467
- viewContainerRef = inject(ViewContainerRef);
468
- renderer = inject(Renderer2);
469
- platform = inject(Platform);
470
- i18n = inject(NzI18nService);
471
- resizeService = inject(NzResizeService);
472
- directionality = inject(Directionality);
473
- document = inject(DOCUMENT);
474
- destroyRef = inject(DestroyRef);
475
- nzCopyable = false;
476
- nzEditable = false;
477
- nzDisabled = false;
478
- nzExpandable = false;
479
- nzEllipsis = false;
480
- nzCopyTooltips = __runInitializers(this, _nzCopyTooltips_initializers, void 0);
481
- nzCopyIcons = (__runInitializers(this, _nzCopyTooltips_extraInitializers), __runInitializers(this, _nzCopyIcons_initializers, ["copy", "check"]));
482
- nzEditTooltip = (__runInitializers(this, _nzCopyIcons_extraInitializers), __runInitializers(this, _nzEditTooltip_initializers, void 0));
483
- nzEditIcon = (__runInitializers(this, _nzEditTooltip_extraInitializers), __runInitializers(this, _nzEditIcon_initializers, "edit"));
484
- nzContent = __runInitializers(this, _nzEditIcon_extraInitializers);
485
- nzEllipsisRows = __runInitializers(this, _nzEllipsisRows_initializers, 1);
486
- nzType = __runInitializers(this, _nzEllipsisRows_extraInitializers);
487
- nzCopyText;
488
- nzSuffix;
489
- nzContentChange = new EventEmitter();
490
- nzCopy = new EventEmitter();
491
- nzExpandChange = new EventEmitter();
492
- // This is not a two-way binding output with {@link nzEllipsis}
493
- nzOnEllipsis = new EventEmitter();
494
- textEditRef;
495
- textCopyRef;
496
- ellipsisContainer;
497
- expandableBtn;
498
- contentTemplate;
499
- locale;
500
- expandableBtnElementCache = null;
501
- editing = false;
502
- ellipsisText;
503
- cssEllipsis = false;
504
- isEllipsis = true;
505
- expanded = false;
506
- ellipsisStr = "...";
507
- dir = "ltr";
508
- get hasEllipsisObservers() {
509
- return this.nzOnEllipsis.observers.length > 0;
510
- }
511
- get canCssEllipsis() {
512
- return this.nzEllipsis && this.cssEllipsis && !this.expanded && !this.hasEllipsisObservers;
513
- }
514
- get hasOperationsWithEllipsis() {
515
- return (this.nzCopyable || this.nzEditable || this.nzExpandable) && this.nzEllipsis;
516
- }
517
- viewInit = false;
518
- requestId = -1;
519
- windowResizeSubscription = Subscription.EMPTY;
520
- get copyText() {
521
- return typeof this.nzCopyText === "string" ? this.nzCopyText : this.nzContent;
522
- }
523
- constructor() {
524
- this.destroyRef.onDestroy(() => {
525
- this.expandableBtnElementCache = null;
526
- this.windowResizeSubscription.unsubscribe();
527
- });
528
- }
529
- onTextCopy(text) {
530
- this.nzCopy.emit(text);
531
- }
532
- onStartEditing() {
533
- this.editing = true;
534
- }
535
- onEndEditing(text) {
536
- this.editing = false;
537
- this.nzContentChange.emit(text);
538
- if (this.nzContent === text) {
539
- this.renderOnNextFrame();
540
- }
541
- this.cdr.markForCheck();
542
- }
543
- onExpand() {
544
- this.isEllipsis = false;
545
- this.expanded = true;
546
- this.nzExpandChange.emit();
547
- this.nzOnEllipsis.emit(false);
548
- }
549
- canUseCSSEllipsis() {
550
- if (this.nzEditable || this.nzCopyable || this.nzExpandable || this.nzSuffix) {
551
- return false;
552
- }
553
- if (this.hasEllipsisObservers) {
554
- return false;
555
- }
556
- if (this.nzEllipsisRows === 1) {
557
- return isStyleSupport("textOverflow");
558
- } else {
559
- return isStyleSupport("webkitLineClamp");
560
- }
561
- }
562
- renderOnNextFrame() {
563
- cancelAnimationFrame(this.requestId);
564
- if (!this.viewInit || !this.nzEllipsis || this.nzEllipsisRows < 0 || this.expanded || !this.platform.isBrowser) {
565
- return;
566
- }
567
- this.requestId = requestAnimationFrame(() => this.syncEllipsis());
568
- }
569
- getOriginContentViewRef() {
570
- const viewRef = this.viewContainerRef.createEmbeddedView(this.contentTemplate, {
571
- content: this.nzContent
572
- });
573
- viewRef.detectChanges();
574
- return {
575
- viewRef,
576
- removeView: () => this.viewContainerRef.remove(this.viewContainerRef.indexOf(viewRef))
577
- };
578
- }
579
- syncEllipsis() {
580
- if (this.cssEllipsis) {
581
- return;
582
- }
583
- const { viewRef, removeView } = this.getOriginContentViewRef();
584
- const fixedNodes = [this.textCopyRef, this.textEditRef].filter((e) => e && e.nativeElement).map((e) => e.nativeElement);
585
- const expandableBtnElement = this.getExpandableBtnElement();
586
- if (expandableBtnElement) {
587
- fixedNodes.push(expandableBtnElement);
588
- }
589
- const { contentNodes, text, ellipsis } = measure(this.el, this.nzEllipsisRows, viewRef.rootNodes, fixedNodes, this.ellipsisStr, this.nzSuffix);
590
- removeView();
591
- this.ellipsisText = text;
592
- if (ellipsis !== this.isEllipsis) {
593
- this.isEllipsis = ellipsis;
594
- this.nzOnEllipsis.emit(ellipsis);
595
- }
596
- const ellipsisContainerNativeElement = this.ellipsisContainer.nativeElement;
597
- while (ellipsisContainerNativeElement.firstChild) {
598
- this.renderer.removeChild(ellipsisContainerNativeElement, ellipsisContainerNativeElement.firstChild);
599
- }
600
- contentNodes.forEach((n) => {
601
- this.renderer.appendChild(ellipsisContainerNativeElement, n.cloneNode(true));
602
- });
603
- this.cdr.markForCheck();
604
- }
605
- // Need to create the element for calculation size before view init
606
- getExpandableBtnElement() {
607
- if (this.nzExpandable) {
608
- const expandText = this.locale ? this.locale.expand : "";
609
- const cache = this.expandableBtnElementCache;
610
- if (!cache || cache.innerText === expandText) {
611
- const el = this.document.createElement("a");
612
- el.className = EXPAND_ELEMENT_CLASSNAME;
613
- el.innerText = expandText;
614
- this.expandableBtnElementCache = el;
615
- }
616
- return this.expandableBtnElementCache;
617
- } else {
618
- this.expandableBtnElementCache = null;
619
- return null;
620
- }
621
- }
622
- renderAndSubscribeWindowResize() {
623
- if (this.platform.isBrowser) {
624
- this.windowResizeSubscription.unsubscribe();
625
- this.cssEllipsis = this.canUseCSSEllipsis();
626
- this.renderOnNextFrame();
627
- this.windowResizeSubscription = this.resizeService.connect().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.renderOnNextFrame());
628
- }
629
- }
630
- ngOnInit() {
631
- this.i18n.localeChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
632
- this.locale = this.i18n.getLocaleData("Text");
633
- this.cdr.markForCheck();
634
- });
635
- this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((direction) => {
636
- this.dir = direction;
637
- this.cdr.detectChanges();
638
- });
639
- this.dir = this.directionality.value;
640
- }
641
- ngAfterViewInit() {
642
- this.viewInit = true;
643
- this.renderAndSubscribeWindowResize();
644
- }
645
- ngOnChanges(changes) {
646
- const { nzCopyable, nzEditable, nzExpandable, nzEllipsis, nzContent, nzEllipsisRows, nzSuffix } = changes;
647
- if (nzCopyable || nzEditable || nzExpandable || nzEllipsis || nzContent || nzEllipsisRows || nzSuffix) {
648
- if (this.nzEllipsis) {
649
- if (this.expanded) {
650
- this.windowResizeSubscription.unsubscribe();
651
- } else {
652
- this.renderAndSubscribeWindowResize();
653
- }
654
- }
655
- }
656
- }
657
- }, (() => {
658
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
659
- _nzCopyTooltips_decorators = [WithConfig()];
660
- _nzCopyIcons_decorators = [WithConfig()];
661
- _nzEditTooltip_decorators = [WithConfig()];
662
- _nzEditIcon_decorators = [WithConfig()];
663
- _nzEllipsisRows_decorators = [WithConfig()];
664
- __esDecorate(null, null, _nzCopyTooltips_decorators, { kind: "field", name: "nzCopyTooltips", static: false, private: false, access: { has: (obj) => "nzCopyTooltips" in obj, get: (obj) => obj.nzCopyTooltips, set: (obj, value) => {
665
- obj.nzCopyTooltips = value;
666
- } }, metadata: _metadata }, _nzCopyTooltips_initializers, _nzCopyTooltips_extraInitializers);
667
- __esDecorate(null, null, _nzCopyIcons_decorators, { kind: "field", name: "nzCopyIcons", static: false, private: false, access: { has: (obj) => "nzCopyIcons" in obj, get: (obj) => obj.nzCopyIcons, set: (obj, value) => {
668
- obj.nzCopyIcons = value;
669
- } }, metadata: _metadata }, _nzCopyIcons_initializers, _nzCopyIcons_extraInitializers);
670
- __esDecorate(null, null, _nzEditTooltip_decorators, { kind: "field", name: "nzEditTooltip", static: false, private: false, access: { has: (obj) => "nzEditTooltip" in obj, get: (obj) => obj.nzEditTooltip, set: (obj, value) => {
671
- obj.nzEditTooltip = value;
672
- } }, metadata: _metadata }, _nzEditTooltip_initializers, _nzEditTooltip_extraInitializers);
673
- __esDecorate(null, null, _nzEditIcon_decorators, { kind: "field", name: "nzEditIcon", static: false, private: false, access: { has: (obj) => "nzEditIcon" in obj, get: (obj) => obj.nzEditIcon, set: (obj, value) => {
674
- obj.nzEditIcon = value;
675
- } }, metadata: _metadata }, _nzEditIcon_initializers, _nzEditIcon_extraInitializers);
676
- __esDecorate(null, null, _nzEllipsisRows_decorators, { kind: "field", name: "nzEllipsisRows", static: false, private: false, access: { has: (obj) => "nzEllipsisRows" in obj, get: (obj) => obj.nzEllipsisRows, set: (obj, value) => {
677
- obj.nzEllipsisRows = value;
678
- } }, metadata: _metadata }, _nzEllipsisRows_initializers, _nzEllipsisRows_extraInitializers);
679
- if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
680
- })(), __publicField(_a, "\u0275fac", \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _a, deps: [], target: FactoryTarget.Component })), __publicField(_a, "\u0275cmp", \u0275\u0275ngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: _a, isStandalone: true, selector: "\n nz-typography,\n [nz-typography],\n p[nz-paragraph],\n span[nz-text],\n h1[nz-title], h2[nz-title], h3[nz-title], h4[nz-title]\n ", inputs: { nzCopyable: ["nzCopyable", "nzCopyable", booleanAttribute], nzEditable: ["nzEditable", "nzEditable", booleanAttribute], nzDisabled: ["nzDisabled", "nzDisabled", booleanAttribute], nzExpandable: ["nzExpandable", "nzExpandable", booleanAttribute], nzEllipsis: ["nzEllipsis", "nzEllipsis", booleanAttribute], nzCopyTooltips: "nzCopyTooltips", nzCopyIcons: "nzCopyIcons", nzEditTooltip: "nzEditTooltip", nzEditIcon: "nzEditIcon", nzContent: "nzContent", nzEllipsisRows: ["nzEllipsisRows", "nzEllipsisRows", numberAttribute], nzType: "nzType", nzCopyText: "nzCopyText", nzSuffix: "nzSuffix" }, outputs: { nzContentChange: "nzContentChange", nzCopy: "nzCopy", nzExpandChange: "nzExpandChange", nzOnEllipsis: "nzOnEllipsis" }, host: { properties: { "class.ant-typography": "!editing", "class.ant-typography-rtl": 'dir === "rtl"', "class.ant-typography-edit-content": "editing", "class.ant-typography-secondary": 'nzType === "secondary"', "class.ant-typography-warning": 'nzType === "warning"', "class.ant-typography-danger": 'nzType === "danger"', "class.ant-typography-success": 'nzType === "success"', "class.ant-typography-disabled": "nzDisabled", "class.ant-typography-ellipsis": "nzEllipsis && !expanded", "class.ant-typography-single-line": "nzEllipsis && nzEllipsisRows === 1", "class.ant-typography-ellipsis-single-line": "canCssEllipsis && nzEllipsisRows === 1", "class.ant-typography-ellipsis-multiple-line": "canCssEllipsis && nzEllipsisRows > 1", "style.-webkit-line-clamp": "(canCssEllipsis && nzEllipsisRows > 1) ? nzEllipsisRows : null" } }, viewQueries: [{ propertyName: "textEditRef", first: true, predicate: NzTextEditComponent, descendants: true }, { propertyName: "textCopyRef", first: true, predicate: NzTextCopyComponent, descendants: true }, { propertyName: "ellipsisContainer", first: true, predicate: ["ellipsisContainer"], descendants: true }, { propertyName: "expandableBtn", first: true, predicate: ["expandable"], descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }], exportAs: ["nzTypography"], usesOnChanges: true, ngImport: core_exports, template: `
681
- <ng-template #contentTemplate let-content="content">
682
- @if (!content) {
683
- <ng-content></ng-content>
684
- }
685
- {{ content }}
686
- </ng-template>
687
- @if (!editing) {
688
- @if (
689
- expanded ||
690
- (!hasOperationsWithEllipsis && nzEllipsisRows === 1 && !hasEllipsisObservers) ||
691
- canCssEllipsis ||
692
- (nzSuffix && expanded)
693
- ) {
694
- <ng-template
695
- [ngTemplateOutlet]="contentTemplate"
696
- [ngTemplateOutletContext]="{ content: nzContent }"
697
- ></ng-template>
698
- @if (nzSuffix) {
699
- {{ nzSuffix }}
700
- }
701
- } @else {
702
- <span #ellipsisContainer></span>
703
- @if (isEllipsis) {
704
- {{ ellipsisStr }}
705
- }
706
- @if (nzSuffix) {
707
- {{ nzSuffix }}
708
- }
709
- @if (nzExpandable && isEllipsis) {
710
- <a #expandable class="ant-typography-expand" (click)="onExpand()">
711
- {{ locale?.expand }}
712
- </a>
713
- }
714
- }
715
- }
716
-
717
- @if (nzEditable) {
718
- <nz-text-edit
719
- [text]="nzContent"
720
- [icon]="nzEditIcon"
721
- [tooltip]="nzEditTooltip"
722
- (endEditing)="onEndEditing($event)"
723
- (startEditing)="onStartEditing()"
724
- ></nz-text-edit>
725
- }
726
-
727
- @if (nzCopyable && !editing) {
728
- <nz-text-copy
729
- [text]="copyText"
730
- [tooltips]="nzCopyTooltips"
731
- [icons]="nzCopyIcons"
732
- (textCopy)="onTextCopy($event)"
733
- ></nz-text-copy>
734
- }
735
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzTextEditComponent, selector: "nz-text-edit", inputs: ["text", "icon", "tooltip"], outputs: ["startEditing", "endEditing"], exportAs: ["nzTextEdit"] }, { kind: "component", type: NzTextCopyComponent, selector: "nz-text-copy", inputs: ["text", "tooltips", "icons"], outputs: ["textCopy"], exportAs: ["nzTextCopy"] }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None })), _a;
736
- })();
737
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTypographyComponent, decorators: [{
738
- type: Component,
739
- args: [{
740
- selector: `
741
- nz-typography,
742
- [nz-typography],
743
- p[nz-paragraph],
744
- span[nz-text],
745
- h1[nz-title], h2[nz-title], h3[nz-title], h4[nz-title]
746
- `,
747
- exportAs: "nzTypography",
748
- template: `
749
- <ng-template #contentTemplate let-content="content">
750
- @if (!content) {
751
- <ng-content></ng-content>
752
- }
753
- {{ content }}
754
- </ng-template>
755
- @if (!editing) {
756
- @if (
757
- expanded ||
758
- (!hasOperationsWithEllipsis && nzEllipsisRows === 1 && !hasEllipsisObservers) ||
759
- canCssEllipsis ||
760
- (nzSuffix && expanded)
761
- ) {
762
- <ng-template
763
- [ngTemplateOutlet]="contentTemplate"
764
- [ngTemplateOutletContext]="{ content: nzContent }"
765
- ></ng-template>
766
- @if (nzSuffix) {
767
- {{ nzSuffix }}
768
- }
769
- } @else {
770
- <span #ellipsisContainer></span>
771
- @if (isEllipsis) {
772
- {{ ellipsisStr }}
773
- }
774
- @if (nzSuffix) {
775
- {{ nzSuffix }}
776
- }
777
- @if (nzExpandable && isEllipsis) {
778
- <a #expandable class="ant-typography-expand" (click)="onExpand()">
779
- {{ locale?.expand }}
780
- </a>
781
- }
782
- }
783
- }
784
-
785
- @if (nzEditable) {
786
- <nz-text-edit
787
- [text]="nzContent"
788
- [icon]="nzEditIcon"
789
- [tooltip]="nzEditTooltip"
790
- (endEditing)="onEndEditing($event)"
791
- (startEditing)="onStartEditing()"
792
- ></nz-text-edit>
793
- }
794
-
795
- @if (nzCopyable && !editing) {
796
- <nz-text-copy
797
- [text]="copyText"
798
- [tooltips]="nzCopyTooltips"
799
- [icons]="nzCopyIcons"
800
- (textCopy)="onTextCopy($event)"
801
- ></nz-text-copy>
802
- }
803
- `,
804
- changeDetection: ChangeDetectionStrategy.OnPush,
805
- encapsulation: ViewEncapsulation.None,
806
- host: {
807
- "[class.ant-typography]": "!editing",
808
- "[class.ant-typography-rtl]": 'dir === "rtl"',
809
- "[class.ant-typography-edit-content]": "editing",
810
- "[class.ant-typography-secondary]": 'nzType === "secondary"',
811
- "[class.ant-typography-warning]": 'nzType === "warning"',
812
- "[class.ant-typography-danger]": 'nzType === "danger"',
813
- "[class.ant-typography-success]": 'nzType === "success"',
814
- "[class.ant-typography-disabled]": "nzDisabled",
815
- "[class.ant-typography-ellipsis]": "nzEllipsis && !expanded",
816
- "[class.ant-typography-single-line]": "nzEllipsis && nzEllipsisRows === 1",
817
- "[class.ant-typography-ellipsis-single-line]": "canCssEllipsis && nzEllipsisRows === 1",
818
- "[class.ant-typography-ellipsis-multiple-line]": "canCssEllipsis && nzEllipsisRows > 1",
819
- "[style.-webkit-line-clamp]": "(canCssEllipsis && nzEllipsisRows > 1) ? nzEllipsisRows : null"
820
- },
821
- imports: [NgTemplateOutlet, NzTextEditComponent, NzTextCopyComponent]
822
- }]
823
- }], ctorParameters: () => [], propDecorators: { nzCopyable: [{
824
- type: Input,
825
- args: [{ transform: booleanAttribute }]
826
- }], nzEditable: [{
827
- type: Input,
828
- args: [{ transform: booleanAttribute }]
829
- }], nzDisabled: [{
830
- type: Input,
831
- args: [{ transform: booleanAttribute }]
832
- }], nzExpandable: [{
833
- type: Input,
834
- args: [{ transform: booleanAttribute }]
835
- }], nzEllipsis: [{
836
- type: Input,
837
- args: [{ transform: booleanAttribute }]
838
- }], nzCopyTooltips: [{
839
- type: Input
840
- }], nzCopyIcons: [{
841
- type: Input
842
- }], nzEditTooltip: [{
843
- type: Input
844
- }], nzEditIcon: [{
845
- type: Input
846
- }], nzContent: [{
847
- type: Input
848
- }], nzEllipsisRows: [{
849
- type: Input,
850
- args: [{ transform: numberAttribute }]
851
- }], nzType: [{
852
- type: Input
853
- }], nzCopyText: [{
854
- type: Input
855
- }], nzSuffix: [{
856
- type: Input
857
- }], nzContentChange: [{
858
- type: Output
859
- }], nzCopy: [{
860
- type: Output
861
- }], nzExpandChange: [{
862
- type: Output
863
- }], nzOnEllipsis: [{
864
- type: Output
865
- }], textEditRef: [{
866
- type: ViewChild,
867
- args: [NzTextEditComponent, { static: false }]
868
- }], textCopyRef: [{
869
- type: ViewChild,
870
- args: [NzTextCopyComponent, { static: false }]
871
- }], ellipsisContainer: [{
872
- type: ViewChild,
873
- args: ["ellipsisContainer", { static: false }]
874
- }], expandableBtn: [{
875
- type: ViewChild,
876
- args: ["expandable", { static: false }]
877
- }], contentTemplate: [{
878
- type: ViewChild,
879
- args: ["contentTemplate", { static: false }]
880
- }] } });
881
- var NzTypographyModule = class _NzTypographyModule {
882
- static \u0275fac = \u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTypographyModule, deps: [], target: FactoryTarget.NgModule });
883
- static \u0275mod = \u0275\u0275ngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTypographyModule, imports: [NzTypographyComponent, NzTextCopyComponent, NzTextEditComponent], exports: [NzTypographyComponent, NzTextCopyComponent, NzTextEditComponent] });
884
- static \u0275inj = \u0275\u0275ngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: _NzTypographyModule, imports: [NzTypographyComponent, NzTextCopyComponent, NzTextEditComponent] });
885
- };
886
- \u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: core_exports, type: NzTypographyModule, decorators: [{
887
- type: NgModule,
888
- args: [{
889
- imports: [NzTypographyComponent, NzTextCopyComponent, NzTextEditComponent],
890
- exports: [NzTypographyComponent, NzTextCopyComponent, NzTextEditComponent]
891
- }]
892
- }] });
893
-
894
- // src/app/pages/configuration/project-conf.component.ts
895
- var _ = __toESM(require_lodash());
896
-
897
- // angular:jit:style:inline:src\app\pages\configuration\components\config-change-bar-component.ts;CiAgICAuY2hhbmdlLWJhciB7CiAgICAgIHdpZHRoOiAxMDAlOwogICAgICBwYWRkaW5nOiAxMHB4IDIwcHg7CiAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgIGp1c3RpZnktY29udGVudDogZmxleC1lbmQ7CiAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgIGdhcDogMTBweDsKICAgICAgYm94LXNoYWRvdzogMCAtMnB4IDhweCByZ2JhKDAsIDAsIDAsIDAuMDYpOwogICAgICBiYWNrZ3JvdW5kOiB2YXIoLS1hcHAtY29tcG9uZW50LWJnKTsKICAgICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tYXBwLWJvcmRlci1jb2xvcik7CiAgICB9CiAgICAuaGludCB7IG1hcmdpbi1yaWdodDogYXV0bzsgb3BhY2l0eTogLjc1OyB9CiAgICA=
898
- var config_change_bar_component_default = "/* angular:styles/component:less;e2c5882f5ecc20c8555a17ba23b1d21120fdbb57b012e708b159368938802fe6;D:\\ng-manager\\webapp\\src\\app\\pages\\configuration\\components\\config-change-bar-component.ts */\n.change-bar {\n width: 100%;\n padding: 10px 20px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 10px;\n box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);\n background: var(--app-component-bg);\n border: 1px solid var(--app-border-color);\n}\n.hint {\n margin-right: auto;\n opacity: 0.75;\n}\n/*# sourceMappingURL=config-change-bar-component.css.map */\n";
899
-
900
- // src/app/pages/configuration/components/config-change-bar-component.ts
901
- var ConfigChangeBarComponent = class ConfigChangeBarComponent2 {
902
- dirty = false;
903
- diff = new EventEmitter();
904
- reset = new EventEmitter();
905
- save = new EventEmitter();
906
- static propDecorators = {
907
- dirty: [{ type: Input }],
908
- diff: [{ type: Output }],
909
- reset: [{ type: Output }],
910
- save: [{ type: Output }]
911
- };
912
- };
913
- ConfigChangeBarComponent = __decorate([
914
- Component({
915
- selector: "app-config-change-bar-component",
916
- imports: [
917
- CommonModule,
918
- NzButtonModule
919
- ],
920
- template: `
921
- @if(dirty){
922
- <div class="change-bar">
923
- <span class="hint">\u6709\u672A\u4FDD\u5B58\u66F4\u6539</span>
924
- <button nz-button (click)="diff.emit()">Diff</button>
925
- <button nz-button (click)="reset.emit()">\u91CD\u7F6E</button>
926
- <button nz-button nzType="primary" (click)="save.emit()">\u4FDD\u5B58</button>
927
- </div>
928
- }
929
- `,
930
- styles: [config_change_bar_component_default]
931
- })
932
- ], ConfigChangeBarComponent);
933
-
934
- // angular:jit:style:inline:src\app\pages\configuration\components\config-nav-component.ts;CiAgICAgICAubGlzdCB7CiAgICAgICAgaGVpZ2h0OjEwMCU7CiAgICAgICAgd2lkdGg6MTAwJTsKICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgICAgLnRvcGJhciB7CiAgICAgICAgICAgIGZsZXg6IDAgMCBhdXRvOwogICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgICAgICAgIHBhZGRpbmc6IDEwcHggMTZweDsKCiAgICAgICAgICAgIG56LWlucHV0LXdyYXBwZXIgewogICAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAxOHB4OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC5pdGVtcyB7CiAgICAgICAgICAgIGZsZXg6IDEgMSBhdXRvOwogICAgICAgICAgICBvdmVyZmxvdzogYXV0bzsKICAgICAgICAgICAgaGVpZ2h0OiAwOwogICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgICAgICAgICBnYXA6IDhweDsKICAgICAgICAgICAgcGFkZGluZzogOHB4OwoKICAgICAgICAgICAgLml0ZW0gewogICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogM3B4OwogICAgICAgICAgICAgICAgcGFkZGluZzogMTBweCAxMHB4OwogICAgICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyOwoKICAgICAgICAgICAgICAgICY6aG92ZXIsCiAgICAgICAgICAgICAgICAmLmFjdGl2ZSB7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDogdmFyKC0tYXBwLXByaW1hcnktMik7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLnJvdyB7CiAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICBnYXA6IDEwcHg7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsKCiAgICAgICAgICAgICAgICAgICAgLmljb24gewogICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDQycHg7CiAgICAgICAgICAgICAgICAgICAgICAgIGZsZXg6IDAgMCBhdXRvOwogICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAuaW5mbyB7CiAgICAgICAgICAgICAgICAgICAgICAgIGZsZXg6IDEgMSBhdXRvOwogICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgICAgICAgICAgICAgICAgICAgICBnYXA6IDRweDsKICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKCiAgICAgICAgICAgICAgICAgICAgICAgIC5uYW1lIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiA2MDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAuZGVzY3JpcHRpb24gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxM3B4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHZhcigtLWFwcC10ZXh0LXNlY29uZGFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAg
935
- var config_nav_component_default = "/* angular:styles/component:less;c43e9df725f052ef8ca04d5c9749d40426a51fc8b9499644a971703bf948f721;D:\\ng-manager\\webapp\\src\\app\\pages\\configuration\\components\\config-nav-component.ts */\n.list {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n}\n.list .topbar {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n}\n.list .topbar nz-input-wrapper {\n width: 100%;\n border-radius: 18px;\n}\n.list .items {\n flex: 1 1 auto;\n overflow: auto;\n height: 0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 8px;\n}\n.list .items .item {\n border-radius: 3px;\n padding: 10px 10px;\n cursor: pointer;\n}\n.list .items .item:hover,\n.list .items .item.active {\n background: var(--app-primary-2);\n}\n.list .items .item .row {\n display: flex;\n gap: 10px;\n align-items: center;\n overflow: hidden;\n justify-content: space-between;\n}\n.list .items .item .row .icon {\n font-size: 42px;\n flex: 0 0 auto;\n position: relative;\n}\n.list .items .item .row .info {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n gap: 4px;\n overflow: hidden;\n}\n.list .items .item .row .info .name {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.list .items .item .row .info .description {\n font-size: 13px;\n color: var(--app-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/*# sourceMappingURL=config-nav-component.css.map */\n";
936
-
937
- // src/app/pages/configuration/components/config-nav-component.ts
938
- var ConfigNavComponent = class ConfigNavComponent2 {
939
- keyword = signal("");
940
- nodes = input([]);
941
- activeDomainId = input("");
942
- domainSelect = new EventEmitter();
943
- selectDomain(node) {
944
- this.domainSelect.emit(node.id);
945
- }
946
- filtered = computed(() => {
947
- const kw = this.keyword().trim().toLowerCase();
948
- if (!kw)
949
- return this.nodes();
950
- return this.nodes().map((g) => __spreadProps(__spreadValues({}, g), {
951
- children: (g.children ?? []).filter((d) => (d.label ?? "").toLowerCase().includes(kw) || (d.relPath ?? "").toLowerCase().includes(kw))
952
- })).filter((g) => (g.children?.length ?? 0) > 0);
953
- });
954
- static propDecorators = {
955
- nodes: [{ type: Input, args: [{ isSignal: true, alias: "nodes", required: false, transform: void 0 }] }],
956
- activeDomainId: [{ type: Input, args: [{ isSignal: true, alias: "activeDomainId", required: false, transform: void 0 }] }],
957
- domainSelect: [{ type: Output }]
958
- };
959
- };
960
- ConfigNavComponent = __decorate([
961
- Component({
962
- selector: "app-config-nav-component",
963
- imports: [
964
- CommonModule,
965
- FormsModule,
966
- NzInputModule,
967
- NzIconModule
968
- ],
969
- template: `
970
- <div class="list">
971
- <div class="topbar">
972
- <nz-input-wrapper>
973
- <nz-icon class="search-icon" nzInputPrefix nzType="search" />
974
- <input
975
- nz-input
976
- placeholder=""
977
- [ngModel]="keyword()"
978
- (ngModelChange)="keyword.set($event)"
979
- />
980
- </nz-input-wrapper>
981
- </div>
982
- <div class="items">
983
- @for (g of filtered(); track g.id) {
984
- <div
985
- class="item"
986
- [class.active]="g.id === activeDomainId()"
987
- (click)="selectDomain(g)"
988
- >
989
- <div class="row">
990
- <div class="icon">
991
- <nz-icon
992
- class="project-suffix-icon"
993
- [nzType]="g.icon || 'setting'"
994
- nzTheme="outline"
995
- />
996
- </div>
997
- <div class="info">
998
- <div class="name">{{ g.label }}</div>
999
- <div class="description">{{ g.description }}</div>
1000
- </div>
1001
- </div>
1002
- </div>
1003
- }
1004
- </div>
1005
- </div>
1006
- `,
1007
- styles: [config_nav_component_default]
1008
- })
1009
- ], ConfigNavComponent);
1010
-
1011
- // angular:jit:style:inline:src\app\pages\configuration\components\config-section-component.ts;CiAgICAuc2VjdGlvbiB7IHBhZGRpbmc6IDBweDsgfSAKICAgIC5zZWN0aW9uOmxhc3QtY2hpbGQgeyBib3JkZXItYm90dG9tOiBub25lOyB9CiAgICAuc2VjdGlvbi10aXRsZSB7IG1hcmdpbjogMCAwIDEwcHg7IGZvbnQtc2l6ZTogMjRweDsgb3BhY2l0eTogMC44NTsgZm9udC13ZWlnaHQ6IDUwMDsgcGFkZGluZzogMCAxNnB4OyB9CiAgICAuZW1wdHkgeyBwYWRkaW5nOiAxMnB4IDE0cHg7fQogIA==
1012
- var config_section_component_default = "/* angular:styles/component:less;f1035e8771d06bb9f341d0630c384aaa81c28fb123ca568d4f515d383cd0597d;D:\\ng-manager\\webapp\\src\\app\\pages\\configuration\\components\\config-section-component.ts */\n.section {\n padding: 0px;\n}\n.section:last-child {\n border-bottom: none;\n}\n.section-title {\n margin: 0 0 10px;\n font-size: 24px;\n opacity: 0.85;\n font-weight: 500;\n padding: 0 16px;\n}\n.empty {\n padding: 12px 14px;\n}\n/*# sourceMappingURL=config-section-component.css.map */\n";
1013
-
1014
- // src/app/pages/configuration/utils/path.ts
1015
- function getByPath(obj, path) {
1016
- return path.split(".").reduce((o, k) => o ? o[k] : void 0, obj);
1017
- }
1018
- function setByPath(obj, path, value) {
1019
- const keys = path.split(".");
1020
- const last = keys.pop();
1021
- let cur = obj;
1022
- for (const k of keys) {
1023
- cur[k] ??= {};
1024
- cur = cur[k];
1025
- }
1026
- cur[last] = value;
1027
- }
1028
-
1029
- // src/app/pages/configuration/utils/map.ts
1030
- function mapResolvedToNav(catalog) {
1031
- return catalog.sort((a, b) => (a.domain?.nav?.order ?? 0) - (b.domain?.nav?.order ?? 0)).map((d) => ({
1032
- id: d.domain.id,
1033
- type: "domain",
1034
- label: d.domain.label,
1035
- icon: d.domain.icon,
1036
- description: d.domain.description,
1037
- children: (d.docs ?? []).map((x) => ({
1038
- id: x.spec.id,
1039
- type: "doc",
1040
- label: x.spec.title,
1041
- docId: x.spec.id,
1042
- relPath: x.chosen?.relPath,
1043
- codec: x.chosen?.codec,
1044
- exists: x.exists
1045
- }))
1046
- }));
1047
- }
1048
-
1049
- // src/app/pages/configuration/utils/patch-diff.ts
1050
- var isObj = (x) => x != null && typeof x === "object" && !Array.isArray(x);
1051
- function flattenPatch(scope, target, patch, basePath = "") {
1052
- if (patch === void 0)
1053
- return [];
1054
- if (!isObj(patch)) {
1055
- return [{ scope, target, path: basePath || "/", value: patch }];
1056
- }
1057
- const rows = [];
1058
- const keys = Object.keys(patch);
1059
- if (keys.length === 0) {
1060
- rows.push({ scope, target, path: basePath || "/", value: {} });
1061
- return rows;
1062
- }
1063
- for (const k of keys) {
1064
- const p = basePath ? `${basePath}.${k}` : k;
1065
- const v = patch[k];
1066
- if (isObj(v))
1067
- rows.push(...flattenPatch(scope, target, v, p));
1068
- else
1069
- rows.push({ scope, target, path: p, value: v });
1070
- }
1071
- return rows;
1072
- }
1073
-
1074
- // angular:jit:style:inline:src\app\pages\configuration\components\config-item-component.ts;CiAgICAuY29uZmlnLWl0ZW0gewogICAgICBkaXNwbGF5OiBmbGV4OwogICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgIHBhZGRpbmc6IDEycHggMTZweDsKICAgICAgJjpob3ZlcnsKICAgICAgICBiYWNrZ3JvdW5kOiB2YXIoLS1hcHAtcHJpbWFyeS0yKTsKICAgICAgfQogICAgICAubWV0YSB7CiAgICAgICAgLmxhYmVsIHsKICAgICAgICAgIGZvbnQtd2VpZ2h0OiA1MDA7CiAgICAgICAgICBvcGFjaXR5OiAwLjc1OwogICAgICAgIH0KICAgICAgICAuZGVzYyB7CiAgICAgICAgICBmb250LXNpemU6IDE0cHg7CiAgICAgICAgICBtYXJnaW4tdG9wOiA0cHg7CiAgICAgICAgICBvcGFjaXR5OiAwLjU1OwogICAgICAgIH0KICAgICAgfQogICAgICAuY29udHJvbCB7CiAgICAgICAgbWluLXdpZHRoOiAyMDBweDsKICAgICAgICBtYXgtd2lkdGg6IDYwMHB4OwogICAgICAgIHdpZHRoOiA2MCU7CiAgICAgICAgaW5wdXRbbnotaW5wdXRdLG56LXNlbGVjdCB7CiAgICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICB9CiAgICAgICAgLmt2IHsKICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgICAgICAgZ2FwOiA2cHg7CiAgICAgICAgICB3aWR0aDoxMDAlOwogICAgICAgIH0KICAgICAgfQogICAgfQogICAg
1075
- var config_item_component_default = "/* angular:styles/component:less;3d800cd5798763d972a918df0179ae2fa2db1ed97eda1d706faa532bda5f5136;D:\\ng-manager\\webapp\\src\\app\\pages\\configuration\\components\\config-item-component.ts */\n.config-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n}\n.config-item:hover {\n background: var(--app-primary-2);\n}\n.config-item .meta .label {\n font-weight: 500;\n opacity: 0.75;\n}\n.config-item .meta .desc {\n font-size: 14px;\n margin-top: 4px;\n opacity: 0.55;\n}\n.config-item .control {\n min-width: 200px;\n max-width: 600px;\n width: 60%;\n}\n.config-item .control input[nz-input],\n.config-item .control nz-select {\n width: 100%;\n}\n.config-item .control .kv {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n/*# sourceMappingURL=config-item-component.css.map */\n";
1076
-
1077
- // src/app/pages/configuration/components/config-item-component.ts
1078
- var ConfigItemComponent = class ConfigItemComponent2 {
1079
- item;
1080
- value;
1081
- valueChange = new EventEmitter();
1082
- options = [];
1083
- emit(v) {
1084
- this.valueChange.emit(v);
1085
- }
1086
- /* -- ------------- object -------------- */
1087
- isObjectEditor() {
1088
- return this.item?.type === "object";
1089
- }
1090
- objectKv() {
1091
- const obj = this.value ?? {};
1092
- return Object.values(obj).map((k, idx) => {
1093
- if (typeof k === "string") {
1094
- return { label: Object.keys(obj)[idx], value: k };
1095
- }
1096
- return { label: Object.keys(obj)[idx], value: JSON.stringify(k) };
1097
- });
1098
- }
1099
- /* ---------------- array<object> MVP ---------------- */
1100
- isArrayObjectEditor() {
1101
- return this.item?.type === "array" && this.item?.item?.type === "object" && Array.isArray(this.item?.item?.fields) && this.item.item.fields.length > 0;
1102
- }
1103
- arrayFields() {
1104
- return this.item?.item?.fields ?? [];
1105
- }
1106
- arrayValue() {
1107
- return Array.isArray(this.value) ? this.value : [];
1108
- }
1109
- addRow() {
1110
- const fields = this.arrayFields();
1111
- const row = {};
1112
- for (const f of fields) {
1113
- if (!f.key)
1114
- continue;
1115
- row[f.key] = f.default ?? "";
1116
- }
1117
- const next = [...this.arrayValue(), row];
1118
- this.emit(next);
1119
- }
1120
- removeRow(i) {
1121
- const arr = this.arrayValue();
1122
- const next = arr.filter((_2, idx) => idx !== i);
1123
- this.emit(next);
1124
- }
1125
- updateCell(i, key, v) {
1126
- const arr = this.arrayValue();
1127
- const next = arr.map((row, idx) => {
1128
- if (idx !== i)
1129
- return row;
1130
- return __spreadProps(__spreadValues({}, row ?? {}), { [key]: v });
1131
- });
1132
- this.emit(next);
1133
- }
1134
- static propDecorators = {
1135
- item: [{ type: Input }],
1136
- value: [{ type: Input }],
1137
- valueChange: [{ type: Output }],
1138
- options: [{ type: Input }]
1139
- };
1140
- };
1141
- ConfigItemComponent = __decorate([
1142
- Component({
1143
- selector: "app-config-item-component",
1144
- imports: [
1145
- CommonModule,
1146
- FormsModule,
1147
- NzIconModule,
1148
- NzSwitchModule,
1149
- NzInputModule,
1150
- NzSelectModule,
1151
- NzSpaceModule,
1152
- NzTableModule
1153
- ],
1154
- template: `
1155
- <div class="config-item">
1156
- <div class="meta">
1157
- <div class="label">{{ item.label }}</div>
1158
- @if(item.desc){
1159
- <div class="desc">
1160
- {{ item.desc }}
1161
- </div>
1162
- }
1163
- </div>
1164
- <div class="control">
1165
- @switch (item.type) {
1166
- @case ('input'){
1167
- <input nz-input [ngModel]="value" (ngModelChange)="emit($event)" />
1168
- }
1169
- @case ('path'){
1170
- <input nz-input [ngModel]="value" (ngModelChange)="emit($event)" />
1171
- }
1172
- @case('string')
1173
- {
1174
- <span>{{value}}</span>
1175
- }
1176
- @case('file')
1177
- {
1178
- <nz-space nzAlign="center">
1179
- <nz-icon nzType="file" nzTheme="fill"></nz-icon>
1180
- <span>{{value}}</span>
1181
- </nz-space>
1182
- }
1183
- @case ('boolean'){
1184
- <nz-switch [ngModel]="value" (ngModelChange)="emit($event)"> </nz-switch>
1185
- }
1186
- @case('select'){
1187
- <nz-select [ngModel]="value" (ngModelChange)="emit($event)">
1188
- @for (opt of options; track opt.value) {
1189
- <nz-option [nzValue]="opt.value" [nzLabel]="opt.label"></nz-option>
1190
- }
1191
- </nz-select>
1192
- }
1193
- @case('array'){
1194
- <!-- <span>\u6570\u7EC4\u7C7B\u578B\u914D\u7F6E\u9879\uFF0C\u6682\u4E0D\u652F\u6301\u8868\u5355\u7F16\u8F91</span> -->
1195
- @if (isArrayObjectEditor()) {
1196
- @for(row of arrayValue(); track $index) {
1197
- <nz-space>
1198
- @if(arrayValue().length>1){
1199
- <span >{{$index + 1}}</span>
1200
- }
1201
- @for (f of arrayFields(); track f.key) {
1202
- <nz-icon nzType="file" nzTheme="fill"></nz-icon>
1203
- <span>
1204
- {{row?.[f.key!]}}
1205
- </span>
1206
- @if(f !== arrayFields()[arrayFields().length -1]){
1207
- <nz-icon nzType="arrow-right" nzTheme="outline"></nz-icon>
1208
- }
1209
- }
1210
- </nz-space>
1211
- }
1212
- } @else {
1213
- <span>\u6570\u7EC4\u7C7B\u578B\u914D\u7F6E\u9879\uFF0C\u6682\u4E0D\u652F\u6301\u8868\u5355\u7F16\u8F91</span>
1214
- }
1215
- }
1216
- <!--object \u7C7B\u578B\u7684\u914D\u7F6E\u9879-->
1217
- @case('object'){
1218
- @if (isObjectEditor()) {
1219
- <div class="kv">
1220
- @for (field of objectKv(); track field.value) {
1221
- <nz-space>
1222
- <span class="label">{{field.label}}:</span>
1223
- <span class="value">{{field.value}}</span>
1224
- </nz-space>
1225
- }
1226
- </div>
1227
- }
1228
- }
1229
- }
1230
- </div>
1231
- </div>
1232
- `,
1233
- styles: [config_item_component_default]
1234
- })
1235
- ], ConfigItemComponent);
1236
-
1237
- // src/app/pages/configuration/components/config-section-component.ts
1238
- var ConfigSectionComponent = class ConfigSectionComponent2 {
1239
- schema;
1240
- vm;
1241
- options = {};
1242
- vmChange = new EventEmitter();
1243
- get(item) {
1244
- const v = getByPath(this.vm, item.key);
1245
- return v === void 0 || v === null ? item.default : v;
1246
- }
1247
- getChild(child, parent) {
1248
- const parentValue = this.get(parent);
1249
- if (parentValue === void 0 || parentValue === null || parentValue === "") {
1250
- return child.default;
1251
- }
1252
- const replacedPath = this.resolveDynamicPath(child.key, parent.key, parentValue);
1253
- const v = getByPath(this.vm, replacedPath);
1254
- return v === void 0 || v === null ? child.default : v;
1255
- }
1256
- onValueChange(value, item) {
1257
- const path = this.resolvePathForWrite(item);
1258
- this.update(path, value);
1259
- }
1260
- resolvePathForWrite(item) {
1261
- const key = item.key || "";
1262
- const m = key.match(/<([^>]+)>/);
1263
- if (!m)
1264
- return key;
1265
- const parentKey = m[1];
1266
- const parentValue = getByPath(this.vm, parentKey);
1267
- return this.resolveDynamicPath(key, parentKey, parentValue);
1268
- }
1269
- resolveDynamicPath(key, placeholderKey, placeholderValue) {
1270
- const token = `<${placeholderKey}>`;
1271
- return key.replace(token, String(placeholderValue ?? ""));
1272
- }
1273
- update(path, value) {
1274
- const next = structuredClone(this.vm);
1275
- setByPath(next, path, value);
1276
- this.vmChange.emit(next);
1277
- }
1278
- static propDecorators = {
1279
- schema: [{ type: Input }],
1280
- vm: [{ type: Input }],
1281
- options: [{ type: Input }],
1282
- vmChange: [{ type: Output }]
1283
- };
1284
- };
1285
- ConfigSectionComponent = __decorate([
1286
- Component({
1287
- selector: "app-config-section-component",
1288
- standalone: true,
1289
- imports: [CommonModule, ConfigItemComponent],
1290
- template: `
1291
- @if(schema){
1292
- @let sections = schema.sections || [];
1293
- @for (sec of sections; track sec.id) {
1294
- <section class="section" [attr.id]="sec.id">
1295
- <h3 class="section-title">{{ sec.label }}</h3>
1296
- @for (item of sec.items; track item.key) {
1297
- <app-config-item-component
1298
- [item]="item"
1299
- [options]="item.options || options[item.optionsRef?.key!] || []"
1300
- [value]="get(item)"
1301
- (valueChange)="onValueChange($event, item)">
1302
- </app-config-item-component>
1303
- @if(item.children?.length){
1304
- @for (child of item.children; track child.key) {
1305
- <app-config-item-component
1306
- [item]="child"
1307
- [options]="child.options || options[child.optionsRef?.key!] || []"
1308
- [value]="getChild(child,item)"
1309
- (valueChange)="onValueChange($event, child)">
1310
- </app-config-item-component>
1311
- }
1312
- }
1313
-
1314
- }
1315
- </section>
1316
- }
1317
- }@else{
1318
- <div class="empty">
1319
- \u8BE5\u914D\u7F6E\u6682\u4E0D\u652F\u6301\u8868\u5355\u6A21\u5F0F\uFF08\u53EF\u5207\u6362 Raw / \u6216\u7A0D\u540E\u5B9E\u73B0 provider\uFF09
1320
- </div>
1321
- }
1322
- `,
1323
- styles: [config_section_component_default]
1324
- })
1325
- ], ConfigSectionComponent);
1326
-
1327
- // src/app/pages/configuration/services/conf-api.service.ts
1328
- var ConfApiService = class ConfApiService2 {
1329
- api = inject(ApiClient);
1330
- getCatalog(projectId) {
1331
- return this.api.get(`/api/config/catalog/${projectId}`);
1332
- }
1333
- // /openInEditor/:projectId/:docId
1334
- openInEditor(projectId, docId) {
1335
- return this.api.post(`/api/config/openInEditor/${projectId}/${encodeURIComponent(docId)}`, {});
1336
- }
1337
- writeDomainSchema(projectId, domainId, vm) {
1338
- return this.api.post(`/api/config/writeSchema/${projectId}/${domainId}`, { vm });
1339
- }
1340
- getDomainSchemas(projectId, domainId) {
1341
- return this.api.get(`/api/config/getDomainSchema/${projectId}/${domainId}`);
1342
- }
1343
- diffDomainSchema(projectId, domainId, vm) {
1344
- return this.api.post(`/api/config/diffSchema/${projectId}/${domainId}`, { vm });
1345
- }
1346
- };
1347
- ConfApiService = __decorate([
1348
- Injectable({ providedIn: "root" })
1349
- ], ConfApiService);
1350
-
1351
- // src/app/pages/configuration/project-conf.component.ts
1352
- var ProjectConfComponent = class ProjectConfComponent2 {
1353
- api = inject(ConfApiService);
1354
- projectContext = inject(ProjectContextStore);
1355
- msg = inject(NzMessageService);
1356
- modal = inject(NzModalService);
1357
- projectId = computed(() => this.projectContext.currentProjectId() || "");
1358
- loading = signal(false);
1359
- isModalVisible = signal(false);
1360
- catalog = signal(null);
1361
- // 左侧 nav 的 VM(domain->doc 扁平结构)
1362
- navNodes = computed(() => mapResolvedToNav(this.catalog() ?? []));
1363
- // 当前选中 domain ID
1364
- activeDomainId = signal(null);
1365
- // 选中的 doc ID
1366
- selectedDocId = signal(null);
1367
- // 当前 doc 内容(raw/json)
1368
- docStates = signal({});
1369
- domainSchema = signal(null);
1370
- // 当前 domain 级 VM(由多个 doc 组装而成)
1371
- domainVM = signal(null);
1372
- baselineDomainVM = signal(null);
1373
- activeDomain = computed(() => {
1374
- const did = this.activeDomainId();
1375
- return (this.catalog() ?? []).find((x) => x.domain.id === did) ?? null;
1376
- });
1377
- activeDocs = computed(() => this.activeDomain()?.docs ?? []);
1378
- activeDocsMeta = computed(() => {
1379
- const d = this.activeDomain();
1380
- if (!d)
1381
- return [];
1382
- return (d.docs ?? []).map((x) => ({
1383
- docId: x.spec.id,
1384
- title: x.spec.title,
1385
- exists: x.exists,
1386
- relPath: x.chosen?.relPath,
1387
- codec: x.chosen?.codec
1388
- }));
1389
- });
1390
- // dirty:对 raw 做 dirty(json 可后续)
1391
- domainDirty = computed(() => {
1392
- const base = this.baselineDomainVM();
1393
- const cur = this.domainVM();
1394
- if (!base || !cur)
1395
- return false;
1396
- return !_.isEqual(base, cur);
1397
- });
1398
- constructor() {
1399
- effect(() => {
1400
- const pid = this.projectId();
1401
- if (pid)
1402
- this.getCatalog();
1403
- });
1404
- }
1405
- getCatalog() {
1406
- const pid = this.projectId();
1407
- if (!pid)
1408
- return;
1409
- this.loading.set(true);
1410
- this.api.getCatalog(pid).subscribe({
1411
- next: (catalog) => {
1412
- this.catalog.set(catalog);
1413
- const firstDomainId = catalog[0]?.domain?.id ?? "";
1414
- if (firstDomainId) {
1415
- this.activeDomainId.set(firstDomainId);
1416
- this.loadDomainSchema(firstDomainId);
1417
- }
1418
- },
1419
- error: (err) => {
1420
- console.error(err);
1421
- this.msg.error("\u52A0\u8F7D\u914D\u7F6E\u76EE\u5F55\u5931\u8D25");
1422
- },
1423
- complete: () => this.loading.set(false)
1424
- });
1425
- }
1426
- /**
1427
- * 左侧目录选择 domain
1428
- */
1429
- onDomainSelect(domainId) {
1430
- this.activeDomainId.set(domainId);
1431
- if (domainId === "angular") {
1432
- this.loadDomainSchema(domainId);
1433
- } else {
1434
- this.domainVM.set(null);
1435
- }
1436
- }
1437
- async loadDomainSchema(domainId) {
1438
- const pid = this.projectId();
1439
- if (!pid)
1440
- return;
1441
- this.loading.set(true);
1442
- try {
1443
- const doc = await firstValueFrom(this.api.getDomainSchemas(pid, domainId));
1444
- this.domainSchema.set(doc);
1445
- this.domainVM.set(doc.vm);
1446
- this.baselineDomainVM.set(_.cloneDeep(doc.vm));
1447
- } catch (e) {
1448
- console.error(e);
1449
- this.msg.error("\u52A0\u8F7D\u914D\u7F6E\u6A21\u578B\u5931\u8D25");
1450
- this.domainVM.set(null);
1451
- this.baselineDomainVM.set(null);
1452
- } finally {
1453
- this.loading.set(false);
1454
- }
1455
- }
1456
- async onDiff() {
1457
- const pid = this.projectId();
1458
- const domainId = this.activeDomainId();
1459
- const cur = this.domainVM();
1460
- if (!pid || !domainId || !cur)
1461
- return;
1462
- this.loading.set(true);
1463
- try {
1464
- const data = await firstValueFrom(this.api.diffDomainSchema(pid, domainId, cur));
1465
- const docPatch = data?.docPatch ?? {};
1466
- const filePatch = data?.filePatch ?? [];
1467
- const rows = [];
1468
- for (const [docId, patch] of Object.entries(docPatch)) {
1469
- rows.push(...flattenPatch("doc", docId, patch));
1470
- }
1471
- for (const fp of filePatch) {
1472
- rows.push(...flattenPatch("file", fp.relPath, fp.patch));
1473
- }
1474
- if (rows.length === 0) {
1475
- this.msg.info("\u6CA1\u6709\u53EF\u5199\u56DE\u7684\u53D8\u66F4");
1476
- return;
1477
- }
1478
- rows.sort((a, b) => {
1479
- if (a.scope !== b.scope)
1480
- return a.scope.localeCompare(b.scope);
1481
- const aa = `${a.target}:${a.path}`;
1482
- const bb = `${b.target}:${b.path}`;
1483
- return aa.localeCompare(bb);
1484
- });
1485
- this.modal.create({
1486
- nzTitle: "\u53D8\u66F4",
1487
- nzContent: `
1488
- <div style="max-height:60vh; overflow:auto;">
1489
- ${rows.map((r) => `
1490
- <div style="padding:8px 0; border-bottom:1px solid #f0f0f0;">
1491
- <div style="font-weight:600;">[${r.scope}] ${r.target}</div>
1492
- <div style="opacity:.85; margin-top:4px;">${r.path}</div>
1493
- <pre style="margin:6px 0;">after : ${this.safeStringify(r.value)}</pre>
1494
- </div>
1495
- `).join("")}
1496
- </div>
1497
- `,
1498
- nzFooter: null,
1499
- nzWidth: 900
1500
- });
1501
- } catch (e) {
1502
- console.error(e);
1503
- this.msg.error("\u751F\u6210 Diff \u5931\u8D25");
1504
- } finally {
1505
- this.loading.set(false);
1506
- }
1507
- }
1508
- safeStringify(v) {
1509
- try {
1510
- return JSON.stringify(v, null, 2);
1511
- } catch {
1512
- return String(v);
1513
- }
1514
- }
1515
- onReset() {
1516
- const base = this.baselineDomainVM();
1517
- if (!base)
1518
- return;
1519
- this.domainVM.set(_.cloneDeep(base));
1520
- this.msg.success("\u5DF2\u91CD\u7F6E\u4E3A\u672A\u4FEE\u6539\u72B6\u6001");
1521
- }
1522
- /** 右侧编辑器 raw 内容变化回传 */
1523
- onRawChange(e) {
1524
- const map = this.docStates();
1525
- const cur = map[e.docId];
1526
- if (!cur)
1527
- return;
1528
- const baseline = cur.baselineRaw ?? "";
1529
- const dirty = e.raw !== baseline;
1530
- this.docStates.set(__spreadProps(__spreadValues({}, map), {
1531
- [e.docId]: __spreadProps(__spreadValues({}, cur), { raw: e.raw, dirty })
1532
- }));
1533
- }
1534
- /** 右侧表单变化回传(整包 values) */
1535
- onValuesChange(e) {
1536
- }
1537
- async saveActive() {
1538
- const pid = this.projectId();
1539
- const did = this.activeDomainId();
1540
- const vm = this.domainVM();
1541
- if (!pid || !did || !vm)
1542
- return;
1543
- this.loading.set(true);
1544
- try {
1545
- await firstValueFrom(this.api.writeDomainSchema(pid, did, vm));
1546
- this.msg.success("\u4FDD\u5B58\u6210\u529F");
1547
- await this.loadDomainSchema(did);
1548
- } catch (e) {
1549
- console.error(e);
1550
- this.msg.error("\u4FDD\u5B58\u5931\u8D25");
1551
- } finally {
1552
- this.loading.set(false);
1553
- }
1554
- }
1555
- /** 打开配置文件 */
1556
- openConfig() {
1557
- if (!this.selectedDocId()) {
1558
- this.msg.warning("\u8BF7\u5148\u9009\u62E9\u914D\u7F6E\u6587\u4EF6");
1559
- return;
1560
- }
1561
- this.api.openInEditor(this.projectId(), this.selectedDocId()).subscribe((res) => {
1562
- this.msg.success("\u5DF2\u5728\u9ED8\u8BA4\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u8BE5\u914D\u7F6E\u6587\u4EF6");
1563
- this.isModalVisible.set(false);
1564
- });
1565
- }
1566
- static ctorParameters = () => [];
1567
- };
1568
- ProjectConfComponent = __decorate([
1569
- Component({
1570
- selector: "app-project-conf.component",
1571
- standalone: true,
1572
- imports: [
1573
- CommonModule,
1574
- FormsModule,
1575
- ReactiveFormsModule,
1576
- NzLayoutModule,
1577
- NzMenuModule,
1578
- NzFormModule,
1579
- NzInputModule,
1580
- NzSelectModule,
1581
- NzSwitchModule,
1582
- NzButtonModule,
1583
- NzTypographyModule,
1584
- NzPopoverModule,
1585
- NzTooltipModule,
1586
- NgDevtoolComponent,
1587
- NzIconModule,
1588
- ConfigNavComponent,
1589
- ConfigChangeBarComponent,
1590
- NzModalModule,
1591
- ConfigSectionComponent,
1592
- PageLayoutComponent
1593
- ],
1594
- template: `
1595
- <app-page-layout [title]="'\u9879\u76EE\u914D\u7F6E'" [loading]="loading()">
1596
- <ng-container ngProjectAs="actions">
1597
- <button nz-button nzType="primary" (click)="isModalVisible.set(true)">\u6253\u5F00\u914D\u7F6E\u6587\u4EF6</button>
1598
- <app-ng-devtool></app-ng-devtool>
1599
- </ng-container>
1600
- <div class="panel">
1601
- <app-config-nav-component
1602
- [nodes]="navNodes()"
1603
- [activeDomainId]="activeDomainId() ?? ''"
1604
- (domainSelect)="onDomainSelect($event)"
1605
- >
1606
- </app-config-nav-component>
1607
- <div class="content">
1608
- <app-config-section-component
1609
- [schema]="domainSchema()?.schema"
1610
- [vm]="domainVM()"
1611
- (vmChange)="domainVM.set($event)"
1612
- [options]="domainSchema()?.options ?? {}"
1613
- >
1614
- </app-config-section-component>
1615
- <app-config-change-bar-component
1616
- [dirty]="domainDirty()"
1617
- (diff)="onDiff()"
1618
- (reset)="onReset()"
1619
- (save)="saveActive()"
1620
- >
1621
- </app-config-change-bar-component>
1622
- </div>
1623
- </div>
1624
- </app-page-layout>
1625
- <nz-modal
1626
- [(nzVisible)]="isModalVisible"
1627
- nzTitle="\u914D\u7F6E"
1628
- (nzOnCancel)="isModalVisible.set(false)"
1629
- [nzMaskClosable]="false"
1630
- >
1631
- <ng-container *nzModalContent>
1632
- <div class="modal-body">
1633
- <label>\u9009\u62E9\u914D\u7F6E\u6587\u4EF6</label>
1634
- <nz-select style="width: 100%" [(ngModel)]="selectedDocId" nzPlaceHolder="\u8BF7\u9009\u62E9\u914D\u7F6E\u6587\u4EF6">
1635
- @for (doc of activeDocsMeta() || []; track doc.docId) {
1636
- <nz-option [nzLabel]="doc.title" [nzValue]="doc.docId"></nz-option>
1637
- }
1638
- </nz-select>
1639
- </div>
1640
- </ng-container>
1641
- <ng-container *nzModalFooter>
1642
- <button nz-button nzType="primary" (click)="openConfig()" [disabled]="!selectedDocId()">
1643
- \u6253\u5F00\u914D\u7F6E\u6587\u4EF6
1644
- </button>
1645
- </ng-container>
1646
- </nz-modal>
1647
- `,
1648
- styles: [project_conf_component_default]
1649
- })
1650
- ], ProjectConfComponent);
1651
-
1652
- // src/app/pages/configuration/configuration.routing.ts
1653
- var routes = [
1654
- {
1655
- path: "",
1656
- component: ProjectConfComponent
1657
- }
1658
- ];
1659
- var ConfigurationRoutingModule = class ConfigurationRoutingModule2 {
1660
- };
1661
- ConfigurationRoutingModule = __decorate([
1662
- NgModule({
1663
- imports: [RouterModule.forChild(routes)],
1664
- exports: [RouterModule]
1665
- })
1666
- ], ConfigurationRoutingModule);
1667
-
1668
- // src/app/pages/configuration/configuration.module.ts
1669
- var ConfigurationModule = class ConfigurationModule2 {
1670
- };
1671
- ConfigurationModule = __decorate([
1672
- NgModule({
1673
- declarations: [],
1674
- imports: [
1675
- CommonModule,
1676
- ConfigurationRoutingModule
1677
- ]
1678
- })
1679
- ], ConfigurationModule);
1680
- export {
1681
- ConfigurationModule
1682
- };
1683
- //# sourceMappingURL=chunk-3L72DF3R.js.map