You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(davinci-client): add QRCode collector support
Add QR_CODE field type support to the DaVinci client SDK,
enabling applications to render QR codes returned by DaVinci flows.
- Add QrCodeField type and QrCodeCollectorBase interface
- Add returnQrCodeCollector factory with defensive fallbacks
- Wire QR_CODE dispatch in node reducer (early return, same as LABEL)
- Export QrCodeCollector in public API types
- Add QR code component and config to sample davinci-app
- Add unit tests for factory and reducer integration
error=`${error}Content is not found in the field object. `;
728
+
}
729
+
if(!('key'infield)||!field.key){
730
+
error=`${error}Key is not found in the field object. `;
731
+
}
732
+
if(!('type'infield)){
733
+
error=`${error}Type is not found in the field object. `;
734
+
}
735
+
736
+
constkey=field.key||field.type;
737
+
738
+
return{
739
+
category: 'NoValueCollector',
740
+
error: error||null,
741
+
type: 'QrCodeCollector',
742
+
id: `${key}-${idx}`,
743
+
name: `${key}-${idx}`,
744
+
output: {
745
+
key: `${key}-${idx}`,
746
+
label: field.content||'',
747
+
type: field.type,
748
+
src: field.content||'',
749
+
fallbackText: field.fallbackText||'',
750
+
},
751
+
};
752
+
}
753
+
716
754
/**
717
755
* @function returnValidator - Creates a validator function based on the provided collector
718
756
* @param {ValidatedTextCollector | ObjectValueCollectors | MultiValueCollectors | AutoCollectors} collector - The collector to which the value will be validated
0 commit comments