@undp/carbon-library 1.0.175-CARBON-363.59 → 1.0.175-CARBON-363.72

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/index.js CHANGED
@@ -26141,7 +26141,7 @@ var EditableCell = function (_a) {
26141
26141
  ] }, inputNode)) : (children)));
26142
26142
  };
26143
26143
 
26144
- 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-table-expanded-row .ant-table-cell {\n padding-left: 33px; }\n\n.ndc-details .ant-input-number-input-wrap {\n margin-right: 10px; }\n";
26144
+ 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";
26145
26145
  styleInject(css_248z$4);
26146
26146
 
26147
26147
  var NdcDetailsActionType;
@@ -26269,7 +26269,7 @@ var NdcDetailsComponent = function (props) {
26269
26269
  return __generator(this, function (_a) {
26270
26270
  switch (_a.label) {
26271
26271
  case 0:
26272
- _a.trys.push([0, 9, 10, 11]);
26272
+ _a.trys.push([0, 9, , 10]);
26273
26273
  updatedFields = void 0;
26274
26274
  _a.label = 1;
26275
26275
  case 1:
@@ -26304,20 +26304,18 @@ var NdcDetailsComponent = function (props) {
26304
26304
  case 8:
26305
26305
  fetchNdcDetailActions();
26306
26306
  setEditingKey(-1);
26307
- return [3 /*break*/, 11];
26307
+ return [3 /*break*/, 10];
26308
26308
  case 9:
26309
26309
  exception_2 = _a.sent();
26310
+ setEditingKey(-1);
26310
26311
  message.open({
26311
26312
  type: "error",
26312
26313
  content: exception_2.message,
26313
26314
  duration: 3,
26314
26315
  style: { textAlign: "right", marginRight: 15, marginTop: 10 },
26315
26316
  });
26316
- return [3 /*break*/, 11];
26317
- case 10:
26318
- setEditingKey(-1);
26319
- return [7 /*endfinally*/];
26320
- case 11: return [2 /*return*/];
26317
+ return [3 /*break*/, 10];
26318
+ case 10: return [2 /*return*/];
26321
26319
  }
26322
26320
  });
26323
26321
  }); };
@@ -26368,7 +26366,7 @@ var NdcDetailsComponent = function (props) {
26368
26366
  dataIndex: "nationalPlanObjective",
26369
26367
  key: "nationalPlanObjective",
26370
26368
  align: "left",
26371
- width: 300,
26369
+ width: 400,
26372
26370
  editable: true,
26373
26371
  render: function (_, record) { return (React.createElement(Space, { size: "middle" }, record.nationalPlanObjective ? (React.createElement("span", null, record.nationalPlanObjective)) : (React.createElement(Input, { placeholder: "Enter National Plan Objective" })))); },
26374
26372
  },
@@ -26386,10 +26384,10 @@ var NdcDetailsComponent = function (props) {
26386
26384
  dataIndex: "ministryName",
26387
26385
  key: "ministryName",
26388
26386
  align: "left",
26389
- width: 200,
26387
+ width: 300,
26390
26388
  editable: false,
26391
26389
  render: function (_, record) { return (React.createElement(React.Fragment, null,
26392
- React.createElement(Select, { disabled: !(isSubNdcActionsEditable(record) && isEditing(record)), defaultValue: record.ministryName ? record.ministryName : loginMinistry, style: { width: 320 }, onChange: function (value, option) {
26390
+ React.createElement(Select, { disabled: !(isSubNdcActionsEditable(record) && isEditing(record)), defaultValue: record.ministryName ? record.ministryName : loginMinistry, style: { width: 220 }, onChange: function (value, option) {
26393
26391
  record.ministryName = option.label;
26394
26392
  handleSave(record);
26395
26393
  }, options: ministryOrgList }))); },
@@ -26399,7 +26397,7 @@ var NdcDetailsComponent = function (props) {
26399
26397
  dataIndex: "status",
26400
26398
  key: "status",
26401
26399
  align: "left",
26402
- width: "15%",
26400
+ width: 200,
26403
26401
  editable: false,
26404
26402
  render: function (_, record) {
26405
26403
  var menu = actionMenu(record);
@@ -26531,12 +26529,11 @@ var NdcDetailsComponent = function (props) {
26531
26529
  React.createElement(Row, null,
26532
26530
  React.createElement(Col, { span: 24 },
26533
26531
  React.createElement(Form, { form: form, component: false },
26534
- React.createElement(Table, { key: tableKey, rowKey: "id", components: components, rowClassName: function () { return "editable-row"; }, bordered: true, loading: loading, dataSource: ndcMainDetailsForPeriod, columns: columns, expandedRowKeys: expandedRowKeys, onExpand: onMainTableRowExpand, expandable: {
26532
+ React.createElement(Table, { tableLayout: "fixed", key: tableKey, rowKey: "id", components: components, rowClassName: function () { return "editable-row"; }, bordered: true, loading: loading, dataSource: ndcMainDetailsForPeriod, columns: columns, expandedRowKeys: expandedRowKeys, onExpand: onMainTableRowExpand, expandable: {
26535
26533
  expandedRowRender: function (record) {
26536
26534
  return subNdcActionTableContent();
26537
26535
  },
26538
- indentSize: 30,
26539
- columnWidth: 30,
26536
+ columnWidth: 40
26540
26537
  }, onRow: function (record, rowIndex) {
26541
26538
  return {
26542
26539
  onClick: function (event) {
@@ -26566,7 +26563,7 @@ var NdcDetailsComponent = function (props) {
26566
26563
  React.createElement(Button, { className: "mg-left-1", type: "primary", onClick: onClickedFinalizePeriod, htmlType: "submit", loading: loading }, t("ndc:finalize")))) : ("")));
26567
26564
  }
26568
26565
  function subNdcActionTableContent(record) {
26569
- return (React.createElement(Table, { rowKey: "id", components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: subNdcActionsForPeriod, loading: loading, onRow: function (record, rowIndex) {
26566
+ return (React.createElement(Table, { tableLayout: "fixed", rowKey: "id", components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: subNdcActionsForPeriod, loading: loading, onRow: function (record, rowIndex) {
26570
26567
  return {
26571
26568
  onClick: function (event) {
26572
26569
  if (record.id &&