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

1 line
4.4 KiB
JSON

{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nimport { convertDataToEntities } from \"rc-tree/es/utils/treeUtil\";\nimport warning from \"rc-util/es/warning\";\nimport { isNil } from \"../utils/valueUtil\";\nexport default (function (treeData, fieldNames) {\n return React.useMemo(function () {\n var collection = convertDataToEntities(treeData, {\n fieldNames: fieldNames,\n initWrapper: function initWrapper(wrapper) {\n return _objectSpread(_objectSpread({}, wrapper), {}, {\n valueEntities: new Map()\n });\n },\n processEntity: function processEntity(entity, wrapper) {\n var val = entity.node[fieldNames.value];\n\n // Check if exist same value\n if (process.env.NODE_ENV !== 'production') {\n var key = entity.node.key;\n warning(!isNil(val), 'TreeNode `value` is invalidate: undefined');\n warning(!wrapper.valueEntities.has(val), \"Same `value` exist in the tree: \".concat(val));\n warning(!key || String(key) === String(val), \"`key` or `value` with TreeNode must be the same or you can remove one of them. key: \".concat(key, \", value: \").concat(val, \".\"));\n }\n wrapper.valueEntities.set(val, entity);\n }\n });\n return collection;\n }, [treeData, fieldNames]);\n});","map":{"version":3,"names":["_objectSpread","React","convertDataToEntities","warning","isNil","treeData","fieldNames","useMemo","collection","initWrapper","wrapper","valueEntities","Map","processEntity","entity","val","node","value","process","env","NODE_ENV","key","has","concat","String","set"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-tree-select/es/hooks/useDataEntities.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nimport { convertDataToEntities } from \"rc-tree/es/utils/treeUtil\";\nimport warning from \"rc-util/es/warning\";\nimport { isNil } from \"../utils/valueUtil\";\nexport default (function (treeData, fieldNames) {\n return React.useMemo(function () {\n var collection = convertDataToEntities(treeData, {\n fieldNames: fieldNames,\n initWrapper: function initWrapper(wrapper) {\n return _objectSpread(_objectSpread({}, wrapper), {}, {\n valueEntities: new Map()\n });\n },\n processEntity: function processEntity(entity, wrapper) {\n var val = entity.node[fieldNames.value];\n\n // Check if exist same value\n if (process.env.NODE_ENV !== 'production') {\n var key = entity.node.key;\n warning(!isNil(val), 'TreeNode `value` is invalidate: undefined');\n warning(!wrapper.valueEntities.has(val), \"Same `value` exist in the tree: \".concat(val));\n warning(!key || String(key) === String(val), \"`key` or `value` with TreeNode must be the same or you can remove one of them. key: \".concat(key, \", value: \").concat(val, \".\"));\n }\n wrapper.valueEntities.set(val, entity);\n }\n });\n return collection;\n }, [treeData, fieldNames]);\n});"],"mappings":"AAAA,OAAOA,aAAa,MAAM,0CAA0C;AACpE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,QAAQ,2BAA2B;AACjE,OAAOC,OAAO,MAAM,oBAAoB;AACxC,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,gBAAgB,UAAUC,QAAQ,EAAEC,UAAU,EAAE;EAC9C,OAAOL,KAAK,CAACM,OAAO,CAAC,YAAY;IAC/B,IAAIC,UAAU,GAAGN,qBAAqB,CAACG,QAAQ,EAAE;MAC/CC,UAAU,EAAEA,UAAU;MACtBG,WAAW,EAAE,SAASA,WAAWA,CAACC,OAAO,EAAE;QACzC,OAAOV,aAAa,CAACA,aAAa,CAAC,CAAC,CAAC,EAAEU,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE;UACnDC,aAAa,EAAE,IAAIC,GAAG,CAAC;QACzB,CAAC,CAAC;MACJ,CAAC;MACDC,aAAa,EAAE,SAASA,aAAaA,CAACC,MAAM,EAAEJ,OAAO,EAAE;QACrD,IAAIK,GAAG,GAAGD,MAAM,CAACE,IAAI,CAACV,UAAU,CAACW,KAAK,CAAC;;QAEvC;QACA,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;UACzC,IAAIC,GAAG,GAAGP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