@corva/dc-platform-shared 0.11.0-1 → 0.11.0-2

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 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"../../../utils/recaptcha.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
+ 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 s}from"lodash";import{withSize as p}from"react-sizeme";import{isPhoneDetected as a,isNativeDetected as m,isMobileDetected as c}from"@corva/ui/utils/mobileDetect";import{getAppSize as l}from"@corva/ui/utils/apps";import{GRID_BREAKPOINTS as d,GRID_COLUMN_SIZES as g,GRID_ROW_HEIGHT as u,NON_DRAGGABLE_ELEMENT_SELECTOR as f}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 b}from"../../../components/AppsGridDragHandle/AppsGridDragHandle.js";import h from"../../../components/GridLockButton/index.js";import{isAppMaximized as j}from"../../../utils/devcenter.js";import"../../../utils/recaptcha.js";import{getLocalAppData as y,getAppCoordinates as O,updateLocalAppData as v}from"../utils.js";import"./withGridLayoutHOC.global.css.js";import D from"./withGridLayoutHOC.css.js";import{jsxs as L,jsx as w}from"react/jsx-runtime";var P=["size"];function S(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 H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))}))}return e}var x=".".concat(b.GRID_LAYOUT_DRAG_HANDLE_CLASS),C=i(n),z=function(o){return p()((function(i){var n,p=i.size,S=t(i,P),z=p.width,A=S.manifest.application.key,G=r(null!==(n=y(A).isDraggable)&&void 0!==n&&n),R=e(G,2),E=R[0],k=R[1],F=m||c,M=j(S.devCenterRouter.location.query),W=r(O(S.manifest)),_=e(W,2),N=_[0],T=_[1],B=l({coordinates:N,dashboardWidth:z,isMaximized:M}),q=B.pixelHeight,I=B.pixelWidth,U=function(o){var t=e(o,1)[0],r=s(t,["x","y","w","h"]);T(r),v(A,{coordinates:r})};return L("div",{children:[w(C,{breakpoints:a?d.phone:d.general,cols:g,rowHeight:u,measureBeforeMount:!0,onResizeStop:U,onDragStop:U,isDraggable:!F&&E,isResizable:!F&&E,draggableCancel:f,useCSSTransforms:!1,draggableHandle:x,children:w("div",{"data-grid":N,children:L("div",{className:M?D.appMaximized:"",children:[w(o,H(H({},S),{},{coordinates:H(H({},N),{},{pixelHeight:q,pixelWidth:I}),layoutEnvironment:{type:"general",pdfReportMode:!1}})),!F&&E&&w(b,{})]})},"with-grid-layout-hoc")}),w(h,{isDraggableAndResizable:E,onClick:function(){k(!E),v(A,{isDraggable:!E})},pageName:"DashboardPo"})]})}))};export{z as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/dc-platform-shared",
3
- "version": "0.11.0-1",
3
+ "version": "0.11.0-2",
4
4
  "description": "A library to share internal DC platform specific code",
5
5
  "main": "./dist",
6
6
  "module": "./src/index.js",
@@ -112,6 +112,7 @@
112
112
  "react-dom": "17.0.1",
113
113
  "react-grid-layout": "1.3.4",
114
114
  "react-router": "3.2.1",
115
+ "react-sizeme": "2.5.2",
115
116
  "rollup-plugin-copy": "^3.4.0",
116
117
  "sass": "^1.51.0",
117
118
  "semver": "7.2.1",