diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/0c1ce4cba60b52545be9a21f36a3a6c728ead160 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/0c1ce4cba60b52545be9a21f36a3a6c728ead160 new file mode 100644 index 0000000..088803d --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/0c1ce4cba60b52545be9a21f36a3a6c728ead160 @@ -0,0 +1 @@ +{"code":"import Tab from './tabs/tab';\r\nimport TabBar from './tabs/tab-bar';\r\nimport './tabs/tab.scss';\r\nexport { Tab, TabBar, };\r\n//# sourceMappingURL=index.js.map","references":["/Users/gustavofreiresantos/projetos/tabs-react-project/src/components/tabs/tab.tsx","/Users/gustavofreiresantos/projetos/tabs-react-project/src/components/tabs/tab-bar.tsx"],"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/components/index.tsx\"],\"names\":[],\"mappings\":\"AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,iBAAiB,CAAC;AAEzB,OAAO,EACL,GAAG,EACH,MAAM,GACP,CAAC\"}","dts":{"name":"/Users/gustavofreiresantos/projetos/tabs-react-project/components/index.d.ts","writeByteOrderMark":false,"text":"import Tab from './tabs/tab';\r\nimport TabBar from './tabs/tab-bar';\r\nimport './tabs/tab.scss';\r\nexport { Tab, TabBar, };\r\n"}} diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/c50c51545ab2d4c6b796c9c6c266ab4f10e7fe5d b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/c50c51545ab2d4c6b796c9c6c266ab4f10e7fe5d new file mode 100644 index 0000000..0aed937 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/c50c51545ab2d4c6b796c9c6c266ab4f10e7fe5d @@ -0,0 +1 @@ +{"code":"import { default as React, Fragment, useState, useRef, useEffect, createRef, } from 'react';\r\nimport ReactSVG from 'react-svg';\r\nimport cancelSvg from './cancel.svg';\r\nimport Tab from './tab';\r\nimport uuid from 'uuid';\r\nimport { arrayMove } from './utils';\r\nconst TabBar = (props) => {\r\n const [tabId, setTabId] = useState('');\r\n const tabBar = useRef(null);\r\n const pos1 = useRef(0);\r\n const pos3 = useRef(0);\r\n const [dragged, setDrag] = useState(null);\r\n const [tabList, setTabList] = useState([]);\r\n const refList = useRef(React.Children.toArray(props.children).map(() => {\r\n return createRef();\r\n }));\r\n // Add the tabs that comes from props to the tabList Array\r\n useEffect(() => {\r\n // setTabList(React.Children.toArray(props.children));\r\n const tabs = React.Children.toArray(props.children).map((tab) => {\r\n return {\r\n tabComponent: tab,\r\n id: uuid(),\r\n };\r\n });\r\n setTabList(tabs);\r\n }, []);\r\n // if the onTabsChange prop is provided, send the modified tablist array...\r\n // as a parameter for the callback function\r\n useEffect(() => {\r\n if (props.onTabsChange) {\r\n props.onTabsChange(tabList, props.children);\r\n }\r\n }, [tabList]);\r\n function getRef(tab) {\r\n return refList.current.find(item => item.current.id === tab.id);\r\n }\r\n function exactPos(e) {\r\n pos1.current = pos3.current - e.clientX;\r\n pos3.current = e.clientX;\r\n return getRef(dragged).current.offsetLeft - pos1.current;\r\n }\r\n function dragMouseDown(e, tab) {\r\n const elemn = getRef(tab).current;\r\n setActive(tab);\r\n if (!props.reorderable)\r\n return;\r\n setDrag(tab);\r\n // get the mouse cursor position at startup:\r\n pos3.current = e.clientX;\r\n elemn.style.left = `${elemn.getBoundingClientRect().left}px`;\r\n elemn.style.position = 'absolute';\r\n elemn.style.width = `${elemn.offsetWidth}px`;\r\n const nextElement = elemn.nextSibling;\r\n const previousElement = elemn.previousSibling;\r\n if (nextElement && previousElement) {\r\n nextElement.style.marginLeft = `${elemn.getBoundingClientRect().width - 1}px`;\r\n }\r\n else if (previousElement) {\r\n previousElement.style.marginRight = `${elemn.getBoundingClientRect().width - 2}px`;\r\n }\r\n else {\r\n nextElement.style.marginLeft = `${elemn.getBoundingClientRect().width - 1}px`;\r\n }\r\n }\r\n // function called when the tab is dragged\r\n function elementDrag(e) {\r\n if (!dragged)\r\n return;\r\n const position = exactPos(e);\r\n const currentElement = getRef(dragged).current;\r\n const nextElement = currentElement.nextSibling;\r\n const previousElement = currentElement.previousSibling;\r\n // all this -1 margins is for covering the aditional line after the tab\r\n const placeholderMargin = currentElement.getBoundingClientRect().width - 1;\r\n currentElement.style.left = `${position}px`;\r\n if (nextElement && nextElement.getBoundingClientRect().left - 70 < position) {\r\n if (previousElement) {\r\n previousElement.style.marginRight = '-1px';\r\n previousElement.style.marginLeft = '0';\r\n }\r\n nextElement.style.marginLeft = '0px';\r\n nextElement.style.marginRight = `${placeholderMargin - 1}px`;\r\n nextElement.className = 'animated';\r\n arrayMove(tabList, tabList.indexOf(dragged), tabList.indexOf(dragged) + 1);\r\n setTabList([...tabList]);\r\n }\r\n if (previousElement && previousElement.getBoundingClientRect().right - 80 > position) {\r\n if (nextElement) {\r\n nextElement.style.marginRight = '-1px';\r\n nextElement.style.marginLeft = '0';\r\n }\r\n previousElement.style.marginRight = '-1px';\r\n previousElement.style.marginLeft = `${placeholderMargin}px`;\r\n previousElement.className = 'deanimated';\r\n arrayMove(tabList, tabList.indexOf(dragged), tabList.indexOf(dragged) - 1);\r\n setTabList([...tabList]);\r\n }\r\n }\r\n // Function called when the dragged element is relased\r\n function closeDragElement(e) {\r\n if (!dragged)\r\n return;\r\n const elemn = getRef(dragged).current;\r\n const nextElement = elemn.nextSibling;\r\n const previousElement = elemn.previousSibling;\r\n if (nextElement) {\r\n nextElement.style.marginLeft = '0';\r\n nextElement.style.marginRight = '-1px';\r\n }\r\n if (previousElement) {\r\n previousElement.style.marginLeft = '0';\r\n previousElement.style.marginRight = '-1px';\r\n }\r\n elemn.style.position = 'relative';\r\n elemn.style.left = 'auto';\r\n elemn.style.width = '145px';\r\n tabBar.current.onmouseup = null;\r\n setDrag(null);\r\n }\r\n // closes elements based on List Order\r\n const removeTab = (id, e, tab) => {\r\n e.stopPropagation();\r\n if (checkActive(tab) && tabList.length > 1) {\r\n const backTab = tabList[tabList.indexOf(tab) + 1];\r\n const frontTab = tabList[tabList.indexOf(tab) - 1];\r\n if (backTab) {\r\n setActive(backTab);\r\n }\r\n else {\r\n setActive(frontTab);\r\n }\r\n }\r\n const removed = tabList;\r\n removed.splice(tabList.indexOf(tab), 1);\r\n setTabList([...removed]);\r\n };\r\n // set a tab as the active tab based on it's id\r\n const setActive = (tab) => {\r\n setTabId(tab.id);\r\n if (props.onTabClick) {\r\n props.onTabClick(tab);\r\n }\r\n };\r\n // function to add a new element on the list of tabs\r\n const addTab = () => {\r\n let tabComponent = props.newTab();\r\n refList.current.push(createRef());\r\n tabComponent = React.createElement(Tab, { text: tabComponent.props.text }, tabComponent.props.children);\r\n const newTab = { tabComponent, id: uuid() };\r\n setTabList([...tabList, newTab]);\r\n setActive(newTab);\r\n };\r\n // function the check if the tab is the active one\r\n const checkActive = (child) => {\r\n const active = React.Children.toArray(props.children).find((child) => {\r\n return child.props.active;\r\n });\r\n const currentTab = (active && active.key === child.tabComponent.key) ? active : null;\r\n if (child.id === tabId) {\r\n return true;\r\n }\r\n if (tabId === '' && currentTab) {\r\n return true;\r\n }\r\n if (!currentTab && tabId === '' && !active) {\r\n if (React.Children.toArray(props.children)[0].key === child.tabComponent.key) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return (React.createElement(Fragment, null,\r\n React.createElement(\"div\", { className: \"bar__wrapper\" },\r\n React.createElement(\"ul\", { className: \"tab__bar\", onMouseMove: elementDrag, onMouseLeave: closeDragElement, ref: tabBar }, tabList.map((child, i) => {\r\n return (React.createElement(\"li\", { id: child.id, key: child.id, ref: refList.current[i], className: checkActive(child) ? 'active reposition' : '', onMouseDown: e => dragMouseDown(e, child), onMouseUp: closeDragElement },\r\n child.tabComponent.props.tabHeader || child.tabComponent.props.text,\r\n props.closeable &&\r\n React.createElement(\"span\", { className: \"close\", onClick: e => removeTab(child.id, e, child) }, props.closeIcon || (React.createElement(ReactSVG, { className: \"close-icon\", src: (cancelSvg.toString()) })))));\r\n })),\r\n props.newTab &&\r\n React.createElement(\"span\", { className: \"addButton\", onClick: addTab }, \"+\")),\r\n tabList.map((child) => {\r\n return (React.createElement(\"div\", { id: `${child.id}-panel`, key: `${child.id}-panel`, className: `tab-panel ${checkActive(child) ? 'active' : ''}` }, child.tabComponent));\r\n })));\r\n};\r\nexport default TabBar;\r\n//# sourceMappingURL=tab-bar.js.map","references":["/Users/gustavofreiresantos/projetos/tabs-react-project/node_modules/@types/react/index.d.ts","/Users/gustavofreiresantos/projetos/tabs-react-project/node_modules/react-svg/dist/index.d.ts","/Users/gustavofreiresantos/projetos/tabs-react-project/src/components/tabs/tab.tsx","/Users/gustavofreiresantos/projetos/tabs-react-project/node_modules/@types/uuid/index.d.ts","/Users/gustavofreiresantos/projetos/tabs-react-project/src/components/tabs/utils.ts"],"map":"{\"version\":3,\"file\":\"tab-bar.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/components/tabs/tab-bar.tsx\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EACC,OAAO,IAAI,KAAK,EAChB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EAET,SAAS,GAET,MAAM,OAAO,CAAC;AACtB,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAkBpC,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE;IACpC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;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EACvB,GAAG,EAAE,GAAG,KAAK,CAAC,EAAE,QAAQ,EACxB,SAAS,EAAE,aAAa,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAG,EAAE,IAE5D,KAAK,CAAC,YAAY,CACf,CACX,CAAC;QACJ,CAAC,CAAC,CAEY,CACb,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,MAAM,CAAC\"}","dts":{"name":"/Users/gustavofreiresantos/projetos/tabs-react-project/components/tabs/tab-bar.d.ts","writeByteOrderMark":false,"text":"import { ReactElement, ReactChildren } from 'react';\r\nimport Tab from './tab';\r\ninterface Tab {\r\n tabComponent: ReactElement;\r\n id: string;\r\n}\r\nexport interface TabBarProps {\r\n newTab?: () => ReactElement;\r\n reorderable?: boolean;\r\n children: any;\r\n closeable?: boolean;\r\n onTabClick?: (tab: ReactElement) => void;\r\n onTabsChange?: (modifiedList: Tab[], tabList?: ReactChildren) => void;\r\n closeIcon?: ReactElement;\r\n}\r\ndeclare const TabBar: (props: TabBarProps) => JSX.Element;\r\nexport default TabBar;\r\n"}} diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/d34831b297130f017b3329cfa3a838e662c2db3d b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/d34831b297130f017b3329cfa3a838e662c2db3d new file mode 100644 index 0000000..8b53190 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/d34831b297130f017b3329cfa3a838e662c2db3d @@ -0,0 +1 @@ +{"code":"export function arrayMove(arr, oldIndex, newIndex) {\r\n arr.splice(newIndex, 0, arr.splice(oldIndex, 1)[0]);\r\n return arr;\r\n}\r\n//# sourceMappingURL=utils.js.map","references":[],"map":"{\"version\":3,\"file\":\"utils.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/components/tabs/utils.ts\"],\"names\":[],\"mappings\":\"AAAA,MAAM,UAAU,SAAS,CAAC,GAAU,EAAE,QAAgB,EAAE,QAAgB;IACtE,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,OAAO,GAAG,CAAC;AACb,CAAC\"}","dts":{"name":"/Users/gustavofreiresantos/projetos/tabs-react-project/components/tabs/utils.d.ts","writeByteOrderMark":false,"text":"export declare function arrayMove(arr: any[], oldIndex: number, newIndex: number): any[];\r\n"}} diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/fcb0426d553098a9da51ffa7c4a61a0465c67a26 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/fcb0426d553098a9da51ffa7c4a61a0465c67a26 new file mode 100644 index 0000000..369ad35 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/code/cache/fcb0426d553098a9da51ffa7c4a61a0465c67a26 @@ -0,0 +1 @@ +{"code":"import React from 'react';\r\nimport uuid from 'uuid';\r\nconst Tab = (props) => {\r\n return (React.createElement(\"div\", { className: \"tab-wrapper\", key: uuid() },\r\n React.createElement(\"div\", null, props.children)));\r\n};\r\nexport default Tab;\r\n//# sourceMappingURL=tab.js.map","references":["/Users/gustavofreiresantos/projetos/tabs-react-project/node_modules/@types/react/index.d.ts","/Users/gustavofreiresantos/projetos/tabs-react-project/node_modules/@types/uuid/index.d.ts"],"map":"{\"version\":3,\"file\":\"tab.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/components/tabs/tab.tsx\"],\"names\":[],\"mappings\":\"AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AAUxB,MAAM,GAAG,GAAG,CAAC,KAAe,EAAE,EAAE;IAC9B,OAAO,CACL,6BACE,SAAS,EAAC,aAAa,EACvB,GAAG,EAAE,IAAI,EAAE;QAEX,iCACG,KAAK,CAAC,QAAQ,CACX,CACD,CACR,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,GAAG,CAAC\"}","dts":{"name":"/Users/gustavofreiresantos/projetos/tabs-react-project/components/tabs/tab.d.ts","writeByteOrderMark":false,"text":"import { ReactElement } from 'react';\r\nexport interface TabProps {\r\n resourceData?: object;\r\n children: any;\r\n active?: boolean;\r\n tabHeader?: ReactElement;\r\n text?: string;\r\n}\r\ndeclare const Tab: (props: TabProps) => JSX.Element;\r\nexport default Tab;\r\n"}} diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/0c1ce4cba60b52545be9a21f36a3a6c728ead160 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/0c1ce4cba60b52545be9a21f36a3a6c728ead160 new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/0c1ce4cba60b52545be9a21f36a3a6c728ead160 @@ -0,0 +1 @@ +[] diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/c50c51545ab2d4c6b796c9c6c266ab4f10e7fe5d b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/c50c51545ab2d4c6b796c9c6c266ab4f10e7fe5d new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/c50c51545ab2d4c6b796c9c6c266ab4f10e7fe5d @@ -0,0 +1 @@ +[] diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/d34831b297130f017b3329cfa3a838e662c2db3d b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/d34831b297130f017b3329cfa3a838e662c2db3d new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/d34831b297130f017b3329cfa3a838e662c2db3d @@ -0,0 +1 @@ +[] diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/fcb0426d553098a9da51ffa7c4a61a0465c67a26 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/fcb0426d553098a9da51ffa7c4a61a0465c67a26 new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/semanticDiagnostics/cache/fcb0426d553098a9da51ffa7c4a61a0465c67a26 @@ -0,0 +1 @@ +[] diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/0c1ce4cba60b52545be9a21f36a3a6c728ead160 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/0c1ce4cba60b52545be9a21f36a3a6c728ead160 new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/0c1ce4cba60b52545be9a21f36a3a6c728ead160 @@ -0,0 +1 @@ +[] diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/c50c51545ab2d4c6b796c9c6c266ab4f10e7fe5d b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/c50c51545ab2d4c6b796c9c6c266ab4f10e7fe5d new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/c50c51545ab2d4c6b796c9c6c266ab4f10e7fe5d @@ -0,0 +1 @@ +[] diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/d34831b297130f017b3329cfa3a838e662c2db3d b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/d34831b297130f017b3329cfa3a838e662c2db3d new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/d34831b297130f017b3329cfa3a838e662c2db3d @@ -0,0 +1 @@ +[] diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/fcb0426d553098a9da51ffa7c4a61a0465c67a26 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/fcb0426d553098a9da51ffa7c4a61a0465c67a26 new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/syntacticDiagnostics/cache/fcb0426d553098a9da51ffa7c4a61a0465c67a26 @@ -0,0 +1 @@ +[] diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/18f1160a27dd6646ddc122e681bcddc8f17dcd5b b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/18f1160a27dd6646ddc122e681bcddc8f17dcd5b new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/1b52ad791fdd95113d346ab694913b983d4d75b7 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/1b52ad791fdd95113d346ab694913b983d4d75b7 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/1c3afa34f1a4624e1de8fb427507b6c9678dfd46 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/1c3afa34f1a4624e1de8fb427507b6c9678dfd46 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/2f82af9b48e3482de7b2e92afcf1d22276360772 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/2f82af9b48e3482de7b2e92afcf1d22276360772 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/3421eaa635b7401c5e91a487101782485fef41e2 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/3421eaa635b7401c5e91a487101782485fef41e2 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/367b19f081a5be50077826b466ba3bc39a63c266 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/367b19f081a5be50077826b466ba3bc39a63c266 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/376efb52c11e75d9bb1d5580af00762029559dfb b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/376efb52c11e75d9bb1d5580af00762029559dfb new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/397502b2a54527999779e12e43195f9629927a97 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/397502b2a54527999779e12e43195f9629927a97 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/3e19d0756d973b0273ba92d438f7fd704bf654d1 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/3e19d0756d973b0273ba92d438f7fd704bf654d1 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/44f9416ddf8de05cb79234b88f7f09bace87042f b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/44f9416ddf8de05cb79234b88f7f09bace87042f new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/6253c1c88b87d66fb4cfb989782c2f4636aa3e7e b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/6253c1c88b87d66fb4cfb989782c2f4636aa3e7e new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/7ce692df8155500b8e9d6201c7c3db1bfd77da57 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/7ce692df8155500b8e9d6201c7c3db1bfd77da57 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/9632754634231db3a035ec57fa4cd5b366b45cd2 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/9632754634231db3a035ec57fa4cd5b366b45cd2 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/a4779ec6be87e0dc18c8d7760a788432c8a98206 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/a4779ec6be87e0dc18c8d7760a788432c8a98206 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/b00a5ceff35669d502eb56cac3ebc1a4eddfed25 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/b00a5ceff35669d502eb56cac3ebc1a4eddfed25 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/b1a4363cf947cab2c304b80ce0daa8243569e4c7 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/b1a4363cf947cab2c304b80ce0daa8243569e4c7 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/be02b2b77ceec5563db75134fc50a06407100cc9 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/be02b2b77ceec5563db75134fc50a06407100cc9 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/be943b334f1417a35e2f9417dd96899eaafafea6 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/be943b334f1417a35e2f9417dd96899eaafafea6 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/d3b641f962d5cfdeab333f12a122ca6b6f63ee7b b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/d3b641f962d5cfdeab333f12a122ca6b6f63ee7b new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/d82a8af20bc6b6caa845bbcb5e7e1e4674899d24 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/d82a8af20bc6b6caa845bbcb5e7e1e4674899d24 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/e50836a7a3b9145f80eb8285813b6ab21d75ac3a b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/e50836a7a3b9145f80eb8285813b6ab21d75ac3a new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/eaab47a03de5f6c470e95460f9fb5c012418db33 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/eaab47a03de5f6c470e95460f9fb5c012418db33 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/eeb868454573f01a11886c4916fc138ea2894a51 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/eeb868454573f01a11886c4916fc138ea2894a51 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/f0a2450c84235c6721b7654a9916c336e210ca27 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/f0a2450c84235c6721b7654a9916c336e210ca27 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/fe7ada5eac8275377a5a7fac5c0a408d0a09dfa6 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/fe7ada5eac8275377a5a7fac5c0a408d0a09dfa6 new file mode 100644 index 0000000..e69de29 diff --git a/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/ff70701884d359fcbb56d37ca17e2a86d84c53b5 b/.rpt2_cache/rpt2_0a86689ce2a66a259a9dc26913cb6846cc668496/types/cache/ff70701884d359fcbb56d37ca17e2a86d84c53b5 new file mode 100644 index 0000000..e69de29 diff --git a/package-lock.json b/package-lock.json index 8473d13..53a0405 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-smart-tabs", - "version": "0.1.0", + "version": "0.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3662,6 +3662,16 @@ "readable-stream": "^2.0.0" } }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", @@ -4492,8 +4502,7 @@ "graceful-fs": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", - "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", - "dev": true + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==" }, "growly": { "version": "1.3.0", @@ -6284,6 +6293,14 @@ "minimist": "^1.2.0" } }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -9427,6 +9444,17 @@ "rollup-pluginutils": "^2.5.0" } }, + "rollup-plugin-typescript2": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.22.1.tgz", + "integrity": "sha512-SQEHr1s0kDWrNV3UKySZtYKFIcWCJh2PQ4ZtLNj18pf50SrxeRDlUksOOeLPyodJ7bVLaKwWDbiobF2a6gfKyg==", + "requires": { + "fs-extra": "8.1.0", + "resolve": "1.11.1", + "rollup-pluginutils": "2.8.1", + "tslib": "1.10.0" + } + }, "rollup-pluginutils": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", @@ -11499,6 +11527,11 @@ "unist-util-is": "^3.0.0" } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", diff --git a/package.json b/package.json index 9a6caa8..2b34971 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-smart-tabs", - "version": "0.1.0", + "version": "0.2.1", "description": "A tab component with drag and drop functionality, add and close", "main": "dist/bundle.js", "scripts": { @@ -59,6 +59,7 @@ "react-dom": "^16.9.0", "react-svg": "^10.0.17", "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-typescript2": "^0.22.1", "sass-loader": "^7.1.0", "style-loader": "^0.23.1", "tslint": "^5.18.0", diff --git a/rollup.config.js b/rollup.config.js index 33e27b8..1f266c5 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,4 +1,4 @@ -import typescript from 'rollup-plugin-typescript'; +import typescript from 'rollup-plugin-typescript2'; import scss from 'rollup-plugin-scss'; import {terser} from "rollup-plugin-terser"; import svg from 'rollup-plugin-svg' diff --git a/tsconfig.json b/tsconfig.json index 096f94a..85a9151 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,8 @@ "sourceMap": true, "skipLibCheck": true, "noImplicitAny": true, - "module": "commonjs", + "module": "ESNext", + "declaration": true, "target": "es6", "jsx": "react", "esModuleInterop": true