PromoCursed/node_modules/.cache/babel-loader/9a7d8ef7dc0bc2adf53a53cf7fc3f421b37c2c9ffd0ee375e1b4432cd1aeb612.json
2024-08-20 23:25:37 +04:00

1 line
2.3 KiB
JSON

{"ast":null,"code":"import * as React from 'react';\nimport { toPathOptions } from \"../utils/treeUtil\";\nexport default function useMissingValues(options, fieldNames) {\n return React.useCallback(function (rawValues) {\n var missingValues = [];\n var existsValues = [];\n rawValues.forEach(function (valueCell) {\n var pathOptions = toPathOptions(valueCell, options, fieldNames);\n if (pathOptions.every(function (opt) {\n return opt.option;\n })) {\n existsValues.push(valueCell);\n } else {\n missingValues.push(valueCell);\n }\n });\n return [existsValues, missingValues];\n }, [options, fieldNames]);\n}","map":{"version":3,"names":["React","toPathOptions","useMissingValues","options","fieldNames","useCallback","rawValues","missingValues","existsValues","forEach","valueCell","pathOptions","every","opt","option","push"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-cascader/es/hooks/useMissingValues.js"],"sourcesContent":["import * as React from 'react';\nimport { toPathOptions } from \"../utils/treeUtil\";\nexport default function useMissingValues(options, fieldNames) {\n return React.useCallback(function (rawValues) {\n var missingValues = [];\n var existsValues = [];\n rawValues.forEach(function (valueCell) {\n var pathOptions = toPathOptions(valueCell, options, fieldNames);\n if (pathOptions.every(function (opt) {\n return opt.option;\n })) {\n existsValues.push(valueCell);\n } else {\n missingValues.push(valueCell);\n }\n });\n return [existsValues, missingValues];\n }, [options, fieldNames]);\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,aAAa,QAAQ,mBAAmB;AACjD,eAAe,SAASC,gBAAgBA,CAACC,OAAO,EAAEC,UAAU,EAAE;EAC5D,OAAOJ,KAAK,CAACK,WAAW,CAAC,UAAUC,SAAS,EAAE;IAC5C,IAAIC,aAAa,GAAG,EAAE;IACtB,IAAIC,YAAY,GAAG,EAAE;IACrBF,SAAS,CAACG,OAAO,CAAC,UAAUC,SAAS,EAAE;MACrC,IAAIC,WAAW,GAAGV,aAAa,CAACS,SAAS,EAAEP,OAAO,EAAEC,UAAU,CAAC;MAC/D,IAAIO,WAAW,CAACC,KAAK,CAAC,UAAUC,GAAG,EAAE;QACnC,OAAOA,GAAG,CAACC,MAAM;MACnB,CAAC,CAAC,EAAE;QACFN,YAAY,CAACO,IAAI,CAACL,SAAS,CAAC;MAC9B,CAAC,MAAM;QACLH,aAAa,CAACQ,IAAI,CAACL,SAAS,CAAC;MAC/B;IACF,CAAC,CAAC;IACF,OAAO,CAACF,YAAY,EAAED,aAAa,CAAC;EACtC,CAAC,EAAE,CAACJ,OAAO,EAAEC,UAAU,CAAC,CAAC;AAC3B","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}