@corva/ui 0.33.0-6 → 0.33.0-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.
- package/clients/api/apiCore.js +1 -1
- package/clients/utils.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/ArticleItemContent.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentCaption.js +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/ItemContent.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/VideoItemContent.js +1 -1
- package/components/FeedItem/FeedItem.js +1 -1
- package/components/FeedItem/components/Comments.js +1 -1
- package/components/FeedItem/components/FeedComments.js +1 -1
- package/effects/useSubscriptions.js +1 -1
- package/package.json +1 -1
package/clients/api/apiCore.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import{parse as o,stringify as s}from"query-string";import{getAppKeyFromStackTrace as i,attachHTTPHeaders as c}from"../utils.js";import u from"@babel/runtime/helpers/createClass";import{DISPLAY_HTTP_MESSAGES as p}from"./httpMessages.js";function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?l(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f={400:"Request Failed",403:"No Permission",404:"Not Found"},d=["POST","PUT","PATCH","DELETE"],m=function(){function t(e,n){r(this,t),this.status=e.status,this.statusText=e.statusText,this.message=n.message||"No Message"}return u(t,[{key:"isAuthenticationProblem",value:function(){return 401===this.status||"Invalid authentication token"===this.message}},{key:"isTermsProblem",value:function(){return 401===this.status&&"Please accept the latest terms of service"===this.message}}]),t}(),y=o(window.location.search).api_url||process.env.REACT_APP_API_URL||"https://api.qa.corva.ai",v={"Content-Type":"application/json",Accept:"application/json"};function b(t){t.isAuthenticationProblem&&t.isAuthenticationProblem()&&!t.isTermsProblem()&&(console.error("Problem with user"),"/login"!==window.location.pathname&&(window.location.href="/login"))}var g=/^\/v1\/assets.*/;function w(){return(w=a(n.mark((function t(e){var r,a,o,s,i,u=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},a=u.length>2&&void 0!==u[2]?u[2]:{},o=a.apiUrl,s=void 0===o?y:o,i=a.appKey,g.test(e)&&(r.cache="reload"),r.credentials="include",t.abrupt("return",fetch("".concat(s).concat(e),c({config:r,appKey:i})));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var P,x,O=(P=function(t){return w.apply(this,arguments)},x=a(n.mark((function t(e,r,a){var o,s,i,c,u,l,h;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P(e,r,a);case 2:if(o=t.sent,s=o.status,!o.ok){t.next=6;break}return t.abrupt("return",204===s?null:o);case 6:return t.prev=6,t.next=9,o.json();case 9:i=t.sent,t.next=15;break;case 12:t.prev=12,t.t0=t.catch(6),i={};case 15:throw c=r.method,u=d.includes(c),l=p[i.message]||f[s],u&&l&&console.error("ERROR"),b(h=new m(o,i)),h;case 22:case"end":return t.stop()}}),t,null,[[6,12]])}))),function(t,e,r){return x.apply(this,arguments)});function j(t,e){return k.apply(this,arguments)}function k(){return(k=a(n.mark((function t(e,r){var a,o,s,c=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},o=a.apiUrl,t.next=4,O(e,{method:"POST",headers:v,body:JSON.stringify(r)},{apiUrl:o,appKey:i()});case 4:return s=t.sent,t.abrupt("return",s&&s.json());case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(t){return U.apply(this,arguments)}function U(){return(U=a(n.mark((function t(e){var r,a,o,c,u,p,l=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=l.length>1&&void 0!==l[1]?l[1]:{},a=l.length>2&&void 0!==l[2]?l[2]:{},o=a.apiUrl,c=a.appKey,u=s(r,{arrayFormat:"bracket"}),t.next=6,O("".concat(e).concat(u?"?":"").concat(u),{method:"GET"},{apiUrl:o,appKey:c||i()});case 6:if(p=t.sent,t.t0=p,!t.t0){t.next=12;break}return t.next=11,p.json();case 11:t.t0=t.sent;case 12:return t.t1=t.t0,t.t2=p&&p.headers,t.abrupt("return",{data:t.t1,headers:t.t2});case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t){return E.apply(this,arguments)}function E(){return(E=a(n.mark((function t(e){var r,a,o,s=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=s.length>1&&void 0!==s[1]?s[1]:{},a=s.length>2&&void 0!==s[2]?s[2]:{},t.next=4,T(e,r,h(h({},a),{},{appKey:a.appKey||i()}));case 4:return o=t.sent,t.abrupt("return",o.data);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function K(t,e){return S.apply(this,arguments)}function S(){return(S=a(n.mark((function t(e,r){var a,o,c,u,p,l=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=l.length>2&&void 0!==l[2]?l[2]:{},o=l.length>3&&void 0!==l[3]?l[3]:{},c=o.apiUrl,u=s(a),t.next=6,O("".concat(e).concat(u?"?":"").concat(u),{method:"PUT",headers:v,body:JSON.stringify(r)},{apiUrl:c,appKey:i()});case 6:return p=t.sent,t.abrupt("return",p&&p.json());case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(t,e){return D.apply(this,arguments)}function D(){return(D=a(n.mark((function t(e,r){var a,o,c,u,p,l=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=l.length>2&&void 0!==l[2]?l[2]:{},o=l.length>3&&void 0!==l[3]?l[3]:{},c=o.apiUrl,u=s(a),t.next=6,O("".concat(e).concat(u?"?":"").concat(u),{method:"PATCH",headers:v,body:JSON.stringify(r)},{apiUrl:c,appKey:i()});case 6:return p=t.sent,t.abrupt("return",p&&p.json());case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(t){return R.apply(this,arguments)}function R(){return(R=a(n.mark((function t(e){var r,a,o,c,u,p=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p.length>1&&void 0!==p[1]?p[1]:{},a=p.length>2&&void 0!==p[2]?p[2]:{},o=a.apiUrl,c=s(r),t.next=6,O(c?"".concat(e,"?").concat(c):e,{method:"DELETE",headers:v},{apiUrl:o,appKey:i()});case 6:return u=t.sent,t.abrupt("return",u&&u.json());case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function F(t,e){return _.apply(this,arguments)}function _(){return(_=a(n.mark((function t(r,a){var o,c,u,p,l,h,f,d=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=d.length>2&&void 0!==d[2]?d[2]:{},c=d.length>3&&void 0!==d[3]?d[3]:{},u=s(o),p=c.method,l=void 0===p?"POST":p,h=new FormData,Object.entries(a).forEach((function(t){var r=e(t,2),n=r[0],a=r[1];Array.isArray(a)?a.forEach((function(t){h.append(n,t)})):h.append(n,a)})),t.next=8,O(u?"".concat(r,"?").concat(u):r,{method:l,headers:{Accept:"application/json"},body:h},{appKey:i()});case 8:return f=t.sent,t.abrupt("return",f&&f.json());case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}export{y as baseUrl,N as del,A as get,T as getWithHeaders,b as handleAuthenticationProblem,C as patch,j as post,K as put,F as sendFormData};
|
package/clients/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var r=/corva\.ai\/(.+?)\/packages/;function a(){var
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";function e(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,c)}return t}function t(t){for(var c=1;c<arguments.length;c++){var n=null!=arguments[c]?arguments[c]:{};c%2?e(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}var c=/corva\.ai\/(.+?)\/packages/,n=/app\/(.+?)\.chunk\.js/;function a(){var r=Error.stackTraceLimit;Error.stackTraceLimit=300;var e=new Error,t=e.stack.match(c)||e.stack.match(n);return Error.stackTraceLimit=r,t?t[1].replace("/app/","."):null}function o(r){var e=r.config,c=r.appKey,n=t({},e.headers||{});return c&&(n["x-corva-app"]=c),t(t({},e),{},{headers:n})}export{o as attachHTTPHeaders,a as getAppKeyFromStackTrace};
|
package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../constants/completion.js";import"../../../../../constants/alerts.js";import t from"@babel/runtime/helpers/slicedToArray";import"../../../../../constants/goals.js";import"../../../../../constants/segment.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../../../utils/index.js";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{makeStyles as o,Dialog as r}from"@material-ui/core";import{useState as s}from"react";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import n from"prop-types";import"classnames";import{Close as p}from"@material-ui/icons";import"../../../../Modal/index.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../../../Tooltip/MuiTooltipDcWrapper.js";import"../../../../Avatar/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import m from"../../../../IconButton/index.js";import"../../../../ConfirmationDialog.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../PadModeSelect/PadModeSelect.js";import"../../../AppHeader/AppHeaderNew.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppContext.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../AppActions/AppActions.css.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../Typography.js";import"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../../../SlateFormattedText/RenderElements.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppView/components/ChooseAssetButton/index.js";import{HelpContentList as a}from"./components/HelpContentList.js";import{ItemContent as l}from"./components/ItemContent.js";import{SearchInput as d}from"./components/SearchInput.js";import{useHelpContents as c}from"./effects/useHelpContents.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import j from"../../../../TruncatedText/index.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/index.js";import"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../Login/components/Login.js";import"../../../../Login/components/PasswordField.js";import"../../../../Login/components/Chip.js";import"../../../../Login/components/StepFooter.js";import"../../../../Login/components/StepContent.js";import"../../../../Login/components/StepHeader.js";import"../../../../Login/components/Step.js";import"../../../../Login/components/OrDivider.js";import"../../../../Login/components/HiddenEmailField.js";import"../../../../Login/components/EmailField.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../Button/index.js";import"../../../../MenuItem/index.js";import"../../../../ContextMenuItem/index.js";import"../../../../FolderMenuItem/index.js";import"../../../../EditableItem/EditableItem/index.js";import"../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../Checkbox/index.js";import"../../../../FolderMenuItemWithLinks/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTable/index.js";import"../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../WellSummary/WellSummaryItemValue.js";import"../../../../WellSummary/ActivitySummaryChart.js";import"../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../BICOffsetPickerDialog/index.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../Notifications/Notifications.js";import"../../../../TextLink/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../PinnableFilters/PinnableFilters.js";import"../../../../HeaderLayout/HeaderLayout.js";import"../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../Table/TableToolbar/TableToolbar.js";import"../../../../PriceInput/PriceInput.js";import"../../../../LabelsCounter/LabelsCounter.js";import"../../../../Stepper/Step.js";import"../../../../Stepper/StepsWrapper.js";import"../../../../Stepper/Stepper.js";import"../../../../Comment/CommentIcon/index.js";import"../../../../FilesLoader/FilesLoader.js";import"../../../../SearchInput/index.js";import"../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../StageDesignVActual/ComparisonRow.js";import"../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../FeedItem/FeedItem.js";import"../../../../KeyboardDateTimePicker.js";import"../../../../PostInput/PostInput.js";import"../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../AddComment/Popover.js";import"../../../../AddComment/Popup.js";var u=o((function(t){return{dialogPaper:{backgroundColor:t.palette.background.b9,maxWidth:"1361px !important",position:"relative"},dialogContentWrapper:{height:680,overflow:"auto",padding:"0 40px","&:after":{content:'""',width:"100%",height:16,position:"absolute",bottom:0,left:0,right:0,zIndex:1,background:"linear-gradient(to bottom, rgba(65, 65, 65, 0) 0%, #414141 100%)"}},content:{marginBottom:16,marginTop:74,paddingTop:16},dialogHeader:{height:92,padding:"40px 40px 16px 40px",position:"absolute",top:0,left:0,right:0,background:"linear-gradient(to bottom, #414141 0%, #414141 83%, rgba(65, 65, 65, 0) 100%)",display:"flex",justifyContent:"space-between",alignItems:"center",zIndex:1},mainViewTitle:{display:"flex",alignItems:"center",justifyContent:"space-between",flexGrow:1,paddingRight:32},singleItemTitle:{display:"flex",alignItems:"center",width:"calc(100% - 36px)"},title:{fontSize:20},searchField:{width:358,backgroundColor:t.palette.background.b7},appName:{fontSize:13,letterSpacing:"0.15px",marginRight:8,color:t.palette.primary.main,flexShrink:0,"&:hover":{cursor:"pointer"}}}}));function g(o){var n=o.onClose,g=o.appName,C=o.appId,A=s(null),x=t(A,2),b=x[0],h=x[1],f=u({}),S=c({appId:C}),P=S.helpContents,I=S.isLoading,y=S.error,v=S.searchHelpContents,D=s(""),T=t(D,2),E=T[0],L=T[1];return e(r,{open:!0,onClose:n,classes:{paper:f.dialogPaper},children:i("div",{className:f.dialogContentWrapper,children:[i("div",{className:f.dialogHeader,children:[i("div",b?{className:f.singleItemTitle,children:[i("span",{className:f.appName,onClick:function(){return h(null)},children:[g," App Help /"]}),e(j,{children:e("span",{className:f.title,children:b.title})})]}:{className:f.mainViewTitle,children:[i("div",{className:f.title,children:[g,": App Help"]}),e(d,{className:f.searchField,initialValue:E,onChange:function(t){L(t),v(t)}})]}),e(m,{onClick:n,tooltipProps:{title:"Close"},children:e(p,{})})]}),e("div",{className:f.content,children:b?e(l,{helpContent:b}):e(a,{helpContents:P,isLoading:I,error:y,onItemClick:h})})]})})}g.propTypes={onClose:n.func.isRequired,appName:n.string.isRequired,appId:n.string.isRequired};export default g;
|
|
1
|
+
import"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../constants/completion.js";import"../../../../../constants/alerts.js";import t from"@babel/runtime/helpers/slicedToArray";import"../../../../../constants/goals.js";import"../../../../../constants/segment.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../../../utils/index.js";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{makeStyles as o,Dialog as r}from"@material-ui/core";import{useState as s}from"react";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import n from"prop-types";import"classnames";import{Close as p}from"@material-ui/icons";import"../../../../Modal/index.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../../../Tooltip/MuiTooltipDcWrapper.js";import"../../../../Avatar/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import m from"../../../../IconButton/index.js";import"../../../../ConfirmationDialog.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../PadModeSelect/PadModeSelect.js";import"../../../AppHeader/AppHeaderNew.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppContext.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../AppActions/AppActions.css.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../Typography.js";import"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../../../SlateFormattedText/RenderElements.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppView/components/ChooseAssetButton/index.js";import"./components/ArticleIcon.js";import{HelpContentList as a}from"./components/HelpContentList.js";import{ItemContent as l}from"./components/ItemContent.js";import{SearchInput as d}from"./components/SearchInput.js";import{useHelpContents as c}from"./effects/useHelpContents.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import j from"../../../../TruncatedText/index.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/index.js";import"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../Login/components/Login.js";import"../../../../Login/components/PasswordField.js";import"../../../../Login/components/Chip.js";import"../../../../Login/components/StepFooter.js";import"../../../../Login/components/StepContent.js";import"../../../../Login/components/StepHeader.js";import"../../../../Login/components/Step.js";import"../../../../Login/components/OrDivider.js";import"../../../../Login/components/HiddenEmailField.js";import"../../../../Login/components/EmailField.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../Button/index.js";import"../../../../MenuItem/index.js";import"../../../../ContextMenuItem/index.js";import"../../../../FolderMenuItem/index.js";import"../../../../EditableItem/EditableItem/index.js";import"../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../Checkbox/index.js";import"../../../../FolderMenuItemWithLinks/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTable/index.js";import"../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../WellSummary/WellSummaryItemValue.js";import"../../../../WellSummary/ActivitySummaryChart.js";import"../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../BICOffsetPickerDialog/index.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../Notifications/Notifications.js";import"../../../../TextLink/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../PinnableFilters/PinnableFilters.js";import"../../../../HeaderLayout/HeaderLayout.js";import"../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../Table/TableToolbar/TableToolbar.js";import"../../../../PriceInput/PriceInput.js";import"../../../../LabelsCounter/LabelsCounter.js";import"../../../../Stepper/Step.js";import"../../../../Stepper/StepsWrapper.js";import"../../../../Stepper/Stepper.js";import"../../../../Comment/CommentIcon/index.js";import"../../../../FilesLoader/FilesLoader.js";import"../../../../SearchInput/index.js";import"../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../StageDesignVActual/ComparisonRow.js";import"../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../FeedItem/FeedItem.js";import"../../../../KeyboardDateTimePicker.js";import"../../../../PostInput/PostInput.js";import"../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../AddComment/Popover.js";import"../../../../AddComment/Popup.js";var u=o((function(t){return{dialogPaper:{backgroundColor:t.palette.background.b9,maxWidth:"1361px !important",position:"relative"},dialogContentWrapper:{height:680,overflow:"auto",padding:"0 40px","&:after":{content:'""',width:"100%",height:16,position:"absolute",bottom:0,left:0,right:0,zIndex:1,background:"linear-gradient(to bottom, rgba(65, 65, 65, 0) 0%, #414141 100%)"}},content:{marginBottom:16,marginTop:74,paddingTop:16},dialogHeader:{height:92,padding:"40px 40px 16px 40px",position:"absolute",top:0,left:0,right:0,background:"linear-gradient(to bottom, #414141 0%, #414141 83%, rgba(65, 65, 65, 0) 100%)",display:"flex",justifyContent:"space-between",alignItems:"center",zIndex:1},mainViewTitle:{display:"flex",alignItems:"center",justifyContent:"space-between",flexGrow:1,paddingRight:32},singleItemTitle:{display:"flex",alignItems:"center",width:"calc(100% - 36px)"},title:{fontSize:20},searchField:{width:358,backgroundColor:t.palette.background.b7},appName:{fontSize:13,letterSpacing:"0.15px",marginRight:8,color:t.palette.primary.main,flexShrink:0,"&:hover":{cursor:"pointer"}}}}));function g(o){var n=o.onClose,g=o.appName,C=o.appId,A=s(null),x=t(A,2),b=x[0],h=x[1],f=u(),S=c({appId:C}),P=S.helpContents,I=S.isLoading,y=S.error,v=S.searchHelpContents,D=s(""),T=t(D,2),E=T[0],L=T[1];return e(r,{open:!0,onClose:n,classes:{paper:f.dialogPaper},children:i("div",{className:f.dialogContentWrapper,children:[i("div",{className:f.dialogHeader,children:[i("div",b?{className:f.singleItemTitle,children:[i("span",{className:f.appName,onClick:function(){return h(null)},children:[g," App Help /"]}),e(j,{children:e("span",{className:f.title,children:b.title})})]}:{className:f.mainViewTitle,children:[i("div",{className:f.title,children:[g,": App Help"]}),e(d,{className:f.searchField,initialValue:E,onChange:function(t){L(t),v(t)}})]}),e(m,{onClick:function(){b?h(null):n()},tooltipProps:{title:"Close"},children:e(p,{})})]}),e("div",{className:f.content,children:b?e(l,{helpContent:b}):e(a,{helpContents:P,isLoading:I,error:y,onItemClick:h})})]})})}g.propTypes={onClose:n.func.isRequired,appName:n.string.isRequired,appId:n.string.isRequired};export default g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
import"lodash";import"@babel/runtime/helpers/typeof";import{jsxs as t,Fragment as e,jsx as r}from"react/jsx-runtime";import"slate";import"../../../../../SlateFormattedText/RenderElements.js";import o from"../../../../../SlateFormattedText/SlateFormattedText.js";import{helpContentShape as n}from"../shapes/index.js";import{HelpContentCaption as p}from"./HelpContentCaption.js";function m(n){var m=n.helpContent;return t(e,{children:[r(p,{helpContent:m}),r(o,{text:m.articleContent})]})}m.propTypes={helpContent:n.isRequired};export{m as ArticleItemContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../../constants/completion.js";import"../../../../../../constants/alerts.js";import"@babel/runtime/helpers/slicedToArray";import"../../../../../../constants/goals.js";import"../../../../../../constants/segment.js";import"../../../../../../constants/apps.js";import"../../../../../../constants/drillstring.js";import"../../../../../../constants/notifications.js";import"../../../../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../../../../utils/index.js";import{jsx as t,jsxs as e}from"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../../../../clients/jsonApi/index.js";import"../../../../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../../Modal/index.js";import"../../../../../IconMenu/index.js";import"../../../../../StyledMenuItem/index.js";import"../../../../../LoadingIndicator/LoadingIndicator.js";import"../../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../../../../Tooltip/MuiTooltipDcWrapper.js";import o from"../../../../../Avatar/index.js";import"../../../../../Annotations/AnnotationsContext.js";import"../../../../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../../../../IconButton/index.js";import"../../../../../ConfirmationDialog.js";import"../../../../../Annotations/components/AnnotationsList/index.js";import"../../../../../Annotations/components/LastAnnotation/index.js";import"../../../../../PadModeSelect/PadModeSelect.js";import"../../../../AppHeader/AppHeaderNew.js";import"../../../../AppHeader/AppHeader.js";import"../../../../AppSideBar/AppSideBar.js";import"../../../../AppContext.js";import"../../../../AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../AppActions/AppActions.css.js";import"../../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../../Typography.js";import"../../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../../../../SlateFormattedText/RenderElements.js";import"../../../../../SlateFormattedText/SlateFormattedText.js";import"../../AppSettingsDialog/AppSettingsDialog.js";import"../../AnnotationsButton/AnnotationsButton.js";import"../../NonPriorityMenus/NonPriorityMenus.js";import"../../FullscreenButton/FullscreenButton.js";import"../../AppInfoMessage/AppInfoMessage.js";import"../../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../DevCenterAppView/components/ChooseAssetButton/index.js";import{helpContentShape as r}from"../shapes/index.js";import{HelpContentTimestamp as s}from"./HelpContentTimestamp.js";import"../HelpCenterDialog.js";import"../../../DevCenterAppContainer.css.js";import"../../RestoreAppSizeButton/index.js";import"../../PriorityMenus/PriorityMenus.css.js";import"../../../../NavigationBar/NavigationBar.js";import"../../../../SideBar/SideBar.js";import"../../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../../../../TruncatedText/index.js";import"../../../../../AssetEditor/SingleAssetEditor.js";import"../../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../../AssetEditor/index.js";import"../../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../../CollapsableSidebar.js";import"../../../../../DateTimePicker/index.js";import"../../../../../DatePicker/index.js";import"../../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../../ColorPicker/ColorPicker.js";import"../../../../../ParameterCharts/AddEditTrack.js";import"../../../../../ParameterCharts/ParameterCharts.js";import"../../../../../ChartActionsList/ChartActionsList.js";import"../../../../../SettingEditors/ColorEditor/index.js";import"../../../../../SettingEditors/DropdownEditor/index.js";import"../../../../../SettingEditors/RadioEditor/index.js";import"../../../../../SwitchControl/index.js";import"../../../../../RangeSlider/RangeSlider.js";import"../../../../../Login/components/Login.js";import"../../../../../Login/components/PasswordField.js";import"../../../../../Login/components/Chip.js";import"../../../../../Login/components/StepFooter.js";import"../../../../../Login/components/StepContent.js";import"../../../../../Login/components/StepHeader.js";import"../../../../../Login/components/Step.js";import"../../../../../Login/components/OrDivider.js";import"../../../../../Login/components/HiddenEmailField.js";import"../../../../../Login/components/EmailField.js";import"../../../../../Breadcrumbs/index.js";import"../../../../../VirtualizedTable/index.js";import"../../../../../EmptyView/EmptyView.js";import"../../../../../Button/index.js";import"../../../../../MenuItem/index.js";import"../../../../../ContextMenuItem/index.js";import"../../../../../FolderMenuItem/index.js";import"../../../../../EditableItem/EditableItem/index.js";import"../../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../../Checkbox/index.js";import"../../../../../FolderMenuItemWithLinks/index.js";import"../../../../../TextField/index.js";import"../../../../../Chip/index.js";import"../../../../../Counter/index.js";import"../../../../../AnchorsList/AnchorsList.js";import"../../../../../Select/index.js";import"../../../../../Tabs/Tabs.js";import"../../../../../Tabs/Tab.js";import"../../../../../ResizableTable/ResizableTable.js";import"../../../../../Drillstring/BHASchematic.js";import"../../../../../Drillstring/BHAComponentIcon.js";import"../../../../../Drillstring/BHATable/index.js";import"../../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../../Casing/CasingComponentIcon.js";import"../../../../../Casing/CasingTable/index.js";import"../../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../../WellSummary/WellSummaryItemValue.js";import"../../../../../WellSummary/ActivitySummaryChart.js";import"../../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../../BICOffsetPickerDialog/index.js";import"../../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../../Notifications/Notifications.js";import"../../../../../TextLink/index.js";import"../../../../../Template/TemplatePopover/index.js";import"../../../../../PinnableFilters/PinnableFilters.js";import"../../../../../HeaderLayout/HeaderLayout.js";import"../../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../../Table/TableToolbar/TableToolbar.js";import"../../../../../PriceInput/PriceInput.js";import"../../../../../LabelsCounter/LabelsCounter.js";import"../../../../../Stepper/Step.js";import"../../../../../Stepper/StepsWrapper.js";import"../../../../../Stepper/Stepper.js";import"../../../../../Comment/CommentIcon/index.js";import"../../../../../FilesLoader/FilesLoader.js";import"../../../../../SearchInput/index.js";import"../../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../../StageDesignVActual/ComparisonRow.js";import"../../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../../FeedItem/FeedItem.js";import"../../../../../KeyboardDateTimePicker.js";import"../../../../../PostInput/PostInput.js";import"../../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../../AddComment/Popover.js";import"../../../../../AddComment/Popup.js";var p=i((function(t){return{caption:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},captionText:{display:"flex",alignItems:"center"},avatar:{marginRight:8},authorName:{marginRight:16,color:t.palette.primary.contrastText,fontWeight:500,fontSize:16,lineHeight:"22px"}}}));function n(i){var r=i.helpContent,n=p();return t("div",{className:n.caption,children:e("div",{className:n.captionText,children:[t(o,{displayName:"".concat(r.author.firstName," ").concat(r.author.lastName),imgSrc:r.author.profilePhoto,className:n.avatar}),t("span",{className:n.authorName,children:"".concat(r.author.firstName," ").concat(r.author.lastName)}),t(s,{helpContent:r})]})})}n.propTypes={helpContent:r.isRequired};export{n as HelpContentCaption};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Box as e}from"@material-ui/core";import{helpContentShape as r}from"../shapes/index.js";import{ArticleItemContent as o}from"./ArticleItemContent.js";import{VideoItemContent as n}from"./VideoItemContent.js";function i(r){var i=r.helpContent,m=i.articleContent?o:n;return t(e,{width:"982px",children:t(m,{helpContent:i})})}i.propTypes={helpContent:r.isRequired};export{i as ItemContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../../constants/completion.js";import"../../../../../../constants/alerts.js";import"@babel/runtime/helpers/slicedToArray";import"../../../../../../constants/goals.js";import"../../../../../../constants/segment.js";import"../../../../../../constants/apps.js";import"../../../../../../constants/drillstring.js";import"../../../../../../constants/notifications.js";import"../../../../../../constants/feed.js";import{ATTACMENT_METADATA_TYPE as t}from"../../../../../../constants/helpCenter.js";import{VIDEO_SOURCES as e}from"../../../../../../constants/video.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import{getVideoSourceAndIdByUrl as i}from"../../../../../../utils/video.js";import"../../../../../../utils/index.js";import{jsxs as o,jsx as r}from"react/jsx-runtime";import{makeStyles as s}from"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../../../../clients/jsonApi/index.js";import"../../../../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../../Modal/index.js";import"../../../../../IconMenu/index.js";import"../../../../../StyledMenuItem/index.js";import"../../../../../LoadingIndicator/LoadingIndicator.js";import"../../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../../../../Tooltip/MuiTooltipDcWrapper.js";import n from"../../../../../Avatar/index.js";import"../../../../../Annotations/AnnotationsContext.js";import"../../../../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../../../../IconButton/index.js";import"../../../../../ConfirmationDialog.js";import"../../../../../Annotations/components/AnnotationsList/index.js";import"../../../../../Annotations/components/LastAnnotation/index.js";import"../../../../../PadModeSelect/PadModeSelect.js";import"../../../../AppHeader/AppHeaderNew.js";import"../../../../AppHeader/AppHeader.js";import"../../../../AppSideBar/AppSideBar.js";import"../../../../AppContext.js";import"../../../../AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../AppActions/AppActions.css.js";import"../../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../../Typography.js";import"../../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../../../../SlateFormattedText/RenderElements.js";import"../../../../../SlateFormattedText/SlateFormattedText.js";import"../../AppSettingsDialog/AppSettingsDialog.js";import"../../AnnotationsButton/AnnotationsButton.js";import"../../NonPriorityMenus/NonPriorityMenus.js";import"../../FullscreenButton/FullscreenButton.js";import"../../AppInfoMessage/AppInfoMessage.js";import"../../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../DevCenterAppView/components/ChooseAssetButton/index.js";import{helpContentShape as p}from"../shapes/index.js";import{HelpContentTimestamp as m}from"./HelpContentTimestamp.js";import"../HelpCenterDialog.js";import"../../../DevCenterAppContainer.css.js";import"../../RestoreAppSizeButton/index.js";import"../../PriorityMenus/PriorityMenus.css.js";import"../../../../NavigationBar/NavigationBar.js";import"../../../../SideBar/SideBar.js";import"../../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../../../../TruncatedText/index.js";import"../../../../../AssetEditor/SingleAssetEditor.js";import"../../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../../AssetEditor/index.js";import"../../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../../CollapsableSidebar.js";import"../../../../../DateTimePicker/index.js";import"../../../../../DatePicker/index.js";import"../../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../../ColorPicker/ColorPicker.js";import"../../../../../ParameterCharts/AddEditTrack.js";import"../../../../../ParameterCharts/ParameterCharts.js";import"../../../../../ChartActionsList/ChartActionsList.js";import"../../../../../SettingEditors/ColorEditor/index.js";import"../../../../../SettingEditors/DropdownEditor/index.js";import"../../../../../SettingEditors/RadioEditor/index.js";import"../../../../../SwitchControl/index.js";import"../../../../../RangeSlider/RangeSlider.js";import"../../../../../Login/components/Login.js";import"../../../../../Login/components/PasswordField.js";import"../../../../../Login/components/Chip.js";import"../../../../../Login/components/StepFooter.js";import"../../../../../Login/components/StepContent.js";import"../../../../../Login/components/StepHeader.js";import"../../../../../Login/components/Step.js";import"../../../../../Login/components/OrDivider.js";import"../../../../../Login/components/HiddenEmailField.js";import"../../../../../Login/components/EmailField.js";import"../../../../../Breadcrumbs/index.js";import"../../../../../VirtualizedTable/index.js";import"../../../../../EmptyView/EmptyView.js";import"../../../../../Button/index.js";import"../../../../../MenuItem/index.js";import"../../../../../ContextMenuItem/index.js";import"../../../../../FolderMenuItem/index.js";import"../../../../../EditableItem/EditableItem/index.js";import"../../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../../Checkbox/index.js";import"../../../../../FolderMenuItemWithLinks/index.js";import"../../../../../TextField/index.js";import"../../../../../Chip/index.js";import"../../../../../Counter/index.js";import"../../../../../AnchorsList/AnchorsList.js";import"../../../../../Select/index.js";import"../../../../../Tabs/Tabs.js";import"../../../../../Tabs/Tab.js";import"../../../../../ResizableTable/ResizableTable.js";import"../../../../../Drillstring/BHASchematic.js";import"../../../../../Drillstring/BHAComponentIcon.js";import"../../../../../Drillstring/BHATable/index.js";import"../../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../../Casing/CasingComponentIcon.js";import"../../../../../Casing/CasingTable/index.js";import"../../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../../WellSummary/WellSummaryItemValue.js";import"../../../../../WellSummary/ActivitySummaryChart.js";import"../../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../../BICOffsetPickerDialog/index.js";import"../../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../../Notifications/Notifications.js";import"../../../../../TextLink/index.js";import"../../../../../Template/TemplatePopover/index.js";import"../../../../../PinnableFilters/PinnableFilters.js";import"../../../../../HeaderLayout/HeaderLayout.js";import"../../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../../Table/TableToolbar/TableToolbar.js";import"../../../../../PriceInput/PriceInput.js";import"../../../../../LabelsCounter/LabelsCounter.js";import"../../../../../Stepper/Step.js";import"../../../../../Stepper/StepsWrapper.js";import"../../../../../Stepper/Stepper.js";import"../../../../../Comment/CommentIcon/index.js";import"../../../../../FilesLoader/FilesLoader.js";import"../../../../../SearchInput/index.js";import"../../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../../StageDesignVActual/ComparisonRow.js";import"../../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../../FeedItem/FeedItem.js";import"../../../../../KeyboardDateTimePicker.js";import"../../../../../PostInput/PostInput.js";import"../../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../../AddComment/Popover.js";import"../../../../../AddComment/Popup.js";var a=s((function(t){return{videoItemContent:{width:902},videoContainer:{width:"100%",minHeight:507,marginBottom:16},video:{width:"100%"},youtubeVideoContainer:{height:507},caption:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},captionText:{display:"flex",alignItems:"center"},avatar:{marginRight:8},authorName:{marginRight:16,color:t.palette.primary.contrastText,fontWeight:500,fontSize:16,lineHeight:"22px"},description:{width:"100%",color:t.palette.primary.contrastText,fontSize:16,lineHeight:"22px",paddingBottom:32}}})),l=function(e){var i,o;return null===(i=e.attachmentMetadata)||void 0===i||null===(o=i.find((function(e){return e.type===t.video})))||void 0===o?void 0:o.cdn_url};function d(t){var s=t.helpContent,p=a();console.log(s);var d=i(s.url),c=d.source,j=d.id,u=c===e.YOUTUBE;return o("div",{className:p.videoItemContent,children:[o("div",{className:p.videoContainer,children:[u&&r("div",{className:p.youtubeVideoContainer,children:r("iframe",{width:"100%",height:"100%",src:"https://www.youtube.com/embed/".concat(j),title:s.title,frameBorder:0,allow:"picture-in-picture",allowFullScreen:!0})}),!u&&r("video",{controls:!0,preload:"metadata",className:p.video,children:r("source",{src:l(s)})})]}),r("div",{className:p.caption,children:o("div",{className:p.captionText,children:[r(n,{displayName:"".concat(s.author.firstName," ").concat(s.author.lastName),imgSrc:s.author.profilePhoto,className:p.avatar}),r("span",{className:p.authorName,children:"".concat(s.author.firstName," ").concat(s.author.lastName)}),r(m,{helpContent:s})]})}),r("div",{className:p.description,children:s.description})]})}d.propTypes={helpContent:p.isRequired};export{d as VideoItemContent};
|
|
1
|
+
import{ATTACMENT_METADATA_TYPE as e}from"../../../../../../constants/helpCenter.js";import{VIDEO_SOURCES as t}from"../../../../../../constants/video.js";import{getVideoSourceAndIdByUrl as i}from"../../../../../../utils/video.js";import{jsxs as o,Fragment as r,jsx as n}from"react/jsx-runtime";import{makeStyles as a}from"@material-ui/core";import{helpContentShape as d}from"../shapes/index.js";import{HelpContentCaption as c}from"./HelpContentCaption.js";var l=a((function(e){return{videoContainer:{width:"100%",minHeight:507,marginBottom:16},video:{width:"100%"},youtubeVideoContainer:{height:507},description:{width:"100%",color:e.palette.primary.contrastText,fontSize:16,lineHeight:"22px",paddingBottom:32}}})),s=function(t){var i,o;return null===(i=t.attachmentMetadata)||void 0===i||null===(o=i.find((function(t){return t.type===e.video})))||void 0===o?void 0:o.cdn_url};function m(e){var a=e.helpContent,d=l(),m=i(a.url),p=m.source,u=m.id,h=p===t.YOUTUBE;return o(r,{children:[o("div",{className:d.videoContainer,children:[h&&n("div",{className:d.youtubeVideoContainer,children:n("iframe",{width:"100%",height:"100%",src:"https://www.youtube.com/embed/".concat(u),title:a.title,frameBorder:0,allow:"picture-in-picture",allowFullScreen:!0})}),!h&&n("video",{controls:!0,preload:"metadata",className:d.video,children:n("source",{src:s(a)})})]}),n(c,{helpContent:a}),n("div",{className:d.description,children:a.description})]})}m.propTypes={helpContent:d.isRequired};export{m as VideoItemContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{noop as t}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import{FEED_ITEM_TYPES_BY_KEY as r,FEED_ITEM_TYPES as n}from"../../constants/feed.js";import i from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import s from"@material-ui/core/colors/grey";import m from"../../utils/main.js";import{isNativeDetected as p}from"../../utils/mobileDetect.js";import{jsxs as c,jsx as l}from"react/jsx-runtime";import{makeStyles as d,Paper as u,Divider as f}from"@material-ui/core";import{useState as v}from"react";import{deleteFeedItem as I,toggleFeedItemLike as h}from"../../clients/jsonApi/index.js";import y from"prop-types";import b from"classnames";import T from"../LoadingIndicator/LoadingIndicator.js";import C from"../ConfirmationDialog.js";import g from"./components/Actions.js";import F from"./components/Comments.js";import j from"./components/Content.js";import k from"./components/CreatedAt.js";import x from"./components/Icon.js";import D from"./components/Reactions.js";import N from"./components/RigAndWell.js";import R from"./components/TypeAndAssetTitle.js";import w from"./FeedItem.css.js";var P=d((function(e){return{paperRoot:{position:"relative",marginBottom:10,paddingBottom:5,backgroundColor:e.palette.background.b8},clickablePaperRoot:{"&:hover":{filter:"brightness(90%)",transition:"filter 0.3s"}},headerDividerRoot:{margin:"10px 0"}}}));function A(t){var n,d,y,A,M,O,E,_,L=t.feedItem,U=t.editebleFeedItemTypes,q=t.removeFeedItem,S=t.enterEditMode,B=t.router,G=t.currentUser,W=t.canDeleteFeedItem,z=t.appData,H=t.customFeedItemTypeTemplates,J=P(),K=v(!1),Q=o(K,2),V=Q[0],X=Q[1],Y=v(!0),Z=o(Y,2),$=Z[0],ee=Z[1],te=v(!1),oe=o(te,2),re=oe[0],ne=oe[1],ie=L.type===r.post.type,ae=U.includes(L.type),se=r[L.type].label,me=m.getUserFullName(L.user),pe=L.type===r.alert.type&&"/alerts/".concat(null===(n=L.context)||void 0===n||null===(d=n.alert)||void 0===d?void 0:d.id),ce=L.type===r.alert.type&&pe,le=(E=a(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return X(!0),e.prev=1,e.next=4,I(L.id);case 4:e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(1),e.abrupt("return");case 9:return e.prev=9,X(!1),e.finish(9);case 12:m.showSuccessNotification("Item was deleted"),q(L.id);case 14:case"end":return e.stop()}}),e,null,[[1,6,9,12]])}))),function(){return E.apply(this,arguments)}),de=(_=a(i.mark((function e(){var t;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=L.id,e.prev=1,e.next=4,h(t);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:case"end":return e.stop()}}),e,null,[[1,6]])}))),function(){return _.apply(this,arguments)});return c(u,{"data-testid":"".concat("FeedPo","_post_").concat(null===(y=L.context)||void 0===y||null===(A=y.post)||void 0===A?void 0:A.body,"_rigName_").concat(function(e){var t,o,r;return!!e.rig?null===(t=e.rig)||void 0===t?void 0:t.name:null===(o=e.well)||void 0===o||null===(r=o.parent_asset)||void 0===r?void 0:r.name}(L)),className:b(J.paperRoot,(M={},e(M,J.clickablePaperRoot,ce),e(M,w.hideOverflow,V),M)),elevation:0,children:[c("div",{onClick:function(){ce&&B.push(pe)},className:b(w.mainContainer,(O={},e(O,w.mainContainerClickable,ce),e(O,w.mainContainerNative,p),O)),children:[l(x,{feedItem:L,classes:J,displayName:me}),c("div",{className:b(w.mainContainerTop,e({},w.mainContainerTopNative,p)),children:[l(R,{feedItem:L,userFullName:me,typeLabel:se,classes:J,isPost:ie}),c("div",{className:w.mainContainerTopMenu,children:[l(k,{feedItem:L,classes:J}),l(g,{"data-testid":"".concat("FeedPo","_actionsDropdown"),isPost:ie,isEditableItem:ae,canDeleteFeedItem:W,handleEditMenuItem:function(){S(L)},handleDeleteMenuItem:function(){ne(!0)},copyFeedItemLink:function(){var e=L.id,t="".concat(window.location.host,"/feed/").concat(e);m.copyToClipboard(t)},feedItem:L,currentUser:G})]}),l(N,{feedItem:L,isPost:ie})]}),l(f,{className:J.headerDividerRoot}),l(j,{feedItem:L,appData:z,customFeedItemTypeTemplates:H})]}),l(D,{feedItem:L,handleToggleLike:de,setOpenCommentInput:ee,openCommentInput:$,currentUser:G}),l(F,{openCommentInput:$,feedItem:L,setOpenCommentInput:ee}),V&&l("div",{className:w.loadingContainer,style:{backgroundColor:s[800]},children:l(T,{})}),re&&l(C,{open:re,title:"Delete post",text:"Are you sure you want to delete post and all attachments?",handleClose:function(){return ne(!1)},handleOk:function(){le()},okText:"Delete"})]})}A.propTypes={feedItem:y.shape().isRequired,enterEditMode:y.func,removeFeedItem:y.func,editebleFeedItemTypes:y.oneOf([n.TRACES_MEMO,n.POST]),currentUser:y.shape().isRequired,canDeleteFeedItem:y.bool.isRequired,appData:y.shape().isRequired,customFeedItemTypeTemplates:y.shape()},A.defaultProps={enterEditMode:t,removeFeedItem:t,editebleFeedItemTypes:[n.POST],customFeedItemTypeTemplates:{}};export default A;
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{noop as t}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import{FEED_ITEM_TYPES_BY_KEY as r,FEED_ITEM_TYPES as n}from"../../constants/feed.js";import i from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import s from"@material-ui/core/colors/grey";import m from"../../utils/main.js";import{isNativeDetected as p}from"../../utils/mobileDetect.js";import{jsxs as c,jsx as l}from"react/jsx-runtime";import{makeStyles as d,Paper as u,Divider as f}from"@material-ui/core";import{useState as v}from"react";import{deleteFeedItem as I,toggleFeedItemLike as h}from"../../clients/jsonApi/index.js";import y from"prop-types";import b from"classnames";import T from"../LoadingIndicator/LoadingIndicator.js";import C from"../ConfirmationDialog.js";import g from"./components/Actions.js";import F from"./components/Comments.js";import j from"./components/Content.js";import k from"./components/CreatedAt.js";import x from"./components/Icon.js";import D from"./components/Reactions.js";import N from"./components/RigAndWell.js";import R from"./components/TypeAndAssetTitle.js";import w from"./FeedItem.css.js";var P=d((function(e){return{paperRoot:{position:"relative",marginBottom:10,paddingBottom:5,backgroundColor:e.palette.background.b8},clickablePaperRoot:{"&:hover":{filter:"brightness(90%)",transition:"filter 0.3s"}},headerDividerRoot:{margin:"10px 0"}}}));function A(t){var n,d,y,A,M,O,E,_,L=t.feedItem,U=t.editebleFeedItemTypes,q=t.removeFeedItem,S=t.enterEditMode,B=t.router,G=t.currentUser,W=t.canDeleteFeedItem,z=t.appData,H=t.customFeedItemTypeTemplates,J=P(),K=v(!1),Q=o(K,2),V=Q[0],X=Q[1],Y=v(!0),Z=o(Y,2),$=Z[0],ee=Z[1],te=v(!1),oe=o(te,2),re=oe[0],ne=oe[1],ie=L.type===r.post.type,ae=U.includes(L.type),se=r[L.type].label,me=m.getUserFullName(L.user),pe=L.type===r.alert.type&&"/alerts/".concat(null===(n=L.context)||void 0===n||null===(d=n.alert)||void 0===d?void 0:d.id),ce=L.type===r.alert.type&&pe,le=(E=a(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return X(!0),e.prev=1,e.next=4,I(L.id);case 4:e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(1),e.abrupt("return");case 9:return e.prev=9,X(!1),e.finish(9);case 12:m.showSuccessNotification("Item was deleted"),q(L.id);case 14:case"end":return e.stop()}}),e,null,[[1,6,9,12]])}))),function(){return E.apply(this,arguments)}),de=(_=a(i.mark((function e(){var t;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=L.id,e.prev=1,e.next=4,h(t);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:case"end":return e.stop()}}),e,null,[[1,6]])}))),function(){return _.apply(this,arguments)});return c(u,{"data-testid":"".concat("FeedPo","_post_").concat(null===(y=L.context)||void 0===y||null===(A=y.post)||void 0===A?void 0:A.body,"_rigName_").concat(function(e){var t,o,r;return!!e.rig?null===(t=e.rig)||void 0===t?void 0:t.name:null===(o=e.well)||void 0===o||null===(r=o.parent_asset)||void 0===r?void 0:r.name}(L)),className:b(J.paperRoot,(M={},e(M,J.clickablePaperRoot,ce),e(M,w.hideOverflow,V),M)),elevation:0,children:[c("div",{onClick:function(){ce&&B.push(pe)},className:b(w.mainContainer,(O={},e(O,w.mainContainerClickable,ce),e(O,w.mainContainerNative,p),O)),children:[l(x,{feedItem:L,classes:J,displayName:me}),c("div",{className:b(w.mainContainerTop,e({},w.mainContainerTopNative,p)),children:[l(R,{feedItem:L,userFullName:me,typeLabel:se,classes:J,isPost:ie}),c("div",{className:w.mainContainerTopMenu,children:[l(k,{feedItem:L,classes:J}),l(g,{"data-testid":"".concat("FeedPo","_actionsDropdown"),isPost:ie,isEditableItem:ae,canDeleteFeedItem:W,handleEditMenuItem:function(){S(L)},handleDeleteMenuItem:function(){ne(!0)},copyFeedItemLink:function(){var e=L.id,t="".concat(window.location.host,"/feed/").concat(e);m.copyToClipboard(t)},feedItem:L,currentUser:G})]}),l(N,{feedItem:L,isPost:ie})]}),l(f,{className:J.headerDividerRoot}),l(j,{feedItem:L,appData:z,customFeedItemTypeTemplates:H})]}),l(D,{feedItem:L,handleToggleLike:de,setOpenCommentInput:ee,openCommentInput:$,currentUser:G}),l(F,{openCommentInput:$,feedItem:L,setOpenCommentInput:ee,user:G}),V&&l("div",{className:w.loadingContainer,style:{backgroundColor:s[800]},children:l(T,{})}),re&&l(C,{open:re,title:"Delete post",text:"Are you sure you want to delete post and all attachments?",handleClose:function(){return ne(!1)},handleOk:function(){le()},okText:"Delete"})]})}A.propTypes={feedItem:y.shape().isRequired,enterEditMode:y.func,removeFeedItem:y.func,editebleFeedItemTypes:y.oneOf([n.TRACES_MEMO,n.POST]),currentUser:y.shape().isRequired,canDeleteFeedItem:y.bool.isRequired,appData:y.shape().isRequired,customFeedItemTypeTemplates:y.shape()},A.defaultProps={enterEditMode:t,removeFeedItem:t,editebleFeedItemTypes:[n.POST],customFeedItemTypeTemplates:{}};export default A;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNativeDetected as e}from"../../../utils/mobileDetect.js";import{jsxs as t,jsx as m}from"react/jsx-runtime";import{makeStyles as o,Divider as i}from"@material-ui/core";import r from"./FeedComments.js";var n=o({commentsDividerRoot:{margin:"5px 16px 10px 33px"},commentsDividerRootNative:{margin:"5px 16px 10px 16px"}});export default function(o){var p=o.feedItem,
|
|
1
|
+
import{isNativeDetected as e}from"../../../utils/mobileDetect.js";import{jsxs as t,jsx as m}from"react/jsx-runtime";import{makeStyles as o,Divider as i}from"@material-ui/core";import r from"./FeedComments.js";var n=o({commentsDividerRoot:{margin:"5px 16px 10px 33px"},commentsDividerRootNative:{margin:"5px 16px 10px 16px"}});export default function(o){var p=o.feedItem,s=o.openCommentInput,a=o.user,c=n(),d=p.comments.length;return t("div",{children:[(!!d||s)&&m(i,{className:e?c.commentsDividerRootNative:c.commentsDividerRoot}),m(r,{openCommentInput:s,feedItem:p,isNative:e,user:a})]})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"moment";import o from"@babel/runtime/helpers/slicedToArray";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{makeStyles as n,Button as m,Typography as i}from"@material-ui/core";import{useState as s,useRef as a}from"react";import{postFeedItemComment as p}from"../../../clients/jsonApi/index.js";import c from"lodash/noop";import d from"prop-types";import u from"../../CommentInput/index.js";import l from"../../CommentLoader.js";import f from"../../Comment/index.js";var C=n({showMoreButtonRoot:{textTransform:"none",backgroundColor:"transparent!important"},feedCommentsContainer:{padding:"0 16px 0 33px"}});function h(n){var d=n.openCommentInput,h=n.feedItem,x=n.isNative,v=n.user,y=s(!1),I=o(y,2),b=I[0],R=I[1],j=s(3),g=o(j,2),k=g[0],q=g[1],w=a(),_=C(),M=h.comments.length,N=M>k;return t("div",{className:(d||!!M)&&_.feedCommentsContainer,children:[d&&!x&&r(u,{inputRef:w,postComment:function(e){p(h.id,e)},setIsPosting:R,companyId:h.company_id,autoFocus:!1}),N&&r(m,{"data-testid":"".concat("FeedComments","_viewMoreComments"),classes:_.showMoreButtonRoot,onClick:function(){q((function(e){return 3===e?e+7:e+10}))},children:r(i,{variant:"caption",color:"primary",children:"View more comments"})}),h.comments.sort((function(o){return-e(o.created_at).unix()})).slice(0,k).reverse().map((function(e){return r(f,{comment:e,handleDeleteCallback:c,patchCommentCallback:c,companyId:h.company_id,user:v},e.id)})),b&&r(l,{})]})}h.propTypes={openCommentInput:d.bool.isRequired,feedItem:d.shape().isRequired,user:d.shape().isRequired,isNative:d.bool.isRequired};export default h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import{castArray as t,differenceBy as e,omit as n,merge as u,concat as a,mapValues as i}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import c from"@babel/runtime/regenerator";import s from"@babel/runtime/helpers/asyncToGenerator";import{useState as p,useRef as f,useMemo as l,useEffect as m}from"react";import{parse as b}from"querystring";import d from"uuid/v1";import{
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import{castArray as t,differenceBy as e,omit as n,merge as u,concat as a,mapValues as i}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import c from"@babel/runtime/regenerator";import s from"@babel/runtime/helpers/asyncToGenerator";import{useState as p,useRef as f,useMemo as l,useEffect as m}from"react";import{parse as b}from"querystring";import d from"uuid/v1";import{getAppKeyFromStackTrace as y}from"../clients/utils.js";import{getAppStorage as v,getDataAppStorage as h,getDataAppStorageAggregate as O}from"../clients/jsonApi/index.js";import{getSubscriptionId as w}from"../clients/subscriptions.js";function g(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function I(r,t,e){var n=w(r,t);return j(j({},r),{},{hookId:t,subId:n,appInstanceId:n,app_key:e})}function k(r,t){return x.apply(this,arguments)}function x(){return(x=s(c.mark((function r(t,e){var n,u,a;return c.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.timeQuery,u=e.appKey,a=t.map(function(){var r=s(c.mark((function r(t){var e,a,i,o,s,p,f,l,m;return c.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.provider,a=t.collection,i=t.assetId,o=t.subscribeOnly,s=t.params,!o){r.next=3;break}return r.abrupt("return",null);case 3:return p=s.query,f=n?"{timestamp#lte#".concat(n.timestamp.$lte):"",l=p&&f?"AND":"",m="".concat(p).concat(l).concat(f),r.prev=7,r.next=10,v(e,a,i,j(j(j({},s),m?{query:m}:{}),{},{appKey:u}));case 10:return r.abrupt("return",r.sent);case 13:return r.prev=13,r.t0=r.catch(7),r.abrupt("return",[]);case 16:case"end":return r.stop()}}),r,null,[[7,13]])})));return function(t){return r.apply(this,arguments)}}()),r.abrupt("return",Promise.all(a));case 3:case"end":return r.stop()}}),r)})))).apply(this,arguments)}function P(r,t){return E.apply(this,arguments)}function E(){return(E=s(c.mark((function r(t,e){var n,a,o;return c.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.timeQuery,a=e.appKey,o=t.map(function(){var r=s(c.mark((function r(t){var e,o,s,p,f,l,m,b,d,y,v,w;return c.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.provider,o=t.collection,s=t.assetId,p=t.subscribeOnly,f=t.params,l=void 0===f?{}:f,!p){r.next=3;break}return r.abrupt("return",null);case 3:if(!l.aggregate){r.next=5;break}return r.abrupt("return",O(e,o,j({},i(l.aggregate,JSON.stringify))));case 5:return m=JSON.stringify(u({asset_id:s},l.query,n)),b=l.limit,d=void 0===b?1:b,y=l.sort,v=void 0===y?'{"timestamp": 1}':y,r.prev=7,w=j(j({},l),{},{limit:d,sort:v,query:m,appKey:a}),r.next=11,h(e,o,w);case 11:return r.abrupt("return",r.sent);case 14:return r.prev=14,r.t0=r.catch(7),r.abrupt("return",[]);case 17:case"end":return r.stop()}}),r,null,[[7,14]])})));return function(t){return r.apply(this,arguments)}}()),r.abrupt("return",Promise.all(o));case 3:case"end":return r.stop()}}),r)})))).apply(this,arguments)}function D(u){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=i.timestamp,s=i.isOldApiUsed,v=p({}),h=o(v,2),O=h[0],w=h[1],g=f();g.current||(g.current=d());var x=window[Symbol.for("socket")],E=x.subscribe,D=x.unsubscribe,S=x.socket,q=l((function(){return y()}),[]),A=f([]),K=t(u).map((function(r){return I(r,g.current,q)})),N=K.map((function(r){return r.subId})).join(),Q=l((function(){if(c)return{timestamp:{$lte:c}};var r=b(window.location.search).time;return r?{timestamp:{$lte:new Date(r)/1e3}}:null}),[window.location.search,c]);return m((function(){var t=function(t){t.hookId===g.current&&w((function(e){var n=t.data;return t.subId in e&&!t.subscribeOnly&&(n=a(e[t.subId],t.data)),t.params&&t.params.limit&&(n=n.slice(-t.params.limit)),j(j({},e),{},r({},t.subId,n))}))};return S&&S.on("data",t),function(){return S&&S.off("data",t)}}),[]),m((function(){A.current.forEach(D),A.current=[]}),[Q]),m((function(){var r=A.current,t=e(K,r,"subId"),u=e(r,K,"subId");t.forEach((function(r){Q&&!r.alwaysSubscribe||E(r)})),u.forEach(D),A.current=K,(s?k:P)(t,{timeQuery:Q,appKey:q,isOldApiUsed:s}).then((function(r){return w((function(e){var a=n(e,u.map((function(r){return r.subId})));return t.forEach((function(t,e){null!==r[e]&&(a[t.subId]=r[e])})),a}))}))}),[N,Q]),m((function(){return function(){return A.current.forEach(D)}}),[]),l((function(){return K.map((function(r){var t=r.subId;return{loading:!(t in O),data:O[t]}}))}),[O,N])}export default D;
|