@undp/carbon-library 1.0.135-CARBON-343.6 → 1.0.135-CARBON-343.7

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/index.js CHANGED
@@ -23604,7 +23604,7 @@ var EditableCell = function (_a) {
23604
23604
  return React.createElement("td", __assign({}, restProps), childNode);
23605
23605
  };
23606
23606
 
23607
- var css_248z$4 = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem; }\n .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .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 .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n";
23607
+ var css_248z$4 = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: center; }\n .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .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 .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n";
23608
23608
  styleInject(css_248z$4);
23609
23609
 
23610
23610
  var NdcDetailsComponent = function (props) {
@@ -23720,6 +23720,11 @@ var NdcDetailsComponent = function (props) {
23720
23720
  }
23721
23721
  }
23722
23722
  };
23723
+ useEffect(function () {
23724
+ if (periodItems && periodItems.length > 1) {
23725
+ setSelectedTab(periodItems[periodItems.length - 1].key);
23726
+ }
23727
+ }, [periodItems]);
23723
23728
  var onDateRangeChanged = function (range) {
23724
23729
  var period = {
23725
23730
  start: Number(moment(range[0]).year()),
@@ -23729,9 +23734,9 @@ var NdcDetailsComponent = function (props) {
23729
23734
  };
23730
23735
  function addNewPeriodContent() {
23731
23736
  return (React.createElement("div", null,
23732
- React.createElement(Row, null,
23737
+ React.createElement(Row, { justify: "center" },
23733
23738
  React.createElement(RangePicker, { onChange: onDateRangeChanged, picker: "year" })),
23734
- React.createElement(Row, { className: "mg-top-1" },
23739
+ React.createElement(Row, { className: "mg-top-1", justify: "center" },
23735
23740
  React.createElement("div", { className: "steps-actions" },
23736
23741
  React.createElement(Button, { type: "primary", onClick: onAddNewPeriod, htmlType: "submit", loading: loading }, t("ndc:submit")),
23737
23742
  React.createElement(Button, { className: "back-btn", onClick: onCancelPeriod, loading: loading }, t("ndc:back"))))));
@@ -23780,8 +23785,9 @@ var NdcDetailsComponent = function (props) {
23780
23785
  selectedTab !== "add_new" && (React.createElement("div", null,
23781
23786
  React.createElement("div", null,
23782
23787
  React.createElement(Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: ndcDetailsData, columns: columns, footer: function () { return (React.createElement(Row, { justify: "center" },
23783
- React.createElement(Button, { onClick: onAddNewNdcDetail, type: "primary", style: {
23788
+ React.createElement(Button, { onClick: onAddNewNdcDetail, type: "default", style: {
23784
23789
  marginBottom: 16,
23790
+ width: '100%'
23785
23791
  } }, t("ndc:addNdcAction")))); } }))))));
23786
23792
  };
23787
23793