@awell-health/ui-library 0.1.136 → 0.1.139

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 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -51695,13 +51695,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
51695
51695
  } });
51696
51696
  case exports.UserQuestionType.Icd10Classification:
51697
51697
  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) {
51698
- var _b, _c, _d;
51699
- var _e = _a.field,onChange = _e.onChange,value = _e.value;
51700
- return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [jsxRuntime.exports.jsx(hf, { label: question.title, value: singleValueToSelectItem(value, icdClassificationOptions !== null && icdClassificationOptions !== void 0 ? icdClassificationOptions : []), placeholder: (_b = labels.select) === null || _b === void 0 ? void 0 : _b.search_icd_placeholder, onChange: function (selected) {
51701
- var mapped = selectValueToSingleValue(selected);
51702
- onChange(mapped);
51698
+ var _b, _c, _d, _e;
51699
+ var _f = _a.field,onChange = _f.onChange,value = _f.value;
51700
+ return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [jsxRuntime.exports.jsx(Select, { id: question.id, value: value, labels: {
51701
+ questionLabel: question.title,
51702
+ placeholder: (_b = labels.select) === null || _b === void 0 ? void 0 : _b.search_icd_placeholder,
51703
+ noOptions: (_c = labels.select) === null || _c === void 0 ? void 0 : _c.no_options },
51704
+ onChange: function (data) {
51705
+ onChange(data);
51703
51706
  onAnswerChange();
51704
- }, options: optionsToSelectItems(icdClassificationOptions !== null && icdClassificationOptions !== void 0 ? icdClassificationOptions : []), required: config === null || config === void 0 ? void 0 : config.mandatory, isSearchable: true, isClearable: true, handleInputChange: onIcdClassificationSearchChange, disabled: optionsLoading && !(icdClassificationOptions === null || icdClassificationOptions === void 0 ? void 0 : icdClassificationOptions.length) }), jsxRuntime.exports.jsxs("span", __assign({ className: classes$b.awell_question_description }, { children: [(_c = labels.select) === null || _c === void 0 ? void 0 : _c.icd_10_catalogue_description, ' ', jsxRuntime.exports.jsx("a", __assign({ href: "https://icd.who.int/browse10/2019/en#/J00", target: "blank" }, { children: (_d = labels.select) === null || _d === void 0 ? void 0 : _d.icd_10_catalogue_link })), '.'] }))] });
51707
+ }, type: "single", options: icdClassificationOptions !== null && icdClassificationOptions !== void 0 ? icdClassificationOptions : [], mandatory: config === null || config === void 0 ? void 0 : config.mandatory, showCount: true, filtering: true, onSearch: onIcdClassificationSearchChange, loading: optionsLoading, allowSearchAfterSelect: true, allowEmptyOptionsList: true }), jsxRuntime.exports.jsxs("span", __assign({ className: classes$b.awell_question_description }, { children: [(_d = labels.select) === null || _d === void 0 ? void 0 : _d.icd_10_catalogue_description, ' ', jsxRuntime.exports.jsx("a", __assign({ href: "https://icd.who.int/browse10/2019/en#/J00", target: "blank" }, { children: (_e = labels.select) === null || _e === void 0 ? void 0 : _e.icd_10_catalogue_link })), '.'] }))] });
51705
51708
  } });
51706
51709
  case exports.UserQuestionType.File:
51707
51710
  return jsxRuntime.exports.jsx(Controller, { name: question.id, control: control, defaultValue: [], rules: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/ui-library",
3
- "version": "0.1.136",
3
+ "version": "0.1.139",
4
4
  "description": "UI components to integrate with Awell Health",
5
5
  "repository": {
6
6
  "type": "git",