@genesislcap/pbc-reconciliation-ui 0.0.46 → 14.339.0

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 (234) hide show
  1. package/.env +3 -0
  2. package/dist/dts/components/configurations-panel/configuration-datasources/configuration-datasources.d.ts.map +1 -1
  3. package/dist/dts/components/configurations-panel/configuration-datasources/configuration-datasources.template.d.ts.map +1 -1
  4. package/dist/dts/components/configurations-panel/configurations-panel.d.ts +2 -2
  5. package/dist/dts/components/configurations-panel/configurations-panel.d.ts.map +1 -1
  6. package/dist/dts/components/configurations-panel/configurations-panel.template.d.ts.map +1 -1
  7. package/dist/dts/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.d.ts.map +1 -1
  8. package/dist/dts/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.template.d.ts.map +1 -1
  9. package/dist/dts/components/data-dictionaries/columns.d.ts +2 -2
  10. package/dist/dts/components/data-dictionaries/columns.d.ts.map +1 -1
  11. package/dist/dts/components/data-dictionaries/data-dictionaries-utils.d.ts.map +1 -1
  12. package/dist/dts/components/data-dictionaries/data-dictionaries.d.ts +3 -6
  13. package/dist/dts/components/data-dictionaries/data-dictionaries.d.ts.map +1 -1
  14. package/dist/dts/components/data-dictionaries/data-dictionaries.template.d.ts +1 -1
  15. package/dist/dts/components/data-dictionaries/data-dictionaries.template.d.ts.map +1 -1
  16. package/dist/dts/components/data-dictionaries/data-dictionaries.types.d.ts +6 -0
  17. package/dist/dts/components/data-dictionaries/data-dictionaries.types.d.ts.map +1 -0
  18. package/dist/dts/components/list/list.d.ts.map +1 -1
  19. package/dist/dts/components/list/list.template.d.ts.map +1 -1
  20. package/dist/dts/components/rapid-components.d.ts.map +1 -1
  21. package/dist/dts/components/reconciliations-panel/columns.d.ts.map +1 -1
  22. package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.d.ts +3 -14
  23. package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.d.ts.map +1 -1
  24. package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.template.d.ts +1 -1
  25. package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.template.d.ts.map +1 -1
  26. package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.types.d.ts +13 -0
  27. package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.types.d.ts.map +1 -0
  28. package/dist/dts/components/reconciliations-panel/reconciliation-no-rows-overlay.d.ts +1 -1
  29. package/dist/dts/components/reconciliations-panel/reconciliation-no-rows-overlay.d.ts.map +1 -1
  30. package/dist/dts/components/reconciliations-panel/reconciliations-panel.d.ts +1 -1
  31. package/dist/dts/components/reconciliations-panel/reconciliations-panel.d.ts.map +1 -1
  32. package/dist/dts/components/reconciliations-panel/reconciliations-panel.styles.d.ts.map +1 -1
  33. package/dist/dts/components/reconciliations-panel/reconciliations-panel.template.d.ts.map +1 -1
  34. package/dist/dts/components/reconciliations-panel/reconciliations-panel.utils.d.ts +1 -1
  35. package/dist/dts/components/reconciliations-panel/reconciliations-panel.utils.d.ts.map +1 -1
  36. package/dist/dts/components/reconciliations-panel/result-details/result-details.d.ts +4 -33
  37. package/dist/dts/components/reconciliations-panel/result-details/result-details.d.ts.map +1 -1
  38. package/dist/dts/components/reconciliations-panel/result-details/result-details.template.d.ts +1 -1
  39. package/dist/dts/components/reconciliations-panel/result-details/result-details.template.d.ts.map +1 -1
  40. package/dist/dts/components/reconciliations-panel/result-details/result-details.types.d.ts +30 -0
  41. package/dist/dts/components/reconciliations-panel/result-details/result-details.types.d.ts.map +1 -0
  42. package/dist/dts/components/zero-components.d.ts.map +1 -1
  43. package/dist/dts/config/config.d.ts.map +1 -1
  44. package/dist/dts/config/configure.d.ts.map +1 -1
  45. package/dist/dts/config/templates.d.ts +2 -2
  46. package/dist/dts/config/templates.d.ts.map +1 -1
  47. package/dist/dts/main/main.d.ts +2 -2
  48. package/dist/dts/main/main.d.ts.map +1 -1
  49. package/dist/dts/main/main.styles.d.ts.map +1 -1
  50. package/dist/dts/main/main.template.d.ts +1 -1
  51. package/dist/dts/main/main.template.d.ts.map +1 -1
  52. package/dist/dts/reconciliation.types.d.ts +13 -13
  53. package/dist/dts/reconciliation.types.d.ts.map +1 -1
  54. package/dist/dts/sandbox.d.ts +2 -2
  55. package/dist/dts/sandbox.d.ts.map +1 -1
  56. package/dist/dts/services/document.service.d.ts.map +1 -1
  57. package/dist/dts/services/reconciliation-configuration.service.d.ts.map +1 -1
  58. package/dist/dts/services/reconciliation.service.d.ts.map +1 -1
  59. package/dist/dts/utils/delete-row-action-cell-renderer.d.ts.map +1 -1
  60. package/dist/dts/utils/endpoint.d.ts.map +1 -1
  61. package/dist/dts/utils/eventDetail.d.ts.map +1 -1
  62. package/dist/dts/utils/format-date.d.ts.map +1 -1
  63. package/dist/dts/utils/humanize.d.ts.map +1 -1
  64. package/dist/dts/utils/isEmpty.d.ts.map +1 -1
  65. package/dist/dts/utils/notification.d.ts.map +1 -1
  66. package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.js +3 -3
  67. package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.js.map +1 -1
  68. package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.styles.js +4 -4
  69. package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.styles.js.map +1 -1
  70. package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.template.js +1 -1
  71. package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.template.js.map +1 -1
  72. package/dist/esm/components/configurations-panel/configurations-panel.js +15 -11
  73. package/dist/esm/components/configurations-panel/configurations-panel.js.map +1 -1
  74. package/dist/esm/components/configurations-panel/configurations-panel.styles.js +346 -346
  75. package/dist/esm/components/configurations-panel/configurations-panel.styles.js.map +1 -1
  76. package/dist/esm/components/configurations-panel/configurations-panel.template.js +276 -278
  77. package/dist/esm/components/configurations-panel/configurations-panel.template.js.map +1 -1
  78. package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.js +3 -3
  79. package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.js.map +1 -1
  80. package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.styles.js +1 -1
  81. package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.template.js +1 -1
  82. package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.template.js.map +1 -1
  83. package/dist/esm/components/data-dictionaries/columns.js +4 -4
  84. package/dist/esm/components/data-dictionaries/data-dictionaries-utils.js.map +1 -1
  85. package/dist/esm/components/data-dictionaries/data-dictionaries.js +7 -11
  86. package/dist/esm/components/data-dictionaries/data-dictionaries.js.map +1 -1
  87. package/dist/esm/components/data-dictionaries/data-dictionaries.styles.js +1 -1
  88. package/dist/esm/components/data-dictionaries/data-dictionaries.template.js +3 -3
  89. package/dist/esm/components/data-dictionaries/data-dictionaries.template.js.map +1 -1
  90. package/dist/esm/components/data-dictionaries/data-dictionaries.types.js +7 -0
  91. package/dist/esm/components/data-dictionaries/data-dictionaries.types.js.map +1 -0
  92. package/dist/esm/components/list/list.js +1 -1
  93. package/dist/esm/components/list/list.js.map +1 -1
  94. package/dist/esm/components/list/list.template.js.map +1 -1
  95. package/dist/esm/components/rapid-components.js +1 -2
  96. package/dist/esm/components/rapid-components.js.map +1 -1
  97. package/dist/esm/components/reconciliations-panel/columns.js +9 -15
  98. package/dist/esm/components/reconciliations-panel/columns.js.map +1 -1
  99. package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.js +8 -21
  100. package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.js.map +1 -1
  101. package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.styles.js +7 -7
  102. package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.template.js +9 -12
  103. package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.template.js.map +1 -1
  104. package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.types.js +16 -0
  105. package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.types.js.map +1 -0
  106. package/dist/esm/components/reconciliations-panel/reconciliations-panel.js +40 -32
  107. package/dist/esm/components/reconciliations-panel/reconciliations-panel.js.map +1 -1
  108. package/dist/esm/components/reconciliations-panel/reconciliations-panel.styles.js +300 -301
  109. package/dist/esm/components/reconciliations-panel/reconciliations-panel.styles.js.map +1 -1
  110. package/dist/esm/components/reconciliations-panel/reconciliations-panel.template.js +335 -331
  111. package/dist/esm/components/reconciliations-panel/reconciliations-panel.template.js.map +1 -1
  112. package/dist/esm/components/reconciliations-panel/reconciliations-panel.utils.js +9 -9
  113. package/dist/esm/components/reconciliations-panel/reconciliations-panel.utils.js.map +1 -1
  114. package/dist/esm/components/reconciliations-panel/result-details/result-details.js +24 -43
  115. package/dist/esm/components/reconciliations-panel/result-details/result-details.js.map +1 -1
  116. package/dist/esm/components/reconciliations-panel/result-details/result-details.template.js +7 -7
  117. package/dist/esm/components/reconciliations-panel/result-details/result-details.template.js.map +1 -1
  118. package/dist/esm/components/reconciliations-panel/result-details/result-details.types.js +17 -0
  119. package/dist/esm/components/reconciliations-panel/result-details/result-details.types.js.map +1 -0
  120. package/dist/esm/components/zero-components.js +2 -3
  121. package/dist/esm/components/zero-components.js.map +1 -1
  122. package/dist/esm/config/config.js.map +1 -1
  123. package/dist/esm/config/configure.js +1 -1
  124. package/dist/esm/config/configure.js.map +1 -1
  125. package/dist/esm/config/templates.js +1 -1
  126. package/dist/esm/main/main.js +4 -4
  127. package/dist/esm/main/main.js.map +1 -1
  128. package/dist/esm/main/main.styles.js +1 -0
  129. package/dist/esm/main/main.styles.js.map +1 -1
  130. package/dist/esm/main/main.template.js +8 -7
  131. package/dist/esm/main/main.template.js.map +1 -1
  132. package/dist/esm/sandbox.js +15 -8
  133. package/dist/esm/sandbox.js.map +1 -1
  134. package/dist/esm/services/data-dictionary.service.js +6 -6
  135. package/dist/esm/services/data-dictionary.service.js.map +1 -1
  136. package/dist/esm/services/document.service.js +3 -4
  137. package/dist/esm/services/document.service.js.map +1 -1
  138. package/dist/esm/services/reconciliation-configuration.service.js +3 -1
  139. package/dist/esm/services/reconciliation-configuration.service.js.map +1 -1
  140. package/dist/esm/services/reconciliation.service.js +8 -5
  141. package/dist/esm/services/reconciliation.service.js.map +1 -1
  142. package/dist/esm/utils/delete-row-action-cell-renderer.js +1 -3
  143. package/dist/esm/utils/delete-row-action-cell-renderer.js.map +1 -1
  144. package/dist/esm/utils/endpoint.js.map +1 -1
  145. package/dist/esm/utils/humanize.js.map +1 -1
  146. package/dist/esm/utils/icons.js +1 -1
  147. package/dist/esm/utils/isEmpty.js.map +1 -1
  148. package/dist/esm/utils/notification.js +1 -1
  149. package/dist/esm/utils/notification.js.map +1 -1
  150. package/dist/tsconfig.tsbuildinfo +1 -0
  151. package/license.txt +46 -0
  152. package/package.json +31 -30
  153. package/src/components/configurations-panel/configuration-datasources/configuration-datasources.styles.ts +72 -0
  154. package/src/components/configurations-panel/configuration-datasources/configuration-datasources.template.ts +73 -0
  155. package/src/components/configurations-panel/configuration-datasources/configuration-datasources.ts +64 -0
  156. package/src/components/configurations-panel/configurations-panel.styles.ts +363 -0
  157. package/src/components/configurations-panel/configurations-panel.template.ts +356 -0
  158. package/src/components/configurations-panel/configurations-panel.ts +387 -0
  159. package/src/components/configurations-panel/recon-rules-columns.ts +117 -0
  160. package/src/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.styles.ts +73 -0
  161. package/src/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.template.ts +122 -0
  162. package/src/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.ts +202 -0
  163. package/src/components/data-dictionaries/columns.ts +42 -0
  164. package/src/components/data-dictionaries/data-dictionaries-utils.ts +40 -0
  165. package/src/components/data-dictionaries/data-dictionaries.styles.ts +92 -0
  166. package/src/components/data-dictionaries/data-dictionaries.template.ts +78 -0
  167. package/src/components/data-dictionaries/data-dictionaries.ts +236 -0
  168. package/src/components/data-dictionaries/data-dictionaries.types.ts +5 -0
  169. package/src/components/list/list.styles.ts +88 -0
  170. package/src/components/list/list.template.ts +36 -0
  171. package/src/components/list/list.ts +33 -0
  172. package/src/components/rapid-components.ts +69 -0
  173. package/src/components/reconciliations-panel/columns.ts +74 -0
  174. package/src/components/reconciliations-panel/input-parameter/input-parameter.styles.ts +104 -0
  175. package/src/components/reconciliations-panel/input-parameter/input-parameter.template.ts +93 -0
  176. package/src/components/reconciliations-panel/input-parameter/input-parameter.ts +131 -0
  177. package/src/components/reconciliations-panel/input-parameter/input-parameter.types.ts +14 -0
  178. package/src/components/reconciliations-panel/reconciliation-no-rows-overlay.ts +18 -0
  179. package/src/components/reconciliations-panel/reconciliations-panel.styles.ts +328 -0
  180. package/src/components/reconciliations-panel/reconciliations-panel.template.ts +432 -0
  181. package/src/components/reconciliations-panel/reconciliations-panel.ts +441 -0
  182. package/src/components/reconciliations-panel/reconciliations-panel.utils.ts +103 -0
  183. package/src/components/reconciliations-panel/result-details/result-details.styles.ts +108 -0
  184. package/src/components/reconciliations-panel/result-details/result-details.template.ts +88 -0
  185. package/src/components/reconciliations-panel/result-details/result-details.ts +200 -0
  186. package/src/components/reconciliations-panel/result-details/result-details.types.ts +30 -0
  187. package/src/components/zero-components.ts +61 -0
  188. package/src/config/config.ts +49 -0
  189. package/src/config/configure.ts +72 -0
  190. package/src/config/index.ts +2 -0
  191. package/src/config/templates.ts +80 -0
  192. package/src/globals.d.ts +7 -0
  193. package/src/index.federated.ts +1 -0
  194. package/src/index.ts +3 -0
  195. package/src/main/index.ts +3 -0
  196. package/src/main/main.styles.ts +33 -0
  197. package/src/main/main.template.ts +65 -0
  198. package/src/main/main.ts +153 -0
  199. package/src/reconciliation.types.ts +170 -0
  200. package/src/sandbox.ts +40 -0
  201. package/src/services/data-dictionary.service.ts +64 -0
  202. package/src/services/document.service.ts +72 -0
  203. package/src/services/reconciliation-configuration.service.ts +105 -0
  204. package/src/services/reconciliation.service.ts +120 -0
  205. package/src/styles/scrollbar.styles.ts +15 -0
  206. package/src/tags/index.ts +1 -0
  207. package/src/tags/tags.ts +143 -0
  208. package/src/typings.d.ts +1 -0
  209. package/src/utils/delete-row-action-cell-renderer.ts +71 -0
  210. package/src/utils/endpoint.ts +15 -0
  211. package/src/utils/eventDetail.ts +5 -0
  212. package/src/utils/format-date.ts +9 -0
  213. package/src/utils/humanize.ts +14 -0
  214. package/src/utils/icons.ts +24 -0
  215. package/src/utils/index.ts +2 -0
  216. package/src/utils/isEmpty.ts +2 -0
  217. package/src/utils/logger.ts +3 -0
  218. package/src/utils/notification.ts +35 -0
  219. package/tsconfig.json +45 -0
  220. package/Dockerfile +0 -12
  221. package/docs/images/lsp_jetbrains_one.png +0 -0
  222. package/docs/images/lsp_jetbrains_two.png +0 -0
  223. package/docs/images/lsp_vscode_one.png +0 -0
  224. package/docs/images/lsp_vscode_two.png +0 -0
  225. package/playwright.config.ts +0 -1
  226. package/test/README.md +0 -3
  227. package/test/e2e/fixture.ts +0 -25
  228. package/test/e2e/flows/001-protected.e2e.ts +0 -6
  229. package/test/e2e/index.ts +0 -2
  230. package/test/e2e/pages/index.ts +0 -1
  231. package/test/e2e/pages/protected.ts +0 -16
  232. package/test/unit/mock/services/data-dictionary-service-mock.ts +0 -15
  233. package/test/unit/mock/services/reconciliation-configuration-service-mock.ts +0 -26
  234. package/test/unit/mock/services/reconciliation-service-mock.ts +0 -11
@@ -0,0 +1,88 @@
1
+ import { css } from '@genesislcap/web-core';
2
+ import { scrollbarStyles } from '../../styles/scrollbar.styles';
3
+
4
+ const PERC_ALL_CONF = '20';
5
+
6
+ export const ListStyles = css`
7
+ ${scrollbarStyles}
8
+ :host {
9
+ display: flex;
10
+ flex-direction: row;
11
+ flex: 1 1 ${PERC_ALL_CONF}%;
12
+ max-width: ${PERC_ALL_CONF}%;
13
+ }
14
+
15
+ .record-list {
16
+ border-right: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
17
+ display: flex;
18
+ flex-direction: column;
19
+ width: 100%;
20
+ min-height: 0;
21
+ }
22
+
23
+ .record-list-content {
24
+ overflow: auto;
25
+ }
26
+
27
+ .record-new {
28
+ display: flex;
29
+ border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
30
+ background-color: var(--neutral-layer-2);
31
+ padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
32
+ font-size: var(--type-ramp-minus-1-font-size);
33
+ gap: calc(var(--design-unit) * 2px);
34
+ cursor: pointer;
35
+ align-items: center;
36
+ font-weight: 500;
37
+ }
38
+
39
+ .record {
40
+ display: flex;
41
+ flex-direction: row;
42
+ justify-content: center;
43
+ align-items: center;
44
+ padding: 0 calc(var(--design-unit) * 4px);
45
+ gap: calc(var(--design-unit) * 2px);
46
+ border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
47
+ height: calc(var(--base-height-multiplier) * 4px);
48
+ color: var(--neutral-foreground-hint);
49
+ }
50
+
51
+ .record-selected {
52
+ border-left: calc(var(--stroke-width) * 3px) solid var(--accent-fill-rest);
53
+ color: var(--neutral-foreground-rest);
54
+ background: var(--neutral-layer-3);
55
+ }
56
+
57
+ .record:hover {
58
+ background-color: var(--neutral-layer-3);
59
+ cursor: pointer;
60
+ }
61
+
62
+ .record-delete {
63
+ display: flex;
64
+ margin-left: auto;
65
+ margin-right: calc(var(--design-unit) * 2px);
66
+ }
67
+
68
+ .record-name {
69
+ font-size: var(--type-ramp-minus-1-font-size);
70
+ font-weight: 700;
71
+ text-overflow: ellipsis;
72
+ white-space: nowrap;
73
+ overflow: hidden;
74
+ }
75
+
76
+ .record-all {
77
+ display: flex;
78
+ flex-direction: row;
79
+ border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
80
+ padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
81
+ font-size: var(--type-ramp-plus-1-font-size);
82
+ font-weight: 700;
83
+ }
84
+
85
+ .add-icon {
86
+ color: var(--success-color);
87
+ }
88
+ `;
@@ -0,0 +1,36 @@
1
+ import { html, repeat } from '@genesislcap/web-core';
2
+ import { iconTag } from '../../tags';
3
+ import { List } from './list';
4
+
5
+ export const ListTemplate = html<List>`
6
+ <div class="record-list">
7
+ <div class="record-new" @click=${(x) => x.addRecord()}>
8
+ <${iconTag} class="add-icon" name="circle-plus" size="lg"></${iconTag}>
9
+ ${(x) => x.addButtonLabel}
10
+ </div>
11
+
12
+ <div class="record-all">${(x) => x.title}</div>
13
+ <div class="record-list-content">
14
+ ${repeat(
15
+ (x) => x.items,
16
+ html<List>`
17
+ <div class="record record${(x, c) =>
18
+ c.parent.selectedItem &&
19
+ x[c.parent.idProperty] == c.parent.selectedItem[c.parent.idProperty]
20
+ ? '-selected'
21
+ : ''}" @click=${(x, c) => c.parent.selectRecord(c.index)}>
22
+ <span class="record-name">${(x, c) => x[c.parent.nameProperty]}</span>
23
+ <span
24
+ class="record-delete"
25
+ @click=${(x, c) => c.parent.deleteItem(c.event as CustomEvent, c.index)}
26
+ >
27
+ <${iconTag} name="trash-alt" variant="regular"></${iconTag}>
28
+ </span>
29
+ </div>
30
+ `,
31
+ { positioning: true },
32
+ )}
33
+ </div>
34
+ </div>
35
+ </div>
36
+ `;
@@ -0,0 +1,33 @@
1
+ import { GenesisElement, customElement, observable } from '@genesislcap/web-core';
2
+ import type { Configuration, DataDictionary } from '../../reconciliation.types';
3
+ import { ListStyles as styles } from './list.styles';
4
+ import { ListTemplate as template } from './list.template';
5
+
6
+ @customElement({
7
+ name: 'item-list',
8
+ template,
9
+ styles,
10
+ })
11
+ export class List extends GenesisElement {
12
+ @observable items: Array<Configuration | DataDictionary> = [];
13
+ @observable selectedItemIndex: number;
14
+ @observable selectedItem: Configuration | DataDictionary;
15
+ @observable idProperty: string;
16
+ @observable nameProperty: string;
17
+ @observable title: string;
18
+ @observable addButtonLabel: string;
19
+
20
+ addRecord() {
21
+ this.$emit('addRecord');
22
+ }
23
+
24
+ selectRecord(index) {
25
+ this.selectedItemIndex = index;
26
+ this.$emit('selectRecord', this.items[index]);
27
+ }
28
+
29
+ deleteItem(event, index) {
30
+ event.stopPropagation();
31
+ this.$emit('deleteRecord', index);
32
+ }
33
+ }
@@ -0,0 +1,69 @@
1
+ import { foundationLayoutComponents } from '@genesislcap/foundation-layout';
2
+ import {
3
+ baseComponents,
4
+ provideDesignSystem,
5
+ rapidIcon,
6
+ rapidBadge,
7
+ rapidButton,
8
+ rapidTextField,
9
+ rapidSelect,
10
+ rapidTabs,
11
+ rapidTab,
12
+ rapidTabPanel,
13
+ rapidProgressRing,
14
+ rapidSegmentedControl,
15
+ rapidSegmentedItem,
16
+ rapidDivider,
17
+ rapidListboxOption,
18
+ rapidNumberField,
19
+ rapidCheckbox,
20
+ rapidSwitch,
21
+ rapidModal,
22
+ rapidDialog,
23
+ rapidToast,
24
+ rapidDatePicker,
25
+ rapidTextArea,
26
+ rapidRadioGroup,
27
+ rapidRadio,
28
+ } from '@genesislcap/rapid-design-system';
29
+ import { rapidGridComponents } from '@genesislcap/rapid-grid-pro';
30
+
31
+ /**
32
+ * @public
33
+ */
34
+ export const registerCommonRapidComponents = async () => {
35
+ /**
36
+ * Register the components the app is using with the system.
37
+ */
38
+ provideDesignSystem().register(
39
+ /**
40
+ * Common across most routes, so batch register these lightweight components upfront.
41
+ */
42
+ rapidIcon(),
43
+ rapidBadge(),
44
+ rapidButton(),
45
+ rapidTextField(),
46
+ rapidSelect(),
47
+ rapidDivider(),
48
+ rapidListboxOption(),
49
+ rapidTab(),
50
+ rapidTabs(),
51
+ rapidTabPanel(),
52
+ rapidProgressRing(),
53
+ rapidSegmentedControl(),
54
+ rapidSegmentedItem(),
55
+ rapidNumberField(),
56
+ rapidCheckbox(),
57
+ rapidSwitch(),
58
+ rapidModal(),
59
+ rapidDialog(),
60
+ rapidToast(),
61
+ rapidDatePicker(),
62
+ rapidTextArea(),
63
+ rapidRadioGroup(),
64
+ rapidRadio(),
65
+ rapidGridComponents,
66
+ baseComponents.designSystemProvider(),
67
+ foundationLayoutComponents,
68
+ );
69
+ };
@@ -0,0 +1,74 @@
1
+ const getColor = (result) => {
2
+ switch (result) {
3
+ case 'MATCHED':
4
+ return 'success';
5
+ case 'MISSING_VALUE':
6
+ return 'warning';
7
+ default:
8
+ return 'error';
9
+ }
10
+ };
11
+
12
+ const getResultRenderer = (received, value) => {
13
+ return received ? `<div style="color: var(--${getColor(value)}-color);">${value}</div>` : '';
14
+ };
15
+
16
+ export const RECONCILIATION_COLUMNS = (datasourcePair: any): any[] => [
17
+ {
18
+ field: 'RECORD_KEY',
19
+ headerName: 'Match Key',
20
+ headerClass: 'grid-header',
21
+ width: 130,
22
+ pinned: 'left',
23
+ cellStyle: () => ({
24
+ textAlign: 'center',
25
+ }),
26
+ },
27
+ {
28
+ headerName: datasourcePair ? (datasourcePair.FIRST_DATA_SOURCE_NAME ?? '') : '',
29
+ children: [
30
+ {
31
+ field: 'KEY_RESULT',
32
+ headerName: 'Primary Key Result',
33
+ flex: 1,
34
+ cellRenderer: (params) =>
35
+ getResultRenderer(params.data.FIRST_RECORD_RECEIVED, params.data.KEY_RESULT),
36
+ },
37
+ {
38
+ field: 'COMPARISON_RESULT',
39
+ headerName: 'Comparison Key Result',
40
+ flex: 1,
41
+ cellRenderer: (params) =>
42
+ getResultRenderer(params.data.FIRST_RECORD_RECEIVED, params.data.COMPARISON_RESULT),
43
+ },
44
+ ],
45
+ },
46
+ {
47
+ headerName: datasourcePair ? (datasourcePair.SECOND_DATA_SOURCE_NAME ?? '') : '',
48
+ children: [
49
+ {
50
+ field: 'KEY_RESULT',
51
+ headerName: 'Primary Key Result',
52
+ flex: 1,
53
+ cellRenderer: (params) =>
54
+ getResultRenderer(params.data.SECOND_RECORD_RECEIVED, params.data.KEY_RESULT),
55
+ },
56
+ {
57
+ field: 'COMPARISON_RESULT',
58
+ headerName: 'Comparison Key Result',
59
+ flex: 1,
60
+ cellRenderer: (params) =>
61
+ getResultRenderer(params.data.SECOND_RECORD_RECEIVED, params.data.COMPARISON_RESULT),
62
+ },
63
+ ],
64
+ },
65
+ {
66
+ field: 'TEXT',
67
+ headerName: 'Comment',
68
+ width: 130,
69
+ pinned: 'right',
70
+ cellStyle: () => ({
71
+ textAlign: 'center',
72
+ }),
73
+ },
74
+ ];
@@ -0,0 +1,104 @@
1
+ import { css } from '@genesislcap/web-core';
2
+ import { textFieldTag } from '../../../tags';
3
+
4
+ const fields = css`
5
+ ${textFieldTag} {
6
+ margin: 0;
7
+ width: 100%;
8
+ }
9
+
10
+ .file-upload-button {
11
+ min-width: auto;
12
+ }
13
+
14
+ .select-upload-file {
15
+ min-width: 0;
16
+ height: 100%;
17
+ width: 100%;
18
+ }
19
+
20
+ .select-upload-file::part(listbox) {
21
+ max-height: calc(var(--design-unit) * var(--base-height-multiplier) * 5px);
22
+ }
23
+ `;
24
+
25
+ export const InputParameterStyles = css`
26
+ :host {
27
+ display: flex;
28
+ width: 100%;
29
+ }
30
+
31
+ ${fields}
32
+
33
+ .input-parameter {
34
+ display: flex;
35
+ flex-direction: column;
36
+ width: 100%;
37
+ max-width: 100%;
38
+ border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
39
+ }
40
+
41
+ .input-parameter-data-source {
42
+ display: flex;
43
+ flex-direction: row;
44
+ align-items: center;
45
+ height: calc(var(--design-unit) * 10px);
46
+ gap: calc(var(--design-unit) * 2px);
47
+ background-color: var(--neutral-layer-3);
48
+ padding: 0 calc(var(--design-unit) * 4px);
49
+ }
50
+
51
+ .show-hide-upload {
52
+ display: flex;
53
+ justify-content: center;
54
+ align-items: center;
55
+ height: calc(var(--design-unit) * 4px);
56
+ width: calc(var(--design-unit) * 4px);
57
+ cursor: pointer;
58
+ border-radius: calc(var(--design-unit) * 1px);
59
+ background-color: rgb(255 255 255 / 6%);
60
+ }
61
+
62
+ .show-hide-upload:hover {
63
+ background-color: rgb(255 255 255 / 10%);
64
+ }
65
+
66
+ .chevron {
67
+ display: flex;
68
+ }
69
+
70
+ .input-parameter-upload-file {
71
+ display: flex;
72
+ flex-direction: column;
73
+ padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
74
+ gap: calc(var(--design-unit) * 2px);
75
+ }
76
+
77
+ .input-parameter-label {
78
+ color: var(--neutral-foreground-hint);
79
+ font-weight: bold;
80
+ }
81
+
82
+ .input-parameter-upload {
83
+ display: flex;
84
+ flex: 1;
85
+ flex-direction: row;
86
+ align-items: center;
87
+ gap: calc(var(--design-unit) * 2px);
88
+ }
89
+
90
+ .filename {
91
+ display: inline-block;
92
+ flex: 1;
93
+ width: 100%;
94
+ max-width: 100%;
95
+ text-overflow: ellipsis;
96
+ white-space: nowrap;
97
+ overflow: hidden;
98
+ color: var(--error-color);
99
+ }
100
+
101
+ .uploaded {
102
+ color: var(--success-color);
103
+ }
104
+ `;
@@ -0,0 +1,93 @@
1
+ import { html, when, classNames, sync, whenElse, repeat } from '@genesislcap/web-core';
2
+ import { DatasourceType } from '../../../reconciliation.types';
3
+ import { badgeTag, buttonTag, iconTag, optionTag, selectTag } from '../../../tags';
4
+ import { excelFile } from '../../../utils/icons';
5
+ import type { InputParameter } from './input-parameter';
6
+ import { ShowHideUpload, UploadFileMode } from './input-parameter.types';
7
+
8
+ export const InputParameterTemplate = html<InputParameter>`
9
+ <div class="input-parameter">
10
+ <div class="input-parameter-data-source">
11
+ ${when(
12
+ (x) => x.datasourceConfiguration.TYPE === DatasourceType.FILE,
13
+ html`
14
+ <span class="show-hide-upload" @click=${(x) => x.toggleChevron()}>
15
+ <${iconTag} class="chevron" name=${(x) => x.showHideUpload} size="2xs"></${iconTag}>
16
+ </span>
17
+
18
+ ${excelFile}
19
+ `,
20
+ )}
21
+ ${when(
22
+ (x) => x.datasourceConfiguration.TYPE === DatasourceType.PIPELINE,
23
+ html`
24
+ <${badgeTag} fill="danger" color="text" style="font-size: calc(var(--type-ramp-minus-2-font-size) - 1px); line-height: calc(var(--type-ramp-minus-2-font-size) - 2px);">
25
+ DPL
26
+ </${badgeTag}>
27
+ `,
28
+ )}
29
+
30
+ <span>${sync((x) => x.datasourceName)}</span>
31
+ </div>
32
+
33
+ ${when(
34
+ (x) => x.datasourceConfiguration.TYPE === DatasourceType.FILE,
35
+ html`
36
+ ${when(
37
+ (x) => x.showHideUpload === ShowHideUpload.CHEVRON_DOWN,
38
+ html<InputParameter>`
39
+ <div class="input-parameter-upload-file">
40
+ <div class="input-parameter-label">
41
+ Upload File
42
+ </div>
43
+
44
+ <div class="input-parameter-upload">
45
+ <${buttonTag}
46
+ class="file-upload-button"
47
+ :disabled=${(x) => x.locked}
48
+ @click=${(x) => x.loadFile()}
49
+ >
50
+ New
51
+ </${buttonTag}>
52
+
53
+ <${buttonTag}
54
+ class="file-upload-button"
55
+ :disabled=${(x) => x.locked}
56
+ @click=${(x) => x.selectExistingFile()}
57
+ >
58
+ Existing
59
+ </${buttonTag}>
60
+
61
+ ${whenElse(
62
+ (x) => x.uploadFileMode === UploadFileMode.LABEL,
63
+ html<InputParameter>`
64
+ <label class="filename ${(x) => classNames(['uploaded', x.filename])}">
65
+ ${(x) => x.filename ?? 'No file uploaded'}
66
+ </label>
67
+ `,
68
+ html<InputParameter>`
69
+ <${selectTag}
70
+ class="select-upload-file"
71
+ :value=${sync((x) => x.fileStorageValue)}
72
+ :disabled=${(x) => x.locked}
73
+ @change=${(x) => x.changeExistingFile()}
74
+ >
75
+ ${repeat(
76
+ (x) => x.fileStorages,
77
+ html`
78
+ <${optionTag} :value=${(x) => x.FILE_STORAGE_ID}>
79
+ ${(x) => x.FILE_NAME}
80
+ </${optionTag}>
81
+ `,
82
+ )}
83
+ </${selectTag}>
84
+ `,
85
+ )}
86
+ </div>
87
+ </div>
88
+ `,
89
+ )}
90
+ `,
91
+ )}
92
+ </div>
93
+ `;
@@ -0,0 +1,131 @@
1
+ import { DOM, GenesisElement, attr, customElement, observable } from '@genesislcap/web-core';
2
+ import { DatasourceConfiguration } from '../../../reconciliation.types';
3
+ import { DocumentService } from '../../../services/document.service';
4
+ import { logger } from '../../../utils';
5
+ import { InputParameterStyles } from './input-parameter.styles';
6
+ import { InputParameterTemplate } from './input-parameter.template';
7
+ import { FileUploadButtonLabel, ShowHideUpload, UploadFileMode } from './input-parameter.types';
8
+
9
+ export { ShowHideUpload, UploadFileMode };
10
+
11
+ @customElement({
12
+ name: 'input-parameter',
13
+ template: InputParameterTemplate,
14
+ styles: InputParameterStyles,
15
+ })
16
+ export class InputParameter extends GenesisElement {
17
+ @DocumentService documentService: DocumentService;
18
+
19
+ static readonly NO_FILE_UPLOADED = 'No file uploaded';
20
+
21
+ @observable @attr datasourceConfiguration: DatasourceConfiguration;
22
+ @observable @attr locked: boolean = false;
23
+
24
+ @observable datasourceName: string;
25
+
26
+ @observable showHideUpload: ShowHideUpload = ShowHideUpload.CHEVRON_RIGHT;
27
+ @observable fileUploadButtonLabel: FileUploadButtonLabel = FileUploadButtonLabel.UPLOAD_FILE;
28
+ @observable filename = null;
29
+
30
+ public fileSelect: HTMLInputElement;
31
+ private file: any = null;
32
+
33
+ @observable uploadFileMode: UploadFileMode = UploadFileMode.LABEL;
34
+ @observable fileStorageValue: string = null;
35
+ @observable fileStorages = [];
36
+
37
+ connectedCallback() {
38
+ super.connectedCallback();
39
+ DOM.queueUpdate(() => {
40
+ this.fileSelect = document.createElement('input') as HTMLInputElement;
41
+ this.fileSelect.type = 'file';
42
+ this.fileSelect.accept = '.csv';
43
+ this.fileSelect.onchange = async (event) => {
44
+ await this.fileSelected(event);
45
+ };
46
+ });
47
+ }
48
+
49
+ datasourceConfigurationChanged() {
50
+ this.datasourceName = this.datasourceConfiguration.NAME;
51
+ this.showHideUpload = ShowHideUpload.CHEVRON_DOWN;
52
+ if (this.datasourceConfiguration.INPUT_PARAMETER) {
53
+ this.filename = this.datasourceConfiguration.INPUT_PARAMETER.FILE_NAME;
54
+ this.fileUploadButtonLabel = FileUploadButtonLabel.REPLACE_FILE;
55
+ }
56
+ this.uploadFileMode = UploadFileMode.LABEL;
57
+ }
58
+
59
+ lockedChanged() {
60
+ if (this.locked) {
61
+ this.uploadFileMode = UploadFileMode.LABEL;
62
+ }
63
+ }
64
+
65
+ toggleChevron() {
66
+ this.showHideUpload =
67
+ this.showHideUpload === ShowHideUpload.CHEVRON_RIGHT
68
+ ? ShowHideUpload.CHEVRON_DOWN
69
+ : ShowHideUpload.CHEVRON_RIGHT;
70
+ }
71
+
72
+ loadFile() {
73
+ if (this.uploadFileMode === UploadFileMode.SELECTION) {
74
+ this.file = null;
75
+ this.filename = null;
76
+ this.fileStorages = [];
77
+ this.fileStorageValue = null;
78
+ }
79
+ this.uploadFileMode = UploadFileMode.LABEL;
80
+ this.fileSelect.click();
81
+ }
82
+
83
+ private async fileSelected(event) {
84
+ this.file = event.target.files[0]; // Only 1st file
85
+ this.fileSelect.value = '';
86
+ this.uploadFile();
87
+ this.filename = this.file.name;
88
+ this.fileUploadButtonLabel = FileUploadButtonLabel.REPLACE_FILE;
89
+ }
90
+
91
+ private async uploadFile() {
92
+ const response = await this.documentService.uploadDocument(this.file);
93
+
94
+ if (response.ERROR) {
95
+ logger.error(response);
96
+ return;
97
+ }
98
+
99
+ this.$emit('uploaded', {
100
+ DATASOURCE_CONFIG_NAME: this.datasourceConfiguration.NAME,
101
+ FILE_INFO: {
102
+ FILE_STORAGE_ID: response[0].FILE_STORAGE_ID,
103
+ FILE_NAME: this.file.name,
104
+ },
105
+ });
106
+ }
107
+
108
+ async selectExistingFile() {
109
+ if (this.uploadFileMode === UploadFileMode.SELECTION) {
110
+ return;
111
+ }
112
+
113
+ this.uploadFileMode = UploadFileMode.SELECTION;
114
+ this.fileStorages = await this.documentService.getAllFileStorages();
115
+ this.fileStorageValue = this.fileStorages[0].FILE_STORAGE_ID ?? null;
116
+ this.changeExistingFile();
117
+ }
118
+
119
+ changeExistingFile() {
120
+ ((this.filename = this.fileStorages.find(
121
+ (fileStorage) => fileStorage.FILE_STORAGE_ID === this.fileStorageValue,
122
+ ).FILE_NAME),
123
+ this.$emit('uploaded', {
124
+ DATASOURCE_CONFIG_NAME: this.datasourceConfiguration.NAME,
125
+ FILE_INFO: {
126
+ FILE_STORAGE_ID: this.fileStorageValue,
127
+ FILE_NAME: this.filename,
128
+ },
129
+ }));
130
+ }
131
+ }
@@ -0,0 +1,14 @@
1
+ export enum ShowHideUpload {
2
+ CHEVRON_RIGHT = 'chevron-right',
3
+ CHEVRON_DOWN = 'chevron-down',
4
+ }
5
+
6
+ export enum FileUploadButtonLabel {
7
+ UPLOAD_FILE = 'Upload File',
8
+ REPLACE_FILE = 'Replace File',
9
+ }
10
+
11
+ export enum UploadFileMode {
12
+ LABEL = 'LABEL',
13
+ SELECTION = 'SELECTION',
14
+ }
@@ -0,0 +1,18 @@
1
+ import type { ICellRendererComp, ICellRendererParams } from '@ag-grid-community/core';
2
+
3
+ export class ReconciliationNoRowsOverlay implements ICellRendererComp {
4
+ eGui!: HTMLElement;
5
+
6
+ init(params: ICellRendererParams & { noRowsMessageFunc: () => string }) {
7
+ this.eGui = document.createElement('div');
8
+ this.eGui.innerHTML = `Results will be displayed when reconciliation is run`;
9
+ }
10
+
11
+ getGui() {
12
+ return this.eGui;
13
+ }
14
+
15
+ refresh(params: ICellRendererParams): boolean {
16
+ return false;
17
+ }
18
+ }