@corva/ui 0.89.0-9 → 0.89.0-rc.1

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 (132) hide show
  1. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  2. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  3. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  4. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  5. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  6. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  7. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  8. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  9. package/cjs-bundle/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
  10. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  11. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  12. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
  13. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
  14. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  15. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  16. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  17. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  18. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  19. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  20. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  21. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  22. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  23. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  24. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  25. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  26. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  27. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  28. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  29. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  30. package/cjs-bundle/components/FeedItem/components/Icon.js +1 -1
  31. package/cjs-bundle/components/FeedItem/editModals/DvdCommentEdit/DvdCommentEdit.js +1 -1
  32. package/cjs-bundle/components/GoogleDocsViewer/index.js +1 -1
  33. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
  34. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  35. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  36. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  37. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
  38. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  39. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  40. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  41. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  42. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  43. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  44. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  45. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  46. package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  47. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  48. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  49. package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  50. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  51. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  52. package/cjs-bundle/components/Search/Search.js +1 -1
  53. package/cjs-bundle/constants/completion.js +1 -1
  54. package/cjs-bundle/constants/feed.js +1 -1
  55. package/cjs-bundle/utils/feed.js +1 -1
  56. package/cjs-bundle/utils/time.js +1 -1
  57. package/components/AddComment/Popover.js +1 -1
  58. package/components/AddComment/components/Content.js +1 -1
  59. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  60. package/components/BICOffsetPickerDialog/index.js +1 -1
  61. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  62. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  63. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  64. package/components/CollapsableSidebar.d.ts +1 -1
  65. package/components/CollapsableSidebar.js +1 -1
  66. package/components/DevCenter/AppSideBar/AppSideBar.d.ts +6 -0
  67. package/components/DevCenter/AppSideBar/AppSideBar.d.ts.map +1 -1
  68. package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
  69. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
  70. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  71. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  72. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
  73. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
  74. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  75. package/components/DocumentViewer/DocumentViewer.js +1 -1
  76. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  77. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  78. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  79. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  80. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  81. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  82. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  83. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  84. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  85. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  86. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  87. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  88. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  89. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  90. package/components/FeedItem/components/Icon.d.ts.map +1 -1
  91. package/components/FeedItem/components/Icon.js +1 -1
  92. package/components/FeedItem/editModals/DvdCommentEdit/DvdCommentEdit.d.ts.map +1 -1
  93. package/components/FeedItem/editModals/DvdCommentEdit/DvdCommentEdit.js +1 -1
  94. package/components/FeedItem/feed.fixtures.d.ts +459 -0
  95. package/components/FeedItem/feed.fixtures.d.ts.map +1 -0
  96. package/components/GoogleDocsViewer/index.js +1 -1
  97. package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
  98. package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  99. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  100. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  101. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
  102. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  103. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  104. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  105. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  106. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  107. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  108. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  109. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  110. package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  111. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  112. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  113. package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  114. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  115. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  116. package/components/Search/Search.d.ts.map +1 -1
  117. package/components/Search/Search.js +1 -1
  118. package/constants/completion.d.ts +3 -0
  119. package/constants/completion.d.ts.map +1 -1
  120. package/constants/completion.js +1 -1
  121. package/constants/feed.d.ts +25 -0
  122. package/constants/feed.d.ts.map +1 -1
  123. package/constants/feed.js +1 -1
  124. package/package.json +1 -1
  125. package/utils/__tests__/feed.test.d.ts +2 -0
  126. package/utils/__tests__/feed.test.d.ts.map +1 -0
  127. package/utils/feed.d.ts +11 -0
  128. package/utils/feed.d.ts.map +1 -1
  129. package/utils/feed.js +1 -1
  130. package/utils/time.d.ts +1 -0
  131. package/utils/time.d.ts.map +1 -1
  132. package/utils/time.js +1 -1
package/utils/feed.d.ts CHANGED
@@ -1,5 +1,16 @@
1
1
  export function isAvatarIcon(feedItemType: any): boolean;
2
2
  export function getIconForFeedItemType(feedItemType: any): any;
3
+ /**
4
+ * The value is used to position the FeedItem
5
+ *
6
+ * @returns number|null
7
+ */
3
8
  export function getFeedDepth(feedItem: any, isTvd: any): any;
9
+ /**
10
+ * The value is used to position the FeedItem
11
+ *
12
+ * @returns number|null
13
+ */
14
+ export function getFeedItemTimestamp(feedItem: any): any;
4
15
  export const AVATAR_ICON: "AVATAR_ICON";
5
16
  //# sourceMappingURL=feed.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../src/utils/feed.js"],"names":[],"mappings":"AA+BA,yDAEC;AAED,+DAiDC;AAED,6DAoDC;AA1HD,wCAAyC"}
1
+ {"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../src/utils/feed.js"],"names":[],"mappings":"AA+BA,yDAEC;AAED,+DAsCC;AAED;;;;GAIG;AACH,6DA4CC;AAED;;;;GAIG;AACH,yDAiDC;AAnKD,wCAAyC"}
package/utils/feed.js CHANGED
@@ -1 +1 @@
1
- import{get as e}from"lodash";import{FEED_ITEM_TYPES_BY_KEY as t,FEED_ITEM_TYPES as a}from"../constants/feed.js";var c="AVATAR_ICON",s=[t.post.type,t.app_annotation.type,t.geosteering_comments.type,t.dvd_comment.type,t.hookload_broomstick_comment.type,t.pc_comment.type,t.npt_lessons_comment.type,t.lessons_learned.type,a.TRACES_MEMO,a.DEPTH_COMMENTS];function n(e){return s.includes(e)}function o(a){if(n(a))return"AVATAR_ICON";switch(a){case e(t,"alert.type"):return"/static/media/27836bcdc3e809b0c0f1852a4b5a7e9e.svg";case e(t,"operation_summary.type"):case e(t,"completion_operation_summary.type"):return"/static/media/c90b07a56f57b35270d42804a6610c78.svg";case e(t,"operational_note.type"):case e(t,"completion_operational_note.type"):return"/static/media/eb59357d9fdc0d3aa2556c4accf76a1e.svg";case e(t,"bha.type"):return"/static/media/2f3ed40f34ad7a7f2e6a5e1eda45c5f4.svg";case e(t,"daily_cost.type"):case e(t,"completion_daily_cost.type"):return"/static/media/27afcb4e5f3f2b6d8fc1166fe4dc5580.svg";case e(t,"document.type"):return"/static/media/b976051fc561f69a449fa6b1575a9f38.svg";case e(t,"driller_memo.type"):return"/static/media/f8311dcb5efee59526c9665598ff8916.svg";case e(t,"fluid_report.type"):return"/static/media/493f8add7c4f51e48777410e8adcd94b.svg";case e(t,"survey_station.type"):return"/static/media/48c0221a3d0faf6ab12f78c420df8e3a.svg";case e(t,"lessons_learned.type"):return"/static/media/de87fc2dd3cd91d1433e2ead8e03c691.svg";case e(t,"npt_event.type"):case e(t,"completion_npt_event.type"):return"/static/media/fb4963d919e404d306afbca0bf0d4386.svg";default:return"/static/media/1f460d664d596ce949f316a08308473d.svg"}}function p(a,c){var s=e(a,["context",a.type,"data"])||e(a,["context",a.type]);switch(a.type){case e(t,"depth_comments.type"):return null==s?void 0:s.commentDepth;case e(t,"hookload_broomstick_comment.type"):return null==s?void 0:s.measuredDepth;case e(t,"bha.type"):return c?null==s?void 0:s.tvd_start:null==s?void 0:s.start_depth;case e(t,"fluid_report.type"):return null==s?void 0:s.depth;case e(t,"survey_station.type"):return c?null==s?void 0:s.tvd:null==s?void 0:s.measured_depth;case e(t,"npt_event.type"):case e(t,"completion_npt_event.type"):return c?null==s?void 0:s.tvd_start:null==s?void 0:s.depth;case e(t,"npt_lessons_comment.type"):case e(t,"pc_comment.type"):case e(t,"drilling_dysfunction_event.type"):case e(t,"traces_memo.type"):case e(t,"dvd_comment.type"):return null==s?void 0:s.holeDepth;case e(t,"lessons_learned.type"):return c?null==s?void 0:s.tvd_start:null==s?void 0:s.md_start;case e(t,"well_plan.type"):case e(t,"app_annotation.type"):case e(t,"driller_memo.type"):case e(t,"document.type"):case e(t,"completion_document.type"):case e(t,"operation_summary.type"):case e(t,"completion_operation_summary.type"):case e(t,"operational_note.type"):case e(t,"completion_operational_note.type"):case e(t,"alert.type"):case e(t,"geosteering_comments.type"):case e(t,"post.type"):case e(t,"daily_cost.type"):case e(t,"completion_daily_cost.type"):default:return null}}export{c as AVATAR_ICON,p as getFeedDepth,o as getIconForFeedItemType,n as isAvatarIcon};
1
+ import{get as e}from"lodash";import{FEED_ITEM_TYPES as a}from"../constants/feed.js";import{convertDateStringToUnixTimestamp as t}from"./time.js";var O="AVATAR_ICON",c=[a.POST,a.APP_ANNOTATION,a.GEOSTEERING_COMMENTS,a.DVD_COMMENT,a.HOOKLOAD_BROOMSTICK_COMMENT,a.PC_COMMENT,a.NPT_LESSONS_COMMENT,a.TRACES_MEMO,a.DEPTH_COMMENTS];function s(e){return c.includes(e)}function E(e){if(s(e))return"AVATAR_ICON";switch(e){case a.ALERT:return"/static/media/27836bcdc3e809b0c0f1852a4b5a7e9e.svg";case a.OPERATION_SUMMARY:case a.COMPLETION_OPERATION_SUMMARY:return"/static/media/c90b07a56f57b35270d42804a6610c78.svg";case a.OPERATIONAL_NOTE:case a.COMPLETION_OPERATIONAL_NOTE:return"/static/media/eb59357d9fdc0d3aa2556c4accf76a1e.svg";case a.BHA:return"/static/media/2f3ed40f34ad7a7f2e6a5e1eda45c5f4.svg";case a.DAILY_COST:case a.COMPLETION_DAILY_COST:return"/static/media/27afcb4e5f3f2b6d8fc1166fe4dc5580.svg";case a.DOCUMENT:return"/static/media/b976051fc561f69a449fa6b1575a9f38.svg";case a.DRILLER_MEMO:return"/static/media/f8311dcb5efee59526c9665598ff8916.svg";case a.FLUID_REPORT:return"/static/media/493f8add7c4f51e48777410e8adcd94b.svg";case a.SURVEY_STATION:return"/static/media/48c0221a3d0faf6ab12f78c420df8e3a.svg";case a.LESSONS_LEARNED:return"/static/media/de87fc2dd3cd91d1433e2ead8e03c691.svg";case a.NPT_EVENT:case a.COMPLETION_NPT_EVENT:return"/static/media/fb4963d919e404d306afbca0bf0d4386.svg";default:return"/static/media/1f460d664d596ce949f316a08308473d.svg"}}function T(t,O){var c,s,E=e(t,["context",t.type,"data"])||e(t,["context",t.type]);switch(t.type){case a.DEPTH_COMMENTS:return null==E?void 0:E.commentDepth;case a.HOOKLOAD_BROOMSTICK_COMMENT:return null==E?void 0:E.measuredDepth;case a.BHA:return O?null==E?void 0:E.tvd_start:null==E?void 0:E.start_depth;case a.FLUID_REPORT:return null==E?void 0:E.depth;case a.SURVEY_STATION:return O?null==E?void 0:E.tvd:null==E?void 0:E.measured_depth;case a.NPT_EVENT:case a.COMPLETION_NPT_EVENT:return O?null==E?void 0:E.tvd_start:null==E?void 0:E.depth;case a.NPT_LESSONS_COMMENT:case a.PC_COMMENT:case a.DRILLING_DYSFUNCTION_EVENT:case a.TRACES_MEMO:case a.DVD_COMMENT:return null==E?void 0:E.holeDepth;case a.LESSONS_LEARNED:return O?null==E?void 0:E.tvd_start:null==E?void 0:E.md_start;case a.GEOSTEERING_COMMENTS:return null==E||null===(c=E.axis)||void 0===c?void 0:c.MD;case a.ALERT:return null!==(s=null==E?void 0:E.start_hole_depth)&&void 0!==s?s:null;case a.WELL_PLAN:case a.APP_ANNOTATION:case a.DRILLER_MEMO:case a.DOCUMENT:case a.COMPLETION_DOCUMENT:case a.OPERATION_SUMMARY:case a.OPERATIONAL_NOTE:case a.COMPLETION_OPERATIONAL_NOTE:case a.POST:case a.DAILY_COST:case a.COMPLETION_DAILY_COST:default:return null}}function N(O){var c=e(O,["context",O.type]),s=e(O,["context",O.type,"data"])||c;switch(O.type){case a.DEPTH_COMMENTS:return null==s?void 0:s.recordTimestamp;case a.HOOKLOAD_BROOMSTICK_COMMENT:return null==s?void 0:s.timestamp;case a.BHA:return null==s?void 0:s.start_timestamp;case a.FLUID_REPORT:case a.DAILY_COST:return null==s?void 0:s.date;case a.SURVEY_STATION:case a.POST:case a.GEOSTEERING_COMMENTS:return null!=O&&O.created_at?t(O.created_at):null;case a.NPT_EVENT:case a.COMPLETION_NPT_EVENT:return null==s?void 0:s.start_time;case a.NPT_LESSONS_COMMENT:case a.PC_COMMENT:case a.DRILLING_DYSFUNCTION_EVENT:case a.TRACES_MEMO:case a.DVD_COMMENT:return null==s?void 0:s.timestamp;case a.LESSONS_LEARNED:return null==s?void 0:s.start_time;case a.OPERATION_SUMMARY:case a.OPERATIONAL_NOTE:return null==s?void 0:s.date_time;case a.ALERT:return null!=c&&c.alert_at?t(c.alert_at):null;case a.WELL_PLAN:case a.APP_ANNOTATION:case a.DRILLER_MEMO:case a.DOCUMENT:case a.COMPLETION_DOCUMENT:case a.COMPLETION_OPERATIONAL_NOTE:case a.COMPLETION_DAILY_COST:default:return null}}export{O as AVATAR_ICON,T as getFeedDepth,N as getFeedItemTimestamp,E as getIconForFeedItemType,s as isAvatarIcon};
package/utils/time.d.ts CHANGED
@@ -2,4 +2,5 @@ export function formatTimestamp(timestamp: number, format: string): string;
2
2
  export function formatLastDataUpdate(timestamp: number): string;
3
3
  export function getDurationFromDayStart(mmt: moment.js): number;
4
4
  export function getDayTimeDuration(start: number, end: number): number;
5
+ export function convertDateStringToUnixTimestamp(dateString: any): number;
5
6
  //# sourceMappingURL=time.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/utils/time.js"],"names":[],"mappings":"AAoBO,2EAAoF;AAUpF,gEAON;AAOM,yDAFM,MAAM,CAG2C;AASvD,0CAJU,MAAM,OACR,MAAM,GACR,MAAM,CAkClB"}
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/utils/time.js"],"names":[],"mappings":"AAoBO,2EAAoF;AAUpF,gEAON;AAOM,yDAFM,MAAM,CAG2C;AASvD,0CAJU,MAAM,OACR,MAAM,GACR,MAAM,CAkClB;AAEM,0EAMN"}
package/utils/time.js CHANGED
@@ -1 +1 @@
1
- import r from"moment-timezone";var n=function(n,o){return r.unix(n).format(o)},o=function(r){return n(r,"M/D/YYYY h:mm a")},u=function(r){return r-r.clone().hour(0).minute(0).second(0).millisecond(0)},t=function(n,o){var t=r.unix(n),i=r.unix(o),e=r.duration(6,"hours"),a=r.duration(12,"hours"),s=r.duration(18,"hours"),h=i-u(i),m=t-u(t),c=(r.duration(h-m).asDays()+1)*a;return t.hours()>17?c-=a:t.hours()>=6&&(c-=u(t)-e),i.hours()<=5?c-=a:i.hours()<18&&(c-=s-u(i)),Math.round(c/1e3)};export{o as formatLastDataUpdate,n as formatTimestamp,t as getDayTimeDuration,u as getDurationFromDayStart};
1
+ import r from"moment-timezone";var n=function(n,o){return r.unix(n).format(o)},o=function(r){return n(r,"M/D/YYYY h:mm a")},u=function(r){return r-r.clone().hour(0).minute(0).second(0).millisecond(0)},t=function(n,o){var t=r.unix(n),e=r.unix(o),i=r.duration(6,"hours"),a=r.duration(12,"hours"),h=r.duration(18,"hours"),m=e-u(e),s=t-u(t),c=(r.duration(m-s).asDays()+1)*a;return t.hours()>17?c-=a:t.hours()>=6&&(c-=u(t)-i),e.hours()<=5?c-=a:e.hours()<18&&(c-=h-u(e)),Math.round(c/1e3)},e=function(r){var n=new Date(r).getTime();return Math.floor(n/1e3)};export{e as convertDateStringToUnixTimestamp,o as formatLastDataUpdate,n as formatTimestamp,t as getDayTimeDuration,u as getDurationFromDayStart};