oa-componentbook 1.0.1-stage.7 → 1.0.1-stage.70

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.
Files changed (45) hide show
  1. package/build/components/oa-component-accordion/Accordion.js +16 -5
  2. package/build/components/oa-component-feedback-form/FeedbackForm.js +75 -0
  3. package/build/components/oa-component-feedback-tooltip/FeedbackTooltip.js +69 -0
  4. package/build/components/oa-component-info/CustomInfo.js +9 -4
  5. package/build/components/oa-component-info/styles.js +3 -3
  6. package/build/components/oa-component-modal/styles.js +1 -1
  7. package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +276 -0
  8. package/build/dev/oa-component-document-viewer/styles.js +12 -0
  9. package/build/dev/oa-component-upload/CustomUpload.js +3 -0
  10. package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +120 -0
  11. package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
  12. package/build/global-css/GlobalCss.js +2 -1
  13. package/build/global-css/GridLayout.js +1 -1
  14. package/build/global-css/commonStyles.js +11 -0
  15. package/build/images/oaChat.svg +5 -0
  16. package/build/index.js +56 -0
  17. package/build/layout/paymentAndConsent/CancelScreen.js +46 -0
  18. package/build/layout/paymentAndConsent/ConsentCard.js +68 -0
  19. package/build/layout/paymentAndConsent/DetailsCard.js +75 -0
  20. package/build/layout/paymentAndConsent/DetailsList.js +38 -0
  21. package/build/layout/paymentAndConsent/Header.js +33 -0
  22. package/build/layout/paymentAndConsent/InProgressScreen.js +46 -0
  23. package/build/layout/paymentAndConsent/Loader.js +21 -0
  24. package/build/layout/paymentAndConsent/Modal.js +28 -0
  25. package/build/layout/paymentAndConsent/PaymentAndConsent.js +22 -0
  26. package/build/layout/paymentAndConsent/PaymentCard.js +83 -0
  27. package/build/layout/paymentAndConsent/Section.js +34 -0
  28. package/build/layout/paymentAndConsent/SuccessScreen.js +46 -0
  29. package/build/layout/paymentAndConsent/TimeLineCard.js +28 -0
  30. package/build/layout/paymentAndConsent/TncList.js +32 -0
  31. package/build/layout/paymentAndConsent/style.js +12 -0
  32. package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +17 -11
  33. package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +318 -0
  34. package/build/widgets/oa-widget-approval/styles.js +2 -2
  35. package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +6 -6
  36. package/build/widgets/oa-widget-feedback/FeedbackWidget.js +83 -0
  37. package/build/widgets/oa-widget-feedback/styles.js +13 -0
  38. package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +257 -0
  39. package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
  40. package/build/widgets/oa-widget-notes/NotesWidget.js +2 -1
  41. package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +161 -0
  42. package/build/widgets/oa-widget-track-shipment/TrackShipmentWidget.js +4 -2
  43. package/build/widgets/oa-widget-track-shipment-list/TrackShipmentWidgetList.js +77 -38
  44. package/build/widgets/oa-widget-track-shipment-list/fn.js +8 -8
  45. package/package.json +6 -3
@@ -15,7 +15,7 @@ const getDateFromEpoch = date => {
15
15
  if (!date) {
16
16
  return '';
17
17
  }
18
- const dateObj = new Date(date * 1000);
18
+ const dateObj = new Date(date);
19
19
  const day = dateObj.getDate();
20
20
  const month = dateObj.getMonth();
21
21
  const year = dateObj.getFullYear();
@@ -39,16 +39,16 @@ const getCurrentShipmentLabel = number => {
39
39
  return "".concat(ordinalNumber, " Shipment");
40
40
  };
41
41
  exports.getCurrentShipmentLabel = getCurrentShipmentLabel;
42
- const isActive = status => status === 'A';
42
+ const isActive = time => time === null;
43
43
  exports.isActive = isActive;
44
- const headerText = (index, reassignmentTime, modifiedTime, status) => "".concat(getCurrentShipmentLabel(index + 1), " | ").concat(getDateString(reassignmentTime, modifiedTime)).concat(isActive(status) ? ' - Present' : '');
44
+ const headerText = (index, reassignmentTime, modifiedTime, status) => "".concat(getCurrentShipmentLabel(index + 1), " | ").concat(getDateString(reassignmentTime, modifiedTime)).concat(isActive(modifiedTime) ? ' - Present' : '');
45
45
  exports.headerText = headerText;
46
46
  const getSingleShipmentHistory = item => {
47
- var _item$stages;
47
+ var _item$history;
48
48
  return {
49
- partnerName: item === null || item === void 0 ? void 0 : item.partnerName,
50
- errorReason: item === null || item === void 0 ? void 0 : item.errorReason,
51
- awbNumber: item === null || item === void 0 ? void 0 : item.awb,
49
+ partnerName: item === null || item === void 0 ? void 0 : item.logisticPartnerName,
50
+ errorReason: item === null || item === void 0 ? void 0 : item.failureReason,
51
+ awbNumber: item === null || item === void 0 ? void 0 : item.logisticPartnerRefNum,
52
52
  fromAddress: {
53
53
  heading: 'From Address:',
54
54
  addressLine1: item === null || item === void 0 ? void 0 : item.origAddressFullName,
@@ -63,7 +63,7 @@ const getSingleShipmentHistory = item => {
63
63
  pincode: item === null || item === void 0 ? void 0 : item.destPincode,
64
64
  city: item === null || item === void 0 ? void 0 : item.destDistrict
65
65
  },
66
- tableData: (_item$stages = item === null || item === void 0 ? void 0 : item.stages) !== null && _item$stages !== void 0 ? _item$stages : []
66
+ tableData: (_item$history = item === null || item === void 0 ? void 0 : item.history) !== null && _item$history !== void 0 ? _item$history : []
67
67
  };
68
68
  };
69
69
  exports.getSingleShipmentHistory = getSingleShipmentHistory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "1.0.1-stage.7",
3
+ "version": "1.0.1-stage.70",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",
@@ -27,7 +27,7 @@
27
27
  "react-markdown": "^8.0.7",
28
28
  "react-pattern-lock": "^12.0.12",
29
29
  "react-pdf": "^5.3.0",
30
- "react-zoom-pan-pinch": "^3.4.4"
30
+ "react-zoom-pan-pinch": "^3.7.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@babel/cli": "^7.22.9",
@@ -47,6 +47,7 @@
47
47
  "babel-plugin-named-exports-order": "^0.0.2",
48
48
  "eslint-config-airbnb": "^19.0.4",
49
49
  "eslint-plugin-storybook": "^0.6.15",
50
+ "onchange": "^6.1.0",
50
51
  "pre-commit": "^1.2.2",
51
52
  "react-scripts": "^5.0.1",
52
53
  "storybook": "^7.6.3",
@@ -66,10 +67,12 @@
66
67
  "scripts": {
67
68
  "start": "react-scripts start",
68
69
  "build": "rm -rf build && NODE_ENV=production babel src/lib --out-dir build --copy-files",
70
+ "publish:local": "npm run build && yalc push --force",
71
+ "watch:publish": "onchange 'src/lib/**/*' -- npm run publish:local",
69
72
  "storybook": "storybook dev -p 6006",
70
73
  "build-storybook": "storybook build",
71
74
  "update-package-lock": "npm i --package-lock-only",
72
- "lint": "eslint src/** --ext .js,.jsx",
75
+ "lint": "eslint \"src/**/*.{js,jsx}\"",
73
76
  "lint-fix": "npm run lint -- --fix",
74
77
  "lint-fix-quiet": "npm run lint-fix -- --quiet",
75
78
  "pre-commit": "./pre-commit.sh"