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/Аришина)/Desktop/promo/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,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC1D,SAASC,YAAY,IAAIC,cAAc,QAAQ,eAAe;AAC9D,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAO,MAAMC,WAAW,GAAG,aAAaP,KAAK,CAACC,aAAa,CAAC;EAC1DO,UAAU,EAAE,OAAO;EACnBC,QAAQ,EAAE,KAAK;EACfC,OAAO,EAAEA,CAAA,KAAM,CAAC;AAClB,CAAC,CAAC;AACF,OAAO,MAAMC,kBAAkB,GAAG,aAAaX,KAAK,CAACC,aAAa,CAAC,IAAI,C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