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AAAC,MAiJE,iBACE,CAA0B,IAAtB,KAAKf,MAAMC,OACN,GAAAtB,EAAAM,EAAA,EAACT,EAADsE,kWAAA,GAAsB,KAAKlD,QAE3B,IAEV,CAvJH,IAAAF,CAAA,EAA8BJ,EAAAA","sources":["webpack://_N_E/./src/library/spin/SpinInjector.js","webpack://_N_E/./src/features/common/components/SpinContainer.jsx","webpack://_N_E/"],"sourcesContent":["import React, { Component } from 'react';\nimport { EventName } from './EventName';\n\nexport default function SpinInjector(WrappedComponent) {\n return class Enhancer extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n isShow: false,\n };\n\n this.isSpinShow = false;\n this.spinnerCallCount = 0;\n\n this.onApiCall = this.onApiCall.bind(this);\n this.onSpin = this.onSpin.bind(this);\n\n this.loadTimer = null;\n this.delayTimer = null;\n this.expireTimer = null;\n this.firstTimer = null;\n\n this.timer = 20000;\n }\n\n onApiCall(e) {\n const apiEvent = {\n request: () => {\n if (this.isSpinShow === true) {\n if (this.firstTimer) {\n clearTimeout(this.firstTimer);\n this.firstTimer = null;\n }\n this.spinnerCallCount++;\n if (this.expireTimer) {\n clearTimeout(this.expireTimer);\n this.expireTimer = null;\n }\n if (\n !this.loadTimer &&\n this.spinnerCallCount === 1 &&\n this.state.isShow === false\n ) {\n this.loadTimer = setTimeout(() => {\n this.loadTimer = null;\n this.setState({ isShow: true });\n }, 10);\n }\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n this.delayTimer = setTimeout(() => {\n this.spinnerCallCount = 0;\n this.isSpinShow = false;\n this.setState({ isShow: false });\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }, this.timer);\n }\n },\n\n requestShowSpin: () => {\n if (this.isSpinShow === false) {\n this.isSpinShow = true;\n }\n apiEvent.request();\n },\n\n requestError: () => {},\n\n response: () => {\n if (this.isSpinShow === true) {\n this.spinnerCallCount--;\n if (this.spinnerCallCount === 0 && this.state.isShow === true) {\n if (this.expireTimer) {\n clearTimeout(this.expireTimer);\n this.expireTimer = null;\n }\n this.expireTimer = setTimeout(() => {\n this.spinnerCallCount = 0;\n this.isSpinShow = false;\n this.setState({ isShow: false });\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }, 200);\n }\n }\n },\n responseError: () => {\n apiEvent.response();\n },\n };\n\n const { type } = e.detail;\n if (type && apiEvent[type]) {\n apiEvent[type]();\n }\n }\n\n onSpin(e) {\n const spinEvent = {\n showSpin: (delay = 200) => {\n if (this.isSpinShow === false) {\n this.spinnerCallCount = 0;\n this.timer = e.detail.timer;\n this.isSpinShow = true;\n\n this.firstTimer = setTimeout(() => {\n if (this.spinnerCallCount === 0) {\n this.isSpinShow = false;\n }\n }, delay);\n }\n },\n hideSpin: () => {\n if (this.isSpinShow === true) {\n this.spinnerCallCount = 0;\n this.isSpinShow = false;\n }\n },\n clearSpin: () => {\n this.spinnerCallCount = 0;\n this.isSpinShow = false;\n },\n };\n const { type } = e.detail;\n if (type && spinEvent[type]) {\n spinEvent[type]();\n }\n }\n\n UNSAFE_componentWillMount() {\n window.addEventListener(EventName.api_call, this.onApiCall, false);\n window.addEventListener(EventName.show_spin, this.onSpin, false);\n window.addEventListener(EventName.hide_spin, this.onSpin, false);\n window.addEventListener(EventName.clear_spin, this.onSpin, false);\n }\n\n componentWillUnmount() {\n window.removeEventListener(EventName.api_call, this.onApiCall, false);\n window.removeEventListener(EventName.show_spin, this.onSpin, false);\n window.removeEventListener(EventName.hide_spin, this.onSpin, false);\n window.removeEventListener(EventName.clear_spin, this.onSpin, false);\n }\n\n render() {\n if (this.state.isShow === true) {\n return ;\n } else {\n return null;\n }\n }\n };\n}\n","import React, { Component } from 'react';\nimport SpinInjector from '../../../library/spin/SpinInjector';\n\nclass SpinContainer extends Component {\n render() {\n return (\n
\n
\n \n

\n 처리중입니다.\n
\n 잠시만 기다려 주세요.\n
\n
\n
\n \n

\n
\n \n );\n }\n}\n\nexport default SpinInjector(SpinContainer);\n"],"names":["WrappedComponent","components_SpinContainer","SpinContainer","emotion_react_jsx_runtime_browser_esm","BX","className","style","zIndex","children","tZ","marginTop","height","src","alt","Component","_Component","inherits","Z","Enhancer","_super","props","_this","classCallCheck","call","state","isShow","isSpinShow","spinnerCallCount","onApiCall","bind","assertThisInitialized","onSpin","loadTimer","delayTimer","expireTimer","firstTimer","timer","createClass","key","value","e","_this2","apiEvent","request","clearTimeout","setTimeout","setState","requestShowSpin","requestError","response","responseError","type","detail","_this3","spinEvent","showSpin","delay","arguments","length","undefined","hideSpin","clearSpin","window","addEventListener","EventName","api_call","show_spin","hide_spin","clear_spin","removeEventListener","_objectSpread"],"sourceRoot":""}