@steedos-widgets/antd 6.10.49 → 6.10.52-beta.1
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/dist/antd.umd.js +37 -1
- package/dist/assets.json +5 -5
- package/package.json +2 -2
package/dist/antd.umd.js
CHANGED
|
@@ -304,6 +304,42 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
};
|
|
307
|
+
function extractObjectChain(value) {
|
|
308
|
+
var result = value ? [value] : [];
|
|
309
|
+
var visited = new Set(); // 用于存储已遍历的对象引用
|
|
310
|
+
if (value) visited.add(value);
|
|
311
|
+
var current = value;
|
|
312
|
+
while (current === null || current === void 0 ? void 0 : current.__super) {
|
|
313
|
+
var next = current.__super;
|
|
314
|
+
// 检查是否已经访问过该对象
|
|
315
|
+
if (visited.has(next)) {
|
|
316
|
+
console.warn("检测到循环引用,已自动截断链条", next);
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
result.unshift(next);
|
|
320
|
+
visited.add(next);
|
|
321
|
+
current = next;
|
|
322
|
+
}
|
|
323
|
+
return result;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* 安全地将链条属性合并到顶层
|
|
327
|
+
*/
|
|
328
|
+
function flattenObjectChain(obj) {
|
|
329
|
+
if (!obj) return {};
|
|
330
|
+
// 1. 调用上方带 Set 检查的提取函数
|
|
331
|
+
var chain = extractObjectChain(obj);
|
|
332
|
+
// 2. 扁平化合并
|
|
333
|
+
// 遵循“就近原则”:数组后面的对象属性覆盖前面的
|
|
334
|
+
var flattened = chain.reduce(function (acc, current) {
|
|
335
|
+
// 建议:如果不需要合并原型链上的属性,仅合并自身属性
|
|
336
|
+
// 使用 Object.assign 仅拷贝可枚举的自有属性
|
|
337
|
+
return Object.assign(acc, current);
|
|
338
|
+
}, {});
|
|
339
|
+
// 3. 清理标记位,避免干扰结果
|
|
340
|
+
delete flattened.__super;
|
|
341
|
+
return flattened;
|
|
342
|
+
}
|
|
307
343
|
// --- 组件实现 ---
|
|
308
344
|
var LiquidComponent = function LiquidComponent(_a) {
|
|
309
345
|
var _b;
|
|
@@ -428,7 +464,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
428
464
|
React.useEffect(function () {
|
|
429
465
|
var isMounted = true;
|
|
430
466
|
inlineSchemasRef.current = {};
|
|
431
|
-
var contextData = _assign(_assign({}, data), {
|
|
467
|
+
var contextData = _assign(_assign({}, flattenObjectChain(data)), {
|
|
432
468
|
__registerInlineSchema: function __registerInlineSchema(id, schema) {
|
|
433
469
|
inlineSchemasRef.current[id] = schema;
|
|
434
470
|
}
|
package/dist/assets.json
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
{
|
|
32
32
|
"package": "@steedos-widgets/antd",
|
|
33
33
|
"urls": [
|
|
34
|
-
"https://unpkg.com/@steedos-widgets/antd@6.10.
|
|
35
|
-
"https://unpkg.com/@steedos-widgets/antd@6.10.
|
|
34
|
+
"https://unpkg.com/@steedos-widgets/antd@6.10.52-beta.1/dist/antd.umd.js",
|
|
35
|
+
"https://unpkg.com/@steedos-widgets/antd@6.10.52-beta.1/dist/antd.umd.css"
|
|
36
36
|
],
|
|
37
37
|
"library": "BuilderAntd"
|
|
38
38
|
}
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"npm": {
|
|
44
44
|
"package": "@steedos-widgets/antd"
|
|
45
45
|
},
|
|
46
|
-
"url": "https://unpkg.com/@steedos-widgets/antd@6.10.
|
|
46
|
+
"url": "https://unpkg.com/@steedos-widgets/antd@6.10.52-beta.1/dist/meta.js",
|
|
47
47
|
"urls": {
|
|
48
|
-
"default": "https://unpkg.com/@steedos-widgets/antd@6.10.
|
|
49
|
-
"design": "https://unpkg.com/@steedos-widgets/antd@6.10.
|
|
48
|
+
"default": "https://unpkg.com/@steedos-widgets/antd@6.10.52-beta.1/dist/meta.js",
|
|
49
|
+
"design": "https://unpkg.com/@steedos-widgets/antd@6.10.52-beta.1/dist/meta.js"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/antd",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "6.10.
|
|
4
|
+
"version": "6.10.52-beta.1",
|
|
5
5
|
"main": "dist/antd.cjs.js",
|
|
6
6
|
"module": "dist/antd.esm.js",
|
|
7
7
|
"unpkg": "dist/antd.umd.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"rollup-plugin-tslib-resolve-id": "^0.0.0",
|
|
48
48
|
"rollup-plugin-visualizer": "^5.8.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "8a2fa16f1c8dd4d4de41c4365d40c9c711da6ccb",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"liquidjs": "^10.24.0"
|
|
53
53
|
}
|