94796402e2e9af4edb6d690f9cfd8e63.json
4.35 KB
{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport warning from \"rc-util/es/warning\";\nexport var INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE';\nexport function getExpandableProps(props) {\n var expandable = props.expandable,\n legacyExpandableConfig = _objectWithoutProperties(props, [\"expandable\"]);\n\n if ('expandable' in props) {\n return _objectSpread(_objectSpread({}, legacyExpandableConfig), expandable);\n }\n\n if (process.env.NODE_ENV !== 'production' && ['indentSize', 'expandedRowKeys', 'defaultExpandedRowKeys', 'defaultExpandAllRows', 'expandedRowRender', 'expandRowByClick', 'expandIcon', 'onExpand', 'onExpandedRowsChange', 'expandedRowClassName', 'expandIconColumnIndex'].some(function (prop) {\n return prop in props;\n })) {\n warning(false, 'expanded related props have been moved into `expandable`.');\n }\n\n return legacyExpandableConfig;\n}\n/**\n * Returns only data- and aria- key/value pairs\n * @param {object} props\n */\n\nexport function getDataAndAriaProps(props) {\n /* eslint-disable no-param-reassign */\n return Object.keys(props).reduce(function (memo, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {\n memo[key] = props[key];\n }\n\n return memo;\n }, {});\n /* eslint-enable */\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-table/es/utils/legacyUtil.js"],"names":["_objectSpread","_objectWithoutProperties","warning","INTERNAL_COL_DEFINE","getExpandableProps","props","expandable","legacyExpandableConfig","process","env","NODE_ENV","some","prop","getDataAndAriaProps","Object","keys","reduce","memo","key","substr"],"mappings":"AAAA,OAAOA,aAAP,MAA0B,0CAA1B;AACA,OAAOC,wBAAP,MAAqC,oDAArC;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAO,IAAIC,mBAAmB,GAAG,8BAA1B;AACP,OAAO,SAASC,kBAAT,CAA4BC,KAA5B,EAAmC;AACxC,MAAIC,UAAU,GAAGD,KAAK,CAACC,UAAvB;AAAA,MACIC,sBAAsB,GAAGN,wBAAwB,CAACI,KAAD,EAAQ,CAAC,YAAD,CAAR,CADrD;;AAGA,MAAI,gBAAgBA,KAApB,EAA2B;AACzB,WAAOL,aAAa,CAACA,aAAa,CAAC,EAAD,EAAKO,sBAAL,CAAd,EAA4CD,UAA5C,CAApB;AACD;;AAED,MAAIE,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,IAAyC,CAAC,YAAD,EAAe,iBAAf,EAAkC,wBAAlC,EAA4D,sBAA5D,EAAoF,mBAApF,EAAyG,kBAAzG,EAA6H,YAA7H,EAA2I,UAA3I,EAAuJ,sBAAvJ,EAA+K,sBAA/K,EAAuM,uBAAvM,EAAgOC,IAAhO,CAAqO,UAAUC,IAAV,EAAgB;AAChS,WAAOA,IAAI,IAAIP,KAAf;AACD,GAF4C,CAA7C,EAEI;AACFH,IAAAA,OAAO,CAAC,KAAD,EAAQ,2DAAR,CAAP;AACD;;AAED,SAAOK,sBAAP;AACD;AACD;AACA;AACA;AACA;;AAEA,OAAO,SAASM,mBAAT,CAA6BR,KAA7B,EAAoC;AACzC;AACA,SAAOS,MAAM,CAACC,IAAP,CAAYV,KAAZ,EAAmBW,MAAnB,CAA0B,UAAUC,IAAV,EAAgBC,GAAhB,EAAqB;AACpD,QAAIA,GAAG,CAACC,MAAJ,CAAW,CAAX,EAAc,CAAd,MAAqB,OAArB,IAAgCD,GAAG,CAACC,MAAJ,CAAW,CAAX,EAAc,CAAd,MAAqB,OAAzD,EAAkE;AAChEF,MAAAA,IAAI,CAACC,GAAD,CAAJ,GAAYb,KAAK,CAACa,GAAD,CAAjB;AACD;;AAED,WAAOD,IAAP;AACD,GANM,EAMJ,EANI,CAAP;AAOA;AACD","sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport warning from \"rc-util/es/warning\";\nexport var INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE';\nexport function getExpandableProps(props) {\n var expandable = props.expandable,\n legacyExpandableConfig = _objectWithoutProperties(props, [\"expandable\"]);\n\n if ('expandable' in props) {\n return _objectSpread(_objectSpread({}, legacyExpandableConfig), expandable);\n }\n\n if (process.env.NODE_ENV !== 'production' && ['indentSize', 'expandedRowKeys', 'defaultExpandedRowKeys', 'defaultExpandAllRows', 'expandedRowRender', 'expandRowByClick', 'expandIcon', 'onExpand', 'onExpandedRowsChange', 'expandedRowClassName', 'expandIconColumnIndex'].some(function (prop) {\n return prop in props;\n })) {\n warning(false, 'expanded related props have been moved into `expandable`.');\n }\n\n return legacyExpandableConfig;\n}\n/**\n * Returns only data- and aria- key/value pairs\n * @param {object} props\n */\n\nexport function getDataAndAriaProps(props) {\n /* eslint-disable no-param-reassign */\n return Object.keys(props).reduce(function (memo, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {\n memo[key] = props[key];\n }\n\n return memo;\n }, {});\n /* eslint-enable */\n}"]},"metadata":{},"sourceType":"module"}