react-antd-xform 1.0.12-beta.2 → 1.0.13
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/README.md +5 -1
- package/dist/form/extend/form-array.js +2 -2
- package/dist/form/extend/form-check.js +2 -2
- package/dist/form/extend/form-effect.js +2 -2
- package/dist/form/extend/form-layout.js +4 -20
- package/dist/form/extend/form-model-consumer.js +2 -2
- package/dist/form/extend/form-object.js +2 -2
- package/dist/form/form-item/index.js +2 -2
- package/dist/form-ui/default-components/index.js +2 -2
- package/dist/form-ui/default-components/utils/render-preview.js +1 -1
- package/dist/form-ui/default-components/utils/value-change.js +9 -5
- package/dist/form-ui/extend/array-table/index.js +2 -2
- package/dist/node_modules/.pnpm/{dayjs@1.11.18 → dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js +1 -1
- package/dist/node_modules/.pnpm/{dayjs@1.11.18 → dayjs@1.11.19}/node_modules/dayjs/plugin/weekOfYear.js +1 -1
- package/dist/node_modules/.pnpm/{dayjs@1.11.18 → dayjs@1.11.19}/node_modules/dayjs/plugin/weekYear.js +1 -1
- package/dist/node_modules/.pnpm/{mobx-react-lite@4.1.0_mobx@6.13.7_react-dom@18.3.1_react@18.3.1__react@18.3.1 → mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/mobx-react-lite/es/ObserverComponent.js +1 -1
- package/dist/node_modules/.pnpm/{mobx-react-lite@4.1.0_mobx@6.13.7_react-dom@18.3.1_react@18.3.1__react@18.3.1 → mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/mobx-react-lite/es/index.js +1 -1
- package/dist/node_modules/.pnpm/{mobx-react-lite@4.1.0_mobx@6.13.7_react-dom@18.3.1_react@18.3.1__react@18.3.1 → mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/mobx-react-lite/es/useObserver.js +1 -1
- package/package.json +1 -1
- /package/dist/node_modules/.pnpm/{mobx-react-lite@4.1.0_mobx@6.13.7_react-dom@18.3.1_react@18.3.1__react@18.3.1 → mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/mobx-react-lite/es/observer.js +0 -0
- /package/dist/node_modules/.pnpm/{mobx-react-lite@4.1.0_mobx@6.13.7_react-dom@18.3.1_react@18.3.1__react@18.3.1 → mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/mobx-react-lite/es/utils/UniversalFinalizationRegistry.js +0 -0
- /package/dist/node_modules/.pnpm/{mobx-react-lite@4.1.0_mobx@6.13.7_react-dom@18.3.1_react@18.3.1__react@18.3.1 → mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/mobx-react-lite/es/utils/assertEnvironment.js +0 -0
- /package/dist/node_modules/.pnpm/{mobx-react-lite@4.1.0_mobx@6.13.7_react-dom@18.3.1_react@18.3.1__react@18.3.1 → mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/mobx-react-lite/es/utils/observerBatching.js +0 -0
- /package/dist/node_modules/.pnpm/{mobx-react-lite@4.1.0_mobx@6.13.7_react-dom@18.3.1_react@18.3.1__react@18.3.1 → mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/mobx-react-lite/es/utils/observerFinalizationRegistry.js +0 -0
- /package/dist/node_modules/.pnpm/{mobx-react-lite@4.1.0_mobx@6.13.7_react-dom@18.3.1_react@18.3.1__react@18.3.1 → mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/mobx-react-lite/es/utils/printDebugValue.js +0 -0
- /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@18.3.1 → use-sync-external-store@1.6.0_react@18.3.1}/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -0
- /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@18.3.1 → use-sync-external-store@1.6.0_react@18.3.1}/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -0
- /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@18.3.1 → use-sync-external-store@1.6.0_react@18.3.1}/node_modules/use-sync-external-store/shim/index.js +0 -0
package/README.md
CHANGED
|
@@ -14,4 +14,8 @@ pnpm add react-antd-xform
|
|
|
14
14
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
文档地址:https://jhuazhang.github.io/react-antd-xform
|
|
17
|
+
文档地址:https://jhuazhang.github.io/react-antd-xform
|
|
18
|
+
|
|
19
|
+
或者访问 http://handn.xyz/react-antd-xform
|
|
20
|
+
|
|
21
|
+
或者访问 https://react-antd-xform.vercel.app/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
2
|
+
import "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/index.js";
|
|
3
3
|
import { useModel, ModelProvider } from "../context/modelContext.js";
|
|
4
4
|
import { range } from "../utils/common-utils.js";
|
|
5
5
|
import { arrayHelpers } from "../helpers/array-helper.js";
|
|
6
|
-
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
6
|
+
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/observer.js";
|
|
7
7
|
const defaultArrayLayout = ({
|
|
8
8
|
arrayModel,
|
|
9
9
|
itemContent,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useLayoutEffect, useEffect } from "react";
|
|
2
2
|
import { reaction } from "mobx";
|
|
3
|
-
import "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
3
|
+
import "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/index.js";
|
|
4
4
|
import { useModel } from "../context/modelContext.js";
|
|
5
5
|
import { useFormEnv } from "../context/formEnvContext.js";
|
|
6
6
|
import { composeValue, convertWatchableToExpression } from "../utils/common-utils.js";
|
|
7
|
-
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
7
|
+
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/observer.js";
|
|
8
8
|
const FormCheck = observer(function FormCheck2({
|
|
9
9
|
name,
|
|
10
10
|
check: checkProp,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useRef, useEffect } from "react";
|
|
2
|
-
import "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
2
|
+
import "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/index.js";
|
|
3
3
|
import { reaction } from "mobx";
|
|
4
4
|
import { useModel } from "../context/modelContext.js";
|
|
5
5
|
import { convertWatchableToExpression } from "../utils/common-utils.js";
|
|
6
|
-
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
6
|
+
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/observer.js";
|
|
7
7
|
const FormEffect = observer(function FormEffect2({
|
|
8
8
|
watch,
|
|
9
9
|
effect,
|
|
@@ -98,26 +98,10 @@ const FormLayoutContainer = styled.div`
|
|
|
98
98
|
.form-item-control {
|
|
99
99
|
position: relative;
|
|
100
100
|
width: var(--control-width);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
> .next-range {
|
|
108
|
-
margin: 8px 0;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
> .next-rating {
|
|
112
|
-
margin-top: 4px;
|
|
113
|
-
margin-bottom: 2px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
> .next-checkbox-group,
|
|
117
|
-
> .next-radio-group,
|
|
118
|
-
> .next-checkbox-wrapper {
|
|
119
|
-
display: inline-block;
|
|
120
|
-
line-height: 18px;
|
|
101
|
+
.ant-rate,
|
|
102
|
+
.ant-checkbox-group,
|
|
103
|
+
.ant-radio-group {
|
|
104
|
+
padding-top: var(--form-item-label-top-position);
|
|
121
105
|
}
|
|
122
106
|
}
|
|
123
107
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
1
|
+
import "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/index.js";
|
|
2
2
|
import { useModel } from "../context/modelContext.js";
|
|
3
|
-
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
3
|
+
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/observer.js";
|
|
4
4
|
const FormModelConsumer = observer(({
|
|
5
5
|
children
|
|
6
6
|
}) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
2
|
+
import "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/index.js";
|
|
3
3
|
import { useModel, ModelProvider } from "../context/modelContext.js";
|
|
4
|
-
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
4
|
+
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/observer.js";
|
|
5
5
|
const FormObject = observer(({
|
|
6
6
|
name,
|
|
7
7
|
children,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import React, { useLayoutEffect, useEffect } from "react";
|
|
3
3
|
import cx from "../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
|
|
4
|
-
import "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
4
|
+
import "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/index.js";
|
|
5
5
|
import stringifyObject from "../../node_modules/.pnpm/stringify-object@5.0.0/node_modules/stringify-object/index.js";
|
|
6
6
|
import { toJS, reaction, runInAction } from "mobx";
|
|
7
7
|
import { FieldType } from "../types/enum.js";
|
|
@@ -10,7 +10,7 @@ import { Field } from "../model/model.js";
|
|
|
10
10
|
import { useModel } from "../context/modelContext.js";
|
|
11
11
|
import { useFormEnv } from "../context/formEnvContext.js";
|
|
12
12
|
import { ALL_COMPONENTS } from "../../form-ui/default-components/index.js";
|
|
13
|
-
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
13
|
+
import { observer } from "../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/observer.js";
|
|
14
14
|
function processCreationOptions(options) {
|
|
15
15
|
const render = options.render ?? ((props) => React.createElement(options.component, props));
|
|
16
16
|
return {
|
|
@@ -74,7 +74,7 @@ const COMPONENT_RULES = {
|
|
|
74
74
|
hasIntrinsicWidth: false
|
|
75
75
|
},
|
|
76
76
|
inputNumber: {
|
|
77
|
-
hocs: [
|
|
77
|
+
hocs: [],
|
|
78
78
|
renderPreview: renderValueToPreview,
|
|
79
79
|
hasIntrinsicWidth: false
|
|
80
80
|
},
|
|
@@ -84,7 +84,7 @@ const COMPONENT_RULES = {
|
|
|
84
84
|
hasIntrinsicWidth: false
|
|
85
85
|
},
|
|
86
86
|
switch: {
|
|
87
|
-
hocs: [
|
|
87
|
+
hocs: [],
|
|
88
88
|
renderPreview: renderBooleanPreview,
|
|
89
89
|
hasIntrinsicWidth: false
|
|
90
90
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import dayjs from "../../../node_modules/.pnpm/dayjs@1.11.
|
|
2
|
+
import dayjs from "../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/dayjs.min.js";
|
|
3
3
|
const renderValueToPreview = (props) => {
|
|
4
4
|
const {
|
|
5
5
|
value
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import React, { useMemo, useCallback } from "react";
|
|
3
|
-
import dayjs from "../../../node_modules/.pnpm/dayjs@1.11.
|
|
4
|
-
import weekYear from "../../../node_modules/.pnpm/dayjs@1.11.
|
|
5
|
-
import weekOfYear from "../../../node_modules/.pnpm/dayjs@1.11.
|
|
3
|
+
import dayjs from "../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/dayjs.min.js";
|
|
4
|
+
import weekYear from "../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/weekYear.js";
|
|
5
|
+
import weekOfYear from "../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/weekOfYear.js";
|
|
6
6
|
dayjs.extend(weekOfYear);
|
|
7
7
|
dayjs.extend(weekYear);
|
|
8
8
|
if (!dayjs.__patchedForAntd__) {
|
|
@@ -40,8 +40,12 @@ const isEmptyDateValue = (val) => val == null || val === "" || Array.isArray(val
|
|
|
40
40
|
const withValueChangeHandler = (Component) => {
|
|
41
41
|
return (props) => {
|
|
42
42
|
const handleChange = (e) => {
|
|
43
|
-
var _a;
|
|
44
|
-
(_a =
|
|
43
|
+
var _a, _b, _c;
|
|
44
|
+
if ((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value) {
|
|
45
|
+
(_b = props.onChange) == null ? void 0 : _b.call(props, e.target.value);
|
|
46
|
+
} else {
|
|
47
|
+
(_c = props.onChange) == null ? void 0 : _c.call(props, e);
|
|
48
|
+
}
|
|
45
49
|
};
|
|
46
50
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...props, onChange: handleChange });
|
|
47
51
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { action } from "mobx";
|
|
4
|
-
import "../../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
4
|
+
import "../../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/index.js";
|
|
5
5
|
import { Table, Popconfirm, Button } from "antd";
|
|
6
6
|
import { enhanceTableColumns } from "./utils/columm-utils.js";
|
|
7
7
|
import { calculateArrayTableData } from "./utils/calculateArrayTableData.js";
|
|
8
|
-
import { observer } from "../../../node_modules/.pnpm/mobx-react-lite@4.1.
|
|
8
|
+
import { observer } from "../../../node_modules/.pnpm/mobx-react-lite@4.1.1_mobx@6.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/mobx-react-lite/es/observer.js";
|
|
9
9
|
import { Form } from "../../../form/form/index.js";
|
|
10
10
|
import { useFormEnv } from "../../../form/context/formEnvContext.js";
|
|
11
11
|
import { arrayHelpers } from "../../../form/helpers/array-helper.js";
|
package/dist/node_modules/.pnpm/{dayjs@1.11.18 → dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs, commonjsGlobal } from "../../../../../_virtual/_commonjsHelpers.js";
|
|
2
2
|
import { __module as dayjs_min } from "../../../../../_virtual/dayjs.min.js";
|
|
3
|
-
(function(module, exports) {
|
|
3
|
+
(function(module, exports$1) {
|
|
4
4
|
!function(t, e) {
|
|
5
5
|
module.exports = e();
|
|
6
6
|
}(commonjsGlobal, function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
2
|
import { __module as weekOfYear$1 } from "../../../../../../_virtual/weekOfYear.js";
|
|
3
|
-
(function(module, exports) {
|
|
3
|
+
(function(module, exports$1) {
|
|
4
4
|
!function(e, t) {
|
|
5
5
|
module.exports = t();
|
|
6
6
|
}(commonjsGlobal, function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
2
|
import { __module as weekYear$1 } from "../../../../../../_virtual/weekYear.js";
|
|
3
|
-
(function(module, exports) {
|
|
3
|
+
(function(module, exports$1) {
|
|
4
4
|
!function(e, t) {
|
|
5
5
|
module.exports = t();
|
|
6
6
|
}(commonjsGlobal, function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "mobx";
|
|
2
2
|
import "react";
|
|
3
3
|
import "./utils/observerFinalizationRegistry.js";
|
|
4
|
-
import "../../../../use-sync-external-store@1.
|
|
4
|
+
import "../../../../use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js";
|
|
5
5
|
if ("production" !== process.env.NODE_ENV) ;
|
|
@@ -4,7 +4,7 @@ import { observerBatching } from "./utils/observerBatching.js";
|
|
|
4
4
|
import "mobx";
|
|
5
5
|
import "react";
|
|
6
6
|
import { observerFinalizationRegistry } from "./utils/observerFinalizationRegistry.js";
|
|
7
|
-
import "../../../../use-sync-external-store@1.
|
|
7
|
+
import "../../../../use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js";
|
|
8
8
|
import { observer } from "./observer.js";
|
|
9
9
|
import "./ObserverComponent.js";
|
|
10
10
|
var _a;
|
|
@@ -2,7 +2,7 @@ import { Reaction } from "mobx";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { printDebugValue } from "./utils/printDebugValue.js";
|
|
4
4
|
import { observerFinalizationRegistry } from "./utils/observerFinalizationRegistry.js";
|
|
5
|
-
import { s as shimExports } from "../../../../use-sync-external-store@1.
|
|
5
|
+
import { s as shimExports } from "../../../../use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js";
|
|
6
6
|
function createReaction(adm) {
|
|
7
7
|
adm.reaction = new Reaction("observer".concat(adm.name), function() {
|
|
8
8
|
var _a;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|