@djb25/digit-ui-module-fsm 1.0.22 → 1.0.23

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 CHANGED
@@ -564,6 +564,28 @@ const SelectGender = _ref => {
564
564
  if (isLoading) {
565
565
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
566
566
  }
567
+ const isRegistry = window.location.pathname.includes("/registry/");
568
+ if (isRegistry) {
569
+ const selectedValue = (GenderData === null || GenderData === void 0 ? void 0 : GenderData.find(option => {
570
+ var _formData$config$key;
571
+ return option.code === ((formData === null || formData === void 0 ? void 0 : (_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key.code) || (formData === null || formData === void 0 ? void 0 : formData[config.key]) || (genderType === null || genderType === void 0 ? void 0 : genderType.code) || genderType);
572
+ })) || null;
573
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t(config.label), config.isMandatory ? /*#__PURE__*/React__default.createElement("span", {
574
+ className: "check-page-link-button"
575
+ }, " * ") : ""), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
576
+ className: "payment-form-text-input-correction",
577
+ isMandatory: config.isMandatory,
578
+ selected: selectedValue,
579
+ option: GenderData === null || GenderData === void 0 ? void 0 : GenderData.sort((a, b) => a.code.localeCompare(b.code)),
580
+ select: value => {
581
+ setGenderType(value);
582
+ onSelect(config.key, value);
583
+ },
584
+ optionKey: "i18nKey",
585
+ disable: config.disable,
586
+ t: t
587
+ }));
588
+ }
567
589
  if (userType === "employee") {
568
590
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t(config.label)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
569
591
  className: "payment-form-text-input-correction",