New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@formily/core

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formily/core - npm Package Compare versions

Comparing version

to
1.0.5

@@ -971,3 +971,3 @@ "use strict";

if (hostRendering && graph.size > 200)
env.leadingValidate = true;
env.hostRendering = true;
return [4, validator.validate(path, opts)];

@@ -984,3 +984,3 @@ case 1:

}
env.leadingValidate = false;
env.hostRendering = false;
result = {

@@ -1161,4 +1161,4 @@ errors: payload.errors.map(function (item) { return (__assign(__assign({}, item), { name: getFieldState(item.path).name })); }),

}
function isLeadingValidate() {
return env.leadingValidate;
function isHostRendering() {
return env.hostRendering;
}

@@ -1191,3 +1191,11 @@ var state = new form_1.FormState(options);

getFieldInitialValue: getFieldInitialValue,
isLeadingValidate: isLeadingValidate,
isHostRendering: isHostRendering,
batchUpdate: function (callback) {
if (shared_1.isFn(callback)) {
env.hostRendering = true;
callback();
heart.publish(types_1.LifeCycleTypes.ON_FORM_HOST_RENDER, state);
env.hostRendering = false;
}
},
subscribe: function (callback) {

@@ -1213,3 +1221,3 @@ return heart.subscribe(callback);

leadingStage: false,
leadingValidate: false,
hostRendering: false,
publishing: {},

@@ -1216,0 +1224,0 @@ taskQueue: [],

@@ -134,3 +134,2 @@ import { FormPath, FormPathPattern, Subscribable } from '@formily/shared';

useDirty?: boolean;
useListMode?: boolean;
computeState?: (draft: IFieldState, prevState: IFieldState) => void;

@@ -283,3 +282,4 @@ }

notify: <T>(type: string, payload?: T) => void;
isLeadingValidate: () => boolean;
isHostRendering: () => boolean;
batchUpdate: (callback?: () => void) => void;
setFieldValue(path?: FormPathPattern, value?: any): void;

@@ -286,0 +286,0 @@ getFieldValue(path?: FormPathPattern): any;

{
"name": "@formily/core",
"version": "1.0.4",
"version": "1.0.5",
"license": "MIT",

@@ -25,8 +25,7 @@ "main": "lib",

"peerDependencies": {
"@babel/runtime": "^7.4.4",
"scheduler": ">=0.11.2"
},
"dependencies": {
"@formily/shared": "^1.0.4",
"@formily/validator": "^1.0.4",
"@formily/shared": "^1.0.5",
"@formily/validator": "^1.0.5",
"immer": "^3.2.0"

@@ -37,3 +36,3 @@ },

},
"gitHead": "386c592b8ae70e472973b76c5beff6f2f68c8f6e"
"gitHead": "e442ec065eecb7983498462f32df24138078647a"
}

@@ -1042,3 +1042,3 @@ import {

heart.publish(LifeCycleTypes.ON_FORM_VALIDATE_START, state)
if (hostRendering && graph.size > 200) env.leadingValidate = true
if (hostRendering && graph.size > 200) env.hostRendering = true
const payload = await validator.validate(path, opts)

@@ -1053,3 +1053,3 @@ clearTimeout(env.validateTimer)

}
env.leadingValidate = false
env.hostRendering = false
// 增加name透出真实路径,和0.x保持一致

@@ -1277,4 +1277,4 @@ const result = {

function isLeadingValidate() {
return env.leadingValidate
function isHostRendering() {
return env.hostRendering
}

@@ -1311,3 +1311,11 @@

getFieldInitialValue,
isLeadingValidate,
isHostRendering,
batchUpdate(callback?: () => void) {
if (isFn(callback)) {
env.hostRendering = true
callback()
heart.publish(LifeCycleTypes.ON_FORM_HOST_RENDER, state)
env.hostRendering = false
}
},
subscribe: (callback?: FormHeartSubscriber) => {

@@ -1338,3 +1346,3 @@ return heart.subscribe(callback)

leadingStage: false,
leadingValidate: false,
hostRendering: false,
publishing: {},

@@ -1341,0 +1349,0 @@ taskQueue: [],

@@ -176,3 +176,2 @@ import { FormPath, FormPathPattern, isFn, Subscribable } from '@formily/shared'

useDirty?: boolean
useListMode?: boolean
computeState?: (draft: IFieldState, prevState: IFieldState) => void

@@ -384,3 +383,4 @@ }

notify: <T>(type: string, payload?: T) => void
isLeadingValidate: () => boolean
isHostRendering: () => boolean
batchUpdate: (callback?: () => void) => void
setFieldValue(path?: FormPathPattern, value?: any): void

@@ -387,0 +387,0 @@ getFieldValue(path?: FormPathPattern): any