@pega/angular-sdk-overrides 0.23.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 (495) hide show
  1. package/lib/designSystemExtension/alert/alert.component.html +19 -0
  2. package/lib/designSystemExtension/alert/alert.component.scss +52 -0
  3. package/lib/designSystemExtension/alert/alert.component.spec.ts +22 -0
  4. package/lib/designSystemExtension/alert/alert.component.ts +43 -0
  5. package/lib/designSystemExtension/alert-banner/alert-banner.component.html +12 -0
  6. package/lib/designSystemExtension/alert-banner/alert-banner.component.scss +0 -0
  7. package/lib/designSystemExtension/alert-banner/alert-banner.component.spec.ts +22 -0
  8. package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +27 -0
  9. package/lib/designSystemExtension/banner/banner.component.html +28 -0
  10. package/lib/designSystemExtension/banner/banner.component.scss +64 -0
  11. package/lib/designSystemExtension/banner/banner.component.spec.ts +22 -0
  12. package/lib/designSystemExtension/banner/banner.component.ts +26 -0
  13. package/lib/designSystemExtension/case-create-stage/case-create-stage.component.html +12 -0
  14. package/lib/designSystemExtension/case-create-stage/case-create-stage.component.scss +0 -0
  15. package/lib/designSystemExtension/case-create-stage/case-create-stage.component.spec.ts +24 -0
  16. package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +58 -0
  17. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +52 -0
  18. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +142 -0
  19. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.spec.ts +24 -0
  20. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +80 -0
  21. package/lib/designSystemExtension/material-details/material-details.component.html +40 -0
  22. package/lib/designSystemExtension/material-details/material-details.component.scss +121 -0
  23. package/lib/designSystemExtension/material-details/material-details.component.spec.ts +24 -0
  24. package/lib/designSystemExtension/material-details/material-details.component.ts +32 -0
  25. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +23 -0
  26. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +33 -0
  27. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.spec.ts +22 -0
  28. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +29 -0
  29. package/lib/designSystemExtension/material-summary-item/material-summary-item.component.html +37 -0
  30. package/lib/designSystemExtension/material-summary-item/material-summary-item.component.scss +127 -0
  31. package/lib/designSystemExtension/material-summary-item/material-summary-item.component.spec.ts +24 -0
  32. package/lib/designSystemExtension/material-summary-item/material-summary-item.component.ts +32 -0
  33. package/lib/designSystemExtension/material-summary-list/material-summary-list.component.html +3 -0
  34. package/lib/designSystemExtension/material-summary-list/material-summary-list.component.scss +1 -0
  35. package/lib/designSystemExtension/material-summary-list/material-summary-list.component.spec.ts +24 -0
  36. package/lib/designSystemExtension/material-summary-list/material-summary-list.component.ts +17 -0
  37. package/lib/designSystemExtension/material-utility/material-utility.component.html +17 -0
  38. package/lib/designSystemExtension/material-utility/material-utility.component.scss +52 -0
  39. package/lib/designSystemExtension/material-utility/material-utility.component.spec.ts +24 -0
  40. package/lib/designSystemExtension/material-utility/material-utility.component.ts +26 -0
  41. package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.html +12 -0
  42. package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.scss +28 -0
  43. package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.spec.ts +24 -0
  44. package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.ts +40 -0
  45. package/lib/designSystemExtension/operator/operator.component.html +20 -0
  46. package/lib/designSystemExtension/operator/operator.component.scss +83 -0
  47. package/lib/designSystemExtension/operator/operator.component.spec.ts +24 -0
  48. package/lib/designSystemExtension/operator/operator.component.ts +146 -0
  49. package/lib/designSystemExtension/pulse/pulse.component.html +3 -0
  50. package/lib/designSystemExtension/pulse/pulse.component.scss +8 -0
  51. package/lib/designSystemExtension/pulse/pulse.component.spec.ts +24 -0
  52. package/lib/designSystemExtension/pulse/pulse.component.ts +40 -0
  53. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +33 -0
  54. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +20 -0
  55. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +24 -0
  56. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +89 -0
  57. package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.html +13 -0
  58. package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.scss +43 -0
  59. package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.spec.ts +22 -0
  60. package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.ts +15 -0
  61. package/lib/field/auto-complete/auto-complete.component.html +32 -0
  62. package/lib/field/auto-complete/auto-complete.component.scss +20 -0
  63. package/lib/field/auto-complete/auto-complete.component.spec.ts +24 -0
  64. package/lib/field/auto-complete/auto-complete.component.ts +345 -0
  65. package/lib/field/auto-complete/config-ext.json +10 -0
  66. package/lib/field/cancel-alert/cancel-alert.component.html +18 -0
  67. package/lib/field/cancel-alert/cancel-alert.component.scss +24 -0
  68. package/lib/field/cancel-alert/cancel-alert.component.spec.ts +24 -0
  69. package/lib/field/cancel-alert/cancel-alert.component.ts +107 -0
  70. package/lib/field/check-box/check-box.component.html +41 -0
  71. package/lib/field/check-box/check-box.component.scss +24 -0
  72. package/lib/field/check-box/check-box.component.spec.ts +24 -0
  73. package/lib/field/check-box/check-box.component.ts +188 -0
  74. package/lib/field/check-box/config-ext.json +9 -0
  75. package/lib/field/currency/config-ext.json +9 -0
  76. package/lib/field/currency/currency.component.html +31 -0
  77. package/lib/field/currency/currency.component.scss +28 -0
  78. package/lib/field/currency/currency.component.spec.ts +24 -0
  79. package/lib/field/currency/currency.component.ts +197 -0
  80. package/lib/field/date/config-ext.json +9 -0
  81. package/lib/field/date/date.component.html +31 -0
  82. package/lib/field/date/date.component.scss +24 -0
  83. package/lib/field/date/date.component.spec.ts +24 -0
  84. package/lib/field/date/date.component.ts +245 -0
  85. package/lib/field/date-time/config-ext.json +8 -0
  86. package/lib/field/date-time/date-time.component.html +29 -0
  87. package/lib/field/date-time/date-time.component.scss +80 -0
  88. package/lib/field/date-time/date-time.component.spec.ts +24 -0
  89. package/lib/field/date-time/date-time.component.ts +224 -0
  90. package/lib/field/decimal/config-ext.json +8 -0
  91. package/lib/field/decimal/decimal.component.html +28 -0
  92. package/lib/field/decimal/decimal.component.scss +20 -0
  93. package/lib/field/decimal/decimal.component.spec.ts +24 -0
  94. package/lib/field/decimal/decimal.component.ts +187 -0
  95. package/lib/field/dropdown/config-ext.json +8 -0
  96. package/lib/field/dropdown/dropdown.component.html +31 -0
  97. package/lib/field/dropdown/dropdown.component.scss +25 -0
  98. package/lib/field/dropdown/dropdown.component.spec.ts +24 -0
  99. package/lib/field/dropdown/dropdown.component.ts +247 -0
  100. package/lib/field/email/config-ext.json +8 -0
  101. package/lib/field/email/email.component.html +27 -0
  102. package/lib/field/email/email.component.scss +20 -0
  103. package/lib/field/email/email.component.spec.ts +24 -0
  104. package/lib/field/email/email.component.ts +180 -0
  105. package/lib/field/integer/config-ext.json +8 -0
  106. package/lib/field/integer/integer.component.html +28 -0
  107. package/lib/field/integer/integer.component.scss +20 -0
  108. package/lib/field/integer/integer.component.spec.ts +24 -0
  109. package/lib/field/integer/integer.component.ts +185 -0
  110. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.html +12 -0
  111. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.scss +1 -0
  112. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.spec.ts +22 -0
  113. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +40 -0
  114. package/lib/field/percentage/config-ext.json +8 -0
  115. package/lib/field/percentage/percentage.component.html +29 -0
  116. package/lib/field/percentage/percentage.component.scss +20 -0
  117. package/lib/field/percentage/percentage.component.spec.ts +24 -0
  118. package/lib/field/percentage/percentage.component.ts +181 -0
  119. package/lib/field/phone/config-ext.json +8 -0
  120. package/lib/field/phone/phone.component.html +26 -0
  121. package/lib/field/phone/phone.component.scss +81 -0
  122. package/lib/field/phone/phone.component.spec.ts +24 -0
  123. package/lib/field/phone/phone.component.ts +199 -0
  124. package/lib/field/radio-buttons/config-ext.json +8 -0
  125. package/lib/field/radio-buttons/radio-buttons.component.html +37 -0
  126. package/lib/field/radio-buttons/radio-buttons.component.scss +39 -0
  127. package/lib/field/radio-buttons/radio-buttons.component.spec.ts +24 -0
  128. package/lib/field/radio-buttons/radio-buttons.component.ts +241 -0
  129. package/lib/field/rich-text/rich-text.component.html +20 -0
  130. package/lib/field/rich-text/rich-text.component.scss +0 -0
  131. package/lib/field/rich-text/rich-text.component.spec.ts +24 -0
  132. package/lib/field/rich-text/rich-text.component.ts +131 -0
  133. package/lib/field/scalar-list/config-ext.json +8 -0
  134. package/lib/field/scalar-list/scalar-list.component.html +9 -0
  135. package/lib/field/scalar-list/scalar-list.component.scss +0 -0
  136. package/lib/field/scalar-list/scalar-list.component.spec.ts +22 -0
  137. package/lib/field/scalar-list/scalar-list.component.ts +119 -0
  138. package/lib/field/semantic-link/config-ext.json +7 -0
  139. package/lib/field/semantic-link/semantic-link.component.html +10 -0
  140. package/lib/field/semantic-link/semantic-link.component.scss +16 -0
  141. package/lib/field/semantic-link/semantic-link.component.spec.ts +0 -0
  142. package/lib/field/semantic-link/semantic-link.component.ts +70 -0
  143. package/lib/field/text/text.component.html +14 -0
  144. package/lib/field/text/text.component.scss +30 -0
  145. package/lib/field/text/text.component.spec.ts +24 -0
  146. package/lib/field/text/text.component.ts +158 -0
  147. package/lib/field/text-area/config-ext.json +8 -0
  148. package/lib/field/text-area/text-area.component.html +29 -0
  149. package/lib/field/text-area/text-area.component.scss +20 -0
  150. package/lib/field/text-area/text-area.component.spec.ts +24 -0
  151. package/lib/field/text-area/text-area.component.ts +186 -0
  152. package/lib/field/text-content/config-ext.json +7 -0
  153. package/lib/field/text-content/text-content.component.html +7 -0
  154. package/lib/field/text-content/text-content.component.scss +4 -0
  155. package/lib/field/text-content/text-content.component.spec.ts +24 -0
  156. package/lib/field/text-content/text-content.component.ts +89 -0
  157. package/lib/field/text-input/config-ext.json +8 -0
  158. package/lib/field/text-input/text-input.component.html +27 -0
  159. package/lib/field/text-input/text-input.component.scss +20 -0
  160. package/lib/field/text-input/text-input.component.spec.ts +24 -0
  161. package/lib/field/text-input/text-input.component.ts +183 -0
  162. package/lib/field/time/config-ext.json +8 -0
  163. package/lib/field/time/time.component.html +26 -0
  164. package/lib/field/time/time.component.scss +20 -0
  165. package/lib/field/time/time.component.spec.ts +24 -0
  166. package/lib/field/time/time.component.ts +177 -0
  167. package/lib/field/url/config-ext.json +8 -0
  168. package/lib/field/url/url.component.html +26 -0
  169. package/lib/field/url/url.component.scss +20 -0
  170. package/lib/field/url/url.component.spec.ts +24 -0
  171. package/lib/field/url/url.component.ts +179 -0
  172. package/lib/field/user-reference/config-ext.json +7 -0
  173. package/lib/field/user-reference/user-reference.component.html +48 -0
  174. package/lib/field/user-reference/user-reference.component.scss +30 -0
  175. package/lib/field/user-reference/user-reference.component.spec.ts +24 -0
  176. package/lib/field/user-reference/user-reference.component.ts +213 -0
  177. package/lib/infra/Containers/flow-container/flow-container.component.html +39 -0
  178. package/lib/infra/Containers/flow-container/flow-container.component.scss +33 -0
  179. package/lib/infra/Containers/flow-container/flow-container.component.spec.ts +24 -0
  180. package/lib/infra/Containers/flow-container/flow-container.component.ts +633 -0
  181. package/lib/infra/Containers/flow-container/helpers.ts +79 -0
  182. package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.html +1 -0
  183. package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.scss +0 -0
  184. package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.spec.ts +24 -0
  185. package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.ts +24 -0
  186. package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +35 -0
  187. package/lib/infra/Containers/modal-view-container/modal-view-container.component.scss +29 -0
  188. package/lib/infra/Containers/modal-view-container/modal-view-container.component.spec.ts +24 -0
  189. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +394 -0
  190. package/lib/infra/Containers/preview-view-container/preview-view-container.component.html +1 -0
  191. package/lib/infra/Containers/preview-view-container/preview-view-container.component.scss +0 -0
  192. package/lib/infra/Containers/preview-view-container/preview-view-container.component.spec.ts +24 -0
  193. package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +35 -0
  194. package/lib/infra/Containers/view-container/view-container.component.html +31 -0
  195. package/lib/infra/Containers/view-container/view-container.component.scss +7 -0
  196. package/lib/infra/Containers/view-container/view-container.component.spec.ts +24 -0
  197. package/lib/infra/Containers/view-container/view-container.component.ts +289 -0
  198. package/lib/infra/action-buttons/action-buttons.component.html +12 -0
  199. package/lib/infra/action-buttons/action-buttons.component.scss +1 -0
  200. package/lib/infra/action-buttons/action-buttons.component.spec.ts +24 -0
  201. package/lib/infra/action-buttons/action-buttons.component.ts +25 -0
  202. package/lib/infra/assignment/assignment.component.html +28 -0
  203. package/lib/infra/assignment/assignment.component.scss +0 -0
  204. package/lib/infra/assignment/assignment.component.spec.ts +24 -0
  205. package/lib/infra/assignment/assignment.component.ts +463 -0
  206. package/lib/infra/assignment-card/assignment-card.component.html +26 -0
  207. package/lib/infra/assignment-card/assignment-card.component.scss +9 -0
  208. package/lib/infra/assignment-card/assignment-card.component.spec.ts +24 -0
  209. package/lib/infra/assignment-card/assignment-card.component.ts +39 -0
  210. package/lib/infra/dashboard-filter/dashboard-filter.component.html +35 -0
  211. package/lib/infra/dashboard-filter/dashboard-filter.component.scss +14 -0
  212. package/lib/infra/dashboard-filter/dashboard-filter.component.spec.ts +24 -0
  213. package/lib/infra/dashboard-filter/dashboard-filter.component.ts +90 -0
  214. package/lib/infra/defer-load/defer-load.component.html +3 -0
  215. package/lib/infra/defer-load/defer-load.component.scss +0 -0
  216. package/lib/infra/defer-load/defer-load.component.spec.ts +24 -0
  217. package/lib/infra/defer-load/defer-load.component.ts +169 -0
  218. package/lib/infra/error-boundary/error-boundary.component.html +1 -0
  219. package/lib/infra/error-boundary/error-boundary.component.scss +0 -0
  220. package/lib/infra/error-boundary/error-boundary.component.spec.ts +22 -0
  221. package/lib/infra/error-boundary/error-boundary.component.ts +16 -0
  222. package/lib/infra/multi-step/multi-step.component.html +98 -0
  223. package/lib/infra/multi-step/multi-step.component.scss +247 -0
  224. package/lib/infra/multi-step/multi-step.component.spec.ts +24 -0
  225. package/lib/infra/multi-step/multi-step.component.ts +85 -0
  226. package/lib/infra/navbar/navbar.component.html +55 -0
  227. package/lib/infra/navbar/navbar.component.scss +154 -0
  228. package/lib/infra/navbar/navbar.component.spec.ts +24 -0
  229. package/lib/infra/navbar/navbar.component.ts +175 -0
  230. package/lib/infra/reference/reference.component.html +1 -0
  231. package/lib/infra/reference/reference.component.scss +0 -0
  232. package/lib/infra/reference/reference.component.ts +165 -0
  233. package/lib/infra/region/region.component.html +11 -0
  234. package/lib/infra/region/region.component.scss +0 -0
  235. package/lib/infra/region/region.component.spec.ts +24 -0
  236. package/lib/infra/region/region.component.ts +37 -0
  237. package/lib/infra/root-container/root-container.component.html +36 -0
  238. package/lib/infra/root-container/root-container.component.scss +20 -0
  239. package/lib/infra/root-container/root-container.component.spec.ts +24 -0
  240. package/lib/infra/root-container/root-container.component.ts +256 -0
  241. package/lib/infra/stages/stages.component.html +15 -0
  242. package/lib/infra/stages/stages.component.scss +109 -0
  243. package/lib/infra/stages/stages.component.spec.ts +24 -0
  244. package/lib/infra/stages/stages.component.ts +83 -0
  245. package/lib/infra/view/view.component.html +38 -0
  246. package/lib/infra/view/view.component.scss +16 -0
  247. package/lib/infra/view/view.component.spec.ts +24 -0
  248. package/lib/infra/view/view.component.ts +214 -0
  249. package/lib/template/app-shell/app-shell.component.html +15 -0
  250. package/lib/template/app-shell/app-shell.component.scss +51 -0
  251. package/lib/template/app-shell/app-shell.component.spec.ts +24 -0
  252. package/lib/template/app-shell/app-shell.component.ts +192 -0
  253. package/lib/template/banner-page/banner-page.component.html +12 -0
  254. package/lib/template/banner-page/banner-page.component.scss +0 -0
  255. package/lib/template/banner-page/banner-page.component.spec.ts +22 -0
  256. package/lib/template/banner-page/banner-page.component.ts +65 -0
  257. package/lib/template/case-summary/case-summary.component.html +1 -0
  258. package/lib/template/case-summary/case-summary.component.scss +44 -0
  259. package/lib/template/case-summary/case-summary.component.spec.ts +24 -0
  260. package/lib/template/case-summary/case-summary.component.ts +100 -0
  261. package/lib/template/case-summary/config-ext.json +8 -0
  262. package/lib/template/case-view/case-view.component.html +89 -0
  263. package/lib/template/case-view/case-view.component.scss +107 -0
  264. package/lib/template/case-view/case-view.component.spec.ts +24 -0
  265. package/lib/template/case-view/case-view.component.ts +242 -0
  266. package/lib/template/case-view/config-ext.json +8 -0
  267. package/lib/template/confirmation/config-ext.json +11 -0
  268. package/lib/template/confirmation/confirmation.component.html +23 -0
  269. package/lib/template/confirmation/confirmation.component.scss +10 -0
  270. package/lib/template/confirmation/confirmation.component.spec.ts +23 -0
  271. package/lib/template/confirmation/confirmation.component.ts +91 -0
  272. package/lib/template/data-reference/config-ext.json +8 -0
  273. package/lib/template/data-reference/data-reference.component.html +13 -0
  274. package/lib/template/data-reference/data-reference.component.scss +0 -0
  275. package/lib/template/data-reference/data-reference.component.spec.ts +24 -0
  276. package/lib/template/data-reference/data-reference.component.ts +275 -0
  277. package/lib/template/default-form/config-ext.json +8 -0
  278. package/lib/template/default-form/default-form.component.html +19 -0
  279. package/lib/template/default-form/default-form.component.scss +38 -0
  280. package/lib/template/default-form/default-form.component.spec.ts +24 -0
  281. package/lib/template/default-form/default-form.component.ts +76 -0
  282. package/lib/template/details/config-ext.json +9 -0
  283. package/lib/template/details/details.component.html +3 -0
  284. package/lib/template/details/details.component.scss +7 -0
  285. package/lib/template/details/details.component.spec.ts +24 -0
  286. package/lib/template/details/details.component.ts +113 -0
  287. package/lib/template/details-narrow-wide/config-ext.json +8 -0
  288. package/lib/template/details-narrow-wide/details-narrow-wide.component.html +4 -0
  289. package/lib/template/details-narrow-wide/details-narrow-wide.component.scss +7 -0
  290. package/lib/template/details-narrow-wide/details-narrow-wide.component.spec.ts +24 -0
  291. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +82 -0
  292. package/lib/template/details-one-column/config-ext.json +9 -0
  293. package/lib/template/details-one-column/details-one-column.component.html +1 -0
  294. package/lib/template/details-one-column/details-one-column.component.scss +0 -0
  295. package/lib/template/details-one-column/details-one-column.component.spec.ts +24 -0
  296. package/lib/template/details-one-column/details-one-column.component.ts +85 -0
  297. package/lib/template/details-sub-tabs/config-ext.json +8 -0
  298. package/lib/template/details-sub-tabs/details-sub-tabs.component.html +15 -0
  299. package/lib/template/details-sub-tabs/details-sub-tabs.component.scss +0 -0
  300. package/lib/template/details-sub-tabs/details-sub-tabs.component.spec.ts +24 -0
  301. package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +73 -0
  302. package/lib/template/details-three-column/config-ext.json +8 -0
  303. package/lib/template/details-three-column/details-three-column.component.html +4 -0
  304. package/lib/template/details-three-column/details-three-column.component.scss +7 -0
  305. package/lib/template/details-three-column/details-three-column.component.spec.ts +24 -0
  306. package/lib/template/details-three-column/details-three-column.component.ts +94 -0
  307. package/lib/template/details-two-column/config-ext.json +8 -0
  308. package/lib/template/details-two-column/details-two-column.component.html +4 -0
  309. package/lib/template/details-two-column/details-two-column.component.scss +7 -0
  310. package/lib/template/details-two-column/details-two-column.component.spec.ts +24 -0
  311. package/lib/template/details-two-column/details-two-column.component.ts +92 -0
  312. package/lib/template/details-wide-narrow/config-ext.json +8 -0
  313. package/lib/template/details-wide-narrow/details-wide-narrow.component.html +4 -0
  314. package/lib/template/details-wide-narrow/details-wide-narrow.component.scss +7 -0
  315. package/lib/template/details-wide-narrow/details-wide-narrow.component.spec.ts +24 -0
  316. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +88 -0
  317. package/lib/template/dynamic-tabs/config-ext.json +36 -0
  318. package/lib/template/dynamic-tabs/dynamic-tabs.component.html +5 -0
  319. package/lib/template/dynamic-tabs/dynamic-tabs.component.scss +0 -0
  320. package/lib/template/dynamic-tabs/dynamic-tabs.component.spec.ts +22 -0
  321. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +78 -0
  322. package/lib/template/field-group-list/field-group-list.component.html +8 -0
  323. package/lib/template/field-group-list/field-group-list.component.scss +12 -0
  324. package/lib/template/field-group-list/field-group-list.component.spec.ts +22 -0
  325. package/lib/template/field-group-list/field-group-list.component.ts +18 -0
  326. package/lib/template/field-group-template/field-group-template.component.html +33 -0
  327. package/lib/template/field-group-template/field-group-template.component.scss +8 -0
  328. package/lib/template/field-group-template/field-group-template.component.spec.ts +22 -0
  329. package/lib/template/field-group-template/field-group-template.component.ts +168 -0
  330. package/lib/template/field-value-list/field-value-list.component.html +15 -0
  331. package/lib/template/field-value-list/field-value-list.component.scss +18 -0
  332. package/lib/template/field-value-list/field-value-list.component.spec.ts +22 -0
  333. package/lib/template/field-value-list/field-value-list.component.ts +15 -0
  334. package/lib/template/inline-dashboard/inline-dashboard.component.html +19 -0
  335. package/lib/template/inline-dashboard/inline-dashboard.component.scss +31 -0
  336. package/lib/template/inline-dashboard/inline-dashboard.component.spec.ts +24 -0
  337. package/lib/template/inline-dashboard/inline-dashboard.component.ts +24 -0
  338. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.html +1 -0
  339. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.scss +0 -0
  340. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.spec.ts +24 -0
  341. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +55 -0
  342. package/lib/template/list-page/config-ext.json +7 -0
  343. package/lib/template/list-page/list-page.component.html +1 -0
  344. package/lib/template/list-page/list-page.component.scss +0 -0
  345. package/lib/template/list-page/list-page.component.spec.ts +24 -0
  346. package/lib/template/list-page/list-page.component.ts +13 -0
  347. package/lib/template/list-view/DefaultViewMeta.ts +220 -0
  348. package/lib/template/list-view/config-ext.json +8 -0
  349. package/lib/template/list-view/list-view.component.html +253 -0
  350. package/lib/template/list-view/list-view.component.scss +169 -0
  351. package/lib/template/list-view/list-view.component.spec.ts +24 -0
  352. package/lib/template/list-view/list-view.component.ts +1408 -0
  353. package/lib/template/list-view/listViewHelpers.ts +87 -0
  354. package/lib/template/list-view/utils.ts +745 -0
  355. package/lib/template/multi-reference-readonly/multi-reference-readonly.component.html +4 -0
  356. package/lib/template/multi-reference-readonly/multi-reference-readonly.component.scss +0 -0
  357. package/lib/template/multi-reference-readonly/multi-reference-readonly.component.spec.ts +22 -0
  358. package/lib/template/multi-reference-readonly/multi-reference-readonly.component.ts +54 -0
  359. package/lib/template/narrow-wide-form/config-ext.json +8 -0
  360. package/lib/template/narrow-wide-form/narrow-wide-form.component.html +16 -0
  361. package/lib/template/narrow-wide-form/narrow-wide-form.component.scss +20 -0
  362. package/lib/template/narrow-wide-form/narrow-wide-form.component.spec.ts +24 -0
  363. package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +34 -0
  364. package/lib/template/one-column/config-ext.json +8 -0
  365. package/lib/template/one-column/one-column.component.html +11 -0
  366. package/lib/template/one-column/one-column.component.scss +3 -0
  367. package/lib/template/one-column/one-column.component.spec.ts +24 -0
  368. package/lib/template/one-column/one-column.component.ts +34 -0
  369. package/lib/template/one-column-page/config-ext.json +8 -0
  370. package/lib/template/one-column-page/one-column-page.component.html +1 -0
  371. package/lib/template/one-column-page/one-column-page.component.scss +0 -0
  372. package/lib/template/one-column-page/one-column-page.component.spec.ts +24 -0
  373. package/lib/template/one-column-page/one-column-page.component.ts +15 -0
  374. package/lib/template/one-column-tab/config-ext.json +8 -0
  375. package/lib/template/one-column-tab/one-column-tab.component.html +9 -0
  376. package/lib/template/one-column-tab/one-column-tab.component.scss +9 -0
  377. package/lib/template/one-column-tab/one-column-tab.component.ts +34 -0
  378. package/lib/template/page/page.component.html +12 -0
  379. package/lib/template/page/page.component.scss +3 -0
  380. package/lib/template/page/page.component.spec.ts +24 -0
  381. package/lib/template/page/page.component.ts +68 -0
  382. package/lib/template/promoted-filters/promoted-filters.component.html +27 -0
  383. package/lib/template/promoted-filters/promoted-filters.component.scss +7 -0
  384. package/lib/template/promoted-filters/promoted-filters.component.spec.ts +24 -0
  385. package/lib/template/promoted-filters/promoted-filters.component.ts +157 -0
  386. package/lib/template/repeating-structures/repeating-structures.component.html +21 -0
  387. package/lib/template/repeating-structures/repeating-structures.component.scss +17 -0
  388. package/lib/template/repeating-structures/repeating-structures.component.spec.ts +24 -0
  389. package/lib/template/repeating-structures/repeating-structures.component.ts +155 -0
  390. package/lib/template/simple-table/config-ext.json +7 -0
  391. package/lib/template/simple-table/simple-table.component.html +13 -0
  392. package/lib/template/simple-table/simple-table.component.scss +0 -0
  393. package/lib/template/simple-table/simple-table.component.spec.ts +24 -0
  394. package/lib/template/simple-table/simple-table.component.ts +171 -0
  395. package/lib/template/simple-table-manual/helpers.ts +294 -0
  396. package/lib/template/simple-table-manual/simple-table-manual.component.html +147 -0
  397. package/lib/template/simple-table-manual/simple-table-manual.component.scss +185 -0
  398. package/lib/template/simple-table-manual/simple-table-manual.component.spec.ts +24 -0
  399. package/lib/template/simple-table-manual/simple-table-manual.component.ts +950 -0
  400. package/lib/template/simple-table-select/simple-table-select.component.html +14 -0
  401. package/lib/template/simple-table-select/simple-table-select.component.scss +0 -0
  402. package/lib/template/simple-table-select/simple-table-select.component.spec.ts +24 -0
  403. package/lib/template/simple-table-select/simple-table-select.component.ts +151 -0
  404. package/lib/template/single-reference-readonly/single-reference-readonly.component.html +1 -0
  405. package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +0 -0
  406. package/lib/template/single-reference-readonly/single-reference-readonly.component.spec.ts +22 -0
  407. package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +15 -0
  408. package/lib/template/sub-tabs/config-ext.json +8 -0
  409. package/lib/template/sub-tabs/sub-tabs.component.html +12 -0
  410. package/lib/template/sub-tabs/sub-tabs.component.scss +3 -0
  411. package/lib/template/sub-tabs/sub-tabs.component.spec.ts +24 -0
  412. package/lib/template/sub-tabs/sub-tabs.component.ts +76 -0
  413. package/lib/template/three-column/config-ext.json +8 -0
  414. package/lib/template/three-column/three-column.component.html +13 -0
  415. package/lib/template/three-column/three-column.component.scss +16 -0
  416. package/lib/template/three-column/three-column.component.spec.ts +24 -0
  417. package/lib/template/three-column/three-column.component.ts +34 -0
  418. package/lib/template/three-column-page/config-ext.json +8 -0
  419. package/lib/template/three-column-page/three-column-page.component.html +1 -0
  420. package/lib/template/three-column-page/three-column-page.component.scss +0 -0
  421. package/lib/template/three-column-page/three-column-page.component.spec.ts +24 -0
  422. package/lib/template/three-column-page/three-column-page.component.ts +15 -0
  423. package/lib/template/two-column/config-ext.json +8 -0
  424. package/lib/template/two-column/two-column.component.html +16 -0
  425. package/lib/template/two-column/two-column.component.scss +28 -0
  426. package/lib/template/two-column/two-column.component.spec.ts +24 -0
  427. package/lib/template/two-column/two-column.component.ts +34 -0
  428. package/lib/template/two-column-page/config-ext.json +8 -0
  429. package/lib/template/two-column-page/two-column-page.component.html +1 -0
  430. package/lib/template/two-column-page/two-column-page.component.scss +0 -0
  431. package/lib/template/two-column-page/two-column-page.component.spec.ts +24 -0
  432. package/lib/template/two-column-page/two-column-page.component.ts +43 -0
  433. package/lib/template/two-column-tab/config-ext.json +8 -0
  434. package/lib/template/two-column-tab/two-column-tab.component.html +16 -0
  435. package/lib/template/two-column-tab/two-column-tab.component.scss +28 -0
  436. package/lib/template/two-column-tab/two-column-tab.component.spec.ts +24 -0
  437. package/lib/template/two-column-tab/two-column-tab.component.ts +34 -0
  438. package/lib/template/utils.ts +23 -0
  439. package/lib/template/wide-narrow-form/config-ext.json +8 -0
  440. package/lib/template/wide-narrow-form/wide-narrow-form.component.html +16 -0
  441. package/lib/template/wide-narrow-form/wide-narrow-form.component.scss +20 -0
  442. package/lib/template/wide-narrow-form/wide-narrow-form.component.spec.ts +24 -0
  443. package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +34 -0
  444. package/lib/template/wide-narrow-page/config-ext.json +8 -0
  445. package/lib/template/wide-narrow-page/wide-narrow-page.component.html +6 -0
  446. package/lib/template/wide-narrow-page/wide-narrow-page.component.scss +0 -0
  447. package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +61 -0
  448. package/lib/template/wss-nav-bar/wss-nav-bar.component.html +32 -0
  449. package/lib/template/wss-nav-bar/wss-nav-bar.component.scss +166 -0
  450. package/lib/template/wss-nav-bar/wss-nav-bar.component.spec.ts +22 -0
  451. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +172 -0
  452. package/lib/widget/app-announcement/app-announcement.component.html +13 -0
  453. package/lib/widget/app-announcement/app-announcement.component.scss +21 -0
  454. package/lib/widget/app-announcement/app-announcement.component.spec.ts +24 -0
  455. package/lib/widget/app-announcement/app-announcement.component.ts +35 -0
  456. package/lib/widget/app-announcement/config-ext.json +8 -0
  457. package/lib/widget/attachment/attachment.component.html +31 -0
  458. package/lib/widget/attachment/attachment.component.scss +57 -0
  459. package/lib/widget/attachment/attachment.component.spec.ts +24 -0
  460. package/lib/widget/attachment/attachment.component.ts +705 -0
  461. package/lib/widget/attachment/config-ext.json +7 -0
  462. package/lib/widget/case-history/case-history.component.html +12 -0
  463. package/lib/widget/case-history/case-history.component.scss +22 -0
  464. package/lib/widget/case-history/case-history.component.spec.ts +24 -0
  465. package/lib/widget/case-history/case-history.component.ts +104 -0
  466. package/lib/widget/case-history/config-ext.json +8 -0
  467. package/lib/widget/feed-container/config-ext.json +12 -0
  468. package/lib/widget/feed-container/feed-api.ts +410 -0
  469. package/lib/widget/feed-container/feed-container.component.html +137 -0
  470. package/lib/widget/feed-container/feed-container.component.scss +188 -0
  471. package/lib/widget/feed-container/feed-container.component.spec.ts +24 -0
  472. package/lib/widget/feed-container/feed-container.component.ts +616 -0
  473. package/lib/widget/file-utility/config-ext.json +8 -0
  474. package/lib/widget/file-utility/file-utility.component.html +100 -0
  475. package/lib/widget/file-utility/file-utility.component.scss +107 -0
  476. package/lib/widget/file-utility/file-utility.component.spec.ts +24 -0
  477. package/lib/widget/file-utility/file-utility.component.ts +759 -0
  478. package/lib/widget/list-utility/list-utility.component.html +32 -0
  479. package/lib/widget/list-utility/list-utility.component.scss +135 -0
  480. package/lib/widget/list-utility/list-utility.component.spec.ts +24 -0
  481. package/lib/widget/list-utility/list-utility.component.ts +47 -0
  482. package/lib/widget/quick-create/quick-create.component.html +1 -0
  483. package/lib/widget/quick-create/quick-create.component.scss +0 -0
  484. package/lib/widget/quick-create/quick-create.component.spec.ts +22 -0
  485. package/lib/widget/quick-create/quick-create.component.ts +96 -0
  486. package/lib/widget/todo/config-ext.json +8 -0
  487. package/lib/widget/todo/todo.component.html +47 -0
  488. package/lib/widget/todo/todo.component.scss +98 -0
  489. package/lib/widget/todo/todo.component.spec.ts +24 -0
  490. package/lib/widget/todo/todo.component.ts +265 -0
  491. package/lib/widget/utility/utility.component.html +1 -0
  492. package/lib/widget/utility/utility.component.scss +0 -0
  493. package/lib/widget/utility/utility.component.spec.ts +24 -0
  494. package/lib/widget/utility/utility.component.ts +50 -0
  495. package/package.json +14 -0
@@ -0,0 +1,745 @@
1
+ import { getDefaultViewMeta } from './DefaultViewMeta';
2
+
3
+ // Remove this and use "real" PCore type once .d.ts is fixed (currently shows 5 errors)
4
+ declare const PCore: any;
5
+
6
+ const USER_REFERENCE = 'UserReference';
7
+ const PAGE = '!P!';
8
+ const PAGELIST = '!PL!';
9
+
10
+ export const formatConstants = {
11
+ WorkStatus: 'WorkStatus',
12
+ Integer: 'Integer',
13
+ WorkLink: 'WorkLink'
14
+ };
15
+
16
+ class DataApi {
17
+ mappedPropertyToOriginalProperty: any;
18
+ originalPropertyToMappedProperty: any;
19
+ constructor() {
20
+ this.originalPropertyToMappedProperty = {};
21
+ this.mappedPropertyToOriginalProperty = {};
22
+ this.setPropertyMaps = this.setPropertyMaps.bind(this);
23
+ this.getMappedProperty = this.getMappedProperty.bind(this);
24
+ this.getOriginalProperty = this.getOriginalProperty.bind(this);
25
+ }
26
+
27
+ setPropertyMaps(originalToMappedPropertyObj = {}, mappedToOriginalPropertyObj = {}) {
28
+ this.originalPropertyToMappedProperty = {
29
+ ...this.originalPropertyToMappedProperty,
30
+ ...originalToMappedPropertyObj
31
+ };
32
+ this.mappedPropertyToOriginalProperty = {
33
+ ...this.mappedPropertyToOriginalProperty,
34
+ ...mappedToOriginalPropertyObj
35
+ };
36
+ }
37
+
38
+ getMappedProperty(propertyName) {
39
+ return this.originalPropertyToMappedProperty[propertyName] ?? propertyName;
40
+ }
41
+
42
+ getOriginalProperty(propertyName) {
43
+ return this.mappedPropertyToOriginalProperty[propertyName] ?? propertyName;
44
+ }
45
+ }
46
+
47
+ export async function getContext(componentConfig) {
48
+ const {
49
+ promisesArray = [] // array of promises which can be invoked paralelly,
50
+ } = componentConfig;
51
+ const promisesResponseArray = await Promise.all(promisesArray);
52
+ const dataApi = new DataApi();
53
+ return {
54
+ promisesResponseArray,
55
+ setPropertyMaps: dataApi.setPropertyMaps,
56
+ getMappedProperty: dataApi.getMappedProperty,
57
+ getOriginalProperty: dataApi.getOriginalProperty
58
+ };
59
+ }
60
+
61
+ /**
62
+ * [getFieldNameFromEmbeddedFieldName]
63
+ * Description - converting embeddedField name starting with !P! or !PL! to normal field
64
+ * @ignore
65
+ * @param {string} propertyName EmbeddedField name starting with !P! or !PL!
66
+ * @returns {string} returns converted string without !P! or !PL! and :
67
+ *
68
+ * @example <caption>Example for getFieldNameFromEmbeddedFieldName </caption>
69
+ * getFieldNameFromEmbeddedFieldName('!P!Organisation:Name') return 'Organisation.Name'
70
+ * getFieldNameFromEmbeddedFieldName('!PL!Employees:Name') return 'Employees.Name'
71
+ */
72
+ export function getFieldNameFromEmbeddedFieldName(propertyName) {
73
+ let value = propertyName;
74
+ if (value.startsWith(PAGE) || value.startsWith(PAGELIST)) {
75
+ value = value.substring(value.lastIndexOf('!') + 1);
76
+ value = value.replace(/:/g, '.');
77
+ }
78
+ return value;
79
+ }
80
+
81
+ /**
82
+ * [updateMetaEmbeddedFieldID]
83
+ * Description - If the fieldID in meta starts with '!P!' or '!PL!' and contains ':' then replace them with .(dot)
84
+ * @ignore
85
+ * @param {Array} metaFields Fields metadata Array. Contains metadata of all the fields.
86
+ */
87
+ export function updateMetaEmbeddedFieldID(metaFields) {
88
+ return metaFields.forEach(metaField => {
89
+ if (metaField.fieldID?.startsWith(PAGE) || metaField.fieldID?.startsWith(PAGELIST)) {
90
+ metaField.fieldID = getFieldNameFromEmbeddedFieldName(metaField.fieldID);
91
+ }
92
+ });
93
+ }
94
+
95
+ export const isEmbeddedField = field => {
96
+ if (field?.startsWith('@')) {
97
+ field = field.substring(field.indexOf(' ') + 1);
98
+ if (field[0] === '.') field = field.substring(1);
99
+ }
100
+ return field?.indexOf('.') > 0;
101
+ };
102
+
103
+ /**
104
+ * [isPageListProperty]
105
+ * Description - checking if propertyName is pageList or not
106
+ * @ignore
107
+ * @param {string} propertyName PropertyName
108
+ * @returns {boolean} true if property is pageList else false
109
+ *
110
+ * @example <caption>Example for isPageListProperty </caption>
111
+ * isPageListProperty('!PL!Employees.Name') return true
112
+ * isPageListProperty('!P!Employees.Name') return false
113
+ * isPageListProperty('Name') return false
114
+ */
115
+ export function isPageListProperty(propertyName) {
116
+ return propertyName.startsWith(PAGELIST);
117
+ }
118
+
119
+ export const isPageListInPath = (propertyName, currentClassID) => {
120
+ if (!propertyName.includes('.')) {
121
+ return false;
122
+ }
123
+ const [first, ...rest] = propertyName.split('.');
124
+ const metadata = PCore.getMetadataUtils().getPropertyMetadata(first, currentClassID);
125
+ if (metadata?.type === 'Page List') {
126
+ return true;
127
+ }
128
+ return isPageListInPath(rest.join('.'), metadata?.pageClass);
129
+ };
130
+
131
+ /**
132
+ * [getEmbeddedFieldName]
133
+ * Description - converting normal field name to embedded field starting with !P! or !PL!
134
+ * @ignore
135
+ * @param {string} propertyName Field name
136
+ * @param {string} classID classID of datapage
137
+ * @returns {string} returns converted string with !P! or !PL! and :
138
+ *
139
+ * @example <caption>Example for getEmbeddedFieldName </caption>
140
+ * For page property, getEmbeddedFieldName('Organisation.Name') return '!P!Organisation:Name'
141
+ * For pageList property, getEmbeddedFieldName('Employees.Name') return '!PL!Employees:Name'
142
+ */
143
+
144
+ export function getEmbeddedFieldName(propertyName, classID) {
145
+ let value = propertyName;
146
+ if (isPageListInPath(value, classID)) {
147
+ value = `!PL!${value.replace(/\./g, ':')}`;
148
+ } else {
149
+ value = `!P!${value.replace(/\./g, ':')}`;
150
+ }
151
+ return value;
152
+ }
153
+
154
+ /**
155
+ * [preparePropertyMaps]
156
+ * Description - preparing maps for property names and set it in dataApi context
157
+ * @ignore
158
+ * @param {Array} fields fields array
159
+ * @param {string} classID classID of datapage
160
+ * @param {string} context dataApi context
161
+ * @returns {boolean} true if pageListProperty is present
162
+ */
163
+ export function preparePropertyMaps(fields, classID, context) {
164
+ const { setPropertyMaps } = context;
165
+ const maps = fields.reduce(
166
+ (acc, field) => {
167
+ let { value } = field.config;
168
+ if (value.startsWith('@')) {
169
+ value = value.substring(value.indexOf(' ') + 1);
170
+ if (value[0] === '.') value = value.substring(1);
171
+ }
172
+ let name = value;
173
+ // Preparing name for embedded property
174
+ if (isEmbeddedField(name)) {
175
+ name = getEmbeddedFieldName(name, classID);
176
+ }
177
+ if (isPageListProperty(name) && !acc[2]) {
178
+ acc[2] = true;
179
+ }
180
+ acc[0][value] = name;
181
+ acc[1][name] = value;
182
+
183
+ return acc;
184
+ },
185
+ [{}, {}, false]
186
+ );
187
+ setPropertyMaps(maps[0], maps[1]);
188
+ return maps[2];
189
+ }
190
+
191
+ /**
192
+ * [getConfigEmbeddedFieldsMeta]
193
+ * Description - Get the metadata for configured embedded fields
194
+ * @ignore
195
+ * @param {Set} configFields Set of config fields
196
+ * @param {string} classID clasID of datapage
197
+ * @returns {Array} Metadata of configured embedded fields
198
+ */
199
+ export function getConfigEmbeddedFieldsMeta(configFields, classID) {
200
+ const configEmbeddedFieldsMeta: any[] = [];
201
+ configFields.forEach(field => {
202
+ let value = field;
203
+ if (isEmbeddedField(value)) {
204
+ // conversion Page.PageList[].property => Page.PageList.property
205
+ if (value.includes('[')) {
206
+ value = value.substring(0, value.indexOf('[')) + value.substring(value.indexOf(']') + 1);
207
+ }
208
+ const meta = PCore.getMetadataUtils().getEmbeddedPropertyMetadata(value, classID);
209
+ meta.fieldID = field;
210
+ configEmbeddedFieldsMeta.push(meta);
211
+ }
212
+ });
213
+ return configEmbeddedFieldsMeta;
214
+ }
215
+
216
+ /**
217
+ * [mergeConfigEmbeddedFieldsMeta]
218
+ * Description - Get the metadata for configured embedded fields
219
+ * @ignore
220
+ * @param {Array} configEmbeddedFieldsMeta config fields metadata.
221
+ * @param {Array} metaFields Fields metadata Array. Contains metadata of all the fields
222
+ */
223
+ export function mergeConfigEmbeddedFieldsMeta(configEmbeddedFieldsMeta, metaFields) {
224
+ const mergedMetaFields = [...metaFields];
225
+ configEmbeddedFieldsMeta.forEach(configFieldMeta => {
226
+ const fieldMeta = metaFields.find(metaField => metaField.fieldID === configFieldMeta.fieldID);
227
+ if (!fieldMeta) mergedMetaFields.push(configFieldMeta);
228
+ });
229
+ return mergedMetaFields;
230
+ }
231
+
232
+ const oldToNewFieldTypeMapping = {
233
+ 'Date Time': 'Date & time',
234
+ Date: 'Date only'
235
+ };
236
+
237
+ /**
238
+ * [updateFieldType]
239
+ * Description - Updates the field type if its changed in the new implementation. Such mapping is maintained in oldToNewFieldTypeMapping.
240
+ * @ignore
241
+ * @param {Array} metaFields Fields metadata Array. Contains metadata of all the fields.
242
+ */
243
+ function updateFieldType(metaFields) {
244
+ metaFields.forEach(metaField => {
245
+ if (metaField.type) metaField.type = oldToNewFieldTypeMapping[metaField.type] || metaField.type;
246
+ });
247
+ }
248
+
249
+ function getPresetMetaAttribute(attribute) {
250
+ const {
251
+ type,
252
+ config: { label, value }
253
+ } = attribute;
254
+ return {
255
+ type,
256
+ name: value.startsWith('@') ? value.substring(4) : value,
257
+ label: label.startsWith('@') ? label.substring(3) : label
258
+ };
259
+ }
260
+
261
+ /**
262
+ * [generateViewMetaData]
263
+ * Description - Returns a list of metaobjects of the fields provided.
264
+ * @ignore
265
+ * @param {Array} rawFields List of fields to update meta for
266
+ * @param {string} classID Class ID from the response
267
+ * @returns {Array} List of fields with updated meta objects.
268
+ */
269
+ function generateViewMetaData(rawFields, classID, showField) {
270
+ return rawFields.map(item => getDefaultViewMeta(item, classID, showField));
271
+ }
272
+
273
+ /**
274
+ * [getConfigFields]
275
+ * Description - Returns list of config fields with primary fields meta updated.
276
+ * @ignore
277
+ * @param {Array} configFields List of Authored fields
278
+ * @param {Array} primaryFields List of Primary Fields
279
+ * @param {Array} metaFields Metadata of all fields
280
+ * @param {string} classID Class ID from the response
281
+ * @returns {Array} List of all fields with their meta updated.
282
+ */
283
+ function getConfigFields(configFields, primaryFields, metaFields, classID) {
284
+ const presetConfigFields = configFields;
285
+ const primaryFieldsViewIndex = presetConfigFields.findIndex(field => field.config.value === 'pyPrimaryFields');
286
+ if (!primaryFields || !primaryFields.length) {
287
+ if (primaryFieldsViewIndex < 0) return presetConfigFields;
288
+
289
+ presetConfigFields.splice(primaryFieldsViewIndex, 1);
290
+
291
+ return presetConfigFields;
292
+ }
293
+
294
+ if (primaryFieldsViewIndex > -1) {
295
+ // list of uncommon fields - non overlap of primary fields grouped view and independent entity columns of primary type
296
+ const uncommonFieldsList = primaryFields.filter(
297
+ primaryField => !presetConfigFields.some(presetConfigField => presetConfigField.config.value.split('.')[1] === primaryField)
298
+ );
299
+ const uncommonFieldsRawMeta: any[] = [];
300
+ uncommonFieldsList.forEach(uncommonField => {
301
+ const uncommonFieldMeta = metaFields.find(metaField => metaField.fieldID === uncommonField);
302
+ if (uncommonFieldMeta) uncommonFieldsRawMeta.push(uncommonFieldMeta);
303
+ });
304
+ const uncommonFieldsConfigMeta = generateViewMetaData(uncommonFieldsRawMeta, classID, true);
305
+
306
+ presetConfigFields.splice(primaryFieldsViewIndex, 1, ...uncommonFieldsConfigMeta);
307
+ }
308
+ return presetConfigFields;
309
+ }
310
+
311
+ /**
312
+ * [getTableConfigFromPresetMeta]
313
+ * Description - Get the table config from the presets meta.
314
+ * @ignore
315
+ * @param {object} presetMeta Presets meta
316
+ * @param {boolean} isMetaWithPresets true if meta has presets else false
317
+ * @param {Function} getPConnect Callback to get the PConnect object
318
+ * @param {string} classID Class ID from the response
319
+ * @param {Array} primaryFields List of Primary Fields
320
+ * @param {Array} metaFields List of all metafields
321
+ * @returns {object} Table config object
322
+ */
323
+ export function getTableConfigFromPresetMeta(presetMeta, isMetaWithPresets, pConn$, classID, primaryFields, metaFields) {
324
+ let presetId;
325
+ let presetName;
326
+ let cardHeader;
327
+ let secondaryText;
328
+ let timelineDate;
329
+ let timelineTitle;
330
+ let timelineStatus;
331
+ let timelineIcon;
332
+ let { filterExpression } = pConn$.getRawMetadata().config;
333
+ let fieldsMeta;
334
+ let configFields;
335
+ if (isMetaWithPresets) {
336
+ presetId = presetMeta.id;
337
+ presetName = presetMeta.label;
338
+ cardHeader = presetMeta.cardHeader && getPresetMetaAttribute(presetMeta.cardHeader);
339
+ secondaryText = presetMeta.secondaryText && getPresetMetaAttribute(presetMeta.secondaryText);
340
+ timelineDate = presetMeta.timelineDate && getPresetMetaAttribute(presetMeta.timelineDate);
341
+ timelineTitle = presetMeta.timelineTitle && getPresetMetaAttribute(presetMeta.timelineTitle);
342
+ timelineStatus = presetMeta.timelineStatus && getPresetMetaAttribute(presetMeta.timelineStatus);
343
+ timelineIcon = presetMeta.timelineIcon && getPresetMetaAttribute(presetMeta.timelineIcon);
344
+ filterExpression = presetMeta.config.filterExpression;
345
+ [fieldsMeta] = presetMeta.children;
346
+ if (
347
+ presetMeta.timelineTitle &&
348
+ !fieldsMeta.children.find(fieldMeta => {
349
+ return fieldMeta?.config?.value === presetMeta.timelineTitle?.config?.value;
350
+ })
351
+ ) {
352
+ const { type, config } = presetMeta.timelineTitle;
353
+ fieldsMeta.children.push({ type, config: { ...config, show: false } });
354
+ }
355
+ if (
356
+ presetMeta.timelineDate &&
357
+ !fieldsMeta.children.find(fieldMeta => {
358
+ return fieldMeta?.config?.value === presetMeta.timelineDate?.config?.value;
359
+ })
360
+ ) {
361
+ const { type, config } = presetMeta.timelineDate;
362
+ fieldsMeta.children.push({ type, config: { ...config, show: false } });
363
+ }
364
+ configFields = getConfigFields(fieldsMeta.children, primaryFields, metaFields, classID);
365
+ } else {
366
+ fieldsMeta = presetMeta.props;
367
+ configFields = getConfigFields(
368
+ fieldsMeta
369
+ .getPConnect()
370
+ .getChildren()
371
+ ?.map(child => {
372
+ return child.getPConnect().getRawMetadata();
373
+ }),
374
+ primaryFields,
375
+ metaFields,
376
+ classID
377
+ );
378
+ }
379
+ return {
380
+ presetId,
381
+ presetName,
382
+ cardHeader,
383
+ secondaryText,
384
+ timelineDate,
385
+ timelineTitle,
386
+ timelineStatus,
387
+ timelineIcon,
388
+ filterExpression,
389
+ fieldsMeta,
390
+ configFields
391
+ };
392
+ }
393
+
394
+ /**
395
+ * [getReportColumns]
396
+ * Description - Returns a set of columns from the report response.
397
+ * @ignore
398
+ * @param {object} response -
399
+ * @returns {Set} Set of columns from the report response
400
+ */
401
+ function getReportColumns(response) {
402
+ const {
403
+ data: { data: reportColumns }
404
+ } = response;
405
+ const reportColumnsSet = new Set();
406
+ reportColumns?.forEach(item => {
407
+ let val = item.pyFieldName;
408
+ // Remove '.' from index 0 only, if '.' is present
409
+ if (val[0] === '.') {
410
+ val = val.substring(1);
411
+ }
412
+ reportColumnsSet.add(val);
413
+ });
414
+ return reportColumnsSet;
415
+ }
416
+
417
+ /**
418
+ * [getConfigFieldValue]
419
+ * Descritpion - Returns a valid value for a configuration field. Remove any annotations and also "."
420
+ * @ignore
421
+ * @param {object} config
422
+ * config.value - Raw value
423
+ * @returns {string} value - Value with out any annotations or "."
424
+ */
425
+ function getConfigFieldValue(config) {
426
+ let { value } = config;
427
+ if (value.startsWith('@')) {
428
+ value = value.substring(value.indexOf(' ') + 1);
429
+ if (value[0] === '.') value = value.substring(1);
430
+ }
431
+ return value;
432
+ }
433
+
434
+ /**
435
+ * [prepareConfigFields]
436
+ * Description - Prepares a set of configuration fields and pushes each config type to a set using the callback parameter.
437
+ * @ignore
438
+ * @param {object} configFields List of Authored fields
439
+ * @param {Function} pushToComponentsList Callback to push the field type to a set.
440
+ * @returns {Set} configFieldSet
441
+ */
442
+ function prepareConfigFields(configFields, pushToComponentsList) {
443
+ const configFieldSet = new Set();
444
+ configFields.forEach(item => {
445
+ pushToComponentsList(item.type);
446
+ const val = getConfigFieldValue(item.config);
447
+ configFieldSet.add(val);
448
+ });
449
+ return configFieldSet;
450
+ }
451
+
452
+ /**
453
+ * [findAuthoredField]
454
+ * Description - Finds an authored field from yhe list of config fields.
455
+ * @ignore
456
+ * @param {Array} configFields List of Authored fields
457
+ * @param {string} fieldID Filter
458
+ * @returns {object} config with its field value equal to fieldID, which means an authored field
459
+ */
460
+ function findAuthoredField(configFields, fieldID) {
461
+ return configFields.find(configField => {
462
+ const val = getConfigFieldValue(configField.config);
463
+ return val === fieldID;
464
+ });
465
+ }
466
+
467
+ /**
468
+ * [findAndUpdateAuthoredFieldConfig]
469
+ * Description - Find the authored field, and update its config.
470
+ * @ignore
471
+ * @param {Array} configFields List of Authored fields
472
+ * @param {object} item Field item to copy displayAs and category information
473
+ * @param {string} classId classID from the response
474
+ */
475
+ function findAndUpdateAuthoredFieldConfig(configFields, item, classId) {
476
+ const authoredField = findAuthoredField(configFields, item.fieldID);
477
+ if (authoredField?.config) {
478
+ if (item.displayAs) {
479
+ authoredField.config.displayAs = item.displayAs;
480
+ }
481
+ authoredField.config.classID = item.classID ?? classId;
482
+
483
+ if (authoredField.type === USER_REFERENCE) {
484
+ authoredField.config.associationID = item.associationID || item.fieldID;
485
+ }
486
+ authoredField.config.category = item.category;
487
+ // FieldType identifies whether the field is configured as pickList
488
+ authoredField.config.fieldType = item.fieldType;
489
+ // type defined on the property rule,
490
+ // used for the picklist field to assign the appropriate type
491
+ authoredField.config.propertyType = item.dataType || item.type;
492
+ }
493
+ }
494
+
495
+ /**
496
+ * [isAnExtraField]
497
+ * Description - Returns true if the field is an extra field. Extra field is the one which is not authored but part of the report.
498
+ * @ignore
499
+ * @param {Array} configFields List of Authored fields
500
+ * @param {Set} configFieldSet Set if Authored filed values
501
+ * @param {Set} reportColumnsSet Set of columns from the report
502
+ * @param {object} item Config field item
503
+ * @param {string} classId Class ID from the response
504
+ * @param {boolean} showDynamicFields Flag indicating whether fields are fetched dynamically at runtime
505
+ * @returns {boolean} true If the field is an extra field else false.
506
+ */
507
+ function isAnExtraField(configFields, configFieldSet, reportColumnsSet, item, classId, showDynamicFields) {
508
+ // Is the field already present in authoring metadata?
509
+ // Mutates config fields to copy displayAs and category information
510
+ if (configFieldSet.has(item.fieldID)) {
511
+ findAndUpdateAuthoredFieldConfig(configFields, item, classId);
512
+ return false;
513
+ }
514
+
515
+ // If field is not authored and not part of report columns then discard it
516
+ return showDynamicFields || !!reportColumnsSet.has(item.fieldID);
517
+ }
518
+
519
+ /**
520
+ * [prepareExtraFields]
521
+ * Description - Returns a list of extra fields with their meta updated.
522
+ * @ignore
523
+ * @param {Array} metaFields List of fields
524
+ * @param {Array} configFields List of Authored fields
525
+ * @param {Set} configFieldSet Set if Authored filed values
526
+ * @param {Set} reportColumnsSet Set of columns from the report
527
+ * @param {string} classID Class ID from the response
528
+ * @param {boolean} showDynamicFields Flag indicating whether fields are fetched dynamically at runtime
529
+ * @returns {Array} List of extra fields with their meta updated.
530
+ */
531
+ function prepareExtraFields(metaFields, configFields, configFieldSet, reportColumnsSet, classID, showDynamicFields) {
532
+ // Filter all the extra fields
533
+ const extraFileds = metaFields.filter(item => {
534
+ return isAnExtraField(configFields, configFieldSet, reportColumnsSet, item, classID, showDynamicFields);
535
+ });
536
+ return generateViewMetaData(extraFileds, classID, false);
537
+ // Update the meta object of each of the extra fields.
538
+ }
539
+
540
+ const AssignDashObjects = ['Assign-Worklist', 'Assign-WorkBasket'];
541
+
542
+ function populateRenderingOptions(name, config, field) {
543
+ const shouldDisplayAsSemanticLink = 'displayAsLink' in field.config && field.config.displayAsLink;
544
+ if (shouldDisplayAsSemanticLink) {
545
+ config.customObject.isAssignmentLink = AssignDashObjects.includes(field.config.classID);
546
+ if (field.config.value.startsWith('@CA')) {
547
+ config.customObject.isAssociation = true;
548
+ }
549
+ config.cellRenderer = formatConstants.WorkLink;
550
+ } else if (name === 'pyStatusWork' || name === 'pyAssignmentStatus') {
551
+ config.cellRenderer = formatConstants.WorkStatus;
552
+ } else if (name === 'pxUrgencyWork') {
553
+ config.cellRenderer = formatConstants.Integer;
554
+ }
555
+ }
556
+ export function initializeColumns(fields: any[] = [], getMappedProperty: any = null) {
557
+ return fields.map((field, originalColIndex) => {
558
+ let name = field.config.value;
559
+
560
+ if (name.startsWith('@')) {
561
+ name = name.substring(name.indexOf(' ') + 1);
562
+ if (name[0] === '.') name = name.substring(1);
563
+ }
564
+ name = getMappedProperty?.(name) ?? name;
565
+
566
+ let label = field.config.label || field.config.caption;
567
+ const { show = true, displayAs } = field.config;
568
+ if (label.startsWith('@')) {
569
+ label = label.substring(3);
570
+ }
571
+
572
+ const config = {
573
+ name,
574
+ label,
575
+ show,
576
+ classID: field.config.classID,
577
+ id: field.id || name || originalColIndex,
578
+ displayAs,
579
+ associationID: field.config.associationID,
580
+ ...(field.config.classID && { category: field.config.category }),
581
+ customObject: {},
582
+ fieldType: field.config.fieldType,
583
+ meta: {
584
+ ...field
585
+ }
586
+ };
587
+
588
+ populateRenderingOptions(name, config, field);
589
+
590
+ return config;
591
+ });
592
+ }
593
+
594
+ export const getItemKey = fields => {
595
+ let itemKey;
596
+ if (fields.findIndex(field => field.id === 'pyGUID') > -1) {
597
+ itemKey = 'pyGUID';
598
+ } else {
599
+ itemKey = 'pzInsKey';
600
+ }
601
+ return itemKey;
602
+ };
603
+
604
+ export function preparePatchQueryFields(fields, isDataObject = false, classID = '') {
605
+ const queryFields: any[] = [];
606
+ fields.forEach(field => {
607
+ const patchFields: any[] = [];
608
+ if (field.cellRenderer === 'WorkLink') {
609
+ if (field.customObject && field.customObject.isAssignmentLink) {
610
+ const associationName = field.name.includes(':') ? `${field.name.split(':')[0]}:` : '';
611
+ patchFields.push(`${associationName}pzInsKey`);
612
+ patchFields.push(`${associationName}pxRefObjectClass`);
613
+ } else if (field.customObject && field.customObject.isAssociation) {
614
+ const associationCategory = field.name.split(':')[0];
615
+ patchFields.push(`${associationCategory}:pyID`);
616
+ patchFields.push(`${associationCategory}:pzInsKey`);
617
+ patchFields.push(`${associationCategory}:pxObjClass`);
618
+ } else if (isDataObject) {
619
+ const dataViewName = PCore.getDataTypeUtils().getSavableDataPage(classID);
620
+ const dataPageKeys = PCore.getDataTypeUtils().getDataPageKeys(dataViewName);
621
+ dataPageKeys?.forEach(item => (item.isAlternateKeyStorage ? patchFields.push(item.linkedField) : patchFields.push(item.keyName)));
622
+ } else {
623
+ patchFields.push('pyID');
624
+ patchFields.push('pzInsKey');
625
+ patchFields.push('pxObjClass');
626
+ }
627
+ }
628
+ patchFields.forEach(k => {
629
+ if (!queryFields.find(q => q === k)) {
630
+ queryFields.push(k);
631
+ }
632
+ });
633
+ });
634
+
635
+ return queryFields;
636
+ }
637
+
638
+ /**
639
+ * Update the renderer type for the properties of type Page.
640
+ */
641
+ export function updatePageFieldsConfig(configFields, parentClassID) {
642
+ return configFields.forEach(item => {
643
+ const {
644
+ type,
645
+ config: { value }
646
+ } = item;
647
+ const propertyName = PCore.getAnnotationUtils().getPropertyName(value);
648
+ if (isEmbeddedField(value) && !isPageListInPath(propertyName, parentClassID)) {
649
+ item.config.componentType = type;
650
+ item.type = 'PagePropertyRenderer';
651
+ }
652
+ });
653
+ }
654
+
655
+ export const readContextResponse = async (context, params) => {
656
+ const { pConn$, apiContext, children, showDynamicFields, referenceList, isDataObject } = params;
657
+ // let { listContext } = params;
658
+ const { promisesResponseArray, apiContext: otherContext } = context;
659
+ // eslint-disable-next-line sonarjs/no-unused-collection
660
+ const listOfComponents: any[] = [];
661
+ const {
662
+ data: { fields: metaFields, classID, isQueryable }
663
+ } = promisesResponseArray[0];
664
+ let {
665
+ data: { primaryFields }
666
+ } = promisesResponseArray[0];
667
+ // When list is configured with Include all class fields configuration, provide support for Primary fields column
668
+ if (showDynamicFields) {
669
+ const sourceMetadata = PCore.getMetadataUtils().getDataPageMetadata(referenceList);
670
+ if (sourceMetadata?.primaryFields) {
671
+ primaryFields = sourceMetadata.primaryFields;
672
+ }
673
+ // updating metaData fieldID to normal property if it has fieldID starts with !P! or !PL!
674
+ updateMetaEmbeddedFieldID(metaFields);
675
+ }
676
+ updateFieldType(metaFields);
677
+
678
+ if (isDataObject) {
679
+ const compositeKeys: any[] = [];
680
+ const dataViewName = PCore.getDataTypeUtils().getSavableDataPage(classID);
681
+ const dataPageKeys = PCore.getDataTypeUtils().getDataPageKeys(dataViewName);
682
+ dataPageKeys?.forEach(item => (item.isAlternateKeyStorage ? compositeKeys.push(item.linkedField) : compositeKeys.push(item.keyName)));
683
+ if (compositeKeys.length) {
684
+ otherContext.setCompositeKeys(compositeKeys);
685
+ }
686
+ otherContext.fetchRowActionDetails = null;
687
+ }
688
+
689
+ const presetArray = [];
690
+ const rawMetadata = pConn$.getRawMetadata().config;
691
+ const rawPresets = rawMetadata.presets;
692
+ const isMetaWithPresets = rawPresets && rawPresets.length !== 0;
693
+ const childrenIterator = isMetaWithPresets ? rawPresets : children;
694
+ const resolvedPresets = pConn$.getConfigProps().presets;
695
+ let fields;
696
+ let tableConfig;
697
+ childrenIterator?.forEach((presetMeta, index) => {
698
+ const { configFields } = getTableConfigFromPresetMeta(
699
+ { ...presetMeta, label: resolvedPresets[index].label },
700
+ isMetaWithPresets,
701
+ pConn$,
702
+ classID,
703
+ primaryFields,
704
+ metaFields
705
+ );
706
+ const pushToComponentsList = fieldType => {
707
+ listOfComponents.push(fieldType);
708
+ };
709
+ // read report columns response - in case of nonqueryable ignore the response and rely only on the fields configured at authoing time in presets
710
+ const reportColumnsSet = isQueryable ? getReportColumns(promisesResponseArray[1]) : new Set();
711
+
712
+ const configFieldSet = prepareConfigFields(configFields, pushToComponentsList);
713
+
714
+ // FIXME #EmbeddedPropertyPatch
715
+ // TODO: Remove this merge logic when the metadata response includes all optimized embedded page and pagelists
716
+ // merging configured embedded properties with metadata so that while preparing extra fields, config fields can get other properties from meta(eg: category, displayAsLink)
717
+ // get configured embedded properties metadata and get new mergedMetaFields
718
+ const configEmbeddedFieldsMeta = getConfigEmbeddedFieldsMeta(configFieldSet, classID);
719
+ const mergedMetaFields = mergeConfigEmbeddedFieldsMeta(configEmbeddedFieldsMeta, metaFields);
720
+
721
+ const extraFields = prepareExtraFields(
722
+ mergedMetaFields, // passing new merged meta fields which has meta of configured embedded fields of current preset
723
+ configFields,
724
+ configFieldSet,
725
+ reportColumnsSet,
726
+ classID,
727
+ showDynamicFields
728
+ );
729
+
730
+ if (isQueryable) {
731
+ updatePageFieldsConfig(configFields, classID);
732
+ preparePropertyMaps([...configFields, ...extraFields], classID, context);
733
+ }
734
+
735
+ const { getMappedProperty } = context;
736
+
737
+ fields = initializeColumns([...configFields, ...extraFields], getMappedProperty);
738
+ const patchQueryFields = preparePatchQueryFields(fields, isDataObject, classID);
739
+ const itemKey = getItemKey(fields);
740
+ tableConfig = { fieldDefs: fields, patchQueryFields, itemKey, isQueryable };
741
+ });
742
+ const meta = tableConfig;
743
+ params.listContext = { meta, presets: presetArray, apiContext: { ...apiContext } };
744
+ return params.listContext;
745
+ };