@tiny-codes/react-easy 1.2.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## 1.3.0
6
+
7
+ 2025-7-28
8
+
9
+ ### Features
10
+
11
+ - 🔥 Add `FormItemControl` component used to wrap custom content into a valid `Form.Item` control.
12
+
13
+ ## 1.2.3
14
+
15
+ 2025-7-22
16
+
17
+ ### Bug Fixes
18
+
19
+ #### ModalAction
20
+
21
+ - 🐞 the issue of `defaultProps.formProps` missing is fixed
22
+
5
23
  ## 1.2.2
6
24
 
7
25
  2025-7-22
@@ -9,7 +9,7 @@ var genStyle = function genStyle(token) {
9
9
  '&-trigger': {
10
10
  width: 'fit-content'
11
11
  },
12
- '&-menu': _defineProperty({
12
+ '.contexify&-menu': _defineProperty({
13
13
  padding: 0,
14
14
  '&-has-items': {
15
15
  padding: 'var(--contexify-menu-padding)'
@@ -1 +1 @@
1
- {"version":3,"names":["genStyleHooks","genStyle","token","componentCls","_defineProperty","width","padding","concat","kbd","fontFamily"],"sources":["../../../../src/components/ContextMenu/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-trigger': {\n width: 'fit-content',\n },\n '&-menu': {\n padding: 0,\n '&-has-items': {\n padding: 'var(--contexify-menu-padding)',\n },\n [`${componentCls}-shortcut-key`]: {\n kbd: {\n fontFamily: '-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,sans-serif',\n },\n },\n },\n },\n };\n};\n\nexport default genStyleHooks('ContextMenu' as never, genStyle);\n"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAOtD,IAAMC,QAA0C,GAAG,SAA7CA,QAA0CA,CAAIC,KAAK,EAAgB;EACvE,IAAQC,YAAY,GAAKD,KAAK,CAAtBC,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,EAAG;IACd,WAAW,EAAE;MACXE,KAAK,EAAE;IACT,CAAC;IACD,QAAQ,EAAAD,eAAA;MACNE,OAAO,EAAE,CAAC;MACV,aAAa,EAAE;QACbA,OAAO,EAAE;MACX;IAAC,MAAAC,MAAA,CACGJ,YAAY,oBAAkB;MAChCK,GAAG,EAAE;QACHC,UAAU,EAAE;MACd;IACF,CAAC;EAEL,CAAC;AAEL,CAAC;AAED,eAAeT,aAAa,CAAC,aAAa,EAAWC,QAAQ,CAAC"}
1
+ {"version":3,"names":["genStyleHooks","genStyle","token","componentCls","_defineProperty","width","padding","concat","kbd","fontFamily"],"sources":["../../../../src/components/ContextMenu/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-trigger': {\n width: 'fit-content',\n },\n '.contexify&-menu': {\n padding: 0,\n '&-has-items': {\n padding: 'var(--contexify-menu-padding)',\n },\n [`${componentCls}-shortcut-key`]: {\n kbd: {\n fontFamily: '-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,sans-serif',\n },\n },\n },\n },\n };\n};\n\nexport default genStyleHooks('ContextMenu' as never, genStyle);\n"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAOtD,IAAMC,QAA0C,GAAG,SAA7CA,QAA0CA,CAAIC,KAAK,EAAgB;EACvE,IAAQC,YAAY,GAAKD,KAAK,CAAtBC,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,EAAG;IACd,WAAW,EAAE;MACXE,KAAK,EAAE;IACT,CAAC;IACD,kBAAkB,EAAAD,eAAA;MAChBE,OAAO,EAAE,CAAC;MACV,aAAa,EAAE;QACbA,OAAO,EAAE;MACX;IAAC,MAAAC,MAAA,CACGJ,YAAY,oBAAkB;MAChCK,GAAG,EAAE;QACHC,UAAU,EAAE;MACd;IACF,CAAC;EAEL,CAAC;AAEL,CAAC;AAED,eAAeT,aAAa,CAAC,aAAa,EAAWC,QAAQ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { FC, ReactNode } from 'react';
2
+ export interface FormItemControlProps {
3
+ children: (options: {
4
+ value: any;
5
+ onChange?: (value: any) => void;
6
+ }) => ReactNode;
7
+ }
8
+ /**
9
+ * - **EN:** FormItemControl is a component that wraps custom content into a valid Form.Item control.
10
+ * It provides a value and an onChange function to the children, allowing them to interact with
11
+ * the form state. This is useful for creating custom form controls that need to integrate with
12
+ * Ant Design's Form.Item.
13
+ * - **CN:** FormItemControl 是一个将自定义内容包装成有效的 Form.Item 控件的组件。它向子组件提供了一个 `value` 和一个 `onChange`
14
+ * 函数,使得子组件能够与表单状态进行交互。 这对于创建需要与 Ant Design 的 `Form.Item` 集成的自定义表单控件非常有用。
15
+ */
16
+ declare const FormItemControl: FC<FormItemControlProps>;
17
+ export default FormItemControl;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * - **EN:** FormItemControl is a component that wraps custom content into a valid Form.Item control.
3
+ * It provides a value and an onChange function to the children, allowing them to interact with
4
+ * the form state. This is useful for creating custom form controls that need to integrate with
5
+ * Ant Design's Form.Item.
6
+ * - **CN:** FormItemControl 是一个将自定义内容包装成有效的 Form.Item 控件的组件。它向子组件提供了一个 `value` 和一个 `onChange`
7
+ * 函数,使得子组件能够与表单状态进行交互。 这对于创建需要与 Ant Design 的 `Form.Item` 集成的自定义表单控件非常有用。
8
+ */
9
+ var FormItemControl = function FormItemControl(props) {
10
+ // eslint-disable-next-line react/prop-types
11
+ var _ref = props,
12
+ children = _ref.children,
13
+ value = _ref.value,
14
+ onChange = _ref.onChange;
15
+ return children({
16
+ value: value,
17
+ onChange: onChange
18
+ });
19
+ };
20
+ export default FormItemControl;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FormItemControl","props","_ref","children","value","onChange"],"sources":["../../../src/components/FormItemControl/index.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\n\nexport interface FormItemControlProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n children: (options: { value: any; onChange?: (value: any) => void }) => ReactNode;\n}\n\n/**\n * - **EN:** FormItemControl is a component that wraps custom content into a valid Form.Item control.\n * It provides a value and an onChange function to the children, allowing them to interact with\n * the form state. This is useful for creating custom form controls that need to integrate with\n * Ant Design's Form.Item.\n * - **CN:** FormItemControl 是一个将自定义内容包装成有效的 Form.Item 控件的组件。它向子组件提供了一个 `value` 和一个 `onChange`\n * 函数,使得子组件能够与表单状态进行交互。 这对于创建需要与 Ant Design 的 `Form.Item` 集成的自定义表单控件非常有用。\n */\nconst FormItemControl: FC<FormItemControlProps> = (props) => {\n // eslint-disable-next-line react/prop-types\n const { children, value, onChange } = props as FormItemControlProps & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange?: (value: any) => void;\n };\n\n return children({ value, onChange });\n};\n\nexport default FormItemControl;\n"],"mappings":"AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,eAAyC,GAAG,SAA5CA,eAAyCA,CAAIC,KAAK,EAAK;EAC3D;EACA,IAAAC,IAAA,GAAsCD,KAAK;IAAnCE,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;EAOjC,OAAOF,QAAQ,CAAC;IAAEC,KAAK,EAALA,KAAK;IAAEC,QAAQ,EAARA;EAAS,CAAC,CAAC;AACtC,CAAC;AAED,eAAeL,eAAe"}
@@ -3,13 +3,15 @@ import type { SpinProps } from 'antd';
3
3
  export type LoadingProps = SpinProps & {
4
4
  /**
5
5
  * - **EN:** When used independently, the positioning method of the animation:
6
- * - **absolute** - Uses absolute positioning, and the animation will automatically center itself
7
- * within the parent container.
8
- * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container
9
- * and center itself.
6
+ *
7
+ * - **absolute** - Uses absolute positioning, and the animation will automatically center itself
8
+ * within the parent container.
9
+ * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container
10
+ * and center itself.
10
11
  * - **CN:** 独立使用时,动画的定位方式:
11
- * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。
12
- * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。
12
+ *
13
+ * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。
14
+ * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。
13
15
  *
14
16
  * @default `flex`
15
17
  */
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","ConfigProvider","Spin","classNames","useStyle","jsx","_jsx","Loading","props","prefixClsInProps","prefixCls","_props$mode","mode","rootClassName","rootStyle","children","_props$spinning","spinning","className","spinProps","_objectWithoutProperties","_excluded","_useContext","ConfigContext","getPrefixCls","_useStyle","_useStyle2","_slicedToArray","wrapCSSVar","hashId","cssVarCls","_objectSpread","concat","style"],"sources":["../../../src/components/Loading/index.tsx"],"sourcesContent":["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { ConfigProvider, Spin } from 'antd';\nimport classNames from 'classnames';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * - **EN:** When used independently, the positioning method of the animation:\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n * - **CN:** 独立使用时,动画的定位方式:\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * - **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n rootClassName?: string;\n /**\n * - **EN:** When used independently, set the style for the mask parent container of the animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n rootStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const {\n prefixCls: prefixClsInProps,\n mode = 'flex',\n rootClassName,\n rootStyle,\n children,\n spinning = true,\n className,\n ...spinProps\n } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-loading', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n rootClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={rootStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAsCA,UAAU,QAAQ,OAAO;AAE/D,SAASC,cAAc,EAAEC,IAAI,QAAQ,MAAM;AAC3C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ;AAAgB,SAAAC,GAAA,IAAAC,IAAA;AA6B/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,OAAyB,GAAG,SAA5BA,OAAyBA,CAAIC,KAAK,EAAK;EAC3C,IACaC,gBAAgB,GAQzBD,KAAK,CARPE,SAAS;IAAAC,WAAA,GAQPH,KAAK,CAPPI,IAAI;IAAJA,IAAI,GAAAD,WAAA,cAAG,MAAM,GAAAA,WAAA;IACbE,aAAa,GAMXL,KAAK,CANPK,aAAa;IACbC,SAAS,GAKPN,KAAK,CALPM,SAAS;IACTC,QAAQ,GAINP,KAAK,CAJPO,QAAQ;IAAAC,eAAA,GAINR,KAAK,CAHPS,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,IAAI,GAAAA,eAAA;IACfE,SAAS,GAEPV,KAAK,CAFPU,SAAS;IACNC,SAAS,GAAAC,wBAAA,CACVZ,KAAK,EAAAa,SAAA;EAET,IAAAC,WAAA,GAAyBtB,UAAU,CAACC,cAAc,CAACsB,aAAa,CAAC;IAAzDC,YAAY,GAAAF,WAAA,CAAZE,YAAY;EACpB,IAAMd,SAAS,GAAGc,YAAY,CAAC,cAAc,EAAEf,gBAAgB,CAAC;EAChE,IAAAgB,SAAA,GAAwCrB,QAAQ,CAACM,SAAS,CAAC;IAAAgB,UAAA,GAAAC,cAAA,CAAAF,SAAA;IAApDG,UAAU,GAAAF,UAAA;IAAEG,MAAM,GAAAH,UAAA;IAAEI,SAAS,GAAAJ,UAAA;EAEpC,OAAOX,QAAQ;EACX;EACA;EACAa,UAAU,eACRtB,IAAA,CAACJ,IAAI,EAAA6B,aAAA,CAAAA,aAAA;IAACb,SAAS,EAAEf,UAAU,CAAC0B,MAAM,EAAEC,SAAS,EAAEpB,SAAS,EAAEQ,SAAS,CAAE;IAACD,QAAQ,EAAEA;EAAS,GAAKE,SAAS;IAAAJ,QAAA,EACpGA;EAAQ,EACL,CACR,CAAC;EACD;EACA;EACAE,QAAQ,IACNW,UAAU,eACRtB,IAAA;IACEY,SAAS,EAAEf,UAAU,CACnB0B,MAAM,EACNC,SAAS,EACTpB,SAAS,EACTG,aAAa,EACbD,IAAI,KAAK,UAAU,MAAAoB,MAAA,CAAMtB,SAAS,oBAAAsB,MAAA,CAAiBtB,SAAS,UAC9D,CAAE;IACFuB,KAAK,EAAEnB,SAAU;IAAAC,QAAA,eAEjBT,IAAA,CAACJ,IAAI,EAAA6B,aAAA;MAACb,SAAS,EAAEA,SAAU;MAACD,QAAQ,EAAEA;IAAS,GAAKE,SAAS,CAAG;EAAC,CAC9D,CACP,CAAC;AACT,CAAC;AAED,eAAeZ,OAAO"}
1
+ {"version":3,"names":["useContext","ConfigProvider","Spin","classNames","useStyle","jsx","_jsx","Loading","props","prefixClsInProps","prefixCls","_props$mode","mode","rootClassName","rootStyle","children","_props$spinning","spinning","className","spinProps","_objectWithoutProperties","_excluded","_useContext","ConfigContext","getPrefixCls","_useStyle","_useStyle2","_slicedToArray","wrapCSSVar","hashId","cssVarCls","_objectSpread","concat","style"],"sources":["../../../src/components/Loading/index.tsx"],"sourcesContent":["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { ConfigProvider, Spin } from 'antd';\nimport classNames from 'classnames';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * - **EN:** When used independently, the positioning method of the animation:\n *\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n * - **CN:** 独立使用时,动画的定位方式:\n *\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * - **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n rootClassName?: string;\n /**\n * - **EN:** When used independently, set the style for the mask parent container of the animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n rootStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const {\n prefixCls: prefixClsInProps,\n mode = 'flex',\n rootClassName,\n rootStyle,\n children,\n spinning = true,\n className,\n ...spinProps\n } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-loading', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n rootClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={rootStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAsCA,UAAU,QAAQ,OAAO;AAE/D,SAASC,cAAc,EAAEC,IAAI,QAAQ,MAAM;AAC3C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ;AAAgB,SAAAC,GAAA,IAAAC,IAAA;AA+B/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,OAAyB,GAAG,SAA5BA,OAAyBA,CAAIC,KAAK,EAAK;EAC3C,IACaC,gBAAgB,GAQzBD,KAAK,CARPE,SAAS;IAAAC,WAAA,GAQPH,KAAK,CAPPI,IAAI;IAAJA,IAAI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,CAACJ,IAAI,EAAA6B,aAAA;MAACb,SAAS,EAAEA,SAAU;MAACD,QAAQ,EAAEA;IAAS,GAAKE,SAAS,CAAG;EAAC,CAC9D,CACP,CAAC;AACT,CAAC;AAED,eAAeZ,OAAO"}
@@ -182,7 +182,7 @@ export var genModalActionRenderer = function genModalActionRenderer(defaultProps
182
182
  disabled: isSaving
183
183
  }, cancelButtonProps),
184
184
  onOk: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
185
- var formData, _saveFuncRef$current, _triggerEventArgsRef$, _ref3, _triggerEventArgsRef$2, result;
185
+ var formData, _saveFuncRef$current, _triggerEventArgsRef$, result, _ref3, _triggerEventArgsRef$2;
186
186
  return _regeneratorRuntime().wrap(function _callee$(_context) {
187
187
  while (1) switch (_context.prev = _context.next) {
188
188
  case 0:
@@ -214,34 +214,39 @@ export var genModalActionRenderer = function genModalActionRenderer(defaultProps
214
214
  }
215
215
  throw new Error('SubmitWithoutClosing');
216
216
  case 17:
217
- _context.next = 19;
218
- return onOk === null || onOk === void 0 ? void 0 : onOk.apply(void 0, [(_ref3 = result) !== null && _ref3 !== void 0 ? _ref3 : formData].concat(_toConsumableArray((_triggerEventArgsRef$2 = triggerEventArgsRef.current) !== null && _triggerEventArgsRef$2 !== void 0 ? _triggerEventArgsRef$2 : [])));
219
- case 19:
217
+ if (!onOk) {
218
+ _context.next = 21;
219
+ break;
220
+ }
221
+ _context.next = 20;
222
+ return onOk.apply(void 0, [(_ref3 = result) !== null && _ref3 !== void 0 ? _ref3 : formData].concat(_toConsumableArray((_triggerEventArgsRef$2 = triggerEventArgsRef.current) !== null && _triggerEventArgsRef$2 !== void 0 ? _triggerEventArgsRef$2 : [])));
223
+ case 20:
220
224
  result = _context.sent;
225
+ case 21:
221
226
  if (!(result === SubmitWithoutClosingSymbol)) {
222
- _context.next = 22;
227
+ _context.next = 23;
223
228
  break;
224
229
  }
225
230
  throw new Error('SubmitWithoutClosing');
226
- case 22:
231
+ case 23:
227
232
  // If onOK is successful, close the dialog and trigger the afterOk event
228
233
  hideModal();
229
234
  afterOk === null || afterOk === void 0 || afterOk(result);
230
- _context.next = 29;
235
+ _context.next = 30;
231
236
  break;
232
- case 26:
233
- _context.prev = 26;
237
+ case 27:
238
+ _context.prev = 27;
234
239
  _context.t1 = _context["catch"](10);
235
240
  console.error(_context.t1);
236
- case 29:
237
- _context.prev = 29;
241
+ case 30:
242
+ _context.prev = 30;
238
243
  setIsSaving(false);
239
- return _context.finish(29);
240
- case 32:
244
+ return _context.finish(30);
245
+ case 33:
241
246
  case "end":
242
247
  return _context.stop();
243
248
  }
244
- }, _callee, null, [[0, 6], [10, 26, 29, 32]]);
249
+ }, _callee, null, [[0, 6], [10, 27, 30, 33]]);
245
250
  })),
246
251
  onCancel: ( /*#__PURE__*/function () {
247
252
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
@@ -289,6 +294,7 @@ function mergeProps(first, second) {
289
294
  bodyProps: _objectSpread(_objectSpread({}, first === null || first === void 0 ? void 0 : first.bodyProps), second === null || second === void 0 ? void 0 : second.bodyProps),
290
295
  maskProps: _objectSpread(_objectSpread({}, first === null || first === void 0 ? void 0 : first.maskProps), second === null || second === void 0 ? void 0 : second.maskProps),
291
296
  wrapProps: _objectSpread(_objectSpread({}, first === null || first === void 0 ? void 0 : first.wrapProps), second === null || second === void 0 ? void 0 : second.wrapProps),
297
+ formProps: _objectSpread(_objectSpread({}, first === null || first === void 0 ? void 0 : first.formProps), second === null || second === void 0 ? void 0 : second.formProps),
292
298
  triggerProps: _objectSpread(_objectSpread(_objectSpread({}, first === null || first === void 0 ? void 0 : first.triggerProps), second === null || second === void 0 ? void 0 : second.triggerProps), {}, {
293
299
  style: _objectSpread(_objectSpread({}, first !== null && first !== void 0 && first.triggerProps && 'style' in first.triggerProps && _typeof(first.triggerProps.style) === 'object' ? first.triggerProps.style : {}), second !== null && second !== void 0 && second.triggerProps && 'style' in second.triggerProps && _typeof(second.triggerProps.style) === 'object' ? second.triggerProps.style : {})
294
300
  })
@@ -429,17 +435,20 @@ ModalAction.SubmitWithoutClosing = SubmitWithoutClosingSymbol;
429
435
  * @param defaultProps Default properties of the dialog | 弹窗的默认属性
430
436
  */
431
437
  export function withModalAction(formComp, defaultProps) {
432
- var withDefaults = withDefaultModalActionProps(forwardedModalAction, function (props) {
438
+ var ForwardedModalAction = forwardedModalAction;
439
+ var WithDefaultProps = /*#__PURE__*/forwardRef(function (props, ref) {
433
440
  var useDefaultProps = typeof defaultProps === 'function' ? defaultProps : function () {
434
441
  return defaultProps;
435
442
  };
436
443
  var defaults = useDefaultProps(props);
437
444
  var mergedProps = typeof defaultProps === 'function' ? mergeProps(props, defaults) : mergeProps(defaults, props);
438
- return _objectSpread({
445
+ WithDefaultProps.displayName = 'ForwardRef(WithDefaultProps)';
446
+ return /*#__PURE__*/_jsx(ForwardedModalAction, _objectSpread({
447
+ ref: ref,
439
448
  formComp: formComp
440
- }, mergedProps);
449
+ }, mergedProps));
441
450
  });
442
- return addTriggers(withDefaults);
451
+ return addTriggers(WithDefaultProps);
443
452
  }
444
453
  export default ModalAction;
445
454
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","return","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","catch","_catch","delegateYield","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","iter","Array","from","isArray","_arrayLikeToArray","asyncGeneratorStep","gen","reject","_next","_throw","key","info","error","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","ownKeys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","_objectSpread","_defineProperty","getOwnPropertyDescriptors","defineProperties","obj","_toPropertyKey","_toPrimitive","String","toPrimitive","Number","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","minLen","toString","test","len","arr2","forwardRef","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","Button","Form","Modal","Switch","Typography","isForwardRef","useContextValidator","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SubmitWithoutClosingSymbol","genModalActionRenderer","defaultProps","ModalActionRenderer","props","ref","_children","_useState","_useState2","userModalProps","setUserModalProps","mergedProps","mergeProps","_mergedProps","formComp","formProps","_mergedProps$triggerC","triggerComponent","Trigger","_mergedProps$triggerE","triggerEvent","triggerProps","openInProps","open","_mergedProps$destroyO","destroyOnClose","_mergedProps$destroyO2","destroyOnHidden","_mergedProps$maskClos","maskClosable","okButtonProps","cancelButtonProps","onOk","afterOk","onCancel","afterClose","children","restProps","_excluded","FormComp","triggerEventArgsRef","_useState3","_useState4","setOpen","saveFuncRef","_useState5","_useState6","isSaving","setIsSaving","_useState7","_useState8","formCompRef","setFormCompRef","_useState9","_useState10","form","setForm","formRef","current","destroyOnCloseRef","openListenerRef","resetFields","showInProps","show","showTrigger","showModal","_openListenerRef$curr","hideModal","_openListenerRef$curr2","setOpenListener","listener","_openListenerRef$curr3","setOnSaveHandler","handler","handleSetOpen","_openListenerRef$curr4","_len","_key","confirmLoading","loading","disabled","_callee","formData","_saveFuncRef$current","_triggerEventArgsRef$","_ref3","_triggerEventArgsRef$2","result","_callee$","_context","validateFields","t0","console","warn","concat","t1","_ref4","_callee2","_callee2$","_context2","_x","FormCreator","onCreate","onOpenChange","onSave","triggerEventData","updateModalProps","first","second","bodyProps","maskProps","wrapProps","style","onCreateRef","_Form$useForm","useForm","_Form$useForm2","withDefaultModalActionProps","WrappedComponent","WithDefaultProps","useDefaultProps","defaults","renderModalAction","forwardedModalAction","addTriggers","comp","patchedComp","Link","whiteSpace","ModalAction","SubmitWithoutClosing","withModalAction","withDefaults"],"sources":["../../../src/components/ModalAction/index.tsx"],"sourcesContent":["import type { ComponentType, FC, ForwardedRef, ReactNode, RefAttributes } from 'react';\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';\nimport type { ButtonProps, FormInstance, ModalProps, SwitchProps } from 'antd';\nimport { Button, Form, Modal, Switch, Typography } from 'antd';\nimport type { LinkProps } from 'antd/es/typography/Link';\nimport { isForwardRef } from 'react-is';\nimport useContextValidator from '../../hooks/useContextValidator';\n\n/**\n * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when\n * returning in the `onSave` event of the editing form component\n * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效\n */\nexport const SubmitWithoutClosingSymbol = Symbol('[SubmitWithoutClose]');\n\nexport type ModalActionProps<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n> = Omit<ModalProps, 'onOk'> &\n ModalActionTrigger<FormData, P, TriggerProp, Event> & {\n /**\n * - **EN:** Form editing component, do not use the Form component inside the component, the form\n * component and form instance are automatically created by the parent component\n * - **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建\n */\n formComp: ComponentType<P & RefAttributes<Ref>>;\n /**\n * - **EN:** Props of the form editing component\n * - **CN:** 表单编辑组件的Props属性\n */\n formProps?: Omit<P, keyof FormCompPropsConstraint<FormData>>;\n /**\n * - **EN:** The callback when clicks the confirmation button, support asynchronous saving, return\n * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will\n * be passed to the `afterOk` event, if any\n * - **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话\n */\n onOk?: (\n formData: FormData,\n // @ts-expect-error: because TP[E] should be a function type\n ...args: Parameters<TriggerProp[Event]>\n ) => unknown | Promise<unknown>;\n /**\n * - **EN:** The callback after the confirmation event is completed, it will not be triggered when\n * it fails, the parameter is the return value of `onOk`\n * - **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n afterOk?: (data?: any) => void;\n };\n\nexport interface FormCompPropsConstraint<FormData> {\n /**\n * - **EN:** Automatically generated form instance, use this form instance in FormComp, do not\n * create a new instance\n * - **CN:** 自动生成的表单实例,编辑表单要使用这个表单实例,不要新创建实例\n */\n form: FormInstance<FormData>;\n /**\n * - **EN:** Register the form save event, the callback function passed in will be called when the\n * confirm button is clicked, support asynchronous saving\n * - **CN:** 注册表单保存事件,传入的回调函数会在点击确认按钮时被调用,支持异步保存\n *\n * @param handler Event handler | 事件处理函数\n */\n onSave: (\n handler: (\n /**\n * - **EN:** Form data\n * - **CN:** 表单数据\n */\n formData: FormData,\n /**\n * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get\n * the value of the switch; for the `Button` type trigger, you can get the click event\n * object of the button\n * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值;对于`Button`类型的触发器,可以获取按钮的点击事件对象\n */\n ...triggerEventData: any[]\n ) => unknown | Promise<unknown>\n ) => void;\n /**\n * - **EN:** Listen to the open and close status of the dialog. When `destroyOnHidden` is set to\n * false, the form component instance is cached, and the dialog can only be listened to in this\n * way\n * - **CN:** 监听弹框打开关闭状态。当`destroyOnHidden`设置为false时,表单组件实例被缓存,只能通过这种方式监听弹框\n *\n * @param handler Event handler | 事件处理函数\n */\n onOpenChange: (handler: ModalProps['afterOpenChange']) => void;\n /**\n * - **EN:** Set the dialog open status\n * - **CN:** 设置弹框打开状态\n *\n * @param open Whether is open or not | 弹窗是否打开\n */\n setOpen: (open: boolean) => void;\n /**\n * - **EN:** Modify the properties of the dialog, such as title, width, button properties, etc.\n * - **CN:** 修改弹窗的属性,例如标题、宽度,按钮属性等\n */\n updateModalProps: (props: Partial<ModalProps>) => void;\n /**\n * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get the\n * value of the switch; for the `Button` type trigger, you can get the click event object of the\n * button\n * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值,对于`Button`类型的触发器,可以获取按钮的点击事件对象\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n triggerEventData?: any[];\n}\n\nexport interface ModalActionTrigger<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n> {\n /**\n * - **EN:** Trigger component, click to show the dialog\n * - **CN:** 弹窗触发器组件,点击触发显示弹框\n */\n triggerComponent?: ComponentType<TriggerProp> | FC<TriggerProp>;\n /**\n * - **EN:** Props of the trigger component\n * - **CN:** 触发器组件的Props属性\n */\n triggerProps?: TriggerProp & {\n /**\n * - **EN:** Set a custom function to determine whether to show the trigger button\n * - **CN:** 设置一个自定义函数,用于判断是否显示触发器按钮\n *\n * @default true\n *\n * @param formProps Form component props | 表单组件的props\n */\n show?: boolean | ((formProps?: Omit<P, keyof FormCompPropsConstraint<FormData>>) => boolean);\n };\n /**\n * - **EN:** The event name that triggers the dialog\n * - **CN:** 触发弹窗的事件名称\n * - `Button`: 'onClick'\n * - `Switch`: 'onChange'\n * - `Link`: 'onClick'\n */\n triggerEvent?: Event;\n /**\n * - **EN:** Custom trigger content\n * - **CN:** 自定义触发器内容\n */\n children?: ReactNode;\n}\nexport type ModalActionRef<R> = R & {\n /**\n * - **EN:** Show the dialog\n * - **CN:** 显示弹框\n */\n show: () => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const genModalActionRenderer = (defaultProps: Partial<ModalActionProps<any, any, any, never, never>>) => {\n const ModalActionRenderer = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n >(\n props: ModalActionProps<FormData, P, TriggerProp, Event, Ref>,\n ref: ForwardedRef<ModalActionRef<Ref>>\n ) => {\n const [userModalProps, setUserModalProps] = useState<Partial<ModalProps>>({});\n let mergedProps = mergeProps<FormData, P, TriggerProp, Event, Ref>(defaultProps, props);\n mergedProps = mergeProps(mergedProps, userModalProps as typeof props);\n const {\n formComp,\n formProps,\n triggerComponent: Trigger = Button,\n triggerEvent = 'onClick' as Event,\n triggerProps,\n open: openInProps,\n destroyOnClose = true,\n destroyOnHidden = true,\n maskClosable = false,\n okButtonProps,\n cancelButtonProps,\n onOk,\n afterOk,\n onCancel,\n afterClose,\n children,\n ...restProps\n } = mergedProps;\n useContextValidator();\n const FormComp = formComp as ComponentType<FormCompPropsConstraint<FormData> & RefAttributes<Ref>>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const triggerEventArgsRef = useRef<any[]>(undefined);\n const [open, setOpen] = useState(false);\n const saveFuncRef = useRef<(formData: FormData, ...args: any[]) => unknown>(undefined);\n const [isSaving, setIsSaving] = useState(false);\n const [formCompRef, setFormCompRef] = useState<Ref | null>(null);\n const [form, setForm] = useState<FormInstance<FormData>>();\n const formRef = useRef<FormInstance<FormData>>(form);\n formRef.current = form;\n const destroyOnCloseRef = useRef(destroyOnClose);\n destroyOnCloseRef.current = destroyOnClose || destroyOnHidden;\n const openListenerRef = useRef<ModalProps['afterOpenChange']>(undefined);\n\n // Listen to the open props changes\n useEffect(() => {\n if (openInProps) {\n setOpen(openInProps);\n }\n }, [openInProps]);\n\n // Reset the form after closed\n useEffect(() => {\n if (!destroyOnCloseRef.current && open && formRef.current) {\n formRef.current.resetFields();\n }\n }, [open]);\n\n // show trigger\n const showInProps = triggerProps?.show;\n const showTrigger = useMemo(() => {\n if (typeof showInProps === 'boolean') {\n return showInProps;\n } else if (typeof showInProps === 'function') {\n return showInProps(formProps);\n }\n return true;\n }, [showInProps, formProps]);\n\n // Show the dialog\n const showModal = useCallback(() => {\n setOpen(true);\n openListenerRef.current?.(true);\n }, []);\n // Hide the dialog\n const hideModal = useCallback(() => {\n setOpen(false);\n openListenerRef.current?.(false);\n }, []);\n // Set the dialog status listener\n const setOpenListener = useCallback(\n (listener: ModalProps['afterOpenChange']) => {\n openListenerRef.current = listener;\n // Call once when initialized\n openListenerRef.current?.(open);\n },\n [open]\n );\n // Receive the onSave callback method passed by the form component\n const setOnSaveHandler: FormCompPropsConstraint<FormData>['onSave'] = useCallback((handler) => {\n saveFuncRef.current = handler;\n }, []);\n // Set the dialog status and trigger the onOpenChange event of the form component\n const handleSetOpen = useCallback((open: boolean) => {\n setOpen(open);\n openListenerRef.current?.(open);\n }, []);\n\n // Output ref\n useImperativeHandle(ref, () => ({ ...formCompRef, show: showModal }) as ModalActionRef<Ref>, [\n formCompRef,\n showModal,\n ]);\n\n // Render the trigger component\n return (\n <>\n {showTrigger && (\n <Trigger\n {...triggerProps}\n // Trigger event\n {...((triggerEvent\n ? {\n [triggerEvent]: (...args: any[]) => {\n triggerEventArgsRef.current = args;\n showModal();\n if (triggerProps && typeof triggerProps[triggerEvent] === 'function') {\n (triggerProps[triggerEvent] as (...args: any[]) => void)(...args);\n }\n },\n }\n : {}) as TriggerProp)}\n >\n {(triggerProps as { children?: ReactNode }).children ?? children}\n </Trigger>\n )}\n <Modal\n open={open}\n confirmLoading={isSaving}\n destroyOnClose={destroyOnClose}\n destroyOnHidden={destroyOnHidden}\n maskClosable={maskClosable}\n okButtonProps={{\n loading: isSaving,\n ...okButtonProps,\n }}\n cancelButtonProps={{\n disabled: isSaving,\n ...cancelButtonProps,\n }}\n onOk={async () => {\n let formData: FormData;\n try {\n formData = (await form?.validateFields()) as FormData;\n } catch (e) {\n // Validation error, should not throw error\n return;\n }\n if (Object.keys(formData).length === 0) {\n console.warn(\n 'form.getFieldsValue() is empty. Please use the form instance passed to formComp instead of creating the form instance yourself.'\n );\n }\n try {\n setIsSaving(true);\n // First call onSave of the form component\n let result = await saveFuncRef.current?.(formData, ...(triggerEventArgsRef.current ?? []));\n // The onSave of the form component has the ability to prevent the dialog from closing\n if (result === SubmitWithoutClosingSymbol) {\n throw new Error('SubmitWithoutClosing');\n }\n // Then call onOk of the dialog, support asynchronous, and will pass the return value of onSave, if any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result = await onOk?.((result as FormData) ?? formData, ...((triggerEventArgsRef.current ?? []) as any));\n // onOk also has the ability to prevent the dialog from closing\n if (result === SubmitWithoutClosingSymbol) {\n throw new Error('SubmitWithoutClosing');\n }\n // If onOK is successful, close the dialog and trigger the afterOk event\n hideModal();\n afterOk?.(result);\n } catch (error) {\n console.error(error);\n } finally {\n setIsSaving(false);\n }\n }}\n onCancel={async (e) => {\n hideModal();\n onCancel?.(e);\n }}\n afterClose={() => {\n hideModal();\n afterClose?.();\n }}\n {...restProps}\n >\n <FormCreator<FormData> onCreate={setForm} />\n {form && (\n <FormComp\n ref={isForwardRef(FormComp) ? setFormCompRef : undefined}\n {...formProps}\n form={form}\n onOpenChange={setOpenListener}\n onSave={setOnSaveHandler}\n triggerEventData={triggerEventArgsRef.current}\n setOpen={handleSetOpen}\n updateModalProps={setUserModalProps}\n />\n )}\n </Modal>\n </>\n );\n };\n return ModalActionRenderer;\n};\n\nfunction mergeProps<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n first?: Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>,\n second?: Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>\n) {\n return {\n ...first,\n ...second,\n okButtonProps: {\n ...first?.okButtonProps,\n ...second?.okButtonProps,\n },\n cancelButtonProps: {\n ...first?.cancelButtonProps,\n ...second?.cancelButtonProps,\n },\n bodyProps: {\n ...first?.bodyProps,\n ...second?.bodyProps,\n },\n maskProps: {\n ...first?.maskProps,\n ...second?.maskProps,\n },\n wrapProps: {\n ...first?.wrapProps,\n ...second?.wrapProps,\n },\n triggerProps: {\n ...first?.triggerProps,\n ...second?.triggerProps,\n style: {\n ...(first?.triggerProps && 'style' in first.triggerProps && typeof first.triggerProps.style === 'object'\n ? first.triggerProps.style\n : {}),\n ...(second?.triggerProps && 'style' in second.triggerProps && typeof second.triggerProps.style === 'object'\n ? second.triggerProps.style\n : {}),\n },\n },\n } as unknown as ModalActionProps<FormData, P, TriggerProp, Event, Ref>;\n}\n\nfunction FormCreator<FD extends object>(props: { onCreate: (form: FormInstance<FD> | undefined) => void }) {\n const { onCreate } = props;\n const onCreateRef = useRef(onCreate);\n onCreateRef.current = onCreate;\n const [form] = Form.useForm<FD>();\n\n // output ref\n useEffect(() => {\n onCreateRef.current(form);\n return () => {\n onCreateRef.current(undefined);\n };\n }, [form]);\n\n return null;\n}\n\n/**\n * - **EN:** Add default properties to the ModalAction component\n * - **CN:** 给ModalAction组件添加默认属性\n *\n * @param WrappedComponent ModalAction component | ModalAction组件\n * @param defaultProps Default properties | 默认属性\n */\nexport const withDefaultModalActionProps = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n WrappedComponent: ComponentType<\n ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>\n >,\n defaultProps?:\n | Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>\n | ((\n actualProps: ModalActionProps<FormData, P, TriggerProp, Event, Ref>\n ) => Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>)\n) => {\n const WithDefaultProps = forwardRef<ModalActionRef<Ref>, ModalActionProps<FormData, P, TriggerProp, Event, Ref>>(\n (props, ref) => {\n const useDefaultProps = typeof defaultProps === 'function' ? defaultProps : () => defaultProps;\n const defaults = useDefaultProps(props);\n const mergedProps =\n typeof defaultProps === 'function' ? mergeProps(props, defaults) : mergeProps(defaults, props);\n WithDefaultProps.displayName = 'ForwardRef(WithDefaultProps)';\n return <WrappedComponent ref={ref} {...mergedProps} />;\n }\n );\n return WithDefaultProps;\n};\n\nconst renderModalAction = genModalActionRenderer({});\nconst forwardedModalAction = forwardRef(renderModalAction);\nforwardedModalAction.displayName = 'ForwardRef(ModalAction)';\n/**\n * - **EN:** ModalAction component type\n * - **CN:** ModalAction组件的类型\n */\nexport type ModalActionInterface<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n> = ComponentType<ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>>;\n/**\n * - **EN:** ModalAction component with generic type\n * - **CN:** ModalAction泛型组件的类型\n */\nexport type GenericModalActionInterface = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n props: ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>\n) => ReactNode;\n/**\n * - **EN:** ModalAction with specified trigger type (specified form component)\n * - **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)\n */\ntype ModalActionWithTrigger<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n OMIT extends string = never,\n> = ComponentType<\n Omit<ModalActionProps<FormData, P, TriggerProp, Event, Ref>, 'triggerComponent' | 'triggerEvent' | OMIT> &\n RefAttributes<ModalActionRef<Ref>>\n>;\n\n/**\n * - **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)\n * - **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)\n */\ntype GenericModalActionWithTrigger<TP extends object, E extends keyof TP, OMIT extends string = never> = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n>(\n props: Omit<ModalActionProps<FormData, P, TP, E, Ref>, 'triggerComponent' | 'triggerEvent' | OMIT> &\n RefAttributes<ModalActionRef<Ref>>\n) => ReactNode;\n\n/**\n * - **EN:** Built-in trigger types (specified form components)\n * - **CN:** 内置的几种触发器类型(已指定表单组件)\n */\ninterface TypedTriggers<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n OMIT extends string = never,\n> {\n /**\n * - **EN:** Dialog with button type trigger\n * - **CN:** 按钮类型的弹窗\n */\n Button: ModalActionWithTrigger<FormData, P, ButtonProps, 'onClick', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with switch type trigger\n * - **CN:** 开关类型的弹窗\n */\n Switch: ModalActionWithTrigger<FormData, P, SwitchProps, 'onChange', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with link type trigger\n * - **CN:** 链接类型的弹窗\n */\n Link: ModalActionWithTrigger<FormData, P, LinkProps, 'onClick', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n}\n/**\n * - **EN:** Built-in trigger types (generic types, unspecified form components)\n * - **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)\n */\ninterface GenericTypedTriggers<OMIT extends string = never> {\n /**\n * - **EN:** Dialog with button type trigger\n * - **CN:** 按钮类型的弹窗\n */\n Button: GenericModalActionWithTrigger<ButtonProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with switch type trigger\n * - **CN:** 开关类型的弹窗\n */\n Switch: GenericModalActionWithTrigger<SwitchProps, 'onChange', 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with link type trigger\n * - **CN:** 链接类型的弹窗\n */\n Link: GenericModalActionWithTrigger<LinkProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;\n}\ntype WithGenericTriggers<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n OMIT extends string = never,\n> = (<TriggerProp extends object, Event extends keyof TriggerProp>(\n props: Omit<ModalActionProps<FormData, P, TriggerProp, Event, Ref>, OMIT> & RefAttributes<ModalActionRef<Ref>>\n) => ReactNode) &\n (P extends never ? GenericTypedTriggers<OMIT> : TypedTriggers<FormData, P, Ref, OMIT>);\n\n/**\n * - **EN:** Add trigger types to the ModalAction component\n * - **CN:** 给ModalAction组件添加子触发器类型\n */\nconst addTriggers = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n OuterTriggerProp extends object,\n OuterEvent extends keyof OuterTriggerProp,\n Ref extends object,\n OMIT extends string = never,\n>(\n comp: ComponentType<\n ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref> & RefAttributes<ModalActionRef<Ref>>\n >\n) => {\n const patchedComp = comp as WithGenericTriggers<FormData, P, Ref, OMIT>;\n // Type of button trigger\n patchedComp.Button = withDefaultModalActionProps(\n comp as ModalActionInterface<FormData, P, ButtonProps, 'onClick', Ref>,\n {\n triggerComponent: Button,\n triggerEvent: 'onClick',\n triggerProps: {},\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // Type of switch trigger\n patchedComp.Switch = withDefaultModalActionProps(\n comp as ModalActionInterface<FormData, P, SwitchProps, 'onChange', Ref>,\n {\n triggerComponent: Switch,\n triggerEvent: 'onChange',\n triggerProps: {},\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // Type of link trigger\n patchedComp.Link = withDefaultModalActionProps(comp as ModalActionInterface<FormData, P, LinkProps, 'onClick', Ref>, {\n triggerComponent: Typography.Link,\n triggerEvent: 'onClick',\n triggerProps: {\n style: { whiteSpace: 'nowrap' },\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) as any;\n return patchedComp;\n};\n\n/**\n * - **EN:** Dialog component with trigger\n * - **CN:** 带触发器的弹窗组件\n */\nconst ModalAction = addTriggers(forwardedModalAction);\n\n/**\n * - **EN:** Dialog component with trigger\n * - **CN:** 带触发器的弹窗组件\n */\nexport type ModalActionWithStatic = typeof ModalAction & {\n /**\n * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when\n * returning in the `onSave` event of the editing form component\n * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效\n */\n SubmitWithoutClosing: symbol;\n};\n(ModalAction as ModalActionWithStatic).SubmitWithoutClosing = SubmitWithoutClosingSymbol;\n\n/**\n * - **EN:** Generate a dialog component based on the editing form component\n * - **CN:** 基于编辑表单组件生成一个弹框组件\n *\n * @template FormData Form data type | 表单数据类型\n * @template P Form component props type | 表单组件的props类型\n * @template OuterTriggerProp Outer trigger props type | 外部触发器的props类型\n * @template OuterEvent Outer trigger event type | 外部触发器的事件类型\n * @template Ref Form component ref type | 表单组件的ref类型\n *\n * @param formComp Component of dialog content | 弹窗内容组件\n * @param defaultProps Default properties of the dialog | 弹窗的默认属性\n */\nexport function withModalAction<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n OuterTriggerProp extends object,\n OuterEvent extends keyof OuterTriggerProp,\n Ref extends object,\n>(\n formComp: ComponentType<P & FormCompPropsConstraint<FormData> & RefAttributes<Ref>>,\n defaultProps?:\n | Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>\n | ((\n actualProps: ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>\n ) => Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>)\n) {\n const withDefaults = withDefaultModalActionProps(\n forwardedModalAction as unknown as ModalActionInterface<FormData, P, OuterTriggerProp, OuterEvent, Ref>,\n (props) => {\n const useDefaultProps = typeof defaultProps === 'function' ? defaultProps : () => defaultProps;\n const defaults = useDefaultProps(props);\n const mergedProps =\n typeof defaultProps === 'function' ? mergeProps(props, defaults) : mergeProps(defaults, props);\n return {\n formComp,\n ...(mergedProps as Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>),\n };\n }\n ) as unknown as <TP extends object, E extends keyof TP>(\n props: Omit<ModalActionProps<FormData, P, TP, E, Ref>, 'formComp'> & RefAttributes<ModalActionRef<Ref>>\n ) => ReactNode;\n return addTriggers<FormData, P, OuterTriggerProp, OuterEvent, Ref, 'formComp'>(withDefaults);\n}\n\nexport default ModalAction as ModalActionWithStatic;\n"],"mappings":";;+CACA,qJAAAA,mBAAA,YAAAA,oBAAA,WAAAC,CAAA,SAAAC,CAAA,EAAAD,CAAA,OAAAE,CAAA,GAAAC,MAAA,CAAAC,SAAA,EAAAC,CAAA,GAAAH,CAAA,CAAAI,cAAA,EAAAC,CAAA,GAAAJ,MAAA,CAAAK,cAAA,cAAAP,CAAA,EAAAD,CAAA,EAAAE,CAAA,IAAAD,CAAA,CAAAD,CAAA,IAAAE,CAAA,CAAAO,KAAA,KAAAC,CAAA,wBAAAC,MAAA,GAAAA,MAAA,OAAAC,CAAA,GAAAF,CAAA,CAAAG,QAAA,kBAAAC,CAAA,GAAAJ,CAAA,CAAAK,aAAA,uBAAAC,CAAA,GAAAN,CAAA,CAAAO,WAAA,8BAAAC,OAAAjB,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAC,MAAA,CAAAK,cAAA,CAAAP,CAAA,EAAAD,CAAA,IAAAS,KAAA,EAAAP,CAAA,EAAAiB,UAAA,MAAAC,YAAA,MAAAC,QAAA,SAAApB,CAAA,CAAAD,CAAA,WAAAkB,MAAA,mBAAAjB,CAAA,IAAAiB,MAAA,YAAAA,OAAAjB,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAD,CAAA,CAAAD,CAAA,IAAAE,CAAA,gBAAAoB,KAAArB,CAAA,EAAAD,CAA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,OAAApD,aAAA;MACE8D,QAAQ,EAARA;IAAQ,GACJH,WAAW;EAEnB,CACF,CAEc;EACd,OAAOiH,WAAW,CAA6DQ,YAAY,CAAC;AAC9F;AAEA,eAAeH,WAAW"}
1
+ {"version":3,"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","return","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","catch","_catch","delegateYield","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","iter","Array","from","isArray","_arrayLikeToArray","asyncGeneratorStep","gen","reject","_next","_throw","key","info","error","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","ownKeys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","_objectSpread","_defineProperty","getOwnPropertyDescriptors","defineProperties","obj","_toPropertyKey","_toPrimitive","String","toPrimitive","Number","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","minLen","toString","test","len","arr2","forwardRef","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","Button","Form","Modal","Switch","Typography","isForwardRef","useContextValidator","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SubmitWithoutClosingSymbol","genModalActionRenderer","defaultProps","ModalActionRenderer","props","ref","_children","_useState","_useState2","userModalProps","setUserModalProps","mergedProps","mergeProps","_mergedProps","formComp","formProps","_mergedProps$triggerC","triggerComponent","Trigger","_mergedProps$triggerE","triggerEvent","triggerProps","openInProps","open","_mergedProps$destroyO","destroyOnClose","_mergedProps$destroyO2","destroyOnHidden","_mergedProps$maskClos","maskClosable","okButtonProps","cancelButtonProps","onOk","afterOk","onCancel","afterClose","children","restProps","_excluded","FormComp","triggerEventArgsRef","_useState3","_useState4","setOpen","saveFuncRef","_useState5","_useState6","isSaving","setIsSaving","_useState7","_useState8","formCompRef","setFormCompRef","_useState9","_useState10","form","setForm","formRef","current","destroyOnCloseRef","openListenerRef","resetFields","showInProps","show","showTrigger","showModal","_openListenerRef$curr","hideModal","_openListenerRef$curr2","setOpenListener","listener","_openListenerRef$curr3","setOnSaveHandler","handler","handleSetOpen","_openListenerRef$curr4","_len","_key","confirmLoading","loading","disabled","_callee","formData","_saveFuncRef$current","_triggerEventArgsRef$","result","_ref3","_triggerEventArgsRef$2","_callee$","_context","validateFields","t0","console","warn","concat","t1","_ref4","_callee2","_callee2$","_context2","_x","FormCreator","onCreate","onOpenChange","onSave","triggerEventData","updateModalProps","first","second","bodyProps","maskProps","wrapProps","style","onCreateRef","_Form$useForm","useForm","_Form$useForm2","withDefaultModalActionProps","WrappedComponent","WithDefaultProps","useDefaultProps","defaults","renderModalAction","forwardedModalAction","addTriggers","comp","patchedComp","Link","whiteSpace","ModalAction","SubmitWithoutClosing","withModalAction","ForwardedModalAction"],"sources":["../../../src/components/ModalAction/index.tsx"],"sourcesContent":["import type { ComponentType, FC, ForwardedRef, ReactNode, RefAttributes } from 'react';\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';\nimport type { ButtonProps, FormInstance, ModalProps, SwitchProps } from 'antd';\nimport { Button, Form, Modal, Switch, Typography } from 'antd';\nimport type { LinkProps } from 'antd/es/typography/Link';\nimport { isForwardRef } from 'react-is';\nimport useContextValidator from '../../hooks/useContextValidator';\n\n/**\n * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when\n * returning in the `onSave` event of the editing form component\n * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效\n */\nexport const SubmitWithoutClosingSymbol = Symbol('[SubmitWithoutClose]');\n\nexport type ModalActionProps<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n> = Omit<ModalProps, 'onOk'> &\n ModalActionTrigger<FormData, P, TriggerProp, Event> & {\n /**\n * - **EN:** Form editing component, do not use the Form component inside the component, the form\n * component and form instance are automatically created by the parent component\n * - **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建\n */\n formComp: ComponentType<P & RefAttributes<Ref>>;\n /**\n * - **EN:** Props of the form editing component\n * - **CN:** 表单编辑组件的Props属性\n */\n formProps?: Omit<P, keyof FormCompPropsConstraint<FormData>>;\n /**\n * - **EN:** The callback when clicks the confirmation button, support asynchronous saving, return\n * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will\n * be passed to the `afterOk` event, if any\n * - **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话\n */\n onOk?: (\n formData: FormData,\n // @ts-expect-error: because TP[E] should be a function type\n ...args: Parameters<TriggerProp[Event]>\n ) => unknown | Promise<unknown>;\n /**\n * - **EN:** The callback after the confirmation event is completed, it will not be triggered when\n * it fails, the parameter is the return value of `onOk`\n * - **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n afterOk?: (data?: any) => void;\n };\n\nexport interface FormCompPropsConstraint<FormData> {\n /**\n * - **EN:** Automatically generated form instance, use this form instance in FormComp, do not\n * create a new instance\n * - **CN:** 自动生成的表单实例,编辑表单要使用这个表单实例,不要新创建实例\n */\n form: FormInstance<FormData>;\n /**\n * - **EN:** Register the form save event, the callback function passed in will be called when the\n * confirm button is clicked, support asynchronous saving\n * - **CN:** 注册表单保存事件,传入的回调函数会在点击确认按钮时被调用,支持异步保存\n *\n * @param handler Event handler | 事件处理函数\n */\n onSave: (\n handler: (\n /**\n * - **EN:** Form data\n * - **CN:** 表单数据\n */\n formData: FormData,\n /**\n * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get\n * the value of the switch; for the `Button` type trigger, you can get the click event\n * object of the button\n * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值;对于`Button`类型的触发器,可以获取按钮的点击事件对象\n */\n ...triggerEventData: any[]\n ) => unknown | Promise<unknown>\n ) => void;\n /**\n * - **EN:** Listen to the open and close status of the dialog. When `destroyOnHidden` is set to\n * false, the form component instance is cached, and the dialog can only be listened to in this\n * way\n * - **CN:** 监听弹框打开关闭状态。当`destroyOnHidden`设置为false时,表单组件实例被缓存,只能通过这种方式监听弹框\n *\n * @param handler Event handler | 事件处理函数\n */\n onOpenChange: (handler: ModalProps['afterOpenChange']) => void;\n /**\n * - **EN:** Set the dialog open status\n * - **CN:** 设置弹框打开状态\n *\n * @param open Whether is open or not | 弹窗是否打开\n */\n setOpen: (open: boolean) => void;\n /**\n * - **EN:** Modify the properties of the dialog, such as title, width, button properties, etc.\n * - **CN:** 修改弹窗的属性,例如标题、宽度,按钮属性等\n */\n updateModalProps: (props: Partial<ModalProps>) => void;\n /**\n * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get the\n * value of the switch; for the `Button` type trigger, you can get the click event object of the\n * button\n * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值,对于`Button`类型的触发器,可以获取按钮的点击事件对象\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n triggerEventData?: any[];\n}\n\nexport interface ModalActionTrigger<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n> {\n /**\n * - **EN:** Trigger component, click to show the dialog\n * - **CN:** 弹窗触发器组件,点击触发显示弹框\n */\n triggerComponent?: ComponentType<TriggerProp> | FC<TriggerProp>;\n /**\n * - **EN:** Props of the trigger component\n * - **CN:** 触发器组件的Props属性\n */\n triggerProps?: TriggerProp & {\n /**\n * - **EN:** Set a custom function to determine whether to show the trigger button\n * - **CN:** 设置一个自定义函数,用于判断是否显示触发器按钮\n *\n * @default true\n *\n * @param formProps Form component props | 表单组件的props\n */\n show?: boolean | ((formProps?: Omit<P, keyof FormCompPropsConstraint<FormData>>) => boolean);\n };\n /**\n * - **EN:** The event name that triggers the dialog\n * - **CN:** 触发弹窗的事件名称\n * - `Button`: 'onClick'\n * - `Switch`: 'onChange'\n * - `Link`: 'onClick'\n */\n triggerEvent?: Event;\n /**\n * - **EN:** Custom trigger content\n * - **CN:** 自定义触发器内容\n */\n children?: ReactNode;\n}\nexport type ModalActionRef<R> = R & {\n /**\n * - **EN:** Show the dialog\n * - **CN:** 显示弹框\n */\n show: () => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const genModalActionRenderer = (defaultProps: Partial<ModalActionProps<any, any, any, never, never>>) => {\n const ModalActionRenderer = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n >(\n props: ModalActionProps<FormData, P, TriggerProp, Event, Ref>,\n ref: ForwardedRef<ModalActionRef<Ref>>\n ) => {\n const [userModalProps, setUserModalProps] = useState<Partial<ModalProps>>({});\n let mergedProps = mergeProps<FormData, P, TriggerProp, Event, Ref>(defaultProps, props);\n mergedProps = mergeProps(mergedProps, userModalProps as typeof props);\n const {\n formComp,\n formProps,\n triggerComponent: Trigger = Button,\n triggerEvent = 'onClick' as Event,\n triggerProps,\n open: openInProps,\n destroyOnClose = true,\n destroyOnHidden = true,\n maskClosable = false,\n okButtonProps,\n cancelButtonProps,\n onOk,\n afterOk,\n onCancel,\n afterClose,\n children,\n ...restProps\n } = mergedProps;\n useContextValidator();\n const FormComp = formComp as ComponentType<FormCompPropsConstraint<FormData> & RefAttributes<Ref>>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const triggerEventArgsRef = useRef<any[]>(undefined);\n const [open, setOpen] = useState(false);\n const saveFuncRef = useRef<(formData: FormData, ...args: any[]) => unknown>(undefined);\n const [isSaving, setIsSaving] = useState(false);\n const [formCompRef, setFormCompRef] = useState<Ref | null>(null);\n const [form, setForm] = useState<FormInstance<FormData>>();\n const formRef = useRef<FormInstance<FormData>>(form);\n formRef.current = form;\n const destroyOnCloseRef = useRef(destroyOnClose);\n destroyOnCloseRef.current = destroyOnClose || destroyOnHidden;\n const openListenerRef = useRef<ModalProps['afterOpenChange']>(undefined);\n\n // Listen to the open props changes\n useEffect(() => {\n if (openInProps) {\n setOpen(openInProps);\n }\n }, [openInProps]);\n\n // Reset the form after closed\n useEffect(() => {\n if (!destroyOnCloseRef.current && open && formRef.current) {\n formRef.current.resetFields();\n }\n }, [open]);\n\n // show trigger\n const showInProps = triggerProps?.show;\n const showTrigger = useMemo(() => {\n if (typeof showInProps === 'boolean') {\n return showInProps;\n } else if (typeof showInProps === 'function') {\n return showInProps(formProps);\n }\n return true;\n }, [showInProps, formProps]);\n\n // Show the dialog\n const showModal = useCallback(() => {\n setOpen(true);\n openListenerRef.current?.(true);\n }, []);\n // Hide the dialog\n const hideModal = useCallback(() => {\n setOpen(false);\n openListenerRef.current?.(false);\n }, []);\n // Set the dialog status listener\n const setOpenListener = useCallback(\n (listener: ModalProps['afterOpenChange']) => {\n openListenerRef.current = listener;\n // Call once when initialized\n openListenerRef.current?.(open);\n },\n [open]\n );\n // Receive the onSave callback method passed by the form component\n const setOnSaveHandler: FormCompPropsConstraint<FormData>['onSave'] = useCallback((handler) => {\n saveFuncRef.current = handler;\n }, []);\n // Set the dialog status and trigger the onOpenChange event of the form component\n const handleSetOpen = useCallback((open: boolean) => {\n setOpen(open);\n openListenerRef.current?.(open);\n }, []);\n\n // Output ref\n useImperativeHandle(ref, () => ({ ...formCompRef, show: showModal }) as ModalActionRef<Ref>, [\n formCompRef,\n showModal,\n ]);\n\n // Render the trigger component\n return (\n <>\n {showTrigger && (\n <Trigger\n {...triggerProps}\n // Trigger event\n {...((triggerEvent\n ? {\n [triggerEvent]: (...args: any[]) => {\n triggerEventArgsRef.current = args;\n showModal();\n if (triggerProps && typeof triggerProps[triggerEvent] === 'function') {\n (triggerProps[triggerEvent] as (...args: any[]) => void)(...args);\n }\n },\n }\n : {}) as TriggerProp)}\n >\n {(triggerProps as { children?: ReactNode }).children ?? children}\n </Trigger>\n )}\n <Modal\n open={open}\n confirmLoading={isSaving}\n destroyOnClose={destroyOnClose}\n destroyOnHidden={destroyOnHidden}\n maskClosable={maskClosable}\n okButtonProps={{\n loading: isSaving,\n ...okButtonProps,\n }}\n cancelButtonProps={{\n disabled: isSaving,\n ...cancelButtonProps,\n }}\n onOk={async () => {\n let formData: FormData;\n try {\n formData = (await form?.validateFields()) as FormData;\n } catch (e) {\n // Validation error, should not throw error\n return;\n }\n if (Object.keys(formData).length === 0) {\n console.warn(\n 'form.getFieldsValue() is empty. Please use the form instance passed to formComp instead of creating the form instance yourself.'\n );\n }\n try {\n setIsSaving(true);\n // First call onSave of the form component\n let result = await saveFuncRef.current?.(formData, ...(triggerEventArgsRef.current ?? []));\n // The onSave of the form component has the ability to prevent the dialog from closing\n if (result === SubmitWithoutClosingSymbol) {\n throw new Error('SubmitWithoutClosing');\n }\n // Then call onOk of the dialog, support asynchronous, and will pass the return value of onSave, if any\n if (onOk) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result = await onOk((result as FormData) ?? formData, ...((triggerEventArgsRef.current ?? []) as any));\n }\n // onOk also has the ability to prevent the dialog from closing\n if (result === SubmitWithoutClosingSymbol) {\n throw new Error('SubmitWithoutClosing');\n }\n // If onOK is successful, close the dialog and trigger the afterOk event\n hideModal();\n afterOk?.(result);\n } catch (error) {\n console.error(error);\n } finally {\n setIsSaving(false);\n }\n }}\n onCancel={async (e) => {\n hideModal();\n onCancel?.(e);\n }}\n afterClose={() => {\n hideModal();\n afterClose?.();\n }}\n {...restProps}\n >\n <FormCreator<FormData> onCreate={setForm} />\n {form && (\n <FormComp\n ref={isForwardRef(FormComp) ? setFormCompRef : undefined}\n {...formProps}\n form={form}\n onOpenChange={setOpenListener}\n onSave={setOnSaveHandler}\n triggerEventData={triggerEventArgsRef.current}\n setOpen={handleSetOpen}\n updateModalProps={setUserModalProps}\n />\n )}\n </Modal>\n </>\n );\n };\n return ModalActionRenderer;\n};\n\nfunction mergeProps<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n first?: Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>,\n second?: Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>\n) {\n return {\n ...first,\n ...second,\n okButtonProps: {\n ...first?.okButtonProps,\n ...second?.okButtonProps,\n },\n cancelButtonProps: {\n ...first?.cancelButtonProps,\n ...second?.cancelButtonProps,\n },\n bodyProps: {\n ...first?.bodyProps,\n ...second?.bodyProps,\n },\n maskProps: {\n ...first?.maskProps,\n ...second?.maskProps,\n },\n wrapProps: {\n ...first?.wrapProps,\n ...second?.wrapProps,\n },\n formProps: {\n ...first?.formProps,\n ...second?.formProps,\n },\n triggerProps: {\n ...first?.triggerProps,\n ...second?.triggerProps,\n style: {\n ...(first?.triggerProps && 'style' in first.triggerProps && typeof first.triggerProps.style === 'object'\n ? first.triggerProps.style\n : {}),\n ...(second?.triggerProps && 'style' in second.triggerProps && typeof second.triggerProps.style === 'object'\n ? second.triggerProps.style\n : {}),\n },\n },\n } as unknown as ModalActionProps<FormData, P, TriggerProp, Event, Ref>;\n}\n\nfunction FormCreator<FD extends object>(props: { onCreate: (form: FormInstance<FD> | undefined) => void }) {\n const { onCreate } = props;\n const onCreateRef = useRef(onCreate);\n onCreateRef.current = onCreate;\n const [form] = Form.useForm<FD>();\n\n // output ref\n useEffect(() => {\n onCreateRef.current(form);\n return () => {\n onCreateRef.current(undefined);\n };\n }, [form]);\n\n return null;\n}\n\n/**\n * - **EN:** Add default properties to the ModalAction component\n * - **CN:** 给ModalAction组件添加默认属性\n *\n * @param WrappedComponent ModalAction component | ModalAction组件\n * @param defaultProps Default properties | 默认属性\n */\nexport const withDefaultModalActionProps = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n WrappedComponent: ComponentType<\n ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>\n >,\n defaultProps?:\n | Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>\n | ((\n actualProps: ModalActionProps<FormData, P, TriggerProp, Event, Ref>\n ) => Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>)\n) => {\n const WithDefaultProps = forwardRef<ModalActionRef<Ref>, ModalActionProps<FormData, P, TriggerProp, Event, Ref>>(\n (props, ref) => {\n const useDefaultProps = typeof defaultProps === 'function' ? defaultProps : () => defaultProps;\n const defaults = useDefaultProps(props);\n const mergedProps =\n typeof defaultProps === 'function' ? mergeProps(props, defaults) : mergeProps(defaults, props);\n WithDefaultProps.displayName = 'ForwardRef(WithDefaultProps)';\n return <WrappedComponent ref={ref} {...mergedProps} />;\n }\n );\n return WithDefaultProps;\n};\n\nconst renderModalAction = genModalActionRenderer({});\nconst forwardedModalAction = forwardRef(renderModalAction);\nforwardedModalAction.displayName = 'ForwardRef(ModalAction)';\n/**\n * - **EN:** ModalAction component type\n * - **CN:** ModalAction组件的类型\n */\nexport type ModalActionInterface<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n> = ComponentType<ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>>;\n/**\n * - **EN:** ModalAction component with generic type\n * - **CN:** ModalAction泛型组件的类型\n */\nexport type GenericModalActionInterface = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n props: ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>\n) => ReactNode;\n/**\n * - **EN:** ModalAction with specified trigger type (specified form component)\n * - **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)\n */\ntype ModalActionWithTrigger<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n OMIT extends string = never,\n> = ComponentType<\n Omit<ModalActionProps<FormData, P, TriggerProp, Event, Ref>, 'triggerComponent' | 'triggerEvent' | OMIT> &\n RefAttributes<ModalActionRef<Ref>>\n>;\n\n/**\n * - **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)\n * - **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)\n */\ntype GenericModalActionWithTrigger<TP extends object, E extends keyof TP, OMIT extends string = never> = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n>(\n props: Omit<ModalActionProps<FormData, P, TP, E, Ref>, 'triggerComponent' | 'triggerEvent' | OMIT> &\n RefAttributes<ModalActionRef<Ref>>\n) => ReactNode;\n\n/**\n * - **EN:** Built-in trigger types (specified form components)\n * - **CN:** 内置的几种触发器类型(已指定表单组件)\n */\ninterface TypedTriggers<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n OMIT extends string = never,\n> {\n /**\n * - **EN:** Dialog with button type trigger\n * - **CN:** 按钮类型的弹窗\n */\n Button: ModalActionWithTrigger<FormData, P, ButtonProps, 'onClick', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with switch type trigger\n * - **CN:** 开关类型的弹窗\n */\n Switch: ModalActionWithTrigger<FormData, P, SwitchProps, 'onChange', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with link type trigger\n * - **CN:** 链接类型的弹窗\n */\n Link: ModalActionWithTrigger<FormData, P, LinkProps, 'onClick', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n}\n/**\n * - **EN:** Built-in trigger types (generic types, unspecified form components)\n * - **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)\n */\ninterface GenericTypedTriggers<OMIT extends string = never> {\n /**\n * - **EN:** Dialog with button type trigger\n * - **CN:** 按钮类型的弹窗\n */\n Button: GenericModalActionWithTrigger<ButtonProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with switch type trigger\n * - **CN:** 开关类型的弹窗\n */\n Switch: GenericModalActionWithTrigger<SwitchProps, 'onChange', 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with link type trigger\n * - **CN:** 链接类型的弹窗\n */\n Link: GenericModalActionWithTrigger<LinkProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;\n}\ntype WithGenericTriggers<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n OMIT extends string = never,\n> = (<TriggerProp extends object, Event extends keyof TriggerProp>(\n props: Omit<ModalActionProps<FormData, P, TriggerProp, Event, Ref>, OMIT> & RefAttributes<ModalActionRef<Ref>>\n) => ReactNode) &\n (P extends never ? GenericTypedTriggers<OMIT> : TypedTriggers<FormData, P, Ref, OMIT>);\n\n/**\n * - **EN:** Add trigger types to the ModalAction component\n * - **CN:** 给ModalAction组件添加子触发器类型\n */\nconst addTriggers = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n OuterTriggerProp extends object,\n OuterEvent extends keyof OuterTriggerProp,\n Ref extends object,\n OMIT extends string = never,\n>(\n comp: ComponentType<\n ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref> & RefAttributes<ModalActionRef<Ref>>\n >\n) => {\n const patchedComp = comp as WithGenericTriggers<FormData, P, Ref, OMIT>;\n // Type of button trigger\n patchedComp.Button = withDefaultModalActionProps(\n comp as ModalActionInterface<FormData, P, ButtonProps, 'onClick', Ref>,\n {\n triggerComponent: Button,\n triggerEvent: 'onClick',\n triggerProps: {},\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // Type of switch trigger\n patchedComp.Switch = withDefaultModalActionProps(\n comp as ModalActionInterface<FormData, P, SwitchProps, 'onChange', Ref>,\n {\n triggerComponent: Switch,\n triggerEvent: 'onChange',\n triggerProps: {},\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // Type of link trigger\n patchedComp.Link = withDefaultModalActionProps(comp as ModalActionInterface<FormData, P, LinkProps, 'onClick', Ref>, {\n triggerComponent: Typography.Link,\n triggerEvent: 'onClick',\n triggerProps: {\n style: { whiteSpace: 'nowrap' },\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) as any;\n return patchedComp;\n};\n\n/**\n * - **EN:** Dialog component with trigger\n * - **CN:** 带触发器的弹窗组件\n */\nconst ModalAction = addTriggers(forwardedModalAction);\n\n/**\n * - **EN:** Dialog component with trigger\n * - **CN:** 带触发器的弹窗组件\n */\nexport type ModalActionWithStatic = typeof ModalAction & {\n /**\n * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when\n * returning in the `onSave` event of the editing form component\n * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效\n */\n SubmitWithoutClosing: symbol;\n};\n(ModalAction as ModalActionWithStatic).SubmitWithoutClosing = SubmitWithoutClosingSymbol;\n\n/**\n * - **EN:** Generate a dialog component based on the editing form component\n * - **CN:** 基于编辑表单组件生成一个弹框组件\n *\n * @template FormData Form data type | 表单数据类型\n * @template P Form component props type | 表单组件的props类型\n * @template OuterTriggerProp Outer trigger props type | 外部触发器的props类型\n * @template OuterEvent Outer trigger event type | 外部触发器的事件类型\n * @template Ref Form component ref type | 表单组件的ref类型\n *\n * @param formComp Component of dialog content | 弹窗内容组件\n * @param defaultProps Default properties of the dialog | 弹窗的默认属性\n */\nexport function withModalAction<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n OuterTriggerProp extends object,\n OuterEvent extends keyof OuterTriggerProp,\n Ref extends object,\n>(\n formComp: ComponentType<P & FormCompPropsConstraint<FormData> & RefAttributes<Ref>>,\n defaultProps?:\n | Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>\n | ((\n actualProps: ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>\n ) => Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>)\n) {\n const ForwardedModalAction = forwardedModalAction as unknown as ModalActionInterface<\n FormData,\n P,\n OuterTriggerProp,\n OuterEvent,\n Ref\n >;\n const WithDefaultProps = forwardRef<\n ModalActionRef<Ref>,\n ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>\n >((props, ref) => {\n const useDefaultProps = typeof defaultProps === 'function' ? defaultProps : () => defaultProps;\n const defaults = useDefaultProps(props);\n const mergedProps = typeof defaultProps === 'function' ? mergeProps(props, defaults) : mergeProps(defaults, props);\n WithDefaultProps.displayName = 'ForwardRef(WithDefaultProps)';\n return (\n <ForwardedModalAction\n ref={ref}\n formComp={formComp}\n {...(mergedProps as Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>)}\n />\n );\n });\n return addTriggers<FormData, P, OuterTriggerProp, OuterEvent, Ref, 'formComp'>(WithDefaultProps);\n}\n\nexport default ModalAction as ModalActionWithStatic;\n"],"mappings":";;+CACA,qJAAAA,mBAAA,YAAAA,oBAAA,WAAAC,CAAA,SAAAC,CAAA,EAAAD,CAAA,OAAAE,CAAA,GAAAC,MAAA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ditableTextProps } from './EditableText';
16
16
  export { default as EditableText } from './EditableText';
17
17
  export type { FloatDrawerProps } from './FloatDrawer';
18
18
  export { default as FloatDrawer } from './FloatDrawer';
19
+ export type { FormItemControlProps } from './FormItemControl';
20
+ export { default as FormItemControl } from './FormItemControl';
19
21
  export type { LoadingProps } from './Loading';
20
22
  export { default as Loading } from './Loading';
21
23
  export type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';
@@ -11,6 +11,7 @@ export { default as DeleteConfirmAction } from "./DeleteConfirmAction";
11
11
  export { default as withDeleteConfirmAction } from "./DeleteConfirmAction/withDeleteConfirmAction";
12
12
  export { default as EditableText } from "./EditableText";
13
13
  export { default as FloatDrawer } from "./FloatDrawer";
14
+ export { default as FormItemControl } from "./FormItemControl";
14
15
  export { default as Loading } from "./Loading";
15
16
  export { withDefaultModalActionProps, withModalAction } from "./ModalAction";
16
17
  export { default as ModalAction } from "./ModalAction";
@@ -1 +1 @@
1
- {"version":3,"names":["default","BreakLines","ConfigProvider","ReactEasyContext","withDefaultConfirmActionProps","withConfirmAction","ConfirmAction","ContextMenu","DeleteConfirmAction","withDeleteConfirmAction","EditableText","FloatDrawer","Loading","withDefaultModalActionProps","withModalAction","ModalAction","OverflowTags"],"sources":["../../src/components/index.tsx"],"sourcesContent":["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef, ActionCompConstraint } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as withConfirmAction } from './ConfirmAction/withConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\nexport type {\n ContextMenuProps,\n ContextMenuItem,\n ContextMenuSeparator,\n ContextMenuSubmenu,\n ContextMenuRef,\n} from './ContextMenu';\nexport { default as ContextMenu } from './ContextMenu';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\nexport { default as withDeleteConfirmAction } from './DeleteConfirmAction/withDeleteConfirmAction';\n\nexport type { EditableTextProps } from './EditableText';\nexport { default as EditableText } from './EditableText';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { LoadingProps } from './Loading';\nexport { default as Loading } from './Loading';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n"],"mappings":"AACA,SAASA,OAAO,IAAIC,UAAU;AAG9B,SAASD,OAAO,IAAIE,cAAc;AAElC,SAASF,OAAO,IAAIG,gBAAgB;AAGpC,SAASC,6BAA6B;AACtC,SAASJ,OAAO,IAAIK,iBAAiB;AACrC,SAASL,OAAO,IAAIM,aAAa;AASjC,SAASN,OAAO,IAAIO,WAAW;;AAE/B;AACA,SAASP,OAAO,IAAIQ,mBAAmB;AACvC,SAASR,OAAO,IAAIS,uBAAuB;AAG3C,SAAST,OAAO,IAAIU,YAAY;AAGhC,SAASV,OAAO,IAAIW,WAAW;AAG/B,SAASX,OAAO,IAAIY,OAAO;AAG3B,SAASC,2BAA2B,EAAEC,eAAe;AACrD,SAASd,OAAO,IAAIe,WAAW;AAG/B,SAASf,OAAO,IAAIgB,YAAY"}
1
+ {"version":3,"names":["default","BreakLines","ConfigProvider","ReactEasyContext","withDefaultConfirmActionProps","withConfirmAction","ConfirmAction","ContextMenu","DeleteConfirmAction","withDeleteConfirmAction","EditableText","FloatDrawer","FormItemControl","Loading","withDefaultModalActionProps","withModalAction","ModalAction","OverflowTags"],"sources":["../../src/components/index.tsx"],"sourcesContent":["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef, ActionCompConstraint } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as withConfirmAction } from './ConfirmAction/withConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\nexport type {\n ContextMenuProps,\n ContextMenuItem,\n ContextMenuSeparator,\n ContextMenuSubmenu,\n ContextMenuRef,\n} from './ContextMenu';\nexport { default as ContextMenu } from './ContextMenu';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\nexport { default as withDeleteConfirmAction } from './DeleteConfirmAction/withDeleteConfirmAction';\n\nexport type { EditableTextProps } from './EditableText';\nexport { default as EditableText } from './EditableText';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { FormItemControlProps } from './FormItemControl';\nexport { default as FormItemControl } from './FormItemControl';\n\nexport type { LoadingProps } from './Loading';\nexport { default as Loading } from './Loading';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n"],"mappings":"AACA,SAASA,OAAO,IAAIC,UAAU;AAG9B,SAASD,OAAO,IAAIE,cAAc;AAElC,SAASF,OAAO,IAAIG,gBAAgB;AAGpC,SAASC,6BAA6B;AACtC,SAASJ,OAAO,IAAIK,iBAAiB;AACrC,SAASL,OAAO,IAAIM,aAAa;AASjC,SAASN,OAAO,IAAIO,WAAW;;AAE/B;AACA,SAASP,OAAO,IAAIQ,mBAAmB;AACvC,SAASR,OAAO,IAAIS,uBAAuB;AAG3C,SAAST,OAAO,IAAIU,YAAY;AAGhC,SAASV,OAAO,IAAIW,WAAW;AAG/B,SAASX,OAAO,IAAIY,eAAe;AAGnC,SAASZ,OAAO,IAAIa,OAAO;AAG3B,SAASC,2BAA2B,EAAEC,eAAe;AACrD,SAASf,OAAO,IAAIgB,WAAW;AAG/B,SAAShB,OAAO,IAAIiB,YAAY"}
@@ -30,7 +30,7 @@ var genStyle = (token) => {
30
30
  "&-trigger": {
31
31
  width: "fit-content"
32
32
  },
33
- "&-menu": {
33
+ ".contexify&-menu": {
34
34
  padding: 0,
35
35
  "&-has-items": {
36
36
  padding: "var(--contexify-menu-padding)"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/ContextMenu/style/index.ts"],
4
- "sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-trigger': {\n width: 'fit-content',\n },\n '&-menu': {\n padding: 0,\n '&-has-items': {\n padding: 'var(--contexify-menu-padding)',\n },\n [`${componentCls}-shortcut-key`]: {\n kbd: {\n fontFamily: '-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,sans-serif',\n },\n },\n },\n },\n };\n};\n\nexport default genStyleHooks('ContextMenu' as never, genStyle);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAA6C,CAAC,UAAqB;AACvE,QAAM,EAAE,aAAa,IAAI;AACzB,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,aAAa;AAAA,QACX,OAAO;AAAA,MACT;AAAA,MACA,UAAU;AAAA,QACR,SAAS;AAAA,QACT,eAAe;AAAA,UACb,SAAS;AAAA,QACX;AAAA,QACA,CAAC,GAAG,2BAA2B,GAAG;AAAA,UAChC,KAAK;AAAA,YACH,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,eAAwB,QAAQ;",
4
+ "sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-trigger': {\n width: 'fit-content',\n },\n '.contexify&-menu': {\n padding: 0,\n '&-has-items': {\n padding: 'var(--contexify-menu-padding)',\n },\n [`${componentCls}-shortcut-key`]: {\n kbd: {\n fontFamily: '-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,sans-serif',\n },\n },\n },\n },\n };\n};\n\nexport default genStyleHooks('ContextMenu' as never, genStyle);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAA6C,CAAC,UAAqB;AACvE,QAAM,EAAE,aAAa,IAAI;AACzB,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,aAAa;AAAA,QACX,OAAO;AAAA,MACT;AAAA,MACA,oBAAoB;AAAA,QAClB,SAAS;AAAA,QACT,eAAe;AAAA,UACb,SAAS;AAAA,QACX;AAAA,QACA,CAAC,GAAG,2BAA2B,GAAG;AAAA,UAChC,KAAK;AAAA,YACH,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,eAAwB,QAAQ;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,17 @@
1
+ import type { FC, ReactNode } from 'react';
2
+ export interface FormItemControlProps {
3
+ children: (options: {
4
+ value: any;
5
+ onChange?: (value: any) => void;
6
+ }) => ReactNode;
7
+ }
8
+ /**
9
+ * - **EN:** FormItemControl is a component that wraps custom content into a valid Form.Item control.
10
+ * It provides a value and an onChange function to the children, allowing them to interact with
11
+ * the form state. This is useful for creating custom form controls that need to integrate with
12
+ * Ant Design's Form.Item.
13
+ * - **CN:** FormItemControl 是一个将自定义内容包装成有效的 Form.Item 控件的组件。它向子组件提供了一个 `value` 和一个 `onChange`
14
+ * 函数,使得子组件能够与表单状态进行交互。 这对于创建需要与 Ant Design 的 `Form.Item` 集成的自定义表单控件非常有用。
15
+ */
16
+ declare const FormItemControl: FC<FormItemControlProps>;
17
+ export default FormItemControl;
@@ -0,0 +1,30 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/FormItemControl/index.tsx
20
+ var FormItemControl_exports = {};
21
+ __export(FormItemControl_exports, {
22
+ default: () => FormItemControl_default
23
+ });
24
+ module.exports = __toCommonJS(FormItemControl_exports);
25
+ var FormItemControl = (props) => {
26
+ const { children, value, onChange } = props;
27
+ return children({ value, onChange });
28
+ };
29
+ var FormItemControl_default = FormItemControl;
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/FormItemControl/index.tsx"],
4
+ "sourcesContent": ["import type { FC, ReactNode } from 'react';\n\nexport interface FormItemControlProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n children: (options: { value: any; onChange?: (value: any) => void }) => ReactNode;\n}\n\n/**\n * - **EN:** FormItemControl is a component that wraps custom content into a valid Form.Item control.\n * It provides a value and an onChange function to the children, allowing them to interact with\n * the form state. This is useful for creating custom form controls that need to integrate with\n * Ant Design's Form.Item.\n * - **CN:** FormItemControl 是一个将自定义内容包装成有效的 Form.Item 控件的组件。它向子组件提供了一个 `value` 和一个 `onChange`\n * 函数,使得子组件能够与表单状态进行交互。 这对于创建需要与 Ant Design 的 `Form.Item` 集成的自定义表单控件非常有用。\n */\nconst FormItemControl: FC<FormItemControlProps> = (props) => {\n // eslint-disable-next-line react/prop-types\n const { children, value, onChange } = props as FormItemControlProps & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange?: (value: any) => void;\n };\n\n return children({ value, onChange });\n};\n\nexport default FormItemControl;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA,IAAM,kBAA4C,CAAC,UAAU;AAE3D,QAAM,EAAE,UAAU,OAAO,SAAS,IAAI;AAOtC,SAAO,SAAS,EAAE,OAAO,SAAS,CAAC;AACrC;AAEA,IAAO,0BAAQ;",
6
+ "names": []
7
+ }
@@ -3,13 +3,15 @@ import type { SpinProps } from 'antd';
3
3
  export type LoadingProps = SpinProps & {
4
4
  /**
5
5
  * - **EN:** When used independently, the positioning method of the animation:
6
- * - **absolute** - Uses absolute positioning, and the animation will automatically center itself
7
- * within the parent container.
8
- * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container
9
- * and center itself.
6
+ *
7
+ * - **absolute** - Uses absolute positioning, and the animation will automatically center itself
8
+ * within the parent container.
9
+ * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container
10
+ * and center itself.
10
11
  * - **CN:** 独立使用时,动画的定位方式:
11
- * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。
12
- * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。
12
+ *
13
+ * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。
14
+ * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。
13
15
  *
14
16
  * @default `flex`
15
17
  */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/Loading/index.tsx"],
4
- "sourcesContent": ["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { ConfigProvider, Spin } from 'antd';\nimport classNames from 'classnames';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * - **EN:** When used independently, the positioning method of the animation:\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n * - **CN:** 独立使用时,动画的定位方式:\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * - **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n rootClassName?: string;\n /**\n * - **EN:** When used independently, set the style for the mask parent container of the animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n rootStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const {\n prefixCls: prefixClsInProps,\n mode = 'flex',\n rootClassName,\n rootStyle,\n children,\n spinning = true,\n className,\n ...spinProps\n } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-loading', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n rootClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={rootStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAwD;AAExD,kBAAqC;AACrC,wBAAuB;AACvB,mBAAqB;AAiErB,IAAM,UAA4B,CAAC,UAAU;AAC3C,QAAM;AAAA,IACJ,WAAW;AAAA,IACX,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,EAAE,aAAa,QAAI,yBAAW,2BAAe,aAAa;AAChE,QAAM,YAAY,aAAa,gBAAgB,gBAAgB;AAC/D,QAAM,CAAC,YAAY,QAAQ,SAAS,QAAI,aAAAA,SAAS,SAAS;AAE1D,SAAO;AAAA;AAAA;AAAA,IAGH;AAAA,MACE,oCAAC,oBAAK,eAAW,kBAAAC,SAAW,QAAQ,WAAW,WAAW,SAAS,GAAG,UAAqB,GAAG,aAC3F,QACH;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAGA,YACE;AAAA,MACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAW,kBAAAA;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,aAAa,GAAG,uBAAuB,GAAG;AAAA,UACrD;AAAA,UACA,OAAO;AAAA;AAAA,QAEP,oCAAC,oBAAK,WAAsB,UAAqB,GAAG,WAAW;AAAA,MACjE;AAAA,IACF;AAAA;AACR;AAEA,IAAO,kBAAQ;",
4
+ "sourcesContent": ["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { ConfigProvider, Spin } from 'antd';\nimport classNames from 'classnames';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * - **EN:** When used independently, the positioning method of the animation:\n *\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n * - **CN:** 独立使用时,动画的定位方式:\n *\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * - **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n rootClassName?: string;\n /**\n * - **EN:** When used independently, set the style for the mask parent container of the animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n rootStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const {\n prefixCls: prefixClsInProps,\n mode = 'flex',\n rootClassName,\n rootStyle,\n children,\n spinning = true,\n className,\n ...spinProps\n } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-loading', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n rootClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={rootStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAwD;AAExD,kBAAqC;AACrC,wBAAuB;AACvB,mBAAqB;AAmErB,IAAM,UAA4B,CAAC,UAAU;AAC3C,QAAM;AAAA,IACJ,WAAW;AAAA,IACX,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,EAAE,aAAa,QAAI,yBAAW,2BAAe,aAAa;AAChE,QAAM,YAAY,aAAa,gBAAgB,gBAAgB;AAC/D,QAAM,CAAC,YAAY,QAAQ,SAAS,QAAI,aAAAA,SAAS,SAAS;AAE1D,SAAO;AAAA;AAAA;AAAA,IAGH;AAAA,MACE,oCAAC,oBAAK,eAAW,kBAAAC,SAAW,QAAQ,WAAW,WAAW,SAAS,GAAG,UAAqB,GAAG,aAC3F,QACH;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAGA,YACE;AAAA,MACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAW,kBAAAA;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,aAAa,GAAG,uBAAuB,GAAG;AAAA,UACrD;AAAA,UACA,OAAO;AAAA;AAAA,QAEP,oCAAC,oBAAK,WAAsB,UAAqB,GAAG,WAAW;AAAA,MACjE;AAAA,IACF;AAAA;AACR;AAEA,IAAO,kBAAQ;",
6
6
  "names": ["useStyle", "classNames"]
7
7
  }
@@ -177,7 +177,9 @@ var genModalActionRenderer = (defaultProps) => {
177
177
  if (result === SubmitWithoutClosingSymbol) {
178
178
  throw new Error("SubmitWithoutClosing");
179
179
  }
180
- result = await (onOk == null ? void 0 : onOk(result ?? formData, ...triggerEventArgsRef.current ?? []));
180
+ if (onOk) {
181
+ result = await onOk(result ?? formData, ...triggerEventArgsRef.current ?? []);
182
+ }
181
183
  if (result === SubmitWithoutClosingSymbol) {
182
184
  throw new Error("SubmitWithoutClosing");
183
185
  }
@@ -241,6 +243,10 @@ function mergeProps(first, second) {
241
243
  ...first == null ? void 0 : first.wrapProps,
242
244
  ...second == null ? void 0 : second.wrapProps
243
245
  },
246
+ formProps: {
247
+ ...first == null ? void 0 : first.formProps,
248
+ ...second == null ? void 0 : second.formProps
249
+ },
244
250
  triggerProps: {
245
251
  ...first == null ? void 0 : first.triggerProps,
246
252
  ...second == null ? void 0 : second.triggerProps,
@@ -312,19 +318,22 @@ var addTriggers = (comp) => {
312
318
  var ModalAction = addTriggers(forwardedModalAction);
313
319
  ModalAction.SubmitWithoutClosing = SubmitWithoutClosingSymbol;
314
320
  function withModalAction(formComp, defaultProps) {
315
- const withDefaults = withDefaultModalActionProps(
316
- forwardedModalAction,
317
- (props) => {
318
- const useDefaultProps = typeof defaultProps === "function" ? defaultProps : () => defaultProps;
319
- const defaults = useDefaultProps(props);
320
- const mergedProps = typeof defaultProps === "function" ? mergeProps(props, defaults) : mergeProps(defaults, props);
321
- return {
321
+ const ForwardedModalAction = forwardedModalAction;
322
+ const WithDefaultProps = (0, import_react.forwardRef)((props, ref) => {
323
+ const useDefaultProps = typeof defaultProps === "function" ? defaultProps : () => defaultProps;
324
+ const defaults = useDefaultProps(props);
325
+ const mergedProps = typeof defaultProps === "function" ? mergeProps(props, defaults) : mergeProps(defaults, props);
326
+ WithDefaultProps.displayName = "ForwardRef(WithDefaultProps)";
327
+ return /* @__PURE__ */ React.createElement(
328
+ ForwardedModalAction,
329
+ {
330
+ ref,
322
331
  formComp,
323
332
  ...mergedProps
324
- };
325
- }
326
- );
327
- return addTriggers(withDefaults);
333
+ }
334
+ );
335
+ });
336
+ return addTriggers(WithDefaultProps);
328
337
  }
329
338
  var ModalAction_default = ModalAction;
330
339
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/ModalAction/index.tsx"],
4
- "sourcesContent": ["import type { ComponentType, FC, ForwardedRef, ReactNode, RefAttributes } from 'react';\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';\nimport type { ButtonProps, FormInstance, ModalProps, SwitchProps } from 'antd';\nimport { Button, Form, Modal, Switch, Typography } from 'antd';\nimport type { LinkProps } from 'antd/es/typography/Link';\nimport { isForwardRef } from 'react-is';\nimport useContextValidator from '../../hooks/useContextValidator';\n\n/**\n * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when\n * returning in the `onSave` event of the editing form component\n * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效\n */\nexport const SubmitWithoutClosingSymbol = Symbol('[SubmitWithoutClose]');\n\nexport type ModalActionProps<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n> = Omit<ModalProps, 'onOk'> &\n ModalActionTrigger<FormData, P, TriggerProp, Event> & {\n /**\n * - **EN:** Form editing component, do not use the Form component inside the component, the form\n * component and form instance are automatically created by the parent component\n * - **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建\n */\n formComp: ComponentType<P & RefAttributes<Ref>>;\n /**\n * - **EN:** Props of the form editing component\n * - **CN:** 表单编辑组件的Props属性\n */\n formProps?: Omit<P, keyof FormCompPropsConstraint<FormData>>;\n /**\n * - **EN:** The callback when clicks the confirmation button, support asynchronous saving, return\n * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will\n * be passed to the `afterOk` event, if any\n * - **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话\n */\n onOk?: (\n formData: FormData,\n // @ts-expect-error: because TP[E] should be a function type\n ...args: Parameters<TriggerProp[Event]>\n ) => unknown | Promise<unknown>;\n /**\n * - **EN:** The callback after the confirmation event is completed, it will not be triggered when\n * it fails, the parameter is the return value of `onOk`\n * - **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n afterOk?: (data?: any) => void;\n };\n\nexport interface FormCompPropsConstraint<FormData> {\n /**\n * - **EN:** Automatically generated form instance, use this form instance in FormComp, do not\n * create a new instance\n * - **CN:** 自动生成的表单实例,编辑表单要使用这个表单实例,不要新创建实例\n */\n form: FormInstance<FormData>;\n /**\n * - **EN:** Register the form save event, the callback function passed in will be called when the\n * confirm button is clicked, support asynchronous saving\n * - **CN:** 注册表单保存事件,传入的回调函数会在点击确认按钮时被调用,支持异步保存\n *\n * @param handler Event handler | 事件处理函数\n */\n onSave: (\n handler: (\n /**\n * - **EN:** Form data\n * - **CN:** 表单数据\n */\n formData: FormData,\n /**\n * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get\n * the value of the switch; for the `Button` type trigger, you can get the click event\n * object of the button\n * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值;对于`Button`类型的触发器,可以获取按钮的点击事件对象\n */\n ...triggerEventData: any[]\n ) => unknown | Promise<unknown>\n ) => void;\n /**\n * - **EN:** Listen to the open and close status of the dialog. When `destroyOnHidden` is set to\n * false, the form component instance is cached, and the dialog can only be listened to in this\n * way\n * - **CN:** 监听弹框打开关闭状态。当`destroyOnHidden`设置为false时,表单组件实例被缓存,只能通过这种方式监听弹框\n *\n * @param handler Event handler | 事件处理函数\n */\n onOpenChange: (handler: ModalProps['afterOpenChange']) => void;\n /**\n * - **EN:** Set the dialog open status\n * - **CN:** 设置弹框打开状态\n *\n * @param open Whether is open or not | 弹窗是否打开\n */\n setOpen: (open: boolean) => void;\n /**\n * - **EN:** Modify the properties of the dialog, such as title, width, button properties, etc.\n * - **CN:** 修改弹窗的属性,例如标题、宽度,按钮属性等\n */\n updateModalProps: (props: Partial<ModalProps>) => void;\n /**\n * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get the\n * value of the switch; for the `Button` type trigger, you can get the click event object of the\n * button\n * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值,对于`Button`类型的触发器,可以获取按钮的点击事件对象\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n triggerEventData?: any[];\n}\n\nexport interface ModalActionTrigger<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n> {\n /**\n * - **EN:** Trigger component, click to show the dialog\n * - **CN:** 弹窗触发器组件,点击触发显示弹框\n */\n triggerComponent?: ComponentType<TriggerProp> | FC<TriggerProp>;\n /**\n * - **EN:** Props of the trigger component\n * - **CN:** 触发器组件的Props属性\n */\n triggerProps?: TriggerProp & {\n /**\n * - **EN:** Set a custom function to determine whether to show the trigger button\n * - **CN:** 设置一个自定义函数,用于判断是否显示触发器按钮\n *\n * @default true\n *\n * @param formProps Form component props | 表单组件的props\n */\n show?: boolean | ((formProps?: Omit<P, keyof FormCompPropsConstraint<FormData>>) => boolean);\n };\n /**\n * - **EN:** The event name that triggers the dialog\n * - **CN:** 触发弹窗的事件名称\n * - `Button`: 'onClick'\n * - `Switch`: 'onChange'\n * - `Link`: 'onClick'\n */\n triggerEvent?: Event;\n /**\n * - **EN:** Custom trigger content\n * - **CN:** 自定义触发器内容\n */\n children?: ReactNode;\n}\nexport type ModalActionRef<R> = R & {\n /**\n * - **EN:** Show the dialog\n * - **CN:** 显示弹框\n */\n show: () => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const genModalActionRenderer = (defaultProps: Partial<ModalActionProps<any, any, any, never, never>>) => {\n const ModalActionRenderer = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n >(\n props: ModalActionProps<FormData, P, TriggerProp, Event, Ref>,\n ref: ForwardedRef<ModalActionRef<Ref>>\n ) => {\n const [userModalProps, setUserModalProps] = useState<Partial<ModalProps>>({});\n let mergedProps = mergeProps<FormData, P, TriggerProp, Event, Ref>(defaultProps, props);\n mergedProps = mergeProps(mergedProps, userModalProps as typeof props);\n const {\n formComp,\n formProps,\n triggerComponent: Trigger = Button,\n triggerEvent = 'onClick' as Event,\n triggerProps,\n open: openInProps,\n destroyOnClose = true,\n destroyOnHidden = true,\n maskClosable = false,\n okButtonProps,\n cancelButtonProps,\n onOk,\n afterOk,\n onCancel,\n afterClose,\n children,\n ...restProps\n } = mergedProps;\n useContextValidator();\n const FormComp = formComp as ComponentType<FormCompPropsConstraint<FormData> & RefAttributes<Ref>>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const triggerEventArgsRef = useRef<any[]>(undefined);\n const [open, setOpen] = useState(false);\n const saveFuncRef = useRef<(formData: FormData, ...args: any[]) => unknown>(undefined);\n const [isSaving, setIsSaving] = useState(false);\n const [formCompRef, setFormCompRef] = useState<Ref | null>(null);\n const [form, setForm] = useState<FormInstance<FormData>>();\n const formRef = useRef<FormInstance<FormData>>(form);\n formRef.current = form;\n const destroyOnCloseRef = useRef(destroyOnClose);\n destroyOnCloseRef.current = destroyOnClose || destroyOnHidden;\n const openListenerRef = useRef<ModalProps['afterOpenChange']>(undefined);\n\n // Listen to the open props changes\n useEffect(() => {\n if (openInProps) {\n setOpen(openInProps);\n }\n }, [openInProps]);\n\n // Reset the form after closed\n useEffect(() => {\n if (!destroyOnCloseRef.current && open && formRef.current) {\n formRef.current.resetFields();\n }\n }, [open]);\n\n // show trigger\n const showInProps = triggerProps?.show;\n const showTrigger = useMemo(() => {\n if (typeof showInProps === 'boolean') {\n return showInProps;\n } else if (typeof showInProps === 'function') {\n return showInProps(formProps);\n }\n return true;\n }, [showInProps, formProps]);\n\n // Show the dialog\n const showModal = useCallback(() => {\n setOpen(true);\n openListenerRef.current?.(true);\n }, []);\n // Hide the dialog\n const hideModal = useCallback(() => {\n setOpen(false);\n openListenerRef.current?.(false);\n }, []);\n // Set the dialog status listener\n const setOpenListener = useCallback(\n (listener: ModalProps['afterOpenChange']) => {\n openListenerRef.current = listener;\n // Call once when initialized\n openListenerRef.current?.(open);\n },\n [open]\n );\n // Receive the onSave callback method passed by the form component\n const setOnSaveHandler: FormCompPropsConstraint<FormData>['onSave'] = useCallback((handler) => {\n saveFuncRef.current = handler;\n }, []);\n // Set the dialog status and trigger the onOpenChange event of the form component\n const handleSetOpen = useCallback((open: boolean) => {\n setOpen(open);\n openListenerRef.current?.(open);\n }, []);\n\n // Output ref\n useImperativeHandle(ref, () => ({ ...formCompRef, show: showModal }) as ModalActionRef<Ref>, [\n formCompRef,\n showModal,\n ]);\n\n // Render the trigger component\n return (\n <>\n {showTrigger && (\n <Trigger\n {...triggerProps}\n // Trigger event\n {...((triggerEvent\n ? {\n [triggerEvent]: (...args: any[]) => {\n triggerEventArgsRef.current = args;\n showModal();\n if (triggerProps && typeof triggerProps[triggerEvent] === 'function') {\n (triggerProps[triggerEvent] as (...args: any[]) => void)(...args);\n }\n },\n }\n : {}) as TriggerProp)}\n >\n {(triggerProps as { children?: ReactNode }).children ?? children}\n </Trigger>\n )}\n <Modal\n open={open}\n confirmLoading={isSaving}\n destroyOnClose={destroyOnClose}\n destroyOnHidden={destroyOnHidden}\n maskClosable={maskClosable}\n okButtonProps={{\n loading: isSaving,\n ...okButtonProps,\n }}\n cancelButtonProps={{\n disabled: isSaving,\n ...cancelButtonProps,\n }}\n onOk={async () => {\n let formData: FormData;\n try {\n formData = (await form?.validateFields()) as FormData;\n } catch (e) {\n // Validation error, should not throw error\n return;\n }\n if (Object.keys(formData).length === 0) {\n console.warn(\n 'form.getFieldsValue() is empty. Please use the form instance passed to formComp instead of creating the form instance yourself.'\n );\n }\n try {\n setIsSaving(true);\n // First call onSave of the form component\n let result = await saveFuncRef.current?.(formData, ...(triggerEventArgsRef.current ?? []));\n // The onSave of the form component has the ability to prevent the dialog from closing\n if (result === SubmitWithoutClosingSymbol) {\n throw new Error('SubmitWithoutClosing');\n }\n // Then call onOk of the dialog, support asynchronous, and will pass the return value of onSave, if any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result = await onOk?.((result as FormData) ?? formData, ...((triggerEventArgsRef.current ?? []) as any));\n // onOk also has the ability to prevent the dialog from closing\n if (result === SubmitWithoutClosingSymbol) {\n throw new Error('SubmitWithoutClosing');\n }\n // If onOK is successful, close the dialog and trigger the afterOk event\n hideModal();\n afterOk?.(result);\n } catch (error) {\n console.error(error);\n } finally {\n setIsSaving(false);\n }\n }}\n onCancel={async (e) => {\n hideModal();\n onCancel?.(e);\n }}\n afterClose={() => {\n hideModal();\n afterClose?.();\n }}\n {...restProps}\n >\n <FormCreator<FormData> onCreate={setForm} />\n {form && (\n <FormComp\n ref={isForwardRef(FormComp) ? setFormCompRef : undefined}\n {...formProps}\n form={form}\n onOpenChange={setOpenListener}\n onSave={setOnSaveHandler}\n triggerEventData={triggerEventArgsRef.current}\n setOpen={handleSetOpen}\n updateModalProps={setUserModalProps}\n />\n )}\n </Modal>\n </>\n );\n };\n return ModalActionRenderer;\n};\n\nfunction mergeProps<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n first?: Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>,\n second?: Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>\n) {\n return {\n ...first,\n ...second,\n okButtonProps: {\n ...first?.okButtonProps,\n ...second?.okButtonProps,\n },\n cancelButtonProps: {\n ...first?.cancelButtonProps,\n ...second?.cancelButtonProps,\n },\n bodyProps: {\n ...first?.bodyProps,\n ...second?.bodyProps,\n },\n maskProps: {\n ...first?.maskProps,\n ...second?.maskProps,\n },\n wrapProps: {\n ...first?.wrapProps,\n ...second?.wrapProps,\n },\n triggerProps: {\n ...first?.triggerProps,\n ...second?.triggerProps,\n style: {\n ...(first?.triggerProps && 'style' in first.triggerProps && typeof first.triggerProps.style === 'object'\n ? first.triggerProps.style\n : {}),\n ...(second?.triggerProps && 'style' in second.triggerProps && typeof second.triggerProps.style === 'object'\n ? second.triggerProps.style\n : {}),\n },\n },\n } as unknown as ModalActionProps<FormData, P, TriggerProp, Event, Ref>;\n}\n\nfunction FormCreator<FD extends object>(props: { onCreate: (form: FormInstance<FD> | undefined) => void }) {\n const { onCreate } = props;\n const onCreateRef = useRef(onCreate);\n onCreateRef.current = onCreate;\n const [form] = Form.useForm<FD>();\n\n // output ref\n useEffect(() => {\n onCreateRef.current(form);\n return () => {\n onCreateRef.current(undefined);\n };\n }, [form]);\n\n return null;\n}\n\n/**\n * - **EN:** Add default properties to the ModalAction component\n * - **CN:** 给ModalAction组件添加默认属性\n *\n * @param WrappedComponent ModalAction component | ModalAction组件\n * @param defaultProps Default properties | 默认属性\n */\nexport const withDefaultModalActionProps = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n WrappedComponent: ComponentType<\n ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>\n >,\n defaultProps?:\n | Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>\n | ((\n actualProps: ModalActionProps<FormData, P, TriggerProp, Event, Ref>\n ) => Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>)\n) => {\n const WithDefaultProps = forwardRef<ModalActionRef<Ref>, ModalActionProps<FormData, P, TriggerProp, Event, Ref>>(\n (props, ref) => {\n const useDefaultProps = typeof defaultProps === 'function' ? defaultProps : () => defaultProps;\n const defaults = useDefaultProps(props);\n const mergedProps =\n typeof defaultProps === 'function' ? mergeProps(props, defaults) : mergeProps(defaults, props);\n WithDefaultProps.displayName = 'ForwardRef(WithDefaultProps)';\n return <WrappedComponent ref={ref} {...mergedProps} />;\n }\n );\n return WithDefaultProps;\n};\n\nconst renderModalAction = genModalActionRenderer({});\nconst forwardedModalAction = forwardRef(renderModalAction);\nforwardedModalAction.displayName = 'ForwardRef(ModalAction)';\n/**\n * - **EN:** ModalAction component type\n * - **CN:** ModalAction组件的类型\n */\nexport type ModalActionInterface<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n> = ComponentType<ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>>;\n/**\n * - **EN:** ModalAction component with generic type\n * - **CN:** ModalAction泛型组件的类型\n */\nexport type GenericModalActionInterface = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n props: ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>\n) => ReactNode;\n/**\n * - **EN:** ModalAction with specified trigger type (specified form component)\n * - **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)\n */\ntype ModalActionWithTrigger<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n OMIT extends string = never,\n> = ComponentType<\n Omit<ModalActionProps<FormData, P, TriggerProp, Event, Ref>, 'triggerComponent' | 'triggerEvent' | OMIT> &\n RefAttributes<ModalActionRef<Ref>>\n>;\n\n/**\n * - **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)\n * - **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)\n */\ntype GenericModalActionWithTrigger<TP extends object, E extends keyof TP, OMIT extends string = never> = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n>(\n props: Omit<ModalActionProps<FormData, P, TP, E, Ref>, 'triggerComponent' | 'triggerEvent' | OMIT> &\n RefAttributes<ModalActionRef<Ref>>\n) => ReactNode;\n\n/**\n * - **EN:** Built-in trigger types (specified form components)\n * - **CN:** 内置的几种触发器类型(已指定表单组件)\n */\ninterface TypedTriggers<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n OMIT extends string = never,\n> {\n /**\n * - **EN:** Dialog with button type trigger\n * - **CN:** 按钮类型的弹窗\n */\n Button: ModalActionWithTrigger<FormData, P, ButtonProps, 'onClick', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with switch type trigger\n * - **CN:** 开关类型的弹窗\n */\n Switch: ModalActionWithTrigger<FormData, P, SwitchProps, 'onChange', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with link type trigger\n * - **CN:** 链接类型的弹窗\n */\n Link: ModalActionWithTrigger<FormData, P, LinkProps, 'onClick', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n}\n/**\n * - **EN:** Built-in trigger types (generic types, unspecified form components)\n * - **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)\n */\ninterface GenericTypedTriggers<OMIT extends string = never> {\n /**\n * - **EN:** Dialog with button type trigger\n * - **CN:** 按钮类型的弹窗\n */\n Button: GenericModalActionWithTrigger<ButtonProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with switch type trigger\n * - **CN:** 开关类型的弹窗\n */\n Switch: GenericModalActionWithTrigger<SwitchProps, 'onChange', 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with link type trigger\n * - **CN:** 链接类型的弹窗\n */\n Link: GenericModalActionWithTrigger<LinkProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;\n}\ntype WithGenericTriggers<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n OMIT extends string = never,\n> = (<TriggerProp extends object, Event extends keyof TriggerProp>(\n props: Omit<ModalActionProps<FormData, P, TriggerProp, Event, Ref>, OMIT> & RefAttributes<ModalActionRef<Ref>>\n) => ReactNode) &\n (P extends never ? GenericTypedTriggers<OMIT> : TypedTriggers<FormData, P, Ref, OMIT>);\n\n/**\n * - **EN:** Add trigger types to the ModalAction component\n * - **CN:** 给ModalAction组件添加子触发器类型\n */\nconst addTriggers = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n OuterTriggerProp extends object,\n OuterEvent extends keyof OuterTriggerProp,\n Ref extends object,\n OMIT extends string = never,\n>(\n comp: ComponentType<\n ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref> & RefAttributes<ModalActionRef<Ref>>\n >\n) => {\n const patchedComp = comp as WithGenericTriggers<FormData, P, Ref, OMIT>;\n // Type of button trigger\n patchedComp.Button = withDefaultModalActionProps(\n comp as ModalActionInterface<FormData, P, ButtonProps, 'onClick', Ref>,\n {\n triggerComponent: Button,\n triggerEvent: 'onClick',\n triggerProps: {},\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // Type of switch trigger\n patchedComp.Switch = withDefaultModalActionProps(\n comp as ModalActionInterface<FormData, P, SwitchProps, 'onChange', Ref>,\n {\n triggerComponent: Switch,\n triggerEvent: 'onChange',\n triggerProps: {},\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // Type of link trigger\n patchedComp.Link = withDefaultModalActionProps(comp as ModalActionInterface<FormData, P, LinkProps, 'onClick', Ref>, {\n triggerComponent: Typography.Link,\n triggerEvent: 'onClick',\n triggerProps: {\n style: { whiteSpace: 'nowrap' },\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) as any;\n return patchedComp;\n};\n\n/**\n * - **EN:** Dialog component with trigger\n * - **CN:** 带触发器的弹窗组件\n */\nconst ModalAction = addTriggers(forwardedModalAction);\n\n/**\n * - **EN:** Dialog component with trigger\n * - **CN:** 带触发器的弹窗组件\n */\nexport type ModalActionWithStatic = typeof ModalAction & {\n /**\n * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when\n * returning in the `onSave` event of the editing form component\n * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效\n */\n SubmitWithoutClosing: symbol;\n};\n(ModalAction as ModalActionWithStatic).SubmitWithoutClosing = SubmitWithoutClosingSymbol;\n\n/**\n * - **EN:** Generate a dialog component based on the editing form component\n * - **CN:** 基于编辑表单组件生成一个弹框组件\n *\n * @template FormData Form data type | 表单数据类型\n * @template P Form component props type | 表单组件的props类型\n * @template OuterTriggerProp Outer trigger props type | 外部触发器的props类型\n * @template OuterEvent Outer trigger event type | 外部触发器的事件类型\n * @template Ref Form component ref type | 表单组件的ref类型\n *\n * @param formComp Component of dialog content | 弹窗内容组件\n * @param defaultProps Default properties of the dialog | 弹窗的默认属性\n */\nexport function withModalAction<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n OuterTriggerProp extends object,\n OuterEvent extends keyof OuterTriggerProp,\n Ref extends object,\n>(\n formComp: ComponentType<P & FormCompPropsConstraint<FormData> & RefAttributes<Ref>>,\n defaultProps?:\n | Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>\n | ((\n actualProps: ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>\n ) => Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>)\n) {\n const withDefaults = withDefaultModalActionProps(\n forwardedModalAction as unknown as ModalActionInterface<FormData, P, OuterTriggerProp, OuterEvent, Ref>,\n (props) => {\n const useDefaultProps = typeof defaultProps === 'function' ? defaultProps : () => defaultProps;\n const defaults = useDefaultProps(props);\n const mergedProps =\n typeof defaultProps === 'function' ? mergeProps(props, defaults) : mergeProps(defaults, props);\n return {\n formComp,\n ...(mergedProps as Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>),\n };\n }\n ) as unknown as <TP extends object, E extends keyof TP>(\n props: Omit<ModalActionProps<FormData, P, TP, E, Ref>, 'formComp'> & RefAttributes<ModalActionRef<Ref>>\n ) => ReactNode;\n return addTriggers<FormData, P, OuterTriggerProp, OuterEvent, Ref, 'formComp'>(withDefaults);\n}\n\nexport default ModalAction as ModalActionWithStatic;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAmG;AAEnG,kBAAwD;AAExD,sBAA6B;AAC7B,iCAAgC;AAOzB,IAAM,6BAA6B,OAAO,sBAAsB;AAuJhE,IAAM,yBAAyB,CAAC,iBAAyE;AAC9G,QAAM,sBAAsB,CAO1B,OACA,QACG;AACH,UAAM,CAAC,gBAAgB,iBAAiB,QAAI,uBAA8B,CAAC,CAAC;AAC5E,QAAI,cAAc,WAAiD,cAAc,KAAK;AACtF,kBAAc,WAAW,aAAa,cAA8B;AACpE,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA,kBAAkB,UAAU;AAAA,MAC5B,eAAe;AAAA,MACf;AAAA,MACA,MAAM;AAAA,MACN,iBAAiB;AAAA,MACjB,kBAAkB;AAAA,MAClB,eAAe;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI;AACJ,mCAAAA,SAAoB;AACpB,UAAM,WAAW;AAEjB,UAAM,0BAAsB,qBAAc,MAAS;AACnD,UAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,KAAK;AACtC,UAAM,kBAAc,qBAAwD,MAAS;AACrF,UAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,KAAK;AAC9C,UAAM,CAAC,aAAa,cAAc,QAAI,uBAAqB,IAAI;AAC/D,UAAM,CAAC,MAAM,OAAO,QAAI,uBAAiC;AACzD,UAAM,cAAU,qBAA+B,I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MAAsE;AAAA,IACnH,kBAAkB,uBAAW;AAAA,IAC7B,cAAc;AAAA,IACd,cAAc;AAAA,MACZ,OAAO,EAAE,YAAY,SAAS;AAAA,IAChC;AAAA;AAAA,EAEF,CAAC;AACD,SAAO;AACT;AAMA,IAAM,cAAc,YAAY,oBAAoB;AAcnD,YAAsC,uBAAuB;AAevD,SAAS,gBAOd,UACA,cAKA;AACA,QAAM,eAAe;AAAA,IACnB;AAAA,IACA,CAAC,UAAU;AACT,YAAM,kBAAkB,OAAO,iBAAiB,aAAa,eAAe,MAAM;AAClF,YAAM,WAAW,gBAAgB,KAAK;AACtC,YAAM,cACJ,OAAO,iBAAiB,aAAa,WAAW,OAAO,QAAQ,IAAI,WAAW,UAAU,KAAK;AAC/F,aAAO;AAAA,QACL;AAAA,QACA,GAAI;AAAA,MACN;AAAA,IACF;AAAA,EACF;AAGA,SAAO,YAAwE,YAAY;AAC7F;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import type { ComponentType, FC, ForwardedRef, ReactNode, RefAttributes } from 'react';\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';\nimport type { ButtonProps, FormInstance, ModalProps, SwitchProps } from 'antd';\nimport { Button, Form, Modal, Switch, Typography } from 'antd';\nimport type { LinkProps } from 'antd/es/typography/Link';\nimport { isForwardRef } from 'react-is';\nimport useContextValidator from '../../hooks/useContextValidator';\n\n/**\n * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when\n * returning in the `onSave` event of the editing form component\n * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效\n */\nexport const SubmitWithoutClosingSymbol = Symbol('[SubmitWithoutClose]');\n\nexport type ModalActionProps<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n> = Omit<ModalProps, 'onOk'> &\n ModalActionTrigger<FormData, P, TriggerProp, Event> & {\n /**\n * - **EN:** Form editing component, do not use the Form component inside the component, the form\n * component and form instance are automatically created by the parent component\n * - **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建\n */\n formComp: ComponentType<P & RefAttributes<Ref>>;\n /**\n * - **EN:** Props of the form editing component\n * - **CN:** 表单编辑组件的Props属性\n */\n formProps?: Omit<P, keyof FormCompPropsConstraint<FormData>>;\n /**\n * - **EN:** The callback when clicks the confirmation button, support asynchronous saving, return\n * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will\n * be passed to the `afterOk` event, if any\n * - **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话\n */\n onOk?: (\n formData: FormData,\n // @ts-expect-error: because TP[E] should be a function type\n ...args: Parameters<TriggerProp[Event]>\n ) => unknown | Promise<unknown>;\n /**\n * - **EN:** The callback after the confirmation event is completed, it will not be triggered when\n * it fails, the parameter is the return value of `onOk`\n * - **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n afterOk?: (data?: any) => void;\n };\n\nexport interface FormCompPropsConstraint<FormData> {\n /**\n * - **EN:** Automatically generated form instance, use this form instance in FormComp, do not\n * create a new instance\n * - **CN:** 自动生成的表单实例,编辑表单要使用这个表单实例,不要新创建实例\n */\n form: FormInstance<FormData>;\n /**\n * - **EN:** Register the form save event, the callback function passed in will be called when the\n * confirm button is clicked, support asynchronous saving\n * - **CN:** 注册表单保存事件,传入的回调函数会在点击确认按钮时被调用,支持异步保存\n *\n * @param handler Event handler | 事件处理函数\n */\n onSave: (\n handler: (\n /**\n * - **EN:** Form data\n * - **CN:** 表单数据\n */\n formData: FormData,\n /**\n * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get\n * the value of the switch; for the `Button` type trigger, you can get the click event\n * object of the button\n * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值;对于`Button`类型的触发器,可以获取按钮的点击事件对象\n */\n ...triggerEventData: any[]\n ) => unknown | Promise<unknown>\n ) => void;\n /**\n * - **EN:** Listen to the open and close status of the dialog. When `destroyOnHidden` is set to\n * false, the form component instance is cached, and the dialog can only be listened to in this\n * way\n * - **CN:** 监听弹框打开关闭状态。当`destroyOnHidden`设置为false时,表单组件实例被缓存,只能通过这种方式监听弹框\n *\n * @param handler Event handler | 事件处理函数\n */\n onOpenChange: (handler: ModalProps['afterOpenChange']) => void;\n /**\n * - **EN:** Set the dialog open status\n * - **CN:** 设置弹框打开状态\n *\n * @param open Whether is open or not | 弹窗是否打开\n */\n setOpen: (open: boolean) => void;\n /**\n * - **EN:** Modify the properties of the dialog, such as title, width, button properties, etc.\n * - **CN:** 修改弹窗的属性,例如标题、宽度,按钮属性等\n */\n updateModalProps: (props: Partial<ModalProps>) => void;\n /**\n * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get the\n * value of the switch; for the `Button` type trigger, you can get the click event object of the\n * button\n * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值,对于`Button`类型的触发器,可以获取按钮的点击事件对象\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n triggerEventData?: any[];\n}\n\nexport interface ModalActionTrigger<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n> {\n /**\n * - **EN:** Trigger component, click to show the dialog\n * - **CN:** 弹窗触发器组件,点击触发显示弹框\n */\n triggerComponent?: ComponentType<TriggerProp> | FC<TriggerProp>;\n /**\n * - **EN:** Props of the trigger component\n * - **CN:** 触发器组件的Props属性\n */\n triggerProps?: TriggerProp & {\n /**\n * - **EN:** Set a custom function to determine whether to show the trigger button\n * - **CN:** 设置一个自定义函数,用于判断是否显示触发器按钮\n *\n * @default true\n *\n * @param formProps Form component props | 表单组件的props\n */\n show?: boolean | ((formProps?: Omit<P, keyof FormCompPropsConstraint<FormData>>) => boolean);\n };\n /**\n * - **EN:** The event name that triggers the dialog\n * - **CN:** 触发弹窗的事件名称\n * - `Button`: 'onClick'\n * - `Switch`: 'onChange'\n * - `Link`: 'onClick'\n */\n triggerEvent?: Event;\n /**\n * - **EN:** Custom trigger content\n * - **CN:** 自定义触发器内容\n */\n children?: ReactNode;\n}\nexport type ModalActionRef<R> = R & {\n /**\n * - **EN:** Show the dialog\n * - **CN:** 显示弹框\n */\n show: () => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const genModalActionRenderer = (defaultProps: Partial<ModalActionProps<any, any, any, never, never>>) => {\n const ModalActionRenderer = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n >(\n props: ModalActionProps<FormData, P, TriggerProp, Event, Ref>,\n ref: ForwardedRef<ModalActionRef<Ref>>\n ) => {\n const [userModalProps, setUserModalProps] = useState<Partial<ModalProps>>({});\n let mergedProps = mergeProps<FormData, P, TriggerProp, Event, Ref>(defaultProps, props);\n mergedProps = mergeProps(mergedProps, userModalProps as typeof props);\n const {\n formComp,\n formProps,\n triggerComponent: Trigger = Button,\n triggerEvent = 'onClick' as Event,\n triggerProps,\n open: openInProps,\n destroyOnClose = true,\n destroyOnHidden = true,\n maskClosable = false,\n okButtonProps,\n cancelButtonProps,\n onOk,\n afterOk,\n onCancel,\n afterClose,\n children,\n ...restProps\n } = mergedProps;\n useContextValidator();\n const FormComp = formComp as ComponentType<FormCompPropsConstraint<FormData> & RefAttributes<Ref>>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const triggerEventArgsRef = useRef<any[]>(undefined);\n const [open, setOpen] = useState(false);\n const saveFuncRef = useRef<(formData: FormData, ...args: any[]) => unknown>(undefined);\n const [isSaving, setIsSaving] = useState(false);\n const [formCompRef, setFormCompRef] = useState<Ref | null>(null);\n const [form, setForm] = useState<FormInstance<FormData>>();\n const formRef = useRef<FormInstance<FormData>>(form);\n formRef.current = form;\n const destroyOnCloseRef = useRef(destroyOnClose);\n destroyOnCloseRef.current = destroyOnClose || destroyOnHidden;\n const openListenerRef = useRef<ModalProps['afterOpenChange']>(undefined);\n\n // Listen to the open props changes\n useEffect(() => {\n if (openInProps) {\n setOpen(openInProps);\n }\n }, [openInProps]);\n\n // Reset the form after closed\n useEffect(() => {\n if (!destroyOnCloseRef.current && open && formRef.current) {\n formRef.current.resetFields();\n }\n }, [open]);\n\n // show trigger\n const showInProps = triggerProps?.show;\n const showTrigger = useMemo(() => {\n if (typeof showInProps === 'boolean') {\n return showInProps;\n } else if (typeof showInProps === 'function') {\n return showInProps(formProps);\n }\n return true;\n }, [showInProps, formProps]);\n\n // Show the dialog\n const showModal = useCallback(() => {\n setOpen(true);\n openListenerRef.current?.(true);\n }, []);\n // Hide the dialog\n const hideModal = useCallback(() => {\n setOpen(false);\n openListenerRef.current?.(false);\n }, []);\n // Set the dialog status listener\n const setOpenListener = useCallback(\n (listener: ModalProps['afterOpenChange']) => {\n openListenerRef.current = listener;\n // Call once when initialized\n openListenerRef.current?.(open);\n },\n [open]\n );\n // Receive the onSave callback method passed by the form component\n const setOnSaveHandler: FormCompPropsConstraint<FormData>['onSave'] = useCallback((handler) => {\n saveFuncRef.current = handler;\n }, []);\n // Set the dialog status and trigger the onOpenChange event of the form component\n const handleSetOpen = useCallback((open: boolean) => {\n setOpen(open);\n openListenerRef.current?.(open);\n }, []);\n\n // Output ref\n useImperativeHandle(ref, () => ({ ...formCompRef, show: showModal }) as ModalActionRef<Ref>, [\n formCompRef,\n showModal,\n ]);\n\n // Render the trigger component\n return (\n <>\n {showTrigger && (\n <Trigger\n {...triggerProps}\n // Trigger event\n {...((triggerEvent\n ? {\n [triggerEvent]: (...args: any[]) => {\n triggerEventArgsRef.current = args;\n showModal();\n if (triggerProps && typeof triggerProps[triggerEvent] === 'function') {\n (triggerProps[triggerEvent] as (...args: any[]) => void)(...args);\n }\n },\n }\n : {}) as TriggerProp)}\n >\n {(triggerProps as { children?: ReactNode }).children ?? children}\n </Trigger>\n )}\n <Modal\n open={open}\n confirmLoading={isSaving}\n destroyOnClose={destroyOnClose}\n destroyOnHidden={destroyOnHidden}\n maskClosable={maskClosable}\n okButtonProps={{\n loading: isSaving,\n ...okButtonProps,\n }}\n cancelButtonProps={{\n disabled: isSaving,\n ...cancelButtonProps,\n }}\n onOk={async () => {\n let formData: FormData;\n try {\n formData = (await form?.validateFields()) as FormData;\n } catch (e) {\n // Validation error, should not throw error\n return;\n }\n if (Object.keys(formData).length === 0) {\n console.warn(\n 'form.getFieldsValue() is empty. Please use the form instance passed to formComp instead of creating the form instance yourself.'\n );\n }\n try {\n setIsSaving(true);\n // First call onSave of the form component\n let result = await saveFuncRef.current?.(formData, ...(triggerEventArgsRef.current ?? []));\n // The onSave of the form component has the ability to prevent the dialog from closing\n if (result === SubmitWithoutClosingSymbol) {\n throw new Error('SubmitWithoutClosing');\n }\n // Then call onOk of the dialog, support asynchronous, and will pass the return value of onSave, if any\n if (onOk) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result = await onOk((result as FormData) ?? formData, ...((triggerEventArgsRef.current ?? []) as any));\n }\n // onOk also has the ability to prevent the dialog from closing\n if (result === SubmitWithoutClosingSymbol) {\n throw new Error('SubmitWithoutClosing');\n }\n // If onOK is successful, close the dialog and trigger the afterOk event\n hideModal();\n afterOk?.(result);\n } catch (error) {\n console.error(error);\n } finally {\n setIsSaving(false);\n }\n }}\n onCancel={async (e) => {\n hideModal();\n onCancel?.(e);\n }}\n afterClose={() => {\n hideModal();\n afterClose?.();\n }}\n {...restProps}\n >\n <FormCreator<FormData> onCreate={setForm} />\n {form && (\n <FormComp\n ref={isForwardRef(FormComp) ? setFormCompRef : undefined}\n {...formProps}\n form={form}\n onOpenChange={setOpenListener}\n onSave={setOnSaveHandler}\n triggerEventData={triggerEventArgsRef.current}\n setOpen={handleSetOpen}\n updateModalProps={setUserModalProps}\n />\n )}\n </Modal>\n </>\n );\n };\n return ModalActionRenderer;\n};\n\nfunction mergeProps<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n first?: Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>,\n second?: Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>\n) {\n return {\n ...first,\n ...second,\n okButtonProps: {\n ...first?.okButtonProps,\n ...second?.okButtonProps,\n },\n cancelButtonProps: {\n ...first?.cancelButtonProps,\n ...second?.cancelButtonProps,\n },\n bodyProps: {\n ...first?.bodyProps,\n ...second?.bodyProps,\n },\n maskProps: {\n ...first?.maskProps,\n ...second?.maskProps,\n },\n wrapProps: {\n ...first?.wrapProps,\n ...second?.wrapProps,\n },\n formProps: {\n ...first?.formProps,\n ...second?.formProps,\n },\n triggerProps: {\n ...first?.triggerProps,\n ...second?.triggerProps,\n style: {\n ...(first?.triggerProps && 'style' in first.triggerProps && typeof first.triggerProps.style === 'object'\n ? first.triggerProps.style\n : {}),\n ...(second?.triggerProps && 'style' in second.triggerProps && typeof second.triggerProps.style === 'object'\n ? second.triggerProps.style\n : {}),\n },\n },\n } as unknown as ModalActionProps<FormData, P, TriggerProp, Event, Ref>;\n}\n\nfunction FormCreator<FD extends object>(props: { onCreate: (form: FormInstance<FD> | undefined) => void }) {\n const { onCreate } = props;\n const onCreateRef = useRef(onCreate);\n onCreateRef.current = onCreate;\n const [form] = Form.useForm<FD>();\n\n // output ref\n useEffect(() => {\n onCreateRef.current(form);\n return () => {\n onCreateRef.current(undefined);\n };\n }, [form]);\n\n return null;\n}\n\n/**\n * - **EN:** Add default properties to the ModalAction component\n * - **CN:** 给ModalAction组件添加默认属性\n *\n * @param WrappedComponent ModalAction component | ModalAction组件\n * @param defaultProps Default properties | 默认属性\n */\nexport const withDefaultModalActionProps = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n WrappedComponent: ComponentType<\n ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>\n >,\n defaultProps?:\n | Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>\n | ((\n actualProps: ModalActionProps<FormData, P, TriggerProp, Event, Ref>\n ) => Partial<ModalActionProps<FormData, P, TriggerProp, Event, Ref>>)\n) => {\n const WithDefaultProps = forwardRef<ModalActionRef<Ref>, ModalActionProps<FormData, P, TriggerProp, Event, Ref>>(\n (props, ref) => {\n const useDefaultProps = typeof defaultProps === 'function' ? defaultProps : () => defaultProps;\n const defaults = useDefaultProps(props);\n const mergedProps =\n typeof defaultProps === 'function' ? mergeProps(props, defaults) : mergeProps(defaults, props);\n WithDefaultProps.displayName = 'ForwardRef(WithDefaultProps)';\n return <WrappedComponent ref={ref} {...mergedProps} />;\n }\n );\n return WithDefaultProps;\n};\n\nconst renderModalAction = genModalActionRenderer({});\nconst forwardedModalAction = forwardRef(renderModalAction);\nforwardedModalAction.displayName = 'ForwardRef(ModalAction)';\n/**\n * - **EN:** ModalAction component type\n * - **CN:** ModalAction组件的类型\n */\nexport type ModalActionInterface<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n> = ComponentType<ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>>;\n/**\n * - **EN:** ModalAction component with generic type\n * - **CN:** ModalAction泛型组件的类型\n */\nexport type GenericModalActionInterface = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n>(\n props: ModalActionProps<FormData, P, TriggerProp, Event, Ref> & RefAttributes<ModalActionRef<Ref>>\n) => ReactNode;\n/**\n * - **EN:** ModalAction with specified trigger type (specified form component)\n * - **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)\n */\ntype ModalActionWithTrigger<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n TriggerProp extends object,\n Event extends keyof TriggerProp,\n Ref extends object,\n OMIT extends string = never,\n> = ComponentType<\n Omit<ModalActionProps<FormData, P, TriggerProp, Event, Ref>, 'triggerComponent' | 'triggerEvent' | OMIT> &\n RefAttributes<ModalActionRef<Ref>>\n>;\n\n/**\n * - **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)\n * - **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)\n */\ntype GenericModalActionWithTrigger<TP extends object, E extends keyof TP, OMIT extends string = never> = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n>(\n props: Omit<ModalActionProps<FormData, P, TP, E, Ref>, 'triggerComponent' | 'triggerEvent' | OMIT> &\n RefAttributes<ModalActionRef<Ref>>\n) => ReactNode;\n\n/**\n * - **EN:** Built-in trigger types (specified form components)\n * - **CN:** 内置的几种触发器类型(已指定表单组件)\n */\ninterface TypedTriggers<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n OMIT extends string = never,\n> {\n /**\n * - **EN:** Dialog with button type trigger\n * - **CN:** 按钮类型的弹窗\n */\n Button: ModalActionWithTrigger<FormData, P, ButtonProps, 'onClick', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with switch type trigger\n * - **CN:** 开关类型的弹窗\n */\n Switch: ModalActionWithTrigger<FormData, P, SwitchProps, 'onChange', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with link type trigger\n * - **CN:** 链接类型的弹窗\n */\n Link: ModalActionWithTrigger<FormData, P, LinkProps, 'onClick', Ref, 'triggerComponent' | 'triggerEvent' | OMIT>;\n}\n/**\n * - **EN:** Built-in trigger types (generic types, unspecified form components)\n * - **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)\n */\ninterface GenericTypedTriggers<OMIT extends string = never> {\n /**\n * - **EN:** Dialog with button type trigger\n * - **CN:** 按钮类型的弹窗\n */\n Button: GenericModalActionWithTrigger<ButtonProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with switch type trigger\n * - **CN:** 开关类型的弹窗\n */\n Switch: GenericModalActionWithTrigger<SwitchProps, 'onChange', 'triggerComponent' | 'triggerEvent' | OMIT>;\n /**\n * - **EN:** Dialog with link type trigger\n * - **CN:** 链接类型的弹窗\n */\n Link: GenericModalActionWithTrigger<LinkProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;\n}\ntype WithGenericTriggers<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n Ref extends object,\n OMIT extends string = never,\n> = (<TriggerProp extends object, Event extends keyof TriggerProp>(\n props: Omit<ModalActionProps<FormData, P, TriggerProp, Event, Ref>, OMIT> & RefAttributes<ModalActionRef<Ref>>\n) => ReactNode) &\n (P extends never ? GenericTypedTriggers<OMIT> : TypedTriggers<FormData, P, Ref, OMIT>);\n\n/**\n * - **EN:** Add trigger types to the ModalAction component\n * - **CN:** 给ModalAction组件添加子触发器类型\n */\nconst addTriggers = <\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n OuterTriggerProp extends object,\n OuterEvent extends keyof OuterTriggerProp,\n Ref extends object,\n OMIT extends string = never,\n>(\n comp: ComponentType<\n ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref> & RefAttributes<ModalActionRef<Ref>>\n >\n) => {\n const patchedComp = comp as WithGenericTriggers<FormData, P, Ref, OMIT>;\n // Type of button trigger\n patchedComp.Button = withDefaultModalActionProps(\n comp as ModalActionInterface<FormData, P, ButtonProps, 'onClick', Ref>,\n {\n triggerComponent: Button,\n triggerEvent: 'onClick',\n triggerProps: {},\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // Type of switch trigger\n patchedComp.Switch = withDefaultModalActionProps(\n comp as ModalActionInterface<FormData, P, SwitchProps, 'onChange', Ref>,\n {\n triggerComponent: Switch,\n triggerEvent: 'onChange',\n triggerProps: {},\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // Type of link trigger\n patchedComp.Link = withDefaultModalActionProps(comp as ModalActionInterface<FormData, P, LinkProps, 'onClick', Ref>, {\n triggerComponent: Typography.Link,\n triggerEvent: 'onClick',\n triggerProps: {\n style: { whiteSpace: 'nowrap' },\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) as any;\n return patchedComp;\n};\n\n/**\n * - **EN:** Dialog component with trigger\n * - **CN:** 带触发器的弹窗组件\n */\nconst ModalAction = addTriggers(forwardedModalAction);\n\n/**\n * - **EN:** Dialog component with trigger\n * - **CN:** 带触发器的弹窗组件\n */\nexport type ModalActionWithStatic = typeof ModalAction & {\n /**\n * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when\n * returning in the `onSave` event of the editing form component\n * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效\n */\n SubmitWithoutClosing: symbol;\n};\n(ModalAction as ModalActionWithStatic).SubmitWithoutClosing = SubmitWithoutClosingSymbol;\n\n/**\n * - **EN:** Generate a dialog component based on the editing form component\n * - **CN:** 基于编辑表单组件生成一个弹框组件\n *\n * @template FormData Form data type | 表单数据类型\n * @template P Form component props type | 表单组件的props类型\n * @template OuterTriggerProp Outer trigger props type | 外部触发器的props类型\n * @template OuterEvent Outer trigger event type | 外部触发器的事件类型\n * @template Ref Form component ref type | 表单组件的ref类型\n *\n * @param formComp Component of dialog content | 弹窗内容组件\n * @param defaultProps Default properties of the dialog | 弹窗的默认属性\n */\nexport function withModalAction<\n FormData extends object,\n P extends FormCompPropsConstraint<FormData>,\n OuterTriggerProp extends object,\n OuterEvent extends keyof OuterTriggerProp,\n Ref extends object,\n>(\n formComp: ComponentType<P & FormCompPropsConstraint<FormData> & RefAttributes<Ref>>,\n defaultProps?:\n | Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>\n | ((\n actualProps: ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>\n ) => Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>)\n) {\n const ForwardedModalAction = forwardedModalAction as unknown as ModalActionInterface<\n FormData,\n P,\n OuterTriggerProp,\n OuterEvent,\n Ref\n >;\n const WithDefaultProps = forwardRef<\n ModalActionRef<Ref>,\n ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>\n >((props, ref) => {\n const useDefaultProps = typeof defaultProps === 'function' ? defaultProps : () => defaultProps;\n const defaults = useDefaultProps(props);\n const mergedProps = typeof defaultProps === 'function' ? mergeProps(props, defaults) : mergeProps(defaults, props);\n WithDefaultProps.displayName = 'ForwardRef(WithDefaultProps)';\n return (\n <ForwardedModalAction\n ref={ref}\n formComp={formComp}\n {...(mergedProps as Partial<ModalActionProps<FormData, P, OuterTriggerProp, OuterEvent, Ref>>)}\n />\n );\n });\n return addTriggers<FormData, P, OuterTriggerProp, OuterEvent, Ref, 'formComp'>(WithDefaultProps);\n}\n\nexport default ModalAction as ModalActionWithStatic;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAmG;AAEnG,kBAAwD;AAExD,sBAA6B;AAC7B,iCAAgC;AAOzB,IAAM,6BAA6B,OAAO,sBAAsB;AAuJhE,IAAM,yBAAyB,CAAC,iBAAyE;AAC9G,QAAM,sBAAsB,CAO1B,OACA,QACG;AACH,UAAM,CAAC,gBAAgB,iBAAiB,QAAI,uBAA8B,CAAC,CAAC;AAC5E,QAAI,cAAc,WAAiD,cAAc,KAAK;AACtF,kBAAc,WAAW,aAAa,cAA8B;AACpE,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA,kBAAkB,UAAU;AAAA,MAC5B,eAAe;AAAA,MACf;AAAA,MACA,MAAM;AAAA,MACN,iBAAiB;AAAA,MACjB,kBAAkB;AAAA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names": ["useContextValidator", "open"]
7
7
  }
@@ -16,6 +16,8 @@ export type { EditableTextProps } from './EditableText';
16
16
  export { default as EditableText } from './EditableText';
17
17
  export type { FloatDrawerProps } from './FloatDrawer';
18
18
  export { default as FloatDrawer } from './FloatDrawer';
19
+ export type { FormItemControlProps } from './FormItemControl';
20
+ export { default as FormItemControl } from './FormItemControl';
19
21
  export type { LoadingProps } from './Loading';
20
22
  export { default as Loading } from './Loading';
21
23
  export type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';
@@ -36,6 +36,7 @@ __export(components_exports, {
36
36
  DeleteConfirmAction: () => import_DeleteConfirmAction.default,
37
37
  EditableText: () => import_EditableText.default,
38
38
  FloatDrawer: () => import_FloatDrawer.default,
39
+ FormItemControl: () => import_FormItemControl.default,
39
40
  Loading: () => import_Loading.default,
40
41
  ModalAction: () => import_ModalAction2.default,
41
42
  OverflowTags: () => import_OverflowTags.default,
@@ -58,6 +59,7 @@ var import_DeleteConfirmAction = __toESM(require("./DeleteConfirmAction"));
58
59
  var import_withDeleteConfirmAction = __toESM(require("./DeleteConfirmAction/withDeleteConfirmAction"));
59
60
  var import_EditableText = __toESM(require("./EditableText"));
60
61
  var import_FloatDrawer = __toESM(require("./FloatDrawer"));
62
+ var import_FormItemControl = __toESM(require("./FormItemControl"));
61
63
  var import_Loading = __toESM(require("./Loading"));
62
64
  var import_ModalAction = require("./ModalAction");
63
65
  var import_ModalAction2 = __toESM(require("./ModalAction"));
@@ -71,6 +73,7 @@ var import_OverflowTags = __toESM(require("./OverflowTags"));
71
73
  DeleteConfirmAction,
72
74
  EditableText,
73
75
  FloatDrawer,
76
+ FormItemControl,
74
77
  Loading,
75
78
  ModalAction,
76
79
  OverflowTags,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/index.tsx"],
4
- "sourcesContent": ["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef, ActionCompConstraint } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as withConfirmAction } from './ConfirmAction/withConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\nexport type {\n ContextMenuProps,\n ContextMenuItem,\n ContextMenuSeparator,\n ContextMenuSubmenu,\n ContextMenuRef,\n} from './ContextMenu';\nexport { default as ContextMenu } from './ContextMenu';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\nexport { default as withDeleteConfirmAction } from './DeleteConfirmAction/withDeleteConfirmAction';\n\nexport type { EditableTextProps } from './EditableText';\nexport { default as EditableText } from './EditableText';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { LoadingProps } from './Loading';\nexport { default as Loading } from './Loading';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAsC;AAGtC,4BAA0C;AAE1C,qBAA4C;AAG5C,2BAA8C;AAC9C,+BAA6C;AAC7C,IAAAA,wBAAyC;AASzC,yBAAuC;AAGvC,iCAA+C;AAC/C,qCAAmD;AAGnD,0BAAwC;AAGxC,yBAAuC;AAGvC,qBAAmC;AAGnC,yBAA6D;AAC7D,IAAAC,sBAAuC;AAGvC,0BAAwC;",
4
+ "sourcesContent": ["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef, ActionCompConstraint } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as withConfirmAction } from './ConfirmAction/withConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\nexport type {\n ContextMenuProps,\n ContextMenuItem,\n ContextMenuSeparator,\n ContextMenuSubmenu,\n ContextMenuRef,\n} from './ContextMenu';\nexport { default as ContextMenu } from './ContextMenu';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\nexport { default as withDeleteConfirmAction } from './DeleteConfirmAction/withDeleteConfirmAction';\n\nexport type { EditableTextProps } from './EditableText';\nexport { default as EditableText } from './EditableText';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { FormItemControlProps } from './FormItemControl';\nexport { default as FormItemControl } from './FormItemControl';\n\nexport type { LoadingProps } from './Loading';\nexport { default as Loading } from './Loading';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAsC;AAGtC,4BAA0C;AAE1C,qBAA4C;AAG5C,2BAA8C;AAC9C,+BAA6C;AAC7C,IAAAA,wBAAyC;AASzC,yBAAuC;AAGvC,iCAA+C;AAC/C,qCAAmD;AAGnD,0BAAwC;AAGxC,yBAAuC;AAGvC,6BAA2C;AAG3C,qBAAmC;AAGnC,yBAA6D;AAC7D,IAAAC,sBAAuC;AAGvC,0BAAwC;",
6
6
  "names": ["import_ConfirmAction", "import_ModalAction"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiny-codes/react-easy",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Simplify React and AntDesign development with practical components and hooks",
5
5
  "keywords": [
6
6
  "react",