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

@formily/core

Package Overview
Dependencies
Maintainers
1
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formily/core - npm Package Compare versions

Comparing version 1.1.1-beta.2 to 1.1.1

59

lib/index.js

@@ -258,17 +258,2 @@ "use strict";

var editableChanged = field.isDirty('editable');
var initializeLazy = function (callback) {
if (options.initializeLazySyncState) {
if (initialValueChanged) {
shared_1.scheduler.applyWithIdlePriority(function () {
callback();
});
}
else {
callback();
}
}
else {
callback();
}
};
if (initializedChanged) {

@@ -296,6 +281,4 @@ heart.publish(types_1.LifeCycleTypes.ON_FIELD_INIT, field);

if (!wasHidden) {
initializeLazy(function () {
setFormValuesIn(path, published.value, true);
notifyTreeFromValues();
});
setFormValuesIn(path, published.value, true);
notifyTreeFromValues();
}

@@ -306,6 +289,4 @@ heart.publish(types_1.LifeCycleTypes.ON_FIELD_VALUE_CHANGE, field);

if (!wasHidden) {
initializeLazy(function () {
setFormInitialValuesIn(path, published.initialValue, true);
notifyTreeFromInitialValues();
});
setFormInitialValuesIn(path, published.initialValue, true);
notifyTreeFromInitialValues();
}

@@ -322,15 +303,11 @@ heart.publish(types_1.LifeCycleTypes.ON_FIELD_INITIAL_VALUE_CHANGE, field);

}
initializeLazy(function () {
deleteFormValuesIn(path);
notifyTreeFromValues();
});
deleteFormValuesIn(path);
notifyTreeFromValues();
}
else {
if (!existFormValuesIn(path)) {
initializeLazy(function () {
setFormValuesIn(path, shared_1.isValid(published.visibleCacheValue)
? published.visibleCacheValue
: published.initialValue, true);
notifyTreeFromValues();
});
setFormValuesIn(path, shared_1.isValid(published.visibleCacheValue)
? published.visibleCacheValue
: published.initialValue, true);
notifyTreeFromValues();
}

@@ -359,15 +336,11 @@ }

}
initializeLazy(function () {
deleteFormValuesIn(path, true);
notifyTreeFromValues();
});
deleteFormValuesIn(path, true);
notifyTreeFromValues();
}
else {
if (!existFormValuesIn(path)) {
initializeLazy(function () {
setFormValuesIn(path, shared_1.isValid(published.visibleCacheValue)
? published.visibleCacheValue
: published.initialValue, true);
notifyTreeFromValues();
});
setFormValuesIn(path, shared_1.isValid(published.visibleCacheValue)
? published.visibleCacheValue
: published.initialValue, true);
notifyTreeFromValues();
}

@@ -374,0 +347,0 @@ }

@@ -178,3 +178,2 @@ /// <reference types="react" />

useDirty?: boolean;
initializeLazySyncState?: boolean;
editable?: boolean | ((name: string) => boolean);

@@ -181,0 +180,0 @@ validateFirst?: boolean;

{
"name": "@formily/core",
"version": "1.1.1-beta.2",
"version": "1.1.1",
"license": "MIT",

@@ -28,4 +28,4 @@ "main": "lib",

"dependencies": {
"@formily/shared": "^1.1.1-beta.2",
"@formily/validator": "^1.1.1-beta.2",
"@formily/shared": "^1.1.1",
"@formily/validator": "^1.1.1",
"immer": "^6.0.3"

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

},
"gitHead": "4cb37a2b563b0168a4872322f7866c15c7e22138"
"gitHead": "02ca670ede75710c82a56bf1447b69824c4c92be"
}

@@ -14,4 +14,3 @@ import {

each,
isObj,
scheduler
isObj
} from '@formily/shared'

@@ -268,16 +267,2 @@ import {

const initializeLazy = (callback: () => void) => {
if (options.initializeLazySyncState) {
if (initialValueChanged) {
scheduler.applyWithIdlePriority(() => {
callback()
})
} else {
callback()
}
} else {
callback()
}
}
if (initializedChanged) {

@@ -306,6 +291,4 @@ heart.publish(LifeCycleTypes.ON_FIELD_INIT, field)

if (!wasHidden) {
initializeLazy(() => {
setFormValuesIn(path, published.value, true)
notifyTreeFromValues()
})
setFormValuesIn(path, published.value, true)
notifyTreeFromValues()
}

@@ -316,6 +299,4 @@ heart.publish(LifeCycleTypes.ON_FIELD_VALUE_CHANGE, field)

if (!wasHidden) {
initializeLazy(() => {
setFormInitialValuesIn(path, published.initialValue, true)
notifyTreeFromInitialValues()
})
setFormInitialValuesIn(path, published.initialValue, true)
notifyTreeFromInitialValues()
}

@@ -332,18 +313,14 @@ heart.publish(LifeCycleTypes.ON_FIELD_INITIAL_VALUE_CHANGE, field)

}
initializeLazy(() => {
deleteFormValuesIn(path)
notifyTreeFromValues()
})
deleteFormValuesIn(path)
notifyTreeFromValues()
} else {
if (!existFormValuesIn(path)) {
initializeLazy(() => {
setFormValuesIn(
path,
isValid(published.visibleCacheValue)
? published.visibleCacheValue
: published.initialValue,
true
)
notifyTreeFromValues()
})
setFormValuesIn(
path,
isValid(published.visibleCacheValue)
? published.visibleCacheValue
: published.initialValue,
true
)
notifyTreeFromValues()
}

@@ -374,18 +351,14 @@ }

}
initializeLazy(() => {
deleteFormValuesIn(path, true)
notifyTreeFromValues()
})
deleteFormValuesIn(path, true)
notifyTreeFromValues()
} else {
if (!existFormValuesIn(path)) {
initializeLazy(() => {
setFormValuesIn(
path,
isValid(published.visibleCacheValue)
? published.visibleCacheValue
: published.initialValue,
true
)
notifyTreeFromValues()
})
setFormValuesIn(
path,
isValid(published.visibleCacheValue)
? published.visibleCacheValue
: published.initialValue,
true
)
notifyTreeFromValues()
}

@@ -392,0 +365,0 @@ }

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

useDirty?: boolean
initializeLazySyncState?: boolean
editable?: boolean | ((name: string) => boolean)

@@ -259,0 +258,0 @@ validateFirst?: boolean

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc