@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/cjs/index.js
CHANGED
@@ -947,10 +947,10 @@ var AddNewCompanyComponent = function (props) {
|
|
947
947
|
case 4:
|
948
948
|
error_2 = _c.sent();
|
949
949
|
antd.message.open({
|
950
|
-
type:
|
951
|
-
content: "".concat(
|
950
|
+
type: "error",
|
951
|
+
content: "".concat(error_2.message),
|
952
952
|
duration: 3,
|
953
|
-
style: { textAlign:
|
953
|
+
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
954
954
|
});
|
955
955
|
return [3 /*break*/, 6];
|
956
956
|
case 5:
|
@@ -1133,13 +1133,18 @@ var AddNewCompanyComponent = function (props) {
|
|
1133
1133
|
required: false,
|
1134
1134
|
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
1135
1135
|
return __generator(this, function (_a) {
|
1136
|
-
if (value
|
1137
|
-
|
1136
|
+
if (String(value).trim() !== "" ||
|
1137
|
+
String(value).trim() !== undefined ||
|
1138
|
+
value !== null ||
|
1139
|
+
value !== undefined) {
|
1140
|
+
if (value && !validator.isURL("https://" + value))
|
1141
|
+
throw new Error("Website ".concat(t("isInvalid")));
|
1142
|
+
}
|
1138
1143
|
return [2 /*return*/];
|
1139
1144
|
});
|
1140
1145
|
}); },
|
1141
1146
|
},
|
1142
|
-
] },
|
1147
|
+
], 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(); } },
|
1143
1148
|
React.createElement(antd.Input, { addonBefore: "https://", size: "large" })),
|
1144
1149
|
React.createElement(antd.Form.Item, { name: "logo", label: "Organisation Logo (File Type : JPEG , PNG)", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
|
1145
1150
|
{
|
@@ -5058,9 +5063,8 @@ var UserProfileComponent = function (props) {
|
|
5058
5063
|
onNavigateUpdateUser(organisationDetails, userDetails);
|
5059
5064
|
} }, t("userProfile:edit"))),
|
5060
5065
|
React.createElement(LanguageSelection, { i18n: i18n })))),
|
5061
|
-
(!userDetails ||
|
5062
|
-
|
5063
|
-
React.createElement(antd.Skeleton, { active: true, loading: true })))),
|
5066
|
+
(!userDetails || !organisationDetails) && (React.createElement("div", { className: "content-body" },
|
5067
|
+
React.createElement(antd.Skeleton, { active: true, loading: true }))),
|
5064
5068
|
userDetails && organisationDetails && (React.createElement("div", { className: "content-body" },
|
5065
5069
|
React.createElement(antd.Row, { gutter: 16 },
|
5066
5070
|
React.createElement(antd.Col, { md: 24, lg: 8 },
|