@awell-health/ui-library 0.1.102 → 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.
Files changed (2) hide show
  1. package/dist/index.js +9 -8
  2. 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, _m;
48238
- var question = _a.question,control = _a.control,getValues = _a.getValues,labels = _a.labels,_o = _a.inputAutoFocus,inputAutoFocus = _o === void 0 ? false : _o,_p = _a.submitAndMoveToNextQuestion,submitAndMoveToNextQuestion = _p === void 0 ? lodash.exports.noop : _p,_q = _a.onAnswerChange,onAnswerChange = _q === void 0 ? lodash.exports.noop : _q,_r = _a.shouldAutoProgress,shouldAutoProgress = _r === void 0 ? function () {return false;} : _r,onFileUpload = _a.onFileUpload;
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 _s = useICDClassificationList(question.id),icdClassificationOptions = _s.options,optionsLoading = _s.loading,onIcdClassificationSearchChange = _s.onIcdClassificationSearchChange;
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: (_g = (_f = config === null || config === void 0 ? void 0 : config.input_validation) === null || _f === void 0 ? void 0 : _f.helper_text) !== null && _g !== void 0 ? _g : 'The input value is invalid.' } }),
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 = ((_j = (_h = config === null || config === void 0 ? void 0 : config.phone) === null || _h === void 0 ? void 0 : _h.available_countries) !== null && _j !== void 0 ? _j : []).
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 = (_m = (_l = (_k = config === null || config === void 0 ? void 0 : config.phone) === null || _k === void 0 ? void 0 : _k.default_country) === null || _l === void 0 ? void 0 : _l.toLocaleLowerCase()) !== null && _m !== void 0 ? _m : 'gb';
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;
@@ -48904,7 +48905,7 @@ var Kr=[{
48904
48905
  return Math.round((currentQuestionIndex + 1) / allQuestions.length * 100);
48905
48906
  };
48906
48907
  var getErrorsForQuestion = function (currentQuestion, formMethods, errorLabels, isValidE164Number, validateDateResponse, validateNumberResponse, validateEmailResponse, validateAttachmentsResponse, validateInputValidationResponse) {
48907
- var _a, _b, _c;
48908
+ var _a;
48908
48909
  if ((currentQuestion === null || currentQuestion === void 0 ? void 0 : currentQuestion.userQuestionType) === exports.UserQuestionType.Description) {
48909
48910
  return [];
48910
48911
  }
@@ -49017,7 +49018,7 @@ var Kr=[{
49017
49018
  return [
49018
49019
  {
49019
49020
  id: currentQuestion.id,
49020
- error: ((_c = (_b = currentQuestion === null || currentQuestion === void 0 ? void 0 : currentQuestion.questionConfig) === null || _b === void 0 ? void 0 : _b.input_validation) === null || _c === void 0 ? void 0 : _c.helper_text) || 'The input value is invalid.' }];}
49021
+ error: '' }];}
49021
49022
 
49022
49023
 
49023
49024
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/ui-library",
3
- "version": "0.1.102",
3
+ "version": "0.1.104",
4
4
  "description": "UI components to integrate with Awell Health",
5
5
  "repository": {
6
6
  "type": "git",