@reltio/components 1.4.2210 → 1.4.2212

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 (47) hide show
  1. package/AttributesErrorsPanel/AttributesErrorsPanel.d.ts +2 -1
  2. package/AttributesErrorsPanel/AttributesErrorsPanel.js +5 -5
  3. package/AttributesErrorsPanel/components/Error/AttributeErrorItem.d.ts +8 -0
  4. package/AttributesErrorsPanel/components/Error/{Error.js → AttributeErrorItem.js} +4 -4
  5. package/AttributesErrorsPanel/components/Error/{Error.test.js → AttributeErrorItem.test.js} +3 -3
  6. package/AttributesErrorsPanel/components/Error/index.d.ts +1 -1
  7. package/AttributesErrorsPanel/components/Error/index.js +1 -1
  8. package/AttributesErrorsPanel/components/ErrorsPanel/ErrorsPanel.d.ts +2 -1
  9. package/AttributesErrorsPanel/components/ErrorsPanel/ErrorsPanel.js +3 -2
  10. package/cjs/AttributesErrorsPanel/AttributesErrorsPanel.d.ts +2 -1
  11. package/cjs/AttributesErrorsPanel/AttributesErrorsPanel.js +4 -4
  12. package/cjs/AttributesErrorsPanel/components/Error/AttributeErrorItem.d.ts +8 -0
  13. package/cjs/AttributesErrorsPanel/components/Error/{Error.js → AttributeErrorItem.js} +5 -5
  14. package/cjs/AttributesErrorsPanel/components/Error/{Error.test.js → AttributeErrorItem.test.js} +3 -3
  15. package/cjs/AttributesErrorsPanel/components/Error/index.d.ts +1 -1
  16. package/cjs/AttributesErrorsPanel/components/Error/index.js +3 -3
  17. package/cjs/AttributesErrorsPanel/components/ErrorsPanel/ErrorsPanel.d.ts +2 -1
  18. package/cjs/AttributesErrorsPanel/components/ErrorsPanel/ErrorsPanel.js +3 -2
  19. package/cjs/features/workflow/ReviewDCRDialog/DCRErrorsPanel/DCRErrorsPanel.js +1 -1
  20. package/cjs/features/workflow/helpers/attributes.js +2 -6
  21. package/cjs/features/workflow/helpers/attributes.test.js +22 -18
  22. package/cjs/features/workflow/helpers/merge.test.js +26 -20
  23. package/cjs/features/workflow/helpers/metadata.test-data.d.ts +1 -1
  24. package/cjs/features/workflow/helpers/metadata.test-data.js +149 -3
  25. package/cjs/features/workflow/helpers/validation.js +0 -1
  26. package/cjs/features/workflow/helpers/validation.test-data.d.ts +14 -0
  27. package/cjs/features/workflow/helpers/validation.test-data.js +508 -0
  28. package/cjs/features/workflow/helpers/validation.test.d.ts +1 -0
  29. package/cjs/features/workflow/helpers/validation.test.js +257 -0
  30. package/cjs/features/workflow/hooks/useDCRValidation.js +1 -1
  31. package/features/workflow/ReviewDCRDialog/DCRErrorsPanel/DCRErrorsPanel.js +1 -1
  32. package/features/workflow/helpers/attributes.js +2 -6
  33. package/features/workflow/helpers/attributes.test.js +5 -1
  34. package/features/workflow/helpers/merge.test.js +7 -1
  35. package/features/workflow/helpers/metadata.test-data.d.ts +1 -1
  36. package/features/workflow/helpers/metadata.test-data.js +147 -2
  37. package/features/workflow/helpers/validation.js +0 -1
  38. package/features/workflow/helpers/validation.test-data.d.ts +14 -0
  39. package/features/workflow/helpers/validation.test-data.js +498 -0
  40. package/features/workflow/helpers/validation.test.d.ts +1 -0
  41. package/features/workflow/helpers/validation.test.js +255 -0
  42. package/features/workflow/hooks/useDCRValidation.js +1 -1
  43. package/package.json +2 -2
  44. package/AttributesErrorsPanel/components/Error/Error.d.ts +0 -7
  45. package/cjs/AttributesErrorsPanel/components/Error/Error.d.ts +0 -7
  46. /package/AttributesErrorsPanel/components/Error/{Error.test.d.ts → AttributeErrorItem.test.d.ts} +0 -0
  47. /package/cjs/AttributesErrorsPanel/components/Error/{Error.test.d.ts → AttributeErrorItem.test.d.ts} +0 -0
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.metadata = void 0;
3
+ exports.getMetadata = void 0;
4
4
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
5
- exports.metadata = {
5
+ var getMetadata = function () { return ({
6
6
  entityTypes: [
7
7
  {
8
8
  uri: 'configuration/entityTypes/HCA',
@@ -55,14 +55,125 @@ exports.metadata = {
55
55
  }
56
56
  ]
57
57
  },
58
+ {
59
+ uri: 'configuration/entityTypes/HCP',
60
+ label: 'HCP',
61
+ attributes: [
62
+ {
63
+ uri: 'configuration/entityTypes/HCP/attributes/FirstName',
64
+ label: 'First Name',
65
+ name: 'FirstName',
66
+ type: 'String',
67
+ required: true
68
+ },
69
+ {
70
+ uri: 'configuration/entityTypes/HCP/attributes/Boolean',
71
+ label: 'Boolean',
72
+ name: 'Boolean',
73
+ type: 'Boolean',
74
+ required: true
75
+ },
76
+ {
77
+ uri: 'configuration/entityTypes/HCP/attributes/Specialities',
78
+ label: 'Specialities',
79
+ name: 'Specialities',
80
+ type: 'Nested',
81
+ required: true,
82
+ attributes: [
83
+ {
84
+ uri: 'configuration/entityTypes/HCP/attributes/Specialities/attributes/SpecialityStatus',
85
+ label: 'Speciality Status',
86
+ name: 'SpecialityStatus',
87
+ type: 'String'
88
+ },
89
+ {
90
+ uri: 'configuration/entityTypes/HCP/attributes/Specialities/attributes/PrimarySpecialityInd',
91
+ label: 'Primary Speciality Ind',
92
+ name: 'PrimarySpecialityInd',
93
+ type: 'Boolean',
94
+ required: true
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ uri: 'configuration/entityTypes/HCP/attributes/NestedAttr',
100
+ label: 'Nested Attr',
101
+ name: 'NestedAttr',
102
+ type: 'Nested',
103
+ attributes: [
104
+ {
105
+ uri: 'configuration/entityTypes/HCP/attributes/NestedAttr/attributes/Int',
106
+ label: 'Int',
107
+ name: 'Int',
108
+ type: 'String',
109
+ required: true
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ uri: 'configuration/entityTypes/HCP/attributes/Address',
115
+ label: 'Address',
116
+ name: 'Address',
117
+ type: 'Reference',
118
+ referencedAttributeURIs: ['configuration/relationTypes/HasAddress/attributes/InternalPostCode'],
119
+ referencedEntityTypeURI: 'configuration/entityTypes/Location',
120
+ relationshipTypeURI: 'configuration/relationTypes/HasAddress'
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ uri: 'configuration/entityTypes/Location',
126
+ label: 'Location',
127
+ attributes: [
128
+ {
129
+ uri: 'configuration/entityTypes/Location/attributes/AddressLine1',
130
+ label: 'AddressLine1',
131
+ name: 'AddressLine1',
132
+ type: 'String'
133
+ },
134
+ {
135
+ uri: 'configuration/entityTypes/Location/attributes/City',
136
+ label: 'City',
137
+ name: 'City',
138
+ type: 'String'
139
+ }
140
+ ]
141
+ },
58
142
  {
59
143
  label: 'HCO',
60
144
  uri: 'configuration/entityTypes/HCO',
61
145
  attributes: [
146
+ {
147
+ uri: 'configuration/entityTypes/HCO/attributes/Name',
148
+ name: 'Name',
149
+ type: 'String',
150
+ required: true
151
+ },
62
152
  {
63
153
  uri: 'configuration/entityTypes/HCO/attributes/WebsiteURL',
64
154
  name: 'WebsiteURL',
65
155
  type: 'String'
156
+ },
157
+ {
158
+ uri: 'configuration/entityTypes/HCO/attributes/ContactInfo',
159
+ label: 'Contact Info',
160
+ name: 'ContactInfo',
161
+ type: 'Nested',
162
+ attributes: [
163
+ {
164
+ uri: 'configuration/entityTypes/HCO/attributes/ContactInfo/attributes/Email',
165
+ label: 'Email',
166
+ name: 'Email',
167
+ type: 'String',
168
+ required: true
169
+ },
170
+ {
171
+ uri: 'configuration/entityTypes/HCO/attributes/ContactInfo/attributes/Phone',
172
+ label: 'Phone',
173
+ name: 'Phone',
174
+ type: 'String'
175
+ }
176
+ ]
66
177
  }
67
178
  ]
68
179
  }
@@ -100,6 +211,13 @@ exports.metadata = {
100
211
  uri: 'configuration/relationTypes/HasAddress/attributes/AdditionalAttributes/attributes/AttributeValue'
101
212
  }
102
213
  ]
214
+ },
215
+ {
216
+ uri: 'configuration/relationTypes/HasAddress/attributes/InternalPostCode',
217
+ label: 'Internal Post Code',
218
+ name: 'InternalPostCode',
219
+ type: 'String',
220
+ required: true
103
221
  }
104
222
  ]
105
223
  },
@@ -118,6 +236,34 @@ exports.metadata = {
118
236
  uri: 'configuration/relationTypes/Assistant/attributes/TestAttribute'
119
237
  }
120
238
  ]
239
+ },
240
+ {
241
+ uri: 'configuration/relationTypes/HCPtoHCA',
242
+ label: 'HCP to HCA',
243
+ attributes: [
244
+ {
245
+ uri: 'configuration/relationTypes/HCPtoHCA/attributes/Status',
246
+ label: 'Status',
247
+ name: 'Status',
248
+ type: 'String'
249
+ },
250
+ {
251
+ uri: 'configuration/relationTypes/HCPtoHCA/attributes/NestedAttr',
252
+ label: 'Nested Attr',
253
+ name: 'NestedAttr',
254
+ type: 'Nested',
255
+ required: true,
256
+ attributes: [
257
+ {
258
+ uri: 'configuration/relationTypes/HCPtoHCA/attributes/NestedAttr/attributes/SubAttr',
259
+ label: 'Sub Attr',
260
+ name: 'SubAttr',
261
+ type: 'String'
262
+ }
263
+ ]
264
+ }
265
+ ]
121
266
  }
122
267
  ]
123
- };
268
+ }); };
269
+ exports.getMetadata = getMetadata;
@@ -241,7 +241,6 @@ var createRequiredError = function (_a) {
241
241
  parentUri: parentUri,
242
242
  message: ui_i18n_1.default.text('Attribute is required'),
243
243
  source: mdm_sdk_1.ErrorSource.local,
244
- alwaysShow: true,
245
244
  uri: lineIds[0]
246
245
  });
247
246
  var path = [];
@@ -0,0 +1,14 @@
1
+ import { DCRChanges, Entity, Relation } from '@reltio/mdm-sdk';
2
+ import { LineData } from '../types';
3
+ type UserChange = {
4
+ lineId: string;
5
+ data: LineData;
6
+ };
7
+ export declare const getChanges: () => DCRChanges;
8
+ export declare const getEntitiesOrRelations: () => Record<string, Entity | Relation>;
9
+ export declare const getUserChanges: () => UserChange[];
10
+ export declare const getUserChangesRejectSubnestedAttributes: () => UserChange[];
11
+ export declare const getUserChangesRejectSubnestedRelationAttributes: () => UserChange[];
12
+ export declare const getUserChangesSubnestedEmpty: () => UserChange[];
13
+ export declare const getUserChangesNewEntity: () => UserChange[];
14
+ export {};