@undp/carbon-library 1.0.274-CARBON-363.44 → 1.0.274-CARBON-363.50

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -26720,7 +26720,7 @@ var EditableCell = function (_a) {
26720
26720
  React.createElement(antd.Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:kpiPlaceHolder") }))) : (children)));
26721
26721
  };
26722
26722
 
26723
- var css_248z$4 = ".ndc-steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: center; }\n .ndc-steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .ndc-steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .ndc-steps-actions .mg-left-1 {\n margin-left: 1rem; }\n\n.ndc-details .ant-input-number-input-wrap {\n margin-right: 10px; }\n\n.ndc-details tbody {\n vertical-align: top; }\n\n.ndc-details td .ant-space-item {\n margin-top: 5px; }\n\n.ndc-details .btn-danger {\n color: #ff4d4f !important;\n border-color: #ff8183 !important; }\n\n.ndc-details .btnAddNewMainAct {\n margin-bottom: 16;\n width: 100%;\n height: 45px;\n border-radius: 10px;\n border: 1px solid rgba(58, 53, 65, 0.5);\n background: #FFF;\n color: #16b1ff;\n text-align: center;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 500; }\n\n.ndc-details .btnAddNewMainAct:disabled {\n color: rgba(0, 0, 0, 0.25);\n border-color: #d9d9d9;\n background: #f5f5f5;\n text-shadow: none;\n box-shadow: none; }\n";
26723
+ var css_248z$4 = ".ndc-steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: center; }\n .ndc-steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .ndc-steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .ndc-steps-actions .mg-left-1 {\n margin-left: 1rem; }\n\n.ndc-details .ant-input-number-input-wrap {\n margin-right: 10px; }\n\n.ndc-details tbody {\n vertical-align: top; }\n\n.ndc-details td .ant-space-item {\n margin-top: 5px; }\n\n.ndc-details .btn-danger {\n color: #ff4d4f !important;\n border-color: #ff8183 !important; }\n\n.ndc-details .btnAddNewMainAct {\n margin-bottom: 16;\n width: 100%;\n height: 45px;\n border-radius: 10px;\n border: 1px solid rgba(58, 53, 65, 0.5);\n background: #fff;\n color: #16b1ff;\n text-align: center;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 500; }\n\n.ndc-details .btnAddNewMainAct:disabled {\n color: rgba(0, 0, 0, 0.25);\n border-color: #d9d9d9;\n background: #f5f5f5;\n text-shadow: none;\n box-shadow: none; }\n\n.ndc-details .footer-btns:disabled {\n color: rgba(0, 0, 0, 0.25);\n border-color: #d9d9d9;\n background: #f5f5f5;\n text-shadow: none;\n box-shadow: none; }\n";
26724
26724
  styleInject(css_248z$4);
26725
26725
 
26726
26726
  var NdcDetailsActionType;
@@ -26878,6 +26878,15 @@ var NdcDetailsComponent = function (props) {
26878
26878
  _a.sent();
26879
26879
  return [2 /*return*/];
26880
26880
  case 4:
26881
+ if (!updatedFields) {
26882
+ setEditingKey(null);
26883
+ return [2 /*return*/];
26884
+ }
26885
+ else if (updatedFields.kpi === row.kpi &&
26886
+ updatedFields.nationalPlanObjective === row.nationalPlanObjective) {
26887
+ setEditingKey(null);
26888
+ return [2 /*return*/];
26889
+ }
26881
26890
  updatedItem = __assign(__assign({}, row), updatedFields);
26882
26891
  if (!(updatedItem.status === NdcDetailsActionStatus.New)) return [3 /*break*/, 6];
26883
26892
  if (isGovernmentUser &&
@@ -26923,6 +26932,7 @@ var NdcDetailsComponent = function (props) {
26923
26932
  {
26924
26933
  text: t("ndc:approve"),
26925
26934
  icon: React.createElement(Icon__namespace.BoxArrowInDown, null),
26935
+ style: "color-primary",
26926
26936
  click: function () {
26927
26937
  setActionInfo({
26928
26938
  action: "Approve",
@@ -26937,6 +26947,7 @@ var NdcDetailsComponent = function (props) {
26937
26947
  {
26938
26948
  text: t("ndc:reject"),
26939
26949
  icon: React.createElement(Icon__namespace.XOctagon, null),
26950
+ style: "color-error",
26940
26951
  click: function () {
26941
26952
  setActionInfo({
26942
26953
  action: "Reject",
@@ -26949,7 +26960,7 @@ var NdcDetailsComponent = function (props) {
26949
26960
  },
26950
26961
  },
26951
26962
  ], renderItem: function (item) { return (React.createElement(antd.List.Item, { onClick: item.click },
26952
- React.createElement(antd.Typography.Text, { className: "action-icon color-error" }, item.icon),
26963
+ React.createElement(antd.Typography.Text, { className: "action-icon ".concat(item.style) }, item.icon),
26953
26964
  React.createElement("span", null, item.text))); } }));
26954
26965
  }
26955
26966
  else {
@@ -27188,8 +27199,8 @@ var NdcDetailsComponent = function (props) {
27188
27199
  React.createElement(antd.Button, { className: "btnAddNewMainAct", disabled: isMainActionInEditMode(), onClick: onClickedAddNewNdcDetail, type: "default" }, t("ndc:addNdcAction"))));
27189
27200
  } })))),
27190
27201
  isGovernmentUser && !selectedPeriod.finalized ? (React.createElement(antd.Row, { justify: "end" },
27191
- React.createElement(antd.Button, { className: "mg-left-1 btn-danger", onClick: onClickedDeletePeriod, htmlType: "submit", disabled: isMainActionInEditMode(), loading: loading }, t("ndc:delete")),
27192
- React.createElement(antd.Button, { className: "mg-left-1", type: "primary", onClick: onClickedFinalizePeriod, disabled: isMainActionInEditMode(), htmlType: "submit", loading: loading }, t("ndc:finalize")))) : ("")));
27202
+ React.createElement(antd.Button, { className: "mg-left-1 btn-danger footer-btns", onClick: onClickedDeletePeriod, htmlType: "submit", disabled: isMainActionInEditMode(), loading: loading }, t("ndc:delete")),
27203
+ React.createElement(antd.Button, { className: "mg-left-1 footer-btns", type: "primary", onClick: onClickedFinalizePeriod, disabled: isMainActionInEditMode(), htmlType: "submit", loading: loading }, t("ndc:finalize")))) : ("")));
27193
27204
  }
27194
27205
  function subNdcActionTableContent(record) {
27195
27206
  return (React.createElement(antd.Table, { tableLayout: "fixed", rowKey: "id", components: components, rowClassName: function () { return "editable-row"; }, className: "common-table-class", bordered: true, dataSource: subNdcActionsForPeriod, loading: loading, onRow: function (record, rowIndex) {