@undp/carbon-library 1.0.74 → 1.0.76

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.
@@ -12,7 +12,7 @@ export interface InvestmentActionModelProps {
12
12
  openModal: boolean;
13
13
  type: string;
14
14
  remarkRequired: boolean;
15
- t: any;
15
+ translator: any;
16
16
  }
17
17
  declare const InvestmentActionModel: FC<InvestmentActionModelProps>;
18
18
  export default InvestmentActionModel;
@@ -5,7 +5,7 @@ export interface NdcActionDetailsProps {
5
5
  isBackBtnVisible: boolean;
6
6
  onFormSubmit: any;
7
7
  ndcActionDetails: any;
8
- t: any;
8
+ translator: any;
9
9
  programmeDetails?: any;
10
10
  onClickedBackBtn?: any;
11
11
  }
package/dist/esm/index.js CHANGED
@@ -13519,7 +13519,8 @@ var sectoralScopes = {
13519
13519
  };
13520
13520
  var ProgrammeCreationComponent = function (props) {
13521
13521
  var _a, _b;
13522
- var useUserContext = props.useUserContext, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, t = props.t;
13522
+ var useUserContext = props.useUserContext, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
13523
+ var t = translator.t;
13523
13524
  var state = useLocation().state;
13524
13525
  var formOne = Form.useForm()[0];
13525
13526
  var formTwo = Form.useForm()[0];
@@ -16022,10 +16023,11 @@ var InvestmentCreationComponent = function (props) {
16022
16023
  };
16023
16024
 
16024
16025
  var InvestmentActionModel = function (props) {
16025
- var investment = props.investment, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText; props.subText; var openModal = props.openModal, title = props.title, icon = props.icon, type = props.type, remarkRequired = props.remarkRequired, t = props.t;
16026
+ var investment = props.investment, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText; props.subText; var openModal = props.openModal, title = props.title, icon = props.icon, type = props.type, remarkRequired = props.remarkRequired, translator = props.translator;
16026
16027
  var _a = useState(undefined), popupError = _a[0], setPopupError = _a[1];
16027
16028
  var _b = useState(false), loading = _b[0], setLoading = _b[1];
16028
16029
  var _c = useState(false), checked = _c[0], setChecked = _c[1];
16030
+ var t = translator.t;
16029
16031
  var companyList = !investment.isRetirement
16030
16032
  ? [
16031
16033
  {
@@ -16126,7 +16128,8 @@ var InvestmentActionModel = function (props) {
16126
16128
  };
16127
16129
 
16128
16130
  var InvestmentManagementComponent = function (props) {
16129
- var t = props.t, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext;
16131
+ var translator = props.translator, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext;
16132
+ var t = translator.t;
16130
16133
  var statusOptions = Object.keys(InvestmentStatus).map(function (k, index) { return ({
16131
16134
  label: addSpaces(Object.values(InvestmentStatus)[index]),
16132
16135
  value: Object.values(InvestmentStatus)[index],
@@ -16650,7 +16653,7 @@ var InvestmentManagementComponent = function (props) {
16650
16653
  popupInfo && selectedReq && (React.createElement(InvestmentActionModel, { investment: selectedReq, onCancel: function () {
16651
16654
  setModalVisible(false);
16652
16655
  setSelectedReq(undefined);
16653
- }, actionBtnText: popupInfo.actionBtnText, onFinish: popupInfo === null || popupInfo === void 0 ? void 0 : popupInfo.okAction, subText: "", openModal: modalVisible, icon: popupInfo.icon, title: popupInfo.title, type: popupInfo.type, remarkRequired: popupInfo.remarkRequired, t: t }))));
16656
+ }, actionBtnText: popupInfo.actionBtnText, onFinish: popupInfo === null || popupInfo === void 0 ? void 0 : popupInfo.okAction, subText: "", openModal: modalVisible, icon: popupInfo.icon, title: popupInfo.title, type: popupInfo.type, remarkRequired: popupInfo.remarkRequired, translator: translator }))));
16654
16657
  };
16655
16658
 
16656
16659
  var css_248z$6 = ".ndc-management .ant-checkbox-checked .ant-checkbox-input[value='Pending'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.ndc-management .ant-checkbox-checked .ant-checkbox-input[value='Approved'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n";
@@ -17038,12 +17041,14 @@ var css_248z$5 = ".ndc-action-details-container Input {\n height: 40px; }\n\n.n
17038
17041
  styleInject(css_248z$5);
17039
17042
 
17040
17043
  var NdcActionDetails = function (props) {
17041
- var isBackBtnVisible = props.isBackBtnVisible, onFormSubmit = props.onFormSubmit, ndcActionDetails = props.ndcActionDetails, t = props.t, programmeDetails = props.programmeDetails, onClickedBackBtn = props.onClickedBackBtn;
17044
+ var isBackBtnVisible = props.isBackBtnVisible, onFormSubmit = props.onFormSubmit, ndcActionDetails = props.ndcActionDetails, translator = props.translator, programmeDetails = props.programmeDetails, onClickedBackBtn = props.onClickedBackBtn;
17042
17045
  var _a = useState(), ndcActionType = _a[0], setNdcActionType = _a[1];
17043
17046
  var _b = useState(), mitigationType = _b[0], setmitigationType = _b[1];
17044
17047
  var _c = useState(""), sector = _c[0], setSector = _c[1];
17045
17048
  var _d = useState(ndcActionTypeList), ndcActionTypeListFiltered = _d[0]; _d[1];
17046
17049
  var form = Form.useForm()[0];
17050
+ translator.setDefaultNamespace('ndcAction');
17051
+ var t = translator.t;
17047
17052
  var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
17048
17053
  ? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
17049
17054
  : 5000000;
@@ -19898,7 +19903,7 @@ var AddNdcActionComponent = function (props) {
19898
19903
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "right", trigger: "hover", title: t("ndcAction:ndcToolTip"), overlayClassName: "custom-tooltip" },
19899
19904
  React.createElement(InfoCircle, { color: "#000000", size: 17 }))))),
19900
19905
  description: (React.createElement("div", { className: current !== 1 ? "hide" : "" },
19901
- React.createElement(NdcActionDetails, { isBackBtnVisible: false, onFormSubmit: onNdcActionDetailsSubmit, ndcActionDetails: ndcActionDetails, t: t, programmeDetails: programmeDetails }))),
19906
+ React.createElement(NdcActionDetails, { isBackBtnVisible: false, onFormSubmit: onNdcActionDetailsSubmit, ndcActionDetails: ndcActionDetails, translator: translator, programmeDetails: programmeDetails }))),
19902
19907
  },
19903
19908
  {
19904
19909
  title: (React.createElement("div", { className: "step-title-container" },