@dignite-ng/expand.cms 0.0.32 → 0.0.33

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 (361) 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 +82 -0
  7. package/config/{public-api.d.ts → src/public-api.ts} +3 -3
  8. package/ng-package.json +7 -0
  9. package/package.json +6 -21
  10. package/src/lib/cms-routing.module.ts +108 -0
  11. package/src/lib/cms.module.ts +108 -0
  12. package/src/lib/components/admin/domains/domains.component.html +19 -0
  13. package/src/lib/components/admin/domains/domains.component.scss +0 -0
  14. package/src/lib/components/admin/domains/domains.component.spec.ts +21 -0
  15. package/src/lib/components/admin/domains/domains.component.ts +99 -0
  16. package/src/lib/components/admin/domains/index.ts +1 -0
  17. package/src/lib/components/admin/entries/create-or-edit-entries.component.html +113 -0
  18. package/src/lib/components/admin/entries/create-or-edit-entries.component.scss +1 -0
  19. package/src/lib/components/admin/entries/create-or-edit-entries.component.spec.ts +21 -0
  20. package/src/lib/components/admin/entries/create-or-edit-entries.component.ts +284 -0
  21. package/src/lib/components/admin/entries/create-or-update-entry-input-base.ts +33 -0
  22. package/src/lib/components/admin/entries/create.component.html +13 -0
  23. package/src/lib/components/admin/entries/create.component.scss +1 -0
  24. package/src/lib/components/admin/entries/create.component.spec.ts +21 -0
  25. package/src/lib/components/admin/entries/create.component.ts +104 -0
  26. package/src/lib/components/admin/entries/edit.component.html +9 -0
  27. package/src/lib/components/admin/entries/edit.component.scss +1 -0
  28. package/src/lib/components/admin/entries/edit.component.spec.ts +21 -0
  29. package/src/lib/components/admin/entries/edit.component.ts +98 -0
  30. package/src/lib/components/admin/entries/entries.component.html +112 -0
  31. package/src/lib/components/admin/entries/entries.component.scss +1 -0
  32. package/src/lib/components/admin/entries/entries.component.spec.ts +21 -0
  33. package/src/lib/components/admin/entries/entries.component.ts +219 -0
  34. package/src/lib/components/admin/entries/index.ts +4 -0
  35. package/src/lib/components/admin/fields/create-field.component.html +12 -0
  36. package/src/lib/components/admin/fields/create-field.component.scss +1 -0
  37. package/src/lib/components/admin/fields/create-field.component.spec.ts +21 -0
  38. package/src/lib/components/admin/fields/create-field.component.ts +68 -0
  39. package/src/lib/components/admin/fields/create-or-edit-field.component.html +39 -0
  40. package/src/lib/components/admin/fields/create-or-edit-field.component.scss +0 -0
  41. package/src/lib/components/admin/fields/create-or-edit-field.component.spec.ts +21 -0
  42. package/src/lib/components/admin/fields/create-or-edit-field.component.ts +116 -0
  43. package/src/lib/components/admin/fields/create-or-update-field-input-base.ts +33 -0
  44. package/src/lib/components/admin/fields/edit-field.component.html +13 -0
  45. package/src/lib/components/admin/fields/edit-field.component.scss +0 -0
  46. package/src/lib/components/admin/fields/edit-field.component.spec.ts +21 -0
  47. package/src/lib/components/admin/fields/edit-field.component.ts +100 -0
  48. package/src/lib/components/admin/fields/field-group.component.html +69 -0
  49. package/src/lib/components/admin/fields/field-group.component.scss +0 -0
  50. package/src/lib/components/admin/fields/field-group.component.spec.ts +21 -0
  51. package/src/lib/components/admin/fields/field-group.component.ts +132 -0
  52. package/src/lib/components/admin/fields/fields.component.html +74 -0
  53. package/src/lib/components/admin/fields/fields.component.scss +1 -0
  54. package/src/lib/components/admin/fields/fields.component.spec.ts +21 -0
  55. package/src/lib/components/admin/fields/fields.component.ts +111 -0
  56. package/src/lib/components/admin/fields/index.ts +6 -0
  57. package/src/lib/components/admin/index.ts +5 -0
  58. package/src/lib/components/admin/sections/create-or-update-sections-input-base.ts +36 -0
  59. package/src/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.ts +79 -0
  60. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.html +191 -0
  61. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.scss +1 -0
  62. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.spec.ts +21 -0
  63. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.ts +408 -0
  64. package/src/lib/components/admin/sections/entry-types/index.ts +2 -0
  65. package/src/lib/components/admin/sections/index.ts +3 -0
  66. package/src/lib/components/admin/sections/sections.component.html +190 -0
  67. package/src/lib/components/admin/sections/sections.component.scss +1 -0
  68. package/src/lib/components/admin/sections/sections.component.spec.ts +21 -0
  69. package/src/lib/components/admin/sections/sections.component.ts +370 -0
  70. package/src/lib/components/admin/sites/create-or-update-sites-input-base.ts +18 -0
  71. package/src/lib/components/admin/sites/index.ts +2 -0
  72. package/src/lib/components/admin/sites/sites.component.html +136 -0
  73. package/src/lib/components/admin/sites/sites.component.scss +1 -0
  74. package/src/lib/components/admin/sites/sites.component.spec.ts +21 -0
  75. package/src/lib/components/admin/sites/sites.component.ts +250 -0
  76. package/src/lib/components/dynamic-form/entry/entry-config.component.html +36 -0
  77. package/src/lib/components/dynamic-form/entry/entry-config.component.scss +0 -0
  78. package/src/lib/components/dynamic-form/entry/entry-config.component.spec.ts +21 -0
  79. package/src/lib/components/dynamic-form/entry/entry-config.component.ts +115 -0
  80. package/src/lib/components/dynamic-form/entry/entry-config.ts +24 -0
  81. package/src/lib/components/dynamic-form/entry/entry-control.component.html +26 -0
  82. package/src/lib/components/dynamic-form/entry/entry-control.component.scss +1 -0
  83. package/src/lib/components/dynamic-form/entry/entry-control.component.spec.ts +21 -0
  84. package/src/lib/components/dynamic-form/entry/entry-control.component.ts +109 -0
  85. package/src/lib/components/dynamic-form/entry/index.ts +3 -0
  86. package/src/lib/components/dynamic-form/form-control-group.ts +27 -0
  87. package/src/lib/components/dynamic-form/index.ts +4 -0
  88. package/src/lib/components/dynamic-form/matrix/index.ts +3 -0
  89. package/src/lib/components/dynamic-form/matrix/matrix-config.component.html +147 -0
  90. package/src/lib/components/dynamic-form/matrix/matrix-config.component.scss +0 -0
  91. package/src/lib/components/dynamic-form/matrix/matrix-config.component.spec.ts +21 -0
  92. package/src/lib/components/dynamic-form/matrix/matrix-config.component.ts +236 -0
  93. package/src/lib/components/dynamic-form/matrix/matrix-config.ts +63 -0
  94. package/src/lib/components/dynamic-form/matrix/matrix-control.component.html +42 -0
  95. package/src/lib/components/dynamic-form/matrix/matrix-control.component.scss +0 -0
  96. package/src/lib/components/dynamic-form/matrix/matrix-control.component.spec.ts +21 -0
  97. package/src/lib/components/dynamic-form/matrix/matrix-control.component.ts +104 -0
  98. package/src/lib/components/dynamic-form/table/index.ts +3 -0
  99. package/src/lib/components/dynamic-form/table/table-config.component.html +85 -0
  100. package/src/lib/components/dynamic-form/table/table-config.component.scss +10 -0
  101. package/src/lib/components/dynamic-form/table/table-config.component.spec.ts +21 -0
  102. package/src/lib/components/dynamic-form/table/table-config.component.ts +170 -0
  103. package/src/lib/components/dynamic-form/table/table-config.ts +45 -0
  104. package/src/lib/components/dynamic-form/table/table-control.component.html +54 -0
  105. package/src/lib/components/dynamic-form/table/table-control.component.scss +1 -0
  106. package/src/lib/components/dynamic-form/table/table-control.component.spec.ts +21 -0
  107. package/src/lib/components/dynamic-form/table/table-control.component.ts +115 -0
  108. package/src/lib/components/index.ts +2 -0
  109. package/src/lib/constants/index.ts +1 -0
  110. package/src/lib/constants/styles.ts +13 -0
  111. package/src/lib/enums/ecms-component.ts +11 -0
  112. package/src/lib/enums/index.ts +1 -0
  113. package/src/lib/proxy/README.md +17 -0
  114. package/src/lib/proxy/admin/domains/domain-admin.service.ts +38 -0
  115. package/{lib/proxy/admin/domains/models.d.ts → src/lib/proxy/admin/domains/models.ts} +9 -7
  116. package/src/lib/proxy/admin/dynamic-forms/form-admin.service.ts +21 -0
  117. package/src/lib/proxy/admin/dynamic-forms/models.ts +5 -0
  118. package/src/lib/proxy/admin/entries/entry-admin.service.ts +109 -0
  119. package/src/lib/proxy/admin/entries/models.ts +68 -0
  120. package/src/lib/proxy/admin/fields/field-admin.service.ts +64 -0
  121. package/src/lib/proxy/admin/fields/field-group-admin.service.ts +56 -0
  122. package/{lib/proxy/admin/fields/models.d.ts → src/lib/proxy/admin/fields/models.ts} +42 -34
  123. package/src/lib/proxy/admin/index.ts +7 -0
  124. package/src/lib/proxy/admin/sections/entry-type-admin.service.ts +55 -0
  125. package/{lib/proxy/admin/sections/models.d.ts → src/lib/proxy/admin/sections/models.ts} +81 -67
  126. package/src/lib/proxy/admin/sections/section-admin.service.ts +74 -0
  127. package/src/lib/proxy/admin/settings/site-settings-admin.service.ts +37 -0
  128. package/src/lib/proxy/dignite/abp/data/index.ts +1 -0
  129. package/src/lib/proxy/dignite/abp/data/models.ts +4 -0
  130. package/src/lib/proxy/dignite/abp/index.ts +2 -0
  131. package/src/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.ts +65 -0
  132. package/src/lib/proxy/dignite/file-explorer/directories/index.ts +2 -0
  133. package/src/lib/proxy/dignite/file-explorer/directories/models.ts +35 -0
  134. package/src/lib/proxy/dignite/file-explorer/files/file-descriptor.service.ts +86 -0
  135. package/src/lib/proxy/dignite/file-explorer/files/index.ts +2 -0
  136. package/src/lib/proxy/dignite/file-explorer/files/models.ts +58 -0
  137. package/src/lib/proxy/dignite/file-explorer/index.ts +3 -0
  138. package/src/lib/proxy/dignite/index.ts +3 -0
  139. package/src/lib/proxy/entries/entry-status.enum.ts +8 -0
  140. package/src/lib/proxy/fields/index.ts +1 -0
  141. package/src/lib/proxy/fields/models.ts +9 -0
  142. package/src/lib/proxy/generate-proxy.json +11425 -0
  143. package/src/lib/proxy/index.ts +9 -0
  144. package/src/lib/proxy/microsoft/asp-net-core/index.ts +2 -0
  145. package/src/lib/proxy/microsoft/asp-net-core/mvc/index.ts +1 -0
  146. package/src/lib/proxy/microsoft/asp-net-core/mvc/models.ts +12 -0
  147. package/src/lib/proxy/microsoft/extensions/index.ts +2 -0
  148. package/src/lib/proxy/microsoft/extensions/primitives/index.ts +1 -0
  149. package/src/lib/proxy/microsoft/extensions/primitives/models.ts +9 -0
  150. package/src/lib/proxy/microsoft/index.ts +4 -0
  151. package/src/lib/proxy/microsoft/net/http/headers/index.ts +1 -0
  152. package/src/lib/proxy/microsoft/net/http/headers/models.ts +7 -0
  153. package/src/lib/proxy/microsoft/net/http/index.ts +2 -0
  154. package/src/lib/proxy/microsoft/net/index.ts +2 -0
  155. package/src/lib/proxy/sections/models.ts +14 -0
  156. package/src/lib/proxy/sections/section-type.enum.ts +9 -0
  157. package/src/lib/proxy/settings/index.ts +1 -0
  158. package/src/lib/proxy/settings/models.ts +6 -0
  159. package/src/lib/proxy/volo/abp/content/index.ts +1 -0
  160. package/src/lib/proxy/volo/abp/content/models.ts +6 -0
  161. package/src/lib/proxy/volo/abp/index.ts +2 -0
  162. package/src/lib/proxy/volo/cms-kit/index.ts +2 -0
  163. package/src/lib/proxy/volo/cms-kit/users/index.ts +1 -0
  164. package/{lib/proxy/volo/cms-kit/users/models.d.ts → src/lib/proxy/volo/cms-kit/users/models.ts} +8 -7
  165. package/src/lib/proxy/volo/index.ts +3 -0
  166. package/src/lib/proxy.zip +0 -0
  167. package/src/lib/services/appent-content.ts +13 -0
  168. package/src/lib/services/cms-api.service.ts +71 -0
  169. package/src/lib/services/cms.service.ts +18 -0
  170. package/src/lib/services/field-abstracts.service.ts +40 -0
  171. package/src/lib/services/index.ts +4 -0
  172. package/src/lib/services/simple-reuse-strategy.ts +49 -0
  173. package/src/lib/services/update-list.service.ts +15 -0
  174. package/src/lib/toolbar/index.ts +2 -0
  175. package/src/lib/toolbar/toolbar-btn-default-action.ts +171 -0
  176. package/src/lib/toolbar/toolbar-config.ts +93 -0
  177. package/{public-api.d.ts → src/public-api.ts} +10 -4
  178. package/src/test.ts +26 -0
  179. package/tsconfig.lib.json +34 -0
  180. package/tsconfig.lib.prod.json +10 -0
  181. package/tsconfig.spec.json +17 -0
  182. package/config/cms-config.module.d.ts +0 -8
  183. package/config/enums/route-names.d.ts +0 -7
  184. package/config/index.d.ts +0 -5
  185. package/config/providers/route.provider.d.ts +0 -9
  186. package/esm2022/config/cms-config.module.mjs +0 -19
  187. package/esm2022/config/dignite-ng-expand.cms-config.mjs +0 -5
  188. package/esm2022/config/enums/index.mjs +0 -2
  189. package/esm2022/config/enums/route-names.mjs +0 -2
  190. package/esm2022/config/providers/index.mjs +0 -2
  191. package/esm2022/config/providers/route.provider.mjs +0 -78
  192. package/esm2022/config/public-api.mjs +0 -4
  193. package/esm2022/dignite-ng-expand.cms.mjs +0 -5
  194. package/esm2022/lib/cms-routing.module.mjs +0 -100
  195. package/esm2022/lib/cms.module.mjs +0 -132
  196. package/esm2022/lib/components/admin/domains/domains.component.mjs +0 -90
  197. package/esm2022/lib/components/admin/domains/index.mjs +0 -2
  198. package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +0 -286
  199. package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +0 -32
  200. package/esm2022/lib/components/admin/entries/create.component.mjs +0 -108
  201. package/esm2022/lib/components/admin/entries/edit.component.mjs +0 -107
  202. package/esm2022/lib/components/admin/entries/entries.component.mjs +0 -211
  203. package/esm2022/lib/components/admin/entries/index.mjs +0 -5
  204. package/esm2022/lib/components/admin/fields/create-field.component.mjs +0 -82
  205. package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +0 -119
  206. package/esm2022/lib/components/admin/fields/create-or-update-field-input-base.mjs +0 -25
  207. package/esm2022/lib/components/admin/fields/edit-field.component.mjs +0 -110
  208. package/esm2022/lib/components/admin/fields/field-group.component.mjs +0 -124
  209. package/esm2022/lib/components/admin/fields/fields.component.mjs +0 -119
  210. package/esm2022/lib/components/admin/fields/index.mjs +0 -7
  211. package/esm2022/lib/components/admin/index.mjs +0 -6
  212. package/esm2022/lib/components/admin/sections/create-or-update-sections-input-base.mjs +0 -27
  213. package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +0 -71
  214. package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +0 -416
  215. package/esm2022/lib/components/admin/sections/entry-types/index.mjs +0 -3
  216. package/esm2022/lib/components/admin/sections/index.mjs +0 -4
  217. package/esm2022/lib/components/admin/sections/sections.component.mjs +0 -344
  218. package/esm2022/lib/components/admin/sites/create-or-update-sites-input-base.mjs +0 -18
  219. package/esm2022/lib/components/admin/sites/index.mjs +0 -3
  220. package/esm2022/lib/components/admin/sites/sites.component.mjs +0 -29
  221. package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +0 -124
  222. package/esm2022/lib/components/dynamic-form/entry/entry-config.mjs +0 -18
  223. package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +0 -115
  224. package/esm2022/lib/components/dynamic-form/entry/index.mjs +0 -4
  225. package/esm2022/lib/components/dynamic-form/form-control-group.mjs +0 -28
  226. package/esm2022/lib/components/dynamic-form/index.mjs +0 -5
  227. package/esm2022/lib/components/dynamic-form/matrix/index.mjs +0 -4
  228. package/esm2022/lib/components/dynamic-form/matrix/matrix-config.component.mjs +0 -227
  229. package/esm2022/lib/components/dynamic-form/matrix/matrix-config.mjs +0 -50
  230. package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +0 -111
  231. package/esm2022/lib/components/dynamic-form/table/index.mjs +0 -4
  232. package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +0 -173
  233. package/esm2022/lib/components/dynamic-form/table/table-config.mjs +0 -38
  234. package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +0 -121
  235. package/esm2022/lib/components/index.mjs +0 -3
  236. package/esm2022/lib/constants/styles.mjs +0 -14
  237. package/esm2022/lib/enums/ecms-component.mjs +0 -13
  238. package/esm2022/lib/enums/index.mjs +0 -2
  239. package/esm2022/lib/proxy/admin/domains/domain-admin.service.mjs +0 -34
  240. package/esm2022/lib/proxy/admin/domains/index.mjs +0 -3
  241. package/esm2022/lib/proxy/admin/domains/models.mjs +0 -2
  242. package/esm2022/lib/proxy/admin/dynamic-forms/form-admin.service.mjs +0 -24
  243. package/esm2022/lib/proxy/admin/dynamic-forms/index.mjs +0 -3
  244. package/esm2022/lib/proxy/admin/dynamic-forms/models.mjs +0 -2
  245. package/esm2022/lib/proxy/admin/entries/entry-admin.service.mjs +0 -72
  246. package/esm2022/lib/proxy/admin/entries/index.mjs +0 -3
  247. package/esm2022/lib/proxy/admin/entries/models.mjs +0 -2
  248. package/esm2022/lib/proxy/admin/fields/field-admin.service.mjs +0 -47
  249. package/esm2022/lib/proxy/admin/fields/field-group-admin.service.mjs +0 -43
  250. package/esm2022/lib/proxy/admin/fields/index.mjs +0 -4
  251. package/esm2022/lib/proxy/admin/fields/models.mjs +0 -2
  252. package/esm2022/lib/proxy/admin/sections/entry-type-admin.service.mjs +0 -43
  253. package/esm2022/lib/proxy/admin/sections/index.mjs +0 -4
  254. package/esm2022/lib/proxy/admin/sections/models.mjs +0 -2
  255. package/esm2022/lib/proxy/admin/sections/section-admin.service.mjs +0 -53
  256. package/esm2022/lib/proxy/admin/settings/index.mjs +0 -2
  257. package/esm2022/lib/proxy/admin/settings/site-settings-admin.service.mjs +0 -33
  258. package/esm2022/lib/proxy/dignite/abp/data/models.mjs +0 -2
  259. package/esm2022/lib/proxy/entries/entry-status.enum.mjs +0 -8
  260. package/esm2022/lib/proxy/entries/index.mjs +0 -2
  261. package/esm2022/lib/proxy/fields/models.mjs +0 -2
  262. package/esm2022/lib/proxy/sections/index.mjs +0 -3
  263. package/esm2022/lib/proxy/sections/models.mjs +0 -2
  264. package/esm2022/lib/proxy/sections/section-type.enum.mjs +0 -9
  265. package/esm2022/lib/proxy/settings/models.mjs +0 -2
  266. package/esm2022/lib/proxy/volo/cms-kit/users/models.mjs +0 -2
  267. package/esm2022/lib/services/appent-content.mjs +0 -15
  268. package/esm2022/lib/services/cms-api.service.mjs +0 -80
  269. package/esm2022/lib/services/cms.service.mjs +0 -23
  270. package/esm2022/lib/services/field-abstracts.service.mjs +0 -45
  271. package/esm2022/lib/services/index.mjs +0 -5
  272. package/esm2022/lib/services/simple-reuse-strategy.mjs +0 -43
  273. package/esm2022/lib/services/update-list.service.mjs +0 -19
  274. package/esm2022/lib/toolbar/index.mjs +0 -3
  275. package/esm2022/lib/toolbar/toolbar-btn-default-action.mjs +0 -160
  276. package/esm2022/lib/toolbar/toolbar-config.mjs +0 -79
  277. package/esm2022/public-api.mjs +0 -10
  278. package/fesm2022/dignite-ng-expand.cms-config.mjs +0 -101
  279. package/fesm2022/dignite-ng-expand.cms-config.mjs.map +0 -1
  280. package/fesm2022/dignite-ng-expand.cms.mjs +0 -4079
  281. package/fesm2022/dignite-ng-expand.cms.mjs.map +0 -1
  282. package/index.d.ts +0 -5
  283. package/lib/cms-routing.module.d.ts +0 -7
  284. package/lib/cms.module.d.ts +0 -35
  285. package/lib/components/admin/domains/domains.component.d.ts +0 -21
  286. package/lib/components/admin/domains/index.d.ts +0 -1
  287. package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +0 -92
  288. package/lib/components/admin/entries/create-or-update-entry-input-base.d.ts +0 -23
  289. package/lib/components/admin/entries/create.component.d.ts +0 -40
  290. package/lib/components/admin/entries/edit.component.d.ts +0 -40
  291. package/lib/components/admin/entries/entries.component.d.ts +0 -66
  292. package/lib/components/admin/entries/index.d.ts +0 -4
  293. package/lib/components/admin/fields/create-field.component.d.ts +0 -31
  294. package/lib/components/admin/fields/create-or-edit-field.component.d.ts +0 -36
  295. package/lib/components/admin/fields/create-or-update-field-input-base.d.ts +0 -16
  296. package/lib/components/admin/fields/edit-field.component.d.ts +0 -40
  297. package/lib/components/admin/fields/field-group.component.d.ts +0 -51
  298. package/lib/components/admin/fields/fields.component.d.ts +0 -37
  299. package/lib/components/admin/fields/index.d.ts +0 -6
  300. package/lib/components/admin/index.d.ts +0 -5
  301. package/lib/components/admin/sections/create-or-update-sections-input-base.d.ts +0 -17
  302. package/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.d.ts +0 -38
  303. package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +0 -132
  304. package/lib/components/admin/sections/entry-types/index.d.ts +0 -2
  305. package/lib/components/admin/sections/index.d.ts +0 -3
  306. package/lib/components/admin/sections/sections.component.d.ts +0 -90
  307. package/lib/components/admin/sites/create-or-update-sites-input-base.d.ts +0 -8
  308. package/lib/components/admin/sites/index.d.ts +0 -2
  309. package/lib/components/admin/sites/sites.component.d.ts +0 -5
  310. package/lib/components/dynamic-form/entry/entry-config.component.d.ts +0 -39
  311. package/lib/components/dynamic-form/entry/entry-config.d.ts +0 -9
  312. package/lib/components/dynamic-form/entry/entry-control.component.d.ts +0 -35
  313. package/lib/components/dynamic-form/entry/index.d.ts +0 -3
  314. package/lib/components/dynamic-form/form-control-group.d.ts +0 -4
  315. package/lib/components/dynamic-form/index.d.ts +0 -4
  316. package/lib/components/dynamic-form/matrix/index.d.ts +0 -3
  317. package/lib/components/dynamic-form/matrix/matrix-config.component.d.ts +0 -73
  318. package/lib/components/dynamic-form/matrix/matrix-config.d.ts +0 -24
  319. package/lib/components/dynamic-form/matrix/matrix-control.component.d.ts +0 -39
  320. package/lib/components/dynamic-form/table/index.d.ts +0 -3
  321. package/lib/components/dynamic-form/table/table-config.component.d.ts +0 -58
  322. package/lib/components/dynamic-form/table/table-config.d.ts +0 -18
  323. package/lib/components/dynamic-form/table/table-control.component.d.ts +0 -39
  324. package/lib/components/index.d.ts +0 -2
  325. package/lib/constants/styles.d.ts +0 -2
  326. package/lib/enums/ecms-component.d.ts +0 -11
  327. package/lib/enums/index.d.ts +0 -1
  328. package/lib/proxy/admin/domains/domain-admin.service.d.ts +0 -13
  329. package/lib/proxy/admin/dynamic-forms/form-admin.service.d.ts +0 -12
  330. package/lib/proxy/admin/dynamic-forms/models.d.ts +0 -4
  331. package/lib/proxy/admin/entries/entry-admin.service.d.ts +0 -22
  332. package/lib/proxy/admin/entries/models.d.ts +0 -60
  333. package/lib/proxy/admin/fields/field-admin.service.d.ts +0 -17
  334. package/lib/proxy/admin/fields/field-group-admin.service.d.ts +0 -16
  335. package/lib/proxy/admin/sections/entry-type-admin.service.d.ts +0 -15
  336. package/lib/proxy/admin/sections/section-admin.service.d.ts +0 -18
  337. package/lib/proxy/admin/settings/site-settings-admin.service.d.ts +0 -13
  338. package/lib/proxy/dignite/abp/data/models.d.ts +0 -3
  339. package/lib/proxy/entries/entry-status.enum.d.ts +0 -5
  340. package/lib/proxy/fields/models.d.ts +0 -8
  341. package/lib/proxy/sections/models.d.ts +0 -12
  342. package/lib/proxy/sections/section-type.enum.d.ts +0 -6
  343. package/lib/proxy/settings/models.d.ts +0 -5
  344. package/lib/services/appent-content.d.ts +0 -1
  345. package/lib/services/cms-api.service.d.ts +0 -20
  346. package/lib/services/cms.service.d.ts +0 -10
  347. package/lib/services/field-abstracts.service.d.ts +0 -20
  348. package/lib/services/index.d.ts +0 -4
  349. package/lib/services/simple-reuse-strategy.d.ts +0 -11
  350. package/lib/services/update-list.service.d.ts +0 -9
  351. package/lib/toolbar/index.d.ts +0 -2
  352. package/lib/toolbar/toolbar-btn-default-action.d.ts +0 -18
  353. package/lib/toolbar/toolbar-config.d.ts +0 -56
  354. /package/{lib/proxy/admin/domains/index.d.ts → src/lib/proxy/admin/domains/index.ts} +0 -0
  355. /package/{lib/proxy/admin/dynamic-forms/index.d.ts → src/lib/proxy/admin/dynamic-forms/index.ts} +0 -0
  356. /package/{lib/proxy/admin/entries/index.d.ts → src/lib/proxy/admin/entries/index.ts} +0 -0
  357. /package/{lib/proxy/admin/fields/index.d.ts → src/lib/proxy/admin/fields/index.ts} +0 -0
  358. /package/{lib/proxy/admin/sections/index.d.ts → src/lib/proxy/admin/sections/index.ts} +0 -0
  359. /package/{lib/proxy/admin/settings/index.d.ts → src/lib/proxy/admin/settings/index.ts} +0 -0
  360. /package/{lib/proxy/entries/index.d.ts → src/lib/proxy/entries/index.ts} +0 -0
  361. /package/{lib/proxy/sections/index.d.ts → src/lib/proxy/sections/index.ts} +0 -0
@@ -0,0 +1,112 @@
1
+ <abp-page [title]="'Cms::Entries' | abpLocalization" [toolbar]="true">
2
+ <abp-page-toolbar-container *ngIf="entryTypeList.length < 1" class="col "></abp-page-toolbar-container>
3
+ <abp-page-toolbar-container *ngIf="entryTypeList.length > 1" class="col ">
4
+ <div class="row justify-content-end mx-0 gap-2" *abpPermission="'CmsAdmin.Entry.Create'">
5
+ <div class="col-auto px-0 pt-0">
6
+ <div ngbDropdown class="d-inline-block">
7
+ <button type="button" class="btn btn-primary btn-sm ms-2" id="dropdownBasic1" ngbDropdownToggle>
8
+ <i class="fa fa-plus pe-1" aria-hidden="true"></i>{{'Cms::New' | abpLocalization}}
9
+ </button>
10
+ <div ngbDropdownMenu aria-labelledby="dropdownBasic1">
11
+ <ng-container *ngFor="let item of entryTypeList">
12
+ <button ngbDropdownItem [routerLink]="['/cms/admin/entries/create']"
13
+ [queryParams]="{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}">{{item.displayName}}</button>
14
+ </ng-container>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </abp-page-toolbar-container>
20
+ <div id="sites-page" class="sites-page">
21
+ <div class="card">
22
+ <div class="card-body px-2 py-sm-2 border-bottom" [formGroup]="filtersForm">
23
+ <div class="row align-items-end">
24
+ <div class="mb-2 col-3">
25
+ <label class="form-label">{{'Cms::Sections' | abpLocalization}}:</label>
26
+ <select class="form-select col-auto" formControlName="sectionId" (change)="sectionIdChange()">
27
+ <ng-container *ngFor="let item of SiteOfSectionList">
28
+ <option [value]="item.id">{{item.displayName}}</option>
29
+ </ng-container>
30
+ </select>
31
+ </div>
32
+ <div class="mb-2 col-3">
33
+ <label class="form-label">{{'AbpUi::Languages' | abpLocalization}}:</label>
34
+ <select class="form-select col-auto" formControlName="culture" (change)="cultureChange()">
35
+ <ng-container *ngFor="let item of sectionLanguagesList">
36
+ <option [value]="item.cultureName">{{item.displayName}}</option>
37
+ </ng-container>
38
+ </select>
39
+ </div>
40
+
41
+ <div class="mb-2 col-3">
42
+ <label class="form-label">{{'AbpUi::Search' | abpLocalization}}:</label>
43
+ <input type="text" class="form-control" formControlName="filter"
44
+ [placeholder]="'AbpUi::Search' | abpLocalization" />
45
+ </div>
46
+ <div class="mb-2 col-3">
47
+ <button class="btn btn-primary px-3" type="button" id="button-addon2" (click)="resetData()">
48
+ <i class="fa fa-search"></i>
49
+ </button>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ <div class="card mb-0">
55
+ <div class="card-body p-0">
56
+ <div class="table-responsive table-fixed-header">
57
+ <ngx-datatable class="material " [rows]="data.items" [list]="list"
58
+ [columnMode]="ColumnMode.force" [headerHeight]="50" [footerHeight]="50" rowHeight="auto"
59
+ [virtualization]="false" [externalPaging]="true" [count]="data.totalCount" [scrollbarH]="true">
60
+ <ngx-datatable-column [name]="'Cms::EntryType' | abpLocalization" prop="entryTypeId">
61
+ <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
62
+ <ng-container *ngFor="let item of entryTypeList">
63
+ <ng-container *ngIf="item.id === value">{{item.displayName}}</ng-container>
64
+ </ng-container>
65
+ </ng-template>
66
+ </ngx-datatable-column>
67
+ <ngx-datatable-column [name]="'Cms::Title' | abpLocalization" prop="title">
68
+ <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
69
+ {{ value }}
70
+ </ng-template>
71
+ </ngx-datatable-column>
72
+ <ngx-datatable-column [name]="'Cms::Slug' | abpLocalization" prop="slug">
73
+ <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
74
+ {{ value }}
75
+ </ng-template>
76
+ </ngx-datatable-column>
77
+ <ngx-datatable-column [name]="'Cms::Status' | abpLocalization" prop="status" [width]="80">
78
+ <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
79
+ <ng-container *ngFor="let item of _entryStatusOptions">
80
+ <ng-container *ngIf="item.value=== value">{{ 'Cms::Enum:EntryStatus:'+item.key |
81
+ abpLocalization }}</ng-container>
82
+ </ng-container>
83
+ </ng-template>
84
+ </ngx-datatable-column>
85
+ <ngx-datatable-column [name]="'Cms::PublishTime' | abpLocalization" prop="publishTime" [width]="190">
86
+ <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
87
+ {{value | date: 'YYYY/MM/dd HH:mm:s' }}
88
+ </ng-template>
89
+ </ngx-datatable-column>
90
+ <ngx-datatable-column [sortable]="false" [name]="'AbpUi::Actions' | abpLocalization"
91
+ cellClass="cellClassRight" [frozenRight]="true" [width]="110">
92
+ <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
93
+ <div ngbDropdown container="body">
94
+ <button type="button" class="btn btn-primary btn-sm" ngbDropdownToggle>
95
+ <i class="me-1 fa fa-cog"></i> {{'AbpUi::Actions' | abpLocalization}}
96
+ </button>
97
+ <div ngbDropdownMenu>
98
+ <button ngbDropdownItem
99
+ routerLink="/cms/admin/entries/{{row.id}}/edit">{{'AbpUi::Edit' |
100
+ abpLocalization}}</button>
101
+ <button ngbDropdownItem (click)="deletefield(row)">{{'AbpUi::Delete' |
102
+ abpLocalization}}</button>
103
+ </div>
104
+ </div>
105
+ </ng-template>
106
+ </ngx-datatable-column>
107
+ </ngx-datatable>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </abp-page>
@@ -0,0 +1 @@
1
+ ::ng-deep.sites-page{.dignite_page{background:transparent}.list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}.card-header{input{flex:2 1 auto}.form-select{padding:.475rem 3.75rem .475rem 1.25rem}}.morentr{border:2px solid transparent}.borderdrag{border:2px solid var(--ck-color-selector-column-resizer-hover)!important}.borderdragtd{background-color:var(--ck-color-selector-column-resizer-hover)!important}.testtr{border-color:transparent;td{padding:2px}}.testtr:hover{background-color:transparent}}.cdk-drag-preview{display:table;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,0.2),0 8px 10px 1px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12)}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform 250ms cubic-bezier(0,0,0.2,1)}.example-box:last-child{border:0}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform 250ms cubic-bezier(0,0,0.2,1)}::ng-deep.sites-modal-form{.form-control{padding:.4rem 1.25rem}}
@@ -0,0 +1,21 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { EntriesComponent } from './entries.component';
4
+
5
+ describe('EntriesComponent', () => {
6
+ let component: EntriesComponent;
7
+ let fixture: ComponentFixture<EntriesComponent>;
8
+
9
+ beforeEach(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [EntriesComponent]
12
+ });
13
+ fixture = TestBed.createComponent(EntriesComponent);
14
+ component = fixture.componentInstance;
15
+ fixture.detectChanges();
16
+ });
17
+
18
+ it('should create', () => {
19
+ expect(component).toBeTruthy();
20
+ });
21
+ });
@@ -0,0 +1,219 @@
1
+ import { ABP, ConfigStateService, LIST_QUERY_DEBOUNCE_TIME, ListService, LocalizationService, PagedResultDto } from '@abp/ng.core';
2
+ import { ToasterService, ConfirmationService, Confirmation } from '@abp/ng.theme.shared';
3
+ import { Component, OnInit, inject } from '@angular/core';
4
+ import { FormBuilder, FormGroup } from '@angular/forms';
5
+ import { EntryAdminService, EntryDto, GetEntriesInput } from '../../../proxy/admin/entries';
6
+ import { ColumnMode } from "@swimlane/ngx-datatable";
7
+ import { finalize } from 'rxjs/operators';
8
+ // import { SiteAdminService } from '../../../proxy/admin/sites';
9
+ import { SectionAdminService } from '../../../proxy/admin/sections';
10
+ import { entryStatusOptions } from '../../../proxy/entries';
11
+ import { EXTENSIONS_IDENTIFIER } from '@abp/ng.theme.shared/extensions';
12
+ import { ECmsComponent } from '../../../enums/ecms-component';
13
+ import { Router } from '@angular/router';
14
+ import { UpdateListService } from '../../../services/update-list.service';
15
+ import { SiteSettingsAdminService } from '../../../proxy/admin/settings';
16
+
17
+
18
+ @Component({
19
+ selector: 'cms-entries',
20
+ templateUrl: './entries.component.html',
21
+ styleUrls: ['./entries.component.scss'],
22
+ providers: [
23
+ ListService,
24
+ // Provide this token if you want a different debounce time.
25
+ // Default is 300. Cannot be 0. Any value below 100 is not recommended.
26
+ { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
27
+ {
28
+ provide: EXTENSIONS_IDENTIFIER,
29
+ useValue: ECmsComponent.Entries,
30
+ },
31
+ ]
32
+ })
33
+ export class EntriesComponent implements OnInit {
34
+
35
+ constructor(
36
+ private _EntryAdminService: EntryAdminService,
37
+ // private _SiteAdminService: SiteAdminService,
38
+ private _SectionAdminService: SectionAdminService,
39
+ private toaster: ToasterService,
40
+ private confirmation: ConfirmationService,
41
+ private configState: ConfigStateService,
42
+ private router: Router,
43
+ private _LocalizationService: LocalizationService,
44
+ ) {
45
+ }
46
+
47
+ private fb = inject(FormBuilder)
48
+ private _UpdateListService = inject(UpdateListService)
49
+ public readonly list = inject(ListService)
50
+
51
+
52
+ ngOnInit(): void {
53
+ this.getPageDate()
54
+ this._UpdateListService.updateListEvent.subscribe(() => {
55
+ this.list.get()
56
+ });
57
+ }
58
+
59
+ /**站点列表 */
60
+ // siteList: any[any] = []
61
+ /**选择的站点id */
62
+ // siteId: string = ''
63
+ /**站点下的版块 */
64
+ SiteOfSectionList: any[any] = []
65
+
66
+
67
+ /**版块下的语言列表 */
68
+ sectionLanguagesList: any[any] = []
69
+ /**版块下的条目类型列表 */
70
+ entryTypeList: any[any] = []
71
+ /**状态编码 */
72
+ _entryStatusOptions = entryStatusOptions
73
+
74
+ /**获取页面数据 */
75
+ async getPageDate() {
76
+ // await this.getsiteList()
77
+ await this.getSiteOfSectionList()
78
+ await this.getSectionLanguagesList()
79
+ this.filters = this.filtersForm.value
80
+ this.hookToQuery()
81
+ }
82
+
83
+
84
+ /**切换板块 */
85
+ async sectionIdChange() {
86
+ this.getSectionOfEntryType()
87
+ await this.getSectionLanguagesList()
88
+ this.resetData()
89
+ }
90
+ /**切换语言 */
91
+ async cultureChange() {
92
+ this.resetData()
93
+ }
94
+
95
+
96
+ /**获取站点下的版块 */
97
+ getSiteOfSectionList() {
98
+ return new Promise((resolve, rejects) => {
99
+ // let siteId = this.filtersForm.get('siteId').value
100
+ this._SectionAdminService.getList({
101
+ maxResultCount: 1000,
102
+ // siteId: siteId
103
+ }).subscribe(res => {
104
+ this.SiteOfSectionList = res.items
105
+ this.filtersForm.get('sectionId').patchValue(res.items[0]?.id || '')
106
+ this.getSectionOfEntryType()
107
+ resolve(res.items)
108
+ })
109
+ })
110
+ }
111
+
112
+ /**获取版块下的条目类型 */
113
+ getSectionOfEntryType() {
114
+ let sectionId = this.filtersForm.get('sectionId').value
115
+ this.entryTypeList = this.SiteOfSectionList.find(el => el.id == sectionId)?.entryTypes || []
116
+ }
117
+
118
+ private config = inject(ConfigStateService)
119
+ private _SiteSettingsAdminService = inject(SiteSettingsAdminService)
120
+ /**获取版块下的语言列表 */
121
+ getSectionLanguagesList() {
122
+ return new Promise(async (resolve, rejects) => {
123
+ //获取所有语言 */
124
+ let languagesSystem = this.configState.getDeep('localization.languages')
125
+ //获取系统默认语言 */
126
+ let DefaultLanguage = this.config.getSetting("Abp.Localization.DefaultLanguage");
127
+ const configCmsSiteLanguages = this.config.getSetting("Cms.Site.Languages")
128
+ if(!configCmsSiteLanguages){
129
+ await this.getSiteSettingsLanguages()
130
+ }
131
+ const LanguagesSite = (configCmsSiteLanguages ? configCmsSiteLanguages.split(',') : '') || this.SiteSettingsAdminLanguages
132
+ let LanguagesArray = languagesSystem.filter(el => LanguagesSite.includes(el.cultureName))
133
+ //获取当前选择的语言
134
+ let nowculture = this.filtersForm.get('culture').value
135
+ //当前选择的语言,是否在版块的的语言列表中
136
+ let isexist = LanguagesArray.find(el => el.cultureName == nowculture)
137
+ this.filtersForm.get('culture').patchValue(nowculture ? isexist ? nowculture : DefaultLanguage : DefaultLanguage)
138
+ this.sectionLanguagesList = LanguagesArray
139
+ resolve(LanguagesArray)
140
+ })
141
+ }
142
+
143
+ /**站点设置语言 */
144
+ SiteSettingsAdminLanguages: any[] = []
145
+ /**
146
+ * 获取站点设置语言
147
+ */
148
+ getSiteSettingsLanguages() {
149
+ return new Promise((resolve, rejects) => {
150
+ this._SiteSettingsAdminService.getAllLanguages().subscribe(res => {
151
+ this.SiteSettingsAdminLanguages = res
152
+ resolve(res)
153
+ })
154
+ })
155
+ }
156
+
157
+
158
+
159
+ resetData() {
160
+ this.filters = this.filtersForm.value
161
+ this.list.page = 0
162
+ this.data.items = []
163
+ this.list.get()
164
+ }
165
+
166
+ /**新增-单个 */
167
+ createEntriesBtn() {
168
+ this.router.navigate(['/cms/admin/entries/create'], {
169
+ queryParams: { cultureName: this.filters.culture, sectionId: this.filters.sectionId, entryTypeId: this.entryTypeList[0].id }
170
+ })
171
+ }
172
+
173
+ /**列表相关 */
174
+ ColumnMode = ColumnMode;
175
+ data: PagedResultDto<EntryDto> = {
176
+ items: [],
177
+ totalCount: 0,
178
+ };
179
+
180
+ filters = {} as GetEntriesInput;
181
+ filtersForm: FormGroup = this.fb.group({
182
+ siteId: [''],
183
+ sectionId: [''],
184
+ culture: [''],
185
+ filter: [''],
186
+ })
187
+
188
+ hookToQuery() {
189
+
190
+ const getData = (query: ABP.PageQueryParams) => this._EntryAdminService.getList({
191
+ ...query,
192
+ ...this.filters,
193
+ });
194
+ const setData = (list: PagedResultDto<EntryDto>) => {
195
+ this.data = list
196
+ };
197
+ this.list.hookToQuery(getData).subscribe(setData);
198
+ }
199
+
200
+
201
+ /**删除条目 */
202
+ deletefield(row: any) {
203
+ this.confirmation.warn(
204
+ row.displayName,
205
+ this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`),
206
+ ).subscribe((status: Confirmation.Status) => {
207
+ if (status == 'confirm') {
208
+ this._EntryAdminService.delete(row.id).pipe(finalize(() => {
209
+ })).subscribe(res => {
210
+ this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
211
+ this.list.get()
212
+ })
213
+ }
214
+
215
+ });
216
+ }
217
+
218
+
219
+ }
@@ -0,0 +1,4 @@
1
+ export * from './entries.component'
2
+ export * from './create.component'
3
+ export * from './edit.component'
4
+ export * from './create-or-edit-entries.component'
@@ -0,0 +1,12 @@
1
+ <form class="row g-3 needs-validation" [formGroup]="newEntity" (ngSubmit)="save()">
2
+ <abp-page [title]="'Cms::CreateField' | abpLocalization" [toolbar]="true">
3
+ <div class="create-field-page">
4
+ <button type="submit" style="display: none;" #submitclick></button>
5
+ <div class="card">
6
+ <div class="card-body">
7
+ <cms-create-or-edit-field [Entity]="newEntity"></cms-create-or-edit-field>
8
+ </div>
9
+ </div>
10
+ </div>
11
+ </abp-page>
12
+ </form>
@@ -0,0 +1 @@
1
+ ::ng-deep .create-field-page{.dignite_page{height:calc(100vh - 32px - 53px - 40px);overflow:auto}.form-control,.form-select{padding:.475rem 1.25rem}}
@@ -0,0 +1,21 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { CreateFieldComponent } from './create-field.component';
4
+
5
+ describe('CreateFieldComponent', () => {
6
+ let component: CreateFieldComponent;
7
+ let fixture: ComponentFixture<CreateFieldComponent>;
8
+
9
+ beforeEach(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [CreateFieldComponent]
12
+ });
13
+ fixture = TestBed.createComponent(CreateFieldComponent);
14
+ component = fixture.componentInstance;
15
+ fixture.detectChanges();
16
+ });
17
+
18
+ it('should create', () => {
19
+ expect(component).toBeTruthy();
20
+ });
21
+ });
@@ -0,0 +1,68 @@
1
+ import { Component, ElementRef, ViewChild, inject } from '@angular/core';
2
+ import { CreateOrUpdateFieldInputBase } from './create-or-update-field-input-base';
3
+ import { FormBuilder, FormGroup } from '@angular/forms';
4
+ import { ToasterService } from '@abp/ng.theme.shared';
5
+ import { FieldAdminService } from '../../../proxy/admin/fields';
6
+ import { Location } from '@angular/common';
7
+ import { LocalizationService } from '@abp/ng.core';
8
+ import { EXTENSIONS_IDENTIFIER } from '@abp/ng.theme.shared/extensions';
9
+ import { ECmsComponent } from '../../../enums';
10
+ import { CmsApiService } from '../../../services';
11
+ import { Router } from '@angular/router';
12
+ import { UpdateListService } from '../../../services/update-list.service';
13
+
14
+ @Component({
15
+ selector: 'cms-create-field',
16
+ templateUrl: './create-field.component.html',
17
+ styleUrls: ['./create-field.component.scss'],
18
+ providers: [
19
+ {
20
+ provide: EXTENSIONS_IDENTIFIER,
21
+ useValue: ECmsComponent.FieldsCreate,
22
+ },
23
+ ]
24
+ })
25
+ export class CreateFieldComponent {
26
+
27
+ constructor(
28
+ private fb: FormBuilder,
29
+ public _FieldAdminService: FieldAdminService,
30
+ private toaster: ToasterService,
31
+ public _location: Location,
32
+ public _LocalizationService: LocalizationService,
33
+ public _CmsApiService: CmsApiService,
34
+ private router: Router,
35
+
36
+ ) { }
37
+ private _UpdateListService=inject(UpdateListService)
38
+
39
+ /**表单实体 */
40
+ newEntity: FormGroup | undefined
41
+
42
+ /**获取提交按钮替身,用于真实触发表单提交 */
43
+ @ViewChild('submitclick', { static: true }) submitclick: ElementRef;
44
+
45
+ ngOnInit(): void {
46
+ //Called after the constructor, initializing input properties, and the first call to ngOnChanges.
47
+ //Add 'implements OnInit' to the class.
48
+ this.newEntity= this.fb.group(new CreateOrUpdateFieldInputBase())
49
+ }
50
+
51
+ /**触发提交按钮 */
52
+ submitclickBtn(){
53
+ this.submitclick.nativeElement.click()
54
+ }
55
+ /**保存表单 */
56
+ save() {
57
+ let input = this.newEntity.value
58
+ if (!this.newEntity.valid) return
59
+ this._FieldAdminService.create(input).subscribe(res => {
60
+ this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
61
+ this.router.navigateByUrl('', { skipLocationChange: true }).then(() => {
62
+ this.router.navigate([`/cms/admin/fields`]);
63
+ this._UpdateListService.updateList();
64
+ });
65
+ })
66
+ }
67
+
68
+ }
@@ -0,0 +1,39 @@
1
+ <form [formGroup]="_Entity">
2
+ <div class="mb-2">
3
+ <label class="form-label" for="groupId">{{'Cms::FieldGroup' | abpLocalization}}</label>
4
+ <select class="form-select" formControlName="groupId">
5
+ <option value="">{{'Cms::OptionalGrouping' | abpLocalization}}</option>
6
+ <ng-container *ngFor="let item of _FieldAbstractsService.fieldGroupList">
7
+ <option [value]="item.id">{{item.name}}</option>
8
+ </ng-container>
9
+ </select>
10
+ </div>
11
+ <div class="mb-2">
12
+ <label class="form-label" for="displayName">{{'DigniteAbpForms::FieldDisplayName' | abpLocalization}}</label>
13
+ <input type="text" class="form-control" formControlName="displayName" (blur)="disPlayNameInputBlur($event)">
14
+ </div>
15
+ <div class="mb-2">
16
+ <label class="form-label" for="name">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>
17
+ <input type="text" class="form-control" formControlName="name" (input)="nameInputBlur($event)">
18
+ <div class="text-danger invalid-feedback" *ngIf="nameInput.errors?.repetition">
19
+ {{nameInput.errors?.repetition}}
20
+ </div>
21
+ <div class="form-text">{{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>
22
+ </div>
23
+ <div class="mb-2">
24
+ <label class="form-label" for="description">{{'Cms::Description' | abpLocalization}}</label>
25
+ <input type="text" class="form-control" formControlName="description">
26
+ </div>
27
+ <div class="mb-2">
28
+ <label class="form-label" for="formControlName">{{'Cms::FieldType' | abpLocalization}}</label>
29
+ <select class="form-select" formControlName="formControlName" (change)="formControlNameChange()">
30
+ <ng-container *ngFor="let item of _FieldAbstractsService.fromControlList;let i =index">
31
+ <option [value]="item.name">{{item.displayName}}</option>
32
+ </ng-container>
33
+ </select>
34
+ </div>
35
+ <ng-container *ngIf="_Entity.value.formControlName&&_Entity">
36
+ <df-dynamic [type]="_Entity.value.formControlName" [entity]="_Entity" [selected]="_selected"></df-dynamic>
37
+ </ng-container>
38
+
39
+ </form>
@@ -0,0 +1,21 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { CreateOrEditFieldComponent } from './create-or-edit-field.component';
4
+
5
+ describe('CreateOrEditFieldComponent', () => {
6
+ let component: CreateOrEditFieldComponent;
7
+ let fixture: ComponentFixture<CreateOrEditFieldComponent>;
8
+
9
+ beforeEach(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [CreateOrEditFieldComponent]
12
+ });
13
+ fixture = TestBed.createComponent(CreateOrEditFieldComponent);
14
+ component = fixture.componentInstance;
15
+ fixture.detectChanges();
16
+ });
17
+
18
+ it('should create', () => {
19
+ expect(component).toBeTruthy();
20
+ });
21
+ });
@@ -0,0 +1,116 @@
1
+ import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';
2
+ import { FieldAbstractsService } from '../../../services/field-abstracts.service';
3
+ import { AbstractControl, FormControl, FormGroup, ValidationErrors, Validators } from '@angular/forms';
4
+ import { CmsApiService } from '../../../services/cms-api.service';
5
+ import { Observable } from 'rxjs';
6
+ import { FieldAdminService } from '../../../proxy/admin/fields';
7
+ import { LocalizationService } from '@abp/ng.core';
8
+ @Component({
9
+ selector: 'cms-create-or-edit-field',
10
+ templateUrl: './create-or-edit-field.component.html',
11
+ styleUrls: ['./create-or-edit-field.component.scss']
12
+ })
13
+ export class CreateOrEditFieldComponent {
14
+
15
+ /**表单控件模板-动态表单配置组件 */
16
+ @ViewChild('FormDynamicRef', { read: ViewContainerRef, static: true }) FormDynamicRef: ViewContainerRef;
17
+
18
+ constructor(
19
+ public _FieldAbstractsService: FieldAbstractsService,
20
+ private _CmsApiService: CmsApiService,
21
+ private _FieldAdminService: FieldAdminService,
22
+ private _LocalizationService: LocalizationService,
23
+
24
+ ) {
25
+ if (this._FieldAbstractsService.fieldGroupList.length == 0) {
26
+ this._FieldAbstractsService.getfieldGroupList()
27
+ }
28
+ }
29
+ /**表单实体 */
30
+ _Entity: FormGroup | undefined
31
+ @Input()
32
+ public set Entity(v: FormGroup | undefined) {
33
+ if (v) {
34
+ this._Entity = v;
35
+ this.dataLoaded();
36
+ }
37
+ }
38
+ get formControlName() {
39
+ return this._Entity.get('formControlName')
40
+ }
41
+ /**选择的表单信息 */
42
+ _selected_copy:any
43
+ _selected: any
44
+ @Input()
45
+ public set selected(v: any) {
46
+ if(v) {
47
+ this._selected = v || '';
48
+ this._selected_copy=v
49
+ this.dataLoaded()
50
+ }
51
+
52
+ }
53
+
54
+
55
+ async dataLoaded() {
56
+ if (this._FieldAbstractsService.fromControlList.length == 0) {
57
+ await this._FieldAbstractsService.getFromControlList()
58
+ }
59
+
60
+ if (this._Entity) {
61
+ if (!this.formControlName.value) {
62
+ this._Entity.patchValue({
63
+ formControlName: this._FieldAbstractsService.fromControlList[0]?.name,
64
+ })
65
+ }
66
+ this._Entity.setControl('name', new FormControl(this.nameInput.value||'', {
67
+ validators: Validators.required,
68
+ asyncValidators: [this.repetitionAsyncValidator()] ,
69
+ updateOn: 'blur'
70
+ }))
71
+ }
72
+ }
73
+
74
+
75
+ /**name表单控件 */
76
+ get nameInput() {
77
+ return this._Entity.get('name')
78
+ }
79
+
80
+ nameInputBlur(event){
81
+ let value = event.target.value
82
+ this.nameInput.patchValue(value)
83
+ }
84
+
85
+ /**字段标签input失去标点生成字段名字 */
86
+ disPlayNameInputBlur(event) {
87
+ let value = event.target.value
88
+ let pinyin = this._CmsApiService.chineseToPinyin(value)
89
+ let nameInput = this.nameInput
90
+ if (nameInput.value) return
91
+ nameInput.patchValue(pinyin)
92
+ }
93
+ /**定义异步验证方法 */
94
+ repetitionAsyncValidator() {
95
+ return (ctrl: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
96
+ return new Promise(resolve => {
97
+ if (ctrl.value == this._selected?.name||!ctrl.value) {
98
+ resolve(null);
99
+ return
100
+ }
101
+ this._FieldAdminService.nameExists(ctrl.value).subscribe(res => {
102
+ if (res) {
103
+ resolve({ repetition: this._LocalizationService.instant(`Cms::FieldName{0}AlreadyExist`, ctrl.value) });
104
+ } else {
105
+ resolve(null);
106
+ }
107
+ })
108
+ });
109
+ };
110
+ }
111
+
112
+
113
+ formControlNameChange(){
114
+ }
115
+
116
+ }