@opencrvs/mosip 1.8.0-beta.2 → 1.8.0-beta.4
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 +5 -2
- package/build/forms.js +11 -3
- package/package.json +1 -1
- package/src/forms.ts +10 -1
package/build/forms.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ export declare const esignetHidden: () => {
|
|
|
93
93
|
name: string;
|
|
94
94
|
type: string;
|
|
95
95
|
};
|
|
96
|
-
export declare const idReader: (event: string, sectionId: string, conditionals: any[], readers: any[]) => {
|
|
96
|
+
export declare const idReader: (event: string, sectionId: string, conditionals: any[], readers: any[], esignetCallbackFieldName?: string) => {
|
|
97
97
|
name: string;
|
|
98
98
|
customQuestionMappingId: string;
|
|
99
99
|
custom: boolean;
|
|
@@ -104,7 +104,10 @@ export declare const idReader: (event: string, sectionId: string, conditionals:
|
|
|
104
104
|
defaultMessage: string;
|
|
105
105
|
};
|
|
106
106
|
hideInPreview: boolean;
|
|
107
|
-
initialValue: string
|
|
107
|
+
initialValue: string | {
|
|
108
|
+
dependsOn: string[];
|
|
109
|
+
expression: string;
|
|
110
|
+
};
|
|
108
111
|
validator: never[];
|
|
109
112
|
conditionals: any[];
|
|
110
113
|
dividerLabel: {
|
package/build/forms.js
CHANGED
|
@@ -113,9 +113,17 @@ const esignetHidden = () => {
|
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
exports.esignetHidden = esignetHidden;
|
|
116
|
-
const idReader = (event, sectionId, conditionals, readers
|
|
116
|
+
const idReader = (event, sectionId, conditionals, readers,
|
|
117
|
+
/** E-Signet callback field name */
|
|
118
|
+
esignetCallbackFieldName) => {
|
|
117
119
|
const fieldName = "idReader";
|
|
118
120
|
const fieldId = `${event}.${sectionId}.${sectionId}-view-group.${fieldName}`;
|
|
121
|
+
const initialValue = esignetCallbackFieldName
|
|
122
|
+
? {
|
|
123
|
+
dependsOn: [esignetCallbackFieldName],
|
|
124
|
+
expression: "''",
|
|
125
|
+
}
|
|
126
|
+
: "";
|
|
119
127
|
return {
|
|
120
128
|
name: fieldName,
|
|
121
129
|
customQuestionMappingId: fieldId,
|
|
@@ -127,7 +135,7 @@ const idReader = (event, sectionId, conditionals, readers) => {
|
|
|
127
135
|
defaultMessage: "ID verification",
|
|
128
136
|
},
|
|
129
137
|
hideInPreview: true,
|
|
130
|
-
initialValue
|
|
138
|
+
initialValue,
|
|
131
139
|
validator: [],
|
|
132
140
|
conditionals,
|
|
133
141
|
dividerLabel: {
|
|
@@ -247,7 +255,7 @@ const idReaderFields = (event, section, qrConfig, esignetConfig, verifiedCustomF
|
|
|
247
255
|
(0, exports.idReader)(event, section, conditionals.concat({
|
|
248
256
|
action: "hide",
|
|
249
257
|
expression: "$form?.verified === 'verified' || $form?.verified === 'authenticated' || $form?.verified === 'failed' || $form?.verified === 'failedFetchIdDetails' || !!$form?.esignetCallback?.loading",
|
|
250
|
-
}), readers),
|
|
258
|
+
}), readers, esignetConfig?.callback.fieldName),
|
|
251
259
|
];
|
|
252
260
|
if (esignetConfig) {
|
|
253
261
|
readers.push((0, exports.esignet)(esignetConfig.esignetAuthUrl, esignetConfig.openIdProviderClientId, esignetConfig.openIdProviderClaims, esignetConfig.fieldName, esignetConfig.callback.fieldName));
|
package/package.json
CHANGED
package/src/forms.ts
CHANGED
|
@@ -139,9 +139,17 @@ export const idReader = (
|
|
|
139
139
|
sectionId: string,
|
|
140
140
|
conditionals: any[],
|
|
141
141
|
readers: any[],
|
|
142
|
+
/** E-Signet callback field name */
|
|
143
|
+
esignetCallbackFieldName?: string,
|
|
142
144
|
) => {
|
|
143
145
|
const fieldName: string = "idReader";
|
|
144
146
|
const fieldId: string = `${event}.${sectionId}.${sectionId}-view-group.${fieldName}`;
|
|
147
|
+
const initialValue = esignetCallbackFieldName
|
|
148
|
+
? {
|
|
149
|
+
dependsOn: [esignetCallbackFieldName],
|
|
150
|
+
expression: "''",
|
|
151
|
+
}
|
|
152
|
+
: "";
|
|
145
153
|
return {
|
|
146
154
|
name: fieldName,
|
|
147
155
|
customQuestionMappingId: fieldId,
|
|
@@ -153,7 +161,7 @@ export const idReader = (
|
|
|
153
161
|
defaultMessage: "ID verification",
|
|
154
162
|
},
|
|
155
163
|
hideInPreview: true,
|
|
156
|
-
initialValue
|
|
164
|
+
initialValue,
|
|
157
165
|
validator: [],
|
|
158
166
|
conditionals,
|
|
159
167
|
dividerLabel: {
|
|
@@ -342,6 +350,7 @@ export const idReaderFields = (
|
|
|
342
350
|
"$form?.verified === 'verified' || $form?.verified === 'authenticated' || $form?.verified === 'failed' || $form?.verified === 'failedFetchIdDetails' || !!$form?.esignetCallback?.loading",
|
|
343
351
|
}),
|
|
344
352
|
readers,
|
|
353
|
+
esignetConfig?.callback.fieldName,
|
|
345
354
|
),
|
|
346
355
|
];
|
|
347
356
|
if (esignetConfig) {
|