@corva/ui 0.80.0-9 → 0.80.0-rc.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.
- package/cjs-bundle/components/Avatar/index.js +1 -1
- package/cjs-bundle/components/NewDocumentViewer/components/CsvViewer.js +1 -1
- package/cjs-bundle/components/NewDocumentViewer/constants.js +1 -1
- package/cjs-bundle/components/NewDocumentViewer/effects/useFileContent.js +1 -1
- package/cjs-bundle/components/NewDocumentViewer/utils.js +1 -1
- package/cjs-bundle/components/RangeSlider/Input.css.js +1 -1
- package/cjs-bundle/components/RangeSlider/RangeSlider.css.js +1 -1
- package/cjs-bundle/components/RangeSlider/RangeSlider.js +1 -1
- package/cjs-bundle/components/RangeSlider/constants.js +1 -1
- package/cjs-bundle/components/RangeSlider/strategies/horizontal.js +1 -1
- package/cjs-bundle/components/RangeSlider/strategies/vertical.js +1 -1
- package/cjs-bundle/components/RangeSlider/utils.js +1 -1
- package/cjs-bundle/effects/useWellnessAlerts.js +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/NewDocumentViewer/components/CsvViewer.d.ts.map +1 -1
- package/components/NewDocumentViewer/components/CsvViewer.js +1 -1
- package/components/NewDocumentViewer/constants.d.ts +1 -0
- package/components/NewDocumentViewer/constants.d.ts.map +1 -1
- package/components/NewDocumentViewer/constants.js +1 -1
- package/components/NewDocumentViewer/effects/useFileContent.d.ts.map +1 -1
- package/components/NewDocumentViewer/effects/useFileContent.js +1 -1
- package/components/NewDocumentViewer/utils.d.ts +1 -0
- package/components/NewDocumentViewer/utils.d.ts.map +1 -1
- package/components/NewDocumentViewer/utils.js +1 -1
- package/components/RangeSlider/Input.css.js +1 -1
- package/components/RangeSlider/RangeSlider.css.js +1 -1
- package/components/RangeSlider/RangeSlider.d.ts.map +1 -1
- package/components/RangeSlider/RangeSlider.js +1 -1
- package/components/RangeSlider/constants.d.ts +6 -0
- package/components/RangeSlider/constants.d.ts.map +1 -1
- package/components/RangeSlider/constants.js +1 -1
- package/components/RangeSlider/strategies/horizontal.d.ts +2 -0
- package/components/RangeSlider/strategies/horizontal.d.ts.map +1 -1
- package/components/RangeSlider/strategies/horizontal.js +1 -1
- package/components/RangeSlider/strategies/vertical.d.ts +2 -0
- package/components/RangeSlider/strategies/vertical.d.ts.map +1 -1
- package/components/RangeSlider/strategies/vertical.js +1 -1
- package/components/RangeSlider/utils.d.ts +12 -0
- package/components/RangeSlider/utils.d.ts.map +1 -1
- package/components/RangeSlider/utils.js +1 -1
- package/effects/useWellnessAlerts.d.ts.map +1 -1
- package/effects/useWellnessAlerts.js +1 -1
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),a=require("prop-types"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),a=require("prop-types"),r=require("classnames"),s=require("@material-ui/core/styles"),i=require("@material-ui/core/Avatar"),l=require("../Tooltip/Tooltip.js");require("../Tooltip/ScrollableTooltip.js");var o=require("../../utils/main.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=n(a),d=n(r),c=n(i),f=function(e){switch(e){case 24:return 12;case 32:return 14;case 40:return 16;case 48:return 20;case 128:return 64;case 200:return 80;default:return Math.floor(e/2)}},p=function(e){return{minWidth:e,width:e,height:e,lineHeight:"".concat(e,"px"),fontSize:f(e)}},m=["#5F47A4","#9078C8","#DC74FD","#F695B5","#CB4F4F","#896F65","#F3AE96","#EE7850","#DDAE67","#A6CA72","#62893D","#91C9C4","#38818D","#77B5F1","#3F4C99","#919DA4"],h=function(e){return m[Math.abs(o.hashCode(e)%m.length)]},g=function(a){var r=a.displayName,s=a.showTooltip,i=a.size,n=a.className,u=a.imgSrc,f=a.alt,m=a.classes,g=a["data-testid"];return t.jsx(l.Tooltip,e.__assign({title:r,disableFocusListener:!s,disableHoverListener:!s,disableTouchListener:!s},{children:t.jsx(c.default,e.__assign({"data-testid":g,alt:f,src:u,className:d.default(m.avatar,n),style:e.__assign(e.__assign({},p(Number(i))),{backgroundColor:!!r&&h(r)})},{children:r?o.getNameInitials(r):null}))}))},v={displayName:u.default.string,showTooltip:u.default.bool,size:u.default.number,className:u.default.string,imgSrc:u.default.string,alt:u.default.string,"data-testid":u.default.string,classes:u.default.shape({avatar:u.default.string}).isRequired};g.propTypes=v,g.defaultProps={displayName:"",showTooltip:!1,size:32,className:void 0,imgSrc:void 0,alt:void 0,"data-testid":"generic_avatar"};var b=s.withStyles((function(e){return{avatar:{color:e.palette.common.white,fontWeight:"bold"}}}))(g);exports.AvatarComponent=g,exports.default=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),r=require("react/jsx-runtime"),t=require("react-virtualized"),a=require("@material-ui/core"),i=a.makeStyles({tableWrapper:{borderTop:"1px solid #5C5C5C",borderBottom:"1px solid #5C5C5C",width:"100%",height:"100%",overflow:"scroll"},table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",border:"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{border:"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},cell:{width:200}}),l=function(t){var a=t.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),r=require("react/jsx-runtime"),t=require("react-virtualized"),a=require("@material-ui/core"),i=a.makeStyles({tableWrapper:{borderTop:"1px solid #5C5C5C",borderBottom:"1px solid #5C5C5C",width:"100%",height:"100%",overflow:"scroll"},table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",border:"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{border:"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},cell:{width:200}}),l=function(t){var a=t.cellData,l=i();return r.jsx("div",e.__assign({className:l.cell},{children:a}))};exports.CsvViewer=function(a){var n=a.fileData,o=i(),s=Object.keys(n[0]||{});return r.jsx("div",e.__assign({className:o.tableWrapper},{children:r.jsx(t.AutoSizer,{children:function(a){var i=a.height;return a.width,function(a){var i=a.height;return r.jsx(t.Table,e.__assign({className:o.table,width:200*(s.length||10),height:i,headerHeight:40,rowHeight:50,rowCount:n.length,rowGetter:function(e){var r=e.index;return n[r]}},{children:s.map((function(e){return r.jsx(t.Column,{width:200,flexGrow:1,dataKey:e,label:e,cellRenderer:function(e){var t=e.cellData;return r.jsx(l,{cellData:t})}},e)}))}))}({height:i})}})}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.FILE_EXTENSIONS={csv:"csv",txt:"txt",json:"json",pdf:"pdf"};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.FILE_EXTENSIONS={csv:"csv",txt:"txt",json:"json",pdf:"pdf",xlsx:"xlsx"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,r=require('./../../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),i=require("react"),n=require("../../../utils/fileExtension.js"),u=require("../components/TextViewer.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,r=require('./../../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),i=require("react"),n=require("../../../utils/fileExtension.js"),u=require("../components/TextViewer.js"),a=require("../components/CsvViewer.js"),o=require("../components/PdfViewer.js"),E=require("../constants.js"),c=require("../utils.js"),l=((e={})[E.FILE_EXTENSIONS.csv]=a.CsvViewer,e[E.FILE_EXTENSIONS.json]=u.TextViewer,e[E.FILE_EXTENSIONS.txt]=u.TextViewer,e[E.FILE_EXTENSIONS.pdf]=o.PdfViewer,e[E.FILE_EXTENSIONS.xlsx]=a.CsvViewer,e),f=((t={})[E.FILE_EXTENSIONS.csv]=c.getCsvData,t[E.FILE_EXTENSIONS.json]=c.getTextData,t[E.FILE_EXTENSIONS.txt]=c.getTextData,t[E.FILE_EXTENSIONS.xlsx]=c.getXlsxData,t);exports.useFileContent=function(e){var t=e.fileUrl,u=e.fileName,a=n.getFileExtension(u),o=i.useState(""),E=o[0],c=o[1],N=i.useState(!1),S=N[0],x=N[1],I=l[a];return i.useEffect((function(){t&&a&&function(e,t){r.__awaiter(void 0,void 0,void 0,(function(){var s,i,n;return r.__generator(this,(function(r){switch(r.label){case 0:if(!(s=f[t]))return[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),x(!0),[4,s(e)];case 2:return i=r.sent(),c(i),[3,5];case 3:return n=r.sent(),console.error(n),[3,5];case 4:return x(!1),[7];case 5:return[2]}}))}))}(t,a)}),[t,a]),i.useEffect((function(){t||c("")}),[t]),{fileContent:s.jsx(I,{fileData:E,fileUrl:t,fileName:u}),isLoading:S}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("papaparse");exports.getCsvData=function(r){return e.__awaiter(void 0,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,fetch(r)];case 1:return[4,e.sent().text()];case 2:return n=e.sent(),[2,(a=n,t.parse(a,{header:!0,dynamicTyping:!0,skipEmptyLines:!0}).data)]}var a}))}))},exports.getTextData=function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[4,e.sent().text()];case 2:return[2,e.sent()]}}))}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("papaparse");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(require("xlsx"));exports.getCsvData=function(r){return e.__awaiter(void 0,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,fetch(r)];case 1:return[4,e.sent().text()];case 2:return n=e.sent(),[2,(a=n,t.parse(a,{header:!0,dynamicTyping:!0,skipEmptyLines:!0}).data)]}var a}))}))},exports.getTextData=function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[4,e.sent().text()];case 2:return[2,e.sent()]}}))}))},exports.getXlsxData=function(r){return e.__awaiter(void 0,void 0,void 0,(function(){var a,s,i,u,c;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,fetch(r)];case 1:return[4,e.sent().arrayBuffer()];case 2:return a=e.sent(),s=n.read(new Uint8Array(a),{type:"array"}),i=s.SheetNames[0],u=s.Sheets[i],c=n.utils.sheet_to_csv(u),[2,t.parse(c).data]}}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')(".Input_rangeSliderInput__uoNkK{background:var(--palette-background-b-6);border:none;border:1px solid var(--palette-primary-text-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:default;display:block;font-size:14px;font-weight:500;height:24px;line-height:24px;margin:0 0 0 auto;max-width:fit-content;min-width:40px;outline:none;padding:2px 4px;text-align:center}.Input_rangeSliderInput__uoNkK:focus{background-color:var(--palette-
|
|
1
|
+
"use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')(".Input_rangeSliderInput__uoNkK{background:var(--palette-background-b-6);border:none;border:1px solid var(--palette-primary-text-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:default;cursor:text;display:block;font-size:14px;font-weight:500;height:24px;line-height:24px;margin:0 0 0 auto;max-width:fit-content;min-width:40px;outline:none;padding:2px 4px;text-align:center}.Input_rangeSliderInput__uoNkK:focus{background-color:var(--palette-primary-dark)}.Input_rangeSliderInput__uoNkK:focus,.Input_rangeSliderInput__uoNkK:hover{border:1px solid var(--palette-primary-main);color:var(--palette-primary-contrast-text);text-decoration:underline}.Input_rotated__GBHlR{transform:rotate(180deg)}"),module.exports={rangeSliderInput:"Input_rangeSliderInput__uoNkK",rotated:"Input_rotated__GBHlR"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')('.RangeSlider_rangeSliderHorizontal__SAdDE{align-items:center;display:flex;padding:30px 0 12px;position:relative}.RangeSlider_rangeSliderVertical__k8ac-{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;padding:0 30px}.RangeSlider_rangeSliderRail__ufDMI{background-color:rgba(99,239,255,.24);border-radius:1px;
|
|
1
|
+
"use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')('.RangeSlider_rangeSliderHorizontal__SAdDE{align-items:center;display:flex;padding:30px 0 12px;position:relative}.RangeSlider_rangeSliderVertical__k8ac-{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;padding:0 30px}.RangeSlider_rangeSliderRail__ufDMI{background-color:rgba(99,239,255,.24);border-radius:1px;cursor:pointer;height:3px;position:relative}.RangeSlider_rangeSliderRailHorizontal__rLPtT{margin:0 6px;width:100%}.RangeSlider_rangeSliderRailHorizontal__rLPtT>.RangeSlider_rangeSliderThumb__KMaq0{cursor:ew-resize}.RangeSlider_rotatedVerticalRange__-oEIw{transform:rotate(180deg)}.RangeSlider_rangeSliderRailVertical__4zKzk{height:100%;margin:6px 0;width:2px}.RangeSlider_rangeSliderRailVertical__4zKzk>.RangeSlider_rangeSliderThumb__KMaq0{cursor:ns-resize}.RangeSlider_rangeSliderBar__Kj3LC{cursor:pointer;position:absolute;z-index:1}.RangeSlider_rangeSliderBarHorizontal__is0F7{height:12px;margin:1px 0 0;transform:translateY(-50%)}.RangeSlider_rangeSliderBarVertical__2DexQ{height:100%;margin:1px 0 0;width:12px}.RangeSlider_rangeSliderBarView__6dNQB{background:var(--palette-primary-main);border-radius:1px}.RangeSlider_rangeSliderBarViewHorizontal__6pRPw{height:3px;margin:5px 0 0;position:relative}.RangeSlider_rangeSliderBarViewVertical__W2QnY{height:100%;width:3px}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewHorizontal__6pRPw:before,.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewVertical__W2QnY:before{background:#03bcd4;border-radius:1px;content:"";opacity:.4;position:absolute}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewHorizontal__6pRPw:before{bottom:-4px;height:11px;width:100%}.RangeSlider_rangeSliderBar__Kj3LC:active{cursor:grabbing}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewVertical__W2QnY:before{height:100%;left:-4px;width:11px}.RangeSlider_rangeSliderThumb__KMaq0{align-items:center;display:flex;height:24px;justify-content:center;position:absolute;transform:translate(-50%,-50%);width:24px;z-index:1}.RangeSlider_mobileRangeSliderThumb__TEj2q.RangeSlider_rangeSliderThumb__KMaq0:hover>.RangeSlider_rangeSliderLabel__3-qO8{box-shadow:none!important}.RangeSlider_mobileRangeSliderThumb__TEj2q:hover.RangeSlider_rangeSliderThumb__KMaq0:before{background:#d9d9d9;border-radius:20px;content:"";height:39px;left:50%;opacity:.1;position:absolute;top:50%;transform:translate(-50%,-50%);width:39px}.RangeSlider_rangeSliderLabel__3-qO8{background:var(--palette-primary-main);border-radius:12px;height:12px;position:relative;transition:box-shadow .3s;width:12px}.RangeSlider_rangeSliderThumb__KMaq0:hover>.RangeSlider_rangeSliderLabel__3-qO8{box-shadow:0 0 0 8px rgba(3,188,212,.2)}.RangeSlider_rangeSliderInputDivider__PcwIK{background:var(--palette-background-b-9);color:#fff;font-size:10px;font-weight:500}.RangeSlider_rangeSliderCompactInputs__ukFLL{align-items:center;background:var(--palette-background-b-9);border-radius:4px;display:flex;justify-content:center;position:absolute;transform:translate(-50%,-50%)}.RangeSlider_disabled__8eBEv{opacity:.5;pointer-events:none}'),module.exports={rangeSliderHorizontal:"RangeSlider_rangeSliderHorizontal__SAdDE",rangeSliderVertical:"RangeSlider_rangeSliderVertical__k8ac-",rangeSliderRail:"RangeSlider_rangeSliderRail__ufDMI",rangeSliderRailHorizontal:"RangeSlider_rangeSliderRailHorizontal__rLPtT",rangeSliderThumb:"RangeSlider_rangeSliderThumb__KMaq0",rotatedVerticalRange:"RangeSlider_rotatedVerticalRange__-oEIw",rangeSliderRailVertical:"RangeSlider_rangeSliderRailVertical__4zKzk",rangeSliderBar:"RangeSlider_rangeSliderBar__Kj3LC",rangeSliderBarHorizontal:"RangeSlider_rangeSliderBarHorizontal__is0F7",rangeSliderBarVertical:"RangeSlider_rangeSliderBarVertical__2DexQ",rangeSliderBarView:"RangeSlider_rangeSliderBarView__6dNQB",rangeSliderBarViewHorizontal:"RangeSlider_rangeSliderBarViewHorizontal__6pRPw",rangeSliderBarViewVertical:"RangeSlider_rangeSliderBarViewVertical__W2QnY",mobileRangeSliderThumb:"RangeSlider_mobileRangeSliderThumb__TEj2q",rangeSliderLabel:"RangeSlider_rangeSliderLabel__3-qO8",rangeSliderInputDivider:"RangeSlider_rangeSliderInputDivider__PcwIK",rangeSliderCompactInputs:"RangeSlider_rangeSliderCompactInputs__ukFLL",disabled:"RangeSlider_disabled__8eBEv"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),n=require("react/jsx-runtime"),t=require("react"),r=require("classnames"),i=require("lodash"),o=require("prop-types"),a=require("@material-ui/core"),l=require("../../utils/mobileDetect.js"),u=require("./strategies/horizontal.js"),s=require("./strategies/vertical.js"),d=require("./utils.js"),c=require("./inputs/FromInput.js"),g=require("./inputs/ToInput.js"),R=require("./constants.js"),f=require("./RangeSlider.css.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=S(r),C=S(o),v=function(r){var o,S,C,v,p,O=r.min,b=r.max,T=r.from,F=r.to,h=r.minRange,_=r.disabled,V=r.onChange,B=r.orientation,x=r.precision,M=r.isSingleRange,I=r.isWithoutInput,j=t.useState(null),E=j[0],P=j[1],y=t.useState(null),L=y[0],q=y[1],N=t.useState({}),A=N[0],D=N[1],w=t.useState(""),U=w[0],z=w[1],H=t.useState(null),W=H[0],X=H[1],Y=t.useState(R.RangeSliderControl.FROM),Z=Y[0],k=Y[1],G=t.useState(null),J=G[0],K=G[1],Q=t.useState({}),$=Q[0],ee=Q[1],ne=t.useState(R.DEFAULT_FOCUSED_EL),te=ne[0],re=ne[1],ie=t.useRef(null),oe=t.useRef(null),ae=t.useRef(null),le=t.useRef(null),ue=t.useRef(null),se=null===(p=ie.current)||void 0===p?void 0:p.getBoundingClientRect(),de=B===R.RangeSliderOrientation.HORIZONTAL,ce=B===R.RangeSliderOrientation.VERTICAL,ge=M&&I;t.useEffect((function(){B===R.RangeSliderOrientation.HORIZONTAL&&X(u.horizontalStrategy),B===R.RangeSliderOrientation.VERTICAL&&X(s.verticalStrategy)}),[B]),t.useEffect((function(){M&&V({from:0,to:F})}),[M]),t.useEffect((function(){var e;if(W){var n=i.round(T,x),t=i.round(F,x),r=i.round(O,x),o=i.round(b,x),a=d.calculatePercentForValue(n,r,o),l=d.calculatePercentForValue(t,r,o);ee(((e={})[R.RangeSliderControl.FROM]=W.getThumbStyles(a,Z===R.RangeSliderControl.FROM),e[R.RangeSliderControl.TO]=W.getThumbStyles(l,Z===R.RangeSliderControl.TO),e[R.RangeSliderControl.BAR]=W.getBarStyles(a,l),e[R.RangeSliderControl.FROM_INPUT]=W.getInputStyles(J===R.RangeSliderControl.FROM||J===R.RangeSliderControl.BAR||te.from),e[R.RangeSliderControl.TO_INPUT]=W.getInputStyles(J===R.RangeSliderControl.TO||J===R.RangeSliderControl.BAR||te.to),e)),P(n.toString()),q(t.toString())}}),[W,O,b,T,F,J,te]);var Re=function(e){var n=W.getCoordinates(e,ie.current.getBoundingClientRect()),t=d.calculatePercentForValue(n.new,n.min,n.max),r=i.round(d.calculateValueFromPercent(t,O,b),x);if(r!==T){var o=d.updateFromValue(r,T,F,O,h);V(o)}},fe=function(e){var n=ce&&M?W.getRotatedCoordinates(e,ie.current.getBoundingClientRect()):W.getCoordinates(e,ie.current.getBoundingClientRect()),t=d.calculatePercentForValue(n.new,n.min,n.max),r=i.round(d.calculateValueFromPercent(t,O,b),x);if(r!==F){var o=d.updateToValue(r,T,F,b,h);V(o)}},Se=function(e,n){var t=W.getBarCoordinates(e,n,ie.current.getBoundingClientRect()),r=d.calculatePercentForValue(t.new,t.min,t.max),o=i.round(d.calculateValueFromPercent(r,O,b),x),a=i.round(F+(o-T),x);if(o<O){var l=O-o;o=O,a=i.round(a+l,x)}if(a>b){l=a-b;a=b,o=i.round(o-l,x)}o!==T&&a!==F&&o>=O&&a<=b&&V({from:o,to:a})},me=function(n){var t;n!==R.RangeSliderControl.BAR?re(e.__assign(e.__assign({},R.DEFAULT_FOCUSED_EL),((t={})[n]=!0,t))):re({from:!0,bar:!0,to:!0})},Ce=function(n){var t;n!==R.RangeSliderControl.BAR?re(e.__assign(e.__assign({},te),((t={})[n]=!1,t))):re(R.DEFAULT_FOCUSED_EL)},ve=function(e,n){if(!(M&&e===R.RangeSliderControl.BAR||_)){n.stopPropagation(),k(e),K(e);var t=n.clientX,r=n.clientY,o=n.target.getBoundingClientRect(),a=o.x,l=o.y,u=i.throttle((function(n){!function(e){return e===R.RangeSliderControl.FROM?Re:e===R.RangeSliderControl.TO?fe:Se}(e)(n,{clientX:t,clientY:r,x:a,y:l})}),4);document.addEventListener("mousemove",u),document.addEventListener("mouseup",(function e(){K(null),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",e)}))}},pe=function(e,n){var t=n.target.value;Number.isNaN(Number(t))||function(e){return e===R.RangeSliderControl.FROM?P:q}(e)(t)},Oe=function(e,n){var t=n.target.value,r=i.round(t,x);if(e===R.RangeSliderControl.FROM){var o=d.updateFromValue(r,T,F,O,h);V(o),P(o.from)}if(e===R.RangeSliderControl.TO){o=d.updateToValue(r,T,F,b,h);V(o),q(o.to)}};return n.jsxs("div",e.__assign({className:m.default((o={},o[f.disabled]=_,o[f.rangeSliderHorizontal]=de,o[f.rangeSliderVertical]=ce,o[f.rotatedVerticalRange]=ce&&M,o))},{children:[!M&&n.jsx(c,{compStyles:$[R.RangeSliderControl.FROM_INPUT],isVerticalOrientation:ce,max:b,disabled:_,precision:x,fromInputRef:le,from:T,fromInputValue:E,onInputChange:pe,validateInputChange:Oe}),n.jsx(a.Tooltip,e.__assign({title:U,placement:de?"top":"left",onMouseMove:function(e){var n,t=e.clientX,r=e.clientY,o=de?{clientX:t}:{clientY:r},a=W.getCoordinates(o,null===(n=ie.current)||void 0===n?void 0:n.getBoundingClientRect());if(te.bar)return z(""),void D({x:t,y:r});var l=d.calculatePercentForValue(a.new,a.min,a.max),u=i.round(d.calculateValueFromPercent(l,O,b),x);u<O&&z(O.toString()),u>b&&z(b.toString()),u>=O&&u<=b&&z(u.toString()),D({x:t,y:r})},PopperProps:{anchorEl:{clientHeight:0,clientWidth:0,getBoundingClientRect:function(){return d.getToolipBoundingClientRect({isHorizontalOrientation:de,railPosition:se,tooltipPosition:A})}}}},{children:n.jsxs("div",e.__assign({className:m.default(f.rangeSliderRail,(S={},S[f.rangeSliderRailHorizontal]=de,S[f.rangeSliderRailVertical]=ce,S)),ref:ie},{children:[!M&&n.jsx("div",e.__assign({ref:oe,className:m.default(f.rangeSliderThumb,l.isMobileDetected&&f.mobileRangeSliderThumb),style:$[R.RangeSliderControl.FROM],onMouseDown:function(e){return ve(R.RangeSliderControl.FROM,e)},onMouseEnter:function(){me(R.RangeSliderControl.FROM)},onMouseLeave:function(){Ce(R.RangeSliderControl.FROM)}},{children:n.jsx("div",{className:f.rangeSliderLabel})})),n.jsx("div",e.__assign({className:m.default(f.rangeSliderBar,(C={},C[f.rangeSliderBarHorizontal]=de,C[f.rangeSliderBarVertical]=ce,C)),style:$[R.RangeSliderControl.BAR],onMouseDown:function(e){return ve(R.RangeSliderControl.BAR,e)},onMouseEnter:function(){me(R.RangeSliderControl.BAR)},onMouseLeave:function(){Ce(R.RangeSliderControl.BAR)}},{children:n.jsx("div",{className:m.default(f.rangeSliderBarView,(v={},v[f.rangeSliderBarViewHorizontal]=de,v[f.rangeSliderBarViewVertical]=ce,v))})})),n.jsx("div",e.__assign({ref:ae,className:m.default(f.rangeSliderThumb,l.isMobileDetected&&f.mobileRangeSliderThumb),style:$[R.RangeSliderControl.TO],onMouseDown:function(e){return ve(R.RangeSliderControl.TO,e)},onMouseEnter:function(){me(R.RangeSliderControl.TO)},onMouseLeave:function(){Ce(R.RangeSliderControl.TO)}},{children:n.jsx("div",{className:f.rangeSliderLabel})}))]}))})),!ge&&n.jsx(g,{compStyles:$[R.RangeSliderControl.TO_INPUT],disabled:_,isVerticalOrientation:ce,rotated:ce&&M,max:b,precision:x,toInputRef:ue,to:F,toInputValue:L,onInputChange:pe,validateInputChange:Oe})]}))},p={min:C.default.number,max:C.default.number,from:C.default.number.isRequired,to:C.default.number.isRequired,orientation:C.default.oneOf(["horizontal","vertical"]),precision:C.default.number,minRange:C.default.number,onChange:C.default.func,isSingleRange:C.default.bool,isWithoutInput:C.default.bool,disabled:C.default.bool.isRequired};v.propTypes=p,v.defaultProps={min:0,max:100,orientation:"horizontal",precision:0,minRange:0,onChange:function(){},isSingleRange:!1,isWithoutInput:!1},module.exports=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.RangeSliderControl={FROM:"from",TO:"to",BAR:"bar",RAIL:"rail",FROM_INPUT:"from-input",TO_INPUT:"to-input",COMPACT_INPUTS:"compact-inputs"},exports.RangeSliderOrientation={HORIZONTAL:"horizontal",VERTICAL:"vertical"};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.DEFAULT_FOCUSED_EL={from:!1,bar:!1,to:!1},exports.RangeSliderControl={FROM:"from",TO:"to",BAR:"bar",RAIL:"rail",FROM_INPUT:"from-input",TO_INPUT:"to-input",COMPACT_INPUTS:"compact-inputs"},exports.RangeSliderOrientation={HORIZONTAL:"horizontal",VERTICAL:"vertical"},exports.TOOLTIP_MARGIN=6;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t={getCoordinates:function(t,e){return{new:t.clientX,min:e.x,max:e.x+e.width}},getBarCoordinates:function(t,e,n){var r=e.clientX-e.x;return{new:t.clientX-r,min:n.x,max:n.x+n.width}},getThumbStyles:function(t,e){return{top:"50%",left:"calc(".concat(t,t<50?"% + 3px)":"% - 3px)"),zIndex:e?10:2}},getBarStyles:function(t,e){return{left:"".concat(t,"%"),width:"".concat(e-t,"%")}},getInputStyles:function(t){return t?{border:"1px solid #03BCD4",color:"#ffffff",backgroundColor:"#
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t={getCoordinates:function(t,e){return{new:t.clientX,min:e.x,max:e.x+e.width}},getBarCoordinates:function(t,e,n){var r=e.clientX-e.x;return{new:t.clientX-r,min:n.x,max:n.x+n.width}},getThumbStyles:function(t,e){return{top:"50%",left:"calc(".concat(t,t<50?"% + 3px)":"% - 3px)"),zIndex:e?10:2}},getBarStyles:function(t,e){return{left:"".concat(t,"%"),width:"".concat(e-t,"%")}},getInputStyles:function(t){return t?{border:"1px solid #03BCD4",color:"#ffffff",backgroundColor:"#008ba3",textDecoration:"underline"}:{}}};exports.horizontalStrategy=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t={getCoordinates:function(t,e){return{new:t.clientY,min:e.y,max:e.y+e.height}},getRotatedCoordinates:function(t,e){return{new:e.y+e.height-t.clientY+e.y,min:e.y,max:e.y+e.height}},getBarCoordinates:function(t,e,n){var r=e.clientY-e.y;return{new:t.clientY-r,min:n.y,max:n.y+n.height}},getThumbStyles:function(t,e){return{left:"50%",top:"calc(".concat(t,t<50?"% + 3px)":"% - 3px)"),zIndex:e?10:2}},getBarStyles:function(t,e){return{top:"".concat(t,"%"),height:"".concat(e-t,"%")}},getInputStyles:function(t){return t?{border:"1px solid #03BCD4",color:"#ffffff",backgroundColor:"#
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t={getCoordinates:function(t,e){return{new:t.clientY,min:e.y,max:e.y+e.height}},getRotatedCoordinates:function(t,e){return{new:e.y+e.height-t.clientY+e.y,min:e.y,max:e.y+e.height}},getBarCoordinates:function(t,e,n){var r=e.clientY-e.y;return{new:t.clientY-r,min:n.y,max:n.y+n.height}},getThumbStyles:function(t,e){return{left:"50%",top:"calc(".concat(t,t<50?"% + 3px)":"% - 3px)"),zIndex:e?10:2}},getBarStyles:function(t,e){return{top:"".concat(t,"%"),height:"".concat(e-t,"%")}},getInputStyles:function(t){return t?{border:"1px solid #03BCD4",color:"#ffffff",backgroundColor:"#008ba3",textDecoration:"underline"}:{}}};exports.verticalStrategy=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.calculatePercentForValue=function(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./constants.js");exports.calculatePercentForValue=function(t,o,e){return 100*(t-o)/(e-o)},exports.calculateValueFromPercent=function(t,o,e){return o+t*(e-o)/100},exports.getToolipBoundingClientRect=function(o){var e=o.isHorizontalOrientation,r=o.railPosition,n=o.tooltipPosition;return{top:e?r.y-t.TOOLTIP_MARGIN:n.y,left:e?n.x:r.x-t.TOOLTIP_MARGIN,right:e?n.x:r.x+t.TOOLTIP_MARGIN,bottom:e?r.y:n.y,width:0,height:0}},exports.updateFromValue=function(t,o,e,r,n){return t<r?{from:r,to:e}:t>e-n?{from:e-n,to:e}:{from:t,to:e}},exports.updateToValue=function(t,o,e,r,n){return t>r?{from:o,to:r}:t<o+n?{from:o,to:o+n}:{from:o,to:t}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../ext-esm/tslib/tslib.es6.js'),s=require("react"),t=require("uuid"),n=require("lodash"),r=require("../utils/resolveWellHubSlug.js"),i=require("../utils/env.js"),a=require("../components/StatusBadge/api.js"),u=require("../components/StatusBadge/utils.js"),l=require("../components/StatusBadge/constants.js"),o=require("../clients/index.js"),d=function(e,s,t){return void 0===t&&(t=""),{provider:l.METADATA.recordProvider,dataset:s,assetId:e,event:t}};function c(e,t,r){var i=s.useState([]),a=i[0],c=i[1];return s.useEffect((function(){if(!n.isEmpty(e.filter((function(e){return e})))){var s=function(e){var s=e.data.map(u.parseWellnessAlertFromJson);c(s)},t=e.map((function(e){return o.socketClient.subscribe(d(e,l.METADATA.recordCollections.wellnessAlerts),{onDataReceive:s})})),r=e.map((function(e){return o.socketClient.subscribe(d(e,l.METADATA.recordCollections.wellnessAlerts,"update"),{onDataReceive:s})}));return function(){t.forEach((function(e){return e()})),r.forEach((function(e){return e()}))}}}),[JSON.stringify(e),t,r]),a}exports.useAlertsSubscription=c,exports.useWellnessAlerts=function(o){var d=o.asset,_=o.multiRigAssets,A=void 0===_?[]:_,g=o.appId,f=o.dashboards,v=o.isDCApp,m=o.maximized,S=s.useState({}),p=S[0],T=S[1],E=s.useState(""),D=E[0],I=E[1],
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../ext-esm/tslib/tslib.es6.js'),s=require("react"),t=require("uuid"),n=require("lodash"),r=require("../utils/resolveWellHubSlug.js"),i=require("../utils/env.js"),a=require("../components/StatusBadge/api.js"),u=require("../components/StatusBadge/utils.js"),l=require("../components/StatusBadge/constants.js"),o=require("../clients/index.js"),d=function(e,s,t){return void 0===t&&(t=""),{provider:l.METADATA.recordProvider,dataset:s,assetId:e,event:t}};function c(e,t,r){var i=s.useState([]),a=i[0],c=i[1];return s.useEffect((function(){if(!n.isEmpty(e.filter((function(e){return e})))){var s=function(e){var s=e.data.map(u.parseWellnessAlertFromJson);c(s)},t=e.map((function(e){return o.socketClient.subscribe(d(e,l.METADATA.recordCollections.wellnessAlerts),{onDataReceive:s})})),r=e.map((function(e){return o.socketClient.subscribe(d(e,l.METADATA.recordCollections.wellnessAlerts,"update"),{onDataReceive:s})}));return function(){t.forEach((function(e){return e()})),r.forEach((function(e){return e()}))}}}),[JSON.stringify(e),t,r]),a}exports.useAlertsSubscription=c,exports.useWellnessAlerts=function(o){var d=o.asset,_=o.multiRigAssets,A=void 0===_?[]:_,g=o.appId,f=o.dashboards,v=o.isDCApp,m=o.maximized,S=s.useState({}),p=S[0],T=S[1],E=s.useState(""),D=E[0],I=E[1],R=c(d?[d.id]:A.map((function(e){return e.id})),g,m);return s.useEffect((function(){if(p.alertsData&&!n.isEmpty(R)){var s=!0,t=Object.keys(p.alertsData).reduce((function(t,n){var r;return e.__assign(e.__assign({},t),((r={})[n]=p.alertsData[n].map((function(t){var n=R.find((function(e){return(null==e?void 0:e.ruleId)===t.alert.ruleId&&(null==e?void 0:e.assetId)===t.alert.assetId}));if(!n)return t;if([l.ALERT_STATUSES.FLAGGED,l.ALERT_STATUSES.INVESTIGATION,l.ALERT_STATUSES.ON_HOLD].includes(n.status))return t;var r=e.__assign(e.__assign({},n),{emptyMessage:u.isResolved(n.status)&&l.DATA_QUALITY_CHECK_PASSED}),i=u.isResolved(n.status);if(t.alert.id===n.id){var a=u.findUpdatedFields(t.alert,n);return u.hasOnlyLastCheckedAtKey(a)&&(s=!1),e.__assign(e.__assign({},t),{isResolved:i,alert:r})}return e.__assign(e.__assign({},t),{isResolved:i,issuesNum:n.state===l.ALERT_STATES.issue?t.issuesNum+1:0,missingNum:n.state===l.ALERT_STATES.missing?t.missingNum+1:0,alert:r})})),r))}),{}),r=Object.keys(t);I(u.getIconType(r,t)),T((function(n){return e.__assign(e.__assign({},n),{alertsData:u.getSortedWellnessAlerts(r,t),hasSubscriptionsData:s})}))}}),[R]),s.useEffect((function(){var s=i.isDevOrQAEnv?l.ENABLING_ON_QA_APP_IDS_LIST:l.ENABLING_ON_PROD_APP_IDS_LIST,o={id:null==d?void 0:d.id,name:null==d?void 0:d.name},c=o.id?[o]:A;c.length&&(s.includes(g)||v)?function(s){return e.__awaiter(void 0,void 0,void 0,(function(){var i,o,d,c,_,A,v,m,S,p,E,D,R;return e.__generator(this,(function(y){switch(y.label){case 0:return[4,a.getWCURuleMapping(g)];case 1:return i=y.sent(),[4,a.getWellnessRuleSettings(null===(E=i[0])||void 0===E?void 0:E.rule_id)];case 2:return(o=y.sent()).length?[4,r(f)]:[2];case 3:return d=y.sent(),c=s.map((function(e){return e.id})),_=o.map((function(e){return e._id})),[4,a.getWellnessAlerts(c,_).then((function(e){return e.map((function(e){return u.parseWellnessAlertFromJson(e)})).filter(Boolean)}))];case 4:return A=y.sent(),v=Object.values(n.groupBy(A,"ruleId")),m=u.getNewWellnessAlerts({assetsList:s,alertsGroupByRuleId:v,wellnessRuleSettings:o,wellHubSlug:d}),S=s.reduce((function(s,n){var r,i=n.id;return e.__assign(e.__assign({},s),((r={})[n.name]=o.map((function(e){var r;return(null===(r=s[n.name])||void 0===r?void 0:r.find((function(s){return s.alert.ruleId===e._id})))||{alert:{assetId:i,category:e.data.customer_category||e.data.category,status:l.ALERT_STATUSES.RESOLVED,emptyMessage:l.DATA_QUALITY_CHECK_PASSED},id:t.v4(),issuesNum:0,missingNum:0,isResolved:!0,name:e.data.customer_name||e.data.name,linkToDQPage:u.getLinkToDQPage({assetId:i,wellHubSlug:d})}})),r))}),e.__assign({},m)),p=Object.keys(S),I(u.getIconType(p,S)),T({alertsData:u.getSortedWellnessAlerts(p,S),lastTimestamp:null===(R=null===(D=S[p[0]][0])||void 0===D?void 0:D.alert)||void 0===R?void 0:R.statusUpdatedAt}),[2]}}))}))}(c).catch(console.error):(T({}),I(""))}),[null==d?void 0:d.id,A.length]),{wellnessAlerts:p,statusBadgeIconType:D,setWellnessAlerts:function(s){return T((function(t){return e.__assign(e.__assign({},t),s)}))}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as e}from"react/jsx-runtime";import
|
|
1
|
+
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as e}from"react/jsx-runtime";import r from"prop-types";import a from"classnames";import{withStyles as i}from"@material-ui/core/styles";import s from"@material-ui/core/Avatar";import{Tooltip as o}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import l from"../../utils/main.js";var n=function(t){switch(t){case 24:return 12;case 32:return 14;case 40:return 16;case 48:return 20;case 128:return 64;case 200:return 80;default:return Math.floor(t/2)}},m=function(t){return{minWidth:t,width:t,height:t,lineHeight:"".concat(t,"px"),fontSize:n(t)}},c=["#5F47A4","#9078C8","#DC74FD","#F695B5","#CB4F4F","#896F65","#F3AE96","#EE7850","#DDAE67","#A6CA72","#62893D","#91C9C4","#38818D","#77B5F1","#3F4C99","#919DA4"],u=function(t){return c[Math.abs(l.hashCode(t)%c.length)]},d=function(r){var i=r.displayName,n=r.showTooltip,c=r.size,d=r.className,p=r.imgSrc,h=r.alt,f=r.classes,g=r["data-testid"];return e(o,t({title:i,disableFocusListener:!n,disableHoverListener:!n,disableTouchListener:!n},{children:e(s,t({"data-testid":g,alt:h,src:p,className:a(f.avatar,d),style:t(t({},m(Number(c))),{backgroundColor:!!i&&u(i)})},{children:i?l.getNameInitials(i):null}))}))},p={displayName:r.string,showTooltip:r.bool,size:r.number,className:r.string,imgSrc:r.string,alt:r.string,"data-testid":r.string,classes:r.shape({avatar:r.string}).isRequired};d.propTypes=p,d.defaultProps={displayName:"",showTooltip:!1,size:32,className:void 0,imgSrc:void 0,alt:void 0,"data-testid":"generic_avatar"};var h=i((function(t){return{avatar:{color:t.palette.common.white,fontWeight:"bold"}}}))(d);export{d as AvatarComponent,h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CsvViewer.d.ts","sourceRoot":"","sources":["../../../../src/components/NewDocumentViewer/components/CsvViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CsvViewer.d.ts","sourceRoot":"","sources":["../../../../src/components/NewDocumentViewer/components/CsvViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAuC1B,UAAU,cAAc;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;CACjC;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAgCvC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as r}from"react/jsx-runtime";import{AutoSizer as t,Table as a,Column as i}from"react-virtualized";import{makeStyles as
|
|
1
|
+
import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as r}from"react/jsx-runtime";import{AutoSizer as t,Table as a,Column as i}from"react-virtualized";import{makeStyles as l}from"@material-ui/core";var o=l({tableWrapper:{borderTop:"1px solid #5C5C5C",borderBottom:"1px solid #5C5C5C",width:"100%",height:"100%",overflow:"scroll"},table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",border:"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{border:"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},cell:{width:200}}),n=function(t){var a=t.cellData,i=o();return r("div",e({className:i.cell},{children:a}))},d=function(l){var d=l.fileData,c=o(),h=Object.keys(d[0]||{});return r("div",e({className:c.tableWrapper},{children:r(t,{children:function(t){var l=t.height;return t.width,function(t){var l=t.height;return r(a,e({className:c.table,width:200*(h.length||10),height:l,headerHeight:40,rowHeight:50,rowCount:d.length,rowGetter:function(e){var r=e.index;return d[r]}},{children:h.map((function(e){return r(i,{width:200,flexGrow:1,dataKey:e,label:e,cellRenderer:function(e){var t=e.cellData;return r(n,{cellData:t})}},e)}))}))}({height:l})}})}))};export{d as CsvViewer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/NewDocumentViewer/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/NewDocumentViewer/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var x={csv:"csv",txt:"txt",json:"json",pdf:"pdf",xlsx:"xlsx"};export{x as FILE_EXTENSIONS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileContent.d.ts","sourceRoot":"","sources":["../../../../src/components/NewDocumentViewer/effects/useFileContent.tsx"],"names":[],"mappings":";AAMA,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"useFileContent.d.ts","sourceRoot":"","sources":["../../../../src/components/NewDocumentViewer/effects/useFileContent.tsx"],"names":[],"mappings":";AAMA,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAiBD,eAAO,MAAM,cAAc,0BAA2B,oBAAoB;;;CAwCzE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as r,__generator as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as
|
|
1
|
+
import{__awaiter as r,__generator as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as s}from"react";import{getFileExtension as n}from"../../../utils/fileExtension.js";import{TextViewer as i}from"../components/TextViewer.js";import{CsvViewer as f}from"../components/CsvViewer.js";import{PdfViewer as m}from"../components/PdfViewer.js";import{FILE_EXTENSIONS as c}from"../constants.js";import{getCsvData as l,getTextData as a,getXlsxData as u}from"../utils.js";var p,j,x=((p={})[c.csv]=f,p[c.json]=i,p[c.txt]=i,p[c.pdf]=m,p[c.xlsx]=f,p),v=((j={})[c.csv]=l,j[c.json]=a,j[c.txt]=a,j[c.xlsx]=u,j),d=function(i){var f=i.fileUrl,m=i.fileName,c=n(m),l=o(""),a=l[0],u=l[1],p=o(!1),j=p[0],d=p[1],b=x[c];return s((function(){f&&c&&function(e,o){r(void 0,void 0,void 0,(function(){var r,s,n;return t(this,(function(t){switch(t.label){case 0:if(!(r=v[o]))return[2];t.label=1;case 1:return t.trys.push([1,3,4,5]),d(!0),[4,r(e)];case 2:return s=t.sent(),u(s),[3,5];case 3:return n=t.sent(),console.error(n),[3,5];case 4:return d(!1),[7];case 5:return[2]}}))}))}(f,c)}),[f,c]),s((function(){f||u("")}),[f]),{fileContent:e(b,{fileData:a,fileUrl:f,fileName:m}),isLoading:j}};export{d as useFileContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/NewDocumentViewer/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/NewDocumentViewer/utils.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU,YAAmB,MAAM,KAAG,QAAQ,MAAM,EAAE,CAKlE,CAAC;AAEF,eAAO,MAAM,WAAW,YAAmB,MAAM,KAAG,QAAQ,MAAM,CAIjE,CAAC;AAEF,eAAO,MAAM,WAAW,YAAmB,MAAM,KAAG,QAAQ,MAAM,CAajE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext-esm/tslib/tslib.es6.js';import{parse as
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext-esm/tslib/tslib.es6.js';import{parse as r}from"papaparse";import*as n from"xlsx";var s=function(n){return t(void 0,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,fetch(n)];case 1:return[4,e.sent().text()];case 2:return t=e.sent(),[2,(s=t,r(s,{header:!0,dynamicTyping:!0,skipEmptyLines:!0}).data)]}var s}))}))},i=function(r){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,fetch(r)];case 1:return[4,t.sent().text()];case 2:return[2,t.sent()]}}))}))},a=function(s){return t(void 0,void 0,void 0,(function(){var t,i,a,o,u;return e(this,(function(e){switch(e.label){case 0:return[4,fetch(s)];case 1:return[4,e.sent().arrayBuffer()];case 2:return t=e.sent(),i=n.read(new Uint8Array(t),{type:"array"}),a=i.SheetNames[0],o=i.Sheets[a],u=n.utils.sheet_to_csv(o),[2,r(u).data]}}))}))};export{s as getCsvData,i as getTextData,a as getXlsxData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={rangeSliderInput:"Input_rangeSliderInput__uoNkK",rotated:"Input_rotated__GBHlR"};t(".Input_rangeSliderInput__uoNkK{background:var(--palette-background-b-6);border:none;border:1px solid var(--palette-primary-text-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:default;display:block;font-size:14px;font-weight:500;height:24px;line-height:24px;margin:0 0 0 auto;max-width:fit-content;min-width:40px;outline:none;padding:2px 4px;text-align:center}.Input_rangeSliderInput__uoNkK:focus{background-color:var(--palette-
|
|
1
|
+
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={rangeSliderInput:"Input_rangeSliderInput__uoNkK",rotated:"Input_rotated__GBHlR"};t(".Input_rangeSliderInput__uoNkK{background:var(--palette-background-b-6);border:none;border:1px solid var(--palette-primary-text-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:default;cursor:text;display:block;font-size:14px;font-weight:500;height:24px;line-height:24px;margin:0 0 0 auto;max-width:fit-content;min-width:40px;outline:none;padding:2px 4px;text-align:center}.Input_rangeSliderInput__uoNkK:focus{background-color:var(--palette-primary-dark)}.Input_rangeSliderInput__uoNkK:focus,.Input_rangeSliderInput__uoNkK:hover{border:1px solid var(--palette-primary-main);color:var(--palette-primary-contrast-text);text-decoration:underline}.Input_rotated__GBHlR{transform:rotate(180deg)}");export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var r={rangeSliderHorizontal:"RangeSlider_rangeSliderHorizontal__SAdDE",rangeSliderVertical:"RangeSlider_rangeSliderVertical__k8ac-",rangeSliderRail:"RangeSlider_rangeSliderRail__ufDMI",rangeSliderRailHorizontal:"RangeSlider_rangeSliderRailHorizontal__rLPtT",rotatedVerticalRange:"RangeSlider_rotatedVerticalRange__-oEIw",rangeSliderRailVertical:"RangeSlider_rangeSliderRailVertical__4zKzk",rangeSliderBar:"RangeSlider_rangeSliderBar__Kj3LC",rangeSliderBarHorizontal:"RangeSlider_rangeSliderBarHorizontal__is0F7",rangeSliderBarVertical:"RangeSlider_rangeSliderBarVertical__2DexQ",rangeSliderBarView:"RangeSlider_rangeSliderBarView__6dNQB",rangeSliderBarViewHorizontal:"RangeSlider_rangeSliderBarViewHorizontal__6pRPw",rangeSliderBarViewVertical:"RangeSlider_rangeSliderBarViewVertical__W2QnY",
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var r={rangeSliderHorizontal:"RangeSlider_rangeSliderHorizontal__SAdDE",rangeSliderVertical:"RangeSlider_rangeSliderVertical__k8ac-",rangeSliderRail:"RangeSlider_rangeSliderRail__ufDMI",rangeSliderRailHorizontal:"RangeSlider_rangeSliderRailHorizontal__rLPtT",rangeSliderThumb:"RangeSlider_rangeSliderThumb__KMaq0",rotatedVerticalRange:"RangeSlider_rotatedVerticalRange__-oEIw",rangeSliderRailVertical:"RangeSlider_rangeSliderRailVertical__4zKzk",rangeSliderBar:"RangeSlider_rangeSliderBar__Kj3LC",rangeSliderBarHorizontal:"RangeSlider_rangeSliderBarHorizontal__is0F7",rangeSliderBarVertical:"RangeSlider_rangeSliderBarVertical__2DexQ",rangeSliderBarView:"RangeSlider_rangeSliderBarView__6dNQB",rangeSliderBarViewHorizontal:"RangeSlider_rangeSliderBarViewHorizontal__6pRPw",rangeSliderBarViewVertical:"RangeSlider_rangeSliderBarViewVertical__W2QnY",mobileRangeSliderThumb:"RangeSlider_mobileRangeSliderThumb__TEj2q",rangeSliderLabel:"RangeSlider_rangeSliderLabel__3-qO8",rangeSliderInputDivider:"RangeSlider_rangeSliderInputDivider__PcwIK",rangeSliderCompactInputs:"RangeSlider_rangeSliderCompactInputs__ukFLL",disabled:"RangeSlider_disabled__8eBEv"};e('.RangeSlider_rangeSliderHorizontal__SAdDE{align-items:center;display:flex;padding:30px 0 12px;position:relative}.RangeSlider_rangeSliderVertical__k8ac-{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;padding:0 30px}.RangeSlider_rangeSliderRail__ufDMI{background-color:rgba(99,239,255,.24);border-radius:1px;cursor:pointer;height:3px;position:relative}.RangeSlider_rangeSliderRailHorizontal__rLPtT{margin:0 6px;width:100%}.RangeSlider_rangeSliderRailHorizontal__rLPtT>.RangeSlider_rangeSliderThumb__KMaq0{cursor:ew-resize}.RangeSlider_rotatedVerticalRange__-oEIw{transform:rotate(180deg)}.RangeSlider_rangeSliderRailVertical__4zKzk{height:100%;margin:6px 0;width:2px}.RangeSlider_rangeSliderRailVertical__4zKzk>.RangeSlider_rangeSliderThumb__KMaq0{cursor:ns-resize}.RangeSlider_rangeSliderBar__Kj3LC{cursor:pointer;position:absolute;z-index:1}.RangeSlider_rangeSliderBarHorizontal__is0F7{height:12px;margin:1px 0 0;transform:translateY(-50%)}.RangeSlider_rangeSliderBarVertical__2DexQ{height:100%;margin:1px 0 0;width:12px}.RangeSlider_rangeSliderBarView__6dNQB{background:var(--palette-primary-main);border-radius:1px}.RangeSlider_rangeSliderBarViewHorizontal__6pRPw{height:3px;margin:5px 0 0;position:relative}.RangeSlider_rangeSliderBarViewVertical__W2QnY{height:100%;width:3px}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewHorizontal__6pRPw:before,.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewVertical__W2QnY:before{background:#03bcd4;border-radius:1px;content:"";opacity:.4;position:absolute}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewHorizontal__6pRPw:before{bottom:-4px;height:11px;width:100%}.RangeSlider_rangeSliderBar__Kj3LC:active{cursor:grabbing}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewVertical__W2QnY:before{height:100%;left:-4px;width:11px}.RangeSlider_rangeSliderThumb__KMaq0{align-items:center;display:flex;height:24px;justify-content:center;position:absolute;transform:translate(-50%,-50%);width:24px;z-index:1}.RangeSlider_mobileRangeSliderThumb__TEj2q.RangeSlider_rangeSliderThumb__KMaq0:hover>.RangeSlider_rangeSliderLabel__3-qO8{box-shadow:none!important}.RangeSlider_mobileRangeSliderThumb__TEj2q:hover.RangeSlider_rangeSliderThumb__KMaq0:before{background:#d9d9d9;border-radius:20px;content:"";height:39px;left:50%;opacity:.1;position:absolute;top:50%;transform:translate(-50%,-50%);width:39px}.RangeSlider_rangeSliderLabel__3-qO8{background:var(--palette-primary-main);border-radius:12px;height:12px;position:relative;transition:box-shadow .3s;width:12px}.RangeSlider_rangeSliderThumb__KMaq0:hover>.RangeSlider_rangeSliderLabel__3-qO8{box-shadow:0 0 0 8px rgba(3,188,212,.2)}.RangeSlider_rangeSliderInputDivider__PcwIK{background:var(--palette-background-b-9);color:#fff;font-size:10px;font-weight:500}.RangeSlider_rangeSliderCompactInputs__ukFLL{align-items:center;background:var(--palette-background-b-9);border-radius:4px;display:flex;justify-content:center;position:absolute;transform:translate(-50%,-50%)}.RangeSlider_disabled__8eBEv{opacity:.5;pointer-events:none}');export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeSlider.d.ts","sourceRoot":"","sources":["../../../src/components/RangeSlider/RangeSlider.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RangeSlider.d.ts","sourceRoot":"","sources":["../../../src/components/RangeSlider/RangeSlider.tsx"],"names":[],"mappings":";AAGA,OAAO,SAAS,MAAM,YAAY,CAAC;AAsBnC,UAAU,gBAAiB,SAAQ,SAAS,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC;CAAG;AAEvF,QAAA,MAAM,WAAW;YAAW,gBAAgB,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;CAmYzD,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;CAkBzB,CAAC;AAeF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as n,jsx as t}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as n,jsx as t}from"react/jsx-runtime";import{useState as i,useRef as o,useEffect as r}from"react";import a from"classnames";import{round as l,throttle as u}from"lodash";import s from"prop-types";import{Tooltip as m}from"@material-ui/core";import{isMobileDetected as c}from"../../utils/mobileDetect.js";import{horizontalStrategy as d}from"./strategies/horizontal.js";import{verticalStrategy as g}from"./strategies/vertical.js";import{getToolipBoundingClientRect as f,calculatePercentForValue as p,updateToValue as R,calculateValueFromPercent as v,updateFromValue as S}from"./utils.js";import O from"./inputs/FromInput.js";import b from"./inputs/ToInput.js";import{RangeSliderControl as h,DEFAULT_FOCUSED_EL as T,RangeSliderOrientation as B}from"./constants.js";import M from"./RangeSlider.css.js";var I=function(s){var I,C,N,y,x,A=s.min,F=s.max,V=s.from,L=s.to,j=s.minRange,w=s.disabled,E=s.onChange,P=s.orientation,z=s.precision,H=s.isSingleRange,_=s.isWithoutInput,D=i(null),U=D[0],W=D[1],X=i(null),Y=X[0],q=X[1],Z=i({}),k=Z[0],G=Z[1],J=i(""),K=J[0],Q=J[1],$=i(null),ee=$[0],ne=$[1],te=i(h.FROM),ie=te[0],oe=te[1],re=i(null),ae=re[0],le=re[1],ue=i({}),se=ue[0],me=ue[1],ce=i(T),de=ce[0],ge=ce[1],fe=o(null),pe=o(null),Re=o(null),ve=o(null),Se=o(null),Oe=null===(x=fe.current)||void 0===x?void 0:x.getBoundingClientRect(),be=P===B.HORIZONTAL,he=P===B.VERTICAL,Te=H&&_;r((function(){P===B.HORIZONTAL&&ne(d),P===B.VERTICAL&&ne(g)}),[P]),r((function(){H&&E({from:0,to:L})}),[H]),r((function(){var e;if(ee){var n=l(V,z),t=l(L,z),i=l(A,z),o=l(F,z),r=p(n,i,o),a=p(t,i,o);me(((e={})[h.FROM]=ee.getThumbStyles(r,ie===h.FROM),e[h.TO]=ee.getThumbStyles(a,ie===h.TO),e[h.BAR]=ee.getBarStyles(r,a),e[h.FROM_INPUT]=ee.getInputStyles(ae===h.FROM||ae===h.BAR||de.from),e[h.TO_INPUT]=ee.getInputStyles(ae===h.TO||ae===h.BAR||de.to),e)),W(n.toString()),q(t.toString())}}),[ee,A,F,V,L,ae,de]);var Be=function(e){var n=ee.getCoordinates(e,fe.current.getBoundingClientRect()),t=p(n.new,n.min,n.max),i=l(v(t,A,F),z);if(i!==V){var o=S(i,V,L,A,j);E(o)}},Me=function(e){var n=he&&H?ee.getRotatedCoordinates(e,fe.current.getBoundingClientRect()):ee.getCoordinates(e,fe.current.getBoundingClientRect()),t=p(n.new,n.min,n.max),i=l(v(t,A,F),z);if(i!==L){var o=R(i,V,L,F,j);E(o)}},Ie=function(e,n){var t=ee.getBarCoordinates(e,n,fe.current.getBoundingClientRect()),i=p(t.new,t.min,t.max),o=l(v(i,A,F),z),r=l(L+(o-V),z);if(o<A){var a=A-o;o=A,r=l(r+a,z)}if(r>F){a=r-F;r=F,o=l(o-a,z)}o!==V&&r!==L&&o>=A&&r<=F&&E({from:o,to:r})},Ce=function(n){var t;n!==h.BAR?ge(e(e({},T),((t={})[n]=!0,t))):ge({from:!0,bar:!0,to:!0})},Ne=function(n){var t;n!==h.BAR?ge(e(e({},de),((t={})[n]=!1,t))):ge(T)},ye=function(e,n){if(!(H&&e===h.BAR||w)){n.stopPropagation(),oe(e),le(e);var t=n.clientX,i=n.clientY,o=n.target.getBoundingClientRect(),r=o.x,a=o.y,l=u((function(n){!function(e){return e===h.FROM?Be:e===h.TO?Me:Ie}(e)(n,{clientX:t,clientY:i,x:r,y:a})}),4);document.addEventListener("mousemove",l),document.addEventListener("mouseup",(function e(){le(null),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",e)}))}},xe=function(e,n){var t=n.target.value;Number.isNaN(Number(t))||function(e){return e===h.FROM?W:q}(e)(t)},Ae=function(e,n){var t=n.target.value,i=l(t,z);if(e===h.FROM){var o=S(i,V,L,A,j);E(o),W(o.from)}if(e===h.TO){o=R(i,V,L,F,j);E(o),q(o.to)}};return n("div",e({className:a((I={},I[M.disabled]=w,I[M.rangeSliderHorizontal]=be,I[M.rangeSliderVertical]=he,I[M.rotatedVerticalRange]=he&&H,I))},{children:[!H&&t(O,{compStyles:se[h.FROM_INPUT],isVerticalOrientation:he,max:F,disabled:w,precision:z,fromInputRef:ve,from:V,fromInputValue:U,onInputChange:xe,validateInputChange:Ae}),t(m,e({title:K,placement:be?"top":"left",onMouseMove:function(e){var n,t=e.clientX,i=e.clientY,o=be?{clientX:t}:{clientY:i},r=ee.getCoordinates(o,null===(n=fe.current)||void 0===n?void 0:n.getBoundingClientRect());if(de.bar)return Q(""),void G({x:t,y:i});var a=p(r.new,r.min,r.max),u=l(v(a,A,F),z);u<A&&Q(A.toString()),u>F&&Q(F.toString()),u>=A&&u<=F&&Q(u.toString()),G({x:t,y:i})},PopperProps:{anchorEl:{clientHeight:0,clientWidth:0,getBoundingClientRect:function(){return f({isHorizontalOrientation:be,railPosition:Oe,tooltipPosition:k})}}}},{children:n("div",e({className:a(M.rangeSliderRail,(C={},C[M.rangeSliderRailHorizontal]=be,C[M.rangeSliderRailVertical]=he,C)),ref:fe},{children:[!H&&t("div",e({ref:pe,className:a(M.rangeSliderThumb,c&&M.mobileRangeSliderThumb),style:se[h.FROM],onMouseDown:function(e){return ye(h.FROM,e)},onMouseEnter:function(){Ce(h.FROM)},onMouseLeave:function(){Ne(h.FROM)}},{children:t("div",{className:M.rangeSliderLabel})})),t("div",e({className:a(M.rangeSliderBar,(N={},N[M.rangeSliderBarHorizontal]=be,N[M.rangeSliderBarVertical]=he,N)),style:se[h.BAR],onMouseDown:function(e){return ye(h.BAR,e)},onMouseEnter:function(){Ce(h.BAR)},onMouseLeave:function(){Ne(h.BAR)}},{children:t("div",{className:a(M.rangeSliderBarView,(y={},y[M.rangeSliderBarViewHorizontal]=be,y[M.rangeSliderBarViewVertical]=he,y))})})),t("div",e({ref:Re,className:a(M.rangeSliderThumb,c&&M.mobileRangeSliderThumb),style:se[h.TO],onMouseDown:function(e){return ye(h.TO,e)},onMouseEnter:function(){Ce(h.TO)},onMouseLeave:function(){Ne(h.TO)}},{children:t("div",{className:M.rangeSliderLabel})}))]}))})),!Te&&t(b,{compStyles:se[h.TO_INPUT],disabled:w,isVerticalOrientation:he,rotated:he&&H,max:F,precision:z,toInputRef:Se,to:L,toInputValue:Y,onInputChange:xe,validateInputChange:Ae})]}))},C={min:s.number,max:s.number,from:s.number.isRequired,to:s.number.isRequired,orientation:s.oneOf(["horizontal","vertical"]),precision:s.number,minRange:s.number,onChange:s.func,isSingleRange:s.bool,isWithoutInput:s.bool,disabled:s.bool.isRequired};I.propTypes=C,I.defaultProps={min:0,max:100,orientation:"horizontal",precision:0,minRange:0,onChange:function(){},isSingleRange:!1,isWithoutInput:!1};export{I as default};
|
|
@@ -11,4 +11,10 @@ export namespace RangeSliderOrientation {
|
|
|
11
11
|
const HORIZONTAL: string;
|
|
12
12
|
const VERTICAL: string;
|
|
13
13
|
}
|
|
14
|
+
export const TOOLTIP_MARGIN: 6;
|
|
15
|
+
export namespace DEFAULT_FOCUSED_EL {
|
|
16
|
+
const from: boolean;
|
|
17
|
+
const bar: boolean;
|
|
18
|
+
const to: boolean;
|
|
19
|
+
}
|
|
14
20
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/RangeSlider/constants.js"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/RangeSlider/constants.js"],"names":[],"mappings":";;;;;;;;;;;;;AAeA,+BAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var o={FROM:"from",TO:"to",BAR:"bar",RAIL:"rail",FROM_INPUT:"from-input",TO_INPUT:"to-input",COMPACT_INPUTS:"compact-inputs"},r={HORIZONTAL:"horizontal",VERTICAL:"vertical"},t=6,T={from:!1,bar:!1,to:!1};export{T as DEFAULT_FOCUSED_EL,o as RangeSliderControl,r as RangeSliderOrientation,t as TOOLTIP_MARGIN};
|
|
@@ -28,10 +28,12 @@ declare function getInputStyles(isActive: any): {
|
|
|
28
28
|
border?: undefined;
|
|
29
29
|
color?: undefined;
|
|
30
30
|
backgroundColor?: undefined;
|
|
31
|
+
textDecoration?: undefined;
|
|
31
32
|
} | {
|
|
32
33
|
border: string;
|
|
33
34
|
color: string;
|
|
34
35
|
backgroundColor: string;
|
|
36
|
+
textDecoration: string;
|
|
35
37
|
};
|
|
36
38
|
export {};
|
|
37
39
|
//# sourceMappingURL=horizontal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"horizontal.d.ts","sourceRoot":"","sources":["../../../../src/components/RangeSlider/strategies/horizontal.js"],"names":[],"mappings":";;;;;;;AAAA;;;;EAMC;AAED;;;;EAUC;AAED;;;;EAMC;AAED;;;EAKC;AAED
|
|
1
|
+
{"version":3,"file":"horizontal.d.ts","sourceRoot":"","sources":["../../../../src/components/RangeSlider/strategies/horizontal.js"],"names":[],"mappings":";;;;;;;AAAA;;;;EAMC;AAED;;;;EAUC;AAED;;;;EAMC;AAED;;;EAKC;AAED;;;;;;;;;;EAQC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t={getCoordinates:function(t,n){return{new:t.clientX,min:n.x,max:n.x+n.width}},getBarCoordinates:function(t,n,e){var r=n.clientX-n.x;return{new:t.clientX-r,min:e.x,max:e.x+e.width}},getThumbStyles:function(t,n){return{top:"50%",left:"calc(".concat(t,t<50?"% + 3px)":"% - 3px)"),zIndex:n?10:2}},getBarStyles:function(t,n){return{left:"".concat(t,"%"),width:"".concat(n-t,"%")}},getInputStyles:function(t){return t?{border:"1px solid #03BCD4",color:"#ffffff",backgroundColor:"#
|
|
1
|
+
var t={getCoordinates:function(t,n){return{new:t.clientX,min:n.x,max:n.x+n.width}},getBarCoordinates:function(t,n,e){var r=n.clientX-n.x;return{new:t.clientX-r,min:e.x,max:e.x+e.width}},getThumbStyles:function(t,n){return{top:"50%",left:"calc(".concat(t,t<50?"% + 3px)":"% - 3px)"),zIndex:n?10:2}},getBarStyles:function(t,n){return{left:"".concat(t,"%"),width:"".concat(n-t,"%")}},getInputStyles:function(t){return t?{border:"1px solid #03BCD4",color:"#ffffff",backgroundColor:"#008ba3",textDecoration:"underline"}:{}}};export{t as horizontalStrategy};
|
|
@@ -34,10 +34,12 @@ declare function getInputStyles(isActive: any): {
|
|
|
34
34
|
border?: undefined;
|
|
35
35
|
color?: undefined;
|
|
36
36
|
backgroundColor?: undefined;
|
|
37
|
+
textDecoration?: undefined;
|
|
37
38
|
} | {
|
|
38
39
|
border: string;
|
|
39
40
|
color: string;
|
|
40
41
|
backgroundColor: string;
|
|
42
|
+
textDecoration: string;
|
|
41
43
|
};
|
|
42
44
|
export {};
|
|
43
45
|
//# sourceMappingURL=vertical.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertical.d.ts","sourceRoot":"","sources":["../../../../src/components/RangeSlider/strategies/vertical.js"],"names":[],"mappings":";;;;;;;;AAAA;;;;EAMC;AAED;;;;EAMC;AAED;;;;EAUC;AAED;;;;EAMC;AAED;;;EAKC;AAED
|
|
1
|
+
{"version":3,"file":"vertical.d.ts","sourceRoot":"","sources":["../../../../src/components/RangeSlider/strategies/vertical.js"],"names":[],"mappings":";;;;;;;;AAAA;;;;EAMC;AAED;;;;EAMC;AAED;;;;EAUC;AAED;;;;EAMC;AAED;;;EAKC;AAED;;;;;;;;;;EAQC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t={getCoordinates:function(t,n){return{new:t.clientY,min:n.y,max:n.y+n.height}},getRotatedCoordinates:function(t,n){return{new:n.y+n.height-t.clientY+n.y,min:n.y,max:n.y+n.height}},getBarCoordinates:function(t,n,e){var o=n.clientY-n.y;return{new:t.clientY-o,min:e.y,max:e.y+e.height}},getThumbStyles:function(t,n){return{left:"50%",top:"calc(".concat(t,t<50?"% + 3px)":"% - 3px)"),zIndex:n?10:2}},getBarStyles:function(t,n){return{top:"".concat(t,"%"),height:"".concat(n-t,"%")}},getInputStyles:function(t){return t?{border:"1px solid #03BCD4",color:"#ffffff",backgroundColor:"#
|
|
1
|
+
var t={getCoordinates:function(t,n){return{new:t.clientY,min:n.y,max:n.y+n.height}},getRotatedCoordinates:function(t,n){return{new:n.y+n.height-t.clientY+n.y,min:n.y,max:n.y+n.height}},getBarCoordinates:function(t,n,e){var o=n.clientY-n.y;return{new:t.clientY-o,min:e.y,max:e.y+e.height}},getThumbStyles:function(t,n){return{left:"50%",top:"calc(".concat(t,t<50?"% + 3px)":"% - 3px)"),zIndex:n?10:2}},getBarStyles:function(t,n){return{top:"".concat(t,"%"),height:"".concat(n-t,"%")}},getInputStyles:function(t){return t?{border:"1px solid #03BCD4",color:"#ffffff",backgroundColor:"#008ba3",textDecoration:"underline"}:{}}};export{t as verticalStrategy};
|
|
@@ -9,4 +9,16 @@ export function updateToValue(newTo: any, from: any, to: any, max: any, minRange
|
|
|
9
9
|
from: any;
|
|
10
10
|
to: any;
|
|
11
11
|
};
|
|
12
|
+
export function getToolipBoundingClientRect({ isHorizontalOrientation, railPosition, tooltipPosition, }: {
|
|
13
|
+
isHorizontalOrientation: any;
|
|
14
|
+
railPosition: any;
|
|
15
|
+
tooltipPosition: any;
|
|
16
|
+
}): {
|
|
17
|
+
top: any;
|
|
18
|
+
left: any;
|
|
19
|
+
right: any;
|
|
20
|
+
bottom: any;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
12
24
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/RangeSlider/utils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/RangeSlider/utils.js"],"names":[],"mappings":"AAEO,8EAEN;AAEM,+EAEN;AAEM,6EAEN;AAEM;;;EAUN;AAEM;;;EAUN;AAEM;;;;;;;;;;;EAWL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=function(o,r
|
|
1
|
+
import{TOOLTIP_MARGIN as t}from"./constants.js";var o=function(t,o,r){return 100*(t-o)/(r-o)},r=function(t,o,r){return o+t*(r-o)/100},n=function(t,o,r,n,i){return t<n?{from:n,to:r}:t>r-i?{from:r-i,to:r}:{from:t,to:r}},i=function(t,o,r,n,i){return t>n?{from:o,to:n}:t<o+i?{from:o,to:o+i}:{from:o,to:t}},f=function(o){var r=o.isHorizontalOrientation,n=o.railPosition,i=o.tooltipPosition;return{top:r?n.y-t:i.y,left:r?i.x:n.x-t,right:r?i.x:n.x+t,bottom:r?n.y:i.y,width:0,height:0}};export{o as calculatePercentForValue,r as calculateValueFromPercent,f as getToolipBoundingClientRect,n as updateFromValue,i as updateToValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWellnessAlerts.d.ts","sourceRoot":"","sources":["../../src/effects/useWellnessAlerts.ts"],"names":[],"mappings":"AAkBA,OAAO,EAIL,SAAS,EAIV,MAAM,oCAAoC,CAAC;AAW5C,wBAAgB,qBAAqB,CAAC,QAAQ,KAAA,EAAE,KAAK,KAAA,EAAE,SAAS,KAAA,SA+B/D;AAED,aAAK,cAAc,GACf;IAAE,UAAU,EAAE,SAAS,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,OAAO,CAAA;CAAE,GAC/E,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAEvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useWellnessAlerts.d.ts","sourceRoot":"","sources":["../../src/effects/useWellnessAlerts.ts"],"names":[],"mappings":"AAkBA,OAAO,EAIL,SAAS,EAIV,MAAM,oCAAoC,CAAC;AAW5C,wBAAgB,qBAAqB,CAAC,QAAQ,KAAA,EAAE,KAAK,KAAA,EAAE,SAAS,KAAA,SA+B/D;AAED,aAAK,cAAc,GACf;IAAE,UAAU,EAAE,SAAS,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,OAAO,CAAA;CAAE,GAC/E,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAEvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;CAyJ7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t,__awaiter as e,__generator as r}from'./../ext-esm/tslib/tslib.es6.js';import{useState as n,useEffect as s}from"react";import{v4 as i}from"uuid";import{isEmpty as a,groupBy as u}from"lodash";import o from"../utils/resolveWellHubSlug.js";import{isDevOrQAEnv as l}from"../utils/env.js";import{getWellnessAlerts as d,getWellnessRuleSettings as c,getWCURuleMapping as m}from"../components/StatusBadge/api.js";import{isResolved as f,findUpdatedFields as v,hasOnlyLastCheckedAtKey as p,getIconType as g,getSortedWellnessAlerts as b,parseWellnessAlertFromJson as I,getNewWellnessAlerts as D,getLinkToDQPage as h}from"../components/StatusBadge/utils.js";import{ALERT_STATUSES as
|
|
1
|
+
import{__assign as t,__awaiter as e,__generator as r}from'./../ext-esm/tslib/tslib.es6.js';import{useState as n,useEffect as s}from"react";import{v4 as i}from"uuid";import{isEmpty as a,groupBy as u}from"lodash";import o from"../utils/resolveWellHubSlug.js";import{isDevOrQAEnv as l}from"../utils/env.js";import{getWellnessAlerts as d,getWellnessRuleSettings as c,getWCURuleMapping as m}from"../components/StatusBadge/api.js";import{isResolved as f,findUpdatedFields as v,hasOnlyLastCheckedAtKey as p,getIconType as g,getSortedWellnessAlerts as b,parseWellnessAlertFromJson as I,getNewWellnessAlerts as D,getLinkToDQPage as h}from"../components/StatusBadge/utils.js";import{ALERT_STATUSES as j,DATA_QUALITY_CHECK_PASSED as y,ALERT_STATES as S,ENABLING_ON_QA_APP_IDS_LIST as N,ENABLING_ON_PROD_APP_IDS_LIST as A,METADATA as O}from"../components/StatusBadge/constants.js";import{socketClient as R}from"../clients/index.js";var w=function(t,e,r){return void 0===r&&(r=""),{provider:O.recordProvider,dataset:e,assetId:t,event:r}};function _(t,e,r){var i=n([]),u=i[0],o=i[1];return s((function(){if(!a(t.filter((function(t){return t})))){var e=function(t){var e=t.data.map(I);o(e)},r=t.map((function(t){return R.subscribe(w(t,O.recordCollections.wellnessAlerts),{onDataReceive:e})})),n=t.map((function(t){return R.subscribe(w(t,O.recordCollections.wellnessAlerts,"update"),{onDataReceive:e})}));return function(){r.forEach((function(t){return t()})),n.forEach((function(t){return t()}))}}}),[JSON.stringify(t),e,r]),u}var B=function(O){var R=O.asset,w=O.multiRigAssets,B=void 0===w?[]:w,E=O.appId,T=O.dashboards,k=O.isDCApp,G=O.maximized,H=n({}),L=H[0],x=H[1],C=n(""),M=C[0],P=C[1],V=_(R?[R.id]:B.map((function(t){return t.id})),E,G);return s((function(){if(L.alertsData&&!a(V)){var e=!0,r=Object.keys(L.alertsData).reduce((function(r,n){var s;return t(t({},r),((s={})[n]=L.alertsData[n].map((function(r){var n=V.find((function(t){return(null==t?void 0:t.ruleId)===r.alert.ruleId&&(null==t?void 0:t.assetId)===r.alert.assetId}));if(!n)return r;if([j.FLAGGED,j.INVESTIGATION,j.ON_HOLD].includes(n.status))return r;var s=t(t({},n),{emptyMessage:f(n.status)&&y}),i=f(n.status);if(r.alert.id===n.id){var a=v(r.alert,n);return p(a)&&(e=!1),t(t({},r),{isResolved:i,alert:s})}return t(t({},r),{isResolved:i,issuesNum:n.state===S.issue?r.issuesNum+1:0,missingNum:n.state===S.missing?r.missingNum+1:0,alert:s})})),s))}),{}),n=Object.keys(r);P(g(n,r)),x((function(s){return t(t({},s),{alertsData:b(n,r),hasSubscriptionsData:e})}))}}),[V]),s((function(){var n=l?N:A,s={id:null==R?void 0:R.id,name:null==R?void 0:R.name},a=s.id?[s]:B;a.length&&(n.includes(E)||k)?function(n){return e(void 0,void 0,void 0,(function(){var e,s,a,l,f,v,p,S,N,A,O,R,w;return r(this,(function(r){switch(r.label){case 0:return[4,m(E)];case 1:return e=r.sent(),[4,c(null===(O=e[0])||void 0===O?void 0:O.rule_id)];case 2:return(s=r.sent()).length?[4,o(T)]:[2];case 3:return a=r.sent(),l=n.map((function(t){return t.id})),f=s.map((function(t){return t._id})),[4,d(l,f).then((function(t){return t.map((function(t){return I(t)})).filter(Boolean)}))];case 4:return v=r.sent(),p=Object.values(u(v,"ruleId")),S=D({assetsList:n,alertsGroupByRuleId:p,wellnessRuleSettings:s,wellHubSlug:a}),N=n.reduce((function(e,r){var n,u=r.id;return t(t({},e),((n={})[r.name]=s.map((function(t){var n;return(null===(n=e[r.name])||void 0===n?void 0:n.find((function(e){return e.alert.ruleId===t._id})))||{alert:{assetId:u,category:t.data.customer_category||t.data.category,status:j.RESOLVED,emptyMessage:y},id:i(),issuesNum:0,missingNum:0,isResolved:!0,name:t.data.customer_name||t.data.name,linkToDQPage:h({assetId:u,wellHubSlug:a})}})),n))}),t({},S)),A=Object.keys(N),P(g(A,N)),x({alertsData:b(A,N),lastTimestamp:null===(w=null===(R=N[A[0]][0])||void 0===R?void 0:R.alert)||void 0===w?void 0:w.statusUpdatedAt}),[2]}}))}))}(a).catch(console.error):(x({}),P(""))}),[null==R?void 0:R.id,B.length]),{wellnessAlerts:L,statusBadgeIconType:M,setWellnessAlerts:function(e){return x((function(r){return t(t({},r),e)}))}}};export{_ as useAlertsSubscription,B as useWellnessAlerts};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corva/ui",
|
|
3
|
-
"version": "0.80.0-
|
|
3
|
+
"version": "0.80.0-rc.0",
|
|
4
4
|
"description": "Shared components/utils for Corva ui projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"corva-ui"
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"@material-ui/lab": "4.0.0-alpha.57",
|
|
95
95
|
"@material-ui/pickers": "3.2.10",
|
|
96
96
|
"@rollbar/react": "^0.11.1",
|
|
97
|
+
"@types/xlsx": "^0.0.36",
|
|
97
98
|
"auth0-js": "^9.14.0",
|
|
98
99
|
"chalk": "4.1.1",
|
|
99
100
|
"chroma-js": "1.4.1",
|
|
@@ -165,7 +166,8 @@
|
|
|
165
166
|
"use-tiny-state-machine": "^0.0.2",
|
|
166
167
|
"uuid": "3.4.0",
|
|
167
168
|
"validate-color": "^2.2.1",
|
|
168
|
-
"video-extensions": "1.1.0"
|
|
169
|
+
"video-extensions": "1.1.0",
|
|
170
|
+
"xlsx": "0.12.13"
|
|
169
171
|
},
|
|
170
172
|
"devDependencies": {
|
|
171
173
|
"@babel/core": "^7.12.10",
|