1 line
5.2 KiB
JSON
1 line
5.2 KiB
JSON
|
{"ast":null,"code":"var __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport { devUseWarning } from '../../_util/warning';\nfunction filter(items) {\n return items.filter(item => item);\n}\nexport default function useLegacyItems(items, children) {\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Tabs');\n warning.deprecated(!children, 'Tabs.TabPane', 'items');\n }\n if (items) {\n return items;\n }\n const childrenItems = toArray(children).map(node => {\n if ( /*#__PURE__*/React.isValidElement(node)) {\n const {\n key,\n props\n } = node;\n const _a = props || {},\n {\n tab\n } = _a,\n restProps = __rest(_a, [\"tab\"]);\n const item = Object.assign(Object.assign({\n key: String(key)\n }, restProps), {\n label: tab\n });\n return item;\n }\n return null;\n });\n return filter(childrenItems);\n}","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","toArray","devUseWarning","filter","items","item","useLegacyItems","children","process","env","NODE_ENV","warning","deprecated","childrenItems","map","node","isValidElement","key","props","_a","tab","restProps","assign","String","label"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/tabs/hooks/useLegacyItems.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport { devUseWarning } from '../../_util/warning';\nfunction filter(items) {\n return items.filter(item => item);\n}\nexport default function useLegacyItems(items, children) {\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Tabs');\n warning.deprecated(!children, 'Tabs.TabPane', 'items');\n }\n if (items) {\n return items;\n }\n const childrenItems = toArray(children).map(node => {\n if ( /*#__PURE__*/React.isValidElement(node)) {\n const {\n key,\n props\n } = node;\n const _a = props || {},\n {\n tab\n } = _a,\n restProps = __rest(_a, [\"tab\"]);\n const item = Object.assign(Object.assign({\n key: String(key)\n }, restProps), {\n label: tab\n });\n return item;\n }\n return null;\n });\n return filter(childrenItems);\n}"],"mappings":"AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAAO,CAACL,CAAC,CAACO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAIN,MAAM,CAACC,SAAS,CAACO,oBAAoB,CAACL,IAAI,CAACP,CAAC,EAAEG,CAAC,CAACO,CAAC,CAAC,CAAC,EAAER,CA
|