@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,65 @@
1
+ import { html, ref, when } from '@genesislcap/web-core';
2
+ import { ConfigurationsPanel } from '../components/configurations-panel/configurations-panel';
3
+ import { DataDictionaries } from '../components/data-dictionaries/data-dictionaries';
4
+ import { List } from '../components/list/list';
5
+ import { ReconciliationsPanel } from '../components/reconciliations-panel/reconciliations-panel';
6
+ import { tabPanelTag, tabTag, tabsTag } from '../tags';
7
+ import { FoundationReconciliation } from './main';
8
+
9
+ export enum ReconciliationTab {
10
+ Configurations = 'CONFIGURATIONS',
11
+ Reconciliations = 'RECONCILIATIONS',
12
+ DataDictionariesTab = 'DATA_DICTIONARIES',
13
+ }
14
+
15
+ List;
16
+ ConfigurationsPanel;
17
+ ReconciliationsPanel;
18
+ DataDictionaries;
19
+
20
+ /**
21
+ * @public
22
+ */
23
+ export const FoundationReconciliationTemplate = html<FoundationReconciliation>`
24
+ ${when(
25
+ (x) => x.ready,
26
+ html<FoundationReconciliation>`
27
+ <${tabsTag} appearance="secondary" class="tabs">
28
+ <${tabTag}
29
+ appearance="secondary"
30
+ slot="data-dictionaries-tab"
31
+ id=${ReconciliationTab.DataDictionariesTab}
32
+ @click=${(x) => x.tabChanged(ReconciliationTab.DataDictionariesTab)}
33
+ >
34
+ Data Dictionaries
35
+ </${tabTag}>
36
+ <${tabTag}
37
+ appearance="secondary"
38
+ slot="configurations-tab"
39
+ id=${ReconciliationTab.Configurations}
40
+ @click=${(x) => x.tabChanged(ReconciliationTab.Configurations)}
41
+ >
42
+ Configurations
43
+ </${tabTag}>
44
+ <${tabTag}
45
+ appearance="secondary"
46
+ slot="reconciliations-tab"
47
+ id=${ReconciliationTab.Reconciliations}
48
+ @click=${(x) => x.tabChanged(ReconciliationTab.Reconciliations)}
49
+ >
50
+ Reconciliations
51
+ </${tabTag}>
52
+
53
+ <${tabPanelTag} slot="reconciliations-tab" id="reconciliations-tab-panel">
54
+ <data-dictionaries></data-dictionaries>
55
+ </${tabPanelTag}>
56
+ <${tabPanelTag} slot="configurations-tab" id="configurations-tab-panel">
57
+ <configurations-panel ${ref('configurationsPanel')}></configurations-panel>
58
+ </${tabPanelTag}>
59
+ <${tabPanelTag} slot="reconciliations-tab" id="reconciliations-tab-panel">
60
+ <reconciliations-panel ${ref('reconciliationsPanel')}></reconciliations-panel>
61
+ </${tabPanelTag}>
62
+ </${tabsTag}>
63
+ `,
64
+ )}
65
+ `;
@@ -0,0 +1,153 @@
1
+ import { GenesisElement, customElement, observable } from '@genesislcap/web-core';
2
+ import { ConfigurationsPanel } from '../components/configurations-panel/configurations-panel';
3
+ import { DataDictionaries } from '../components/data-dictionaries/data-dictionaries';
4
+ import { ReconciliationsPanel } from '../components/reconciliations-panel/reconciliations-panel';
5
+ import { logger } from '../utils';
6
+ import { FoundationReconciliationStyles as styles } from './main.styles';
7
+ import { ReconciliationTab, FoundationReconciliationTemplate as template } from './main.template';
8
+
9
+ /**
10
+ * FoundationReconciliation.
11
+ *
12
+ * @remarks
13
+ * Base MF export used by host application `configure` calls. It does not set up a design system or components. Both are
14
+ * expected to be registered in the host application, which should provide the details of which to the MF via
15
+ * TemplateOptions.
16
+ *
17
+ * See the {@link configure} hook for more information on how to set up and use this micro frontend in your application.
18
+ *
19
+ * @public
20
+ */
21
+ export class FoundationReconciliation extends GenesisElement {
22
+ @observable ready: boolean;
23
+ selectedTab: ReconciliationTab = ReconciliationTab.DataDictionariesTab;
24
+
25
+ dataDictionaries: DataDictionaries;
26
+ configurationsPanel: ConfigurationsPanel;
27
+ reconciliationsPanel: ReconciliationsPanel;
28
+
29
+ async connectedCallback() {
30
+ super.connectedCallback();
31
+ this.ready = true;
32
+ }
33
+
34
+ async tabChanged(tab: ReconciliationTab) {
35
+ this.selectedTab = tab;
36
+
37
+ switch (tab) {
38
+ case ReconciliationTab.DataDictionariesTab:
39
+ break;
40
+ case ReconciliationTab.Configurations:
41
+ await this.configurationsPanel.setDataDictionaries();
42
+ break;
43
+ case ReconciliationTab.Reconciliations:
44
+ await this.reconciliationsPanel.setReconciliationConfigurations();
45
+ break;
46
+ default:
47
+ logger.error('Unexpected tab:', tab);
48
+ break;
49
+ }
50
+ }
51
+ }
52
+
53
+ /**
54
+ * RapidReconciliation.
55
+ *
56
+ * @remarks
57
+ * A rapid version that pre-registers rapid components and uses the rapid design system.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * import { RapidReconciliation } from '@genesislcap/pbc-documents-ui';
62
+ * ...
63
+ * RapidReconciliation
64
+ * ```
65
+ *
66
+ * @example Load the micro frontend on-demand
67
+ * ```ts
68
+
69
+ * const { RapidReconciliation } = await import('@genesislcap/pbc-documents-ui');
70
+ * return RapidReconciliation;
71
+ * },
72
+ * ```
73
+ *
74
+ * @public
75
+ */
76
+ @customElement({
77
+ name: 'rapid-reconciliation',
78
+ template,
79
+ styles,
80
+ })
81
+ export class RapidReconciliation extends FoundationReconciliation {
82
+ /**
83
+ * @internal
84
+ */
85
+ async connectedCallback() {
86
+ await this.loadRemotes();
87
+ super.connectedCallback();
88
+ }
89
+
90
+ /**
91
+ * @internal
92
+ */
93
+ protected async loadRemotes() {
94
+ const { registerCommonRapidComponents } = await import('../components/rapid-components');
95
+ await registerCommonRapidComponents();
96
+ this.ready = true;
97
+ }
98
+ }
99
+
100
+ /**
101
+ * ZeroReconciliation.
102
+ *
103
+ * @remarks
104
+ * A zero version that pre-registers zero components and uses the zero design system.
105
+ *
106
+ * @example
107
+ * ```ts
108
+ * import { ZeroReconciliation } from '@genesislcap/pbc-documents-ui';
109
+ * ...
110
+ * ZeroReconciliation
111
+ * ```
112
+ *
113
+ * @example Load the micro frontend on-demand
114
+ * ```ts
115
+
116
+ * const { ZeroReconciliation } = await import('@genesislcap/pbc-documents-ui');
117
+ * return ZeroReconciliation;
118
+ * },
119
+ * ```
120
+ *
121
+ * @public
122
+ */
123
+ @customElement({
124
+ name: 'zero-reconciliation',
125
+ template,
126
+ styles,
127
+ })
128
+ export class ZeroReconciliation extends FoundationReconciliation {
129
+ /**
130
+ * @internal
131
+ */
132
+ async connectedCallback() {
133
+ super.connectedCallback();
134
+ await this.loadRemotes();
135
+ }
136
+
137
+ /**
138
+ * @internal
139
+ */
140
+ protected async loadRemotes() {
141
+ const { registerCommonZeroComponents } = await import('../components/zero-components');
142
+ await registerCommonZeroComponents();
143
+ this.ready = true;
144
+ }
145
+ }
146
+
147
+ /**
148
+ * @privateRemarks
149
+ * Keeps backwards compatability with original export.
150
+ *
151
+ * @public
152
+ */
153
+ export class Reconciliation extends ZeroReconciliation {}
@@ -0,0 +1,170 @@
1
+ export type Configuration = {
2
+ NAME?: string;
3
+ RECONCILIATION_CONFIG_ID?: string;
4
+ RECONCILIATION_STRATEGY?: string;
5
+ DICTIONARY_ID?: string;
6
+ RULES?: Array<ReconConfigurationRule>;
7
+ DATASOURCES?: Array<Datasource>;
8
+ MATCH_NULL?: boolean;
9
+ PRIMARY_DATASOURCE_NAME?: string;
10
+ PRIMARY_DATASOURCE?: string;
11
+ };
12
+
13
+ export type ReconConfigurationRule = {
14
+ RECONCILIATION_CONFIG_ID?: string;
15
+ FIELD_TYPE: FieldType;
16
+ FIELD_NAME: string;
17
+ TOLERANCE_TYPE: ToleranceType;
18
+ TOLERANCE_VALUE: string;
19
+ IS_MATCH_KEY: boolean;
20
+ };
21
+
22
+ export const ConfigurationMode = {
23
+ CREATE: 'create',
24
+ EDIT: 'edit',
25
+ } as const;
26
+
27
+ export enum RuleMode {
28
+ ADD = 'add',
29
+ EDIT = 'edit',
30
+ }
31
+
32
+ export type DataDictionary = {
33
+ DICTIONARY_ID: string;
34
+ DICTIONARY_NAME: string;
35
+ };
36
+
37
+ export type DataDictionaryField = {
38
+ DICTIONARY_ID?: string;
39
+ FIELD_NAME?: string;
40
+ FIELD_TYPE?: FieldType;
41
+ };
42
+
43
+ export type Datasource = {
44
+ NAME: string;
45
+ TYPE: DatasourceType;
46
+ CONFIG_DATA?: string;
47
+ };
48
+
49
+ export enum DatasourceType {
50
+ FILE = 'FILE',
51
+ PIPELINE = 'PIPELINE',
52
+ }
53
+
54
+ export enum ReconciliationFrequency {
55
+ BATCH = 'BATCH',
56
+ REAL_TIME = 'REALTIME',
57
+ }
58
+
59
+ export enum ReconciliationMethod {
60
+ ONE_TO_ONE = 'ONE_TO_ONE',
61
+ ONE_TO_MANY = 'ONE_TO_MANY',
62
+ MANY_TO_MANY = 'MANY_TO_MANY',
63
+ }
64
+
65
+ export enum FieldType {
66
+ STRING = 'STRING',
67
+ SHORT = 'SHORT',
68
+ INT = 'INT',
69
+ LONG = 'LONG',
70
+ DOUBLE = 'DOUBLE',
71
+ RAW = 'RAW',
72
+ BOOLEAN = 'BOOLEAN',
73
+ BIGDECIMAL = 'BIGDECIMAL',
74
+ DATETIME = 'DATETIME',
75
+ DATE = 'DATE',
76
+ NANO_TIMESTAMP = 'NANO_TIMESTAMP',
77
+ }
78
+
79
+ export enum ReconciliationStatus {
80
+ IN_PROGRESS = 'IN_PROGRESS',
81
+ COMPLETED = 'COMPLETED',
82
+ FAILED = 'FAILED',
83
+ CANCELLED = 'CANCELLED',
84
+ }
85
+
86
+ export enum ToleranceType {
87
+ ABSOLUTE = 'ABSOLUTE',
88
+ PERCENTAGE = 'PERCENTAGE',
89
+ EQUALITY = 'EQUALITY',
90
+ DAYS = 'DAYS',
91
+ MINUTES = 'MINUTES',
92
+ }
93
+
94
+ export type DatasourceRule = {
95
+ field: string;
96
+ type: FieldType;
97
+ tolerance: string;
98
+ primaryKey: boolean;
99
+ };
100
+
101
+ export type ReconciliationInProgress = {
102
+ name: string;
103
+ };
104
+
105
+ export type HistoricalReconciliation = {
106
+ name: string;
107
+ completedAt: number;
108
+ };
109
+
110
+ export type Reconciliation = {
111
+ RECONCILIATION_ID?: string;
112
+ RECONCILIATION_NAME?: string;
113
+ STATUS?: ReconciliationStatus;
114
+ DATETIME?: number;
115
+ INPUT_PARAMETERS?: string;
116
+ RECONCILIATION_CONFIG_ID?: string;
117
+ iconName?: string;
118
+ iconClass?: string;
119
+ };
120
+
121
+ export type Field = {
122
+ name: string;
123
+ type: FieldType;
124
+ };
125
+
126
+ export type ReconciliationInsert = {
127
+ RECONCILIATION_NAME: string;
128
+ RECONCILIATION_CONFIG_ID: string;
129
+ INPUT_PARAMETERS: {
130
+ [key: string]: any;
131
+ };
132
+ };
133
+
134
+ export type DatasourceConfiguration = {
135
+ NAME: string;
136
+ RECONCILIATION_CONFIG_ID: string;
137
+ INPUT_PARAMETER?: any;
138
+ TYPE?: string;
139
+ CONFIG_DATA?: string;
140
+ INDEX?: number;
141
+ RECORD_ID?: number;
142
+ TIMESTAMP?: number;
143
+ };
144
+
145
+ export type ReconciliationConfiguration = {
146
+ RECONCILIATION_CONFIG_ID: string;
147
+ NAME: string;
148
+ DICTIONARY_ID: string;
149
+ RECONCILIATION_STRATEGY: string; // TODO: Create Strategy type
150
+ PRIMARY_DATASOURCE: string;
151
+ };
152
+
153
+ export enum KeyResult {
154
+ MATCHED = 'MATCHED',
155
+ UNMATCHED = 'UNMATCHED',
156
+ }
157
+
158
+ export enum ComparisonResult {
159
+ MATCHED = 'MATCHED',
160
+ FAILED = 'FAILED',
161
+ MISSING_VALUE = 'MISSING_VALUE',
162
+ }
163
+
164
+ export enum MessageType {
165
+ EVENT_ACK = 'EVENT_ACK',
166
+ EVENT_NACK = 'EVENT_NACK',
167
+ }
168
+
169
+ export const CRITERIA_NO_ROWS = 'true == false';
170
+ export const MAX_ROWS_RECONCILIATION_RESULT = 25_000;
package/src/sandbox.ts ADDED
@@ -0,0 +1,40 @@
1
+ import { Auth, AuthType, Connect } from '@genesislcap/foundation-comms';
2
+ import { customElement, GenesisElement, html, observable, when } from '@genesislcap/web-core';
3
+
4
+ @customElement({
5
+ name: 'reconciliation-sandbox',
6
+ template: html`
7
+ ${when(
8
+ (x) => x.ready,
9
+ html`
10
+ <rapid-design-system-provider>
11
+ <rapid-reconciliation></rapid-reconciliation>
12
+ </rapid-design-system-provider>
13
+ `,
14
+ )}
15
+ `,
16
+ })
17
+ export class ReconciliationSandbox extends GenesisElement {
18
+ @Connect connect!: Connect;
19
+ @Auth auth!: Auth;
20
+ @observable ready = false;
21
+
22
+ async connectedCallback() {
23
+ super.connectedCallback();
24
+
25
+ console.log('Running with following env vars:', {
26
+ GENX_SANDBOX_DEFAULT_USER,
27
+ GENX_SANDBOX_DEFAULT_PASSWORD,
28
+ GENX_SANDBOX_API_HOST,
29
+ });
30
+ await this.connect.connect(GENX_SANDBOX_API_HOST);
31
+ await this.auth.login({
32
+ username: GENX_SANDBOX_DEFAULT_USER,
33
+ password: GENX_SANDBOX_DEFAULT_PASSWORD,
34
+ type: AuthType.BASIC,
35
+ });
36
+ this.auth.isLoggedIn$.subscribe((isLoggedIn) => {
37
+ this.ready = isLoggedIn;
38
+ });
39
+ }
40
+ }
@@ -0,0 +1,64 @@
1
+ import { Connect } from '@genesislcap/foundation-comms';
2
+ import { DI } from '@genesislcap/web-core';
3
+
4
+ export interface DataDictionaryService {
5
+ getDataDictionaries();
6
+ createDataDictionary(dataDictionary);
7
+ editDataDictionary(dataDictionary);
8
+ deleteDataDictionary(dataDictionary);
9
+ getDataDictionaryFields(dataDictionaryId);
10
+ }
11
+
12
+ class DataDictionaryServiceImpl implements DataDictionaryService {
13
+ @Connect private connect: Connect;
14
+
15
+ async getDataDictionaries() {
16
+ const response = await this.connect.request('REQ_DATA_DICTIONARY', { REQUEST: true });
17
+ return response.REPLY;
18
+ }
19
+
20
+ async createDataDictionary(dataDictionary) {
21
+ return this.connect.commitEvent('EVENT_DATA_DICTIONARY_INSERT', {
22
+ DETAILS: dataDictionary,
23
+ IGNORE_WARNINGS: true,
24
+ VALIDATE: false,
25
+ });
26
+ }
27
+
28
+ async editDataDictionary(dataDictionary) {
29
+ return this.connect.commitEvent('EVENT_DATA_DICTIONARY_UPDATE', {
30
+ DETAILS: dataDictionary,
31
+ IGNORE_WARNINGS: true,
32
+ VALIDATE: false,
33
+ });
34
+ }
35
+
36
+ async deleteDataDictionary(dataDictionaryId): Promise<boolean> {
37
+ const response = await this.connect.commitEvent('EVENT_DATA_DICTIONARY_DELETE', {
38
+ DETAILS: {
39
+ DICTIONARY_ID: dataDictionaryId,
40
+ },
41
+ IGNORE_WARNINGS: true,
42
+ VALIDATE: false,
43
+ });
44
+
45
+ return response.MESSAGE_TYPE === 'EVENT_ACK';
46
+ }
47
+
48
+ async getDataDictionaryFields(dataDictionaryId) {
49
+ const response = await this.connect.request('REQ_DATA_DICTIONARY_FIELD', {
50
+ REQUEST: {
51
+ DICTIONARY_ID: dataDictionaryId,
52
+ },
53
+ });
54
+
55
+ return response.REPLY.map((field) => ({
56
+ FIELD_NAME: field.FIELD_NAME,
57
+ FIELD_TYPE: field.FIELD_TYPE,
58
+ }));
59
+ }
60
+ }
61
+
62
+ export const DataDictionaryService = DI.createInterface<DataDictionaryService>((x) =>
63
+ x.singleton(DataDictionaryServiceImpl),
64
+ );
@@ -0,0 +1,72 @@
1
+ import { Auth, Connect } from '@genesislcap/foundation-comms';
2
+ import { DI } from '@genesislcap/web-core';
3
+ import { logger } from '../utils';
4
+ import { getEndpointUrl } from '../utils/endpoint';
5
+
6
+ export interface DocumentService {
7
+ uploadDocument(file: File): Promise<any>;
8
+ getDocumentFilename(documentId: string);
9
+ getAllFileStorages();
10
+ }
11
+
12
+ class DocumentServiceImpl implements DocumentService {
13
+ @Connect private connect: Connect;
14
+ @Auth private auth: Auth;
15
+
16
+ async uploadDocument(file: File): Promise<any> {
17
+ if (!file) {
18
+ logger.error('No file provided.');
19
+ return;
20
+ }
21
+
22
+ const headers = new Headers();
23
+ headers.append('SESSION_AUTH_TOKEN', this.auth.loggedUserResult.authToken);
24
+ const formData = new FormData();
25
+ formData.append(file.name, file);
26
+
27
+ const endpoint = getEndpointUrl('file-server/upload/');
28
+ const response = await fetch(endpoint, {
29
+ method: 'POST',
30
+ body: formData,
31
+ headers: headers,
32
+ });
33
+
34
+ return response.json();
35
+ }
36
+
37
+ async getDocumentFilename(documentId: string) {
38
+ const headers = new Headers();
39
+ headers.append('SESSION_AUTH_TOKEN', sessionStorage.getItem('authToken'));
40
+
41
+ const endpoint = getEndpointUrl(`file-server/download?fileStorageId=${documentId}`);
42
+
43
+ let filename = '';
44
+
45
+ await fetch(endpoint, {
46
+ method: 'GET',
47
+ headers: headers,
48
+ }).then((response) => {
49
+ const contentDispositionHeader = response.headers.get('Content-disposition');
50
+ filename = contentDispositionHeader.split(';')[1].split('filename')[1].split('=')[1].trim();
51
+ });
52
+
53
+ return filename;
54
+ }
55
+
56
+ async getAllFileStorages() {
57
+ const response = await this.connect.snapshot('ALL_FILE_STORAGES', {
58
+ CRITERIA_MATCH: `Expr.containsIgnoreCase(FILE_NAME, '.csv')`,
59
+ });
60
+
61
+ if (response.ERROR) {
62
+ logger.error(response.ERROR);
63
+ return;
64
+ }
65
+
66
+ return response.ROW;
67
+ }
68
+ }
69
+
70
+ export const DocumentService = DI.createInterface<DocumentService>((x) =>
71
+ x.singleton(DocumentServiceImpl),
72
+ );
@@ -0,0 +1,105 @@
1
+ import { Connect, Message } from '@genesislcap/foundation-comms';
2
+ import { DI } from '@genesislcap/web-core';
3
+
4
+ export interface ReconciliationConfigurationService {
5
+ getReconciliationConfigurations(): Promise<any>;
6
+ getReconciliationConfigurationDetails(configurationId: string): Promise<any>;
7
+ getReconciliationConfigurationRules(configurationId: string): Promise<any>;
8
+ getReconciliationDatasourceConfiguration(configurationId: string): Promise<Array<any>>;
9
+ getReconciliationDataPipelines(): Promise<any>;
10
+ createReconciliationConfiguration(configuration: any): Promise<Message>;
11
+ updateReconciliationConfiguration(configuration: any): Promise<Message>;
12
+ deleteReconciliationConfiguration(configurationId: string): void;
13
+ }
14
+
15
+ class ReconciliationConfigurationServiceImpl implements ReconciliationConfigurationService {
16
+ @Connect private connect: Connect;
17
+
18
+ public async getReconciliationConfigurations() {
19
+ const response = await this.connect.request('REQ_RECONCILIATION_CONFIG', { REQUEST: true });
20
+ return response.REPLY;
21
+ }
22
+
23
+ public async getReconciliationConfigurationDetails(configurationId: string): Promise<any> {
24
+ const response = await this.connect.request('REQ_RECONCILIATION_CONFIG', {
25
+ REQUEST: {
26
+ RECONCILIATION_CONFIG_ID: configurationId,
27
+ },
28
+ });
29
+
30
+ if (!response.REPLY) {
31
+ return;
32
+ }
33
+
34
+ return response.REPLY[0];
35
+ }
36
+
37
+ public async getReconciliationConfigurationRules(configurationId: string): Promise<any> {
38
+ const response = await this.connect.request('REQ_RECONCILIATION_RULE', {
39
+ REQUEST: {
40
+ RECONCILIATION_CONFIG_ID: configurationId,
41
+ },
42
+ });
43
+
44
+ if (!response.REPLY) {
45
+ return;
46
+ }
47
+
48
+ return response.REPLY;
49
+ }
50
+
51
+ public async getReconciliationDatasourceConfiguration(configurationId: string): Promise<any> {
52
+ const response = await this.connect.request('REQ_DATASOURCE_CONFIG', {
53
+ REQUEST: {
54
+ RECONCILIATION_CONFIG_ID: configurationId,
55
+ },
56
+ });
57
+
58
+ if (!response.REPLY) {
59
+ return;
60
+ }
61
+
62
+ return response.REPLY;
63
+ }
64
+
65
+ public async getReconciliationDataPipelines(): Promise<any> {
66
+ const response = await this.connect.request('REQ_RECONCILIATION_DATA_PIPELINES', {
67
+ REQUEST: true,
68
+ });
69
+ if (!response.REPLY) {
70
+ return;
71
+ }
72
+ return response.REPLY[0];
73
+ }
74
+
75
+ async createReconciliationConfiguration(configuration: any): Promise<Message> {
76
+ return this.connect.commitEvent('EVENT_RECONCILIATION_CONFIG_INSERT', {
77
+ DETAILS: configuration,
78
+ IGNORE_WARNINGS: true,
79
+ VALIDATE: false,
80
+ });
81
+ }
82
+
83
+ async updateReconciliationConfiguration(configuration: any): Promise<Message> {
84
+ return this.connect.commitEvent('EVENT_RECONCILIATION_CONFIG_UPDATE', {
85
+ DETAILS: configuration,
86
+ IGNORE_WARNINGS: true,
87
+ VALIDATE: false,
88
+ });
89
+ }
90
+
91
+ deleteReconciliationConfiguration(configurationId: string) {
92
+ return this.connect.commitEvent('EVENT_RECONCILIATION_CONFIG_DELETE', {
93
+ DETAILS: {
94
+ RECONCILIATION_CONFIG_ID: configurationId,
95
+ },
96
+ IGNORE_WARNINGS: true,
97
+ VALIDATE: false,
98
+ });
99
+ }
100
+ }
101
+
102
+ export const ReconciliationConfigurationService =
103
+ DI.createInterface<ReconciliationConfigurationService>((x) =>
104
+ x.singleton(ReconciliationConfigurationServiceImpl),
105
+ );