@corva/dc-platform-shared 0.1.4 → 0.1.6-0

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{ProvidePermissions as o}from"@corva/ui/permissions";import"@corva/ui/styles/index.global.css.js";import"@corva/ui/styles/reactVirtualized.global.css.js";import"@corva/ui//styles/emojiMart.global.css.js";import"@corva/ui/styles/mapbox.global.css.js";import"@corva/ui/styles/lightbox.global.css.js";import"@corva/ui/styles/generatedThemesVariables.global.css.js";import"@corva/ui/styles/customScrollbars.global.css.js";import"@corva/ui/config/initGlobalDependencies";import t from"./withAppDataProviderHOC.js";import r from"./withCLIAppSettingsHOC.js";import s from"./withReactRouterHOC.js";import i from"./withGridLayoutHOC/withGridLayoutHOC.js";import a from"./withPDFLayoutHOC.js";import{withDevCenterRouterHOC as e}from"./withDevCenterRouterHOC.js";import{isPDFReportView as m}from"./utils.js";import{jsx as p}from"react/jsx-runtime";var l=function(l){var c=l.component,n=l.settings,u=l.manifest,j=l.packageJson;return function(){var l=r(t({CLIAppComponent:c,CLIAppSettings:n,packageJson:j})),f=m?a(l):i(l),g=s(e(f));return p(o,{children:p(g,{manifest:u,dashboardProps:{}})})}};export{l as default};
1
+ import*as o from"@corva/ui";import{ProvidePermissions as r}from"@corva/ui/permissions";import"@corva/ui/styles/index.global.css.js";import"@corva/ui/styles/reactVirtualized.global.css.js";import"@corva/ui/styles/emojiMart.global.css.js";import"@corva/ui/styles/mapbox.global.css.js";import"@corva/ui/styles/lightbox.global.css.js";import"@corva/ui/styles/generatedThemesVariables.global.css.js";import"@corva/ui/styles/customScrollbars.global.css.js";import"@corva/ui/config/initGlobalDependencies";import t from"./withAppDataProviderHOC.js";import s from"./withCLIAppSettingsHOC.js";import i from"./withReactRouterHOC.js";import a 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 c}from"react/jsx-runtime";window["@corva/ui"]=o;var l=function(o){var l=o.component,n=o.settings,u=o.manifest,f=o.packageJson;return function(){var o=s(t({CLIAppComponent:l,CLIAppSettings:n,packageJson:f})),j=p?e(o):a(o),v=i(m(j));return c(r,{children:c(v,{manifest:u,dashboardProps:{}})})}};export{l as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as o}from"react";import{WidthProvider as i,Responsive as a}from"react-grid-layout";import{pick as n}from"lodash";import{isPhoneDetected as s,isNativeDetected as c,isMobileDetected as p}from"@corva/ui/utils/mobileDetect";import{getAppSize as l}from"@corva/ui/utils/apps";import{GRID_BREAKPOINTS as m,GRID_COLUMN_SIZES as u,GRID_ROW_HEIGHT as d,NON_DRAGGABLE_ELEMENT_SELECTOR as f}from"@corva/ui/constants/apps";import{AppsGridDragHandle as b,GridLockButton as g}from"@corva/ui/components";import{isAppMaximized as h}from"../../../utils/devcenter.js";import{getLocalAppData as y,getAppCoordinates as O,updateLocalAppData as v}from"../utils.js";import"./withGridLayoutHOC.global.css.js";import j from"./withGridLayoutHOC.css.js";import{jsxs as D,jsx as w}from"react/jsx-runtime";var P=["width"];function x(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function S(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?x(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):x(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var C=".".concat(b.GRID_LAYOUT_DRAG_HANDLE_CLASS),H=i(a),R=function(e){return i((function(i){var a,x=i.width,R=t(i,P),A=R.manifest.application.key,z=o(null!==(a=y(A).isDraggable)&&void 0!==a&&a),L=r(z,2),k=L[0],E=L[1],G=c||p,M=h(R.devCenterRouter.location.query),W=o(O(R.manifest)),_=r(W,2),N=_[0],T=_[1],q=l({coordinates:N,dashboardWidth:x,isMaximized:M}),B=q.pixelHeight,I=q.pixelWidth,U=function(e){var t=r(e,1)[0],o=n(t,["x","y","w","h"]);T(o),v(A,{coordinates:o})};return D("div",{children:[w(H,{breakpoints:s?m.phone:m.general,cols:u,rowHeight:d,measureBeforeMount:!0,onResizeStop:U,onDragStop:U,isDraggable:!G&&k,isResizable:!G&&k,draggableCancel:f,useCSSTransforms:!1,draggableHandle:C,children:w("div",{"data-grid":N,children:D("div",{className:M?j.appMaximized:"",children:[w(e,S(S({},R),{},{coordinates:S(S({},N),{},{pixelHeight:B,pixelWidth:I}),layoutEnvironment:{type:"general",pdfReportMode:!1}})),!G&&k&&w(b,{})]})},"with-grid-layout-hoc")}),w(g,{isDraggableAndResizable:k,onClick:function(){E(!k),v(A,{isDraggable:!k})},pageName:"DashboardPo"})]})}))};export{R as default};
1
+ import o from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as r}from"react";import{WidthProvider as i,Responsive as n}from"react-grid-layout";import{pick as p}from"lodash";import{isPhoneDetected as s,isNativeDetected as a,isMobileDetected as m}from"@corva/ui/utils/mobileDetect";import{getAppSize as c}from"@corva/ui/utils/apps";import{GRID_BREAKPOINTS as l,GRID_COLUMN_SIZES as d,GRID_ROW_HEIGHT as g,NON_DRAGGABLE_ELEMENT_SELECTOR as u}from"@corva/ui/constants/apps";import"../../../components/Login/components/Login.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/HiddenEmailField.js";import"../../../components/Login/components/EmailField.js";import{AppsGridDragHandle as f}from"../../../components/AppsGridDragHandle/AppsGridDragHandle.js";import b from"../../../components/GridLockButton/index.js";import{isAppMaximized as h}from"../../../utils/devcenter.js";import{getLocalAppData as j,getAppCoordinates as y,updateLocalAppData as O}from"../utils.js";import"./withGridLayoutHOC.global.css.js";import v from"./withGridLayoutHOC.css.js";import{jsxs as D,jsx as L}from"react/jsx-runtime";var w=["width"];function P(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),t.push.apply(t,r)}return t}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))}))}return e}var H=".".concat(f.GRID_LAYOUT_DRAG_HANDLE_CLASS),x=i(n),C=function(o){return i((function(i){var n,P=i.width,C=t(i,w),A=C.manifest.application.key,G=r(null!==(n=j(A).isDraggable)&&void 0!==n&&n),R=e(G,2),E=R[0],k=R[1],z=a||m,F=h(C.devCenterRouter.location.query),M=r(y(C.manifest)),W=e(M,2),_=W[0],N=W[1],T=c({coordinates:_,dashboardWidth:P,isMaximized:F}),B=T.pixelHeight,q=T.pixelWidth,I=function(o){var t=e(o,1)[0],r=p(t,["x","y","w","h"]);N(r),O(A,{coordinates:r})};return D("div",{children:[L(x,{breakpoints:s?l.phone:l.general,cols:d,rowHeight:g,measureBeforeMount:!0,onResizeStop:I,onDragStop:I,isDraggable:!z&&E,isResizable:!z&&E,draggableCancel:u,useCSSTransforms:!1,draggableHandle:H,children:L("div",{"data-grid":_,children:D("div",{className:F?v.appMaximized:"",children:[L(o,S(S({},C),{},{coordinates:S(S({},_),{},{pixelHeight:B,pixelWidth:q}),layoutEnvironment:{type:"general",pdfReportMode:!1}})),!z&&E&&L(f,{})]})},"with-grid-layout-hoc")}),L(b,{isDraggableAndResizable:E,onClick:function(){k(!E),O(A,{isDraggable:!E})},pageName:"DashboardPo"})]})}))};export{C as default};
@@ -1 +1 @@
1
- import t from"react-dom";import o from"prop-types";import{makeStyles as n}from"@material-ui/core";import{DevCenterIsolatedAppPage as e}from"@corva/ui/components";import{jsx as p}from"react/jsx-runtime";var r=n((function(){return{reportsContainer:{zoom:"0.5"}}}));function m(t){var o=t.CLIAppComponent,n=t.CLIAppSettings,m=r();return p(e,{CLIAppComponent:o,CLIAppSettings:n,containerReportClassName:m.reportsContainer})}m.propTypes={CLIAppComponent:o.node,CLIAppSettings:o.node},m.defaultProps={CLIAppComponent:null,CLIAppSettings:null},import("".concat(process.env.DEV_CENTER_APP_PATH,"/src/index.js")).then((function(o){var n=o.default.component,e=o.default.settings;t.render(p(m,{CLIAppComponent:n,CLIAppSettings:e}),document.getElementById("root"))}));
1
+ import o from"react-dom";import t from"prop-types";import{makeStyles as n}from"@material-ui/core";import*as p from"@corva/ui";import{DevCenterIsolatedAppPage as e}from"@corva/ui/components";import{jsx as r}from"react/jsx-runtime";window["@corva/ui"]=p;var i=n((function(){return{reportsContainer:{zoom:"0.5"}}}));function m(o){var t=o.CLIAppComponent,n=o.CLIAppSettings,p=i();return r(e,{CLIAppComponent:t,CLIAppSettings:n,containerReportClassName:p.reportsContainer})}m.propTypes={CLIAppComponent:t.node,CLIAppSettings:t.node},m.defaultProps={CLIAppComponent:null,CLIAppSettings:null},import("".concat(process.env.DEV_CENTER_APP_PATH,"/src/index.js")).then((function(t){var n=t.default.component,p=t.default.settings;o.render(r(m,{CLIAppComponent:n,CLIAppSettings:p}),document.getElementById("root"))}));
@@ -1 +1 @@
1
- "use strict";var e=require('./../../../ext-cjs/@babel/runtime/helpers/defineProperty.js'),r=require("./webpack.config.common.js"),t=require("./constants.js"),o=require("./plugins/checkCorvaUIVersion.js"),n=require("./utils/middlewares.js");function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function i(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?s(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var c=require("@pmmmwh/react-refresh-webpack-plugin"),l=require("webpack-merge").merge,p=require("path"),a=require("webpack"),u=require("clean-webpack-plugin").CleanWebpackPlugin,d=require("copy-webpack-plugin"),m=require("html-webpack-plugin"),v=require("chalk");require("dotenv").config({path:p.resolve(r.APP_DIRECTORY,"./.env")});module.exports=function(e,s){var P,_=process.env.HOST||s.host||"localhost",O=process.env.PORT||s.port||8080;return l(r.default(e,s),{mode:"development",devtool:"inline-source-map",devServer:{contentBase:"./dist",public:"".concat(_,":").concat(O),port:O,before:function(e){return n.onBeforeSetUpMiddleware(e,{APP_DIRECTORY:r.APP_DIRECTORY})},hot:!0,open:!1},entry:{devApp:p.resolve(__dirname,"DevServerEntryPoint.js"),isolatedApp:p.resolve(__dirname,"DevServerIsolatedAppEntryPoint.js")},output:{filename:"[name].js"},plugins:[new u,new d({patterns:[{from:p.resolve(__dirname,"public")},{from:p.resolve(process.cwd(),"node_modules","@corva/ui/assets"),to:"static/media",noErrorOnMissing:!0},{from:p.resolve(process.cwd(),"node_modules","@corva/dc-platform-shared/assets"),to:"static/media",noErrorOnMissing:!0}]}),new m({filename:"index.html",inject:!1,template:p.resolve(__dirname,"public","index.html")}),new m({filename:"DevCenterIsolatedAppPage.html",inject:!1,template:p.resolve(__dirname,"public","DevCenterIsolatedAppPage.html")}),new a.EnvironmentPlugin(i(i({},process.env),{},{DEV_CENTER_APP_PATH:process.cwd(),REACT_APP_ENVIRONMENT:process.env.REACT_APP_ENVIRONMENT||"development"},(P=process.env.CORVA_API_ENV||t.CORVA_API_ENVS.production,P in t.CORVA_API_ENVS?t.CORVA_API_ENV_VARIABLES[P]:(console.log(v.red("CORVA_API_ENV should be one of [".concat(Object.keys(t.CORVA_API_ENVS).join(", "),"]"))),process.exit(1))))),o,new c,new a.HotModuleReplacementPlugin],module:{rules:[{test:/\.(png|jpe?g|gif)$/i,use:[{loader:"file-loader"}]},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4}}]}]}})};
1
+ "use strict";var e=require('./../../../ext-cjs/@babel/runtime/helpers/defineProperty.js'),r=require('./../../../ext-cjs/@babel/runtime/helpers/toConsumableArray.js'),n=require("./webpack.config.common.js"),o=require("./constants.js"),t=require("./plugins/checkCorvaUIVersion.js"),s=require("./utils/middlewares.js");function i(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,o)}return n}function c(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?i(Object(o),!0).forEach((function(n){e(r,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var l=require("@pmmmwh/react-refresh-webpack-plugin"),a=require("webpack-merge").merge,p=require("path"),u=require("webpack"),d=require("clean-webpack-plugin").CleanWebpackPlugin,m=require("copy-webpack-plugin"),v=require("html-webpack-plugin"),_=require("chalk");require("dotenv").config({path:p.resolve(n.APP_DIRECTORY,"./.env")});function f(e,n,o){var t="@corva/ui",s=new RegExp("(^".concat(t,"$|^").concat(t,"/)([^]+)?"));if(!e.includes("@corva/dc-platform-shared")){var i=s.exec(n);if(null!==i){var c=i[2]||"";return o(null,["window",t].concat(r(c.split("/").filter(Boolean))))}}return o()}module.exports=function(e,r){var i,P=process.env.HOST||r.host||"localhost",b=process.env.PORT||r.port||8080;return a(n.default(e,r),{mode:"development",devtool:"inline-source-map",devServer:{contentBase:"./dist",public:"".concat(P,":").concat(b),port:b,before:function(e){return s.onBeforeSetUpMiddleware(e,{APP_DIRECTORY:n.APP_DIRECTORY})},hot:!0,open:!1},entry:{devApp:p.resolve(__dirname,"DevServerEntryPoint.js"),isolatedApp:p.resolve(__dirname,"DevServerIsolatedAppEntryPoint.js")},output:{filename:"[name].js"},plugins:[new d,new m({patterns:[{from:p.resolve(__dirname,"public")},{from:p.resolve(process.cwd(),"node_modules","@corva/ui/assets"),to:"static/media",noErrorOnMissing:!0},{from:p.resolve(process.cwd(),"node_modules","@corva/dc-platform-shared/assets"),to:"static/media",noErrorOnMissing:!0}]}),new v({filename:"index.html",inject:!1,template:p.resolve(__dirname,"public","index.html")}),new v({filename:"DevCenterIsolatedAppPage.html",inject:!1,template:p.resolve(__dirname,"public","DevCenterIsolatedAppPage.html")}),new u.EnvironmentPlugin(c(c({},process.env),{},{DEV_CENTER_APP_PATH:process.cwd(),REACT_APP_ENVIRONMENT:process.env.REACT_APP_ENVIRONMENT||"development"},(i=process.env.CORVA_API_ENV||o.CORVA_API_ENVS.production,i in o.CORVA_API_ENVS?o.CORVA_API_ENV_VARIABLES[i]:(console.log(_.red("CORVA_API_ENV should be one of [".concat(Object.keys(o.CORVA_API_ENVS).join(", "),"]"))),process.exit(1))))),t,new l,new u.HotModuleReplacementPlugin],externals:f,module:{rules:[{test:/\.(png|jpe?g|gif)$/i,use:[{loader:"file-loader"}]},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4}}]}]}})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/dc-platform-shared",
3
- "version": "0.1.4",
3
+ "version": "0.1.6-0",
4
4
  "description": "A library to share internal DC platform specific code",
5
5
  "main": "./dist",
6
6
  "module": "./src/index.js",