@corva/ui 0.84.0-2 → 0.84.0-20

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.
Files changed (61) hide show
  1. package/cjs-bundle/components/AdvancedSlider/AdvancedSlider.js +1 -1
  2. package/cjs-bundle/components/AdvancedSlider/Handle.js +1 -1
  3. package/cjs-bundle/components/AdvancedSlider/constants.js +1 -0
  4. package/cjs-bundle/components/AdvancedSlider/styles/handleStyles.js +1 -1
  5. package/cjs-bundle/components/AdvancedSlider/styles/sliderStyles.js +1 -1
  6. package/cjs-bundle/components/AdvancedSlider/utils.js +1 -0
  7. package/cjs-bundle/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.js +1 -1
  8. package/cjs-bundle/components/Button/components/LiveButton/index.js +1 -1
  9. package/cjs-bundle/components/Button/components/LiveButton/styles.js +1 -1
  10. package/cjs-bundle/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
  11. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js +1 -1
  12. package/cjs-bundle/components/PadModeSelect/PadModeSelect.js +1 -1
  13. package/cjs-bundle/components/RangeSlider/RangeSlider.js +1 -1
  14. package/cjs-bundle/components/Search/Search.js +1 -1
  15. package/cjs-bundle/permissions/constants/index.js +1 -1
  16. package/cjs-bundle/utils/goalsConfig/goalsConfig.js +1 -1
  17. package/cjs-bundle/utils/metrics/metricsConfig.js +1 -1
  18. package/components/AdvancedSlider/AdvancedSlider.d.ts +1 -1
  19. package/components/AdvancedSlider/AdvancedSlider.d.ts.map +1 -1
  20. package/components/AdvancedSlider/AdvancedSlider.js +1 -1
  21. package/components/AdvancedSlider/Handle.d.ts +3 -1
  22. package/components/AdvancedSlider/Handle.d.ts.map +1 -1
  23. package/components/AdvancedSlider/Handle.js +1 -1
  24. package/components/AdvancedSlider/constants.d.ts +13 -0
  25. package/components/AdvancedSlider/constants.d.ts.map +1 -0
  26. package/components/AdvancedSlider/constants.js +1 -0
  27. package/components/AdvancedSlider/styles/handleStyles.d.ts +1 -1
  28. package/components/AdvancedSlider/styles/handleStyles.d.ts.map +1 -1
  29. package/components/AdvancedSlider/styles/handleStyles.js +1 -1
  30. package/components/AdvancedSlider/styles/sliderStyles.d.ts +1 -1
  31. package/components/AdvancedSlider/styles/sliderStyles.d.ts.map +1 -1
  32. package/components/AdvancedSlider/styles/sliderStyles.js +1 -1
  33. package/components/AdvancedSlider/utils.d.ts +20 -0
  34. package/components/AdvancedSlider/utils.d.ts.map +1 -0
  35. package/components/AdvancedSlider/utils.js +1 -0
  36. package/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.d.ts +5 -3
  37. package/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.d.ts.map +1 -1
  38. package/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.js +1 -1
  39. package/components/Button/components/LiveButton/index.d.ts.map +1 -1
  40. package/components/Button/components/LiveButton/index.js +1 -1
  41. package/components/Button/components/LiveButton/styles.d.ts.map +1 -1
  42. package/components/Button/components/LiveButton/styles.js +1 -1
  43. package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.d.ts.map +1 -1
  44. package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
  45. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.d.ts +0 -7
  46. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.d.ts.map +1 -1
  47. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js +1 -1
  48. package/components/PadModeSelect/PadModeSelect.d.ts.map +1 -1
  49. package/components/PadModeSelect/PadModeSelect.js +1 -1
  50. package/components/RangeSlider/RangeSlider.d.ts.map +1 -1
  51. package/components/RangeSlider/RangeSlider.js +1 -1
  52. package/components/Search/Search.d.ts.map +1 -1
  53. package/components/Search/Search.js +1 -1
  54. package/package.json +1 -1
  55. package/permissions/constants/index.d.ts +3 -0
  56. package/permissions/constants/index.d.ts.map +1 -1
  57. package/permissions/constants/index.js +1 -1
  58. package/utils/goalsConfig/goalsConfig.d.ts.map +1 -1
  59. package/utils/goalsConfig/goalsConfig.js +1 -1
  60. package/utils/metrics/metricsConfig.d.ts +192 -0
  61. package/utils/metrics/metricsConfig.js +1 -1
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/defineProperty";import{useRef as n,useState as i,useEffect as o,useMemo as r}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 c}from"../shared/useThrottledCallback.js";import{Handle as u}from"./Handle.js";import{HandleIcon as m}from"./icons/HandleIcon.js";import{useSliderStyles as s}from"./styles/sliderStyles.js";import"./styles/handleStyles.js";import{jsx as p,jsxs as f}from"react/jsx-runtime";function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function g(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?v(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var y="twoValuesSliderDefault",b=function(l){var h,v,b=l.min,w=l.max,O=l.value,j=l.size,H=l.orientation,z=l.valueFormatter,P=l.displayFormatter,S=l.editableHandles,x=l.onChange,E=l.onStop,C=l.reversed,L=l.handlePosition,M=l.handleClasses,R=l.minimal,B=s(),D=n(null),F=n(null),N="horizontal"===H,W="vertical"===H,_=g(g({},j),{},{width:N?j.width-94:j.width,height:W?j.height-40:j.height}),X=i([z(null==O?void 0:O.at(0)),z(null==O?void 0:O.at(1))]),Y=t(X,2),T=Y[0],k=Y[1],I=n(null),A=i(!1),V=t(A,2),q=V[0],G=V[1],J=t(T,2),K=J[0],Q=J[1],U=_.width/(w-b)*(Q-b),Z=_.width/(w-b)*(w-K),$=_.height/(w-b)*(Q-b),tt=_.height/(w-b)*(w-K);o((function(){if(!I.current){var t=[z(null==O?void 0:O.at(0)),z(null==O?void 0:O.at(1))],e=Math.min.apply(Math,t),n=Math.max.apply(Math,t);k([e,n])}}),[null==O?void 0:O.at(0),null==O?void 0:O.at(1)]),o((function(){if(N){var t=_.width/(w-b)*(K-b),e=_.width/(w-b)*(w-Q);D.current.updateSize({width:C?e:t,height:_.height}),F.current.updateSize({width:C?t:e,height:_.height})}else if(W){var n=_.height/(w-b)*(K-b),i=_.height/(w-b)*(w-Q);D.current.updateSize({width:_.width,height:C?i:n}),F.current.updateSize({width:_.width,height:C?n:i})}}),[b,w,K,Q,_.width,_.height,H]),o((function(){var t=function(){document.removeEventListener("mousemove",rt),document.removeEventListener("mouseup",at),document.removeEventListener("touchmove",lt),document.removeEventListener("touchend",dt)};return q?(document.addEventListener("mousemove",rt),document.addEventListener("mouseup",at),document.addEventListener("touchmove",lt),document.addEventListener("touchend",dt)):(t(),E()),function(){t()}}),[q]);var et=c((function(t,e,n){I.current="onResize Event";var i=n.clientWidth,o=n.clientHeight,r=K,a=Q;"right"===e?C?a=z(w-i/_.width*(w-b)):r=z(b+i/_.width*(w-b)):"left"===e?C?r=z(b+i/_.width*(w-b)):a=z(w-i/_.width*(w-b)):"bottom"===e?C?a=z(w-o/_.height*(w-b)):r=z(b+o/_.height*(w-b)):"top"===e&&(C?r=z(b+o/_.height*(w-b)):a=z(w-o/_.height*(w-b))),r=Math.min(r,Q),a=Math.max(a,K),k([r,a]),x([r,a])})),nt=c((function(){I.current=null,E()})),it=function(t,e){I.current={xPos:t,yPos:e,head:K,tail:Q}},ot=function(t,e){if(I.current){var n;N?n=(I.current.xPos-t)/_.width*(w-b):W&&(n=(I.current.yPos-e)/_.height*(w-b));var i,o,r=I.current.head-n*(C?-1:1),a=I.current.tail-n*(C?-1:1),l=I.current.tail-I.current.head;r<=b?(i=b,o=b+l):a>=w?(i=w-l,o=w):(i=r,o=a),i=z(i),o=z(o),k([i,o]),x([i,o])}},rt=c((function(t){ot(t.clientX,t.clientY)})),at=c((function(){I.current=null,G(!1)})),lt=c((function(t){ot(t.touches[0].pageX,t.touches[0].pageY)})),dt=c((function(){I.current=null,G(!1)})),ht=c((function(t){k([t,Q]),x([t,Q])})),ct=c((function(t){k([K,t]),x([K,t])})),ut=r((function(){return(Q-K)/(w-b)*(W?_.height:_.width)<30}),[b,w,K,Q]),mt=function(t){var e={min:b,max:Q,value:K,onChange:ht},n={min:K,max:w,value:Q,onChange:ct};return"head"===t?p(u,g({"data-testid":"".concat(y,"_handle_top"),placement:"head",readOnly:!S,displayFormatter:P,orientation:H,classes:M,minimal:R},C?n:e)):"tail"===t?p(u,g({"data-testid":"".concat(y,"_handle_bottom"),placement:"tail",readOnly:!S,displayFormatter:P,orientation:H,classes:M,minimal:R},C?e:n)):null};return p("div",{className:B.rootWrapper,children:f("div",{className:d(B.root,(h={},e(h,B.horizontalRoot,N),e(h,B.verticalRoot,W),e(h,B.minimal,R),h)),children:[p(a,{ref:D,minHeight:0,minWidth:0,maxWidth:C?Z:U,maxHeight:C?tt:$,enable:{right:N,bottom:W},handleComponent:{right:mt("head"),bottom:mt("head")},onResize:et,onResizeStop:nt}),p("div",{className:B.body,"data-testid":"slider-body",onMouseDown:function(t){it(t.clientX,t.clientY),G(!0)},onTouchStart:function(t){it(t.touches[0].pageX,t.touches[0].pageY),G(!0)},children:p("div",ut?{className:d((v={},e(v,B.horizontalBodyHandle,N),e(v,B.verticalBodyHandle,W),e(v,B.leftBodyHandle,"left"===L),e(v,B.rightBodyHandle,"right"===L),e(v,B.topBodyHandle,"top"===L),e(v,B.bottomBodyHandle,"bottom"===L),v)),children:p("div",{className:B.bodyHandle,"data-testid":"".concat(y,"_handle"),children:p(m,{orientation:"vertical",minimal:R})})}:{className:B.bodyHandleIcon,"data-testid":"".concat(y,"_handle"),children:p(m,{orientation:H,minimal:R})})}),p(a,{ref:F,minHeight:0,minWidth:0,enable:{left:N,top:W},handleComponent:{left:mt("tail"),top:mt("tail")},onResize:et,onResizeStop:nt})]})})};b.defaultProps={orientation:"horizontal",valueFormatter:Math.floor,displayFormatter:function(t){return t},onChange:h,onStop:h,reversed:!1,editableHandles:!0,handleClasses:{},minimal:!1};var w=l({monitorWidth:!0,monitorHeight:!0})(b);export{b as AdvancedSlider,w as default};
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{getSizedControls as m}from"./utils.js";import{useSliderStyles as f}from"./styles/sliderStyles.js";import"./styles/handleStyles.js";import{HORIZONTAL_ORIENTATION as p,INPUT_WIDTH as v,INPUT_HEIGHT as g,INNER_GAP as b,MIN_ARROW_GAP as w,VERTICAL_ORIENTATION as y,HORIZONTAL_MIN_GAP as O,VERTICAL_MIN_GAP as H}from"./constants.js";import{jsx as j,jsxs as x}from"react/jsx-runtime";function z(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 P(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?z(Object(n),!0).forEach((function(i){e(t,i,n[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var S="twoValuesSliderDefault",M=function(l){var h,z,M=l.min,C=l.max,E=l.value,L=l.size,R=l.orientation,I=l.valueFormatter,W=l.displayFormatter,A=l.editableHandles,B=l.onChange,D=l.onStop,F=l.reversed,N=l.handlePosition,_=l.handleClasses,X=l.minimal,Y=f(),T=i(null),V=i(null),k=R===p,q=R===y,G=X?L:P(P({},L),{},{width:k?L.width-2*v:L.width,height:q?L.height-2*g:L.height}),J=n([I(null==E?void 0:E.at(0)),I(null==E?void 0:E.at(1))]),K=t(J,2),Q=K[0],U=K[1],Z=i(null),$=n(!1),tt=t($,2),et=tt[0],it=tt[1],nt=t(Q,2),rt=nt[0],ot=nt[1],at=m({isHorizontalOrientation:k,size:G,max:C,min:M,tail:ot,head:rt}),lt=at.headMaxWidth,dt=at.tailMaxWidth,ht=at.headMaxHeight,st=at.tailMaxHeight;r((function(){if(!Z.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);U([e,i])}}),[null==E?void 0:E.at(0),null==E?void 0:E.at(1)]),r((function(){if(k){var t=G.width/(C-M)*(rt-M),e=G.width/(C-M)*(C-ot);T.current.updateSize({width:F?e:t,height:G.height}),V.current.updateSize({width:F?t:e,height:G.height})}else if(q){var i=G.height/(C-M)*(rt-M),n=G.height/(C-M)*(C-ot);T.current.updateSize({width:G.width,height:F?n:i}),V.current.updateSize({width:G.width,height:F?i:n})}}),[M,C,rt,ot,G.width,G.height,R]),r((function(){var t=function(){document.removeEventListener("mousemove",pt),document.removeEventListener("mouseup",vt),document.removeEventListener("touchmove",gt),document.removeEventListener("touchend",bt)};return et?(document.addEventListener("mousemove",pt),document.addEventListener("mouseup",vt),document.addEventListener("touchmove",gt),document.addEventListener("touchend",bt)):(t(),D()),function(){t()}}),[et]);var ct=s((function(t,e,i){Z.current="onResize Event";var n=i.clientWidth,r=i.clientHeight,o=rt,a=ot;"right"===e?F?a=I(C-n/G.width*(C-M)):o=I(M+n/G.width*(C-M)):"left"===e?F?o=I(M+n/G.width*(C-M)):a=I(C-n/G.width*(C-M)):"bottom"===e?F?a=I(C-r/G.height*(C-M)):o=I(M+r/G.height*(C-M)):"top"===e&&(F?o=I(M+r/G.height*(C-M)):a=I(C-r/G.height*(C-M))),o=Math.min(o,ot),a=Math.max(a,rt),U([o,a]),B([o,a])})),ut=s((function(){Z.current=null,D()})),mt=function(t,e){Z.current={xPos:t,yPos:e,head:rt,tail:ot}},ft=function(t,e){if(Z.current){var i;k?i=(Z.current.xPos-t)/G.width*(C-M):q&&(i=(Z.current.yPos-e)/G.height*(C-M));var n,r,o=Z.current.head-i*(F?-1:1),a=Z.current.tail-i*(F?-1:1),l=Z.current.tail-Z.current.head;o<=M?(n=M,r=M+l):a>=C?(n=C-l,r=C):(n=o,r=a),n=I(n),r=I(r),U([n,r]),B([n,r])}},pt=s((function(t){ft(t.clientX,t.clientY)})),vt=s((function(){Z.current=null,it(!1)})),gt=s((function(t){ft(t.touches[0].pageX,t.touches[0].pageY)})),bt=s((function(){Z.current=null,it(!1)})),wt=s((function(t){U([t,ot]),B([t,ot])})),yt=s((function(t){U([rt,t]),B([rt,t])})),Ot=o((function(){return(ot-rt)/(C-M)*(q?G.height:G.width)<30}),[M,C,rt,ot]),Ht=o((function(){return(ot-rt)/(C-M)*(q?G.height:G.width)<b}),[M,C,rt,ot]),jt=function(t,e){return t/e*(q?G.height:G.width)},xt=o((function(){if(X)return{};var t=k?O:H;return F?{isRightArrowInvisible:jt(rt,C)<w,isLeftArrowInvisible:jt(C-ot,C)<w,distance:(ot-rt)/(C-M)*(q?G.height:G.width)-t}:{isRightArrowInvisible:jt(C-ot,C)<w,isLeftArrowInvisible:jt(rt,C)<w,distance:(ot-rt)/(C-M)*(q?G.height:G.width)-t}}),[M,C,rt,ot,F]),zt=function(t){var e={min:M,max:ot,value:rt,onChange:wt},i={min:rt,max:C,value:ot,onChange:yt};return"head"===t?j(c,P({"data-testid":"".concat(S,"_handle_top"),placement:"head",readOnly:!A,isInsideArrowsVisible:Ht,arrowsOutsideConfig:xt,displayFormatter:W,orientation:R,classes:_,minimal:X},F?i:e)):"tail"===t?j(c,P({"data-testid":"".concat(S,"_handle_bottom"),placement:"tail",readOnly:!A,isInsideArrowsVisible:Ht,arrowsOutsideConfig:xt,displayFormatter:W,orientation:R,classes:_,minimal:X},F?e:i)):null};return j("div",{className:d(Y.rootWrapper,e({},Y.rootMinimal,X)),children:x("div",{className:d(Y.root,(h={},e(h,Y.horizontalRoot,k),e(h,Y.verticalRoot,q),e(h,Y.minimal,X),h)),children:[j(a,{ref:T,minHeight:0,minWidth:0,maxWidth:F?dt:lt,maxHeight:F?st:ht,enable:{right:k,bottom:q},handleComponent:{right:zt("head"),bottom:zt("head")},onResize:ct,onResizeStop:ut}),j("div",{className:Y.body,"data-testid":"slider-body",onMouseDown:function(t){mt(t.clientX,t.clientY),it(!0)},onTouchStart:function(t){mt(t.touches[0].pageX,t.touches[0].pageY),it(!0)},children:j("div",Ot?{className:d((z={},e(z,Y.horizontalBodyHandle,k),e(z,Y.verticalBodyHandle,q),e(z,Y.leftBodyHandle,"left"===N),e(z,Y.rightBodyHandle,"right"===N),e(z,Y.topBodyHandle,"top"===N),e(z,Y.bottomBodyHandle,"bottom"===N),z)),children:j("div",{className:Y.bodyHandle,"data-testid":"".concat(S,"_handle"),children:j(u,{orientation:"vertical",minimal:X})})}:{className:Y.bodyHandleIcon,"data-testid":"".concat(S,"_handle"),children:j(u,{orientation:R,minimal:X})})}),j(a,{ref:V,minHeight:0,minWidth:0,enable:{left:k,top:q},handleComponent:{left:zt("tail"),top:zt("tail")},onResize:ct,onResizeStop:ut})]})})};M.defaultProps={orientation:p,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})(M);export{M 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":"AAsBO;;;;;;;;;;;;gBAsEN"}
1
+ {"version":3,"file":"Handle.d.ts","sourceRoot":"","sources":["../../../src/components/AdvancedSlider/Handle.js"],"names":[],"mappings":"AAoBO;;;;;;;;;;;;;;gBA2HN"}
@@ -1 +1 @@
1
- import a from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as i,useEffect as l}from"react";import{Input as r}from"@material-ui/core";import o from"classnames";import{debounce as n}from"lodash";import"./styles/sliderStyles.js";import{useHandleStyles as d}from"./styles/handleStyles.js";import{jsx as m}from"react/jsx-runtime";var s=n((function(a){a()}),500),c=function(n){var c,h,p=n.value,u=n.orientation,v=n.placement,f=n.readOnly,H=n.onChange,y=n.min,z=n.max,R=n.displayFormatter,b=n.classes,T=n.minimal,N=n["data-testid"],g=d(),j=t(p),x=e(j,2),F=x[0],C=x[1],O=i(null);l((function(){C(p)}),[p]);return m("div",{className:o(g.root,b.handleRoot,(c={},a(c,g.horizontalHeadRoot,"horizontal"===u&&"head"===v),a(c,g.horizontalTailRoot,"horizontal"===u&&"tail"===v),a(c,g.verticalHeadRoot,"vertical"===u&&"head"===v),a(c,g.verticalTailRoot,"vertical"===u&&"tail"===v),a(c,g.minimalHandleRoot,T),c)),children:m("div",{className:o(g.handle,b.handle,(h={},a(h,g.horizontalHeadHandle,"horizontal"===u&&"head"===v),a(h,g.horizontalTailHandle,"horizontal"===u&&"tail"===v),a(h,g.verticalHeadHandle,"vertical"===u&&"head"===v),a(h,g.verticalTailHandle,"vertical"===u&&"tail"===v),a(h,g.minimalHandle,T),a(h,g.minimalVerticalHandle,T&&"vertical"===u),h)),"data-testid":N,children:!T&&m(r,{inputProps:{"data-testid":"handle-input"},readOnly:f,inputRef:O,classes:{root:g.inputRoot},value:f?R(F):F,onChange:function(a){var e=a.target.value;C(e),Number.isFinite(+e)&&+e>=y&&+e<=z&&s((function(){H(+e)}))},disableUnderline:!0,error:!(Number.isFinite(+F)&&+F>=y&&+F<=z)})})})};export{c as Handle};
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":"AAWA,qXA2HI"}
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},t=r((function(r){var t=r.isLightTheme,o=r.palette;return{root:{position:"absolute","&:hover":{borderColor:o.primary.main},"&:active":{borderColor:o.primary.main},"&:hover $handle":{borderColor:o.primary.main},"&:active $handle":{background:o.primary.dark,borderColor:o.primary.main},"&:hover $inputRoot":{background:o.primary.dark,border:"1px solid ".concat(o.primary.main)},"&:active $inputRoot":{background:o.primary.dark,border:"1px solid ".concat(o.primary.main)},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},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:t?"#B1B1B1":"#414141","& > p":{fontSize:"12px",textAlign:"center",lineHeight:"20px"},display:"flex",alignItems:"center",justifyContent:"center","&:before":{position:"absolute",left:"50%",top:"50%",height:64,width:64,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(o.primary.text9),"&:hover":{border:"1px solid ".concat(o.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:o.primary.dark,border:"1px solid ".concat(o.primary.main)}},minimalHandle:{background:o.primary.text9,width:8,height:20,"& .MuiInput-underline.Mui-error:after":{border:0}},minimalVerticalHandle:{width:20,height:20},minimalHandleRoot:{borderColor:o.primary.text9,zIndex:100,"&:not(:hover)":{border:"none"}}}}));export{t as useHandleStyles};
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,2 +1,2 @@
1
- export const useSliderStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"body" | "root" | "rootWrapper" | "horizontalRoot" | "verticalRoot" | "horizontalBodyHandle" | "verticalBodyHandle" | "leftBodyHandle" | "rightBodyHandle" | "topBodyHandle" | "bottomBodyHandle" | "bodyHandle" | "bodyHandleIcon" | "minimal">;
1
+ export const useSliderStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"body" | "root" | "rootWrapper" | "horizontalRoot" | "verticalRoot" | "horizontalBodyHandle" | "verticalBodyHandle" | "leftBodyHandle" | "rightBodyHandle" | "topBodyHandle" | "bottomBodyHandle" | "bodyHandle" | "bodyHandleIcon" | "rootMinimal" | "minimal">;
2
2
  //# sourceMappingURL=sliderStyles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sliderStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/AdvancedSlider/styles/sliderStyles.js"],"names":[],"mappings":"AAIA,2UAkJI"}
1
+ {"version":3,"file":"sliderStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/AdvancedSlider/styles/sliderStyles.js"],"names":[],"mappings":"AAIA,2VAyKI"}
@@ -1 +1 @@
1
- import{makeStyles as o,fade as t}from"@material-ui/core";var e=o((function(o){return{rootWrapper:{position:"relative",width:"100%",height:"100%",zIndex:100},root:{position:"absolute",width:"100%",height:"100%",zIndex:100,"&:hover:not($minimal) $body":{background:"#008BA366"},"&: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:o.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:o.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"},"&: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:{width:24,height:24,borderRadius:"50%",background:"#03BCD4",color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",visibility:"hidden"},bodyHandleIcon:{visibility:"hidden"},minimal:{border:"1px solid ".concat(o.palette.background.b9),borderRadius:4,"& $body":{"&:hover":{background:"#008BA366"},margin:-1,width:"calc(100% + 2px)",height:"calc(100% + 2px)",backgroundColor:t(o.palette.background.b7,.1),border:"1px solid ".concat(o.palette.primary.text9),borderRadius:4}}}}));export{e as useSliderStyles};
1
+ import{makeStyles as o,fade as t}from"@material-ui/core";var e=o((function(o){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:o.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:o.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"},rootMinimal:{border:"1px solid ".concat(o.palette.background.b9),borderRadius:4},minimal:{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:t(o.palette.background.b7,.1),border:"1px solid ".concat(o.palette.primary.text9),borderRadius:4}}}}));export{e as useSliderStyles};
@@ -0,0 +1,20 @@
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
+ export function getSizedControls({ isHorizontalOrientation, size, max, min, head, tail }: {
8
+ isHorizontalOrientation: any;
9
+ size: any;
10
+ max: any;
11
+ min: any;
12
+ head: any;
13
+ tail: any;
14
+ }): {
15
+ headMaxWidth: any;
16
+ tailMaxWidth: any;
17
+ headMaxHeight: any;
18
+ tailMaxHeight: any;
19
+ };
20
+ //# 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;AAE9D;;;;;;;;;;;;EASL"}
@@ -0,0 +1 @@
1
+ import{INPUT_VALUE_REGEX as t}from"./constants.js";var i=function(t,i,a){return Math.min(Math.max(t,i),a)},a=function(i){return t.test(i)&&!Number.isNaN(Number(i))},h=function(t){var i=t.inititalSize,a=t.distance;return a<0?i-Math.abs(a/2):i},e=function(t){var i=t.isHorizontalOrientation,a=t.size,h=t.max,e=t.min,n=t.head,r=t.tail;return{headMaxWidth:i?a.width/(h-e)*(r-e):a.width,tailMaxWidth:i?a.width/(h-e)*(h-n):a.width,headMaxHeight:i?a.height:a.height/(h-e)*(r-e),tailMaxHeight:i?a.height:a.height/(h-e)*(h-n)}};export{h as getHoverAreaSize,a as getIsInputValueValid,e as getSizedControls,i as getValidatedValue};
@@ -1,6 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { LiveButtonStateType } from '../../constants';
3
- export declare function LiveButtonStateIndicator({ state }: {
3
+ interface LiveButtonStateIndicatorProps {
4
4
  state: LiveButtonStateType;
5
- }): JSX.Element;
5
+ }
6
+ export declare const LiveButtonStateIndicator: React.FC<LiveButtonStateIndicatorProps>;
7
+ export {};
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAUvE,wBAAgB,wBAAwB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,mBAAmB,CAAA;CAAE,eAkBjF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAmB,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAsDvE,UAAU,6BAA6B;IACrC,KAAK,EAAE,mBAAmB,CAAC;CAC5B;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAuB5E,CAAC"}
@@ -1 +1 @@
1
- import{__assign as r}from'./../../../../../../ext-esm/tslib/tslib.es6.js';import{jsxs as t,jsx as i}from"react/jsx-runtime";import{makeStyles as o}from"@material-ui/core";import{LiveButtonState as e}from"../../constants.js";var l=o({root:{marginLeft:4,position:"relative",top:-4}});function s(o){var s=o.state,c=l();if(s===e.Default)return null;var n=s===e.Live?"#75DB29":"#616161";return t("svg",r({className:c.root,fill:"none",height:"8",viewBox:"0 0 8 8",width:"8",xmlns:"http://www.w3.org/2000/svg"},{children:[i("circle",{opacity:"0.4",cx:"4",cy:"4",r:"4",fill:n}),i("circle",{cx:"4",cy:"4",r:"2",fill:n})]}))}export{s as LiveButtonStateIndicator};
1
+ import{__assign as i}from'./../../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"react";import{makeStyles as r}from"@material-ui/core/styles";import{LiveButtonState as a}from"../../constants.js";var s=r((function(i){return{offline:{marginLeft:4,position:"relative",top:-4},livePulsed:{marginLeft:6,position:"relative",transform:"translateX(-50%) translateY(-50%)",width:8,height:8,"&:before":{content:'""',position:"relative",display:"block",width:"150%",height:"150%",boxSizing:"border-box",marginTop:"-2px",marginLeft:"-2px",borderRadius:"45px",backgroundColor:i.palette.success.bright,animation:"$pulseRing 3.25s cubic-bezier(0.215, 0.61, 0.355, 1) infinite"},"&:after":{content:'""',position:"absolute",left:0,top:0,display:"block",width:"100%",height:"100%",backgroundColor:i.palette.success.bright,borderRadius:"15px",boxShadow:"0 0 8px rgba(0,0,0,.3)",animation:"$pulseDot 3.25s cubic-bezier(0.455, 0.03, 0.515, 0.955) -.4s infinite"}},"@keyframes pulseRing":{"0%":{opacity:0,transform:"scale(.55)"},"50%":{opacity:.5},"100%":{opacity:0}},"@keyframes pulseDot":{"0%":{transform:"scale(.6)",opacity:.5},"50%":{transform:"scale(.7)",opacity:1},"100%":{transform:"scale(.6)",opacity:.5}}}})),l=o.memo((function(o){var r=o.state,l=s();return r===a.Default?null:r===a.Live?e("div",{className:l.livePulsed,"aria-label":"Live indicator"}):t("svg",i({className:l.offline,fill:"none",height:"8",viewBox:"0 0 8 8",width:"8",xmlns:"http://www.w3.org/2000/svg","aria-label":"Idle indicator"},{children:[e("circle",{opacity:"0.4",cx:"4",cy:"4",r:"4",fill:"#616161"}),e("circle",{cx:"4",cy:"4",r:"2",fill:"#616161"})]}))}));export{l as LiveButtonStateIndicator};
@@ -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,CAwChD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
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 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=void 0===h?s(r,{}):h,A=e.children,b=void 0===A?"Live":A,x=e.className,z=e.tooltipProps,D=e.lastActiveAt,M=o(e,["size","state","startIcon","children","className","tooltipProps","lastActiveAt"]),S=p({size:j}),O=S[j],Y={placement:"bottom",title:u(I,D)};return s(n,t({},Y,z,{children:i(m,t({},M,{className:c(S.root,O,(d={},d[S.liveState]=I===a.Live,d[S.offlineState]=I===a.Offline,d),x),size:j,startIcon:I===a.Default&&L,disableRipple:!0},{children:[b,s(l,{state:I})]}))}))};export{d as LiveButton,u as getTooltipText};
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};
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/components/LiveButton/styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS,mIA6BnB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/components/LiveButton/styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS,mIA+BnB,CAAC"}
@@ -1 +1 @@
1
- import{__assign as o}from'./../../../../ext-esm/tslib/tslib.es6.js';import{makeStyles as r}from"@material-ui/core";var t={backgroundColor:"rgba(255, 255, 255, 0.03)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.03)"},"&:active":{backgroundColor:"rgba(255, 255, 255, 0.03)"}},e=r((function(r){return{root:{backgroundColor:"rgba(255, 255, 255, 0.08)",borderRadius:8,color:"white",fontWeight:500,lineHeight:"18px",textTransform:"none","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"},"&:active":{backgroundColor:"rgba(255, 255, 255, 0.16)"}},small:{fontSize:16,height:32},medium:{fontSize:16},large:{fontSize:18},liveState:o(o({},t),{color:"#75DB29 !important"}),offlineState:o(o({},t),{color:"".concat(r.palette.primary.text6," !important")})}}));export{e as useStyles};
1
+ import{__assign as o}from'./../../../../ext-esm/tslib/tslib.es6.js';import{makeStyles as r}from"@material-ui/core";var t={backgroundColor:"rgba(255, 255, 255, 0.03)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.03)"},"&:active":{backgroundColor:"rgba(255, 255, 255, 0.03)"}},e=r((function(r){return{root:{backgroundColor:"rgba(255, 255, 255, 0.08)",borderRadius:8,color:"white",fontWeight:500,lineHeight:"18px",textTransform:"none",minWidth:92,"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"},"&:active":{backgroundColor:"rgba(255, 255, 255, 0.16)"},"& .MuiButton-startIcon":{marginRight:4}},small:{fontSize:16,height:32},medium:{fontSize:16},large:{fontSize:18},liveState:o(o({},t),{color:"#75DB29 !important"}),offlineState:o(o({},t),{color:"".concat(r.palette.primary.text6," !important")})}}));export{e as useStyles};
@@ -1 +1 @@
1
- {"version":3,"file":"AppSettingsPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppSettingsPopover/AppSettingsPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAc,YAAY,EAAW,MAAM,mBAAmB,CAAC;AAOtE,OAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAuD1D,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,GAAG,CAAC,OAAO,CAAC;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,GAAG;QACjC,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,CAAC,EAAE;QAClB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;QAC1B,YAAY,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAClC,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAc,EACd,QAAQ,EACR,OAAO,EACP,iBAAyB,EACzB,MAAmB,EACnB,iBAAsB,EACtB,SAAgB,EAChB,YAAmB,EACnB,UAAe,EACf,OAAkB,EAClB,GAAG,YAAY,EAChB,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAoG/D"}
1
+ {"version":3,"file":"AppSettingsPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppSettingsPopover/AppSettingsPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAc,YAAY,EAAW,MAAM,mBAAmB,CAAC;AAOtE,OAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAkE1D,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,GAAG,CAAC,OAAO,CAAC;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,GAAG;QACjC,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,CAAC,EAAE;QAClB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;QAC1B,YAAY,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAClC,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAc,EACd,QAAQ,EACR,OAAO,EACP,iBAAyB,EACzB,MAAmB,EACnB,iBAAsB,EACtB,SAAgB,EAChB,YAAmB,EACnB,UAAe,EACf,OAAkB,EAClB,GAAG,YAAY,EAChB,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAoG/D"}
@@ -1 +1 @@
1
- import{__rest as o,__assign as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as n,Fragment as i}from"react/jsx-runtime";import{useState as r}from"react";import s from"classnames";import{makeStyles as l,Popover as c}from"@material-ui/core";import{SettingTwoIcon as a,CloseSmallIcon as p}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{isNativeDetected as m,isMobileDetected as d}from"../../../utils/mobileDetect.js";import u from"../../IconButton/index.js";import h from"../../Modal/Modal.js";import g from"../../Button/components/Button/index.js";import"moment-timezone";import"../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../Button/components/LiveButton/styles.js";var v=m||d,f=l((function(o){return{popoverPaper:{marginTop:function(o){return o.isScrollable?0:8},minWidth:286,width:286,overflowY:"hidden",backgroundColor:o.palette.background.b9,maxHeight:function(o){var t=o.maxHeight;return t?t-24:"calc(100% - 24px)"},"&.scrollable":{height:function(o){return o.maxHeight||"100%"}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(o.palette.background.b9,", ").concat(o.palette.background.b9," 89%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},modalActions:{display:"flex",justifyContent:"flex-end"}}}));function b(l){var d=l.Trigger,b=void 0===d?null:d,C=l.children,j=l.classes,x=l.defaultScrollable,I=void 0!==x&&x,S=l.header,k=void 0===S?"Settings":S,B=l.iconSettingsProps,H=void 0===B?{}:B,P=l.maxHeight,T=void 0===P?null:P,z=l.modalActions,A=void 0===z?null:z,w=l.modalProps,y=void 0===w?{}:w,N=l.onClose,O=void 0===N?function(){}:N,E=o(l,["Trigger","children","classes","defaultScrollable","header","iconSettingsProps","maxHeight","modalActions","modalProps","onClose"]),L=r(null),M=L[0],q=L[1],D=r(!0),F=D[0],W=D[1],Y=f({maxHeight:T,isScrollable:F,isNativeDetected:m}),G=j||{},R=G.popoverContent,X=o(G,["popoverContent"]),_=function(){q(null),O()},J=Boolean(M),K=function(o){return q(o.currentTarget)},Q=A||e(g,t({variation:"secondary",onClick:_},{children:"CLOSE"}));return n(i,{children:[b?e(b,{onClick:K}):e(u,t({"data-testid":"chartSettingsButton",isActive:J,onClick:K,size:"small",tooltipProps:{title:"Settings"},variant:"contained"},H,{children:e(a,{size:(null==H?void 0:H.size)||16})})),!v&&n(c,t({open:J,anchorEl:M,onClose:_,anchorOrigin:{vertical:F?"top":"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12},E,{classes:t(t({},X),{paper:s(Y.popoverPaper,F&&"scrollable",null==X?void 0:X.paper)})},{children:[n("div",t({className:s(Y.popoverHeader,F&&"scrollable")},{children:[e("div",t({className:Y.headerTitle},{children:k})),e(u,t({tooltipProps:{title:"Close"},onClick:_},{children:e(p,{})}))]})),e("div",t({className:s(Y.popoverContentContainer,F&&"scrollable"),ref:function(o){o&&o.scrollHeight<=o.clientHeight&&!I&&W(!1)}},{children:e("div",t({className:s(Y.popoverContent,R)},{children:C}))}))]})),v&&e(h,t({actions:Q,onClose:_,open:J,actionsClassName:Y.modalActions,title:k},y,{children:C}))]})}export{b as AppSettingsPopover};
1
+ import{__rest as o,__assign as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as n,Fragment as i}from"react/jsx-runtime";import{useState as r}from"react";import s from"classnames";import{makeStyles as l,Popover as c}from"@material-ui/core";import{SettingTwoIcon as a,CloseSmallIcon as p}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{isNativeDetected as d,isMobileDetected as m}from"../../../utils/mobileDetect.js";import u from"../../IconButton/index.js";import h from"../../Modal/Modal.js";import g from"../../Button/components/Button/index.js";import"moment-timezone";import"../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../Button/components/LiveButton/styles.js";var v=d||m,f=l((function(o){return{popoverPaper:{position:"relative",marginTop:function(o){return o.isScrollable?0:8},minWidth:286,width:286,overflowY:"hidden",backgroundColor:o.palette.background.b9,maxHeight:function(o){var t=o.maxHeight;return t?t-24:"calc(100% - 24px)"},"&.scrollable":{height:function(o){return o.maxHeight||"100%"},"&::after":{content:'""',position:"absolute",left:0,bottom:0,height:16,width:"calc(100% - 16px)",zIndex:1,background:"linear-gradient(180deg, rgba(65, 65, 65, 0.00) 0%, ".concat(o.palette.background.b9," 100%);")}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(o.palette.background.b9,", ").concat(o.palette.background.b9," 89%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},modalActions:{display:"flex",justifyContent:"flex-end"}}}));function b(l){var m=l.Trigger,b=void 0===m?null:m,x=l.children,C=l.classes,j=l.defaultScrollable,I=void 0!==j&&j,S=l.header,k=void 0===S?"Settings":S,B=l.iconSettingsProps,H=void 0===B?{}:B,z=l.maxHeight,P=void 0===z?null:z,T=l.modalActions,w=void 0===T?null:T,A=l.modalProps,y=void 0===A?{}:A,N=l.onClose,O=void 0===N?function(){}:N,E=o(l,["Trigger","children","classes","defaultScrollable","header","iconSettingsProps","maxHeight","modalActions","modalProps","onClose"]),L=r(null),M=L[0],q=L[1],D=r(!0),F=D[0],W=D[1],Y=f({maxHeight:P,isScrollable:F,isNativeDetected:d}),G=C||{},R=G.popoverContent,X=o(G,["popoverContent"]),_=function(){q(null),O()},J=Boolean(M),K=function(o){return q(o.currentTarget)},Q=w||e(g,t({variation:"secondary",onClick:_},{children:"CLOSE"}));return n(i,{children:[b?e(b,{onClick:K}):e(u,t({"data-testid":"chartSettingsButton",isActive:J,onClick:K,size:"small",tooltipProps:{title:"Settings"},variant:"contained"},H,{children:e(a,{size:(null==H?void 0:H.size)||16})})),!v&&n(c,t({open:J,anchorEl:M,onClose:_,anchorOrigin:{vertical:F?"top":"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12},E,{classes:t(t({},X),{paper:s(Y.popoverPaper,F&&"scrollable",null==X?void 0:X.paper)})},{children:[n("div",t({className:s(Y.popoverHeader,F&&"scrollable")},{children:[e("div",t({className:Y.headerTitle},{children:k})),e(u,t({tooltipProps:{title:"Close"},onClick:_},{children:e(p,{})}))]})),e("div",t({className:s(Y.popoverContentContainer,F&&"scrollable"),ref:function(o){o&&o.scrollHeight<=o.clientHeight&&!I&&W(!1)}},{children:e("div",t({className:s(Y.popoverContent,R)},{children:x}))}))]})),v&&e(h,t({actions:Q,onClose:_,open:J,actionsClassName:Y.modalActions,title:k},y,{children:x}))]})}export{b as AppSettingsPopover};
@@ -4,11 +4,4 @@ declare function RemoveAppButton({ appName, onAppRemove }: {
4
4
  appName: any;
5
5
  onAppRemove: any;
6
6
  }): JSX.Element;
7
- declare namespace RemoveAppButton {
8
- namespace propTypes {
9
- const appName: PropTypes.Validator<string>;
10
- const onAppRemove: PropTypes.Validator<(...args: any[]) => any>;
11
- }
12
- }
13
- import PropTypes from "prop-types";
14
7
  //# sourceMappingURL=RemoveAppButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RemoveAppButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js"],"names":[],"mappings":"AAcA,uCAAwC;;AAQxC;;;gBAmDC"}
1
+ {"version":3,"file":"RemoveAppButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js"],"names":[],"mappings":"AAaA,uCAAwC;;AAOxC;;;gBAiDC"}
@@ -1 +1 @@
1
- import o from"@babel/runtime/helpers/slicedToArray";import{useState as t}from"react";import{makeStyles as n,Dialog as e,DialogTitle as i,DialogContent as r,DialogContentText as s,DialogActions as c}from"@material-ui/core";import p from"prop-types";import m from"../../../../../Button/components/Button/index.js";import{jsxs as a,Fragment as l,jsx as u}from"react/jsx-runtime";import"moment-timezone";import"classnames";import"../../../../../../icons/WithCustomSize.js";import"../../../../../../icons/IconParkProvider.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"../../../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../../../../Button/components/LiveButton/styles.js";import{Tooltip as d}from"../../../../../Tooltip/Tooltip.js";import"../../../../../Tooltip/ScrollableTooltip.js";var v="DC_removeApp",j={elevation:1},h=n({tooltip:{maxWidth:"none"}});function f(n){var p=n.appName,v=n.onAppRemove,f=t(!1),A=o(f,2),C=A[0],I=A[1],_=function(){return I(!1)},y=h();return a(l,{children:[u(d,{classes:{tooltip:y.tooltip},title:"After removing app can be added again from AppStore",placement:"bottom-start",children:u("span",{children:u(m,{"data-testid":"".concat("DC_removeApp","_button"),onClick:function(){return I(!0)},variation:"dangerSecondary",children:"REMOVE APP"})})}),a(e,{open:C,onClose:_,PaperProps:j,children:[a(i,{"data-testid":"".concat("DC_removeApp","_title"),children:["Remove ",p]}),u(r,{children:u(s,{children:"Are you sure you want to remove this app?"})}),a(c,{children:[u(m,{"data-testid":"".concat("DC_removeApp","_cancel"),onClick:_,children:"Cancel"}),u(m,{"data-testid":"".concat("DC_removeApp","_confirm"),onClick:function(){return v()},variation:"dangerPrimary",children:"Remove"})]})]})]})}f.propTypes={appName:p.string.isRequired,onAppRemove:p.func.isRequired};export{v as PAGE_NAME,f as default};
1
+ import o from"@babel/runtime/helpers/slicedToArray";import{useState as n}from"react";import{makeStyles as t,Dialog as e,DialogTitle as i,DialogContent as s,DialogContentText as c,DialogActions as r}from"@material-ui/core";import m from"../../../../../Button/components/Button/index.js";import{jsxs as a,Fragment as p,jsx as l}from"react/jsx-runtime";import"moment-timezone";import"classnames";import{DeleteFourIcon as u}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"../../../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../../../../Button/components/LiveButton/styles.js";var d="DC_removeApp",v=t({removeButtonIcon:{marginRight:8},paperClassName:{width:416}});function j(t){var d=t.appName,j=t.onAppRemove,I=v(),f=n(!1),h=o(f,2),C=h[0],A=h[1],B=function(){return A(!1)};return a(p,{children:[a(m,{color:"primary","data-testid":"".concat("DC_removeApp","_button"),onClick:function(){return A(!0)},children:[l(u,{className:I.removeButtonIcon}),"REMOVE APP"]}),a(e,{open:C,onClose:B,PaperProps:{elevation:1,className:I.paperClassName},children:[a(i,{"data-testid":"".concat("DC_removeApp","_title"),children:["Remove ",d,"?"]}),l(s,{children:a(c,{children:[d," and all related information will be removed immediately. ",d," can be added again from AppStore."]})}),a(r,{children:[l(m,{color:"primary","data-testid":"".concat("DC_removeApp","_cancel"),onClick:B,children:"Cancel"}),l(m,{"data-testid":"".concat("DC_removeApp","_confirm"),onClick:function(){return j()},variation:"primary",children:"Remove"})]})]})]})}export{d as PAGE_NAME,j as default};
@@ -1 +1 @@
1
- {"version":3,"file":"PadModeSelect.d.ts","sourceRoot":"","sources":["../../../src/components/PadModeSelect/PadModeSelect.js"],"names":[],"mappings":";AAsCA,wDA2HC"}
1
+ {"version":3,"file":"PadModeSelect.d.ts","sourceRoot":"","sources":["../../../src/components/PadModeSelect/PadModeSelect.js"],"names":[],"mappings":";AAiDA,wDA4JC"}
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r,useRef as o,useMemo as s}from"react";import n from"prop-types";import{first as a,flatten as i,partition as c}from"lodash";import{makeStyles as l,FormControl as m,Select as u,MenuItem as d}from"@material-ui/core";import{DEFAULT_SUPPORTED_PAD_MODES as p,COMPLETION_MODES as f}from"../../constants/completion.js";import v from"./WellStreamActivityStatus.js";import{PadMode as h,AssetStatus as y}from"./types.js";import{useWellStreamActivityTypeSubscription as S}from"./effects/useWellStreamActivityTypeSubscription.js";import{jsx as b,jsxs as I}from"react/jsx-runtime";var g=l({selectFormControl:{maxWidth:"320px",padding:"5px 8px",marginLeft:"auto"},padSelect:{fontSize:"14px","&:before":{borderBottom:0},"&:after":{borderBottom:0},"& .MuiSelect-root":{alignItems:"center",display:"flex"}},menuItem:{display:"flex",justifyContent:"space-between"},menuItemName:{textOverflow:"ellipsis",overflow:"hidden",width:"100%"}}),A=function(n){var l=n.completionAppType,A=n.padModeSetting,x=n.assets,w=n.onChange,C=n.disableActiveWellsInPadSelect,O=r(!1),j=t(O,2),M=j[0],T=j[1],W=o(),N=g(),P=A.mode===h.custom?"".concat(h.custom,"--").concat(a(A.selectedAssets)):A.mode,k=s((function(){return x.reduce((function(t,r){return[].concat(e(t),[{key:"".concat(h.custom,"--").concat(r.id),label:"".concat(r.name),assetId:r.asset_id,wellId:r.id,status:r.status}])}),[])}),[x,l]),z=p.concat(i(c(k,{status:y.active}))),q=function(e){var r=e.split("--"),o=t(r,2),s=o[0],n=o[1],a={mode:s};s===h.custom&&(a.mode=h.custom,a.selectedAssets=[parseInt(n,10)]),w(a)},B=function(e){return A.mode===h.custom&&+a(A.selectedAssets)==+e||M},F=z.find((function(e){return e.key===P}));null!=F&&F.assetId&&(W.current=null==F?void 0:F.assetId);var R=S({currentWellId:W.current,isStatusShown:!0,withSubscription:!0});return b(m,{classes:{root:N.selectFormControl},children:P&&b(u,{value:P,onChange:function(e){return q(e.target.value)},inputProps:{name:"padModeSelect",id:"pad-mode-select"},className:N.padSelect,onClose:function(){return T(!1)},onOpen:function(){return T(!0)},MenuProps:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},children:z.map((function(e){var t,r=e.key,o=e.label,s=e.assetId,n=e.wellId,a=e.status,i=B(n)&&a===y.active;return I(d,{value:r,className:N.menuItem,disabled:C&&a!==y.active&&r!==f.pad,children:[b("span",{className:N.menuItemName,children:o}),i&&b(v,{isStatusShown:B(n),currentWellId:s,subData:(null===(t=W.current)||void 0===t?void 0:t.assetId)===r?R:void 0})]},r)}))})})};A.propTypes={padModeSetting:n.shape({mode:n.string,selectedAssets:n.oneOfType([n.arrayOf(n.string),n.arrayOf(n.number)])}),assets:n.arrayOf(n.shape()),completionAppType:n.string.isRequired,onChange:n.func.isRequired},A.defaultProps={padModeSetting:{},assets:[]};export{A as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r,useRef as n,useMemo as o}from"react";import s from"prop-types";import{first as a,flatten as i,partition as c,isEmpty as l}from"lodash";import{makeStyles as m,Tooltip as d,FormControl as u,Select as p,MenuItem as f}from"@material-ui/core";import{DEFAULT_SUPPORTED_PAD_MODES as h,COMPLETION_MODES as v}from"../../constants/completion.js";import S from"../MiddleTruncate/MiddleTruncate.js";import y from"./WellStreamActivityStatus.js";import{resolveActiveFracAsset as b}from"../../utils/completion.js";import{PadMode as g,AssetStatus as I}from"./types.js";import{useWellStreamActivityTypeSubscription as x}from"./effects/useWellStreamActivityTypeSubscription.js";import{jsxs as A,Fragment as w,jsx as T}from"react/jsx-runtime";var W=m({selectFormControl:{maxWidth:"320px",padding:"5px 8px",marginLeft:"auto"},padSelect:{fontSize:"14px","&:before":{borderBottom:0},"&:after":{borderBottom:0},"& .MuiSelect-root":{alignItems:"center",display:"flex"}},menuItem:{display:"flex",justifyContent:"space-between"},menuItemName:{textOverflow:"ellipsis",overflow:"hidden",width:"100%",fontSize:12,lineHeight:"16px"},activeAsset:{fontSize:12,lineHeight:"16px",minWidth:78,display:"flex",alignItems:"center"}}),j=function(s){var m=s.completionAppType,j=s.padModeSetting,C=s.assets,M=s.onChange,O=s.disableActiveWellsInPadSelect,N=r(!1),z=t(N,2),P=z[0],k=z[1],q=n(),B=W(),D=j.mode===g.custom?"".concat(g.custom,"--").concat(a(j.selectedAssets)):j.mode,F=o((function(){return C.reduce((function(t,r){return[].concat(e(t),[{key:"".concat(g.custom,"--").concat(r.id),label:"".concat(r.name),assetId:r.asset_id,wellId:r.id,status:r.status}])}),[])}),[C,m]),H=h.concat(i(c(F,{status:I.active}))),R=function(e){var r=e.split("--"),n=t(r,2),o=n[0],s=n[1],a={mode:o};o===g.custom&&(a.mode=g.custom,a.selectedAssets=[parseInt(s,10)]),M(a)},_=function(e){return j.mode===g.custom&&+a(j.selectedAssets)==+e||P},L=H.find((function(e){return e.key===D}));null!=L&&L.assetId&&(q.current=null==L?void 0:L.assetId);var E=x({currentWellId:q.current,isStatusShown:!0,withSubscription:!0}),G=b(C)||a(C),J=G.status===I.active,K=r(G.name),Q=t(K,2),U=Q[0],V=Q[1];return A(w,{children:[j.mode!==g.custom&&T(d,{title:U&&U!==G.name?G.name:"",children:A("div",{className:B.activeAsset,children:[T(S,{onTruncate:function(e){V(e)},truncatedText:U,maxWidth:130,children:G.name}),J&&T(y,{isStatusShown:!0,currentWellId:G.asset_id,subData:l(E)?void 0:E})]})}),T(u,{classes:{root:B.selectFormControl},children:D&&T(p,{value:D,onChange:function(e){return R(e.target.value)},inputProps:{name:"padModeSelect",id:"pad-mode-select"},className:B.padSelect,onClose:function(){return k(!1)},onOpen:function(){return k(!0)},MenuProps:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},children:H.map((function(e){var t,r=e.key,n=e.label,o=e.assetId,s=e.wellId,a=e.status,i=_(s)&&a===I.active;return A(f,{value:r,className:B.menuItem,disabled:O&&a!==I.active&&r!==v.pad,children:[T("span",{className:B.menuItemName,children:n}),i&&T(y,{isStatusShown:_(s),currentWellId:o,subData:(null===(t=q.current)||void 0===t?void 0:t.assetId)===r?E:void 0})]},r)}))})})]})};j.propTypes={padModeSetting:s.shape({mode:s.string,selectedAssets:s.oneOfType([s.arrayOf(s.string),s.arrayOf(s.number)])}),assets:s.arrayOf(s.shape()),completionAppType:s.string.isRequired,onChange:s.func.isRequired},j.defaultProps={padModeSetting:{},assets:[]};export{j as default};
@@ -1 +1 @@
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
+ {"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;;;;;;;;;;;;;;;;;;;;;;;;CAoYzD,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 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};
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 r,useEffect as o}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 B,RangeSliderOrientation as T}from"./constants.js";import C from"./RangeSlider.css.js";var M=function(s){var M,I,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],re=te[1],oe=i(null),ae=oe[0],le=oe[1],ue=i({}),se=ue[0],me=ue[1],ce=i(B),de=ce[0],ge=ce[1],fe=r(null),pe=r(null),Re=r(null),ve=r(null),Se=r(null),Oe=null===(x=fe.current)||void 0===x?void 0:x.getBoundingClientRect(),be=P===T.HORIZONTAL,he=P===T.VERTICAL,Be=H&&_;o((function(){P===T.HORIZONTAL&&ne(d),P===T.VERTICAL&&ne(g)}),[P]),o((function(){H&&E({from:0,to:L})}),[H]),o((function(){var e;if(ee){var n=l(V,z),t=l(L,z),i=l(A,z),r=l(F,z),o=p(n,i,r),a=p(t,i,r);me(((e={})[h.FROM]=ee.getThumbStyles(o,ie===h.FROM),e[h.TO]=ee.getThumbStyles(a,ie===h.TO),e[h.BAR]=ee.getBarStyles(o,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 Te=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 r=S(i,V,L,A,j);E(r)}},Ce=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 r=R(i,V,L,F,j);E(r)}},Me=function(e,n){var t=ee.getBarCoordinates(e,n,fe.current.getBoundingClientRect()),i=p(t.new,t.min,t.max),r=l(v(i,A,F),z),o=l(L+(r-V),z);if(r<A){var a=A-r;r=A,o=l(o+a,z)}if(o>F){a=o-F;o=F,r=l(r-a,z)}r!==V&&o!==L&&r>=A&&o<=F&&E({from:r,to:o})},Ie=function(n){var t;n!==h.BAR?ge(e(e({},B),((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(B)},ye=function(e,n){if(!(H&&e===h.BAR||w)){n.stopPropagation(),re(e),le(e);var t=n.clientX,i=n.clientY,r=n.target.getBoundingClientRect(),o=r.x,a=r.y,l=u((function(n){!function(e){return e===h.FROM?Te:e===h.TO?Ce:Me}(e)(n,{clientX:t,clientY:i,x:o,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 r=S(i,V,L,A,j);E(r),W(r.from)}if(e===h.TO){r=R(i,V,L,F,j);E(r),q(r.to)}};return n("div",e({className:a((M={},M[C.disabled]=w,M[C.rangeSliderHorizontal]=be,M[C.rangeSliderVertical]=he,M[C.rotatedVerticalRange]=he&&H,M))},{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=e.clientX,t=e.clientY,i=be?{clientX:n}:{clientY:t},r=he&&H?ee.getRotatedCoordinates(i,fe.current.getBoundingClientRect()):ee.getCoordinates(i,fe.current.getBoundingClientRect());if(de.bar)return Q(""),void G({x:n,y:t});var o=p(r.new,r.min,r.max),a=l(v(o,A,F),z);a<A&&Q(A.toString()),a>F&&Q(F.toString()),a>=A&&a<=F&&Q(a.toString()),G({x:n,y:t})},PopperProps:{anchorEl:{clientHeight:0,clientWidth:0,getBoundingClientRect:function(){return f({isHorizontalOrientation:be,railPosition:Oe,tooltipPosition:k})}}}},{children:n("div",e({className:a(C.rangeSliderRail,(I={},I[C.rangeSliderRailHorizontal]=be,I[C.rangeSliderRailVertical]=he,I)),ref:fe},{children:[!H&&t("div",e({ref:pe,className:a(C.rangeSliderThumb,c&&C.mobileRangeSliderThumb),style:se[h.FROM],onMouseDown:function(e){return ye(h.FROM,e)},onMouseEnter:function(){Ie(h.FROM)},onMouseLeave:function(){Ne(h.FROM)}},{children:t("div",{className:C.rangeSliderLabel})})),t("div",e({className:a(C.rangeSliderBar,(N={},N[C.rangeSliderBarHorizontal]=be,N[C.rangeSliderBarVertical]=he,N)),style:se[h.BAR],onMouseDown:function(e){return ye(h.BAR,e)},onMouseEnter:function(){Ie(h.BAR)},onMouseLeave:function(){Ne(h.BAR)}},{children:t("div",{className:a(C.rangeSliderBarView,(y={},y[C.rangeSliderBarViewHorizontal]=be,y[C.rangeSliderBarViewVertical]=he,y))})})),t("div",e({ref:Re,className:a(C.rangeSliderThumb,c&&C.mobileRangeSliderThumb),style:se[h.TO],onMouseDown:function(e){return ye(h.TO,e)},onMouseEnter:function(){Ie(h.TO)},onMouseLeave:function(){Ne(h.TO)}},{children:t("div",{className:C.rangeSliderLabel})}))]}))})),!Be&&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})]}))},I={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};M.propTypes=I,M.defaultProps={min:0,max:100,orientation:"horizontal",precision:0,minRange:0,onChange:function(){},isSingleRange:!1,isWithoutInput:!1};export{M as default};
@@ -1 +1 @@
1
- {"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../src/components/Search/Search.tsx"],"names":[],"mappings":";AAEA,OAAO,SAAS,MAAM,YAAY,CAAC;AA+BnC,aAAK,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAGhE,QAAA,MAAM,MAAM;2fAoCT,WAAW,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAib3B,CAAC;AAEF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEpB,CAAC;AAsCF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../src/components/Search/Search.tsx"],"names":[],"mappings":";AAEA,OAAO,SAAS,MAAM,YAAY,CAAC;AAiCnC,aAAK,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAGhE,QAAA,MAAM,MAAM;2fAoCT,WAAW,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkb3B,CAAC;AAEF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEpB,CAAC;AAsCF,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- import{__rest as e,__assign as n}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as o,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as i,useRef as s,useCallback as l,useEffect as p,useMemo as a,cloneElement as c}from"react";import u from"classnames";import d from"prop-types";import{isEmpty as m,debounce as h,omit as g,noop as f}from"lodash";import{Autocomplete as b}from"@material-ui/lab";import{Popper as C,Tooltip as I,Fade as v,Chip as O,TextField as P,InputAdornment as x,CircularProgress as S,FormControlLabel as y,Checkbox as A,MenuItem as G}from"@material-ui/core";import{CheckBoxOutlineBlank as T,CheckBox as j,AccessTime as N}from"@material-ui/icons";import R from"../IconButton/index.js";import k from"./components/Listbox.js";import L from"./components/Paper.js";import"./components/RecentSearches.js";import"./components/Groups.js";import{MiddleTruncatedText as F}from"../MiddleTruncatedText/MiddleTruncatedText.js";import{PaperContext as z}from"./context/index.js";import B from"./styles.js";import{DownOneIcon as D,CloseSmallIcon as M}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";var E=o(T,{style:{fontSize:20}}),H=o(j,{style:{fontSize:20}}),K={},q=function(d){var T=d.classes,j=d.AutocompleteProps,D=void 0===j?{}:j,q=d.value,W=d.disableClearable,w=d.onChange,V=d.onInputChange,U=d.loading,_=d.options,J=d.optionSize,Q=d.placeholder,X=d.onGroupChange,Y=d.disabled,Z=d.multiple,$=d.groups,ee=d.GroupsComponent,ne=d.recentSearchesMaxCount,oe=d.dataStorageKey,te=d.RecentSearchesComponent,re=d.dataStorage,ie=d.onInputReset,se=d.getOptionLabel,le=d.TextFieldProps,pe=d.ListboxProps,ae=d.onInputChangeCallback,ce=d.renderCustomOption,ue=d.isHiddenAllOption,de=d.onOpen,me=void 0===de?f:de,he=d.selectedGroup,ge=d.onGroupReset,fe=d.onClose,be=d.popperProps,Ce=void 0===be?K:be,Ie=d.paperFooter,ve=d.isClearInputOnBlur,Oe=void 0!==ve&&ve,Pe=d.noOptionsText,xe=e(d,["classes","AutocompleteProps","value","disableClearable","onChange","onInputChange","loading","options","optionSize","placeholder","onGroupChange","disabled","multiple","groups","GroupsComponent","recentSearchesMaxCount","dataStorageKey","RecentSearchesComponent","dataStorage","onInputReset","getOptionLabel","TextFieldProps","ListboxProps","onInputChangeCallback","renderCustomOption","isHiddenAllOption","onOpen","selectedGroup","onGroupReset","onClose","popperProps","paperFooter","isClearInputOnBlur","noOptionsText"]),Se=i(""),ye=Se[0],Ae=Se[1],Ge=i(""),Te=Ge[0],je=Ge[1],Ne=i(!1),Re=Ne[0],ke=Ne[1],Le=i(!1),Fe=Le[0],ze=Le[1],Be=s(),De=s(),Me=B(),Ee=T.popper,He=T.listbox,Ke=T.popupIndicator,qe=T.popupIndicatorOpen,We=T.groupChip,we=e(T,["popper","listbox","popupIndicator","popupIndicatorOpen","groupChip"]),Ve=n({popper:u(Me.popper,Ee),listbox:u(Me.listbox,He),popupIndicator:u(Me.popupIndicator,Ke),popupIndicatorOpen:u(Me.popupIndicatorOpen,qe)},we),Ue=(null==_?void 0:_.some((function(e){return e.group})))||!m($),_e=function(){Ae(""),null==ie||ie()},Je=l(h((function(e){return je(e)}),500),[]),Qe=function(e){var n=$.find((function(n){return n.id===e}));_e(),X(n)};p((function(){Re&&Be.current.focus()}));var Xe=null==_?void 0:_.sort((function(e,n){var o,t;return null===(o=n.group)||void 0===o?void 0:o.toString().localeCompare(null===(t=e.group)||void 0===t?void 0:t.toString())})),Ye=Z&&Array.isArray(q)?q.length:null,Ze=m(he)?Xe:null==_?void 0:_.filter((function(e){return e.group===he.name})),$e=Z&&(null==Ze?void 0:Ze.length)===Ye,en=Z&&!!Ye&&!$e,nn=function(){return _e(),D.getOptionDisabled&&$e?w(null,[_[_.length-1]]):w(null,$e||en?[]:Ze)};p((function(){Je(ye),V&&V(ye)}),[ye]);var on=function(e,n){"blur"===n&&(!e.relatedTarget||De.current.contains(e.relatedTarget))||(fe(),ke(!1))},tn=function(){"isOpenedFromParent"in xe&&xe.isOpenedFromParent||Re?(ke(!1),fe()):(ke(!0),me())},rn=function(e){if($e&&!ue)return"All";var n=e[0].label||e[0].name;return 1===(null==e?void 0:e.length)?o("div",{children:o(F,{children:n})}):"".concat(null==e?void 0:e.length," Selected")},sn=function(){return o(y,{id:"selectAllLabel",className:Me.selectAllCheckbox,onClick:nn,control:o(A,{icon:E,style:{fontSize:20},indeterminate:en,checkedIcon:H,checked:$e,inputProps:{"aria-label":"All"}}),label:"All"})},ln=a((function(){return{onOutsideClick:on,isEmptyOptions:m(Ze),loading:U,AllSelectComponent:!ue&&Z&&!m(Ze)&&o(sn,{}),RecentSearchesComponent:te&&o(te,{title:"Recent Searches",Icon:N,dataStorage:re,dataStorageKey:oe,maxCount:ne,isHidden:!m(ye),onInputChange:function(e){return Ae(e)},inputValue:Te}),GroupsComponent:!he&&Ue&&ee&&o(ee,{onGroupClick:Qe,groups:$})}}),[he,U,Ue,ye,$e,en,Te,fe,ue]),pn=a((function(){return function(o){var r=o.children,i=o.className,s=e(o,["children","className"]);return t(L,n({},s,{className:i,inputRef:Be,ref:De},{children:[r,Ie]}))}}),[Ie]),an=a((function(){return function(t){var r=Ce.style,i=e(Ce,["style"]);return o(C,n({},t,{style:n(n({},t.style),r),placement:"bottom-start"},i))}}),[Ce]);return o(z.Provider,n({value:ln},{children:o(b,n({},g(xe,["InputProps","isNullable"]),{PopperComponent:an,disableClearable:W,onOpen:function(e){ke(!0),me(e)},onClose:on,open:"isOpenedFromParent"in xe?xe.isOpenedFromParent:Re,onChange:function(e,n){Z||Ae(""),w(e,n)},forcePopupIcon:D.forcePopupIcon,fullWidth:!0,disabled:Y,value:q,classes:Ve,renderInput:function(i){var s,l,p,a,d,h=i.InputProps,f=i.inputProps,b=e(i,["InputProps","inputProps"]),C=(null===(a=null===(p=null===(l=h.endAdornment)||void 0===l?void 0:l.props)||void 0===p?void 0:p.children)||void 0===a?void 0:a.length)>1?c(h.endAdornment,{children:h.endAdornment.props.children.slice(1),onMouseDown:function(e){return e.stopPropagation()},onMouseUp:function(e){return e.stopPropagation()}}):h.endAdornment,I=Oe&&1===Ye,v=xe.InputProps||{},y=v.classes,A=void 0===y?{}:y,G=A.input,T=void 0===G?"":G,j=e(A,["input"]),N=v.style,k=e(v,["classes","style"]);return o(P,n({},b,g(le,["endAdornment"]),{onBlur:function(){Oe&&""!==ye.trim()&&_e(),I&&ze(!0)},inputRef:Be,placeholder:Q,classes:{root:Me.searchInput},inputProps:n(n({style:{padding:5}},f),xe.inputProps),InputProps:n(n(n({classes:n({input:u(Fe?Me.inputShrinked:I&&Me.inputExpanded,T)},j),style:n({paddingRight:0,paddingBottom:0},N)},h),k),{startAdornment:t(r,{children:[null===(d=xe.InputProps)||void 0===d?void 0:d.startAdornment,he&&o(O,{className:Me.selectedGroup,"data-not-migrated-muichip":!0,variant:"outlined",label:t("div",n({className:Me.selectedGroupLabel},{children:[he.name,o(M,{size:16,id:"removeGroupIcon",className:Me.removeIcon,onClick:ge})]}))},he.id),Z&&!m(q)&&o("div",n({onClick:tn,id:"selectedOptions",className:u(Me.selectedLabel,Fe&&Me.selectedLabelExpanded)},{children:rn(q)}))]}),endAdornment:t(r,{children:[t(x,n({className:u(Me.endAdornment,(s={},s[Me.removeIconWithDropdown]=D.forcePopupIcon,s)),position:"end"},{children:[le.endAdornment,U&&o(S,{color:"primary",size:20}),ye&&!W&&o(R,n({size:"small",className:Me.iconButton,onClick:function(){Ae(""),ie?ie():w(null,[])},tooltipProps:{title:"Clear"}},{children:o(M,{size:16,className:Me.closeIcon})}))]})),D.forcePopupIcon&&C]})})}))},loading:U,options:Ze,renderGroup:function(e){var r=e.key,i=e.group,s=e.children;return!i||!m(he)&&Z?s:t("div",n({className:Me.group},{children:[o(I,n({title:i,placement:"right",TransitionComponent:v,TransitionProps:{timeout:500},enterDelay:500},{children:o(O,{"data-not-migrated-muichip":!0,className:u(Me.groupChip,We),variant:"outlined",label:i})})),s]}),r)},disableCloseOnSelect:Z,multiple:Z,renderOption:ce||function(e,r){var i=e.label,s=e.id,l=r.selected;return Z?t("div",n({className:u(Me.option,J)},{children:[o(A,{disableRipple:!0,icon:E,className:Me.checkbox,checkedIcon:H,checked:l}),o(F,n({className:Me.optionLabelContainer},{children:i}))]}),s):o(G,n({className:Me.menuItem,value:s},{children:o(F,n({className:Me.optionLabelContainer},{children:i}))}),s)},groupBy:Ue?function(e){return e.group}:null,PaperComponent:pn,ListboxComponent:k,inputValue:ye,getOptionLabel:se,getOptionDisabled:D.getOptionDisabled,onInputChange:function(e,n,o){"reset"===o&&Z||(Ae((null==e?void 0:e.target.value)||(null==e?void 0:e.target.innerText)||n),ae(n,o))},loadingText:o("div",n({className:Me.label},{children:"Loading ..."})),noOptionsText:o("div",n({className:Me.label},{children:Pe})),ListboxProps:pe,onFocus:function(){var e;ze(!1),null===(e=xe.onFocus)||void 0===e||e.call(xe)}}))}))},W={AutocompleteProps:d.shape({forcePopupIcon:d.bool,getOptionDisabled:d.func}),allChecked:d.bool,TextFieldProps:d.shape({label:d.string,endAdornment:d.node}),selectedGroup:d.shape({name:d.string,id:d.string}),onGroupReset:d.func,onClose:d.func,disableClearable:d.bool,value:d.oneOfType([d.arrayOf(d.shape({})),d.shape({}),d.bool]).isRequired,onChange:d.func.isRequired,onInputChange:d.func,getOptionLabel:d.func,onGroupChange:d.func,loading:d.bool,disabled:d.bool,multiple:d.bool,options:d.array,optionSize:d.string,popupIcon:d.node,InputProps:d.shape({startAdornment:d.node,classes:d.shape({input:d.string}),style:d.shape({})}),ListboxProps:d.shape({}),classes:d.shape({popper:d.string,listbox:d.string,popupIndicator:d.string,popupIndicatorOpen:d.string,groupChip:d.string}),onInputChangeCallback:d.func,placeholder:d.string,RecentSearchesComponent:d.elementType,recentSearchesMaxCount:d.number,dataStorageKey:d.string,dataStorage:d.shape({}),groups:d.array,GroupsComponent:d.elementType,onOpen:d.func,renderCustomOption:d.func,onInputReset:d.func,isHiddenAllOption:d.bool,paperFooter:d.node,isOpenedFromParent:d.bool,popperProps:d.shape({style:d.shape({})}),onFocus:d.func,isClearInputOnBlur:d.bool,inputProps:d.shape({}),noOptionsText:d.string};q.propTypes=W,q.defaultProps={InputProps:null,onInputChange:null,onGroupChange:function(){},getOptionLabel:function(e){return e.label||""},renderCustomOption:null,onInputReset:null,ListboxProps:null,options:[],groups:[],classes:{},disabled:!1,isHiddenAllOption:!1,disableClearable:!1,multiple:!1,loading:!1,onInputChangeCallback:function(){},placeholder:"Search...",popupIcon:o(D,{theme:"filled",fill:"#BDBDBD",size:16}),recentSearchesMaxCount:3,dataStorageKey:"Search:recentSearches",dataStorage:sessionStorage,RecentSearchesComponent:null,TextFieldProps:{endAdornment:null},GroupsComponent:null,onGroupReset:function(){},onClose:function(){},selectedGroup:null,onFocus:null,noOptionsText:"No Options"};export{q as default};
1
+ import{__rest as e,__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as n,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as i,useRef as s,useCallback as l,useEffect as p,useMemo as a,cloneElement as c}from"react";import u from"classnames";import d from"prop-types";import{isEmpty as m,debounce as h,omit as g,noop as f}from"lodash";import{Autocomplete as b}from"@material-ui/lab";import{Popper as C,Tooltip as I,Fade as v,Chip as O,TextField as P,InputAdornment as x,CircularProgress as S,FormControlLabel as y,Checkbox as A,MenuItem as G}from"@material-ui/core";import{CheckBoxOutlineBlank as T,CheckBox as j,AccessTime as N}from"@material-ui/icons";import R from"../IconButton/index.js";import k from"./components/Listbox.js";import L from"./components/Paper.js";import"./components/RecentSearches.js";import"./components/Groups.js";import{MiddleTruncatedText as F}from"../MiddleTruncatedText/MiddleTruncatedText.js";import{PaperContext as z}from"./context/index.js";import B from"./styles.js";import{DownOneIcon as D,CloseSmallIcon as M}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";var E=n(T,{style:{fontSize:20}}),H=n(j,{style:{fontSize:20}}),K={},q=function(d){var T=d.classes,j=d.AutocompleteProps,D=void 0===j?{}:j,q=d.value,W=d.disableClearable,_=d.onChange,w=d.onInputChange,V=d.loading,U=d.options,J=d.optionSize,Q=d.placeholder,X=d.onGroupChange,Y=d.disabled,Z=d.multiple,$=d.groups,ee=d.GroupsComponent,oe=d.recentSearchesMaxCount,ne=d.dataStorageKey,te=d.RecentSearchesComponent,re=d.dataStorage,ie=d.onInputReset,se=d.getOptionLabel,le=d.TextFieldProps,pe=d.ListboxProps,ae=d.onInputChangeCallback,ce=d.renderCustomOption,ue=d.isHiddenAllOption,de=d.onOpen,me=void 0===de?f:de,he=d.selectedGroup,ge=d.onGroupReset,fe=d.onClose,be=d.popperProps,Ce=void 0===be?K:be,Ie=d.paperFooter,ve=d.isClearInputOnBlur,Oe=void 0!==ve&&ve,Pe=d.noOptionsText,xe=e(d,["classes","AutocompleteProps","value","disableClearable","onChange","onInputChange","loading","options","optionSize","placeholder","onGroupChange","disabled","multiple","groups","GroupsComponent","recentSearchesMaxCount","dataStorageKey","RecentSearchesComponent","dataStorage","onInputReset","getOptionLabel","TextFieldProps","ListboxProps","onInputChangeCallback","renderCustomOption","isHiddenAllOption","onOpen","selectedGroup","onGroupReset","onClose","popperProps","paperFooter","isClearInputOnBlur","noOptionsText"]),Se=i(""),ye=Se[0],Ae=Se[1],Ge=i(""),Te=Ge[0],je=Ge[1],Ne=i(!1),Re=Ne[0],ke=Ne[1],Le=i(!1),Fe=Le[0],ze=Le[1],Be=s(),De=s(),Me=B(),Ee=T.popper,He=T.listbox,Ke=T.popupIndicator,qe=T.popupIndicatorOpen,We=T.groupChip,_e=e(T,["popper","listbox","popupIndicator","popupIndicatorOpen","groupChip"]),we=o({popper:u(Me.popper,Ee),listbox:u(Me.listbox,He),popupIndicator:u(Me.popupIndicator,Ke),popupIndicatorOpen:u(Me.popupIndicatorOpen,qe)},_e),Ve=(null==U?void 0:U.some((function(e){return e.group})))||!m($),Ue=function(){Ae(""),null==ie||ie()},Je=l(h((function(e){return je(e)}),500),[]),Qe=function(e){var o=$.find((function(o){return o.id===e}));Ue(),X(o)};p((function(){Re&&Be.current.focus()}));var Xe=null==U?void 0:U.sort((function(e,o){var n,t;return null===(n=o.group)||void 0===n?void 0:n.toString().localeCompare(null===(t=e.group)||void 0===t?void 0:t.toString())})),Ye=Z&&Array.isArray(q)?q.length:null,Ze=m(he)?Xe:null==U?void 0:U.filter((function(e){return e.group===he.name})),$e=Z&&(null==Ze?void 0:Ze.length)===Ye,eo=Z&&!!Ye&&!$e,oo=function(){return Ue(),D.getOptionDisabled&&$e?_(null,[U[U.length-1]]):_(null,$e||eo?[]:Ze)};p((function(){Je(ye),w&&w(ye)}),[ye]);var no=function(e,o){"blur"===o&&(!e.relatedTarget||De.current.contains(e.relatedTarget))||(fe(),ke(!1))},to=function(){"isOpenedFromParent"in xe&&xe.isOpenedFromParent||Re?(ke(!1),fe()):(ke(!0),me())},ro=function(e){if($e&&!ue)return"All";var o=e[0].label||e[0].name;return 1===(null==e?void 0:e.length)?n("div",{children:n(F,{children:o})}):"".concat(null==e?void 0:e.length," Selected")},io=function(){return n(y,{id:"selectAllLabel",className:Me.selectAllCheckbox,onClick:oo,control:n(A,{icon:E,style:{fontSize:20},indeterminate:eo,checkedIcon:H,checked:$e,inputProps:{"aria-label":"All"}}),label:"All"})},so=a((function(){return{onOutsideClick:no,isEmptyOptions:m(Ze),loading:V,AllSelectComponent:!ue&&Z&&!m(Ze)&&n(io,{}),RecentSearchesComponent:te&&n(te,{title:"Recent Searches",Icon:N,dataStorage:re,dataStorageKey:ne,maxCount:oe,isHidden:!m(ye),onInputChange:function(e){return Ae(e)},inputValue:Te}),GroupsComponent:!he&&Ve&&ee&&n(ee,{onGroupClick:Qe,groups:$})}}),[he,V,Ve,ye,$e,eo,Te,fe,ue]),lo=a((function(){return function(n){var r=n.children,i=n.className,s=e(n,["children","className"]);return t(L,o({},s,{className:i,inputRef:Be,ref:De},{children:[r,Ie]}))}}),[Ie]),po=a((function(){return function(t){var r=Ce.style,i=e(Ce,["style"]);return n(C,o({},t,{style:o(o({},t.style),r),placement:"bottom-start"},i))}}),[Ce]);return n(z.Provider,o({value:so},{children:n(b,o({},g(xe,["InputProps","isNullable"]),{PopperComponent:po,disableClearable:W,onOpen:function(e){ke(!0),me(e)},onClose:no,open:"isOpenedFromParent"in xe?xe.isOpenedFromParent:Re,onChange:function(e,o){Z||Ae(""),_(e,o)},forcePopupIcon:D.forcePopupIcon,fullWidth:!0,disabled:Y,value:q,classes:we,renderInput:function(i){var s,l,p,a,d,h=i.InputProps,f=i.inputProps,b=e(i,["InputProps","inputProps"]),C=(null===(a=null===(p=null===(l=h.endAdornment)||void 0===l?void 0:l.props)||void 0===p?void 0:p.children)||void 0===a?void 0:a.length)>1?c(h.endAdornment,{children:h.endAdornment.props.children.slice(1),onMouseDown:function(e){return e.stopPropagation()},onMouseUp:function(e){return e.stopPropagation()}}):h.endAdornment,I=Oe&&1===Ye,v=xe.InputProps||{},y=v.classes,A=void 0===y?{}:y,G=A.input,T=void 0===G?"":G,j=e(A,["input"]),N=v.style,k=e(v,["classes","style"]);return n(P,o({},b,g(le,["endAdornment"]),{onBlur:function(){Oe&&""!==ye.trim()&&Ue(),I&&ze(!0)},inputRef:Be,placeholder:Q,classes:{root:Me.searchInput},inputProps:o(o({style:{padding:5}},f),xe.inputProps),InputProps:o(o(o({classes:o({input:u(Fe?Me.inputShrinked:I&&Me.inputExpanded,T)},j),style:o({paddingRight:0,paddingBottom:0},N)},h),k),{startAdornment:t(r,{children:[null===(d=xe.InputProps)||void 0===d?void 0:d.startAdornment,he&&n(O,{className:Me.selectedGroup,"data-not-migrated-muichip":!0,variant:"outlined",label:t("div",o({className:Me.selectedGroupLabel},{children:[he.name,n(M,{size:16,id:"removeGroupIcon",className:Me.removeIcon,onClick:ge})]}))},he.id),Z&&!m(q)&&n("div",o({onClick:to,id:"selectedOptions",className:u(Me.selectedLabel,Fe&&Me.selectedLabelExpanded)},{children:ro(q)}))]}),endAdornment:t(r,{children:[t(x,o({className:u(Me.endAdornment,(s={},s[Me.removeIconWithDropdown]=D.forcePopupIcon,s)),position:"end"},{children:[le.endAdornment,V&&n(S,{color:"primary",size:20}),ye&&!W&&n(R,o({"data-testid":"".concat("AutocompleteSearch","_clear_icon"),size:"small",className:Me.iconButton,onClick:function(){Ae(""),ie?ie():_(null,[])},tooltipProps:{title:"Clear"}},{children:n(M,{size:16,className:Me.closeIcon})}))]})),D.forcePopupIcon&&C]})})}))},loading:V,options:Ze,renderGroup:function(e){var r=e.key,i=e.group,s=e.children;return!i||!m(he)&&Z?s:t("div",o({className:Me.group},{children:[n(I,o({title:i,placement:"right",TransitionComponent:v,TransitionProps:{timeout:500},enterDelay:500},{children:n(O,{"data-not-migrated-muichip":!0,className:u(Me.groupChip,We),variant:"outlined",label:i})})),s]}),r)},disableCloseOnSelect:Z,multiple:Z,renderOption:ce||function(e,r){var i=e.label,s=e.id,l=r.selected;return Z?t("div",o({className:u(Me.option,J)},{children:[n(A,{disableRipple:!0,icon:E,className:Me.checkbox,checkedIcon:H,checked:l}),n(F,o({className:Me.optionLabelContainer},{children:i}))]}),s):n(G,o({className:Me.menuItem,value:s},{children:n(F,o({className:Me.optionLabelContainer},{children:i}))}),s)},groupBy:Ve?function(e){return e.group}:null,PaperComponent:lo,ListboxComponent:k,inputValue:ye,getOptionLabel:se,getOptionDisabled:D.getOptionDisabled,onInputChange:function(e,o,n){"reset"===n&&Z||(Ae((null==e?void 0:e.target.value)||(null==e?void 0:e.target.innerText)||o),ae(o,n))},loadingText:n("div",o({className:Me.label},{children:"Loading ..."})),noOptionsText:n("div",o({className:Me.label},{children:Pe})),ListboxProps:pe,onFocus:function(){var e;ze(!1),null===(e=xe.onFocus)||void 0===e||e.call(xe)}}))}))},W={AutocompleteProps:d.shape({forcePopupIcon:d.bool,getOptionDisabled:d.func}),allChecked:d.bool,TextFieldProps:d.shape({label:d.string,endAdornment:d.node}),selectedGroup:d.shape({name:d.string,id:d.string}),onGroupReset:d.func,onClose:d.func,disableClearable:d.bool,value:d.oneOfType([d.arrayOf(d.shape({})),d.shape({}),d.bool]).isRequired,onChange:d.func.isRequired,onInputChange:d.func,getOptionLabel:d.func,onGroupChange:d.func,loading:d.bool,disabled:d.bool,multiple:d.bool,options:d.array,optionSize:d.string,popupIcon:d.node,InputProps:d.shape({startAdornment:d.node,classes:d.shape({input:d.string}),style:d.shape({})}),ListboxProps:d.shape({}),classes:d.shape({popper:d.string,listbox:d.string,popupIndicator:d.string,popupIndicatorOpen:d.string,groupChip:d.string}),onInputChangeCallback:d.func,placeholder:d.string,RecentSearchesComponent:d.elementType,recentSearchesMaxCount:d.number,dataStorageKey:d.string,dataStorage:d.shape({}),groups:d.array,GroupsComponent:d.elementType,onOpen:d.func,renderCustomOption:d.func,onInputReset:d.func,isHiddenAllOption:d.bool,paperFooter:d.node,isOpenedFromParent:d.bool,popperProps:d.shape({style:d.shape({})}),onFocus:d.func,isClearInputOnBlur:d.bool,inputProps:d.shape({}),noOptionsText:d.string};q.propTypes=W,q.defaultProps={InputProps:null,onInputChange:null,onGroupChange:function(){},getOptionLabel:function(e){return e.label||""},renderCustomOption:null,onInputReset:null,ListboxProps:null,options:[],groups:[],classes:{},disabled:!1,isHiddenAllOption:!1,disableClearable:!1,multiple:!1,loading:!1,onInputChangeCallback:function(){},placeholder:"Search...",popupIcon:n(D,{theme:"filled",fill:"#BDBDBD",size:16}),recentSearchesMaxCount:3,dataStorageKey:"Search:recentSearches",dataStorage:sessionStorage,RecentSearchesComponent:null,TextFieldProps:{endAdornment:null},GroupsComponent:null,onGroupReset:function(){},onClose:function(){},selectedGroup:null,onFocus:null,noOptionsText:"No Options"};export{q as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.84.0-2",
3
+ "version": "0.84.0-20",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -116,5 +116,8 @@ export const PERMISSIONS: {
116
116
  canViewPredictiveDrillingAppExtendedControls: string;
117
117
  canAccessStreamX: string;
118
118
  canViewMLFlow: string;
119
+ canUpdateRig: string;
120
+ canUpdateFracFleet: string;
121
+ canUpdateDrilloutUnit: string;
119
122
  };
120
123
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/permissions/constants/index.js"],"names":[],"mappings":";AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6VE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/permissions/constants/index.js"],"names":[],"mappings":";AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyWE"}