oa-componentbook 1.0.1-stage.8 → 1.0.1-stage.9
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.
|
@@ -55,7 +55,9 @@ function Accordion(_ref2) {
|
|
|
55
55
|
smallText,
|
|
56
56
|
key,
|
|
57
57
|
defaultActiveKey,
|
|
58
|
-
hasContentPadding
|
|
58
|
+
hasContentPadding,
|
|
59
|
+
// New prop to determine whether to apply contentPadding
|
|
60
|
+
onChange
|
|
59
61
|
} = _ref2;
|
|
60
62
|
const themeConfig = {
|
|
61
63
|
components: {
|
|
@@ -70,7 +72,8 @@ function Accordion(_ref2) {
|
|
|
70
72
|
}, /*#__PURE__*/_react.default.createElement(_styles.CollapseStyle, null, /*#__PURE__*/_react.default.createElement(_antd.Collapse, {
|
|
71
73
|
expandIcon: CollapseIcon,
|
|
72
74
|
expandIconPosition: "end",
|
|
73
|
-
defaultActiveKey: disabled ? '-1' : defaultActiveKey
|
|
75
|
+
defaultActiveKey: disabled ? '-1' : defaultActiveKey,
|
|
76
|
+
onChange: onChange
|
|
74
77
|
}, /*#__PURE__*/_react.default.createElement(_antd.Collapse.Panel, {
|
|
75
78
|
"data-test": dataTest ? "".concat(dataTest, "--complete") : undefined,
|
|
76
79
|
collapsible: disabled ? 'disabled' : undefined,
|
|
@@ -92,7 +95,8 @@ Accordion.propTypes = {
|
|
|
92
95
|
hasContentPadding: _propTypes.default.bool,
|
|
93
96
|
// New prop for controlling contentPadding
|
|
94
97
|
key: _propTypes.default.string,
|
|
95
|
-
defaultActiveKey: _propTypes.default.string
|
|
98
|
+
defaultActiveKey: _propTypes.default.string,
|
|
99
|
+
onChange: _propTypes.default.func
|
|
96
100
|
};
|
|
97
101
|
Accordion.defaultProps = {
|
|
98
102
|
body: '',
|
|
@@ -101,6 +105,8 @@ Accordion.defaultProps = {
|
|
|
101
105
|
smallText: '',
|
|
102
106
|
key: '1',
|
|
103
107
|
defaultActiveKey: '1',
|
|
104
|
-
hasContentPadding: true
|
|
108
|
+
hasContentPadding: true,
|
|
109
|
+
// Default value for contentPadding
|
|
110
|
+
onChange: () => {}
|
|
105
111
|
};
|
|
106
112
|
var _default = exports.default = Accordion;
|
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.weak-map.js");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
|
-
require("
|
|
9
|
-
require("core-js/modules/es.promise.js");
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
9
|
var _fn = require("./fn");
|
|
13
10
|
var _TrackShipmentWidget = _interopRequireDefault(require("../oa-widget-track-shipment/TrackShipmentWidget"));
|
|
14
11
|
var _Accordion = _interopRequireDefault(require("../../components/oa-component-accordion/Accordion"));
|
|
15
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
13
|
function TrackShipmentWidgetList(_ref) {
|
|
19
14
|
var _shipmentData$map;
|
|
20
15
|
let {
|
|
21
|
-
shipmentData
|
|
16
|
+
shipmentData,
|
|
17
|
+
onChange: _onChange
|
|
22
18
|
} = _ref;
|
|
23
|
-
const [historyData, setHistoryData] = (0, _react.useState)({});
|
|
24
|
-
const [loading, setLoading] = (0, _react.useState)({});
|
|
25
|
-
const fetchStatusXData = async reassignmentId => {};
|
|
26
19
|
if (!shipmentData || shipmentData.length === 0) {
|
|
27
20
|
return /*#__PURE__*/_react.default.createElement("p", null, "No shipment data available.");
|
|
28
21
|
}
|
|
@@ -37,6 +30,7 @@ function TrackShipmentWidgetList(_ref) {
|
|
|
37
30
|
status
|
|
38
31
|
} = item !== null && item !== void 0 ? item : {};
|
|
39
32
|
return /*#__PURE__*/_react.default.createElement(_Accordion.default, {
|
|
33
|
+
onChange: () => _onChange(reassignmentId),
|
|
40
34
|
key: reassignmentId,
|
|
41
35
|
body: /*#__PURE__*/_react.default.createElement(_TrackShipmentWidget.default, (0, _fn.getSingleShipmentHistory)(item)),
|
|
42
36
|
headerText: (0, _fn.headerText)(index, reassignmentTime, modifiedTime, status)
|
|
@@ -59,6 +53,10 @@ TrackShipmentWidgetList.propTypes = {
|
|
|
59
53
|
reassignmentTime: _propTypes.default.string,
|
|
60
54
|
modifiedTime: _propTypes.default.string,
|
|
61
55
|
stages: _propTypes.default.array
|
|
62
|
-
})).isRequired
|
|
56
|
+
})).isRequired,
|
|
57
|
+
onChange: _propTypes.default.func
|
|
58
|
+
};
|
|
59
|
+
TrackShipmentWidgetList.defaultProps = {
|
|
60
|
+
onChange: () => {}
|
|
63
61
|
};
|
|
64
62
|
var _default = exports.default = TrackShipmentWidgetList;
|