@corva/ui 0.41.0-9 → 0.42.0-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.
@@ -1 +1 @@
1
- import"react";import"../../permissions/PermissionsContext.js";import"../../permissions/constants/index.js";import"@babel/runtime/helpers/slicedToArray";import"../../permissions/withPermissionsHOC.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../clients/jsonApi/index.js";import r from"../../permissions/ProvidePermissions.js";import"../../config/initGlobalDependencies.js";import"../../styles/globalStyles.js";import t from"./withAppDataProviderHOC.js";import i from"./withCLIAppSettingsHOC.js";import e from"./withReactRouterHOC.js";import o from"./withGridLayoutHOC/withGridLayoutHOC.js";import s from"./withPDFLayoutHOC.js";import{withDevCenterRouterHOC as n}from"./withDevCenterRouterHOC.js";import{isPDFReportView as m}from"./utils.js";import{jsx as p}from"react/jsx-runtime";var a=function(a){var l=a.component,f=a.settings,j=a.manifest,u=a.packageJson;return function(){var a=i(t({CLIAppComponent:l,CLIAppSettings:f,packageJson:u})),c=m?s(a):o(a),C=e(n(c));return p(r,{children:p(C,{manifest:j,dashboardProps:{}})})}};export{a as default};
1
+ import"react";import"../../permissions/PermissionsContext.js";import"../../permissions/constants/index.js";import"@babel/runtime/helpers/slicedToArray";import"../../permissions/withPermissionsHOC.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../clients/jsonApi/index.js";import s from"../../permissions/ProvidePermissions.js";import"../../config/initGlobalDependencies.js";import"../../styles/index.global.css.js";import"../../styles/reactVirtualized.global.css.js";import"../../styles/emojiMart.global.css.js";import"../../styles/mapbox.global.css.js";import"../../styles/lightbox.global.css.js";import"../../styles/generatedThemesVariables.global.css.js";import"../../styles/customScrollbars.global.css.js";import t from"./withAppDataProviderHOC.js";import r from"./withCLIAppSettingsHOC.js";import i from"./withReactRouterHOC.js";import o from"./withGridLayoutHOC/withGridLayoutHOC.js";import e from"./withPDFLayoutHOC.js";import{withDevCenterRouterHOC as m}from"./withDevCenterRouterHOC.js";import{isPDFReportView as p}from"./utils.js";import{jsx as n}from"react/jsx-runtime";var a=function(a){var l=a.component,c=a.settings,j=a.manifest,b=a.packageJson;return function(){var a=r(t({CLIAppComponent:l,CLIAppSettings:c,packageJson:b})),u=p?e(a):o(a),d=i(m(u));return n(s,{children:n(d,{manifest:j,dashboardProps:{}})})}};export{a as default};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./validators/index.js"),s=require("path"),t=require("uuid/v1"),r=require("clean-webpack-plugin").CleanWebpackPlugin,a=require("fs"),o=process.cwd(),l=JSON.parse(a.readFileSync(s.resolve(o,"./package.json"),"utf-8")),n=JSON.parse(a.readFileSync(s.resolve(o,"./manifest.json"),"utf-8"));exports.APP_DIRECTORY=o,exports.default=function(a,o){return e({packageJson:l}),{entry:"./src/index.js",output:{filename:"[name].[contenthash].js",path:s.resolve(process.cwd(),"dist"),publicPath:"/"},devServer:{historyApiFallback:!0},performance:{maxAssetSize:1024e3},plugins:[new r],resolve:{symlinks:!1,extensions:[".js",".jsx",".json",".ts",".tsx"]},module:{rules:[{test:/\.css$/i,use:["style-loader",{loader:"css-loader",options:{modules:{localIdentName:"development"===o.mode?"[path][name]__[local]__".concat(t().substr(-5)):"[name]__[hash:base64:3]".concat(t().substr(-5))},importLoaders:1}},{loader:"postcss-loader",options:{postcssOptions:{plugins:["postcss-preset-env"]}}}]},{test:/\.(js|jsx)$/,exclude:/[\\/]node_modules[\\/]/,use:{loader:"babel-loader",options:{presets:["@babel/preset-env",["@babel/preset-react",{runtime:"automatic"}]]}}},{test:/\.ts(x?)$/,exclude:/[\\/]node_modules[\\/]/,use:[{loader:"babel-loader",options:{presets:["@babel/preset-env",["@babel/preset-react",{runtime:"automatic"}]]}},{loader:"ts-loader"}]}]}}},exports.manifestJson=n,exports.packageJson=l;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./validators/index.js"),s=require("path"),t=require("uuid/v1"),o=require("clean-webpack-plugin").CleanWebpackPlugin,r=require("fs"),a=process.cwd(),n=JSON.parse(r.readFileSync(s.resolve(a,"./package.json"),"utf-8")),l=JSON.parse(r.readFileSync(s.resolve(a,"./manifest.json"),"utf-8"));exports.APP_DIRECTORY=a,exports.default=function(r,a){return e({packageJson:n}),{entry:"./src/index.js",output:{filename:"[name].[contenthash].js",path:s.resolve(process.cwd(),"dist"),publicPath:"/"},devServer:{historyApiFallback:!0},performance:{maxAssetSize:1024e3},plugins:[new o],resolve:{symlinks:!1,extensions:[".js",".jsx",".json",".ts",".tsx"]},module:{rules:[{test:/\.css$/i,use:["style-loader",{loader:"css-loader",options:{modules:{localIdentName:"development"===a.mode?"[path][name]__[local]__".concat(t().substr(-5)):"[name]__[hash:base64:3]".concat(t().substr(-5))},importLoaders:1}},{loader:"postcss-loader",options:{postcssOptions:{plugins:["postcss-preset-env"]}}}]},{test:/\.(js|jsx)$/,exclude:/[\\/]node_modules[\\/]/,use:{loader:"babel-loader",options:{presets:["@babel/preset-env",["@babel/preset-react",{runtime:"automatic"}]]}}},{test:/\.ts(x?)$/,exclude:/[\\/]node_modules[\\/]/,use:[{loader:"babel-loader",options:{presets:["@babel/preset-env",["@babel/preset-react",{runtime:"automatic"}]]}},{loader:"ts-loader",options:{compilerOptions:{noEmit:!1}}}]}]}}},exports.manifestJson=l,exports.packageJson=n;
@@ -1 +1 @@
1
- "use strict";var e=require('./../../../ext-cjs/@babel/runtime/helpers/toConsumableArray.js'),r=require('./../../../ext-cjs/@babel/runtime/helpers/slicedToArray.js'),n=require("./webpack.config.common.js"),t=require("./constants.js"),i=require("webpack"),a=require("webpack-merge").merge,o=require("path"),s=require("webpack-manifest-plugin"),l=require("terser-webpack-plugin"),u=n.manifestJson.application.key,c=n.packageJson.version,p=function(e){var r=u.replace(/\./g,"_");return e?r:"".concat(r,"-").concat(c)},m=Object.keys(t.CORVA_GLOBAL_DEPENDENCIES).map((function(e){return[e,new RegExp("(^".concat(e,"$|^").concat(e,"/)([^]+)?"))]})),d=new Set(["react/jsx-runtime"]);module.exports=function(t,u){var c=!!t.local_debug;return a(n.default(t,u),{entry:"./src/index.js",output:{library:p(c),path:o.resolve(n.APP_DIRECTORY,"dist"),filename:"app.js",libraryTarget:"window"},mode:c?"development":"production",plugins:[new s,new i.EnvironmentPlugin(process.env)],optimization:{minimizer:[new l({parallel:!0})]},externals:[function(n,t,i){if(d.has(t))return i();for(var a=0;a<m.length;a+=1){var o=r(m[a],2),s=o[0],l=o[1].exec(t);if(null!==l){var u=l[2]||"";return i(null,[s].concat(e(u.split("/").filter(Boolean))))}}return i()}],module:{rules:[{test:/\.(png|jpe?g|gif)$/i,use:[{loader:"file-loader",options:{publicPath:process.env.PACKAGE_URL_BASE}}]},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4,publicPath:process.env.PACKAGE_URL_BASE}}]}]}})};
1
+ "use strict";var e=require('./../../../ext-cjs/@babel/runtime/helpers/toConsumableArray.js'),r=require('./../../../ext-cjs/@babel/runtime/helpers/slicedToArray.js'),n=require("./webpack.config.common.js"),t=require("./constants.js"),i=require("webpack"),a=require("webpack-merge").merge,o=require("path"),l=require("webpack-manifest-plugin"),s=require("terser-webpack-plugin"),u=n.manifestJson.application.key,c=n.packageJson.version,p=function(e){var r=u.replace(/\./g,"_");return e?r:"".concat(r,"-").concat(c)},m=Object.keys(t.CORVA_GLOBAL_DEPENDENCIES).map((function(e){return[e,new RegExp("(^".concat(e,"$|^").concat(e,"/)([^]+)?"))]})),d=new Set(["react/jsx-runtime"]);module.exports=function(t,u){var c=!(null==t||!t.local_debug);return a(n.default(t,u),{entry:"./src/index.js",output:{library:p(c),path:o.resolve(n.APP_DIRECTORY,"dist"),filename:"app.js",libraryTarget:"window"},mode:c?"development":"production",plugins:[new l,new i.EnvironmentPlugin(process.env)],optimization:{minimizer:[new s({parallel:!0})]},externals:[function(n,t,i){if(d.has(t))return i();for(var a=0;a<m.length;a+=1){var o=r(m[a],2),l=o[0],s=o[1].exec(t);if(null!==s){var u=s[2]||"";return i(null,[l].concat(e(u.split("/").filter(Boolean))))}}return i()}],module:{rules:[{test:/\.(png|jpe?g|gif)$/i,use:[{loader:"file-loader",options:{publicPath:process.env.PACKAGE_URL_BASE}}]},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4,publicPath:process.env.PACKAGE_URL_BASE}}]}]}})};
@@ -1 +1 @@
1
- import n from"@babel/runtime/helpers/toConsumableArray";import{getValue as r,setValue as t,deleteValue as e,pushValue as u}from"./core.js";var i="chartsViewSettings",o="featureFlagAppsIsolation";function s(n){return t("segment",n)}function a(){return r("segment")}function f(){return t("impersonation","true")}function c(){return r("impersonation")}function l(){return e("impersonation")}function p(){return"true"===c()}function d(r,e,u){return t([i].concat(n(Array.isArray(r)?r:[r])),e,null,u)}function g(t,e){return r([i].concat(n(Array.isArray(t)?t:[t])),e)}function m(n,r,t){return u(["appsHiddenAlerts",n],r,[5,"d"],t)}function A(n){return r(["appsHiddenAlerts",n])}function I(n,r){return t("assetsPageFilters",n,null,r)}function y(){return e("assetsPageFilters")}function F(){return r("assetsPageFilters",{})}function b(n,r){return t("feedInputRigId",n,null,r)}function P(){return e("feedInputRigId")}function R(){return r("feedInputRigId")}function h(){return r("featureFlagAppsIsolation")}export{o as FEATURE_FLAG_APPS_ISOLATION,g as getAppViewStorageSettings,F as getAssetPageFilters,h as getFeatureFlagAppsIsolation,R as getFeedInputRigId,A as getHiddenAlerts,c as getImpersonateStorageKey,a as getSegment,p as isImpersonating,y as removeAssetPageFilters,P as removeFeedInputRigId,d as setAppViewStorageSettings,I as setAssetPageFilters,b as setFeedInputRigId,m as setHiddenAlerts,s as setSegment,f as startImpersonation,l as stopImpersonation};
1
+ import n from"@babel/runtime/helpers/toConsumableArray";import{setValue as r,getValue as t,deleteValue as e,pushValue as u}from"./core.js";var i="chartsViewSettings",o="featureFlagAppsIsolation";function s(n){return r("segment",n)}function a(){return t("segment")}function f(){return r("impersonation","true")}function c(){return t("impersonation")}function l(){return e("impersonation")}function p(){return"true"===c()}function d(t,e,u){return r([i].concat(n(Array.isArray(t)?t:[t])),e,null,u)}function g(r,e){return t([i].concat(n(Array.isArray(r)?r:[r])),e)}function m(n,r,t){return u(["appsHiddenAlerts",n],r,[5,"d"],t)}function A(n){return t(["appsHiddenAlerts",n])}function I(n,t){return r("assetsPageFilters",n,null,t)}function y(){return e("assetsPageFilters")}function F(){return t("assetsPageFilters",{})}function b(n,t){return r("feedInputRigId",n,null,t)}function P(){return e("feedInputRigId")}function R(){return t("feedInputRigId")}function h(){return t("featureFlagAppsIsolation")}export{o as FEATURE_FLAG_APPS_ISOLATION,g as getAppViewStorageSettings,F as getAssetPageFilters,h as getFeatureFlagAppsIsolation,R as getFeedInputRigId,A as getHiddenAlerts,c as getImpersonateStorageKey,a as getSegment,p as isImpersonating,y as removeAssetPageFilters,P as removeFeedInputRigId,d as setAppViewStorageSettings,I as setAssetPageFilters,b as setFeedInputRigId,m as setHiddenAlerts,s as setSegment,f as startImpersonation,l as stopImpersonation};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import{range as e,flattenDepth as a}from"lodash";import*as c from"query-string";import{APIException as u,baseUrl as p,get as s,post as i,del as o,put as f,sendFormData as l,patch as h}from"../api/apiCore.js";import{CORVA_API_URLS as v}from"../constants.js";function d(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function m(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?d(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):d(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function y(){return w.apply(this,arguments)}function w(){return(w=n(r.mark((function t(){var n,e;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(p,"/v1/users/current"),{credentials:"include"});case 2:return n=t.sent,t.next=5,n.json();case 5:if(e=t.sent,null!=n&&n.ok){t.next=8;break}throw new u(n,e);case 8:return t.abrupt("return",e);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _(){return b.apply(this,arguments)}function b(){return b=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/integration/wellview/bha",n));case 2:case"end":return t.stop()}}),t)}))),b.apply(this,arguments)}function g(t){return k.apply(this,arguments)}function k(){return(k=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/wells",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return O.apply(this,arguments)}function O(){return O=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/wells/".concat(n),e));case 2:case"end":return t.stop()}}),t)}))),O.apply(this,arguments)}function j(t){return P.apply(this,arguments)}function P(){return P=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/rigs/".concat(n),e));case 2:case"end":return t.stop()}}),t)}))),P.apply(this,arguments)}function $(){return A.apply(this,arguments)}function A(){return A=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/rigs",n));case 2:case"end":return t.stop()}}),t)}))),A.apply(this,arguments)}function I(){return D.apply(this,arguments)}function D(){return D=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/programs",n));case 2:case"end":return t.stop()}}),t)}))),D.apply(this,arguments)}function T(t){return U.apply(this,arguments)}function U(){return U=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/assets/".concat(n),e));case 2:case"end":return t.stop()}}),t)}))),U.apply(this,arguments)}function q(){return C.apply(this,arguments)}function C(){return C=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/assets",n));case 2:case"end":return t.stop()}}),t)}))),C.apply(this,arguments)}function N(){return S.apply(this,arguments)}function S(){return S=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",i("/v2/assets/resolve",n));case 2:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}function E(){return J.apply(this,arguments)}function J(){return J=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/pads",n));case 2:case"end":return t.stop()}}),t)}))),J.apply(this,arguments)}function K(){return R.apply(this,arguments)}function R(){return R=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/frac_fleets",n));case 2:case"end":return t.stop()}}),t)}))),R.apply(this,arguments)}function F(t){return G.apply(this,arguments)}function G(){return G=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/drillout_units/".concat(n),e));case 2:case"end":return t.stop()}}),t)}))),G.apply(this,arguments)}function M(){return z.apply(this,arguments)}function z(){return z=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/drillout_units",n));case 2:case"end":return t.stop()}}),t)}))),z.apply(this,arguments)}function B(t,n,r){return H.apply(this,arguments)}function H(){return(H=n(r.mark((function t(n,e,a){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/data/".concat(n,"/").concat(e),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(t,n,r){return Q.apply(this,arguments)}function Q(){return Q=n(r.mark((function t(n,e,a){var c,u=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=u.length>3&&void 0!==u[3]?u[3]:{},t.abrupt("return",s("/v1/data/".concat(n,"/").concat(e),m(m({},c),{},{asset_id:a}),{appKey:c.appKey}));case 2:case"end":return t.stop()}}),t)}))),Q.apply(this,arguments)}function V(t,n){return W.apply(this,arguments)}function W(){return W=n(r.mark((function t(n,e){var a,c=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",s("/api/v1/data/".concat(n,"/").concat(e,"/"),a,{apiUrl:v.DATA_API}));case 2:case"end":return t.stop()}}),t)}))),W.apply(this,arguments)}function X(t,n){return Y.apply(this,arguments)}function Y(){return Y=n(r.mark((function t(n,e){var a,c=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",s("/api/v1/data/".concat(n,"/").concat(e,"/aggregate/"),a,{apiUrl:v.DATA_API}));case 2:case"end":return t.stop()}}),t)}))),Y.apply(this,arguments)}function Z(t,n,r,e){return tt.apply(this,arguments)}function tt(){return tt=n(r.mark((function t(n,e,a,c){var u,p=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=p.length>4&&void 0!==p[4]?p[4]:{},t.abrupt("return",f("/v1/data/".concat(n,"/").concat(e,"/").concat(a),c,u));case 2:case"end":return t.stop()}}),t)}))),tt.apply(this,arguments)}function nt(t,n,r,e,a){return rt.apply(this,arguments)}function rt(){return(rt=n(r.mark((function t(n,e,a,c,u){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",f("/api/v1/data/".concat(n,"/").concat(e,"/").concat(a),c,u,{apiUrl:v.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function et(t,n,r){return at.apply(this,arguments)}function at(){return(at=n(r.mark((function t(n,e,a){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/data/".concat(n,"/").concat(e),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ct(t,n,r){return ut.apply(this,arguments)}function ut(){return(ut=n(r.mark((function t(n,e,a){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/api/v1/data/".concat(n,"/").concat(e),a,{apiUrl:v.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pt(t){return st.apply(this,arguments)}function st(){return(st=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/competitor_analysis",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function it(){return ot.apply(this,arguments)}function ot(){return(ot=n(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/companies"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ft(t){return lt.apply(this,arguments)}function lt(){return(lt=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/picklists/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ht(){return vt.apply(this,arguments)}function vt(){return(vt=n(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/favorites"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function dt(t){return mt.apply(this,arguments)}function mt(){return(mt=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/companies/".concat(n,"/settings/company_goals")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var yt,wt,_t,bt,gt=(yt=n(r.mark((function t(n){var e,a,c,u;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={asset_id:+n},a={_id:"$file",name:{$first:"$file"},timestamp:{$first:"$timestamp"}},c={timestamp:-1},u={aggregate:JSON.stringify([{$match:e},{$group:a},{$sort:c}])},t.prev=4,t.next=7,L("corva","formation-evaluation.metadata",n,u);case 7:return t.abrupt("return",t.sent);case 10:return t.prev=10,t.t0=t.catch(4),console.error(t.t0),t.abrupt("return",[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])}))),function(t){return yt.apply(this,arguments)}),kt=(wt=n(r.mark((function t(n,e){var a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="{asset_id#eq#".concat(n,"}AND{file#eq#'").concat(e,"'}"),t.prev=1,t.next=4,L("corva","formation-evaluation.metadata",n,{query:a});case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(1),console.error(t.t0),t.abrupt("return",[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t,n){return wt.apply(this,arguments)}),xt=(_t=n(r.mark((function t(n,e,a){var c,u,p,s,i,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={asset_id:+n,"metadata.file":e},u=1e4*a,p={"data.md":1},s={data:"$data"},i={aggregate:JSON.stringify([{$match:c},{$sort:p},{$skip:u},{$limit:1e4},{$project:s}])},t.prev=6,t.next=9,L("corva","formation-evaluation.data",n,i);case 9:return o=t.sent,t.abrupt("return",o);case 13:return t.prev=13,t.t0=t.catch(6),console.error(t.t0),t.abrupt("return",[]);case 17:case"end":return t.stop()}}),t,null,[[6,13]])}))),function(t,n,r){return _t.apply(this,arguments)}),Ot=(bt=n(r.mark((function t(n){var c,u,p,s,i;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=n.assetId,u=n.fileName,p=n.recordsCount,s=Math.ceil(p/1e4),i=e(s).map((function(t){return xt(c,u,t)})),t.abrupt("return",Promise.all(i).then((function(t){return a(t)})));case 4:case"end":return t.stop()}}),t)}))),function(t){return bt.apply(this,arguments)}),jt=function(t){var n=t.assetId,r=t.segment,e=void 0===r?"drilling":r;return s("/v1/app_streams?asset_id=".concat(n,"&segment=").concat(e))};function Pt(t){switch(t){case"program":return I;case"rig":return $;case"well":return g;case"frac_fleet":return K;case"drillout_unit":return M;case"pad":return E;default:return q}}function $t(t){switch(t){case"rig":return j;case"well":return x;default:return T}}var At=function(t,n){return s("/v2/apps/".concat(t,"/app_media"),n)},It=function(t,n){return o("/v2/apps/".concat(t,"/app_media/").concat(n),null)},Dt=function(t,n){var r=n.file,e=n.mediaType;return l("/v2/apps/".concat(t,"/app_media"),{"app_media[media_type]":e,"app_media[file]":r})},Tt=function(t,n,r){return h("/v2/apps/".concat(t,"/app_media/").concat(n),{app_media:r})},Ut=function(t,n){return s("/v2/apps/".concat(t,"/app_help_contents"),n)},qt=function(t,n){return o("/v2/apps/".concat(t,"/app_help_contents/").concat(n),null)},Ct=function(t,n){var r=n.title,e=n.description,a=n.url;return l("/v2/apps/".concat(t,"/app_help_contents"),{"app_help_content[title]":r,"app_help_content[description]":e,"app_help_content[url]":a})},Nt=function(t,n,r){var e=r.title,a=r.description,c=r.url,u=r.position;return h("/v2/apps/".concat(t,"/app_help_contents/").concat(n),{app_help_content:{title:e,description:a,url:c,position:u}})};function St(t){return Et.apply(this,arguments)}function Et(){return Et=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",i("/v2/dashboard_app_annotations",m({app_annotation:n},e)));case 2:case"end":return t.stop()}}),t)}))),Et.apply(this,arguments)}function Jt(t,n){return Kt.apply(this,arguments)}function Kt(){return(Kt=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v2/dashboard_app_annotations/".concat(n),{app_annotation:e}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Rt(t){return Ft.apply(this,arguments)}function Ft(){return(Ft=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v2/dashboard_app_annotations/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Gt(t,n){return Mt.apply(this,arguments)}function Mt(){return Mt=n(r.mark((function t(n,e){var a,c=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",s("/v2/dashboard_app_annotations",m({app_id:n,asset_id:e},a)));case 2:case"end":return t.stop()}}),t)}))),Mt.apply(this,arguments)}function zt(t,n,r){return Bt.apply(this,arguments)}function Bt(){return(Bt=n(r.mark((function t(n,e,a){var c;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={dashboard_id:n},e&&(c.asset_id=e),a&&(c.parent_asset_id=a),t.abrupt("return",s("/v2/dashboard_app_annotations/last_annotations",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ht(t){return Lt.apply(this,arguments)}function Lt(){return(Lt=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v2/dashboard_app_annotations/".concat(n,"/close")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qt(t,n){return Vt.apply(this,arguments)}function Vt(){return(Vt=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v2/dashboard_app_annotations/".concat(n,"/comments/"),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Wt(t){return Xt.apply(this,arguments)}function Xt(){return Xt=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/dashboard_app_annotations/".concat(n,"/comments/"),e));case 2:case"end":return t.stop()}}),t)}))),Xt.apply(this,arguments)}function Yt(t){return"".concat(p,"/v1/file/download?file_name=").concat(t)}function Zt(t,n,r){return tn.apply(this,arguments)}function tn(){return(tn=n(r.mark((function t(n,e,a){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v1/activities/".concat(n,"/comments/").concat(e),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function nn(t,n){return rn.apply(this,arguments)}function rn(){return(rn=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/activities/".concat(n,"/comments"),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function en(t,n){return an.apply(this,arguments)}function an(){return(an=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(n,"/comments/").concat(e)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function cn(t){return un.apply(this,arguments)}function un(){return(un=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/activities/".concat(n,"/likes/toggle")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pn(t,n){return sn.apply(this,arguments)}function sn(){return(sn=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v1/activities/".concat(n),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function on(t){return fn.apply(this,arguments)}function fn(){return(fn=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ln(t,n,r){return hn.apply(this,arguments)}function hn(){return(hn=n(r.mark((function t(n,e,a){var c;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={type:n},e&&(c.search=e),a&&(c.company_id=a),t.abrupt("return",s("/v1/users/autocomplete",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function vn(t,n){return dn.apply(this,arguments)}function dn(){return(dn=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/file/sign?file_name=".concat(encodeURIComponent(n),"&contentType=").concat(e)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mn(t){return yn.apply(this,arguments)}function yn(){return yn=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:"attachment",t.abrupt("return",s("/v1/file/download_link?file_name=".concat(encodeURIComponent(n),"&response_content_disposition=").concat(e),{}));case 2:case"end":return t.stop()}}),t)}))),yn.apply(this,arguments)}var wn=function(t,n){return s("/v2/apps/".concat(t,"/packages"),n)};function _n(t){return bn.apply(this,arguments)}function bn(){return(bn=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/sessions/schemas",{email:n,with_provider:!0}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function gn(t){return kn.apply(this,arguments)}function kn(){return(kn=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/frac_fleets/wells",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function xn(t,n){return On.apply(this,arguments)}function On(){return(On=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/pads/".concat(n,"/app_wells"),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function jn(t){return Pn.apply(this,arguments)}function Pn(){return(Pn=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/tasks/".concat(n),{}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $n(){return An.apply(this,arguments)}function An(){return An=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",i("/v2/tasks",n));case 2:case"end":return t.stop()}}),t)}))),An.apply(this,arguments)}var In=function(t){return s("/v2/apps/".concat(t,"/app_settings_templates"),{})},Dn=function(t,n){return s("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{})},Tn=function(t,n,r){var e=r.name,a=r.settings;return h("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{app_settings_template:{name:e,settings:a}},{})},Un=function(t,n){var r=n.name,e=n.settings;return i("/v2/apps/".concat(t,"/app_settings_templates"),{app_settings_template:{name:r,settings:e}})},qn=function(t,n){return o("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{})},Cn=function(t,n,r){var e=c.stringify({user_id:r},{arrayFormat:"bracket"});return i("/v2/apps/".concat(t,"/app_settings_templates/").concat(n,"/share?").concat(e),{})},Nn=function(t){var n=t.page,r=t.perPage,e=void 0===r?1e3:r,a=t.sort,c=t.order,u=t.search,p=t.companyId,i=t.ids;return s("/v1/users",{page:n,per_page:e,sort:a,order:c,ids:i,search:""!==u?u:void 0,company_id:null!==p?p:void 0})};function Sn(t,n){return En.apply(this,arguments)}function En(){return(En=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/users/".concat(n,"/settings"),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Jn(t,n){return Kn.apply(this,arguments)}function Kn(){return(Kn=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/users/".concat(n,"/settings/").concat(e)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Rn(){return Fn.apply(this,arguments)}function Fn(){return(Fn=n(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/logout"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Gn(){return Mn.apply(this,arguments)}function Mn(){return Mn=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/ability_check/check_permission",n,{isImmutable:!1}));case 2:case"end":return t.stop()}}),t)}))),Mn.apply(this,arguments)}export{Ht as closeLastAnnotation,Rt as deleteAnnotation,qt as deleteAppHelpContent,It as deleteAppMedia,qn as deleteAppSettingsTemplate,B as deleteAppStorageRecords,on as deleteFeedItem,en as deleteFeedItemComment,Ot as getAllLASFileData,Wt as getAnnotationComments,Gt as getAnnotations,Ut as getAppHelpContent,At as getAppMedia,wn as getAppPackages,Dn as getAppSettingsTemplate,In as getAppSettingsTemplates,L as getAppStorage,T as getAsset,q as getAssets,it as getCompanies,dt as getCompanyGoals,pt as getCompetitorAnalysisData,y as getCurrentUser,zt as getDashboardLastAnnotations,V as getDataAppStorage,X as getDataAppStorageAggregate,F as getDrilloutUnit,M as getDrilloutUnits,ht as getFavorites,Yt as getFileDownloadLink,gn as getFracFleetWells,K as getFracFleets,xt as getLASFileDataByPage,gt as getLASFileList,kt as getLASMetadata,xn as getPadWells,E as getPads,Gn as getPermissionCheck,ft as getPicklist,I as getPrograms,N as getResolvedAssets,j as getRig,$ as getRigs,mn as getS3DownloadLink,vn as getS3SignedUrl,jt as getStreams,jn as getTask,_n as getUserAuthSchemas,ln as getUserAutocomplete,Jn as getUserSetting,Nn as getUsers,x as getWell,_ as getWellViewBha,g as getWells,Rn as logout,$t as mapAssetByIdGetRequest,Pt as mapAssetGetRequest,Jt as patchAnnotation,Tn as patchAppSettingsTemplate,pn as patchFeedItem,Zt as patchFeedItemComment,St as postAnnotation,Qt as postAnnotationComment,Un as postAppSettingsTemplate,et as postAppStorage,ct as postDataAppStorage,nn as postFeedItemComment,$n as postTask,Z as putAppStorage,nt as putDataAppStorage,Sn as setCurrentUserSettings,Cn as shareAppSettingsTemplate,cn as toggleFeedItemLike,Nt as updateAppHelpContent,Tt as updateAppMedia,Ct as uploadAppHelpContent,Dt as uploadAppMedia};
1
+ import t from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import{range as e,flattenDepth as a}from"lodash";import*as c from"query-string";import{APIException as u,baseUrl as p,get as s,post as o,del as i,put as f,sendFormData as l,patch as h}from"../api/apiCore.js";import{CORVA_API_URLS as v}from"../constants.js";function d(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function m(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?d(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):d(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function y(){return w.apply(this,arguments)}function w(){return(w=n(r.mark((function t(){var n,e;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(p,"/v1/users/current"),{credentials:"include"});case 2:return n=t.sent,t.next=5,n.json();case 5:if(e=t.sent,null!=n&&n.ok){t.next=8;break}throw new u(n,e);case 8:return t.abrupt("return",e);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _(){return b.apply(this,arguments)}function b(){return b=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/integration/wellview/bha",n));case 2:case"end":return t.stop()}}),t)}))),b.apply(this,arguments)}function g(t){return k.apply(this,arguments)}function k(){return(k=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/wells",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return O.apply(this,arguments)}function O(){return O=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/wells/".concat(n),e));case 2:case"end":return t.stop()}}),t)}))),O.apply(this,arguments)}function j(t){return P.apply(this,arguments)}function P(){return P=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/rigs/".concat(n),e));case 2:case"end":return t.stop()}}),t)}))),P.apply(this,arguments)}function $(){return A.apply(this,arguments)}function A(){return A=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/rigs",n));case 2:case"end":return t.stop()}}),t)}))),A.apply(this,arguments)}function I(){return D.apply(this,arguments)}function D(){return D=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/programs",n));case 2:case"end":return t.stop()}}),t)}))),D.apply(this,arguments)}function T(t){return U.apply(this,arguments)}function U(){return U=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/assets/".concat(n),e));case 2:case"end":return t.stop()}}),t)}))),U.apply(this,arguments)}function q(){return C.apply(this,arguments)}function C(){return C=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/assets",n));case 2:case"end":return t.stop()}}),t)}))),C.apply(this,arguments)}function N(){return S.apply(this,arguments)}function S(){return S=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",o("/v2/assets/resolve",n));case 2:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}function E(){return J.apply(this,arguments)}function J(){return J=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/pads",n));case 2:case"end":return t.stop()}}),t)}))),J.apply(this,arguments)}function K(){return R.apply(this,arguments)}function R(){return R=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/frac_fleets",n));case 2:case"end":return t.stop()}}),t)}))),R.apply(this,arguments)}function F(t){return G.apply(this,arguments)}function G(){return G=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/drillout_units/".concat(n),e));case 2:case"end":return t.stop()}}),t)}))),G.apply(this,arguments)}function M(){return z.apply(this,arguments)}function z(){return z=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/drillout_units",n));case 2:case"end":return t.stop()}}),t)}))),z.apply(this,arguments)}function B(t,n,r){return H.apply(this,arguments)}function H(){return(H=n(r.mark((function t(n,e,a){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/data/".concat(n,"/").concat(e),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(t,n,r){return Q.apply(this,arguments)}function Q(){return(Q=n(r.mark((function t(n,e,a){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/data/".concat(n,"/").concat(e,"/").concat(a)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function V(t,n,r){return W.apply(this,arguments)}function W(){return W=n(r.mark((function t(n,e,a){var c,u=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=u.length>3&&void 0!==u[3]?u[3]:{},t.abrupt("return",s("/v1/data/".concat(n,"/").concat(e),m(m({},c),{},{asset_id:a}),{appKey:c.appKey}));case 2:case"end":return t.stop()}}),t)}))),W.apply(this,arguments)}function X(t,n){return Y.apply(this,arguments)}function Y(){return Y=n(r.mark((function t(n,e){var a,c=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",s("/api/v1/data/".concat(n,"/").concat(e,"/"),a,{apiUrl:v.DATA_API}));case 2:case"end":return t.stop()}}),t)}))),Y.apply(this,arguments)}function Z(t,n){return tt.apply(this,arguments)}function tt(){return tt=n(r.mark((function t(n,e){var a,c=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",s("/api/v1/data/".concat(n,"/").concat(e,"/aggregate/"),a,{apiUrl:v.DATA_API}));case 2:case"end":return t.stop()}}),t)}))),tt.apply(this,arguments)}function nt(t,n,r,e){return rt.apply(this,arguments)}function rt(){return rt=n(r.mark((function t(n,e,a,c){var u,p=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=p.length>4&&void 0!==p[4]?p[4]:{},t.abrupt("return",f("/v1/data/".concat(n,"/").concat(e,"/").concat(a),c,u));case 2:case"end":return t.stop()}}),t)}))),rt.apply(this,arguments)}function et(t,n,r,e,a){return at.apply(this,arguments)}function at(){return(at=n(r.mark((function t(n,e,a,c,u){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",f("/api/v1/data/".concat(n,"/").concat(e,"/").concat(a),c,u,{apiUrl:v.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ct(t,n,r){return ut.apply(this,arguments)}function ut(){return(ut=n(r.mark((function t(n,e,a){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/data/".concat(n,"/").concat(e),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pt(t,n,r){return st.apply(this,arguments)}function st(){return(st=n(r.mark((function t(n,e,a){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/api/v1/data/".concat(n,"/").concat(e),a,{apiUrl:v.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ot(t){return it.apply(this,arguments)}function it(){return(it=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/competitor_analysis",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ft(){return lt.apply(this,arguments)}function lt(){return(lt=n(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/companies"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ht(t){return vt.apply(this,arguments)}function vt(){return(vt=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/picklists/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function dt(){return mt.apply(this,arguments)}function mt(){return(mt=n(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/favorites"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yt(t){return wt.apply(this,arguments)}function wt(){return(wt=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/companies/".concat(n,"/settings/company_goals")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var _t,bt,gt,kt,xt=(_t=n(r.mark((function t(n){var e,a,c,u;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={asset_id:+n},a={_id:"$file",name:{$first:"$file"},timestamp:{$first:"$timestamp"}},c={timestamp:-1},u={aggregate:JSON.stringify([{$match:e},{$group:a},{$sort:c}])},t.prev=4,t.next=7,V("corva","formation-evaluation.metadata",n,u);case 7:return t.abrupt("return",t.sent);case 10:return t.prev=10,t.t0=t.catch(4),console.error(t.t0),t.abrupt("return",[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])}))),function(t){return _t.apply(this,arguments)}),Ot=(bt=n(r.mark((function t(n,e){var a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="{asset_id#eq#".concat(n,"}AND{file#eq#'").concat(e,"'}"),t.prev=1,t.next=4,V("corva","formation-evaluation.metadata",n,{query:a});case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(1),console.error(t.t0),t.abrupt("return",[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t,n){return bt.apply(this,arguments)}),jt=(gt=n(r.mark((function t(n,e,a){var c,u,p,s,o,i;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={asset_id:+n,"metadata.file":e},u=1e4*a,p={"data.md":1},s={data:"$data"},o={aggregate:JSON.stringify([{$match:c},{$sort:p},{$skip:u},{$limit:1e4},{$project:s}])},t.prev=6,t.next=9,V("corva","formation-evaluation.data",n,o);case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t0=t.catch(6),console.error(t.t0),t.abrupt("return",[]);case 17:case"end":return t.stop()}}),t,null,[[6,13]])}))),function(t,n,r){return gt.apply(this,arguments)}),Pt=(kt=n(r.mark((function t(n){var c,u,p,s,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=n.assetId,u=n.fileName,p=n.recordsCount,s=Math.ceil(p/1e4),o=e(s).map((function(t){return jt(c,u,t)})),t.abrupt("return",Promise.all(o).then((function(t){return a(t)})));case 4:case"end":return t.stop()}}),t)}))),function(t){return kt.apply(this,arguments)}),$t=function(t){var n=t.assetId,r=t.segment,e=void 0===r?"drilling":r;return s("/v1/app_streams?asset_id=".concat(n,"&segment=").concat(e))};function At(t){switch(t){case"program":return I;case"rig":return $;case"well":return g;case"frac_fleet":return K;case"drillout_unit":return M;case"pad":return E;default:return q}}function It(t){switch(t){case"rig":return j;case"well":return x;default:return T}}var Dt=function(t,n){return s("/v2/apps/".concat(t,"/app_media"),n)},Tt=function(t,n){return i("/v2/apps/".concat(t,"/app_media/").concat(n),null)},Ut=function(t,n){var r=n.file,e=n.mediaType;return l("/v2/apps/".concat(t,"/app_media"),{"app_media[media_type]":e,"app_media[file]":r})},qt=function(t,n,r){return h("/v2/apps/".concat(t,"/app_media/").concat(n),{app_media:r})},Ct=function(t,n){return s("/v2/apps/".concat(t,"/app_help_contents"),n)},Nt=function(t,n){return i("/v2/apps/".concat(t,"/app_help_contents/").concat(n),null)},St=function(t,n){var r=n.title,e=n.description,a=n.url;return l("/v2/apps/".concat(t,"/app_help_contents"),{"app_help_content[title]":r,"app_help_content[description]":e,"app_help_content[url]":a})},Et=function(t,n,r){var e=r.title,a=r.description,c=r.url,u=r.position;return h("/v2/apps/".concat(t,"/app_help_contents/").concat(n),{app_help_content:{title:e,description:a,url:c,position:u}})};function Jt(t){return Kt.apply(this,arguments)}function Kt(){return Kt=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",o("/v2/dashboard_app_annotations",m({app_annotation:n},e)));case 2:case"end":return t.stop()}}),t)}))),Kt.apply(this,arguments)}function Rt(t,n){return Ft.apply(this,arguments)}function Ft(){return(Ft=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v2/dashboard_app_annotations/".concat(n),{app_annotation:e}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Gt(t){return Mt.apply(this,arguments)}function Mt(){return(Mt=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v2/dashboard_app_annotations/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function zt(t,n){return Bt.apply(this,arguments)}function Bt(){return Bt=n(r.mark((function t(n,e){var a,c=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",s("/v2/dashboard_app_annotations",m({app_id:n,asset_id:e},a)));case 2:case"end":return t.stop()}}),t)}))),Bt.apply(this,arguments)}function Ht(t,n,r){return Lt.apply(this,arguments)}function Lt(){return(Lt=n(r.mark((function t(n,e,a){var c;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={dashboard_id:n},e&&(c.asset_id=e),a&&(c.parent_asset_id=a),t.abrupt("return",s("/v2/dashboard_app_annotations/last_annotations",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qt(t){return Vt.apply(this,arguments)}function Vt(){return(Vt=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v2/dashboard_app_annotations/".concat(n,"/close")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Wt(t,n){return Xt.apply(this,arguments)}function Xt(){return(Xt=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v2/dashboard_app_annotations/".concat(n,"/comments/"),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Yt(t){return Zt.apply(this,arguments)}function Zt(){return Zt=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/dashboard_app_annotations/".concat(n,"/comments/"),e));case 2:case"end":return t.stop()}}),t)}))),Zt.apply(this,arguments)}function tn(t){return"".concat(p,"/v1/file/download?file_name=").concat(t)}function nn(t,n,r){return rn.apply(this,arguments)}function rn(){return(rn=n(r.mark((function t(n,e,a){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v1/activities/".concat(n,"/comments/").concat(e),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function en(t,n){return an.apply(this,arguments)}function an(){return(an=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(n,"/comments"),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function cn(t,n){return un.apply(this,arguments)}function un(){return(un=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/activities/".concat(n,"/comments/").concat(e)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pn(t){return sn.apply(this,arguments)}function sn(){return(sn=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(n,"/likes/toggle")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function on(t,n){return fn.apply(this,arguments)}function fn(){return(fn=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",h("/v1/activities/".concat(n),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ln(t){return hn.apply(this,arguments)}function hn(){return(hn=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/v1/activities/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function vn(t,n,r){return dn.apply(this,arguments)}function dn(){return(dn=n(r.mark((function t(n,e,a){var c;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={type:n},e&&(c.search=e),a&&(c.company_id=a),t.abrupt("return",s("/v1/users/autocomplete",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mn(t,n){return yn.apply(this,arguments)}function yn(){return(yn=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/file/sign?file_name=".concat(encodeURIComponent(n),"&contentType=").concat(e)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wn(t){return _n.apply(this,arguments)}function _n(){return _n=n(r.mark((function t(n){var e,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:"attachment",t.abrupt("return",s("/v1/file/download_link?file_name=".concat(encodeURIComponent(n),"&response_content_disposition=").concat(e),{}));case 2:case"end":return t.stop()}}),t)}))),_n.apply(this,arguments)}var bn=function(t,n){return s("/v2/apps/".concat(t,"/packages"),n)};function gn(t){return kn.apply(this,arguments)}function kn(){return(kn=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/sessions/schemas",{email:n,with_provider:!0}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function xn(t){return On.apply(this,arguments)}function On(){return(On=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/frac_fleets/wells",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function jn(t,n){return Pn.apply(this,arguments)}function Pn(){return(Pn=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/pads/".concat(n,"/app_wells"),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $n(t){return An.apply(this,arguments)}function An(){return(An=n(r.mark((function t(n){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/tasks/".concat(n),{}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function In(){return Dn.apply(this,arguments)}function Dn(){return Dn=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",o("/v2/tasks",n));case 2:case"end":return t.stop()}}),t)}))),Dn.apply(this,arguments)}var Tn=function(t){return s("/v2/apps/".concat(t,"/app_settings_templates"),{})},Un=function(t,n){return s("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{})},qn=function(t,n,r){var e=r.name,a=r.settings;return h("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{app_settings_template:{name:e,settings:a}},{})},Cn=function(t,n){var r=n.name,e=n.settings;return o("/v2/apps/".concat(t,"/app_settings_templates"),{app_settings_template:{name:r,settings:e}})},Nn=function(t,n){return i("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{})},Sn=function(t,n,r){var e=c.stringify({user_id:r},{arrayFormat:"bracket"});return o("/v2/apps/".concat(t,"/app_settings_templates/").concat(n,"/share?").concat(e),{})},En=function(t){var n=t.page,r=t.perPage,e=void 0===r?1e3:r,a=t.sort,c=t.order,u=t.search,p=t.companyId,o=t.ids;return s("/v1/users",{page:n,per_page:e,sort:a,order:c,ids:o,search:""!==u?u:void 0,company_id:null!==p?p:void 0})};function Jn(t,n){return Kn.apply(this,arguments)}function Kn(){return(Kn=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/users/".concat(n,"/settings"),e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Rn(t,n){return Fn.apply(this,arguments)}function Fn(){return(Fn=n(r.mark((function t(n,e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/users/".concat(n,"/settings/").concat(e)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Gn(){return Mn.apply(this,arguments)}function Mn(){return(Mn=n(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/logout"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function zn(){return Bn.apply(this,arguments)}function Bn(){return Bn=n(r.mark((function t(){var n,e=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:{},t.abrupt("return",s("/v2/ability_check/check_permission",n,{isImmutable:!1}));case 2:case"end":return t.stop()}}),t)}))),Bn.apply(this,arguments)}export{Qt as closeLastAnnotation,Gt as deleteAnnotation,Nt as deleteAppHelpContent,Tt as deleteAppMedia,Nn as deleteAppSettingsTemplate,L as deleteAppStorage,B as deleteAppStorageRecords,ln as deleteFeedItem,cn as deleteFeedItemComment,Pt as getAllLASFileData,Yt as getAnnotationComments,zt as getAnnotations,Ct as getAppHelpContent,Dt as getAppMedia,bn as getAppPackages,Un as getAppSettingsTemplate,Tn as getAppSettingsTemplates,V as getAppStorage,T as getAsset,q as getAssets,ft as getCompanies,yt as getCompanyGoals,ot as getCompetitorAnalysisData,y as getCurrentUser,Ht as getDashboardLastAnnotations,X as getDataAppStorage,Z as getDataAppStorageAggregate,F as getDrilloutUnit,M as getDrilloutUnits,dt as getFavorites,tn as getFileDownloadLink,xn as getFracFleetWells,K as getFracFleets,jt as getLASFileDataByPage,xt as getLASFileList,Ot as getLASMetadata,jn as getPadWells,E as getPads,zn as getPermissionCheck,ht as getPicklist,I as getPrograms,N as getResolvedAssets,j as getRig,$ as getRigs,wn as getS3DownloadLink,mn as getS3SignedUrl,$t as getStreams,$n as getTask,gn as getUserAuthSchemas,vn as getUserAutocomplete,Rn as getUserSetting,En as getUsers,x as getWell,_ as getWellViewBha,g as getWells,Gn as logout,It as mapAssetByIdGetRequest,At as mapAssetGetRequest,Rt as patchAnnotation,qn as patchAppSettingsTemplate,on as patchFeedItem,nn as patchFeedItemComment,Jt as postAnnotation,Wt as postAnnotationComment,Cn as postAppSettingsTemplate,ct as postAppStorage,pt as postDataAppStorage,en as postFeedItemComment,In as postTask,nt as putAppStorage,et as putDataAppStorage,Jn as setCurrentUserSettings,Sn as shareAppSettingsTemplate,pn as toggleFeedItemLike,Et as updateAppHelpContent,qt as updateAppMedia,St as uploadAppHelpContent,Ut as uploadAppMedia};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as t}from"react";import{func as o,node as r,shape as i,number as n}from"prop-types";import{makeStyles as s,Popover as p,Grid as m,Typography as a}from"@material-ui/core";import l from"classnames";import"@babel/runtime/helpers/defineProperty";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as d,jsx as c}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../LoadingIndicator/LoadingIndicator.js";import"../../constants/segment.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../GridLockButton/index.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"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/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 j from"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.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"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.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"../Tooltip/MuiTooltipDcWrapper.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"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"./Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import C from"../Icons/SendIcon.js";import u from"./components/Content.js";var A=s((function(e){return{paper:{width:368,padding:16},inputMain:{marginBottom:0,fontSize:"11px",color:e.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:e.palette.primary.main},actions:{height:36},sendRow:{display:"flex"},sendIcon:{"&.Mui-disabled":{cursor:"not-allowed!important"}}}}));function g(o){var r=o.anchorEl,i=o.anchorOrigin,n=o.onClose,s=o.onSave,g=o.startAdornment,D=o.endAdornment,v=o.customContent,b=o.userCompanyId,h=A(),x=t(),P=e(x,2),f=P[0],S=P[1];return d(p,{open:!0,anchorEl:r,anchorOrigin:i,onClose:n,classes:{paper:h.paper},children:[c(u,{userCompanyId:b,startAdornment:g,endAdornment:D,customContent:v,setComment:S,onSave:function(){return s(f)},smallerView:!0,comment:f}),d(m,{container:!0,direction:"row",justify:"space-between",alignItems:"center",className:h.actions,children:[c(m,{item:!0,children:c(a,{variant:"caption",className:l(h.inputMain,h.cancelText,h.highlightedLabel),component:"div",gutterBottom:!0,onClick:n,children:"Cancel"})}),d(m,{item:!0,direction:"row",alignItems:"center",className:h.sendRow,children:[d(a,{variant:"caption",className:l(h.inputMain,h.inputHelper),component:"div",gutterBottom:!0,children:["Press ",c(a,{variant:"caption",color:"primary",className:l(h.inputMain,h.highlightedLabel),children:"Enter"})," to send"]}),c(j,{onClick:function(){return s(f)},className:h.sendIcon,disabled:!f||!f.body&&!f.attachment,children:c(C,{})})]})]})]})}g.propTypes={onClose:o,onSave:o.isRequired,anchorEl:r.isRequired,anchorOrigin:i,startAdornment:r,endAdornment:r,customContent:r,userCompanyId:n.isRequired},g.defaultProps={anchorOrigin:{horizontal:"right",vertical:"bottom"},onClose:function(){},startAdornment:null,endAdornment:null,customContent:null};export{g as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/objectWithoutProperties";import{useState as o}from"react";import{func as i,node as n,shape as s,number as p}from"prop-types";import{makeStyles as m,Popover as a,Grid as l,Typography as d}from"@material-ui/core";import c from"classnames";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as j,jsx as C}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../LoadingIndicator/LoadingIndicator.js";import"../../constants/segment.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Modal/CorvaModal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../GridLockButton/index.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"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/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 u from"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.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"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.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"../Tooltip/MuiTooltipDcWrapper.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"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"./Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import A from"../Icons/SendIcon.js";import g from"./components/Content.js";var D=["anchorEl","anchorOrigin","onClose","onSave","startAdornment","endAdornment","customContent","userCompanyId"];function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function b(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?v(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var f=m((function(e){return{paper:{width:368,padding:16},inputMain:{marginBottom:0,fontSize:"11px",color:e.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:e.palette.primary.main},actions:{height:36},sendRow:{display:"flex"},sendIcon:{"&.Mui-disabled":{cursor:"not-allowed!important"}}}}));function h(e){var i=e.anchorEl,n=e.anchorOrigin,s=e.onClose,p=e.onSave,m=e.startAdornment,v=e.endAdornment,h=e.customContent,P=e.userCompanyId,x=r(e,D),S=f(),y=o(),I=t(y,2),E=I[0],T=I[1];return j(a,b(b({open:!0,anchorEl:i,anchorOrigin:n,onClose:s,classes:{paper:S.paper}},x),{},{children:[C(g,{userCompanyId:P,startAdornment:m,endAdornment:v,customContent:h,setComment:T,onSave:function(){return p(E)},smallerView:!0,comment:E}),j(l,{container:!0,direction:"row",justify:"space-between",alignItems:"center",className:S.actions,children:[C(l,{item:!0,children:C(d,{variant:"caption",className:c(S.inputMain,S.cancelText,S.highlightedLabel),component:"div",gutterBottom:!0,onClick:s,children:"Cancel"})}),j(l,{item:!0,direction:"row",alignItems:"center",className:S.sendRow,children:[j(d,{variant:"caption",className:c(S.inputMain,S.inputHelper),component:"div",gutterBottom:!0,children:["Press ",C(d,{variant:"caption",color:"primary",className:c(S.inputMain,S.highlightedLabel),children:"Enter"})," to send"]}),C(u,{onClick:function(){return p(E)},className:S.sendIcon,disabled:!E||!E.body&&!E.attachment,children:C(A,{})})]})]})]}))}h.propTypes={onClose:i,onSave:i.isRequired,anchorEl:n.isRequired,anchorOrigin:s,startAdornment:n,endAdornment:n,customContent:n,userCompanyId:p.isRequired},h.defaultProps={anchorOrigin:{horizontal:"right",vertical:"bottom"},onClose:function(){},startAdornment:null,endAdornment:null,customContent:null};export{h as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/helpers/objectWithoutProperties";import{useMemo as o,useState as i,useEffect as p}from"react";import a from"prop-types";import l from"classnames";import{get as c,noop as u,identity as s}from"lodash";import{makeStyles as f}from"@material-ui/core";import m from"@material-ui/lab/Autocomplete";import b from"@material-ui/icons/Close";import{Tooltip as h}from"../Tooltip/Tooltip.js";import{jsx as d}from"react/jsx-runtime";var g=["isCreatable","options","value","getOptionLabel","onInputChange","onChange","renderOption","classes"];function O(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}var C=function(e){return c(c(e.split('Create "'),"1","").split('"'),"0","")},x=f((function(e){return{root:{width:200},paper:{maxHeight:400,boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%)"},createLabel:{fontSize:"16px",lineHeight:"22.5px",color:e.palette.primary.main},openIcon:{marginLeft:5},option:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%"},closeIcon:{width:16,height:16}}})),y=function(a){var c=a.isCreatable,u=a.options,s=a.value,f=a.getOptionLabel,O=a.onInputChange,y=a.onChange,j=a.renderOption,w=a.classes,I=n(a,g),P=x(),L=o((function(){return null==u?void 0:u.map((function(e){return c?f(e):e}))}),[u]),S=o((function(){return c?f(s)||"":s}),[s]),T=i(L),D=t(T,2),A=D[0],q=D[1],E=i(null),H=t(E,2),N=H[0],R=H[1];p((function(){q(L)}),[L]);return d(m,v({value:S,onChange:c?function(e,t){return function(e){if(null!=e&&e.includes('Create "')&&f(e)===f(N)){R(null);var t=C(N);q([].concat(r(L),[t])),y(t,!0)}else y(e,!1)}(t)}:y,onInputChange:c?function(e,t){return function(e){if(""===e)R(null),q(L);else if(L.find((function(r){return r===e}))){var t=L.filter((function(e){return!e.includes('Create "')}));q(t)}else{var n=function(e){return'Create "'.concat(e,'"')}(e);R(n),q([].concat(r(L),[n]))}}(t)}:O,options:A,getOptionLabel:c?function(e){return e}:f,renderOption:c?function(r){var t=C(r);return d(h,{title:r,children:d("div",{className:l(e({},P.createLabel,t&&r!==t),P.option,null==w?void 0:w.optionLabelClass),children:r})})}:j,classes:v({root:l(P.root,null==w?void 0:w.root),paper:l(P.paper,null==w?void 0:w.paper),popupIndicator:P.openIcon},w),closeIcon:(S||N)&&d(b,{className:P.closeIcon})},I))};y.propTypes={value:a.oneOfType([a.string,a.shape({})]).isRequired,options:a.shape([]).isRequired,isCreatable:a.bool,getOptionLabel:a.func,onChange:a.func,onInputChange:a.func,renderOption:a.func,classes:a.shape()},y.defaultProps={isCreatable:!1,onChange:u,getOptionLabel:s,onInputChange:u,renderOption:s,classes:{}};export{y as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/helpers/objectWithoutProperties";import{useMemo as o,useState as i,useEffect as p}from"react";import a from"prop-types";import l from"classnames";import{noop as c,identity as u,get as s}from"lodash";import{makeStyles as f}from"@material-ui/core";import m from"@material-ui/lab/Autocomplete";import b from"@material-ui/icons/Close";import{Tooltip as h}from"../Tooltip/Tooltip.js";import{jsx as d}from"react/jsx-runtime";var g=["isCreatable","options","value","getOptionLabel","onInputChange","onChange","renderOption","classes"];function O(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}var C=function(e){return s(s(e.split('Create "'),"1","").split('"'),"0","")},x=f((function(e){return{root:{width:200},paper:{maxHeight:400,boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%)"},createLabel:{fontSize:"16px",lineHeight:"22.5px",color:e.palette.primary.main},openIcon:{marginLeft:5},option:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%"},closeIcon:{width:16,height:16}}})),y=function(a){var c=a.isCreatable,u=a.options,s=a.value,f=a.getOptionLabel,O=a.onInputChange,y=a.onChange,j=a.renderOption,w=a.classes,I=n(a,g),P=x(),L=o((function(){return null==u?void 0:u.map((function(e){return c?f(e):e}))}),[u]),S=o((function(){return c?f(s)||"":s}),[s]),T=i(L),D=t(T,2),A=D[0],q=D[1],E=i(null),H=t(E,2),N=H[0],R=H[1];p((function(){q(L)}),[L]);return d(m,v({value:S,onChange:c?function(e,t){return function(e){if(null!=e&&e.includes('Create "')&&f(e)===f(N)){R(null);var t=C(N);q([].concat(r(L),[t])),y(t,!0)}else y(e,!1)}(t)}:y,onInputChange:c?function(e,t){return function(e){if(""===e)R(null),q(L);else if(L.find((function(r){return r===e}))){var t=L.filter((function(e){return!e.includes('Create "')}));q(t)}else{var n=function(e){return'Create "'.concat(e,'"')}(e);R(n),q([].concat(r(L),[n]))}}(t)}:O,options:A,getOptionLabel:c?function(e){return e}:f,renderOption:c?function(r){var t=C(r);return d(h,{title:r,children:d("div",{className:l(e({},P.createLabel,t&&r!==t),P.option,null==w?void 0:w.optionLabelClass),children:r})})}:j,classes:v({root:l(P.root,null==w?void 0:w.root),paper:l(P.paper,null==w?void 0:w.paper),popupIndicator:P.openIcon},w),closeIcon:(S||N)&&d(b,{className:P.closeIcon})},I))};y.propTypes={value:a.oneOfType([a.string,a.shape({})]).isRequired,options:a.shape([]).isRequired,isCreatable:a.bool,getOptionLabel:a.func,onChange:a.func,onInputChange:a.func,renderOption:a.func,classes:a.shape()},y.defaultProps={isCreatable:!1,onChange:c,getOptionLabel:u,onInputChange:c,renderOption:u,classes:{}};export{y as default};
@@ -1 +1 @@
1
- import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var n={container:"DevCenterAppContainer_container__6zeRh",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ"};e(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}");export{n as default};
1
+ import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var t={container:"DevCenterAppContainer_container__6zeRh",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ"};e(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.c-dashboard-report__app--light-theme ::-webkit-scrollbar-thumb,.dc-app-container__light-theme ::-webkit-scrollbar-thumb{background-color:hsla(0,0%,50%,.6)!important}.c-dashboard-report__app--light-theme,.dc-app-container__light-theme{scrollbar-color:hsla(0,0%,50%,.6) transparent!important}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}");export{t as default};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/objectWithoutProperties";import{useEffect as o}from"react";import r from"prop-types";import{makeStyles as i}from"@material-ui/core";import n from"classnames";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as s}from"react/jsx-runtime";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../../constants/segment.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"@babel/runtime/helpers/slicedToArray";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import"../AppsDataProvider/AppsDataProvider.js";import p from"../DevCenterAppContainer/DevCenterAppContainer.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"./DevCenterIsolatedApp.js";import"./AppsGridDragHandle.js";import m from"../AppContext.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../Typography.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"lodash";import"slate";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../RangeSlider/RangeSlider.js";import"../../GridLockButton/index.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"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/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"../../IconButton/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../clients/jsonApi/index.js";import"../../../constants/goals.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../MenuItem/index.js";import"../../PadModeSelect/PadModeSelect.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"../../Tooltip/MuiTooltipDcWrapper.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"../../FilesLoader/Icons/FileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../HelpCenter/HelpCenterIcon.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import a from"../../../hocs/withMUIProvidersHOC.js";import{THEMES as l}from"../../../constants/theme.js";import{LOCAL_STORAGE_APP_THEME_KEY as d}from"../../../CLI/hocs/constants.js";import{setThemeVariables as j}from"../../../utils/themeVariables.js";import{isPDFReportView as c}from"../../../CLI/hocs/utils.js";import{PermissionsContext as C}from"../../../permissions/PermissionsContext.js";import{updateUserUnits as u}from"../../../utils/index.js";import"../../../config/initGlobalDependencies.js";import"../../../styles/globalStyles.js";import{useXProps as A}from"./effects/useXProps.js";import{ISOLATED_PAGE_APP_CONTAINER_ID as g}from"./constants.js";import{replaceUndefinedValuesWithNull as f}from"./utils/replaceUndefinedValuesWithNull.js";import"./DevCenterAppZoidComponent.js";var b=["appContextValue","permissionsContextValue","globalNotificationToastsAPI","userUnits","onSettingChange","onSettingsChange"];function P(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function S(e){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?P(Object(r),!0).forEach((function(o){t(e,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var D=a(p),x=i((function(){return{"@global":{body:{backgroundColor:"transparent",overflow:"hidden"}}}}));function h(t){var r,i=t.CLIAppComponent,p=t.CLIAppSettings,a=t.containerReportClassName;x();var P=A(),h=P.appContextValue,I=P.permissionsContextValue,v=P.globalNotificationToastsAPI,y=P.userUnits,T=P.onSettingChange,E=P.onSettingsChange,L=e(P,b),O=L.location.pathname.startsWith("/reports/")||c,B=null!==(r=localStorage.getItem(d))&&void 0!==r?r:l.DARK,V=!O&&B===l.DARK;return o((function(){j(V)}),[V]),o((function(){window[Symbol.for("notificationToasts")]=v}),[v]),o((function(){u({userUnits:y})}),[]),s(C.Provider,{value:I,children:s(m.Provider,{value:h,children:s("div",{id:g,className:n(O&&a),children:s(D,S(S({},L),{},{theme:V?l.DARK:l.LIGHT,onSettingsChange:function(t){return E(f(t))},onSettingChange:function(t,e){return T(t,f(e))},CLIAppComponent:i,CLIAppSettings:p}))})})})}h.propTypes={CLIAppComponent:r.node,CLIAppSettings:r.node,containerReportClassName:r.string},h.defaultProps={CLIAppComponent:null,CLIAppSettings:null,containerReportClassName:null};export{h as DevCenterIsolatedAppPage};
1
+ import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/objectWithoutProperties";import{useEffect as o}from"react";import r from"prop-types";import{makeStyles as i}from"@material-ui/core";import s from"classnames";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as n}from"react/jsx-runtime";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../../constants/segment.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"@babel/runtime/helpers/slicedToArray";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import"../AppsDataProvider/AppsDataProvider.js";import p from"../DevCenterAppContainer/DevCenterAppContainer.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"./DevCenterIsolatedApp.js";import"./AppsGridDragHandle.js";import m from"../AppContext.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../Typography.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"lodash";import"slate";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../RangeSlider/RangeSlider.js";import"../../GridLockButton/index.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"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/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"../../IconButton/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../clients/jsonApi/index.js";import"../../../constants/goals.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../MenuItem/index.js";import"../../PadModeSelect/PadModeSelect.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"../../Tooltip/MuiTooltipDcWrapper.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"../../FilesLoader/Icons/FileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../HelpCenter/HelpCenterIcon.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import a from"../../../hocs/withMUIProvidersHOC.js";import{THEMES as l}from"../../../constants/theme.js";import{LOCAL_STORAGE_APP_THEME_KEY as d}from"../../../CLI/hocs/constants.js";import{setThemeVariables as j}from"../../../utils/themeVariables.js";import{isPDFReportView as c}from"../../../CLI/hocs/utils.js";import{PermissionsContext as C}from"../../../permissions/PermissionsContext.js";import{updateUserUnits as u}from"../../../utils/index.js";import"../../../config/initGlobalDependencies.js";import"../../../styles/index.global.css.js";import"../../../styles/reactVirtualized.global.css.js";import"../../../styles/emojiMart.global.css.js";import"../../../styles/mapbox.global.css.js";import"../../../styles/lightbox.global.css.js";import"../../../styles/generatedThemesVariables.global.css.js";import"../../../styles/customScrollbars.global.css.js";import{useXProps as g}from"./effects/useXProps.js";import{ISOLATED_PAGE_APP_CONTAINER_ID as A}from"./constants.js";import{replaceUndefinedValuesWithNull as b}from"./utils/replaceUndefinedValuesWithNull.js";import"./DevCenterAppZoidComponent.js";var f=["appContextValue","permissionsContextValue","globalNotificationToastsAPI","userUnits","onSettingChange","onSettingsChange"];function P(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function S(e){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?P(Object(r),!0).forEach((function(o){t(e,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=a(p),D=i((function(){return{"@global":{body:{backgroundColor:"transparent",overflow:"hidden"}}}}));function h(t){var r,i=t.CLIAppComponent,p=t.CLIAppSettings,a=t.containerReportClassName;D();var P=g(),h=P.appContextValue,I=P.permissionsContextValue,v=P.globalNotificationToastsAPI,y=P.userUnits,T=P.onSettingChange,E=P.onSettingsChange,L=e(P,f),O=L.location.pathname.startsWith("/reports/")||c,B=null!==(r=localStorage.getItem(d))&&void 0!==r?r:l.DARK,V=!O&&B===l.DARK;return o((function(){j(V)}),[V]),o((function(){window[Symbol.for("notificationToasts")]=v}),[v]),o((function(){u({userUnits:y})}),[]),n(C.Provider,{value:I,children:n(m.Provider,{value:h,children:n("div",{id:A,className:s(O&&a),children:n(x,S(S({},L),{},{theme:V?l.DARK:l.LIGHT,onSettingsChange:function(t){return E(b(t))},onSettingChange:function(t,e){return T(t,b(e))},CLIAppComponent:i,CLIAppSettings:p}))})})})}h.propTypes={CLIAppComponent:r.node,CLIAppSettings:r.node,containerReportClassName:r.string},h.defaultProps={CLIAppComponent:null,CLIAppSettings:null,containerReportClassName:null};export{h as DevCenterIsolatedAppPage};
@@ -1 +1 @@
1
- import{memo as e}from"react";import n from"prop-types";import{get as i,map as t,includes as l}from"lodash";import{makeStyles as r,Button as o,Grid as a}from"@material-ui/core";import{getUnitDisplay as c}from"../../../utils/index.js";import{BHA_COMPONENT_TYPES as d,BHA_GENERAL_FIELD_TYPES as m,BHA_TABLE_FIELD_TYPES as s,UR_ACTIVATION_LOGIC_TYPES as u,BHA_ALTERNATIVE_FIELD_TYPES as f,BHA_STABILIZER_FIELD_TYPES as h,FLOW_RATE_UNIT as p,UR_ACTIVATION_LOGIC_KEYS as b}from"./constants.js";import{jsxs as _,jsx as g}from"react/jsx-runtime";var x=r({header:{marginBottom:"10px",borderBottom:"1px solid #888"},title:{fontWeight:"bold",fontSize:"2rem",marginTop:"0px"},done_button:{float:"right"},field_label:{color:"#ccc",fontSize:"0.8rem"},field_value:{fontSize:"1.2rem",lineHeight:"2rem",fontWeight:"bold"},thead:{borderBottom:"0px"},th:{color:"#ccc",fontSize:"0.8rem",padding:"0px"},td:{fontSize:"1.2rem",padding:"0px"},col:{padding:"0 0.75rem"},row:{marginBottom:"20px"},sub_title:{fontWeight:"bold",fontSize:"1.5rem",marginTop:"10px",padding:"0 0.75rem"}});function z(e){var n=e.component,r=e.onDone,z=e.currentUser,v=x(),N=n&&i(n,"family"),y=z?i(z,["preference","segment"],[]):[],T=z&&i(z,"current_segment"),S=-1===y.indexOf(T)?y[0]:T,A=d.filter((function(e){return e.family===N})),B=A&&A[0],D=B&&B.data,F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],d=i(n,e)||"",m=o?p[S].unitType:r,s=m?"(".concat(c(m),")"):"";return _(a,{item:!0,md:l,xs:12,className:v.col,children:[g("span",{className:v.field_label,children:"".concat(t," ").concat(s)}),g("br",{}),g("span",{className:v.field_value,children:d.fixFloat?d.fixFloat(3):d||"n/a"})]},t)},j=function(e,r){return r?t(m,(function(t){return l(r,t.name)&&(!t.cond||t.cond&&i(n,t.cond,!1))&&(!t.family||t.family===N)&&(t.unit?F([t.name],t.label,t.col_size||e,t.unit):F([t.name],t.label,t.col_size||e))})):null},k=function(e){return e?g(a,{item:!0,xs:12,className:v.sub_title,children:e},"subTitle"):null},q=function(e,l,r){return g(a,{item:!0,xs:12,className:v.col,children:i(n,e,[]).length>0&&_("table",{children:[g("thead",{className:v.thead,children:g("tr",{children:t(l,(function(e,n){return g("th",{className:v.th,children:e},n)}))})}),g("tbody",{children:t(i(n,e,[]),(function(e,n){return g("tr",{children:t(r,(function(n,t){return g("td",{className:v.td,children:n.isNumber?i(e,n.field)&&i(e,n.field).fixFloat(3):i(e,n.field)},t)}))},n)}))})]})},"tbField")},C=function(e,r,o,c,d){return r?_(a,{container:!0,children:[o&&t(s,(function(t){return l(o,t.name)&&(!t.cond||t.cond&&i(n,t.cond,!1))&&(t.unit||t.unit_from_segment?F([t.name],t.label,t.col_size||e,t.unit,t.unit_from_segment):F([t.name],t.label,t.col_size||e))})),_(a,{item:!0,md:4,xs:12,className:v.col,children:[g("span",{className:v.field_label,children:"Activation Logic"}),g("br",{}),g("span",{className:v.field_value,children:(m=c,(u.find((function(e){return e.type===m}))||{}).name||"n/a")})]}),d&&l(o,"ur_opened_depth")&&F(["ur_opened_depth"],"Activation Depth",e,"length")]},r):null;var m},R=function(e,r){return r?t(f,(function(t){return l(r,t.name)&&(!t.cond||t.cond&&i(n,t.cond,!1))&&(!t.family||t.family===N)&&(t.unit?F([t.name],t.label,t.col_size||e,t.unit):F([t.name],t.label,t.col_size||e))})):null},W=function(e,r){return r&&i(n,"has_stabilizer")?t(h,(function(t){return l(r,t.name)&&(!t.cond||t.cond&&i(n,t.cond,!1))&&(!t.family||t.family===N)&&(t.unit?F(["stabilizer",t.name],t.label,t.col_size||e,t.unit):F(["stabilizer",t.name],t.label,t.col_size||e))})):null};return _("div",{children:[_("header",{className:v.header,children:[g(o,{variant:"contained",className:v.done_button,onClick:r,children:"Close"}),_("h4",{className:v.title,children:[i(n,"name")," ( ",i(n,"family")," )"]})]}),g(a,{container:!0,children:g(a,{item:!0,xs:12,className:v.col,children:t(D,(function(e){return function(e){var t=e&&+i(e,"col_size"),l=e&&i(e,"fields"),r=e&&i(e,"stablizer_fields"),o=e&&i(e,"sub_title"),c=e&&i(e,"sub_key"),d=e&&i(e,"sub_fields"),m=e&&i(e,"tb_field"),s=e&&i(e,"tb_head"),u=e&&i(e,"tb_body"),f=i(n,"activation_logic"),h=f===b.DEPTH_ACTIVATION;return _(a,{container:!0,className:v.row,children:[j(t,l),k(o),q(m,s,u),C(t,c,d,f,h),R(t,l),W(t,r)]},e.key)}(e)}))})})]})}z.propTypes={component:n.shape({}).isRequired,onDone:n.func.isRequired,currentUser:n.shape({}).isRequired};var v=e(z);export{v as default};
1
+ import{memo as e}from"react";import n from"prop-types";import{get as i,map as t,includes as l}from"lodash";import{makeStyles as r,Button as o,Grid as a}from"@material-ui/core";import{getUnitDisplay as c}from"../../../utils/index.js";import{BHA_COMPONENT_TYPES as d,BHA_GENERAL_FIELD_TYPES as m,BHA_TABLE_FIELD_TYPES as s,BHA_ALTERNATIVE_FIELD_TYPES as u,BHA_STABILIZER_FIELD_TYPES as f,UR_ACTIVATION_LOGIC_TYPES as h,FLOW_RATE_UNIT as p,UR_ACTIVATION_LOGIC_KEYS as b}from"./constants.js";import{jsxs as _,jsx as g}from"react/jsx-runtime";var x=r({header:{marginBottom:"10px",borderBottom:"1px solid #888"},title:{fontWeight:"bold",fontSize:"2rem",marginTop:"0px"},done_button:{float:"right"},field_label:{color:"#ccc",fontSize:"0.8rem"},field_value:{fontSize:"1.2rem",lineHeight:"2rem",fontWeight:"bold"},thead:{borderBottom:"0px"},th:{color:"#ccc",fontSize:"0.8rem",padding:"0px"},td:{fontSize:"1.2rem",padding:"0px"},col:{padding:"0 0.75rem"},row:{marginBottom:"20px"},sub_title:{fontWeight:"bold",fontSize:"1.5rem",marginTop:"10px",padding:"0 0.75rem"}});function z(e){var n=e.component,r=e.onDone,z=e.currentUser,v=x(),N=n&&i(n,"family"),y=z?i(z,["preference","segment"],[]):[],T=z&&i(z,"current_segment"),S=-1===y.indexOf(T)?y[0]:T,A=d.filter((function(e){return e.family===N})),B=A&&A[0],D=B&&B.data,F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],d=i(n,e)||"",m=o?p[S].unitType:r,s=m?"(".concat(c(m),")"):"";return _(a,{item:!0,md:l,xs:12,className:v.col,children:[g("span",{className:v.field_label,children:"".concat(t," ").concat(s)}),g("br",{}),g("span",{className:v.field_value,children:d.fixFloat?d.fixFloat(3):d||"n/a"})]},t)},j=function(e,r){return r?t(m,(function(t){return l(r,t.name)&&(!t.cond||t.cond&&i(n,t.cond,!1))&&(!t.family||t.family===N)&&(t.unit?F([t.name],t.label,t.col_size||e,t.unit):F([t.name],t.label,t.col_size||e))})):null},k=function(e){return e?g(a,{item:!0,xs:12,className:v.sub_title,children:e},"subTitle"):null},q=function(e,l,r){return g(a,{item:!0,xs:12,className:v.col,children:i(n,e,[]).length>0&&_("table",{children:[g("thead",{className:v.thead,children:g("tr",{children:t(l,(function(e,n){return g("th",{className:v.th,children:e},n)}))})}),g("tbody",{children:t(i(n,e,[]),(function(e,n){return g("tr",{children:t(r,(function(n,t){return g("td",{className:v.td,children:n.isNumber?i(e,n.field)&&i(e,n.field).fixFloat(3):i(e,n.field)},t)}))},n)}))})]})},"tbField")},C=function(e,r,o,c,d){return r?_(a,{container:!0,children:[o&&t(s,(function(t){return l(o,t.name)&&(!t.cond||t.cond&&i(n,t.cond,!1))&&(t.unit||t.unit_from_segment?F([t.name],t.label,t.col_size||e,t.unit,t.unit_from_segment):F([t.name],t.label,t.col_size||e))})),_(a,{item:!0,md:4,xs:12,className:v.col,children:[g("span",{className:v.field_label,children:"Activation Logic"}),g("br",{}),g("span",{className:v.field_value,children:(m=c,(h.find((function(e){return e.type===m}))||{}).name||"n/a")})]}),d&&l(o,"ur_opened_depth")&&F(["ur_opened_depth"],"Activation Depth",e,"length")]},r):null;var m},R=function(e,r){return r?t(u,(function(t){return l(r,t.name)&&(!t.cond||t.cond&&i(n,t.cond,!1))&&(!t.family||t.family===N)&&(t.unit?F([t.name],t.label,t.col_size||e,t.unit):F([t.name],t.label,t.col_size||e))})):null},W=function(e,r){return r&&i(n,"has_stabilizer")?t(f,(function(t){return l(r,t.name)&&(!t.cond||t.cond&&i(n,t.cond,!1))&&(!t.family||t.family===N)&&(t.unit?F(["stabilizer",t.name],t.label,t.col_size||e,t.unit):F(["stabilizer",t.name],t.label,t.col_size||e))})):null};return _("div",{children:[_("header",{className:v.header,children:[g(o,{variant:"contained",className:v.done_button,onClick:r,children:"Close"}),_("h4",{className:v.title,children:[i(n,"name")," ( ",i(n,"family")," )"]})]}),g(a,{container:!0,children:g(a,{item:!0,xs:12,className:v.col,children:t(D,(function(e){return function(e){var t=e&&+i(e,"col_size"),l=e&&i(e,"fields"),r=e&&i(e,"stablizer_fields"),o=e&&i(e,"sub_title"),c=e&&i(e,"sub_key"),d=e&&i(e,"sub_fields"),m=e&&i(e,"tb_field"),s=e&&i(e,"tb_head"),u=e&&i(e,"tb_body"),f=i(n,"activation_logic"),h=f===b.DEPTH_ACTIVATION;return _(a,{container:!0,className:v.row,children:[j(t,l),k(o),q(m,s,u),C(t,c,d,f,h),R(t,l),W(t,r)]},e.key)}(e)}))})})]})}z.propTypes={component:n.shape({}).isRequired,onDone:n.func.isRequired,currentUser:n.shape({}).isRequired};var v=e(z);export{v as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import{memo as r,useMemo as n}from"react";import i from"prop-types";import{isEqual as a,clone as l,get as o}from"lodash";import c from"moment";import s from"classnames";import{withStyles as d,Checkbox as u,Typography as f,IconButton as m}from"@material-ui/core";import p from"@material-ui/icons/Sort";import h from"@material-ui/icons/NotInterested";import{AutoSizer as b,Table as g,Column as y}from"react-virtualized";import{SizeMe as w}from"react-sizeme";import{getUnitDisplay as v,convertValue as C}from"../../../../utils/index.js";import x from"./SubjectIndicator.js";import _ from"./MetricsAddMenu.js";import k from"./MetricsSelect.js";import{METRICS_LIST as W,TABLE_COLUMNS as O,SETTINGS_COLUMN as N,METRICS_KEYS as R}from"../../constants.js";import{jsx as j,Fragment as D,jsxs as I}from"react/jsx-runtime";function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?S(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var A=48,q=44,z="WellsTable";function M(e,t){var r,n=o(e,t);switch(t){case"distance":r=Number.isFinite(n)?parseFloat(n).toFixed(2):"N/A";break;case"rigReleaseDate":r=Number.isFinite(n)?c.unix(n).format("MM/DD/YYYY"):"N/A";break;default:r=n||""}return r}function B(r){var i=r.subjectWell,c=r.wells,d=r.offsetWells,w=r.metricsKeys,S=r.isMetricsLoading,A=r.sortInfo,q=r.unusableWellAlarm,B=r.dialogWidth,L=r.classes,P=r.onChangeMetricsKeys,K=r.onAddOffsetWell,F=r.onDeleteOffsetWell,H=r.onAddAllOffsetWells,Y=r.onDeleteAllOffsetWells,E=r.onSorting,V=n((function(){return c.filter((function(e){return e.is_usable}))}),[c]),G=n((function(){var e=V.map((function(e){return e.id})).sort(),t=d.map((function(e){return e.id})).sort();return e.length&&a(e,t)}),[V,d]),X=n((function(){return w.reduce((function(e,t){return e.concat(W.filter((function(e){return e.key===t})))}),[])}),[w]),$=n((function(){return[].concat(t(O),t(X.map((function(e){return T(T({},e),{},{width:240})}))),[N])}),[X]),J=n((function(){if(!B||B<=0)return{};var e={},t=[];return $.filter((function(e){return Number.isFinite(e.width)})).forEach((function(r){e[r.key]=r.width-1,t.push(r.width-1)})),$.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(r){var n=t.reduce((function(e,t){return e+t}),0),i=Math.floor((B-n)/($.length-t.length)),a=r.minWidth||200,l=i<a?a:i;e[r.key]=l-1,t.push(l-1)})),e}),[B,$]),Q=n((function(){return Object.values(J).reduce((function(e,t){return e+t}),0)}),[J]),U=function(e){P(e)},Z=function(e){e.target.checked?H():Y()},ee=function(t){return j(m,{"data-testid":"".concat(z,"_sortRemove"),"data-not-migrated-muiiconbutton":!0,className:L.sortIconButton,onClick:function(){return function(e){E(e)}(t)},children:t!==A.key?j(h,{className:L.sortIcon}):j(p,{className:s(L.sortIcon,e({},L.ascendingSortIcon,1===A.direction))})})},te=function(e){var t,r=e.label,n=e.dataKey;if("name"===n)return I("div",{"data-testid":"".concat(z,"_wellHeader"),className:L.nameWrapper,children:[j(u,{"data-testid":"".concat(z,"_selectAll"),classes:{checked:L.nameCheckBox,indeterminate:L.nameCheckBox},onClick:Z,checked:G,indeterminate:d.length>0&&!G,size:"small"}),j(f,{className:s(L.cell,L.nameCell),children:r}),ee(n)]});if(w.includes(n)){var i=X.find((function(e){return e.key===n})),a=X.findIndex((function(e){return e.key===n}));return I("div",{"data-testid":"".concat(z,"_header_").concat(n),className:L.metricsColumn,children:[j(k,{items:W,currentValue:n,onChange:(t=a,function(e){var r=l(w);r[t]=e,P(r)})}),j(f,{className:s(L.cell,L.unitCell),children:i.unitType?"(".concat(v(i.unitType,i.to),")"):""}),ee(n)]})}return n===N.key?j("div",{className:L.settingsCell,children:j(_,{metricsKeys:w,onChange:U})}):I("div",{"data-testid":"".concat(z,"_header_").concat(r),className:L.nameWrapper,children:[j(f,{className:L.cell,children:r}),ee(n)]})},re=function(t){var r=t.rowData,n=t.dataKey;if("name"===n)return I("div",{"data-testid":"".concat(z,"_row_").concat(r.name),className:L.nameWrapper,children:[j(u,{"data-testid":"".concat(z,"_wellCheckbox"),color:"primary",checked:d.findIndex((function(e){return e.id===r.id}))>-1,onChange:function(e){return t=r.id,void(e.target.checked?K(t):F(t));var t},size:"small",disabled:!r.is_usable}),j(f,{"data-testid":"".concat(z,"_wellName"),className:s(L.tableCellLabel,e({},L.tableCellLabelDisabled,!r.is_usable)),children:M(r,n)}),i&&r.id===i.id&&j(x,{})]});if(n===N.key)return j("div",{className:L.settingsCell,children:!r.is_usable&&j(f,{className:L.errorMsg,children:q})});var a=null;if(w.includes(n)){var l=X.find((function(e){return e.key===n}));a=function(e,t,r){var n=o(e,t.key);if(R.includes(t.key)){if(Number.isFinite(n)||n)return t.unitType?C(n,t.unitType,t.from,t.to):n;if(r)return"loading..."}return""}(r,l,S)}else a=M(r,n);return j(f,{"data-testid":"".concat(z,"_cell}"),className:s(L.cell,L.tableCellLabel,e({},L.tableCellLabelDisabled,!r.is_usable)),children:a})};return j(D,{children:j("div",{className:L.tableWrapper,children:j(b,{children:function(e){var t=e.height;return j(g,{width:Q,height:t,headerHeight:44,rowHeight:48,rowCount:c.length,rowGetter:function(e){var t=e.index;return c[t]},className:L.table,children:$.map((function(e){return j(y,{width:J[e.key]||200,dataKey:e.key,label:e.label,headerRenderer:te,cellRenderer:re},e.key)}))})}})})})}B.propTypes={subjectWell:i.shape({id:i.number}),wells:i.arrayOf(i.shape({})).isRequired,offsetWells:i.arrayOf(i.shape({})).isRequired,metricsKeys:i.arrayOf(i.string).isRequired,isMetricsLoading:i.bool.isRequired,sortInfo:i.shape({key:i.string.isRequired,direction:i.number.isRequired}).isRequired,classes:i.shape({}).isRequired,onChangeMetricsKeys:i.func.isRequired,onAddOffsetWell:i.func.isRequired,onDeleteOffsetWell:i.func.isRequired,onAddAllOffsetWells:i.func.isRequired,onDeleteAllOffsetWells:i.func.isRequired,onSorting:i.func.isRequired,unusableWellAlarm:i.string.isRequired,dialogWidth:i.number},B.defaultProps={subjectWell:null,dialogWidth:0};var L=d((function(e){return{title:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",marginBottom:"15px",marginTop:"16px"},tableWrapper:{marginTop:"24px",overflowX:"auto",overflowY:"hidden",position:"relative",height:2e3,minHeight:150,borderTop:"1px solid rgba(81, 81, 81, 1)"},table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.03)"}},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},cell:{color:"rgba(255, 255, 255, 0.54)",padding:"5px 10px",fontSize:"12px",whiteSpace:"nowrap"},nameWrapper:{display:"flex",alignItems:"center"},nameCell:{padding:0},unitCell:{padding:0},tableRowHoverEnabled:{"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},settingsCell:{textAlign:"right"},rigReleaseCell:{whiteSpace:"nowrap"},nameCheckBox:{color:e.palette.primary.main},bodyCell:{fontSize:"0.90rem",padding:"5px 10px"},metricsCellWrapper:{display:"flex",flexDirection:"row",alignContent:"center"},tableTitle:{fontSize:"16px",lineHeight:"140.6%",marginTop:10},tableTitleItems:{display:"flex",flexDirection:"row",alignItems:"center"},addWellInput:{width:300,marginTop:10},sortIconButton:{padding:"8px","&:hover $sortIcon":{color:"#fff"}},ascendingSortIcon:{transform:"scaleY(-1)"},sortIcon:{fontSize:"14px",color:"#BDBDBD"},metricsColumn:{display:"flex",alignItems:"center"},tableCellLabel:{fontSize:"0.90rem",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:"#fff"},tableCellLabelDisabled:{color:"#C4C4C4"},errorMsg:{color:"#C4C4C4",fontStyle:"italic",fontSize:"14px",padding:"0 16px",whiteSpace:"nowrap"}}}))(r((function(e){return j(w,{monitorWidth:!0,children:function(t){var r=t.size;return j(B,T({dialogWidth:r.width},e))}})})));export{q as HEADER_HEIGHT,A as ROW_HEIGHT,L as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import{memo as r,useMemo as n}from"react";import i from"prop-types";import{isEqual as a,get as l,clone as o}from"lodash";import c from"moment";import s from"classnames";import{withStyles as d,Checkbox as u,Typography as f,IconButton as m}from"@material-ui/core";import p from"@material-ui/icons/Sort";import h from"@material-ui/icons/NotInterested";import{AutoSizer as b,Table as g,Column as y}from"react-virtualized";import{SizeMe as w}from"react-sizeme";import{getUnitDisplay as v,convertValue as C}from"../../../../utils/index.js";import x from"./SubjectIndicator.js";import _ from"./MetricsAddMenu.js";import k from"./MetricsSelect.js";import{METRICS_LIST as W,TABLE_COLUMNS as O,SETTINGS_COLUMN as N,METRICS_KEYS as R}from"../../constants.js";import{jsx as j,Fragment as D,jsxs as I}from"react/jsx-runtime";function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?S(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var A=48,q=44,z="WellsTable";function M(e,t){var r,n=l(e,t);switch(t){case"distance":r=Number.isFinite(n)?parseFloat(n).toFixed(2):"N/A";break;case"rigReleaseDate":r=Number.isFinite(n)?c.unix(n).format("MM/DD/YYYY"):"N/A";break;default:r=n||""}return r}function B(r){var i=r.subjectWell,c=r.wells,d=r.offsetWells,w=r.metricsKeys,S=r.isMetricsLoading,A=r.sortInfo,q=r.unusableWellAlarm,B=r.dialogWidth,L=r.classes,P=r.onChangeMetricsKeys,K=r.onAddOffsetWell,F=r.onDeleteOffsetWell,H=r.onAddAllOffsetWells,Y=r.onDeleteAllOffsetWells,E=r.onSorting,V=n((function(){return c.filter((function(e){return e.is_usable}))}),[c]),G=n((function(){var e=V.map((function(e){return e.id})).sort(),t=d.map((function(e){return e.id})).sort();return e.length&&a(e,t)}),[V,d]),X=n((function(){return w.reduce((function(e,t){return e.concat(W.filter((function(e){return e.key===t})))}),[])}),[w]),$=n((function(){return[].concat(t(O),t(X.map((function(e){return T(T({},e),{},{width:240})}))),[N])}),[X]),J=n((function(){if(!B||B<=0)return{};var e={},t=[];return $.filter((function(e){return Number.isFinite(e.width)})).forEach((function(r){e[r.key]=r.width-1,t.push(r.width-1)})),$.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(r){var n=t.reduce((function(e,t){return e+t}),0),i=Math.floor((B-n)/($.length-t.length)),a=r.minWidth||200,l=i<a?a:i;e[r.key]=l-1,t.push(l-1)})),e}),[B,$]),Q=n((function(){return Object.values(J).reduce((function(e,t){return e+t}),0)}),[J]),U=function(e){P(e)},Z=function(e){e.target.checked?H():Y()},ee=function(t){return j(m,{"data-testid":"".concat(z,"_sortRemove"),"data-not-migrated-muiiconbutton":!0,className:L.sortIconButton,onClick:function(){return function(e){E(e)}(t)},children:t!==A.key?j(h,{className:L.sortIcon}):j(p,{className:s(L.sortIcon,e({},L.ascendingSortIcon,1===A.direction))})})},te=function(e){var t,r=e.label,n=e.dataKey;if("name"===n)return I("div",{"data-testid":"".concat(z,"_wellHeader"),className:L.nameWrapper,children:[j(u,{"data-testid":"".concat(z,"_selectAll"),classes:{checked:L.nameCheckBox,indeterminate:L.nameCheckBox},onClick:Z,checked:G,indeterminate:d.length>0&&!G,size:"small"}),j(f,{className:s(L.cell,L.nameCell),children:r}),ee(n)]});if(w.includes(n)){var i=X.find((function(e){return e.key===n})),a=X.findIndex((function(e){return e.key===n}));return I("div",{"data-testid":"".concat(z,"_header_").concat(n),className:L.metricsColumn,children:[j(k,{items:W,currentValue:n,onChange:(t=a,function(e){var r=o(w);r[t]=e,P(r)})}),j(f,{className:s(L.cell,L.unitCell),children:i.unitType?"(".concat(v(i.unitType,i.to),")"):""}),ee(n)]})}return n===N.key?j("div",{className:L.settingsCell,children:j(_,{metricsKeys:w,onChange:U})}):I("div",{"data-testid":"".concat(z,"_header_").concat(r),className:L.nameWrapper,children:[j(f,{className:L.cell,children:r}),ee(n)]})},re=function(t){var r=t.rowData,n=t.dataKey;if("name"===n)return I("div",{"data-testid":"".concat(z,"_row_").concat(r.name),className:L.nameWrapper,children:[j(u,{"data-testid":"".concat(z,"_wellCheckbox"),color:"primary",checked:d.findIndex((function(e){return e.id===r.id}))>-1,onChange:function(e){return t=r.id,void(e.target.checked?K(t):F(t));var t},size:"small",disabled:!r.is_usable}),j(f,{"data-testid":"".concat(z,"_wellName"),className:s(L.tableCellLabel,e({},L.tableCellLabelDisabled,!r.is_usable)),children:M(r,n)}),i&&r.id===i.id&&j(x,{})]});if(n===N.key)return j("div",{className:L.settingsCell,children:!r.is_usable&&j(f,{className:L.errorMsg,children:q})});var a=null;if(w.includes(n)){var o=X.find((function(e){return e.key===n}));a=function(e,t,r){var n=l(e,t.key);if(R.includes(t.key)){if(Number.isFinite(n)||n)return t.unitType?C(n,t.unitType,t.from,t.to):n;if(r)return"loading..."}return""}(r,o,S)}else a=M(r,n);return j(f,{"data-testid":"".concat(z,"_cell}"),className:s(L.cell,L.tableCellLabel,e({},L.tableCellLabelDisabled,!r.is_usable)),children:a})};return j(D,{children:j("div",{className:L.tableWrapper,children:j(b,{children:function(e){var t=e.height;return j(g,{width:Q,height:t,headerHeight:44,rowHeight:48,rowCount:c.length,rowGetter:function(e){var t=e.index;return c[t]},className:L.table,children:$.map((function(e){return j(y,{width:J[e.key]||200,dataKey:e.key,label:e.label,headerRenderer:te,cellRenderer:re},e.key)}))})}})})})}B.propTypes={subjectWell:i.shape({id:i.number}),wells:i.arrayOf(i.shape({})).isRequired,offsetWells:i.arrayOf(i.shape({})).isRequired,metricsKeys:i.arrayOf(i.string).isRequired,isMetricsLoading:i.bool.isRequired,sortInfo:i.shape({key:i.string.isRequired,direction:i.number.isRequired}).isRequired,classes:i.shape({}).isRequired,onChangeMetricsKeys:i.func.isRequired,onAddOffsetWell:i.func.isRequired,onDeleteOffsetWell:i.func.isRequired,onAddAllOffsetWells:i.func.isRequired,onDeleteAllOffsetWells:i.func.isRequired,onSorting:i.func.isRequired,unusableWellAlarm:i.string.isRequired,dialogWidth:i.number},B.defaultProps={subjectWell:null,dialogWidth:0};var L=d((function(e){return{title:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",marginBottom:"15px",marginTop:"16px"},tableWrapper:{marginTop:"24px",overflowX:"auto",overflowY:"hidden",position:"relative",height:2e3,minHeight:150,borderTop:"1px solid rgba(81, 81, 81, 1)"},table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.03)"}},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},cell:{color:"rgba(255, 255, 255, 0.54)",padding:"5px 10px",fontSize:"12px",whiteSpace:"nowrap"},nameWrapper:{display:"flex",alignItems:"center"},nameCell:{padding:0},unitCell:{padding:0},tableRowHoverEnabled:{"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},settingsCell:{textAlign:"right"},rigReleaseCell:{whiteSpace:"nowrap"},nameCheckBox:{color:e.palette.primary.main},bodyCell:{fontSize:"0.90rem",padding:"5px 10px"},metricsCellWrapper:{display:"flex",flexDirection:"row",alignContent:"center"},tableTitle:{fontSize:"16px",lineHeight:"140.6%",marginTop:10},tableTitleItems:{display:"flex",flexDirection:"row",alignItems:"center"},addWellInput:{width:300,marginTop:10},sortIconButton:{padding:"8px","&:hover $sortIcon":{color:"#fff"}},ascendingSortIcon:{transform:"scaleY(-1)"},sortIcon:{fontSize:"14px",color:"#BDBDBD"},metricsColumn:{display:"flex",alignItems:"center"},tableCellLabel:{fontSize:"0.90rem",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:"#fff"},tableCellLabelDisabled:{color:"#C4C4C4"},errorMsg:{color:"#C4C4C4",fontStyle:"italic",fontSize:"14px",padding:"0 16px",whiteSpace:"nowrap"}}}))(r((function(e){return j(w,{monitorWidth:!0,children:function(t){var r=t.size;return j(B,T({dialogWidth:r.width},e))}})})));export{q as HEADER_HEIGHT,A as ROW_HEIGHT,L as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/toConsumableArray";import{AutoSizer as t,Table as i,Column as n}from"react-virtualized";import{SizeMe as l}from"react-sizeme";import{memo as o,useRef as s,useMemo as a}from"react";import{bool as c,shape as u,number as d,arrayOf as f,string as m,func as h}from"prop-types";import{isEqual as p,clone as b,get as y}from"lodash";import g from"moment";import v from"classnames";import{Typography as N,Checkbox as W,IconButton as k}from"@material-ui/core";import O from"@material-ui/icons/Sort";import j from"@material-ui/icons/NotInterested";import{getUnitDisplay as w,convertValue as C}from"../../../../../../utils/index.js";import R from"./SubjectIndicator.js";import q from"./MetricsAddMenu.js";import A from"./MetricsSelect.js";import{METRICS_LIST as M,TABLE_COLUMNS as D,SETTINGS_COLUMN as I,METRICS_KEYS as T}from"../../constants.js";import{useStyles as x}from"./styles.js";import P from"./AssetSearch.js";import{jsx as S,Fragment as K,jsxs as F}from"react/jsx-runtime";function L(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function z(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?L(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}function _(e,r){var t,i=y(e,r);switch(r){case"distance":t=Number.isFinite(i)?parseFloat(i).toFixed(2):"N/A";break;case"rigReleaseDate":t=Number.isFinite(i)?g.unix(i).format("MM/DD/YYYY"):"N/A";break;default:t=i||""}return t}function B(l){var o=l.open,c=l.subjectWell,u=l.wells,d=l.offsetWells,f=l.metricsKeys,m=l.isMetricsLoading,h=l.sortInfo,g=l.unusableWellAlarm,L=l.dialogWidth,B=l.onChangeMetricsKeys,E=l.onAddOffsetWell,Y=l.onDeleteOffsetWell,H=l.onAddAllOffsetWells,G=l.onDeleteAllOffsetWells,V=l.onSorting,J=l.isTablet,Q=l.isMobile,U=l.companyId,X=x({isTablet:J,isMobile:Q}),Z=s(),$=a((function(){return u.filter((function(e){return e.is_usable}))}),[u]),ee=a((function(){var e=$.map((function(e){return e.id})).sort(),r=d.map((function(e){return e.id})).sort();return e.length&&p(e,r)}),[$,d]),re=a((function(){return f.reduce((function(e,r){return e.concat(M.filter((function(e){return e.key===r})))}),[])}),[f]),te=a((function(){return[].concat(r(D),r(re.map((function(e){return z(z({},e),{},{width:240})}))),[I])}),[re]),ie=a((function(){if(!L||L<=0)return{};var e={},r=[];return te.filter((function(e){return Number.isFinite(e.width)})).forEach((function(t){e[t.key]=t.width-1,r.push(t.width-1)})),te.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(t){var i=r.reduce((function(e,r){return e+r}),0),n=Math.floor((L-i)/(te.length-r.length)),l=t.minWidth||200,o=n<l?l:n;e[t.key]=o-1,r.push(o-1)})),e}),[L,te]),ne=a((function(){var e;return(null===(e=Z.current)||void 0===e?void 0:e.clientWidth)>1004&&o?Z.current.clientWidth:1004}),[ie,Z.current,o]),le=function(e){B(e)},oe=function(e){e.target.checked?H():G()},se=function(r){return S(k,{"data-not-migrated-muiiconbutton":!0,className:X.sortIconButton,onClick:function(){return function(e){V(e)}(r)},children:r!==h.key?S(j,{className:X.sortIcon}):S(O,{className:v(X.sortIcon,e({},X.ascendingSortIcon,1===h.direction))})})},ae=function(e){var r,t=e.label,i=e.dataKey;if("name"===i)return F("div",{className:X.nameWrapper,children:[S(W,{classes:{checked:X.nameCheckBox,indeterminate:X.nameCheckBox},onClick:oe,checked:ee,indeterminate:d.length>0&&!ee,size:"small"}),S(N,{className:v(X.cell,X.nameCell),children:t}),se(i)]});if(f.includes(i)){var n=re.find((function(e){return e.key===i})),l=re.findIndex((function(e){return e.key===i}));return F("div",{className:X.metricsColumn,children:[S(A,{items:M,currentValue:i,onChange:(r=l,function(e){var t=b(f);t[r]=e,B(t)})}),S(N,{className:v(X.cell,X.unitCell),children:n.unitType?"(".concat(w(n.unitType,n.to),")"):""}),se(i)]})}return i===I.key?S("div",{className:X.settingsCell,children:S(q,{metricsKeys:f,onChange:le})}):F("div",{className:X.nameWrapper,children:[S(N,{className:X.cell,children:t}),se(i)]})},ce=function(r){var t=r.rowData,i=r.dataKey;if("name"===i)return F("div",{className:X.nameWrapper,children:[S(W,{color:"primary",checked:d.findIndex((function(e){return e.id===t.id}))>-1,onChange:function(e){return r=t.id,void(e.target.checked?E(r):Y(r));var r},size:"small",disabled:!t.is_usable}),S(N,{className:v(X.tableCellLabel,e({},X.tableCellLabelDisabled,!t.is_usable)),children:_(t,i)}),c&&t.id===c.id&&S(R,{})]});if(i===I.key)return S("div",{className:X.settingsCell,children:!t.is_usable&&S(N,{className:X.errorMsg,children:g})});var n=null;if(f.includes(i)){var l=re.find((function(e){return e.key===i}));n=function(e,r,t){var i=y(e,r.key);if(T.includes(r.key)){if(Number.isFinite(i)||i)return r.unitType?C(i,r.unitType,r.from,r.to):i;if(t)return"loading..."}return""}(t,l,m)}else n=_(t,i);return S(N,{className:v(X.cell,X.tableCellLabel,e({},X.tableCellLabelDisabled,!t.is_usable)),children:n})},ue=a((function(){return Math.min(48*u.length+44+52,2e3)}),[u]);return S(K,{children:F("div",{className:X.tableContainer,style:{height:ue},children:[F("div",{className:X.titleWrapper,children:[F(N,{variant:"body2",className:X.tableTitle,children:["Well Names (",d.length,")"]}),S("div",{className:X.addWellInput,children:S(P,{company:U,onClickAsset:function(e){E(e)},isTablet:J,isMobile:Q})})]}),S("div",{className:X.tableTopBorder,ref:Z,style:{width:!J&&Q&&ne}}),S(t,{children:function(){return S(i,{width:ne,height:ue,headerHeight:44,rowHeight:48,rowCount:u.length,rowGetter:function(e){var r=e.index;return u[r]},className:X.table,children:te.map((function(e){return S(n,{width:ie[e.key]||200,dataKey:e.key,label:e.label,headerRenderer:ae,cellRenderer:ce},e.key)}))})}})]})})}B.propTypes={open:c.isRequired,subjectWell:u({id:d}),wells:f(u({})).isRequired,offsetWells:f(u({})).isRequired,metricsKeys:f(m).isRequired,isMetricsLoading:c.isRequired,sortInfo:u({key:m.isRequired,direction:d.isRequired}).isRequired,onChangeMetricsKeys:h.isRequired,onAddOffsetWell:h.isRequired,onDeleteOffsetWell:h.isRequired,onAddAllOffsetWells:h.isRequired,onDeleteAllOffsetWells:h.isRequired,onSorting:h.isRequired,unusableWellAlarm:m.isRequired,dialogWidth:d,isMobile:c.isRequired,isTablet:c.isRequired,companyId:d.isRequired},B.defaultProps={subjectWell:null,dialogWidth:0};var E=o((function(e){return S(l,{monitorWidth:!0,children:function(r){var t=r.size;return S(B,z({dialogWidth:t.width},e))}})}));export{E as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/toConsumableArray";import{AutoSizer as t,Table as i,Column as n}from"react-virtualized";import{SizeMe as l}from"react-sizeme";import{memo as o,useRef as s,useMemo as a}from"react";import{bool as c,shape as u,number as d,arrayOf as f,string as m,func as h}from"prop-types";import{isEqual as p,get as b,clone as y}from"lodash";import g from"moment";import v from"classnames";import{Typography as N,Checkbox as W,IconButton as k}from"@material-ui/core";import O from"@material-ui/icons/Sort";import j from"@material-ui/icons/NotInterested";import{getUnitDisplay as w,convertValue as C}from"../../../../../../utils/index.js";import R from"./SubjectIndicator.js";import q from"./MetricsAddMenu.js";import A from"./MetricsSelect.js";import{METRICS_LIST as M,TABLE_COLUMNS as D,SETTINGS_COLUMN as I,METRICS_KEYS as T}from"../../constants.js";import{useStyles as x}from"./styles.js";import P from"./AssetSearch.js";import{jsx as S,Fragment as K,jsxs as F}from"react/jsx-runtime";function L(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function z(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?L(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}function _(e,r){var t,i=b(e,r);switch(r){case"distance":t=Number.isFinite(i)?parseFloat(i).toFixed(2):"N/A";break;case"rigReleaseDate":t=Number.isFinite(i)?g.unix(i).format("MM/DD/YYYY"):"N/A";break;default:t=i||""}return t}function B(l){var o=l.open,c=l.subjectWell,u=l.wells,d=l.offsetWells,f=l.metricsKeys,m=l.isMetricsLoading,h=l.sortInfo,g=l.unusableWellAlarm,L=l.dialogWidth,B=l.onChangeMetricsKeys,E=l.onAddOffsetWell,Y=l.onDeleteOffsetWell,H=l.onAddAllOffsetWells,G=l.onDeleteAllOffsetWells,V=l.onSorting,J=l.isTablet,Q=l.isMobile,U=l.companyId,X=x({isTablet:J,isMobile:Q}),Z=s(),$=a((function(){return u.filter((function(e){return e.is_usable}))}),[u]),ee=a((function(){var e=$.map((function(e){return e.id})).sort(),r=d.map((function(e){return e.id})).sort();return e.length&&p(e,r)}),[$,d]),re=a((function(){return f.reduce((function(e,r){return e.concat(M.filter((function(e){return e.key===r})))}),[])}),[f]),te=a((function(){return[].concat(r(D),r(re.map((function(e){return z(z({},e),{},{width:240})}))),[I])}),[re]),ie=a((function(){if(!L||L<=0)return{};var e={},r=[];return te.filter((function(e){return Number.isFinite(e.width)})).forEach((function(t){e[t.key]=t.width-1,r.push(t.width-1)})),te.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(t){var i=r.reduce((function(e,r){return e+r}),0),n=Math.floor((L-i)/(te.length-r.length)),l=t.minWidth||200,o=n<l?l:n;e[t.key]=o-1,r.push(o-1)})),e}),[L,te]),ne=a((function(){var e;return(null===(e=Z.current)||void 0===e?void 0:e.clientWidth)>1004&&o?Z.current.clientWidth:1004}),[ie,Z.current,o]),le=function(e){B(e)},oe=function(e){e.target.checked?H():G()},se=function(r){return S(k,{"data-not-migrated-muiiconbutton":!0,className:X.sortIconButton,onClick:function(){return function(e){V(e)}(r)},children:r!==h.key?S(j,{className:X.sortIcon}):S(O,{className:v(X.sortIcon,e({},X.ascendingSortIcon,1===h.direction))})})},ae=function(e){var r,t=e.label,i=e.dataKey;if("name"===i)return F("div",{className:X.nameWrapper,children:[S(W,{classes:{checked:X.nameCheckBox,indeterminate:X.nameCheckBox},onClick:oe,checked:ee,indeterminate:d.length>0&&!ee,size:"small"}),S(N,{className:v(X.cell,X.nameCell),children:t}),se(i)]});if(f.includes(i)){var n=re.find((function(e){return e.key===i})),l=re.findIndex((function(e){return e.key===i}));return F("div",{className:X.metricsColumn,children:[S(A,{items:M,currentValue:i,onChange:(r=l,function(e){var t=y(f);t[r]=e,B(t)})}),S(N,{className:v(X.cell,X.unitCell),children:n.unitType?"(".concat(w(n.unitType,n.to),")"):""}),se(i)]})}return i===I.key?S("div",{className:X.settingsCell,children:S(q,{metricsKeys:f,onChange:le})}):F("div",{className:X.nameWrapper,children:[S(N,{className:X.cell,children:t}),se(i)]})},ce=function(r){var t=r.rowData,i=r.dataKey;if("name"===i)return F("div",{className:X.nameWrapper,children:[S(W,{color:"primary",checked:d.findIndex((function(e){return e.id===t.id}))>-1,onChange:function(e){return r=t.id,void(e.target.checked?E(r):Y(r));var r},size:"small",disabled:!t.is_usable}),S(N,{className:v(X.tableCellLabel,e({},X.tableCellLabelDisabled,!t.is_usable)),children:_(t,i)}),c&&t.id===c.id&&S(R,{})]});if(i===I.key)return S("div",{className:X.settingsCell,children:!t.is_usable&&S(N,{className:X.errorMsg,children:g})});var n=null;if(f.includes(i)){var l=re.find((function(e){return e.key===i}));n=function(e,r,t){var i=b(e,r.key);if(T.includes(r.key)){if(Number.isFinite(i)||i)return r.unitType?C(i,r.unitType,r.from,r.to):i;if(t)return"loading..."}return""}(t,l,m)}else n=_(t,i);return S(N,{className:v(X.cell,X.tableCellLabel,e({},X.tableCellLabelDisabled,!t.is_usable)),children:n})},ue=a((function(){return Math.min(48*u.length+44+52,2e3)}),[u]);return S(K,{children:F("div",{className:X.tableContainer,style:{height:ue},children:[F("div",{className:X.titleWrapper,children:[F(N,{variant:"body2",className:X.tableTitle,children:["Well Names (",d.length,")"]}),S("div",{className:X.addWellInput,children:S(P,{company:U,onClickAsset:function(e){E(e)},isTablet:J,isMobile:Q})})]}),S("div",{className:X.tableTopBorder,ref:Z,style:{width:!J&&Q&&ne}}),S(t,{children:function(){return S(i,{width:ne,height:ue,headerHeight:44,rowHeight:48,rowCount:u.length,rowGetter:function(e){var r=e.index;return u[r]},className:X.table,children:te.map((function(e){return S(n,{width:ie[e.key]||200,dataKey:e.key,label:e.label,headerRenderer:ae,cellRenderer:ce},e.key)}))})}})]})})}B.propTypes={open:c.isRequired,subjectWell:u({id:d}),wells:f(u({})).isRequired,offsetWells:f(u({})).isRequired,metricsKeys:f(m).isRequired,isMetricsLoading:c.isRequired,sortInfo:u({key:m.isRequired,direction:d.isRequired}).isRequired,onChangeMetricsKeys:h.isRequired,onAddOffsetWell:h.isRequired,onDeleteOffsetWell:h.isRequired,onAddAllOffsetWells:h.isRequired,onDeleteAllOffsetWells:h.isRequired,onSorting:h.isRequired,unusableWellAlarm:m.isRequired,dialogWidth:d,isMobile:c.isRequired,isTablet:c.isRequired,companyId:d.isRequired},B.defaultProps={subjectWell:null,dialogWidth:0};var E=o((function(e){return S(l,{monitorWidth:!0,children:function(r){var t=r.size;return S(B,z({dialogWidth:t.width},e))}})}));export{E as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/typeof";import i from"@babel/runtime/helpers/slicedToArray";import{memo as o,useState as n,useCallback as s,useEffect as p,useMemo as m}from"react";import a from"prop-types";import l from"classnames";import{get as d,union as c}from"lodash";import{makeStyles as j,Table as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as C,jsxs as f}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import b from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.js";import"../../../../constants/goals.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../GridLockButton/index.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"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/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"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.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"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.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"../../../Tooltip/MuiTooltipDcWrapper.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"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import{useWells as v,useFetchBicWellsData as A}from"../../effects/index.js";import{WELL_NAME_KEY as D,ALL_KEY as g,FILTER_BASEDON_TYPE as P,DEFAULT_WELL_SECTIONS as S}from"../../constants.js";import x from"../shared/OffsetWellTableHead.js";import h from"../shared/OffsetWellTableRows.js";function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function I(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?y(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var T=j({offsetwellContainer:{position:"relative",flex:1,overflow:"auto","&::-webkit-scrollbar-corner":{background:"rgba(0, 0, 0, 0)"},display:"inline-block"},containerHidden:{display:"none"},loadingWrapper:{display:"flex",alignItems:"center",height:"550px"}});function E(o){var a=o.open,j=o.companyId,y=o.subjectWellId,E=o.filterBasedOn,O=o.setSectionOptions,B=o.selectedSection,W=o.setSelectedOffsetWells,L=o.isTablet,w=o.isMobile,k=T({isTablet:L,isMobile:w}),F=v(j),M=A(y),V=n([]),H=i(V,2),R=H[0],q=H[1],N=s((function(e){return"well"===e.name?"Entire Well":"section"===e.filterMode?"".concat(e.name):"".concat(e.name," in")}),[]);p((function(){if(F){var e,t=function(e,t){var r=e.find((function(e){return e.id===t}));return d(r,D)||"-"};if(M&&M.filters&&M.result){var i,o,n=(null==M||null===(i=M.filters)||void 0===i?void 0:i.filterTabs)||[],s=null==M||null===(o=M.filters)||void 0===o?void 0:o.filterMode;e=n.map((function(e){var i;return{id:e.value,name:e.value,filterMode:s,wells:(null===(i=M.result[e.value])||void 0===i?void 0:i.filter((function(e){return F.find((function(t){return t.id===e}))})).map((function(e){var i="object"===r(e)?e.id:e;return{id:i,name:t(F,i)}})))||[]}}))}else e=S;q(e);var p=[{id:g,name:"All"}];e.forEach((function(e){p.push({id:e.id,name:N(e)})})),O(p)}}),[F,M]);var z=m((function(){var r=R.reduce((function(e,t){return c(e,t.wells)}),[]).reduce((function(e,r){return e.find((function(e){return e.id===r.id}))?e:[].concat(t(e),[{id:r.id,name:r.name}])}),[]),i=[],o=R.filter((function(e){return B===g||B===e.id}));E===P.entireWell?i.push({id:"All Wells",numeric:!0,label:"All Wells (".concat(r.length,")")}):o.forEach((function(e){i.push({id:e.name,numeric:!0,label:"".concat(N(e)," (").concat(e.wells.length,")")})}));var n=[];return r.forEach((function(t){var r=i.reduce((function(r,i){return E===P.entireWell||o.find((function(e){return e.name===i.id})).wells.find((function(e){return t.name===e.name}))?I(I({},r),{},e({},i.id,1)):B===g?I(I({},r),{},e({},i.id,0)):null}),{id:t.id,name:t.name});r&&n.push(r)})),i.unshift({id:D,numeric:!1,label:"Well Names (".concat(n.length,")")}),[i,n]}),[R,B]),G=i(z,2),U=G[0],K=G[1];p((function(){if(a){var e=K.map((function(e){return{id:e.id}}));W(e)}}),[a,K]);var J=n("asc"),Q=i(J,2),X=Q[0],Y=Q[1],Z=n(D),$=i(Z,2),_=$[0],ee=$[1],te=!F;return C("div",{className:l(k.offsetwellContainer,e({},k.containerHidden,!a)),children:te?C("div",{className:k.loadingWrapper,children:C(b,{fullscreen:!1})}):f(u,{size:"small",style:{borderCollapse:"separate"},children:[C(x,{headCells:U,order:X,orderBy:_,onRequestSort:function(e,t){Y(_===t&&"asc"===X?"desc":"asc"),ee(t)},isTablet:L,isMobile:w,rowNum:K.length}),C(h,{rows:K,headCells:U.slice(1),order:X,orderBy:_,isTablet:L,isMobile:w})]})})}E.propTypes={open:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,filterBasedOn:a.string.isRequired,setSectionOptions:a.func.isRequired,selectedSection:a.any.isRequired,setSelectedOffsetWells:a.func.isRequired,isTablet:a.bool.isRequired,isMobile:a.bool.isRequired};var O=o(E);export{O as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/typeof";import i from"@babel/runtime/helpers/slicedToArray";import{memo as o,useState as n,useCallback as s,useEffect as p,useMemo as m}from"react";import a from"prop-types";import l from"classnames";import{union as d,get as c}from"lodash";import{makeStyles as j,Table as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as C,jsxs as f}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import b from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.js";import"../../../../constants/goals.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../GridLockButton/index.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"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/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"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.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"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.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"../../../Tooltip/MuiTooltipDcWrapper.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"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import{useWells as v,useFetchBicWellsData as A}from"../../effects/index.js";import{ALL_KEY as D,FILTER_BASEDON_TYPE as g,WELL_NAME_KEY as P,DEFAULT_WELL_SECTIONS as S}from"../../constants.js";import x from"../shared/OffsetWellTableHead.js";import h from"../shared/OffsetWellTableRows.js";function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function I(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?y(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var T=j({offsetwellContainer:{position:"relative",flex:1,overflow:"auto","&::-webkit-scrollbar-corner":{background:"rgba(0, 0, 0, 0)"},display:"inline-block"},containerHidden:{display:"none"},loadingWrapper:{display:"flex",alignItems:"center",height:"550px"}});function E(o){var a=o.open,j=o.companyId,y=o.subjectWellId,E=o.filterBasedOn,O=o.setSectionOptions,B=o.selectedSection,W=o.setSelectedOffsetWells,L=o.isTablet,w=o.isMobile,k=T({isTablet:L,isMobile:w}),F=v(j),M=A(y),V=n([]),H=i(V,2),R=H[0],q=H[1],N=s((function(e){return"well"===e.name?"Entire Well":"section"===e.filterMode?"".concat(e.name):"".concat(e.name," in")}),[]);p((function(){if(F){var e,t=function(e,t){var r=e.find((function(e){return e.id===t}));return c(r,P)||"-"};if(M&&M.filters&&M.result){var i,o,n=(null==M||null===(i=M.filters)||void 0===i?void 0:i.filterTabs)||[],s=null==M||null===(o=M.filters)||void 0===o?void 0:o.filterMode;e=n.map((function(e){var i;return{id:e.value,name:e.value,filterMode:s,wells:(null===(i=M.result[e.value])||void 0===i?void 0:i.filter((function(e){return F.find((function(t){return t.id===e}))})).map((function(e){var i="object"===r(e)?e.id:e;return{id:i,name:t(F,i)}})))||[]}}))}else e=S;q(e);var p=[{id:D,name:"All"}];e.forEach((function(e){p.push({id:e.id,name:N(e)})})),O(p)}}),[F,M]);var z=m((function(){var r=R.reduce((function(e,t){return d(e,t.wells)}),[]).reduce((function(e,r){return e.find((function(e){return e.id===r.id}))?e:[].concat(t(e),[{id:r.id,name:r.name}])}),[]),i=[],o=R.filter((function(e){return B===D||B===e.id}));E===g.entireWell?i.push({id:"All Wells",numeric:!0,label:"All Wells (".concat(r.length,")")}):o.forEach((function(e){i.push({id:e.name,numeric:!0,label:"".concat(N(e)," (").concat(e.wells.length,")")})}));var n=[];return r.forEach((function(t){var r=i.reduce((function(r,i){return E===g.entireWell||o.find((function(e){return e.name===i.id})).wells.find((function(e){return t.name===e.name}))?I(I({},r),{},e({},i.id,1)):B===D?I(I({},r),{},e({},i.id,0)):null}),{id:t.id,name:t.name});r&&n.push(r)})),i.unshift({id:P,numeric:!1,label:"Well Names (".concat(n.length,")")}),[i,n]}),[R,B]),G=i(z,2),U=G[0],K=G[1];p((function(){if(a){var e=K.map((function(e){return{id:e.id}}));W(e)}}),[a,K]);var J=n("asc"),Q=i(J,2),X=Q[0],Y=Q[1],Z=n(P),$=i(Z,2),_=$[0],ee=$[1],te=!F;return C("div",{className:l(k.offsetwellContainer,e({},k.containerHidden,!a)),children:te?C("div",{className:k.loadingWrapper,children:C(b,{fullscreen:!1})}):f(u,{size:"small",style:{borderCollapse:"separate"},children:[C(x,{headCells:U,order:X,orderBy:_,onRequestSort:function(e,t){Y(_===t&&"asc"===X?"desc":"asc"),ee(t)},isTablet:L,isMobile:w,rowNum:K.length}),C(h,{rows:K,headCells:U.slice(1),order:X,orderBy:_,isTablet:L,isMobile:w})]})})}E.propTypes={open:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,filterBasedOn:a.string.isRequired,setSectionOptions:a.func.isRequired,selectedSection:a.any.isRequired,setSelectedOffsetWells:a.func.isRequired,isTablet:a.bool.isRequired,isMobile:a.bool.isRequired};var O=o(E);export{O as default};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import{useState as o,useEffect as c,useMemo as i}from"react";import{debounce as u,every as a,groupBy as p,flatten as s,toPairs as f}from"lodash";import{fetchAllAssets as l}from"../utils/apiCalls.js";function m(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var y=u((function(r){r()}),500);function O(u,m,O,h,j){var v=o([]),d=t(v,2),w=d[0],P=d[1],g=o(!1),k=t(g,2),x=k[0],D=k[1],C=o({}),T=t(C,2),A=T[0],E=T[1];return c((function(){function t(){return(t=e(n.mark((function e(){var t,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l(u,m,O,h);case 3:t=e.sent,o=s(f(A).filter((function(r){return+r[0]<+O})).map((function(r){return r[1]}))).concat(t),P(o),E((function(e){return b(b({},e),{},r({searchKey:u,assetType:m},O,t))})),D(!1),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),D(!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}D(!0),y((function(){return t.apply(this,arguments)}))}),[u,m,O,h]),[x,i((function(){var r=w.map((function(r){return b(b({},r),{},{checked:j.includes(r.redirectAssetId)})})).filter((function(r){return(!m||r.type===m)&&function(r,e){var t=(e||"").split(" ");return a(t,(function(e){return r.toLowerCase().includes(e||"")}))}(r.name,(u||"").toLowerCase())}));return Object.entries(p(r,"type"))}),[u,w,m,j])]}export{O as useAssetsData};
1
+ import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import{useState as o,useEffect as c,useMemo as i}from"react";import{debounce as u,groupBy as a,every as p,flatten as s,toPairs as f}from"lodash";import{fetchAllAssets as l}from"../utils/apiCalls.js";function m(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var y=u((function(r){r()}),500);function O(u,m,O,h,j){var v=o([]),d=t(v,2),w=d[0],P=d[1],g=o(!1),k=t(g,2),x=k[0],D=k[1],C=o({}),T=t(C,2),A=T[0],E=T[1];return c((function(){function t(){return(t=e(n.mark((function e(){var t,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l(u,m,O,h);case 3:t=e.sent,o=s(f(A).filter((function(r){return+r[0]<+O})).map((function(r){return r[1]}))).concat(t),P(o),E((function(e){return b(b({},e),{},r({searchKey:u,assetType:m},O,t))})),D(!1),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),D(!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}D(!0),y((function(){return t.apply(this,arguments)}))}),[u,m,O,h]),[x,i((function(){var r=w.map((function(r){return b(b({},r),{},{checked:j.includes(r.redirectAssetId)})})).filter((function(r){return(!m||r.type===m)&&function(r,e){var t=(e||"").split(" ");return p(t,(function(e){return r.toLowerCase().includes(e||"")}))}(r.name,(u||"").toLowerCase())}));return Object.entries(a(r,"type"))}),[u,w,m,j])]}export{O as useAssetsData};
@@ -1 +1 @@
1
- import{CHEMICALS_TYPES as e,FLUIDS_TYPES as a,PROPPANTS_TYPES as n,CHEMICALS_MASS_TYPES as m,CHEMICALS_VOL_TYPES as t}from"../../../constants/completion.js";var r=function(r){var u,o,i=r.designElements,c=r.actualElements,s=r.rowKey,l=r.predictionSummary;switch(s){case"volumeChemicals":u=t.map((function(e){return e.name})),o="volume";break;case"massChemicals":u=m.map((function(e){return e.name})),o="mass";break;case"proppants":u=n.map((function(e){return e.name})),o="mass";break;default:u=a.map((function(e){return e.name})),o="oil"}return u.reduce((function(a,n){var m=i[n]&&i[n].amount,t=c[n]&&c[n].amount,r=0;if("volumeChemicals"===s||"massChemicals"===s){var u=e.find((function(e){return e.name===n}))||{};r=l[u.key]}if(!m&&!t&&!r)return a;var p=Math.max(m||0,t||0);return{elemMax:Math.max(p,a.elemMax),elemAmount:a.elemAmount.concat({key:n,design:m||0,actual:t||0,predictionVal:r,unitType:o})}}),{elemMax:0,elemAmount:[]})};export{r as getElementInfo};
1
+ import{FLUIDS_TYPES as e,PROPPANTS_TYPES as a,CHEMICALS_MASS_TYPES as n,CHEMICALS_VOL_TYPES as m,CHEMICALS_TYPES as t}from"../../../constants/completion.js";var r=function(r){var u,o,i=r.designElements,c=r.actualElements,s=r.rowKey,l=r.predictionSummary;switch(s){case"volumeChemicals":u=m.map((function(e){return e.name})),o="volume";break;case"massChemicals":u=n.map((function(e){return e.name})),o="mass";break;case"proppants":u=a.map((function(e){return e.name})),o="mass";break;default:u=e.map((function(e){return e.name})),o="oil"}return u.reduce((function(e,a){var n=i[a]&&i[a].amount,m=c[a]&&c[a].amount,r=0;if("volumeChemicals"===s||"massChemicals"===s){var u=t.find((function(e){return e.name===a}))||{};r=l[u.key]}if(!n&&!m&&!r)return e;var p=Math.max(n||0,m||0);return{elemMax:Math.max(p,e.elemMax),elemAmount:e.elemAmount.concat({key:a,design:n||0,actual:m||0,predictionVal:r,unitType:o})}}),{elemMax:0,elemAmount:[]})};export{r as getElementInfo};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{useState as n,useEffect as i,useMemo as a,Fragment as r}from"react";import o from"prop-types";import{Popover as l,Typography as c,CircularProgress as s,Tooltip as m,List as p,ListItem as d,TextField as u,IconButton as f}from"@material-ui/core";import{Check as h,LayersClear as g,AddCircle as N,Layers as y,Close as S,Delete as T,Edit as v,FileCopy as b,Share as O}from"@material-ui/icons";import C from"classnames";import{omit as E,get as I}from"lodash";import R from"../TemplateSharingDialog/index.js";import{useTemplatePopoverStyles as P}from"./Styles.js";import{jsxs as q,jsx as D,Fragment as j}from"react/jsx-runtime";var k,L;function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function w(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?z(Object(i),!0).forEach((function(n){t(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):z(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var U="USER",A="DEFAULT",B="SHARED",W=(t(k={},U,"No templates yet..."),t(k,A,"No templates yet..."),t(k,B,"No shared templates yet..."),k),x=(t(L={},U,"My Template"),t(L,A,"Default Templates"),t(L,B,"Shared With Me"),L);function F(o){var k,L=o.currentUser,z=o.open,F=o.anchorEl,G=o.anchorOrigin,M=o.transformOrigin,H=o.onClose,K=o.templates,J=o.activeTemplateId,Q=o.getDefaultTemplates,V=o.getUserTemplates,X=o.getSharedTemplates,Y=o.onAddNewTemplate,Z=o.onTemplateDelete,$=o.onTemplateCopy,_=o.onTemplateEdit,ee=o.onTemplateShare,te=o.onActiveTemplateChange,ne=o.loading,ie=o.classes,ae=o.hasNameSlot,re=o.renderSlot,oe=P(),le=n(K),ce=e(le,2),se=ce[0],me=ce[1],pe=n(null),de=e(pe,2),ue=de[0],fe=de[1],he=n({}),ge=e(he,2),Ne=ge[0],ye=ge[1];i((function(){me(K)}),[K]);var Se=a((function(){return[{type:U,templatesList:V(se)},{type:A,templatesList:Q(se)},{type:B,templatesList:X(se)}]}),[se]),Te=function(e){return function(){te(e)}},ve=function(e,t){return function(n){n.stopPropagation(),t(e)}},be=function(e){return function(t){t.stopPropagation(),me(se.map((function(t){return t.id===e?w(w({},t),{},{isEditing:!0,prevName:t.name}):t})))}},Oe=function(e){return function(t){t.stopPropagation(),me(se.map((function(t){return t.id===e?w(w({},t),{},{isEditing:!1}):t})));var n=se.find((function(t){return t.id===e}));_(E(n,["prevName","isEditing"]))}},Ce=function(e){return function(t){t.stopPropagation(),me(se.map((function(t){return t.id===e?w(w({},t),{},{name:t.prevName,isEditing:!1}):t})))}},Ee=function(e){return function(t){if("Enter"===t.key){me(se.map((function(t){return t.id===e?w(w({},t),{},{isEditing:!1}):t})));var n=se.find((function(t){return t.id===e}));_(E(n,["prevName","isEditing"]))}}},Ie=function(e){return function(t){t.stopPropagation();var n=se.find((function(t){return t.id===e}));fe(n)}},Re=function(){fe(null)};return q(l,{id:"app-settings-template-popper",classes:{paper:C(oe.paper,ie.paper)},open:z,anchorEl:F,onClose:H,anchorOrigin:G,transformOrigin:M,children:[q("div",{className:oe.paperWrapper,children:[q("div",{className:oe.titleWrapper,children:[D(c,{className:oe.title,children:"Templates"}),ne&&D(s,{size:16})]}),D("div",{className:C(oe.selectedGroup,(k={},t(k,oe.selectedGroupSelected,-100===J),t(k,oe.selectedGroupUnSelected,-100!==J),k)),onClick:Te(-100),children:q("div",{className:oe.noTemplateItem,children:[D(-100===J?h:g,{fontSize:"small",className:oe.selectedIcon}),D("div",{className:oe.selectedLabel,children:"No Template Selected"})]})}),Se.map((function(e){var n=e.type,i=e.templatesList;return q(r,{children:[q("div",{className:oe.templateHeader,children:[D(c,{className:oe.subtitle,children:x[n]}),n===U&&D(m,{title:"Create Template",placement:"right",children:D(N,{fontSize:"small",color:"primary",className:oe.addNewTemplateIcon,onClick:Y})})]}),0===i.length?D(c,{className:oe.noTemplateLabel,children:W[n]}):D(p,{className:oe.templateList,children:i.map((function(e){var i,a;return q(d,{className:C(oe.templateListItem,(i={},t(i,oe.templateListItemSelected,e.id===J),t(i,oe.templateListItemUnSelected,e.id!==J),i)),onClick:Te(e.id),children:[e.id===J?D(h,w({fontSize:"small"},e.isEditing&&{color:"primary"})):D(y,w({fontSize:"small"},e.isEditing&&{color:"primary"})),e.isEditing?D(u,{autoFocus:!0,className:oe.templateListItemInput,value:e.name,onClick:function(e){return e.stopPropagation()},onChange:(a=e.id,function(e){e.stopPropagation(),se.filter((function(e){return e.id!==a})).map((function(e){return e.name})).includes(e.target.value)?ye(w(w({},Ne),{},t({},a,"Duplicated name"))):ye(w(w({},Ne),{},t({},a,null))),me(se.map((function(t){return t.id===a?w(w({},t),{},{name:e.target.value}):t})))}),onKeyDown:Ee(e.id),error:!!Ne[e.id],helperText:Ne[e.id]}):D(c,{className:oe.templateListItemName,children:e.name}),e.isEditing?null:ae&&re(I(e,["settings","data"],[])),e.isEditing?q("div",{className:C(oe.actionWrapper,oe.actionWrapperEditing),children:[D(m,{title:"Save",children:D(f,{className:oe.actionIconButton,onClick:Oe(e.id),children:D(h,{fontSize:"small",color:"primary"})})}),D(m,{title:"Cancel",children:D(f,{className:oe.actionIconButton,onClick:Ce(e.id),children:D(S,{className:oe.actionIcon,fontSize:"small"})})})]}):D("div",{className:oe.actionWrapper,children:n===U?q(j,{children:[D(m,{title:"Delete",children:D(f,{className:oe.actionIconButton,onClick:ve(e.id,Z),children:D(T,{className:oe.actionIcon,fontSize:"small"})})}),D(m,{title:"Rename",children:D(f,{className:oe.actionIconButton,onClick:be(e.id),children:D(v,{className:oe.actionIcon,fontSize:"small"})})}),D(m,{title:"Copy",children:D(f,{className:oe.actionIconButton,onClick:ve(e.id,$),children:D(b,{className:oe.actionIcon,fontSize:"small"})})}),D(m,{title:"Share",children:D(f,{className:oe.actionIconButton,onClick:Ie(e.id),children:D(O,{className:oe.actionIcon,fontSize:"small"})})})]}):D(m,{title:"Copy To My Templates",children:D(f,{className:oe.actionIconButton,onClick:ve(e.id,$),children:D(b,{className:oe.actionIcon,fontSize:"small"})})})})]},"template-list-item-".concat(e.id))}))})]},"template-list-".concat(n))}))]}),D(R,{title:'Share "'.concat(I(ue,"name"),'"'),open:!!ue,onSave:function(e){ue&&ee(ue.id,e),Re()},onCancel:Re,currentUser:L})]})}F.propTypes={open:o.bool.isRequired,anchorEl:o.node,anchorOrigin:o.shape({}),transformOrigin:o.shape({}),onClose:o.func.isRequired,templates:o.arrayOf(o.shape({id:o.number,name:o.string,settings:o.shape({}),shared:o.bool})).isRequired,activeTemplateId:o.number.isRequired,getDefaultTemplates:o.func.isRequired,getUserTemplates:o.func.isRequired,getSharedTemplates:o.func.isRequired,onAddNewTemplate:o.func.isRequired,onTemplateDelete:o.func.isRequired,onTemplateCopy:o.func.isRequired,onTemplateEdit:o.func.isRequired,onTemplateShare:o.func.isRequired,onActiveTemplateChange:o.func.isRequired,loading:o.bool,classes:o.shape({paper:o.string}),hasNameSlot:o.bool,renderSlot:o.func.isRequired,currentUser:o.shape({}).isRequired},F.defaultProps={loading:!1,classes:{},hasNameSlot:!1,anchorEl:null,anchorOrigin:{},transformOrigin:{}};export{F as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{useState as n,useEffect as i,useMemo as a,Fragment as r}from"react";import o from"prop-types";import{Popover as l,Typography as c,CircularProgress as s,Tooltip as m,List as p,ListItem as d,TextField as u,IconButton as f}from"@material-ui/core";import{Check as h,LayersClear as g,AddCircle as N,Layers as y,Close as S,Delete as T,Edit as v,FileCopy as b,Share as O}from"@material-ui/icons";import C from"classnames";import{get as E,omit as I}from"lodash";import R from"../TemplateSharingDialog/index.js";import{useTemplatePopoverStyles as P}from"./Styles.js";import{jsxs as q,jsx as D,Fragment as j}from"react/jsx-runtime";var k,L;function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function w(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?z(Object(i),!0).forEach((function(n){t(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):z(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var U="USER",A="DEFAULT",B="SHARED",W=(t(k={},U,"No templates yet..."),t(k,A,"No templates yet..."),t(k,B,"No shared templates yet..."),k),x=(t(L={},U,"My Template"),t(L,A,"Default Templates"),t(L,B,"Shared With Me"),L);function F(o){var k,L=o.currentUser,z=o.open,F=o.anchorEl,G=o.anchorOrigin,M=o.transformOrigin,H=o.onClose,K=o.templates,J=o.activeTemplateId,Q=o.getDefaultTemplates,V=o.getUserTemplates,X=o.getSharedTemplates,Y=o.onAddNewTemplate,Z=o.onTemplateDelete,$=o.onTemplateCopy,_=o.onTemplateEdit,ee=o.onTemplateShare,te=o.onActiveTemplateChange,ne=o.loading,ie=o.classes,ae=o.hasNameSlot,re=o.renderSlot,oe=P(),le=n(K),ce=e(le,2),se=ce[0],me=ce[1],pe=n(null),de=e(pe,2),ue=de[0],fe=de[1],he=n({}),ge=e(he,2),Ne=ge[0],ye=ge[1];i((function(){me(K)}),[K]);var Se=a((function(){return[{type:U,templatesList:V(se)},{type:A,templatesList:Q(se)},{type:B,templatesList:X(se)}]}),[se]),Te=function(e){return function(){te(e)}},ve=function(e,t){return function(n){n.stopPropagation(),t(e)}},be=function(e){return function(t){t.stopPropagation(),me(se.map((function(t){return t.id===e?w(w({},t),{},{isEditing:!0,prevName:t.name}):t})))}},Oe=function(e){return function(t){t.stopPropagation(),me(se.map((function(t){return t.id===e?w(w({},t),{},{isEditing:!1}):t})));var n=se.find((function(t){return t.id===e}));_(I(n,["prevName","isEditing"]))}},Ce=function(e){return function(t){t.stopPropagation(),me(se.map((function(t){return t.id===e?w(w({},t),{},{name:t.prevName,isEditing:!1}):t})))}},Ee=function(e){return function(t){if("Enter"===t.key){me(se.map((function(t){return t.id===e?w(w({},t),{},{isEditing:!1}):t})));var n=se.find((function(t){return t.id===e}));_(I(n,["prevName","isEditing"]))}}},Ie=function(e){return function(t){t.stopPropagation();var n=se.find((function(t){return t.id===e}));fe(n)}},Re=function(){fe(null)};return q(l,{id:"app-settings-template-popper",classes:{paper:C(oe.paper,ie.paper)},open:z,anchorEl:F,onClose:H,anchorOrigin:G,transformOrigin:M,children:[q("div",{className:oe.paperWrapper,children:[q("div",{className:oe.titleWrapper,children:[D(c,{className:oe.title,children:"Templates"}),ne&&D(s,{size:16})]}),D("div",{className:C(oe.selectedGroup,(k={},t(k,oe.selectedGroupSelected,-100===J),t(k,oe.selectedGroupUnSelected,-100!==J),k)),onClick:Te(-100),children:q("div",{className:oe.noTemplateItem,children:[D(-100===J?h:g,{fontSize:"small",className:oe.selectedIcon}),D("div",{className:oe.selectedLabel,children:"No Template Selected"})]})}),Se.map((function(e){var n=e.type,i=e.templatesList;return q(r,{children:[q("div",{className:oe.templateHeader,children:[D(c,{className:oe.subtitle,children:x[n]}),n===U&&D(m,{title:"Create Template",placement:"right",children:D(N,{fontSize:"small",color:"primary",className:oe.addNewTemplateIcon,onClick:Y})})]}),0===i.length?D(c,{className:oe.noTemplateLabel,children:W[n]}):D(p,{className:oe.templateList,children:i.map((function(e){var i,a;return q(d,{className:C(oe.templateListItem,(i={},t(i,oe.templateListItemSelected,e.id===J),t(i,oe.templateListItemUnSelected,e.id!==J),i)),onClick:Te(e.id),children:[e.id===J?D(h,w({fontSize:"small"},e.isEditing&&{color:"primary"})):D(y,w({fontSize:"small"},e.isEditing&&{color:"primary"})),e.isEditing?D(u,{autoFocus:!0,className:oe.templateListItemInput,value:e.name,onClick:function(e){return e.stopPropagation()},onChange:(a=e.id,function(e){e.stopPropagation(),se.filter((function(e){return e.id!==a})).map((function(e){return e.name})).includes(e.target.value)?ye(w(w({},Ne),{},t({},a,"Duplicated name"))):ye(w(w({},Ne),{},t({},a,null))),me(se.map((function(t){return t.id===a?w(w({},t),{},{name:e.target.value}):t})))}),onKeyDown:Ee(e.id),error:!!Ne[e.id],helperText:Ne[e.id]}):D(c,{className:oe.templateListItemName,children:e.name}),e.isEditing?null:ae&&re(E(e,["settings","data"],[])),e.isEditing?q("div",{className:C(oe.actionWrapper,oe.actionWrapperEditing),children:[D(m,{title:"Save",children:D(f,{className:oe.actionIconButton,onClick:Oe(e.id),children:D(h,{fontSize:"small",color:"primary"})})}),D(m,{title:"Cancel",children:D(f,{className:oe.actionIconButton,onClick:Ce(e.id),children:D(S,{className:oe.actionIcon,fontSize:"small"})})})]}):D("div",{className:oe.actionWrapper,children:n===U?q(j,{children:[D(m,{title:"Delete",children:D(f,{className:oe.actionIconButton,onClick:ve(e.id,Z),children:D(T,{className:oe.actionIcon,fontSize:"small"})})}),D(m,{title:"Rename",children:D(f,{className:oe.actionIconButton,onClick:be(e.id),children:D(v,{className:oe.actionIcon,fontSize:"small"})})}),D(m,{title:"Copy",children:D(f,{className:oe.actionIconButton,onClick:ve(e.id,$),children:D(b,{className:oe.actionIcon,fontSize:"small"})})}),D(m,{title:"Share",children:D(f,{className:oe.actionIconButton,onClick:Ie(e.id),children:D(O,{className:oe.actionIcon,fontSize:"small"})})})]}):D(m,{title:"Copy To My Templates",children:D(f,{className:oe.actionIconButton,onClick:ve(e.id,$),children:D(b,{className:oe.actionIcon,fontSize:"small"})})})})]},"template-list-item-".concat(e.id))}))})]},"template-list-".concat(n))}))]}),D(R,{title:'Share "'.concat(E(ue,"name"),'"'),open:!!ue,onSave:function(e){ue&&ee(ue.id,e),Re()},onCancel:Re,currentUser:L})]})}F.propTypes={open:o.bool.isRequired,anchorEl:o.node,anchorOrigin:o.shape({}),transformOrigin:o.shape({}),onClose:o.func.isRequired,templates:o.arrayOf(o.shape({id:o.number,name:o.string,settings:o.shape({}),shared:o.bool})).isRequired,activeTemplateId:o.number.isRequired,getDefaultTemplates:o.func.isRequired,getUserTemplates:o.func.isRequired,getSharedTemplates:o.func.isRequired,onAddNewTemplate:o.func.isRequired,onTemplateDelete:o.func.isRequired,onTemplateCopy:o.func.isRequired,onTemplateEdit:o.func.isRequired,onTemplateShare:o.func.isRequired,onActiveTemplateChange:o.func.isRequired,loading:o.bool,classes:o.shape({paper:o.string}),hasNameSlot:o.bool,renderSlot:o.func.isRequired,currentUser:o.shape({}).isRequired},F.defaultProps={loading:!1,classes:{},hasNameSlot:!1,anchorEl:null,anchorOrigin:{},transformOrigin:{}};export{F as default};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/regenerator";import{useState as u,useRef as a,useMemo as i,useEffect as o}from"react";import{parse as c}from"querystring";import s from"uuid/v1";import{castArray as p,differenceBy as f,omit as l,merge as m,concat as b,mapValues as d}from"lodash";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(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))}))}return r}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=t(n.mark((function r(e,u){var a,i,o;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=u.timeQuery,i=u.appKey,o=e.map(function(){var r=t(n.mark((function r(t){var e,u,o,c,s,p,f,l,m;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.provider,u=t.collection,o=t.assetId,c=t.subscribeOnly,s=t.params,!c){r.next=3;break}return r.abrupt("return",null);case 3:return p=s.query,f=a?"{timestamp#lte#".concat(a.timestamp.$lte):"",l=p&&f?"AND":"",m="".concat(p).concat(l).concat(f),r.prev=7,r.next=10,v(e,u,o,j(j(j({},s),m?{query:m}:{}),{},{appKey:i}));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(o));case 3:case"end":return r.stop()}}),r)}))),x.apply(this,arguments)}function P(r,t){return E.apply(this,arguments)}function E(){return E=t(n.mark((function r(e,u){var a,i,o;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=u.timeQuery,i=u.appKey,o=e.map(function(){var r=t(n.mark((function r(t){var e,u,o,c,s,p,f,l,b,y,v,w;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.provider,u=t.collection,o=t.assetId,c=t.subscribeOnly,s=t.params,p=void 0===s?{}:s,!c){r.next=3;break}return r.abrupt("return",null);case 3:if(!p.aggregate){r.next=5;break}return r.abrupt("return",O(e,u,j({},d(p.aggregate,JSON.stringify))));case 5:return f=JSON.stringify(m({asset_id:o},p.query,a)),l=p.limit,b=void 0===l?1:l,y=p.sort,v=void 0===y?'{"timestamp": 1}':y,r.prev=7,w=j(j({},p),{},{limit:b,sort:v,query:f,appKey:i}),r.next=11,h(e,u,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)}))),E.apply(this,arguments)}function D(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=n.timestamp,d=n.isOldApiUsed,v=u({}),h=r(v,2),O=h[0],w=h[1],g=a();g.current||(g.current=s());var x=window[Symbol.for("socket")],E=x.subscribe,D=x.unsubscribe,S=x.socket,q=i((function(){return y()}),[]),A=a([]),K=p(t).map((function(r){return I(r,g.current,q)})),N=K.map((function(r){return r.subId})).join(),Q=i((function(){if(m)return{timestamp:{$lte:m}};var r=c(window.location.search).time;return r?{timestamp:{$lte:new Date(r)/1e3}}:null}),[window.location.search,m]);return o((function(){var r=function(r){r.hookId===g.current&&w((function(t){var n=r.data;return r.subId in t&&!r.subscribeOnly&&(n=b(t[r.subId],r.data)),r.params&&r.params.limit&&(n=n.slice(-r.params.limit)),j(j({},t),{},e({},r.subId,n))}))};return S&&S.on("data",r),function(){return S&&S.off("data",r)}}),[]),o((function(){A.current.forEach(D),A.current=[]}),[Q]),o((function(){var r=A.current,t=f(K,r,"subId"),e=f(r,K,"subId");t.forEach((function(r){Q&&!r.alwaysSubscribe||E(r)})),e.forEach(D),A.current=K,(d?k:P)(t,{timeQuery:Q,appKey:q,isOldApiUsed:d}).then((function(r){return w((function(n){var u=l(n,e.map((function(r){return r.subId})));return t.forEach((function(t,e){null!==r[e]&&(u[t.subId]=r[e])})),u}))}))}),[N,Q]),o((function(){return function(){return A.current.forEach(D)}}),[]),i((function(){return K.map((function(r){var t=r.subId;return{loading:!(t in O),data:O[t]}}))}),[O,N])}export{D as default};
1
+ import r from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/regenerator";import{useState as u,useRef as a,useMemo as i,useEffect as o}from"react";import{parse as c}from"querystring";import s from"uuid/v1";import{castArray as p,differenceBy as f,omit as l,concat as m,merge as b,mapValues as d}from"lodash";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(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))}))}return r}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=t(n.mark((function r(e,u){var a,i,o;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=u.timeQuery,i=u.appKey,o=e.map(function(){var r=t(n.mark((function r(t){var e,u,o,c,s,p,f,l,m;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.provider,u=t.collection,o=t.assetId,c=t.subscribeOnly,s=t.params,!c){r.next=3;break}return r.abrupt("return",null);case 3:return p=s.query,f=a?"{timestamp#lte#".concat(a.timestamp.$lte):"",l=p&&f?"AND":"",m="".concat(p).concat(l).concat(f),r.prev=7,r.next=10,v(e,u,o,j(j(j({},s),m?{query:m}:{}),{},{appKey:i}));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(o));case 3:case"end":return r.stop()}}),r)}))),x.apply(this,arguments)}function P(r,t){return E.apply(this,arguments)}function E(){return E=t(n.mark((function r(e,u){var a,i,o;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=u.timeQuery,i=u.appKey,o=e.map(function(){var r=t(n.mark((function r(t){var e,u,o,c,s,p,f,l,m,y,v,w;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.provider,u=t.collection,o=t.assetId,c=t.subscribeOnly,s=t.params,p=void 0===s?{}:s,!c){r.next=3;break}return r.abrupt("return",null);case 3:if(!p.aggregate){r.next=5;break}return r.abrupt("return",O(e,u,j({},d(p.aggregate,JSON.stringify))));case 5:return f=JSON.stringify(b({asset_id:o},p.query,a)),l=p.limit,m=void 0===l?1:l,y=p.sort,v=void 0===y?'{"timestamp": 1}':y,r.prev=7,w=j(j({},p),{},{limit:m,sort:v,query:f,appKey:i}),r.next=11,h(e,u,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)}))),E.apply(this,arguments)}function D(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},b=n.timestamp,d=n.isOldApiUsed,v=u({}),h=r(v,2),O=h[0],w=h[1],g=a();g.current||(g.current=s());var x=window[Symbol.for("socket")],E=x.subscribe,D=x.unsubscribe,S=x.socket,q=i((function(){return y()}),[]),A=a([]),K=p(t).map((function(r){return I(r,g.current,q)})),N=K.map((function(r){return r.subId})).join(),Q=i((function(){if(b)return{timestamp:{$lte:b}};var r=c(window.location.search).time;return r?{timestamp:{$lte:new Date(r)/1e3}}:null}),[window.location.search,b]);return o((function(){var r=function(r){r.hookId===g.current&&w((function(t){var n=r.data;return r.subId in t&&!r.subscribeOnly&&(n=m(t[r.subId],r.data)),r.params&&r.params.limit&&(n=n.slice(-r.params.limit)),j(j({},t),{},e({},r.subId,n))}))};return S&&S.on("data",r),function(){return S&&S.off("data",r)}}),[]),o((function(){A.current.forEach(D),A.current=[]}),[Q]),o((function(){var r=A.current,t=f(K,r,"subId"),e=f(r,K,"subId");t.forEach((function(r){Q&&!r.alwaysSubscribe||E(r)})),e.forEach(D),A.current=K,(d?k:P)(t,{timeQuery:Q,appKey:q,isOldApiUsed:d}).then((function(r){return w((function(n){var u=l(n,e.map((function(r){return r.subId})));return t.forEach((function(t,e){null!==r[e]&&(u[t.subId]=r[e])})),u}))}))}),[N,Q]),o((function(){return function(){return A.current.forEach(D)}}),[]),i((function(){return K.map((function(r){var t=r.subId;return{loading:!(t in O),data:O[t]}}))}),[O,N])}export{D as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.41.0-9",
3
+ "version": "0.42.0-1",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -90,7 +90,7 @@
90
90
  "auth0-js": "^9.14.0",
91
91
  "babel-eslint": "10.0.3",
92
92
  "babel-jest": "^26.3.0",
93
- "babel-loader": "8.0.6",
93
+ "babel-loader": "8.1.0",
94
94
  "babel-plugin-file-loader": "^2.0.0",
95
95
  "babel-plugin-root-import": "^6.5.0",
96
96
  "chalk": "4.1.1",
@@ -167,10 +167,10 @@
167
167
  "use-tiny-state-machine": "^0.0.2",
168
168
  "uuid": "3.4.0",
169
169
  "video-extensions": "1.1.0",
170
- "webpack": "4.41.5",
170
+ "webpack": "4.44.2",
171
171
  "webpack-bundle-analyzer": "3.9.0",
172
172
  "webpack-cli": "3.3.6",
173
- "webpack-dev-server": "3.10.2",
173
+ "webpack-dev-server": "3.11.1",
174
174
  "webpack-manifest-plugin": "2.2.0",
175
175
  "webpack-merge": "5.7.2",
176
176
  "zoid": "^9.0.86"
@@ -8,11 +8,12 @@ body {
8
8
  }
9
9
 
10
10
  body {
11
- scrollbar-color: #a4a4a7b8 transparent;
11
+ scrollbar-color: rgba(0, 0, 0, 0.6) transparent !important;
12
12
  }
13
13
 
14
14
  ::-webkit-scrollbar {
15
15
  width: 16px;
16
+ height: 16px;
16
17
  }
17
18
 
18
19
  ::-webkit-scrollbar-track {
@@ -20,17 +21,12 @@ body {
20
21
  }
21
22
 
22
23
  ::-webkit-scrollbar-track:hover {
23
- background-color: #a4a4a752;
24
+ background-color: transparent;
24
25
  }
25
26
 
26
27
  ::-webkit-scrollbar-thumb {
27
- background-color: #a4a4a7b8;
28
+ background-color: rgba(0, 0, 0, 0.6) !important;
28
29
  border-radius: 10px;
29
30
  border: 5px solid rgba(0, 0, 0, 0.01);
30
31
  background-clip: padding-box;
31
32
  }
32
- ::-webkit-scrollbar-thumb:hover,
33
- ::-webkit-scrollbar-thumb:active {
34
- background-color: #a0a0a5;
35
- border: 4px solid rgba(0, 0, 0, 0.01);
36
- }
@@ -1 +1 @@
1
- import r from'./../ext-esm/style-inject/dist/style-inject.es.js';var o={},a="body{-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;overflow:auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#a4a4a7b8 transparent;scrollbar-width:thin}::-webkit-scrollbar{width:16px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-track:hover{background-color:#a4a4a752}::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#a4a4a7b8;border:5px solid rgba(0,0,0,.01);border-radius:10px}::-webkit-scrollbar-thumb:active,::-webkit-scrollbar-thumb:hover{background-color:#a0a0a5;border:4px solid rgba(0,0,0,.01)}";r("body{-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;overflow:auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#a4a4a7b8 transparent;scrollbar-width:thin}::-webkit-scrollbar{width:16px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-track:hover{background-color:#a4a4a752}::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#a4a4a7b8;border:5px solid rgba(0,0,0,.01);border-radius:10px}::-webkit-scrollbar-thumb:active,::-webkit-scrollbar-thumb:hover{background-color:#a0a0a5;border:4px solid rgba(0,0,0,.01)}");export{o as default,a as stylesheet};
1
+ import r from'./../ext-esm/style-inject/dist/style-inject.es.js';r("body{-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;overflow:auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:rgba(0,0,0,.6) transparent!important;scrollbar-width:thin}::-webkit-scrollbar{height:16px;width:16px}::-webkit-scrollbar-track,::-webkit-scrollbar-track:hover{background-color:transparent}::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:rgba(0,0,0,.6)!important;border:5px solid rgba(0,0,0,.01);border-radius:10px}");
@@ -1 +1,8 @@
1
- import"./index.global.css.js";import"./reactVirtualized.global.css.js";import"./emojiMart.global.css.js";import"./mapbox.global.css.js";import"./lightbox.global.css.js";import"./generatedThemesVariables.global.css.js";navigator.platform.indexOf("Mac")>-1||import("./customScrollbars.global.css.js");
1
+ import '~/styles/index.global.css';
2
+ import '~/styles/reactVirtualized.global.css';
3
+ import '~/styles/emojiMart.global.css';
4
+ // TODO: Config loader to properly load url(path) converting them to base64 images
5
+ import '~/styles/mapbox.global.css';
6
+ import '~/styles/lightbox.global.css';
7
+ import '~/styles/generatedThemesVariables.global.css';
8
+ import '~/styles/customScrollbars.global.css';
package/utils/convert.js CHANGED
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import t from"corva-convert-units";import{sortBy as n,uniqBy as e}from"lodash";import{IMPERIAL_UNITS as o,METRIC_UNITS as i,UNIT_DEFINITIONS as u}from"./constants/units.js";function c(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.push.apply(n,e)}return n}function f(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?c(Object(e),!0).forEach((function(n){r(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var l="custom",a="imperial",s={imperial:o,metric:i,custom:{}},p=a,v=[],m=function(){return u},b=function(){return s[p]};var g=function(r){var t,n=r.userUnits,e=r.companyUnits;n||e?(s.custom=f(f(f({},o),e),n),p=l):(s.custom={},p=a),t=s.custom,v.forEach((function(r){return r(t)}))};function d(){return s.custom}function h(r){return v.push(r),function(){v=v.filter((function(t){return t!==r}))}}var y=function(r){return s[p][r]},O=function(r){var e=u.find((function(t){return t.type===r}));return e?n(t().list(e.origin),"abbr"):[]},j=function(r){var t=O(r);return e(t,"abbr")},P=function(){return p},w=function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=t(),o=e.getUnit,i=e.describe;return null===n&&(n=s.custom[r]),o(n)?i(n).display:n},D=function(r){return s.imperial[r]},E=function(r,n,e){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2;if(!r||!e||e===o)return r;if(null===o&&(!(o=y(n))||e===o))return r;var u=t(r).from(e).to(o);return Number.isFinite(u)?Math.round(u*Math.pow(10,i))/Math.pow(10,i):u},M=function(r,t,n,e){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2;return r.map((function(r){var u=E(r.get(t),n,e,o,i);return r.set(t,u)}))},U=function(r,t){return r.map((function(r){return t.reduce((function(r,t){var n=t.key,e=t.unitType,o=t.from,i=t.to,u=t.precision,c=r.get(n),f=E(c,e,o,i,u);return r.set(n,f)}),r)}))},k=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2,u=0;u<r.length;u+=1)r[u][t]=E(r[u][t],n,e,o,i);return r},S=function(r){return t().describe(y(r)).singular},x=function(r){return t().describe(y(r)).plural},F=function(r){return t().describe(r)};export{k as convertArray,M as convertImmutables,U as convertImmutablesByBatch,E as convertValue,m as getAllUnitTypes,D as getDefaultImperialUnit,b as getDefaultUnits,j as getUniqueUnitsByType,F as getUnitDescription,w as getUnitDisplay,x as getUnitPlural,y as getUnitPreference,S as getUnitSingular,P as getUnitSystem,O as getUnitsByType,d as getUserUnits,h as subscribeForUserUnitsUpdates,g as updateUserUnits};
1
+ import r from"@babel/runtime/helpers/defineProperty";import t from"corva-convert-units";import{sortBy as n,uniqBy as e}from"lodash";import{UNIT_DEFINITIONS as o,IMPERIAL_UNITS as i,METRIC_UNITS as u}from"./constants/units.js";function c(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.push.apply(n,e)}return n}function f(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?c(Object(e),!0).forEach((function(n){r(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var l="custom",a="imperial",s={imperial:i,metric:u,custom:{}},p=a,v=[],m=function(){return o},b=function(){return s[p]};var g=function(r){var t,n=r.userUnits,e=r.companyUnits;n||e?(s.custom=f(f(f({},i),e),n),p=l):(s.custom={},p=a),t=s.custom,v.forEach((function(r){return r(t)}))};function d(){return s.custom}function h(r){return v.push(r),function(){v=v.filter((function(t){return t!==r}))}}var y=function(r){return s[p][r]},O=function(r){var e=o.find((function(t){return t.type===r}));return e?n(t().list(e.origin),"abbr"):[]},j=function(r){var t=O(r);return e(t,"abbr")},P=function(){return p},w=function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=t(),o=e.getUnit,i=e.describe;return null===n&&(n=s.custom[r]),o(n)?i(n).display:n},D=function(r){return s.imperial[r]},E=function(r,n,e){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2;if(!r||!e||e===o)return r;if(null===o&&(!(o=y(n))||e===o))return r;var u=t(r).from(e).to(o);return Number.isFinite(u)?Math.round(u*Math.pow(10,i))/Math.pow(10,i):u},M=function(r,t,n,e){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2;return r.map((function(r){var u=E(r.get(t),n,e,o,i);return r.set(t,u)}))},U=function(r,t){return r.map((function(r){return t.reduce((function(r,t){var n=t.key,e=t.unitType,o=t.from,i=t.to,u=t.precision,c=r.get(n),f=E(c,e,o,i,u);return r.set(n,f)}),r)}))},k=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2,u=0;u<r.length;u+=1)r[u][t]=E(r[u][t],n,e,o,i);return r},S=function(r){return t().describe(y(r)).singular},x=function(r){return t().describe(y(r)).plural},F=function(r){return t().describe(r)};export{k as convertArray,M as convertImmutables,U as convertImmutablesByBatch,E as convertValue,m as getAllUnitTypes,D as getDefaultImperialUnit,b as getDefaultUnits,j as getUniqueUnitsByType,F as getUnitDescription,w as getUnitDisplay,x as getUnitPlural,y as getUnitPreference,S as getUnitSingular,P as getUnitSystem,O as getUnitsByType,d as getUserUnits,h as subscribeForUserUnitsUpdates,g as updateUserUnits};