oa-componentbook 1.0.1-stage.39 → 1.0.1-stage.391
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.
- package/build/components/oa-component-accordion/Accordion.js +129 -40
- package/build/components/oa-component-accordion/styles.js +2 -2
- package/build/components/oa-component-button/CustomButton.js +24 -19
- package/build/components/oa-component-checkbox/CustomCheckBox.js +20 -17
- package/build/components/oa-component-checkbox/styles.js +1 -1
- package/build/components/oa-component-datepicker/CustomDatePicker.js +37 -26
- package/build/components/oa-component-drawer/CustomDrawer.js +2 -0
- package/build/components/oa-component-dropdown/CustomDropdown.js +16 -4
- package/build/components/oa-component-icons/MaterialIcon.js +2 -1
- package/build/components/oa-component-info/CustomInfo.js +9 -4
- package/build/components/oa-component-info/styles.js +3 -3
- package/build/components/oa-component-modal/CustomModal.js +51 -46
- package/build/components/oa-component-modal/styles.js +3 -2
- package/build/components/oa-component-pagination/CustomPagination.js +111 -0
- package/build/components/oa-component-pagination/styles.js +12 -0
- package/build/components/oa-component-select/CustomSelect.js +116 -56
- package/build/components/oa-component-steps/CustomSteps.js +117 -0
- package/build/components/oa-component-steps/styles.js +12 -0
- package/build/components/oa-component-table/CustomTable.js +28 -5
- package/build/components/oa-component-table/CustomTableV1.js +610 -0
- package/build/components/oa-component-table/styles.js +1 -1
- package/build/components/oa-component-table/stylesV1.js +19 -0
- package/build/components/oa-component-tabs/CustomTabs.js +1 -1
- package/build/components/oa-component-tag/CustomTag.js +29 -11
- package/build/components/oa-component-tag/styles.js +30 -3
- package/build/components/oa-component-textarea/{TextArea.js → CustomTextArea.js} +4 -4
- package/build/components/oa-component-tooltip/CustomTooltip.js +8 -4
- package/build/components/oa-component-upload/CustomUpload.js +120 -40
- package/build/components/oa-component-viewer/CustomViewer.js +3 -1
- package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
- package/build/dev/oa-component-document-viewer/styles.js +12 -0
- package/build/dev/oa-component-upload/CustomUpload.js +3 -0
- package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
- package/build/dev/oa-widget-document-modal/styles.js +12 -0
- package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
- package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
- package/build/global-css/GlobalCss.js +2 -1
- package/build/global-css/GridLayout.js +1 -1
- package/build/global-css/commonStyles.js +11 -0
- package/build/images/Car.png +0 -0
- package/build/images/TwoWheeler.png +0 -0
- package/build/images/astronaut_emptystate.png +0 -0
- package/build/images/exportGrp01.png +0 -0
- package/build/images/exportGrp02.png +0 -0
- package/build/images/exportGrp03.png +0 -0
- package/build/images/outOfStock.png +0 -0
- package/build/index.js +110 -5
- package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
- package/build/layout/DetailDataLayout/components/Form.js +22 -0
- package/build/layout/DetailDataLayout/components/Header.js +32 -0
- package/build/layout/DetailDataLayout/style.css +9 -0
- package/build/layout/DetailDataLayout/styles.js +12 -0
- package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +235 -0
- package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +63 -0
- package/build/layout/EntityOverviewLayout/styles.js +13 -0
- package/build/layout/GenricLayOut/GenricLayOut.js +2314 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +91 -0
- package/build/layout/GenricLayOut/components/CardList.js +34 -0
- package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
- package/build/layout/GenricLayOut/components/Header.js +74 -0
- package/build/layout/GenricLayOut/components/Modal.js +93 -0
- package/build/layout/GenricLayOut/components/ProfileSection.js +87 -0
- package/build/layout/GenricLayOut/components/Search.js +51 -0
- package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
- package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
- package/build/layout/GenricLayOut/reducer/layoutReducer.js +294 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +30 -0
- package/build/utils/download-file.js +23 -0
- package/build/widgets/oa-form-widget/FormWidget.js +576 -0
- package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +80 -16
- package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +50 -7
- package/build/widgets/oa-widget-address/AddressWidget.js +12 -17
- package/build/widgets/oa-widget-approval/ApprovalWidget.js +19 -11
- package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
- package/build/widgets/oa-widget-approval/styles.js +2 -2
- package/build/widgets/oa-widget-chat/ChatWidget.js +5 -5
- package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +17 -5
- package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +396 -0
- package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
- package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
- package/build/widgets/oa-widget-content-panel/styles.js +12 -0
- package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +5 -5
- package/build/widgets/oa-widget-detailcard/styles.js +1 -1
- package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +6 -9
- package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +53 -19
- package/build/widgets/oa-widget-dropdown-search-input/styles.js +1 -1
- package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
- package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
- package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +149 -64
- package/build/widgets/oa-widget-image-carousel/styles.js +16 -5
- package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
- package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
- package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
- package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
- package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
- package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
- package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +77 -0
- package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
- package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +46 -12
- package/build/widgets/oa-widget-key-value/styles.js +1 -1
- package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
- package/build/widgets/oa-widget-kpi/styles.js +12 -0
- package/build/widgets/oa-widget-map-base-location/AddressDetails.js +21 -7
- package/build/widgets/oa-widget-map-base-location/AddressForm.js +32 -5
- package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +9 -3
- package/build/widgets/oa-widget-map-base-location/MapComponent.js +17 -2
- package/build/widgets/oa-widget-membershipcard/MembershipCard.js +14 -3
- package/build/widgets/oa-widget-membershipcard/styles.js +1 -1
- package/build/widgets/oa-widget-notes/NotesWidget.js +32 -30
- package/build/widgets/oa-widget-notes/styles.js +4 -3
- package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +117 -0
- package/build/widgets/oa-widget-profile-data/styles.js +13 -0
- package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
- package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
- package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +18 -9
- package/build/widgets/oa-widget-reimbursement-breakup/styles.js +1 -1
- package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
- package/build/widgets/oa-widget-select-list-item-modal/SelectListItemModal.js +79 -0
- package/build/widgets/oa-widget-sidebar/SidebarWidget.js +156 -0
- package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
- package/build/widgets/oa-widget-sidebar/sidebar.css +0 -0
- package/build/widgets/oa-widget-sidebar/styles.js +13 -0
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +57 -29
- package/build/widgets/oa-widget-track-shipment/TrackShipmentWidget.js +28 -6
- package/build/widgets/oa-widget-track-shipment-list/TrackShipmentWidgetList.js +103 -0
- package/build/widgets/oa-widget-track-shipment-list/fn.js +81 -0
- package/build/widgets/oa-widget-user-management/UserManagementWidget.js +352 -0
- package/build/widgets/oa-widget-user-management/styles.js +15 -0
- package/package.json +3 -1
- package/build/dev/oa-widget-track-shipment/TrackShipmentWidget.js +0 -195
- /package/build/{dev/oa-widget-track-shipment → widgets/oa-widget-track-shipment-list}/styles.js +0 -0
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.description.js");
|
|
4
|
+
require("core-js/modules/es.weak-map.js");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = UserManagementWidget;
|
|
9
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
|
+
require("core-js/modules/es.promise.js");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
var _EditOutlined = _interopRequireDefault(require("@material-ui/icons/EditOutlined"));
|
|
14
|
+
var _DeleteOutlineOutlined = _interopRequireDefault(require("@material-ui/icons/DeleteOutlineOutlined"));
|
|
15
|
+
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
16
|
+
var _CustomInput = _interopRequireDefault(require("../../components/oa-component-input/CustomInput"));
|
|
17
|
+
var _CustomSelect = _interopRequireDefault(require("../../components/oa-component-select/CustomSelect"));
|
|
18
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
19
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
20
|
+
var _CustomModal = _interopRequireDefault(require("../../components/oa-component-modal/CustomModal"));
|
|
21
|
+
var _CustomNotification = _interopRequireDefault(require("../../components/oa-component-notification/CustomNotification"));
|
|
22
|
+
var _styles = require("./styles");
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
+
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); }
|
|
25
|
+
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; }
|
|
26
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
30
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
|
|
31
|
+
function UserManagementWidget(_ref) {
|
|
32
|
+
let {
|
|
33
|
+
form,
|
|
34
|
+
fieldName = "users",
|
|
35
|
+
initialData = [],
|
|
36
|
+
fields,
|
|
37
|
+
disabled = false,
|
|
38
|
+
customPageModal,
|
|
39
|
+
addUserClick,
|
|
40
|
+
deleteUserClick,
|
|
41
|
+
editUserClick,
|
|
42
|
+
misc
|
|
43
|
+
} = _ref;
|
|
44
|
+
const finalFields = fields || [];
|
|
45
|
+
const [editingUserId, setEditingUserId] = (0, _react.useState)(null);
|
|
46
|
+
const [addingUser, setAddingUser] = (0, _react.useState)(false);
|
|
47
|
+
const [deleteModalVisible, setDeleteModalVisible] = (0, _react.useState)(false);
|
|
48
|
+
const [userToDelete, setUserToDelete] = (0, _react.useState)(null);
|
|
49
|
+
const [updateTrigger, setUpdateTrigger] = (0, _react.useState)(0);
|
|
50
|
+
const notificationRef = (0, _react.useRef)(null);
|
|
51
|
+
const openNotification = (0, _react.useCallback)(params => notificationRef.current.openNotification(params), []);
|
|
52
|
+
const showErrorNotification = message => {
|
|
53
|
+
openNotification({
|
|
54
|
+
description: message,
|
|
55
|
+
type: "failure",
|
|
56
|
+
mode: "dark",
|
|
57
|
+
showIcon: true,
|
|
58
|
+
placement: "bottomRight"
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
const showSuccessNotification = message => {
|
|
62
|
+
openNotification({
|
|
63
|
+
description: message,
|
|
64
|
+
type: "success",
|
|
65
|
+
mode: "dark",
|
|
66
|
+
showIcon: true,
|
|
67
|
+
placement: "bottomRight"
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// Get current users from form state
|
|
72
|
+
const users = form.getFieldValue(fieldName) || initialData;
|
|
73
|
+
|
|
74
|
+
// Update form state with new user list and trigger re-render
|
|
75
|
+
const updateUsers = newUsers => {
|
|
76
|
+
form.setFieldsValue({
|
|
77
|
+
[fieldName]: newUsers
|
|
78
|
+
});
|
|
79
|
+
setUpdateTrigger(prev => prev + 1); // Trigger re-render
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// Initialize form field if not already set
|
|
83
|
+
(0, _react.useEffect)(() => {
|
|
84
|
+
const currentUsers = form.getFieldValue(fieldName);
|
|
85
|
+
if (!currentUsers) {
|
|
86
|
+
updateFormUsers(initialData);
|
|
87
|
+
}
|
|
88
|
+
}, [initialData, fieldName, form]);
|
|
89
|
+
const handleEdit = user => {
|
|
90
|
+
setEditingUserId(user.id);
|
|
91
|
+
setAddingUser(false);
|
|
92
|
+
|
|
93
|
+
// Set form values for editing
|
|
94
|
+
const editData = {};
|
|
95
|
+
finalFields.forEach(field => {
|
|
96
|
+
editData["".concat(fieldName, "_").concat(field.key)] = user[field.key] || "";
|
|
97
|
+
});
|
|
98
|
+
form.setFieldsValue(editData);
|
|
99
|
+
};
|
|
100
|
+
const handleAdd = () => {
|
|
101
|
+
setAddingUser(true);
|
|
102
|
+
setEditingUserId(null);
|
|
103
|
+
|
|
104
|
+
// Clear form values for adding
|
|
105
|
+
const clearData = {};
|
|
106
|
+
finalFields.forEach(field => {
|
|
107
|
+
clearData["".concat(fieldName, "_").concat(field.key)] = "";
|
|
108
|
+
});
|
|
109
|
+
form.setFieldsValue(clearData);
|
|
110
|
+
};
|
|
111
|
+
const handleSave = async () => {
|
|
112
|
+
// Validate only the user management fields
|
|
113
|
+
const fieldNames = finalFields.map(field => "".concat(fieldName, "_").concat(field.key));
|
|
114
|
+
try {
|
|
115
|
+
const values = await form.validateFields(fieldNames);
|
|
116
|
+
|
|
117
|
+
// Extract user data from form values
|
|
118
|
+
const userData = {};
|
|
119
|
+
finalFields.forEach(field => {
|
|
120
|
+
userData[field.key] = values["".concat(fieldName, "_").concat(field.key)];
|
|
121
|
+
});
|
|
122
|
+
if (editingUserId) {
|
|
123
|
+
// Update existing user
|
|
124
|
+
if (editUserClick) {
|
|
125
|
+
const {
|
|
126
|
+
error,
|
|
127
|
+
data
|
|
128
|
+
} = await editUserClick(editingUserId, userData);
|
|
129
|
+
if (error) {
|
|
130
|
+
showErrorNotification(error);
|
|
131
|
+
} else {
|
|
132
|
+
const updatedUsers = users.map(user => user.id === editingUserId ? _objectSpread(_objectSpread({}, user), userData) : user);
|
|
133
|
+
updateUsers(updatedUsers);
|
|
134
|
+
setEditingUserId(null);
|
|
135
|
+
showSuccessNotification(data === null || data === void 0 ? void 0 : data.message);
|
|
136
|
+
// Clear the form fields only if operation was successful
|
|
137
|
+
const clearData = {};
|
|
138
|
+
finalFields.forEach(field => {
|
|
139
|
+
clearData["".concat(fieldName, "_").concat(field.key)] = "";
|
|
140
|
+
});
|
|
141
|
+
form.setFieldsValue(clearData);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
} else if (addingUser) {
|
|
145
|
+
// Add new user
|
|
146
|
+
if (addUserClick) {
|
|
147
|
+
const {
|
|
148
|
+
error,
|
|
149
|
+
data
|
|
150
|
+
} = await addUserClick(userData, misc);
|
|
151
|
+
if (error) {
|
|
152
|
+
showErrorNotification(error);
|
|
153
|
+
} else {
|
|
154
|
+
var _data$data;
|
|
155
|
+
const newUser = _objectSpread({
|
|
156
|
+
id: data === null || data === void 0 || (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.userId
|
|
157
|
+
}, userData);
|
|
158
|
+
const updatedUsers = [...users, newUser];
|
|
159
|
+
updateUsers(updatedUsers);
|
|
160
|
+
setAddingUser(false);
|
|
161
|
+
showSuccessNotification(data === null || data === void 0 ? void 0 : data.message);
|
|
162
|
+
// Clear the form fields only if operation was successful
|
|
163
|
+
const clearData = {};
|
|
164
|
+
finalFields.forEach(field => {
|
|
165
|
+
clearData["".concat(fieldName, "_").concat(field.key)] = "";
|
|
166
|
+
});
|
|
167
|
+
form.setFieldsValue(clearData);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} catch (errorInfo) {
|
|
172
|
+
console.log("Form validation failed:", errorInfo);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const handleCancel = () => {
|
|
176
|
+
setEditingUserId(null);
|
|
177
|
+
setAddingUser(false);
|
|
178
|
+
|
|
179
|
+
// Clear only the user management form fields
|
|
180
|
+
const clearData = {};
|
|
181
|
+
finalFields.forEach(field => {
|
|
182
|
+
clearData["".concat(fieldName, "_").concat(field.key)] = "";
|
|
183
|
+
});
|
|
184
|
+
form.setFieldsValue(clearData);
|
|
185
|
+
};
|
|
186
|
+
const handleDelete = userId => {
|
|
187
|
+
setUserToDelete(userId);
|
|
188
|
+
setDeleteModalVisible(true);
|
|
189
|
+
};
|
|
190
|
+
const confirmDelete = async () => {
|
|
191
|
+
if (userToDelete) {
|
|
192
|
+
if (deleteUserClick) {
|
|
193
|
+
const {
|
|
194
|
+
error,
|
|
195
|
+
data
|
|
196
|
+
} = await deleteUserClick(userToDelete);
|
|
197
|
+
if (error) {
|
|
198
|
+
showErrorNotification(error);
|
|
199
|
+
setDeleteModalVisible(false);
|
|
200
|
+
} else {
|
|
201
|
+
const updatedUsers = users.filter(user => user.id !== userToDelete);
|
|
202
|
+
updateUsers(updatedUsers);
|
|
203
|
+
setDeleteModalVisible(false);
|
|
204
|
+
showSuccessNotification(data === null || data === void 0 ? void 0 : data.message);
|
|
205
|
+
setUserToDelete(null);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
const cancelDelete = () => {
|
|
211
|
+
setDeleteModalVisible(false);
|
|
212
|
+
setUserToDelete(null);
|
|
213
|
+
};
|
|
214
|
+
const canDelete = users.length > 1;
|
|
215
|
+
const isEditing = editingUserId !== null || addingUser;
|
|
216
|
+
const renderFormField = field => {
|
|
217
|
+
var _field$options;
|
|
218
|
+
const fieldNameWithPrefix = "".concat(fieldName, "_").concat(field.key);
|
|
219
|
+
switch (field.widget || field.type) {
|
|
220
|
+
case "input":
|
|
221
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
222
|
+
name: fieldNameWithPrefix,
|
|
223
|
+
label: field.label,
|
|
224
|
+
rules: field.rules,
|
|
225
|
+
style: {
|
|
226
|
+
marginBottom: 16
|
|
227
|
+
}
|
|
228
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
|
|
229
|
+
placeholder: field.placeholder || "Enter ".concat(field.label.toLowerCase())
|
|
230
|
+
}));
|
|
231
|
+
case "select":
|
|
232
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
233
|
+
name: fieldNameWithPrefix,
|
|
234
|
+
label: field.label,
|
|
235
|
+
rules: field.rules,
|
|
236
|
+
style: {
|
|
237
|
+
marginBottom: 16
|
|
238
|
+
}
|
|
239
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomSelect.default, {
|
|
240
|
+
placeholder: field.placeholder || "Select ".concat(field.label.toLowerCase()),
|
|
241
|
+
options: ((_field$options = field.options) === null || _field$options === void 0 ? void 0 : _field$options.map(option => ({
|
|
242
|
+
value: option.value,
|
|
243
|
+
label: option.label
|
|
244
|
+
}))) || []
|
|
245
|
+
}));
|
|
246
|
+
default:
|
|
247
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
248
|
+
name: fieldNameWithPrefix,
|
|
249
|
+
label: field.label,
|
|
250
|
+
rules: field.rules,
|
|
251
|
+
style: {
|
|
252
|
+
marginBottom: 16
|
|
253
|
+
}
|
|
254
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
|
|
255
|
+
placeholder: field.placeholder || "Enter ".concat(field.label.toLowerCase())
|
|
256
|
+
}));
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
return /*#__PURE__*/_react.default.createElement("div", null, users && users.length > 0 && users.map(user => /*#__PURE__*/_react.default.createElement(_styles.UserItem, {
|
|
260
|
+
key: user.id
|
|
261
|
+
}, editingUserId === user.id ? /*#__PURE__*/_react.default.createElement(_styles.EditFormCard, null, /*#__PURE__*/_react.default.createElement(_styles.EditForm, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
262
|
+
className: "form-row"
|
|
263
|
+
}, finalFields.map((field, index) => /*#__PURE__*/_react.default.createElement("div", {
|
|
264
|
+
key: field.key,
|
|
265
|
+
className: "form-field"
|
|
266
|
+
}, renderFormField(field)))), /*#__PURE__*/_react.default.createElement("div", {
|
|
267
|
+
className: "form-actions"
|
|
268
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
269
|
+
type: "danger-secondary",
|
|
270
|
+
onClick: handleCancel,
|
|
271
|
+
label: "Cancel"
|
|
272
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
273
|
+
type: "secondary",
|
|
274
|
+
onClick: handleSave,
|
|
275
|
+
label: "Save"
|
|
276
|
+
})))) : /*#__PURE__*/_react.default.createElement(_styles.UserInfo, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
277
|
+
className: "user-details"
|
|
278
|
+
}, finalFields.map((field, index) => /*#__PURE__*/_react.default.createElement("div", {
|
|
279
|
+
key: field.key
|
|
280
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
281
|
+
typography: index === 0 ? "type-t2-700" : "type-b1-400",
|
|
282
|
+
color: index === 0 ? "primary-content" : "secondary-content"
|
|
283
|
+
}, user[field.key])))), /*#__PURE__*/_react.default.createElement("div", {
|
|
284
|
+
className: "user-actions"
|
|
285
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
286
|
+
type: "text-only",
|
|
287
|
+
onClick: () => handleEdit(user),
|
|
288
|
+
disabled: disabled || isEditing,
|
|
289
|
+
iconConfig: {
|
|
290
|
+
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
291
|
+
icon: _EditOutlined.default,
|
|
292
|
+
size: 64,
|
|
293
|
+
color: "primary"
|
|
294
|
+
}),
|
|
295
|
+
size: 32,
|
|
296
|
+
position: "right"
|
|
297
|
+
}
|
|
298
|
+
}), canDelete && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
299
|
+
type: "text-only",
|
|
300
|
+
onClick: () => handleDelete(user.id),
|
|
301
|
+
disabled: disabled || isEditing,
|
|
302
|
+
iconConfig: {
|
|
303
|
+
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
304
|
+
icon: _DeleteOutlineOutlined.default,
|
|
305
|
+
color: "negative"
|
|
306
|
+
}),
|
|
307
|
+
color: "negative",
|
|
308
|
+
size: 32,
|
|
309
|
+
position: "right"
|
|
310
|
+
}
|
|
311
|
+
}))))), addingUser && /*#__PURE__*/_react.default.createElement(_styles.EditFormCard, null, /*#__PURE__*/_react.default.createElement(_styles.EditForm, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
312
|
+
className: "form-row"
|
|
313
|
+
}, finalFields.map((field, index) => /*#__PURE__*/_react.default.createElement("div", {
|
|
314
|
+
key: field.key,
|
|
315
|
+
className: "form-field"
|
|
316
|
+
}, renderFormField(field)))), /*#__PURE__*/_react.default.createElement("div", {
|
|
317
|
+
className: "form-actions"
|
|
318
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
319
|
+
type: "danger-secondary",
|
|
320
|
+
onClick: handleCancel,
|
|
321
|
+
label: "Cancel"
|
|
322
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
323
|
+
type: "primary",
|
|
324
|
+
onClick: handleSave,
|
|
325
|
+
label: "Save"
|
|
326
|
+
})))), !isEditing && /*#__PURE__*/_react.default.createElement(_styles.AddUserButtonContainer, null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
327
|
+
type: "secondary",
|
|
328
|
+
onClick: handleAdd,
|
|
329
|
+
disabled: disabled,
|
|
330
|
+
label: "Add Another User"
|
|
331
|
+
})), deleteModalVisible && /*#__PURE__*/_react.default.createElement(_CustomModal.default, {
|
|
332
|
+
imgSrc: customPageModal === null || customPageModal === void 0 ? void 0 : customPageModal.imgSrc,
|
|
333
|
+
open: deleteModalVisible,
|
|
334
|
+
onCancel: cancelDelete,
|
|
335
|
+
title: customPageModal === null || customPageModal === void 0 ? void 0 : customPageModal.heading,
|
|
336
|
+
buttonConfig: [{
|
|
337
|
+
callback: () => {
|
|
338
|
+
cancelDelete();
|
|
339
|
+
},
|
|
340
|
+
label: "Cancel",
|
|
341
|
+
type: "secondary"
|
|
342
|
+
}, {
|
|
343
|
+
callback: () => {
|
|
344
|
+
confirmDelete();
|
|
345
|
+
},
|
|
346
|
+
label: "Delete",
|
|
347
|
+
type: "danger-primary"
|
|
348
|
+
}]
|
|
349
|
+
}, customPageModal === null || customPageModal === void 0 ? void 0 : customPageModal.subHeading), /*#__PURE__*/_react.default.createElement(_CustomNotification.default, {
|
|
350
|
+
ref: notificationRef
|
|
351
|
+
}));
|
|
352
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.UserItem = exports.UserInfo = exports.EditFormCard = exports.EditForm = exports.AddUserButtonContainer = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const UserItem = exports.UserItem = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-bottom: 16px;\n padding: 16px 0;\n width: 100%;\n"])));
|
|
12
|
+
const EditFormCard = exports.EditFormCard = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom: 16px;\n border-radius: 8px;\n background: #f5f5f5;\n border: 1px solid #e8e8e8;\n padding: 16px;\n width: 100%;\n"])));
|
|
13
|
+
const UserInfo = exports.UserInfo = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n\n .user-details {\n flex: 1;\n }\n\n .user-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n"])));
|
|
14
|
+
const EditForm = exports.EditForm = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .form-row {\n display: flex;\n gap: 16px;\n margin-bottom: 16px;\n\n .form-field {\n flex: 1;\n }\n }\n\n .form-actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n }\n"])));
|
|
15
|
+
const AddUserButtonContainer = exports.AddUserButtonContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-top: 16px;\n width: 100%;\n display: flex;\n justify-content: flex-start;\n"])));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oa-componentbook",
|
|
3
|
-
"version": "1.0.1-stage.
|
|
3
|
+
"version": "1.0.1-stage.391",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Reusable components",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -22,8 +22,10 @@
|
|
|
22
22
|
"antd": "^5.11.4",
|
|
23
23
|
"d3": "^7.8.5",
|
|
24
24
|
"dayjs": "^1.11.10",
|
|
25
|
+
"immer": "^10.1.1",
|
|
25
26
|
"pdfjs-dist": "^2.6.347",
|
|
26
27
|
"react-google-maps": "^9.4.5",
|
|
28
|
+
"react-intersection-observer": "^8.32.5",
|
|
27
29
|
"react-markdown": "^8.0.7",
|
|
28
30
|
"react-pattern-lock": "^12.0.12",
|
|
29
31
|
"react-pdf": "^5.3.0",
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.weak-map.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _FileCopyOutlined = _interopRequireDefault(require("@material-ui/icons/FileCopyOutlined"));
|
|
12
|
-
var _AddressWidget = _interopRequireDefault(require("../../widgets/oa-widget-address/AddressWidget"));
|
|
13
|
-
var _CustomTable = _interopRequireDefault(require("../../components/oa-component-table/CustomTable"));
|
|
14
|
-
var _CustomTimeline = _interopRequireDefault(require("../oa-component-timeline/CustomTimeline"));
|
|
15
|
-
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
16
|
-
var _styles = require("./styles");
|
|
17
|
-
var _CustomNotification = _interopRequireDefault(require("../../components/oa-component-notification/CustomNotification"));
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
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); }
|
|
20
|
-
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; }
|
|
21
|
-
function TrackShipmentWidget(_ref) {
|
|
22
|
-
var _tableData, _tableData2;
|
|
23
|
-
let {
|
|
24
|
-
awbNumber,
|
|
25
|
-
fromAddress,
|
|
26
|
-
tableData,
|
|
27
|
-
title,
|
|
28
|
-
toAddress,
|
|
29
|
-
heading
|
|
30
|
-
} = _ref;
|
|
31
|
-
// local variables
|
|
32
|
-
const deilveryStageText = 'SHIPMENT DELIVERED to Customer';
|
|
33
|
-
|
|
34
|
-
// show notification when user click on clipboard
|
|
35
|
-
const notificationRef = (0, _react.useRef)(null);
|
|
36
|
-
const openNotification = parameters => {
|
|
37
|
-
var _notificationRef$curr;
|
|
38
|
-
return notificationRef === null || notificationRef === void 0 || (_notificationRef$curr = notificationRef.current) === null || _notificationRef$curr === void 0 ? void 0 : _notificationRef$curr.openNotification(parameters);
|
|
39
|
-
};
|
|
40
|
-
const handleCopyToClipboard = () => {
|
|
41
|
-
navigator.clipboard.writeText(awbNumber).then(() => {
|
|
42
|
-
openNotification({
|
|
43
|
-
description: 'Copy to clipboard',
|
|
44
|
-
type: 'success'
|
|
45
|
-
});
|
|
46
|
-
}).catch(err => {
|
|
47
|
-
openNotification({
|
|
48
|
-
description: 'Failed to copy text',
|
|
49
|
-
type: 'failure'
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// return circle color depands on stageConsistent key coming from backend
|
|
55
|
-
const getCircleClass = (row, isTimeLineStep) => {
|
|
56
|
-
if (row.stageConsistent) {
|
|
57
|
-
return isTimeLineStep ? 'finish' : 'greenBg';
|
|
58
|
-
}
|
|
59
|
-
if (row.toDate === null && row.oneassistDisplayStatus === deilveryStageText) {
|
|
60
|
-
return isTimeLineStep ? 'process' : 'greenBr';
|
|
61
|
-
}
|
|
62
|
-
return isTimeLineStep ? 'error' : 'redBg';
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// check if current stage is delivery stage or not
|
|
66
|
-
const isOnDeliveryStage = Array.isArray(tableData) && tableData.length > 0 && ((_tableData = tableData[tableData.length - 1]) === null || _tableData === void 0 ? void 0 : _tableData.oneassistDisplayStatus) === deilveryStageText && ((_tableData2 = tableData[tableData.length - 1]) === null || _tableData2 === void 0 ? void 0 : _tableData2.toDate) === null;
|
|
67
|
-
|
|
68
|
-
// remove duplicate consicutive objects only show single unique objects
|
|
69
|
-
const stepsData = tableData.map(item => ({
|
|
70
|
-
title: item.oneassistDisplayStatus,
|
|
71
|
-
status: getCircleClass(item, true)
|
|
72
|
-
})).filter((item, index) => {
|
|
73
|
-
var _tableData3;
|
|
74
|
-
return item.title !== ((_tableData3 = tableData[index - 1]) === null || _tableData3 === void 0 ? void 0 : _tableData3.oneassistDisplayStatus);
|
|
75
|
-
});
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement(_styles.StyleTrackShipment, {
|
|
77
|
-
className: "trackingDetails"
|
|
78
|
-
}, /*#__PURE__*/_react.default.createElement(_CustomNotification.default, {
|
|
79
|
-
ref: notificationRef
|
|
80
|
-
}), title ? /*#__PURE__*/_react.default.createElement("h1", {
|
|
81
|
-
className: "type-t1-500"
|
|
82
|
-
}, title) : null, /*#__PURE__*/_react.default.createElement("h3", {
|
|
83
|
-
className: "type-t1-500"
|
|
84
|
-
}, heading), /*#__PURE__*/_react.default.createElement("p", {
|
|
85
|
-
className: "type-b2-400 disFlex"
|
|
86
|
-
}, "AWB Number:", awbNumber, awbNumber && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
87
|
-
icon: _FileCopyOutlined.default,
|
|
88
|
-
size: 20,
|
|
89
|
-
onClick: handleCopyToClipboard,
|
|
90
|
-
style: {
|
|
91
|
-
cursor: 'pointer',
|
|
92
|
-
color: '014FC5'
|
|
93
|
-
}
|
|
94
|
-
})), /*#__PURE__*/_react.default.createElement(_styles.AddressesContainer, null, /*#__PURE__*/_react.default.createElement(_AddressWidget.default, {
|
|
95
|
-
address: fromAddress
|
|
96
|
-
}), /*#__PURE__*/_react.default.createElement(_AddressWidget.default, {
|
|
97
|
-
address: toAddress
|
|
98
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
-
className: "cstScroll"
|
|
100
|
-
}, /*#__PURE__*/_react.default.createElement(_CustomTimeline.default, {
|
|
101
|
-
currentStep: isOnDeliveryStage ? stepsData.length : stepsData.length - 1,
|
|
102
|
-
stepsData: stepsData
|
|
103
|
-
})), /*#__PURE__*/_react.default.createElement(_CustomTable.default, {
|
|
104
|
-
bordered: true,
|
|
105
|
-
rowKey: "key",
|
|
106
|
-
columns: [{
|
|
107
|
-
title: 'Stage',
|
|
108
|
-
dataIndex: 'oneassistDisplayStatus',
|
|
109
|
-
key: 'oneassistDisplayStatus',
|
|
110
|
-
render: (text, row, index) => {
|
|
111
|
-
const obj = {
|
|
112
|
-
children: /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("em", {
|
|
113
|
-
className: "comIcon ".concat(getCircleClass(row))
|
|
114
|
-
}), text),
|
|
115
|
-
props: {}
|
|
116
|
-
};
|
|
117
|
-
if (index === 0 || tableData[index - 1].oneassistDisplayStatus !== text) {
|
|
118
|
-
let rowSpanCount = 1;
|
|
119
|
-
for (let i = index + 1; i < tableData.length; i += 1) {
|
|
120
|
-
if (tableData[i].oneassistDisplayStatus === text) {
|
|
121
|
-
rowSpanCount += 1;
|
|
122
|
-
} else {
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
obj.props.rowSpan = rowSpanCount;
|
|
127
|
-
} else {
|
|
128
|
-
obj.props.rowSpan = 0;
|
|
129
|
-
}
|
|
130
|
-
return obj;
|
|
131
|
-
}
|
|
132
|
-
}, {
|
|
133
|
-
title: 'description from partner',
|
|
134
|
-
dataIndex: 'partnerStatus',
|
|
135
|
-
key: 'partnerStatus'
|
|
136
|
-
}, {
|
|
137
|
-
title: 'Time',
|
|
138
|
-
dataIndex: 'toDate',
|
|
139
|
-
key: 'toDate'
|
|
140
|
-
}],
|
|
141
|
-
dataSource: tableData
|
|
142
|
-
}));
|
|
143
|
-
}
|
|
144
|
-
TrackShipmentWidget.propTypes = {
|
|
145
|
-
awbNumber: _propTypes.default.string.isRequired,
|
|
146
|
-
fromAddress: _propTypes.default.shape({
|
|
147
|
-
heading: _propTypes.default.string,
|
|
148
|
-
addressLine1: _propTypes.default.string,
|
|
149
|
-
addressLine2: _propTypes.default.string,
|
|
150
|
-
addressLine3: _propTypes.default.string,
|
|
151
|
-
landmark: _propTypes.default.string,
|
|
152
|
-
pincode: _propTypes.default.string || _propTypes.default.number,
|
|
153
|
-
city: _propTypes.default.string,
|
|
154
|
-
state: _propTypes.default.string,
|
|
155
|
-
type: _propTypes.default.oneOf(['permanent', 'temporary']),
|
|
156
|
-
additional_info: _propTypes.default.shape({
|
|
157
|
-
lat: _propTypes.default.string,
|
|
158
|
-
long: _propTypes.default.string
|
|
159
|
-
})
|
|
160
|
-
}),
|
|
161
|
-
tableData: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
162
|
-
key: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
163
|
-
oneassistDisplayStatus: _propTypes.default.string,
|
|
164
|
-
partnerStatus: _propTypes.default.string,
|
|
165
|
-
toDate: _propTypes.default.string
|
|
166
|
-
})).isRequired,
|
|
167
|
-
title: _propTypes.default.string,
|
|
168
|
-
heading: _propTypes.default.string,
|
|
169
|
-
toAddress: _propTypes.default.shape({
|
|
170
|
-
heading: _propTypes.default.string,
|
|
171
|
-
addressLine1: _propTypes.default.string,
|
|
172
|
-
addressLine2: _propTypes.default.string,
|
|
173
|
-
addressLine3: _propTypes.default.string,
|
|
174
|
-
landmark: _propTypes.default.string,
|
|
175
|
-
pincode: _propTypes.default.string || _propTypes.default.number,
|
|
176
|
-
city: _propTypes.default.string,
|
|
177
|
-
state: _propTypes.default.string,
|
|
178
|
-
type: _propTypes.default.oneOf(['permanent', 'temporary']),
|
|
179
|
-
additional_info: _propTypes.default.shape({
|
|
180
|
-
lat: _propTypes.default.string,
|
|
181
|
-
long: _propTypes.default.string
|
|
182
|
-
})
|
|
183
|
-
})
|
|
184
|
-
};
|
|
185
|
-
TrackShipmentWidget.defaultProps = {
|
|
186
|
-
fromAddress: {
|
|
187
|
-
heading: ''
|
|
188
|
-
},
|
|
189
|
-
title: '',
|
|
190
|
-
heading: 'Shipment tracking details',
|
|
191
|
-
toAddress: {
|
|
192
|
-
heading: ''
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
var _default = exports.default = TrackShipmentWidget;
|
/package/build/{dev/oa-widget-track-shipment → widgets/oa-widget-track-shipment-list}/styles.js
RENAMED
|
File without changes
|