You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
8.7 KiB
3 lines
8.7 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{"5YsI":function(t,e,o){t.exports={button:"button-1SoiPS-f",hover:"hover-1SoiPS-f",arrow:"arrow-1SoiPS-f",arrowWrap:"arrowWrap-1SoiPS-f",isOpened:"isOpened-1SoiPS-f"}},"82wv":function(t,e,o){"use strict";o.d(e,"a",(function(){return h}));var r=o("q1tI"),n=o("TSYQ"),i=o("9dlw"),s=o("ML8+"),a=o("ijHL"),c=o("mkWe"),l=o("Sn4D"),d=o("Iksw"),u=o("/KDZ"),p=o("5YsI");class h extends r.PureComponent{constructor(t){super(t),this._wrapperRef=null,this._controller=r.createRef(),this._handleWrapperRef=t=>{this._wrapperRef=t,this.props.reference&&this.props.reference(t)},this._handleClick=t=>{t.target instanceof Node&&t.currentTarget.contains(t.target)&&(this._handleToggleDropdown(),this.props.onClick&&this.props.onClick(t,!this.state.isOpened))},this._handleToggleDropdown=t=>{const{onClose:e,onOpen:o}=this.props,{isOpened:r}=this.state,n="boolean"==typeof t?t:!r;this.setState({isOpened:n}),n&&o&&o(),!n&&e&&e()},this._handleClose=()=>{this.close()},this.state={isOpened:!1}}render(){const{id:t,arrow:e,content:o,isDisabled:i,isDrawer:c,isShowTooltip:l,title:d,className:p,hotKey:h,theme:m,drawerBreakpoint:f}=this.props,{isOpened:v}=this.state,w=n(p,m.button,{"apply-common-tooltip":l||!i,[m.isDisabled]:i,[m.isOpened]:v});return r.createElement("div",{id:t,className:w,onClick:i?void 0:this._handleClick,title:d,"data-tooltip-hotkey":h,ref:this._handleWrapperRef,"data-role":"button",...Object(a.b)(this.props)},o,e&&r.createElement("div",{className:m.arrow},r.createElement("div",{className:m.arrowWrap},r.createElement(s.a,{dropped:v}))),this.state.isOpened&&(f?r.createElement(u.a,{rule:f},t=>this._renderContent(t)):this._renderContent(c)))}close(){this._handleToggleDropdown(!1)}update(){null!==this._controller.current&&this._controller.current.update()}_renderContent(t){const{menuDataName:e,minWidth:o,menuClassName:n,maxHeight:s,drawerPosition:a="Bottom",children:u}=this.props,{isOpened:p}=this.state,h={horizontalMargin:this.props.horizontalMargin||0,verticalMargin:this.props.verticalMargin||2,verticalAttachEdge:this.props.verticalAttachEdge,horizontalAttachEdge:this.props.horizontalAttachEdge,verticalDropDirection:this.props.verticalDropDirection,horizontalDropDirection:this.props.horizontalDropDirection,matchButtonAndListboxWidths:this.props.matchButtonAndListboxWidths},m=Boolean(p&&t&&a),f=function(t){return"function"==typeof t}(u)?u({isDrawer:m}):u;return m?r.createElement(c.b,null,r.createElement(l.a,{onClose:this._handleClose,position:a,"data-name":e},f)):r.createElement(i.a,{controller:this._controller,closeOnClickOutside:this.props.closeOnClickOutside,doNotCloseOn:this,isOpened:p,minWidth:o,onClose:this._handleClose,position:Object(d.e)(this._wrapperRef,h),className:n,maxHeight:s,"data-name":e},f)}}h.defaultProps={arrow:!0,closeOnClickOutside:!0,theme:p}},Iksw:function(t,e,o){"use strict";o.d(e,"c",(function(){return r})),o.d(e,"a",(function(){return n})),o.d(e,"d",(function(){return i})),o.d(e,"b",(function(){return s})),o.d(e,"e",(function(){return l}))
|
|
;var r,n,i,s,a=o("Eyy1");!function(t){t[t.Top=0]="Top",t[t.Bottom=1]="Bottom"}(r||(r={})),function(t){t[t.Left=0]="Left",t[t.Right=1]="Right"}(n||(n={})),function(t){t[t.FromTopToBottom=0]="FromTopToBottom",t[t.FromBottomToTop=1]="FromBottomToTop"}(i||(i={})),function(t){t[t.FromLeftToRight=0]="FromLeftToRight",t[t.FromRightToLeft=1]="FromRightToLeft"}(s||(s={}));const c={verticalAttachEdge:r.Bottom,horizontalAttachEdge:n.Left,verticalDropDirection:i.FromTopToBottom,horizontalDropDirection:s.FromLeftToRight,verticalMargin:0,horizontalMargin:0,matchButtonAndListboxWidths:!1};function l(t,e){return(o,l)=>{const d=Object(a.ensureNotNull)(t).getBoundingClientRect(),{verticalAttachEdge:u=c.verticalAttachEdge,verticalDropDirection:p=c.verticalDropDirection,horizontalAttachEdge:h=c.horizontalAttachEdge,horizontalDropDirection:m=c.horizontalDropDirection,horizontalMargin:f=c.horizontalMargin,verticalMargin:v=c.verticalMargin,matchButtonAndListboxWidths:w=c.matchButtonAndListboxWidths}=e,b=u===r.Top?-1*v:v,D=h===n.Right?d.right:d.left,g=u===r.Top?d.top:d.bottom,O={x:D-(m===s.FromRightToLeft?o:0)+f,y:g-(p===i.FromBottomToTop?l:0)+b};return w&&(O.overrideWidth=d.width),O}}},"ML8+":function(t,e,o){"use strict";o.d(e,"a",(function(){return c}));var r=o("q1tI"),n=o("TSYQ"),i=o("Iivm"),s=o("cvzQ"),a=o("R4+T");function c(t){const{dropped:e,className:o}=t;return r.createElement(i.a,{className:n(o,s.icon,{[s.dropped]:e}),icon:a})}},"R4+T":function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 8" width="16" height="8"><path fill="currentColor" d="M0 1.475l7.396 6.04.596.485.593-.49L16 1.39 14.807 0 7.393 6.122 8.58 6.12 1.186.08z"/></svg>'},R5JZ:function(t,e,o){"use strict";function r(t,e,o,r,n){function i(n){if(t>n.timeStamp)return;const i=n.target;void 0!==o&&null!==e&&null!==i&&i.ownerDocument===r&&(e.contains(i)||o(n))}return n.click&&r.addEventListener("click",i,!1),n.mouseDown&&r.addEventListener("mousedown",i,!1),n.touchEnd&&r.addEventListener("touchend",i,!1),n.touchStart&&r.addEventListener("touchstart",i,!1),()=>{r.removeEventListener("click",i,!1),r.removeEventListener("mousedown",i,!1),r.removeEventListener("touchend",i,!1),r.removeEventListener("touchstart",i,!1)}}o.d(e,"a",(function(){return r}))},Sn4D:function(t,e,o){"use strict";o.d(e,"a",(function(){return m}));var r=o("q1tI"),n=o.n(r),i=o("Eyy1"),s=o("TSYQ"),a=o("x0D+"),c=o("0YpW"),l=o("AiMB"),d=o("mkWe"),u=o("qFKp"),p=o("X0gx"),h=o("sHQ4");function m(t){const{position:e="Bottom",onClose:o,children:m,className:f,theme:v=h}=t,w=Object(i.ensureNotNull)(Object(r.useContext)(d.a)),[b,D]=Object(r.useState)(0),g=Object(r.useRef)(null),O=Object(r.useContext)(p.a);return Object(r.useEffect)(()=>{const t=Object(i.ensureNotNull)(g.current);return t.focus({preventScroll:!0}),O.subscribe(w,o),Object(c.a)(!0),u.CheckMobile.iOS()&&Object(a.disableBodyScroll)(t),D(w.addDrawer()),()=>{O.unsubscribe(w,o);const e=w.removeDrawer();u.CheckMobile.iOS()&&Object(a.enableBodyScroll)(t),0===e&&Object(c.a)(!1)}},[]),n.a.createElement(l.a,null,n.a.createElement("div",{
|
|
className:s(h.wrap,h["position"+e])},b===w.currentDrawer&&n.a.createElement("div",{className:h.backdrop,onClick:o}),n.a.createElement("div",{className:s(h.drawer,v.drawer,h["position"+e],f),ref:g,tabIndex:-1,"data-name":t["data-name"]},m)))}},bQ7Y:function(t,e,o){t.exports={button:"button-2Vpz_LXc",hover:"hover-2Vpz_LXc",isInteractive:"isInteractive-2Vpz_LXc",isGrouped:"isGrouped-2Vpz_LXc",isActive:"isActive-2Vpz_LXc",isOpened:"isOpened-2Vpz_LXc",isDisabled:"isDisabled-2Vpz_LXc",text:"text-2Vpz_LXc",icon:"icon-2Vpz_LXc"}},cvzQ:function(t,e,o){t.exports={icon:"icon-19OjtB6A",dropped:"dropped-19OjtB6A"}},ijHL:function(t,e,o){"use strict";function r(t){return i(t,s)}function n(t){return i(t,a)}function i(t,e){const o=Object.entries(t).filter(e),r={};for(const[t,e]of o)r[t]=e;return r}function s(t){const[e,o]=t;return 0===e.indexOf("data-")&&"string"==typeof o}function a(t){return 0===t[0].indexOf("aria-")}o.d(e,"b",(function(){return r})),o.d(e,"a",(function(){return n})),o.d(e,"c",(function(){return i})),o.d(e,"e",(function(){return s})),o.d(e,"d",(function(){return a}))},mkWe:function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"a",(function(){return s}));var r=o("q1tI"),n=o.n(r);class i extends n.a.PureComponent{constructor(t){super(t),this._addDrawer=()=>{const t=this.state.currentDrawer+1;return this.setState({currentDrawer:t}),t},this._removeDrawer=()=>{const t=this.state.currentDrawer-1;return this.setState({currentDrawer:t}),t},this.state={currentDrawer:0}}render(){return n.a.createElement(s.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.currentDrawer}},this.props.children)}}const s=n.a.createContext(null)},sHQ4:function(t,e,o){t.exports={wrap:"wrap-164vy-kj",positionBottom:"positionBottom-164vy-kj",backdrop:"backdrop-164vy-kj",drawer:"drawer-164vy-kj",positionLeft:"positionLeft-164vy-kj"}},tU7i:function(t,e,o){"use strict";o.d(e,"a",(function(){return a})),o.d(e,"b",(function(){return c}));var r=o("q1tI"),n=o("TSYQ"),i=o("Iivm"),s=o("bQ7Y");const a=s,c=r.forwardRef((t,e)=>{const{icon:o,isActive:a,isOpened:c,isDisabled:l,isGrouped:d,isHovered:u,onClick:p,text:h,textBeforeIcon:m,title:f,theme:v=s,className:w,forceInteractive:b,"data-name":D,...g}=t,O=n(w,v.button,f&&"apply-common-tooltip",{[v.isActive]:a,[v.isOpened]:c,[v.isInteractive]:(b||Boolean(p))&&!l,[v.isDisabled]:l,[v.isGrouped]:d,[v.hover]:u}),E=o&&("string"==typeof o?r.createElement(i.a,{className:v.icon,icon:o}):r.cloneElement(o,{className:n(v.icon,o.props.className)}));return r.createElement("div",{...g,ref:e,"data-role":"button",className:O,onClick:l?void 0:p,title:f,"data-name":D},m&&h&&r.createElement("div",{className:n("js-button-text",v.text)},h),E,!m&&h&&r.createElement("div",{className:n("js-button-text",v.text)},h))})}}]);
|