@dignite-ng/expand.cms 0.0.20 → 0.0.22

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 (385) hide show
  1. package/config/cms-config.module.d.ts +8 -0
  2. package/config/{src/enums/index.ts → enums/index.d.ts} +1 -1
  3. package/config/enums/route-names.d.ts +8 -0
  4. package/config/index.d.ts +5 -0
  5. package/config/{src/providers/index.ts → providers/index.d.ts} +1 -1
  6. package/config/providers/route.provider.d.ts +8 -0
  7. package/config/{src/public-api.ts → public-api.d.ts} +3 -3
  8. package/esm2022/config/cms-config.module.mjs +19 -0
  9. package/esm2022/config/dignite-ng-expand.cms-config.mjs +5 -0
  10. package/esm2022/config/enums/index.mjs +2 -0
  11. package/esm2022/config/enums/route-names.mjs +2 -0
  12. package/esm2022/config/providers/index.mjs +2 -0
  13. package/esm2022/config/providers/route.provider.mjs +64 -0
  14. package/esm2022/config/public-api.mjs +4 -0
  15. package/esm2022/dignite-ng-expand.cms.mjs +5 -0
  16. package/esm2022/lib/cms-routing.module.mjs +101 -0
  17. package/esm2022/lib/cms.module.mjs +156 -0
  18. package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +285 -0
  19. package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +32 -0
  20. package/esm2022/lib/components/admin/entries/create.component.mjs +107 -0
  21. package/esm2022/lib/components/admin/entries/edit.component.mjs +110 -0
  22. package/esm2022/lib/components/admin/entries/entries.component.mjs +212 -0
  23. package/esm2022/lib/components/admin/entries/index.mjs +5 -0
  24. package/esm2022/lib/components/admin/fields/create-field.component.mjs +82 -0
  25. package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +121 -0
  26. package/esm2022/lib/components/admin/fields/create-or-update-field-input-base.mjs +25 -0
  27. package/esm2022/lib/components/admin/fields/edit-field.component.mjs +110 -0
  28. package/esm2022/lib/components/admin/fields/field-group.component.mjs +124 -0
  29. package/esm2022/lib/components/admin/fields/fields.component.mjs +119 -0
  30. package/esm2022/lib/components/admin/fields/index.mjs +7 -0
  31. package/esm2022/lib/components/admin/index.mjs +5 -0
  32. package/esm2022/lib/components/admin/sections/create-or-update-sections-input-base.mjs +27 -0
  33. package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +71 -0
  34. package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +418 -0
  35. package/esm2022/lib/components/admin/sections/entry-types/index.mjs +3 -0
  36. package/esm2022/lib/components/admin/sections/index.mjs +4 -0
  37. package/esm2022/lib/components/admin/sections/sections.component.mjs +334 -0
  38. package/esm2022/lib/components/admin/sites/create-or-update-sites-input-base.mjs +23 -0
  39. package/esm2022/lib/components/admin/sites/index.mjs +3 -0
  40. package/esm2022/lib/components/admin/sites/sites.component.mjs +285 -0
  41. package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +125 -0
  42. package/esm2022/lib/components/dynamic-form/entry/entry-config.mjs +18 -0
  43. package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +115 -0
  44. package/esm2022/lib/components/dynamic-form/entry/index.mjs +4 -0
  45. package/esm2022/lib/components/dynamic-form/form-control-group.mjs +31 -0
  46. package/esm2022/lib/components/dynamic-form/index.mjs +5 -0
  47. package/esm2022/lib/components/dynamic-form/matrix/index.mjs +4 -0
  48. package/esm2022/lib/components/dynamic-form/matrix/matrix-config.component.mjs +229 -0
  49. package/esm2022/lib/components/dynamic-form/matrix/matrix-config.mjs +50 -0
  50. package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +111 -0
  51. package/esm2022/lib/components/dynamic-form/table/index.mjs +4 -0
  52. package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +174 -0
  53. package/esm2022/lib/components/dynamic-form/table/table-config.mjs +38 -0
  54. package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +114 -0
  55. package/esm2022/lib/components/index.mjs +3 -0
  56. package/esm2022/lib/constants/index.mjs +2 -0
  57. package/esm2022/lib/constants/styles.mjs +32 -0
  58. package/esm2022/lib/enums/ecms-component.mjs +13 -0
  59. package/esm2022/lib/enums/index.mjs +2 -0
  60. package/esm2022/lib/proxy/admin/dynamic-forms/form-admin.service.mjs +24 -0
  61. package/esm2022/lib/proxy/admin/dynamic-forms/index.mjs +3 -0
  62. package/esm2022/lib/proxy/admin/dynamic-forms/models.mjs +2 -0
  63. package/esm2022/lib/proxy/admin/entries/entry-admin.service.mjs +67 -0
  64. package/esm2022/lib/proxy/admin/entries/index.mjs +3 -0
  65. package/esm2022/lib/proxy/admin/entries/models.mjs +2 -0
  66. package/esm2022/lib/proxy/admin/fields/field-admin.service.mjs +47 -0
  67. package/esm2022/lib/proxy/admin/fields/field-group-admin.service.mjs +43 -0
  68. package/esm2022/lib/proxy/admin/fields/index.mjs +4 -0
  69. package/esm2022/lib/proxy/admin/fields/models.mjs +2 -0
  70. package/esm2022/lib/proxy/admin/index.mjs +7 -0
  71. package/esm2022/lib/proxy/admin/sections/entry-type-admin.service.mjs +43 -0
  72. package/esm2022/lib/proxy/admin/sections/index.mjs +4 -0
  73. package/esm2022/lib/proxy/admin/sections/models.mjs +2 -0
  74. package/esm2022/lib/proxy/admin/sections/section-admin.service.mjs +53 -0
  75. package/esm2022/lib/proxy/admin/sites/index.mjs +3 -0
  76. package/esm2022/lib/proxy/admin/sites/models.mjs +2 -0
  77. package/esm2022/lib/proxy/admin/sites/site-admin.service.mjs +51 -0
  78. package/esm2022/lib/proxy/dignite/abp/data/index.mjs +2 -0
  79. package/esm2022/lib/proxy/dignite/abp/data/models.mjs +2 -0
  80. package/esm2022/lib/proxy/dignite/abp/index.mjs +3 -0
  81. package/esm2022/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.mjs +48 -0
  82. package/esm2022/lib/proxy/dignite/file-explorer/directories/index.mjs +3 -0
  83. package/esm2022/lib/proxy/dignite/file-explorer/directories/models.mjs +2 -0
  84. package/esm2022/lib/proxy/dignite/file-explorer/files/file-descriptor.service.mjs +60 -0
  85. package/esm2022/lib/proxy/dignite/file-explorer/files/index.mjs +3 -0
  86. package/esm2022/lib/proxy/dignite/file-explorer/files/models.mjs +2 -0
  87. package/esm2022/lib/proxy/dignite/file-explorer/index.mjs +4 -0
  88. package/esm2022/lib/proxy/dignite/index.mjs +4 -0
  89. package/esm2022/lib/proxy/entries/entry-status.enum.mjs +8 -0
  90. package/esm2022/lib/proxy/entries/index.mjs +2 -0
  91. package/esm2022/lib/proxy/fields/index.mjs +2 -0
  92. package/esm2022/lib/proxy/fields/models.mjs +2 -0
  93. package/esm2022/lib/proxy/index.mjs +10 -0
  94. package/esm2022/lib/proxy/microsoft/asp-net-core/index.mjs +3 -0
  95. package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/index.mjs +2 -0
  96. package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/models.mjs +2 -0
  97. package/esm2022/lib/proxy/microsoft/extensions/index.mjs +3 -0
  98. package/esm2022/lib/proxy/microsoft/extensions/primitives/index.mjs +2 -0
  99. package/esm2022/lib/proxy/microsoft/extensions/primitives/models.mjs +2 -0
  100. package/esm2022/lib/proxy/microsoft/index.mjs +5 -0
  101. package/esm2022/lib/proxy/microsoft/net/http/headers/index.mjs +2 -0
  102. package/esm2022/lib/proxy/microsoft/net/http/headers/models.mjs +2 -0
  103. package/esm2022/lib/proxy/microsoft/net/http/index.mjs +3 -0
  104. package/esm2022/lib/proxy/microsoft/net/index.mjs +3 -0
  105. package/esm2022/lib/proxy/sections/index.mjs +3 -0
  106. package/esm2022/lib/proxy/sections/models.mjs +2 -0
  107. package/esm2022/lib/proxy/sections/section-type.enum.mjs +9 -0
  108. package/esm2022/lib/proxy/sites/index.mjs +2 -0
  109. package/esm2022/lib/proxy/sites/models.mjs +2 -0
  110. package/esm2022/lib/proxy/volo/abp/content/index.mjs +2 -0
  111. package/esm2022/lib/proxy/volo/abp/content/models.mjs +2 -0
  112. package/esm2022/lib/proxy/volo/abp/index.mjs +3 -0
  113. package/esm2022/lib/proxy/volo/cms-kit/index.mjs +3 -0
  114. package/esm2022/lib/proxy/volo/cms-kit/users/index.mjs +2 -0
  115. package/esm2022/lib/proxy/volo/cms-kit/users/models.mjs +2 -0
  116. package/esm2022/lib/proxy/volo/index.mjs +4 -0
  117. package/esm2022/lib/services/appent-content.mjs +15 -0
  118. package/esm2022/lib/services/cms-api.service.mjs +80 -0
  119. package/esm2022/lib/services/cms.service.mjs +23 -0
  120. package/esm2022/lib/services/field-abstracts.service.mjs +45 -0
  121. package/esm2022/lib/services/index.mjs +5 -0
  122. package/esm2022/lib/services/simple-reuse-strategy.mjs +43 -0
  123. package/esm2022/lib/services/update-list.service.mjs +19 -0
  124. package/esm2022/lib/toolbar/index.mjs +3 -0
  125. package/esm2022/lib/toolbar/toolbar-btn-default-action.mjs +160 -0
  126. package/esm2022/lib/toolbar/toolbar-config.mjs +81 -0
  127. package/esm2022/public-api.mjs +12 -0
  128. package/fesm2022/dignite-ng-expand.cms-config.mjs +87 -0
  129. package/fesm2022/dignite-ng-expand.cms-config.mjs.map +1 -0
  130. package/fesm2022/dignite-ng-expand.cms.mjs +4516 -0
  131. package/fesm2022/dignite-ng-expand.cms.mjs.map +1 -0
  132. package/index.d.ts +5 -0
  133. package/lib/cms-routing.module.d.ts +7 -0
  134. package/lib/cms.module.d.ts +40 -0
  135. package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +91 -0
  136. package/lib/components/admin/entries/create-or-update-entry-input-base.d.ts +23 -0
  137. package/lib/components/admin/entries/create.component.d.ts +40 -0
  138. package/lib/components/admin/entries/edit.component.d.ts +42 -0
  139. package/lib/components/admin/entries/entries.component.d.ts +66 -0
  140. package/lib/components/admin/entries/index.d.ts +4 -0
  141. package/lib/components/admin/fields/create-field.component.d.ts +31 -0
  142. package/lib/components/admin/fields/create-or-edit-field.component.d.ts +37 -0
  143. package/lib/components/admin/fields/create-or-update-field-input-base.d.ts +16 -0
  144. package/lib/components/admin/fields/edit-field.component.d.ts +40 -0
  145. package/lib/components/admin/fields/field-group.component.d.ts +51 -0
  146. package/lib/components/admin/fields/fields.component.d.ts +37 -0
  147. package/lib/components/admin/fields/index.d.ts +6 -0
  148. package/lib/components/admin/index.d.ts +4 -0
  149. package/lib/components/admin/sections/create-or-update-sections-input-base.d.ts +17 -0
  150. package/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.d.ts +38 -0
  151. package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +132 -0
  152. package/lib/components/admin/sections/entry-types/index.d.ts +2 -0
  153. package/lib/components/admin/sections/index.d.ts +3 -0
  154. package/lib/components/admin/sections/sections.component.d.ts +95 -0
  155. package/lib/components/admin/sites/create-or-update-sites-input-base.d.ts +12 -0
  156. package/lib/components/admin/sites/index.d.ts +2 -0
  157. package/lib/components/admin/sites/sites.component.d.ts +72 -0
  158. package/lib/components/dynamic-form/entry/entry-config.component.d.ts +42 -0
  159. package/lib/components/dynamic-form/entry/entry-config.d.ts +9 -0
  160. package/lib/components/dynamic-form/entry/entry-control.component.d.ts +35 -0
  161. package/lib/components/dynamic-form/entry/index.d.ts +3 -0
  162. package/lib/components/dynamic-form/form-control-group.d.ts +4 -0
  163. package/lib/components/dynamic-form/index.d.ts +4 -0
  164. package/lib/components/dynamic-form/matrix/index.d.ts +3 -0
  165. package/lib/components/dynamic-form/matrix/matrix-config.component.d.ts +73 -0
  166. package/lib/components/dynamic-form/matrix/matrix-config.d.ts +24 -0
  167. package/lib/components/dynamic-form/matrix/matrix-control.component.d.ts +39 -0
  168. package/lib/components/dynamic-form/table/index.d.ts +3 -0
  169. package/lib/components/dynamic-form/table/table-config.component.d.ts +58 -0
  170. package/lib/components/dynamic-form/table/table-config.d.ts +18 -0
  171. package/lib/components/dynamic-form/table/table-control.component.d.ts +36 -0
  172. package/lib/components/index.d.ts +2 -0
  173. package/lib/constants/index.d.ts +1 -0
  174. package/lib/constants/styles.d.ts +2 -0
  175. package/lib/enums/ecms-component.d.ts +11 -0
  176. package/lib/enums/index.d.ts +1 -0
  177. package/lib/proxy/admin/dynamic-forms/form-admin.service.d.ts +12 -0
  178. package/lib/proxy/admin/dynamic-forms/models.d.ts +4 -0
  179. package/lib/proxy/admin/entries/entry-admin.service.d.ts +21 -0
  180. package/lib/proxy/admin/entries/models.d.ts +65 -0
  181. package/lib/proxy/admin/fields/field-admin.service.d.ts +17 -0
  182. package/lib/proxy/admin/fields/field-group-admin.service.d.ts +16 -0
  183. package/{src/lib/proxy/admin/fields/models.ts → lib/proxy/admin/fields/models.d.ts} +34 -42
  184. package/lib/proxy/admin/sections/entry-type-admin.service.d.ts +15 -0
  185. package/{src/lib/proxy/admin/sections/models.ts → lib/proxy/admin/sections/models.d.ts} +74 -88
  186. package/lib/proxy/admin/sections/section-admin.service.d.ts +18 -0
  187. package/{src/lib/proxy/admin/sites/models.ts → lib/proxy/admin/sites/models.d.ts} +30 -36
  188. package/lib/proxy/admin/sites/site-admin.service.d.ts +18 -0
  189. package/lib/proxy/dignite/abp/data/models.d.ts +3 -0
  190. package/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.d.ts +17 -0
  191. package/{src/lib/proxy/dignite/file-explorer/directories/models.ts → lib/proxy/dignite/file-explorer/directories/models.d.ts} +29 -35
  192. package/lib/proxy/dignite/file-explorer/files/file-descriptor.service.d.ts +20 -0
  193. package/lib/proxy/dignite/file-explorer/files/models.d.ts +50 -0
  194. package/lib/proxy/entries/entry-status.enum.d.ts +5 -0
  195. package/lib/proxy/fields/models.d.ts +8 -0
  196. package/{src/lib/proxy/microsoft/asp-net-core/mvc/models.ts → lib/proxy/microsoft/asp-net-core/mvc/models.d.ts} +10 -12
  197. package/lib/proxy/microsoft/extensions/primitives/models.d.ts +8 -0
  198. package/{src/lib/proxy/microsoft/net/http/headers/models.ts → lib/proxy/microsoft/net/http/headers/models.d.ts} +6 -7
  199. package/lib/proxy/sections/models.d.ts +12 -0
  200. package/lib/proxy/sections/section-type.enum.d.ts +6 -0
  201. package/lib/proxy/sites/models.d.ts +4 -0
  202. package/lib/proxy/volo/abp/content/models.d.ts +5 -0
  203. package/{src/lib/proxy/volo/cms-kit/users/models.ts → lib/proxy/volo/cms-kit/users/models.d.ts} +7 -8
  204. package/lib/services/appent-content.d.ts +1 -0
  205. package/lib/services/cms-api.service.d.ts +20 -0
  206. package/lib/services/cms.service.d.ts +10 -0
  207. package/lib/services/field-abstracts.service.d.ts +20 -0
  208. package/lib/services/index.d.ts +4 -0
  209. package/lib/services/simple-reuse-strategy.d.ts +11 -0
  210. package/lib/services/update-list.service.d.ts +9 -0
  211. package/lib/toolbar/index.d.ts +2 -0
  212. package/lib/toolbar/toolbar-btn-default-action.d.ts +19 -0
  213. package/lib/toolbar/toolbar-config.d.ts +57 -0
  214. package/package.json +38 -19
  215. package/{src/public-api.ts → public-api.d.ts} +8 -12
  216. package/config/ng-package.json +0 -7
  217. package/config/src/cms-config.module.ts +0 -12
  218. package/config/src/enums/route-names.ts +0 -8
  219. package/config/src/providers/route.provider.ts +0 -66
  220. package/karma.conf.js +0 -44
  221. package/ng-package.json +0 -7
  222. package/src/lib/cms-routing.module.ts +0 -111
  223. package/src/lib/cms.module.ts +0 -119
  224. package/src/lib/components/admin/entries/create-or-edit-entries.component.html +0 -115
  225. package/src/lib/components/admin/entries/create-or-edit-entries.component.scss +0 -25
  226. package/src/lib/components/admin/entries/create-or-edit-entries.component.spec.ts +0 -21
  227. package/src/lib/components/admin/entries/create-or-edit-entries.component.ts +0 -287
  228. package/src/lib/components/admin/entries/create-or-update-entry-input-base.ts +0 -36
  229. package/src/lib/components/admin/entries/create.component.html +0 -13
  230. package/src/lib/components/admin/entries/create.component.scss +0 -21
  231. package/src/lib/components/admin/entries/create.component.spec.ts +0 -21
  232. package/src/lib/components/admin/entries/create.component.ts +0 -103
  233. package/src/lib/components/admin/entries/edit.component.html +0 -9
  234. package/src/lib/components/admin/entries/edit.component.scss +0 -26
  235. package/src/lib/components/admin/entries/edit.component.spec.ts +0 -21
  236. package/src/lib/components/admin/entries/edit.component.ts +0 -103
  237. package/src/lib/components/admin/entries/entries.component.html +0 -106
  238. package/src/lib/components/admin/entries/entries.component.scss +0 -80
  239. package/src/lib/components/admin/entries/entries.component.spec.ts +0 -21
  240. package/src/lib/components/admin/entries/entries.component.ts +0 -216
  241. package/src/lib/components/admin/entries/index.ts +0 -4
  242. package/src/lib/components/admin/fields/create-field.component.html +0 -12
  243. package/src/lib/components/admin/fields/create-field.component.scss +0 -10
  244. package/src/lib/components/admin/fields/create-field.component.spec.ts +0 -21
  245. package/src/lib/components/admin/fields/create-field.component.ts +0 -68
  246. package/src/lib/components/admin/fields/create-or-edit-field.component.html +0 -39
  247. package/src/lib/components/admin/fields/create-or-edit-field.component.scss +0 -0
  248. package/src/lib/components/admin/fields/create-or-edit-field.component.spec.ts +0 -21
  249. package/src/lib/components/admin/fields/create-or-edit-field.component.ts +0 -119
  250. package/src/lib/components/admin/fields/create-or-update-field-input-base.ts +0 -33
  251. package/src/lib/components/admin/fields/edit-field.component.html +0 -13
  252. package/src/lib/components/admin/fields/edit-field.component.scss +0 -0
  253. package/src/lib/components/admin/fields/edit-field.component.spec.ts +0 -21
  254. package/src/lib/components/admin/fields/edit-field.component.ts +0 -100
  255. package/src/lib/components/admin/fields/field-group.component.html +0 -69
  256. package/src/lib/components/admin/fields/field-group.component.scss +0 -0
  257. package/src/lib/components/admin/fields/field-group.component.spec.ts +0 -21
  258. package/src/lib/components/admin/fields/field-group.component.ts +0 -132
  259. package/src/lib/components/admin/fields/fields.component.html +0 -73
  260. package/src/lib/components/admin/fields/fields.component.scss +0 -11
  261. package/src/lib/components/admin/fields/fields.component.spec.ts +0 -21
  262. package/src/lib/components/admin/fields/fields.component.ts +0 -111
  263. package/src/lib/components/admin/fields/index.ts +0 -6
  264. package/src/lib/components/admin/index.ts +0 -4
  265. package/src/lib/components/admin/sections/create-or-update-sections-input-base.ts +0 -36
  266. package/src/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.ts +0 -79
  267. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.html +0 -191
  268. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.scss +0 -24
  269. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.spec.ts +0 -21
  270. package/src/lib/components/admin/sections/entry-types/create-or-edit.component.ts +0 -412
  271. package/src/lib/components/admin/sections/entry-types/index.ts +0 -2
  272. package/src/lib/components/admin/sections/index.ts +0 -3
  273. package/src/lib/components/admin/sections/sections.component.html +0 -191
  274. package/src/lib/components/admin/sections/sections.component.scss +0 -26
  275. package/src/lib/components/admin/sections/sections.component.spec.ts +0 -21
  276. package/src/lib/components/admin/sections/sections.component.ts +0 -334
  277. package/src/lib/components/admin/sites/create-or-update-sites-input-base.ts +0 -31
  278. package/src/lib/components/admin/sites/index.ts +0 -2
  279. package/src/lib/components/admin/sites/sites.component.html +0 -154
  280. package/src/lib/components/admin/sites/sites.component.scss +0 -19
  281. package/src/lib/components/admin/sites/sites.component.spec.ts +0 -21
  282. package/src/lib/components/admin/sites/sites.component.ts +0 -293
  283. package/src/lib/components/dynamic-form/entry/entry-config.component.html +0 -36
  284. package/src/lib/components/dynamic-form/entry/entry-config.component.scss +0 -0
  285. package/src/lib/components/dynamic-form/entry/entry-config.component.spec.ts +0 -21
  286. package/src/lib/components/dynamic-form/entry/entry-config.component.ts +0 -115
  287. package/src/lib/components/dynamic-form/entry/entry-config.ts +0 -24
  288. package/src/lib/components/dynamic-form/entry/entry-control.component.html +0 -26
  289. package/src/lib/components/dynamic-form/entry/entry-control.component.scss +0 -20
  290. package/src/lib/components/dynamic-form/entry/entry-control.component.spec.ts +0 -21
  291. package/src/lib/components/dynamic-form/entry/entry-control.component.ts +0 -110
  292. package/src/lib/components/dynamic-form/entry/index.ts +0 -3
  293. package/src/lib/components/dynamic-form/form-control-group.ts +0 -31
  294. package/src/lib/components/dynamic-form/index.ts +0 -4
  295. package/src/lib/components/dynamic-form/matrix/index.ts +0 -3
  296. package/src/lib/components/dynamic-form/matrix/matrix-config.component.html +0 -147
  297. package/src/lib/components/dynamic-form/matrix/matrix-config.component.scss +0 -0
  298. package/src/lib/components/dynamic-form/matrix/matrix-config.component.spec.ts +0 -21
  299. package/src/lib/components/dynamic-form/matrix/matrix-config.component.ts +0 -238
  300. package/src/lib/components/dynamic-form/matrix/matrix-config.ts +0 -63
  301. package/src/lib/components/dynamic-form/matrix/matrix-control.component.html +0 -42
  302. package/src/lib/components/dynamic-form/matrix/matrix-control.component.scss +0 -0
  303. package/src/lib/components/dynamic-form/matrix/matrix-control.component.spec.ts +0 -21
  304. package/src/lib/components/dynamic-form/matrix/matrix-control.component.ts +0 -104
  305. package/src/lib/components/dynamic-form/table/index.ts +0 -3
  306. package/src/lib/components/dynamic-form/table/table-config.component.html +0 -85
  307. package/src/lib/components/dynamic-form/table/table-config.component.scss +0 -10
  308. package/src/lib/components/dynamic-form/table/table-config.component.spec.ts +0 -21
  309. package/src/lib/components/dynamic-form/table/table-config.component.ts +0 -170
  310. package/src/lib/components/dynamic-form/table/table-config.ts +0 -45
  311. package/src/lib/components/dynamic-form/table/table-control.component.html +0 -55
  312. package/src/lib/components/dynamic-form/table/table-control.component.scss +0 -10
  313. package/src/lib/components/dynamic-form/table/table-control.component.spec.ts +0 -21
  314. package/src/lib/components/dynamic-form/table/table-control.component.ts +0 -107
  315. package/src/lib/components/index.ts +0 -2
  316. package/src/lib/constants/index.ts +0 -1
  317. package/src/lib/constants/styles.ts +0 -31
  318. package/src/lib/enums/ecms-component.ts +0 -11
  319. package/src/lib/enums/index.ts +0 -1
  320. package/src/lib/proxy/README.md +0 -17
  321. package/src/lib/proxy/admin/dynamic-forms/form-admin.service.ts +0 -21
  322. package/src/lib/proxy/admin/dynamic-forms/models.ts +0 -5
  323. package/src/lib/proxy/admin/entries/entry-admin.service.ts +0 -100
  324. package/src/lib/proxy/admin/entries/models.ts +0 -73
  325. package/src/lib/proxy/admin/fields/field-admin.service.ts +0 -64
  326. package/src/lib/proxy/admin/fields/field-group-admin.service.ts +0 -56
  327. package/src/lib/proxy/admin/sections/entry-type-admin.service.ts +0 -55
  328. package/src/lib/proxy/admin/sections/section-admin.service.ts +0 -74
  329. package/src/lib/proxy/admin/sites/site-admin.service.ts +0 -72
  330. package/src/lib/proxy/dignite/abp/data/models.ts +0 -4
  331. package/src/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.ts +0 -65
  332. package/src/lib/proxy/dignite/file-explorer/files/file-descriptor.service.ts +0 -86
  333. package/src/lib/proxy/dignite/file-explorer/files/models.ts +0 -57
  334. package/src/lib/proxy/entries/entry-status.enum.ts +0 -8
  335. package/src/lib/proxy/fields/models.ts +0 -9
  336. package/src/lib/proxy/generate-proxy.json +0 -11821
  337. package/src/lib/proxy/microsoft/extensions/primitives/models.ts +0 -9
  338. package/src/lib/proxy/sections/models.ts +0 -14
  339. package/src/lib/proxy/sections/section-type.enum.ts +0 -9
  340. package/src/lib/proxy/sites/models.ts +0 -5
  341. package/src/lib/proxy/volo/abp/content/models.ts +0 -6
  342. package/src/lib/services/appent-content.ts +0 -13
  343. package/src/lib/services/cms-api.service.ts +0 -71
  344. package/src/lib/services/cms.service.ts +0 -18
  345. package/src/lib/services/field-abstracts.service.ts +0 -41
  346. package/src/lib/services/index.ts +0 -4
  347. package/src/lib/services/simple-reuse-strategy.ts +0 -49
  348. package/src/lib/services/update-list.service.ts +0 -15
  349. package/src/lib/toolbar/index.ts +0 -2
  350. package/src/lib/toolbar/toolbar-btn-default-action.ts +0 -171
  351. package/src/lib/toolbar/toolbar-config.ts +0 -95
  352. package/src/test.ts +0 -26
  353. package/tsconfig.lib.json +0 -20
  354. package/tsconfig.lib.prod.json +0 -10
  355. package/tsconfig.spec.json +0 -17
  356. /package/{src/lib/proxy/admin/dynamic-forms/index.ts → lib/proxy/admin/dynamic-forms/index.d.ts} +0 -0
  357. /package/{src/lib/proxy/admin/entries/index.ts → lib/proxy/admin/entries/index.d.ts} +0 -0
  358. /package/{src/lib/proxy/admin/fields/index.ts → lib/proxy/admin/fields/index.d.ts} +0 -0
  359. /package/{src/lib/proxy/admin/index.ts → lib/proxy/admin/index.d.ts} +0 -0
  360. /package/{src/lib/proxy/admin/sections/index.ts → lib/proxy/admin/sections/index.d.ts} +0 -0
  361. /package/{src/lib/proxy/admin/sites/index.ts → lib/proxy/admin/sites/index.d.ts} +0 -0
  362. /package/{src/lib/proxy/dignite/abp/data/index.ts → lib/proxy/dignite/abp/data/index.d.ts} +0 -0
  363. /package/{src/lib/proxy/dignite/abp/index.ts → lib/proxy/dignite/abp/index.d.ts} +0 -0
  364. /package/{src/lib/proxy/dignite/file-explorer/directories/index.ts → lib/proxy/dignite/file-explorer/directories/index.d.ts} +0 -0
  365. /package/{src/lib/proxy/dignite/file-explorer/files/index.ts → lib/proxy/dignite/file-explorer/files/index.d.ts} +0 -0
  366. /package/{src/lib/proxy/dignite/file-explorer/index.ts → lib/proxy/dignite/file-explorer/index.d.ts} +0 -0
  367. /package/{src/lib/proxy/dignite/index.ts → lib/proxy/dignite/index.d.ts} +0 -0
  368. /package/{src/lib/proxy/entries/index.ts → lib/proxy/entries/index.d.ts} +0 -0
  369. /package/{src/lib/proxy/fields/index.ts → lib/proxy/fields/index.d.ts} +0 -0
  370. /package/{src/lib/proxy/index.ts → lib/proxy/index.d.ts} +0 -0
  371. /package/{src/lib/proxy/microsoft/asp-net-core/index.ts → lib/proxy/microsoft/asp-net-core/index.d.ts} +0 -0
  372. /package/{src/lib/proxy/microsoft/asp-net-core/mvc/index.ts → lib/proxy/microsoft/asp-net-core/mvc/index.d.ts} +0 -0
  373. /package/{src/lib/proxy/microsoft/extensions/index.ts → lib/proxy/microsoft/extensions/index.d.ts} +0 -0
  374. /package/{src/lib/proxy/microsoft/extensions/primitives/index.ts → lib/proxy/microsoft/extensions/primitives/index.d.ts} +0 -0
  375. /package/{src/lib/proxy/microsoft/index.ts → lib/proxy/microsoft/index.d.ts} +0 -0
  376. /package/{src/lib/proxy/microsoft/net/http/headers/index.ts → lib/proxy/microsoft/net/http/headers/index.d.ts} +0 -0
  377. /package/{src/lib/proxy/microsoft/net/http/index.ts → lib/proxy/microsoft/net/http/index.d.ts} +0 -0
  378. /package/{src/lib/proxy/microsoft/net/index.ts → lib/proxy/microsoft/net/index.d.ts} +0 -0
  379. /package/{src/lib/proxy/sections/index.ts → lib/proxy/sections/index.d.ts} +0 -0
  380. /package/{src/lib/proxy/sites/index.ts → lib/proxy/sites/index.d.ts} +0 -0
  381. /package/{src/lib/proxy/volo/abp/content/index.ts → lib/proxy/volo/abp/content/index.d.ts} +0 -0
  382. /package/{src/lib/proxy/volo/abp/index.ts → lib/proxy/volo/abp/index.d.ts} +0 -0
  383. /package/{src/lib/proxy/volo/cms-kit/index.ts → lib/proxy/volo/cms-kit/index.d.ts} +0 -0
  384. /package/{src/lib/proxy/volo/cms-kit/users/index.ts → lib/proxy/volo/cms-kit/users/index.d.ts} +0 -0
  385. /package/{src/lib/proxy/volo/index.ts → lib/proxy/volo/index.d.ts} +0 -0
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/cms",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }
@@ -1,111 +0,0 @@
1
- import { NgModule} from '@angular/core';
2
- import { Routes, RouterModule, RouteReuseStrategy} from '@angular/router';
3
- import {
4
- CreateComponent,
5
- CreateFieldComponent,
6
- CreateOrEditComponent,
7
- EditComponent,
8
- EditFieldComponent,
9
- EntriesComponent,
10
- FieldsComponent,
11
- SectionsComponent,
12
- SitesComponent,
13
- } from './components';
14
- import {
15
- AuthGuard,
16
- PermissionGuard,
17
- } from '@abp/ng.core';
18
- import { CmsExtensionsResolver } from './toolbar';
19
- import { appentStyle } from './services/appent-content';
20
- import { SimpleReuseStrategy } from './services';
21
-
22
-
23
- const routes: Routes = [
24
- {
25
- path: 'admin',
26
- canActivate: [AuthGuard, PermissionGuard],
27
- resolve: [CmsExtensionsResolver, appentStyle],
28
- children: [
29
- {
30
- path: 'entries',
31
-
32
- children: [
33
- {
34
- path: '',
35
- component: EntriesComponent,
36
- data: { keep: true }
37
- },
38
- {
39
- path: 'create',
40
- component: CreateComponent,
41
- },
42
- {
43
- path: ':entrieId/edit',
44
- component: EditComponent,
45
- },
46
- ],
47
- },
48
- {
49
- path: '',
50
- children: [
51
- {
52
- path: 'fields',
53
- children: [
54
- {
55
- path: '',
56
- component: FieldsComponent,
57
- data: { keep: true }
58
- },
59
- {
60
- path: 'create',
61
- component: CreateFieldComponent,
62
- },
63
- {
64
- path: ':id/edit',
65
- component: EditFieldComponent,
66
- },
67
- ],
68
- },
69
- {
70
- path: 'sites',
71
- component: SitesComponent,
72
- data: { keep: true }
73
- },
74
- {
75
- path: 'sections',
76
- children: [
77
- {
78
- path: '',
79
- data: { keep: true },
80
- component: SectionsComponent,
81
- },
82
- {
83
- path: ':sectionsId/entry-types',
84
- children: [
85
- {
86
- path: 'create',
87
- component: CreateOrEditComponent,
88
- },
89
- {
90
- path: ':entryTypesId/edit',
91
- component: CreateOrEditComponent,
92
- },
93
- ],
94
- },
95
- ],
96
- },
97
- ],
98
- },
99
- ],
100
- },
101
- ];
102
-
103
-
104
- @NgModule({
105
- imports: [RouterModule.forChild(routes)],
106
- exports: [RouterModule],
107
- providers:[
108
- ]
109
- })
110
- export class CmsRoutingModule {
111
- }
@@ -1,119 +0,0 @@
1
- import { NgModule, NgModuleFactory, ModuleWithProviders } from '@angular/core';
2
- import { CoreModule, LazyModuleFactory } from '@abp/ng.core';
3
- import { ThemeSharedModule } from '@abp/ng.theme.shared';
4
- import { CmsRoutingModule } from './cms-routing.module';
5
- import {
6
- CreateComponent,
7
- CreateFieldComponent,
8
- CreateOrEditComponent,
9
- CreateOrEditEntriesComponent,
10
- CreateOrEditFieldComponent,
11
- EditComponent,
12
- EditFieldComponent,
13
- EntriesComponent,
14
- FieldGroupComponent,
15
- FieldsComponent,
16
- SectionsComponent,
17
- SitesComponent,
18
-
19
- } from './components';
20
- import {
21
- MatrixConfigComponent,
22
- MatrixControlComponent,
23
- TableConfigComponent,
24
- TableControlComponent,
25
- EntryConfigComponent,
26
- EntryControlComponent,
27
- FieldControlGroup
28
- } from "./components/dynamic-form";
29
- import { DateAdapter } from '@abp/ng.theme.shared/extensions';
30
- import {
31
- NgbDateAdapter,
32
- NgbDropdownModule,
33
- NgbNavModule,
34
- NgbAccordionModule,
35
- } from '@ng-bootstrap/ng-bootstrap';
36
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
37
- import { NgxValidateCoreModule } from '@ngx-validate/core';
38
- import { DragDropModule } from '@angular/cdk/drag-drop';
39
- import { PageModule } from '@abp/ng.components/page';
40
- import { CommercialUiConfigModule } from '@volo/abp.commercial.ng.ui/config';
41
- import { CMS_TOOLBAR_ACTION_CONTRIBUTORS } from './toolbar';
42
- import { NzSelectModule } from 'ng-zorro-antd/select';
43
- import { DynamicFormModule } from '@dignite-ng/expand.dynamic-form';
44
- import { NzTableModule } from 'ng-zorro-antd/table';
45
- import {ScrollingModule} from '@angular/cdk/scrolling';
46
- import { RouteReuseStrategy } from '@angular/router';
47
- import { SimpleReuseStrategy } from './services/simple-reuse-strategy';
48
-
49
- @NgModule({
50
- declarations: [
51
- EntriesComponent,
52
- FieldsComponent,
53
- SitesComponent,
54
- SectionsComponent,
55
- FieldGroupComponent,
56
- CreateFieldComponent,
57
- EditFieldComponent,
58
- CreateOrEditFieldComponent,
59
- CreateOrEditComponent,
60
- CreateComponent,
61
- EditComponent,
62
- CreateOrEditEntriesComponent,
63
- TableConfigComponent,
64
- TableControlComponent,
65
- MatrixConfigComponent,
66
- MatrixControlComponent,
67
- EntryConfigComponent,
68
- EntryControlComponent,
69
- ],
70
- imports: [
71
- CoreModule,
72
- ThemeSharedModule,
73
- CmsRoutingModule,
74
- NgbDropdownModule,
75
- FormsModule,
76
- ReactiveFormsModule,
77
- NgxValidateCoreModule,
78
- NgbNavModule,
79
- NgbAccordionModule,
80
- DragDropModule,
81
- PageModule,
82
- CommercialUiConfigModule,
83
- NzSelectModule,
84
- NzTableModule,
85
- ScrollingModule,
86
- DynamicFormModule.forRoot({
87
- cmsFieldControlGroup: FieldControlGroup
88
- }),
89
- ],
90
- exports: [
91
- TableConfigComponent,
92
- TableControlComponent,
93
- MatrixConfigComponent,
94
- MatrixControlComponent,
95
- EntryConfigComponent,
96
- EntryControlComponent,
97
- ],
98
- providers: [
99
- { provide: NgbDateAdapter, useClass: DateAdapter },
100
- { provide: RouteReuseStrategy, useClass: SimpleReuseStrategy },
101
- ],
102
-
103
- })
104
- export class CmsModule {
105
- static forChild(options: any = {}): ModuleWithProviders<CmsModule> {
106
- return {
107
- ngModule: CmsModule,
108
- providers: [
109
- {
110
- provide: CMS_TOOLBAR_ACTION_CONTRIBUTORS,
111
- useValue: options.toolbarActionContributors,
112
- },
113
- ],
114
- };
115
- }
116
- static forLazy(options: any = {}): NgModuleFactory<CmsModule> {
117
- return new LazyModuleFactory(CmsModule.forChild(options));
118
- }
119
- }
@@ -1,115 +0,0 @@
1
- <div class="create-or-edit-entry-page" [formGroup]="_entity">
2
- <div class="container ">
3
- <div class="row">
4
- <div class="col-md-8 ">
5
- <div class="card p-2">
6
- <div class="mb-2">
7
- <label class="form-label" for="title">{{'Cms::Title' | abpLocalization}}</label>
8
- <input type="text" class="form-control" (blur)="setTitleToSlugBlur($event)"
9
- formControlName="title">
10
- </div>
11
- <template #FormDynamicRef></template>
12
- <ng-container *ngFor="let item of entryTypesItem?.fieldTabs;let i =index">
13
- <ng-container *ngFor="let el of item.fields;let i1 =index">
14
- <ng-container *ngIf="el&&_entity">
15
- <df-dynamic [entity]="_entity" [fields]="el"
16
- [selected]="entrySelect ? entrySelect.extraProperties[el.field.name] : ''"
17
- [parentFiledName]="'extraProperties'" [culture]="cultureinput.value" ></df-dynamic>
18
-
19
-
20
- </ng-container>
21
- </ng-container>
22
- </ng-container>
23
- </div>
24
- </div>
25
- <div class="col-md-4 ">
26
- <div class="card mb-0 p-2">
27
- <div class="mb-2">
28
- <label class="form-label" for="slug">{{'Cms::Slug' | abpLocalization}}</label>
29
- <input type="text" class="form-control" formControlName="slug">
30
- <div class="text-danger invalid-feedback" *ngIf="sluginput.errors?.repetition">
31
- {{sluginput.errors?.repetition}}
32
- </div>
33
- </div>
34
- <div class="mb-2">
35
- <label class="form-label" for="culture">{{'AbpUi::Languages' | abpLocalization}}</label>
36
- <select class="form-select" formControlName="culture">
37
- <ng-container *ngFor="let item of languagesList;let i =index">
38
- <option [value]="item.cultureName">{{item.displayName}}</option>
39
- </ng-container>
40
- </select>
41
- <input type="text" formControlName="culture_shadow"
42
- style="position: absolute;z-index: -1;opacity: 0;">
43
- <div class="text-danger invalid-feedback" *ngIf="culture_shadowInput.errors?.repetition">
44
- {{culture_shadowInput.errors?.repetition}}
45
- </div>
46
- </div>
47
- <div class="mb-2">
48
- <label class="form-label" for="parentId">{{'Cms::ParentEntry' | abpLocalization}}</label>
49
- <select class="form-select" formControlName="parentId">
50
- <option value=""></option>
51
- <ng-container *ngFor="let item of entryTypesList;let i =index">
52
- <option [value]="item.id">{{item.displayName}}</option>
53
- </ng-container>
54
- </select>
55
- </div>
56
- <div class="mb-2">
57
- <label class="form-label" for="publishTime">{{'Cms::PublishTime' | abpLocalization}}</label>
58
- <input type="datetime-local" class="form-control" step="1" formControlName="publishTime">
59
- </div>
60
- <div class="mb-2" *ngIf="isEdit">
61
- <label class="form-label" for="publishTime">{{'Cms::Version' | abpLocalization}}</label>
62
- <ul class="list-group">
63
- <ng-container *ngFor="let item of AllVersionsList">
64
- <li class="list-group-item flex-between">
65
- <div>
66
- {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd HH:m:s'):('Cms::InitialVersion' | abpLocalization)}}
67
- <span class="badge text-bg-success ms-1"
68
- *ngIf="item.isActivatedVersion">{{'Cms::IsActive' | abpLocalization}}</span>
69
- <span class="badge text-bg-primary ms-1"
70
- *ngIf="item.id === RevisionEntryId">{{'Cms::Editing' |
71
- abpLocalization}}</span>
72
- </div>
73
- <div>
74
- <div ngbDropdown class="d-inline-block">
75
- <button type="button" class="btn btn-link-primary p-2 "
76
- style="line-height: 0;" id="dropdownBasic1" ngbDropdownToggle>
77
- </button>
78
- <div ngbDropdownMenu aria-labelledby="dropdownBasic1">
79
- <button ngbDropdownItem type="button" *ngIf="!item.isActivatedVersion"
80
- (click)="ActivatedVersion(item.id)">
81
- <i class="fas fa-check me-1"></i>{{'Cms::IsActive' |
82
- abpLocalization}}
83
- </button>
84
- <button ngbDropdownItem type="button"
85
- routerLink="/cms/admin/entries/create"
86
- [queryParams]="{RevisionEntryId:item.id}">
87
- <i class="fas fa-plus me-1"></i>{{'Cms::NewVersion' |
88
- abpLocalization}}
89
- </button>
90
- <button ngbDropdownItem type="button" (click.stop)="toEditUrl(item.id)"
91
- *ngIf="item.id !== RevisionEntryId">
92
- <i class="fas fa-edit me-1"></i>{{'AbpUi::Edit' | abpLocalization}}
93
- </button>
94
- <button ngbDropdownItem type="button"
95
- (click.stop)="delectVersion(item.id)"
96
- *ngIf="item.initialVersionId&&!item.isActivatedVersion&&item.id !== RevisionEntryId">
97
- <i class="fas fa-trash me-1"></i>{{'AbpUi::Delete' |
98
- abpLocalization}}
99
- </button>
100
- </div>
101
- </div>
102
- </div>
103
- </li>
104
- </ng-container>
105
- </ul>
106
- </div>
107
- <div class="mb-2">
108
- <label class="form-label" for="versionNotes">{{'Cms::RevisionNotes' | abpLocalization}}</label>
109
- <textarea class="form-control" formControlName="versionNotes" rows="3"></textarea>
110
- </div>
111
- </div>
112
- </div>
113
- </div>
114
- </div>
115
- </div>
@@ -1,25 +0,0 @@
1
- ::ng-deep .create-or-edit-entry-page {
2
- .dignite_page {
3
- height: calc(100vh - 32px - 53px - 40px);
4
- overflow: auto;
5
- background: transparent;
6
- }
7
-
8
- .form-control,
9
- .form-select {
10
- padding: 0.475rem 1.25rem;
11
- }
12
- .cursor-move{
13
- cursor: move;
14
- }
15
- .bordernNavs{
16
- border: var(--bs-border-width) solid var(--lpx-border-color);
17
- padding-left: inherit;
18
- padding-right: inherit;
19
- }
20
- .flex-between{
21
- display: flex;
22
- align-items: center;
23
- justify-content: space-between;
24
- }
25
- }
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { CreateOrEditEntriesComponent } from './create-or-edit-entries.component';
4
-
5
- describe('CreateOrEditEntriesComponent', () => {
6
- let component: CreateOrEditEntriesComponent;
7
- let fixture: ComponentFixture<CreateOrEditEntriesComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [CreateOrEditEntriesComponent]
12
- });
13
- fixture = TestBed.createComponent(CreateOrEditEntriesComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,287 +0,0 @@
1
- import { ConfigStateService, LocalizationService } from '@abp/ng.core';
2
- import { ToasterService } from '@abp/ng.theme.shared';
3
- import { AfterContentInit, Component, Input, QueryList, ViewChild, ViewChildren, ViewContainerRef, inject } from '@angular/core';
4
- import { AbstractControl, FormBuilder, FormControl, FormGroup, ValidationErrors, Validators } from '@angular/forms';
5
- import { ActivatedRoute, Router } from '@angular/router';
6
- import { EntryAdminService } from '../../../proxy/admin/entries';
7
- import { SectionAdminService } from '../../../proxy/admin/sections';
8
- import { Observable } from 'rxjs';
9
- import { DatePipe, Location } from '@angular/common';
10
- import { CmsApiService } from '../../../services';
11
- import { CreateDynamicComponentsService } from '@dignite-ng/expand.dynamic-form';
12
-
13
- @Component({
14
- selector: 'cms-create-or-edit-entries',
15
- templateUrl: './create-or-edit-entries.component.html',
16
- styleUrls: ['./create-or-edit-entries.component.scss']
17
- })
18
- export class CreateOrEditEntriesComponent implements AfterContentInit {
19
-
20
-
21
- constructor(
22
- private toaster: ToasterService,
23
- public _location: Location,
24
- private configState: ConfigStateService,
25
- private _SectionAdminService: SectionAdminService,
26
- private _EntryAdminService: EntryAdminService,
27
- private datePipe: DatePipe,
28
- private _LocalizationService: LocalizationService,
29
- private router: Router,
30
- private _CmsApiService: CmsApiService,
31
- ) { }
32
-
33
-
34
- /**语言 */
35
- cultureName: string = ''
36
- /**条目id */
37
- entryTypeId: string = ''
38
-
39
- /**新建版本的版本id,同条目id */
40
- RevisionEntryId: any = ''
41
- /**选择的条目项 */
42
- entryTypesItem: any = ''
43
- /**版块id */
44
- sectionId: string = ''
45
- /**版块详情 */
46
- SectionSelect: any = ''
47
- /**语言列表 */
48
- languagesList: any[] = []
49
- /**条目类型列表-用于选择上级条目 */
50
- entryTypesList: any[] = []
51
- /**版本列表 */
52
- AllVersionsList: any[] = []
53
-
54
- /**是否是编辑 */
55
- @Input() isEdit = false
56
-
57
- /**来自父组件的传值 */
58
- FromParentQueryParams: any = ''
59
- @Input()
60
- public set ParentQueryParams(v: any) {
61
- if (v) {
62
- this.FromParentQueryParams = v;
63
- }
64
- }
65
-
66
- /**表单实体 */
67
- _entity: FormGroup | undefined
68
- @Input()
69
- public set entity(v: any) {
70
- if (v) {
71
- this._entity = v;
72
- }
73
- }
74
- /**指定id的条目信息 */
75
- entrySelect: any = ''
76
- @Input()
77
- public set parentEntrySelect(v: any) {
78
- if (v) {
79
- let V_extraProperties = this._CmsApiService.deepClone(this.convertExtraProperties(v.extraProperties))
80
- v.extraProperties = V_extraProperties
81
- this.entrySelect = v;
82
- }
83
- }
84
- /**将对象中的ExtraProperties赋值到extraProperties */
85
- convertExtraProperties(obj) {
86
- for (let key in obj) {
87
- if (Array.isArray(obj[key])) {
88
- obj[key].forEach(item => {
89
- if (item.hasOwnProperty('ExtraProperties')) {
90
- item['extraProperties'] = item['ExtraProperties'];
91
- }
92
- });
93
- }
94
- }
95
- return obj;
96
- }
97
-
98
- /**别名表单实体 */
99
- get sluginput() {
100
- return this._entity.get('slug')
101
- }
102
- /**语言表单实体 */
103
- get cultureinput() {
104
- return this._entity.get('culture')
105
- }
106
- /**语言表单实体影子 */
107
- get culture_shadowInput() {
108
- return this._entity.get('culture_shadow')
109
- }
110
-
111
- /**extraProperties配置表单实体 */
112
- get extraProperties() {
113
- return this._entity.get('extraProperties') as FormGroup
114
- }
115
- async ngAfterContentInit(): Promise<void> {
116
- //Called after ngOnInit when the component's or directive's content has been initialized.
117
- //Add 'implements AfterContentInit' to the class.
118
- let queryParams = this.FromParentQueryParams
119
- if (this._entity && this.FromParentQueryParams) {
120
- this._entity.setControl('slug', new FormControl('', {
121
- validators: Validators.required,
122
- asyncValidators: this.repetitionAsyncValidator(),
123
- updateOn: 'blur'
124
- }))
125
- this._entity.setControl('culture_shadow', new FormControl('', {
126
- validators: [Validators.required],
127
- asyncValidators: this.cultureAsyncValidator_test(),
128
- }))
129
- this._entity.get('culture').disable();
130
- if (queryParams.RevisionEntryId && this.entrySelect) {
131
- this.RevisionEntryId = queryParams.RevisionEntryId
132
- this.setEntryconfig(this.entrySelect);
133
- } else {
134
- this.setEntryconfig(queryParams);
135
- }
136
- if (this.sectionId) await this.getSectionSelect();
137
- if (this.RevisionEntryId) await this.getAllVersionsList()
138
-
139
- }
140
-
141
-
142
- }
143
-
144
- /**表单控件模板-动态表单配置组件 */
145
- @ViewChildren('FormDynamicontrolRef', { read: ViewContainerRef }) FormDynamicontrolRef: QueryList<ViewContainerRef>;
146
-
147
- // private _CreateDynamicComponentsService = inject(CreateDynamicComponentsService)
148
-
149
-
150
-
151
-
152
- /**定义自定义异步验证 */
153
- cultureAsyncValidator_test() {
154
- return (ctrl: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
155
- return new Promise(resolve => {
156
- let subculture = this._entity?.get('culture').value
157
- if (subculture == this.entrySelect?.culture || this.SectionSelect.type !== 0) {
158
- resolve(null);
159
- return
160
- }
161
- this._EntryAdminService.cultureExistWithSingleSection({
162
- culture: subculture,
163
- sectionId: this.sectionId,
164
- entryTypeId: this.entryTypeId
165
- }).subscribe(res => {
166
- if (res) {
167
- resolve({ repetition: this._LocalizationService.instant(`Cms::EntriesAlreadyExistEntryType`, this.entryTypesItem.displayName, this.languagesList.find(el => el.cultureName == subculture).displayName) });
168
- } else {
169
- resolve(null);
170
- }
171
- })
172
- });
173
- };
174
- }
175
-
176
-
177
- /**
178
- * 设置条目详情
179
- * @param {object} source - 数据源对象
180
- */
181
- setEntryconfig(source: any) {
182
- this.entryTypeId = source.entryTypeId;
183
- this.cultureName = source.culture || source.cultureName;
184
- this.sectionId = source.sectionId;
185
- }
186
- time: number = 0
187
-
188
- /**定义自定义异步验证 */
189
- repetitionAsyncValidator() {
190
- return (ctrl: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
191
- return new Promise(resolve => {
192
- let subslug = this._entity?.get('slug').value
193
- if (subslug == this.entrySelect?.slug) {
194
- resolve(null);
195
- return
196
- }
197
- this._EntryAdminService.slugExists({
198
- culture: this.cultureName,
199
- sectionId: this.sectionId,
200
- slug: subslug
201
- }).subscribe(res => {
202
- if (res) {
203
- resolve({ repetition: this._LocalizationService.instant(`Cms::EntrySlug{0}AlreadyExist`, ctrl.value) });
204
- } else {
205
- resolve(null);
206
- }
207
- })
208
- });
209
- };
210
- }
211
-
212
-
213
-
214
- /**获取版块详情 */
215
- getSectionSelect() {
216
- return new Promise((resolve, rejects) => {
217
- this._SectionAdminService.get(this.sectionId).subscribe(async (res) => {
218
- let languages = this.configState.getDeep('localization.languages')
219
- this.languagesList = languages.filter(el => res?.site?.languages.some(elr => elr.cultureName == el.cultureName))
220
- let entryTypesItem = res.entryTypes.find(el => el.id == this.entryTypeId)
221
- this.SectionSelect = res
222
- this.entryTypesItem = entryTypesItem
223
- this.entryTypesList = res.entryTypes.filter(el => el.id == this.entryTypeId)
224
- this._entity.patchValue({
225
- ...this.entrySelect,
226
- initialVersionId: this.entrySelect?.initialVersionId || this.RevisionEntryId || '',
227
- culture: this.cultureName,
228
- culture_shadow: this.cultureName,
229
- entryTypeId: this.entryTypeId,
230
- publishTime: this.datePipe.transform(new Date(), 'yyyy-MM-dd HH:mm:ss'),
231
- })
232
- resolve(true)
233
- })
234
- })
235
- }
236
-
237
- /**获取条目版本列表 */
238
- getAllVersionsList() {
239
- return new Promise((resolve, rejects) => {
240
-
241
- this._EntryAdminService.getAllVersions(this.RevisionEntryId).subscribe(res => {
242
- this.AllVersionsList = res.items
243
- resolve(res)
244
- })
245
- })
246
- }
247
-
248
- /**标题转化别名 */
249
- setTitleToSlugBlur(event) {
250
- let val = event.target.value
251
- let slug = this._entity.get('slug')
252
- let pinyinstr = ''
253
- if (slug.value) return
254
- pinyinstr = this._CmsApiService.chineseToPinyin(val)
255
- this._entity.patchValue({
256
- slug: pinyinstr || val
257
- })
258
- }
259
- /**使用Unicode编码范围判断是否是中文字符 */
260
- isChinese(str) {
261
- return /^[\u4e00-\u9fa5]+$/.test(str);
262
- }
263
-
264
- /**激活 */
265
- ActivatedVersion(VersionId) {
266
- this._EntryAdminService.activate(VersionId).subscribe((res) => {
267
- this.AllVersionsList.forEach(el => {
268
- el.isActivatedVersion = el.id === VersionId
269
- })
270
- return
271
- })
272
- }
273
- /**编辑版本 */
274
- toEditUrl(id) {
275
- this.router.navigateByUrl('', { skipLocationChange: true }).then(() => {
276
- this.router.navigate([`/cms/admin/entries/${id}/edit`]);
277
- });
278
- }
279
- /**删除版本 */
280
- delectVersion(vid) {
281
- this._EntryAdminService.delete(vid).subscribe(res => {
282
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
283
- this.getAllVersionsList()
284
- })
285
- }
286
-
287
- }