1 line
5.5 KiB
JSON
1 line
5.5 KiB
JSON
|
{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport { createContext, useContext, useMemo } from 'react';\nimport { FormProvider as RcFormProvider } from 'rc-field-form';\nimport omit from \"rc-util/es/omit\";\nexport const FormContext = /*#__PURE__*/React.createContext({\n labelAlign: 'right',\n vertical: false,\n itemRef: () => {}\n});\nexport const NoStyleItemContext = /*#__PURE__*/React.createContext(null);\nexport const FormProvider = props => {\n const providerProps = omit(props, ['prefixCls']);\n return /*#__PURE__*/React.createElement(RcFormProvider, Object.assign({}, providerProps));\n};\nexport const FormItemPrefixContext = /*#__PURE__*/React.createContext({\n prefixCls: ''\n});\nexport const FormItemInputContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n FormItemInputContext.displayName = 'FormItemInputContext';\n}\nexport const NoFormStyle = _ref => {\n let {\n children,\n status,\n override\n } = _ref;\n const formItemInputContext = useContext(FormItemInputContext);\n const newFormItemInputContext = useMemo(() => {\n const newContext = Object.assign({}, formItemInputContext);\n if (override) {\n delete newContext.isFormItemInput;\n }\n if (status) {\n delete newContext.status;\n delete newContext.hasFeedback;\n delete newContext.feedbackIcon;\n }\n return newContext;\n }, [status, override, formItemInputContext]);\n return /*#__PURE__*/React.createElement(FormItemInputContext.Provider, {\n value: newFormItemInputContext\n }, children);\n};\nexport const VariantContext = /*#__PURE__*/createContext(undefined);","map":{"version":3,"names":["React","createContext","useContext","useMemo","FormProvider","RcFormProvider","omit","FormContext","labelAlign","vertical","itemRef","NoStyleItemContext","props","providerProps","createElement","Object","assign","FormItemPrefixContext","prefixCls","FormItemInputContext","process","env","NODE_ENV","displayName","NoFormStyle","_ref","children","status","override","formItemInputContext","newFormItemInputContext","newContext","isFormItemInput","hasFeedback","feedbackIcon","Provider","value","VariantContext","undefined"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/form/context.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport { createContext, useContext, useMemo } from 'react';\nimport { FormProvider as RcFormProvider } from 'rc-field-form';\nimport omit from \"rc-util/es/omit\";\nexport const FormContext = /*#__PURE__*/React.createContext({\n labelAlign: 'right',\n vertical: false,\n itemRef: () => {}\n});\nexport const NoStyleItemContext = /*#__PURE__*/React.createContext(null);\nexport const FormProvider = props => {\n const providerProps = omit(props, ['prefixCls']);\n return /*#__PURE__*/React.createElement(RcFormProvider, Object.assign({}, providerProps));\n};\nexport const FormItemPrefixContext = /*#__PURE__*/React.createContext({\n prefixCls: ''\n});\nexport const FormItemInputContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n FormItemInputContext.displayName = 'FormItemInputContext';\n}\nexport const NoFormStyle = _ref => {\n let {\n children,\n status,\n override\n } = _ref;\n const formItemInputContext = useContext(FormItemInputContext);\n const newFormItemInputContext = useMemo(() => {\n const newContext = Object.assign({}, formItemInputContext);\n if (override) {\n delete newContext.isFormItemInput;\n }\n if (status) {\n delete newContext.status;\n delete newContext.hasFeedback;\n delete newContext.feedbackIcon;\n }\n return newContext;\n }, [status, override, formItemInputContext]);\n return /*#__PURE__*/React.createElement(FormItemInputContext.Provider, {\n value: newFormItemInputContext\n }, children);\n};\nexport const VariantContext = /*#__PURE__*/createContext(undefined);"],"mappings":"AAAA,YAAY;;AAEZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,aAAa,EAAEC,
|