3h1-ui 3.0.0-next.246 → 3.0.0-next.247
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/es/index.js +13 -8
- package/lib/index.js +13 -8
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -12616,30 +12616,35 @@ function useFormEvents({
|
|
|
12616
12616
|
return;
|
|
12617
12617
|
}
|
|
12618
12618
|
const schema = [];
|
|
12619
|
+
const processedMap = /* @__PURE__ */ new WeakMap();
|
|
12619
12620
|
function processSchemas(schemas, context = {}) {
|
|
12620
12621
|
return schemas.map((schemaItem) => {
|
|
12621
12622
|
const matched = updateData.find(
|
|
12622
12623
|
(item) => item.field === schemaItem.field
|
|
12623
12624
|
);
|
|
12624
12625
|
const merged = matched ? deepMerge$2(schemaItem, matched) : { ...schemaItem };
|
|
12626
|
+
if (processedMap.has(merged))
|
|
12627
|
+
return processedMap.get(merged);
|
|
12625
12628
|
const rawComponentProps = merged.componentProps;
|
|
12626
12629
|
if (typeof rawComponentProps === "function" && merged.component === "Group") {
|
|
12627
12630
|
merged.componentProps = (ctx) => {
|
|
12628
|
-
const
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
}
|
|
12631
|
+
const result = rawComponentProps(ctx);
|
|
12632
|
+
if (Array.isArray(result.schemas)) {
|
|
12633
|
+
return {
|
|
12634
|
+
...result,
|
|
12635
|
+
schemas: processSchemas(result.schemas, ctx)
|
|
12636
|
+
};
|
|
12637
|
+
}
|
|
12638
|
+
return result;
|
|
12635
12639
|
};
|
|
12636
12640
|
}
|
|
12637
|
-
if (typeof rawComponentProps === "object" && merged.component === "Group" && Array.isArray(rawComponentProps
|
|
12641
|
+
if (typeof rawComponentProps === "object" && merged.component === "Group" && Array.isArray(rawComponentProps.schemas)) {
|
|
12638
12642
|
merged.componentProps = {
|
|
12639
12643
|
...rawComponentProps,
|
|
12640
12644
|
schemas: processSchemas(rawComponentProps.schemas, context)
|
|
12641
12645
|
};
|
|
12642
12646
|
}
|
|
12647
|
+
processedMap.set(merged, merged);
|
|
12643
12648
|
return merged;
|
|
12644
12649
|
});
|
|
12645
12650
|
}
|
package/lib/index.js
CHANGED
|
@@ -12640,30 +12640,35 @@ function useFormEvents({
|
|
|
12640
12640
|
return;
|
|
12641
12641
|
}
|
|
12642
12642
|
const schema = [];
|
|
12643
|
+
const processedMap = /* @__PURE__ */ new WeakMap();
|
|
12643
12644
|
function processSchemas(schemas, context = {}) {
|
|
12644
12645
|
return schemas.map((schemaItem) => {
|
|
12645
12646
|
const matched = updateData.find(
|
|
12646
12647
|
(item) => item.field === schemaItem.field
|
|
12647
12648
|
);
|
|
12648
12649
|
const merged = matched ? utils$1.deepMerge(schemaItem, matched) : { ...schemaItem };
|
|
12650
|
+
if (processedMap.has(merged))
|
|
12651
|
+
return processedMap.get(merged);
|
|
12649
12652
|
const rawComponentProps = merged.componentProps;
|
|
12650
12653
|
if (typeof rawComponentProps === "function" && merged.component === "Group") {
|
|
12651
12654
|
merged.componentProps = (ctx) => {
|
|
12652
|
-
const
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
}
|
|
12655
|
+
const result = rawComponentProps(ctx);
|
|
12656
|
+
if (Array.isArray(result.schemas)) {
|
|
12657
|
+
return {
|
|
12658
|
+
...result,
|
|
12659
|
+
schemas: processSchemas(result.schemas, ctx)
|
|
12660
|
+
};
|
|
12661
|
+
}
|
|
12662
|
+
return result;
|
|
12659
12663
|
};
|
|
12660
12664
|
}
|
|
12661
|
-
if (typeof rawComponentProps === "object" && merged.component === "Group" && Array.isArray(rawComponentProps
|
|
12665
|
+
if (typeof rawComponentProps === "object" && merged.component === "Group" && Array.isArray(rawComponentProps.schemas)) {
|
|
12662
12666
|
merged.componentProps = {
|
|
12663
12667
|
...rawComponentProps,
|
|
12664
12668
|
schemas: processSchemas(rawComponentProps.schemas, context)
|
|
12665
12669
|
};
|
|
12666
12670
|
}
|
|
12671
|
+
processedMap.set(merged, merged);
|
|
12667
12672
|
return merged;
|
|
12668
12673
|
});
|
|
12669
12674
|
}
|