@abp/ng.theme.shared 4.4.1 → 5.0.0-beta.1-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 (305) hide show
  1. package/abp-ng.theme.shared.d.ts +1 -34
  2. package/bundles/abp-ng.theme.shared-extensions.umd.js +473 -361
  3. package/bundles/abp-ng.theme.shared-extensions.umd.js.map +1 -1
  4. package/bundles/abp-ng.theme.shared-testing.umd.js +33 -7
  5. package/bundles/abp-ng.theme.shared-testing.umd.js.map +1 -1
  6. package/bundles/abp-ng.theme.shared.umd.js +691 -1078
  7. package/bundles/abp-ng.theme.shared.umd.js.map +1 -1
  8. package/esm2015/abp-ng.theme.shared.js +1 -34
  9. package/esm2015/abp-ng.theme.shared.js.map +1 -0
  10. package/esm2015/extensions/abp-ng.theme.shared-extensions.js +1 -5
  11. package/esm2015/extensions/abp-ng.theme.shared-extensions.js.map +1 -0
  12. package/esm2015/extensions/lib/adapters/date-time.adapter.js +7 -4
  13. package/esm2015/extensions/lib/adapters/date-time.adapter.js.map +1 -0
  14. package/esm2015/extensions/lib/adapters/date.adapter.js +7 -4
  15. package/esm2015/extensions/lib/adapters/date.adapter.js.map +1 -0
  16. package/esm2015/extensions/lib/adapters/time.adapter.js +7 -4
  17. package/esm2015/extensions/lib/adapters/time.adapter.js.map +1 -0
  18. package/esm2015/extensions/lib/components/abstract-actions/abstract-actions.component.js +9 -12
  19. package/esm2015/extensions/lib/components/abstract-actions/abstract-actions.component.js.map +1 -0
  20. package/esm2015/extensions/lib/components/date-time-picker/date-time-picker.component.js +74 -35
  21. package/esm2015/extensions/lib/components/date-time-picker/date-time-picker.component.js.map +1 -0
  22. package/esm2015/extensions/lib/components/extensible-form/extensible-form-prop.component.js +49 -34
  23. package/esm2015/extensions/lib/components/extensible-form/extensible-form-prop.component.js.map +1 -0
  24. package/esm2015/extensions/lib/components/extensible-form/extensible-form.component.js +42 -30
  25. package/esm2015/extensions/lib/components/extensible-form/extensible-form.component.js.map +1 -0
  26. package/esm2015/extensions/lib/components/extensible-table/extensible-table.component.js +59 -28
  27. package/esm2015/extensions/lib/components/extensible-table/extensible-table.component.js.map +1 -0
  28. package/esm2015/extensions/lib/components/grid-actions/grid-actions.component.js +34 -23
  29. package/esm2015/extensions/lib/components/grid-actions/grid-actions.component.js.map +1 -0
  30. package/esm2015/extensions/lib/components/page-toolbar/page-toolbar.component.js +26 -18
  31. package/esm2015/extensions/lib/components/page-toolbar/page-toolbar.component.js.map +1 -0
  32. package/esm2015/extensions/lib/constants/extra-properties.js +1 -1
  33. package/esm2015/extensions/lib/constants/extra-properties.js.map +1 -0
  34. package/esm2015/extensions/lib/directives/disabled.directive.js +15 -12
  35. package/esm2015/extensions/lib/directives/disabled.directive.js.map +1 -0
  36. package/esm2015/extensions/lib/directives/prop-data.directive.js +21 -18
  37. package/esm2015/extensions/lib/directives/prop-data.directive.js.map +1 -0
  38. package/esm2015/extensions/lib/enums/props.enum.js +1 -1
  39. package/esm2015/extensions/lib/enums/props.enum.js.map +1 -0
  40. package/esm2015/extensions/lib/models/actions.js +1 -2
  41. package/esm2015/extensions/lib/models/actions.js.map +1 -0
  42. package/esm2015/extensions/lib/models/entity-actions.js +1 -1
  43. package/esm2015/extensions/lib/models/entity-actions.js.map +1 -0
  44. package/esm2015/extensions/lib/models/entity-props.js +3 -1
  45. package/esm2015/extensions/lib/models/entity-props.js.map +1 -0
  46. package/esm2015/extensions/lib/models/form-props.js +1 -2
  47. package/esm2015/extensions/lib/models/form-props.js.map +1 -0
  48. package/esm2015/extensions/lib/models/internal/object-extensions.js +1 -1
  49. package/esm2015/extensions/lib/models/internal/object-extensions.js.map +1 -0
  50. package/esm2015/extensions/lib/models/object-extensions.js +1 -1
  51. package/esm2015/extensions/lib/models/object-extensions.js.map +1 -0
  52. package/esm2015/extensions/lib/models/props.js +1 -2
  53. package/esm2015/extensions/lib/models/props.js.map +1 -0
  54. package/esm2015/extensions/lib/models/toolbar-actions.js +1 -1
  55. package/esm2015/extensions/lib/models/toolbar-actions.js.map +1 -0
  56. package/esm2015/extensions/lib/services/extensions.service.js +9 -7
  57. package/esm2015/extensions/lib/services/extensions.service.js.map +1 -0
  58. package/esm2015/extensions/lib/tokens/extensions.token.js +2 -1
  59. package/esm2015/extensions/lib/tokens/extensions.token.js.map +1 -0
  60. package/esm2015/extensions/lib/ui-extensions.module.js +75 -39
  61. package/esm2015/extensions/lib/ui-extensions.module.js.map +1 -0
  62. package/esm2015/extensions/lib/utils/actions.util.js +1 -1
  63. package/esm2015/extensions/lib/utils/actions.util.js.map +1 -0
  64. package/esm2015/extensions/lib/utils/enum.util.js +1 -1
  65. package/esm2015/extensions/lib/utils/enum.util.js.map +1 -0
  66. package/esm2015/extensions/lib/utils/factory.util.js +1 -1
  67. package/esm2015/extensions/lib/utils/factory.util.js.map +1 -0
  68. package/esm2015/extensions/lib/utils/form-props.util.js +1 -1
  69. package/esm2015/extensions/lib/utils/form-props.util.js.map +1 -0
  70. package/esm2015/extensions/lib/utils/localization.util.js +1 -1
  71. package/esm2015/extensions/lib/utils/localization.util.js.map +1 -0
  72. package/esm2015/extensions/lib/utils/props.util.js +1 -1
  73. package/esm2015/extensions/lib/utils/props.util.js.map +1 -0
  74. package/esm2015/extensions/lib/utils/state.util.js +1 -1
  75. package/esm2015/extensions/lib/utils/state.util.js.map +1 -0
  76. package/esm2015/extensions/lib/utils/typeahead.util.js +1 -1
  77. package/esm2015/extensions/lib/utils/typeahead.util.js.map +1 -0
  78. package/esm2015/extensions/lib/utils/validation.util.js +1 -1
  79. package/esm2015/extensions/lib/utils/validation.util.js.map +1 -0
  80. package/esm2015/extensions/public-api.js +1 -1
  81. package/esm2015/extensions/public-api.js.map +1 -0
  82. package/esm2015/lib/animations/bounce.animations.js +5 -5
  83. package/esm2015/lib/animations/bounce.animations.js.map +1 -0
  84. package/esm2015/lib/animations/collapse.animations.js +1 -1
  85. package/esm2015/lib/animations/collapse.animations.js.map +1 -0
  86. package/esm2015/lib/animations/fade.animations.js +1 -1
  87. package/esm2015/lib/animations/fade.animations.js.map +1 -0
  88. package/esm2015/lib/animations/index.js +1 -1
  89. package/esm2015/lib/animations/index.js.map +1 -0
  90. package/esm2015/lib/animations/modal.animations.js +1 -1
  91. package/esm2015/lib/animations/modal.animations.js.map +1 -0
  92. package/esm2015/lib/animations/slide.animations.js +1 -1
  93. package/esm2015/lib/animations/slide.animations.js.map +1 -0
  94. package/esm2015/lib/animations/toast.animations.js +1 -1
  95. package/esm2015/lib/animations/toast.animations.js.map +1 -0
  96. package/esm2015/lib/components/breadcrumb/breadcrumb.component.js +19 -21
  97. package/esm2015/lib/components/breadcrumb/breadcrumb.component.js.map +1 -0
  98. package/esm2015/lib/components/breadcrumb-items/breadcrumb-items.component.js +22 -0
  99. package/esm2015/lib/components/breadcrumb-items/breadcrumb-items.component.js.map +1 -0
  100. package/esm2015/lib/components/button/button.component.js +57 -30
  101. package/esm2015/lib/components/button/button.component.js.map +1 -0
  102. package/esm2015/lib/components/confirmation/confirmation.component.js +14 -8
  103. package/esm2015/lib/components/confirmation/confirmation.component.js.map +1 -0
  104. package/esm2015/lib/components/http-error-wrapper/http-error-wrapper.component.js +25 -20
  105. package/esm2015/lib/components/http-error-wrapper/http-error-wrapper.component.js.map +1 -0
  106. package/esm2015/lib/components/index.js +3 -6
  107. package/esm2015/lib/components/index.js.map +1 -0
  108. package/esm2015/lib/components/loader-bar/loader-bar.component.js +34 -21
  109. package/esm2015/lib/components/loader-bar/loader-bar.component.js.map +1 -0
  110. package/esm2015/lib/components/loading/loading.component.js +20 -13
  111. package/esm2015/lib/components/loading/loading.component.js.map +1 -0
  112. package/esm2015/lib/components/modal/modal-close.directive.js +14 -10
  113. package/esm2015/lib/components/modal/modal-close.directive.js.map +1 -0
  114. package/esm2015/lib/components/modal/modal-ref.service.js +7 -5
  115. package/esm2015/lib/components/modal/modal-ref.service.js.map +1 -0
  116. package/esm2015/lib/components/modal/modal.component.js +57 -65
  117. package/esm2015/lib/components/modal/modal.component.js.map +1 -0
  118. package/esm2015/lib/components/toast/toast.component.js +25 -22
  119. package/esm2015/lib/components/toast/toast.component.js.map +1 -0
  120. package/esm2015/lib/components/toast-container/toast-container.component.js +25 -16
  121. package/esm2015/lib/components/toast-container/toast-container.component.js.map +1 -0
  122. package/esm2015/lib/constants/styles.js +1 -1
  123. package/esm2015/lib/constants/styles.js.map +1 -0
  124. package/esm2015/lib/constants/validation.js +1 -1
  125. package/esm2015/lib/constants/validation.js.map +1 -0
  126. package/esm2015/lib/directives/ellipsis.directive.js +40 -24
  127. package/esm2015/lib/directives/ellipsis.directive.js.map +1 -0
  128. package/esm2015/lib/directives/index.js +2 -3
  129. package/esm2015/lib/directives/index.js.map +1 -0
  130. package/esm2015/lib/directives/loading.directive.js +20 -17
  131. package/esm2015/lib/directives/loading.directive.js.map +1 -0
  132. package/esm2015/lib/directives/ngx-datatable-default.directive.js +21 -16
  133. package/esm2015/lib/directives/ngx-datatable-default.directive.js.map +1 -0
  134. package/esm2015/lib/directives/ngx-datatable-list.directive.js +22 -18
  135. package/esm2015/lib/directives/ngx-datatable-list.directive.js.map +1 -0
  136. package/esm2015/lib/enums/index.js +1 -1
  137. package/esm2015/lib/enums/index.js.map +1 -0
  138. package/esm2015/lib/enums/route-names.js +1 -1
  139. package/esm2015/lib/enums/route-names.js.map +1 -0
  140. package/esm2015/lib/handlers/error.handler.js +28 -37
  141. package/esm2015/lib/handlers/error.handler.js.map +1 -0
  142. package/esm2015/lib/handlers/index.js +1 -1
  143. package/esm2015/lib/handlers/index.js.map +1 -0
  144. package/esm2015/lib/handlers/lazy-style.handler.js +9 -10
  145. package/esm2015/lib/handlers/lazy-style.handler.js.map +1 -0
  146. package/esm2015/lib/models/common.js +1 -1
  147. package/esm2015/lib/models/common.js.map +1 -0
  148. package/esm2015/lib/models/confirmation.js +1 -1
  149. package/esm2015/lib/models/confirmation.js.map +1 -0
  150. package/esm2015/lib/models/index.js +1 -1
  151. package/esm2015/lib/models/index.js.map +1 -0
  152. package/esm2015/lib/models/nav-item.js +1 -1
  153. package/esm2015/lib/models/nav-item.js.map +1 -0
  154. package/esm2015/lib/models/statistics.js +1 -1
  155. package/esm2015/lib/models/statistics.js.map +1 -0
  156. package/esm2015/lib/models/toaster.js +1 -1
  157. package/esm2015/lib/models/toaster.js.map +1 -0
  158. package/esm2015/lib/providers/index.js +1 -1
  159. package/esm2015/lib/providers/index.js.map +1 -0
  160. package/esm2015/lib/providers/ng-bootstrap-config.provider.js +1 -1
  161. package/esm2015/lib/providers/ng-bootstrap-config.provider.js.map +1 -0
  162. package/esm2015/lib/providers/route.provider.js +1 -1
  163. package/esm2015/lib/providers/route.provider.js.map +1 -0
  164. package/esm2015/lib/services/confirmation.service.js +7 -8
  165. package/esm2015/lib/services/confirmation.service.js.map +1 -0
  166. package/esm2015/lib/services/index.js +2 -3
  167. package/esm2015/lib/services/index.js.map +1 -0
  168. package/esm2015/lib/services/nav-items.service.js +7 -5
  169. package/esm2015/lib/services/nav-items.service.js.map +1 -0
  170. package/esm2015/lib/services/page-alert.service.js +7 -6
  171. package/esm2015/lib/services/page-alert.service.js.map +1 -0
  172. package/esm2015/lib/services/toaster.service.js +22 -21
  173. package/esm2015/lib/services/toaster.service.js.map +1 -0
  174. package/esm2015/lib/theme-shared.module.js +72 -39
  175. package/esm2015/lib/theme-shared.module.js.map +1 -0
  176. package/esm2015/lib/tokens/append-content.token.js +1 -3
  177. package/esm2015/lib/tokens/append-content.token.js.map +1 -0
  178. package/esm2015/lib/tokens/http-error.token.js +1 -1
  179. package/esm2015/lib/tokens/http-error.token.js.map +1 -0
  180. package/esm2015/lib/tokens/index.js +1 -1
  181. package/esm2015/lib/tokens/index.js.map +1 -0
  182. package/esm2015/lib/tokens/lazy-styles.token.js +1 -1
  183. package/esm2015/lib/tokens/lazy-styles.token.js.map +1 -0
  184. package/esm2015/lib/tokens/ngx-datatable-messages.token.js +1 -1
  185. package/esm2015/lib/tokens/ngx-datatable-messages.token.js.map +1 -0
  186. package/esm2015/lib/tokens/suppress-unsaved-changes-warning.token.js +1 -2
  187. package/esm2015/lib/tokens/suppress-unsaved-changes-warning.token.js.map +1 -0
  188. package/esm2015/lib/utils/date-parser-formatter.js +13 -10
  189. package/esm2015/lib/utils/date-parser-formatter.js.map +1 -0
  190. package/esm2015/lib/utils/index.js +1 -2
  191. package/esm2015/lib/utils/index.js.map +1 -0
  192. package/esm2015/lib/utils/validation-utils.js +1 -1
  193. package/esm2015/lib/utils/validation-utils.js.map +1 -0
  194. package/esm2015/public-api.js +1 -1
  195. package/esm2015/public-api.js.map +1 -0
  196. package/esm2015/testing/abp-ng.theme.shared-testing.js +1 -1
  197. package/esm2015/testing/abp-ng.theme.shared-testing.js.map +1 -0
  198. package/esm2015/testing/lib/models/config.js +1 -1
  199. package/esm2015/testing/lib/models/config.js.map +1 -0
  200. package/esm2015/testing/lib/models/index.js +1 -1
  201. package/esm2015/testing/lib/models/index.js.map +1 -0
  202. package/esm2015/testing/lib/theme-shared-testing.module.js +12 -7
  203. package/esm2015/testing/lib/theme-shared-testing.module.js.map +1 -0
  204. package/esm2015/testing/public-api.js +1 -1
  205. package/esm2015/testing/public-api.js.map +1 -0
  206. package/extensions/abp-ng.theme.shared-extensions.d.ts +1 -4
  207. package/extensions/lib/adapters/date-time.adapter.d.ts +3 -0
  208. package/extensions/lib/adapters/date.adapter.d.ts +3 -0
  209. package/extensions/lib/adapters/time.adapter.d.ts +3 -0
  210. package/extensions/lib/components/abstract-actions/abstract-actions.component.d.ts +3 -0
  211. package/extensions/lib/components/date-time-picker/date-time-picker.component.d.ts +3 -0
  212. package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +3 -0
  213. package/extensions/lib/components/extensible-form/extensible-form.component.d.ts +3 -0
  214. package/extensions/lib/components/extensible-table/extensible-table.component.d.ts +9 -4
  215. package/extensions/lib/components/grid-actions/grid-actions.component.d.ts +3 -0
  216. package/extensions/lib/components/page-toolbar/page-toolbar.component.d.ts +3 -0
  217. package/extensions/lib/directives/disabled.directive.d.ts +3 -0
  218. package/extensions/lib/directives/prop-data.directive.d.ts +3 -0
  219. package/extensions/lib/models/entity-props.d.ts +5 -2
  220. package/extensions/lib/services/extensions.service.d.ts +3 -0
  221. package/extensions/lib/tokens/extensions.token.d.ts +3 -1
  222. package/extensions/lib/ui-extensions.module.d.ts +19 -0
  223. package/extensions/lib/utils/state.util.d.ts +1 -1
  224. package/extensions/package.json +0 -1
  225. package/fesm2015/abp-ng.theme.shared-extensions.js +540 -409
  226. package/fesm2015/abp-ng.theme.shared-extensions.js.map +1 -1
  227. package/fesm2015/abp-ng.theme.shared-testing.js +11 -6
  228. package/fesm2015/abp-ng.theme.shared-testing.js.map +1 -1
  229. package/fesm2015/abp-ng.theme.shared.js +645 -917
  230. package/fesm2015/abp-ng.theme.shared.js.map +1 -1
  231. package/lib/components/breadcrumb/breadcrumb.component.d.ts +3 -0
  232. package/lib/components/breadcrumb-items/breadcrumb-items.component.d.ts +6 -0
  233. package/lib/components/button/button.component.d.ts +4 -1
  234. package/lib/components/confirmation/confirmation.component.d.ts +3 -0
  235. package/lib/components/http-error-wrapper/http-error-wrapper.component.d.ts +6 -3
  236. package/lib/components/index.d.ts +2 -5
  237. package/lib/components/loader-bar/loader-bar.component.d.ts +3 -0
  238. package/lib/components/loading/loading.component.d.ts +4 -4
  239. package/lib/components/modal/modal-close.directive.d.ts +3 -0
  240. package/lib/components/modal/modal-ref.service.d.ts +3 -0
  241. package/lib/components/modal/modal.component.d.ts +4 -18
  242. package/lib/components/toast/toast.component.d.ts +5 -4
  243. package/lib/components/toast-container/toast-container.component.d.ts +5 -1
  244. package/lib/directives/ellipsis.directive.d.ts +6 -0
  245. package/lib/directives/index.d.ts +1 -2
  246. package/lib/directives/loading.directive.d.ts +3 -0
  247. package/lib/directives/ngx-datatable-default.directive.d.ts +3 -0
  248. package/lib/directives/ngx-datatable-list.directive.d.ts +3 -0
  249. package/lib/handlers/error.handler.d.ts +9 -7
  250. package/lib/handlers/lazy-style.handler.d.ts +3 -0
  251. package/lib/models/confirmation.d.ts +3 -3
  252. package/lib/models/toaster.d.ts +5 -5
  253. package/lib/providers/ng-bootstrap-config.provider.d.ts +1 -1
  254. package/lib/providers/route.provider.d.ts +1 -1
  255. package/lib/services/confirmation.service.d.ts +3 -0
  256. package/lib/services/index.d.ts +1 -2
  257. package/lib/services/nav-items.service.d.ts +3 -0
  258. package/lib/services/page-alert.service.d.ts +3 -0
  259. package/lib/services/toaster.service.d.ts +4 -1
  260. package/lib/theme-shared.module.d.ts +26 -0
  261. package/lib/utils/date-parser-formatter.d.ts +3 -0
  262. package/lib/utils/index.d.ts +0 -1
  263. package/package.json +4 -6
  264. package/testing/abp-ng.theme.shared-testing.d.ts +1 -0
  265. package/testing/lib/theme-shared-testing.module.d.ts +6 -0
  266. package/testing/package.json +0 -1
  267. package/abp-ng.theme.shared.metadata.json +0 -1
  268. package/bundles/abp-ng.theme.shared-extensions-testing.umd.js +0 -28
  269. package/bundles/abp-ng.theme.shared-extensions-testing.umd.js.map +0 -1
  270. package/bundles/abp-ng.theme.shared-extensions-testing.umd.min.js +0 -2
  271. package/bundles/abp-ng.theme.shared-extensions-testing.umd.min.js.map +0 -1
  272. package/bundles/abp-ng.theme.shared-extensions.umd.min.js +0 -17
  273. package/bundles/abp-ng.theme.shared-extensions.umd.min.js.map +0 -1
  274. package/bundles/abp-ng.theme.shared-testing.umd.min.js +0 -2
  275. package/bundles/abp-ng.theme.shared-testing.umd.min.js.map +0 -1
  276. package/bundles/abp-ng.theme.shared.umd.min.js +0 -2
  277. package/bundles/abp-ng.theme.shared.umd.min.js.map +0 -1
  278. package/esm2015/extensions/testing/abp-ng.theme.shared-extensions-testing.js +0 -5
  279. package/esm2015/extensions/testing/lib/ui-extensions-testing.module.js +0 -11
  280. package/esm2015/extensions/testing/public-api.js +0 -2
  281. package/esm2015/lib/components/chart/chart.component.js +0 -120
  282. package/esm2015/lib/components/modal/modal-container.component.js +0 -16
  283. package/esm2015/lib/components/sort-order-icon/sort-order-icon.component.js +0 -62
  284. package/esm2015/lib/components/table/table.component.js +0 -71
  285. package/esm2015/lib/components/table-empty-message/table-empty-message.component.js +0 -29
  286. package/esm2015/lib/directives/table-sort.directive.js +0 -43
  287. package/esm2015/lib/services/modal.service.js +0 -46
  288. package/esm2015/lib/utils/widget-utils.js +0 -13
  289. package/extensions/abp-ng.theme.shared-extensions.metadata.json +0 -1
  290. package/extensions/testing/abp-ng.theme.shared-extensions-testing.d.ts +0 -4
  291. package/extensions/testing/abp-ng.theme.shared-extensions-testing.metadata.json +0 -1
  292. package/extensions/testing/lib/ui-extensions-testing.module.d.ts +0 -2
  293. package/extensions/testing/package.json +0 -11
  294. package/extensions/testing/public-api.d.ts +0 -1
  295. package/fesm2015/abp-ng.theme.shared-extensions-testing.js +0 -18
  296. package/fesm2015/abp-ng.theme.shared-extensions-testing.js.map +0 -1
  297. package/lib/components/chart/chart.component.d.ts +0 -30
  298. package/lib/components/modal/modal-container.component.d.ts +0 -7
  299. package/lib/components/sort-order-icon/sort-order-icon.component.d.ts +0 -18
  300. package/lib/components/table/table.component.d.ts +0 -30
  301. package/lib/components/table-empty-message/table-empty-message.component.d.ts +0 -7
  302. package/lib/directives/table-sort.directive.d.ts +0 -21
  303. package/lib/services/modal.service.d.ts +0 -16
  304. package/lib/utils/widget-utils.d.ts +0 -3
  305. package/testing/abp-ng.theme.shared-testing.metadata.json +0 -1
@@ -1,15 +1,21 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, ChangeDetectionStrategy, Optional, SkipSelf, ChangeDetectorRef, Input, ViewChild, InjectionToken, Inject, ViewChildren, LOCALE_ID, Injector, Directive, Host, TemplateRef, ViewContainerRef, NgModule } from '@angular/core';
2
+ import { Injectable, Optional, SkipSelf, Component, ChangeDetectionStrategy, Input, ViewChild, Directive, Host, InjectionToken, Inject, ViewChildren, Injector, LOCALE_ID, NgModule } from '@angular/core';
3
+ import * as i5 from '@angular/common';
3
4
  import { formatDate } from '@angular/common';
5
+ import * as i2 from '@ng-bootstrap/ng-bootstrap';
4
6
  import { NgbDateAdapter, NgbTimeAdapter, NgbInputDatepicker, NgbTimepicker, NgbDatepickerModule, NgbDropdownModule, NgbTimepickerModule, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
5
- import { ControlContainer, FormGroupDirective, Validators, NgControl, FormGroup, FormControl } from '@angular/forms';
6
- import { RestService, TrackByService, ConfigStateService, AbpValidators, PermissionService, getShortDateShortTimeFormat, getShortTimeFormat, getShortDateFormat, CoreModule, LocalizationService, createLocalizationPipeKeyGenerator } from '@abp/ng.core';
7
+ import * as i2$1 from '@angular/forms';
8
+ import { ControlContainer, Validators, FormGroup, FormControl } from '@angular/forms';
9
+ import { LinkedList } from '@abp/utils';
10
+ import * as i6 from '@ngx-validate/core';
11
+ import { NgxValidateCoreModule } from '@ngx-validate/core';
12
+ import * as i1 from '@abp/ng.core';
13
+ import { RestService, AbpValidators, PermissionService, getShortDateShortTimeFormat, getShortTimeFormat, getShortDateFormat, CoreModule, LocalizationService, createLocalizationPipeKeyGenerator } from '@abp/ng.core';
7
14
  import { of, merge, pipe, zip } from 'rxjs';
8
15
  import { map, debounceTime, distinctUntilChanged, switchMap, filter, take } from 'rxjs/operators';
9
- import snq from 'snq';
10
- import { LinkedList } from '@abp/utils';
16
+ import * as i2$2 from '@swimlane/ngx-datatable';
17
+ import * as i4 from '@abp/ng.theme.shared';
11
18
  import { ThemeSharedModule } from '@abp/ng.theme.shared';
12
- import { NgxValidateCoreModule } from '@ngx-validate/core';
13
19
 
14
20
  class DateTimeAdapter {
15
21
  fromModel(value) {
@@ -37,9 +43,11 @@ class DateTimeAdapter {
37
43
  return new Date(date).toISOString();
38
44
  }
39
45
  }
40
- DateTimeAdapter.decorators = [
41
- { type: Injectable }
42
- ];
46
+ DateTimeAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DateTimeAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
47
+ DateTimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DateTimeAdapter });
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DateTimeAdapter, decorators: [{
49
+ type: Injectable
50
+ }] });
43
51
 
44
52
  class DateAdapter extends NgbDateAdapter {
45
53
  fromModel(value) {
@@ -72,9 +80,11 @@ class DateAdapter extends NgbDateAdapter {
72
80
  return new Date(dateUtc.getTime() + Math.abs(dateUtc.getTimezoneOffset() * 60000));
73
81
  }
74
82
  }
75
- DateAdapter.decorators = [
76
- { type: Injectable }
77
- ];
83
+ DateAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
84
+ DateAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DateAdapter });
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DateAdapter, decorators: [{
86
+ type: Injectable
87
+ }] });
78
88
 
79
89
  class TimeAdapter extends NgbTimeAdapter {
80
90
  fromModel(value) {
@@ -99,18 +109,119 @@ class TimeAdapter extends NgbTimeAdapter {
99
109
  return formattedDate;
100
110
  }
101
111
  }
102
- TimeAdapter.decorators = [
103
- { type: Injectable }
104
- ];
112
+ TimeAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TimeAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
113
+ TimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TimeAdapter });
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TimeAdapter, decorators: [{
115
+ type: Injectable
116
+ }] });
105
117
  function isTimeStr(value) {
106
118
  return /^((2[123])|[01][0-9])(\:[0-5][0-9]){1,2}$/.test(String(value));
107
119
  }
108
120
 
121
+ class PropList extends LinkedList {
122
+ }
123
+ class PropData {
124
+ get data() {
125
+ return {
126
+ getInjected: this.getInjected,
127
+ index: this.index,
128
+ record: this.record,
129
+ };
130
+ }
131
+ }
132
+ class Prop {
133
+ constructor(type, name, displayName, permission, visible = _ => true, isExtra = false) {
134
+ this.type = type;
135
+ this.name = name;
136
+ this.displayName = displayName;
137
+ this.permission = permission;
138
+ this.visible = visible;
139
+ this.isExtra = isExtra;
140
+ this.displayName = this.displayName || this.name;
141
+ }
142
+ }
143
+ class PropsFactory {
144
+ constructor() {
145
+ this.contributorCallbacks = {};
146
+ }
147
+ get(name) {
148
+ this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
149
+ return new this._ctor(this.contributorCallbacks[name]);
150
+ }
151
+ }
152
+ class Props {
153
+ constructor(callbackList) {
154
+ this.callbackList = callbackList;
155
+ }
156
+ get props() {
157
+ const propList = new this._ctor();
158
+ this.callbackList.forEach(callback => callback(propList));
159
+ return propList;
160
+ }
161
+ addContributor(contributeCallback) {
162
+ this.callbackList.push(contributeCallback);
163
+ }
164
+ clearContributors() {
165
+ while (this.callbackList.length)
166
+ this.callbackList.pop();
167
+ }
168
+ }
169
+
170
+ class FormPropList extends PropList {
171
+ }
172
+ class FormProps extends Props {
173
+ constructor() {
174
+ super(...arguments);
175
+ this._ctor = FormPropList;
176
+ }
177
+ }
178
+ class CreateFormPropsFactory extends PropsFactory {
179
+ constructor() {
180
+ super(...arguments);
181
+ this._ctor = FormProps;
182
+ }
183
+ }
184
+ class EditFormPropsFactory extends PropsFactory {
185
+ constructor() {
186
+ super(...arguments);
187
+ this._ctor = FormProps;
188
+ }
189
+ }
190
+ class FormProp extends Prop {
191
+ constructor(options) {
192
+ super(options.type, options.name, options.displayName, options.permission, options.visible, options.isExtra);
193
+ this.asyncValidators = options.asyncValidators || (_ => []);
194
+ this.validators = options.validators || (_ => []);
195
+ this.disabled = options.disabled || (_ => false);
196
+ this.readonly = options.readonly || (_ => false);
197
+ this.autocomplete = options.autocomplete || 'off';
198
+ this.options = options.options;
199
+ this.id = options.id || options.name;
200
+ const defaultValue = options.defaultValue;
201
+ this.defaultValue = isFalsyValue(defaultValue) ? defaultValue : defaultValue || null;
202
+ }
203
+ static create(options) {
204
+ return new FormProp(options);
205
+ }
206
+ static createMany(arrayOfOptions) {
207
+ return arrayOfOptions.map(FormProp.create);
208
+ }
209
+ }
210
+ class FormPropData extends PropData {
211
+ constructor(injector, record) {
212
+ super();
213
+ this.record = record;
214
+ this.getInjected = injector.get.bind(injector);
215
+ }
216
+ }
217
+ function isFalsyValue(defaultValue) {
218
+ return [0, '', false].indexOf(defaultValue) > -1;
219
+ }
220
+
109
221
  function selfFactory(dependency) {
110
222
  return dependency;
111
223
  }
112
224
 
113
- const ɵ0$2 = selfFactory;
114
225
  class DateTimePickerComponent {
115
226
  constructor(cdRef) {
116
227
  this.cdRef = cdRef;
@@ -123,11 +234,46 @@ class DateTimePickerComponent {
123
234
  this.time.writeValue(datestr);
124
235
  }
125
236
  }
126
- DateTimePickerComponent.decorators = [
127
- { type: Component, args: [{
128
- exportAs: 'abpDateTimePicker',
129
- selector: 'abp-date-time-picker',
130
- template: `
237
+ DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
238
+ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", 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: `
239
+ <input
240
+ [id]="prop.id"
241
+ [formControlName]="prop.name"
242
+ (ngModelChange)="setTime($event)"
243
+ (click)="datepicker.open()"
244
+ (keyup.space)="datepicker.open()"
245
+ ngbDatepicker
246
+ #datepicker="ngbDatepicker"
247
+ type="text"
248
+ class="form-control"
249
+ />
250
+ <ngb-timepicker
251
+ #timepicker
252
+ [formControlName]="prop.name"
253
+ (ngModelChange)="setDate($event)"
254
+ [meridian]="meridian"
255
+ ></ngb-timepicker>
256
+ `, isInline: true, components: [{ type: i2.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"] }], directives: [{ type: i2.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekdays", "showWeekNumbers", "startDate", "container", "positionTarget"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i6.ValidationDirective, selector: "[formControl],[formControlName]", inputs: ["blueprints", "errorTemplate", "invalidClasses", "mapErrorsFn", "skipValidation", "targetSelector", "validateOnSubmit"] }], viewProviders: [
257
+ {
258
+ provide: ControlContainer,
259
+ useFactory: selfFactory,
260
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
261
+ },
262
+ {
263
+ provide: NgbDateAdapter,
264
+ useClass: DateTimeAdapter,
265
+ },
266
+ {
267
+ provide: NgbTimeAdapter,
268
+ useClass: DateTimeAdapter,
269
+ },
270
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DateTimePickerComponent, decorators: [{
272
+ type: Component,
273
+ args: [{
274
+ exportAs: 'abpDateTimePicker',
275
+ selector: 'abp-date-time-picker',
276
+ template: `
131
277
  <input
132
278
  [id]="prop.id"
133
279
  [formControlName]="prop.name"
@@ -146,33 +292,34 @@ DateTimePickerComponent.decorators = [
146
292
  [meridian]="meridian"
147
293
  ></ngb-timepicker>
148
294
  `,
149
- changeDetection: ChangeDetectionStrategy.OnPush,
150
- viewProviders: [
151
- {
152
- provide: ControlContainer,
153
- useFactory: ɵ0$2,
154
- deps: [[new Optional(), new SkipSelf(), ControlContainer]],
155
- },
156
- {
157
- provide: NgbDateAdapter,
158
- useClass: DateTimeAdapter,
159
- },
160
- {
161
- provide: NgbTimeAdapter,
162
- useClass: DateTimeAdapter,
163
- },
164
- ]
165
- },] }
166
- ];
167
- DateTimePickerComponent.ctorParameters = () => [
168
- { type: ChangeDetectorRef }
169
- ];
170
- DateTimePickerComponent.propDecorators = {
171
- prop: [{ type: Input }],
172
- meridian: [{ type: Input }],
173
- date: [{ type: ViewChild, args: [NgbInputDatepicker,] }],
174
- time: [{ type: ViewChild, args: [NgbTimepicker,] }]
175
- };
295
+ changeDetection: ChangeDetectionStrategy.OnPush,
296
+ viewProviders: [
297
+ {
298
+ provide: ControlContainer,
299
+ useFactory: selfFactory,
300
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
301
+ },
302
+ {
303
+ provide: NgbDateAdapter,
304
+ useClass: DateTimeAdapter,
305
+ },
306
+ {
307
+ provide: NgbTimeAdapter,
308
+ useClass: DateTimeAdapter,
309
+ },
310
+ ],
311
+ }]
312
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { prop: [{
313
+ type: Input
314
+ }], meridian: [{
315
+ type: Input
316
+ }], date: [{
317
+ type: ViewChild,
318
+ args: [NgbInputDatepicker]
319
+ }], time: [{
320
+ type: ViewChild,
321
+ args: [NgbTimepicker]
322
+ }] } });
176
323
 
177
324
  const EXTRA_PROPERTIES_KEY = 'extraProperties';
178
325
 
@@ -225,7 +372,30 @@ function removeTypeaheadTextSuffix(name) {
225
372
  return name.replace(TYPEAHEAD_TEXT_SUFFIX_REGEX, '');
226
373
  }
227
374
 
228
- const ɵ0$1 = selfFactory;
375
+ class DisabledDirective {
376
+ constructor(ngControl) {
377
+ this.ngControl = ngControl;
378
+ }
379
+ // Related issue: https://github.com/angular/angular/issues/35330
380
+ ngOnChanges({ abpDisabled }) {
381
+ if (this.ngControl.control && abpDisabled) {
382
+ this.ngControl.control[abpDisabled.currentValue ? 'disable' : 'enable']();
383
+ }
384
+ }
385
+ }
386
+ DisabledDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DisabledDirective, deps: [{ token: i2$1.NgControl, host: true }], target: i0.ɵɵFactoryTarget.Directive });
387
+ DisabledDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: DisabledDirective, selector: "[abpDisabled]", inputs: { abpDisabled: "abpDisabled" }, usesOnChanges: true, ngImport: i0 });
388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: DisabledDirective, decorators: [{
389
+ type: Directive,
390
+ args: [{
391
+ selector: '[abpDisabled]',
392
+ }]
393
+ }], ctorParameters: function () { return [{ type: i2$1.NgControl, decorators: [{
394
+ type: Host
395
+ }] }]; }, propDecorators: { abpDisabled: [{
396
+ type: Input
397
+ }] } });
398
+
229
399
  class ExtensibleFormPropComponent {
230
400
  constructor(cdRef, track, configState, groupDirective) {
231
401
  this.cdRef = cdRef;
@@ -312,7 +482,7 @@ class ExtensibleFormPropComponent {
312
482
  }
313
483
  }
314
484
  ngOnChanges({ prop }) {
315
- const currentProp = snq(() => prop.currentValue);
485
+ const currentProp = prop === null || prop === void 0 ? void 0 : prop.currentValue;
316
486
  const { options, readonly, disabled, validators } = currentProp || {};
317
487
  if (options)
318
488
  this.options$ = options(this.data);
@@ -329,39 +499,46 @@ class ExtensibleFormPropComponent {
329
499
  this.typeaheadModel = { key: keyControl.value, value: valueControl.value };
330
500
  }
331
501
  }
332
- ExtensibleFormPropComponent.decorators = [
333
- { type: Component, args: [{
334
- selector: 'abp-extensible-form-prop',
335
- template: "<div class=\"form-group\" *abpPermission=\"prop.permission\" [ngSwitch]=\"getComponent(prop)\">\n <ng-template ngSwitchCase=\"input\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <input\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [autocomplete]=\"prop.autocomplete\"\n [type]=\"getType(prop)\"\n [abpDisabled]=\"disabled\"\n [readonly]=\"readonly\"\n class=\"form-control\"\n />\n </ng-template>\n\n <ng-template ngSwitchCase=\"hidden\">\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\n </ng-template>\n\n <ng-template ngSwitchCase=\"checkbox\">\n <div class=\"custom-checkbox custom-control\" validationTarget>\n <input\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n type=\"checkbox\"\n class=\"custom-control-input\"\n />\n <ng-template\n [ngTemplateOutlet]=\"label\"\n [ngTemplateOutletContext]=\"{ $implicit: 'custom-control-label' }\"\n ></ng-template>\n </div>\n </ng-template>\n\n <ng-template ngSwitchCase=\"select\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <select\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n class=\"custom-select form-control\"\n >\n <option\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\n [ngValue]=\"option.value\"\n >\n {{ option.key }}\n </option>\n </select>\n </ng-template>\n\n <ng-template ngSwitchCase=\"multiselect\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <select\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n multiple=\"multiple\"\n class=\"custom-select form-control\"\n >\n <option\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\n [ngValue]=\"option.value\"\n >\n {{ option.key }}\n </option>\n </select>\n </ng-template>\n\n <ng-template ngSwitchCase=\"typeahead\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\n <input\n #field\n [id]=\"prop.id\"\n [autocomplete]=\"prop.autocomplete\"\n [abpDisabled]=\"disabled\"\n [ngbTypeahead]=\"search\"\n [editable]=\"false\"\n [inputFormatter]=\"typeaheadFormatter\"\n [resultFormatter]=\"typeaheadFormatter\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"typeaheadModel\"\n (selectItem)=\"setTypeaheadValue($event.item)\"\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\n class=\"form-control\"\n />\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\n </div>\n </ng-template>\n\n <ng-template ngSwitchCase=\"date\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <input\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n (click)=\"datepicker.open()\"\n (keyup.space)=\"datepicker.open()\"\n ngbDatepicker\n #datepicker=\"ngbDatepicker\"\n type=\"text\"\n class=\"form-control\"\n />\n </ng-template>\n\n <ng-template ngSwitchCase=\"time\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\n </ng-template>\n\n <ng-template ngSwitchCase=\"dateTime\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\n </ng-template>\n\n <ng-template ngSwitchCase=\"textarea\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <textarea\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n [readonly]=\"readonly\"\n class=\"form-control\"\n ></textarea>\n </ng-template>\n</div>\n\n<ng-template #label let-classes>\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes\"\n >{{ prop.displayName | abpLocalization }} {{ asterisk }}</label\n >\n</ng-template>\n",
336
- changeDetection: ChangeDetectionStrategy.OnPush,
337
- viewProviders: [
338
- {
339
- provide: ControlContainer,
340
- useFactory: ɵ0$1,
341
- deps: [[new Optional(), new SkipSelf(), ControlContainer]],
342
- },
343
- { provide: NgbDateAdapter, useClass: DateAdapter },
344
- { provide: NgbTimeAdapter, useClass: TimeAdapter },
345
- ]
346
- },] }
347
- ];
348
- ExtensibleFormPropComponent.ctorParameters = () => [
349
- { type: ChangeDetectorRef },
350
- { type: TrackByService },
351
- { type: ConfigStateService },
352
- { type: FormGroupDirective }
353
- ];
354
- ExtensibleFormPropComponent.propDecorators = {
355
- data: [{ type: Input }],
356
- prop: [{ type: Input }],
357
- first: [{ type: Input }],
358
- fieldRef: [{ type: ViewChild, args: ['field',] }]
359
- };
502
+ ExtensibleFormPropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensibleFormPropComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TrackByService }, { token: i1.ConfigStateService }, { token: i2$1.FormGroupDirective }], target: i0.ɵɵFactoryTarget.Component });
503
+ ExtensibleFormPropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", 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: "<div class=\"form-group\" *abpPermission=\"prop.permission\" [ngSwitch]=\"getComponent(prop)\">\n <ng-template ngSwitchCase=\"input\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <input\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [autocomplete]=\"prop.autocomplete\"\n [type]=\"getType(prop)\"\n [abpDisabled]=\"disabled\"\n [readonly]=\"readonly\"\n class=\"form-control\"\n />\n </ng-template>\n\n <ng-template ngSwitchCase=\"hidden\">\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\n </ng-template>\n\n <ng-template ngSwitchCase=\"checkbox\">\n <div class=\"custom-checkbox custom-control\" validationTarget>\n <input\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n type=\"checkbox\"\n class=\"custom-control-input\"\n />\n <ng-template\n [ngTemplateOutlet]=\"label\"\n [ngTemplateOutletContext]=\"{ $implicit: 'custom-control-label' }\"\n ></ng-template>\n </div>\n </ng-template>\n\n <ng-template ngSwitchCase=\"select\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <select\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n class=\"custom-select form-control\"\n >\n <option\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\n [ngValue]=\"option.value\"\n >\n {{ option.key }}\n </option>\n </select>\n </ng-template>\n\n <ng-template ngSwitchCase=\"multiselect\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <select\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n multiple=\"multiple\"\n class=\"custom-select form-control\"\n >\n <option\n *ngFor=\"let option of options$ | async; trackBy: track.by('value')\"\n [ngValue]=\"option.value\"\n >\n {{ option.key }}\n </option>\n </select>\n </ng-template>\n\n <ng-template ngSwitchCase=\"typeahead\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <div #typeahead class=\"position-relative\" validationStyle validationTarget>\n <input\n #field\n [id]=\"prop.id\"\n [autocomplete]=\"prop.autocomplete\"\n [abpDisabled]=\"disabled\"\n [ngbTypeahead]=\"search\"\n [editable]=\"false\"\n [inputFormatter]=\"typeaheadFormatter\"\n [resultFormatter]=\"typeaheadFormatter\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"typeaheadModel\"\n (selectItem)=\"setTypeaheadValue($event.item)\"\n (blur)=\"setTypeaheadValue(typeaheadModel)\"\n [class.is-invalid]=\"typeahead.classList.contains('is-invalid')\"\n class=\"form-control\"\n />\n <input [formControlName]=\"prop.name\" type=\"hidden\" />\n </div>\n </ng-template>\n\n <ng-template ngSwitchCase=\"date\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <input\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n (click)=\"datepicker.open()\"\n (keyup.space)=\"datepicker.open()\"\n ngbDatepicker\n #datepicker=\"ngbDatepicker\"\n type=\"text\"\n class=\"form-control\"\n />\n </ng-template>\n\n <ng-template ngSwitchCase=\"time\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <ngb-timepicker [formControlName]=\"prop.name\"></ngb-timepicker>\n </ng-template>\n\n <ng-template ngSwitchCase=\"dateTime\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <abp-date-time-picker [prop]=\"prop\" [meridian]=\"meridian\"></abp-date-time-picker>\n </ng-template>\n\n <ng-template ngSwitchCase=\"textarea\">\n <ng-template [ngTemplateOutlet]=\"label\"></ng-template>\n <textarea\n #field\n [id]=\"prop.id\"\n [formControlName]=\"prop.name\"\n [abpDisabled]=\"disabled\"\n [readonly]=\"readonly\"\n class=\"form-control\"\n ></textarea>\n </ng-template>\n</div>\n\n<ng-template #label let-classes>\n <label [htmlFor]=\"prop.id\" [ngClass]=\"classes\"\n >{{ prop.displayName | abpLocalization }} {{ asterisk }}</label\n >\n</ng-template>\n", components: [{ type: i2.NgbTimepicker, selector: "ngb-timepicker", inputs: ["meridian", "spinners", "seconds", "hourStep", "minuteStep", "secondStep", "readonlyInputs", "size"] }, { type: DateTimePickerComponent, selector: "abp-date-time-picker", inputs: ["prop", "meridian"], exportAs: ["abpDateTimePicker"] }], directives: [{ type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i6.ValidationDirective, selector: "[formControl],[formControlName]", inputs: ["blueprints", "errorTemplate", "invalidClasses", "mapErrorsFn", "skipValidation", "targetSelector", "validateOnSubmit"] }, { type: DisabledDirective, selector: "[abpDisabled]", inputs: ["abpDisabled"] }, { type: i6.ValidationTargetDirective, selector: "[validationTarget]" }, { type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2$1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { type: i6.ValidationStyleDirective, selector: "[validationStyle]" }, { type: i2.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekdays", "showWeekNumbers", "startDate", "container", "positionTarget"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i5.AsyncPipe, "abpLocalization": i1.LocalizationPipe }, viewProviders: [
504
+ {
505
+ provide: ControlContainer,
506
+ useFactory: selfFactory,
507
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
508
+ },
509
+ { provide: NgbDateAdapter, useClass: DateAdapter },
510
+ { provide: NgbTimeAdapter, useClass: TimeAdapter },
511
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
512
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensibleFormPropComponent, decorators: [{
513
+ type: Component,
514
+ args: [{
515
+ selector: 'abp-extensible-form-prop',
516
+ templateUrl: './extensible-form-prop.component.html',
517
+ changeDetection: ChangeDetectionStrategy.OnPush,
518
+ viewProviders: [
519
+ {
520
+ provide: ControlContainer,
521
+ useFactory: selfFactory,
522
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
523
+ },
524
+ { provide: NgbDateAdapter, useClass: DateAdapter },
525
+ { provide: NgbTimeAdapter, useClass: TimeAdapter },
526
+ ],
527
+ }]
528
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i1.ConfigStateService }, { type: i2$1.FormGroupDirective }]; }, propDecorators: { data: [{
529
+ type: Input
530
+ }], prop: [{
531
+ type: Input
532
+ }], first: [{
533
+ type: Input
534
+ }], fieldRef: [{
535
+ type: ViewChild,
536
+ args: ['field']
537
+ }] } });
360
538
  function isRequired(validator) {
361
539
  return validator === Validators.required || validator === AbpValidators.required;
362
540
  }
363
541
 
364
- /* tslint:disable:variable-name */
365
542
  class ActionList extends LinkedList {
366
543
  }
367
544
  class ActionData {
@@ -435,56 +612,6 @@ class EntityAction extends Action {
435
612
  }
436
613
  }
437
614
 
438
- /* tslint:disable:variable-name */
439
- class PropList extends LinkedList {
440
- }
441
- class PropData {
442
- get data() {
443
- return {
444
- getInjected: this.getInjected,
445
- index: this.index,
446
- record: this.record,
447
- };
448
- }
449
- }
450
- class Prop {
451
- constructor(type, name, displayName, permission, visible = _ => true, isExtra = false) {
452
- this.type = type;
453
- this.name = name;
454
- this.displayName = displayName;
455
- this.permission = permission;
456
- this.visible = visible;
457
- this.isExtra = isExtra;
458
- this.displayName = this.displayName || this.name;
459
- }
460
- }
461
- class PropsFactory {
462
- constructor() {
463
- this.contributorCallbacks = {};
464
- }
465
- get(name) {
466
- this.contributorCallbacks[name] = this.contributorCallbacks[name] || [];
467
- return new this._ctor(this.contributorCallbacks[name]);
468
- }
469
- }
470
- class Props {
471
- constructor(callbackList) {
472
- this.callbackList = callbackList;
473
- }
474
- get props() {
475
- const propList = new this._ctor();
476
- this.callbackList.forEach(callback => callback(propList));
477
- return propList;
478
- }
479
- addContributor(contributeCallback) {
480
- this.callbackList.push(contributeCallback);
481
- }
482
- clearContributors() {
483
- while (this.callbackList.length)
484
- this.callbackList.pop();
485
- }
486
- }
487
-
488
615
  class EntityPropList extends PropList {
489
616
  }
490
617
  class EntityProps extends Props {
@@ -506,6 +633,8 @@ class EntityProp extends Prop {
506
633
  this.sortable = options.sortable || false;
507
634
  this.valueResolver = options.valueResolver || (data => of(data.record[this.name]));
508
635
  this.action = options.action;
636
+ this.component = options.component;
637
+ this.enumList = options.enumList;
509
638
  }
510
639
  static create(options) {
511
640
  return new EntityProp(options);
@@ -515,58 +644,6 @@ class EntityProp extends Prop {
515
644
  }
516
645
  }
517
646
 
518
- class FormPropList extends PropList {
519
- }
520
- class FormProps extends Props {
521
- constructor() {
522
- super(...arguments);
523
- this._ctor = FormPropList;
524
- }
525
- }
526
- class CreateFormPropsFactory extends PropsFactory {
527
- constructor() {
528
- super(...arguments);
529
- this._ctor = FormProps;
530
- }
531
- }
532
- class EditFormPropsFactory extends PropsFactory {
533
- constructor() {
534
- super(...arguments);
535
- this._ctor = FormProps;
536
- }
537
- }
538
- class FormProp extends Prop {
539
- constructor(options) {
540
- super(options.type, options.name, options.displayName, options.permission, options.visible, options.isExtra);
541
- this.asyncValidators = options.asyncValidators || (_ => []);
542
- this.validators = options.validators || (_ => []);
543
- this.disabled = options.disabled || (_ => false);
544
- this.readonly = options.readonly || (_ => false);
545
- this.autocomplete = options.autocomplete || 'off';
546
- this.options = options.options;
547
- this.id = options.id || options.name;
548
- const defaultValue = options.defaultValue;
549
- this.defaultValue = isFalsyValue(defaultValue) ? defaultValue : defaultValue || null;
550
- }
551
- static create(options) {
552
- return new FormProp(options);
553
- }
554
- static createMany(arrayOfOptions) {
555
- return arrayOfOptions.map(FormProp.create);
556
- }
557
- }
558
- class FormPropData extends PropData {
559
- constructor(injector, record) {
560
- super();
561
- this.record = record;
562
- // tslint:disable-next-line
563
- this.getInjected = injector.get.bind(injector);
564
- }
565
- }
566
- function isFalsyValue(defaultValue) {
567
- return [0, '', false].indexOf(defaultValue) > -1;
568
- }
569
-
570
647
  class ToolbarActionList extends ActionList {
571
648
  }
572
649
  class ToolbarActions extends Actions {
@@ -616,19 +693,59 @@ class ExtensionsService {
616
693
  this.editFormProps = new EditFormPropsFactory();
617
694
  }
618
695
  }
619
- ExtensionsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ExtensionsService_Factory() { return new ExtensionsService(); }, token: ExtensionsService, providedIn: "root" });
620
- ExtensionsService.decorators = [
621
- { type: Injectable, args: [{
622
- providedIn: 'root',
623
- },] }
624
- ];
696
+ ExtensionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
697
+ ExtensionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensionsService, providedIn: 'root' });
698
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensionsService, decorators: [{
699
+ type: Injectable,
700
+ args: [{
701
+ providedIn: 'root',
702
+ }]
703
+ }] });
625
704
 
626
705
  const EXTENSIONS_IDENTIFIER = new InjectionToken('EXTENSIONS_IDENTIFIER');
627
706
  const EXTENSIONS_ACTION_TYPE = new InjectionToken('EXTENSIONS_ACTION_TYPE');
628
707
  const EXTENSIONS_ACTION_DATA = new InjectionToken('EXTENSIONS_ACTION_DATA');
629
- const EXTENSIONS_ACTION_CALLBACK = new InjectionToken('EXTENSIONS_ACTION_DATA');
708
+ const EXTENSIONS_ACTION_CALLBACK = new InjectionToken('EXTENSIONS_ACTION_DATA');
709
+ const PROP_DATA_STREAM = new InjectionToken('PROP_DATA_STREAM');
710
+
711
+ /* eslint-disable @angular-eslint/no-input-rename */
712
+ class PropDataDirective extends PropData {
713
+ constructor(tempRef, vcRef, injector) {
714
+ super();
715
+ this.tempRef = tempRef;
716
+ this.vcRef = vcRef;
717
+ this.getInjected = injector.get.bind(injector);
718
+ }
719
+ ngOnChanges() {
720
+ this.vcRef.clear();
721
+ this.vcRef.createEmbeddedView(this.tempRef, {
722
+ $implicit: this.data,
723
+ index: 0,
724
+ });
725
+ }
726
+ ngOnDestroy() {
727
+ this.vcRef.clear();
728
+ }
729
+ }
730
+ PropDataDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: PropDataDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
731
+ PropDataDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: PropDataDirective, selector: "[abpPropData]", inputs: { propList: ["abpPropDataFromList", "propList"], record: ["abpPropDataWithRecord", "record"], index: ["abpPropDataAtIndex", "index"] }, exportAs: ["abpPropData"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: PropDataDirective, decorators: [{
733
+ type: Directive,
734
+ args: [{
735
+ exportAs: 'abpPropData',
736
+ selector: '[abpPropData]',
737
+ }]
738
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.Injector }]; }, propDecorators: { propList: [{
739
+ type: Input,
740
+ args: ['abpPropDataFromList']
741
+ }], record: [{
742
+ type: Input,
743
+ args: ['abpPropDataWithRecord']
744
+ }], index: [{
745
+ type: Input,
746
+ args: ['abpPropDataAtIndex']
747
+ }] } });
630
748
 
631
- const ɵ0 = selfFactory;
632
749
  class ExtensibleFormComponent {
633
750
  constructor(cdRef, track, container, extensions, identifier) {
634
751
  this.cdRef = cdRef;
@@ -650,40 +767,103 @@ class ExtensibleFormComponent {
650
767
  return (this.form.controls.extraProperties || { controls: {} });
651
768
  }
652
769
  }
653
- ExtensibleFormComponent.decorators = [
654
- { type: Component, args: [{
655
- exportAs: 'abpExtensibleForm',
656
- selector: 'abp-extensible-form',
657
- template: "<ng-container *ngIf=\"form\">\n <ng-container *abpPropData=\"let data; fromList: propList; withRecord: record\">\n <ng-container *ngFor=\"let prop of propList; let first = first; trackBy: track.by('name')\">\n <ng-container *ngIf=\"prop.visible(data)\">\n <ng-container\n [formGroupName]=\"extraPropertiesKey\"\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\n >\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"></abp-extensible-form-prop>\n </ng-container>\n\n <ng-template #tempDefault>\n <abp-extensible-form-prop\n *ngIf=\"form.get(prop.name)\"\n [prop]=\"prop\"\n [data]=\"data\"\n [first]=\"first\"\n ></abp-extensible-form-prop>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n",
658
- changeDetection: ChangeDetectionStrategy.OnPush,
659
- viewProviders: [
660
- {
661
- provide: ControlContainer,
662
- useFactory: ɵ0,
663
- deps: [[new Optional(), new SkipSelf(), ControlContainer]],
664
- },
665
- ]
666
- },] }
667
- ];
668
- ExtensibleFormComponent.ctorParameters = () => [
669
- { type: ChangeDetectorRef },
670
- { type: TrackByService },
671
- { type: ControlContainer },
672
- { type: ExtensionsService },
673
- { type: String, decorators: [{ type: Inject, args: [EXTENSIONS_IDENTIFIER,] }] }
674
- ];
675
- ExtensibleFormComponent.propDecorators = {
676
- formProps: [{ type: ViewChildren, args: [ExtensibleFormPropComponent,] }],
677
- selectedRecord: [{ type: Input }]
678
- };
770
+ ExtensibleFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensibleFormComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TrackByService }, { token: i2$1.ControlContainer }, { token: ExtensionsService }, { token: EXTENSIONS_IDENTIFIER }], target: i0.ɵɵFactoryTarget.Component });
771
+ ExtensibleFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", 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\">\n <ng-container *abpPropData=\"let data; fromList: propList; withRecord: record\">\n <ng-container *ngFor=\"let prop of propList; let first = first; trackBy: track.by('name')\">\n <ng-container *ngIf=\"prop.visible(data)\">\n <ng-container\n [formGroupName]=\"extraPropertiesKey\"\n *ngIf=\"extraProperties.controls[prop.name]; else tempDefault\"\n >\n <abp-extensible-form-prop [prop]=\"prop\" [data]=\"data\"></abp-extensible-form-prop>\n </ng-container>\n\n <ng-template #tempDefault>\n <abp-extensible-form-prop\n *ngIf=\"form.get(prop.name)\"\n [prop]=\"prop\"\n [data]=\"data\"\n [first]=\"first\"\n ></abp-extensible-form-prop>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n", components: [{ type: ExtensibleFormPropComponent, selector: "abp-extensible-form-prop", inputs: ["data", "prop", "first"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PropDataDirective, selector: "[abpPropData]", inputs: ["abpPropDataFromList", "abpPropDataWithRecord", "abpPropDataAtIndex"], exportAs: ["abpPropData"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", inputs: ["blueprints", "errorTemplate", "invalidClasses", "mapErrorsFn", "skipValidation", "targetSelector", "validateOnSubmit"] }], viewProviders: [
772
+ {
773
+ provide: ControlContainer,
774
+ useFactory: selfFactory,
775
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
776
+ },
777
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
778
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensibleFormComponent, decorators: [{
779
+ type: Component,
780
+ args: [{
781
+ exportAs: 'abpExtensibleForm',
782
+ selector: 'abp-extensible-form',
783
+ templateUrl: './extensible-form.component.html',
784
+ changeDetection: ChangeDetectionStrategy.OnPush,
785
+ viewProviders: [
786
+ {
787
+ provide: ControlContainer,
788
+ useFactory: selfFactory,
789
+ deps: [[new Optional(), new SkipSelf(), ControlContainer]],
790
+ },
791
+ ],
792
+ }]
793
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TrackByService }, { type: i2$1.ControlContainer }, { type: ExtensionsService }, { type: undefined, decorators: [{
794
+ type: Inject,
795
+ args: [EXTENSIONS_IDENTIFIER]
796
+ }] }]; }, propDecorators: { formProps: [{
797
+ type: ViewChildren,
798
+ args: [ExtensibleFormPropComponent]
799
+ }], selectedRecord: [{
800
+ type: Input
801
+ }] } });
802
+
803
+ // Fix for https://github.com/angular/angular/issues/23904
804
+ // @dynamic
805
+ class AbstractActionsComponent extends ActionData {
806
+ constructor(injector) {
807
+ super();
808
+ this.getInjected = injector.get.bind(injector);
809
+ const extensions = injector.get(ExtensionsService);
810
+ const name = injector.get(EXTENSIONS_IDENTIFIER);
811
+ const type = injector.get(EXTENSIONS_ACTION_TYPE);
812
+ this.actionList = extensions[type].get(name).actions;
813
+ }
814
+ }
815
+ AbstractActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AbstractActionsComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
816
+ AbstractActionsComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: AbstractActionsComponent, inputs: { record: "record" }, usesInheritance: true, ngImport: i0 });
817
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AbstractActionsComponent, decorators: [{
818
+ type: Directive
819
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { record: [{
820
+ type: Input
821
+ }] } });
822
+
823
+ class GridActionsComponent extends AbstractActionsComponent {
824
+ constructor(injector) {
825
+ super(injector);
826
+ this.icon = 'fa fa-cog';
827
+ this.text = '';
828
+ this.trackByFn = (_, item) => item.text;
829
+ }
830
+ }
831
+ GridActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: GridActionsComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
832
+ GridActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: GridActionsComponent, selector: "abp-grid-actions", inputs: { icon: "icon", index: "index", text: "text" }, providers: [
833
+ {
834
+ provide: EXTENSIONS_ACTION_TYPE,
835
+ useValue: 'entityActions',
836
+ },
837
+ ], exportAs: ["abpGridActions"], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"actionList.length > 1\" ngbDropdown container=\"body\" class=\"d-inline-block\">\n <button\n class=\"btn btn-primary btn-sm dropdown-toggle\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n ngbDropdownToggle\n >\n <i [ngClass]=\"icon\" [class.mr-1]=\"icon\"></i>{{ text | abpLocalization }}\n </button>\n <div ngbDropdownMenu>\n <ng-container\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"btnItem\"\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\n >\n </ng-container>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"actionList.length === 1\"\n [ngTemplateOutlet]=\"btnItem\"\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\n></ng-container>\n\n<ng-template #btnItem let-action>\n <ng-container *ngIf=\"action.visible(data)\">\n <button\n ngbDropdownItem\n *abpPermission=\"action.permission\"\n (click)=\"action.action(data)\"\n type=\"button\"\n class=\"{{ actionList.length === 1 ? 'btn btn-primary' : '' }}\"\n [class.text-center]=\"actionList.length === 1\"\n >\n <i [ngClass]=\"action.icon\" [class.mr-1]=\"action.icon\"></i>\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\n <ng-template #ellipsis>\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\n </ng-template>\n </button>\n </ng-container>\n</ng-template>\n", directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i2.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i2.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { type: i4.EllipsisDirective, selector: "[abpEllipsis]", inputs: ["abpEllipsis", "title", "abpEllipsisEnabled"] }], pipes: { "abpLocalization": i1.LocalizationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
838
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: GridActionsComponent, decorators: [{
839
+ type: Component,
840
+ args: [{
841
+ exportAs: 'abpGridActions',
842
+ selector: 'abp-grid-actions',
843
+ templateUrl: './grid-actions.component.html',
844
+ providers: [
845
+ {
846
+ provide: EXTENSIONS_ACTION_TYPE,
847
+ useValue: 'entityActions',
848
+ },
849
+ ],
850
+ changeDetection: ChangeDetectionStrategy.OnPush,
851
+ }]
852
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { icon: [{
853
+ type: Input
854
+ }], index: [{
855
+ type: Input
856
+ }], text: [{
857
+ type: Input
858
+ }] } });
679
859
 
680
860
  const DEFAULT_ACTIONS_COLUMN_WIDTH = 150;
681
861
  class ExtensibleTableComponent {
682
862
  constructor(locale, config, injector) {
683
863
  this.locale = locale;
684
864
  this.config = config;
865
+ this.injector = injector;
685
866
  this.trackByFn = (_, item) => item.name;
686
- // tslint:disable-next-line
687
867
  this.getInjected = injector.get.bind(injector);
688
868
  const extensions = injector.get(ExtensionsService);
689
869
  const name = injector.get(EXTENSIONS_IDENTIFIER);
@@ -720,6 +900,12 @@ class ExtensibleTableComponent {
720
900
  ? '<div class="text-center text-success"><i class="fa fa-check"></i></div>'
721
901
  : '<div class="text-center text-danger"><i class="fa fa-times"></i></div>';
722
902
  }
903
+ getEnum(rowValue, list) {
904
+ if (!list)
905
+ return rowValue;
906
+ const { key } = list.find(({ value }) => value === rowValue);
907
+ return key;
908
+ }
723
909
  getContent(prop, data) {
724
910
  return prop.valueResolver(data).pipe(map(value => {
725
911
  switch (prop.type) {
@@ -731,6 +917,8 @@ class ExtensibleTableComponent {
731
917
  return this.getDate(value, getShortTimeFormat(this.config));
732
918
  case "dateTime" /* DateTime */:
733
919
  return this.getDate(value, getShortDateShortTimeFormat(this.config));
920
+ case "enum" /* Enum */:
921
+ return this.getEnum(value, prop.enumList);
734
922
  default:
735
923
  return value;
736
924
  // More types can be handled in the future
@@ -743,91 +931,53 @@ class ExtensibleTableComponent {
743
931
  this.data = data.currentValue.map((record, index) => {
744
932
  this.propList.forEach(prop => {
745
933
  const propData = { getInjected: this.getInjected, record, index };
746
- record[`_${prop.value.name}`] = {
934
+ const value = this.getContent(prop.value, propData);
935
+ const propKey = `_${prop.value.name}`;
936
+ record[propKey] = {
747
937
  visible: prop.value.visible(propData),
748
- value: this.getContent(prop.value, propData),
938
+ value,
749
939
  };
940
+ if (prop.value.component) {
941
+ const injector = Injector.create([
942
+ {
943
+ provide: PROP_DATA_STREAM,
944
+ useValue: value,
945
+ },
946
+ ], this.injector);
947
+ record[propKey].injector = injector;
948
+ record[propKey].component = prop.value.component;
949
+ }
750
950
  });
751
951
  return record;
752
952
  });
753
953
  }
754
954
  }
755
- ExtensibleTableComponent.decorators = [
756
- { type: Component, args: [{
757
- exportAs: 'abpExtensibleTable',
758
- selector: 'abp-extensible-table',
759
- template: "<ngx-datatable default [rows]=\"data\" [count]=\"recordsTotal\" [list]=\"list\">\n <ngx-datatable-column\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\n [name]=\"actionsText | abpLocalization\"\n [maxWidth]=\"columnWidths[0]\"\n [width]=\"columnWidths[0]\"\n [sortable]=\"false\"\n >\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\n <ng-container\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\n ></ng-container>\n <ng-template #gridActions>\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\n </ng-template>\n </ng-template>\n </ngx-datatable-column>\n\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\n <ngx-datatable-column\n [width]=\"columnWidths[i + 1] || 200\"\n [name]=\"prop.displayName | abpLocalization\"\n [prop]=\"prop.name\"\n [sortable]=\"prop.sortable\"\n >\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\n <ng-container *abpPermission=\"prop.permission\">\n <div\n *ngIf=\"row['_' + prop.name]?.visible\"\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\n (click)=\"\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\n \"\n [class.pointer]=\"prop.action\"\n ></div>\n </ng-container>\n </ng-template>\n </ngx-datatable-column>\n </ng-container>\n</ngx-datatable>\n",
760
- changeDetection: ChangeDetectionStrategy.OnPush
761
- },] }
762
- ];
763
- ExtensibleTableComponent.ctorParameters = () => [
764
- { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] },
765
- { type: ConfigStateService },
766
- { type: Injector }
767
- ];
768
- ExtensibleTableComponent.propDecorators = {
769
- actionsText: [{ type: Input }],
770
- data: [{ type: Input }],
771
- list: [{ type: Input }],
772
- recordsTotal: [{ type: Input }],
773
- actionsColumnWidth: [{ type: Input }],
774
- actionsTemplate: [{ type: Input }]
775
- };
776
-
777
- // tslint:disable: directive-class-suffix
778
- // Fix for https://github.com/angular/angular/issues/23904
779
- // @dynamic
780
- class AbstractActionsComponent extends ActionData {
781
- constructor(injector) {
782
- super();
783
- // tslint:disable-next-line
784
- this.getInjected = injector.get.bind(injector);
785
- const extensions = injector.get(ExtensionsService);
786
- const name = injector.get(EXTENSIONS_IDENTIFIER);
787
- const type = injector.get(EXTENSIONS_ACTION_TYPE);
788
- this.actionList = extensions[type].get(name).actions;
789
- }
790
- }
791
- AbstractActionsComponent.decorators = [
792
- { type: Directive }
793
- ];
794
- AbstractActionsComponent.ctorParameters = () => [
795
- { type: Injector }
796
- ];
797
- AbstractActionsComponent.propDecorators = {
798
- record: [{ type: Input }]
799
- };
800
-
801
- class GridActionsComponent extends AbstractActionsComponent {
802
- constructor(injector) {
803
- super(injector);
804
- this.icon = 'fa fa-cog';
805
- this.text = '';
806
- this.trackByFn = (_, item) => item.text;
807
- }
808
- }
809
- GridActionsComponent.decorators = [
810
- { type: Component, args: [{
811
- exportAs: 'abpGridActions',
812
- selector: 'abp-grid-actions',
813
- template: "<div *ngIf=\"actionList.length > 1\" ngbDropdown container=\"body\" class=\"d-inline-block\">\n <button\n class=\"btn btn-primary btn-sm dropdown-toggle\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n ngbDropdownToggle\n >\n <i [ngClass]=\"icon\" [class.mr-1]=\"icon\"></i>{{ text | abpLocalization }}\n </button>\n <div ngbDropdownMenu>\n <ng-container\n *ngFor=\"let action of actionList; trackBy: trackByFn\"\n [ngTemplateOutlet]=\"btnItem\"\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\n >\n </ng-container>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"actionList.length === 1\"\n [ngTemplateOutlet]=\"btnItem\"\n [ngTemplateOutletContext]=\"{ $implicit: actionList.get(0).value }\"\n></ng-container>\n\n<ng-template #btnItem let-action>\n <ng-container *ngIf=\"action.visible(data)\">\n <button\n ngbDropdownItem\n *abpPermission=\"action.permission\"\n (click)=\"action.action(data)\"\n type=\"button\"\n class=\"{{ actionList.length === 1 ? 'btn btn-primary' : '' }}\"\n [class.text-center]=\"actionList.length === 1\"\n >\n <i [ngClass]=\"action.icon\" [class.mr-1]=\"action.icon\"></i>\n <span *ngIf=\"action.icon; else ellipsis\">{{ action.text | abpLocalization }}</span>\n <ng-template #ellipsis>\n <div abpEllipsis>{{ action.text | abpLocalization }}</div>\n </ng-template>\n </button>\n </ng-container>\n</ng-template>\n",
814
- providers: [
815
- {
816
- provide: EXTENSIONS_ACTION_TYPE,
817
- useValue: 'entityActions',
818
- },
819
- ],
820
- changeDetection: ChangeDetectionStrategy.OnPush
821
- },] }
822
- ];
823
- GridActionsComponent.ctorParameters = () => [
824
- { type: Injector }
825
- ];
826
- GridActionsComponent.propDecorators = {
827
- icon: [{ type: Input }],
828
- index: [{ type: Input }],
829
- text: [{ type: Input }]
830
- };
955
+ ExtensibleTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensibleTableComponent, deps: [{ token: LOCALE_ID }, { token: i1.ConfigStateService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
956
+ ExtensibleTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: ExtensibleTableComponent, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0, template: "<ngx-datatable default [rows]=\"data\" [count]=\"recordsTotal\" [list]=\"list\">\n <ngx-datatable-column\n *ngIf=\"actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)\"\n [name]=\"actionsText | abpLocalization\"\n [maxWidth]=\"columnWidths[0]\"\n [width]=\"columnWidths[0]\"\n [sortable]=\"false\"\n >\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\n <ng-container\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\n ></ng-container>\n <ng-template #gridActions>\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\n </ng-template>\n </ng-template>\n </ngx-datatable-column>\n\n <ng-container *ngFor=\"let prop of propList; let i = index; trackBy: trackByFn\">\n <ngx-datatable-column\n [width]=\"columnWidths[i + 1] || 200\"\n [name]=\"prop.displayName | abpLocalization\"\n [prop]=\"prop.name\"\n [sortable]=\"prop.sortable\"\n >\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\n <ng-container *abpPermission=\"prop.permission\">\n <ng-container *ngIf=\"row['_' + prop.name]?.visible\">\n <div\n *ngIf=\"!row['_' + prop.name].component; else component\"\n [innerHTML]=\"row['_' + prop.name]?.value | async\"\n (click)=\"\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\n \"\n [class.pointer]=\"prop.action\"\n ></div>\n </ng-container>\n <ng-template #component>\n <ng-container\n *ngComponentOutlet=\"\n row['_' + prop.name].component;\n injector: row['_' + prop.name].injector\n \"\n ></ng-container>\n </ng-template>\n </ng-container>\n </ng-template>\n </ngx-datatable-column>\n </ng-container>\n</ngx-datatable>\n", components: [{ type: i2$2.DatatableComponent, selector: "ngx-datatable", inputs: ["selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "loadingIndicator", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "groupExpansionDefault", "selectAllRowsOnPage", "virtualization", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity", "rows", "groupedRows", "groupRowsBy", "columns", "limit", "count", "offset", "targetMarkerTemplate", "selectionType", "rowClass", "selectCheck", "displayCheck", "trackByProp", "treeFromRelation", "treeToRelation"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { type: GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }], directives: [{ type: i4.NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { type: i4.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$2.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"] }, { type: i2$2.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i5.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }], pipes: { "abpLocalization": i1.LocalizationPipe, "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
957
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExtensibleTableComponent, decorators: [{
958
+ type: Component,
959
+ args: [{
960
+ exportAs: 'abpExtensibleTable',
961
+ selector: 'abp-extensible-table',
962
+ templateUrl: './extensible-table.component.html',
963
+ changeDetection: ChangeDetectionStrategy.OnPush,
964
+ }]
965
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
966
+ type: Inject,
967
+ args: [LOCALE_ID]
968
+ }] }, { type: i1.ConfigStateService }, { type: i0.Injector }]; }, propDecorators: { actionsText: [{
969
+ type: Input
970
+ }], data: [{
971
+ type: Input
972
+ }], list: [{
973
+ type: Input
974
+ }], recordsTotal: [{
975
+ type: Input
976
+ }], actionsColumnWidth: [{
977
+ type: Input
978
+ }], actionsTemplate: [{
979
+ type: Input
980
+ }] } });
831
981
 
832
982
  class PageToolbarComponent extends AbstractActionsComponent {
833
983
  constructor(injector) {
@@ -846,82 +996,28 @@ class PageToolbarComponent extends AbstractActionsComponent {
846
996
  return { get };
847
997
  }
848
998
  }
849
- PageToolbarComponent.decorators = [
850
- { type: Component, args: [{
851
- exportAs: 'abpPageToolbar',
852
- selector: 'abp-page-toolbar',
853
- template: "<div class=\"row justify-content-end mx-n1\" id=\"AbpContentToolbar\">\n <div class=\"col-auto px-1 pt-0 pt-md-2\" *ngFor=\"let action of actionList; trackBy: trackByFn\">\n <ng-container *ngIf=\"action.visible(data)\">\n <ng-container *abpPermission=\"action.permission\">\n <ng-container *ngIf=\"action.component as component; else button\">\n <ng-container\n *ngComponentOutlet=\"component; injector: createInjector(action)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #button>\n <button (click)=\"action.action(data)\" type=\"button\" class=\"btn btn-primary btn-sm\">\n <i [ngClass]=\"action.icon\" [class.mr-1]=\"action.icon\"></i>\n {{ action.text | abpLocalization }}\n </button>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</div>\n",
854
- providers: [
855
- {
856
- provide: EXTENSIONS_ACTION_TYPE,
857
- useValue: 'toolbarActions',
858
- },
859
- ],
860
- changeDetection: ChangeDetectionStrategy.OnPush
861
- },] }
862
- ];
863
- PageToolbarComponent.ctorParameters = () => [
864
- { type: Injector }
865
- ];
866
-
867
- class DisabledDirective {
868
- constructor(ngControl) {
869
- this.ngControl = ngControl;
870
- }
871
- // Related issue: https://github.com/angular/angular/issues/35330
872
- ngOnChanges({ abpDisabled }) {
873
- if (this.ngControl.control && abpDisabled) {
874
- this.ngControl.control[abpDisabled.currentValue ? 'disable' : 'enable']();
875
- }
876
- }
877
- }
878
- DisabledDirective.decorators = [
879
- { type: Directive, args: [{
880
- selector: '[abpDisabled]',
881
- },] }
882
- ];
883
- DisabledDirective.ctorParameters = () => [
884
- { type: NgControl, decorators: [{ type: Host }] }
885
- ];
886
- DisabledDirective.propDecorators = {
887
- abpDisabled: [{ type: Input }]
888
- };
889
-
890
- class PropDataDirective extends PropData {
891
- constructor(tempRef, vcRef, injector) {
892
- super();
893
- this.tempRef = tempRef;
894
- this.vcRef = vcRef;
895
- // tslint:disable-next-line
896
- this.getInjected = injector.get.bind(injector);
897
- }
898
- ngOnChanges() {
899
- this.vcRef.clear();
900
- this.vcRef.createEmbeddedView(this.tempRef, {
901
- $implicit: this.data,
902
- index: 0,
903
- });
904
- }
905
- ngOnDestroy() {
906
- this.vcRef.clear();
907
- }
908
- }
909
- PropDataDirective.decorators = [
910
- { type: Directive, args: [{
911
- exportAs: 'abpPropData',
912
- selector: '[abpPropData]',
913
- },] }
914
- ];
915
- PropDataDirective.ctorParameters = () => [
916
- { type: TemplateRef },
917
- { type: ViewContainerRef },
918
- { type: Injector }
919
- ];
920
- PropDataDirective.propDecorators = {
921
- propList: [{ type: Input, args: ['abpPropDataFromList',] }],
922
- record: [{ type: Input, args: ['abpPropDataWithRecord',] }],
923
- index: [{ type: Input, args: ['abpPropDataAtIndex',] }]
924
- };
999
+ PageToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: PageToolbarComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1000
+ PageToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: PageToolbarComponent, selector: "abp-page-toolbar", providers: [
1001
+ {
1002
+ provide: EXTENSIONS_ACTION_TYPE,
1003
+ useValue: 'toolbarActions',
1004
+ },
1005
+ ], exportAs: ["abpPageToolbar"], usesInheritance: true, ngImport: i0, template: "<div class=\"row justify-content-end mx-n1\" id=\"AbpContentToolbar\">\n <div class=\"col-auto px-1 pt-0 pt-md-2\" *ngFor=\"let action of actionList; trackBy: trackByFn\">\n <ng-container *ngIf=\"action.visible(data)\">\n <ng-container *abpPermission=\"action.permission\">\n <ng-container *ngIf=\"action.component as component; else button\">\n <ng-container\n *ngComponentOutlet=\"component; injector: createInjector(action)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #button>\n <button (click)=\"action.action(data)\" type=\"button\" class=\"btn btn-primary btn-sm\">\n <i [ngClass]=\"action.icon\" [class.mr-1]=\"action.icon\"></i>\n {{ action.text | abpLocalization }}\n </button>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</div>\n", directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission"] }, { type: i5.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "abpLocalization": i1.LocalizationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: PageToolbarComponent, decorators: [{
1007
+ type: Component,
1008
+ args: [{
1009
+ exportAs: 'abpPageToolbar',
1010
+ selector: 'abp-page-toolbar',
1011
+ templateUrl: './page-toolbar.component.html',
1012
+ providers: [
1013
+ {
1014
+ provide: EXTENSIONS_ACTION_TYPE,
1015
+ useValue: 'toolbarActions',
1016
+ },
1017
+ ],
1018
+ changeDetection: ChangeDetectionStrategy.OnPush,
1019
+ }]
1020
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
925
1021
 
926
1022
  var objectExtensions = /*#__PURE__*/Object.freeze({
927
1023
  __proto__: null
@@ -929,46 +1025,81 @@ var objectExtensions = /*#__PURE__*/Object.freeze({
929
1025
 
930
1026
  class BaseUiExtensionsModule {
931
1027
  }
932
- BaseUiExtensionsModule.decorators = [
933
- { type: NgModule, args: [{
934
- exports: [
935
- DateTimePickerComponent,
936
- PageToolbarComponent,
937
- GridActionsComponent,
938
- ExtensibleFormComponent,
939
- ExtensibleTableComponent,
940
- PropDataDirective,
941
- DisabledDirective,
942
- ],
943
- declarations: [
944
- DateTimePickerComponent,
945
- PageToolbarComponent,
946
- GridActionsComponent,
947
- ExtensibleFormPropComponent,
948
- ExtensibleFormComponent,
949
- ExtensibleTableComponent,
950
- PropDataDirective,
951
- DisabledDirective,
952
- ],
953
- imports: [
954
- CoreModule,
955
- ThemeSharedModule,
956
- NgxValidateCoreModule,
957
- NgbDatepickerModule,
958
- NgbDropdownModule,
959
- NgbTimepickerModule,
960
- NgbTypeaheadModule,
961
- ],
962
- },] }
963
- ];
1028
+ BaseUiExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: BaseUiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1029
+ BaseUiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: BaseUiExtensionsModule, declarations: [DateTimePickerComponent,
1030
+ PageToolbarComponent,
1031
+ GridActionsComponent,
1032
+ ExtensibleFormPropComponent,
1033
+ ExtensibleFormComponent,
1034
+ ExtensibleTableComponent,
1035
+ PropDataDirective,
1036
+ DisabledDirective], imports: [CoreModule,
1037
+ ThemeSharedModule,
1038
+ NgxValidateCoreModule,
1039
+ NgbDatepickerModule,
1040
+ NgbDropdownModule,
1041
+ NgbTimepickerModule,
1042
+ NgbTypeaheadModule], exports: [DateTimePickerComponent,
1043
+ PageToolbarComponent,
1044
+ GridActionsComponent,
1045
+ ExtensibleFormComponent,
1046
+ ExtensibleTableComponent,
1047
+ PropDataDirective,
1048
+ DisabledDirective] });
1049
+ BaseUiExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: BaseUiExtensionsModule, imports: [[
1050
+ CoreModule,
1051
+ ThemeSharedModule,
1052
+ NgxValidateCoreModule,
1053
+ NgbDatepickerModule,
1054
+ NgbDropdownModule,
1055
+ NgbTimepickerModule,
1056
+ NgbTypeaheadModule,
1057
+ ]] });
1058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: BaseUiExtensionsModule, decorators: [{
1059
+ type: NgModule,
1060
+ args: [{
1061
+ exports: [
1062
+ DateTimePickerComponent,
1063
+ PageToolbarComponent,
1064
+ GridActionsComponent,
1065
+ ExtensibleFormComponent,
1066
+ ExtensibleTableComponent,
1067
+ PropDataDirective,
1068
+ DisabledDirective,
1069
+ ],
1070
+ declarations: [
1071
+ DateTimePickerComponent,
1072
+ PageToolbarComponent,
1073
+ GridActionsComponent,
1074
+ ExtensibleFormPropComponent,
1075
+ ExtensibleFormComponent,
1076
+ ExtensibleTableComponent,
1077
+ PropDataDirective,
1078
+ DisabledDirective,
1079
+ ],
1080
+ imports: [
1081
+ CoreModule,
1082
+ ThemeSharedModule,
1083
+ NgxValidateCoreModule,
1084
+ NgbDatepickerModule,
1085
+ NgbDropdownModule,
1086
+ NgbTimepickerModule,
1087
+ NgbTypeaheadModule,
1088
+ ],
1089
+ }]
1090
+ }] });
964
1091
  class UiExtensionsModule {
965
1092
  }
966
- UiExtensionsModule.decorators = [
967
- { type: NgModule, args: [{
968
- exports: [BaseUiExtensionsModule],
969
- imports: [BaseUiExtensionsModule],
970
- },] }
971
- ];
1093
+ UiExtensionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: UiExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1094
+ UiExtensionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: UiExtensionsModule, imports: [BaseUiExtensionsModule], exports: [BaseUiExtensionsModule] });
1095
+ UiExtensionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: UiExtensionsModule, imports: [[BaseUiExtensionsModule], BaseUiExtensionsModule] });
1096
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: UiExtensionsModule, decorators: [{
1097
+ type: NgModule,
1098
+ args: [{
1099
+ exports: [BaseUiExtensionsModule],
1100
+ imports: [BaseUiExtensionsModule],
1101
+ }]
1102
+ }] });
972
1103
 
973
1104
  function mergeWithDefaultActions(extension, defaultActions, ...contributors) {
974
1105
  Object.keys(defaultActions).forEach((name) => {
@@ -1212,5 +1343,5 @@ function isUndefined(obj) {
1212
1343
  * Generated bundle index. Do not edit.
1213
1344
  */
1214
1345
 
1215
- export { ActionList, BaseUiExtensionsModule, CreateFormPropsFactory, DateAdapter, DateTimeAdapter, DateTimePickerComponent, DisabledDirective, EXTENSIONS_ACTION_CALLBACK, EXTENSIONS_ACTION_DATA, EXTENSIONS_ACTION_TYPE, 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, PageToolbarComponent, PropDataDirective, PropList, TimeAdapter, ToolbarAction, ToolbarActionList, ToolbarActions, ToolbarActionsFactory, ToolbarComponent, UiExtensionsModule, createExtraPropertyValueResolver, generateFormFromProps, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps, ActionData as ɵa, Action as ɵb, ActionsFactory as ɵc, Actions as ɵd, PropData as ɵe, Prop as ɵf, PropsFactory as ɵg, Props as ɵh, selfFactory as ɵi, AbstractActionsComponent as ɵj };
1346
+ export { ActionList, BaseUiExtensionsModule, CreateFormPropsFactory, DateAdapter, DateTimeAdapter, DateTimePickerComponent, DisabledDirective, EXTENSIONS_ACTION_CALLBACK, EXTENSIONS_ACTION_DATA, EXTENSIONS_ACTION_TYPE, 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 };
1216
1347
  //# sourceMappingURL=abp-ng.theme.shared-extensions.js.map