react-antd-xform 1.0.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/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/jsx-runtime.js +4 -0
- package/dist/_virtual/react-jsx-runtime.development.js +4 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +4 -0
- package/dist/form/array-helper.d.ts +12 -0
- package/dist/form/array-helper.js +115 -0
- package/dist/form/common-utils.d.ts +12 -0
- package/dist/form/common-utils.js +90 -0
- package/dist/form/context/formEnvContext.d.ts +6 -0
- package/dist/form/context/formEnvContext.js +23 -0
- package/dist/form/context/modelContext.d.ts +4 -0
- package/dist/form/context/modelContext.js +11 -0
- package/dist/form/enum.d.ts +9 -0
- package/dist/form/enum.js +15 -0
- package/dist/form/form-item.d.ts +15 -0
- package/dist/form/form-item.js +286 -0
- package/dist/form/index.d.ts +22 -0
- package/dist/form/index.js +73 -0
- package/dist/form/layout.d.ts +4 -0
- package/dist/form/layout.js +180 -0
- package/dist/form/model-utils.d.ts +23 -0
- package/dist/form/model-utils.js +171 -0
- package/dist/form/model.d.ts +103 -0
- package/dist/form/model.js +504 -0
- package/dist/form/type.d.ts +289 -0
- package/dist/form-ui/common-utils.d.ts +9 -0
- package/dist/form-ui/common-utils.js +17 -0
- package/dist/form-ui/default-button.d.ts +3 -0
- package/dist/form-ui/default-button.js +39 -0
- package/dist/form-ui/default-component.d.ts +2 -0
- package/dist/form-ui/default-component.js +63 -0
- package/dist/form-ui/type.d.ts +2 -0
- package/dist/helpers/AsyncValue.d.ts +38 -0
- package/dist/helpers/AsyncValue.js +154 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +20 -0
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +63 -0
- package/dist/node_modules/.pnpm/get-own-enumerable-keys@1.0.0/node_modules/get-own-enumerable-keys/index.js +10 -0
- package/dist/node_modules/.pnpm/invariant@2.2.4/node_modules/invariant/browser.js +32 -0
- package/dist/node_modules/.pnpm/is-obj@3.0.0/node_modules/is-obj/index.js +7 -0
- package/dist/node_modules/.pnpm/is-regexp@3.1.0/node_modules/is-regexp/index.js +7 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js +8 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js +7 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js +25 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js +7 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +24 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePick.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePickBy.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js +33 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSetToString.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js +7 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +6 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js +10 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js +27 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js +7 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js +27 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js +10 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js +9 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js +8 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +8 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +10 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +9 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +9 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +9 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +7 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js +9 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js +8 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToString.js +8 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_shortOut.js +21 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js +9 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js +7 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js +10 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js +10 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js +7 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js +5 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js +8 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js +8 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js +7 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js +24 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js +9 -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/node_modules/mobx-react-lite/es/ObserverComponent.js +5 -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/node_modules/mobx-react-lite/es/index.js +18 -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/node_modules/mobx-react-lite/es/observer.js +84 -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/node_modules/mobx-react-lite/es/useObserver.js +72 -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/node_modules/mobx-react-lite/es/utils/UniversalFinalizationRegistry.js +96 -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/node_modules/mobx-react-lite/es/utils/assertEnvironment.js +8 -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/node_modules/mobx-react-lite/es/utils/observerBatching.js +17 -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/node_modules/mobx-react-lite/es/utils/observerFinalizationRegistry.js +9 -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/node_modules/mobx-react-lite/es/utils/printDebugValue.js +7 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js +890 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js +33 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js +12 -0
- package/dist/node_modules/.pnpm/stringify-object@5.0.0/node_modules/stringify-object/index.js +94 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +77 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +62 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js +12 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +58 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { __exports as reactJsxRuntime_production_min } from "../../../../../../_virtual/react-jsx-runtime.production.min.js";
|
|
2
|
+
import require$$0 from "react";
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* react-jsx-runtime.production.min.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var hasRequiredReactJsxRuntime_production_min;
|
|
13
|
+
function requireReactJsxRuntime_production_min() {
|
|
14
|
+
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
15
|
+
hasRequiredReactJsxRuntime_production_min = 1;
|
|
16
|
+
var f = require$$0, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
|
|
17
|
+
function q(c, a, g) {
|
|
18
|
+
var b, d = {}, e = null, h = null;
|
|
19
|
+
void 0 !== g && (e = "" + g);
|
|
20
|
+
void 0 !== a.key && (e = "" + a.key);
|
|
21
|
+
void 0 !== a.ref && (h = a.ref);
|
|
22
|
+
for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
23
|
+
if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
|
|
24
|
+
return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
|
|
25
|
+
}
|
|
26
|
+
reactJsxRuntime_production_min.Fragment = l;
|
|
27
|
+
reactJsxRuntime_production_min.jsx = q;
|
|
28
|
+
reactJsxRuntime_production_min.jsxs = q;
|
|
29
|
+
return reactJsxRuntime_production_min;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
requireReactJsxRuntime_production_min as __require
|
|
33
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __module as jsxRuntime } from "../../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { __require as requireReactJsxRuntime_production_min } from "./cjs/react-jsx-runtime.production.min.js";
|
|
3
|
+
import { __require as requireReactJsxRuntime_development } from "./cjs/react-jsx-runtime.development.js";
|
|
4
|
+
if (process.env.NODE_ENV === "production") {
|
|
5
|
+
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
6
|
+
} else {
|
|
7
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
8
|
+
}
|
|
9
|
+
var jsxRuntimeExports = jsxRuntime.exports;
|
|
10
|
+
export {
|
|
11
|
+
jsxRuntimeExports as j
|
|
12
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import isRegexp from "../../../is-regexp@3.1.0/node_modules/is-regexp/index.js";
|
|
2
|
+
import isObject from "../../../is-obj@3.0.0/node_modules/is-obj/index.js";
|
|
3
|
+
import getOwnEnumerableKeys from "../../../get-own-enumerable-keys@1.0.0/node_modules/get-own-enumerable-keys/index.js";
|
|
4
|
+
function stringifyObject(input, options, pad) {
|
|
5
|
+
const seen = [];
|
|
6
|
+
return function stringify(input2, options2 = {}, pad2 = "") {
|
|
7
|
+
const indent = options2.indent || " ";
|
|
8
|
+
let tokens;
|
|
9
|
+
if (options2.inlineCharacterLimit === void 0) {
|
|
10
|
+
tokens = {
|
|
11
|
+
newline: "\n",
|
|
12
|
+
newlineOrSpace: "\n",
|
|
13
|
+
pad: pad2,
|
|
14
|
+
indent: pad2 + indent
|
|
15
|
+
};
|
|
16
|
+
} else {
|
|
17
|
+
tokens = {
|
|
18
|
+
newline: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
|
|
19
|
+
newlineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
|
|
20
|
+
pad: "@@__STRINGIFY_OBJECT_PAD__@@",
|
|
21
|
+
indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const expandWhiteSpace = (string) => {
|
|
25
|
+
if (options2.inlineCharacterLimit === void 0) {
|
|
26
|
+
return string;
|
|
27
|
+
}
|
|
28
|
+
const oneLined = string.replace(new RegExp(tokens.newline, "g"), "").replace(new RegExp(tokens.newlineOrSpace, "g"), " ").replace(new RegExp(tokens.pad + "|" + tokens.indent, "g"), "");
|
|
29
|
+
if (oneLined.length <= options2.inlineCharacterLimit) {
|
|
30
|
+
return oneLined;
|
|
31
|
+
}
|
|
32
|
+
return string.replace(new RegExp(tokens.newline + "|" + tokens.newlineOrSpace, "g"), "\n").replace(new RegExp(tokens.pad, "g"), pad2).replace(new RegExp(tokens.indent, "g"), pad2 + indent);
|
|
33
|
+
};
|
|
34
|
+
if (seen.includes(input2)) {
|
|
35
|
+
return '"[Circular]"';
|
|
36
|
+
}
|
|
37
|
+
if (input2 === null || input2 === void 0 || typeof input2 === "number" || typeof input2 === "boolean" || typeof input2 === "function" || typeof input2 === "symbol" || isRegexp(input2)) {
|
|
38
|
+
return String(input2);
|
|
39
|
+
}
|
|
40
|
+
if (input2 instanceof Date) {
|
|
41
|
+
return `new Date('${input2.toISOString()}')`;
|
|
42
|
+
}
|
|
43
|
+
if (Array.isArray(input2)) {
|
|
44
|
+
if (input2.length === 0) {
|
|
45
|
+
return "[]";
|
|
46
|
+
}
|
|
47
|
+
seen.push(input2);
|
|
48
|
+
const returnValue = "[" + tokens.newline + input2.map((element, i) => {
|
|
49
|
+
const eol = input2.length - 1 === i ? tokens.newline : "," + tokens.newlineOrSpace;
|
|
50
|
+
let value = stringify(element, options2, pad2 + indent);
|
|
51
|
+
if (options2.transform) {
|
|
52
|
+
value = options2.transform(input2, i, value);
|
|
53
|
+
}
|
|
54
|
+
return tokens.indent + value + eol;
|
|
55
|
+
}).join("") + tokens.pad + "]";
|
|
56
|
+
seen.pop();
|
|
57
|
+
return expandWhiteSpace(returnValue);
|
|
58
|
+
}
|
|
59
|
+
if (isObject(input2)) {
|
|
60
|
+
let objectKeys = getOwnEnumerableKeys(input2);
|
|
61
|
+
if (options2.filter) {
|
|
62
|
+
objectKeys = objectKeys.filter((element) => options2.filter(input2, element));
|
|
63
|
+
}
|
|
64
|
+
if (objectKeys.length === 0) {
|
|
65
|
+
return "{}";
|
|
66
|
+
}
|
|
67
|
+
seen.push(input2);
|
|
68
|
+
const returnValue = "{" + tokens.newline + objectKeys.map((element, index) => {
|
|
69
|
+
const eol = objectKeys.length - 1 === index ? tokens.newline : "," + tokens.newlineOrSpace;
|
|
70
|
+
const isSymbol = typeof element === "symbol";
|
|
71
|
+
const isClassic = !isSymbol && /^[a-z$_][$\w]*$/i.test(element);
|
|
72
|
+
const key = isSymbol || isClassic ? element : stringify(element, options2);
|
|
73
|
+
let value = stringify(input2[element], options2, pad2 + indent);
|
|
74
|
+
if (options2.transform) {
|
|
75
|
+
value = options2.transform(input2, element, value);
|
|
76
|
+
}
|
|
77
|
+
return tokens.indent + String(key) + ": " + value + eol;
|
|
78
|
+
}).join("") + tokens.pad + "}";
|
|
79
|
+
seen.pop();
|
|
80
|
+
return expandWhiteSpace(returnValue);
|
|
81
|
+
}
|
|
82
|
+
input2 = input2.replace(/\\/g, "\\\\");
|
|
83
|
+
input2 = String(input2).replace(/[\r\n]/g, (x) => x === "\n" ? "\\n" : "\\r");
|
|
84
|
+
if (options2.singleQuotes === false) {
|
|
85
|
+
input2 = input2.replace(/"/g, '\\"');
|
|
86
|
+
return `"${input2}"`;
|
|
87
|
+
}
|
|
88
|
+
input2 = input2.replace(/'/g, "\\'");
|
|
89
|
+
return `'${input2}'`;
|
|
90
|
+
}(input, options, pad);
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
stringifyObject as default
|
|
94
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { __exports as useSyncExternalStoreShim_development } from "../../../../../../_virtual/use-sync-external-store-shim.development.js";
|
|
2
|
+
import require$$0 from "react";
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* use-sync-external-store-shim.development.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var hasRequiredUseSyncExternalStoreShim_development;
|
|
13
|
+
function requireUseSyncExternalStoreShim_development() {
|
|
14
|
+
if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
|
|
15
|
+
hasRequiredUseSyncExternalStoreShim_development = 1;
|
|
16
|
+
"production" !== process.env.NODE_ENV && function() {
|
|
17
|
+
function is(x, y) {
|
|
18
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
19
|
+
}
|
|
20
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
21
|
+
didWarnOld18Alpha || void 0 === React.startTransition || (didWarnOld18Alpha = true, console.error(
|
|
22
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
23
|
+
));
|
|
24
|
+
var value = getSnapshot();
|
|
25
|
+
if (!didWarnUncachedGetSnapshot) {
|
|
26
|
+
var cachedValue = getSnapshot();
|
|
27
|
+
objectIs(value, cachedValue) || (console.error(
|
|
28
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
29
|
+
), didWarnUncachedGetSnapshot = true);
|
|
30
|
+
}
|
|
31
|
+
cachedValue = useState({
|
|
32
|
+
inst: { value, getSnapshot }
|
|
33
|
+
});
|
|
34
|
+
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
35
|
+
useLayoutEffect(
|
|
36
|
+
function() {
|
|
37
|
+
inst.value = value;
|
|
38
|
+
inst.getSnapshot = getSnapshot;
|
|
39
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
40
|
+
},
|
|
41
|
+
[subscribe, value, getSnapshot]
|
|
42
|
+
);
|
|
43
|
+
useEffect(
|
|
44
|
+
function() {
|
|
45
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
46
|
+
return subscribe(function() {
|
|
47
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
[subscribe]
|
|
51
|
+
);
|
|
52
|
+
useDebugValue(value);
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
function checkIfSnapshotChanged(inst) {
|
|
56
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
57
|
+
inst = inst.value;
|
|
58
|
+
try {
|
|
59
|
+
var nextValue = latestGetSnapshot();
|
|
60
|
+
return !objectIs(inst, nextValue);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
66
|
+
return getSnapshot();
|
|
67
|
+
}
|
|
68
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
69
|
+
var React = require$$0, objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
70
|
+
useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
71
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
72
|
+
}();
|
|
73
|
+
return useSyncExternalStoreShim_development;
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
requireUseSyncExternalStoreShim_development as __require
|
|
77
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { __exports as useSyncExternalStoreShim_production } from "../../../../../../_virtual/use-sync-external-store-shim.production.js";
|
|
2
|
+
import require$$0 from "react";
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* use-sync-external-store-shim.production.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var hasRequiredUseSyncExternalStoreShim_production;
|
|
13
|
+
function requireUseSyncExternalStoreShim_production() {
|
|
14
|
+
if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
|
|
15
|
+
hasRequiredUseSyncExternalStoreShim_production = 1;
|
|
16
|
+
var React = require$$0;
|
|
17
|
+
function is(x, y) {
|
|
18
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
19
|
+
}
|
|
20
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
|
|
21
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
22
|
+
var value = getSnapshot(), _useState = useState({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
23
|
+
useLayoutEffect(
|
|
24
|
+
function() {
|
|
25
|
+
inst.value = value;
|
|
26
|
+
inst.getSnapshot = getSnapshot;
|
|
27
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
28
|
+
},
|
|
29
|
+
[subscribe, value, getSnapshot]
|
|
30
|
+
);
|
|
31
|
+
useEffect(
|
|
32
|
+
function() {
|
|
33
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
34
|
+
return subscribe(function() {
|
|
35
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
[subscribe]
|
|
39
|
+
);
|
|
40
|
+
useDebugValue(value);
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
function checkIfSnapshotChanged(inst) {
|
|
44
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
45
|
+
inst = inst.value;
|
|
46
|
+
try {
|
|
47
|
+
var nextValue = latestGetSnapshot();
|
|
48
|
+
return !objectIs(inst, nextValue);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
54
|
+
return getSnapshot();
|
|
55
|
+
}
|
|
56
|
+
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
57
|
+
useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
58
|
+
return useSyncExternalStoreShim_production;
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
requireUseSyncExternalStoreShim_production as __require
|
|
62
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __module as shim } from "../../../../../../_virtual/index2.js";
|
|
2
|
+
import { __require as requireUseSyncExternalStoreShim_production } from "../cjs/use-sync-external-store-shim.production.js";
|
|
3
|
+
import { __require as requireUseSyncExternalStoreShim_development } from "../cjs/use-sync-external-store-shim.development.js";
|
|
4
|
+
if (process.env.NODE_ENV === "production") {
|
|
5
|
+
shim.exports = requireUseSyncExternalStoreShim_production();
|
|
6
|
+
} else {
|
|
7
|
+
shim.exports = requireUseSyncExternalStoreShim_development();
|
|
8
|
+
}
|
|
9
|
+
var shimExports = shim.exports;
|
|
10
|
+
export {
|
|
11
|
+
shimExports as s
|
|
12
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-antd-xform",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "基于mobx的form解决方案",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"keywords": [],
|
|
14
|
+
"author": "",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/invariant": "^2.2.37",
|
|
18
|
+
"@types/lodash.pick": "^4.4.9",
|
|
19
|
+
"@types/stringify-object": "^4.0.5",
|
|
20
|
+
"antd": "^5.26.2",
|
|
21
|
+
"classnames": "^2.5.1",
|
|
22
|
+
"invariant": "^2.2.4",
|
|
23
|
+
"lodash": "^4.17.21",
|
|
24
|
+
"mobx": "^6.13.7",
|
|
25
|
+
"mobx-react-lite": "^4.1.0",
|
|
26
|
+
"stringify-object": "^5.0.0",
|
|
27
|
+
"styled-components": "^6.1.19",
|
|
28
|
+
"tslib": "^2.8.1"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@storybook/addon-essentials": "^7.5.3",
|
|
32
|
+
"@storybook/builder-vite": "^7.5.3",
|
|
33
|
+
"@storybook/cli": "^7.5.3",
|
|
34
|
+
"@storybook/react": "^7.5.3",
|
|
35
|
+
"@storybook/react-vite": "^7.5.3",
|
|
36
|
+
"@types/react": "^18.2.66",
|
|
37
|
+
"@types/react-dom": "^18.2.22",
|
|
38
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
39
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
40
|
+
"react": "^18.2.0",
|
|
41
|
+
"react-dom": "^18.2.0",
|
|
42
|
+
"react-json-view": "^1.21.3",
|
|
43
|
+
"react-syntax-highlighter": "^15.6.1",
|
|
44
|
+
"vite": "^5.2.0",
|
|
45
|
+
"vite-plugin-dts": "^4.5.4"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"mobx": "^6.13.7",
|
|
49
|
+
"mobx-react-lite": "^4.1.0",
|
|
50
|
+
"react": "^18.2.0",
|
|
51
|
+
"react-dom": "^18.2.0"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "vite build",
|
|
55
|
+
"dev": "sb dev -p 6006",
|
|
56
|
+
"build-storybook": "sb build"
|
|
57
|
+
}
|
|
58
|
+
}
|