1 line
5.1 KiB
JSON
1 line
5.1 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 { matchScreen } from '../../_util/responsiveObserver';\n// Convert children into items\nconst transChildren2Items = childNodes => toArray(childNodes).map(node => Object.assign(Object.assign({}, node === null || node === void 0 ? void 0 : node.props), {\n key: node.key\n}));\nexport default function useItems(screens, items, children) {\n const mergedItems = React.useMemo(() =>\n // Take `items` first or convert `children` into items\n items || transChildren2Items(children), [items, children]);\n const responsiveItems = React.useMemo(() => mergedItems.map(_a => {\n var {\n span\n } = _a,\n restItem = __rest(_a, [\"span\"]);\n return Object.assign(Object.assign({}, restItem), {\n span: typeof span === 'number' ? span : matchScreen(screens, span)\n });\n }), [mergedItems, screens]);\n return responsiveItems;\n}","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","toArray","matchScreen","transChildren2Items","childNodes","map","node","assign","props","key","useItems","screens","items","children","mergedItems","useMemo","responsiveItems","_a","span","restItem"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/descriptions/hooks/useItems.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 { matchScreen } from '../../_util/responsiveObserver';\n// Convert children into items\nconst transChildren2Items = childNodes => toArray(childNodes).map(node => Object.assign(Object.assign({}, node === null || node === void 0 ? void 0 : node.props), {\n key: node.key\n}));\nexport default function useItems(screens, items, children) {\n const mergedItems = React.useMemo(() =>\n // Take `items` first or convert `children` into items\n items || transChildren2Items(children), [items, children]);\n const responsiveItems = React.useMemo(() => mergedItems.map(_a => {\n var {\n span\n } = _a,\n restItem = __rest(_a, [\"span\"]);\n return Object.assign(Object.assign({}, restItem), {\n span: typeof span === 'number' ? span : matchScreen(screens, span)\n });\n }), [mergedItems, screens]);\n return responsiveItems;\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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