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

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 (314) hide show
  1. package/{esm2020 → esm2022}/abp-ng.theme.shared.mjs +4 -4
  2. package/{esm2020 → esm2022}/extensions/abp-ng.theme.shared-extensions.mjs +4 -4
  3. package/esm2022/extensions/lib/adapters/date-time.adapter.mjs +45 -0
  4. package/esm2022/extensions/lib/adapters/date.adapter.mjs +42 -0
  5. package/esm2022/extensions/lib/adapters/time.adapter.mjs +37 -0
  6. package/esm2022/extensions/lib/components/abstract-actions/abstract-actions.component.mjs +26 -0
  7. package/esm2022/extensions/lib/components/date-time-picker/date-time-picker.component.mjs +110 -0
  8. package/esm2022/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +199 -0
  9. package/esm2022/extensions/lib/components/extensible-form/extensible-form.component.mjs +74 -0
  10. package/esm2022/extensions/lib/components/extensible-table/extensible-table.component.mjs +136 -0
  11. package/esm2022/extensions/lib/components/grid-actions/grid-actions.component.mjs +40 -0
  12. package/esm2022/extensions/lib/components/page-toolbar/page-toolbar.component.mjs +39 -0
  13. package/{esm2020 → esm2022}/extensions/lib/constants/extra-properties.mjs +1 -1
  14. package/esm2022/extensions/lib/directives/disabled.directive.mjs +30 -0
  15. package/esm2022/extensions/lib/directives/prop-data.directive.mjs +42 -0
  16. package/{esm2020 → esm2022}/extensions/lib/enums/components.mjs +1 -1
  17. package/{esm2020 → esm2022}/extensions/lib/enums/props.enum.mjs +1 -1
  18. package/{esm2020 → esm2022}/extensions/lib/models/actions.mjs +46 -46
  19. package/{esm2020 → esm2022}/extensions/lib/models/entity-actions.mjs +28 -28
  20. package/{esm2020 → esm2022}/extensions/lib/models/entity-props.mjs +42 -42
  21. package/esm2022/extensions/lib/models/form-props.mjs +76 -0
  22. package/{esm2020 → esm2022}/extensions/lib/models/internal/object-extensions.mjs +2 -2
  23. package/{esm2020 → esm2022}/extensions/lib/models/object-extensions.mjs +2 -2
  24. package/esm2022/extensions/lib/models/props.mjs +54 -0
  25. package/{esm2020 → esm2022}/extensions/lib/models/toolbar-actions.mjs +43 -43
  26. package/esm2022/extensions/lib/pipes/create-injector.pipe.mjs +37 -0
  27. package/esm2022/extensions/lib/services/extensions.service.mjs +25 -0
  28. package/{esm2020 → esm2022}/extensions/lib/tokens/extensible-form-view-provider.token.mjs +2 -2
  29. package/{esm2020 → esm2022}/extensions/lib/tokens/extensions.token.mjs +11 -11
  30. package/esm2022/extensions/lib/ui-extensions.module.mjs +97 -0
  31. package/{esm2020 → esm2022}/extensions/lib/utils/actions.util.mjs +8 -8
  32. package/{esm2020 → esm2022}/extensions/lib/utils/enum.util.mjs +41 -41
  33. package/{esm2020 → esm2022}/extensions/lib/utils/factory.util.mjs +3 -3
  34. package/esm2022/extensions/lib/utils/form-props.util.mjs +51 -0
  35. package/{esm2020 → esm2022}/extensions/lib/utils/localization.util.mjs +12 -12
  36. package/{esm2020 → esm2022}/extensions/lib/utils/props.util.mjs +13 -13
  37. package/esm2022/extensions/lib/utils/state.util.mjs +126 -0
  38. package/{esm2020 → esm2022}/extensions/lib/utils/typeahead.util.mjs +51 -51
  39. package/{esm2020 → esm2022}/extensions/lib/utils/validation.util.mjs +10 -10
  40. package/{esm2020 → esm2022}/extensions/public-api.mjs +30 -30
  41. package/{esm2020 → esm2022}/lib/animations/bounce.animations.mjs +16 -16
  42. package/{esm2020 → esm2022}/lib/animations/collapse.animations.mjs +49 -49
  43. package/{esm2020 → esm2022}/lib/animations/fade.animations.mjs +37 -37
  44. package/{esm2020 → esm2022}/lib/animations/index.mjs +6 -6
  45. package/{esm2020 → esm2022}/lib/animations/modal.animations.mjs +10 -10
  46. package/{esm2020 → esm2022}/lib/animations/slide.animations.mjs +7 -7
  47. package/{esm2020 → esm2022}/lib/animations/toast.animations.mjs +12 -12
  48. package/esm2022/lib/components/breadcrumb/breadcrumb.component.mjs +44 -0
  49. package/esm2022/lib/components/breadcrumb-items/breadcrumb-items.component.mjs +20 -0
  50. package/esm2022/lib/components/button/button.component.mjs +103 -0
  51. package/{esm2020 → esm2022}/lib/components/card/card-body.component.mjs +27 -26
  52. package/esm2022/lib/components/card/card-footer.component.mjs +31 -0
  53. package/esm2022/lib/components/card/card-header.component.mjs +31 -0
  54. package/esm2022/lib/components/card/card-header.directive.mjs +20 -0
  55. package/esm2022/lib/components/card/card-img-top.directive.mjs +20 -0
  56. package/esm2022/lib/components/card/card-subtitle.directive.mjs +20 -0
  57. package/esm2022/lib/components/card/card-title.directive.mjs +20 -0
  58. package/esm2022/lib/components/card/card.component.mjs +24 -0
  59. package/esm2022/lib/components/card/card.module.mjs +50 -0
  60. package/{esm2020 → esm2022}/lib/components/card/index.mjs +9 -9
  61. package/esm2022/lib/components/checkbox/checkbox.component.mjs +89 -0
  62. package/esm2022/lib/components/confirmation/confirmation.component.mjs +46 -0
  63. package/esm2022/lib/components/form-input/form-input.component.mjs +95 -0
  64. package/esm2022/lib/components/http-error-wrapper/http-error-wrapper.component.mjs +60 -0
  65. package/{esm2020 → esm2022}/lib/components/index.mjs +16 -16
  66. package/esm2022/lib/components/loader-bar/loader-bar.component.mjs +122 -0
  67. package/esm2022/lib/components/loading/loading.component.mjs +20 -0
  68. package/esm2022/lib/components/modal/modal-close.directive.mjs +28 -0
  69. package/esm2022/lib/components/modal/modal-ref.service.mjs +27 -0
  70. package/esm2022/lib/components/modal/modal.component.mjs +190 -0
  71. package/esm2022/lib/components/password/password.component.mjs +39 -0
  72. package/esm2022/lib/components/toast/toast.component.mjs +56 -0
  73. package/esm2022/lib/components/toast-container/toast-container.component.mjs +59 -0
  74. package/{esm2020 → esm2022}/lib/constants/styles.mjs +1 -1
  75. package/{esm2020 → esm2022}/lib/constants/validation.mjs +19 -19
  76. package/esm2022/lib/directives/ellipsis.directive.mjs +65 -0
  77. package/{esm2020 → esm2022}/lib/directives/index.mjs +5 -5
  78. package/esm2022/lib/directives/loading.directive.mjs +90 -0
  79. package/esm2022/lib/directives/ngx-datatable-default.directive.mjs +76 -0
  80. package/esm2022/lib/directives/ngx-datatable-list.directive.mjs +95 -0
  81. package/esm2022/lib/directives/visible.directive.mjs +63 -0
  82. package/{esm2020 → esm2022}/lib/enums/form.mjs +5 -5
  83. package/{esm2020 → esm2022}/lib/enums/index.mjs +2 -2
  84. package/{esm2020 → esm2022}/lib/enums/route-names.mjs +1 -1
  85. package/esm2022/lib/handlers/document-dir.handler.mjs +32 -0
  86. package/esm2022/lib/handlers/error.handler.mjs +294 -0
  87. package/{esm2020 → esm2022}/lib/handlers/index.mjs +2 -2
  88. package/{esm2020 → esm2022}/lib/models/common.mjs +1 -1
  89. package/{esm2020 → esm2022}/lib/models/confirmation.mjs +9 -9
  90. package/{esm2020 → esm2022}/lib/models/index.mjs +7 -7
  91. package/{esm2020 → esm2022}/lib/models/nav-item.mjs +5 -5
  92. package/{esm2020 → esm2022}/lib/models/statistics.mjs +1 -1
  93. package/{esm2020 → esm2022}/lib/models/toaster.mjs +1 -1
  94. package/{esm2020 → esm2022}/lib/models/user-menu.mjs +3 -3
  95. package/{esm2020 → esm2022}/lib/models/validation.mjs +1 -1
  96. package/{esm2020 → esm2022}/lib/providers/index.mjs +2 -2
  97. package/{esm2020 → esm2022}/lib/providers/ng-bootstrap-config.provider.mjs +16 -16
  98. package/{esm2020 → esm2022}/lib/providers/route.provider.mjs +17 -17
  99. package/{esm2020 → esm2022}/lib/services/abstract-menu.service.mjs +49 -49
  100. package/esm2022/lib/services/confirmation.service.mjs +69 -0
  101. package/{esm2020 → esm2022}/lib/services/index.mjs +5 -5
  102. package/esm2022/lib/services/nav-items.service.mjs +18 -0
  103. package/esm2022/lib/services/page-alert.service.mjs +29 -0
  104. package/esm2022/lib/services/toaster.service.mjs +104 -0
  105. package/esm2022/lib/services/user-menu.service.mjs +18 -0
  106. package/esm2022/lib/theme-shared.module.mjs +202 -0
  107. package/{esm2020 → esm2022}/lib/tokens/append-content.token.mjs +10 -10
  108. package/{esm2020 → esm2022}/lib/tokens/confirmation-icons.token.mjs +10 -10
  109. package/{esm2020 → esm2022}/lib/tokens/http-error.token.mjs +13 -13
  110. package/{esm2020 → esm2022}/lib/tokens/index.mjs +4 -4
  111. package/{esm2020 → esm2022}/lib/tokens/ngx-datatable-messages.token.mjs +7 -7
  112. package/{esm2020 → esm2022}/lib/tokens/suppress-unsaved-changes-warning.token.mjs +2 -2
  113. package/esm2022/lib/utils/date-parser-formatter.mjs +59 -0
  114. package/{esm2020 → esm2022}/lib/utils/index.mjs +2 -2
  115. package/{esm2020 → esm2022}/lib/utils/validation-utils.mjs +61 -61
  116. package/{esm2020 → esm2022}/public-api.mjs +15 -15
  117. package/{esm2020 → esm2022}/testing/abp-ng.theme.shared-testing.mjs +4 -4
  118. package/{esm2020 → esm2022}/testing/lib/models/config.mjs +1 -1
  119. package/{esm2020 → esm2022}/testing/lib/models/index.mjs +1 -1
  120. package/esm2022/testing/lib/theme-shared-testing.module.mjs +47 -0
  121. package/{esm2020 → esm2022}/testing/public-api.mjs +3 -3
  122. package/extensions/index.d.ts +5 -5
  123. package/extensions/lib/adapters/date-time.adapter.d.ts +11 -11
  124. package/extensions/lib/adapters/date.adapter.d.ts +9 -9
  125. package/extensions/lib/adapters/time.adapter.d.ts +8 -8
  126. package/extensions/lib/components/abstract-actions/abstract-actions.component.d.ts +12 -12
  127. package/extensions/lib/components/date-time-picker/date-time-picker.component.d.ts +16 -16
  128. package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +43 -43
  129. package/extensions/lib/components/extensible-form/extensible-form.component.d.ts +25 -25
  130. package/extensions/lib/components/extensible-table/extensible-table.component.d.ts +38 -38
  131. package/extensions/lib/components/grid-actions/grid-actions.component.d.ts +13 -13
  132. package/extensions/lib/components/page-toolbar/page-toolbar.component.d.ts +20 -20
  133. package/extensions/lib/constants/extra-properties.d.ts +1 -1
  134. package/extensions/lib/directives/disabled.directive.d.ts +11 -11
  135. package/extensions/lib/directives/prop-data.directive.d.ts +19 -19
  136. package/extensions/lib/enums/components.d.ts +3 -3
  137. package/extensions/lib/enums/props.enum.d.ts +16 -16
  138. package/extensions/lib/models/actions.d.ts +36 -36
  139. package/extensions/lib/models/entity-actions.d.ts +22 -22
  140. package/extensions/lib/models/entity-props.d.ts +29 -29
  141. package/extensions/lib/models/form-props.d.ts +59 -58
  142. package/extensions/lib/models/internal/object-extensions.d.ts +86 -85
  143. package/extensions/lib/models/object-extensions.d.ts +2 -2
  144. package/extensions/lib/models/props.d.ts +45 -44
  145. package/extensions/lib/models/toolbar-actions.d.ts +38 -38
  146. package/extensions/lib/pipes/create-injector.pipe.d.ts +8 -8
  147. package/extensions/lib/services/extensions.service.d.ts +14 -14
  148. package/extensions/lib/tokens/extensible-form-view-provider.token.d.ts +5 -5
  149. package/extensions/lib/tokens/extensions.token.d.ts +20 -24
  150. package/extensions/lib/ui-extensions.module.d.ts +24 -24
  151. package/extensions/lib/utils/actions.util.d.ts +7 -7
  152. package/extensions/lib/utils/enum.util.d.ts +7 -7
  153. package/extensions/lib/utils/factory.util.d.ts +1 -1
  154. package/extensions/lib/utils/form-props.util.d.ts +3 -3
  155. package/extensions/lib/utils/localization.util.d.ts +3 -3
  156. package/extensions/lib/utils/props.util.d.ts +9 -9
  157. package/extensions/lib/utils/state.util.d.ts +5 -5
  158. package/extensions/lib/utils/typeahead.util.d.ts +11 -11
  159. package/extensions/lib/utils/validation.util.d.ts +3 -3
  160. package/extensions/public-api.d.ts +30 -30
  161. package/{fesm2020 → fesm2022}/abp-ng.theme.shared-extensions.mjs +1335 -1330
  162. package/fesm2022/abp-ng.theme.shared-extensions.mjs.map +1 -0
  163. package/{fesm2020 → fesm2022}/abp-ng.theme.shared-testing.mjs +40 -40
  164. package/{fesm2015 → fesm2022}/abp-ng.theme.shared-testing.mjs.map +1 -1
  165. package/{fesm2020 → fesm2022}/abp-ng.theme.shared.mjs +2292 -2290
  166. package/fesm2022/abp-ng.theme.shared.mjs.map +1 -0
  167. package/index.d.ts +5 -5
  168. package/lib/animations/bounce.animations.d.ts +1 -1
  169. package/lib/animations/collapse.animations.d.ts +9 -9
  170. package/lib/animations/fade.animations.d.ts +10 -10
  171. package/lib/animations/index.d.ts +6 -6
  172. package/lib/animations/modal.animations.d.ts +2 -2
  173. package/lib/animations/slide.animations.d.ts +1 -1
  174. package/lib/animations/toast.animations.d.ts +1 -1
  175. package/lib/components/breadcrumb/breadcrumb.component.d.ts +16 -16
  176. package/lib/components/breadcrumb-items/breadcrumb-items.component.d.ts +7 -7
  177. package/lib/components/button/button.component.d.ts +26 -26
  178. package/lib/components/card/card-body.component.d.ts +8 -8
  179. package/lib/components/card/card-footer.component.d.ts +8 -8
  180. package/lib/components/card/card-header.component.d.ts +8 -8
  181. package/lib/components/card/card-header.directive.d.ts +6 -6
  182. package/lib/components/card/card-img-top.directive.d.ts +6 -6
  183. package/lib/components/card/card-subtitle.directive.d.ts +6 -6
  184. package/lib/components/card/card-title.directive.d.ts +6 -6
  185. package/lib/components/card/card.component.d.ts +7 -7
  186. package/lib/components/card/card.module.d.ts +15 -15
  187. package/lib/components/card/index.d.ts +9 -9
  188. package/lib/components/checkbox/checkbox.component.d.ts +18 -18
  189. package/lib/components/confirmation/confirmation.component.d.ts +19 -19
  190. package/lib/components/form-input/form-input.component.d.ts +19 -19
  191. package/lib/components/http-error-wrapper/http-error-wrapper.component.d.ts +27 -27
  192. package/lib/components/index.d.ts +16 -16
  193. package/lib/components/loader-bar/loader-bar.component.d.ts +33 -33
  194. package/lib/components/loading/loading.component.d.ts +5 -5
  195. package/lib/components/modal/modal-close.directive.d.ts +9 -9
  196. package/lib/components/modal/modal-ref.service.d.ts +13 -13
  197. package/lib/components/modal/modal.component.d.ts +50 -50
  198. package/lib/components/password/password.component.d.ts +12 -12
  199. package/lib/components/toast/toast.component.d.ts +14 -14
  200. package/lib/components/toast-container/toast-container.component.d.ts +22 -22
  201. package/lib/constants/styles.d.ts +2 -2
  202. package/lib/constants/validation.d.ts +19 -19
  203. package/lib/directives/ellipsis.directive.d.ts +21 -21
  204. package/lib/directives/index.d.ts +5 -5
  205. package/lib/directives/loading.directive.d.ts +25 -25
  206. package/lib/directives/ngx-datatable-default.directive.d.ts +30 -30
  207. package/lib/directives/ngx-datatable-list.directive.d.ts +24 -24
  208. package/lib/directives/visible.directive.d.ts +18 -18
  209. package/lib/enums/form.d.ts +4 -4
  210. package/lib/enums/index.d.ts +2 -2
  211. package/lib/enums/route-names.d.ts +3 -3
  212. package/lib/handlers/document-dir.handler.d.ts +13 -13
  213. package/lib/handlers/error.handler.d.ts +83 -83
  214. package/lib/handlers/index.d.ts +2 -2
  215. package/lib/models/common.d.ts +21 -21
  216. package/lib/models/confirmation.d.ts +27 -27
  217. package/lib/models/index.d.ts +7 -7
  218. package/lib/models/nav-item.d.ts +13 -13
  219. package/lib/models/statistics.d.ts +12 -12
  220. package/lib/models/toaster.d.ts +30 -30
  221. package/lib/models/user-menu.d.ts +8 -8
  222. package/lib/models/validation.d.ts +1 -1
  223. package/lib/providers/index.d.ts +2 -2
  224. package/lib/providers/ng-bootstrap-config.provider.d.ts +8 -8
  225. package/lib/providers/route.provider.d.ts +8 -8
  226. package/lib/services/abstract-menu.service.d.ts +13 -13
  227. package/lib/services/confirmation.service.d.ts +21 -21
  228. package/lib/services/index.d.ts +5 -5
  229. package/lib/services/nav-items.service.d.ts +8 -8
  230. package/lib/services/page-alert.service.d.ts +18 -18
  231. package/lib/services/toaster.service.d.ts +60 -60
  232. package/lib/services/user-menu.service.d.ts +8 -8
  233. package/lib/theme-shared.module.d.ts +38 -38
  234. package/lib/tokens/append-content.token.d.ts +2 -2
  235. package/lib/tokens/confirmation-icons.token.d.ts +11 -11
  236. package/lib/tokens/http-error.token.d.ts +5 -5
  237. package/lib/tokens/index.d.ts +4 -4
  238. package/lib/tokens/ngx-datatable-messages.token.d.ts +12 -12
  239. package/lib/tokens/suppress-unsaved-changes-warning.token.d.ts +2 -2
  240. package/lib/utils/date-parser-formatter.d.ts +12 -12
  241. package/lib/utils/index.d.ts +2 -2
  242. package/lib/utils/validation-utils.d.ts +5 -5
  243. package/package.json +14 -24
  244. package/public-api.d.ts +12 -12
  245. package/testing/index.d.ts +5 -5
  246. package/testing/lib/models/config.d.ts +4 -4
  247. package/testing/lib/models/index.d.ts +1 -1
  248. package/testing/lib/theme-shared-testing.module.d.ts +14 -14
  249. package/testing/public-api.d.ts +3 -3
  250. package/esm2020/extensions/lib/adapters/date-time.adapter.mjs +0 -44
  251. package/esm2020/extensions/lib/adapters/date.adapter.mjs +0 -41
  252. package/esm2020/extensions/lib/adapters/time.adapter.mjs +0 -36
  253. package/esm2020/extensions/lib/components/abstract-actions/abstract-actions.component.mjs +0 -25
  254. package/esm2020/extensions/lib/components/date-time-picker/date-time-picker.component.mjs +0 -109
  255. package/esm2020/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +0 -198
  256. package/esm2020/extensions/lib/components/extensible-form/extensible-form.component.mjs +0 -73
  257. package/esm2020/extensions/lib/components/extensible-table/extensible-table.component.mjs +0 -135
  258. package/esm2020/extensions/lib/components/grid-actions/grid-actions.component.mjs +0 -39
  259. package/esm2020/extensions/lib/components/page-toolbar/page-toolbar.component.mjs +0 -38
  260. package/esm2020/extensions/lib/directives/disabled.directive.mjs +0 -29
  261. package/esm2020/extensions/lib/directives/prop-data.directive.mjs +0 -41
  262. package/esm2020/extensions/lib/models/form-props.mjs +0 -75
  263. package/esm2020/extensions/lib/models/props.mjs +0 -53
  264. package/esm2020/extensions/lib/pipes/create-injector.pipe.mjs +0 -36
  265. package/esm2020/extensions/lib/services/extensions.service.mjs +0 -24
  266. package/esm2020/extensions/lib/ui-extensions.module.mjs +0 -95
  267. package/esm2020/extensions/lib/utils/form-props.util.mjs +0 -51
  268. package/esm2020/extensions/lib/utils/state.util.mjs +0 -123
  269. package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +0 -43
  270. package/esm2020/lib/components/breadcrumb-items/breadcrumb-items.component.mjs +0 -19
  271. package/esm2020/lib/components/button/button.component.mjs +0 -102
  272. package/esm2020/lib/components/card/card-footer.component.mjs +0 -30
  273. package/esm2020/lib/components/card/card-header.component.mjs +0 -30
  274. package/esm2020/lib/components/card/card-header.directive.mjs +0 -19
  275. package/esm2020/lib/components/card/card-img-top.directive.mjs +0 -19
  276. package/esm2020/lib/components/card/card-subtitle.directive.mjs +0 -19
  277. package/esm2020/lib/components/card/card-title.directive.mjs +0 -19
  278. package/esm2020/lib/components/card/card.component.mjs +0 -23
  279. package/esm2020/lib/components/card/card.module.mjs +0 -49
  280. package/esm2020/lib/components/checkbox/checkbox.component.mjs +0 -88
  281. package/esm2020/lib/components/confirmation/confirmation.component.mjs +0 -45
  282. package/esm2020/lib/components/form-input/form-input.component.mjs +0 -94
  283. package/esm2020/lib/components/http-error-wrapper/http-error-wrapper.component.mjs +0 -59
  284. package/esm2020/lib/components/loader-bar/loader-bar.component.mjs +0 -121
  285. package/esm2020/lib/components/loading/loading.component.mjs +0 -19
  286. package/esm2020/lib/components/modal/modal-close.directive.mjs +0 -27
  287. package/esm2020/lib/components/modal/modal-ref.service.mjs +0 -26
  288. package/esm2020/lib/components/modal/modal.component.mjs +0 -189
  289. package/esm2020/lib/components/password/password.component.mjs +0 -38
  290. package/esm2020/lib/components/toast/toast.component.mjs +0 -55
  291. package/esm2020/lib/components/toast-container/toast-container.component.mjs +0 -58
  292. package/esm2020/lib/directives/ellipsis.directive.mjs +0 -63
  293. package/esm2020/lib/directives/loading.directive.mjs +0 -89
  294. package/esm2020/lib/directives/ngx-datatable-default.directive.mjs +0 -75
  295. package/esm2020/lib/directives/ngx-datatable-list.directive.mjs +0 -94
  296. package/esm2020/lib/directives/visible.directive.mjs +0 -62
  297. package/esm2020/lib/handlers/document-dir.handler.mjs +0 -31
  298. package/esm2020/lib/handlers/error.handler.mjs +0 -291
  299. package/esm2020/lib/services/confirmation.service.mjs +0 -68
  300. package/esm2020/lib/services/nav-items.service.mjs +0 -17
  301. package/esm2020/lib/services/page-alert.service.mjs +0 -28
  302. package/esm2020/lib/services/toaster.service.mjs +0 -103
  303. package/esm2020/lib/services/user-menu.service.mjs +0 -17
  304. package/esm2020/lib/theme-shared.module.mjs +0 -200
  305. package/esm2020/lib/utils/date-parser-formatter.mjs +0 -58
  306. package/esm2020/testing/lib/theme-shared-testing.module.mjs +0 -46
  307. package/fesm2015/abp-ng.theme.shared-extensions.mjs +0 -1460
  308. package/fesm2015/abp-ng.theme.shared-extensions.mjs.map +0 -1
  309. package/fesm2015/abp-ng.theme.shared-testing.mjs +0 -54
  310. package/fesm2015/abp-ng.theme.shared.mjs +0 -2767
  311. package/fesm2015/abp-ng.theme.shared.mjs.map +0 -1
  312. package/fesm2020/abp-ng.theme.shared-extensions.mjs.map +0 -1
  313. package/fesm2020/abp-ng.theme.shared-testing.mjs.map +0 -1
  314. package/fesm2020/abp-ng.theme.shared.mjs.map +0 -1
@@ -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,802 @@ 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
+ }
729
+ static create(options) {
730
+ return new EntityProp(options);
731
+ }
732
+ static createMany(arrayOfOptions) {
733
+ return arrayOfOptions.map(EntityProp.create);
734
+ }
733
735
  }
734
736
 
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
- }
737
+ class ToolbarActionList extends ActionList {
738
+ }
739
+ class ToolbarActions extends Actions {
740
+ constructor() {
741
+ super(...arguments);
742
+ this._ctor = ToolbarActionList;
743
+ }
744
+ }
745
+ class ToolbarActionsFactory extends ActionsFactory {
746
+ constructor() {
747
+ super(...arguments);
748
+ this._ctor = ToolbarActions;
749
+ }
750
+ }
751
+ class ToolbarAction extends Action {
752
+ constructor(options) {
753
+ super(options.permission || '', options.visible, options.action);
754
+ this.text = options.text;
755
+ this.icon = options.icon || '';
756
+ if (options.btnClass) {
757
+ this.btnClass = options.btnClass;
758
+ }
759
+ }
760
+ static create(options) {
761
+ return new ToolbarAction(options);
762
+ }
763
+ static createMany(arrayOfOptions) {
764
+ return arrayOfOptions.map(ToolbarAction.create);
765
+ }
766
+ }
767
+ class ToolbarComponent extends Action {
768
+ constructor(options) {
769
+ super(options.permission || '', options.visible, options.action);
770
+ this.component = options.component;
771
+ }
772
+ static create(options) {
773
+ return new ToolbarComponent(options);
774
+ }
775
+ static createMany(arrayOfOptions) {
776
+ return arrayOfOptions.map(ToolbarComponent.create);
777
+ }
776
778
  }
777
779
 
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
- }]
780
+ class ExtensionsService {
781
+ constructor() {
782
+ this.entityActions = new EntityActionsFactory();
783
+ this.toolbarActions = new ToolbarActionsFactory();
784
+ this.entityProps = new EntityPropsFactory();
785
+ this.createFormProps = new CreateFormPropsFactory();
786
+ this.editFormProps = new EditFormPropsFactory();
787
+ }
788
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
789
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensionsService, providedIn: 'root' }); }
790
+ }
791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensionsService, decorators: [{
792
+ type: Injectable,
793
+ args: [{
794
+ providedIn: 'root',
795
+ }]
794
796
  }] });
795
797
 
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']
798
+ /* eslint-disable @angular-eslint/no-input-rename */
799
+ class PropDataDirective extends PropData {
800
+ constructor(tempRef, vcRef, injector) {
801
+ super();
802
+ this.tempRef = tempRef;
803
+ this.vcRef = vcRef;
804
+ this.getInjected = injector.get.bind(injector);
805
+ }
806
+ ngOnChanges() {
807
+ this.vcRef.clear();
808
+ this.vcRef.createEmbeddedView(this.tempRef, {
809
+ $implicit: this.data,
810
+ index: 0,
811
+ });
812
+ }
813
+ ngOnDestroy() {
814
+ this.vcRef.clear();
815
+ }
816
+ 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 }); }
817
+ 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 }); }
818
+ }
819
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PropDataDirective, decorators: [{
820
+ type: Directive,
821
+ args: [{
822
+ exportAs: 'abpPropData',
823
+ selector: '[abpPropData]',
824
+ }]
825
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.Injector }]; }, propDecorators: { propList: [{
826
+ type: Input,
827
+ args: ['abpPropDataFromList']
828
+ }], record: [{
829
+ type: Input,
830
+ args: ['abpPropDataWithRecord']
831
+ }], index: [{
832
+ type: Input,
833
+ args: ['abpPropDataAtIndex']
832
834
  }] } });
833
835
 
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
836
+ class ExtensibleFormComponent {
837
+ set selectedRecord(record) {
838
+ const type = !record || JSON.stringify(record) === '{}' ? 'create' : 'edit';
839
+ const propList = this.extensions[`${type}FormProps`].get(this.identifier).props;
840
+ this.groupedPropList = this.createGroupedList(propList);
841
+ this.record = record;
842
+ }
843
+ createGroupedList(propList) {
844
+ const groupedFormPropList = new GroupedFormPropList();
845
+ propList.forEach(item => {
846
+ groupedFormPropList.addItem(item.value);
847
+ });
848
+ return groupedFormPropList;
849
+ }
850
+ get form() {
851
+ return (this.container ? this.container.control : { controls: {} });
852
+ }
853
+ get extraProperties() {
854
+ return (this.form.controls.extraProperties || { controls: {} });
855
+ }
856
+ constructor(cdRef, track, container, extensions, identifier) {
857
+ this.cdRef = cdRef;
858
+ this.track = track;
859
+ this.container = container;
860
+ this.extensions = extensions;
861
+ this.identifier = identifier;
862
+ this.extraPropertiesKey = EXTRA_PROPERTIES_KEY;
863
+ }
864
+ 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 }); }
865
+ 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: [
866
+ {
867
+ provide: ControlContainer,
868
+ useFactory: selfFactory,
869
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
870
+ },
871
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
872
+ }
873
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensibleFormComponent, decorators: [{
874
+ type: Component,
875
+ args: [{ exportAs: 'abpExtensibleForm', selector: 'abp-extensible-form', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
876
+ {
877
+ provide: ControlContainer,
878
+ useFactory: selfFactory,
879
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
880
+ },
881
+ ], 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" }]
882
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i2.ControlContainer }, { type: ExtensionsService }, { type: undefined, decorators: [{
883
+ type: Inject,
884
+ args: [EXTENSIONS_IDENTIFIER]
885
+ }] }]; }, propDecorators: { formProps: [{
886
+ type: ViewChildren,
887
+ args: [ExtensibleFormPropComponent]
888
+ }], selectedRecord: [{
889
+ type: Input
888
890
  }] } });
889
891
 
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
892
+ // Fix for https://github.com/angular/angular/issues/23904
893
+ // @dynamic
894
+ class AbstractActionsComponent extends ActionData {
895
+ constructor(injector) {
896
+ super();
897
+ this.getInjected = injector.get.bind(injector);
898
+ const extensions = injector.get(ExtensionsService);
899
+ const name = injector.get(EXTENSIONS_IDENTIFIER);
900
+ const type = injector.get(EXTENSIONS_ACTION_TYPE);
901
+ this.actionList = extensions[type].get(name).actions;
902
+ }
903
+ 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 }); }
904
+ static { thisdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.1", type: AbstractActionsComponent, inputs: { record: "record" }, usesInheritance: true, ngImport: i0 }); }
905
+ }
906
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AbstractActionsComponent, decorators: [{
907
+ type: Directive
908
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { record: [{
909
+ type: Input
908
910
  }] } });
909
911
 
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
912
+ class GridActionsComponent extends AbstractActionsComponent {
913
+ constructor(injector) {
914
+ super(injector);
915
+ this.icon = 'fa fa-cog';
916
+ this.text = '';
917
+ this.trackByFn = (_, item) => item.text;
918
+ }
919
+ 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 }); }
920
+ 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: [
921
+ {
922
+ provide: EXTENSIONS_ACTION_TYPE,
923
+ useValue: 'entityActions',
924
+ },
925
+ ], 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 }); }
926
+ }
927
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: GridActionsComponent, decorators: [{
928
+ type: Component,
929
+ args: [{ exportAs: 'abpGridActions', selector: 'abp-grid-actions', providers: [
930
+ {
931
+ provide: EXTENSIONS_ACTION_TYPE,
932
+ useValue: 'entityActions',
933
+ },
934
+ ], 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" }]
935
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { icon: [{
936
+ type: Input
937
+ }], index: [{
938
+ type: Input
939
+ }], text: [{
940
+ type: Input
939
941
  }] } });
940
942
 
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
943
+ const DEFAULT_ACTIONS_COLUMN_WIDTH = 150;
944
+ class ExtensibleTableComponent {
945
+ set actionsText(value) {
946
+ this._actionsText = value;
947
+ }
948
+ get actionsText() {
949
+ return this._actionsText ?? (this.actionList.length > 1 ? 'AbpUi::Actions' : '');
950
+ }
951
+ set actionsColumnWidth(width) {
952
+ this.setColumnWidths(width ? Number(width) : undefined);
953
+ }
954
+ constructor(locale, config, injector) {
955
+ this.locale = locale;
956
+ this.config = config;
957
+ this.injector = injector;
958
+ this.tableActivate = new EventEmitter();
959
+ this.trackByFn = (_, item) => item.name;
960
+ this.entityPropTypeClasses = injector.get(ENTITY_PROP_TYPE_CLASSES);
961
+ this.getInjected = injector.get.bind(injector);
962
+ const extensions = injector.get(ExtensionsService);
963
+ const name = injector.get(EXTENSIONS_IDENTIFIER);
964
+ this.propList = extensions.entityProps.get(name).props;
965
+ this.actionList = extensions['entityActions'].get(name)
966
+ .actions;
967
+ const permissionService = injector.get(PermissionService);
968
+ this.hasAtLeastOnePermittedAction =
969
+ permissionService.filterItemsByPolicy(this.actionList.toArray().map(action => ({ requiredPolicy: action.permission }))).length > 0;
970
+ this.setColumnWidths(DEFAULT_ACTIONS_COLUMN_WIDTH);
971
+ }
972
+ setColumnWidths(actionsColumn) {
973
+ const widths = [actionsColumn];
974
+ this.propList.forEach(({ value: prop }) => {
975
+ widths.push(prop.columnWidth);
976
+ });
977
+ this.columnWidths = widths;
978
+ }
979
+ getDate(value, format) {
980
+ return value && format ? formatDate(value, format, this.locale) : '';
981
+ }
982
+ getIcon(value) {
983
+ return value
984
+ ? '<div class="text-success"><i class="fa fa-check" aria-hidden="true"></i></div>'
985
+ : '<div class="text-danger"><i class="fa fa-times" aria-hidden="true"></i></div>';
986
+ }
987
+ getEnum(rowValue, list) {
988
+ if (!list)
989
+ return rowValue;
990
+ const { key } = list.find(({ value }) => value === rowValue) || {};
991
+ return key;
992
+ }
993
+ getContent(prop, data) {
994
+ return prop.valueResolver(data).pipe(map(value => {
995
+ switch (prop.type) {
996
+ case "boolean" /* ePropType.Boolean */:
997
+ return this.getIcon(value);
998
+ case "date" /* ePropType.Date */:
999
+ return this.getDate(value, getShortDateFormat(this.config));
1000
+ case "time" /* ePropType.Time */:
1001
+ return this.getDate(value, getShortTimeFormat(this.config));
1002
+ case "datetime" /* ePropType.DateTime */:
1003
+ return this.getDate(value, getShortDateShortTimeFormat(this.config));
1004
+ case "enum" /* ePropType.Enum */:
1005
+ return this.getEnum(value, prop.enumList || []);
1006
+ default:
1007
+ return value;
1008
+ // More types can be handled in the future
1009
+ }
1010
+ }));
1011
+ }
1012
+ ngOnChanges({ data }) {
1013
+ if (!data?.currentValue)
1014
+ return;
1015
+ this.data = data.currentValue.map((record, index) => {
1016
+ this.propList.forEach(prop => {
1017
+ const propData = { getInjected: this.getInjected, record, index };
1018
+ const value = this.getContent(prop.value, propData);
1019
+ const propKey = `_${prop.value.name}`;
1020
+ record[propKey] = {
1021
+ visible: prop.value.visible(propData),
1022
+ value,
1023
+ };
1024
+ if (prop.value.component) {
1025
+ const injector = Injector.create({
1026
+ providers: [
1027
+ {
1028
+ provide: PROP_DATA_STREAM,
1029
+ useValue: value,
1030
+ },
1031
+ ],
1032
+ parent: this.injector,
1033
+ });
1034
+ record[propKey].injector = injector;
1035
+ record[propKey].component = prop.value.component;
1036
+ }
1037
+ });
1038
+ return record;
1039
+ });
1040
+ }
1041
+ 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 }); }
1042
+ 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 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 }); }
1043
+ }
1044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExtensibleTableComponent, decorators: [{
1045
+ type: Component,
1046
+ 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" }]
1047
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1048
+ type: Inject,
1049
+ args: [LOCALE_ID]
1050
+ }] }, { type: i1.ConfigStateService }, { type: i0.Injector }]; }, propDecorators: { actionsText: [{
1051
+ type: Input
1052
+ }], data: [{
1053
+ type: Input
1054
+ }], list: [{
1055
+ type: Input
1056
+ }], recordsTotal: [{
1057
+ type: Input
1058
+ }], actionsColumnWidth: [{
1059
+ type: Input
1060
+ }], actionsTemplate: [{
1061
+ type: Input
1062
+ }], tableActivate: [{
1063
+ type: Output
1062
1064
  }] } });
1063
1065
 
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
- }]
1066
+ class CreateInjectorPipe {
1067
+ transform(_, action, context) {
1068
+ const get = (token, notFoundValue, options) => {
1069
+ const componentData = context.getData();
1070
+ const componentDataCallback = (data) => {
1071
+ data = data ?? context.getData();
1072
+ return action.action(data);
1073
+ };
1074
+ let extensionData;
1075
+ switch (token) {
1076
+ case EXTENSIONS_ACTION_DATA:
1077
+ extensionData = componentData;
1078
+ break;
1079
+ case EXTENSIONS_ACTION_CALLBACK:
1080
+ extensionData = componentDataCallback;
1081
+ break;
1082
+ default:
1083
+ extensionData = context.getInjected.call(context.injector, token, notFoundValue, options);
1084
+ }
1085
+ return extensionData;
1086
+ };
1087
+ return { get };
1088
+ }
1089
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CreateInjectorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1090
+ static { thispipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: CreateInjectorPipe, name: "createInjector" }); }
1091
+ }
1092
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CreateInjectorPipe, decorators: [{
1093
+ type: Pipe,
1094
+ args: [{
1095
+ name: 'createInjector',
1096
+ }]
1095
1097
  }] });
1096
1098
 
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" }]
1099
+ class PageToolbarComponent extends AbstractActionsComponent {
1100
+ constructor(injector) {
1101
+ super(injector);
1102
+ this.injector = injector;
1103
+ this.defaultBtnClass = 'btn btn-sm btn-primary';
1104
+ this.getData = () => this.data;
1105
+ this.trackByFn = (_, item) => item.action || item.component;
1106
+ }
1107
+ asToolbarAction(value) {
1108
+ return {
1109
+ value: value,
1110
+ };
1111
+ }
1112
+ 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 }); }
1113
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: PageToolbarComponent, selector: "abp-page-toolbar", providers: [
1114
+ {
1115
+ provide: EXTENSIONS_ACTION_TYPE,
1116
+ useValue: 'toolbarActions',
1117
+ },
1118
+ ], 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 }); }
1119
+ }
1120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PageToolbarComponent, decorators: [{
1121
+ type: Component,
1122
+ args: [{ exportAs: 'abpPageToolbar', selector: 'abp-page-toolbar', providers: [
1123
+ {
1124
+ provide: EXTENSIONS_ACTION_TYPE,
1125
+ useValue: 'toolbarActions',
1126
+ },
1127
+ ], 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
1128
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
1127
1129
 
1128
1130
  var objectExtensions = /*#__PURE__*/Object.freeze({
@@ -1131,327 +1133,330 @@ var objectExtensions = /*#__PURE__*/Object.freeze({
1131
1133
 
1132
1134
  const EXTENSIBLE_FORM_VIEW_PROVIDER = { provide: ControlContainer, useExisting: FormGroupDirective };
1133
1135
 
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
- UiExtensionsModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1204
- UiExtensionsModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule], exports: [BaseUiExtensionsModule] });
1205
- UiExtensionsModule.ɵinj = 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
- }]
1136
+ class BaseUiExtensionsModule {
1137
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: BaseUiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1138
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: BaseUiExtensionsModule, declarations: [DateTimePickerComponent,
1139
+ PageToolbarComponent,
1140
+ GridActionsComponent,
1141
+ ExtensibleFormPropComponent,
1142
+ ExtensibleFormComponent,
1143
+ ExtensibleTableComponent,
1144
+ PropDataDirective,
1145
+ DisabledDirective,
1146
+ CreateInjectorPipe], imports: [CoreModule,
1147
+ ThemeSharedModule,
1148
+ NgxValidateCoreModule,
1149
+ NgbDatepickerModule,
1150
+ NgbDropdownModule,
1151
+ NgbTimepickerModule,
1152
+ NgbTypeaheadModule], exports: [DateTimePickerComponent,
1153
+ PageToolbarComponent,
1154
+ GridActionsComponent,
1155
+ ExtensibleFormComponent,
1156
+ ExtensibleTableComponent,
1157
+ PropDataDirective,
1158
+ DisabledDirective,
1159
+ CreateInjectorPipe] }); }
1160
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: BaseUiExtensionsModule, imports: [CoreModule,
1161
+ ThemeSharedModule,
1162
+ NgxValidateCoreModule,
1163
+ NgbDatepickerModule,
1164
+ NgbDropdownModule,
1165
+ NgbTimepickerModule,
1166
+ NgbTypeaheadModule] }); }
1167
+ }
1168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: BaseUiExtensionsModule, decorators: [{
1169
+ type: NgModule,
1170
+ args: [{
1171
+ exports: [
1172
+ DateTimePickerComponent,
1173
+ PageToolbarComponent,
1174
+ GridActionsComponent,
1175
+ ExtensibleFormComponent,
1176
+ ExtensibleTableComponent,
1177
+ PropDataDirective,
1178
+ DisabledDirective,
1179
+ CreateInjectorPipe,
1180
+ ],
1181
+ declarations: [
1182
+ DateTimePickerComponent,
1183
+ PageToolbarComponent,
1184
+ GridActionsComponent,
1185
+ ExtensibleFormPropComponent,
1186
+ ExtensibleFormComponent,
1187
+ ExtensibleTableComponent,
1188
+ PropDataDirective,
1189
+ DisabledDirective,
1190
+ CreateInjectorPipe,
1191
+ ],
1192
+ imports: [
1193
+ CoreModule,
1194
+ ThemeSharedModule,
1195
+ NgxValidateCoreModule,
1196
+ NgbDatepickerModule,
1197
+ NgbDropdownModule,
1198
+ NgbTimepickerModule,
1199
+ NgbTypeaheadModule,
1200
+ ],
1201
+ }]
1202
+ }] });
1203
+ class UiExtensionsModule {
1204
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1205
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule], exports: [BaseUiExtensionsModule] }); }
1206
+ static { thisinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule, BaseUiExtensionsModule] }); }
1207
+ }
1208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UiExtensionsModule, decorators: [{
1209
+ type: NgModule,
1210
+ args: [{
1211
+ exports: [BaseUiExtensionsModule],
1212
+ imports: [BaseUiExtensionsModule],
1213
+ }]
1212
1214
  }] });
1213
1215
 
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
- });
1216
+ function mergeWithDefaultActions(extension, defaultActions, ...contributors) {
1217
+ Object.keys(defaultActions).forEach((name) => {
1218
+ const actions = extension.get(name);
1219
+ actions.clearContributors();
1220
+ actions.addContributor((actionList) => actionList.addManyTail(defaultActions[name]));
1221
+ contributors.forEach(contributor => (contributor[name] || []).forEach((callback) => actions.addContributor(callback)));
1222
+ });
1221
1223
  }
1222
1224
 
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;
1225
+ function generateFormFromProps(data) {
1226
+ const extensions = data.getInjected((ExtensionsService));
1227
+ const identifier = data.getInjected(EXTENSIONS_IDENTIFIER);
1228
+ const form = new UntypedFormGroup({});
1229
+ const extraForm = new UntypedFormGroup({});
1230
+ form.addControl(EXTRA_PROPERTIES_KEY, extraForm);
1231
+ const record = data.record || {};
1232
+ const type = JSON.stringify(record) === '{}' ? 'create' : 'edit';
1233
+ const props = extensions[`${type}FormProps`].get(identifier).props;
1234
+ const extraProperties = record[EXTRA_PROPERTIES_KEY] || {};
1235
+ props.forEach(({ value: prop }) => {
1236
+ const name = prop.name;
1237
+ const isExtraProperty = prop.isExtra || name in extraProperties;
1238
+ let value = isExtraProperty ? extraProperties[name] : name in record ? record[name] : undefined;
1239
+ if (typeof value === 'undefined')
1240
+ value = prop.defaultValue;
1241
+ if (value) {
1242
+ let adapter;
1243
+ switch (prop.type) {
1244
+ case "date" /* ePropType.Date */:
1245
+ adapter = new DateAdapter();
1246
+ value = adapter.toModel(adapter.fromModel(value));
1247
+ break;
1248
+ case "time" /* ePropType.Time */:
1249
+ adapter = new TimeAdapter();
1250
+ value = adapter.toModel(adapter.fromModel(value));
1251
+ break;
1252
+ case "datetime" /* ePropType.DateTime */:
1253
+ adapter = new DateTimeAdapter();
1254
+ value = adapter.toModel(adapter.fromModel(value));
1255
+ break;
1256
+ default:
1257
+ break;
1258
+ }
1259
+ }
1260
+ const formControl = new UntypedFormControl(value, {
1261
+ asyncValidators: prop.asyncValidators(data),
1262
+ validators: prop.validators(data),
1263
+ });
1264
+ (isExtraProperty ? extraForm : form).addControl(name, formControl);
1265
+ });
1266
+ return form;
1265
1267
  }
1266
1268
 
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
- });
1269
+ function createExtraPropertyValueResolver(name) {
1270
+ return (data) => of(data.record[EXTRA_PROPERTIES_KEY][name]);
1271
+ }
1272
+ function mergeWithDefaultProps(extension, defaultProps, ...contributors) {
1273
+ Object.keys(defaultProps).forEach((name) => {
1274
+ const props = extension.get(name);
1275
+ props.clearContributors();
1276
+ props.addContributor((propList) => propList.addManyTail(defaultProps[name]));
1277
+ contributors.forEach(contributor => (contributor[name] || []).forEach((callback) => props.addContributor(callback)));
1278
+ });
1277
1279
  }
1278
1280
 
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();
1281
+ function createEnum(members) {
1282
+ const enumObject = {};
1283
+ members.forEach(({ name = '', value }) => {
1284
+ enumObject[(enumObject[name] = value)] = name;
1285
+ });
1286
+ return enumObject;
1287
+ }
1288
+ function createEnumValueResolver(enumType, lookupEnum, propName) {
1289
+ return data => {
1290
+ const value = data.record[EXTRA_PROPERTIES_KEY][propName];
1291
+ const key = lookupEnum.transformed[value];
1292
+ const l10n = data.getInjected(LocalizationService);
1293
+ const localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
1294
+ return createLocalizationStream(l10n, localizeEnum(key));
1295
+ };
1296
+ }
1297
+ function createEnumOptions(enumType, lookupEnum) {
1298
+ return data => {
1299
+ const l10n = data.getInjected(LocalizationService);
1300
+ const localizeEnum = createEnumLocalizer(l10n, enumType, lookupEnum);
1301
+ return createLocalizationStream(l10n, lookupEnum.fields.map(({ name = '', value }) => ({
1302
+ key: localizeEnum(name),
1303
+ value,
1304
+ })));
1305
+ };
1306
+ }
1307
+ function createLocalizationStream(l10n, mapTarget) {
1308
+ return merge(of(null), l10n.languageChange$).pipe(map(() => mapTarget));
1309
+ }
1310
+ function createEnumLocalizer(l10n, enumType, lookupEnum) {
1311
+ const resource = lookupEnum.localizationResource;
1312
+ const shortType = getShortEnumType(enumType);
1313
+ return key => l10n.localizeWithFallbackSync([resource || ''], ['Enum:' + shortType + '.' + key, shortType + '.' + key, key], key);
1314
+ }
1315
+ function getShortEnumType(enumType) {
1316
+ return enumType.split('.').pop();
1315
1317
  }
1316
1318
 
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
- };
1319
+ function createDisplayNameLocalizationPipeKeyGenerator(localization) {
1320
+ const generateLocalizationPipeKey = createLocalizationPipeKeyGenerator(localization);
1321
+ return (displayName, fallback) => {
1322
+ if (displayName && displayName.name)
1323
+ return generateLocalizationPipeKey([displayName.resource || ''], [displayName.name], displayName.name);
1324
+ const key = generateLocalizationPipeKey([fallback.resource || ''], ['DisplayName:' + fallback.name], undefined);
1325
+ if (key)
1326
+ return key;
1327
+ return generateLocalizationPipeKey([fallback.resource || ''], [fallback.name || ''], fallback.name);
1328
+ };
1327
1329
  }
1328
1330
 
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;
1331
+ function getValidatorsFromProperty(property) {
1332
+ const validators = [];
1333
+ property.attributes.forEach(attr => {
1334
+ if (attr.typeSimple && attr.typeSimple in AbpValidators) {
1335
+ validators.push(AbpValidators[attr.typeSimple](attr.config));
1336
+ }
1337
+ });
1338
+ return validators;
1337
1339
  }
1338
1340
 
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';
1341
+ function selectObjectExtensions(configState) {
1342
+ return configState.getOne$('objectExtensions');
1343
+ }
1344
+ function selectLocalization(configState) {
1345
+ return configState.getOne$('localization');
1346
+ }
1347
+ function selectEnums(configState) {
1348
+ return selectObjectExtensions(configState).pipe(map((extensions) => Object.keys(extensions.enums).reduce((acc, key) => {
1349
+ const { fields, localizationResource } = extensions.enums[key];
1350
+ acc[key] = {
1351
+ fields,
1352
+ localizationResource,
1353
+ transformed: createEnum(fields),
1354
+ };
1355
+ return acc;
1356
+ }, {})));
1357
+ }
1358
+ function getObjectExtensionEntitiesFromStore(configState, moduleKey) {
1359
+ return selectObjectExtensions(configState).pipe(map(extensions => {
1360
+ if (!extensions)
1361
+ return null;
1362
+ return (extensions.modules[moduleKey] || {})
1363
+ .entities;
1364
+ }), map(entities => (isUndefined(entities) ? {} : entities)), filter(Boolean), take(1));
1365
+ }
1366
+ function mapEntitiesToContributors(configState, resource) {
1367
+ return pipe(switchMap((entities) => zip(selectLocalization(configState), selectEnums(configState)).pipe(map(([localization, enums]) => {
1368
+ const generateDisplayName = createDisplayNameLocalizationPipeKeyGenerator(localization);
1369
+ return Object.keys(entities).reduce((acc, key) => {
1370
+ acc.prop[key] = [];
1371
+ acc.createForm[key] = [];
1372
+ acc.editForm[key] = [];
1373
+ const entity = entities[key];
1374
+ if (!entity)
1375
+ return acc;
1376
+ const properties = entity.properties;
1377
+ if (!properties)
1378
+ return acc;
1379
+ const mapPropertiesToContributors = createPropertiesToContributorsMapper(generateDisplayName, resource, enums);
1380
+ return mapPropertiesToContributors(properties, acc, key);
1381
+ }, {
1382
+ prop: {},
1383
+ createForm: {},
1384
+ editForm: {},
1385
+ });
1386
+ }))), take(1));
1387
+ }
1388
+ function createPropertiesToContributorsMapper(generateDisplayName, resource, enums) {
1389
+ return (properties, contributors, key) => {
1390
+ const isExtra = true;
1391
+ const generateTypeaheadDisplayName = createTypeaheadDisplayNameGenerator(generateDisplayName, properties);
1392
+ Object.keys(properties).forEach((name) => {
1393
+ const property = properties[name];
1394
+ const propName = name;
1395
+ const lookup = property.ui.lookup || {};
1396
+ const type = getTypeaheadType(lookup, name) || getTypeFromProperty(property);
1397
+ const generateDN = hasTypeaheadTextSuffix(name)
1398
+ ? generateTypeaheadDisplayName
1399
+ : generateDisplayName;
1400
+ const displayName = generateDN(property.displayName, { name, resource });
1401
+ if (property.ui.onTable.isVisible) {
1402
+ const sortable = Boolean(property.ui.onTable.isSortable);
1403
+ const columnWidth = type === "boolean" /* ePropType.Boolean */ ? 150 : 250;
1404
+ const valueResolver = type === "enum" /* ePropType.Enum */ &&
1405
+ property.type
1406
+ ? createEnumValueResolver(property.type, enums[property.type], propName)
1407
+ : createExtraPropertyValueResolver(propName);
1408
+ const entityProp = new EntityProp({
1409
+ type,
1410
+ name: propName,
1411
+ displayName,
1412
+ sortable,
1413
+ columnWidth,
1414
+ valueResolver,
1415
+ isExtra,
1416
+ });
1417
+ const contributor = (propList) => propList.addTail(entityProp);
1418
+ contributors.prop[key].push(contributor);
1419
+ }
1420
+ const isOnCreateForm = property.ui.onCreateForm.isVisible;
1421
+ const isOnEditForm = property.ui.onEditForm.isVisible;
1422
+ if (isOnCreateForm || isOnEditForm) {
1423
+ const defaultValue = property.defaultValue;
1424
+ const formText = property.formText;
1425
+ const validators = () => getValidatorsFromProperty(property);
1426
+ let options;
1427
+ if (type === "enum" /* ePropType.Enum */)
1428
+ options = createEnumOptions(propName, enums[property.type || '']);
1429
+ else if (type === "typeahead" /* ePropType.Typeahead */)
1430
+ options = createTypeaheadOptions(lookup);
1431
+ const formProp = new FormProp({
1432
+ type,
1433
+ name: propName,
1434
+ displayName,
1435
+ options,
1436
+ defaultValue,
1437
+ validators,
1438
+ isExtra,
1439
+ formText,
1440
+ });
1441
+ const formContributor = (propList) => propList.addTail(formProp);
1442
+ if (isOnCreateForm)
1443
+ contributors.createForm[key].push(formContributor);
1444
+ if (isOnEditForm)
1445
+ contributors.editForm[key].push(formContributor);
1446
+ }
1447
+ });
1448
+ return contributors;
1449
+ };
1450
+ }
1451
+ function getTypeFromProperty(property) {
1452
+ return property?.typeSimple?.replace(/\?$/, '');
1453
+ }
1454
+ function isUndefined(obj) {
1455
+ return typeof obj === 'undefined';
1451
1456
  }
1452
1457
 
1453
- /**
1454
- * Generated bundle index. Do not edit.
1458
+ /**
1459
+ * Generated bundle index. Do not edit.
1455
1460
  */
1456
1461
 
1457
1462
  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 };