@corva/ui 0.84.0-13 → 0.84.0-15
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/AdvancedSlider/AdvancedSlider.js +1 -1
- package/cjs-bundle/components/AdvancedSlider/Handle.js +1 -1
- package/cjs-bundle/components/AdvancedSlider/constants.js +1 -0
- package/cjs-bundle/components/AdvancedSlider/styles/handleStyles.js +1 -1
- package/cjs-bundle/components/AdvancedSlider/styles/sliderStyles.js +1 -1
- package/cjs-bundle/components/AdvancedSlider/utils.js +1 -0
- package/cjs-bundle/components/Button/components/LiveButton/index.js +1 -1
- package/components/AdvancedSlider/AdvancedSlider.d.ts +1 -1
- package/components/AdvancedSlider/AdvancedSlider.d.ts.map +1 -1
- package/components/AdvancedSlider/AdvancedSlider.js +1 -1
- package/components/AdvancedSlider/Handle.d.ts +3 -1
- package/components/AdvancedSlider/Handle.d.ts.map +1 -1
- package/components/AdvancedSlider/Handle.js +1 -1
- package/components/AdvancedSlider/constants.d.ts +13 -0
- package/components/AdvancedSlider/constants.d.ts.map +1 -0
- package/components/AdvancedSlider/constants.js +1 -0
- package/components/AdvancedSlider/styles/handleStyles.d.ts +1 -1
- package/components/AdvancedSlider/styles/handleStyles.d.ts.map +1 -1
- package/components/AdvancedSlider/styles/handleStyles.js +1 -1
- package/components/AdvancedSlider/styles/sliderStyles.d.ts.map +1 -1
- package/components/AdvancedSlider/styles/sliderStyles.js +1 -1
- package/components/AdvancedSlider/utils.d.ts +7 -0
- package/components/AdvancedSlider/utils.d.ts.map +1 -0
- package/components/AdvancedSlider/utils.js +1 -0
- package/components/Button/components/LiveButton/index.d.ts.map +1 -1
- package/components/Button/components/LiveButton/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("@babel/runtime/helpers/defineProperty"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("@babel/runtime/helpers/defineProperty"),i=require("react"),n=require("re-resizable"),r=require("react-sizeme"),a=require("classnames"),o=require("lodash"),l=require("../shared/useThrottledCallback.js"),d=require("./Handle.js"),u=require("./icons/HandleIcon.js"),s=require("./styles/sliderStyles.js");require("./styles/handleStyles.js");var h=require("./constants.js"),c=require("react/jsx-runtime");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=f(e),v=f(t),p=f(a);function g(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function b(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?g(Object(i),!0).forEach((function(t){v.default(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var w="twoValuesSliderDefault",y=function(e){var t,r,a=e.min,o=e.max,f=e.value,g=e.size,y=e.orientation,O=e.valueFormatter,j=e.displayFormatter,I=e.editableHandles,R=e.onChange,A=e.onStop,H=e.reversed,T=e.handlePosition,_=e.handleClasses,x=e.minimal,N=s.useSliderStyles(),P=i.useRef(null),C=i.useRef(null),E=y===h.HORIZONTAL_ORIENTATION,S=y===h.VERTICAL_ORIENTATION,M=x?g:b(b({},g),{},{width:E?g.width-2*h.INPUT_WIDTH:g.width,height:S?g.height-2*h.INPUT_HEIGHT:g.height}),z=i.useState([O(null==f?void 0:f.at(0)),O(null==f?void 0:f.at(1))]),L=m.default(z,2),q=L[0],W=L[1],k=i.useRef(null),G=i.useState(!1),D=m.default(G,2),B=D[0],F=D[1],V=m.default(q,2),X=V[0],Y=V[1],Z=M.width/(o-a)*(Y-a),U=M.width/(o-a)*(o-X),J=M.height/(o-a)*(Y-a),K=M.height/(o-a)*(o-X);i.useEffect((function(){if(!k.current){var e=[O(null==f?void 0:f.at(0)),O(null==f?void 0:f.at(1))],t=Math.min.apply(Math,e),i=Math.max.apply(Math,e);W([t,i])}}),[null==f?void 0:f.at(0),null==f?void 0:f.at(1)]),i.useEffect((function(){if(E){var e=M.width/(o-a)*(X-a),t=M.width/(o-a)*(o-Y);P.current.updateSize({width:H?t:e,height:M.height}),C.current.updateSize({width:H?e:t,height:M.height})}else if(S){var i=M.height/(o-a)*(X-a),n=M.height/(o-a)*(o-Y);P.current.updateSize({width:M.width,height:H?n:i}),C.current.updateSize({width:M.width,height:H?i:n})}}),[a,o,X,Y,M.width,M.height,y]),i.useEffect((function(){var e=function(){document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",ne),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",ae)};return B?(document.addEventListener("mousemove",ie),document.addEventListener("mouseup",ne),document.addEventListener("touchmove",re),document.addEventListener("touchend",ae)):(e(),A()),function(){e()}}),[B]);var Q=l.useThrottledCallback((function(e,t,i){k.current="onResize Event";var n=i.clientWidth,r=i.clientHeight,l=X,d=Y;"right"===t?H?d=O(o-n/M.width*(o-a)):l=O(a+n/M.width*(o-a)):"left"===t?H?l=O(a+n/M.width*(o-a)):d=O(o-n/M.width*(o-a)):"bottom"===t?H?d=O(o-r/M.height*(o-a)):l=O(a+r/M.height*(o-a)):"top"===t&&(H?l=O(a+r/M.height*(o-a)):d=O(o-r/M.height*(o-a))),l=Math.min(l,Y),d=Math.max(d,X),W([l,d]),R([l,d])})),$=l.useThrottledCallback((function(){k.current=null,A()})),ee=function(e,t){k.current={xPos:e,yPos:t,head:X,tail:Y}},te=function(e,t){if(k.current){var i;E?i=(k.current.xPos-e)/M.width*(o-a):S&&(i=(k.current.yPos-t)/M.height*(o-a));var n,r,l=k.current.head-i*(H?-1:1),d=k.current.tail-i*(H?-1:1),u=k.current.tail-k.current.head;l<=a?(n=a,r=a+u):d>=o?(n=o-u,r=o):(n=l,r=d),n=O(n),r=O(r),W([n,r]),R([n,r])}},ie=l.useThrottledCallback((function(e){te(e.clientX,e.clientY)})),ne=l.useThrottledCallback((function(){k.current=null,F(!1)})),re=l.useThrottledCallback((function(e){te(e.touches[0].pageX,e.touches[0].pageY)})),ae=l.useThrottledCallback((function(){k.current=null,F(!1)})),oe=l.useThrottledCallback((function(e){W([e,Y]),R([e,Y])})),le=l.useThrottledCallback((function(e){W([X,e]),R([X,e])})),de=i.useMemo((function(){return(Y-X)/(o-a)*(S?M.height:M.width)<30}),[a,o,X,Y]),ue=i.useMemo((function(){return(Y-X)/(o-a)*(S?M.height:M.width)<h.INNER_GAP}),[a,o,X,Y]),se=function(e,t){return e/t*(S?M.height:M.width)},he=i.useMemo((function(){if(x)return{};var e=E?h.HORIZONTAL_MIN_GAP:h.VERTICAL_MIN_GAP;return H?{isRightArrowInvisible:se(X,o)<h.MIN_ARROW_GAP,isLeftArrowInvisible:se(o-Y,o)<h.MIN_ARROW_GAP,distance:(Y-X)/(o-a)*(S?M.height:M.width)-e}:{isRightArrowInvisible:se(o-Y,o)<h.MIN_ARROW_GAP,isLeftArrowInvisible:se(X,o)<h.MIN_ARROW_GAP,distance:(Y-X)/(o-a)*(S?M.height:M.width)-e}}),[a,o,X,Y,H]),ce=function(e){var t={min:a,max:Y,value:X,onChange:oe},i={min:X,max:o,value:Y,onChange:le};return"head"===e?c.jsx(d.Handle,b({"data-testid":"".concat(w,"_handle_top"),placement:"head",readOnly:!I,isInsideArrowsVisible:ue,arrowsOutsideConfig:he,displayFormatter:j,orientation:y,classes:_,minimal:x},H?i:t)):"tail"===e?c.jsx(d.Handle,b({"data-testid":"".concat(w,"_handle_bottom"),placement:"tail",readOnly:!I,isInsideArrowsVisible:ue,arrowsOutsideConfig:he,displayFormatter:j,orientation:y,classes:_,minimal:x},H?t:i)):null};return c.jsx("div",{className:N.rootWrapper,children:c.jsxs("div",{className:p.default(N.root,(t={},v.default(t,N.horizontalRoot,E),v.default(t,N.verticalRoot,S),v.default(t,N.minimal,x),t)),children:[c.jsx(n.Resizable,{ref:P,minHeight:0,minWidth:0,maxWidth:H?U:Z,maxHeight:H?K:J,enable:{right:E,bottom:S},handleComponent:{right:ce("head"),bottom:ce("head")},onResize:Q,onResizeStop:$}),c.jsx("div",{className:N.body,"data-testid":"slider-body",onMouseDown:function(e){ee(e.clientX,e.clientY),F(!0)},onTouchStart:function(e){ee(e.touches[0].pageX,e.touches[0].pageY),F(!0)},children:de?c.jsx("div",{className:p.default((r={},v.default(r,N.horizontalBodyHandle,E),v.default(r,N.verticalBodyHandle,S),v.default(r,N.leftBodyHandle,"left"===T),v.default(r,N.rightBodyHandle,"right"===T),v.default(r,N.topBodyHandle,"top"===T),v.default(r,N.bottomBodyHandle,"bottom"===T),r)),children:c.jsx("div",{className:N.bodyHandle,"data-testid":"".concat(w,"_handle"),children:c.jsx(u.HandleIcon,{orientation:"vertical",minimal:x})})}):c.jsx("div",{className:N.bodyHandleIcon,"data-testid":"".concat(w,"_handle"),children:c.jsx(u.HandleIcon,{orientation:y,minimal:x})})}),c.jsx(n.Resizable,{ref:C,minHeight:0,minWidth:0,enable:{left:E,top:S},handleComponent:{left:ce("tail"),top:ce("tail")},onResize:Q,onResizeStop:$})]})})};y.defaultProps={orientation:h.HORIZONTAL_ORIENTATION,valueFormatter:Math.floor,displayFormatter:function(e){return e},onChange:o.noop,onStop:o.noop,reversed:!1,editableHandles:!0,handleClasses:{},minimal:!1};var O=r.withSize({monitorWidth:!0,monitorHeight:!0})(y);exports.AdvancedSlider=y,exports.default=O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/slicedToArray"),i=require("react"),t=require("@material-ui/core"),r=require("classnames"),a=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("./styles/sliderStyles.js");var n=require("./styles/handleStyles.js"),l=require("./utils.js"),o=require("./constants.js"),u=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(e),f=c(s),m=c(r);exports.Handle=function(e){var s,r,c,v,I=e.value,h=e.orientation,j=e.placement,q=e.readOnly,p=e.onChange,R=e.min,A=e.max,b=e.displayFormatter,H=e.isInsideArrowsVisible,y=e.arrowsOutsideConfig,g=e.classes,O=e.minimal,N=e["data-testid"],T=i.useState(!1),w=f.default(T,2),E=w[0],x=w[1],C=i.useState(I),L=f.default(C,2),V=L[0],z=L[1],S=i.useRef(null),P=h===o.HORIZONTAL_ORIENTATION,_=h===o.VERTICAL_ORIENTATION,F=j===o.HEAD_PLACEMENT,M=n.useHandleStyles({distance:null==y?void 0:y.distance}),k=function(e){var s=Number(e);l.getIsInputValueValid(s)?p(l.getValidatedValue(s,R,A)):x(!0)};return i.useEffect((function(){z(I),E&&x(!1)}),[I]),u.jsxs("div",{className:m.default(M.root,g.handleRoot,(s={},d.default(s,M.horizontalHeadRoot,P&&F),d.default(s,M.horizontalTailRoot,P&&!F),d.default(s,M.verticalHeadRoot,_&&F),d.default(s,M.verticalTailRoot,_&&!F),d.default(s,M.minimalHandleRoot,O),s)),children:[!O&&u.jsx(a.LeftIcon,{size:16,className:m.default(M.leftArrow,(r={},d.default(r,M.reversedLeftArrow,_),d.default(r,M.isInvisible,H&&!F||F&&(null==y?void 0:y.isLeftArrowInvisible)),r)),fill:"white"}),u.jsx("div",{className:m.default(M.handle,g.handle,(c={},d.default(c,M.horizontalHeadHandle,P&&F),d.default(c,M.horizontalTailHandle,P&&!F),d.default(c,M.verticalHeadHandle,_&&F),d.default(c,M.verticalTailHandle,_&&!F),d.default(c,M.minimalHandle,O),d.default(c,M.minimalVerticalHandle,O&&_),c)),"data-testid":N,children:!O&&u.jsx(t.Input,{inputProps:{"data-testid":"handle-input"},readOnly:q,inputRef:S,onKeyDown:function(e){var s=e.keyCode,i=e.target;13===s&&k(i.value)},onBlur:function(e){var s=e.target;k(s.value)},classes:{root:m.default(M.inputRoot,E&&M.hasError)},value:q?b(V):V,onChange:function(e){var s=e.target.value;z(s),E&&x(!1)},disableUnderline:!0,error:!(Number.isFinite(+V)&&+V>=R&&+V<=A)})}),!O&&u.jsx(a.RightIcon,{size:16,className:m.default(M.rightArrow,(v={},d.default(v,M.reversedRightArrow,_),d.default(v,M.isInvisible,H&&F||!F&&(null==y?void 0:y.isRightArrowInvisible)),v)),fill:"white"})]})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.HEAD_PLACEMENT="head",exports.HORIZONTAL_MIN_GAP=48,exports.HORIZONTAL_ORIENTATION="horizontal",exports.HOVER_AREA_HEIGHT=64,exports.HOVER_ARREA_WIDTH=72,exports.INNER_GAP=24,exports.INPUT_HEIGHT=20,exports.INPUT_VALUE_REGEX=/^[0-9.-]*$/,exports.INPUT_WIDTH=47,exports.MIN_ARROW_GAP=12,exports.VERTICAL_MIN_GAP=90,exports.VERTICAL_ORIENTATION="vertical";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@material-ui/core"),t=require("../constants.js"),e=require("../utils.js"),i={minWidth:47,height:20,borderRadius:4},o=r.makeStyles((function(r){var o=r.isLightTheme,a=r.palette;return{root:{fontSize:"12px",position:"absolute","&:hover":{borderColor:a.primary.main},"&:active":{borderColor:a.primary.main},"&:hover $handle":{borderColor:a.primary.main},"&:active $handle":{background:a.primary.dark,borderColor:a.primary.main},"&:hover $inputRoot:not($hasError)":{background:a.primary.dark,border:"1px solid ".concat(a.primary.main)},"&:hover $inputRoot $hasError":{background:"".concat(a.background.b6," !important"),border:"1px solid ".concat(a.primary.main)},"&:active $inputRoot":{background:a.primary.dark,border:"1px solid ".concat(a.primary.main)},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","&:hover $leftArrow, &:active $leftArrow":{visibility:"visible"},"&:hover $rightArrow, &:active $rightArrow":{visibility:"visible"}},hasError:{border:"1px solid ".concat(a.error.main," !important"),"&.Mui-focused":{background:"".concat(a.background.b6," !important")},"&:hover":{background:a.background.b6},"&:hover $inputRoot":{background:a.background.b6}},horizontalHeadRoot:{top:0,bottom:0,right:5},horizontalTailRoot:{top:0,bottom:0,left:5},verticalHeadRoot:{left:0,right:0,bottom:5},verticalTailRoot:{left:0,right:0,top:5},handle:{position:"relative",background:o?"#B1B1B1":"#414141","& > p":{fontSize:"12px",textAlign:"center",lineHeight:"20px"},display:"flex",alignItems:"center",justifyContent:"center","&:before":{position:"absolute",left:"50%",top:"50%",height:function(r){var i=r.distance;return e.getHoverAreaSize({inititalSize:t.HOVER_AREA_HEIGHT,distance:i})},width:function(r){var i=r.distance;return e.getHoverAreaSize({distance:i,inititalSize:t.HOVER_ARREA_WIDTH})},content:'""',transform:"translate(-50%, -50%)",zIndex:100}},horizontalHeadHandle:i,horizontalTailHandle:i,verticalHeadHandle:i,verticalTailHandle:i,inputRoot:{borderRadius:4,minWidth:47,zIndex:101,height:"20px",fontSize:"12px",border:"1px solid ".concat(a.primary.text9),"&:hover":{border:"1px solid ".concat(a.primary.main)},"&:active":{textDecoration:"underline"},"&::before":{borderWidth:0},"&::after":{borderWidth:"1px !important"},"& .MuiInputBase-input":{padding:0,height:"100%",textAlign:"center"},"&:hover::before":{borderWidth:"1px !important"},"&.Mui-focused":{textDecoration:"underline",background:a.primary.dark,border:"1px solid ".concat(a.primary.main)}},minimalHandle:{background:a.primary.text9,width:"8px !important",minWidth:8,minHeight:20,height:"20px !important","& .MuiInput-underline.Mui-error:after":{border:0},"&:before":{width:"0px !important",height:"0px !important"}},minimalVerticalHandle:{width:20,minWidth:20,minHeight:8,height:"8px !important"},minimalHandleRoot:{borderColor:a.primary.text9,zIndex:100,"&:not(:hover)":{border:"none"}},leftArrow:{visibility:"hidden",zIndex:101,position:"absolute",left:-16},rightArrow:{visibility:"hidden",zIndex:101,position:"absolute",right:-15},reversedLeftArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",top:-16},reversedRightArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",bottom:-15},isInvisible:{display:"none"}}}));exports.useHandleStyles=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core"),t=e.makeStyles((function(t){return{rootWrapper:{position:"relative",width:"100%",height:"100%",zIndex:100},root:{position:"absolute",width:"100%",height:"100%",zIndex:100,"&:hover $bodyHandle":{visibility:"visible"}},horizontalRoot:{width:"calc(100% - 94px)",left:"47px",display:"flex",alignItems:"center","&::before, &::after":{zIndex:-1,position:"absolute",top:0,content:'""',backgroundColor:t.palette.background.b7,width:1,height:"100%"},"&::before":{left:0},"&::after":{right:0}},verticalRoot:{height:"calc(100% - 40px)",top:20,display:"flex",alignItems:"center",flexDirection:"column","&::before, &::after":{zIndex:-1,position:"absolute",left:0,content:'""',backgroundColor:t.palette.background.b7,width:"100%",height:1},"&::before":{top:0},"&::after":{bottom:0}},body:{position:"relative",flex:1,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",background:"#3B3B3B66",color:"#BDBDBD","& svg":{fill:"currentColor"},"&:hover":{cursor:"grab",background:"#008BA366",color:"#FFFFFF"},"&:active":{cursor:"grabbing",background:"#008BA366"},"&:active $bodyHandleIcon":{visibility:"visible"},"&:hover $bodyHandleIcon":{visibility:"visible"}},horizontalBodyHandle:{position:"absolute",bottom:-24},verticalBodyHandle:{position:"absolute",left:-24,zIndex:111},leftBodyHandle:{position:"absolute",left:-24,right:"auto"},rightBodyHandle:{position:"absolute",right:-24,left:"auto"},topBodyHandle:{position:"absolute",top:-24,bottom:"auto"},bottomBodyHandle:{position:"absolute",bottom:-24,top:"auto"},bodyHandle:{zIndex:101,width:24,height:24,borderRadius:"50%",background:"#03BCD4",color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",visibility:"hidden","&:before":{position:"absolute",left:"50%",top:"50%",height:32,width:24,content:'""',transform:"translate(-50%, -50%)",zIndex:1e3}},bodyHandleIcon:{visibility:"hidden"},minimal:{borderRadius:4,width:"100%",height:"100%",top:0,left:0,"&::before, &::after":{display:"none"},"& $body":{"&:hover":{background:"#008BA366"},margin:-1,width:"calc(100% + 2px)",height:"calc(100% + 2px)",backgroundColor:e.fade(t.palette.background.b7,.1),border:"1px solid ".concat(t.palette.primary.text9),borderRadius:4}}}}));exports.useSliderStyles=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./constants.js");exports.getHoverAreaSize=function(e){var t=e.inititalSize,r=e.distance;return r<0?t-Math.abs(r/2):t},exports.getIsInputValueValid=function(t){return e.INPUT_VALUE_REGEX.test(t)&&!Number.isNaN(Number(t))},exports.getValidatedValue=function(e,t,r){return Math.min(Math.max(e,t),r)};
|
|
@@ -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"),s=require("moment-timezone"),i=require("@material-ui/core"),o=require("classnames"),n=require("../../../../icons/iconParkIcons.js");require("../../../../icons/customIcons/icons/AddMessage.js"),require("../../../../icons/customIcons/icons/Attention.js"),require("../../../../icons/customIcons/icons/Collapse.js"),require("../../../../icons/customIcons/icons/Expand.js"),require("../../../../icons/customIcons/icons/FolderClosed.js"),require("../../../../icons/customIcons/icons/FolderOpened.js"),require("../../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../../icons/customIcons/icons/Search.js"),require("../../../../icons/customIcons/icons/Wellhub.js"),require("../../../../icons/customIcons/icons/MultiRuler.js");var r=require("../Button/index.js"),c=require("./constants.js"),u=require("./components/LiveButtonStateIndicator/index.js"),a=require("./styles.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=l(s),d=l(o),v=function(e,s){return e===c.LiveButtonState.Default?"Go to Live data":e===c.LiveButtonState.Live?"Data receiving in real-time":t.jsxs("div",{children:["Asset isn't Live",t.jsx("br",{}),s&&"Last active: ".concat(m.default(s).format("MMM D YYYY, hh:mm A"))]})};exports.LiveButtonState=c.LiveButtonState,exports.LiveButton=function(s){var o,l=s.size,m=void 0===l?"medium":l,j=s.state,q=void 0===j?c.LiveButtonState.Default:j,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),s=require("moment-timezone"),i=require("@material-ui/core"),o=require("classnames"),n=require("../../../../icons/iconParkIcons.js");require("../../../../icons/customIcons/icons/AddMessage.js"),require("../../../../icons/customIcons/icons/Attention.js"),require("../../../../icons/customIcons/icons/Collapse.js"),require("../../../../icons/customIcons/icons/Expand.js"),require("../../../../icons/customIcons/icons/FolderClosed.js"),require("../../../../icons/customIcons/icons/FolderOpened.js"),require("../../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../../icons/customIcons/icons/Search.js"),require("../../../../icons/customIcons/icons/Wellhub.js"),require("../../../../icons/customIcons/icons/MultiRuler.js");var r=require("../Button/index.js"),c=require("./constants.js"),u=require("./components/LiveButtonStateIndicator/index.js"),a=require("./styles.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=l(s),d=l(o),v=function(e,s){return e===c.LiveButtonState.Default?"Go to Live data":e===c.LiveButtonState.Live?"Data receiving in real-time":t.jsxs("div",{children:["Asset isn't Live",t.jsx("br",{}),s&&"Last active: ".concat(m.default(s).format("MMM D YYYY, hh:mm A"))]})};exports.LiveButtonState=c.LiveButtonState,exports.LiveButton=function(s){var o,l=s.size,m=void 0===l?"medium":l,j=s.state,q=void 0===j?c.LiveButtonState.Default:j,I=s.startIcon,L=s.children,f=void 0===L?"Live":L,p=s.className,x=s.tooltipProps,S=s.lastActiveAt,B=e.__rest(s,["size","state","startIcon","children","className","tooltipProps","lastActiveAt"]),h=a.useStyles({size:m}),_=h[m],A={placement:"bottom",title:v(q,S)},b="small"===m,g=I||t.jsx(n.RightSmallIcon,{size:b?20:24});return t.jsx(i.Tooltip,e.__assign({},A,x,{children:t.jsxs(r,e.__assign({},B,{className:d.default(h.root,_,(o={},o[h.liveState]=q===c.LiveButtonState.Live,o[h.offlineState]=q===c.LiveButtonState.Offline,o),p),size:m,startIcon:q===c.LiveButtonState.Default&&g},{children:[f,t.jsx(u.LiveButtonStateIndicator,{state:q})]}))}))},exports.getTooltipText=v;
|
|
@@ -14,6 +14,6 @@ export namespace AdvancedSlider {
|
|
|
14
14
|
}
|
|
15
15
|
declare const _default: import("react").ElementType<Omit<any, "size">>;
|
|
16
16
|
export default _default;
|
|
17
|
-
|
|
17
|
+
import { HORIZONTAL_ORIENTATION } from "./constants";
|
|
18
18
|
import { noop } from "lodash/common/util";
|
|
19
19
|
//# sourceMappingURL=AdvancedSlider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdvancedSlider.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/AdvancedSlider.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdvancedSlider.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/AdvancedSlider.js"],"names":[],"mappings":"AAwCO,wDA8YN;;;;;QAKmB,kDAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/defineProperty";import{useRef as
|
|
1
|
+
import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/defineProperty";import{useRef as i,useState as n,useEffect as r,useMemo as o}from"react";import{Resizable as a}from"re-resizable";import{withSize as l}from"react-sizeme";import d from"classnames";import{noop as h}from"lodash";import{useThrottledCallback as s}from"../shared/useThrottledCallback.js";import{Handle as c}from"./Handle.js";import{HandleIcon as u}from"./icons/HandleIcon.js";import{useSliderStyles as m}from"./styles/sliderStyles.js";import"./styles/handleStyles.js";import{HORIZONTAL_ORIENTATION as f,INPUT_WIDTH as p,INPUT_HEIGHT as v,INNER_GAP as g,MIN_ARROW_GAP as b,VERTICAL_ORIENTATION as w,HORIZONTAL_MIN_GAP as y,VERTICAL_MIN_GAP as O}from"./constants.js";import{jsx as j,jsxs as H}from"react/jsx-runtime";function P(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function z(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?P(Object(n),!0).forEach((function(i){e(t,i,n[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var S="twoValuesSliderDefault",x=function(l){var h,P,x=l.min,C=l.max,E=l.value,L=l.size,R=l.orientation,I=l.valueFormatter,M=l.displayFormatter,A=l.editableHandles,B=l.onChange,D=l.onStop,F=l.reversed,N=l.handlePosition,W=l.handleClasses,_=l.minimal,X=m(),Y=i(null),T=i(null),V=R===f,k=R===w,q=_?L:z(z({},L),{},{width:V?L.width-2*p:L.width,height:k?L.height-2*v:L.height}),G=n([I(null==E?void 0:E.at(0)),I(null==E?void 0:E.at(1))]),J=t(G,2),K=J[0],Q=J[1],U=i(null),Z=n(!1),$=t(Z,2),tt=$[0],et=$[1],it=t(K,2),nt=it[0],rt=it[1],ot=q.width/(C-x)*(rt-x),at=q.width/(C-x)*(C-nt),lt=q.height/(C-x)*(rt-x),dt=q.height/(C-x)*(C-nt);r((function(){if(!U.current){var t=[I(null==E?void 0:E.at(0)),I(null==E?void 0:E.at(1))],e=Math.min.apply(Math,t),i=Math.max.apply(Math,t);Q([e,i])}}),[null==E?void 0:E.at(0),null==E?void 0:E.at(1)]),r((function(){if(V){var t=q.width/(C-x)*(nt-x),e=q.width/(C-x)*(C-rt);Y.current.updateSize({width:F?e:t,height:q.height}),T.current.updateSize({width:F?t:e,height:q.height})}else if(k){var i=q.height/(C-x)*(nt-x),n=q.height/(C-x)*(C-rt);Y.current.updateSize({width:q.width,height:F?n:i}),T.current.updateSize({width:q.width,height:F?i:n})}}),[x,C,nt,rt,q.width,q.height,R]),r((function(){var t=function(){document.removeEventListener("mousemove",mt),document.removeEventListener("mouseup",ft),document.removeEventListener("touchmove",pt),document.removeEventListener("touchend",vt)};return tt?(document.addEventListener("mousemove",mt),document.addEventListener("mouseup",ft),document.addEventListener("touchmove",pt),document.addEventListener("touchend",vt)):(t(),D()),function(){t()}}),[tt]);var ht=s((function(t,e,i){U.current="onResize Event";var n=i.clientWidth,r=i.clientHeight,o=nt,a=rt;"right"===e?F?a=I(C-n/q.width*(C-x)):o=I(x+n/q.width*(C-x)):"left"===e?F?o=I(x+n/q.width*(C-x)):a=I(C-n/q.width*(C-x)):"bottom"===e?F?a=I(C-r/q.height*(C-x)):o=I(x+r/q.height*(C-x)):"top"===e&&(F?o=I(x+r/q.height*(C-x)):a=I(C-r/q.height*(C-x))),o=Math.min(o,rt),a=Math.max(a,nt),Q([o,a]),B([o,a])})),st=s((function(){U.current=null,D()})),ct=function(t,e){U.current={xPos:t,yPos:e,head:nt,tail:rt}},ut=function(t,e){if(U.current){var i;V?i=(U.current.xPos-t)/q.width*(C-x):k&&(i=(U.current.yPos-e)/q.height*(C-x));var n,r,o=U.current.head-i*(F?-1:1),a=U.current.tail-i*(F?-1:1),l=U.current.tail-U.current.head;o<=x?(n=x,r=x+l):a>=C?(n=C-l,r=C):(n=o,r=a),n=I(n),r=I(r),Q([n,r]),B([n,r])}},mt=s((function(t){ut(t.clientX,t.clientY)})),ft=s((function(){U.current=null,et(!1)})),pt=s((function(t){ut(t.touches[0].pageX,t.touches[0].pageY)})),vt=s((function(){U.current=null,et(!1)})),gt=s((function(t){Q([t,rt]),B([t,rt])})),bt=s((function(t){Q([nt,t]),B([nt,t])})),wt=o((function(){return(rt-nt)/(C-x)*(k?q.height:q.width)<30}),[x,C,nt,rt]),yt=o((function(){return(rt-nt)/(C-x)*(k?q.height:q.width)<g}),[x,C,nt,rt]),Ot=function(t,e){return t/e*(k?q.height:q.width)},jt=o((function(){if(_)return{};var t=V?y:O;return F?{isRightArrowInvisible:Ot(nt,C)<b,isLeftArrowInvisible:Ot(C-rt,C)<b,distance:(rt-nt)/(C-x)*(k?q.height:q.width)-t}:{isRightArrowInvisible:Ot(C-rt,C)<b,isLeftArrowInvisible:Ot(nt,C)<b,distance:(rt-nt)/(C-x)*(k?q.height:q.width)-t}}),[x,C,nt,rt,F]),Ht=function(t){var e={min:x,max:rt,value:nt,onChange:gt},i={min:nt,max:C,value:rt,onChange:bt};return"head"===t?j(c,z({"data-testid":"".concat(S,"_handle_top"),placement:"head",readOnly:!A,isInsideArrowsVisible:yt,arrowsOutsideConfig:jt,displayFormatter:M,orientation:R,classes:W,minimal:_},F?i:e)):"tail"===t?j(c,z({"data-testid":"".concat(S,"_handle_bottom"),placement:"tail",readOnly:!A,isInsideArrowsVisible:yt,arrowsOutsideConfig:jt,displayFormatter:M,orientation:R,classes:W,minimal:_},F?e:i)):null};return j("div",{className:X.rootWrapper,children:H("div",{className:d(X.root,(h={},e(h,X.horizontalRoot,V),e(h,X.verticalRoot,k),e(h,X.minimal,_),h)),children:[j(a,{ref:Y,minHeight:0,minWidth:0,maxWidth:F?at:ot,maxHeight:F?dt:lt,enable:{right:V,bottom:k},handleComponent:{right:Ht("head"),bottom:Ht("head")},onResize:ht,onResizeStop:st}),j("div",{className:X.body,"data-testid":"slider-body",onMouseDown:function(t){ct(t.clientX,t.clientY),et(!0)},onTouchStart:function(t){ct(t.touches[0].pageX,t.touches[0].pageY),et(!0)},children:j("div",wt?{className:d((P={},e(P,X.horizontalBodyHandle,V),e(P,X.verticalBodyHandle,k),e(P,X.leftBodyHandle,"left"===N),e(P,X.rightBodyHandle,"right"===N),e(P,X.topBodyHandle,"top"===N),e(P,X.bottomBodyHandle,"bottom"===N),P)),children:j("div",{className:X.bodyHandle,"data-testid":"".concat(S,"_handle"),children:j(u,{orientation:"vertical",minimal:_})})}:{className:X.bodyHandleIcon,"data-testid":"".concat(S,"_handle"),children:j(u,{orientation:R,minimal:_})})}),j(a,{ref:T,minHeight:0,minWidth:0,enable:{left:V,top:k},handleComponent:{left:Ht("tail"),top:Ht("tail")},onResize:ht,onResizeStop:st})]})})};x.defaultProps={orientation:f,valueFormatter:Math.floor,displayFormatter:function(t){return t},onChange:h,onStop:h,reversed:!1,editableHandles:!0,handleClasses:{},minimal:!1};var C=l({monitorWidth:!0,monitorHeight:!0})(x);export{x as AdvancedSlider,C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function Handle({ value, orientation, placement, readOnly, onChange, min, max, displayFormatter, classes, minimal, "data-testid": dataTestId, }: {
|
|
1
|
+
export function Handle({ value, orientation, placement, readOnly, onChange, min, max, displayFormatter, isInsideArrowsVisible, arrowsOutsideConfig, classes, minimal, "data-testid": dataTestId, }: {
|
|
2
2
|
value: any;
|
|
3
3
|
orientation: any;
|
|
4
4
|
placement: any;
|
|
@@ -7,6 +7,8 @@ export function Handle({ value, orientation, placement, readOnly, onChange, min,
|
|
|
7
7
|
min: any;
|
|
8
8
|
max: any;
|
|
9
9
|
displayFormatter: any;
|
|
10
|
+
isInsideArrowsVisible: any;
|
|
11
|
+
arrowsOutsideConfig: any;
|
|
10
12
|
classes: any;
|
|
11
13
|
minimal: any;
|
|
12
14
|
"data-testid": any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Handle.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/Handle.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Handle.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/Handle.js"],"names":[],"mappings":"AAoBO;;;;;;;;;;;;;;gBA2HN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from"@babel/runtime/helpers/defineProperty";import i from"@babel/runtime/helpers/slicedToArray";import{useState as s,useRef as e,useEffect as r}from"react";import{Input as n}from"@material-ui/core";import t from"classnames";import{LeftIcon as a,RightIcon as l}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"./styles/sliderStyles.js";import{useHandleStyles as c}from"./styles/handleStyles.js";import{getIsInputValueValid as m,getValidatedValue as d}from"./utils.js";import{HORIZONTAL_ORIENTATION as u,VERTICAL_ORIENTATION as p,HEAD_PLACEMENT as v}from"./constants.js";import{jsxs as f,jsx as h}from"react/jsx-runtime";var j=function(j){var I,b,w,y,H=j.value,R=j.orientation,g=j.placement,A=j.readOnly,z=j.onChange,C=j.min,N=j.max,O=j.displayFormatter,T=j.isInsideArrowsVisible,x=j.arrowsOutsideConfig,E=j.classes,F=j.minimal,L=j["data-testid"],P=s(!1),S=i(P,2),k=S[0],q=S[1],M=s(H),V=i(M,2),B=V[0],D=V[1],G=e(null),K=R===u,U=R===p,W=g===v,J=c({distance:null==x?void 0:x.distance}),Q=function(o){var i=Number(o);m(i)?z(d(i,C,N)):q(!0)};return r((function(){D(H),k&&q(!1)}),[H]),f("div",{className:t(J.root,E.handleRoot,(I={},o(I,J.horizontalHeadRoot,K&&W),o(I,J.horizontalTailRoot,K&&!W),o(I,J.verticalHeadRoot,U&&W),o(I,J.verticalTailRoot,U&&!W),o(I,J.minimalHandleRoot,F),I)),children:[!F&&h(a,{size:16,className:t(J.leftArrow,(b={},o(b,J.reversedLeftArrow,U),o(b,J.isInvisible,T&&!W||W&&(null==x?void 0:x.isLeftArrowInvisible)),b)),fill:"white"}),h("div",{className:t(J.handle,E.handle,(w={},o(w,J.horizontalHeadHandle,K&&W),o(w,J.horizontalTailHandle,K&&!W),o(w,J.verticalHeadHandle,U&&W),o(w,J.verticalTailHandle,U&&!W),o(w,J.minimalHandle,F),o(w,J.minimalVerticalHandle,F&&U),w)),"data-testid":L,children:!F&&h(n,{inputProps:{"data-testid":"handle-input"},readOnly:A,inputRef:G,onKeyDown:function(o){var i=o.keyCode,s=o.target;13===i&&Q(s.value)},onBlur:function(o){var i=o.target;Q(i.value)},classes:{root:t(J.inputRoot,k&&J.hasError)},value:A?O(B):B,onChange:function(o){var i=o.target.value;D(i),k&&q(!1)},disableUnderline:!0,error:!(Number.isFinite(+B)&&+B>=C&&+B<=N)})}),!F&&h(l,{size:16,className:t(J.rightArrow,(y={},o(y,J.reversedRightArrow,U),o(y,J.isInvisible,T&&W||!W&&(null==x?void 0:x.isRightArrowInvisible)),y)),fill:"white"})]})};export{j as Handle};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const INPUT_VALUE_REGEX: RegExp;
|
|
2
|
+
export const VERTICAL_ORIENTATION: "vertical";
|
|
3
|
+
export const HORIZONTAL_ORIENTATION: "horizontal";
|
|
4
|
+
export const HEAD_PLACEMENT: "head";
|
|
5
|
+
export const INPUT_WIDTH: 47;
|
|
6
|
+
export const INPUT_HEIGHT: 20;
|
|
7
|
+
export const MIN_ARROW_GAP: 12;
|
|
8
|
+
export const INNER_GAP: 24;
|
|
9
|
+
export const VERTICAL_MIN_GAP: 90;
|
|
10
|
+
export const HORIZONTAL_MIN_GAP: 48;
|
|
11
|
+
export const HOVER_ARREA_WIDTH: 72;
|
|
12
|
+
export const HOVER_AREA_HEIGHT: 64;
|
|
13
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/constants.js"],"names":[],"mappings":"AAAA,uCAA8C;AAE9C,8CAA+C;AAC/C,kDAAmD;AACnD,oCAAqC;AAErC,6BAA8B;AAC9B,8BAA+B;AAC/B,+BAAgC;AAChC,2BAA4B;AAE5B,kCAAmC;AACnC,oCAAqC;AAErC,mCAAoC;AACpC,mCAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=/^[0-9.-]*$/,r="vertical",e="horizontal",o="head",t=47,h=20,i=12,l=24,v=90,c=48,d=72,n=64;export{o as HEAD_PLACEMENT,c as HORIZONTAL_MIN_GAP,e as HORIZONTAL_ORIENTATION,n as HOVER_AREA_HEIGHT,d as HOVER_ARREA_WIDTH,l as INNER_GAP,h as INPUT_HEIGHT,a as INPUT_VALUE_REGEX,t as INPUT_WIDTH,i as MIN_ARROW_GAP,v as VERTICAL_MIN_GAP,r as VERTICAL_ORIENTATION};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const useHandleStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"handle" | "root" | "inputRoot" | "horizontalHeadRoot" | "horizontalTailRoot" | "verticalHeadRoot" | "verticalTailRoot" | "horizontalHeadHandle" | "horizontalTailHandle" | "verticalHeadHandle" | "verticalTailHandle" | "minimalHandle" | "minimalVerticalHandle" | "minimalHandleRoot">;
|
|
1
|
+
export const useHandleStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"handle" | "root" | "inputRoot" | "hasError" | "horizontalHeadRoot" | "horizontalTailRoot" | "verticalHeadRoot" | "verticalTailRoot" | "horizontalHeadHandle" | "horizontalTailHandle" | "verticalHeadHandle" | "verticalTailHandle" | "minimalHandle" | "minimalVerticalHandle" | "minimalHandleRoot" | "leftArrow" | "rightArrow" | "reversedLeftArrow" | "reversedRightArrow" | "isInvisible">;
|
|
2
2
|
//# sourceMappingURL=handleStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/AdvancedSlider/styles/handleStyles.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handleStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/AdvancedSlider/styles/handleStyles.js"],"names":[],"mappings":"AAaA,4dAkLI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as r}from"@material-ui/core";var e={minWidth:47,height:20,borderRadius:4},
|
|
1
|
+
import{makeStyles as r}from"@material-ui/core";import{HOVER_AREA_HEIGHT as t,HOVER_ARREA_WIDTH as i}from"../constants.js";import{getHoverAreaSize as o}from"../utils.js";var e={minWidth:47,height:20,borderRadius:4},n=r((function(r){var n=r.isLightTheme,a=r.palette;return{root:{fontSize:"12px",position:"absolute","&:hover":{borderColor:a.primary.main},"&:active":{borderColor:a.primary.main},"&:hover $handle":{borderColor:a.primary.main},"&:active $handle":{background:a.primary.dark,borderColor:a.primary.main},"&:hover $inputRoot:not($hasError)":{background:a.primary.dark,border:"1px solid ".concat(a.primary.main)},"&:hover $inputRoot $hasError":{background:"".concat(a.background.b6," !important"),border:"1px solid ".concat(a.primary.main)},"&:active $inputRoot":{background:a.primary.dark,border:"1px solid ".concat(a.primary.main)},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","&:hover $leftArrow, &:active $leftArrow":{visibility:"visible"},"&:hover $rightArrow, &:active $rightArrow":{visibility:"visible"}},hasError:{border:"1px solid ".concat(a.error.main," !important"),"&.Mui-focused":{background:"".concat(a.background.b6," !important")},"&:hover":{background:a.background.b6},"&:hover $inputRoot":{background:a.background.b6}},horizontalHeadRoot:{top:0,bottom:0,right:5},horizontalTailRoot:{top:0,bottom:0,left:5},verticalHeadRoot:{left:0,right:0,bottom:5},verticalTailRoot:{left:0,right:0,top:5},handle:{position:"relative",background:n?"#B1B1B1":"#414141","& > p":{fontSize:"12px",textAlign:"center",lineHeight:"20px"},display:"flex",alignItems:"center",justifyContent:"center","&:before":{position:"absolute",left:"50%",top:"50%",height:function(r){var i=r.distance;return o({inititalSize:t,distance:i})},width:function(r){var t=r.distance;return o({distance:t,inititalSize:i})},content:'""',transform:"translate(-50%, -50%)",zIndex:100}},horizontalHeadHandle:e,horizontalTailHandle:e,verticalHeadHandle:e,verticalTailHandle:e,inputRoot:{borderRadius:4,minWidth:47,zIndex:101,height:"20px",fontSize:"12px",border:"1px solid ".concat(a.primary.text9),"&:hover":{border:"1px solid ".concat(a.primary.main)},"&:active":{textDecoration:"underline"},"&::before":{borderWidth:0},"&::after":{borderWidth:"1px !important"},"& .MuiInputBase-input":{padding:0,height:"100%",textAlign:"center"},"&:hover::before":{borderWidth:"1px !important"},"&.Mui-focused":{textDecoration:"underline",background:a.primary.dark,border:"1px solid ".concat(a.primary.main)}},minimalHandle:{background:a.primary.text9,width:"8px !important",minWidth:8,minHeight:20,height:"20px !important","& .MuiInput-underline.Mui-error:after":{border:0},"&:before":{width:"0px !important",height:"0px !important"}},minimalVerticalHandle:{width:20,minWidth:20,minHeight:8,height:"8px !important"},minimalHandleRoot:{borderColor:a.primary.text9,zIndex:100,"&:not(:hover)":{border:"none"}},leftArrow:{visibility:"hidden",zIndex:101,position:"absolute",left:-16},rightArrow:{visibility:"hidden",zIndex:101,position:"absolute",right:-15},reversedLeftArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",top:-16},reversedRightArrow:{left:"50%",transform:"translateX(-50%) rotate(90deg)",bottom:-15},isInvisible:{display:"none"}}}));export{n as useHandleStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sliderStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/AdvancedSlider/styles/sliderStyles.js"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"sliderStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/AdvancedSlider/styles/sliderStyles.js"],"names":[],"mappings":"AAIA,2UAsKI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as t,fade as o}from"@material-ui/core";var e=t((function(t){return{rootWrapper:{position:"relative",width:"100%",height:"100%",zIndex:100},root:{position:"absolute",width:"100%",height:"100%",zIndex:100,"&:hover $bodyHandle":{visibility:"visible"}},horizontalRoot:{width:"calc(100% - 94px)",left:"47px",display:"flex",alignItems:"center","&::before, &::after":{zIndex:-1,position:"absolute",top:0,content:'""',backgroundColor:t.palette.background.b7,width:1,height:"100%"},"&::before":{left:0},"&::after":{right:0}},verticalRoot:{height:"calc(100% - 40px)",top:20,display:"flex",alignItems:"center",flexDirection:"column","&::before, &::after":{zIndex:-1,position:"absolute",left:0,content:'""',backgroundColor:t.palette.background.b7,width:"100%",height:1},"&::before":{top:0},"&::after":{bottom:0}},body:{position:"relative",flex:1,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",background:"#3B3B3B66",color:"#BDBDBD","& svg":{fill:"currentColor"},"&:hover":{cursor:"grab",background:"#008BA366",color:"#FFFFFF"},"&:active":{cursor:"grabbing",background:"#008BA366"},"&:active $bodyHandleIcon":{visibility:"visible"},"&:hover $bodyHandleIcon":{visibility:"visible"}},horizontalBodyHandle:{position:"absolute",bottom:-24},verticalBodyHandle:{position:"absolute",left:-24,zIndex:111},leftBodyHandle:{position:"absolute",left:-24,right:"auto"},rightBodyHandle:{position:"absolute",right:-24,left:"auto"},topBodyHandle:{position:"absolute",top:-24,bottom:"auto"},bottomBodyHandle:{position:"absolute",bottom:-24,top:"auto"},bodyHandle:{zIndex:101,width:24,height:24,borderRadius:"50%",background:"#03BCD4",color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",visibility:"hidden","&:before":{position:"absolute",left:"50%",top:"50%",height:32,width:24,content:'""',transform:"translate(-50%, -50%)",zIndex:1e3}},bodyHandleIcon:{visibility:"hidden"},minimal:{borderRadius:4,width:"100%",height:"100%",top:0,left:0,"&::before, &::after":{display:"none"},"& $body":{"&:hover":{background:"#008BA366"},margin:-1,width:"calc(100% + 2px)",height:"calc(100% + 2px)",backgroundColor:o(t.palette.background.b7,.1),border:"1px solid ".concat(t.palette.primary.text9),borderRadius:4}}}}));export{e as useSliderStyles};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function getValidatedValue(value: any, min: any, max: any): number;
|
|
2
|
+
export function getIsInputValueValid(inputValue: any): boolean;
|
|
3
|
+
export function getHoverAreaSize({ inititalSize, distance }: {
|
|
4
|
+
inititalSize: any;
|
|
5
|
+
distance: any;
|
|
6
|
+
}): any;
|
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/utils.js"],"names":[],"mappings":"AAEO,0EAAkF;AAElF,+DACkE;AAElE;;;QAC8D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{INPUT_VALUE_REGEX as t}from"./constants.js";var n=function(t,n,r){return Math.min(Math.max(t,n),r)},r=function(n){return t.test(n)&&!Number.isNaN(Number(n))},a=function(t){var n=t.inititalSize,r=t.distance;return r<0?n-Math.abs(r/2):n};export{a as getHoverAreaSize,r as getIsInputValueValid,n as getValidatedValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/components/LiveButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAInE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,cAAc,UAAW,mBAAmB,uFAWxD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/components/LiveButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAInE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,cAAc,UAAW,mBAAmB,uFAWxD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyChD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o,__assign as
|
|
1
|
+
import{__rest as o,__assign as t}from'./../../../../ext-esm/tslib/tslib.es6.js';import{jsx as s,jsxs as i}from"react/jsx-runtime";import e from"moment-timezone";import{Tooltip as n}from"@material-ui/core";import c from"classnames";import{RightSmallIcon as r}from"../../../../icons/iconParkIcons.js";import"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../icons/customIcons/icons/Search.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import m from"../Button/index.js";import{LiveButtonState as a}from"./constants.js";export{LiveButtonState}from"./constants.js";import{LiveButtonStateIndicator as l}from"./components/LiveButtonStateIndicator/index.js";import{useStyles as p}from"./styles.js";var u=function(o,t){return o===a.Default?"Go to Live data":o===a.Live?"Data receiving in real-time":i("div",{children:["Asset isn't Live",s("br",{}),t&&"Last active: ".concat(e(t).format("MMM D YYYY, hh:mm A"))]})},d=function(e){var d,f=e.size,j=void 0===f?"medium":f,v=e.state,I=void 0===v?a.Default:v,h=e.startIcon,L=e.children,A=void 0===L?"Live":L,x=e.className,z=e.tooltipProps,b=e.lastActiveAt,D=o(e,["size","state","startIcon","children","className","tooltipProps","lastActiveAt"]),M=p({size:j}),S=M[j],O={placement:"bottom",title:u(I,b)},Y=h||s(r,{size:"small"===j?20:24});return s(n,t({},O,z,{children:i(m,t({},D,{className:c(M.root,S,(d={},d[M.liveState]=I===a.Live,d[M.offlineState]=I===a.Offline,d),x),size:j,startIcon:I===a.Default&&Y},{children:[A,s(l,{state:I})]}))}))};export{d as LiveButton,u as getTooltipText};
|