@dignite-ng/expand.cms 0.0.18 → 0.0.20

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 (369) hide show
  1. package/config/ng-package.json +7 -0
  2. package/config/src/cms-config.module.ts +12 -0
  3. package/config/{enums/index.d.ts → src/enums/index.ts} +1 -1
  4. package/config/src/enums/route-names.ts +8 -0
  5. package/config/{providers/index.d.ts → src/providers/index.ts} +1 -1
  6. package/config/src/providers/route.provider.ts +66 -0
  7. package/config/{public-api.d.ts → src/public-api.ts} +3 -3
  8. package/karma.conf.js +44 -0
  9. package/ng-package.json +7 -0
  10. package/package.json +19 -38
  11. package/src/lib/cms-routing.module.ts +111 -0
  12. package/src/lib/cms.module.ts +119 -0
  13. package/src/lib/components/admin/entries/create-or-edit-entries.component.html +115 -0
  14. package/src/lib/components/admin/entries/create-or-edit-entries.component.scss +25 -0
  15. package/src/lib/components/admin/entries/create-or-edit-entries.component.spec.ts +21 -0
  16. package/src/lib/components/admin/entries/create-or-edit-entries.component.ts +287 -0
  17. package/src/lib/components/admin/entries/create-or-update-entry-input-base.ts +36 -0
  18. package/src/lib/components/admin/entries/create.component.html +13 -0
  19. package/src/lib/components/admin/entries/create.component.scss +21 -0
  20. package/src/lib/components/admin/entries/create.component.spec.ts +21 -0
  21. package/src/lib/components/admin/entries/create.component.ts +103 -0
  22. package/src/lib/components/admin/entries/edit.component.html +9 -0
  23. package/src/lib/components/admin/entries/edit.component.scss +26 -0
  24. package/src/lib/components/admin/entries/edit.component.spec.ts +21 -0
  25. package/src/lib/components/admin/entries/edit.component.ts +103 -0
  26. package/src/lib/components/admin/entries/entries.component.html +106 -0
  27. package/src/lib/components/admin/entries/entries.component.scss +80 -0
  28. package/src/lib/components/admin/entries/entries.component.spec.ts +21 -0
  29. package/src/lib/components/admin/entries/entries.component.ts +216 -0
  30. package/src/lib/components/admin/entries/index.ts +4 -0
  31. package/src/lib/components/admin/fields/create-field.component.html +12 -0
  32. package/src/lib/components/admin/fields/create-field.component.scss +10 -0
  33. package/src/lib/components/admin/fields/create-field.component.spec.ts +21 -0
  34. package/src/lib/components/admin/fields/create-field.component.ts +68 -0
  35. package/src/lib/components/admin/fields/create-or-edit-field.component.html +39 -0
  36. package/src/lib/components/admin/fields/create-or-edit-field.component.scss +0 -0
  37. package/src/lib/components/admin/fields/create-or-edit-field.component.spec.ts +21 -0
  38. package/src/lib/components/admin/fields/create-or-edit-field.component.ts +119 -0
  39. package/src/lib/components/admin/fields/create-or-update-field-input-base.ts +33 -0
  40. package/src/lib/components/admin/fields/edit-field.component.html +13 -0
  41. package/src/lib/components/admin/fields/edit-field.component.scss +0 -0
  42. package/src/lib/components/admin/fields/edit-field.component.spec.ts +21 -0
  43. package/src/lib/components/admin/fields/edit-field.component.ts +100 -0
  44. package/src/lib/components/admin/fields/field-group.component.html +69 -0
  45. package/src/lib/components/admin/fields/field-group.component.scss +0 -0
  46. package/src/lib/components/admin/fields/field-group.component.spec.ts +21 -0
  47. package/src/lib/components/admin/fields/field-group.component.ts +132 -0
  48. package/src/lib/components/admin/fields/fields.component.html +73 -0
  49. package/src/lib/components/admin/fields/fields.component.scss +11 -0
  50. package/src/lib/components/admin/fields/fields.component.spec.ts +21 -0
  51. package/src/lib/components/admin/fields/fields.component.ts +111 -0
  52. package/src/lib/components/admin/fields/index.ts +6 -0
  53. package/src/lib/components/admin/index.ts +4 -0
  54. package/src/lib/components/admin/sections/create-or-update-sections-input-base.ts +36 -0
  55. package/src/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.ts +79 -0
  56. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.html +191 -0
  57. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.scss +24 -0
  58. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.spec.ts +21 -0
  59. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.ts +412 -0
  60. package/src/lib/components/admin/sections/entry-types/index.ts +2 -0
  61. package/src/lib/components/admin/sections/index.ts +3 -0
  62. package/src/lib/components/admin/sections/sections.component.html +191 -0
  63. package/src/lib/components/admin/sections/sections.component.scss +26 -0
  64. package/src/lib/components/admin/sections/sections.component.spec.ts +21 -0
  65. package/src/lib/components/admin/sections/sections.component.ts +334 -0
  66. package/src/lib/components/admin/sites/create-or-update-sites-input-base.ts +31 -0
  67. package/src/lib/components/admin/sites/index.ts +2 -0
  68. package/src/lib/components/admin/sites/sites.component.html +154 -0
  69. package/src/lib/components/admin/sites/sites.component.scss +19 -0
  70. package/src/lib/components/admin/sites/sites.component.spec.ts +21 -0
  71. package/src/lib/components/admin/sites/sites.component.ts +293 -0
  72. package/src/lib/components/dynamic-form/entry/entry-config.component.html +36 -0
  73. package/src/lib/components/dynamic-form/entry/entry-config.component.scss +0 -0
  74. package/src/lib/components/dynamic-form/entry/entry-config.component.spec.ts +21 -0
  75. package/src/lib/components/dynamic-form/entry/entry-config.component.ts +115 -0
  76. package/src/lib/components/dynamic-form/entry/entry-config.ts +24 -0
  77. package/src/lib/components/dynamic-form/entry/entry-control.component.html +26 -0
  78. package/src/lib/components/dynamic-form/entry/entry-control.component.scss +20 -0
  79. package/src/lib/components/dynamic-form/entry/entry-control.component.spec.ts +21 -0
  80. package/src/lib/components/dynamic-form/entry/entry-control.component.ts +110 -0
  81. package/src/lib/components/dynamic-form/entry/index.ts +3 -0
  82. package/src/lib/components/dynamic-form/form-control-group.ts +31 -0
  83. package/src/lib/components/dynamic-form/index.ts +4 -0
  84. package/src/lib/components/dynamic-form/matrix/index.ts +3 -0
  85. package/src/lib/components/dynamic-form/matrix/matrix-config.component.html +147 -0
  86. package/src/lib/components/dynamic-form/matrix/matrix-config.component.scss +0 -0
  87. package/src/lib/components/dynamic-form/matrix/matrix-config.component.spec.ts +21 -0
  88. package/src/lib/components/dynamic-form/matrix/matrix-config.component.ts +238 -0
  89. package/src/lib/components/dynamic-form/matrix/matrix-config.ts +63 -0
  90. package/src/lib/components/dynamic-form/matrix/matrix-control.component.html +42 -0
  91. package/src/lib/components/dynamic-form/matrix/matrix-control.component.scss +0 -0
  92. package/src/lib/components/dynamic-form/matrix/matrix-control.component.spec.ts +21 -0
  93. package/src/lib/components/dynamic-form/matrix/matrix-control.component.ts +104 -0
  94. package/src/lib/components/dynamic-form/table/index.ts +3 -0
  95. package/src/lib/components/dynamic-form/table/table-config.component.html +85 -0
  96. package/src/lib/components/dynamic-form/table/table-config.component.scss +10 -0
  97. package/src/lib/components/dynamic-form/table/table-config.component.spec.ts +21 -0
  98. package/src/lib/components/dynamic-form/table/table-config.component.ts +170 -0
  99. package/src/lib/components/dynamic-form/table/table-config.ts +45 -0
  100. package/src/lib/components/dynamic-form/table/table-control.component.html +55 -0
  101. package/src/lib/components/dynamic-form/table/table-control.component.scss +10 -0
  102. package/src/lib/components/dynamic-form/table/table-control.component.spec.ts +21 -0
  103. package/src/lib/components/dynamic-form/table/table-control.component.ts +107 -0
  104. package/src/lib/components/index.ts +2 -0
  105. package/src/lib/constants/index.ts +1 -0
  106. package/src/lib/constants/styles.ts +31 -0
  107. package/src/lib/enums/ecms-component.ts +11 -0
  108. package/src/lib/enums/index.ts +1 -0
  109. package/src/lib/proxy/README.md +17 -0
  110. package/src/lib/proxy/admin/dynamic-forms/form-admin.service.ts +21 -0
  111. package/src/lib/proxy/admin/dynamic-forms/models.ts +5 -0
  112. package/src/lib/proxy/admin/entries/entry-admin.service.ts +100 -0
  113. package/src/lib/proxy/admin/entries/models.ts +73 -0
  114. package/src/lib/proxy/admin/fields/field-admin.service.ts +64 -0
  115. package/src/lib/proxy/admin/fields/field-group-admin.service.ts +56 -0
  116. package/{lib/proxy/admin/fields/models.d.ts → src/lib/proxy/admin/fields/models.ts} +42 -34
  117. package/src/lib/proxy/admin/sections/entry-type-admin.service.ts +55 -0
  118. package/{lib/proxy/admin/sections/models.d.ts → src/lib/proxy/admin/sections/models.ts} +88 -74
  119. package/src/lib/proxy/admin/sections/section-admin.service.ts +74 -0
  120. package/{lib/proxy/admin/sites/models.d.ts → src/lib/proxy/admin/sites/models.ts} +36 -30
  121. package/src/lib/proxy/admin/sites/site-admin.service.ts +72 -0
  122. package/src/lib/proxy/dignite/abp/data/models.ts +4 -0
  123. package/src/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.ts +65 -0
  124. package/{lib/proxy/dignite/file-explorer/directories/models.d.ts → src/lib/proxy/dignite/file-explorer/directories/models.ts} +35 -29
  125. package/src/lib/proxy/dignite/file-explorer/files/file-descriptor.service.ts +86 -0
  126. package/src/lib/proxy/dignite/file-explorer/files/models.ts +57 -0
  127. package/src/lib/proxy/entries/entry-status.enum.ts +8 -0
  128. package/src/lib/proxy/fields/models.ts +9 -0
  129. package/src/lib/proxy/generate-proxy.json +11821 -0
  130. package/{lib/proxy/microsoft/asp-net-core/mvc/models.d.ts → src/lib/proxy/microsoft/asp-net-core/mvc/models.ts} +12 -10
  131. package/src/lib/proxy/microsoft/extensions/primitives/models.ts +9 -0
  132. package/{lib/proxy/microsoft/net/http/headers/models.d.ts → src/lib/proxy/microsoft/net/http/headers/models.ts} +7 -6
  133. package/src/lib/proxy/sections/models.ts +14 -0
  134. package/src/lib/proxy/sections/section-type.enum.ts +9 -0
  135. package/src/lib/proxy/sites/models.ts +5 -0
  136. package/src/lib/proxy/volo/abp/content/models.ts +6 -0
  137. package/{lib/proxy/volo/cms-kit/users/models.d.ts → src/lib/proxy/volo/cms-kit/users/models.ts} +8 -7
  138. package/src/lib/services/appent-content.ts +13 -0
  139. package/src/lib/services/cms-api.service.ts +71 -0
  140. package/src/lib/services/cms.service.ts +18 -0
  141. package/src/lib/services/field-abstracts.service.ts +41 -0
  142. package/src/lib/services/index.ts +4 -0
  143. package/src/lib/services/simple-reuse-strategy.ts +49 -0
  144. package/src/lib/services/update-list.service.ts +15 -0
  145. package/src/lib/toolbar/index.ts +2 -0
  146. package/src/lib/toolbar/toolbar-btn-default-action.ts +171 -0
  147. package/src/lib/toolbar/toolbar-config.ts +95 -0
  148. package/{public-api.d.ts → src/public-api.ts} +12 -8
  149. package/src/test.ts +26 -0
  150. package/tsconfig.lib.json +20 -0
  151. package/tsconfig.lib.prod.json +10 -0
  152. package/tsconfig.spec.json +17 -0
  153. package/config/cms-config.module.d.ts +0 -8
  154. package/config/enums/route-names.d.ts +0 -8
  155. package/config/index.d.ts +0 -5
  156. package/config/providers/route.provider.d.ts +0 -8
  157. package/esm2022/config/cms-config.module.mjs +0 -19
  158. package/esm2022/config/dignite-ng-expand.cms-config.mjs +0 -5
  159. package/esm2022/config/enums/index.mjs +0 -2
  160. package/esm2022/config/enums/route-names.mjs +0 -2
  161. package/esm2022/config/providers/index.mjs +0 -2
  162. package/esm2022/config/providers/route.provider.mjs +0 -64
  163. package/esm2022/config/public-api.mjs +0 -4
  164. package/esm2022/dignite-ng-expand.cms.mjs +0 -5
  165. package/esm2022/lib/cms-routing.module.mjs +0 -100
  166. package/esm2022/lib/cms.module.mjs +0 -164
  167. package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +0 -279
  168. package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +0 -32
  169. package/esm2022/lib/components/admin/entries/create.component.mjs +0 -107
  170. package/esm2022/lib/components/admin/entries/edit.component.mjs +0 -110
  171. package/esm2022/lib/components/admin/entries/entries.component.mjs +0 -212
  172. package/esm2022/lib/components/admin/entries/index.mjs +0 -5
  173. package/esm2022/lib/components/admin/fields/create-field.component.mjs +0 -82
  174. package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +0 -112
  175. package/esm2022/lib/components/admin/fields/create-or-update-field-input-base.mjs +0 -25
  176. package/esm2022/lib/components/admin/fields/edit-field.component.mjs +0 -110
  177. package/esm2022/lib/components/admin/fields/field-group.component.mjs +0 -124
  178. package/esm2022/lib/components/admin/fields/fields.component.mjs +0 -119
  179. package/esm2022/lib/components/admin/fields/index.mjs +0 -7
  180. package/esm2022/lib/components/admin/index.mjs +0 -5
  181. package/esm2022/lib/components/admin/sections/create-or-update-sections-input-base.mjs +0 -27
  182. package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +0 -71
  183. package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +0 -418
  184. package/esm2022/lib/components/admin/sections/entry-types/index.mjs +0 -3
  185. package/esm2022/lib/components/admin/sections/index.mjs +0 -4
  186. package/esm2022/lib/components/admin/sections/sections.component.mjs +0 -334
  187. package/esm2022/lib/components/admin/sites/create-or-update-sites-input-base.mjs +0 -23
  188. package/esm2022/lib/components/admin/sites/index.mjs +0 -3
  189. package/esm2022/lib/components/admin/sites/sites.component.mjs +0 -285
  190. package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +0 -125
  191. package/esm2022/lib/components/dynamic-form/entry/entry-config.mjs +0 -18
  192. package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +0 -115
  193. package/esm2022/lib/components/dynamic-form/entry/index.mjs +0 -4
  194. package/esm2022/lib/components/dynamic-form/form-control-group.mjs +0 -31
  195. package/esm2022/lib/components/dynamic-form/index.mjs +0 -5
  196. package/esm2022/lib/components/index.mjs +0 -3
  197. package/esm2022/lib/constants/index.mjs +0 -2
  198. package/esm2022/lib/constants/styles.mjs +0 -32
  199. package/esm2022/lib/enums/ecms-component.mjs +0 -13
  200. package/esm2022/lib/enums/index.mjs +0 -2
  201. package/esm2022/lib/proxy/admin/dynamic-forms/form-admin.service.mjs +0 -24
  202. package/esm2022/lib/proxy/admin/dynamic-forms/index.mjs +0 -3
  203. package/esm2022/lib/proxy/admin/dynamic-forms/models.mjs +0 -2
  204. package/esm2022/lib/proxy/admin/entries/entry-admin.service.mjs +0 -67
  205. package/esm2022/lib/proxy/admin/entries/index.mjs +0 -3
  206. package/esm2022/lib/proxy/admin/entries/models.mjs +0 -2
  207. package/esm2022/lib/proxy/admin/fields/field-admin.service.mjs +0 -47
  208. package/esm2022/lib/proxy/admin/fields/field-group-admin.service.mjs +0 -43
  209. package/esm2022/lib/proxy/admin/fields/index.mjs +0 -4
  210. package/esm2022/lib/proxy/admin/fields/models.mjs +0 -2
  211. package/esm2022/lib/proxy/admin/index.mjs +0 -7
  212. package/esm2022/lib/proxy/admin/sections/entry-type-admin.service.mjs +0 -43
  213. package/esm2022/lib/proxy/admin/sections/index.mjs +0 -4
  214. package/esm2022/lib/proxy/admin/sections/models.mjs +0 -2
  215. package/esm2022/lib/proxy/admin/sections/section-admin.service.mjs +0 -53
  216. package/esm2022/lib/proxy/admin/sites/index.mjs +0 -3
  217. package/esm2022/lib/proxy/admin/sites/models.mjs +0 -2
  218. package/esm2022/lib/proxy/admin/sites/site-admin.service.mjs +0 -51
  219. package/esm2022/lib/proxy/dignite/abp/data/index.mjs +0 -2
  220. package/esm2022/lib/proxy/dignite/abp/data/models.mjs +0 -2
  221. package/esm2022/lib/proxy/dignite/abp/index.mjs +0 -3
  222. package/esm2022/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.mjs +0 -48
  223. package/esm2022/lib/proxy/dignite/file-explorer/directories/index.mjs +0 -3
  224. package/esm2022/lib/proxy/dignite/file-explorer/directories/models.mjs +0 -2
  225. package/esm2022/lib/proxy/dignite/file-explorer/files/file-descriptor.service.mjs +0 -60
  226. package/esm2022/lib/proxy/dignite/file-explorer/files/index.mjs +0 -3
  227. package/esm2022/lib/proxy/dignite/file-explorer/files/models.mjs +0 -2
  228. package/esm2022/lib/proxy/dignite/file-explorer/index.mjs +0 -4
  229. package/esm2022/lib/proxy/dignite/index.mjs +0 -4
  230. package/esm2022/lib/proxy/entries/entry-status.enum.mjs +0 -8
  231. package/esm2022/lib/proxy/entries/index.mjs +0 -2
  232. package/esm2022/lib/proxy/fields/index.mjs +0 -2
  233. package/esm2022/lib/proxy/fields/models.mjs +0 -2
  234. package/esm2022/lib/proxy/index.mjs +0 -10
  235. package/esm2022/lib/proxy/microsoft/asp-net-core/index.mjs +0 -3
  236. package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/index.mjs +0 -2
  237. package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/models.mjs +0 -2
  238. package/esm2022/lib/proxy/microsoft/extensions/index.mjs +0 -3
  239. package/esm2022/lib/proxy/microsoft/extensions/primitives/index.mjs +0 -2
  240. package/esm2022/lib/proxy/microsoft/extensions/primitives/models.mjs +0 -2
  241. package/esm2022/lib/proxy/microsoft/index.mjs +0 -5
  242. package/esm2022/lib/proxy/microsoft/net/http/headers/index.mjs +0 -2
  243. package/esm2022/lib/proxy/microsoft/net/http/headers/models.mjs +0 -2
  244. package/esm2022/lib/proxy/microsoft/net/http/index.mjs +0 -3
  245. package/esm2022/lib/proxy/microsoft/net/index.mjs +0 -3
  246. package/esm2022/lib/proxy/sections/index.mjs +0 -3
  247. package/esm2022/lib/proxy/sections/models.mjs +0 -2
  248. package/esm2022/lib/proxy/sections/section-type.enum.mjs +0 -9
  249. package/esm2022/lib/proxy/sites/index.mjs +0 -2
  250. package/esm2022/lib/proxy/sites/models.mjs +0 -2
  251. package/esm2022/lib/proxy/volo/abp/content/index.mjs +0 -2
  252. package/esm2022/lib/proxy/volo/abp/content/models.mjs +0 -2
  253. package/esm2022/lib/proxy/volo/abp/index.mjs +0 -3
  254. package/esm2022/lib/proxy/volo/cms-kit/index.mjs +0 -3
  255. package/esm2022/lib/proxy/volo/cms-kit/users/index.mjs +0 -2
  256. package/esm2022/lib/proxy/volo/cms-kit/users/models.mjs +0 -2
  257. package/esm2022/lib/proxy/volo/index.mjs +0 -4
  258. package/esm2022/lib/services/appent-content.mjs +0 -15
  259. package/esm2022/lib/services/cms-api.service.mjs +0 -80
  260. package/esm2022/lib/services/cms.service.mjs +0 -23
  261. package/esm2022/lib/services/field-abstracts.service.mjs +0 -45
  262. package/esm2022/lib/services/index.mjs +0 -4
  263. package/esm2022/lib/services/simple-reuse-strategy.mjs +0 -43
  264. package/esm2022/lib/services/update-list.service.mjs +0 -19
  265. package/esm2022/lib/toolbar/index.mjs +0 -3
  266. package/esm2022/lib/toolbar/toolbar-btn-default-action.mjs +0 -160
  267. package/esm2022/lib/toolbar/toolbar-config.mjs +0 -81
  268. package/esm2022/public-api.mjs +0 -12
  269. package/fesm2022/dignite-ng-expand.cms-config.mjs +0 -87
  270. package/fesm2022/dignite-ng-expand.cms-config.mjs.map +0 -1
  271. package/fesm2022/dignite-ng-expand.cms.mjs +0 -3839
  272. package/fesm2022/dignite-ng-expand.cms.mjs.map +0 -1
  273. package/index.d.ts +0 -5
  274. package/lib/cms-routing.module.d.ts +0 -7
  275. package/lib/cms.module.d.ts +0 -36
  276. package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +0 -89
  277. package/lib/components/admin/entries/create-or-update-entry-input-base.d.ts +0 -23
  278. package/lib/components/admin/entries/create.component.d.ts +0 -40
  279. package/lib/components/admin/entries/edit.component.d.ts +0 -42
  280. package/lib/components/admin/entries/entries.component.d.ts +0 -66
  281. package/lib/components/admin/entries/index.d.ts +0 -4
  282. package/lib/components/admin/fields/create-field.component.d.ts +0 -31
  283. package/lib/components/admin/fields/create-or-edit-field.component.d.ts +0 -33
  284. package/lib/components/admin/fields/create-or-update-field-input-base.d.ts +0 -16
  285. package/lib/components/admin/fields/edit-field.component.d.ts +0 -40
  286. package/lib/components/admin/fields/field-group.component.d.ts +0 -51
  287. package/lib/components/admin/fields/fields.component.d.ts +0 -37
  288. package/lib/components/admin/fields/index.d.ts +0 -6
  289. package/lib/components/admin/index.d.ts +0 -4
  290. package/lib/components/admin/sections/create-or-update-sections-input-base.d.ts +0 -17
  291. package/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.d.ts +0 -38
  292. package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +0 -132
  293. package/lib/components/admin/sections/entry-types/index.d.ts +0 -2
  294. package/lib/components/admin/sections/index.d.ts +0 -3
  295. package/lib/components/admin/sections/sections.component.d.ts +0 -95
  296. package/lib/components/admin/sites/create-or-update-sites-input-base.d.ts +0 -12
  297. package/lib/components/admin/sites/index.d.ts +0 -2
  298. package/lib/components/admin/sites/sites.component.d.ts +0 -72
  299. package/lib/components/dynamic-form/entry/entry-config.component.d.ts +0 -42
  300. package/lib/components/dynamic-form/entry/entry-config.d.ts +0 -9
  301. package/lib/components/dynamic-form/entry/entry-control.component.d.ts +0 -35
  302. package/lib/components/dynamic-form/entry/index.d.ts +0 -3
  303. package/lib/components/dynamic-form/form-control-group.d.ts +0 -4
  304. package/lib/components/dynamic-form/index.d.ts +0 -2
  305. package/lib/components/index.d.ts +0 -2
  306. package/lib/constants/index.d.ts +0 -1
  307. package/lib/constants/styles.d.ts +0 -2
  308. package/lib/enums/ecms-component.d.ts +0 -11
  309. package/lib/enums/index.d.ts +0 -1
  310. package/lib/proxy/admin/dynamic-forms/form-admin.service.d.ts +0 -12
  311. package/lib/proxy/admin/dynamic-forms/models.d.ts +0 -4
  312. package/lib/proxy/admin/entries/entry-admin.service.d.ts +0 -21
  313. package/lib/proxy/admin/entries/models.d.ts +0 -65
  314. package/lib/proxy/admin/fields/field-admin.service.d.ts +0 -17
  315. package/lib/proxy/admin/fields/field-group-admin.service.d.ts +0 -16
  316. package/lib/proxy/admin/sections/entry-type-admin.service.d.ts +0 -15
  317. package/lib/proxy/admin/sections/section-admin.service.d.ts +0 -18
  318. package/lib/proxy/admin/sites/site-admin.service.d.ts +0 -18
  319. package/lib/proxy/dignite/abp/data/models.d.ts +0 -3
  320. package/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.d.ts +0 -17
  321. package/lib/proxy/dignite/file-explorer/files/file-descriptor.service.d.ts +0 -20
  322. package/lib/proxy/dignite/file-explorer/files/models.d.ts +0 -50
  323. package/lib/proxy/entries/entry-status.enum.d.ts +0 -5
  324. package/lib/proxy/fields/models.d.ts +0 -8
  325. package/lib/proxy/microsoft/extensions/primitives/models.d.ts +0 -8
  326. package/lib/proxy/sections/models.d.ts +0 -12
  327. package/lib/proxy/sections/section-type.enum.d.ts +0 -6
  328. package/lib/proxy/sites/models.d.ts +0 -4
  329. package/lib/proxy/volo/abp/content/models.d.ts +0 -5
  330. package/lib/services/appent-content.d.ts +0 -1
  331. package/lib/services/cms-api.service.d.ts +0 -20
  332. package/lib/services/cms.service.d.ts +0 -10
  333. package/lib/services/field-abstracts.service.d.ts +0 -20
  334. package/lib/services/index.d.ts +0 -3
  335. package/lib/services/simple-reuse-strategy.d.ts +0 -11
  336. package/lib/services/update-list.service.d.ts +0 -9
  337. package/lib/toolbar/index.d.ts +0 -2
  338. package/lib/toolbar/toolbar-btn-default-action.d.ts +0 -19
  339. package/lib/toolbar/toolbar-config.d.ts +0 -57
  340. /package/{lib/proxy/admin/dynamic-forms/index.d.ts → src/lib/proxy/admin/dynamic-forms/index.ts} +0 -0
  341. /package/{lib/proxy/admin/entries/index.d.ts → src/lib/proxy/admin/entries/index.ts} +0 -0
  342. /package/{lib/proxy/admin/fields/index.d.ts → src/lib/proxy/admin/fields/index.ts} +0 -0
  343. /package/{lib/proxy/admin/index.d.ts → src/lib/proxy/admin/index.ts} +0 -0
  344. /package/{lib/proxy/admin/sections/index.d.ts → src/lib/proxy/admin/sections/index.ts} +0 -0
  345. /package/{lib/proxy/admin/sites/index.d.ts → src/lib/proxy/admin/sites/index.ts} +0 -0
  346. /package/{lib/proxy/dignite/abp/data/index.d.ts → src/lib/proxy/dignite/abp/data/index.ts} +0 -0
  347. /package/{lib/proxy/dignite/abp/index.d.ts → src/lib/proxy/dignite/abp/index.ts} +0 -0
  348. /package/{lib/proxy/dignite/file-explorer/directories/index.d.ts → src/lib/proxy/dignite/file-explorer/directories/index.ts} +0 -0
  349. /package/{lib/proxy/dignite/file-explorer/files/index.d.ts → src/lib/proxy/dignite/file-explorer/files/index.ts} +0 -0
  350. /package/{lib/proxy/dignite/file-explorer/index.d.ts → src/lib/proxy/dignite/file-explorer/index.ts} +0 -0
  351. /package/{lib/proxy/dignite/index.d.ts → src/lib/proxy/dignite/index.ts} +0 -0
  352. /package/{lib/proxy/entries/index.d.ts → src/lib/proxy/entries/index.ts} +0 -0
  353. /package/{lib/proxy/fields/index.d.ts → src/lib/proxy/fields/index.ts} +0 -0
  354. /package/{lib/proxy/index.d.ts → src/lib/proxy/index.ts} +0 -0
  355. /package/{lib/proxy/microsoft/asp-net-core/index.d.ts → src/lib/proxy/microsoft/asp-net-core/index.ts} +0 -0
  356. /package/{lib/proxy/microsoft/asp-net-core/mvc/index.d.ts → src/lib/proxy/microsoft/asp-net-core/mvc/index.ts} +0 -0
  357. /package/{lib/proxy/microsoft/extensions/index.d.ts → src/lib/proxy/microsoft/extensions/index.ts} +0 -0
  358. /package/{lib/proxy/microsoft/extensions/primitives/index.d.ts → src/lib/proxy/microsoft/extensions/primitives/index.ts} +0 -0
  359. /package/{lib/proxy/microsoft/index.d.ts → src/lib/proxy/microsoft/index.ts} +0 -0
  360. /package/{lib/proxy/microsoft/net/http/headers/index.d.ts → src/lib/proxy/microsoft/net/http/headers/index.ts} +0 -0
  361. /package/{lib/proxy/microsoft/net/http/index.d.ts → src/lib/proxy/microsoft/net/http/index.ts} +0 -0
  362. /package/{lib/proxy/microsoft/net/index.d.ts → src/lib/proxy/microsoft/net/index.ts} +0 -0
  363. /package/{lib/proxy/sections/index.d.ts → src/lib/proxy/sections/index.ts} +0 -0
  364. /package/{lib/proxy/sites/index.d.ts → src/lib/proxy/sites/index.ts} +0 -0
  365. /package/{lib/proxy/volo/abp/content/index.d.ts → src/lib/proxy/volo/abp/content/index.ts} +0 -0
  366. /package/{lib/proxy/volo/abp/index.d.ts → src/lib/proxy/volo/abp/index.ts} +0 -0
  367. /package/{lib/proxy/volo/cms-kit/index.d.ts → src/lib/proxy/volo/cms-kit/index.ts} +0 -0
  368. /package/{lib/proxy/volo/cms-kit/users/index.d.ts → src/lib/proxy/volo/cms-kit/users/index.ts} +0 -0
  369. /package/{lib/proxy/volo/index.d.ts → src/lib/proxy/volo/index.ts} +0 -0
@@ -1,3839 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, Injectable, inject, Component, Input, ViewChild, Output, InjectionToken, RendererFactory2, NgModule } from '@angular/core';
3
- import * as i1 from '@abp/ng.core';
4
- import { mapEnumToOptions, ListService, LIST_QUERY_DEBOUNCE_TIME, ConfigStateService, AuthGuard, PermissionGuard, LazyModuleFactory, CoreModule } from '@abp/ng.core';
5
- import * as i3 from '@abp/ng.theme.shared';
6
- import { ThemeSharedModule } from '@abp/ng.theme.shared';
7
- import * as i3$1 from '@angular/router';
8
- import { RouterModule, RouteReuseStrategy } from '@angular/router';
9
- import * as i1$1 from '@angular/forms';
10
- import { FormBuilder, Validators, FormGroup, FormControl, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
11
- import * as i7 from '@swimlane/ngx-datatable';
12
- import { ColumnMode } from '@swimlane/ngx-datatable';
13
- import { finalize } from 'rxjs/operators';
14
- import { EXTENSIONS_IDENTIFIER, ToolbarAction, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, DateAdapter } from '@abp/ng.theme.shared/extensions';
15
- import * as i2 from '@angular/common';
16
- import * as i7$1 from '@ngx-validate/core';
17
- import { NgxValidateCoreModule } from '@ngx-validate/core';
18
- import * as i10 from '@ng-bootstrap/ng-bootstrap';
19
- import { NgbDropdownModule, NgbNavModule, NgbAccordionModule, NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap';
20
- import * as i9 from '@abp/ng.components/page';
21
- import { PageModule } from '@abp/ng.components/page';
22
- import { pinyin } from 'pinyin-pro';
23
- import * as i1$2 from '@angular/platform-browser';
24
- import * as i11 from '@dignite-ng/expand.dynamic-form';
25
- import { DynamicComponent, DynamicFormModule } from '@dignite-ng/expand.dynamic-form';
26
- import * as i4 from 'ng-zorro-antd/select';
27
- import { NzSelectModule } from 'ng-zorro-antd/select';
28
- import { map, tap } from 'rxjs';
29
- import { DragDropModule } from '@angular/cdk/drag-drop';
30
- import { CommercialUiConfigModule } from '@volo/abp.commercial.ng.ui/config';
31
- import { NzTableModule } from 'ng-zorro-antd/table';
32
- import { ScrollingModule } from '@angular/cdk/scrolling';
33
-
34
- var EntryStatus;
35
- (function (EntryStatus) {
36
- EntryStatus[EntryStatus["Draft"] = 0] = "Draft";
37
- EntryStatus[EntryStatus["Published"] = 1] = "Published";
38
- })(EntryStatus || (EntryStatus = {}));
39
- const entryStatusOptions = mapEnumToOptions(EntryStatus);
40
-
41
- var index$s = /*#__PURE__*/Object.freeze({
42
- __proto__: null,
43
- get EntryStatus () { return EntryStatus; },
44
- entryStatusOptions: entryStatusOptions
45
- });
46
-
47
- var ECmsComponent;
48
- (function (ECmsComponent) {
49
- ECmsComponent["Entries"] = "Cms.Entries";
50
- ECmsComponent["Entries_Create"] = "Cms.Entries.Create";
51
- ECmsComponent["Entries_Edit"] = "Cms.Entries.Edit";
52
- ECmsComponent["Fields"] = "Cms.Fields";
53
- ECmsComponent["FieldsCreate"] = "Cms.Fields.Create";
54
- ECmsComponent["FieldsEdit"] = "Cms.Fields.Edit";
55
- ECmsComponent["Sites"] = "Cms.Sites";
56
- ECmsComponent["Sections"] = "Cms.Sections";
57
- ECmsComponent["SectionsCreateOrEdit"] = "Cms.Sections.Create.Or.Edit";
58
- })(ECmsComponent || (ECmsComponent = {}));
59
-
60
- class UpdateListService {
61
- updateListEvent = new EventEmitter();
62
- constructor() { }
63
- updateList() {
64
- this.updateListEvent.emit();
65
- }
66
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UpdateListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
67
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UpdateListService, providedIn: 'root' });
68
- }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UpdateListService, decorators: [{
70
- type: Injectable,
71
- args: [{
72
- providedIn: 'root'
73
- }]
74
- }], ctorParameters: function () { return []; } });
75
-
76
- class EntryAdminService {
77
- restService;
78
- apiName = 'CmsAdmin';
79
- activate = (id, config) => this.restService.request({
80
- method: 'POST',
81
- url: `/api/cms-admin/entries/activate/${id}`,
82
- }, { apiName: this.apiName, ...config });
83
- create = (input, config) => this.restService.request({
84
- method: 'POST',
85
- url: '/api/cms-admin/entries?api-version=1.0',
86
- body: input,
87
- }, { apiName: this.apiName, ...config });
88
- delete = (id, config) => this.restService.request({
89
- method: 'DELETE',
90
- url: `/api/cms-admin/entries/${id}`,
91
- }, { apiName: this.apiName, ...config });
92
- cultureExistWithSingleSection = (input, config) => this.restService.request({
93
- method: 'GET',
94
- url: '/api/cms-admin/entries/culture-exists-with-single-section',
95
- params: { culture: input.culture, sectionId: input.sectionId, entryTypeId: input.entryTypeId },
96
- }, { apiName: this.apiName, ...config });
97
- get = (id, config) => this.restService.request({
98
- method: 'GET',
99
- url: `/api/cms-admin/entries/${id}`,
100
- }, { apiName: this.apiName, ...config });
101
- getAllVersions = (id, config) => this.restService.request({
102
- method: 'GET',
103
- url: `/api/cms-admin/entries/${id}/all-versions`,
104
- }, { apiName: this.apiName, ...config });
105
- getList = (input, config) => this.restService.request({
106
- method: 'GET',
107
- url: '/api/cms-admin/entries',
108
- params: { culture: input.culture, sectionId: input.sectionId, entryTypeId: input.entryTypeId, startPublishDate: input.startPublishDate, expiryPublishDate: input.expiryPublishDate, filter: input.filter, status: input.status, creatorId: input.creatorId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
109
- }, { apiName: this.apiName, ...config });
110
- move = (id, input, config) => this.restService.request({
111
- method: 'POST',
112
- url: `/api/cms-admin/entries/move/${id}`,
113
- body: input,
114
- }, { apiName: this.apiName, ...config });
115
- slugExists = (input, config) => this.restService.request({
116
- method: 'GET',
117
- url: '/api/cms-admin/entries/slug-exists',
118
- params: { culture: input.culture, sectionId: input.sectionId, slug: input.slug },
119
- }, { apiName: this.apiName, ...config });
120
- update = (id, input, config) => this.restService.request({
121
- method: 'PUT',
122
- url: '/api/cms-admin/entries',
123
- params: { id },
124
- body: input,
125
- }, { apiName: this.apiName, ...config });
126
- constructor(restService) {
127
- this.restService = restService;
128
- }
129
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
130
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryAdminService, providedIn: 'root' });
131
- }
132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryAdminService, decorators: [{
133
- type: Injectable,
134
- args: [{
135
- providedIn: 'root',
136
- }]
137
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
138
-
139
- var index$r = /*#__PURE__*/Object.freeze({
140
- __proto__: null,
141
- EntryAdminService: EntryAdminService
142
- });
143
-
144
- class SiteAdminService {
145
- restService;
146
- apiName = 'CmsAdmin';
147
- create = (input, config) => this.restService.request({
148
- method: 'POST',
149
- url: '/api/cms-admin/sites',
150
- body: input,
151
- }, { apiName: this.apiName, ...config });
152
- delete = (id, config) => this.restService.request({
153
- method: 'DELETE',
154
- url: `/api/cms-admin/sites/${id}`,
155
- }, { apiName: this.apiName, ...config });
156
- get = (id, config) => this.restService.request({
157
- method: 'GET',
158
- url: `/api/cms-admin/sites/${id}`,
159
- }, { apiName: this.apiName, ...config });
160
- getList = (input, config) => this.restService.request({
161
- method: 'GET',
162
- url: '/api/cms-admin/sites',
163
- params: { filter: input.filter, isActive: input.isActive },
164
- }, { apiName: this.apiName, ...config });
165
- hostExists = (name, config) => this.restService.request({
166
- method: 'GET',
167
- url: `/api/cms-admin/sites/host-exists/${name}`,
168
- }, { apiName: this.apiName, ...config });
169
- nameExists = (name, config) => this.restService.request({
170
- method: 'GET',
171
- url: `/api/cms-admin/sites/name-exists/${name}`,
172
- }, { apiName: this.apiName, ...config });
173
- update = (id, input, config) => this.restService.request({
174
- method: 'PUT',
175
- url: `/api/cms-admin/sites/${id}`,
176
- body: input,
177
- }, { apiName: this.apiName, ...config });
178
- constructor(restService) {
179
- this.restService = restService;
180
- }
181
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SiteAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
182
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SiteAdminService, providedIn: 'root' });
183
- }
184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SiteAdminService, decorators: [{
185
- type: Injectable,
186
- args: [{
187
- providedIn: 'root',
188
- }]
189
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
190
-
191
- var index$q = /*#__PURE__*/Object.freeze({
192
- __proto__: null,
193
- SiteAdminService: SiteAdminService
194
- });
195
-
196
- class EntryTypeAdminService {
197
- restService;
198
- apiName = 'CmsAdmin';
199
- create = (input, config) => this.restService.request({
200
- method: 'POST',
201
- url: '/api/cms-admin/entry-types',
202
- body: input,
203
- }, { apiName: this.apiName, ...config });
204
- delete = (id, config) => this.restService.request({
205
- method: 'DELETE',
206
- url: `/api/cms-admin/entry-types/${id}`,
207
- }, { apiName: this.apiName, ...config });
208
- get = (id, config) => this.restService.request({
209
- method: 'GET',
210
- url: `/api/cms-admin/entry-types/${id}`,
211
- }, { apiName: this.apiName, ...config });
212
- nameExists = (input, config) => this.restService.request({
213
- method: 'GET',
214
- url: '/api/cms-admin/entry-types/name-exists',
215
- params: { sectionId: input.sectionId, name: input.name },
216
- }, { apiName: this.apiName, ...config });
217
- update = (id, input, config) => this.restService.request({
218
- method: 'PUT',
219
- url: `/api/cms-admin/entry-types/${id}`,
220
- body: input,
221
- }, { apiName: this.apiName, ...config });
222
- constructor(restService) {
223
- this.restService = restService;
224
- }
225
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryTypeAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
226
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryTypeAdminService, providedIn: 'root' });
227
- }
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryTypeAdminService, decorators: [{
229
- type: Injectable,
230
- args: [{
231
- providedIn: 'root',
232
- }]
233
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
234
-
235
- class SectionAdminService {
236
- restService;
237
- apiName = 'CmsAdmin';
238
- create = (input, config) => this.restService.request({
239
- method: 'POST',
240
- url: '/api/cms-admin/sections',
241
- body: input,
242
- }, { apiName: this.apiName, ...config });
243
- delete = (id, config) => this.restService.request({
244
- method: 'DELETE',
245
- url: `/api/cms-admin/sections/${id}`,
246
- }, { apiName: this.apiName, ...config });
247
- get = (id, config) => this.restService.request({
248
- method: 'GET',
249
- url: `/api/cms-admin/sections/${id}`,
250
- }, { apiName: this.apiName, ...config });
251
- getList = (input, config) => this.restService.request({
252
- method: 'GET',
253
- url: '/api/cms-admin/sections',
254
- params: { siteId: input.siteId, filter: input.filter, isActive: input.isActive, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
255
- }, { apiName: this.apiName, ...config });
256
- nameExists = (input, config) => this.restService.request({
257
- method: 'GET',
258
- url: '/api/cms-admin/sections/name-exists',
259
- params: { siteId: input.siteId, name: input.name },
260
- }, { apiName: this.apiName, ...config });
261
- routeExists = (input, config) => this.restService.request({
262
- method: 'GET',
263
- url: '/api/cms-admin/sections/route-exists',
264
- params: { siteId: input.siteId, route: input.route },
265
- }, { apiName: this.apiName, ...config });
266
- update = (id, input, config) => this.restService.request({
267
- method: 'PUT',
268
- url: `/api/cms-admin/sections/${id}`,
269
- body: input,
270
- }, { apiName: this.apiName, ...config });
271
- constructor(restService) {
272
- this.restService = restService;
273
- }
274
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SectionAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
275
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SectionAdminService, providedIn: 'root' });
276
- }
277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SectionAdminService, decorators: [{
278
- type: Injectable,
279
- args: [{
280
- providedIn: 'root',
281
- }]
282
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
283
-
284
- var index$p = /*#__PURE__*/Object.freeze({
285
- __proto__: null,
286
- EntryTypeAdminService: EntryTypeAdminService,
287
- SectionAdminService: SectionAdminService
288
- });
289
-
290
- class EntriesComponent {
291
- _EntryAdminService;
292
- _SiteAdminService;
293
- _SectionAdminService;
294
- toaster;
295
- confirmation;
296
- configState;
297
- router;
298
- _LocalizationService;
299
- constructor(_EntryAdminService, _SiteAdminService, _SectionAdminService, toaster, confirmation, configState, router, _LocalizationService) {
300
- this._EntryAdminService = _EntryAdminService;
301
- this._SiteAdminService = _SiteAdminService;
302
- this._SectionAdminService = _SectionAdminService;
303
- this.toaster = toaster;
304
- this.confirmation = confirmation;
305
- this.configState = configState;
306
- this.router = router;
307
- this._LocalizationService = _LocalizationService;
308
- }
309
- fb = inject(FormBuilder);
310
- _UpdateListService = inject(UpdateListService);
311
- list = inject(ListService);
312
- ngOnInit() {
313
- this.getPageDate();
314
- this._UpdateListService.updateListEvent.subscribe(() => {
315
- this.list.get();
316
- });
317
- }
318
- /**站点列表 */
319
- siteList = [];
320
- /**选择的站点id */
321
- siteId = '';
322
- /**站点下的版块 */
323
- SiteOfSectionList = [];
324
- /**版块下的语言列表 */
325
- sectionLanguagesList = [];
326
- /**版块下的条目类型列表 */
327
- entryTypeList = [];
328
- /**状态编码 */
329
- _entryStatusOptions = entryStatusOptions;
330
- /**获取页面数据 */
331
- async getPageDate() {
332
- await this.getsiteList();
333
- await this.getSiteOfSectionList();
334
- await this.getSectionLanguagesList();
335
- this.filters = this.filtersForm.value;
336
- this.hookToQuery();
337
- }
338
- /**切换站点 */
339
- async siteIdChange() {
340
- await this.getSiteOfSectionList();
341
- await this.getSectionLanguagesList();
342
- this.resetData();
343
- }
344
- /**切换板块 */
345
- async sectionIdChange() {
346
- this.getSectionOfEntryType();
347
- await this.getSectionLanguagesList();
348
- this.resetData();
349
- }
350
- /**切换语言 */
351
- async cultureChange() {
352
- this.resetData();
353
- }
354
- /**获取站点列表 */
355
- getsiteList() {
356
- return new Promise((resolve, rejects) => {
357
- this._SiteAdminService.getList({}).subscribe(res => {
358
- this.siteList = res.items;
359
- this.filtersForm.get('siteId').patchValue(res.items[0]?.id || '');
360
- resolve(res.items);
361
- });
362
- });
363
- }
364
- /**获取站点下的版块 */
365
- getSiteOfSectionList() {
366
- return new Promise((resolve, rejects) => {
367
- let siteId = this.filtersForm.get('siteId').value;
368
- this._SectionAdminService.getList({
369
- maxResultCount: 1000,
370
- siteId: siteId
371
- }).subscribe(res => {
372
- this.SiteOfSectionList = res.items;
373
- this.filtersForm.get('sectionId').patchValue(res.items[0]?.id || '');
374
- this.getSectionOfEntryType();
375
- resolve(res.items);
376
- });
377
- });
378
- }
379
- /**获取版块下的条目类型 */
380
- getSectionOfEntryType() {
381
- let sectionId = this.filtersForm.get('sectionId').value;
382
- this.entryTypeList = this.SiteOfSectionList.find(el => el.id == sectionId)?.entryTypes || [];
383
- }
384
- /**获取版块下的语言列表 */
385
- getSectionLanguagesList() {
386
- return new Promise((resolve, rejects) => {
387
- // 板块列表 */
388
- let SiteOfSectionList = this.SiteOfSectionList;
389
- //获取所有语言 */
390
- let languages = this.configState.getDeep('localization.languages');
391
- //当前选择的板块id
392
- let sectionId = this.filtersForm.get('sectionId').value;
393
- //板块下的语言
394
- let sectionOfLanguages = this.SiteOfSectionList.find(el => el.id == sectionId)?.site?.languages || [];
395
- //获取系统语言 */
396
- let systemculture = this.configState.getDeep('localization.currentCulture.name');
397
- //获取当前选择的语言
398
- let nowculture = this.filtersForm.get('culture').value;
399
- //当前选择的语言,是否在版块的的语言列表中
400
- let isexist = sectionOfLanguages.find(el => el.cultureName == nowculture);
401
- this.filtersForm.get('culture').patchValue(nowculture ? isexist ? nowculture : systemculture : systemculture);
402
- this.sectionLanguagesList = languages.filter(el => sectionOfLanguages.find(ell => ell.cultureName === el.cultureName));
403
- resolve(sectionOfLanguages);
404
- });
405
- }
406
- resetData() {
407
- this.filters = this.filtersForm.value;
408
- this.list.page = 0;
409
- this.data.items = [];
410
- this.list.get();
411
- }
412
- /**新增-单个 */
413
- createEntriesBtn() {
414
- this.router.navigate(['/cms/admin/entries/create'], {
415
- queryParams: { cultureName: this.filters.culture, sectionId: this.filters.sectionId, entryTypeId: this.entryTypeList[0].id }
416
- });
417
- }
418
- /**列表相关 */
419
- ColumnMode = ColumnMode;
420
- data = {
421
- items: [],
422
- totalCount: 0,
423
- };
424
- filters = {};
425
- filtersForm = this.fb.group({
426
- siteId: [''],
427
- sectionId: [''],
428
- culture: [''],
429
- filter: [''],
430
- });
431
- hookToQuery() {
432
- const getData = (query) => this._EntryAdminService.getList({
433
- ...query,
434
- ...this.filters,
435
- });
436
- const setData = (list) => {
437
- this.data = list;
438
- };
439
- this.list.hookToQuery(getData).subscribe(setData);
440
- }
441
- /**删除条目 */
442
- deletefield(row) {
443
- this.confirmation.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`)).subscribe((status) => {
444
- if (status == 'confirm') {
445
- this._EntryAdminService.delete(row.id).pipe(finalize(() => {
446
- })).subscribe(res => {
447
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
448
- this.list.get();
449
- });
450
- }
451
- });
452
- }
453
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntriesComponent, deps: [{ token: EntryAdminService }, { token: SiteAdminService }, { token: SectionAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1.ConfigStateService }, { token: i3$1.Router }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
454
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EntriesComponent, selector: "cms-entries", providers: [
455
- ListService,
456
- // Provide this token if you want a different debounce time.
457
- // Default is 300. Cannot be 0. Any value below 100 is not recommended.
458
- { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
459
- {
460
- provide: EXTENSIONS_IDENTIFIER,
461
- useValue: ECmsComponent.Entries,
462
- },
463
- ], ngImport: i0, template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \"></abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::New' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\r\n <div class=\"input-group\" [formGroup]=\"filtersForm\">\r\n <select class=\"form-select col-auto\" formControlName=\"siteId\" (change)=\"siteIdChange()\">\r\n <ng-container *ngFor=\"let item of siteList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <select class=\"form-select col-auto\" formControlName=\"sectionId\" (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <select class=\"form-select col-auto\" formControlName=\"culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"filter\"\r\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\r\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"resetData()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\">\r\n\r\n <div class=\"card-body p-0\">\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\"\r\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\r\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\"\r\n [count]=\"data.totalCount\">\r\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Slug' | abpLocalization\" prop=\"slug\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | date: 'YYYY/MM/dd HH:m:s' }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm\" ngbDropdownToggle>\r\n {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'AbpUi::Edit' |\r\n abpLocalization}}</button>\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ngx-datatable>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>", styles: ["::ng-deep .sites-page .dignite_page{background:transparent}::ng-deep .sites-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sites-page .card-header input{flex:2 1 auto}::ng-deep .sites-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-page .container-height{height:calc(100vh - 220px)}::ng-deep .sites-page .morentr{border:2px solid transparent}::ng-deep .sites-page .borderdrag{border:2px solid var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .borderdragtd{background-color:var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .testtr{border-color:transparent}::ng-deep .sites-page .testtr td{padding:2px}::ng-deep .sites-page .testtr:hover{background-color:transparent}.cdk-drag-preview{display:table;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i7.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i7.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i7.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i7$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "component", type: i9.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i9.PageToolbarContainerComponent, selector: "abp-page-toolbar-container" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
464
- }
465
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntriesComponent, decorators: [{
466
- type: Component,
467
- args: [{ selector: 'cms-entries', providers: [
468
- ListService,
469
- // Provide this token if you want a different debounce time.
470
- // Default is 300. Cannot be 0. Any value below 100 is not recommended.
471
- { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
472
- {
473
- provide: EXTENSIONS_IDENTIFIER,
474
- useValue: ECmsComponent.Entries,
475
- },
476
- ], template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \"></abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::New' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\r\n <div class=\"input-group\" [formGroup]=\"filtersForm\">\r\n <select class=\"form-select col-auto\" formControlName=\"siteId\" (change)=\"siteIdChange()\">\r\n <ng-container *ngFor=\"let item of siteList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <select class=\"form-select col-auto\" formControlName=\"sectionId\" (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <select class=\"form-select col-auto\" formControlName=\"culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"filter\"\r\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\r\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"resetData()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\">\r\n\r\n <div class=\"card-body p-0\">\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\"\r\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\r\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\"\r\n [count]=\"data.totalCount\">\r\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Slug' | abpLocalization\" prop=\"slug\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | date: 'YYYY/MM/dd HH:m:s' }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm\" ngbDropdownToggle>\r\n {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'AbpUi::Edit' |\r\n abpLocalization}}</button>\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ngx-datatable>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>", styles: ["::ng-deep .sites-page .dignite_page{background:transparent}::ng-deep .sites-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sites-page .card-header input{flex:2 1 auto}::ng-deep .sites-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-page .container-height{height:calc(100vh - 220px)}::ng-deep .sites-page .morentr{border:2px solid transparent}::ng-deep .sites-page .borderdrag{border:2px solid var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .borderdragtd{background-color:var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .testtr{border-color:transparent}::ng-deep .sites-page .testtr td{padding:2px}::ng-deep .sites-page .testtr:hover{background-color:transparent}.cdk-drag-preview{display:table;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"] }]
477
- }], ctorParameters: function () { return [{ type: EntryAdminService }, { type: SiteAdminService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.ConfigStateService }, { type: i3$1.Router }, { type: i1.LocalizationService }]; } });
478
-
479
- class CreateOrUpdateEntryInputBase {
480
- /**语言 */
481
- culture = ['', [Validators.required]];
482
- /**条目id */
483
- entryTypeId = [''];
484
- /**标题 */
485
- title = ['', [Validators.required]];
486
- /**别名 */
487
- slug = ['', [Validators.required]];
488
- /**是否是草稿 */
489
- draft = ['', []];
490
- /**发布时间 */
491
- publishTime = ['', [Validators.required]];
492
- /**上级目录 */
493
- parentId = [null];
494
- /**修订说明 */
495
- versionNotes = [null];
496
- /**版本 */
497
- initialVersionId = [null];
498
- extraProperties = new FormGroup({});
499
- constructor(data) {
500
- if (data) {
501
- for (const key in data) {
502
- if (data.hasOwnProperty(key)) {
503
- this[key] = data[key];
504
- }
505
- }
506
- }
507
- }
508
- }
509
-
510
- class FieldGroupAdminService {
511
- restService;
512
- apiName = 'CmsAdmin';
513
- create = (input, config) => this.restService.request({
514
- method: 'POST',
515
- url: '/api/cms-admin/field-groups',
516
- body: input,
517
- }, { apiName: this.apiName, ...config });
518
- delete = (id, config) => this.restService.request({
519
- method: 'DELETE',
520
- url: `/api/cms-admin/field-groups/${id}`,
521
- }, { apiName: this.apiName, ...config });
522
- get = (id, config) => this.restService.request({
523
- method: 'GET',
524
- url: `/api/cms-admin/field-groups/${id}`,
525
- }, { apiName: this.apiName, ...config });
526
- getList = (input, config) => this.restService.request({
527
- method: 'GET',
528
- url: '/api/cms-admin/field-groups',
529
- params: { input },
530
- }, { apiName: this.apiName, ...config });
531
- update = (id, input, config) => this.restService.request({
532
- method: 'PUT',
533
- url: `/api/cms-admin/field-groups/${id}`,
534
- body: input,
535
- }, { apiName: this.apiName, ...config });
536
- constructor(restService) {
537
- this.restService = restService;
538
- }
539
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldGroupAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
540
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldGroupAdminService, providedIn: 'root' });
541
- }
542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldGroupAdminService, decorators: [{
543
- type: Injectable,
544
- args: [{
545
- providedIn: 'root',
546
- }]
547
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
548
-
549
- class FormAdminService {
550
- restService;
551
- apiName = 'CmsAdmin';
552
- getFormControls = (config) => this.restService.request({
553
- method: 'GET',
554
- url: '/api/cms-admin/dynamic-forms/forms',
555
- }, { apiName: this.apiName, ...config });
556
- constructor(restService) {
557
- this.restService = restService;
558
- }
559
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
560
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormAdminService, providedIn: 'root' });
561
- }
562
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormAdminService, decorators: [{
563
- type: Injectable,
564
- args: [{
565
- providedIn: 'root',
566
- }]
567
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
568
-
569
- var index$o = /*#__PURE__*/Object.freeze({
570
- __proto__: null,
571
- FormAdminService: FormAdminService
572
- });
573
-
574
- class FieldAbstractsService {
575
- _FieldGroupAdminService;
576
- _FormAdminService;
577
- constructor(_FieldGroupAdminService, _FormAdminService) {
578
- this._FieldGroupAdminService = _FieldGroupAdminService;
579
- this._FormAdminService = _FormAdminService;
580
- }
581
- /**字段分组列表 */
582
- fieldGroupList = [];
583
- /**获取字段分组列表 */
584
- getfieldGroupList() {
585
- this._FieldGroupAdminService.getList({}).subscribe(res => {
586
- this.fieldGroupList = res.items;
587
- });
588
- }
589
- /**表单控件类型 */
590
- fromControlList = [];
591
- /**获取表单控件类型 */
592
- getFromControlList() {
593
- return new Promise((resolve, reject) => {
594
- this._FormAdminService.getFormControls({}).subscribe(res => {
595
- this.fromControlList = res.items;
596
- resolve(res.items);
597
- });
598
- });
599
- }
600
- getExcludeAssignControl(typeName) {
601
- // return this.fromControlList.filter(el => el.name !== typeName)
602
- return this.fromControlList;
603
- }
604
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAbstractsService, deps: [{ token: FieldGroupAdminService }, { token: FormAdminService }], target: i0.ɵɵFactoryTarget.Injectable });
605
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAbstractsService, providedIn: 'root' });
606
- }
607
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAbstractsService, decorators: [{
608
- type: Injectable,
609
- args: [{
610
- providedIn: 'root'
611
- }]
612
- }], ctorParameters: function () { return [{ type: FieldGroupAdminService }, { type: FormAdminService }]; } });
613
-
614
- class CmsService {
615
- restService;
616
- apiName = 'Cms';
617
- constructor(restService) {
618
- this.restService = restService;
619
- }
620
- sample() {
621
- return this.restService.request({ method: 'GET', url: '/api/Cms/sample' }, { apiName: this.apiName });
622
- }
623
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
624
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsService, providedIn: 'root' });
625
- }
626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsService, decorators: [{
627
- type: Injectable,
628
- args: [{
629
- providedIn: 'root',
630
- }]
631
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
632
-
633
- class CmsApiService {
634
- titleService;
635
- constructor(titleService) {
636
- this.titleService = titleService;
637
- }
638
- /**动态设置浏览器标题 */
639
- setBrowserTitle(title) {
640
- this.titleService.setTitle(title);
641
- }
642
- /**
643
- * 识别中文转化为拼音,固定返回类型
644
- * 汉字转拼音
645
- * 大写转小写
646
- *
647
- * */
648
- chineseToPinyin(value) {
649
- //去除字符串中所有的空格
650
- // let val = value
651
- let val = value.replaceAll(' ', "-");
652
- let array = val.split('');
653
- let newArray = [];
654
- array.forEach((el, index) => {
655
- //转化为小写
656
- let elChange = el.toLowerCase();
657
- let isChinese = (str) => {
658
- return /^[\u4e00-\u9fa5]+$/.test(str);
659
- };
660
- if (isChinese(elChange)) {
661
- const resultWithoutTone = pinyin(elChange, { toneType: 'none', type: 'array' });
662
- elChange = resultWithoutTone.toString();
663
- if (index < array.length - 1)
664
- elChange += '-';
665
- }
666
- ;
667
- newArray.push(elChange);
668
- });
669
- let pinyinstr = newArray.join('');
670
- return pinyinstr || val;
671
- }
672
- /**
673
- * 深拷贝--方法 */
674
- deepClone(obj) {
675
- if (typeof obj !== 'object' || obj === null)
676
- return obj;
677
- const result = Array.isArray(obj) ? [] : {};
678
- for (let key in obj) {
679
- if (obj.hasOwnProperty(key)) {
680
- if (typeof obj[key] === 'object' && obj[key] !== null) {
681
- if (obj[key] instanceof Date) {
682
- result[key] = new Date(obj[key].getTime());
683
- }
684
- else if (obj[key] instanceof RegExp) {
685
- result[key] = new RegExp(obj[key]);
686
- }
687
- else {
688
- result[key] = this.deepClone(obj[key]);
689
- }
690
- }
691
- else {
692
- result[key] = obj[key];
693
- }
694
- }
695
- }
696
- return result;
697
- }
698
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsApiService, deps: [{ token: i1$2.Title }], target: i0.ɵɵFactoryTarget.Injectable });
699
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsApiService, providedIn: 'root' });
700
- }
701
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsApiService, decorators: [{
702
- type: Injectable,
703
- args: [{
704
- providedIn: 'root'
705
- }]
706
- }], ctorParameters: function () { return [{ type: i1$2.Title }]; } });
707
-
708
- class CreateOrEditEntriesComponent {
709
- toaster;
710
- _location;
711
- configState;
712
- _SectionAdminService;
713
- _EntryAdminService;
714
- datePipe;
715
- _LocalizationService;
716
- router;
717
- _CmsApiService;
718
- constructor(toaster, _location, configState, _SectionAdminService, _EntryAdminService, datePipe, _LocalizationService, router, _CmsApiService) {
719
- this.toaster = toaster;
720
- this._location = _location;
721
- this.configState = configState;
722
- this._SectionAdminService = _SectionAdminService;
723
- this._EntryAdminService = _EntryAdminService;
724
- this.datePipe = datePipe;
725
- this._LocalizationService = _LocalizationService;
726
- this.router = router;
727
- this._CmsApiService = _CmsApiService;
728
- }
729
- /**语言 */
730
- cultureName = '';
731
- /**条目id */
732
- entryTypeId = '';
733
- /**新建版本的版本id,同条目id */
734
- RevisionEntryId = '';
735
- /**选择的条目项 */
736
- entryTypesItem = '';
737
- /**版块id */
738
- sectionId = '';
739
- /**版块详情 */
740
- SectionSelect = '';
741
- /**语言列表 */
742
- languagesList = [];
743
- /**条目类型列表-用于选择上级条目 */
744
- entryTypesList = [];
745
- /**版本列表 */
746
- AllVersionsList = [];
747
- /**是否是编辑 */
748
- isEdit = false;
749
- /**来自父组件的传值 */
750
- FromParentQueryParams = '';
751
- set ParentQueryParams(v) {
752
- if (v) {
753
- this.FromParentQueryParams = v;
754
- }
755
- }
756
- /**表单实体 */
757
- _entity;
758
- set entity(v) {
759
- if (v) {
760
- this._entity = v;
761
- }
762
- }
763
- /**指定id的条目信息 */
764
- entrySelect = '';
765
- set parentEntrySelect(v) {
766
- if (v) {
767
- let V_extraProperties = this._CmsApiService.deepClone(this.convertExtraProperties(v.extraProperties));
768
- v.extraProperties = V_extraProperties;
769
- this.entrySelect = v;
770
- }
771
- }
772
- /**将对象中的ExtraProperties赋值到extraProperties */
773
- convertExtraProperties(obj) {
774
- for (let key in obj) {
775
- if (Array.isArray(obj[key])) {
776
- obj[key].forEach(item => {
777
- if (item.hasOwnProperty('ExtraProperties')) {
778
- item['extraProperties'] = item['ExtraProperties'];
779
- }
780
- });
781
- }
782
- }
783
- return obj;
784
- }
785
- /**别名表单实体 */
786
- get sluginput() {
787
- return this._entity.get('slug');
788
- }
789
- /**语言表单实体 */
790
- get cultureinput() {
791
- return this._entity.get('culture');
792
- }
793
- /**语言表单实体影子 */
794
- get culture_shadowInput() {
795
- return this._entity.get('culture_shadow');
796
- }
797
- /**extraProperties配置表单实体 */
798
- get extraProperties() {
799
- return this._entity.get('extraProperties');
800
- }
801
- async ngAfterContentInit() {
802
- //Called after ngOnInit when the component's or directive's content has been initialized.
803
- //Add 'implements AfterContentInit' to the class.
804
- let queryParams = this.FromParentQueryParams;
805
- if (this._entity && this.FromParentQueryParams) {
806
- this._entity.setControl('slug', new FormControl('', {
807
- validators: Validators.required,
808
- asyncValidators: this.repetitionAsyncValidator(),
809
- updateOn: 'blur'
810
- }));
811
- this._entity.setControl('culture_shadow', new FormControl('', {
812
- validators: [Validators.required],
813
- asyncValidators: this.cultureAsyncValidator_test(),
814
- }));
815
- this._entity.get('culture').disable();
816
- if (queryParams.RevisionEntryId && this.entrySelect) {
817
- this.RevisionEntryId = queryParams.RevisionEntryId;
818
- this.setEntryconfig(this.entrySelect);
819
- }
820
- else {
821
- this.setEntryconfig(queryParams);
822
- }
823
- if (this.sectionId)
824
- await this.getSectionSelect();
825
- if (this.RevisionEntryId)
826
- await this.getAllVersionsList();
827
- }
828
- }
829
- /**定义自定义异步验证 */
830
- cultureAsyncValidator_test() {
831
- return (ctrl) => {
832
- return new Promise(resolve => {
833
- let subculture = this._entity?.get('culture').value;
834
- if (subculture == this.entrySelect?.culture || this.SectionSelect.type !== 0) {
835
- resolve(null);
836
- return;
837
- }
838
- this._EntryAdminService.cultureExistWithSingleSection({
839
- culture: subculture,
840
- sectionId: this.sectionId,
841
- entryTypeId: this.entryTypeId
842
- }).subscribe(res => {
843
- if (res) {
844
- resolve({ repetition: this._LocalizationService.instant(`Cms::EntriesAlreadyExistEntryType`, this.entryTypesItem.displayName, this.languagesList.find(el => el.cultureName == subculture).displayName) });
845
- }
846
- else {
847
- resolve(null);
848
- }
849
- });
850
- });
851
- };
852
- }
853
- /**
854
- * 设置条目详情
855
- * @param {object} source - 数据源对象
856
- */
857
- setEntryconfig(source) {
858
- this.entryTypeId = source.entryTypeId;
859
- this.cultureName = source.culture || source.cultureName;
860
- this.sectionId = source.sectionId;
861
- }
862
- time = 0;
863
- /**定义自定义异步验证 */
864
- repetitionAsyncValidator() {
865
- return (ctrl) => {
866
- return new Promise(resolve => {
867
- let subslug = this._entity?.get('slug').value;
868
- if (subslug == this.entrySelect?.slug) {
869
- resolve(null);
870
- return;
871
- }
872
- this._EntryAdminService.slugExists({
873
- culture: this.cultureName,
874
- sectionId: this.sectionId,
875
- slug: subslug
876
- }).subscribe(res => {
877
- if (res) {
878
- resolve({ repetition: this._LocalizationService.instant(`Cms::EntrySlug{0}AlreadyExist`, ctrl.value) });
879
- }
880
- else {
881
- resolve(null);
882
- }
883
- });
884
- });
885
- };
886
- }
887
- /**获取版块详情 */
888
- getSectionSelect() {
889
- return new Promise((resolve, rejects) => {
890
- this._SectionAdminService.get(this.sectionId).subscribe(async (res) => {
891
- let languages = this.configState.getDeep('localization.languages');
892
- this.languagesList = languages.filter(el => res?.site?.languages.some(elr => elr.cultureName == el.cultureName));
893
- let entryTypesItem = res.entryTypes.find(el => el.id == this.entryTypeId);
894
- this.SectionSelect = res;
895
- this.entryTypesItem = entryTypesItem;
896
- this.entryTypesList = res.entryTypes.filter(el => el.id == this.entryTypeId);
897
- this._entity.patchValue({
898
- ...this.entrySelect,
899
- initialVersionId: this.entrySelect?.initialVersionId || this.RevisionEntryId || '',
900
- culture: this.cultureName,
901
- culture_shadow: this.cultureName,
902
- entryTypeId: this.entryTypeId,
903
- publishTime: this.datePipe.transform(new Date(), 'yyyy-MM-dd HH:mm:ss'),
904
- });
905
- resolve(true);
906
- });
907
- });
908
- }
909
- /**获取条目版本列表 */
910
- getAllVersionsList() {
911
- return new Promise((resolve, rejects) => {
912
- this._EntryAdminService.getAllVersions(this.RevisionEntryId).subscribe(res => {
913
- this.AllVersionsList = res.items;
914
- resolve(res);
915
- });
916
- });
917
- }
918
- /**标题转化别名 */
919
- setTitleToSlugBlur(event) {
920
- let val = event.target.value;
921
- let slug = this._entity.get('slug');
922
- let pinyinstr = '';
923
- if (slug.value)
924
- return;
925
- pinyinstr = this._CmsApiService.chineseToPinyin(val);
926
- this._entity.patchValue({
927
- slug: pinyinstr || val
928
- });
929
- }
930
- /**使用Unicode编码范围判断是否是中文字符 */
931
- isChinese(str) {
932
- return /^[\u4e00-\u9fa5]+$/.test(str);
933
- }
934
- /**激活 */
935
- ActivatedVersion(VersionId) {
936
- this._EntryAdminService.activate(VersionId).subscribe((res) => {
937
- this.AllVersionsList.forEach(el => {
938
- el.isActivatedVersion = el.id === VersionId;
939
- });
940
- return;
941
- });
942
- }
943
- /**编辑版本 */
944
- toEditUrl(id) {
945
- this.router.navigateByUrl('', { skipLocationChange: true }).then(() => {
946
- this.router.navigate([`/cms/admin/entries/${id}/edit`]);
947
- });
948
- }
949
- /**删除版本 */
950
- delectVersion(vid) {
951
- this._EntryAdminService.delete(vid).subscribe(res => {
952
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
953
- this.getAllVersionsList();
954
- });
955
- }
956
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditEntriesComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i1.ConfigStateService }, { token: SectionAdminService }, { token: EntryAdminService }, { token: i2.DatePipe }, { token: i1.LocalizationService }, { token: i3$1.Router }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component });
957
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: { isEdit: "isEdit", ParentQueryParams: "ParentQueryParams", entity: "entity", parentEntrySelect: "parentEntrySelect" }, ngImport: i0, template: "<div class=\"create-or-edit-entry-page\" [formGroup]=\"_entity\">\n <div class=\"container \">\n <div class=\"row\">\n <div class=\"col-md-8 \">\n <div class=\"card p-2\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"title\">{{'Cms::Title' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" (blur)=\"setTitleToSlugBlur($event)\"\n formControlName=\"title\">\n </div>\n <ng-container *ngFor=\"let item of entryTypesItem?.fieldTabs\">\n <ng-container *ngFor=\"let el of item.fields\">\n <ng-container *ngIf=\"el&&_entity\">\n <df-dynamic [entity]=\"_entity\" [fields]=\"el\"\n [selected]=\"entrySelect ? entrySelect.extraProperties[el.field.name] : ''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureinput.value\" ></df-dynamic>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-4 \">\n <div class=\"card mb-0 p-2\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"slug\">{{'Cms::Slug' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\" >\n <div class=\"text-danger invalid-feedback\" *ngIf=\"sluginput.errors?.repetition\">\n {{sluginput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"culture\">{{'AbpUi::Languages' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"culture\" >\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\n </ng-container>\n </select>\n <input type=\"text\" formControlName=\"culture_shadow\" style=\"position: absolute;z-index: -1;opacity: 0;\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"culture_shadowInput.errors?.repetition\">\n {{culture_shadowInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"parentId\">\n <option value=\"\"></option>\n <ng-container *ngFor=\"let item of entryTypesList;let i =index\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\n </div>\n <!-- RevisionEntryId -->\n <div class=\"mb-2\" *ngIf=\"isEdit\">\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::Version' | abpLocalization}}</label>\n <ul class=\"list-group\">\n <ng-container *ngFor=\"let item of AllVersionsList\">\n <li class=\"list-group-item flex-between\">\n <div>\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd HH:m:s'):('Cms::InitialVersion' | abpLocalization)}}\n <span class=\"badge text-bg-success ms-1\"\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\n <span class=\"badge text-bg-primary ms-1\"\n *ngIf=\"item.id === RevisionEntryId\">{{'Cms::Editing' | abpLocalization}}</span>\n </div>\n <div>\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\n (click)=\"ActivatedVersion(item.id)\">\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' | abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\"\n routerLink=\"/cms/admin/entries/create\"\n [queryParams]=\"{RevisionEntryId:item.id}\">\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' | abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\n *ngIf=\"item.id !== RevisionEntryId\">\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"delectVersion(item.id)\"\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== RevisionEntryId\">\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' | abpLocalization}}\n </button>\n </div>\n </div>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["::ng-deep .create-or-edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .create-or-edit-entry-page .form-control,::ng-deep .create-or-edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}::ng-deep .create-or-edit-entry-page .flex-between{display:flex;align-items:center;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i7$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "component", type: i11.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
958
- }
959
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditEntriesComponent, decorators: [{
960
- type: Component,
961
- args: [{ selector: 'cms-create-or-edit-entries', template: "<div class=\"create-or-edit-entry-page\" [formGroup]=\"_entity\">\n <div class=\"container \">\n <div class=\"row\">\n <div class=\"col-md-8 \">\n <div class=\"card p-2\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"title\">{{'Cms::Title' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" (blur)=\"setTitleToSlugBlur($event)\"\n formControlName=\"title\">\n </div>\n <ng-container *ngFor=\"let item of entryTypesItem?.fieldTabs\">\n <ng-container *ngFor=\"let el of item.fields\">\n <ng-container *ngIf=\"el&&_entity\">\n <df-dynamic [entity]=\"_entity\" [fields]=\"el\"\n [selected]=\"entrySelect ? entrySelect.extraProperties[el.field.name] : ''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureinput.value\" ></df-dynamic>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-4 \">\n <div class=\"card mb-0 p-2\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"slug\">{{'Cms::Slug' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\" >\n <div class=\"text-danger invalid-feedback\" *ngIf=\"sluginput.errors?.repetition\">\n {{sluginput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"culture\">{{'AbpUi::Languages' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"culture\" >\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\n </ng-container>\n </select>\n <input type=\"text\" formControlName=\"culture_shadow\" style=\"position: absolute;z-index: -1;opacity: 0;\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"culture_shadowInput.errors?.repetition\">\n {{culture_shadowInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"parentId\">\n <option value=\"\"></option>\n <ng-container *ngFor=\"let item of entryTypesList;let i =index\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\n </div>\n <!-- RevisionEntryId -->\n <div class=\"mb-2\" *ngIf=\"isEdit\">\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::Version' | abpLocalization}}</label>\n <ul class=\"list-group\">\n <ng-container *ngFor=\"let item of AllVersionsList\">\n <li class=\"list-group-item flex-between\">\n <div>\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd HH:m:s'):('Cms::InitialVersion' | abpLocalization)}}\n <span class=\"badge text-bg-success ms-1\"\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\n <span class=\"badge text-bg-primary ms-1\"\n *ngIf=\"item.id === RevisionEntryId\">{{'Cms::Editing' | abpLocalization}}</span>\n </div>\n <div>\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\n (click)=\"ActivatedVersion(item.id)\">\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' | abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\"\n routerLink=\"/cms/admin/entries/create\"\n [queryParams]=\"{RevisionEntryId:item.id}\">\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' | abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\n *ngIf=\"item.id !== RevisionEntryId\">\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"delectVersion(item.id)\"\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== RevisionEntryId\">\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' | abpLocalization}}\n </button>\n </div>\n </div>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["::ng-deep .create-or-edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .create-or-edit-entry-page .form-control,::ng-deep .create-or-edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}::ng-deep .create-or-edit-entry-page .flex-between{display:flex;align-items:center;justify-content:space-between}\n"] }]
962
- }], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i1.ConfigStateService }, { type: SectionAdminService }, { type: EntryAdminService }, { type: i2.DatePipe }, { type: i1.LocalizationService }, { type: i3$1.Router }, { type: CmsApiService }]; }, propDecorators: { isEdit: [{
963
- type: Input
964
- }], ParentQueryParams: [{
965
- type: Input
966
- }], entity: [{
967
- type: Input
968
- }], parentEntrySelect: [{
969
- type: Input
970
- }] } });
971
-
972
- class CreateComponent {
973
- toaster;
974
- _location;
975
- route;
976
- _EntryAdminService;
977
- _LocalizationService;
978
- router;
979
- constructor(toaster, _location, route, _EntryAdminService, _LocalizationService, router) {
980
- this.toaster = toaster;
981
- this._location = _location;
982
- this.route = route;
983
- this._EntryAdminService = _EntryAdminService;
984
- this._LocalizationService = _LocalizationService;
985
- this.router = router;
986
- }
987
- fb = inject(FormBuilder);
988
- _updateListService = inject(UpdateListService);
989
- /**表单实体 */
990
- newEntity;
991
- /**是否是草稿 */
992
- draftType = false;
993
- /**页面传值用于传递到子组件 */
994
- queryParams = '';
995
- /**指定id的条目信息 */
996
- entrySelect = '';
997
- /**获取提交按钮替身,用于真实触发表单提交 */
998
- submitclick;
999
- async ngOnInit() {
1000
- this.queryParams = this.route.snapshot.queryParams;
1001
- this.newEntity = this.fb.group(new CreateOrUpdateEntryInputBase());
1002
- if (this.queryParams.RevisionEntryId)
1003
- await this.getEntrySelect();
1004
- }
1005
- /**获取条目信息 */
1006
- getEntrySelect() {
1007
- return new Promise((resolve, rejects) => {
1008
- this._EntryAdminService.get(this.queryParams.RevisionEntryId).subscribe(res => {
1009
- this.entrySelect = res;
1010
- resolve(res);
1011
- });
1012
- });
1013
- }
1014
- /**保存 */
1015
- save(draft) {
1016
- this.newEntity.patchValue({
1017
- draft: draft
1018
- });
1019
- let input = this.newEntity.value;
1020
- input.publishTime = new Date(new Date(input.publishTime).getTime() + (8 * 60 * 60 * 1000)).toISOString();
1021
- input.culture = this.newEntity.get('culture').value;
1022
- if (!this.newEntity.valid)
1023
- return;
1024
- this._EntryAdminService.create(input).subscribe(res => {
1025
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
1026
- this.router.navigateByUrl('', { skipLocationChange: true }).then(() => {
1027
- this.router.navigate([`/cms/admin/entries`]);
1028
- this._updateListService.updateList();
1029
- });
1030
- });
1031
- }
1032
- /**触发点击按钮替身 */
1033
- clickSubmit(type) {
1034
- this.draftType = type;
1035
- this.submitclick.nativeElement.click();
1036
- }
1037
- /**返回上一页 */
1038
- backTo() {
1039
- this._location.back();
1040
- }
1041
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i3$1.ActivatedRoute }, { token: EntryAdminService }, { token: i1.LocalizationService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component });
1042
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateComponent, selector: "cms-create", providers: [
1043
- {
1044
- provide: EXTENSIONS_IDENTIFIER,
1045
- useValue: ECmsComponent.Entries_Create,
1046
- },
1047
- ], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save(draftType)\">\n <abp-page [title]=\"'Cms::New'| abpLocalization\" [toolbar]=\"true\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <ng-container *ngIf=\"entrySelect; else elseTemplate\">\n <cms-create-or-edit-entries [entity]=\"newEntity\" [ParentQueryParams]=\"queryParams\"\n [parentEntrySelect]=\"entrySelect\" ></cms-create-or-edit-entries>\n </ng-container>\n <ng-template #elseTemplate>\n <cms-create-or-edit-entries [entity]=\"newEntity\"\n [ParentQueryParams]=\"queryParams\" ></cms-create-or-edit-entries>\n </ng-template>\n </abp-page>\n</form>", styles: ["::ng-deep .create-or-edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .create-or-edit-entry-page .form-control,::ng-deep .create-or-edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i9.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: ["isEdit", "ParentQueryParams", "entity", "parentEntrySelect"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
1048
- }
1049
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateComponent, decorators: [{
1050
- type: Component,
1051
- args: [{ selector: 'cms-create', providers: [
1052
- {
1053
- provide: EXTENSIONS_IDENTIFIER,
1054
- useValue: ECmsComponent.Entries_Create,
1055
- },
1056
- ], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save(draftType)\">\n <abp-page [title]=\"'Cms::New'| abpLocalization\" [toolbar]=\"true\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <ng-container *ngIf=\"entrySelect; else elseTemplate\">\n <cms-create-or-edit-entries [entity]=\"newEntity\" [ParentQueryParams]=\"queryParams\"\n [parentEntrySelect]=\"entrySelect\" ></cms-create-or-edit-entries>\n </ng-container>\n <ng-template #elseTemplate>\n <cms-create-or-edit-entries [entity]=\"newEntity\"\n [ParentQueryParams]=\"queryParams\" ></cms-create-or-edit-entries>\n </ng-template>\n </abp-page>\n</form>", styles: ["::ng-deep .create-or-edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .create-or-edit-entry-page .form-control,::ng-deep .create-or-edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}\n"] }]
1057
- }], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: EntryAdminService }, { type: i1.LocalizationService }, { type: i3$1.Router }]; }, propDecorators: { submitclick: [{
1058
- type: ViewChild,
1059
- args: ['submitclick', { static: true }]
1060
- }] } });
1061
-
1062
- class EditComponent {
1063
- toaster;
1064
- _location;
1065
- route;
1066
- _EntryAdminService;
1067
- router;
1068
- _LocalizationService;
1069
- _CmsApiService;
1070
- constructor(toaster, _location, route, _EntryAdminService, router, _LocalizationService, _CmsApiService) {
1071
- this.toaster = toaster;
1072
- this._location = _location;
1073
- this.route = route;
1074
- this._EntryAdminService = _EntryAdminService;
1075
- this.router = router;
1076
- this._LocalizationService = _LocalizationService;
1077
- this._CmsApiService = _CmsApiService;
1078
- }
1079
- fb = inject(FormBuilder);
1080
- _updateListService = inject(UpdateListService);
1081
- /**表单实体 */
1082
- newEntity;
1083
- /**是否是草稿 */
1084
- draftType = false;
1085
- /**页面传值用于传递到子组件 */
1086
- queryParams = '' || {};
1087
- /**指定id的条目信息 */
1088
- entrySelect = '';
1089
- /**获取提交按钮替身,用于真实触发表单提交 */
1090
- submitclick;
1091
- async ngOnInit() {
1092
- this.queryParams.RevisionEntryId = this.route.snapshot.params.entrieId;
1093
- this.newEntity = this.fb.group(new CreateOrUpdateEntryInputBase());
1094
- await this.getEntrySelect();
1095
- }
1096
- /**获取条目信息 */
1097
- getEntrySelect() {
1098
- return new Promise((resolve, rejects) => {
1099
- this._EntryAdminService.get(this.queryParams.RevisionEntryId).subscribe(res => {
1100
- this.entrySelect = res;
1101
- resolve(res);
1102
- });
1103
- });
1104
- }
1105
- /**保存 */
1106
- save(draft) {
1107
- this.newEntity.patchValue({
1108
- draft: draft
1109
- });
1110
- let input = this.newEntity.value;
1111
- input.publishTime = new Date(new Date(input.publishTime).getTime() + (8 * 60 * 60 * 1000)).toISOString();
1112
- input.culture = this.newEntity.get('culture').value;
1113
- input.concurrencyStamp = this.entrySelect.concurrencyStamp;
1114
- if (!this.newEntity.valid)
1115
- return;
1116
- this._EntryAdminService.update(this.entrySelect.id, input).subscribe(res => {
1117
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
1118
- this.router.navigateByUrl('', { skipLocationChange: true }).then(() => {
1119
- this.router.navigate([`/cms/admin/entries`]);
1120
- this._updateListService.updateList();
1121
- });
1122
- });
1123
- }
1124
- /**触发点击按钮替身 */
1125
- clickSubmit(type) {
1126
- this.draftType = type;
1127
- this.submitclick.nativeElement.click();
1128
- }
1129
- /**返回上一页 */
1130
- backTo() {
1131
- this._location.back();
1132
- }
1133
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i3$1.ActivatedRoute }, { token: EntryAdminService }, { token: i3$1.Router }, { token: i1.LocalizationService }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component });
1134
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EditComponent, selector: "cms-edit", providers: [
1135
- {
1136
- provide: EXTENSIONS_IDENTIFIER,
1137
- useValue: ECmsComponent.Entries_Edit,
1138
- },
1139
- ], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save(draftType)\">\n <abp-page [title]=\"'AbpUi::Edit'| abpLocalization\" [toolbar]=\"true\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <ng-container *ngIf=\"entrySelect\">\n <cms-create-or-edit-entries [entity]=\"newEntity\" [ParentQueryParams]=\"queryParams\" [parentEntrySelect]=\"entrySelect\" [isEdit]=\"true\"></cms-create-or-edit-entries>\n </ng-container>\n </abp-page>\n</form>\n\n", styles: ["::ng-deep .edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .edit-entry-page .form-control,::ng-deep .edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .edit-entry-page .cursor-move{cursor:move}::ng-deep .edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}::ng-deep .edit-entry-page .flex-between{display:flex;align-items:center;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i9.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: ["isEdit", "ParentQueryParams", "entity", "parentEntrySelect"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
1140
- }
1141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditComponent, decorators: [{
1142
- type: Component,
1143
- args: [{ selector: 'cms-edit', providers: [
1144
- {
1145
- provide: EXTENSIONS_IDENTIFIER,
1146
- useValue: ECmsComponent.Entries_Edit,
1147
- },
1148
- ], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save(draftType)\">\n <abp-page [title]=\"'AbpUi::Edit'| abpLocalization\" [toolbar]=\"true\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <ng-container *ngIf=\"entrySelect\">\n <cms-create-or-edit-entries [entity]=\"newEntity\" [ParentQueryParams]=\"queryParams\" [parentEntrySelect]=\"entrySelect\" [isEdit]=\"true\"></cms-create-or-edit-entries>\n </ng-container>\n </abp-page>\n</form>\n\n", styles: ["::ng-deep .edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .edit-entry-page .form-control,::ng-deep .edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .edit-entry-page .cursor-move{cursor:move}::ng-deep .edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}::ng-deep .edit-entry-page .flex-between{display:flex;align-items:center;justify-content:space-between}\n"] }]
1149
- }], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: EntryAdminService }, { type: i3$1.Router }, { type: i1.LocalizationService }, { type: CmsApiService }]; }, propDecorators: { submitclick: [{
1150
- type: ViewChild,
1151
- args: ['submitclick', { static: true }]
1152
- }] } });
1153
-
1154
- class FieldAdminService {
1155
- restService;
1156
- apiName = 'CmsAdmin';
1157
- create = (input, config) => this.restService.request({
1158
- method: 'POST',
1159
- url: '/api/cms-admin/fields',
1160
- body: input,
1161
- }, { apiName: this.apiName, ...config });
1162
- delete = (id, config) => this.restService.request({
1163
- method: 'DELETE',
1164
- url: `/api/cms-admin/fields/${id}`,
1165
- }, { apiName: this.apiName, ...config });
1166
- get = (id, config) => this.restService.request({
1167
- method: 'GET',
1168
- url: `/api/cms-admin/fields/${id}`,
1169
- }, { apiName: this.apiName, ...config });
1170
- getList = (input, config) => this.restService.request({
1171
- method: 'GET',
1172
- url: '/api/cms-admin/fields',
1173
- params: { filter: input.filter, groupId: input.groupId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
1174
- }, { apiName: this.apiName, ...config });
1175
- nameExists = (name, config) => this.restService.request({
1176
- method: 'GET',
1177
- url: `/api/cms-admin/fields/name-exists/${name}`,
1178
- }, { apiName: this.apiName, ...config });
1179
- update = (id, input, config) => this.restService.request({
1180
- method: 'PUT',
1181
- url: `/api/cms-admin/fields/${id}`,
1182
- body: input,
1183
- }, { apiName: this.apiName, ...config });
1184
- constructor(restService) {
1185
- this.restService = restService;
1186
- }
1187
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
1188
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAdminService, providedIn: 'root' });
1189
- }
1190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAdminService, decorators: [{
1191
- type: Injectable,
1192
- args: [{
1193
- providedIn: 'root',
1194
- }]
1195
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
1196
-
1197
- var index$n = /*#__PURE__*/Object.freeze({
1198
- __proto__: null,
1199
- FieldAdminService: FieldAdminService,
1200
- FieldGroupAdminService: FieldGroupAdminService
1201
- });
1202
-
1203
- class FieldGroupComponent {
1204
- fb;
1205
- _FieldGroupAdminService;
1206
- toaster;
1207
- confirmation;
1208
- _FieldAbstractsService;
1209
- _LocalizationService;
1210
- constructor(fb, _FieldGroupAdminService, toaster, confirmation, _FieldAbstractsService, _LocalizationService) {
1211
- this.fb = fb;
1212
- this._FieldGroupAdminService = _FieldGroupAdminService;
1213
- this.toaster = toaster;
1214
- this.confirmation = confirmation;
1215
- this._FieldAbstractsService = _FieldAbstractsService;
1216
- this._LocalizationService = _LocalizationService;
1217
- }
1218
- /**创建分组表单 */
1219
- createForm;
1220
- /** 编辑分组表单*/
1221
- editGroupForm;
1222
- /**表单已存在的值 */
1223
- selected = {};
1224
- /**选择的字段分组id */
1225
- fieldGroupId = '';
1226
- /**创建分组模态框状态 */
1227
- createGroupOpen = false;
1228
- /**用于确定模态的繁忙状态是否为真 */
1229
- modalBusy = false;
1230
- /**编辑分组模态框状态 */
1231
- editGroupOpen = false;
1232
- /**点击分组回调 */
1233
- OnGroupClickBack = new EventEmitter();
1234
- ngOnInit() {
1235
- this._FieldAbstractsService.getfieldGroupList();
1236
- }
1237
- /**创建字段分组 */
1238
- createGroupBtn() {
1239
- this.createGroupOpen = true;
1240
- this.createForm = this.fb.group({
1241
- name: ['', [Validators.required]],
1242
- });
1243
- }
1244
- /**创建分组模态框状态改变 */
1245
- createGroupVisibleChange(event) {
1246
- if (!event) {
1247
- return;
1248
- }
1249
- }
1250
- /**编辑字段分组 */
1251
- editGroupBtn(itemName) {
1252
- this.editGroupOpen = true;
1253
- this.editGroupForm = this.fb.group({
1254
- name: [itemName, [Validators.required]],
1255
- });
1256
- }
1257
- /**编辑分组模态框状态改变 */
1258
- editGroupVisibleChange(event) {
1259
- if (!event) {
1260
- return;
1261
- }
1262
- }
1263
- /**创建字段分组保存 */
1264
- createSave() {
1265
- let input = this.createForm.value;
1266
- this.modalBusy = true;
1267
- this._FieldGroupAdminService.create(input).pipe(finalize(() => {
1268
- this.modalBusy = false;
1269
- this.createGroupOpen = false;
1270
- })).subscribe(res => {
1271
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
1272
- this._FieldAbstractsService.getfieldGroupList();
1273
- });
1274
- }
1275
- /**编辑字段分组保存 */
1276
- editSave() {
1277
- let input = this.editGroupForm.value;
1278
- this.modalBusy = true;
1279
- this._FieldGroupAdminService.update(this.fieldGroupId, input).pipe(finalize(() => {
1280
- this.modalBusy = false;
1281
- this.editGroupOpen = false;
1282
- })).subscribe(res => {
1283
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
1284
- this._FieldAbstractsService.getfieldGroupList();
1285
- });
1286
- }
1287
- /**删除字段分组1 */
1288
- deleteGroupbtn(fieldGroupitem) {
1289
- this.confirmation.warn(fieldGroupitem.name, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`)).subscribe((status) => {
1290
- if (status == 'confirm') {
1291
- this._FieldGroupAdminService.delete(this.fieldGroupId).pipe(finalize(() => {
1292
- })).subscribe(res => {
1293
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
1294
- this.fieldGroupId = '';
1295
- this._FieldAbstractsService.getfieldGroupList();
1296
- });
1297
- }
1298
- });
1299
- }
1300
- /**字段分组改变 */
1301
- fieldGroupChange(event) {
1302
- this.fieldGroupId = event;
1303
- this.OnGroupClickBack.emit(event);
1304
- }
1305
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldGroupComponent, deps: [{ token: i1$1.FormBuilder }, { token: FieldGroupAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: FieldAbstractsService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1306
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FieldGroupComponent, selector: "cms-field-group", outputs: { OnGroupClickBack: "OnGroupClickBack" }, ngImport: i0, template: "<div class=\"card-header px-2 py-sm-2 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0\">{{'Cms::FieldGroup' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-link btn-sm ms-2\"><i class=\"fas fa-plus-circle\" aria-hidden=\"true\"\n (click)=\"createGroupBtn()\"></i></button>\n</div>\n<div class=\"card-body p-0\">\n <div class=\"container-height overflow-auto\">\n <ul class=\"list-group list-group-flush\">\n <li class=\"list-group-item list-group-item-action active\" [class.active]=\"fieldGroupId===''\"\n (click)=\"fieldGroupChange('')\">{{'Cms::AllFields' | abpLocalization}}</li>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <li class=\"list-group-item list-group-item-action d-flex justify-content-between align-items-center\"\n [class.active]=\"fieldGroupId===item.id\" (click)=\"fieldGroupChange(item.id)\">\n <div>{{item.name}}</div>\n <div *ngIf=\"fieldGroupId===item.id\">\n <i class=\"fas fa-trash px-1\" role=\"button\" (click.stop)=\"deleteGroupbtn(item)\"></i>\n <i class=\"fas fa-edit px-1\" role=\"button\" (click.stop)=\"editGroupBtn(item.name)\"></i>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"createGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'Cms::New' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"createForm; else loaderRef\" [formGroup]=\"createForm\" (ngSubmit)=\"createSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"createForm?.invalid\" (click)=\"createSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-modal [(visible)]=\"editGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"editGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"editGroupForm; else loaderRef\" [formGroup]=\"editGroupForm\" (ngSubmit)=\"editSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"editGroupForm?.invalid\" (click)=\"editSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i7$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
1307
- }
1308
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldGroupComponent, decorators: [{
1309
- type: Component,
1310
- args: [{ selector: 'cms-field-group', template: "<div class=\"card-header px-2 py-sm-2 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0\">{{'Cms::FieldGroup' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-link btn-sm ms-2\"><i class=\"fas fa-plus-circle\" aria-hidden=\"true\"\n (click)=\"createGroupBtn()\"></i></button>\n</div>\n<div class=\"card-body p-0\">\n <div class=\"container-height overflow-auto\">\n <ul class=\"list-group list-group-flush\">\n <li class=\"list-group-item list-group-item-action active\" [class.active]=\"fieldGroupId===''\"\n (click)=\"fieldGroupChange('')\">{{'Cms::AllFields' | abpLocalization}}</li>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <li class=\"list-group-item list-group-item-action d-flex justify-content-between align-items-center\"\n [class.active]=\"fieldGroupId===item.id\" (click)=\"fieldGroupChange(item.id)\">\n <div>{{item.name}}</div>\n <div *ngIf=\"fieldGroupId===item.id\">\n <i class=\"fas fa-trash px-1\" role=\"button\" (click.stop)=\"deleteGroupbtn(item)\"></i>\n <i class=\"fas fa-edit px-1\" role=\"button\" (click.stop)=\"editGroupBtn(item.name)\"></i>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"createGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'Cms::New' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"createForm; else loaderRef\" [formGroup]=\"createForm\" (ngSubmit)=\"createSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"createForm?.invalid\" (click)=\"createSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-modal [(visible)]=\"editGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"editGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"editGroupForm; else loaderRef\" [formGroup]=\"editGroupForm\" (ngSubmit)=\"editSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"editGroupForm?.invalid\" (click)=\"editSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>" }]
1311
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: FieldGroupAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: FieldAbstractsService }, { type: i1.LocalizationService }]; }, propDecorators: { OnGroupClickBack: [{
1312
- type: Output
1313
- }] } });
1314
-
1315
- class FieldsComponent {
1316
- list;
1317
- _FieldAdminService;
1318
- toaster;
1319
- confirmation;
1320
- _LocalizationService;
1321
- router;
1322
- _CmsApiService;
1323
- constructor(list, _FieldAdminService, toaster, confirmation, _LocalizationService, router, _CmsApiService) {
1324
- this.list = list;
1325
- this._FieldAdminService = _FieldAdminService;
1326
- this.toaster = toaster;
1327
- this.confirmation = confirmation;
1328
- this._LocalizationService = _LocalizationService;
1329
- this.router = router;
1330
- this._CmsApiService = _CmsApiService;
1331
- }
1332
- _UpdateListService = inject(UpdateListService);
1333
- /**表格单元格布局类型 */
1334
- ColumnMode = ColumnMode;
1335
- /**表格数据 */
1336
- data = {
1337
- items: [],
1338
- totalCount: 0,
1339
- };
1340
- /**过滤器 */
1341
- filters = {};
1342
- ngOnInit() {
1343
- this.hookToQuery();
1344
- this._UpdateListService.updateListEvent.subscribe(() => {
1345
- this.list.get();
1346
- });
1347
- }
1348
- getData() {
1349
- this.list.get();
1350
- }
1351
- /**字段分组选择回调 */
1352
- fieldGroupChange(event) {
1353
- this.filters.groupId = event;
1354
- this.list.page = 0;
1355
- this.list.get();
1356
- }
1357
- /**使用abp的list获取表格的字段数据列表 */
1358
- hookToQuery() {
1359
- const getData = (query) => this._FieldAdminService.getList({
1360
- ...query,
1361
- ...this.filters,
1362
- });
1363
- const setData = (list) => (this.data = list);
1364
- this.list.hookToQuery(getData).subscribe(setData);
1365
- }
1366
- /**新建字段按钮 */
1367
- toFieldsCreateBtn() {
1368
- this.router.navigate(['/cms/admin/fields/create'], {
1369
- queryParams: {}
1370
- });
1371
- }
1372
- /**删除字段 */
1373
- deletefield(row) {
1374
- this.confirmation.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`)).subscribe((status) => {
1375
- if (status == 'confirm') {
1376
- this._FieldAdminService.delete(row.id).pipe(finalize(() => {
1377
- })).subscribe(res => {
1378
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
1379
- this.list.get();
1380
- });
1381
- }
1382
- });
1383
- }
1384
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldsComponent, deps: [{ token: i1.ListService }, { token: FieldAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1.LocalizationService }, { token: i3$1.Router }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component });
1385
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FieldsComponent, selector: "cms-fields", providers: [
1386
- // [Required]
1387
- ListService,
1388
- // [Optional]
1389
- // Provide this token if you want a different debounce time.
1390
- // Default is 300. Cannot be 0. Any value below 100 is not recommended.
1391
- { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
1392
- {
1393
- provide: EXTENSIONS_IDENTIFIER,
1394
- useValue: ECmsComponent.Fields,
1395
- },
1396
- ], ngImport: i0, template: "<abp-page [title]=\"'Cms::Fields' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"fields-page\">\n <div class=\"row \">\n <div class=\"col-3\">\n <div class=\"card mb-0\" style=\"height: 100%;\">\n <cms-field-group (OnGroupClickBack)=\"fieldGroupChange($event)\"></cms-field-group>\n </div>\n </div>\n <div class=\"col-9\">\n <div class=\"card mb-0\">\n <div class=\"card-header px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\"\n (click)=\"list.get()\"><i class=\"fa fa-search\"></i></button>\n </div>\n </div>\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\"\n [count]=\"data.totalCount\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::FormControlName' | abpLocalization\"\n prop=\"formControlName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Group' | abpLocalization\" prop=\"groupId\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{row.groupName}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value|date:'YYYY/MM/dd HH:m:s' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm\"\n ngbDropdownToggle> {{'AbpUi::Actions' | abpLocalization}}</button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n routerLink=\"/cms/admin/fields/{{row.id}}/edit\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"deletefield(row)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</abp-page>", styles: ["::ng-deep .fields-page .dignite_page{background:transparent}::ng-deep .fields-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .fields-page .container-height{height:calc(100vh - 200px)}\n"], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i7.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i7.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i7.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "component", type: i9.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: FieldGroupComponent, selector: "cms-field-group", outputs: ["OnGroupClickBack"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
1397
- }
1398
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldsComponent, decorators: [{
1399
- type: Component,
1400
- args: [{ selector: 'cms-fields', providers: [
1401
- // [Required]
1402
- ListService,
1403
- // [Optional]
1404
- // Provide this token if you want a different debounce time.
1405
- // Default is 300. Cannot be 0. Any value below 100 is not recommended.
1406
- { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
1407
- {
1408
- provide: EXTENSIONS_IDENTIFIER,
1409
- useValue: ECmsComponent.Fields,
1410
- },
1411
- ], template: "<abp-page [title]=\"'Cms::Fields' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"fields-page\">\n <div class=\"row \">\n <div class=\"col-3\">\n <div class=\"card mb-0\" style=\"height: 100%;\">\n <cms-field-group (OnGroupClickBack)=\"fieldGroupChange($event)\"></cms-field-group>\n </div>\n </div>\n <div class=\"col-9\">\n <div class=\"card mb-0\">\n <div class=\"card-header px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\"\n (click)=\"list.get()\"><i class=\"fa fa-search\"></i></button>\n </div>\n </div>\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\"\n [count]=\"data.totalCount\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::FormControlName' | abpLocalization\"\n prop=\"formControlName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Group' | abpLocalization\" prop=\"groupId\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{row.groupName}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value|date:'YYYY/MM/dd HH:m:s' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm\"\n ngbDropdownToggle> {{'AbpUi::Actions' | abpLocalization}}</button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n routerLink=\"/cms/admin/fields/{{row.id}}/edit\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"deletefield(row)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</abp-page>", styles: ["::ng-deep .fields-page .dignite_page{background:transparent}::ng-deep .fields-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .fields-page .container-height{height:calc(100vh - 200px)}\n"] }]
1412
- }], ctorParameters: function () { return [{ type: i1.ListService }, { type: FieldAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.LocalizationService }, { type: i3$1.Router }, { type: CmsApiService }]; } });
1413
-
1414
- class CreateOrUpdateFieldInputBase {
1415
- /**分组id */
1416
- groupId = ['', []];
1417
- /**字段名称 Display name of this field */
1418
- displayName = ['', [Validators.required]];
1419
- /**字段唯一名称 Unique Name*/
1420
- name = ['', [Validators.required]];
1421
- /**描述 说明 */
1422
- description = ['', []];
1423
- /**FieldType字段类型 表单控件名称 */
1424
- formControlName = [undefined, [Validators.required]];
1425
- /**动态表单配置 */
1426
- formConfiguration = new FormGroup({});
1427
- constructor(data) {
1428
- if (data) {
1429
- for (const key in data) {
1430
- if (data.hasOwnProperty(key)) {
1431
- this[key] = data[key];
1432
- }
1433
- }
1434
- }
1435
- }
1436
- }
1437
-
1438
- class CreateOrEditFieldComponent {
1439
- _FieldAbstractsService;
1440
- _CmsApiService;
1441
- _FieldAdminService;
1442
- _LocalizationService;
1443
- constructor(_FieldAbstractsService, _CmsApiService, _FieldAdminService, _LocalizationService) {
1444
- this._FieldAbstractsService = _FieldAbstractsService;
1445
- this._CmsApiService = _CmsApiService;
1446
- this._FieldAdminService = _FieldAdminService;
1447
- this._LocalizationService = _LocalizationService;
1448
- if (this._FieldAbstractsService.fieldGroupList.length == 0) {
1449
- this._FieldAbstractsService.getfieldGroupList();
1450
- }
1451
- }
1452
- /**表单实体 */
1453
- _Entity;
1454
- set Entity(v) {
1455
- this._Entity = v;
1456
- if (v)
1457
- this.dataLoaded();
1458
- }
1459
- get formControlName() {
1460
- return this._Entity.get('formControlName');
1461
- }
1462
- /**选择的表单信息 */
1463
- _selected_copy;
1464
- _selected;
1465
- set selected(v) {
1466
- if (!v)
1467
- return;
1468
- this._selected = v || '';
1469
- this._selected_copy = v;
1470
- }
1471
- async dataLoaded() {
1472
- if (this._FieldAbstractsService.fromControlList.length == 0) {
1473
- await this._FieldAbstractsService.getFromControlList();
1474
- }
1475
- if (this._Entity) {
1476
- if (!this.formControlName.value) {
1477
- this._Entity.patchValue({
1478
- formControlName: this._FieldAbstractsService.fromControlList[0]?.name,
1479
- });
1480
- }
1481
- this._Entity.setControl('name', new FormControl(this.nameInput.value || '', {
1482
- validators: Validators.required,
1483
- asyncValidators: [this.repetitionAsyncValidator()],
1484
- updateOn: 'blur'
1485
- }));
1486
- }
1487
- }
1488
- /**name表单控件 */
1489
- get nameInput() {
1490
- return this._Entity.get('name');
1491
- }
1492
- nameInputBlur(event) {
1493
- let value = event.target.value;
1494
- this.nameInput.patchValue(value);
1495
- }
1496
- /**字段标签input失去标点生成字段名字 */
1497
- disPlayNameInputBlur(event) {
1498
- let value = event.target.value;
1499
- let pinyin = this._CmsApiService.chineseToPinyin(value);
1500
- let nameInput = this.nameInput;
1501
- if (nameInput.value)
1502
- return;
1503
- nameInput.patchValue(pinyin);
1504
- }
1505
- /**定义异步验证方法 */
1506
- repetitionAsyncValidator() {
1507
- return (ctrl) => {
1508
- return new Promise(resolve => {
1509
- if (ctrl.value == this._selected?.name || !ctrl.value) {
1510
- resolve(null);
1511
- return;
1512
- }
1513
- this._FieldAdminService.nameExists(ctrl.value).subscribe(res => {
1514
- if (res) {
1515
- resolve({ repetition: this._LocalizationService.instant(`Cms::FieldName{0}AlreadyExist`, ctrl.value) });
1516
- }
1517
- else {
1518
- resolve(null);
1519
- }
1520
- });
1521
- });
1522
- };
1523
- }
1524
- formControlNameChange() {
1525
- }
1526
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditFieldComponent, deps: [{ token: FieldAbstractsService }, { token: CmsApiService }, { token: FieldAdminService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1527
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: { Entity: "Entity", selected: "selected" }, ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"groupId\">{{'Cms::FieldGroup' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"groupId\">\n <option value=\"\">{{'Cms::OptionalGrouping' | abpLocalization}}</option>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <option [value]=\"item.id\">{{item.name}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"displayName\">{{'DigniteAbpForms::FieldDisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" (blur)=\"disPlayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"name\">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" (input)=\"nameInputBlur($event)\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">{{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"formControlNameChange()\">\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fromControlList;let i =index\">\n <option [value]=\"item.name\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"_Entity.value.formControlName&&_Entity\">\n <df-dynamic [type]=\"_Entity.value.formControlName\" [entity]=\"_Entity\" [selected]=\"_selected\"></df-dynamic>\n </ng-container>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i7$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i11.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
1528
- }
1529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditFieldComponent, decorators: [{
1530
- type: Component,
1531
- args: [{ selector: 'cms-create-or-edit-field', template: "<form [formGroup]=\"_Entity\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"groupId\">{{'Cms::FieldGroup' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"groupId\">\n <option value=\"\">{{'Cms::OptionalGrouping' | abpLocalization}}</option>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <option [value]=\"item.id\">{{item.name}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"displayName\">{{'DigniteAbpForms::FieldDisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" (blur)=\"disPlayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"name\">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" (input)=\"nameInputBlur($event)\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">{{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"formControlNameChange()\">\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fromControlList;let i =index\">\n <option [value]=\"item.name\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"_Entity.value.formControlName&&_Entity\">\n <df-dynamic [type]=\"_Entity.value.formControlName\" [entity]=\"_Entity\" [selected]=\"_selected\"></df-dynamic>\n </ng-container>\n</form>" }]
1532
- }], ctorParameters: function () { return [{ type: FieldAbstractsService }, { type: CmsApiService }, { type: FieldAdminService }, { type: i1.LocalizationService }]; }, propDecorators: { Entity: [{
1533
- type: Input
1534
- }], selected: [{
1535
- type: Input
1536
- }] } });
1537
-
1538
- class CreateFieldComponent {
1539
- fb;
1540
- _FieldAdminService;
1541
- toaster;
1542
- _location;
1543
- _LocalizationService;
1544
- _CmsApiService;
1545
- router;
1546
- constructor(fb, _FieldAdminService, toaster, _location, _LocalizationService, _CmsApiService, router) {
1547
- this.fb = fb;
1548
- this._FieldAdminService = _FieldAdminService;
1549
- this.toaster = toaster;
1550
- this._location = _location;
1551
- this._LocalizationService = _LocalizationService;
1552
- this._CmsApiService = _CmsApiService;
1553
- this.router = router;
1554
- }
1555
- _UpdateListService = inject(UpdateListService);
1556
- /**表单实体 */
1557
- newEntity;
1558
- /**获取提交按钮替身,用于真实触发表单提交 */
1559
- submitclick;
1560
- ngOnInit() {
1561
- //Called after the constructor, initializing input properties, and the first call to ngOnChanges.
1562
- //Add 'implements OnInit' to the class.
1563
- this.newEntity = this.fb.group(new CreateOrUpdateFieldInputBase());
1564
- }
1565
- /**触发提交按钮 */
1566
- submitclickBtn() {
1567
- this.submitclick.nativeElement.click();
1568
- }
1569
- /**保存表单 */
1570
- save() {
1571
- let input = this.newEntity.value;
1572
- if (!this.newEntity.valid)
1573
- return;
1574
- this._FieldAdminService.create(input).subscribe(res => {
1575
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
1576
- this.router.navigateByUrl('', { skipLocationChange: true }).then(() => {
1577
- this.router.navigate([`/cms/admin/fields`]);
1578
- this._UpdateListService.updateList();
1579
- });
1580
- });
1581
- }
1582
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateFieldComponent, deps: [{ token: i1$1.FormBuilder }, { token: FieldAdminService }, { token: i3.ToasterService }, { token: i2.Location }, { token: i1.LocalizationService }, { token: CmsApiService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component });
1583
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateFieldComponent, selector: "cms-create-field", providers: [
1584
- {
1585
- provide: EXTENSIONS_IDENTIFIER,
1586
- useValue: ECmsComponent.FieldsCreate,
1587
- },
1588
- ], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card\">\n <div class=\"card-body\">\n <cms-create-or-edit-field [Entity]=\"newEntity\"></cms-create-or-edit-field>\n </div>\n </div>\n </div>\n </abp-page>\n</form>", styles: ["::ng-deep .create-field-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-field-page .form-control,::ng-deep .create-field-page .form-select{padding:.475rem 1.25rem}\n"], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i9.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: ["Entity", "selected"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
1589
- }
1590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateFieldComponent, decorators: [{
1591
- type: Component,
1592
- args: [{ selector: 'cms-create-field', providers: [
1593
- {
1594
- provide: EXTENSIONS_IDENTIFIER,
1595
- useValue: ECmsComponent.FieldsCreate,
1596
- },
1597
- ], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card\">\n <div class=\"card-body\">\n <cms-create-or-edit-field [Entity]=\"newEntity\"></cms-create-or-edit-field>\n </div>\n </div>\n </div>\n </abp-page>\n</form>", styles: ["::ng-deep .create-field-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-field-page .form-control,::ng-deep .create-field-page .form-select{padding:.475rem 1.25rem}\n"] }]
1598
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: FieldAdminService }, { type: i3.ToasterService }, { type: i2.Location }, { type: i1.LocalizationService }, { type: CmsApiService }, { type: i3$1.Router }]; }, propDecorators: { submitclick: [{
1599
- type: ViewChild,
1600
- args: ['submitclick', { static: true }]
1601
- }] } });
1602
-
1603
- class EditFieldComponent {
1604
- fb;
1605
- _FieldAbstractsService;
1606
- _FieldAdminService;
1607
- route;
1608
- toaster;
1609
- _location;
1610
- _LocalizationService;
1611
- _CmsApiService;
1612
- router;
1613
- constructor(fb, _FieldAbstractsService, _FieldAdminService, route, toaster, _location, _LocalizationService, _CmsApiService, router) {
1614
- this.fb = fb;
1615
- this._FieldAbstractsService = _FieldAbstractsService;
1616
- this._FieldAdminService = _FieldAdminService;
1617
- this.route = route;
1618
- this.toaster = toaster;
1619
- this._location = _location;
1620
- this._LocalizationService = _LocalizationService;
1621
- this._CmsApiService = _CmsApiService;
1622
- this.router = router;
1623
- }
1624
- /**表单实体 */
1625
- newEntity;
1626
- /**字段id */
1627
- fieldId = '';
1628
- /**字段详情 */
1629
- fieldDetails;
1630
- /**获取提交按钮替身,用于真实触发表单提交 */
1631
- submitclick;
1632
- async ngOnInit() {
1633
- const _fieldId = this.route.snapshot.params.id;
1634
- if (_fieldId) {
1635
- this.fieldId = _fieldId;
1636
- this.newEntity = this.fb.group(new CreateOrUpdateFieldInputBase());
1637
- await Promise.all([
1638
- this._FieldAbstractsService.getFromControlList(),
1639
- this.getFieldEdit(),
1640
- ]);
1641
- this.newEntity.patchValue({
1642
- ...this.fieldDetails,
1643
- });
1644
- }
1645
- }
1646
- /**获取字段详情 */
1647
- getFieldEdit() {
1648
- return new Promise((resolve, reject) => {
1649
- this._FieldAdminService.get(this.fieldId).subscribe(res => {
1650
- res.groupId = res.groupId ? res.groupId : '';
1651
- this.fieldDetails = res;
1652
- resolve(res);
1653
- });
1654
- });
1655
- }
1656
- /**触发提交按钮 */
1657
- submitclickBtn() {
1658
- this.submitclick.nativeElement.click();
1659
- }
1660
- _UpdateListService = inject(UpdateListService);
1661
- /**保存表单 */
1662
- save() {
1663
- let input = this.newEntity.value;
1664
- if (!this.newEntity.valid)
1665
- return;
1666
- this._FieldAdminService.update(this.fieldId, input).subscribe((res => {
1667
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
1668
- this.router.navigateByUrl('', { skipLocationChange: true }).then(() => {
1669
- this.router.navigate([`/cms/admin/fields`]);
1670
- this._UpdateListService.updateList();
1671
- });
1672
- }));
1673
- }
1674
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditFieldComponent, deps: [{ token: i1$1.FormBuilder }, { token: FieldAbstractsService }, { token: FieldAdminService }, { token: i3$1.ActivatedRoute }, { token: i3.ToasterService }, { token: i2.Location }, { token: i1.LocalizationService }, { token: CmsApiService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component });
1675
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EditFieldComponent, selector: "cms-edit-field", providers: [
1676
- {
1677
- provide: EXTENSIONS_IDENTIFIER,
1678
- useValue: ECmsComponent.FieldsEdit,
1679
- },
1680
- ], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"'Cms::EditField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <!-- <div class=\"p-3 bg-white rounded-1\"> -->\n <div class=\"card\">\n <div class=\"card-body\">\n <cms-create-or-edit-field [Entity]=\"newEntity\" [selected]=\"fieldDetails\"></cms-create-or-edit-field>\n </div>\n </div>\n </div>\n </abp-page>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i9.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: ["Entity", "selected"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
1681
- }
1682
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditFieldComponent, decorators: [{
1683
- type: Component,
1684
- args: [{ selector: 'cms-edit-field', providers: [
1685
- {
1686
- provide: EXTENSIONS_IDENTIFIER,
1687
- useValue: ECmsComponent.FieldsEdit,
1688
- },
1689
- ], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"'Cms::EditField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <!-- <div class=\"p-3 bg-white rounded-1\"> -->\n <div class=\"card\">\n <div class=\"card-body\">\n <cms-create-or-edit-field [Entity]=\"newEntity\" [selected]=\"fieldDetails\"></cms-create-or-edit-field>\n </div>\n </div>\n </div>\n </abp-page>\n</form>" }]
1690
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: FieldAbstractsService }, { type: FieldAdminService }, { type: i3$1.ActivatedRoute }, { type: i3.ToasterService }, { type: i2.Location }, { type: i1.LocalizationService }, { type: CmsApiService }, { type: i3$1.Router }]; }, propDecorators: { submitclick: [{
1691
- type: ViewChild,
1692
- args: ['submitclick', { static: true }]
1693
- }] } });
1694
-
1695
- class CreateOrUpdateSitesInputBase {
1696
- /**字段名称 Display name of this field */
1697
- displayName = ['', [Validators.required]];
1698
- /**字段唯一名称 Unique Name*/
1699
- name = ['', [Validators.required]];
1700
- /**主机地址 */
1701
- host = ['https://', [Validators.required]];
1702
- /**是否激活 */
1703
- isActive = [true, []];
1704
- // 语言
1705
- languages = [[], [Validators.required]];
1706
- constructor(data) {
1707
- if (data) {
1708
- for (const key in data) {
1709
- if (data.hasOwnProperty(key)) {
1710
- this[key] = data[key];
1711
- }
1712
- }
1713
- }
1714
- }
1715
- }
1716
-
1717
- /* eslint-disable @angular-eslint/use-lifecycle-interface */
1718
- class SitesComponent {
1719
- list;
1720
- _SiteAdminService;
1721
- toaster;
1722
- confirmation;
1723
- fb;
1724
- configState;
1725
- _LocalizationService;
1726
- _CmsApiService;
1727
- constructor(list, _SiteAdminService, toaster, confirmation, fb, configState, _LocalizationService, _CmsApiService) {
1728
- this.list = list;
1729
- this._SiteAdminService = _SiteAdminService;
1730
- this.toaster = toaster;
1731
- this.confirmation = confirmation;
1732
- this.fb = fb;
1733
- this.configState = configState;
1734
- this._LocalizationService = _LocalizationService;
1735
- this._CmsApiService = _CmsApiService;
1736
- }
1737
- /**创建站点模态框状态 */
1738
- createSitesOpen = false;
1739
- /**用于确定模态的繁忙状态是否为真 */
1740
- modalBusy = false;
1741
- /**创建站点表单 */
1742
- createOrEditForm;
1743
- get languagesInput() {
1744
- return this.createOrEditForm.get('languages').value;
1745
- }
1746
- /**语言列表 */
1747
- languages;
1748
- /**站点给定的表单值 */
1749
- selected;
1750
- /**表单控件模板-动态赋值表单控件 */
1751
- createModalSubmit;
1752
- ColumnMode = ColumnMode;
1753
- data = {
1754
- items: [],
1755
- totalCount: 0,
1756
- };
1757
- filters = {};
1758
- ngOnInit() {
1759
- this.hookToQuery();
1760
- }
1761
- hookToQuery() {
1762
- const getData = (query) => this._SiteAdminService.getList({
1763
- ...query,
1764
- ...this.filters,
1765
- });
1766
- const setData = (list) => (this.data = list);
1767
- this.list.hookToQuery(getData).subscribe(setData);
1768
- }
1769
- /**删除字段 */
1770
- deletefield(row) {
1771
- this.confirmation.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`)).subscribe((status) => {
1772
- if (status == 'confirm') {
1773
- this._SiteAdminService.delete(row.id).pipe(finalize(() => {
1774
- })).subscribe(res => {
1775
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
1776
- this.list.get();
1777
- });
1778
- }
1779
- });
1780
- }
1781
- /**创建站点模态框状态改变 */
1782
- createGroupVisibleChange(event) {
1783
- if (!event) {
1784
- this.selected = '';
1785
- return;
1786
- }
1787
- }
1788
- /**选择语言改变 */
1789
- languagesChange(event) {
1790
- let checked = event.target.checked;
1791
- let value = event.target.value;
1792
- this.languages.forEach(el => {
1793
- el.ischecked = el.cultureName === value ? checked : el.ischecked;
1794
- });
1795
- this.setFromLangguages();
1796
- }
1797
- /**设置默认语言 */
1798
- setDefault(items) {
1799
- this.languages.forEach(el => {
1800
- el.isDefault = el.cultureName === items.cultureName;
1801
- });
1802
- this.setFromLangguages();
1803
- }
1804
- /**设置表单中的语言 */
1805
- setFromLangguages() {
1806
- let languagesSelect = this.languages.filter(el => el.ischecked == true);
1807
- this.createOrEditForm.patchValue({
1808
- languages: languagesSelect
1809
- });
1810
- if (languagesSelect.length == 0) {
1811
- this.languages.forEach(el => {
1812
- el.isDefault = false;
1813
- });
1814
- }
1815
- }
1816
- /**表单保存提交 */
1817
- createOrEditSave() {
1818
- if (this.selected) {
1819
- return this.EditSave();
1820
- }
1821
- this.createSave();
1822
- }
1823
- /**创建站点保存 */
1824
- createSave() {
1825
- let input = this.createOrEditForm.value;
1826
- this.modalBusy = true;
1827
- if (!this.createOrEditForm.valid)
1828
- return;
1829
- this._SiteAdminService.create(input).pipe(finalize(() => {
1830
- this.modalBusy = false;
1831
- this.createSitesOpen = false;
1832
- })).subscribe(res => {
1833
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
1834
- this.list.get();
1835
- });
1836
- }
1837
- /**编辑站点保存 */
1838
- EditSave() {
1839
- let input = this.createOrEditForm.value;
1840
- this.modalBusy = true;
1841
- this._SiteAdminService.update(this.selected.id, input).pipe(finalize(() => {
1842
- this.modalBusy = false;
1843
- this.createSitesOpen = false;
1844
- })).subscribe(res => {
1845
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
1846
- this.list.get();
1847
- });
1848
- }
1849
- /**创建站点按钮 */
1850
- createSitesBtn() {
1851
- this.createSitesOpen = true;
1852
- this.createOrEditForm = this.fb.group(new CreateOrUpdateSitesInputBase());
1853
- this.setAsyncValidatorsFn();
1854
- this.languages = this.configState.getDeep('localization.languages');
1855
- this.languages.forEach((el, index) => {
1856
- el.isDefault = index === 0;
1857
- el.ischecked = index === 0;
1858
- });
1859
- this.setFromLangguages();
1860
- }
1861
- /**编辑站点按钮 */
1862
- EditSitesBtn(rows) {
1863
- this.createSitesOpen = true;
1864
- this.languages = this.configState.getDeep('localization.languages');
1865
- this._SiteAdminService.get(rows.id).subscribe(res => {
1866
- this.selected = rows;
1867
- this.createOrEditForm = this.fb.group(new CreateOrUpdateSitesInputBase());
1868
- this.createOrEditForm.patchValue(rows);
1869
- this.setAsyncValidatorsFn();
1870
- // 更新语言和默认状态
1871
- this.updateLanguages(res.languages);
1872
- // 设置表单语言
1873
- this.setFromLangguages();
1874
- });
1875
- }
1876
- /**设置字段控件异步验证 */
1877
- setAsyncValidatorsFn() {
1878
- this.createOrEditForm.setControl('name', new FormControl(this.nameInput.value || '', {
1879
- validators: Validators.required,
1880
- asyncValidators: this.nameRepetitionAsyncValidator(),
1881
- updateOn: 'blur'
1882
- }));
1883
- }
1884
- /**更新语言和默认状态 */
1885
- updateLanguages(siteLanguages) {
1886
- this.languages.forEach(language => {
1887
- const siteLanguage = siteLanguages.find(sl => sl.cultureName === language.cultureName);
1888
- if (siteLanguage) {
1889
- language.ischecked = true;
1890
- language.isDefault = siteLanguage.isDefault;
1891
- }
1892
- });
1893
- }
1894
- get nameInput() {
1895
- return this.createOrEditForm.get('name');
1896
- }
1897
- get hostInput() {
1898
- return this.createOrEditForm.get('host');
1899
- }
1900
- /**字段标签input失去标点生成字段名字 */
1901
- disPlayNameInputBlur(event) {
1902
- let value = event.target.value;
1903
- let pinyin = this._CmsApiService.chineseToPinyin(value);
1904
- let nameInput = this.nameInput;
1905
- if (nameInput.value)
1906
- return;
1907
- nameInput.patchValue(pinyin);
1908
- }
1909
- /**name定义自定义异步验证 */
1910
- nameRepetitionAsyncValidator() {
1911
- return (ctrl) => {
1912
- return new Promise(resolve => {
1913
- let subslug = this.createOrEditForm?.get('name').value;
1914
- if (subslug == this.selected?.name) {
1915
- resolve(null);
1916
- return;
1917
- }
1918
- this._SiteAdminService.nameExists(subslug).subscribe(res => {
1919
- if (res) {
1920
- resolve({ repetition: this._LocalizationService.instant(`Cms::SiteName{0}AlreadyExist`, ctrl.value) });
1921
- }
1922
- else {
1923
- resolve(null);
1924
- }
1925
- });
1926
- });
1927
- };
1928
- }
1929
- /**host定义自定义异步验证 */
1930
- hostRepetitionAsyncValidator() {
1931
- return (ctrl) => {
1932
- return new Promise(resolve => {
1933
- let subslug = this.createOrEditForm?.get('host').value;
1934
- if (subslug == this.selected?.host || subslug == 'https://') {
1935
- resolve(null);
1936
- return;
1937
- }
1938
- this._SiteAdminService.hostExists(subslug).subscribe(res => {
1939
- if (res) {
1940
- resolve({ repetition: this._LocalizationService.instant(`Cms::SiteHost{0}AlreadyExist`, ctrl.value) });
1941
- }
1942
- else {
1943
- resolve(null);
1944
- }
1945
- });
1946
- });
1947
- };
1948
- }
1949
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SitesComponent, deps: [{ token: i1.ListService }, { token: SiteAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1$1.FormBuilder }, { token: i1.ConfigStateService }, { token: i1.LocalizationService }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component });
1950
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SitesComponent, selector: "cms-sites", providers: [
1951
- // [Required]
1952
- ListService,
1953
- // [Optional]
1954
- // Provide this token if you want a different debounce time.
1955
- // Default is 300. Cannot be 0. Any value below 100 is not recommended.
1956
- { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
1957
- {
1958
- provide: EXTENSIONS_IDENTIFIER,
1959
- useValue: ECmsComponent.Sites,
1960
- },
1961
- ], viewQueries: [{ propertyName: "createModalSubmit", first: true, predicate: ["createModalSubmit"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::Sites' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sites-page\">\n <div class=\"card\">\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Host' | abpLocalization\" prop=\"host\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'yyyy-MM-dd hh-mm-ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm\" ngbDropdownToggle>\n {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n (click)=\"EditSitesBtn(row)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click)=\"deletefield(row)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n\n\n </div>\n\n\n\n</abp-page>\n\n\n<!-- <dignite-page [title]=\"'Cms::Sites' | abpLocalization\" [back]=\"false\" [class]=\"'sites-page'\">\n <ng-template #pageHeader>\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" (click.stop)=\"createSitesBtn()\">\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::New' | abpLocalization}}\n </button>\n </ng-template>\n <ng-template #pageBody>\n \n </ng-template>\n</dignite-page> -->\n\n<abp-modal [(visible)]=\"createSitesOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"createOrEditForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"createOrEditForm\"\n (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #createModalSubmit style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Host' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"host\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"hostInput.errors?.repetition\">\n {{hostInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\n id=\"flexRadioDefault1\" />\n <label class=\"form-check-label\" for=\"flexRadioDefault1\"> {{'Cms::IsActive' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Languages' | abpLocalization}}</label>\n <ul class=\"list-group list-group-flush\">\n <ng-container *ngFor=\"let item of languages; let i = index\">\n <li class=\"list-group-item d-flex justify-content-between align-items-center\">\n <div>\n <input class=\"form-check-input me-1\" type=\"checkbox\" [value]=\"item.cultureName\"\n id=\"firstRadio{{ i }}\" [checked]=\"item.ischecked\"\n (change)=\"languagesChange($event);!item.ischecked\" />\n <label class=\"form-check-label\" for=\"firstRadio{{ i }}\">{{ item.displayName\n }}</label>\n </div>\n <ng-container *ngIf=\"item.ischecked\">\n <div class=\"text-primary\" *ngIf=\"item.isDefault\">{{'Cms::Default' | abpLocalization}}\n </div>\n <div (click.stop)=\"setDefault(item)\" *ngIf=\"!item.isDefault\">\n {{'Cms::SetDefault' | abpLocalization}}</div>\n </ng-container>\n </li>\n </ng-container>\n </ul>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"createModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .sites-page .dignite_page{background:transparent}::ng-deep .sites-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sites-page .container-height{height:calc(100vh - 220px)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i7.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i7.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i7.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i7$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "component", type: i9.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
1962
- }
1963
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SitesComponent, decorators: [{
1964
- type: Component,
1965
- args: [{ selector: 'cms-sites', providers: [
1966
- // [Required]
1967
- ListService,
1968
- // [Optional]
1969
- // Provide this token if you want a different debounce time.
1970
- // Default is 300. Cannot be 0. Any value below 100 is not recommended.
1971
- { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
1972
- {
1973
- provide: EXTENSIONS_IDENTIFIER,
1974
- useValue: ECmsComponent.Sites,
1975
- },
1976
- ], template: "<abp-page [title]=\"'Cms::Sites' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sites-page\">\n <div class=\"card\">\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Host' | abpLocalization\" prop=\"host\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'yyyy-MM-dd hh-mm-ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm\" ngbDropdownToggle>\n {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n (click)=\"EditSitesBtn(row)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click)=\"deletefield(row)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n\n\n </div>\n\n\n\n</abp-page>\n\n\n<!-- <dignite-page [title]=\"'Cms::Sites' | abpLocalization\" [back]=\"false\" [class]=\"'sites-page'\">\n <ng-template #pageHeader>\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" (click.stop)=\"createSitesBtn()\">\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::New' | abpLocalization}}\n </button>\n </ng-template>\n <ng-template #pageBody>\n \n </ng-template>\n</dignite-page> -->\n\n<abp-modal [(visible)]=\"createSitesOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"createOrEditForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"createOrEditForm\"\n (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #createModalSubmit style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Host' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"host\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"hostInput.errors?.repetition\">\n {{hostInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\n id=\"flexRadioDefault1\" />\n <label class=\"form-check-label\" for=\"flexRadioDefault1\"> {{'Cms::IsActive' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Languages' | abpLocalization}}</label>\n <ul class=\"list-group list-group-flush\">\n <ng-container *ngFor=\"let item of languages; let i = index\">\n <li class=\"list-group-item d-flex justify-content-between align-items-center\">\n <div>\n <input class=\"form-check-input me-1\" type=\"checkbox\" [value]=\"item.cultureName\"\n id=\"firstRadio{{ i }}\" [checked]=\"item.ischecked\"\n (change)=\"languagesChange($event);!item.ischecked\" />\n <label class=\"form-check-label\" for=\"firstRadio{{ i }}\">{{ item.displayName\n }}</label>\n </div>\n <ng-container *ngIf=\"item.ischecked\">\n <div class=\"text-primary\" *ngIf=\"item.isDefault\">{{'Cms::Default' | abpLocalization}}\n </div>\n <div (click.stop)=\"setDefault(item)\" *ngIf=\"!item.isDefault\">\n {{'Cms::SetDefault' | abpLocalization}}</div>\n </ng-container>\n </li>\n </ng-container>\n </ul>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"createModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .sites-page .dignite_page{background:transparent}::ng-deep .sites-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sites-page .container-height{height:calc(100vh - 220px)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"] }]
1977
- }], ctorParameters: function () { return [{ type: i1.ListService }, { type: SiteAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1$1.FormBuilder }, { type: i1.ConfigStateService }, { type: i1.LocalizationService }, { type: CmsApiService }]; }, propDecorators: { createModalSubmit: [{
1978
- type: ViewChild,
1979
- args: ['createModalSubmit', { static: false }]
1980
- }] } });
1981
-
1982
- class CreateOrUpdateSectionsInputBase {
1983
- /**版块类型 */
1984
- type = [0, [Validators.required]];
1985
- /**字段名称 Display name of this field */
1986
- displayName = ['', [Validators.required]];
1987
- /**字段唯一名称 Unique Name*/
1988
- name = ['', [Validators.required]];
1989
- /**条目路由 */
1990
- route = ['', [Validators.required]];
1991
- /**页面模板 */
1992
- template = ['', [Validators.required]];
1993
- /**是否默认 */
1994
- isDefault = [false, []];
1995
- /**是否激活 */
1996
- isActive = [true, []];
1997
- constructor(data) {
1998
- if (data) {
1999
- for (const key in data) {
2000
- if (data.hasOwnProperty(key)) {
2001
- this[key] = data[key];
2002
- }
2003
- }
2004
- }
2005
- }
2006
- }
2007
-
2008
- var SectionType;
2009
- (function (SectionType) {
2010
- SectionType[SectionType["Single"] = 0] = "Single";
2011
- SectionType[SectionType["Structure"] = 1] = "Structure";
2012
- SectionType[SectionType["Channel"] = 2] = "Channel";
2013
- })(SectionType || (SectionType = {}));
2014
- const sectionTypeOptions = mapEnumToOptions(SectionType);
2015
-
2016
- var index$m = /*#__PURE__*/Object.freeze({
2017
- __proto__: null,
2018
- get SectionType () { return SectionType; },
2019
- sectionTypeOptions: sectionTypeOptions
2020
- });
2021
-
2022
- class SectionsComponent {
2023
- list;
2024
- _SectionAdminService;
2025
- _SiteAdminService;
2026
- toaster;
2027
- confirmation;
2028
- fb;
2029
- configState;
2030
- _EntryTypeAdminService;
2031
- _LocalizationService;
2032
- _CmsApiService;
2033
- router;
2034
- constructor(list, _SectionAdminService, _SiteAdminService, toaster, confirmation, fb, configState, _EntryTypeAdminService, _LocalizationService, _CmsApiService, router) {
2035
- this.list = list;
2036
- this._SectionAdminService = _SectionAdminService;
2037
- this._SiteAdminService = _SiteAdminService;
2038
- this.toaster = toaster;
2039
- this.confirmation = confirmation;
2040
- this.fb = fb;
2041
- this.configState = configState;
2042
- this._EntryTypeAdminService = _EntryTypeAdminService;
2043
- this._LocalizationService = _LocalizationService;
2044
- this._CmsApiService = _CmsApiService;
2045
- this.router = router;
2046
- }
2047
- _UpdateListService = inject(UpdateListService);
2048
- /**跳转编辑 */
2049
- jumpSectionsEdit(row, item) {
2050
- this.router.navigate([`/cms/admin/sections/${row.id}/entry-types/${item.id}/edit`], {});
2051
- }
2052
- /**跳转新建 */
2053
- jumpSectionsCreate(row) {
2054
- this.router.navigate([`/cms/admin/sections/${row.id}/entry-types/create`], {});
2055
- }
2056
- /**版块列表 */
2057
- siteList = [];
2058
- /*** */
2059
- ColumnMode = ColumnMode;
2060
- data = {
2061
- items: [],
2062
- totalCount: 0,
2063
- };
2064
- /** */
2065
- filters = {};
2066
- /**获取页面列表 */
2067
- hookToQuery() {
2068
- const getData = (query) => this._SectionAdminService.getList({
2069
- ...query,
2070
- ...this.filters,
2071
- });
2072
- const setData = (list) => (this.data = list);
2073
- this.list.hookToQuery(getData).subscribe(setData);
2074
- }
2075
- async ngOnInit() {
2076
- await this.getSiteList();
2077
- this.hookToQuery();
2078
- this._UpdateListService.updateListEvent.subscribe(() => {
2079
- this.list.get();
2080
- });
2081
- }
2082
- /**站点切换 */
2083
- siteIdChange() {
2084
- this.list.page = 0;
2085
- this.list.get();
2086
- }
2087
- /**获取版块列表 */
2088
- getSiteList() {
2089
- return new Promise((resolve, rejects) => {
2090
- this._SiteAdminService.getList({}).subscribe(res => {
2091
- this.siteList = res.items;
2092
- this.filters.siteId = res.items[0]?.id || '';
2093
- resolve(true);
2094
- rejects(false);
2095
- });
2096
- });
2097
- }
2098
- /**创建版块模态框状态 */
2099
- visibleOpen = false;
2100
- /**用于确定模态的繁忙状态是否为真 */
2101
- modalBusy = false;
2102
- /**创建版块表单 */
2103
- createOrEditForm;
2104
- /**版块给定的表单值 */
2105
- selected;
2106
- _SectionType = SectionType;
2107
- _sectionTypeOptions = sectionTypeOptions;
2108
- /**表单控件模板-动态赋值表单控件 */
2109
- createOrEditModalSubmitBtn;
2110
- /**创建版块模态框状态改变 */
2111
- VisibleChange(event) {
2112
- if (!event) {
2113
- this.selected = '';
2114
- return;
2115
- }
2116
- }
2117
- /**创建版块,打开模态框 */
2118
- createSectionBtn() {
2119
- this.visibleOpen = true;
2120
- this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase());
2121
- this.setAsyncValidatorsFn();
2122
- }
2123
- /**编辑版块,打开模态框 */
2124
- editSectionBtn(row) {
2125
- this.visibleOpen = true;
2126
- this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase());
2127
- this.setAsyncValidatorsFn();
2128
- this._SectionAdminService.get(row.id).subscribe(res => {
2129
- this.createOrEditForm.patchValue(res);
2130
- this.selected = res;
2131
- });
2132
- }
2133
- /**删除某个条目类型 */
2134
- deleteEntryType(row) {
2135
- this.confirmation.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`)).subscribe((status) => {
2136
- if (status == 'confirm') {
2137
- this._EntryTypeAdminService.delete(row.id).pipe(finalize(() => {
2138
- })).subscribe(res => {
2139
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
2140
- this.list.get();
2141
- });
2142
- }
2143
- });
2144
- }
2145
- /**表单保存提交 */
2146
- createOrEditSave() {
2147
- if (this.selected) {
2148
- return this.EditSave();
2149
- }
2150
- this.createSave();
2151
- }
2152
- /** */
2153
- createSave() {
2154
- let input = this.createOrEditForm.value;
2155
- input.siteId = this.filters.siteId;
2156
- if (!this.createOrEditForm.valid)
2157
- return;
2158
- this.modalBusy = true;
2159
- this._SectionAdminService.create(input).pipe(finalize(() => {
2160
- this.modalBusy = false;
2161
- this.visibleOpen = false;
2162
- })).subscribe(res => {
2163
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
2164
- this.list.get();
2165
- });
2166
- }
2167
- /**创建版块保存 */
2168
- EditSave() {
2169
- let input = this.createOrEditForm.value;
2170
- input.siteId = this.filters.siteId;
2171
- input.concurrencyStamp = this.selected.concurrencyStamp;
2172
- if (!this.createOrEditForm.valid)
2173
- return;
2174
- this.modalBusy = true;
2175
- this._SectionAdminService.update(this.selected.id, input).pipe(finalize(() => {
2176
- this.modalBusy = false;
2177
- this.visibleOpen = false;
2178
- })).subscribe(res => {
2179
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
2180
- this.list.get();
2181
- });
2182
- }
2183
- /**删除版块 */
2184
- deletefield(row) {
2185
- this.confirmation.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`)).subscribe((status) => {
2186
- if (status == 'confirm') {
2187
- this._SectionAdminService.delete(row.id).pipe(finalize(() => {
2188
- })).subscribe(res => {
2189
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
2190
- this.list.get();
2191
- });
2192
- }
2193
- });
2194
- }
2195
- /**name表单控件 */
2196
- get displayNameInput() {
2197
- return this.createOrEditForm.get('displayName');
2198
- }
2199
- /**name表单控件 */
2200
- get nameInput() {
2201
- return this.createOrEditForm.get('name');
2202
- }
2203
- /**route表单控件 */
2204
- get routeInput() {
2205
- return this.createOrEditForm.get('route');
2206
- }
2207
- /**route表单控件 */
2208
- get templateInput() {
2209
- return this.createOrEditForm.get('template');
2210
- }
2211
- /**route表单控件 */
2212
- get typeInput() {
2213
- return this.createOrEditForm.get('type');
2214
- }
2215
- radiochange() {
2216
- this.routeInput.patchValue(this.routeInput.value);
2217
- }
2218
- /**字段标签input失去标点生成字段名字 */
2219
- disPlayNameInputBlur(event) {
2220
- let value = event.target.value;
2221
- let pinyin = this._CmsApiService.chineseToPinyin(value);
2222
- let nameInput = this.nameInput;
2223
- let routeInput = this.routeInput;
2224
- let templateInput = this.templateInput;
2225
- if (nameInput.value)
2226
- return;
2227
- nameInput.patchValue(pinyin);
2228
- if (routeInput.value)
2229
- return;
2230
- routeInput.patchValue(pinyin + (this.typeInput.value === 0 ? '' : '/{slug}'));
2231
- if (templateInput.value)
2232
- return;
2233
- templateInput.patchValue(pinyin + '/index');
2234
- }
2235
- /**设置字段控件异步验证 */
2236
- setAsyncValidatorsFn() {
2237
- this.createOrEditForm.setControl('name', new FormControl(this.nameInput.value || '', {
2238
- validators: Validators.required,
2239
- asyncValidators: this.nameRepetitionAsyncValidator(),
2240
- }));
2241
- this.createOrEditForm.setControl('route', new FormControl(this.routeInput.value || '', {
2242
- validators: [Validators.required, this.forbiddenNameValidator()],
2243
- asyncValidators: [this.routeRepetitionAsyncValidator()],
2244
- }));
2245
- }
2246
- forbiddenNameValidator() {
2247
- return (control) => {
2248
- let inputValue = control.value.toLocaleLowerCase();
2249
- let forbidden = this.typeInput.value == 0 ? false : inputValue.includes('{slug}') ? false : true;
2250
- return forbidden ? { repetition: this._LocalizationService.instant(`Cms::RouteVerificationTips`, this._LocalizationService.instant(`Cms::Enum:SectionType:` + SectionType[this.typeInput.value]), '{slug}') } : null;
2251
- };
2252
- }
2253
- /**定义异步验证方法 */
2254
- nameRepetitionAsyncValidator() {
2255
- return (ctrl) => {
2256
- return new Promise(resolve => {
2257
- let subslug = this.createOrEditForm?.get('name');
2258
- if (subslug.value == this.selected?.name) {
2259
- resolve(null);
2260
- return;
2261
- }
2262
- this._SectionAdminService.nameExists({
2263
- siteId: this.filters.siteId,
2264
- name: subslug.value
2265
- }).subscribe(res => {
2266
- if (res) {
2267
- resolve({ repetition: this._LocalizationService.instant(`Cms::SectionName{0}AlreadyExist`, ctrl.value) });
2268
- }
2269
- else {
2270
- resolve(null);
2271
- }
2272
- });
2273
- });
2274
- };
2275
- }
2276
- /**定义异步验证方法 */
2277
- routeRepetitionAsyncValidator() {
2278
- return (ctrl) => {
2279
- return new Promise(resolve => {
2280
- let subslug = this.createOrEditForm?.get('route').value;
2281
- if (subslug == this.selected?.route) {
2282
- resolve(null);
2283
- return;
2284
- }
2285
- this._SectionAdminService.routeExists({
2286
- siteId: this.filters.siteId,
2287
- route: subslug
2288
- }).subscribe(res => {
2289
- if (res) {
2290
- resolve({ repetition: this._LocalizationService.instant(`Cms::SectionRoute{0}AlreadyExist`, ctrl.value) });
2291
- }
2292
- else {
2293
- resolve(null);
2294
- }
2295
- });
2296
- });
2297
- };
2298
- }
2299
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SectionsComponent, deps: [{ token: i1.ListService }, { token: SectionAdminService }, { token: SiteAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1$1.FormBuilder }, { token: i1.ConfigStateService }, { token: EntryTypeAdminService }, { token: i1.LocalizationService }, { token: CmsApiService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component });
2300
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SectionsComponent, selector: "cms-sections", providers: [
2301
- // [Required]
2302
- ListService,
2303
- // [Optional]
2304
- // Provide this token if you want a different debounce time.
2305
- // Default is 300. Cannot be 0. Any value below 100 is not recommended.
2306
- { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
2307
- {
2308
- provide: EXTENSIONS_IDENTIFIER,
2309
- useValue: ECmsComponent.Sections,
2310
- },
2311
- ], viewQueries: [{ propertyName: "createOrEditModalSubmitBtn", first: true, predicate: ["createOrEditModalSubmitBtn"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::Sections' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sections-page\">\n\n <div class=\"card \">\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.siteId\" (change)=\"siteIdChange()\">\n <ng-container *ngFor=\"let item of siteList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"type\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Default' | abpLocalization\" prop=\"isDefault\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"SiteId\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-link\" ngbDropdownToggle id=\"dropdownBasic1\">\n {{'Cms::EntryType' | abpLocalization}}\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <ng-container *ngFor=\"let item of row.entryTypes;let i =index\">\n <li ngbDropdownItem\n class=\"d-flex align-items-center justify-content-between\"\n (click.stop)=\"jumpSectionsEdit(row,item)\">{{item.displayName}}\n <button class=\"btn btn-light btn-sm p-0\"\n (click.stop)=\"deleteEntryType(item)\"><i class=\"fas fa-trash p-sm-1\"\n style=\"font-size: 12px;\" role=\"button\"></i></button>\n </li>\n </ng-container>\n <li ngbDropdownItem (click.stop)=\"jumpSectionsCreate(row)\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'yyyy-MM-dd hh-mm-ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm\" ngbDropdownToggle>\n {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"editSectionBtn(row)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n\n </div>\n\n\n</abp-page>\n\n\n\n\n<abp-modal [(visible)]=\"visibleOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"createOrEditForm; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"createOrEditForm\" (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #createOrEditModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</label>\n <div>\n <ng-container *ngFor=\"let item of _sectionTypeOptions;let i =index\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"item.value\"\n (change)=\"radiochange()\" formControlName=\"type\" id=\"flexRadioDefault{{i}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{i}}\">\n {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}\n </label>\n </div>\n </ng-container>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Route' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"route\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"routeInput.errors?.repetition\">\n {{routeInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">\n {{'Cms::RouteTips' | abpLocalization}}<br>\n &nbsp;&nbsp;blog<br>\n &nbsp;&nbsp;{{'blog/{slug}'}}<br>\n &nbsp;&nbsp;{{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Template' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"template\" placeholder=\"\" />\n <div class=\"form-text\">\n {{\"Cms::TemplateTips\" | abpLocalization}}\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isDefault\"\n id=\"isDefault\" />\n <label class=\"form-check-label\" for=\"isDefault\"> {{'Cms::Default' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\n id=\"isActive\" />\n <label class=\"form-check-label\" for=\"isActive\"> {{'Cms::IsActive' | abpLocalization}}</label>\n </div>\n </div>\n\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <!-- [disabled]=\"!this.createOrEditForm.valid\" -->\n <abp-button iconClass=\"fa fa-check\" (click)=\"createOrEditModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .sections-page .dignite_page{background:transparent}::ng-deep .sections-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sections-page .card-header input{flex:2 1 auto}::ng-deep .sections-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sections-page .container-height{height:calc(100vh - 220px)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i7.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i7.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i7.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i7$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "component", type: i9.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
2312
- }
2313
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SectionsComponent, decorators: [{
2314
- type: Component,
2315
- args: [{ selector: 'cms-sections', providers: [
2316
- // [Required]
2317
- ListService,
2318
- // [Optional]
2319
- // Provide this token if you want a different debounce time.
2320
- // Default is 300. Cannot be 0. Any value below 100 is not recommended.
2321
- { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
2322
- {
2323
- provide: EXTENSIONS_IDENTIFIER,
2324
- useValue: ECmsComponent.Sections,
2325
- },
2326
- ], template: "<abp-page [title]=\"'Cms::Sections' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sections-page\">\n\n <div class=\"card \">\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.siteId\" (change)=\"siteIdChange()\">\n <ng-container *ngFor=\"let item of siteList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"type\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Default' | abpLocalization\" prop=\"isDefault\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"SiteId\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-link\" ngbDropdownToggle id=\"dropdownBasic1\">\n {{'Cms::EntryType' | abpLocalization}}\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <ng-container *ngFor=\"let item of row.entryTypes;let i =index\">\n <li ngbDropdownItem\n class=\"d-flex align-items-center justify-content-between\"\n (click.stop)=\"jumpSectionsEdit(row,item)\">{{item.displayName}}\n <button class=\"btn btn-light btn-sm p-0\"\n (click.stop)=\"deleteEntryType(item)\"><i class=\"fas fa-trash p-sm-1\"\n style=\"font-size: 12px;\" role=\"button\"></i></button>\n </li>\n </ng-container>\n <li ngbDropdownItem (click.stop)=\"jumpSectionsCreate(row)\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'yyyy-MM-dd hh-mm-ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm\" ngbDropdownToggle>\n {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"editSectionBtn(row)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n\n </div>\n\n\n</abp-page>\n\n\n\n\n<abp-modal [(visible)]=\"visibleOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"createOrEditForm; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"createOrEditForm\" (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #createOrEditModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</label>\n <div>\n <ng-container *ngFor=\"let item of _sectionTypeOptions;let i =index\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"item.value\"\n (change)=\"radiochange()\" formControlName=\"type\" id=\"flexRadioDefault{{i}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{i}}\">\n {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}\n </label>\n </div>\n </ng-container>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Route' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"route\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"routeInput.errors?.repetition\">\n {{routeInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">\n {{'Cms::RouteTips' | abpLocalization}}<br>\n &nbsp;&nbsp;blog<br>\n &nbsp;&nbsp;{{'blog/{slug}'}}<br>\n &nbsp;&nbsp;{{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Template' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"template\" placeholder=\"\" />\n <div class=\"form-text\">\n {{\"Cms::TemplateTips\" | abpLocalization}}\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isDefault\"\n id=\"isDefault\" />\n <label class=\"form-check-label\" for=\"isDefault\"> {{'Cms::Default' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\n id=\"isActive\" />\n <label class=\"form-check-label\" for=\"isActive\"> {{'Cms::IsActive' | abpLocalization}}</label>\n </div>\n </div>\n\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <!-- [disabled]=\"!this.createOrEditForm.valid\" -->\n <abp-button iconClass=\"fa fa-check\" (click)=\"createOrEditModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .sections-page .dignite_page{background:transparent}::ng-deep .sections-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sections-page .card-header input{flex:2 1 auto}::ng-deep .sections-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sections-page .container-height{height:calc(100vh - 220px)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"] }]
2327
- }], ctorParameters: function () { return [{ type: i1.ListService }, { type: SectionAdminService }, { type: SiteAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1$1.FormBuilder }, { type: i1.ConfigStateService }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: CmsApiService }, { type: i3$1.Router }]; }, propDecorators: { createOrEditModalSubmitBtn: [{
2328
- type: ViewChild,
2329
- args: ['createOrEditModalSubmitBtn', { static: false }]
2330
- }] } });
2331
-
2332
- class CreateOrEditEntryTypeInputBase {
2333
- /**显示名称 Display name of this field */
2334
- displayName = ['', [Validators.required]];
2335
- /**名称 Unique Name*/
2336
- name = ['', [Validators.required]];
2337
- /**条目路由 */
2338
- fieldTabs = new FormArray([]);
2339
- constructor(data) {
2340
- if (data) {
2341
- for (const key in data) {
2342
- if (data.hasOwnProperty(key)) {
2343
- this[key] = data[key];
2344
- }
2345
- }
2346
- }
2347
- }
2348
- }
2349
- class fieldTabsBase {
2350
- /**名称 Unique Name*/
2351
- name = ['', [Validators.required]];
2352
- fields = [[], []];
2353
- constructor(data) {
2354
- if (data) {
2355
- for (const key in data) {
2356
- if (data.hasOwnProperty(key)) {
2357
- this[key] = data[key];
2358
- }
2359
- }
2360
- }
2361
- }
2362
- }
2363
- class fieldsBase {
2364
- /**字段id Unique Name*/
2365
- fieldId = ['', [Validators.required]];
2366
- /**显示名称 Unique Name*/
2367
- displayName = ['', [Validators.required]];
2368
- /**必填 Unique Name*/
2369
- required = [false, []];
2370
- /**是否在列表中显示 Unique Name*/
2371
- showOnList = [false, []];
2372
- constructor(data) {
2373
- if (data) {
2374
- for (const key in data) {
2375
- if (data.hasOwnProperty(key)) {
2376
- this[key] = data[key];
2377
- }
2378
- }
2379
- }
2380
- }
2381
- }
2382
- class fieldsInputBase {
2383
- /**字段id */
2384
- fieldId = ['', [Validators.required]];
2385
- /**显示名称 Display name of this field */
2386
- displayName = ['', [Validators.required]];
2387
- /**是否必填 Unique Name*/
2388
- required = [false, []];
2389
- /**在列表中展示 Unique Name*/
2390
- showOnList = [false, []];
2391
- constructor(data) {
2392
- if (data) {
2393
- for (const key in data) {
2394
- if (data.hasOwnProperty(key)) {
2395
- this[key] = data[key];
2396
- }
2397
- }
2398
- }
2399
- }
2400
- }
2401
-
2402
- class CreateOrEditComponent {
2403
- toaster;
2404
- _location;
2405
- route;
2406
- _FieldGroupAdminService;
2407
- _FieldAdminService;
2408
- _EntryTypeAdminService;
2409
- _LocalizationService;
2410
- _CmsApiService;
2411
- router;
2412
- constructor(
2413
- // private fb: FormBuilder,
2414
- toaster, _location, route, _FieldGroupAdminService, _FieldAdminService, _EntryTypeAdminService, _LocalizationService, _CmsApiService, router) {
2415
- this.toaster = toaster;
2416
- this._location = _location;
2417
- this.route = route;
2418
- this._FieldGroupAdminService = _FieldGroupAdminService;
2419
- this._FieldAdminService = _FieldAdminService;
2420
- this._EntryTypeAdminService = _EntryTypeAdminService;
2421
- this._LocalizationService = _LocalizationService;
2422
- this._CmsApiService = _CmsApiService;
2423
- this.router = router;
2424
- }
2425
- fb = inject(FormBuilder);
2426
- _UpdateListService = inject(UpdateListService);
2427
- /**表单实体 */
2428
- newEntity = this.fb.group(new CreateOrEditEntryTypeInputBase());
2429
- /**版块id */
2430
- sectionId = '';
2431
- /**条目类型id */
2432
- entryTypesId = '';
2433
- /**条目类型详情 */
2434
- entryTypesSelect;
2435
- get fieldTabs() {
2436
- return this.newEntity.get('fieldTabs');
2437
- }
2438
- /**获取提交按钮替身,用于真实触发表单提交 */
2439
- submitclick;
2440
- /**触发提交按钮 */
2441
- submitclickBtn() {
2442
- this.submitclick.nativeElement.click();
2443
- }
2444
- ngOnInit() {
2445
- let sectionId = this.route.snapshot.params.sectionsId;
2446
- this.entryTypesId = this.route.snapshot.params.entryTypesId || '';
2447
- if (sectionId) {
2448
- this.sectionId = sectionId;
2449
- this.addControlToFieldTabs();
2450
- this.getFieldGroup();
2451
- }
2452
- }
2453
- /**给fieldTabs添加新控件 */
2454
- addControlToFieldTabs(nameValue = '') {
2455
- const newFormGroup = this.fb.group(new fieldTabsBase({
2456
- name: this.fieldTabs.length === 0 ? this._LocalizationService.instant(`Cms::FieldTab`) : nameValue,
2457
- }));
2458
- this.fieldTabs.push(newFormGroup);
2459
- this.resultSource.push(newFormGroup.value);
2460
- this.navActive = this.resultSource.length - 1;
2461
- }
2462
- /**获取字段分组 */
2463
- getFieldGroup() {
2464
- this._FieldGroupAdminService.getList({}).subscribe(async (res) => {
2465
- let fieldList = await this.getFieldList();
2466
- let fieldGroupList = res.items;
2467
- fieldGroupList.unshift({
2468
- id: null,
2469
- name: 'UngroupedFields'
2470
- });
2471
- fieldGroupList.forEach((el, index) => {
2472
- el.fields = fieldList.filter(els => els.groupId === el.id);
2473
- });
2474
- this.fieldGroupList = fieldGroupList;
2475
- this.fieldList = this.deepClone(fieldList);
2476
- let entryTypesId = this.entryTypesId;
2477
- if (entryTypesId) {
2478
- this.entryTypesId = entryTypesId;
2479
- this.getEntryTypes();
2480
- }
2481
- });
2482
- }
2483
- /**获取条目类型详情 */
2484
- getEntryTypes() {
2485
- let fieldList = this.deepClone(this.fieldList);
2486
- this._EntryTypeAdminService.get(this.entryTypesId).subscribe(res => {
2487
- res.fieldTabs.forEach(el => {
2488
- el.fields.forEach((eld) => {
2489
- eld.id = eld.fieldId;
2490
- eld.groupId = fieldList.find(elfd => elfd.id == eld.fieldId).groupId;
2491
- this.formRightGroup.push(eld);
2492
- let fieldindex = fieldList.findIndex(elfl => elfl.id == eld.fieldId);
2493
- fieldList.splice(fieldindex, 1);
2494
- });
2495
- });
2496
- this.fieldGroupList.forEach((el, index) => {
2497
- el.fields = fieldList.filter(els => els.groupId === el.id);
2498
- });
2499
- this.newEntity.patchValue(res);
2500
- this.entryTypesSelect = res;
2501
- this.resultSource = res.fieldTabs;
2502
- });
2503
- }
2504
- /**
2505
- * 深拷贝--方法
2506
- * $api.deepClone() */
2507
- deepClone(obj) {
2508
- if (typeof obj !== 'object' || obj === null)
2509
- return obj;
2510
- const result = Array.isArray(obj) ? [] : {};
2511
- for (let key in obj) {
2512
- if (obj.hasOwnProperty(key)) {
2513
- if (typeof obj[key] === 'object' && obj[key] !== null) {
2514
- if (obj[key] instanceof Date) {
2515
- result[key] = new Date(obj[key].getTime());
2516
- }
2517
- else if (obj[key] instanceof RegExp) {
2518
- result[key] = new RegExp(obj[key]);
2519
- }
2520
- else {
2521
- result[key] = this.deepClone(obj[key]);
2522
- }
2523
- }
2524
- else {
2525
- result[key] = obj[key];
2526
- }
2527
- }
2528
- }
2529
- return result;
2530
- }
2531
- /**
2532
- *
2533
- * @param nameValue 获取所有字段
2534
- */
2535
- getFieldList() {
2536
- return new Promise((resolve, rejects) => {
2537
- this._FieldAdminService.getList({
2538
- maxResultCount: 1000
2539
- }).subscribe((res) => {
2540
- res.items.forEach(el => {
2541
- el.required = false;
2542
- el.showOnList = false;
2543
- });
2544
- resolve(res.items);
2545
- });
2546
- });
2547
- }
2548
- /**
2549
- * 拖拽 功能*/
2550
- /**数据源 */
2551
- /**数据源-字段分组数据-包含字段数据 fields */
2552
- fieldGroupList = [];
2553
- /**数据源-所有字段列表 */
2554
- fieldList = [];
2555
- /**数据源拖拽的分组下标 */
2556
- DataSourceGroupIndex;
2557
- /**数据源拖拽的字段下标 */
2558
- DataSourceFieldIndex;
2559
- /**目标源 结果*/
2560
- resultSource = [];
2561
- /**从数据源拖拽的元素 */
2562
- fromDataSourceDragEl;
2563
- /**从目标源拖拽的元素 */
2564
- fromResultSourceDragEl;
2565
- /**来自数据源的集合,用于从目标源拖回数据源时的判断,与取值 */
2566
- formRightGroup = [];
2567
- /**从数据源开始拖拽 */
2568
- fromDataSourceDragStart(element, fieldIndex, groupIndex) {
2569
- this.fromDataSourceDragEl = element;
2570
- this.DataSourceFieldIndex = fieldIndex;
2571
- this.DataSourceGroupIndex = groupIndex;
2572
- this.fromResultSourceDragEl = undefined;
2573
- }
2574
- /**从目标源开始拖拽 */
2575
- fromResultSourceDragStart(element) {
2576
- this.fromResultSourceDragEl = element;
2577
- this.fromDataSourceDragEl = undefined;
2578
- this.DataSourceFieldIndex = undefined;
2579
- this.DataSourceGroupIndex = undefined;
2580
- }
2581
- /**拖拽到数据源时触发 */
2582
- dragToDataSourceDropped() {
2583
- //从数据源拖拽到数据源-排序
2584
- if (this.fromDataSourceDragEl) {
2585
- }
2586
- let _fromResultSourceDragEl = this.fromResultSourceDragEl;
2587
- let formRightGroup = this.deepClone(this.formRightGroup);
2588
- let fieldList = this.deepClone(this.fieldList);
2589
- if (_fromResultSourceDragEl) { //移动
2590
- //从目标源拖拽到数据源
2591
- // 拖拽目标源的下标
2592
- let dragResultSourceIndex = this.resultSource[this.navActive].fields.findIndex(el => el.id == _fromResultSourceDragEl.id);
2593
- //删除目标源中的数据
2594
- this.resultSource[this.navActive].fields.splice(dragResultSourceIndex, 1);
2595
- formRightGroup.splice(formRightGroup.findIndex(el => el.id == _fromResultSourceDragEl.id), 1);
2596
- this.fieldGroupList.forEach(el => {
2597
- if (el.id == _fromResultSourceDragEl.groupId) {
2598
- const elFieldsAll = fieldList.filter(els => els.groupId === el.id);
2599
- el.fields = elFieldsAll.filter(item => !formRightGroup.some(itemB => item.id === itemB.id));
2600
- }
2601
- });
2602
- this.formRightGroup = formRightGroup;
2603
- }
2604
- this.setfieldTabsFrom();
2605
- }
2606
- /**拖拽到目标源时触发
2607
- *
2608
- */
2609
- dragToResultSourceDropped(fieldTabstem, fieldTabsIndex) {
2610
- const _fromDataSourceDragEl = this.fromDataSourceDragEl;
2611
- //从数据源拖拽到目标源
2612
- if (_fromDataSourceDragEl) {
2613
- this.fieldGroupList[this.DataSourceGroupIndex].fields.splice(this.DataSourceFieldIndex, 1);
2614
- this.resultSource[fieldTabsIndex].fields.push(_fromDataSourceDragEl);
2615
- this.formRightGroup.push(_fromDataSourceDragEl);
2616
- }
2617
- this.setfieldTabsFrom();
2618
- }
2619
- /** 从目标源拖拽到目标源*/
2620
- dragToResultSourceItemDropped(fieldsIndex) {
2621
- const _fromResultSourceDragEl = this.fromResultSourceDragEl;
2622
- if (_fromResultSourceDragEl) {
2623
- // 拖拽目标源的下标
2624
- let dragResultSourceIndex = this.resultSource[this.navActive].fields.findIndex(el => el.id == _fromResultSourceDragEl.id);
2625
- //删除目标源中的数据
2626
- this.resultSource[this.navActive].fields.splice(dragResultSourceIndex, 1);
2627
- this.resultSource[this.navActive].fields.splice(fieldsIndex, 0, _fromResultSourceDragEl);
2628
- }
2629
- this.setfieldTabsFrom();
2630
- }
2631
- /**设置formA表单 */
2632
- setfieldTabsFrom() {
2633
- let setArray = [];
2634
- this.resultSource.forEach(el => {
2635
- let fieldsArray = [];
2636
- el.fields.forEach(item => {
2637
- fieldsArray.push({
2638
- "fieldId": item.id || item.fieldId,
2639
- "displayName": item.displayName,
2640
- "required": item?.required,
2641
- "showOnList": item?.showOnList
2642
- });
2643
- });
2644
- setArray.push({
2645
- name: el.name,
2646
- fields: fieldsArray
2647
- });
2648
- });
2649
- this.newEntity.patchValue({
2650
- fieldTabs: setArray
2651
- });
2652
- }
2653
- /**保存表单 */
2654
- save() {
2655
- let input = this.newEntity.value;
2656
- if (this.entryTypesSelect) {
2657
- this._EntryTypeAdminService.update(this.entryTypesSelect.id, input).subscribe(res => {
2658
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
2659
- // this._location.back()
2660
- this.router.navigateByUrl('', { skipLocationChange: true }).then(() => {
2661
- this.router.navigate([`/cms/admin/sections`]);
2662
- this._UpdateListService.updateList();
2663
- });
2664
- });
2665
- return;
2666
- }
2667
- input.sectionId = this.sectionId;
2668
- this._EntryTypeAdminService.create(input).subscribe(res => {
2669
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
2670
- // this._location.back()
2671
- this.router.navigateByUrl('', { skipLocationChange: true }).then(() => {
2672
- this.router.navigate([`/cms/admin/sections`]);
2673
- this._UpdateListService.updateList();
2674
- });
2675
- });
2676
- }
2677
- /**编辑Tabs表单 */
2678
- editFieldTabsFrom;
2679
- /**模态框状态 */
2680
- visibleTabsOpen = false;
2681
- /**是否是忙碌状态 */
2682
- modalBusy = false;
2683
- /**正在编辑的tabs */
2684
- editFieldTabsSelect;
2685
- /**正在选中的nav */
2686
- navActive = 0;
2687
- /**表单控件模板-动态赋值表单控件 */
2688
- editFieldTabsModalSubmitBtn;
2689
- /**模态框状态改变回调 */
2690
- VisibleTabsChange(event) {
2691
- if (!event) {
2692
- this.editFieldTabsSelect = '';
2693
- return;
2694
- }
2695
- }
2696
- /**新建增加FieldTabs */
2697
- addFieldTabs() {
2698
- this.editFieldTabsFrom = this.fb.group(new fieldTabsBase());
2699
- this.visibleTabsOpen = true;
2700
- }
2701
- /**正在编辑的tab下标 */
2702
- newEditFieldTabsIndex;
2703
- /**编辑FieldTabs */
2704
- editFieldTabs(item, i) {
2705
- this.editFieldTabsFrom = this.fb.group(new fieldTabsBase({
2706
- name: item.name
2707
- }));
2708
- this.editFieldTabsSelect = item;
2709
- this.visibleTabsOpen = true;
2710
- this.newEditFieldTabsIndex = i;
2711
- }
2712
- /**保存编辑tabs表单 */
2713
- editFieldTabsSave() {
2714
- //编辑
2715
- if (this.editFieldTabsSelect) {
2716
- this.resultSource[this.newEditFieldTabsIndex].name = this.editFieldTabsFrom.value.name;
2717
- this.navActive = this.newEditFieldTabsIndex;
2718
- }
2719
- else {
2720
- //新建
2721
- this.addControlToFieldTabs(this.editFieldTabsFrom.value.name);
2722
- }
2723
- this.visibleTabsOpen = false;
2724
- this.setfieldTabsFrom();
2725
- }
2726
- /**删除某个tabs表单 */
2727
- deleteFieldTabs(index) {
2728
- this.fieldTabs.removeAt(index);
2729
- this.resultSource.splice(index, 1);
2730
- }
2731
- /**编辑字段模态框状态 */
2732
- visibleEditFieldOpen = false;
2733
- /**编辑字段模态框表单 */
2734
- editFieldFrom;
2735
- /**表单控件模板-动态赋值表单控件-编辑字段 */
2736
- editFieldModalSubmitBtn;
2737
- /**正在编辑的字段下标 */
2738
- EditFieldIndex;
2739
- /**编辑字段模态框状态状态改变回调 */
2740
- VisibleEditFieldChange(event) {
2741
- if (!event) {
2742
- this.EditFieldIndex = undefined;
2743
- return;
2744
- }
2745
- }
2746
- /**打开编辑字段模态框 */
2747
- EditFieldModalOpen(items, elIndex) {
2748
- this.visibleEditFieldOpen = true;
2749
- this.EditFieldIndex = elIndex;
2750
- this.editFieldFrom = this.fb.group(new fieldsBase(this.fieldTabs.value[this.navActive].fields[elIndex]));
2751
- }
2752
- /**保存编辑字段 */
2753
- editFieldSave() {
2754
- let input = this.editFieldFrom.value;
2755
- this.resultSource[this.navActive].fields[this.EditFieldIndex].displayName = input.displayName;
2756
- this.resultSource[this.navActive].fields[this.EditFieldIndex].required = input.required;
2757
- this.resultSource[this.navActive].fields[this.EditFieldIndex].showOnList = input.showOnList;
2758
- this.visibleEditFieldOpen = false;
2759
- this.setfieldTabsFrom();
2760
- }
2761
- /**name表单控件 */
2762
- get nameInput() {
2763
- return this.newEntity.get('name');
2764
- }
2765
- /**字段标签input失去标点生成字段名字 */
2766
- disPlayNameInputBlur(event) {
2767
- let value = event.target.value;
2768
- let pinyin = this._CmsApiService.chineseToPinyin(value);
2769
- let nameInput = this.nameInput;
2770
- if (nameInput.value)
2771
- return;
2772
- nameInput.patchValue(pinyin);
2773
- }
2774
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i3$1.ActivatedRoute }, { token: FieldGroupAdminService }, { token: FieldAdminService }, { token: EntryTypeAdminService }, { token: i1.LocalizationService }, { token: CmsApiService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component });
2775
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateOrEditComponent, selector: "cms-create-or-edit", providers: [
2776
- {
2777
- provide: EXTENSIONS_IDENTIFIER,
2778
- useValue: ECmsComponent.SectionsCreateOrEdit,
2779
- },
2780
- ], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "editFieldTabsModalSubmitBtn", first: true, predicate: ["editFieldTabsModalSubmitBtn"], descendants: true }, { propertyName: "editFieldModalSubmitBtn", first: true, predicate: ["editFieldModalSubmitBtn"], descendants: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\" [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <!-- -->\n <div class=\"row\">\n <div class=\"col-sm-8\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\">\n <button type=\"button\" ngbDropdown ngbNavLink>\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <li ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </li>\n <li ngbDropdownItem\n *ngIf=\"resultSource.length !== 1\" type=\"button\"\n (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </li>\n </div>\n </button>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\" style=\"height: 100%;\">\n <p class=\"form-text\" *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\" style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul>\n \n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\"\n (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\"\n ondragover=\"event.preventDefault();\" (drop)=\"dragToDataSourceDropped()\"\n style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n </div>\n </abp-page>\n\n</form>\n\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" (ngSubmit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldTabsFrom.valid\"\n (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (ngSubmit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showOnList\"\n id=\"showOnList\" />\n <label class=\"form-check-label\" for=\"showOnList\"> {{'Cms::ShowOnList' | abpLocalization}} </label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i7$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "directive", type: i10.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i10.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i10.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i10.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i10.NgbNavLinkButton, selector: "button[ngbNavLink]" }, { kind: "directive", type: i10.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i10.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i10.NgbAccordionButton, selector: "button[ngbAccordionButton]" }, { kind: "directive", type: i10.NgbAccordionDirective, selector: "[ngbAccordion]", inputs: ["animation", "closeOthers", "destroyOnHide"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordion"] }, { kind: "directive", type: i10.NgbAccordionItem, selector: "[ngbAccordionItem]", inputs: ["ngbAccordionItem", "destroyOnHide", "disabled", "collapsed"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordionItem"] }, { kind: "directive", type: i10.NgbAccordionHeader, selector: "[ngbAccordionHeader]" }, { kind: "directive", type: i10.NgbAccordionBody, selector: "[ngbAccordionBody]" }, { kind: "directive", type: i10.NgbAccordionCollapse, selector: "[ngbAccordionCollapse]", exportAs: ["ngbAccordionCollapse"] }, { kind: "component", type: i9.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
2781
- }
2782
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditComponent, decorators: [{
2783
- type: Component,
2784
- args: [{ selector: 'cms-create-or-edit', providers: [
2785
- {
2786
- provide: EXTENSIONS_IDENTIFIER,
2787
- useValue: ECmsComponent.SectionsCreateOrEdit,
2788
- },
2789
- ], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\" [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <!-- -->\n <div class=\"row\">\n <div class=\"col-sm-8\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\">\n <button type=\"button\" ngbDropdown ngbNavLink>\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <li ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </li>\n <li ngbDropdownItem\n *ngIf=\"resultSource.length !== 1\" type=\"button\"\n (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </li>\n </div>\n </button>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\" style=\"height: 100%;\">\n <p class=\"form-text\" *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\" style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul>\n \n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\"\n (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\"\n ondragover=\"event.preventDefault();\" (drop)=\"dragToDataSourceDropped()\"\n style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n </div>\n </abp-page>\n\n</form>\n\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" (ngSubmit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldTabsFrom.valid\"\n (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (ngSubmit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showOnList\"\n id=\"showOnList\" />\n <label class=\"form-check-label\" for=\"showOnList\"> {{'Cms::ShowOnList' | abpLocalization}} </label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}\n"] }]
2790
- }], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: FieldGroupAdminService }, { type: FieldAdminService }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: CmsApiService }, { type: i3$1.Router }]; }, propDecorators: { submitclick: [{
2791
- type: ViewChild,
2792
- args: ['submitclick', { static: true }]
2793
- }], editFieldTabsModalSubmitBtn: [{
2794
- type: ViewChild,
2795
- args: ['editFieldTabsModalSubmitBtn', { static: false }]
2796
- }], editFieldModalSubmitBtn: [{
2797
- type: ViewChild,
2798
- args: ['editFieldModalSubmitBtn', { static: false }]
2799
- }] } });
2800
-
2801
- class EntryConfig {
2802
- /**多选 */
2803
- 'Entry.Multiple' = [false, []];
2804
- /**占位符 */
2805
- 'Entry.Placeholder' = ['', []];
2806
- /**版块id */
2807
- 'Entry.SectionId' = ['', []];
2808
- constructor(data) {
2809
- if (data) {
2810
- for (const key in data) {
2811
- if (data.hasOwnProperty(key)) {
2812
- this[key] = data[key];
2813
- }
2814
- }
2815
- }
2816
- }
2817
- }
2818
-
2819
- class EntryConfigComponent {
2820
- fb;
2821
- _SiteAdminService;
2822
- _SectionAdminService;
2823
- constructor(fb, _SiteAdminService, _SectionAdminService) {
2824
- this.fb = fb;
2825
- this._SiteAdminService = _SiteAdminService;
2826
- this._SectionAdminService = _SectionAdminService;
2827
- }
2828
- /**表单控件类型 */
2829
- _type;
2830
- set type(v) {
2831
- if (v == this._type)
2832
- return;
2833
- this._type = v;
2834
- }
2835
- /**表单实体 */
2836
- _Entity;
2837
- set Entity(v) {
2838
- this._Entity = v;
2839
- }
2840
- /**选择的表单信息 */
2841
- _selected;
2842
- set selected(v) {
2843
- this._selected = v;
2844
- }
2845
- /**语言 */
2846
- _culture;
2847
- set culture(v) {
2848
- this._culture = v;
2849
- }
2850
- get formConfiguration() {
2851
- return this._Entity.get('formConfiguration');
2852
- }
2853
- submitclick;
2854
- /**站点列表 */
2855
- siteList = [];
2856
- /**选择的站点id */
2857
- // siteId: string = ''
2858
- siteId = new FormControl('');
2859
- /**站点下的版块 */
2860
- SiteOfSectionList = [];
2861
- ngAfterContentInit() {
2862
- //Called after ngOnInit when the component's or directive's content has been initialized.
2863
- //Add 'implements AfterContentInit' to the class.
2864
- this.dataLoaded(2);
2865
- }
2866
- async dataLoaded(val) {
2867
- if (this._Entity && this._type) {
2868
- await this.AfterInit();
2869
- this.submitclick.nativeElement.click();
2870
- }
2871
- }
2872
- AfterInit() {
2873
- return new Promise(async (resolve, rejects) => {
2874
- this._Entity.setControl('formConfiguration', this.fb.group(new EntryConfig()));
2875
- await this.getsiteList();
2876
- await this.getSiteOfSectionList();
2877
- if (this._selected) {
2878
- this.formConfiguration.patchValue({
2879
- ...this._selected.formConfiguration
2880
- });
2881
- }
2882
- resolve(true);
2883
- });
2884
- }
2885
- /**获取站点列表 */
2886
- getsiteList() {
2887
- return new Promise((resolve, rejects) => {
2888
- this._SiteAdminService.getList({}).subscribe(res => {
2889
- this.siteList = res.items;
2890
- this.siteId = res.items[0]?.id || '';
2891
- resolve(res.items);
2892
- });
2893
- });
2894
- }
2895
- /**获取站点下的版块 */
2896
- getSiteOfSectionList() {
2897
- return new Promise((resolve, rejects) => {
2898
- this._SectionAdminService.getList({
2899
- maxResultCount: 1000,
2900
- siteId: this.siteId
2901
- }).subscribe(res => {
2902
- this.SiteOfSectionList = res.items;
2903
- this.formConfiguration.patchValue({
2904
- 'Entry.SectionId': res.items[0]?.id || ''
2905
- });
2906
- resolve(res.items);
2907
- });
2908
- });
2909
- }
2910
- /**切换站点 */
2911
- async siteIdChange() {
2912
- await this.getSiteOfSectionList();
2913
- }
2914
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: SiteAdminService }, { token: SectionAdminService }], target: i0.ɵɵFactoryTarget.Component });
2915
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EntryConfigComponent, selector: "cms-entry-config", inputs: { type: "type", Entity: "Entity", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Sites' | abpLocalization}}</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"siteId\" (change)=\"siteIdChange()\">\n <ng-container *ngFor=\"let item of siteList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n</div>\n<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n \n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}</label>\n <select class=\"form-select col-auto\" formControlName=\"Entry.SectionId\">\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Entry.Multiple\" id=\"Multiple\">\n <label class=\"form-check-label\" for=\"Multiple\">\n {{'Cms::Multiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Entry.Placeholder\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i7$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
2916
- }
2917
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryConfigComponent, decorators: [{
2918
- type: Component,
2919
- args: [{ selector: 'cms-entry-config', template: "<div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Sites' | abpLocalization}}</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"siteId\" (change)=\"siteIdChange()\">\n <ng-container *ngFor=\"let item of siteList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n</div>\n<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n \n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}</label>\n <select class=\"form-select col-auto\" formControlName=\"Entry.SectionId\">\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Entry.Multiple\" id=\"Multiple\">\n <label class=\"form-check-label\" for=\"Multiple\">\n {{'Cms::Multiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Entry.Placeholder\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>" }]
2920
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: SiteAdminService }, { type: SectionAdminService }]; }, propDecorators: { type: [{
2921
- type: Input
2922
- }], Entity: [{
2923
- type: Input
2924
- }], selected: [{
2925
- type: Input
2926
- }], culture: [{
2927
- type: Input
2928
- }], submitclick: [{
2929
- type: ViewChild,
2930
- args: ['submitclick', { static: true }]
2931
- }] } });
2932
-
2933
- class EntryControlComponent {
2934
- constructor() {
2935
- }
2936
- fb = inject(FormBuilder);
2937
- _EntryAdminService = inject(EntryAdminService);
2938
- /**表单实体 */
2939
- _entity;
2940
- set entity(v) {
2941
- this._entity = v;
2942
- if (v)
2943
- this.dataLoaded();
2944
- }
2945
- /**字段配置列表 */
2946
- _fields = '';
2947
- set fields(v) {
2948
- this._fields = v;
2949
- if (v)
2950
- this.dataLoaded();
2951
- }
2952
- /**父级字段名称,用于为表单设置控件赋值 */
2953
- _parentFiledName;
2954
- set parentFiledName(v) {
2955
- this._parentFiledName = v;
2956
- if (v)
2957
- this.dataLoaded();
2958
- }
2959
- /**父级字段名称,用于为表单设置控件赋值 */
2960
- _selected;
2961
- set selected(v) {
2962
- this._selected = v || [];
2963
- if (v)
2964
- this.dataLoaded();
2965
- }
2966
- /**语言 */
2967
- _culture;
2968
- set culture(v) {
2969
- if (v) {
2970
- this._culture = v;
2971
- this.dataLoaded();
2972
- }
2973
- }
2974
- submitclick;
2975
- extraProperties;
2976
- /** */
2977
- listOfOption = [];
2978
- async dataLoaded() {
2979
- if (this._fields && this._entity && this._parentFiledName && this._culture) {
2980
- await this.AfterInit();
2981
- await this.getEntryAssignList();
2982
- this.submitclick.nativeElement.click();
2983
- }
2984
- }
2985
- AfterInit() {
2986
- return new Promise((resolve, rejects) => {
2987
- let ValidatorsArray = [];
2988
- if (this._fields.required) {
2989
- ValidatorsArray.push(Validators.required);
2990
- }
2991
- let newControl = this.fb.control(this._selected, ValidatorsArray);
2992
- let extraProperties = this._entity.get(this._parentFiledName);
2993
- extraProperties.setControl(this._fields.field.name, newControl);
2994
- resolve(true);
2995
- });
2996
- }
2997
- /**获取对应的条目 */
2998
- getEntryAssignList(filter = '') {
2999
- return new Promise((resolve, rejects) => {
3000
- this._EntryAdminService.getList({
3001
- culture: this._culture,
3002
- sectionId: this._fields.field.formConfiguration['Entry.SectionId'],
3003
- skipCount: 0,
3004
- maxResultCount: 30,
3005
- status: EntryStatus.Published,
3006
- filter: filter
3007
- }).subscribe(res => {
3008
- this.listOfOption = res.items;
3009
- resolve(true);
3010
- });
3011
- });
3012
- }
3013
- /** */
3014
- async SelectChange(event) {
3015
- await this.getEntryAssignList(event);
3016
- }
3017
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3018
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EntryControlComponent, selector: "cms-entry-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-2\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <div class=\"form-select\">\r\n <nz-select [nzMaxTagCount]=\"5\" (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </div>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <div class=\"form-select\">\r\n <nz-select nzShowSearch (nzOnSearch)=\"SelectChange($event)\" [nzMaxMultipleCount]=\"1\" nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: ["::ng-deep .entry-control-page .form-select{padding:0}::ng-deep .entry-control-page nz-select{width:100%}::ng-deep .entry-control-page nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.275rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .entry-control-page nz-select .anticon-search,::ng-deep .entry-control-page nz-select .anticon-down{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i7$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i7$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.NzOptionComponent, selector: "nz-option", inputs: ["nzLabel", "nzValue", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }] });
3019
- }
3020
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryControlComponent, decorators: [{
3021
- type: Component,
3022
- args: [{ selector: 'cms-entry-control', template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-2\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <div class=\"form-select\">\r\n <nz-select [nzMaxTagCount]=\"5\" (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </div>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <div class=\"form-select\">\r\n <nz-select nzShowSearch (nzOnSearch)=\"SelectChange($event)\" [nzMaxMultipleCount]=\"1\" nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: ["::ng-deep .entry-control-page .form-select{padding:0}::ng-deep .entry-control-page nz-select{width:100%}::ng-deep .entry-control-page nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.275rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .entry-control-page nz-select .anticon-search,::ng-deep .entry-control-page nz-select .anticon-down{display:none}\n"] }]
3023
- }], ctorParameters: function () { return []; }, propDecorators: { entity: [{
3024
- type: Input
3025
- }], fields: [{
3026
- type: Input
3027
- }], parentFiledName: [{
3028
- type: Input
3029
- }], selected: [{
3030
- type: Input
3031
- }], culture: [{
3032
- type: Input
3033
- }], submitclick: [{
3034
- type: ViewChild,
3035
- args: ['submitclick', { static: true }]
3036
- }] } });
3037
-
3038
- // import { MatrixConfigComponent } from "./matrix/matrix-config.component";
3039
- // import { MatrixControlComponent } from "./matrix/matrix-control.component";
3040
- // import { TableConfigComponent, TableControlComponent } from "./table";
3041
- /**
3042
- * 表单控件分组-包含配置,控件,显示的数组
3043
- */
3044
- const FieldControlGroup = [
3045
- // {
3046
- // displayName: '表格',
3047
- // name: 'Table',
3048
- // fieldConfigComponent: TableConfigComponent,
3049
- // fieldComponent: TableControlComponent,
3050
- // // fieldViewComponent:TextBoxViewComponent,
3051
- // },
3052
- // {
3053
- // displayName: '矩阵',
3054
- // name: 'Matrix',
3055
- // fieldConfigComponent: MatrixConfigComponent,
3056
- // fieldComponent: MatrixControlComponent,
3057
- // // fieldViewComponent:TextBoxViewComponent,
3058
- // },
3059
- {
3060
- displayName: '条目',
3061
- name: 'Entry',
3062
- fieldConfigComponent: EntryConfigComponent,
3063
- fieldComponent: EntryControlComponent,
3064
- // fieldViewComponent:TextBoxViewComponent,
3065
- },
3066
- ];
3067
-
3068
- // export * from './table'
3069
- // export * from './matrix'
3070
-
3071
- /**版块 */
3072
- const Sections_Defaults_Toolbar_Action = ToolbarAction.createMany([
3073
- {
3074
- text: 'Cms::New',
3075
- action: data => {
3076
- const component = data.getInjected(SectionsComponent);
3077
- component.createSectionBtn();
3078
- },
3079
- btnClass: '',
3080
- permission: 'CmsAdmin.Entry.Create',
3081
- icon: 'fa fa-plus',
3082
- },
3083
- ]);
3084
- /**版块-创建-编辑 */
3085
- const Sections_Create_Or_Edit_Defaults_Toolbar_Action = ToolbarAction.createMany([
3086
- {
3087
- text: 'AbpUi::Save',
3088
- action: data => {
3089
- const component = data.getInjected(CreateOrEditComponent);
3090
- component.submitclickBtn();
3091
- },
3092
- btnClass: '',
3093
- permission: 'CmsAdmin.Entry.Create',
3094
- icon: 'fas fa-save',
3095
- },
3096
- ]);
3097
- /**站点 */
3098
- const Sites_Defaults_Toolbar_Action = ToolbarAction.createMany([
3099
- {
3100
- text: 'Cms::New',
3101
- action: data => {
3102
- const component = data.getInjected(SitesComponent);
3103
- component.createSitesBtn();
3104
- },
3105
- btnClass: '',
3106
- permission: 'CmsAdmin.Entry.Create',
3107
- icon: 'fa fa-plus',
3108
- },
3109
- ]);
3110
- /**字段 */
3111
- const Fields_Defaults_Toolbar_Action = ToolbarAction.createMany([
3112
- {
3113
- text: 'Cms::New',
3114
- action: data => {
3115
- const component = data.getInjected(FieldsComponent);
3116
- component.toFieldsCreateBtn();
3117
- },
3118
- btnClass: '',
3119
- permission: 'CmsAdmin.Entry.Create',
3120
- icon: 'fa fa-plus',
3121
- },
3122
- ]);
3123
- /**字段-创建 */
3124
- const Fields_Create_Defaults_Toolbar_Action = ToolbarAction.createMany([
3125
- {
3126
- text: 'AbpUi::Save',
3127
- action: data => {
3128
- const component = data.getInjected(CreateFieldComponent);
3129
- component.submitclickBtn();
3130
- },
3131
- btnClass: '',
3132
- permission: 'CmsAdmin.Entry.Create',
3133
- icon: 'fa fa-plus',
3134
- },
3135
- ]);
3136
- /**字段-创建 */
3137
- const Fields_Edit_Defaults_Toolbar_Action = ToolbarAction.createMany([
3138
- {
3139
- text: 'AbpUi::Save',
3140
- action: data => {
3141
- const component = data.getInjected(EditFieldComponent);
3142
- component.submitclickBtn();
3143
- },
3144
- btnClass: '',
3145
- permission: 'CmsAdmin.Entry.Create',
3146
- icon: 'fa fa-plus',
3147
- },
3148
- ]);
3149
- /**条目 */
3150
- const Entries_Defaults_Toolbar_Action = ToolbarAction.createMany([
3151
- {
3152
- text: 'Cms::New',
3153
- action: data => {
3154
- const component = data.getInjected(EntriesComponent);
3155
- component.createEntriesBtn();
3156
- },
3157
- btnClass: '',
3158
- permission: 'CmsAdmin.Entry.Create',
3159
- icon: 'fa fa-plus',
3160
- },
3161
- ]);
3162
- /**条目-创建 */
3163
- const Entries_Create_Defaults_Toolbar_Action = ToolbarAction.createMany([
3164
- {
3165
- text: 'AbpUi::Cancel',
3166
- action: data => {
3167
- const component = data.getInjected(CreateComponent);
3168
- component.backTo();
3169
- },
3170
- btnClass: 'btn btn-light btn-sm',
3171
- permission: 'CmsAdmin.Entry.Create',
3172
- icon: '',
3173
- },
3174
- {
3175
- text: 'AbpUi::Save',
3176
- action: data => {
3177
- const component = data.getInjected(CreateComponent);
3178
- component.clickSubmit(true);
3179
- },
3180
- btnClass: 'btn btn-info btn-sm',
3181
- permission: 'CmsAdmin.Entry.Create',
3182
- icon: 'fas fa-save',
3183
- },
3184
- {
3185
- text: 'Cms::Publish',
3186
- action: data => {
3187
- const component = data.getInjected(CreateComponent);
3188
- component.clickSubmit(false);
3189
- },
3190
- btnClass: '',
3191
- permission: 'CmsAdmin.Entry.Create',
3192
- icon: 'fa fa-paper-plane',
3193
- },
3194
- ]);
3195
- /**条目编辑 */
3196
- const Entries_Edit_Defaults_Toolbar_Action = ToolbarAction.createMany([
3197
- {
3198
- text: 'AbpUi::Cancel',
3199
- action: data => {
3200
- const component = data.getInjected(EditComponent);
3201
- component.backTo();
3202
- },
3203
- btnClass: 'btn btn-light btn-sm',
3204
- permission: 'CmsAdmin.Entry.Create',
3205
- icon: '',
3206
- },
3207
- {
3208
- text: 'AbpUi::Save',
3209
- action: data => {
3210
- const component = data.getInjected(EditComponent);
3211
- component.clickSubmit(true);
3212
- },
3213
- btnClass: 'btn btn-info btn-sm',
3214
- permission: 'CmsAdmin.Entry.Create',
3215
- icon: 'fas fa-save',
3216
- },
3217
- {
3218
- text: 'Cms::Publish',
3219
- action: data => {
3220
- const component = data.getInjected(EditComponent);
3221
- component.clickSubmit(false);
3222
- },
3223
- btnClass: '',
3224
- permission: 'CmsAdmin.Entry.Create',
3225
- icon: 'fa fa-paper-plane',
3226
- },
3227
- ]);
3228
-
3229
- // import { Entries_Defaults_Toolbar_Action, Entries_Create_Defaults_Toolbar_Action, Entries_Edit_Defaults_Toolbar_Action, Fields_Defaults_Toolbar_Action, Fields_Create_Defaults_Toolbar_Action, Fields_Edit_Defaults_Toolbar_Action, Sites_Defaults_Toolbar_Action, Sections_Defaults_Toolbar_Action, Sections_Create_Or_Edit_Defaults_Toolbar_Action } from "../toolbar-config";
3230
- const ActionGroup = {
3231
- Entries: Entries_Defaults_Toolbar_Action,
3232
- Entries_Create: Entries_Create_Defaults_Toolbar_Action,
3233
- Entries_Edit: Entries_Edit_Defaults_Toolbar_Action,
3234
- Fields: Fields_Defaults_Toolbar_Action,
3235
- FieldsCreate: Fields_Create_Defaults_Toolbar_Action,
3236
- FieldsEdit: Fields_Edit_Defaults_Toolbar_Action,
3237
- Sites: Sites_Defaults_Toolbar_Action,
3238
- Sections: Sections_Defaults_Toolbar_Action,
3239
- SectionsCreateOrEdit: Sections_Create_Or_Edit_Defaults_Toolbar_Action,
3240
- };
3241
- const setCmsAction = () => {
3242
- let Cms_Default = {};
3243
- for (const iterator in ECmsComponent) {
3244
- Cms_Default[ECmsComponent[iterator]] = ActionGroup[iterator];
3245
- }
3246
- return Cms_Default;
3247
- };
3248
- /**用于路由守卫增加工具栏按钮 */
3249
- const Cms_Default_Toolbar_Actions = setCmsAction();
3250
- /**
3251
- *
3252
- * @param 在identityExtensionsResolver方法中使用
3253
- *
3254
- * @param 在cms.module.ts中使用,
3255
- export class CmsModule {
3256
- static forChild(options: any = {}): ModuleWithProviders<CmsModule> {
3257
- return {
3258
- ngModule: CmsModule,
3259
- providers: [
3260
- {
3261
- provide: CMS_TOOLBAR_ACTION_CONTRIBUTORS,
3262
- useValue: options.toolbarActionContributors,
3263
- // useValue: identityToolbarActionContributors,
3264
- },
3265
- // IdentityExtensionsGuard,
3266
- ]
3267
- };
3268
- }
3269
- static forLazy(options: any = {}): NgModuleFactory<CmsModule> {
3270
- return new LazyModuleFactory(CmsModule.forChild(options));
3271
- }
3272
- }
3273
- *
3274
- *
3275
- */
3276
- const CMS_TOOLBAR_ACTION_CONTRIBUTORS = new InjectionToken('CMS_TOOLBAR_ACTION_CONTRIBUTORS');
3277
- /**用于放在cms-routing.module.ts路由守卫中
3278
- *
3279
- *
3280
- const routes: Routes = [
3281
- {
3282
- path: 'demo',
3283
- canActivate: [AuthGuard, PermissionGuard],
3284
- resolve: [identityExtensionsResolver],
3285
- children: []
3286
- },
3287
- ]
3288
- *
3289
- *
3290
- */
3291
- const CmsExtensionsResolver = () => {
3292
- const configState = inject(ConfigStateService);
3293
- const extensions = inject(ExtensionsService);
3294
- const config = { optional: true };
3295
- const toolbarContributors = inject(CMS_TOOLBAR_ACTION_CONTRIBUTORS, config) || {};
3296
- return getObjectExtensionEntitiesFromStore(configState, 'Cms').pipe(map(entities => ({
3297
- // [ECmseComponents.UsePage]: entities.Role,
3298
- // [eIdentityComponents.Users]: entities.User,
3299
- })), mapEntitiesToContributors(configState, 'Cms'), tap(objectExtensionContributors => {
3300
- mergeWithDefaultActions(extensions.toolbarActions, Cms_Default_Toolbar_Actions, toolbarContributors);
3301
- }));
3302
- };
3303
-
3304
- var styles = `
3305
- // /* 垂直滚动条样式 */
3306
- // /* 宽度 */
3307
- // ::-webkit-scrollbar {
3308
- // width: 8px;
3309
- // height: 8px;
3310
- // }
3311
- // /* 背景色 */
3312
- // ::-webkit-scrollbar-track {
3313
- // background-color: #f5f5f5;
3314
- // }
3315
- // /* 滑块颜色 */
3316
- // ::-webkit-scrollbar-thumb {
3317
- // background-color: #c1c1c1;
3318
-
3319
- // border-radius: 50px;
3320
- // }
3321
-
3322
- .lpx-content-container .lpx-content {
3323
- min-height: calc(100vh - 34px);
3324
- padding: 1.25em 2em 1.25em;
3325
- }
3326
-
3327
- h1,h2,h3,h4,h5,h6{
3328
- color: inherit;
3329
- }
3330
- .lpx-settings .lpx-context-menu {
3331
- overflow: auto;
3332
- }
3333
-
3334
- `;
3335
-
3336
- let isAppentStyle = false;
3337
- function appentStyle() {
3338
- /**确保该路由守卫只会执行一次 */
3339
- if (isAppentStyle)
3340
- return;
3341
- isAppentStyle = true;
3342
- const rendererFactory = inject(RendererFactory2);
3343
- let renderer = rendererFactory.createRenderer(null, null);
3344
- const style = renderer.createElement('style');
3345
- renderer.setProperty(style, 'innerHTML', styles);
3346
- renderer.appendChild(document.head, style);
3347
- }
3348
-
3349
- const routes = [
3350
- {
3351
- path: 'admin',
3352
- canActivate: [AuthGuard, PermissionGuard],
3353
- resolve: [CmsExtensionsResolver, appentStyle],
3354
- children: [
3355
- {
3356
- path: 'entries',
3357
- children: [
3358
- {
3359
- path: '',
3360
- component: EntriesComponent,
3361
- data: { keep: true }
3362
- },
3363
- {
3364
- path: 'create',
3365
- component: CreateComponent,
3366
- },
3367
- {
3368
- path: ':entrieId/edit',
3369
- component: EditComponent,
3370
- },
3371
- ],
3372
- },
3373
- {
3374
- path: '',
3375
- children: [
3376
- {
3377
- path: 'fields',
3378
- children: [
3379
- {
3380
- path: '',
3381
- component: FieldsComponent,
3382
- data: { keep: true }
3383
- },
3384
- {
3385
- path: 'create',
3386
- component: CreateFieldComponent,
3387
- },
3388
- {
3389
- path: ':id/edit',
3390
- component: EditFieldComponent,
3391
- },
3392
- ],
3393
- },
3394
- {
3395
- path: 'sites',
3396
- component: SitesComponent,
3397
- data: { keep: true }
3398
- },
3399
- {
3400
- path: 'sections',
3401
- children: [
3402
- {
3403
- path: '',
3404
- data: { keep: true },
3405
- component: SectionsComponent,
3406
- },
3407
- {
3408
- path: ':sectionsId/entry-types',
3409
- children: [
3410
- {
3411
- path: 'create',
3412
- component: CreateOrEditComponent,
3413
- },
3414
- {
3415
- path: ':entryTypesId/edit',
3416
- component: CreateOrEditComponent,
3417
- },
3418
- ],
3419
- },
3420
- ],
3421
- },
3422
- ],
3423
- },
3424
- ],
3425
- },
3426
- ];
3427
- class CmsRoutingModule {
3428
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3429
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CmsRoutingModule, imports: [i3$1.RouterModule], exports: [RouterModule] });
3430
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
3431
- }
3432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsRoutingModule, decorators: [{
3433
- type: NgModule,
3434
- args: [{
3435
- imports: [RouterModule.forChild(routes)],
3436
- exports: [RouterModule],
3437
- }]
3438
- }] });
3439
-
3440
- class SimpleReuseStrategy {
3441
- handlers = {};
3442
- //表示对路由允许复用
3443
- shouldDetach(route) {
3444
- //默认对所有路由复用 可通过给路由配置项增加data: { keep: true }来进行选择性使用,代码如下
3445
- //如果是懒加载路由需要在生命组件的位置进行配置
3446
- if (!route.data.keep) {
3447
- return false;
3448
- }
3449
- return true;
3450
- }
3451
- //当路由离开时会触发。按path作为key存储路由快照&组件当前实例对象
3452
- store(route, handle) {
3453
- const key = route.component.name;
3454
- if (key) {
3455
- this.handlers[key] = handle;
3456
- }
3457
- }
3458
- //若path在缓存中有的都认为允许还原路由
3459
- shouldAttach(route) {
3460
- if (route.component?.name) {
3461
- return !!this.handlers[route.component?.name];
3462
- }
3463
- return false;
3464
- }
3465
- // 从缓存中获取快照,若无则返回null
3466
- retrieve(route) {
3467
- if (!route.routeConfig)
3468
- return null;
3469
- //在loadChildren路径上通过修改自定义RouteReuseStrategy中的检索函数时从不检索分离的路由。
3470
- if (route.routeConfig.loadChildren)
3471
- return null;
3472
- if (route.component?.name) {
3473
- return this.handlers[route.component?.name];
3474
- }
3475
- return null;
3476
- }
3477
- //进入路由触发,判断是否同一路由
3478
- shouldReuseRoute(future, current) {
3479
- return future.routeConfig === current.routeConfig;
3480
- }
3481
- }
3482
-
3483
- class CmsModule {
3484
- static forChild(options = {}) {
3485
- return {
3486
- ngModule: CmsModule,
3487
- providers: [
3488
- {
3489
- provide: CMS_TOOLBAR_ACTION_CONTRIBUTORS,
3490
- useValue: options.toolbarActionContributors,
3491
- },
3492
- ],
3493
- };
3494
- }
3495
- static forLazy(options = {}) {
3496
- return new LazyModuleFactory(CmsModule.forChild(options));
3497
- }
3498
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3499
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CmsModule, declarations: [EntriesComponent,
3500
- FieldsComponent,
3501
- SitesComponent,
3502
- SectionsComponent,
3503
- FieldGroupComponent,
3504
- CreateFieldComponent,
3505
- EditFieldComponent,
3506
- CreateOrEditFieldComponent,
3507
- CreateOrEditComponent,
3508
- CreateComponent,
3509
- EditComponent,
3510
- CreateOrEditEntriesComponent,
3511
- // TableConfigComponent,
3512
- // TableControlComponent,
3513
- // MatrixConfigComponent,
3514
- // MatrixControlComponent,
3515
- EntryConfigComponent,
3516
- EntryControlComponent], imports: [CoreModule,
3517
- ThemeSharedModule,
3518
- CmsRoutingModule,
3519
- NgbDropdownModule,
3520
- FormsModule,
3521
- ReactiveFormsModule,
3522
- NgxValidateCoreModule,
3523
- NgbNavModule,
3524
- NgbAccordionModule,
3525
- DragDropModule,
3526
- PageModule,
3527
- CommercialUiConfigModule,
3528
- NzSelectModule,
3529
- NzTableModule,
3530
- ScrollingModule, i11.DynamicFormModule, DynamicComponent], exports: [
3531
- // TableConfigComponent,
3532
- // TableControlComponent,
3533
- // MatrixConfigComponent,
3534
- // MatrixControlComponent,
3535
- EntryConfigComponent,
3536
- EntryControlComponent] });
3537
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsModule, providers: [
3538
- { provide: NgbDateAdapter, useClass: DateAdapter },
3539
- { provide: RouteReuseStrategy, useClass: SimpleReuseStrategy }
3540
- ], imports: [CoreModule,
3541
- ThemeSharedModule,
3542
- CmsRoutingModule,
3543
- NgbDropdownModule,
3544
- FormsModule,
3545
- ReactiveFormsModule,
3546
- NgxValidateCoreModule,
3547
- NgbNavModule,
3548
- NgbAccordionModule,
3549
- DragDropModule,
3550
- PageModule,
3551
- CommercialUiConfigModule,
3552
- NzSelectModule,
3553
- NzTableModule,
3554
- ScrollingModule,
3555
- DynamicFormModule.forRoot({
3556
- cmsFieldControlGroup: FieldControlGroup
3557
- }),
3558
- DynamicComponent] });
3559
- }
3560
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsModule, decorators: [{
3561
- type: NgModule,
3562
- args: [{
3563
- declarations: [
3564
- EntriesComponent,
3565
- FieldsComponent,
3566
- SitesComponent,
3567
- SectionsComponent,
3568
- FieldGroupComponent,
3569
- CreateFieldComponent,
3570
- EditFieldComponent,
3571
- CreateOrEditFieldComponent,
3572
- CreateOrEditComponent,
3573
- CreateComponent,
3574
- EditComponent,
3575
- CreateOrEditEntriesComponent,
3576
- // TableConfigComponent,
3577
- // TableControlComponent,
3578
- // MatrixConfigComponent,
3579
- // MatrixControlComponent,
3580
- EntryConfigComponent,
3581
- EntryControlComponent,
3582
- ],
3583
- imports: [
3584
- CoreModule,
3585
- ThemeSharedModule,
3586
- CmsRoutingModule,
3587
- NgbDropdownModule,
3588
- FormsModule,
3589
- ReactiveFormsModule,
3590
- NgxValidateCoreModule,
3591
- NgbNavModule,
3592
- NgbAccordionModule,
3593
- DragDropModule,
3594
- PageModule,
3595
- CommercialUiConfigModule,
3596
- NzSelectModule,
3597
- NzTableModule,
3598
- ScrollingModule,
3599
- DynamicFormModule.forRoot({
3600
- cmsFieldControlGroup: FieldControlGroup
3601
- }),
3602
- DynamicComponent,
3603
- ],
3604
- exports: [
3605
- // TableConfigComponent,
3606
- // TableControlComponent,
3607
- // MatrixConfigComponent,
3608
- // MatrixControlComponent,
3609
- EntryConfigComponent,
3610
- EntryControlComponent,
3611
- ],
3612
- providers: [
3613
- { provide: NgbDateAdapter, useClass: DateAdapter },
3614
- { provide: RouteReuseStrategy, useClass: SimpleReuseStrategy }
3615
- ],
3616
- }]
3617
- }] });
3618
-
3619
- var index$l = /*#__PURE__*/Object.freeze({
3620
- __proto__: null,
3621
- DynamicForms: index$o,
3622
- Entries: index$r,
3623
- Fields: index$n,
3624
- Sections: index$p,
3625
- Sites: index$q
3626
- });
3627
-
3628
- var index$k = /*#__PURE__*/Object.freeze({
3629
- __proto__: null
3630
- });
3631
-
3632
- var index$j = /*#__PURE__*/Object.freeze({
3633
- __proto__: null,
3634
- Data: index$k
3635
- });
3636
-
3637
- let FileDescriptorService$1 = class FileDescriptorService {
3638
- restService;
3639
- apiName = 'FileExplorer';
3640
- create = (input, config) => this.restService.request({
3641
- method: 'POST',
3642
- url: '/api/file-explorer/directories',
3643
- body: input,
3644
- }, { apiName: this.apiName, ...config });
3645
- delete = (id, config) => this.restService.request({
3646
- method: 'DELETE',
3647
- url: `/api/file-explorer/directories/${id}`,
3648
- }, { apiName: this.apiName, ...config });
3649
- get = (id, config) => this.restService.request({
3650
- method: 'GET',
3651
- url: `/api/file-explorer/directories/${id}`,
3652
- }, { apiName: this.apiName, ...config });
3653
- getList = (input, config) => this.restService.request({
3654
- method: 'GET',
3655
- url: '/api/file-explorer/directories',
3656
- params: { containerName: input.containerName },
3657
- }, { apiName: this.apiName, ...config });
3658
- move = (id, input, config) => this.restService.request({
3659
- method: 'PUT',
3660
- url: `/api/file-explorer/directories/${id}/move`,
3661
- body: input,
3662
- }, { apiName: this.apiName, ...config });
3663
- update = (id, input, config) => this.restService.request({
3664
- method: 'PUT',
3665
- url: `/api/file-explorer/directories/${id}`,
3666
- body: input,
3667
- }, { apiName: this.apiName, ...config });
3668
- constructor(restService) {
3669
- this.restService = restService;
3670
- }
3671
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FileDescriptorService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
3672
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FileDescriptorService, providedIn: 'root' });
3673
- };
3674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FileDescriptorService$1, decorators: [{
3675
- type: Injectable,
3676
- args: [{
3677
- providedIn: 'root',
3678
- }]
3679
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
3680
-
3681
- var index$i = /*#__PURE__*/Object.freeze({
3682
- __proto__: null,
3683
- FileDescriptorService: FileDescriptorService$1
3684
- });
3685
-
3686
- class FileDescriptorService {
3687
- restService;
3688
- apiName = 'FileExplorer';
3689
- create = (input, config) => this.restService.request({
3690
- method: 'POST',
3691
- url: '/api/file-explorer/files',
3692
- params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
3693
- body: input.file,
3694
- }, { apiName: this.apiName, ...config });
3695
- delete = (id, config) => this.restService.request({
3696
- method: 'DELETE',
3697
- url: `/api/file-explorer/files/${id}`,
3698
- }, { apiName: this.apiName, ...config });
3699
- download = (containerName, blobName, fileName, config) => this.restService.request({
3700
- method: 'GET',
3701
- url: `/api/file-explorer/files/download/${containerName}/${blobName}`,
3702
- params: { fileName },
3703
- }, { apiName: this.apiName, ...config });
3704
- get = (id, config) => this.restService.request({
3705
- method: 'GET',
3706
- url: `/api/file-explorer/files/${id}`,
3707
- }, { apiName: this.apiName, ...config });
3708
- getFileContainerConfiguration = (containerName, config) => this.restService.request({
3709
- method: 'GET',
3710
- url: '/api/file-explorer/files/configuration',
3711
- params: { containerName },
3712
- }, { apiName: this.apiName, ...config });
3713
- getList = (input, config) => this.restService.request({
3714
- method: 'GET',
3715
- url: '/api/file-explorer/files',
3716
- params: { containerName: input.containerName, directoryId: input.directoryId, creatorId: input.creatorId, filter: input.filter, entityId: input.entityId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
3717
- }, { apiName: this.apiName, ...config });
3718
- getStream = (containerName, blobName, imageResize, config) => this.restService.request({
3719
- method: 'GET',
3720
- responseType: 'blob',
3721
- url: `/api/file-explorer/files/${containerName}/${blobName}`,
3722
- params: { width: imageResize.width, height: imageResize.height },
3723
- }, { apiName: this.apiName, ...config });
3724
- update = (id, input, config) => this.restService.request({
3725
- method: 'PUT',
3726
- url: `/api/file-explorer/files/${id}`,
3727
- body: input,
3728
- }, { apiName: this.apiName, ...config });
3729
- constructor(restService) {
3730
- this.restService = restService;
3731
- }
3732
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FileDescriptorService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
3733
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FileDescriptorService, providedIn: 'root' });
3734
- }
3735
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FileDescriptorService, decorators: [{
3736
- type: Injectable,
3737
- args: [{
3738
- providedIn: 'root',
3739
- }]
3740
- }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
3741
-
3742
- var index$h = /*#__PURE__*/Object.freeze({
3743
- __proto__: null,
3744
- FileDescriptorService: FileDescriptorService
3745
- });
3746
-
3747
- var index$g = /*#__PURE__*/Object.freeze({
3748
- __proto__: null,
3749
- Directories: index$i,
3750
- Files: index$h
3751
- });
3752
-
3753
- var index$f = /*#__PURE__*/Object.freeze({
3754
- __proto__: null,
3755
- Abp: index$j,
3756
- FileExplorer: index$g
3757
- });
3758
-
3759
- var index$e = /*#__PURE__*/Object.freeze({
3760
- __proto__: null
3761
- });
3762
-
3763
- var index$d = /*#__PURE__*/Object.freeze({
3764
- __proto__: null
3765
- });
3766
-
3767
- var index$c = /*#__PURE__*/Object.freeze({
3768
- __proto__: null,
3769
- Mvc: index$d
3770
- });
3771
-
3772
- var index$b = /*#__PURE__*/Object.freeze({
3773
- __proto__: null
3774
- });
3775
-
3776
- var index$a = /*#__PURE__*/Object.freeze({
3777
- __proto__: null,
3778
- Primitives: index$b
3779
- });
3780
-
3781
- var index$9 = /*#__PURE__*/Object.freeze({
3782
- __proto__: null
3783
- });
3784
-
3785
- var index$8 = /*#__PURE__*/Object.freeze({
3786
- __proto__: null,
3787
- Headers: index$9
3788
- });
3789
-
3790
- var index$7 = /*#__PURE__*/Object.freeze({
3791
- __proto__: null,
3792
- Http: index$8
3793
- });
3794
-
3795
- var index$6 = /*#__PURE__*/Object.freeze({
3796
- __proto__: null,
3797
- AspNetCore: index$c,
3798
- Extensions: index$a,
3799
- Net: index$7
3800
- });
3801
-
3802
- var index$5 = /*#__PURE__*/Object.freeze({
3803
- __proto__: null
3804
- });
3805
-
3806
- var index$4 = /*#__PURE__*/Object.freeze({
3807
- __proto__: null
3808
- });
3809
-
3810
- var index$3 = /*#__PURE__*/Object.freeze({
3811
- __proto__: null,
3812
- Content: index$4
3813
- });
3814
-
3815
- var index$2 = /*#__PURE__*/Object.freeze({
3816
- __proto__: null
3817
- });
3818
-
3819
- var index$1 = /*#__PURE__*/Object.freeze({
3820
- __proto__: null,
3821
- Users: index$2
3822
- });
3823
-
3824
- var index = /*#__PURE__*/Object.freeze({
3825
- __proto__: null,
3826
- Abp: index$3,
3827
- CmsKit: index$1
3828
- });
3829
-
3830
- /*
3831
- * Public API Surface of cms
3832
- */
3833
-
3834
- /**
3835
- * Generated bundle index. Do not edit.
3836
- */
3837
-
3838
- export { ActionGroup, index$l as Admin, CMS_TOOLBAR_ACTION_CONTRIBUTORS, CmsApiService, CmsExtensionsResolver, CmsModule, CmsRoutingModule, CmsService, Cms_Default_Toolbar_Actions, CreateComponent, CreateFieldComponent, CreateOrEditComponent, CreateOrEditEntriesComponent, CreateOrEditEntryTypeInputBase, CreateOrEditFieldComponent, CreateOrUpdateFieldInputBase, CreateOrUpdateSectionsInputBase, CreateOrUpdateSitesInputBase, index$f as Dignite, ECmsComponent, EditComponent, EditFieldComponent, index$s as Entries, EntriesComponent, Entries_Create_Defaults_Toolbar_Action, Entries_Defaults_Toolbar_Action, Entries_Edit_Defaults_Toolbar_Action, EntryConfig, EntryConfigComponent, EntryControlComponent, FieldAbstractsService, FieldControlGroup, FieldGroupComponent, index$e as Fields, FieldsComponent, Fields_Create_Defaults_Toolbar_Action, Fields_Defaults_Toolbar_Action, Fields_Edit_Defaults_Toolbar_Action, index$6 as Microsoft, index$m as Sections, SectionsComponent, Sections_Create_Or_Edit_Defaults_Toolbar_Action, Sections_Defaults_Toolbar_Action, index$5 as Sites, SitesComponent, Sites_Defaults_Toolbar_Action, index as Volo, fieldTabsBase, fieldsBase, fieldsInputBase };
3839
- //# sourceMappingURL=dignite-ng-expand.cms.mjs.map