@dignite-ng/expand.cms 0.0.20 → 0.0.21

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
@@ -1,191 +0,0 @@
1
- <abp-page [title]="'Cms::Sections' | abpLocalization" [toolbar]="true">
2
- <div class="sections-page">
3
-
4
- <div class="card ">
5
- <div class="card-body px-2 py-sm-2 border-bottom">
6
- <div class="input-group">
7
- <select class="form-select col-auto" [(ngModel)]="filters.siteId" (change)="siteIdChange()">
8
- <ng-container *ngFor="let item of siteList">
9
- <option [value]="item.id">{{item.displayName}}</option>
10
- </ng-container>
11
- </select>
12
- <input type="text" class="form-control" [(ngModel)]="filters.filter"
13
- [placeholder]="'AbpUi::Search' | abpLocalization" />
14
- <button class="btn btn-primary px-3" type="button" id="button-addon2" (click)="list.get()">
15
- <i class="fa fa-search"></i>
16
- </button>
17
- </div>
18
- </div>
19
- </div>
20
- <div class="card mb-0">
21
- <div class="card-body p-0">
22
- <div class="table-responsive table-fixed-header">
23
- <ngx-datatable class="material container-height" [rows]="data.items" [list]="list"
24
- [columnMode]="'force'" [headerHeight]="50" [footerHeight]="50" rowHeight="auto"
25
- [scrollbarV]="true" [virtualization]="false" [externalPaging]="true" [count]="data.totalCount">
26
- <ngx-datatable-column [name]="'Cms::DisplayName' | abpLocalization" prop="displayName">
27
- <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
28
- {{ value }}
29
- </ng-template>
30
- </ngx-datatable-column>
31
- <ngx-datatable-column [name]="'Cms::Name' | abpLocalization" prop="name">
32
- <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
33
- {{ value }}
34
- </ng-template>
35
- </ngx-datatable-column>
36
- <ngx-datatable-column [name]="'Cms::SectionType' | abpLocalization" prop="type">
37
- <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
38
- {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}
39
- </ng-template>
40
- </ngx-datatable-column>
41
- <ngx-datatable-column [name]="'Cms::Default' | abpLocalization" prop="isDefault">
42
- <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
43
- <i class="fas fa-check text-success" *ngIf="value"></i>
44
- <i class="fas fa-times text-danger" *ngIf="!value"></i>
45
- </ng-template>
46
- </ngx-datatable-column>
47
- <ngx-datatable-column [name]="'Cms::IsActive' | abpLocalization" prop="isActive">
48
- <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
49
- <i class="fas fa-check text-success" *ngIf="value"></i>
50
- <i class="fas fa-times text-danger" *ngIf="!value"></i>
51
- </ng-template>
52
- </ngx-datatable-column>
53
- <ngx-datatable-column [name]="'Cms::EntryType' | abpLocalization" prop="SiteId">
54
- <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
55
- <div ngbDropdown container="body">
56
- <button type="button" class="btn btn-link" ngbDropdownToggle id="dropdownBasic1">
57
- {{'Cms::EntryType' | abpLocalization}}
58
- </button>
59
- <div ngbDropdownMenu aria-labelledby="dropdownBasic1">
60
- <ng-container *ngFor="let item of row.entryTypes;let i =index">
61
- <li ngbDropdownItem
62
- class="d-flex align-items-center justify-content-between"
63
- (click.stop)="jumpSectionsEdit(row,item)">{{item.displayName}}
64
- <button class="btn btn-light btn-sm p-0"
65
- (click.stop)="deleteEntryType(item)"><i class="fas fa-trash p-sm-1"
66
- style="font-size: 12px;" role="button"></i></button>
67
- </li>
68
- </ng-container>
69
- <li ngbDropdownItem (click.stop)="jumpSectionsCreate(row)"><i
70
- class="fas fa-plus-circle me-2"></i>{{'Cms::New' |
71
- abpLocalization}}</li>
72
- </div>
73
- </div>
74
-
75
- </ng-template>
76
- </ngx-datatable-column>
77
- <ngx-datatable-column [name]="'Cms::CreationTime' | abpLocalization" prop="creationTime">
78
- <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
79
- {{ value | date : 'yyyy-MM-dd hh-mm-ss' }}
80
- </ng-template>
81
- </ngx-datatable-column>
82
- <ngx-datatable-column [sortable]="false">
83
- <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
84
- <div ngbDropdown container="body">
85
- <button type="button" class="btn btn-outline-primary btn-sm" ngbDropdownToggle>
86
- {{'AbpUi::Actions' | abpLocalization}}
87
- </button>
88
- <div ngbDropdownMenu>
89
- <button ngbDropdownItem (click)="editSectionBtn(row)">{{'AbpUi::Edit' |
90
- abpLocalization}}</button>
91
- <button ngbDropdownItem (click)="deletefield(row)">{{'AbpUi::Delete' |
92
- abpLocalization}}</button>
93
- </div>
94
- </div>
95
- </ng-template>
96
- </ngx-datatable-column>
97
- </ngx-datatable>
98
- </div>
99
- </div>
100
- </div>
101
-
102
- </div>
103
-
104
-
105
- </abp-page>
106
-
107
-
108
-
109
-
110
- <abp-modal [(visible)]="visibleOpen" [busy]="modalBusy" (visibleChange)="VisibleChange($event)">
111
- <ng-template #abpHeader>
112
- <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>
113
- </ng-template>
114
- <ng-template #abpBody>
115
- <ng-template #loaderRef>
116
- <div class="text-center"><i class="fa fa-pulse fa-spinner" aria-hidden="true"></i></div>
117
- </ng-template>
118
- <ng-container *ngIf="createOrEditForm; else loaderRef">
119
- <form class="sites-modal-form" [formGroup]="createOrEditForm" (ngSubmit)="createOrEditSave()">
120
- <button type="submit" #createOrEditModalSubmitBtn style="display: none"></button>
121
- <div class="mb-2">
122
- <label class="form-label">{{'Cms::EntryType' | abpLocalization}}</label>
123
- <div>
124
- <ng-container *ngFor="let item of _sectionTypeOptions;let i =index">
125
- <div class="form-check form-check-inline">
126
- <input class="form-check-input" type="radio" [value]="item.value"
127
- (change)="radiochange()" formControlName="type" id="flexRadioDefault{{i}}">
128
- <label class="form-check-label" for="flexRadioDefault{{i}}">
129
- {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}
130
- </label>
131
- </div>
132
- </ng-container>
133
- </div>
134
- </div>
135
- <div class="mb-2">
136
- <label class="form-label">{{'Cms::DisplayName' | abpLocalization}}</label>
137
- <input type="text" class="form-control" formControlName="displayName"
138
- (blur)="disPlayNameInputBlur($event)" placeholder="" />
139
- </div>
140
- <div class="mb-2">
141
- <label class="form-label">{{'Cms::Name' | abpLocalization}}</label>
142
- <input type="text" class="form-control" formControlName="name" placeholder="" />
143
- <div class="text-danger invalid-feedback" *ngIf="nameInput.errors?.repetition">
144
- {{nameInput.errors?.repetition}}
145
- </div>
146
- </div>
147
- <div class="mb-2">
148
- <label class="form-label">{{'Cms::Route' | abpLocalization}} </label>
149
- <input type="text" class="form-control" formControlName="route" placeholder="" />
150
- <div class="text-danger invalid-feedback" *ngIf="routeInput.errors?.repetition">
151
- {{routeInput.errors?.repetition}}
152
- </div>
153
- <div class="form-text">
154
- {{'Cms::RouteTips' | abpLocalization}}<br>
155
- &nbsp;&nbsp;blog<br>
156
- &nbsp;&nbsp;{{'blog/{slug}'}}<br>
157
- &nbsp;&nbsp;{{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}
158
- </div>
159
- </div>
160
- <div class="mb-2">
161
- <label class="form-label">{{'Cms::Template' | abpLocalization}} </label>
162
- <input type="text" class="form-control" formControlName="template" placeholder="" />
163
- <div class="form-text">
164
- {{"Cms::TemplateTips" | abpLocalization}}
165
- </div>
166
- </div>
167
- <div class="mb-2">
168
- <div class="form-check form-check-inline">
169
- <input class="form-check-input" type="checkbox" value="true" formControlName="isDefault"
170
- id="isDefault" />
171
- <label class="form-check-label" for="isDefault"> {{'Cms::Default' | abpLocalization}} </label>
172
- </div>
173
- </div>
174
- <div class="mb-2">
175
- <div class="form-check form-check-inline">
176
- <input class="form-check-input" type="checkbox" value="true" formControlName="isActive"
177
- id="isActive" />
178
- <label class="form-check-label" for="isActive"> {{'Cms::IsActive' | abpLocalization}}</label>
179
- </div>
180
- </div>
181
-
182
- </form>
183
- </ng-container>
184
- </ng-template>
185
- <ng-template #abpFooter>
186
- <button type="button" class="btn btn-secondary" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>
187
- <!-- [disabled]="!this.createOrEditForm.valid" -->
188
- <abp-button iconClass="fa fa-check" (click)="createOrEditModalSubmitBtn.nativeElement.click()">{{'AbpUi::Save' |
189
- abpLocalization}}</abp-button>
190
- </ng-template>
191
- </abp-modal>
@@ -1,26 +0,0 @@
1
- ::ng-deep.sections-page {
2
- .dignite_page{
3
- background: transparent;
4
- }
5
- .list-group-flush > .list-group-item:first-child{
6
- border-top-width:var(--bs-list-group-border-width);
7
- }
8
- .card-header{
9
- input{
10
- flex: 2 1 auto;
11
- }
12
- .form-select{
13
- padding: 0.475rem 3.75rem 0.475rem 1.25rem;
14
- }
15
- }
16
- .container-height{
17
- height: calc(100vh - 220px);
18
- }
19
-
20
-
21
- }
22
- ::ng-deep.sites-modal-form{
23
- .form-control{
24
- padding: 0.4rem 1.25rem;
25
- }
26
- }
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { SectionsComponent } from './sections.component';
4
-
5
- describe('SectionsComponent', () => {
6
- let component: SectionsComponent;
7
- let fixture: ComponentFixture<SectionsComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [SectionsComponent]
12
- });
13
- fixture = TestBed.createComponent(SectionsComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,334 +0,0 @@
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, ElementRef, OnInit, ViewChild, inject, } from '@angular/core';
4
- import { AbstractControl, FormBuilder, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators, } from '@angular/forms';
5
- import { EntryTypeAdminService, GetSectionsInput, SectionAdminService, SectionDto } from '../../../proxy/admin/sections';
6
- import { SiteAdminService } from '../../../proxy/admin/sites';
7
- import { ColumnMode } from "@swimlane/ngx-datatable";
8
- import { finalize } from 'rxjs/operators';
9
- import { CreateOrUpdateSectionsInputBase } from './create-or-update-sections-input-base';
10
- import { SectionType, sectionTypeOptions } from '../../../proxy/sections';
11
- import { EXTENSIONS_IDENTIFIER } from '@abp/ng.theme.shared/extensions';
12
- import { ECmsComponent } from '../../../enums';
13
- import { CmsApiService } from '../../../services/cms-api.service';
14
- import { Observable } from 'rxjs';
15
- import { Router } from '@angular/router';
16
- import { UpdateListService } from '../../../services/update-list.service';
17
-
18
- @Component({
19
- selector: 'cms-sections',
20
- templateUrl: './sections.component.html',
21
- styleUrls: ['./sections.component.scss'],
22
- providers: [
23
- // [Required]
24
- ListService,
25
- // [Optional]
26
- // Provide this token if you want a different debounce time.
27
- // Default is 300. Cannot be 0. Any value below 100 is not recommended.
28
- { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
29
- {
30
- provide: EXTENSIONS_IDENTIFIER,
31
- useValue: ECmsComponent.Sections,
32
- },
33
- ]
34
- })
35
- export class SectionsComponent implements OnInit {
36
- constructor(
37
- public readonly list: ListService,
38
- private _SectionAdminService: SectionAdminService,
39
- private _SiteAdminService: SiteAdminService,
40
- private toaster: ToasterService,
41
- private confirmation: ConfirmationService,
42
- private fb: FormBuilder,
43
- private configState: ConfigStateService,
44
- public _EntryTypeAdminService: EntryTypeAdminService,
45
- public _LocalizationService: LocalizationService,
46
- public _CmsApiService: CmsApiService,
47
- private router: Router,
48
- ) {
49
-
50
- }
51
- private _UpdateListService=inject(UpdateListService)
52
-
53
- /**跳转编辑 */
54
- jumpSectionsEdit(row, item) {
55
- this.router.navigate([`/cms/admin/sections/${row.id}/entry-types/${item.id}/edit`], {
56
- })
57
- }
58
- /**跳转新建 */
59
- jumpSectionsCreate(row) {
60
- this.router.navigate([`/cms/admin/sections/${row.id}/entry-types/create`], {
61
- })
62
- }
63
-
64
-
65
- /**版块列表 */
66
- siteList: any[] = []
67
- /*** */
68
- ColumnMode = ColumnMode;
69
- data: PagedResultDto<SectionDto> = {
70
- items: [],
71
- totalCount: 0,
72
- };
73
- /** */
74
- filters = {} as GetSectionsInput;
75
- /**获取页面列表 */
76
- hookToQuery() {
77
- const getData = (query: ABP.PageQueryParams) => this._SectionAdminService.getList({
78
- ...query,
79
- ...this.filters,
80
- });
81
-
82
- const setData = (list: PagedResultDto<SectionDto>) => (this.data = list);
83
- this.list.hookToQuery(getData).subscribe(setData);
84
- }
85
-
86
- async ngOnInit(): Promise<void> {
87
- await this.getSiteList()
88
- this.hookToQuery()
89
- this._UpdateListService.updateListEvent.subscribe(() => {
90
- this.list.get()
91
- });
92
- }
93
-
94
- /**站点切换 */
95
- siteIdChange() {
96
- this.list.page = 0
97
- this.list.get()
98
- }
99
-
100
- /**获取版块列表 */
101
- getSiteList() {
102
- return new Promise((resolve, rejects) => {
103
- this._SiteAdminService.getList({}).subscribe(res => {
104
- this.siteList = res.items
105
- this.filters.siteId = res.items[0]?.id || ''
106
- resolve(true)
107
- rejects(false)
108
-
109
- })
110
- })
111
-
112
- }
113
-
114
- /**创建版块模态框状态 */
115
- visibleOpen: boolean = false
116
-
117
- /**用于确定模态的繁忙状态是否为真 */
118
- modalBusy: boolean = false
119
- /**创建版块表单 */
120
- createOrEditForm: FormGroup | undefined;
121
-
122
- /**版块给定的表单值 */
123
- selected: any
124
-
125
- _SectionType = SectionType
126
- _sectionTypeOptions = sectionTypeOptions
127
-
128
- /**表单控件模板-动态赋值表单控件 */
129
- @ViewChild('createOrEditModalSubmitBtn', { static: false }) createOrEditModalSubmitBtn: ElementRef;
130
-
131
- /**创建版块模态框状态改变 */
132
- VisibleChange(event) {
133
- if (!event) {
134
- this.selected = ''
135
- return
136
- }
137
- }
138
- /**创建版块,打开模态框 */
139
- createSectionBtn() {
140
- this.visibleOpen = true
141
- this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase())
142
- this.setAsyncValidatorsFn()
143
- }
144
- /**编辑版块,打开模态框 */
145
- editSectionBtn(row) {
146
- this.visibleOpen = true
147
- this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase())
148
- this.setAsyncValidatorsFn()
149
- this._SectionAdminService.get(row.id).subscribe(res => {
150
- this.createOrEditForm.patchValue(res)
151
- this.selected = res
152
- })
153
- }
154
- /**删除某个条目类型 */
155
- deleteEntryType(row) {
156
- this.confirmation.warn(
157
- row.displayName,
158
- this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`),
159
- ).subscribe((status: Confirmation.Status) => {
160
- if (status == 'confirm') {
161
- this._EntryTypeAdminService.delete(row.id).pipe(finalize(() => {
162
- })).subscribe(res => {
163
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
164
- this.list.get()
165
- })
166
- }
167
- });
168
-
169
- }
170
-
171
- /**表单保存提交 */
172
- createOrEditSave() {
173
- if (this.selected) {
174
- return this.EditSave()
175
- }
176
- this.createSave()
177
- }
178
-
179
- /** */
180
- createSave() {
181
- let input = this.createOrEditForm.value
182
- input.siteId = this.filters.siteId
183
- if (!this.createOrEditForm.valid) return
184
- this.modalBusy = true
185
- this._SectionAdminService.create(input).pipe(finalize(() => {
186
- this.modalBusy = false
187
- this.visibleOpen = false
188
- })).subscribe(res => {
189
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
190
- this.list.get()
191
- })
192
- }
193
- /**创建版块保存 */
194
- EditSave() {
195
- let input = this.createOrEditForm.value
196
- input.siteId = this.filters.siteId
197
- input.concurrencyStamp = this.selected.concurrencyStamp
198
- if (!this.createOrEditForm.valid) return
199
- this.modalBusy = true
200
- this._SectionAdminService.update(this.selected.id, input).pipe(finalize(() => {
201
- this.modalBusy = false
202
- this.visibleOpen = false
203
- })).subscribe(res => {
204
- this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
205
- this.list.get()
206
- })
207
- }
208
- /**删除版块 */
209
- deletefield(row) {
210
- this.confirmation.warn(
211
- row.displayName,
212
- this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`),
213
- ).subscribe((status: Confirmation.Status) => {
214
- if (status == 'confirm') {
215
- this._SectionAdminService.delete(row.id).pipe(finalize(() => {
216
- })).subscribe(res => {
217
- this.toaster.success(this._LocalizationService.instant(`AbpUi::SuccessfullyDeleted`));
218
- this.list.get()
219
- })
220
- }
221
- });
222
- }
223
-
224
-
225
-
226
- /**name表单控件 */
227
- get displayNameInput() {
228
- return this.createOrEditForm.get('displayName')
229
- }
230
- /**name表单控件 */
231
- get nameInput() {
232
- return this.createOrEditForm.get('name')
233
- }
234
- /**route表单控件 */
235
- get routeInput() {
236
- return this.createOrEditForm.get('route')
237
- }
238
- /**route表单控件 */
239
- get templateInput() {
240
- return this.createOrEditForm.get('template')
241
- }
242
- /**route表单控件 */
243
- get typeInput() {
244
- return this.createOrEditForm.get('type')
245
- }
246
-
247
- radiochange() {
248
- this.routeInput.patchValue(this.routeInput.value)
249
- }
250
-
251
-
252
- /**字段标签input失去标点生成字段名字 */
253
- disPlayNameInputBlur(event) {
254
- let value = event.target.value
255
- let pinyin = this._CmsApiService.chineseToPinyin(value)
256
- let nameInput = this.nameInput
257
- let routeInput = this.routeInput
258
- let templateInput = this.templateInput
259
- if (nameInput.value) return
260
- nameInput.patchValue(pinyin)
261
- if (routeInput.value) return
262
- routeInput.patchValue(pinyin + (this.typeInput.value === 0 ? '' : '/{slug}'))
263
- if (templateInput.value) return
264
- templateInput.patchValue(pinyin + '/index')
265
- }
266
-
267
-
268
-
269
- /**设置字段控件异步验证 */
270
- setAsyncValidatorsFn() {
271
- this.createOrEditForm.setControl('name', new FormControl(this.nameInput.value || '', {
272
- validators: Validators.required,
273
- asyncValidators: this.nameRepetitionAsyncValidator(),
274
- }))
275
- this.createOrEditForm.setControl('route', new FormControl(this.routeInput.value || '', {
276
- validators: [Validators.required, this.forbiddenNameValidator()],
277
- asyncValidators: [this.routeRepetitionAsyncValidator()],
278
- }))
279
- }
280
- forbiddenNameValidator(): ValidatorFn {
281
- return (control: AbstractControl): ValidationErrors | null => {
282
- let inputValue = control.value.toLocaleLowerCase()
283
- let forbidden = this.typeInput.value == 0 ? false : inputValue.includes('{slug}') ? false : true
284
- return forbidden ? { repetition: this._LocalizationService.instant(`Cms::RouteVerificationTips`, this._LocalizationService.instant(`Cms::Enum:SectionType:` + SectionType[this.typeInput.value]), '{slug}') } : null;
285
- };
286
- }
287
-
288
- /**定义异步验证方法 */
289
- nameRepetitionAsyncValidator() {
290
- return (ctrl: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
291
- return new Promise(resolve => {
292
- let subslug = this.createOrEditForm?.get('name')
293
- if (subslug.value == this.selected?.name) {
294
- resolve(null);
295
- return
296
- }
297
- this._SectionAdminService.nameExists({
298
- siteId: this.filters.siteId,
299
- name: subslug.value
300
- }).subscribe(res => {
301
- if (res) {
302
- resolve({ repetition: this._LocalizationService.instant(`Cms::SectionName{0}AlreadyExist`, ctrl.value) });
303
- } else {
304
- resolve(null);
305
- }
306
- })
307
- });
308
- };
309
- }
310
- /**定义异步验证方法 */
311
- routeRepetitionAsyncValidator() {
312
- return (ctrl: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {
313
- return new Promise(resolve => {
314
- let subslug = this.createOrEditForm?.get('route').value
315
- if (subslug == this.selected?.route) {
316
- resolve(null);
317
- return
318
- }
319
- this._SectionAdminService.routeExists({
320
- siteId: this.filters.siteId,
321
- route: subslug
322
- }).subscribe(res => {
323
- if (res) {
324
- resolve({ repetition: this._LocalizationService.instant(`Cms::SectionRoute{0}AlreadyExist`, ctrl.value) });
325
- } else {
326
- resolve(null);
327
- }
328
- })
329
- });
330
- };
331
- }
332
-
333
-
334
- }
@@ -1,31 +0,0 @@
1
- import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from "@angular/forms";
2
-
3
- export class CreateOrUpdateSitesInputBase {
4
-
5
- /**字段名称 Display name of this field */
6
- displayName: any = ['', [Validators.required]];
7
-
8
- /**字段唯一名称 Unique Name*/
9
- name: any = ['', [Validators.required]];
10
-
11
- /**主机地址 */
12
- host: any = ['https://', [Validators.required]];
13
-
14
- /**是否激活 */
15
- isActive: any = [true, []];
16
- // 语言
17
- languages:any = [[], [Validators.required]]
18
-
19
-
20
- constructor(data?: CreateOrUpdateSitesInputBase) {
21
- if (data) {
22
- for (const key in data) {
23
- if (data.hasOwnProperty(key)) {
24
- this[key] = data[key];
25
- }
26
- }
27
- }
28
-
29
- }
30
- }
31
-
@@ -1,2 +0,0 @@
1
- export * from './sites.component'
2
- export * from './create-or-update-sites-input-base'