@opencrvs/mosip 1.7.0-alpha.14 → 1.7.0-alpha.15

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.
package/build/forms.d.ts CHANGED
@@ -129,7 +129,7 @@ export declare const qr: ({ validation, }: {
129
129
  errorMessage: MessageDescriptor;
130
130
  };
131
131
  };
132
- export declare const verified: (event: string, sectionId: string) => {
132
+ export declare const verified: (event: string, sectionId: string, mapping: any) => {
133
133
  name: string;
134
134
  fieldId: string;
135
135
  customQuestionMappingId: string;
@@ -144,6 +144,7 @@ export declare const verified: (event: string, sectionId: string) => {
144
144
  expression: string;
145
145
  };
146
146
  validator: never[];
147
+ mapping: any;
147
148
  };
148
149
  export declare const idVerificationBanner: (event: string, sectionId: string, status: "pending" | "verified" | "failed") => {
149
150
  name: string;
@@ -163,7 +164,7 @@ export declare const idVerificationBanner: (event: string, sectionId: string, st
163
164
  expression: string;
164
165
  }[];
165
166
  };
166
- export declare const idVerificationFields: (event: string, sectionId: string) => ({
167
+ export declare const idVerificationFields: (event: string, sectionId: string, mapping: any) => ({
167
168
  name: string;
168
169
  fieldId: string;
169
170
  customQuestionMappingId: string;
@@ -178,6 +179,7 @@ export declare const idVerificationFields: (event: string, sectionId: string) =>
178
179
  expression: string;
179
180
  };
180
181
  validator: never[];
182
+ mapping: any;
181
183
  } | {
182
184
  name: string;
183
185
  type: string;
package/build/forms.js CHANGED
@@ -142,7 +142,7 @@ const qr = ({ validation, }) => ({
142
142
  validation,
143
143
  });
144
144
  exports.qr = qr;
145
- const verified = (event, sectionId) => {
145
+ const verified = (event, sectionId, mapping) => {
146
146
  const fieldName = "verified";
147
147
  const fieldId = `${event}.${sectionId}.${sectionId}-view-group.${fieldName}`;
148
148
  return {
@@ -160,6 +160,7 @@ const verified = (event, sectionId) => {
160
160
  expression: 'Boolean($form?.idReader)? "pending":""',
161
161
  },
162
162
  validator: [],
163
+ mapping
163
164
  };
164
165
  };
165
166
  exports.verified = verified;
@@ -191,9 +192,9 @@ const idVerificationBanner = (event, sectionId, status) => {
191
192
  };
192
193
  };
193
194
  exports.idVerificationBanner = idVerificationBanner;
194
- const idVerificationFields = (event, sectionId) => {
195
+ const idVerificationFields = (event, sectionId, mapping) => {
195
196
  return [
196
- (0, exports.verified)(event, sectionId),
197
+ (0, exports.verified)(event, sectionId, mapping),
197
198
  (0, exports.idVerificationBanner)(event, sectionId, "pending"),
198
199
  (0, exports.idVerificationBanner)(event, sectionId, "verified"),
199
200
  (0, exports.idVerificationBanner)(event, sectionId, "failed"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/mosip",
3
- "version": "1.7.0-alpha.14",
3
+ "version": "1.7.0-alpha.15",
4
4
  "license": "MPL-2.0",
5
5
  "main": "./build/index.js",
6
6
  "exports": {
package/src/forms.ts CHANGED
@@ -184,7 +184,7 @@ export const qr = ({
184
184
  validation,
185
185
  });
186
186
 
187
- export const verified = (event: string, sectionId: string) => {
187
+ export const verified = (event: string, sectionId: string, mapping: any) => {
188
188
  const fieldName = "verified";
189
189
  const fieldId = `${event}.${sectionId}.${sectionId}-view-group.${fieldName}`;
190
190
  return {
@@ -202,6 +202,7 @@ export const verified = (event: string, sectionId: string) => {
202
202
  expression: 'Boolean($form?.idReader)? "pending":""',
203
203
  },
204
204
  validator: [],
205
+ mapping
205
206
  };
206
207
  };
207
208
 
@@ -238,9 +239,9 @@ export const idVerificationBanner = (
238
239
  };
239
240
  };
240
241
 
241
- export const idVerificationFields = (event: string, sectionId: string) => {
242
+ export const idVerificationFields = (event: string, sectionId: string, mapping: any) => {
242
243
  return [
243
- verified(event, sectionId),
244
+ verified(event, sectionId, mapping),
244
245
  idVerificationBanner(event, sectionId, "pending"),
245
246
  idVerificationBanner(event, sectionId, "verified"),
246
247
  idVerificationBanner(event, sectionId, "failed"),