1c2a23f65e8b3b4889a5456f6da4f0c8.json
9.18 KB
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\nimport { placements } from \"rc-tooltip/es/placements\";\nvar autoAdjustOverflowEnabled = {\n adjustX: 1,\n adjustY: 1\n};\nvar autoAdjustOverflowDisabled = {\n adjustX: 0,\n adjustY: 0\n};\nvar targetOffset = [0, 0];\nexport function getOverflowOptions(autoAdjustOverflow) {\n if (typeof autoAdjustOverflow === 'boolean') {\n return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled;\n }\n\n return _extends(_extends({}, autoAdjustOverflowDisabled), autoAdjustOverflow);\n}\nexport default function getPlacements(config) {\n var _config$arrowWidth = config.arrowWidth,\n arrowWidth = _config$arrowWidth === void 0 ? 5 : _config$arrowWidth,\n _config$horizontalArr = config.horizontalArrowShift,\n horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr,\n _config$verticalArrow = config.verticalArrowShift,\n verticalArrowShift = _config$verticalArrow === void 0 ? 8 : _config$verticalArrow,\n autoAdjustOverflow = config.autoAdjustOverflow;\n var placementMap = {\n left: {\n points: ['cr', 'cl'],\n offset: [-4, 0]\n },\n right: {\n points: ['cl', 'cr'],\n offset: [4, 0]\n },\n top: {\n points: ['bc', 'tc'],\n offset: [0, -4]\n },\n bottom: {\n points: ['tc', 'bc'],\n offset: [0, 4]\n },\n topLeft: {\n points: ['bl', 'tc'],\n offset: [-(horizontalArrowShift + arrowWidth), -4]\n },\n leftTop: {\n points: ['tr', 'cl'],\n offset: [-4, -(verticalArrowShift + arrowWidth)]\n },\n topRight: {\n points: ['br', 'tc'],\n offset: [horizontalArrowShift + arrowWidth, -4]\n },\n rightTop: {\n points: ['tl', 'cr'],\n offset: [4, -(verticalArrowShift + arrowWidth)]\n },\n bottomRight: {\n points: ['tr', 'bc'],\n offset: [horizontalArrowShift + arrowWidth, 4]\n },\n rightBottom: {\n points: ['bl', 'cr'],\n offset: [4, verticalArrowShift + arrowWidth]\n },\n bottomLeft: {\n points: ['tl', 'bc'],\n offset: [-(horizontalArrowShift + arrowWidth), 4]\n },\n leftBottom: {\n points: ['br', 'cl'],\n offset: [-4, verticalArrowShift + arrowWidth]\n }\n };\n Object.keys(placementMap).forEach(function (key) {\n placementMap[key] = config.arrowPointAtCenter ? _extends(_extends({}, placementMap[key]), {\n overflow: getOverflowOptions(autoAdjustOverflow),\n targetOffset: targetOffset\n }) : _extends(_extends({}, placements[key]), {\n overflow: getOverflowOptions(autoAdjustOverflow)\n });\n placementMap[key].ignoreShake = true;\n });\n return placementMap;\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/tooltip/placements.js"],"names":["_extends","placements","autoAdjustOverflowEnabled","adjustX","adjustY","autoAdjustOverflowDisabled","targetOffset","getOverflowOptions","autoAdjustOverflow","getPlacements","config","_config$arrowWidth","arrowWidth","_config$horizontalArr","horizontalArrowShift","_config$verticalArrow","verticalArrowShift","placementMap","left","points","offset","right","top","bottom","topLeft","leftTop","topRight","rightTop","bottomRight","rightBottom","bottomLeft","leftBottom","Object","keys","forEach","key","arrowPointAtCenter","overflow","ignoreShake"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gCAArB;AACA,SAASC,UAAT,QAA2B,0BAA3B;AACA,IAAIC,yBAAyB,GAAG;AAC9BC,EAAAA,OAAO,EAAE,CADqB;AAE9BC,EAAAA,OAAO,EAAE;AAFqB,CAAhC;AAIA,IAAIC,0BAA0B,GAAG;AAC/BF,EAAAA,OAAO,EAAE,CADsB;AAE/BC,EAAAA,OAAO,EAAE;AAFsB,CAAjC;AAIA,IAAIE,YAAY,GAAG,CAAC,CAAD,EAAI,CAAJ,CAAnB;AACA,OAAO,SAASC,kBAAT,CAA4BC,kBAA5B,EAAgD;AACrD,MAAI,OAAOA,kBAAP,KAA8B,SAAlC,EAA6C;AAC3C,WAAOA,kBAAkB,GAAGN,yBAAH,GAA+BG,0BAAxD;AACD;;AAED,S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AACVZ,MAAAA,MAAM,EAAE,CAAC,IAAD,EAAO,IAAP,CADE;AAEVC,MAAAA,MAAM,EAAE,CAAC,CAAC,CAAF,EAAKJ,kBAAkB,GAAGJ,UAA1B;AAFE;AA7CK,GAAnB;AAkDAoB,EAAAA,MAAM,CAACC,IAAP,CAAYhB,YAAZ,EAA0BiB,OAA1B,CAAkC,UAAUC,GAAV,EAAe;AAC/ClB,IAAAA,YAAY,CAACkB,GAAD,CAAZ,GAAoBzB,MAAM,CAAC0B,kBAAP,GAA4BpC,QAAQ,CAACA,QAAQ,CAAC,EAAD,EAAKiB,YAAY,CAACkB,GAAD,CAAjB,CAAT,EAAkC;AACxFE,MAAAA,QAAQ,EAAE9B,kBAAkB,CAACC,kBAAD,CAD4D;AAExFF,MAAAA,YAAY,EAAEA;AAF0E,KAAlC,CAApC,GAGfN,QAAQ,CAACA,QAAQ,CAAC,EAAD,EAAKC,UAAU,CAACkC,GAAD,CAAf,CAAT,EAAgC;AAC3CE,MAAAA,QAAQ,EAAE9B,kBAAkB,CAACC,kBAAD;AADe,KAAhC,CAHb;AAMAS,IAAAA,YAAY,CAACkB,GAAD,CAAZ,CAAkBG,WAAlB,GAAgC,IAAhC;AACD,GARD;AASA,SAAOrB,YAAP;AACD","sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport { placements } from \"rc-tooltip/es/placements\";\nvar autoAdjustOverflowEnabled = {\n adjustX: 1,\n adjustY: 1\n};\nvar autoAdjustOverflowDisabled = {\n adjustX: 0,\n adjustY: 0\n};\nvar targetOffset = [0, 0];\nexport function getOverflowOptions(autoAdjustOverflow) {\n if (typeof autoAdjustOverflow === 'boolean') {\n return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled;\n }\n\n return _extends(_extends({}, autoAdjustOverflowDisabled), autoAdjustOverflow);\n}\nexport default function getPlacements(config) {\n var _config$arrowWidth = config.arrowWidth,\n arrowWidth = _config$arrowWidth === void 0 ? 5 : _config$arrowWidth,\n _config$horizontalArr = config.horizontalArrowShift,\n horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr,\n _config$verticalArrow = config.verticalArrowShift,\n verticalArrowShift = _config$verticalArrow === void 0 ? 8 : _config$verticalArrow,\n autoAdjustOverflow = config.autoAdjustOverflow;\n var placementMap = {\n left: {\n points: ['cr', 'cl'],\n offset: [-4, 0]\n },\n right: {\n points: ['cl', 'cr'],\n offset: [4, 0]\n },\n top: {\n points: ['bc', 'tc'],\n offset: [0, -4]\n },\n bottom: {\n points: ['tc', 'bc'],\n offset: [0, 4]\n },\n topLeft: {\n points: ['bl', 'tc'],\n offset: [-(horizontalArrowShift + arrowWidth), -4]\n },\n leftTop: {\n points: ['tr', 'cl'],\n offset: [-4, -(verticalArrowShift + arrowWidth)]\n },\n topRight: {\n points: ['br', 'tc'],\n offset: [horizontalArrowShift + arrowWidth, -4]\n },\n rightTop: {\n points: ['tl', 'cr'],\n offset: [4, -(verticalArrowShift + arrowWidth)]\n },\n bottomRight: {\n points: ['tr', 'bc'],\n offset: [horizontalArrowShift + arrowWidth, 4]\n },\n rightBottom: {\n points: ['bl', 'cr'],\n offset: [4, verticalArrowShift + arrowWidth]\n },\n bottomLeft: {\n points: ['tl', 'bc'],\n offset: [-(horizontalArrowShift + arrowWidth), 4]\n },\n leftBottom: {\n points: ['br', 'cl'],\n offset: [-4, verticalArrowShift + arrowWidth]\n }\n };\n Object.keys(placementMap).forEach(function (key) {\n placementMap[key] = config.arrowPointAtCenter ? _extends(_extends({}, placementMap[key]), {\n overflow: getOverflowOptions(autoAdjustOverflow),\n targetOffset: targetOffset\n }) : _extends(_extends({}, placements[key]), {\n overflow: getOverflowOptions(autoAdjustOverflow)\n });\n placementMap[key].ignoreShake = true;\n });\n return placementMap;\n}"]},"metadata":{},"sourceType":"module"}