@undp/carbon-library 1.0.29 → 1.0.31

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/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PlusOutlined, FilterOutlined, BankOutlined, SafetyOutlined, ExperimentOutlined, UploadOutlined, EllipsisOutlined, StarOutlined, SearchOutlined, ToolOutlined, EyeOutlined, EditOutlined, DeleteOutlined, BlockOutlined, BulbOutlined, ClockCircleOutlined, UserOutlined } from '@ant-design/icons';
2
- import { Input, Radio, Space, Row, Col, Button, Dropdown, Table, Empty, message, Form, Steps, Upload, Tooltip, Select, Modal, Alert, Card, Skeleton, Popover, List, Typography, Tag, Checkbox, InputNumber, Spin, Progress } from 'antd';
2
+ import { Input, Radio, Space, Row, Col, Button, Dropdown, Table, Empty, message, Form, Steps, Upload, Tooltip, Select, Modal, Alert, Skeleton, Card, Popover, List, Typography, Tag, Checkbox, InputNumber, Spin, Progress } from 'antd';
3
3
  import React, { useState, useEffect, useRef } from 'react';
4
4
  import { DateTime } from 'luxon';
5
5
  import { Buffer } from 'buffer';
@@ -1344,7 +1344,7 @@ var OrganisationStatus = function (props) {
1344
1344
  var CompanyProfileComponent = function (props) {
1345
1345
  var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation, useConnection = props.useConnection, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, onNavigateToCompanyEdit = props.onNavigateToCompanyEdit, regionField = props.regionField;
1346
1346
  var _a = useConnection(), get = _a.get, put = _a.put;
1347
- var _b = useState([]), companyDetails = _b[0], setCompanyDetails = _b[1];
1347
+ var _b = useState(undefined), companyDetails = _b[0], setCompanyDetails = _b[1];
1348
1348
  var state = useLocation().state;
1349
1349
  var _c = useState(true), isLoading = _c[0], setIsLoading = _c[1];
1350
1350
  var _d = useState({}), actionInfo = _d[0], setActionInfo = _d[1];
@@ -1492,8 +1492,11 @@ var CompanyProfileComponent = function (props) {
1492
1492
  !isLoading &&
1493
1493
  parseInt(companyDetails.state) !== 1 ? (React.createElement(Button, { className: "btn-activate", onClick: onReActivateOrganisation }, t("companyProfile:reActivate"))) : (""),
1494
1494
  ability.can(Action.Update, plainToClass(Company, companyDetails)) &&
1495
- !isLoading && companyDetails && (React.createElement(Button, { className: "mg-left-1", type: "primary", onClick: function () { return onNavigateToCompanyEdit(companyDetails); } }, t("common:edit"))))),
1496
- React.createElement("div", { className: "content-body" },
1495
+ !isLoading &&
1496
+ companyDetails && (React.createElement(Button, { className: "mg-left-1", type: "primary", onClick: function () { return onNavigateToCompanyEdit(companyDetails); } }, t("common:edit"))))),
1497
+ !companyDetails && (React.createElement("div", { className: "content-body" },
1498
+ React.createElement(Skeleton, { active: true }))),
1499
+ companyDetails && (React.createElement("div", { className: "content-body" },
1497
1500
  React.createElement(Row, { gutter: 16 },
1498
1501
  React.createElement(Col, { md: 24, lg: 8 },
1499
1502
  React.createElement(Card, { className: "card-container" },
@@ -1551,7 +1554,9 @@ var CompanyProfileComponent = function (props) {
1551
1554
  : "-")),
1552
1555
  parseInt(companyDetails.state) === 0 ? (React.createElement(Row, { className: "field" },
1553
1556
  React.createElement(Col, { span: 12, className: "field-key" }, t("companyProfile:remarks")),
1554
- React.createElement(Col, { span: 12, className: "field-value" }, companyDetails.remarks ? companyDetails.remarks : "-"))) : (""))))))),
1557
+ React.createElement(Col, { span: 12, className: "field-value" }, companyDetails.remarks
1558
+ ? companyDetails.remarks
1559
+ : "-"))) : ("")))))))),
1555
1560
  React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onDeauthoriseOrgConfirmed, onActionCanceled: onDeauthoriseOrgCanceled, openModal: openDeauthorisationModal, errorMsg: errorMsg, loading: isLoading }),
1556
1561
  React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onReactivateOrgConfirmed, onActionCanceled: onReactivateOrgCanceled, openModal: openReactivateModal, errorMsg: errorMsg, loading: isLoading })));
1557
1562
  };
@@ -4917,8 +4922,8 @@ var LanguageSelection = function (props) {
4917
4922
  var UserProfileComponent = function (props) {
4918
4923
  var t = props.t, i18n = props.i18n, useConnection = props.useConnection, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin, useUserContext = props.useUserContext;
4919
4924
  var get = useConnection().get;
4920
- var _a = useState([]), organisationDetails = _a[0], setOrganisationDetails = _a[1];
4921
- var _b = useState([]), userDetails = _b[0], setUserDetails = _b[1];
4925
+ var _a = useState(undefined), organisationDetails = _a[0], setOrganisationDetails = _a[1];
4926
+ var _b = useState(undefined), userDetails = _b[0], setUserDetails = _b[1];
4922
4927
  var updateToken = useConnection().updateToken;
4923
4928
  var removeUserInfo = useUserContext().removeUserInfo;
4924
4929
  var _c = useState(false), isLoading = _c[0], setIsLoading = _c[1];
@@ -4967,7 +4972,10 @@ var UserProfileComponent = function (props) {
4967
4972
  onNavigateUpdateUser(organisationDetails, userDetails);
4968
4973
  } }, t("userProfile:edit"))),
4969
4974
  React.createElement(LanguageSelection, { i18n: i18n })))),
4970
- React.createElement("div", { className: "content-body" },
4975
+ !userDetails ||
4976
+ (!organisationDetails && (React.createElement("div", { className: "content-body" },
4977
+ React.createElement(Skeleton, { active: true })))),
4978
+ userDetails && organisationDetails && (React.createElement("div", { className: "content-body" },
4971
4979
  React.createElement(Row, { gutter: 16 },
4972
4980
  React.createElement(Col, { md: 24, lg: 8 },
4973
4981
  React.createElement(Card, { className: "card-container" },
@@ -5045,7 +5053,7 @@ var UserProfileComponent = function (props) {
5045
5053
  React.createElement(Col, { span: 12, className: "field-key" }, t("userProfile:creditBalance")),
5046
5054
  React.createElement(Col, { span: 12, className: "field-value" }, organisationDetails.creditBalance
5047
5055
  ? organisationDetails.creditBalance
5048
- : "-"))))))))));
5056
+ : "-")))))))))));
5049
5057
  };
5050
5058
 
5051
5059
  var css_248z$1 = ".legend-item-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n font-size: 14px;\n font-weight: 400;\n margin-left: 0.75rem; }\n .legend-item-container .text {\n margin-left: 0.2rem; }\n";