86 lines
3.5 KiB
JavaScript
86 lines
3.5 KiB
JavaScript
// Module ID: 1753
|
|
// Function ID: 1754
|
|
// Name: configureProps
|
|
// Dependencies: [1657, 1667, 1665, 1698, 1658]
|
|
// Exports: adaptViewConfig, addWhitelistedNativeProps, addWhitelistedUIProps, configureReanimatedLogger
|
|
|
|
// Module 1753 (configureProps)
|
|
import addLogBoxLog from "addLogBoxLog" /* 1658 */;
|
|
import _mod1667 from "module_1667" /* 1667 */;
|
|
import isReanimated3 from "isReanimated3" /* 1698 */;
|
|
import isJest from "isJest" /* 1657 */;
|
|
|
|
function configureProps() {
|
|
for (const key10008 in _mod1667.PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST) {
|
|
let tmp8 = key10008;
|
|
let tmp9 = require;
|
|
let tmp10 = dependencyMap;
|
|
if (!(key10008 in _mod1667.PropsAllowlists.UI_THREAD_PROPS_WHITELIST)) {
|
|
continue;
|
|
} else {
|
|
let tmp = globalThis;
|
|
let _HermesInternal = HermesInternal;
|
|
let str = "` was whitelisted both as UI and native prop. Please remove it from one of the lists.";
|
|
let str2 = "Property `";
|
|
let tmp2 = new.target;
|
|
let tmp3 = new.target;
|
|
let reanimatedError = new tmp9(1665).ReanimatedError("Property `" + key10008 + "` was whitelisted both as UI and native prop. Please remove it from one of the lists.");
|
|
let tmp5 = reanimatedError;
|
|
throw reanimatedError;
|
|
}
|
|
}
|
|
const keys = Object.keys(_mod1667.PropsAllowlists.UI_THREAD_PROPS_WHITELIST);
|
|
isReanimated3.jsiConfigureProps(keys, Object.keys(_mod1667.PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST));
|
|
}
|
|
let closure_2 = isJest.shouldBeUseWeb();
|
|
const set = new Set();
|
|
configureProps();
|
|
|
|
export { configureProps };
|
|
export const addWhitelistedNativeProps = function addWhitelistedNativeProps(arg0) {
|
|
const merged = Object.assign(_mod1667.PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST);
|
|
const merged1 = Object.assign(arg0);
|
|
_mod1667.PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST = {};
|
|
if (Object.keys(_mod1667.PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST).length !== Object.keys(_mod1667.PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST).length) {
|
|
configureProps();
|
|
}
|
|
};
|
|
export const addWhitelistedUIProps = function addWhitelistedUIProps(arg0) {
|
|
const merged = Object.assign(_mod1667.PropsAllowlists.UI_THREAD_PROPS_WHITELIST);
|
|
const merged1 = Object.assign(arg0);
|
|
_mod1667.PropsAllowlists.UI_THREAD_PROPS_WHITELIST = {};
|
|
if (Object.keys(_mod1667.PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length !== Object.keys(_mod1667.PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length) {
|
|
configureProps();
|
|
}
|
|
};
|
|
export const configureReanimatedLogger = function configureReanimatedLogger(level) {
|
|
addLogBoxLog.updateLoggerConfig(level);
|
|
if (!closure_2) {
|
|
tmp(1698).executeOnUIRuntimeSync(tmp(1658).updateLoggerConfig)(level);
|
|
const tmpResult = tmp(1698);
|
|
}
|
|
};
|
|
export const adaptViewConfig = function adaptViewConfig(viewConfig) {
|
|
const uiViewClassName = viewConfig.uiViewClassName;
|
|
let obj = set;
|
|
if (!set.has(uiViewClassName)) {
|
|
obj = {};
|
|
const _Object = Object;
|
|
const keys = Object.keys(viewConfig.validAttributes);
|
|
const item = keys.forEach((arg0) => {
|
|
if (!tmp3) {
|
|
obj[arg0] = true;
|
|
}
|
|
});
|
|
const _Object2 = Object;
|
|
obj = {};
|
|
const merged = Object.assign(obj(1667).PropsAllowlists.UI_THREAD_PROPS_WHITELIST);
|
|
const merged1 = Object.assign(obj);
|
|
obj(1667).PropsAllowlists.UI_THREAD_PROPS_WHITELIST = obj;
|
|
const _Object3 = Object;
|
|
if (Object.keys(obj(1667).PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length !== Object.keys(obj(1667).PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length) {
|
|
configureProps();
|
|
}
|
|
obj.add(uiViewClassName);
|
|
}
|
|
};
|