d9f72fbd59e858077c3361b21e619832.json
3.31 KB
{"ast":null,"code":"import * as React from 'react';\nimport { INTERNAL_COL_DEFINE } from './utils/legacyUtil';\n\nfunction ColGroup(_ref) {\n var colWidths = _ref.colWidths,\n columns = _ref.columns,\n columCount = _ref.columCount;\n var cols = [];\n var len = columCount || columns.length; // Only insert col with width & additional props\n // Skip if rest col do not have any useful info\n\n var mustInsert = false;\n\n for (var i = len - 1; i >= 0; i -= 1) {\n var width = colWidths[i];\n var column = columns && columns[i];\n var additionalProps = column && column[INTERNAL_COL_DEFINE];\n\n if (width || additionalProps || mustInsert) {\n cols.unshift(React.createElement(\"col\", Object.assign({\n key: i,\n style: {\n width: width,\n minWidth: width\n }\n }, additionalProps)));\n mustInsert = true;\n }\n }\n\n return React.createElement(\"colgroup\", null, cols);\n}\n\nexport default ColGroup;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-table/es/ColGroup.js"],"names":["React","INTERNAL_COL_DEFINE","ColGroup","_ref","colWidths","columns","columCount","cols","len","length","mustInsert","i","width","column","additionalProps","unshift","createElement","Object","assign","key","style","minWidth"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,mBAAT,QAAoC,oBAApC;;AAEA,SAASC,QAAT,CAAkBC,IAAlB,EAAwB;AACtB,MAAIC,SAAS,GAAGD,IAAI,CAACC,SAArB;AAAA,MACIC,OAAO,GAAGF,IAAI,CAACE,OADnB;AAAA,MAEIC,UAAU,GAAGH,IAAI,CAACG,UAFtB;AAGA,MAAIC,IAAI,GAAG,EAAX;AACA,MAAIC,GAAG,GAAGF,UAAU,IAAID,OAAO,CAACI,MAAhC,CALsB,CAKkB;AACxC;;AAEA,MAAIC,UAAU,GAAG,KAAjB;;AAEA,OAAK,IAAIC,CAAC,GAAGH,GAAG,GAAG,CAAnB,EAAsBG,CAAC,IAAI,CAA3B,EAA8BA,CAAC,IAAI,CAAnC,EAAsC;AACpC,QAAIC,KAAK,GAAGR,SAAS,CAACO,CAAD,CAArB;AACA,QAAIE,MAAM,GAAGR,OAAO,IAAIA,OAAO,CAACM,CAAD,CAA/B;AACA,QAAIG,eAAe,GAAGD,MAAM,IAAIA,MAAM,CAACZ,mBAAD,CAAtC;;AAEA,QAAIW,KAAK,IAAIE,eAAT,IAA4BJ,UAAhC,EAA4C;AAC1CH,MAAAA,IAAI,CAACQ,OAAL,CAAaf,KAAK,CAACgB,aAAN,CAAoB,KAApB,EAA2BC,MAAM,CAACC,MAAP,CAAc;AACpDC,QAAAA,GAAG,EAAER,CAD+C;AAEpDS,QAAAA,KAAK,EAAE;AACLR,UAAAA,KAAK,EAAEA,KADF;AAELS,UAAAA,QAAQ,EAAET;AAFL;AAF6C,OAAd,EAMrCE,eANqC,CAA3B,CAAb;AAOAJ,MAAAA,UAAU,GAAG,IAAb;AACD;AACF;;AAED,SAAOV,KAAK,CAACgB,aAAN,CAAoB,UAApB,EAAgC,IAAhC,EAAsCT,IAAtC,CAAP;AACD;;AAED,eAAeL,QAAf","sourcesContent":["import * as React from 'react';\nimport { INTERNAL_COL_DEFINE } from './utils/legacyUtil';\n\nfunction ColGroup(_ref) {\n var colWidths = _ref.colWidths,\n columns = _ref.columns,\n columCount = _ref.columCount;\n var cols = [];\n var len = columCount || columns.length; // Only insert col with width & additional props\n // Skip if rest col do not have any useful info\n\n var mustInsert = false;\n\n for (var i = len - 1; i >= 0; i -= 1) {\n var width = colWidths[i];\n var column = columns && columns[i];\n var additionalProps = column && column[INTERNAL_COL_DEFINE];\n\n if (width || additionalProps || mustInsert) {\n cols.unshift(React.createElement(\"col\", Object.assign({\n key: i,\n style: {\n width: width,\n minWidth: width\n }\n }, additionalProps)));\n mustInsert = true;\n }\n }\n\n return React.createElement(\"colgroup\", null, cols);\n}\n\nexport default ColGroup;"]},"metadata":{},"sourceType":"module"}