1 line
2.3 KiB
JSON
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/Аришина)/source/repos/PromoCursed/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":[]}
|