@undp/carbon-library 1.0.36 → 1.0.38
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +13 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +13 -9
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
@@ -927,10 +927,10 @@ var AddNewCompanyComponent = function (props) {
|
|
927
927
|
case 4:
|
928
928
|
error_2 = _c.sent();
|
929
929
|
message.open({
|
930
|
-
type:
|
931
|
-
content: "".concat(
|
930
|
+
type: "error",
|
931
|
+
content: "".concat(error_2.message),
|
932
932
|
duration: 3,
|
933
|
-
style: { textAlign:
|
933
|
+
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
934
934
|
});
|
935
935
|
return [3 /*break*/, 6];
|
936
936
|
case 5:
|
@@ -1113,13 +1113,18 @@ var AddNewCompanyComponent = function (props) {
|
|
1113
1113
|
required: false,
|
1114
1114
|
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
1115
1115
|
return __generator(this, function (_a) {
|
1116
|
-
if (value
|
1117
|
-
|
1116
|
+
if (String(value).trim() !== "" ||
|
1117
|
+
String(value).trim() !== undefined ||
|
1118
|
+
value !== null ||
|
1119
|
+
value !== undefined) {
|
1120
|
+
if (value && !validator.isURL("https://" + value))
|
1121
|
+
throw new Error("Website ".concat(t("isInvalid")));
|
1122
|
+
}
|
1118
1123
|
return [2 /*return*/];
|
1119
1124
|
});
|
1120
1125
|
}); },
|
1121
1126
|
},
|
1122
|
-
] },
|
1127
|
+
], getValueFromEvent: function (event) { var _a; return (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value.trim(); } },
|
1123
1128
|
React.createElement(Input, { addonBefore: "https://", size: "large" })),
|
1124
1129
|
React.createElement(Form.Item, { name: "logo", label: "Organisation Logo (File Type : JPEG , PNG)", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
|
1125
1130
|
{
|
@@ -5038,9 +5043,8 @@ var UserProfileComponent = function (props) {
|
|
5038
5043
|
onNavigateUpdateUser(organisationDetails, userDetails);
|
5039
5044
|
} }, t("userProfile:edit"))),
|
5040
5045
|
React.createElement(LanguageSelection, { i18n: i18n })))),
|
5041
|
-
(!userDetails ||
|
5042
|
-
|
5043
|
-
React.createElement(Skeleton, { active: true, loading: true })))),
|
5046
|
+
(!userDetails || !organisationDetails) && (React.createElement("div", { className: "content-body" },
|
5047
|
+
React.createElement(Skeleton, { active: true, loading: true }))),
|
5044
5048
|
userDetails && organisationDetails && (React.createElement("div", { className: "content-body" },
|
5045
5049
|
React.createElement(Row, { gutter: 16 },
|
5046
5050
|
React.createElement(Col, { md: 24, lg: 8 },
|