@abp/ng.theme.shared 7.2.2 → 7.3.0-rc.2

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 (316) hide show
  1. package/README.md +129 -2
  2. package/{esm2020 → esm2022}/abp-ng.theme.shared.mjs +4 -4
  3. package/{esm2020 → esm2022}/extensions/abp-ng.theme.shared-extensions.mjs +4 -4
  4. package/esm2022/extensions/lib/adapters/date-time.adapter.mjs +45 -0
  5. package/esm2022/extensions/lib/adapters/date.adapter.mjs +42 -0
  6. package/esm2022/extensions/lib/adapters/time.adapter.mjs +37 -0
  7. package/esm2022/extensions/lib/components/abstract-actions/abstract-actions.component.mjs +26 -0
  8. package/esm2022/extensions/lib/components/date-time-picker/date-time-picker.component.mjs +110 -0
  9. package/esm2022/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +199 -0
  10. package/esm2022/extensions/lib/components/extensible-form/extensible-form.component.mjs +74 -0
  11. package/esm2022/extensions/lib/components/extensible-table/extensible-table.component.mjs +137 -0
  12. package/esm2022/extensions/lib/components/grid-actions/grid-actions.component.mjs +40 -0
  13. package/esm2022/extensions/lib/components/page-toolbar/page-toolbar.component.mjs +39 -0
  14. package/{esm2020 → esm2022}/extensions/lib/constants/extra-properties.mjs +1 -1
  15. package/esm2022/extensions/lib/directives/disabled.directive.mjs +30 -0
  16. package/esm2022/extensions/lib/directives/prop-data.directive.mjs +42 -0
  17. package/{esm2020 → esm2022}/extensions/lib/enums/components.mjs +1 -1
  18. package/{esm2020 → esm2022}/extensions/lib/enums/props.enum.mjs +1 -1
  19. package/{esm2020 → esm2022}/extensions/lib/models/actions.mjs +46 -46
  20. package/{esm2020 → esm2022}/extensions/lib/models/entity-actions.mjs +28 -28
  21. package/esm2022/extensions/lib/models/entity-props.mjs +44 -0
  22. package/esm2022/extensions/lib/models/form-props.mjs +76 -0
  23. package/{esm2020 → esm2022}/extensions/lib/models/internal/object-extensions.mjs +2 -2
  24. package/{esm2020 → esm2022}/extensions/lib/models/object-extensions.mjs +2 -2
  25. package/esm2022/extensions/lib/models/props.mjs +54 -0
  26. package/{esm2020 → esm2022}/extensions/lib/models/toolbar-actions.mjs +43 -43
  27. package/esm2022/extensions/lib/pipes/create-injector.pipe.mjs +37 -0
  28. package/esm2022/extensions/lib/services/extensions.service.mjs +25 -0
  29. package/{esm2020 → esm2022}/extensions/lib/tokens/extensible-form-view-provider.token.mjs +2 -2
  30. package/{esm2020 → esm2022}/extensions/lib/tokens/extensions.token.mjs +11 -11
  31. package/esm2022/extensions/lib/ui-extensions.module.mjs +100 -0
  32. package/{esm2020 → esm2022}/extensions/lib/utils/actions.util.mjs +8 -8
  33. package/{esm2020 → esm2022}/extensions/lib/utils/enum.util.mjs +41 -41
  34. package/{esm2020 → esm2022}/extensions/lib/utils/factory.util.mjs +3 -3
  35. package/esm2022/extensions/lib/utils/form-props.util.mjs +51 -0
  36. package/{esm2020 → esm2022}/extensions/lib/utils/localization.util.mjs +12 -12
  37. package/{esm2020 → esm2022}/extensions/lib/utils/props.util.mjs +13 -13
  38. package/esm2022/extensions/lib/utils/state.util.mjs +126 -0
  39. package/{esm2020 → esm2022}/extensions/lib/utils/typeahead.util.mjs +51 -51
  40. package/{esm2020 → esm2022}/extensions/lib/utils/validation.util.mjs +10 -10
  41. package/{esm2020 → esm2022}/extensions/public-api.mjs +30 -30
  42. package/{esm2020 → esm2022}/lib/animations/bounce.animations.mjs +16 -16
  43. package/{esm2020 → esm2022}/lib/animations/collapse.animations.mjs +49 -49
  44. package/{esm2020 → esm2022}/lib/animations/fade.animations.mjs +37 -37
  45. package/{esm2020 → esm2022}/lib/animations/index.mjs +6 -6
  46. package/{esm2020 → esm2022}/lib/animations/modal.animations.mjs +10 -10
  47. package/{esm2020 → esm2022}/lib/animations/slide.animations.mjs +7 -7
  48. package/{esm2020 → esm2022}/lib/animations/toast.animations.mjs +12 -12
  49. package/esm2022/lib/components/breadcrumb/breadcrumb.component.mjs +44 -0
  50. package/esm2022/lib/components/breadcrumb-items/breadcrumb-items.component.mjs +20 -0
  51. package/esm2022/lib/components/button/button.component.mjs +103 -0
  52. package/{esm2020 → esm2022}/lib/components/card/card-body.component.mjs +27 -26
  53. package/esm2022/lib/components/card/card-footer.component.mjs +31 -0
  54. package/esm2022/lib/components/card/card-header.component.mjs +31 -0
  55. package/esm2022/lib/components/card/card-header.directive.mjs +20 -0
  56. package/esm2022/lib/components/card/card-img-top.directive.mjs +20 -0
  57. package/esm2022/lib/components/card/card-subtitle.directive.mjs +20 -0
  58. package/esm2022/lib/components/card/card-title.directive.mjs +20 -0
  59. package/esm2022/lib/components/card/card.component.mjs +24 -0
  60. package/esm2022/lib/components/card/card.module.mjs +50 -0
  61. package/{esm2020 → esm2022}/lib/components/card/index.mjs +9 -9
  62. package/esm2022/lib/components/checkbox/checkbox.component.mjs +89 -0
  63. package/esm2022/lib/components/confirmation/confirmation.component.mjs +46 -0
  64. package/esm2022/lib/components/form-input/form-input.component.mjs +95 -0
  65. package/esm2022/lib/components/http-error-wrapper/http-error-wrapper.component.mjs +60 -0
  66. package/{esm2020 → esm2022}/lib/components/index.mjs +16 -16
  67. package/esm2022/lib/components/loader-bar/loader-bar.component.mjs +122 -0
  68. package/esm2022/lib/components/loading/loading.component.mjs +20 -0
  69. package/esm2022/lib/components/modal/modal-close.directive.mjs +28 -0
  70. package/esm2022/lib/components/modal/modal-ref.service.mjs +27 -0
  71. package/esm2022/lib/components/modal/modal.component.mjs +190 -0
  72. package/esm2022/lib/components/password/password.component.mjs +39 -0
  73. package/esm2022/lib/components/toast/toast.component.mjs +56 -0
  74. package/esm2022/lib/components/toast-container/toast-container.component.mjs +59 -0
  75. package/{esm2020 → esm2022}/lib/constants/styles.mjs +1 -1
  76. package/{esm2020 → esm2022}/lib/constants/validation.mjs +19 -19
  77. package/esm2022/lib/directives/ellipsis.directive.mjs +65 -0
  78. package/{esm2020 → esm2022}/lib/directives/index.mjs +5 -5
  79. package/esm2022/lib/directives/loading.directive.mjs +90 -0
  80. package/esm2022/lib/directives/ngx-datatable-default.directive.mjs +76 -0
  81. package/esm2022/lib/directives/ngx-datatable-list.directive.mjs +95 -0
  82. package/esm2022/lib/directives/visible.directive.mjs +63 -0
  83. package/{esm2020 → esm2022}/lib/enums/form.mjs +5 -5
  84. package/{esm2020 → esm2022}/lib/enums/index.mjs +2 -2
  85. package/{esm2020 → esm2022}/lib/enums/route-names.mjs +1 -1
  86. package/esm2022/lib/handlers/document-dir.handler.mjs +32 -0
  87. package/esm2022/lib/handlers/error.handler.mjs +294 -0
  88. package/{esm2020 → esm2022}/lib/handlers/index.mjs +2 -2
  89. package/{esm2020 → esm2022}/lib/models/common.mjs +1 -1
  90. package/{esm2020 → esm2022}/lib/models/confirmation.mjs +9 -9
  91. package/{esm2020 → esm2022}/lib/models/index.mjs +7 -7
  92. package/{esm2020 → esm2022}/lib/models/nav-item.mjs +5 -5
  93. package/{esm2020 → esm2022}/lib/models/statistics.mjs +1 -1
  94. package/{esm2020 → esm2022}/lib/models/toaster.mjs +1 -1
  95. package/{esm2020 → esm2022}/lib/models/user-menu.mjs +3 -3
  96. package/{esm2020 → esm2022}/lib/models/validation.mjs +1 -1
  97. package/{esm2020 → esm2022}/lib/providers/index.mjs +2 -2
  98. package/{esm2020 → esm2022}/lib/providers/ng-bootstrap-config.provider.mjs +16 -16
  99. package/{esm2020 → esm2022}/lib/providers/route.provider.mjs +17 -17
  100. package/{esm2020 → esm2022}/lib/services/abstract-menu.service.mjs +49 -49
  101. package/esm2022/lib/services/confirmation.service.mjs +69 -0
  102. package/{esm2020 → esm2022}/lib/services/index.mjs +5 -5
  103. package/esm2022/lib/services/nav-items.service.mjs +18 -0
  104. package/esm2022/lib/services/page-alert.service.mjs +29 -0
  105. package/esm2022/lib/services/toaster.service.mjs +104 -0
  106. package/esm2022/lib/services/user-menu.service.mjs +18 -0
  107. package/esm2022/lib/theme-shared.module.mjs +202 -0
  108. package/{esm2020 → esm2022}/lib/tokens/append-content.token.mjs +10 -10
  109. package/{esm2020 → esm2022}/lib/tokens/confirmation-icons.token.mjs +10 -10
  110. package/{esm2020 → esm2022}/lib/tokens/http-error.token.mjs +13 -13
  111. package/{esm2020 → esm2022}/lib/tokens/index.mjs +4 -4
  112. package/{esm2020 → esm2022}/lib/tokens/ngx-datatable-messages.token.mjs +7 -7
  113. package/{esm2020 → esm2022}/lib/tokens/suppress-unsaved-changes-warning.token.mjs +2 -2
  114. package/esm2022/lib/utils/date-parser-formatter.mjs +59 -0
  115. package/{esm2020 → esm2022}/lib/utils/index.mjs +2 -2
  116. package/{esm2020 → esm2022}/lib/utils/validation-utils.mjs +61 -61
  117. package/{esm2020 → esm2022}/public-api.mjs +15 -15
  118. package/{esm2020 → esm2022}/testing/abp-ng.theme.shared-testing.mjs +4 -4
  119. package/{esm2020 → esm2022}/testing/lib/models/config.mjs +1 -1
  120. package/{esm2020 → esm2022}/testing/lib/models/index.mjs +1 -1
  121. package/esm2022/testing/lib/theme-shared-testing.module.mjs +47 -0
  122. package/{esm2020 → esm2022}/testing/public-api.mjs +3 -3
  123. package/extensions/index.d.ts +5 -5
  124. package/extensions/lib/adapters/date-time.adapter.d.ts +11 -11
  125. package/extensions/lib/adapters/date.adapter.d.ts +9 -9
  126. package/extensions/lib/adapters/time.adapter.d.ts +8 -8
  127. package/extensions/lib/components/abstract-actions/abstract-actions.component.d.ts +12 -12
  128. package/extensions/lib/components/date-time-picker/date-time-picker.component.d.ts +16 -16
  129. package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +43 -43
  130. package/extensions/lib/components/extensible-form/extensible-form.component.d.ts +25 -25
  131. package/extensions/lib/components/extensible-table/extensible-table.component.d.ts +38 -38
  132. package/extensions/lib/components/grid-actions/grid-actions.component.d.ts +13 -13
  133. package/extensions/lib/components/page-toolbar/page-toolbar.component.d.ts +20 -20
  134. package/extensions/lib/constants/extra-properties.d.ts +1 -1
  135. package/extensions/lib/directives/disabled.directive.d.ts +11 -11
  136. package/extensions/lib/directives/prop-data.directive.d.ts +19 -19
  137. package/extensions/lib/enums/components.d.ts +3 -3
  138. package/extensions/lib/enums/props.enum.d.ts +16 -16
  139. package/extensions/lib/models/actions.d.ts +36 -36
  140. package/extensions/lib/models/entity-actions.d.ts +22 -22
  141. package/extensions/lib/models/entity-props.d.ts +30 -29
  142. package/extensions/lib/models/form-props.d.ts +59 -58
  143. package/extensions/lib/models/internal/object-extensions.d.ts +86 -85
  144. package/extensions/lib/models/object-extensions.d.ts +2 -2
  145. package/extensions/lib/models/props.d.ts +45 -44
  146. package/extensions/lib/models/toolbar-actions.d.ts +38 -38
  147. package/extensions/lib/pipes/create-injector.pipe.d.ts +8 -8
  148. package/extensions/lib/services/extensions.service.d.ts +14 -14
  149. package/extensions/lib/tokens/extensible-form-view-provider.token.d.ts +5 -5
  150. package/extensions/lib/tokens/extensions.token.d.ts +20 -24
  151. package/extensions/lib/ui-extensions.module.d.ts +24 -24
  152. package/extensions/lib/utils/actions.util.d.ts +7 -7
  153. package/extensions/lib/utils/enum.util.d.ts +7 -7
  154. package/extensions/lib/utils/factory.util.d.ts +1 -1
  155. package/extensions/lib/utils/form-props.util.d.ts +3 -3
  156. package/extensions/lib/utils/localization.util.d.ts +3 -3
  157. package/extensions/lib/utils/props.util.d.ts +9 -9
  158. package/extensions/lib/utils/state.util.d.ts +5 -5
  159. package/extensions/lib/utils/typeahead.util.d.ts +11 -11
  160. package/extensions/lib/utils/validation.util.d.ts +3 -3
  161. package/extensions/public-api.d.ts +30 -30
  162. package/{fesm2020 → fesm2022}/abp-ng.theme.shared-extensions.mjs +1340 -1331
  163. package/fesm2022/abp-ng.theme.shared-extensions.mjs.map +1 -0
  164. package/{fesm2020 → fesm2022}/abp-ng.theme.shared-testing.mjs +40 -40
  165. package/{fesm2015 → fesm2022}/abp-ng.theme.shared-testing.mjs.map +1 -1
  166. package/{fesm2020 → fesm2022}/abp-ng.theme.shared.mjs +2292 -2290
  167. package/fesm2022/abp-ng.theme.shared.mjs.map +1 -0
  168. package/index.d.ts +5 -5
  169. package/lib/animations/bounce.animations.d.ts +1 -1
  170. package/lib/animations/collapse.animations.d.ts +9 -9
  171. package/lib/animations/fade.animations.d.ts +10 -10
  172. package/lib/animations/index.d.ts +6 -6
  173. package/lib/animations/modal.animations.d.ts +2 -2
  174. package/lib/animations/slide.animations.d.ts +1 -1
  175. package/lib/animations/toast.animations.d.ts +1 -1
  176. package/lib/components/breadcrumb/breadcrumb.component.d.ts +16 -16
  177. package/lib/components/breadcrumb-items/breadcrumb-items.component.d.ts +7 -7
  178. package/lib/components/button/button.component.d.ts +26 -26
  179. package/lib/components/card/card-body.component.d.ts +8 -8
  180. package/lib/components/card/card-footer.component.d.ts +8 -8
  181. package/lib/components/card/card-header.component.d.ts +8 -8
  182. package/lib/components/card/card-header.directive.d.ts +6 -6
  183. package/lib/components/card/card-img-top.directive.d.ts +6 -6
  184. package/lib/components/card/card-subtitle.directive.d.ts +6 -6
  185. package/lib/components/card/card-title.directive.d.ts +6 -6
  186. package/lib/components/card/card.component.d.ts +7 -7
  187. package/lib/components/card/card.module.d.ts +15 -15
  188. package/lib/components/card/index.d.ts +9 -9
  189. package/lib/components/checkbox/checkbox.component.d.ts +18 -18
  190. package/lib/components/confirmation/confirmation.component.d.ts +19 -19
  191. package/lib/components/form-input/form-input.component.d.ts +19 -19
  192. package/lib/components/http-error-wrapper/http-error-wrapper.component.d.ts +27 -27
  193. package/lib/components/index.d.ts +16 -16
  194. package/lib/components/loader-bar/loader-bar.component.d.ts +33 -33
  195. package/lib/components/loading/loading.component.d.ts +5 -5
  196. package/lib/components/modal/modal-close.directive.d.ts +9 -9
  197. package/lib/components/modal/modal-ref.service.d.ts +13 -13
  198. package/lib/components/modal/modal.component.d.ts +50 -50
  199. package/lib/components/password/password.component.d.ts +12 -12
  200. package/lib/components/toast/toast.component.d.ts +14 -14
  201. package/lib/components/toast-container/toast-container.component.d.ts +22 -22
  202. package/lib/constants/styles.d.ts +2 -2
  203. package/lib/constants/validation.d.ts +19 -19
  204. package/lib/directives/ellipsis.directive.d.ts +21 -21
  205. package/lib/directives/index.d.ts +5 -5
  206. package/lib/directives/loading.directive.d.ts +25 -25
  207. package/lib/directives/ngx-datatable-default.directive.d.ts +30 -30
  208. package/lib/directives/ngx-datatable-list.directive.d.ts +24 -24
  209. package/lib/directives/visible.directive.d.ts +18 -18
  210. package/lib/enums/form.d.ts +4 -4
  211. package/lib/enums/index.d.ts +2 -2
  212. package/lib/enums/route-names.d.ts +3 -3
  213. package/lib/handlers/document-dir.handler.d.ts +13 -13
  214. package/lib/handlers/error.handler.d.ts +83 -83
  215. package/lib/handlers/index.d.ts +2 -2
  216. package/lib/models/common.d.ts +21 -21
  217. package/lib/models/confirmation.d.ts +27 -27
  218. package/lib/models/index.d.ts +7 -7
  219. package/lib/models/nav-item.d.ts +13 -13
  220. package/lib/models/statistics.d.ts +12 -12
  221. package/lib/models/toaster.d.ts +30 -30
  222. package/lib/models/user-menu.d.ts +8 -8
  223. package/lib/models/validation.d.ts +1 -1
  224. package/lib/providers/index.d.ts +2 -2
  225. package/lib/providers/ng-bootstrap-config.provider.d.ts +8 -8
  226. package/lib/providers/route.provider.d.ts +8 -8
  227. package/lib/services/abstract-menu.service.d.ts +13 -13
  228. package/lib/services/confirmation.service.d.ts +21 -21
  229. package/lib/services/index.d.ts +5 -5
  230. package/lib/services/nav-items.service.d.ts +8 -8
  231. package/lib/services/page-alert.service.d.ts +18 -18
  232. package/lib/services/toaster.service.d.ts +60 -60
  233. package/lib/services/user-menu.service.d.ts +8 -8
  234. package/lib/theme-shared.module.d.ts +38 -38
  235. package/lib/tokens/append-content.token.d.ts +2 -2
  236. package/lib/tokens/confirmation-icons.token.d.ts +11 -11
  237. package/lib/tokens/http-error.token.d.ts +5 -5
  238. package/lib/tokens/index.d.ts +4 -4
  239. package/lib/tokens/ngx-datatable-messages.token.d.ts +12 -12
  240. package/lib/tokens/suppress-unsaved-changes-warning.token.d.ts +2 -2
  241. package/lib/utils/date-parser-formatter.d.ts +12 -12
  242. package/lib/utils/index.d.ts +2 -2
  243. package/lib/utils/validation-utils.d.ts +5 -5
  244. package/package.json +28 -24
  245. package/public-api.d.ts +12 -12
  246. package/testing/index.d.ts +5 -5
  247. package/testing/lib/models/config.d.ts +4 -4
  248. package/testing/lib/models/index.d.ts +1 -1
  249. package/testing/lib/theme-shared-testing.module.d.ts +14 -14
  250. package/testing/public-api.d.ts +3 -3
  251. package/esm2020/extensions/lib/adapters/date-time.adapter.mjs +0 -44
  252. package/esm2020/extensions/lib/adapters/date.adapter.mjs +0 -41
  253. package/esm2020/extensions/lib/adapters/time.adapter.mjs +0 -36
  254. package/esm2020/extensions/lib/components/abstract-actions/abstract-actions.component.mjs +0 -25
  255. package/esm2020/extensions/lib/components/date-time-picker/date-time-picker.component.mjs +0 -109
  256. package/esm2020/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +0 -198
  257. package/esm2020/extensions/lib/components/extensible-form/extensible-form.component.mjs +0 -73
  258. package/esm2020/extensions/lib/components/extensible-table/extensible-table.component.mjs +0 -135
  259. package/esm2020/extensions/lib/components/grid-actions/grid-actions.component.mjs +0 -39
  260. package/esm2020/extensions/lib/components/page-toolbar/page-toolbar.component.mjs +0 -38
  261. package/esm2020/extensions/lib/directives/disabled.directive.mjs +0 -29
  262. package/esm2020/extensions/lib/directives/prop-data.directive.mjs +0 -41
  263. package/esm2020/extensions/lib/models/entity-props.mjs +0 -43
  264. package/esm2020/extensions/lib/models/form-props.mjs +0 -75
  265. package/esm2020/extensions/lib/models/props.mjs +0 -53
  266. package/esm2020/extensions/lib/pipes/create-injector.pipe.mjs +0 -36
  267. package/esm2020/extensions/lib/services/extensions.service.mjs +0 -24
  268. package/esm2020/extensions/lib/ui-extensions.module.mjs +0 -95
  269. package/esm2020/extensions/lib/utils/form-props.util.mjs +0 -51
  270. package/esm2020/extensions/lib/utils/state.util.mjs +0 -123
  271. package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +0 -43
  272. package/esm2020/lib/components/breadcrumb-items/breadcrumb-items.component.mjs +0 -19
  273. package/esm2020/lib/components/button/button.component.mjs +0 -102
  274. package/esm2020/lib/components/card/card-footer.component.mjs +0 -30
  275. package/esm2020/lib/components/card/card-header.component.mjs +0 -30
  276. package/esm2020/lib/components/card/card-header.directive.mjs +0 -19
  277. package/esm2020/lib/components/card/card-img-top.directive.mjs +0 -19
  278. package/esm2020/lib/components/card/card-subtitle.directive.mjs +0 -19
  279. package/esm2020/lib/components/card/card-title.directive.mjs +0 -19
  280. package/esm2020/lib/components/card/card.component.mjs +0 -23
  281. package/esm2020/lib/components/card/card.module.mjs +0 -49
  282. package/esm2020/lib/components/checkbox/checkbox.component.mjs +0 -88
  283. package/esm2020/lib/components/confirmation/confirmation.component.mjs +0 -45
  284. package/esm2020/lib/components/form-input/form-input.component.mjs +0 -94
  285. package/esm2020/lib/components/http-error-wrapper/http-error-wrapper.component.mjs +0 -59
  286. package/esm2020/lib/components/loader-bar/loader-bar.component.mjs +0 -121
  287. package/esm2020/lib/components/loading/loading.component.mjs +0 -19
  288. package/esm2020/lib/components/modal/modal-close.directive.mjs +0 -27
  289. package/esm2020/lib/components/modal/modal-ref.service.mjs +0 -26
  290. package/esm2020/lib/components/modal/modal.component.mjs +0 -189
  291. package/esm2020/lib/components/password/password.component.mjs +0 -38
  292. package/esm2020/lib/components/toast/toast.component.mjs +0 -55
  293. package/esm2020/lib/components/toast-container/toast-container.component.mjs +0 -58
  294. package/esm2020/lib/directives/ellipsis.directive.mjs +0 -63
  295. package/esm2020/lib/directives/loading.directive.mjs +0 -89
  296. package/esm2020/lib/directives/ngx-datatable-default.directive.mjs +0 -75
  297. package/esm2020/lib/directives/ngx-datatable-list.directive.mjs +0 -94
  298. package/esm2020/lib/directives/visible.directive.mjs +0 -62
  299. package/esm2020/lib/handlers/document-dir.handler.mjs +0 -31
  300. package/esm2020/lib/handlers/error.handler.mjs +0 -291
  301. package/esm2020/lib/services/confirmation.service.mjs +0 -68
  302. package/esm2020/lib/services/nav-items.service.mjs +0 -17
  303. package/esm2020/lib/services/page-alert.service.mjs +0 -28
  304. package/esm2020/lib/services/toaster.service.mjs +0 -103
  305. package/esm2020/lib/services/user-menu.service.mjs +0 -17
  306. package/esm2020/lib/theme-shared.module.mjs +0 -200
  307. package/esm2020/lib/utils/date-parser-formatter.mjs +0 -58
  308. package/esm2020/testing/lib/theme-shared-testing.module.mjs +0 -46
  309. package/fesm2015/abp-ng.theme.shared-extensions.mjs +0 -1460
  310. package/fesm2015/abp-ng.theme.shared-extensions.mjs.map +0 -1
  311. package/fesm2015/abp-ng.theme.shared-testing.mjs +0 -54
  312. package/fesm2015/abp-ng.theme.shared.mjs +0 -2767
  313. package/fesm2015/abp-ng.theme.shared.mjs.map +0 -1
  314. package/fesm2020/abp-ng.theme.shared-extensions.mjs.map +0 -1
  315. package/fesm2020/abp-ng.theme.shared-testing.mjs.map +0 -1
  316. package/fesm2020/abp-ng.theme.shared.mjs.map +0 -1
@@ -3,7 +3,7 @@ import { Injectable, Optional, SkipSelf, Component, ChangeDetectionStrategy, Inp
3
3
  import * as i3 from '@angular/common';
4
4
  import { formatDate } from '@angular/common';
5
5
  import * as i4$1 from '@ng-bootstrap/ng-bootstrap';
6
- import { NgbDateAdapter, NgbTimeAdapter, NgbInputDatepicker, NgbTimepicker, NgbDatepickerModule, NgbDropdownModule, NgbTimepickerModule, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
6
+ import { NgbDateAdapter, NgbTimeAdapter, NgbInputDatepicker, NgbTimepicker, NgbDatepickerModule, NgbDropdownModule, NgbTimepickerModule, NgbTypeaheadModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
7
7
  import * as i2 from '@angular/forms';
8
8
  import { ControlContainer, FormGroupDirective, Validators, UntypedFormGroup, UntypedFormControl } from '@angular/forms';
9
9
  import { LinkedList } from '@abp/utils';
@@ -17,261 +17,262 @@ import * as i4$2 from '@abp/ng.theme.shared';
17
17
  import { ThemeSharedModule } from '@abp/ng.theme.shared';
18
18
  import * as i3$1 from '@swimlane/ngx-datatable';
19
19
 
20
- class DateTimeAdapter {
21
- fromModel(value) {
22
- if (!value)
23
- return null;
24
- const date = new Date(value);
25
- if (isNaN(date))
26
- return null;
27
- this.value = {
28
- year: date.getFullYear(),
29
- month: date.getMonth() + 1,
30
- day: date.getDate(),
31
- hour: date.getHours(),
32
- minute: date.getMinutes(),
33
- second: date.getSeconds(),
34
- };
35
- return this.value;
36
- }
37
- toModel(value) {
38
- if (!value)
39
- return '';
40
- const now = new Date();
41
- const newValue = {
42
- // TODO look for strict mode errors
43
- year: now.getUTCFullYear(),
44
- month: now.getMonth() + 1,
45
- day: now.getDate(),
46
- hour: 0,
47
- minute: 0,
48
- second: 0,
49
- ...this.value,
50
- ...value,
51
- };
52
- const date = new Date(newValue.year, newValue.month - 1, newValue.day, newValue.hour, newValue.minute, newValue.second);
53
- return new Date(date).toISOString();
54
- }
55
- }
56
- DateTimeAdapterfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
57
- DateTimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeAdapter });
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimeAdapter, decorators: [{
59
- type: Injectable
20
+ class DateTimeAdapter {
21
+ fromModel(value) {
22
+ if (!value)
23
+ return null;
24
+ const date = new Date(value);
25
+ if (isNaN(date))
26
+ return null;
27
+ this.value = {
28
+ year: date.getFullYear(),
29
+ month: date.getMonth() + 1,
30
+ day: date.getDate(),
31
+ hour: date.getHours(),
32
+ minute: date.getMinutes(),
33
+ second: date.getSeconds(),
34
+ };
35
+ return this.value;
36
+ }
37
+ toModel(value) {
38
+ if (!value)
39
+ return '';
40
+ const now = new Date();
41
+ const newValue = {
42
+ // TODO look for strict mode errors
43
+ year: now.getUTCFullYear(),
44
+ month: now.getMonth() + 1,
45
+ day: now.getDate(),
46
+ hour: 0,
47
+ minute: 0,
48
+ second: 0,
49
+ ...this.value,
50
+ ...value,
51
+ };
52
+ const date = new Date(newValue.year, newValue.month - 1, newValue.day, newValue.hour, newValue.minute, newValue.second);
53
+ return new Date(date).toISOString();
54
+ }
55
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DateTimeAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
56
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DateTimeAdapter }); }
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DateTimeAdapter, decorators: [{
59
+ type: Injectable
60
60
  }] });
61
61
 
62
- class DateAdapter extends NgbDateAdapter {
63
- fromModel(value) {
64
- if (!value)
65
- return null;
66
- let date;
67
- if (typeof value === 'string') {
68
- date = this.dateOf(value);
69
- }
70
- else {
71
- date = new Date(value);
72
- }
73
- if (isNaN(date))
74
- return null;
75
- return {
76
- day: date.getDate(),
77
- month: date.getMonth() + 1,
78
- year: date.getFullYear(),
79
- };
80
- }
81
- toModel(value) {
82
- if (!value)
83
- return '';
84
- const date = new Date(value.year, value.month - 1, value.day);
85
- const formattedDate = formatDate(date, 'yyyy-MM-dd', 'en');
86
- return formattedDate;
87
- }
88
- dateOf(value) {
89
- const dateUtc = new Date(Date.parse(value));
90
- return new Date(dateUtc.getTime() + Math.abs(dateUtc.getTimezoneOffset() * 60000));
91
- }
92
- }
93
- DateAdapterfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
94
- DateAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateAdapter });
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateAdapter, decorators: [{
96
- type: Injectable
62
+ class DateAdapter extends NgbDateAdapter {
63
+ fromModel(value) {
64
+ if (!value)
65
+ return null;
66
+ let date;
67
+ if (typeof value === 'string') {
68
+ date = this.dateOf(value);
69
+ }
70
+ else {
71
+ date = new Date(value);
72
+ }
73
+ if (isNaN(date))
74
+ return null;
75
+ return {
76
+ day: date.getDate(),
77
+ month: date.getMonth() + 1,
78
+ year: date.getFullYear(),
79
+ };
80
+ }
81
+ toModel(value) {
82
+ if (!value)
83
+ return '';
84
+ const date = new Date(value.year, value.month - 1, value.day);
85
+ const formattedDate = formatDate(date, 'yyyy-MM-dd', 'en');
86
+ return formattedDate;
87
+ }
88
+ dateOf(value) {
89
+ const dateUtc = new Date(Date.parse(value));
90
+ return new Date(dateUtc.getTime() + Math.abs(dateUtc.getTimezoneOffset() * 60000));
91
+ }
92
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
93
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DateAdapter }); }
94
+ }
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DateAdapter, decorators: [{
96
+ type: Injectable
97
97
  }] });
98
98
 
99
- class TimeAdapter extends NgbTimeAdapter {
100
- fromModel(value) {
101
- if (!value)
102
- return null;
103
- const date = isTimeStr(value)
104
- ? new Date(0, 0, 1, ...value.split(':').map(Number))
105
- : new Date(value);
106
- if (isNaN(date))
107
- return null;
108
- return {
109
- hour: date.getHours(),
110
- minute: date.getMinutes(),
111
- second: date.getSeconds(),
112
- };
113
- }
114
- toModel(value) {
115
- if (!value)
116
- return '';
117
- const date = new Date(0, 0, 1, value.hour, value.minute, value.second);
118
- const formattedDate = formatDate(date, 'HH:mm', 'en');
119
- return formattedDate;
120
- }
121
- }
122
- TimeAdapterfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TimeAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
123
- TimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TimeAdapter });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TimeAdapter, decorators: [{
125
- type: Injectable
126
- }] });
127
- function isTimeStr(value) {
128
- return /^((2[123])|[01][0-9])(\:[0-5][0-9]){1,2}$/.test(String(value));
99
+ class TimeAdapter extends NgbTimeAdapter {
100
+ fromModel(value) {
101
+ if (!value)
102
+ return null;
103
+ const date = isTimeStr(value)
104
+ ? new Date(0, 0, 1, ...value.split(':').map(Number))
105
+ : new Date(value);
106
+ if (isNaN(date))
107
+ return null;
108
+ return {
109
+ hour: date.getHours(),
110
+ minute: date.getMinutes(),
111
+ second: date.getSeconds(),
112
+ };
113
+ }
114
+ toModel(value) {
115
+ if (!value)
116
+ return '';
117
+ const date = new Date(0, 0, 1, value.hour, value.minute, value.second);
118
+ const formattedDate = formatDate(date, 'HH:mm', 'en');
119
+ return formattedDate;
120
+ }
121
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TimeAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
122
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TimeAdapter }); }
123
+ }
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TimeAdapter, decorators: [{
125
+ type: Injectable
126
+ }] });
127
+ function isTimeStr(value) {
128
+ return /^((2[123])|[01][0-9])(\:[0-5][0-9]){1,2}$/.test(String(value));
129
129
  }
130
130
 
131
- class PropList extends LinkedList {
132
- }
133
- class PropData {
134
- get data() {
135
- return {
136
- getInjected: this.getInjected,
137
- index: this.index,
138
- record: this.record,
139
- };
140
- }
141
- }
142
- class Prop {
143
- constructor(type, name, displayName, permission, visible = _ => true, isExtra = false, template, className, displayTextResolver) {
144
- this.type = type;
145
- this.name = name;
146
- this.displayName = displayName;
147
- this.permission = permission;
148
- this.visible = visible;
149
- this.isExtra = isExtra;
150
- this.template = template;
151
- this.className = className;
152
- this.displayTextResolver = displayTextResolver;
153
- this.displayName = this.displayName || this.name;
154
- }
155
- }
156
- class PropsFactory {
157
- constructor() {
158
- this.contributorCallbacks = {};
159
- }
160
- get(name) {
161
- this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
162
- return new this._ctor(this.contributorCallbacks[name]);
163
- }
164
- }
165
- class Props {
166
- constructor(callbackList) {
167
- this.callbackList = callbackList;
168
- }
169
- get props() {
170
- const propList = new this._ctor();
171
- this.callbackList.forEach(callback => callback(propList));
172
- return propList;
173
- }
174
- addContributor(contributeCallback) {
175
- this.callbackList.push(contributeCallback);
176
- }
177
- clearContributors() {
178
- while (this.callbackList.length)
179
- this.callbackList.pop();
180
- }
131
+ class PropList extends LinkedList {
132
+ }
133
+ class PropData {
134
+ get data() {
135
+ return {
136
+ getInjected: this.getInjected,
137
+ index: this.index,
138
+ record: this.record,
139
+ };
140
+ }
141
+ }
142
+ class Prop {
143
+ constructor(type, name, displayName, permission, visible = _ => true, isExtra = false, template, className, formText, displayTextResolver) {
144
+ this.type = type;
145
+ this.name = name;
146
+ this.displayName = displayName;
147
+ this.permission = permission;
148
+ this.visible = visible;
149
+ this.isExtra = isExtra;
150
+ this.template = template;
151
+ this.className = className;
152
+ this.formText = formText;
153
+ this.displayTextResolver = displayTextResolver;
154
+ this.displayName = this.displayName || this.name;
155
+ }
156
+ }
157
+ class PropsFactory {
158
+ constructor() {
159
+ this.contributorCallbacks = {};
160
+ }
161
+ get(name) {
162
+ this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
163
+ return new this._ctor(this.contributorCallbacks[name]);
164
+ }
165
+ }
166
+ class Props {
167
+ get props() {
168
+ const propList = new this._ctor();
169
+ this.callbackList.forEach(callback => callback(propList));
170
+ return propList;
171
+ }
172
+ constructor(callbackList) {
173
+ this.callbackList = callbackList;
174
+ }
175
+ addContributor(contributeCallback) {
176
+ this.callbackList.push(contributeCallback);
177
+ }
178
+ clearContributors() {
179
+ while (this.callbackList.length)
180
+ this.callbackList.pop();
181
+ }
181
182
  }
182
183
 
183
- class FormPropList extends PropList {
184
- }
185
- class FormProps extends Props {
186
- constructor() {
187
- super(...arguments);
188
- this._ctor = FormPropList;
189
- }
190
- }
191
- class GroupedFormPropList {
192
- constructor() {
193
- this.items = [];
194
- }
195
- addItem(item) {
196
- const groupName = item.group?.name;
197
- let group = this.items.find(i => i.group?.name === groupName);
198
- if (group) {
199
- group.formPropList.addTail(item);
200
- }
201
- else {
202
- group = {
203
- formPropList: new FormPropList(),
204
- group: item.group,
205
- };
206
- group.formPropList.addHead(item);
207
- this.items.push(group);
208
- }
209
- }
210
- }
211
- class CreateFormPropsFactory extends PropsFactory {
212
- constructor() {
213
- super(...arguments);
214
- this._ctor = FormProps;
215
- }
216
- }
217
- class EditFormPropsFactory extends PropsFactory {
218
- constructor() {
219
- super(...arguments);
220
- this._ctor = FormProps;
221
- }
222
- }
223
- class FormProp extends Prop {
224
- constructor(options) {
225
- super(options.type, options.name, options.displayName || '', options.permission || '', options.visible, options.isExtra, options.template, options.className);
226
- this.group = options.group;
227
- this.className = options.className;
228
- this.asyncValidators = options.asyncValidators || (_ => []);
229
- this.validators = options.validators || (_ => []);
230
- this.disabled = options.disabled || (_ => false);
231
- this.readonly = options.readonly || (_ => false);
232
- this.autocomplete = options.autocomplete || 'off';
233
- this.options = options.options;
234
- this.id = options.id || options.name;
235
- const defaultValue = options.defaultValue;
236
- this.defaultValue = isFalsyValue(defaultValue) ? defaultValue : defaultValue || '';
237
- this.displayTextResolver = options.displayTextResolver;
238
- }
239
- static create(options) {
240
- return new FormProp(options);
241
- }
242
- static createMany(arrayOfOptions) {
243
- return arrayOfOptions.map(FormProp.create);
244
- }
245
- }
246
- class FormPropData extends PropData {
247
- constructor(injector, record) {
248
- super();
249
- this.record = record;
250
- this.getInjected = injector.get.bind(injector);
251
- }
252
- }
253
- function isFalsyValue(defaultValue) {
254
- return [0, '', false].indexOf(defaultValue) > -1;
184
+ class FormPropList extends PropList {
185
+ }
186
+ class FormProps extends Props {
187
+ constructor() {
188
+ super(...arguments);
189
+ this._ctor = FormPropList;
190
+ }
191
+ }
192
+ class GroupedFormPropList {
193
+ constructor() {
194
+ this.items = [];
195
+ }
196
+ addItem(item) {
197
+ const groupName = item.group?.name;
198
+ let group = this.items.find(i => i.group?.name === groupName);
199
+ if (group) {
200
+ group.formPropList.addTail(item);
201
+ }
202
+ else {
203
+ group = {
204
+ formPropList: new FormPropList(),
205
+ group: item.group,
206
+ };
207
+ group.formPropList.addHead(item);
208
+ this.items.push(group);
209
+ }
210
+ }
211
+ }
212
+ class CreateFormPropsFactory extends PropsFactory {
213
+ constructor() {
214
+ super(...arguments);
215
+ this._ctor = FormProps;
216
+ }
217
+ }
218
+ class EditFormPropsFactory extends PropsFactory {
219
+ constructor() {
220
+ super(...arguments);
221
+ this._ctor = FormProps;
222
+ }
223
+ }
224
+ class FormProp extends Prop {
225
+ constructor(options) {
226
+ super(options.type, options.name, options.displayName || '', options.permission || '', options.visible, options.isExtra, options.template, options.className, options.formText);
227
+ this.group = options.group;
228
+ this.className = options.className;
229
+ this.formText = options.formText;
230
+ this.asyncValidators = options.asyncValidators || (_ => []);
231
+ this.validators = options.validators || (_ => []);
232
+ this.disabled = options.disabled || (_ => false);
233
+ this.readonly = options.readonly || (_ => false);
234
+ this.autocomplete = options.autocomplete || 'off';
235
+ this.options = options.options;
236
+ this.id = options.id || options.name;
237
+ const defaultValue = options.defaultValue;
238
+ this.defaultValue = isFalsyValue(defaultValue) ? defaultValue : defaultValue || '';
239
+ this.displayTextResolver = options.displayTextResolver;
240
+ }
241
+ static create(options) {
242
+ return new FormProp(options);
243
+ }
244
+ static createMany(arrayOfOptions) {
245
+ return arrayOfOptions.map(FormProp.create);
246
+ }
247
+ }
248
+ class FormPropData extends PropData {
249
+ constructor(injector, record) {
250
+ super();
251
+ this.record = record;
252
+ this.getInjected = injector.get.bind(injector);
253
+ }
254
+ }
255
+ function isFalsyValue(defaultValue) {
256
+ return [0, '', false].indexOf(defaultValue) > -1;
255
257
  }
256
258
 
257
- function selfFactory(dependency) {
258
- return dependency;
259
+ function selfFactory(dependency) {
260
+ return dependency;
259
261
  }
260
262
 
261
- class DateTimePickerComponent {
262
- constructor(cdRef) {
263
- this.cdRef = cdRef;
264
- this.meridian = false;
265
- }
266
- setDate(datestr) {
267
- this.date.writeValue(datestr);
268
- }
269
- setTime(datestr) {
270
- this.time.writeValue(datestr);
271
- }
272
- }
273
- DateTimePickerComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
274
- DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: { prop: "prop", meridian: "meridian" }, viewQueries: [{ propertyName: "date", first: true, predicate: NgbInputDatepicker, descendants: true }, { propertyName: "time", first: true, predicate: NgbTimepicker, descendants: true }], exportAs: ["abpDateTimePicker"], ngImport: i0, template: `
263
+ class DateTimePickerComponent {
264
+ constructor(cdRef) {
265
+ this.cdRef = cdRef;
266
+ this.meridian = false;
267
+ }
268
+ setDate(datestr) {
269
+ this.date.writeValue(datestr);
270
+ }
271
+ setTime(datestr) {
272
+ this.time.writeValue(datestr);
273
+ }
274
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
275
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: { prop: "prop", meridian: "meridian" }, viewQueries: [{ propertyName: "date", first: true, predicate: NgbInputDatepicker, descendants: true }, { propertyName: "time", first: true, predicate: NgbTimepicker, descendants: true }], exportAs: ["abpDateTimePicker"], ngImport: i0, template: `
275
276
  <input
276
277
  [id]="prop.id"
277
278
  [formControlName]="prop.name"
@@ -289,26 +290,27 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
289
290
  (ngModelChange)="setDate($event)"
290
291
  [meridian]="meridian"
291
292
  ></ngb-timepicker>
292
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i4$1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "component", type: i4$1.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"], exportAs: ["ngbTimepicker"] }], viewProviders: [
293
- {
294
- provide: ControlContainer,
295
- useFactory: selfFactory,
296
- deps: [[new Optional(), new SkipSelf(), ControlContainer]],
297
- },
298
- {
299
- provide: NgbDateAdapter,
300
- useClass: DateTimeAdapter,
301
- },
302
- {
303
- provide: NgbTimeAdapter,
304
- useClass: DateTimeAdapter,
305
- },
306
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
307
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimePickerComponent, decorators: [{
308
- type: Component,
309
- args: [{
310
- exportAs: 'abpDateTimePicker',
311
- selector: 'abp-date-time-picker',
293
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i4$1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "component", type: i4$1.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"], exportAs: ["ngbTimepicker"] }], viewProviders: [
294
+ {
295
+ provide: ControlContainer,
296
+ useFactory: selfFactory,
297
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
298
+ },
299
+ {
300
+ provide: NgbDateAdapter,
301
+ useClass: DateTimeAdapter,
302
+ },
303
+ {
304
+ provide: NgbTimeAdapter,
305
+ useClass: DateTimeAdapter,
306
+ },
307
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
308
+ }
309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DateTimePickerComponent, decorators: [{
310
+ type: Component,
311
+ args: [{
312
+ exportAs: 'abpDateTimePicker',
313
+ selector: 'abp-date-time-picker',
312
314
  template: `
313
315
  <input
314
316
  [id]="prop.id"
@@ -327,802 +329,803 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
327
329
  (ngModelChange)="setDate($event)"
328
330
  [meridian]="meridian"
329
331
  ></ngb-timepicker>
330
- `,
331
- changeDetection: ChangeDetectionStrategy.OnPush,
332
- viewProviders: [
333
- {
334
- provide: ControlContainer,
335
- useFactory: selfFactory,
336
- deps: [[new Optional(), new SkipSelf(), ControlContainer]],
337
- },
338
- {
339
- provide: NgbDateAdapter,
340
- useClass: DateTimeAdapter,
341
- },
342
- {
343
- provide: NgbTimeAdapter,
344
- useClass: DateTimeAdapter,
345
- },
346
- ],
347
- }]
348
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { prop: [{
349
- type: Input
350
- }], meridian: [{
351
- type: Input
352
- }], date: [{
353
- type: ViewChild,
354
- args: [NgbInputDatepicker]
355
- }], time: [{
356
- type: ViewChild,
357
- args: [NgbTimepicker]
332
+ `,
333
+ changeDetection: ChangeDetectionStrategy.OnPush,
334
+ viewProviders: [
335
+ {
336
+ provide: ControlContainer,
337
+ useFactory: selfFactory,
338
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
339
+ },
340
+ {
341
+ provide: NgbDateAdapter,
342
+ useClass: DateTimeAdapter,
343
+ },
344
+ {
345
+ provide: NgbTimeAdapter,
346
+ useClass: DateTimeAdapter,
347
+ },
348
+ ],
349
+ }]
350
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { prop: [{
351
+ type: Input
352
+ }], meridian: [{
353
+ type: Input
354
+ }], date: [{
355
+ type: ViewChild,
356
+ args: [NgbInputDatepicker]
357
+ }], time: [{
358
+ type: ViewChild,
359
+ args: [NgbTimepicker]
358
360
  }] } });
359
361
 
360
- const EXTENSIONS_IDENTIFIER = new InjectionToken('EXTENSIONS_IDENTIFIER');
361
- const EXTENSIONS_ACTION_TYPE = new InjectionToken('EXTENSIONS_ACTION_TYPE');
362
- const EXTENSIONS_ACTION_DATA = new InjectionToken('EXTENSIONS_ACTION_DATA');
363
- const EXTENSIONS_ACTION_CALLBACK = new InjectionToken('EXTENSIONS_ACTION_DATA');
364
- const PROP_DATA_STREAM = new InjectionToken('PROP_DATA_STREAM');
365
- const ENTITY_PROP_TYPE_CLASSES = new InjectionToken('ENTITY_PROP_TYPE_CLASSES', {
366
- factory: () => ({}),
367
- });
368
- const EXTENSIONS_FORM_PROP = new InjectionToken('EXTENSIONS_FORM_PROP');
362
+ const EXTENSIONS_IDENTIFIER = new InjectionToken('EXTENSIONS_IDENTIFIER');
363
+ const EXTENSIONS_ACTION_TYPE = new InjectionToken('EXTENSIONS_ACTION_TYPE');
364
+ const EXTENSIONS_ACTION_DATA = new InjectionToken('EXTENSIONS_ACTION_DATA');
365
+ const EXTENSIONS_ACTION_CALLBACK = new InjectionToken('EXTENSIONS_ACTION_DATA');
366
+ const PROP_DATA_STREAM = new InjectionToken('PROP_DATA_STREAM');
367
+ const ENTITY_PROP_TYPE_CLASSES = new InjectionToken('ENTITY_PROP_TYPE_CLASSES', {
368
+ factory: () => ({}),
369
+ });
370
+ const EXTENSIONS_FORM_PROP = new InjectionToken('EXTENSIONS_FORM_PROP');
369
371
  const EXTENSIONS_FORM_PROP_DATA = new InjectionToken('EXTENSIONS_FORM_PROP_DATA');
370
372
 
371
373
  const EXTRA_PROPERTIES_KEY = 'extraProperties';
372
374
 
373
- const TYPEAHEAD_TEXT_SUFFIX = '_Text';
374
- const TYPEAHEAD_TEXT_SUFFIX_REGEX = /_Text$/;
375
- function createTypeaheadOptions(lookup) {
376
- return (data, searchText) => searchText && data
377
- ? data
378
- .getInjected(RestService)
379
- .request({
380
- method: 'GET',
381
- url: lookup.url || '',
382
- params: {
383
- [lookup.filterParamName || '']: searchText,
384
- },
385
- }, { apiName: 'Default' })
386
- .pipe(map((response) => {
387
- const list = response[lookup.resultListPropertyName || ''];
388
- const mapToOption = (item) => ({
389
- key: item[lookup.displayPropertyName || ''],
390
- value: item[lookup.valuePropertyName || ''],
391
- });
392
- return list.map(mapToOption);
393
- }))
394
- : of([]);
395
- }
396
- function getTypeaheadType(lookup, name) {
397
- return Boolean(lookup.url)
398
- ? "typeahead" /* ePropType.Typeahead */
399
- : name.endsWith(TYPEAHEAD_TEXT_SUFFIX)
400
- ? "hidden" /* ePropType.Hidden */
401
- : undefined;
402
- }
403
- function createTypeaheadDisplayNameGenerator(displayNameGeneratorFn, properties) {
404
- return (displayName, fallback) => {
405
- const name = removeTypeaheadTextSuffix(fallback.name || '');
406
- return displayNameGeneratorFn(displayName || properties[name].displayName, {
407
- name,
408
- resource: fallback.resource,
409
- });
410
- };
411
- }
412
- function addTypeaheadTextSuffix(name) {
413
- return name + TYPEAHEAD_TEXT_SUFFIX;
414
- }
415
- function hasTypeaheadTextSuffix(name) {
416
- return TYPEAHEAD_TEXT_SUFFIX_REGEX.test(name);
417
- }
418
- function removeTypeaheadTextSuffix(name) {
419
- return name.replace(TYPEAHEAD_TEXT_SUFFIX_REGEX, '');
375
+ const TYPEAHEAD_TEXT_SUFFIX = '_Text';
376
+ const TYPEAHEAD_TEXT_SUFFIX_REGEX = /_Text$/;
377
+ function createTypeaheadOptions(lookup) {
378
+ return (data, searchText) => searchText && data
379
+ ? data
380
+ .getInjected(RestService)
381
+ .request({
382
+ method: 'GET',
383
+ url: lookup.url || '',
384
+ params: {
385
+ [lookup.filterParamName || '']: searchText,
386
+ },
387
+ }, { apiName: 'Default' })
388
+ .pipe(map((response) => {
389
+ const list = response[lookup.resultListPropertyName || ''];
390
+ const mapToOption = (item) => ({
391
+ key: item[lookup.displayPropertyName || ''],
392
+ value: item[lookup.valuePropertyName || ''],
393
+ });
394
+ return list.map(mapToOption);
395
+ }))
396
+ : of([]);
397
+ }
398
+ function getTypeaheadType(lookup, name) {
399
+ return Boolean(lookup.url)
400
+ ? "typeahead" /* ePropType.Typeahead */
401
+ : name.endsWith(TYPEAHEAD_TEXT_SUFFIX)
402
+ ? "hidden" /* ePropType.Hidden */
403
+ : undefined;
404
+ }
405
+ function createTypeaheadDisplayNameGenerator(displayNameGeneratorFn, properties) {
406
+ return (displayName, fallback) => {
407
+ const name = removeTypeaheadTextSuffix(fallback.name || '');
408
+ return displayNameGeneratorFn(displayName || properties[name].displayName, {
409
+ name,
410
+ resource: fallback.resource,
411
+ });
412
+ };
413
+ }
414
+ function addTypeaheadTextSuffix(name) {
415
+ return name + TYPEAHEAD_TEXT_SUFFIX;
416
+ }
417
+ function hasTypeaheadTextSuffix(name) {
418
+ return TYPEAHEAD_TEXT_SUFFIX_REGEX.test(name);
419
+ }
420
+ function removeTypeaheadTextSuffix(name) {
421
+ return name.replace(TYPEAHEAD_TEXT_SUFFIX_REGEX, '');
420
422
  }
421
423
 
422
- class DisabledDirective {
423
- constructor(ngControl) {
424
- this.ngControl = ngControl;
425
- this.abpDisabled = false;
426
- }
427
- // Related issue: https://github.com/angular/angular/issues/35330
428
- ngOnChanges({ abpDisabled }) {
429
- if (this.ngControl.control && abpDisabled) {
430
- this.ngControl.control[abpDisabled.currentValue ? 'disable' : 'enable']();
431
- }
432
- }
433
- }
434
- DisabledDirectivefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DisabledDirective, deps: [{ token: i2.NgControl, host: true }], target: i0.ɵɵFactoryTarget.Directive });
435
- DisabledDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: DisabledDirective, selector: "[abpDisabled]", inputs: { abpDisabled: "abpDisabled" }, usesOnChanges: true, ngImport: i0 });
436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DisabledDirective, decorators: [{
437
- type: Directive,
438
- args: [{
439
- selector: '[abpDisabled]',
440
- }]
441
- }], ctorParameters: function () { return [{ type: i2.NgControl, decorators: [{
442
- type: Host
443
- }] }]; }, propDecorators: { abpDisabled: [{
444
- type: Input
424
+ class DisabledDirective {
425
+ constructor(ngControl) {
426
+ this.ngControl = ngControl;
427
+ this.abpDisabled = false;
428
+ }
429
+ // Related issue: https://github.com/angular/angular/issues/35330
430
+ ngOnChanges({ abpDisabled }) {
431
+ if (this.ngControl.control && abpDisabled) {
432
+ this.ngControl.control[abpDisabled.currentValue ? 'disable' : 'enable']();
433
+ }
434
+ }
435
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DisabledDirective, deps: [{ token: i2.NgControl, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
436
+ static { thisdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.1", type: DisabledDirective, selector: "[abpDisabled]", inputs: { abpDisabled: "abpDisabled" }, usesOnChanges: true, ngImport: i0 }); }
437
+ }
438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DisabledDirective, decorators: [{
439
+ type: Directive,
440
+ args: [{
441
+ selector: '[abpDisabled]',
442
+ }]
443
+ }], ctorParameters: function () { return [{ type: i2.NgControl, decorators: [{
444
+ type: Host
445
+ }] }]; }, propDecorators: { abpDisabled: [{
446
+ type: Input
445
447
  }] } });
446
448
 
447
- class ExtensibleFormPropComponent {
448
- constructor(cdRef, track, configState, groupDirective, injector) {
449
- this.cdRef = cdRef;
450
- this.track = track;
451
- this.configState = configState;
452
- this.injector = injector;
453
- this.asterisk = '';
454
- this.containerClassName = 'mb-3';
455
- this.options$ = of([]);
456
- this.validators = [];
457
- this.passwordKey = "ThemeShared.Extensions.PasswordComponent" /* eThemeSharedComponents.PasswordComponent */;
458
- this.disabledFn = (data) => false;
459
- this.search = (text$) => text$
460
- ? text$.pipe(debounceTime(300), distinctUntilChanged(), switchMap(text => this.prop?.options?.(this.data, text) || of([])))
461
- : of([]);
462
- this.typeaheadFormatter = (option) => option.key;
463
- this.form = groupDirective.form;
464
- }
465
- get disabled() {
466
- return this.disabledFn(this.data);
467
- }
468
- setTypeaheadValue(selectedOption) {
469
- this.typeaheadModel = selectedOption || { key: null, value: null };
470
- const { key, value } = this.typeaheadModel;
471
- const [keyControl, valueControl] = this.getTypeaheadControls();
472
- if (valueControl?.value && !value)
473
- valueControl.markAsDirty();
474
- keyControl?.setValue(key);
475
- valueControl?.setValue(value);
476
- }
477
- get meridian() {
478
- return (this.configState.getDeep('localization.currentCulture.dateTimeFormat.shortTimePattern') || '').includes('tt');
479
- }
480
- get isInvalid() {
481
- const control = this.form.get(this.prop.name);
482
- return control?.touched && control.invalid;
483
- }
484
- getTypeaheadControls() {
485
- const { name } = this.prop;
486
- const extraPropName = `${EXTRA_PROPERTIES_KEY}.${name}`;
487
- const keyControl = this.form.get(addTypeaheadTextSuffix(extraPropName)) ||
488
- this.form.get(addTypeaheadTextSuffix(name));
489
- const valueControl = this.form.get(extraPropName) || this.form.get(name);
490
- return [keyControl, valueControl];
491
- }
492
- setAsterisk() {
493
- this.asterisk = this.validators.some(isRequired) ? '*' : '';
494
- }
495
- ngAfterViewInit() {
496
- if (this.first && this.fieldRef) {
497
- this.fieldRef.nativeElement.focus();
498
- this.cdRef.detectChanges();
499
- }
500
- }
501
- getComponent(prop) {
502
- if (prop.template) {
503
- return 'template';
504
- }
505
- switch (prop.type) {
506
- case "boolean" /* ePropType.Boolean */:
507
- return 'checkbox';
508
- case "date" /* ePropType.Date */:
509
- return 'date';
510
- case "datetime" /* ePropType.DateTime */:
511
- return 'dateTime';
512
- case "hidden" /* ePropType.Hidden */:
513
- return 'hidden';
514
- case "multiselect" /* ePropType.MultiSelect */:
515
- return 'multiselect';
516
- case "text" /* ePropType.Text */:
517
- return 'textarea';
518
- case "time" /* ePropType.Time */:
519
- return 'time';
520
- case "typeahead" /* ePropType.Typeahead */:
521
- return 'typeahead';
522
- case "passwordinputgroup" /* ePropType.PasswordInputGroup */:
523
- return 'passwordinputgroup';
524
- default:
525
- return prop.options ? 'select' : 'input';
526
- }
527
- }
528
- getType(prop) {
529
- switch (prop.type) {
530
- case "date" /* ePropType.Date */:
531
- case "string" /* ePropType.String */:
532
- return 'text';
533
- case "boolean" /* ePropType.Boolean */:
534
- return 'checkbox';
535
- case "number" /* ePropType.Number */:
536
- return 'number';
537
- case "email" /* ePropType.Email */:
538
- return 'email';
539
- case "password" /* ePropType.Password */:
540
- return 'password';
541
- case "passwordinputgroup" /* ePropType.PasswordInputGroup */:
542
- return 'passwordinputgroup';
543
- default:
544
- return 'hidden';
545
- }
546
- }
547
- ngOnChanges({ prop, data }) {
548
- const currentProp = prop?.currentValue;
549
- const { options, readonly, disabled, validators, className, template } = currentProp || {};
550
- if (template) {
551
- this.injectorForCustomComponent = Injector.create({
552
- providers: [
553
- {
554
- provide: EXTENSIONS_FORM_PROP,
555
- useValue: currentProp,
556
- },
557
- {
558
- provide: EXTENSIONS_FORM_PROP_DATA,
559
- useValue: data?.currentValue?.record,
560
- },
561
- { provide: ControlContainer, useExisting: FormGroupDirective },
562
- ],
563
- parent: this.injector,
564
- });
565
- }
566
- if (options)
567
- this.options$ = options(this.data);
568
- if (readonly)
569
- this.readonly = readonly(this.data);
570
- if (disabled) {
571
- this.disabledFn = disabled;
572
- }
573
- if (validators) {
574
- this.validators = validators(this.data);
575
- this.setAsterisk();
576
- }
577
- if (className !== undefined) {
578
- this.containerClassName = className;
579
- }
580
- const [keyControl, valueControl] = this.getTypeaheadControls();
581
- if (keyControl && valueControl)
582
- this.typeaheadModel = { key: keyControl.value, value: valueControl.value };
583
- }
584
- }
585
- ExtensibleFormPropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExtensibleFormPropComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TrackByService }, { token: i1.ConfigStateService }, { token: i2.FormGroupDirective }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
586
- ExtensibleFormPropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: { data: "data", prop: "prop", first: "first" }, viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container\r\n [ngSwitch]=\"getComponent(prop)\"\r\n *abpPermission=\"prop.permission; runChangeDetection: false\"\r\n>\r\n <ng-template ngSwitchCase=\"template\">\r\n <ng-container *ngComponentOutlet=\"prop.template; injector: injectorForCustomComponent\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <div [ngClass]=\"containerClassName\" class=\"mb-3\">\r\n <ng-template ngSwitchCase=\"input\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [type]=\"getType(prop)\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"hidden\">\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"checkbox\">\r\n <div class=\"form-check\" validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n />\r\n <ng-template\r\n [ngTemplateOutlet]=\"label\"\r\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\r\n ></ng-template>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"select\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"multiselect\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n multiple=\"multiple\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"typeahead\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [abpDisabled]=\"disabled\"\r\n [ngbTypeahead]=\"search\"\r\n [editable]=\"false\"\r\n [inputFormatter]=\"typeaheadFormatter\"\r\n [resultFormatter]=\"typeaheadFormatter\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [(ngModel)]=\"typeaheadModel\"\r\n (selectItem)=\"setTypeaheadValue($event.item)\"\r\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\r\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\r\n class=\"form-control\"\r\n />\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"date\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n (click)=\"datepicker.open()\"\r\n (keyup.space)=\"datepicker.open()\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"time\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"dateTime\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"textarea\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <textarea\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n ></textarea>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"passwordinputgroup\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-password\r\n *abpReplaceableTemplate=\"{\r\n componentKey: passwordKey,\r\n inputs: {\r\n inputId: { value: prop.id },\r\n formControlName: { value: prop.name }\r\n }\r\n }\"\r\n [inputId]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n ></abp-password>\r\n </ng-template>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label'\">\r\n <ng-container *ngIf=\"prop.displayTextResolver; else displayNameTemplate\">\r\n {{ prop.displayTextResolver(data) | abpLocalization }}\r\n </ng-container>\r\n <ng-template #displayNameTemplate> {{ prop.displayName | abpLocalization }}</ng-template>\r\n {{ asterisk }}\r\n </label>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "directive", type: i4.ValidationStyleDirective, selector: "[validationStyle]", exportAs: ["validationStyle"] }, { kind: "directive", type: i4.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4$2.PasswordComponent, selector: "abp-password", inputs: ["inputId", "formControlName"] }, { kind: "directive", type: i4$1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "component", type: i4$1.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"], exportAs: ["ngbTimepicker"] }, { kind: "directive", type: i4$1.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "container", "editable", "focusFirst", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "showHint", "placement", "popperOptions", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { kind: "component", type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: ["prop", "meridian"], exportAs: ["abpDateTimePicker"] }, { kind: "directive", type: DisabledDirective, selector: "[abpDisabled]", inputs: ["abpDisabled"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], viewProviders: [
587
- {
588
- provide: ControlContainer,
589
- useFactory: selfFactory,
590
- deps: [[new Optional(), new SkipSelf(), ControlContainer]],
591
- },
592
- { provide: NgbDateAdapter, useClass: DateAdapter },
593
- { provide: NgbTimeAdapter, useClass: TimeAdapter },
594
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
595
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExtensibleFormPropComponent, decorators: [{
596
- type: Component,
597
- args: [{ selector: 'abp-extensible-form-prop', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
598
- {
599
- provide: ControlContainer,
600
- useFactory: selfFactory,
601
- deps: [[new Optional(), new SkipSelf(), ControlContainer]],
602
- },
603
- { provide: NgbDateAdapter, useClass: DateAdapter },
604
- { provide: NgbTimeAdapter, useClass: TimeAdapter },
605
- ], template: "<ng-container\r\n [ngSwitch]=\"getComponent(prop)\"\r\n *abpPermission=\"prop.permission; runChangeDetection: false\"\r\n>\r\n <ng-template ngSwitchCase=\"template\">\r\n <ng-container *ngComponentOutlet=\"prop.template; injector: injectorForCustomComponent\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <div [ngClass]=\"containerClassName\" class=\"mb-3\">\r\n <ng-template ngSwitchCase=\"input\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [type]=\"getType(prop)\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"hidden\">\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"checkbox\">\r\n <div class=\"form-check\" validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n />\r\n <ng-template\r\n [ngTemplateOutlet]=\"label\"\r\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\r\n ></ng-template>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"select\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"multiselect\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n multiple=\"multiple\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"typeahead\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [abpDisabled]=\"disabled\"\r\n [ngbTypeahead]=\"search\"\r\n [editable]=\"false\"\r\n [inputFormatter]=\"typeaheadFormatter\"\r\n [resultFormatter]=\"typeaheadFormatter\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [(ngModel)]=\"typeaheadModel\"\r\n (selectItem)=\"setTypeaheadValue($event.item)\"\r\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\r\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\r\n class=\"form-control\"\r\n />\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"date\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n (click)=\"datepicker.open()\"\r\n (keyup.space)=\"datepicker.open()\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"time\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"dateTime\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"textarea\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <textarea\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n ></textarea>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"passwordinputgroup\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-password\r\n *abpReplaceableTemplate=\"{\r\n componentKey: passwordKey,\r\n inputs: {\r\n inputId: { value: prop.id },\r\n formControlName: { value: prop.name }\r\n }\r\n }\"\r\n [inputId]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n ></abp-password>\r\n </ng-template>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label'\">\r\n <ng-container *ngIf=\"prop.displayTextResolver; else displayNameTemplate\">\r\n {{ prop.displayTextResolver(data) | abpLocalization }}\r\n </ng-container>\r\n <ng-template #displayNameTemplate> {{ prop.displayName | abpLocalization }}</ng-template>\r\n {{ asterisk }}\r\n </label>\r\n</ng-template>\r\n" }]
606
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i1.ConfigStateService }, { type: i2.FormGroupDirective }, { type: i0.Injector }]; }, propDecorators: { data: [{
607
- type: Input
608
- }], prop: [{
609
- type: Input
610
- }], first: [{
611
- type: Input
612
- }], fieldRef: [{
613
- type: ViewChild,
614
- args: ['field']
615
- }] } });
616
- function isRequired(validator) {
617
- return (validator === Validators.required ||
618
- validator === AbpValidators.required ||
619
- validator.name === 'required');
449
+ class ExtensibleFormPropComponent {
450
+ get disabled() {
451
+ return this.disabledFn(this.data);
452
+ }
453
+ setTypeaheadValue(selectedOption) {
454
+ this.typeaheadModel = selectedOption || { key: null, value: null };
455
+ const { key, value } = this.typeaheadModel;
456
+ const [keyControl, valueControl] = this.getTypeaheadControls();
457
+ if (valueControl?.value && !value)
458
+ valueControl.markAsDirty();
459
+ keyControl?.setValue(key);
460
+ valueControl?.setValue(value);
461
+ }
462
+ get meridian() {
463
+ return (this.configState.getDeep('localization.currentCulture.dateTimeFormat.shortTimePattern') || '').includes('tt');
464
+ }
465
+ get isInvalid() {
466
+ const control = this.form.get(this.prop.name);
467
+ return control?.touched && control.invalid;
468
+ }
469
+ constructor(cdRef, track, configState, groupDirective, injector) {
470
+ this.cdRef = cdRef;
471
+ this.track = track;
472
+ this.configState = configState;
473
+ this.injector = injector;
474
+ this.asterisk = '';
475
+ this.containerClassName = 'mb-3';
476
+ this.options$ = of([]);
477
+ this.validators = [];
478
+ this.passwordKey = "ThemeShared.Extensions.PasswordComponent" /* eThemeSharedComponents.PasswordComponent */;
479
+ this.disabledFn = (data) => false;
480
+ this.search = (text$) => text$
481
+ ? text$.pipe(debounceTime(300), distinctUntilChanged(), switchMap(text => this.prop?.options?.(this.data, text) || of([])))
482
+ : of([]);
483
+ this.typeaheadFormatter = (option) => option.key;
484
+ this.form = groupDirective.form;
485
+ }
486
+ getTypeaheadControls() {
487
+ const { name } = this.prop;
488
+ const extraPropName = `${EXTRA_PROPERTIES_KEY}.${name}`;
489
+ const keyControl = this.form.get(addTypeaheadTextSuffix(extraPropName)) ||
490
+ this.form.get(addTypeaheadTextSuffix(name));
491
+ const valueControl = this.form.get(extraPropName) || this.form.get(name);
492
+ return [keyControl, valueControl];
493
+ }
494
+ setAsterisk() {
495
+ this.asterisk = this.validators.some(isRequired) ? '*' : '';
496
+ }
497
+ ngAfterViewInit() {
498
+ if (this.first && this.fieldRef) {
499
+ this.fieldRef.nativeElement.focus();
500
+ this.cdRef.detectChanges();
501
+ }
502
+ }
503
+ getComponent(prop) {
504
+ if (prop.template) {
505
+ return 'template';
506
+ }
507
+ switch (prop.type) {
508
+ case "boolean" /* ePropType.Boolean */:
509
+ return 'checkbox';
510
+ case "date" /* ePropType.Date */:
511
+ return 'date';
512
+ case "datetime" /* ePropType.DateTime */:
513
+ return 'dateTime';
514
+ case "hidden" /* ePropType.Hidden */:
515
+ return 'hidden';
516
+ case "multiselect" /* ePropType.MultiSelect */:
517
+ return 'multiselect';
518
+ case "text" /* ePropType.Text */:
519
+ return 'textarea';
520
+ case "time" /* ePropType.Time */:
521
+ return 'time';
522
+ case "typeahead" /* ePropType.Typeahead */:
523
+ return 'typeahead';
524
+ case "passwordinputgroup" /* ePropType.PasswordInputGroup */:
525
+ return 'passwordinputgroup';
526
+ default:
527
+ return prop.options ? 'select' : 'input';
528
+ }
529
+ }
530
+ getType(prop) {
531
+ switch (prop.type) {
532
+ case "date" /* ePropType.Date */:
533
+ case "string" /* ePropType.String */:
534
+ return 'text';
535
+ case "boolean" /* ePropType.Boolean */:
536
+ return 'checkbox';
537
+ case "number" /* ePropType.Number */:
538
+ return 'number';
539
+ case "email" /* ePropType.Email */:
540
+ return 'email';
541
+ case "password" /* ePropType.Password */:
542
+ return 'password';
543
+ case "passwordinputgroup" /* ePropType.PasswordInputGroup */:
544
+ return 'passwordinputgroup';
545
+ default:
546
+ return 'hidden';
547
+ }
548
+ }
549
+ ngOnChanges({ prop, data }) {
550
+ const currentProp = prop?.currentValue;
551
+ const { options, readonly, disabled, validators, className, template } = currentProp || {};
552
+ if (template) {
553
+ this.injectorForCustomComponent = Injector.create({
554
+ providers: [
555
+ {
556
+ provide: EXTENSIONS_FORM_PROP,
557
+ useValue: currentProp,
558
+ },
559
+ {
560
+ provide: EXTENSIONS_FORM_PROP_DATA,
561
+ useValue: data?.currentValue?.record,
562
+ },
563
+ { provide: ControlContainer, useExisting: FormGroupDirective },
564
+ ],
565
+ parent: this.injector,
566
+ });
567
+ }
568
+ if (options)
569
+ this.options$ = options(this.data);
570
+ if (readonly)
571
+ this.readonly = readonly(this.data);
572
+ if (disabled) {
573
+ this.disabledFn = disabled;
574
+ }
575
+ if (validators) {
576
+ this.validators = validators(this.data);
577
+ this.setAsterisk();
578
+ }
579
+ if (className !== undefined) {
580
+ this.containerClassName = className;
581
+ }
582
+ const [keyControl, valueControl] = this.getTypeaheadControls();
583
+ if (keyControl && valueControl)
584
+ this.typeaheadModel = { key: keyControl.value, value: valueControl.value };
585
+ }
586
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensibleFormPropComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TrackByService }, { token: i1.ConfigStateService }, { token: i2.FormGroupDirective }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
587
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: { data: "data", prop: "prop", first: "first" }, viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container\r\n [ngSwitch]=\"getComponent(prop)\"\r\n *abpPermission=\"prop.permission; runChangeDetection: false\"\r\n>\r\n <ng-template ngSwitchCase=\"template\">\r\n <ng-container *ngComponentOutlet=\"prop.template; injector: injectorForCustomComponent\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <div [ngClass]=\"containerClassName\" class=\"mb-3\">\r\n <ng-template ngSwitchCase=\"input\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [type]=\"getType(prop)\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"hidden\">\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"checkbox\">\r\n <div class=\"form-check\" validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n />\r\n <ng-template\r\n [ngTemplateOutlet]=\"label\"\r\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\r\n ></ng-template>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"select\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"multiselect\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n multiple=\"multiple\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"typeahead\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [abpDisabled]=\"disabled\"\r\n [ngbTypeahead]=\"search\"\r\n [editable]=\"false\"\r\n [inputFormatter]=\"typeaheadFormatter\"\r\n [resultFormatter]=\"typeaheadFormatter\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [(ngModel)]=\"typeaheadModel\"\r\n (selectItem)=\"setTypeaheadValue($event.item)\"\r\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\r\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\r\n class=\"form-control\"\r\n />\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"date\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n (click)=\"datepicker.open()\"\r\n (keyup.space)=\"datepicker.open()\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"time\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"dateTime\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"textarea\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <textarea\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n ></textarea>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"passwordinputgroup\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-password\r\n *abpReplaceableTemplate=\"{\r\n componentKey: passwordKey,\r\n inputs: {\r\n inputId: { value: prop.id },\r\n formControlName: { value: prop.name }\r\n }\r\n }\"\r\n [inputId]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n ></abp-password>\r\n </ng-template>\r\n\r\n <small *ngIf=\"prop.formText\" class=\"form-text text-muted\">{{\r\n prop.formText | abpLocalization\r\n }}</small>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label'\">\r\n <ng-container *ngIf=\"prop.displayTextResolver; else displayNameTemplate\">\r\n {{ prop.displayTextResolver(data) | abpLocalization }}\r\n </ng-container>\r\n <ng-template #displayNameTemplate> {{ prop.displayName | abpLocalization }}</ng-template>\r\n {{ asterisk }}\r\n </label>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i1.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "directive", type: i4.ValidationStyleDirective, selector: "[validationStyle]", exportAs: ["validationStyle"] }, { kind: "directive", type: i4.ValidationTargetDirective, selector: "[validationTarget]", exportAs: ["validationTarget"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4$2.PasswordComponent, selector: "abp-password", inputs: ["inputId", "formControlName"] }, { kind: "directive", type: i4$1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "component", type: i4$1.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"], exportAs: ["ngbTimepicker"] }, { kind: "directive", type: i4$1.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "container", "editable", "focusFirst", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "selectOnExact", "showHint", "placement", "popperOptions", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { kind: "component", type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: ["prop", "meridian"], exportAs: ["abpDateTimePicker"] }, { kind: "directive", type: DisabledDirective, selector: "[abpDisabled]", inputs: ["abpDisabled"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], viewProviders: [
588
+ {
589
+ provide: ControlContainer,
590
+ useFactory: selfFactory,
591
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
592
+ },
593
+ { provide: NgbDateAdapter, useClass: DateAdapter },
594
+ { provide: NgbTimeAdapter, useClass: TimeAdapter },
595
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
596
+ }
597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensibleFormPropComponent, decorators: [{
598
+ type: Component,
599
+ args: [{ selector: 'abp-extensible-form-prop', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
600
+ {
601
+ provide: ControlContainer,
602
+ useFactory: selfFactory,
603
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
604
+ },
605
+ { provide: NgbDateAdapter, useClass: DateAdapter },
606
+ { provide: NgbTimeAdapter, useClass: TimeAdapter },
607
+ ], template: "<ng-container\r\n [ngSwitch]=\"getComponent(prop)\"\r\n *abpPermission=\"prop.permission; runChangeDetection: false\"\r\n>\r\n <ng-template ngSwitchCase=\"template\">\r\n <ng-container *ngComponentOutlet=\"prop.template; injector: injectorForCustomComponent\">\r\n </ng-container>\r\n </ng-template>\r\n\r\n <div [ngClass]=\"containerClassName\" class=\"mb-3\">\r\n <ng-template ngSwitchCase=\"input\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [type]=\"getType(prop)\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"hidden\">\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"checkbox\">\r\n <div class=\"form-check\" validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n type=\"checkbox\"\r\n class=\"form-check-input\"\r\n />\r\n <ng-template\r\n [ngTemplateOutlet]=\"label\"\r\n [ngTemplateOutletContext]=\"{ $implicit: 'form-check-label' }\"\r\n ></ng-template>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"select\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"multiselect\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <select\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n multiple=\"multiple\"\r\n class=\"form-select form-control\"\r\n >\r\n <option\r\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\r\n [ngValue]=\"option.value\"\r\n >\r\n {{ option.key }}\r\n </option>\r\n </select>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"typeahead\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\r\n <input\r\n #field\r\n [id]=\"prop.id\"\r\n [autocomplete]=\"prop.autocomplete\"\r\n [abpDisabled]=\"disabled\"\r\n [ngbTypeahead]=\"search\"\r\n [editable]=\"false\"\r\n [inputFormatter]=\"typeaheadFormatter\"\r\n [resultFormatter]=\"typeaheadFormatter\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [(ngModel)]=\"typeaheadModel\"\r\n (selectItem)=\"setTypeaheadValue($event.item)\"\r\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\r\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\r\n class=\"form-control\"\r\n />\r\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"date\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <input\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n (click)=\"datepicker.open()\"\r\n (keyup.space)=\"datepicker.open()\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"time\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"dateTime\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"textarea\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <textarea\r\n #field\r\n [id]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n [abpDisabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n class=\"form-control\"\r\n ></textarea>\r\n </ng-template>\r\n\r\n <ng-template ngSwitchCase=\"passwordinputgroup\">\r\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\r\n <abp-password\r\n *abpReplaceableTemplate=\"{\r\n componentKey: passwordKey,\r\n inputs: {\r\n inputId: { value: prop.id },\r\n formControlName: { value: prop.name }\r\n }\r\n }\"\r\n [inputId]=\"prop.id\"\r\n [formControlName]=\"prop.name\"\r\n ></abp-password>\r\n </ng-template>\r\n\r\n <small *ngIf=\"prop.formText\" class=\"form-text text-muted\">{{\r\n prop.formText | abpLocalization\r\n }}</small>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #label let-classes>\r\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes || 'form-label'\">\r\n <ng-container *ngIf=\"prop.displayTextResolver; else displayNameTemplate\">\r\n {{ prop.displayTextResolver(data) | abpLocalization }}\r\n </ng-container>\r\n <ng-template #displayNameTemplate> {{ prop.displayName | abpLocalization }}</ng-template>\r\n {{ asterisk }}\r\n </label>\r\n</ng-template>\r\n" }]
608
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i1.ConfigStateService }, { type: i2.FormGroupDirective }, { type: i0.Injector }]; }, propDecorators: { data: [{
609
+ type: Input
610
+ }], prop: [{
611
+ type: Input
612
+ }], first: [{
613
+ type: Input
614
+ }], fieldRef: [{
615
+ type: ViewChild,
616
+ args: ['field']
617
+ }] } });
618
+ function isRequired(validator) {
619
+ return (validator === Validators.required ||
620
+ validator === AbpValidators.required ||
621
+ validator.name === 'required');
620
622
  }
621
623
 
622
- class ActionList extends LinkedList {
623
- }
624
- class ActionData {
625
- get data() {
626
- return {
627
- getInjected: this.getInjected,
628
- index: this.index,
629
- record: this.record,
630
- };
631
- }
632
- }
633
- class Action {
634
- constructor(permission, visible = () => true, action = () => { }) {
635
- this.permission = permission;
636
- this.visible = visible;
637
- this.action = action;
638
- }
639
- }
640
- class ActionsFactory {
641
- constructor() {
642
- this.contributorCallbacks = {};
643
- }
644
- get(name) {
645
- this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
646
- return new this._ctor(this.contributorCallbacks[name]);
647
- }
648
- }
649
- class Actions {
650
- constructor(callbackList) {
651
- this.callbackList = callbackList;
652
- }
653
- get actions() {
654
- const actionList = new this._ctor();
655
- this.callbackList.forEach(callback => callback(actionList));
656
- return actionList;
657
- }
658
- addContributor(contributeCallback) {
659
- this.callbackList.push(contributeCallback);
660
- }
661
- clearContributors() {
662
- while (this.callbackList.length)
663
- this.callbackList.pop();
664
- }
624
+ class ActionList extends LinkedList {
625
+ }
626
+ class ActionData {
627
+ get data() {
628
+ return {
629
+ getInjected: this.getInjected,
630
+ index: this.index,
631
+ record: this.record,
632
+ };
633
+ }
634
+ }
635
+ class Action {
636
+ constructor(permission, visible = () => true, action = () => { }) {
637
+ this.permission = permission;
638
+ this.visible = visible;
639
+ this.action = action;
640
+ }
641
+ }
642
+ class ActionsFactory {
643
+ constructor() {
644
+ this.contributorCallbacks = {};
645
+ }
646
+ get(name) {
647
+ this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
648
+ return new this._ctor(this.contributorCallbacks[name]);
649
+ }
650
+ }
651
+ class Actions {
652
+ get actions() {
653
+ const actionList = new this._ctor();
654
+ this.callbackList.forEach(callback => callback(actionList));
655
+ return actionList;
656
+ }
657
+ constructor(callbackList) {
658
+ this.callbackList = callbackList;
659
+ }
660
+ addContributor(contributeCallback) {
661
+ this.callbackList.push(contributeCallback);
662
+ }
663
+ clearContributors() {
664
+ while (this.callbackList.length)
665
+ this.callbackList.pop();
666
+ }
665
667
  }
666
668
 
667
- class EntityActionList extends ActionList {
668
- }
669
- class EntityActions extends Actions {
670
- constructor() {
671
- super(...arguments);
672
- this._ctor = EntityActionList;
673
- }
674
- }
675
- class EntityActionsFactory extends ActionsFactory {
676
- constructor() {
677
- super(...arguments);
678
- this._ctor = EntityActions;
679
- }
680
- }
681
- class EntityAction extends Action {
682
- constructor(options) {
683
- super(options.permission || '', options.visible, options.action);
684
- this.text = options.text;
685
- this.icon = options.icon || '';
686
- }
687
- static create(options) {
688
- return new EntityAction(options);
689
- }
690
- static createMany(arrayOfOptions) {
691
- return arrayOfOptions.map(EntityAction.create);
692
- }
669
+ class EntityActionList extends ActionList {
670
+ }
671
+ class EntityActions extends Actions {
672
+ constructor() {
673
+ super(...arguments);
674
+ this._ctor = EntityActionList;
675
+ }
676
+ }
677
+ class EntityActionsFactory extends ActionsFactory {
678
+ constructor() {
679
+ super(...arguments);
680
+ this._ctor = EntityActions;
681
+ }
682
+ }
683
+ class EntityAction extends Action {
684
+ constructor(options) {
685
+ super(options.permission || '', options.visible, options.action);
686
+ this.text = options.text;
687
+ this.icon = options.icon || '';
688
+ }
689
+ static create(options) {
690
+ return new EntityAction(options);
691
+ }
692
+ static createMany(arrayOfOptions) {
693
+ return arrayOfOptions.map(EntityAction.create);
694
+ }
693
695
  }
694
696
 
695
- class EntityPropList extends PropList {
696
- }
697
- class EntityProps extends Props {
698
- constructor() {
699
- super(...arguments);
700
- this._ctor = EntityPropList;
701
- }
702
- }
703
- class EntityPropsFactory extends PropsFactory {
704
- constructor() {
705
- super(...arguments);
706
- this._ctor = EntityProps;
707
- }
708
- }
709
- class EntityProp extends Prop {
710
- constructor(options) {
711
- super(options.type, options.name, options.displayName || '', options.permission || '', options.visible, options.isExtra);
712
- this.columnWidth = options.columnWidth;
713
- this.sortable = options.sortable || false;
714
- this.valueResolver =
715
- options.valueResolver ||
716
- (data => of(escapeHtmlChars(data.record[this.name])));
717
- if (options.action) {
718
- this.action = options.action;
719
- }
720
- if (options.component) {
721
- this.component = options.component;
722
- }
723
- if (options.enumList) {
724
- this.enumList = options.enumList;
725
- }
726
- }
727
- static create(options) {
728
- return new EntityProp(options);
729
- }
730
- static createMany(arrayOfOptions) {
731
- return arrayOfOptions.map(EntityProp.create);
732
- }
697
+ class EntityPropList extends PropList {
698
+ }
699
+ class EntityProps extends Props {
700
+ constructor() {
701
+ super(...arguments);
702
+ this._ctor = EntityPropList;
703
+ }
704
+ }
705
+ class EntityPropsFactory extends PropsFactory {
706
+ constructor() {
707
+ super(...arguments);
708
+ this._ctor = EntityProps;
709
+ }
710
+ }
711
+ class EntityProp extends Prop {
712
+ constructor(options) {
713
+ super(options.type, options.name, options.displayName || '', options.permission || '', options.visible, options.isExtra);
714
+ this.columnWidth = options.columnWidth;
715
+ this.sortable = options.sortable || false;
716
+ this.valueResolver =
717
+ options.valueResolver ||
718
+ (data => of(escapeHtmlChars(data.record[this.name])));
719
+ if (options.action) {
720
+ this.action = options.action;
721
+ }
722
+ if (options.component) {
723
+ this.component = options.component;
724
+ }
725
+ if (options.enumList) {
726
+ this.enumList = options.enumList;
727
+ }
728
+ this.tooltip = options.tooltip;
729
+ }
730
+ static create(options) {
731
+ return new EntityProp(options);
732
+ }
733
+ static createMany(arrayOfOptions) {
734
+ return arrayOfOptions.map(EntityProp.create);
735
+ }
733
736
  }
734
737
 
735
- class ToolbarActionList extends ActionList {
736
- }
737
- class ToolbarActions extends Actions {
738
- constructor() {
739
- super(...arguments);
740
- this._ctor = ToolbarActionList;
741
- }
742
- }
743
- class ToolbarActionsFactory extends ActionsFactory {
744
- constructor() {
745
- super(...arguments);
746
- this._ctor = ToolbarActions;
747
- }
748
- }
749
- class ToolbarAction extends Action {
750
- constructor(options) {
751
- super(options.permission || '', options.visible, options.action);
752
- this.text = options.text;
753
- this.icon = options.icon || '';
754
- if (options.btnClass) {
755
- this.btnClass = options.btnClass;
756
- }
757
- }
758
- static create(options) {
759
- return new ToolbarAction(options);
760
- }
761
- static createMany(arrayOfOptions) {
762
- return arrayOfOptions.map(ToolbarAction.create);
763
- }
764
- }
765
- class ToolbarComponent extends Action {
766
- constructor(options) {
767
- super(options.permission || '', options.visible, options.action);
768
- this.component = options.component;
769
- }
770
- static create(options) {
771
- return new ToolbarComponent(options);
772
- }
773
- static createMany(arrayOfOptions) {
774
- return arrayOfOptions.map(ToolbarComponent.create);
775
- }
738
+ class ToolbarActionList extends ActionList {
739
+ }
740
+ class ToolbarActions extends Actions {
741
+ constructor() {
742
+ super(...arguments);
743
+ this._ctor = ToolbarActionList;
744
+ }
745
+ }
746
+ class ToolbarActionsFactory extends ActionsFactory {
747
+ constructor() {
748
+ super(...arguments);
749
+ this._ctor = ToolbarActions;
750
+ }
751
+ }
752
+ class ToolbarAction extends Action {
753
+ constructor(options) {
754
+ super(options.permission || '', options.visible, options.action);
755
+ this.text = options.text;
756
+ this.icon = options.icon || '';
757
+ if (options.btnClass) {
758
+ this.btnClass = options.btnClass;
759
+ }
760
+ }
761
+ static create(options) {
762
+ return new ToolbarAction(options);
763
+ }
764
+ static createMany(arrayOfOptions) {
765
+ return arrayOfOptions.map(ToolbarAction.create);
766
+ }
767
+ }
768
+ class ToolbarComponent extends Action {
769
+ constructor(options) {
770
+ super(options.permission || '', options.visible, options.action);
771
+ this.component = options.component;
772
+ }
773
+ static create(options) {
774
+ return new ToolbarComponent(options);
775
+ }
776
+ static createMany(arrayOfOptions) {
777
+ return arrayOfOptions.map(ToolbarComponent.create);
778
+ }
776
779
  }
777
780
 
778
- class ExtensionsService {
779
- constructor() {
780
- this.entityActions = new EntityActionsFactory();
781
- this.toolbarActions = new ToolbarActionsFactory();
782
- this.entityProps = new EntityPropsFactory();
783
- this.createFormProps = new CreateFormPropsFactory();
784
- this.editFormProps = new EditFormPropsFactory();
785
- }
786
- }
787
- ExtensionsServicefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExtensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
788
- ExtensionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExtensionsService, providedIn: 'root' });
789
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExtensionsService, decorators: [{
790
- type: Injectable,
791
- args: [{
792
- providedIn: 'root',
793
- }]
781
+ class ExtensionsService {
782
+ constructor() {
783
+ this.entityActions = new EntityActionsFactory();
784
+ this.toolbarActions = new ToolbarActionsFactory();
785
+ this.entityProps = new EntityPropsFactory();
786
+ this.createFormProps = new CreateFormPropsFactory();
787
+ this.editFormProps = new EditFormPropsFactory();
788
+ }
789
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
790
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensionsService, providedIn: 'root' }); }
791
+ }
792
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensionsService, decorators: [{
793
+ type: Injectable,
794
+ args: [{
795
+ providedIn: 'root',
796
+ }]
794
797
  }] });
795
798
 
796
- /* eslint-disable @angular-eslint/no-input-rename */
797
- class PropDataDirective extends PropData {
798
- constructor(tempRef, vcRef, injector) {
799
- super();
800
- this.tempRef = tempRef;
801
- this.vcRef = vcRef;
802
- this.getInjected = injector.get.bind(injector);
803
- }
804
- ngOnChanges() {
805
- this.vcRef.clear();
806
- this.vcRef.createEmbeddedView(this.tempRef, {
807
- $implicit: this.data,
808
- index: 0,
809
- });
810
- }
811
- ngOnDestroy() {
812
- this.vcRef.clear();
813
- }
814
- }
815
- PropDataDirectivefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PropDataDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
816
- PropDataDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: PropDataDirective, selector: "[abpPropData]", inputs: { propList: ["abpPropDataFromList", "propList"], record: ["abpPropDataWithRecord", "record"], index: ["abpPropDataAtIndex", "index"] }, exportAs: ["abpPropData"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
817
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PropDataDirective, decorators: [{
818
- type: Directive,
819
- args: [{
820
- exportAs: 'abpPropData',
821
- selector: '[abpPropData]',
822
- }]
823
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.Injector }]; }, propDecorators: { propList: [{
824
- type: Input,
825
- args: ['abpPropDataFromList']
826
- }], record: [{
827
- type: Input,
828
- args: ['abpPropDataWithRecord']
829
- }], index: [{
830
- type: Input,
831
- args: ['abpPropDataAtIndex']
799
+ /* eslint-disable @angular-eslint/no-input-rename */
800
+ class PropDataDirective extends PropData {
801
+ constructor(tempRef, vcRef, injector) {
802
+ super();
803
+ this.tempRef = tempRef;
804
+ this.vcRef = vcRef;
805
+ this.getInjected = injector.get.bind(injector);
806
+ }
807
+ ngOnChanges() {
808
+ this.vcRef.clear();
809
+ this.vcRef.createEmbeddedView(this.tempRef, {
810
+ $implicit: this.data,
811
+ index: 0,
812
+ });
813
+ }
814
+ ngOnDestroy() {
815
+ this.vcRef.clear();
816
+ }
817
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PropDataDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); }
818
+ static { thisdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.1", type: PropDataDirective, selector: "[abpPropData]", inputs: { propList: ["abpPropDataFromList", "propList"], record: ["abpPropDataWithRecord", "record"], index: ["abpPropDataAtIndex", "index"] }, exportAs: ["abpPropData"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
819
+ }
820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PropDataDirective, decorators: [{
821
+ type: Directive,
822
+ args: [{
823
+ exportAs: 'abpPropData',
824
+ selector: '[abpPropData]',
825
+ }]
826
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.Injector }]; }, propDecorators: { propList: [{
827
+ type: Input,
828
+ args: ['abpPropDataFromList']
829
+ }], record: [{
830
+ type: Input,
831
+ args: ['abpPropDataWithRecord']
832
+ }], index: [{
833
+ type: Input,
834
+ args: ['abpPropDataAtIndex']
832
835
  }] } });
833
836
 
834
- class ExtensibleFormComponent {
835
- constructor(cdRef, track, container, extensions, identifier) {
836
- this.cdRef = cdRef;
837
- this.track = track;
838
- this.container = container;
839
- this.extensions = extensions;
840
- this.identifier = identifier;
841
- this.extraPropertiesKey = EXTRA_PROPERTIES_KEY;
842
- }
843
- set selectedRecord(record) {
844
- const type = !record || JSON.stringify(record) === '{}' ? 'create' : 'edit';
845
- const propList = this.extensions[`${type}FormProps`].get(this.identifier).props;
846
- this.groupedPropList = this.createGroupedList(propList);
847
- this.record = record;
848
- }
849
- createGroupedList(propList) {
850
- const groupedFormPropList = new GroupedFormPropList();
851
- propList.forEach(item => {
852
- groupedFormPropList.addItem(item.value);
853
- });
854
- return groupedFormPropList;
855
- }
856
- get form() {
857
- return (this.container ? this.container.control : { controls: {} });
858
- }
859
- get extraProperties() {
860
- return (this.form.controls.extraProperties || { controls: {} });
861
- }
862
- }
863
- ExtensibleFormComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExtensibleFormComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TrackByService }, { token: i2.ControlContainer }, { token: ExtensionsService }, { token: EXTENSIONS_IDENTIFIER }], target: i0.ɵɵFactoryTarget.Component });
864
- ExtensibleFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: { selectedRecord: "selectedRecord" }, viewQueries: [{ propertyName: "formProps", predicate: ExtensibleFormPropComponent, descendants: true }], exportAs: ["abpExtensibleForm"], ngImport: i0, template: "<ng-container *ngIf=\"form\">\r\n\r\n <ng-container *ngFor=\"let groupedProp of groupedPropList.items\">\r\n <ng-container *abpPropData=\"let data; fromList: groupedProp.formPropList; withRecord: record\">\r\n\r\n <div *ngIf=\"groupedProp.group?.className; else withoutClassName\"\r\n [class]=\"groupedProp.group?.className\" [attr.data-name]=\"groupedProp.group?.className\">\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </div>\r\n\r\n <ng-template #withoutClassName>\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n\r\n </ng-container>\r\n</ng-container>\r\n\r\n\r\n<ng-template let-groupedProp=\"groupedProp\" let-data=\"data\" #propListTemplate>\r\n <ng-container *ngFor=\"let prop of groupedProp.formPropList; let first = first; trackBy: track.by('name')\">\r\n <ng-container *ngIf=\"prop.visible(data)\">\r\n <ng-container\r\n [formGroupName]=\"extraPropertiesKey\"\r\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\r\n >\r\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"\r\n [class]=\"prop.className\">\r\n </abp-extensible-form-prop>\r\n </ng-container>\r\n\r\n <ng-template #tempDefault>\r\n <abp-extensible-form-prop\r\n [class]=\"prop.className\"\r\n *ngIf=\"form.get(prop.name)\"\r\n [prop]=\"prop\"\r\n [data]=\"data\"\r\n [first]=\"first\"\r\n ></abp-extensible-form-prop>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: ["data", "prop", "first"] }, { kind: "directive", type: PropDataDirective, selector: "[abpPropData]", inputs: ["abpPropDataFromList", "abpPropDataWithRecord", "abpPropDataAtIndex"], exportAs: ["abpPropData"] }], viewProviders: [
865
- {
866
- provide: ControlContainer,
867
- useFactory: selfFactory,
868
- deps: [[new Optional(), new SkipSelf(), ControlContainer]],
869
- },
870
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
871
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExtensibleFormComponent, decorators: [{
872
- type: Component,
873
- args: [{ exportAs: 'abpExtensibleForm', selector: 'abp-extensible-form', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
874
- {
875
- provide: ControlContainer,
876
- useFactory: selfFactory,
877
- deps: [[new Optional(), new SkipSelf(), ControlContainer]],
878
- },
879
- ], template: "<ng-container *ngIf=\"form\">\r\n\r\n <ng-container *ngFor=\"let groupedProp of groupedPropList.items\">\r\n <ng-container *abpPropData=\"let data; fromList: groupedProp.formPropList; withRecord: record\">\r\n\r\n <div *ngIf=\"groupedProp.group?.className; else withoutClassName\"\r\n [class]=\"groupedProp.group?.className\" [attr.data-name]=\"groupedProp.group?.className\">\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </div>\r\n\r\n <ng-template #withoutClassName>\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n\r\n </ng-container>\r\n</ng-container>\r\n\r\n\r\n<ng-template let-groupedProp=\"groupedProp\" let-data=\"data\" #propListTemplate>\r\n <ng-container *ngFor=\"let prop of groupedProp.formPropList; let first = first; trackBy: track.by('name')\">\r\n <ng-container *ngIf=\"prop.visible(data)\">\r\n <ng-container\r\n [formGroupName]=\"extraPropertiesKey\"\r\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\r\n >\r\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"\r\n [class]=\"prop.className\">\r\n </abp-extensible-form-prop>\r\n </ng-container>\r\n\r\n <ng-template #tempDefault>\r\n <abp-extensible-form-prop\r\n [class]=\"prop.className\"\r\n *ngIf=\"form.get(prop.name)\"\r\n [prop]=\"prop\"\r\n [data]=\"data\"\r\n [first]=\"first\"\r\n ></abp-extensible-form-prop>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n" }]
880
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i2.ControlContainer }, { type: ExtensionsService }, { type: undefined, decorators: [{
881
- type: Inject,
882
- args: [EXTENSIONS_IDENTIFIER]
883
- }] }]; }, propDecorators: { formProps: [{
884
- type: ViewChildren,
885
- args: [ExtensibleFormPropComponent]
886
- }], selectedRecord: [{
887
- type: Input
837
+ class ExtensibleFormComponent {
838
+ set selectedRecord(record) {
839
+ const type = !record || JSON.stringify(record) === '{}' ? 'create' : 'edit';
840
+ const propList = this.extensions[`${type}FormProps`].get(this.identifier).props;
841
+ this.groupedPropList = this.createGroupedList(propList);
842
+ this.record = record;
843
+ }
844
+ createGroupedList(propList) {
845
+ const groupedFormPropList = new GroupedFormPropList();
846
+ propList.forEach(item => {
847
+ groupedFormPropList.addItem(item.value);
848
+ });
849
+ return groupedFormPropList;
850
+ }
851
+ get form() {
852
+ return (this.container ? this.container.control : { controls: {} });
853
+ }
854
+ get extraProperties() {
855
+ return (this.form.controls.extraProperties || { controls: {} });
856
+ }
857
+ constructor(cdRef, track, container, extensions, identifier) {
858
+ this.cdRef = cdRef;
859
+ this.track = track;
860
+ this.container = container;
861
+ this.extensions = extensions;
862
+ this.identifier = identifier;
863
+ this.extraPropertiesKey = EXTRA_PROPERTIES_KEY;
864
+ }
865
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensibleFormComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TrackByService }, { token: i2.ControlContainer }, { token: ExtensionsService }, { token: EXTENSIONS_IDENTIFIER }], target: i0.ɵɵFactoryTarget.Component }); }
866
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: { selectedRecord: "selectedRecord" }, viewQueries: [{ propertyName: "formProps", predicate: ExtensibleFormPropComponent, descendants: true }], exportAs: ["abpExtensibleForm"], ngImport: i0, template: "<ng-container *ngIf=\"form\">\r\n\r\n <ng-container *ngFor=\"let groupedProp of groupedPropList.items\">\r\n <ng-container *abpPropData=\"let data; fromList: groupedProp.formPropList; withRecord: record\">\r\n\r\n <div *ngIf=\"groupedProp.group?.className; else withoutClassName\"\r\n [class]=\"groupedProp.group?.className\" [attr.data-name]=\"groupedProp.group?.className\">\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </div>\r\n\r\n <ng-template #withoutClassName>\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n\r\n </ng-container>\r\n</ng-container>\r\n\r\n\r\n<ng-template let-groupedProp=\"groupedProp\" let-data=\"data\" #propListTemplate>\r\n <ng-container *ngFor=\"let prop of groupedProp.formPropList; let first = first; trackBy: track.by('name')\">\r\n <ng-container *ngIf=\"prop.visible(data)\">\r\n <ng-container\r\n [formGroupName]=\"extraPropertiesKey\"\r\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\r\n >\r\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"\r\n [class]=\"prop.className\">\r\n </abp-extensible-form-prop>\r\n </ng-container>\r\n\r\n <ng-template #tempDefault>\r\n <abp-extensible-form-prop\r\n [class]=\"prop.className\"\r\n *ngIf=\"form.get(prop.name)\"\r\n [prop]=\"prop\"\r\n [data]=\"data\"\r\n [first]=\"first\"\r\n ></abp-extensible-form-prop>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: ["data", "prop", "first"] }, { kind: "directive", type: PropDataDirective, selector: "[abpPropData]", inputs: ["abpPropDataFromList", "abpPropDataWithRecord", "abpPropDataAtIndex"], exportAs: ["abpPropData"] }], viewProviders: [
867
+ {
868
+ provide: ControlContainer,
869
+ useFactory: selfFactory,
870
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
871
+ },
872
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
873
+ }
874
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensibleFormComponent, decorators: [{
875
+ type: Component,
876
+ args: [{ exportAs: 'abpExtensibleForm', selector: 'abp-extensible-form', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
877
+ {
878
+ provide: ControlContainer,
879
+ useFactory: selfFactory,
880
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
881
+ },
882
+ ], template: "<ng-container *ngIf=\"form\">\r\n\r\n <ng-container *ngFor=\"let groupedProp of groupedPropList.items\">\r\n <ng-container *abpPropData=\"let data; fromList: groupedProp.formPropList; withRecord: record\">\r\n\r\n <div *ngIf=\"groupedProp.group?.className; else withoutClassName\"\r\n [class]=\"groupedProp.group?.className\" [attr.data-name]=\"groupedProp.group?.className\">\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </div>\r\n\r\n <ng-template #withoutClassName>\r\n <ng-container [ngTemplateOutlet]=\"propListTemplate\" [ngTemplateOutletContext]=\"{groupedProp:groupedProp,data:data}\">\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n\r\n </ng-container>\r\n</ng-container>\r\n\r\n\r\n<ng-template let-groupedProp=\"groupedProp\" let-data=\"data\" #propListTemplate>\r\n <ng-container *ngFor=\"let prop of groupedProp.formPropList; let first = first; trackBy: track.by('name')\">\r\n <ng-container *ngIf=\"prop.visible(data)\">\r\n <ng-container\r\n [formGroupName]=\"extraPropertiesKey\"\r\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\r\n >\r\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"\r\n [class]=\"prop.className\">\r\n </abp-extensible-form-prop>\r\n </ng-container>\r\n\r\n <ng-template #tempDefault>\r\n <abp-extensible-form-prop\r\n [class]=\"prop.className\"\r\n *ngIf=\"form.get(prop.name)\"\r\n [prop]=\"prop\"\r\n [data]=\"data\"\r\n [first]=\"first\"\r\n ></abp-extensible-form-prop>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n" }]
883
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i2.ControlContainer }, { type: ExtensionsService }, { type: undefined, decorators: [{
884
+ type: Inject,
885
+ args: [EXTENSIONS_IDENTIFIER]
886
+ }] }]; }, propDecorators: { formProps: [{
887
+ type: ViewChildren,
888
+ args: [ExtensibleFormPropComponent]
889
+ }], selectedRecord: [{
890
+ type: Input
888
891
  }] } });
889
892
 
890
- // Fix for https://github.com/angular/angular/issues/23904
891
- // @dynamic
892
- class AbstractActionsComponent extends ActionData {
893
- constructor(injector) {
894
- super();
895
- this.getInjected = injector.get.bind(injector);
896
- const extensions = injector.get(ExtensionsService);
897
- const name = injector.get(EXTENSIONS_IDENTIFIER);
898
- const type = injector.get(EXTENSIONS_ACTION_TYPE);
899
- this.actionList = extensions[type].get(name).actions;
900
- }
901
- }
902
- AbstractActionsComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractActionsComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
903
- AbstractActionsComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: AbstractActionsComponent, inputs: { record: "record" }, usesInheritance: true, ngImport: i0 });
904
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractActionsComponent, decorators: [{
905
- type: Directive
906
- }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { record: [{
907
- type: Input
893
+ // Fix for https://github.com/angular/angular/issues/23904
894
+ // @dynamic
895
+ class AbstractActionsComponent extends ActionData {
896
+ constructor(injector) {
897
+ super();
898
+ this.getInjected = injector.get.bind(injector);
899
+ const extensions = injector.get(ExtensionsService);
900
+ const name = injector.get(EXTENSIONS_IDENTIFIER);
901
+ const type = injector.get(EXTENSIONS_ACTION_TYPE);
902
+ this.actionList = extensions[type].get(name).actions;
903
+ }
904
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AbstractActionsComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); }
905
+ static { thisdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.1", type: AbstractActionsComponent, inputs: { record: "record" }, usesInheritance: true, ngImport: i0 }); }
906
+ }
907
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AbstractActionsComponent, decorators: [{
908
+ type: Directive
909
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { record: [{
910
+ type: Input
908
911
  }] } });
909
912
 
910
- class GridActionsComponent extends AbstractActionsComponent {
911
- constructor(injector) {
912
- super(injector);
913
- this.icon = 'fa fa-cog';
914
- this.text = '';
915
- this.trackByFn = (_, item) => item.text;
916
- }
917
- }
918
- GridActionsComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: GridActionsComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
919
- GridActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: GridActionsComponent, selector: "abp-grid-actions", inputs: { icon: "icon", index: "index", text: "text" }, providers: [
920
- {
921
- provide: EXTENSIONS_ACTION_TYPE,
922
- useValue: 'entityActions',
923
- },
924
- ], exportAs: ["abpGridActions"], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"actionList.length > 1\" ngbDropdown container=\"body\" class=\"d-inline-block\">\r\n <button\r\n class=\"btn btn-primary btn-sm dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n ngbDropdownToggle\r\n >\r\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <ng-container\r\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-container\r\n *ngIf=\"actionList.length === 1\"\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n></ng-container>\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n ngbDropdownItem\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\r\n <ng-template #ellipsis>\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n class=\"btn btn-primary text-center\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i4$2.EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }, { kind: "directive", type: i4$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i4$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i4$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i4$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
925
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: GridActionsComponent, decorators: [{
926
- type: Component,
927
- args: [{ exportAs: 'abpGridActions', selector: 'abp-grid-actions', providers: [
928
- {
929
- provide: EXTENSIONS_ACTION_TYPE,
930
- useValue: 'entityActions',
931
- },
932
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"actionList.length > 1\" ngbDropdown container=\"body\" class=\"d-inline-block\">\r\n <button\r\n class=\"btn btn-primary btn-sm dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n ngbDropdownToggle\r\n >\r\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <ng-container\r\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-container\r\n *ngIf=\"actionList.length === 1\"\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n></ng-container>\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n ngbDropdownItem\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\r\n <ng-template #ellipsis>\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n class=\"btn btn-primary text-center\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n" }]
933
- }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { icon: [{
934
- type: Input
935
- }], index: [{
936
- type: Input
937
- }], text: [{
938
- type: Input
913
+ class GridActionsComponent extends AbstractActionsComponent {
914
+ constructor(injector) {
915
+ super(injector);
916
+ this.icon = 'fa fa-cog';
917
+ this.text = '';
918
+ this.trackByFn = (_, item) => item.text;
919
+ }
920
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: GridActionsComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
921
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: GridActionsComponent, selector: "abp-grid-actions", inputs: { icon: "icon", index: "index", text: "text" }, providers: [
922
+ {
923
+ provide: EXTENSIONS_ACTION_TYPE,
924
+ useValue: 'entityActions',
925
+ },
926
+ ], exportAs: ["abpGridActions"], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"actionList.length > 1\" ngbDropdown container=\"body\" class=\"d-inline-block\">\r\n <button\r\n class=\"btn btn-primary btn-sm dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n ngbDropdownToggle\r\n >\r\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <ng-container\r\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-container\r\n *ngIf=\"actionList.length === 1\"\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n></ng-container>\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n ngbDropdownItem\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\r\n <ng-template #ellipsis>\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n class=\"btn btn-primary text-center\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i4$2.EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }, { kind: "directive", type: i4$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i4$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i4$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i4$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
927
+ }
928
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: GridActionsComponent, decorators: [{
929
+ type: Component,
930
+ args: [{ exportAs: 'abpGridActions', selector: 'abp-grid-actions', providers: [
931
+ {
932
+ provide: EXTENSIONS_ACTION_TYPE,
933
+ useValue: 'entityActions',
934
+ },
935
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"actionList.length > 1\" ngbDropdown container=\"body\" class=\"d-inline-block\">\r\n <button\r\n class=\"btn btn-primary btn-sm dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n aria-haspopup=\"true\"\r\n ngbDropdownToggle\r\n >\r\n <i [ngClass]=\"icon\" [class.me-1]=\"icon\"></i>{{ text | abpLocalization }}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <ng-container\r\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\r\n [ngTemplateOutlet]=\"dropDownBtnItemTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n >\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-container\r\n *ngIf=\"actionList.length === 1\"\r\n [ngTemplateOutlet]=\"btnTmp\"\r\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\r\n></ng-container>\r\n\r\n<ng-template #dropDownBtnItemTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n ngbDropdownItem\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #buttonContentTmp let-action>\r\n <i [ngClass]=\"action.icon\" [class.me-1]=\"action.icon\"></i>\r\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\r\n <ng-template #ellipsis>\r\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\r\n </ng-template>\r\n</ng-template>\r\n\r\n<ng-template #btnTmp let-action>\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <button\r\n *abpPermission=\"action.permission; runChangeDetection: false\"\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n class=\"btn btn-primary text-center\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"buttonContentTmp; context: { $implicit: action }\"\r\n ></ng-container>\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n" }]
936
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { icon: [{
937
+ type: Input
938
+ }], index: [{
939
+ type: Input
940
+ }], text: [{
941
+ type: Input
939
942
  }] } });
940
943
 
941
- const DEFAULT_ACTIONS_COLUMN_WIDTH = 150;
942
- class ExtensibleTableComponent {
943
- constructor(locale, config, injector) {
944
- this.locale = locale;
945
- this.config = config;
946
- this.injector = injector;
947
- this.tableActivate = new EventEmitter();
948
- this.trackByFn = (_, item) => item.name;
949
- this.entityPropTypeClasses = injector.get(ENTITY_PROP_TYPE_CLASSES);
950
- this.getInjected = injector.get.bind(injector);
951
- const extensions = injector.get(ExtensionsService);
952
- const name = injector.get(EXTENSIONS_IDENTIFIER);
953
- this.propList = extensions.entityProps.get(name).props;
954
- this.actionList = extensions['entityActions'].get(name)
955
- .actions;
956
- const permissionService = injector.get(PermissionService);
957
- this.hasAtLeastOnePermittedAction =
958
- permissionService.filterItemsByPolicy(this.actionList.toArray().map(action => ({ requiredPolicy: action.permission }))).length > 0;
959
- this.setColumnWidths(DEFAULT_ACTIONS_COLUMN_WIDTH);
960
- }
961
- set actionsText(value) {
962
- this._actionsText = value;
963
- }
964
- get actionsText() {
965
- return this._actionsText ?? (this.actionList.length > 1 ? 'AbpUi::Actions' : '');
966
- }
967
- set actionsColumnWidth(width) {
968
- this.setColumnWidths(width ? Number(width) : undefined);
969
- }
970
- setColumnWidths(actionsColumn) {
971
- const widths = [actionsColumn];
972
- this.propList.forEach(({ value: prop }) => {
973
- widths.push(prop.columnWidth);
974
- });
975
- this.columnWidths = widths;
976
- }
977
- getDate(value, format) {
978
- return value && format ? formatDate(value, format, this.locale) : '';
979
- }
980
- getIcon(value) {
981
- return value
982
- ? '<div class="text-success"><i class="fa fa-check"></i></div>'
983
- : '<div class="text-danger"><i class="fa fa-times"></i></div>';
984
- }
985
- getEnum(rowValue, list) {
986
- if (!list)
987
- return rowValue;
988
- const { key } = list.find(({ value }) => value === rowValue) || {};
989
- return key;
990
- }
991
- getContent(prop, data) {
992
- return prop.valueResolver(data).pipe(map(value => {
993
- switch (prop.type) {
994
- case "boolean" /* ePropType.Boolean */:
995
- return this.getIcon(value);
996
- case "date" /* ePropType.Date */:
997
- return this.getDate(value, getShortDateFormat(this.config));
998
- case "time" /* ePropType.Time */:
999
- return this.getDate(value, getShortTimeFormat(this.config));
1000
- case "datetime" /* ePropType.DateTime */:
1001
- return this.getDate(value, getShortDateShortTimeFormat(this.config));
1002
- case "enum" /* ePropType.Enum */:
1003
- return this.getEnum(value, prop.enumList || []);
1004
- default:
1005
- return value;
1006
- // More types can be handled in the future
1007
- }
1008
- }));
1009
- }
1010
- ngOnChanges({ data }) {
1011
- if (!data?.currentValue)
1012
- return;
1013
- this.data = data.currentValue.map((record, index) => {
1014
- this.propList.forEach(prop => {
1015
- const propData = { getInjected: this.getInjected, record, index };
1016
- const value = this.getContent(prop.value, propData);
1017
- const propKey = `_${prop.value.name}`;
1018
- record[propKey] = {
1019
- visible: prop.value.visible(propData),
1020
- value,
1021
- };
1022
- if (prop.value.component) {
1023
- const injector = Injector.create({
1024
- providers: [
1025
- {
1026
- provide: PROP_DATA_STREAM,
1027
- useValue: value,
1028
- },
1029
- ],
1030
- parent: this.injector,
1031
- });
1032
- record[propKey].injector = injector;
1033
- record[propKey].component = prop.value.component;
1034
- }
1035
- });
1036
- return record;
1037
- });
1038
- }
1039
- }
1040
- ExtensibleTableComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExtensibleTableComponent, deps: [{ token: LOCALE_ID }, { token: i1.ConfigStateService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1041
- ExtensibleTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate" }, outputs: { tableActivate: "tableActivate" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n>\r\n <ngx-datatable-column\r\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0]\"\r\n [width]=\"columnWidths[0]\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\r\n <ngx-datatable-column\r\n [width]=\"columnWidths[i + 1] || 200\"\r\n [name]=\"prop.displayName | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n <ng-container *ngIf=\"row['_' + prop.name]?.visible\">\r\n <div\r\n *ngIf=\"!row['_' + prop.name].component; else component\"\r\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n </ng-container>\r\n <ng-template #component>\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ng-container>\r\n</ngx-datatable>\r\n", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i3$1.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i3$1.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i3$1.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i4$2.NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { kind: "directive", type: i4$2.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "component", type: GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1042
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ExtensibleTableComponent, decorators: [{
1043
- type: Component,
1044
- args: [{ exportAs: 'abpExtensibleTable', selector: 'abp-extensible-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n>\r\n <ngx-datatable-column\r\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0]\"\r\n [width]=\"columnWidths[0]\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\r\n <ngx-datatable-column\r\n [width]=\"columnWidths[i + 1] || 200\"\r\n [name]=\"prop.displayName | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n <ng-container *ngIf=\"row['_' + prop.name]?.visible\">\r\n <div\r\n *ngIf=\"!row['_' + prop.name].component; else component\"\r\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n </ng-container>\r\n <ng-template #component>\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ng-container>\r\n</ngx-datatable>\r\n" }]
1045
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1046
- type: Inject,
1047
- args: [LOCALE_ID]
1048
- }] }, { type: i1.ConfigStateService }, { type: i0.Injector }]; }, propDecorators: { actionsText: [{
1049
- type: Input
1050
- }], data: [{
1051
- type: Input
1052
- }], list: [{
1053
- type: Input
1054
- }], recordsTotal: [{
1055
- type: Input
1056
- }], actionsColumnWidth: [{
1057
- type: Input
1058
- }], actionsTemplate: [{
1059
- type: Input
1060
- }], tableActivate: [{
1061
- type: Output
944
+ const DEFAULT_ACTIONS_COLUMN_WIDTH = 150;
945
+ class ExtensibleTableComponent {
946
+ set actionsText(value) {
947
+ this._actionsText = value;
948
+ }
949
+ get actionsText() {
950
+ return this._actionsText ?? (this.actionList.length > 1 ? 'AbpUi::Actions' : '');
951
+ }
952
+ set actionsColumnWidth(width) {
953
+ this.setColumnWidths(width ? Number(width) : undefined);
954
+ }
955
+ constructor(locale, config, injector) {
956
+ this.locale = locale;
957
+ this.config = config;
958
+ this.injector = injector;
959
+ this.tableActivate = new EventEmitter();
960
+ this.trackByFn = (_, item) => item.name;
961
+ this.entityPropTypeClasses = injector.get(ENTITY_PROP_TYPE_CLASSES);
962
+ this.getInjected = injector.get.bind(injector);
963
+ const extensions = injector.get(ExtensionsService);
964
+ const name = injector.get(EXTENSIONS_IDENTIFIER);
965
+ this.propList = extensions.entityProps.get(name).props;
966
+ this.actionList = extensions['entityActions'].get(name)
967
+ .actions;
968
+ const permissionService = injector.get(PermissionService);
969
+ this.hasAtLeastOnePermittedAction =
970
+ permissionService.filterItemsByPolicy(this.actionList.toArray().map(action => ({ requiredPolicy: action.permission }))).length > 0;
971
+ this.setColumnWidths(DEFAULT_ACTIONS_COLUMN_WIDTH);
972
+ }
973
+ setColumnWidths(actionsColumn) {
974
+ const widths = [actionsColumn];
975
+ this.propList.forEach(({ value: prop }) => {
976
+ widths.push(prop.columnWidth);
977
+ });
978
+ this.columnWidths = widths;
979
+ }
980
+ getDate(value, format) {
981
+ return value && format ? formatDate(value, format, this.locale) : '';
982
+ }
983
+ getIcon(value) {
984
+ return value
985
+ ? '<div class="text-success"><i class="fa fa-check" aria-hidden="true"></i></div>'
986
+ : '<div class="text-danger"><i class="fa fa-times" aria-hidden="true"></i></div>';
987
+ }
988
+ getEnum(rowValue, list) {
989
+ if (!list)
990
+ return rowValue;
991
+ const { key } = list.find(({ value }) => value === rowValue) || {};
992
+ return key;
993
+ }
994
+ getContent(prop, data) {
995
+ return prop.valueResolver(data).pipe(map(value => {
996
+ switch (prop.type) {
997
+ case "boolean" /* ePropType.Boolean */:
998
+ return this.getIcon(value);
999
+ case "date" /* ePropType.Date */:
1000
+ return this.getDate(value, getShortDateFormat(this.config));
1001
+ case "time" /* ePropType.Time */:
1002
+ return this.getDate(value, getShortTimeFormat(this.config));
1003
+ case "datetime" /* ePropType.DateTime */:
1004
+ return this.getDate(value, getShortDateShortTimeFormat(this.config));
1005
+ case "enum" /* ePropType.Enum */:
1006
+ return this.getEnum(value, prop.enumList || []);
1007
+ default:
1008
+ return value;
1009
+ // More types can be handled in the future
1010
+ }
1011
+ }));
1012
+ }
1013
+ ngOnChanges({ data }) {
1014
+ if (!data?.currentValue)
1015
+ return;
1016
+ this.data = data.currentValue.map((record, index) => {
1017
+ this.propList.forEach(prop => {
1018
+ const propData = { getInjected: this.getInjected, record, index };
1019
+ const value = this.getContent(prop.value, propData);
1020
+ const propKey = `_${prop.value.name}`;
1021
+ record[propKey] = {
1022
+ visible: prop.value.visible(propData),
1023
+ value,
1024
+ };
1025
+ if (prop.value.component) {
1026
+ const injector = Injector.create({
1027
+ providers: [
1028
+ {
1029
+ provide: PROP_DATA_STREAM,
1030
+ useValue: value,
1031
+ },
1032
+ ],
1033
+ parent: this.injector,
1034
+ });
1035
+ record[propKey].injector = injector;
1036
+ record[propKey].component = prop.value.component;
1037
+ }
1038
+ });
1039
+ return record;
1040
+ });
1041
+ }
1042
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensibleTableComponent, deps: [{ token: LOCALE_ID }, { token: i1.ConfigStateService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1043
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate" }, outputs: { tableActivate: "tableActivate" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n>\r\n <ngx-datatable-column\r\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0]\"\r\n [width]=\"columnWidths[0]\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\r\n <ngx-datatable-column\r\n [width]=\"columnWidths[i + 1] || 200\"\r\n [name]=\"prop.displayName | abpLocalization \"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template ngx-datatable-header-template let-column=\"column\" >\r\n <span \r\n *ngIf=\"prop.tooltip; else elseBlock\"\r\n [ngbTooltip]=\"prop.tooltip | abpLocalization\" \r\n container=\"body\"\r\n >\r\n {{column.name}} <i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i>\r\n </span>\r\n <ng-template #elseBlock>\r\n {{column.name}}\r\n </ng-template>\r\n </ng-template>\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n <ng-container *ngIf=\"row['_' + prop.name]?.visible\">\r\n <div\r\n *ngIf=\"!row['_' + prop.name].component; else component\"\r\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n </ng-container>\r\n <ng-template #component>\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ng-container>\r\n</ngx-datatable>\r\n", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i3$1.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i3$1.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i3$1.DataTableColumnHeaderDirective, selector: "[ngx-datatable-header-template]" }, { kind: "directive", type: i3$1.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i4$2.NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { kind: "directive", type: i4$2.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i4$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1044
+ }
1045
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensibleTableComponent, decorators: [{
1046
+ type: Component,
1047
+ args: [{ exportAs: 'abpExtensibleTable', selector: 'abp-extensible-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n>\r\n <ngx-datatable-column\r\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0]\"\r\n [width]=\"columnWidths[0]\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\r\n <ngx-datatable-column\r\n [width]=\"columnWidths[i + 1] || 200\"\r\n [name]=\"prop.displayName | abpLocalization \"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template ngx-datatable-header-template let-column=\"column\" >\r\n <span \r\n *ngIf=\"prop.tooltip; else elseBlock\"\r\n [ngbTooltip]=\"prop.tooltip | abpLocalization\" \r\n container=\"body\"\r\n >\r\n {{column.name}} <i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i>\r\n </span>\r\n <ng-template #elseBlock>\r\n {{column.name}}\r\n </ng-template>\r\n </ng-template>\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n <ng-container *ngIf=\"row['_' + prop.name]?.visible\">\r\n <div\r\n *ngIf=\"!row['_' + prop.name].component; else component\"\r\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n </ng-container>\r\n <ng-template #component>\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ng-container>\r\n</ngx-datatable>\r\n" }]
1048
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1049
+ type: Inject,
1050
+ args: [LOCALE_ID]
1051
+ }] }, { type: i1.ConfigStateService }, { type: i0.Injector }]; }, propDecorators: { actionsText: [{
1052
+ type: Input
1053
+ }], data: [{
1054
+ type: Input
1055
+ }], list: [{
1056
+ type: Input
1057
+ }], recordsTotal: [{
1058
+ type: Input
1059
+ }], actionsColumnWidth: [{
1060
+ type: Input
1061
+ }], actionsTemplate: [{
1062
+ type: Input
1063
+ }], tableActivate: [{
1064
+ type: Output
1062
1065
  }] } });
1063
1066
 
1064
- class CreateInjectorPipe {
1065
- transform(_, action, context) {
1066
- const get = (token, notFoundValue, options) => {
1067
- const componentData = context.getData();
1068
- const componentDataCallback = (data) => {
1069
- data = data ?? context.getData();
1070
- return action.action(data);
1071
- };
1072
- let extensionData;
1073
- switch (token) {
1074
- case EXTENSIONS_ACTION_DATA:
1075
- extensionData = componentData;
1076
- break;
1077
- case EXTENSIONS_ACTION_CALLBACK:
1078
- extensionData = componentDataCallback;
1079
- break;
1080
- default:
1081
- extensionData = context.getInjected.call(context.injector, token, notFoundValue, options);
1082
- }
1083
- return extensionData;
1084
- };
1085
- return { get };
1086
- }
1087
- }
1088
- CreateInjectorPipefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateInjectorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1089
- CreateInjectorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: CreateInjectorPipe, name: "createInjector" });
1090
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CreateInjectorPipe, decorators: [{
1091
- type: Pipe,
1092
- args: [{
1093
- name: 'createInjector',
1094
- }]
1067
+ class CreateInjectorPipe {
1068
+ transform(_, action, context) {
1069
+ const get = (token, notFoundValue, options) => {
1070
+ const componentData = context.getData();
1071
+ const componentDataCallback = (data) => {
1072
+ data = data ?? context.getData();
1073
+ return action.action(data);
1074
+ };
1075
+ let extensionData;
1076
+ switch (token) {
1077
+ case EXTENSIONS_ACTION_DATA:
1078
+ extensionData = componentData;
1079
+ break;
1080
+ case EXTENSIONS_ACTION_CALLBACK:
1081
+ extensionData = componentDataCallback;
1082
+ break;
1083
+ default:
1084
+ extensionData = context.getInjected.call(context.injector, token, notFoundValue, options);
1085
+ }
1086
+ return extensionData;
1087
+ };
1088
+ return { get };
1089
+ }
1090
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CreateInjectorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1091
+ static { thispipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: CreateInjectorPipe, name: "createInjector" }); }
1092
+ }
1093
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CreateInjectorPipe, decorators: [{
1094
+ type: Pipe,
1095
+ args: [{
1096
+ name: 'createInjector',
1097
+ }]
1095
1098
  }] });
1096
1099
 
1097
- class PageToolbarComponent extends AbstractActionsComponent {
1098
- constructor(injector) {
1099
- super(injector);
1100
- this.injector = injector;
1101
- this.defaultBtnClass = 'btn btn-sm btn-primary';
1102
- this.getData = () => this.data;
1103
- this.trackByFn = (_, item) => item.action || item.component;
1104
- }
1105
- asToolbarAction(value) {
1106
- return {
1107
- value: value,
1108
- };
1109
- }
1110
- }
1111
- PageToolbarComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PageToolbarComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1112
- PageToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PageToolbarComponent, selector: "abp-page-toolbar", providers: [
1113
- {
1114
- provide: EXTENSIONS_ACTION_TYPE,
1115
- useValue: 'toolbarActions',
1116
- },
1117
- ], exportAs: ["abpPageToolbar"], usesInheritance: true, ngImport: i0, template: "<div class=\"row justify-content-end mx-0 gap-2\" id=\"AbpContentToolbar\">\r\n <div\r\n class=\"col-auto px-0 pt-0 \"\r\n [class.pe-0]=\"last\"\r\n *ngFor=\"let action of actionList; trackBy: trackByFn; let last = last\"\r\n >\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <ng-container *abpPermission=\"action.permission;runChangeDetection: false\">\r\n <ng-container *ngIf=\"action.component as component; else button\">\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: record | createInjector: action:this\"\r\n ></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #button>\r\n <ng-container *ngIf=\"asToolbarAction(action).value as toolbarAction\">\r\n <button\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [ngClass]=\"toolbarAction.btnClass ? toolbarAction.btnClass : defaultBtnClass\"\r\n class=\"d-inline-flex align-items-center gap-1\"\r\n >\r\n <i [ngClass]=\"toolbarAction.icon\" [class.me-1]=\"toolbarAction.icon\"></i>\r\n {{ toolbarAction.text | abpLocalization }}\r\n </button>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: CreateInjectorPipe, name: "createInjector" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PageToolbarComponent, decorators: [{
1119
- type: Component,
1120
- args: [{ exportAs: 'abpPageToolbar', selector: 'abp-page-toolbar', providers: [
1121
- {
1122
- provide: EXTENSIONS_ACTION_TYPE,
1123
- useValue: 'toolbarActions',
1124
- },
1125
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row justify-content-end mx-0 gap-2\" id=\"AbpContentToolbar\">\r\n <div\r\n class=\"col-auto px-0 pt-0 \"\r\n [class.pe-0]=\"last\"\r\n *ngFor=\"let action of actionList; trackBy: trackByFn; let last = last\"\r\n >\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <ng-container *abpPermission=\"action.permission;runChangeDetection: false\">\r\n <ng-container *ngIf=\"action.component as component; else button\">\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: record | createInjector: action:this\"\r\n ></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #button>\r\n <ng-container *ngIf=\"asToolbarAction(action).value as toolbarAction\">\r\n <button\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [ngClass]=\"toolbarAction.btnClass ? toolbarAction.btnClass : defaultBtnClass\"\r\n class=\"d-inline-flex align-items-center gap-1\"\r\n >\r\n <i [ngClass]=\"toolbarAction.icon\" [class.me-1]=\"toolbarAction.icon\"></i>\r\n {{ toolbarAction.text | abpLocalization }}\r\n </button>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n" }]
1100
+ class PageToolbarComponent extends AbstractActionsComponent {
1101
+ constructor(injector) {
1102
+ super(injector);
1103
+ this.injector = injector;
1104
+ this.defaultBtnClass = 'btn btn-sm btn-primary';
1105
+ this.getData = () => this.data;
1106
+ this.trackByFn = (_, item) => item.action || item.component;
1107
+ }
1108
+ asToolbarAction(value) {
1109
+ return {
1110
+ value: value,
1111
+ };
1112
+ }
1113
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PageToolbarComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1114
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: PageToolbarComponent, selector: "abp-page-toolbar", providers: [
1115
+ {
1116
+ provide: EXTENSIONS_ACTION_TYPE,
1117
+ useValue: 'toolbarActions',
1118
+ },
1119
+ ], exportAs: ["abpPageToolbar"], usesInheritance: true, ngImport: i0, template: "<div class=\"row justify-content-end mx-0 gap-2\" id=\"AbpContentToolbar\">\r\n <div\r\n class=\"col-auto px-0 pt-0 \"\r\n [class.pe-0]=\"last\"\r\n *ngFor=\"let action of actionList; trackBy: trackByFn; let last = last\"\r\n >\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <ng-container *abpPermission=\"action.permission;runChangeDetection: false\">\r\n <ng-container *ngIf=\"action.component as component; else button\">\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: record | createInjector: action:this\"\r\n ></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #button>\r\n <ng-container *ngIf=\"asToolbarAction(action).value as toolbarAction\">\r\n <button\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [ngClass]=\"toolbarAction.btnClass ? toolbarAction.btnClass : defaultBtnClass\"\r\n class=\"d-inline-flex align-items-center gap-1\"\r\n >\r\n <i [ngClass]=\"toolbarAction.icon\" [class.me-1]=\"toolbarAction.icon\"></i>\r\n {{ toolbarAction.text | abpLocalization }}\r\n </button>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: CreateInjectorPipe, name: "createInjector" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1120
+ }
1121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PageToolbarComponent, decorators: [{
1122
+ type: Component,
1123
+ args: [{ exportAs: 'abpPageToolbar', selector: 'abp-page-toolbar', providers: [
1124
+ {
1125
+ provide: EXTENSIONS_ACTION_TYPE,
1126
+ useValue: 'toolbarActions',
1127
+ },
1128
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row justify-content-end mx-0 gap-2\" id=\"AbpContentToolbar\">\r\n <div\r\n class=\"col-auto px-0 pt-0 \"\r\n [class.pe-0]=\"last\"\r\n *ngFor=\"let action of actionList; trackBy: trackByFn; let last = last\"\r\n >\r\n <ng-container *ngIf=\"action.visible(data)\">\r\n <ng-container *abpPermission=\"action.permission;runChangeDetection: false\">\r\n <ng-container *ngIf=\"action.component as component; else button\">\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: record | createInjector: action:this\"\r\n ></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #button>\r\n <ng-container *ngIf=\"asToolbarAction(action).value as toolbarAction\">\r\n <button\r\n (click)=\"action.action(data)\"\r\n type=\"button\"\r\n [ngClass]=\"toolbarAction.btnClass ? toolbarAction.btnClass : defaultBtnClass\"\r\n class=\"d-inline-flex align-items-center gap-1\"\r\n >\r\n <i [ngClass]=\"toolbarAction.icon\" [class.me-1]=\"toolbarAction.icon\"></i>\r\n {{ toolbarAction.text | abpLocalization }}\r\n </button>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n" }]
1126
1129
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
1127
1130
 
1128
1131
  var objectExtensions = /*#__PURE__*/Object.freeze({
@@ -1131,327 +1134,333 @@ var objectExtensions = /*#__PURE__*/Object.freeze({
1131
1134
 
1132
1135
  const EXTENSIBLE_FORM_VIEW_PROVIDER = { provide: ControlContainer, useExisting: FormGroupDirective };
1133
1136
 
1134
- class BaseUiExtensionsModule {
1135
- }
1136
- BaseUiExtensionsModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseUiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1137
- BaseUiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: BaseUiExtensionsModule, declarations: [DateTimePickerComponent,
1138
- PageToolbarComponent,
1139
- GridActionsComponent,
1140
- ExtensibleFormPropComponent,
1141
- ExtensibleFormComponent,
1142
- ExtensibleTableComponent,
1143
- PropDataDirective,
1144
- DisabledDirective,
1145
- CreateInjectorPipe], imports: [CoreModule,
1146
- ThemeSharedModule,
1147
- NgxValidateCoreModule,
1148
- NgbDatepickerModule,
1149
- NgbDropdownModule,
1150
- NgbTimepickerModule,
1151
- NgbTypeaheadModule], exports: [DateTimePickerComponent,
1152
- PageToolbarComponent,
1153
- GridActionsComponent,
1154
- ExtensibleFormComponent,
1155
- ExtensibleTableComponent,
1156
- PropDataDirective,
1157
- DisabledDirective,
1158
- CreateInjectorPipe] });
1159
- BaseUiExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseUiExtensionsModule, imports: [CoreModule,
1160
- ThemeSharedModule,
1161
- NgxValidateCoreModule,
1162
- NgbDatepickerModule,
1163
- NgbDropdownModule,
1164
- NgbTimepickerModule,
1165
- NgbTypeaheadModule] });
1166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseUiExtensionsModule, decorators: [{
1167
- type: NgModule,
1168
- args: [{
1169
- exports: [
1170
- DateTimePickerComponent,
1171
- PageToolbarComponent,
1172
- GridActionsComponent,
1173
- ExtensibleFormComponent,
1174
- ExtensibleTableComponent,
1175
- PropDataDirective,
1176
- DisabledDirective,
1177
- CreateInjectorPipe,
1178
- ],
1179
- declarations: [
1180
- DateTimePickerComponent,
1181
- PageToolbarComponent,
1182
- GridActionsComponent,
1183
- ExtensibleFormPropComponent,
1184
- ExtensibleFormComponent,
1185
- ExtensibleTableComponent,
1186
- PropDataDirective,
1187
- DisabledDirective,
1188
- CreateInjectorPipe,
1189
- ],
1190
- imports: [
1191
- CoreModule,
1192
- ThemeSharedModule,
1193
- NgxValidateCoreModule,
1194
- NgbDatepickerModule,
1195
- NgbDropdownModule,
1196
- NgbTimepickerModule,
1197
- NgbTypeaheadModule,
1198
- ],
1199
- }]
1200
- }] });
1201
- class UiExtensionsModule {
1202
- }
1203
- UiExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1204
- UiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule], exports: [BaseUiExtensionsModule] });
1205
- UiExtensionsModuleinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule, BaseUiExtensionsModule] });
1206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UiExtensionsModule, decorators: [{
1207
- type: NgModule,
1208
- args: [{
1209
- exports: [BaseUiExtensionsModule],
1210
- imports: [BaseUiExtensionsModule],
1211
- }]
1137
+ class BaseUiExtensionsModule {
1138
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: BaseUiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1139
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: BaseUiExtensionsModule, declarations: [DateTimePickerComponent,
1140
+ PageToolbarComponent,
1141
+ GridActionsComponent,
1142
+ ExtensibleFormPropComponent,
1143
+ ExtensibleFormComponent,
1144
+ ExtensibleTableComponent,
1145
+ PropDataDirective,
1146
+ DisabledDirective,
1147
+ CreateInjectorPipe], imports: [CoreModule,
1148
+ ThemeSharedModule,
1149
+ NgxValidateCoreModule,
1150
+ NgbDatepickerModule,
1151
+ NgbDropdownModule,
1152
+ NgbTimepickerModule,
1153
+ NgbTypeaheadModule,
1154
+ NgbTooltipModule], exports: [DateTimePickerComponent,
1155
+ PageToolbarComponent,
1156
+ GridActionsComponent,
1157
+ ExtensibleFormComponent,
1158
+ ExtensibleTableComponent,
1159
+ PropDataDirective,
1160
+ DisabledDirective,
1161
+ CreateInjectorPipe] }); }
1162
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: BaseUiExtensionsModule, imports: [CoreModule,
1163
+ ThemeSharedModule,
1164
+ NgxValidateCoreModule,
1165
+ NgbDatepickerModule,
1166
+ NgbDropdownModule,
1167
+ NgbTimepickerModule,
1168
+ NgbTypeaheadModule,
1169
+ NgbTooltipModule] }); }
1170
+ }
1171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: BaseUiExtensionsModule, decorators: [{
1172
+ type: NgModule,
1173
+ args: [{
1174
+ exports: [
1175
+ DateTimePickerComponent,
1176
+ PageToolbarComponent,
1177
+ GridActionsComponent,
1178
+ ExtensibleFormComponent,
1179
+ ExtensibleTableComponent,
1180
+ PropDataDirective,
1181
+ DisabledDirective,
1182
+ CreateInjectorPipe,
1183
+ ],
1184
+ declarations: [
1185
+ DateTimePickerComponent,
1186
+ PageToolbarComponent,
1187
+ GridActionsComponent,
1188
+ ExtensibleFormPropComponent,
1189
+ ExtensibleFormComponent,
1190
+ ExtensibleTableComponent,
1191
+ PropDataDirective,
1192
+ DisabledDirective,
1193
+ CreateInjectorPipe,
1194
+ ],
1195
+ imports: [
1196
+ CoreModule,
1197
+ ThemeSharedModule,
1198
+ NgxValidateCoreModule,
1199
+ NgbDatepickerModule,
1200
+ NgbDropdownModule,
1201
+ NgbTimepickerModule,
1202
+ NgbTypeaheadModule,
1203
+ NgbTooltipModule
1204
+ ],
1205
+ }]
1206
+ }] });
1207
+ class UiExtensionsModule {
1208
+ static { thisfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1209
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule], exports: [BaseUiExtensionsModule] }); }
1210
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule, BaseUiExtensionsModule] }); }
1211
+ }
1212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UiExtensionsModule, decorators: [{
1213
+ type: NgModule,
1214
+ args: [{
1215
+ exports: [BaseUiExtensionsModule],
1216
+ imports: [BaseUiExtensionsModule],
1217
+ }]
1212
1218
  }] });
1213
1219
 
1214
- function mergeWithDefaultActions(extension, defaultActions, ...contributors) {
1215
- Object.keys(defaultActions).forEach((name) => {
1216
- const actions = extension.get(name);
1217
- actions.clearContributors();
1218
- actions.addContributor((actionList) => actionList.addManyTail(defaultActions[name]));
1219
- contributors.forEach(contributor => (contributor[name] || []).forEach((callback) => actions.addContributor(callback)));
1220
- });
1220
+ function mergeWithDefaultActions(extension, defaultActions, ...contributors) {
1221
+ Object.keys(defaultActions).forEach((name) => {
1222
+ const actions = extension.get(name);
1223
+ actions.clearContributors();
1224
+ actions.addContributor((actionList) => actionList.addManyTail(defaultActions[name]));
1225
+ contributors.forEach(contributor => (contributor[name] || []).forEach((callback) => actions.addContributor(callback)));
1226
+ });
1221
1227
  }
1222
1228
 
1223
- function generateFormFromProps(data) {
1224
- const extensions = data.getInjected((ExtensionsService));
1225
- const identifier = data.getInjected(EXTENSIONS_IDENTIFIER);
1226
- const form = new UntypedFormGroup({});
1227
- const extraForm = new UntypedFormGroup({});
1228
- form.addControl(EXTRA_PROPERTIES_KEY, extraForm);
1229
- const record = data.record || {};
1230
- const type = JSON.stringify(record) === '{}' ? 'create' : 'edit';
1231
- const props = extensions[`${type}FormProps`].get(identifier).props;
1232
- const extraProperties = record[EXTRA_PROPERTIES_KEY] || {};
1233
- props.forEach(({ value: prop }) => {
1234
- const name = prop.name;
1235
- const isExtraProperty = prop.isExtra || name in extraProperties;
1236
- let value = isExtraProperty ? extraProperties[name] : name in record ? record[name] : undefined;
1237
- if (typeof value === 'undefined')
1238
- value = prop.defaultValue;
1239
- if (value) {
1240
- let adapter;
1241
- switch (prop.type) {
1242
- case "date" /* ePropType.Date */:
1243
- adapter = new DateAdapter();
1244
- value = adapter.toModel(adapter.fromModel(value));
1245
- break;
1246
- case "time" /* ePropType.Time */:
1247
- adapter = new TimeAdapter();
1248
- value = adapter.toModel(adapter.fromModel(value));
1249
- break;
1250
- case "datetime" /* ePropType.DateTime */:
1251
- adapter = new DateTimeAdapter();
1252
- value = adapter.toModel(adapter.fromModel(value));
1253
- break;
1254
- default:
1255
- break;
1256
- }
1257
- }
1258
- const formControl = new UntypedFormControl(value, {
1259
- asyncValidators: prop.asyncValidators(data),
1260
- validators: prop.validators(data),
1261
- });
1262
- (isExtraProperty ? extraForm : form).addControl(name, formControl);
1263
- });
1264
- return form;
1229
+ function generateFormFromProps(data) {
1230
+ const extensions = data.getInjected((ExtensionsService));
1231
+ const identifier = data.getInjected(EXTENSIONS_IDENTIFIER);
1232
+ const form = new UntypedFormGroup({});
1233
+ const extraForm = new UntypedFormGroup({});
1234
+ form.addControl(EXTRA_PROPERTIES_KEY, extraForm);
1235
+ const record = data.record || {};
1236
+ const type = JSON.stringify(record) === '{}' ? 'create' : 'edit';
1237
+ const props = extensions[`${type}FormProps`].get(identifier).props;
1238
+ const extraProperties = record[EXTRA_PROPERTIES_KEY] || {};
1239
+ props.forEach(({ value: prop }) => {
1240
+ const name = prop.name;
1241
+ const isExtraProperty = prop.isExtra || name in extraProperties;
1242
+ let value = isExtraProperty ? extraProperties[name] : name in record ? record[name] : undefined;
1243
+ if (typeof value === 'undefined')
1244
+ value = prop.defaultValue;
1245
+ if (value) {
1246
+ let adapter;
1247
+ switch (prop.type) {
1248
+ case "date" /* ePropType.Date */:
1249
+ adapter = new DateAdapter();
1250
+ value = adapter.toModel(adapter.fromModel(value));
1251
+ break;
1252
+ case "time" /* ePropType.Time */:
1253
+ adapter = new TimeAdapter();
1254
+ value = adapter.toModel(adapter.fromModel(value));
1255
+ break;
1256
+ case "datetime" /* ePropType.DateTime */:
1257
+ adapter = new DateTimeAdapter();
1258
+ value = adapter.toModel(adapter.fromModel(value));
1259
+ break;
1260
+ default:
1261
+ break;
1262
+ }
1263
+ }
1264
+ const formControl = new UntypedFormControl(value, {
1265
+ asyncValidators: prop.asyncValidators(data),
1266
+ validators: prop.validators(data),
1267
+ });
1268
+ (isExtraProperty ? extraForm : form).addControl(name, formControl);
1269
+ });
1270
+ return form;
1265
1271
  }
1266
1272
 
1267
- function createExtraPropertyValueResolver(name) {
1268
- return (data) => of(data.record[EXTRA_PROPERTIES_KEY][name]);
1269
- }
1270
- function mergeWithDefaultProps(extension, defaultProps, ...contributors) {
1271
- Object.keys(defaultProps).forEach((name) => {
1272
- const props = extension.get(name);
1273
- props.clearContributors();
1274
- props.addContributor((propList) => propList.addManyTail(defaultProps[name]));
1275
- contributors.forEach(contributor => (contributor[name] || []).forEach((callback) => props.addContributor(callback)));
1276
- });
1273
+ function createExtraPropertyValueResolver(name) {
1274
+ return (data) => of(data.record[EXTRA_PROPERTIES_KEY][name]);
1275
+ }
1276
+ function mergeWithDefaultProps(extension, defaultProps, ...contributors) {
1277
+ Object.keys(defaultProps).forEach((name) => {
1278
+ const props = extension.get(name);
1279
+ props.clearContributors();
1280
+ props.addContributor((propList) => propList.addManyTail(defaultProps[name]));
1281
+ contributors.forEach(contributor => (contributor[name] || []).forEach((callback) => props.addContributor(callback)));
1282
+ });
1277
1283
  }
1278
1284
 
1279
- function createEnum(members) {
1280
- const enumObject = {};
1281
- members.forEach(({ name = '', value }) => {
1282
- enumObject[(enumObject[name] = value)] = name;
1283
- });
1284
- return enumObject;
1285
- }
1286
- function createEnumValueResolver(enumType, lookupEnum, propName) {
1287
- return data => {
1288
- const value = data.record[EXTRA_PROPERTIES_KEY][propName];
1289
- const key = lookupEnum.transformed[value];
1290
- const l10n = data.getInjected(LocalizationService);
1291
- const localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
1292
- return createLocalizationStream(l10n, localizeEnum(key));
1293
- };
1294
- }
1295
- function createEnumOptions(enumType, lookupEnum) {
1296
- return data => {
1297
- const l10n = data.getInjected(LocalizationService);
1298
- const localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
1299
- return createLocalizationStream(l10n, lookupEnum.fields.map(({ name = '', value }) => ({
1300
- key: localizeEnum(name),
1301
- value,
1302
- })));
1303
- };
1304
- }
1305
- function createLocalizationStream(l10n, mapTarget) {
1306
- return merge(of(null), l10n.languageChange$).pipe(map(() => mapTarget));
1307
- }
1308
- function createEnumLocalizer(l10n, enumType, lookupEnum) {
1309
- const resource = lookupEnum.localizationResource;
1310
- const shortType = getShortEnumType(enumType);
1311
- return key => l10n.localizeWithFallbackSync([resource || ''], ['Enum:' + shortType + '.' + key, shortType + '.' + key, key], key);
1312
- }
1313
- function getShortEnumType(enumType) {
1314
- return enumType.split('.').pop();
1285
+ function createEnum(members) {
1286
+ const enumObject = {};
1287
+ members.forEach(({ name = '', value }) => {
1288
+ enumObject[(enumObject[name] = value)] = name;
1289
+ });
1290
+ return enumObject;
1291
+ }
1292
+ function createEnumValueResolver(enumType, lookupEnum, propName) {
1293
+ return data => {
1294
+ const value = data.record[EXTRA_PROPERTIES_KEY][propName];
1295
+ const key = lookupEnum.transformed[value];
1296
+ const l10n = data.getInjected(LocalizationService);
1297
+ const localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
1298
+ return createLocalizationStream(l10n, localizeEnum(key));
1299
+ };
1300
+ }
1301
+ function createEnumOptions(enumType, lookupEnum) {
1302
+ return data => {
1303
+ const l10n = data.getInjected(LocalizationService);
1304
+ const localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
1305
+ return createLocalizationStream(l10n, lookupEnum.fields.map(({ name = '', value }) => ({
1306
+ key: localizeEnum(name),
1307
+ value,
1308
+ })));
1309
+ };
1310
+ }
1311
+ function createLocalizationStream(l10n, mapTarget) {
1312
+ return merge(of(null), l10n.languageChange$).pipe(map(() => mapTarget));
1313
+ }
1314
+ function createEnumLocalizer(l10n, enumType, lookupEnum) {
1315
+ const resource = lookupEnum.localizationResource;
1316
+ const shortType = getShortEnumType(enumType);
1317
+ return key => l10n.localizeWithFallbackSync([resource || ''], ['Enum:' + shortType + '.' + key, shortType + '.' + key, key], key);
1318
+ }
1319
+ function getShortEnumType(enumType) {
1320
+ return enumType.split('.').pop();
1315
1321
  }
1316
1322
 
1317
- function createDisplayNameLocalizationPipeKeyGenerator(localization) {
1318
- const generateLocalizationPipeKey = createLocalizationPipeKeyGenerator(localization);
1319
- return (displayName, fallback) => {
1320
- if (displayName && displayName.name)
1321
- return generateLocalizationPipeKey([displayName.resource || ''], [displayName.name], displayName.name);
1322
- const key = generateLocalizationPipeKey([fallback.resource || ''], ['DisplayName:' + fallback.name], undefined);
1323
- if (key)
1324
- return key;
1325
- return generateLocalizationPipeKey([fallback.resource || ''], [fallback.name || ''], fallback.name);
1326
- };
1323
+ function createDisplayNameLocalizationPipeKeyGenerator(localization) {
1324
+ const generateLocalizationPipeKey = createLocalizationPipeKeyGenerator(localization);
1325
+ return (displayName, fallback) => {
1326
+ if (displayName && displayName.name)
1327
+ return generateLocalizationPipeKey([displayName.resource || ''], [displayName.name], displayName.name);
1328
+ const key = generateLocalizationPipeKey([fallback.resource || ''], ['DisplayName:' + fallback.name], undefined);
1329
+ if (key)
1330
+ return key;
1331
+ return generateLocalizationPipeKey([fallback.resource || ''], [fallback.name || ''], fallback.name);
1332
+ };
1327
1333
  }
1328
1334
 
1329
- function getValidatorsFromProperty(property) {
1330
- const validators = [];
1331
- property.attributes.forEach(attr => {
1332
- if (attr.typeSimple && attr.typeSimple in AbpValidators) {
1333
- validators.push(AbpValidators[attr.typeSimple](attr.config));
1334
- }
1335
- });
1336
- return validators;
1335
+ function getValidatorsFromProperty(property) {
1336
+ const validators = [];
1337
+ property.attributes.forEach(attr => {
1338
+ if (attr.typeSimple && attr.typeSimple in AbpValidators) {
1339
+ validators.push(AbpValidators[attr.typeSimple](attr.config));
1340
+ }
1341
+ });
1342
+ return validators;
1337
1343
  }
1338
1344
 
1339
- function selectObjectExtensions(configState) {
1340
- return configState.getOne$('objectExtensions');
1341
- }
1342
- function selectLocalization(configState) {
1343
- return configState.getOne$('localization');
1344
- }
1345
- function selectEnums(configState) {
1346
- return selectObjectExtensions(configState).pipe(map((extensions) => Object.keys(extensions.enums).reduce((acc, key) => {
1347
- const { fields, localizationResource } = extensions.enums[key];
1348
- acc[key] = {
1349
- fields,
1350
- localizationResource,
1351
- transformed: createEnum(fields),
1352
- };
1353
- return acc;
1354
- }, {})));
1355
- }
1356
- function getObjectExtensionEntitiesFromStore(configState, moduleKey) {
1357
- return selectObjectExtensions(configState).pipe(map(extensions => {
1358
- if (!extensions)
1359
- return null;
1360
- return (extensions.modules[moduleKey] || {})
1361
- .entities;
1362
- }), map(entities => (isUndefined(entities) ? {} : entities)), filter(Boolean), take(1));
1363
- }
1364
- function mapEntitiesToContributors(configState, resource) {
1365
- return pipe(switchMap((entities) => zip(selectLocalization(configState), selectEnums(configState)).pipe(map(([localization, enums]) => {
1366
- const generateDisplayName = createDisplayNameLocalizationPipeKeyGenerator(localization);
1367
- return Object.keys(entities).reduce((acc, key) => {
1368
- acc.prop[key] = [];
1369
- acc.createForm[key] = [];
1370
- acc.editForm[key] = [];
1371
- const entity = entities[key];
1372
- if (!entity)
1373
- return acc;
1374
- const properties = entity.properties;
1375
- if (!properties)
1376
- return acc;
1377
- const mapPropertiesToContributors = createPropertiesToContributorsMapper(generateDisplayName, resource, enums);
1378
- return mapPropertiesToContributors(properties, acc, key);
1379
- }, {
1380
- prop: {},
1381
- createForm: {},
1382
- editForm: {},
1383
- });
1384
- }))), take(1));
1385
- }
1386
- function createPropertiesToContributorsMapper(generateDisplayName, resource, enums) {
1387
- return (properties, contributors, key) => {
1388
- const isExtra = true;
1389
- const generateTypeaheadDisplayName = createTypeaheadDisplayNameGenerator(generateDisplayName, properties);
1390
- Object.keys(properties).forEach((name) => {
1391
- const property = properties[name];
1392
- const propName = name;
1393
- const lookup = property.ui.lookup || {};
1394
- const type = getTypeaheadType(lookup, name) || getTypeFromProperty(property);
1395
- const generateDN = hasTypeaheadTextSuffix(name)
1396
- ? generateTypeaheadDisplayName
1397
- : generateDisplayName;
1398
- const displayName = generateDN(property.displayName, { name, resource });
1399
- if (property.ui.onTable.isVisible) {
1400
- const sortable = Boolean(property.ui.onTable.isSortable);
1401
- const columnWidth = type === "boolean" /* ePropType.Boolean */ ? 150 : 250;
1402
- const valueResolver = type === "enum" /* ePropType.Enum */ && property.type
1403
- ? createEnumValueResolver(property.type, enums[property.type], propName)
1404
- : createExtraPropertyValueResolver(propName);
1405
- const entityProp = new EntityProp({
1406
- type,
1407
- name: propName,
1408
- displayName,
1409
- sortable,
1410
- columnWidth,
1411
- valueResolver,
1412
- isExtra,
1413
- });
1414
- const contributor = (propList) => propList.addTail(entityProp);
1415
- contributors.prop[key].push(contributor);
1416
- }
1417
- const isOnCreateForm = property.ui.onCreateForm.isVisible;
1418
- const isOnEditForm = property.ui.onEditForm.isVisible;
1419
- if (isOnCreateForm || isOnEditForm) {
1420
- const defaultValue = property.defaultValue;
1421
- const validators = () => getValidatorsFromProperty(property);
1422
- let options;
1423
- if (type === "enum" /* ePropType.Enum */)
1424
- options = createEnumOptions(propName, enums[property.type || '']);
1425
- else if (type === "typeahead" /* ePropType.Typeahead */)
1426
- options = createTypeaheadOptions(lookup);
1427
- const formProp = new FormProp({
1428
- type,
1429
- name: propName,
1430
- displayName,
1431
- options,
1432
- defaultValue,
1433
- validators,
1434
- isExtra,
1435
- });
1436
- const formContributor = (propList) => propList.addTail(formProp);
1437
- if (isOnCreateForm)
1438
- contributors.createForm[key].push(formContributor);
1439
- if (isOnEditForm)
1440
- contributors.editForm[key].push(formContributor);
1441
- }
1442
- });
1443
- return contributors;
1444
- };
1445
- }
1446
- function getTypeFromProperty(property) {
1447
- return property?.typeSimple?.replace(/\?$/, '');
1448
- }
1449
- function isUndefined(obj) {
1450
- return typeof obj === 'undefined';
1345
+ function selectObjectExtensions(configState) {
1346
+ return configState.getOne$('objectExtensions');
1347
+ }
1348
+ function selectLocalization(configState) {
1349
+ return configState.getOne$('localization');
1350
+ }
1351
+ function selectEnums(configState) {
1352
+ return selectObjectExtensions(configState).pipe(map((extensions) => Object.keys(extensions.enums).reduce((acc, key) => {
1353
+ const { fields, localizationResource } = extensions.enums[key];
1354
+ acc[key] = {
1355
+ fields,
1356
+ localizationResource,
1357
+ transformed: createEnum(fields),
1358
+ };
1359
+ return acc;
1360
+ }, {})));
1361
+ }
1362
+ function getObjectExtensionEntitiesFromStore(configState, moduleKey) {
1363
+ return selectObjectExtensions(configState).pipe(map(extensions => {
1364
+ if (!extensions)
1365
+ return null;
1366
+ return (extensions.modules[moduleKey] || {})
1367
+ .entities;
1368
+ }), map(entities => (isUndefined(entities) ? {} : entities)), filter(Boolean), take(1));
1369
+ }
1370
+ function mapEntitiesToContributors(configState, resource) {
1371
+ return pipe(switchMap((entities) => zip(selectLocalization(configState), selectEnums(configState)).pipe(map(([localization, enums]) => {
1372
+ const generateDisplayName = createDisplayNameLocalizationPipeKeyGenerator(localization);
1373
+ return Object.keys(entities).reduce((acc, key) => {
1374
+ acc.prop[key] = [];
1375
+ acc.createForm[key] = [];
1376
+ acc.editForm[key] = [];
1377
+ const entity = entities[key];
1378
+ if (!entity)
1379
+ return acc;
1380
+ const properties = entity.properties;
1381
+ if (!properties)
1382
+ return acc;
1383
+ const mapPropertiesToContributors = createPropertiesToContributorsMapper(generateDisplayName, resource, enums);
1384
+ return mapPropertiesToContributors(properties, acc, key);
1385
+ }, {
1386
+ prop: {},
1387
+ createForm: {},
1388
+ editForm: {},
1389
+ });
1390
+ }))), take(1));
1391
+ }
1392
+ function createPropertiesToContributorsMapper(generateDisplayName, resource, enums) {
1393
+ return (properties, contributors, key) => {
1394
+ const isExtra = true;
1395
+ const generateTypeaheadDisplayName = createTypeaheadDisplayNameGenerator(generateDisplayName, properties);
1396
+ Object.keys(properties).forEach((name) => {
1397
+ const property = properties[name];
1398
+ const propName = name;
1399
+ const lookup = property.ui.lookup || {};
1400
+ const type = getTypeaheadType(lookup, name) || getTypeFromProperty(property);
1401
+ const generateDN = hasTypeaheadTextSuffix(name)
1402
+ ? generateTypeaheadDisplayName
1403
+ : generateDisplayName;
1404
+ const displayName = generateDN(property.displayName, { name, resource });
1405
+ if (property.ui.onTable.isVisible) {
1406
+ const sortable = Boolean(property.ui.onTable.isSortable);
1407
+ const columnWidth = type === "boolean" /* ePropType.Boolean */ ? 150 : 250;
1408
+ const valueResolver = type === "enum" /* ePropType.Enum */ &&
1409
+ property.type
1410
+ ? createEnumValueResolver(property.type, enums[property.type], propName)
1411
+ : createExtraPropertyValueResolver(propName);
1412
+ const entityProp = new EntityProp({
1413
+ type,
1414
+ name: propName,
1415
+ displayName,
1416
+ sortable,
1417
+ columnWidth,
1418
+ valueResolver,
1419
+ isExtra,
1420
+ });
1421
+ const contributor = (propList) => propList.addTail(entityProp);
1422
+ contributors.prop[key].push(contributor);
1423
+ }
1424
+ const isOnCreateForm = property.ui.onCreateForm.isVisible;
1425
+ const isOnEditForm = property.ui.onEditForm.isVisible;
1426
+ if (isOnCreateForm || isOnEditForm) {
1427
+ const defaultValue = property.defaultValue;
1428
+ const formText = property.formText;
1429
+ const validators = () => getValidatorsFromProperty(property);
1430
+ let options;
1431
+ if (type === "enum" /* ePropType.Enum */)
1432
+ options = createEnumOptions(propName, enums[property.type || '']);
1433
+ else if (type === "typeahead" /* ePropType.Typeahead */)
1434
+ options = createTypeaheadOptions(lookup);
1435
+ const formProp = new FormProp({
1436
+ type,
1437
+ name: propName,
1438
+ displayName,
1439
+ options,
1440
+ defaultValue,
1441
+ validators,
1442
+ isExtra,
1443
+ formText,
1444
+ });
1445
+ const formContributor = (propList) => propList.addTail(formProp);
1446
+ if (isOnCreateForm)
1447
+ contributors.createForm[key].push(formContributor);
1448
+ if (isOnEditForm)
1449
+ contributors.editForm[key].push(formContributor);
1450
+ }
1451
+ });
1452
+ return contributors;
1453
+ };
1454
+ }
1455
+ function getTypeFromProperty(property) {
1456
+ return property?.typeSimple?.replace(/\?$/, '');
1457
+ }
1458
+ function isUndefined(obj) {
1459
+ return typeof obj === 'undefined';
1451
1460
  }
1452
1461
 
1453
- /**
1454
- * Generated bundle index. Do not edit.
1462
+ /**
1463
+ * Generated bundle index. Do not edit.
1455
1464
  */
1456
1465
 
1457
1466
  export { ActionList, BaseUiExtensionsModule, CreateFormPropsFactory, CreateInjectorPipe, DateAdapter, DateTimeAdapter, DateTimePickerComponent, DisabledDirective, ENTITY_PROP_TYPE_CLASSES, EXTENSIBLE_FORM_VIEW_PROVIDER, EXTENSIONS_ACTION_CALLBACK, EXTENSIONS_ACTION_DATA, EXTENSIONS_ACTION_TYPE, EXTENSIONS_FORM_PROP, EXTENSIONS_FORM_PROP_DATA, EXTENSIONS_IDENTIFIER, EXTRA_PROPERTIES_KEY, EditFormPropsFactory, EntityAction, EntityActionList, EntityActions, EntityActionsFactory, EntityProp, EntityPropList, EntityProps, EntityPropsFactory, ExtensibleFormComponent, ExtensibleFormPropComponent, ExtensibleTableComponent, ExtensionsService, FormProp, FormPropData, FormPropList, FormProps, GridActionsComponent, objectExtensions as ObjectExtensions, PROP_DATA_STREAM, PageToolbarComponent, PropDataDirective, PropList, TimeAdapter, ToolbarAction, ToolbarActionList, ToolbarActions, ToolbarActionsFactory, ToolbarComponent, UiExtensionsModule, createExtraPropertyValueResolver, generateFormFromProps, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps };