@awell-health/ui-library 0.1.103 → 0.1.104
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/dist/index.js +8 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -48234,10 +48234,10 @@ var Kr=[{
|
|
|
48234
48234
|
|
|
48235
48235
|
var AUTO_PROGRESS_DELAY = 850;
|
|
48236
48236
|
var QuestionData = function (_a) {
|
|
48237
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
48238
|
-
var question = _a.question,control = _a.control,getValues = _a.getValues,labels = _a.labels,
|
|
48237
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
48238
|
+
var question = _a.question,control = _a.control,getValues = _a.getValues,labels = _a.labels,_m = _a.inputAutoFocus,inputAutoFocus = _m === void 0 ? false : _m,_o = _a.submitAndMoveToNextQuestion,submitAndMoveToNextQuestion = _o === void 0 ? lodash.exports.noop : _o,_p = _a.onAnswerChange,onAnswerChange = _p === void 0 ? lodash.exports.noop : _p,_q = _a.shouldAutoProgress,shouldAutoProgress = _q === void 0 ? function () {return false;} : _q,onFileUpload = _a.onFileUpload;
|
|
48239
48239
|
var config = question === null || question === void 0 ? void 0 : question.questionConfig;
|
|
48240
|
-
var
|
|
48240
|
+
var _r = useICDClassificationList(question.id),icdClassificationOptions = _r.options,optionsLoading = _r.loading,onIcdClassificationSearchChange = _r.onIcdClassificationSearchChange;
|
|
48241
48241
|
switch (question.userQuestionType) {
|
|
48242
48242
|
case exports.UserQuestionType.YesNo:
|
|
48243
48243
|
return jsxRuntime.exports.jsx(Controller, { name: question.id, control: control, defaultValue: "", rules: { required: config === null || config === void 0 ? void 0 : config.mandatory }, render: function (_a) {
|
|
@@ -48337,7 +48337,8 @@ var Kr=[{
|
|
|
48337
48337
|
return jsxRuntime.exports.jsx(Controller, { name: question.id, control: control, defaultValue: "", rules: __assign({ required: config === null || config === void 0 ? void 0 : config.mandatory }, hasValidInputValidation && {
|
|
48338
48338
|
pattern: {
|
|
48339
48339
|
value: new RegExp((_e = (_d = config === null || config === void 0 ? void 0 : config.input_validation) === null || _d === void 0 ? void 0 : _d.pattern) !== null && _e !== void 0 ? _e : ''),
|
|
48340
|
-
message: (
|
|
48340
|
+
message: ((_f = config === null || config === void 0 ? void 0 : config.input_validation) === null || _f === void 0 ? void 0 : _f.helper_text) ||
|
|
48341
|
+
'The input value is invalid.' } }),
|
|
48341
48342
|
|
|
48342
48343
|
render: function (_a) {
|
|
48343
48344
|
var _b = _a.field,onChange = _b.onChange,value = _b.value,error = _a.fieldState.error;
|
|
@@ -48348,10 +48349,10 @@ var Kr=[{
|
|
|
48348
48349
|
} });
|
|
48349
48350
|
}
|
|
48350
48351
|
case exports.UserQuestionType.Telephone:
|
|
48351
|
-
var availableCountries_1 = ((
|
|
48352
|
+
var availableCountries_1 = ((_h = (_g = config === null || config === void 0 ? void 0 : config.phone) === null || _g === void 0 ? void 0 : _g.available_countries) !== null && _h !== void 0 ? _h : []).
|
|
48352
48353
|
map(function (c) {return c === null || c === void 0 ? void 0 : c.toLocaleLowerCase();}).
|
|
48353
48354
|
filter(function (x) {return !lodash.exports.isNil(x);});
|
|
48354
|
-
var initialCountry_1 = (
|
|
48355
|
+
var initialCountry_1 = (_l = (_k = (_j = config === null || config === void 0 ? void 0 : config.phone) === null || _j === void 0 ? void 0 : _j.default_country) === null || _k === void 0 ? void 0 : _k.toLocaleLowerCase()) !== null && _l !== void 0 ? _l : 'gb';
|
|
48355
48356
|
return jsxRuntime.exports.jsx(Controller, { name: question.id, control: control, defaultValue: "", render: function (_a) {
|
|
48356
48357
|
var _b;
|
|
48357
48358
|
var _c = _a.field,onChange = _c.onChange,value = _c.value;
|
|
@@ -49017,7 +49018,7 @@ var Kr=[{
|
|
|
49017
49018
|
return [
|
|
49018
49019
|
{
|
|
49019
49020
|
id: currentQuestion.id,
|
|
49020
|
-
error:
|
|
49021
|
+
error: '' }];}
|
|
49021
49022
|
|
|
49022
49023
|
|
|
49023
49024
|
|