3h1-ui 3.0.0-next.245 → 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 +17 -14
- package/lib/index.js +17 -14
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -12616,32 +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 };
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12626
|
+
if (processedMap.has(merged))
|
|
12627
|
+
return processedMap.get(merged);
|
|
12628
|
+
const rawComponentProps = merged.componentProps;
|
|
12629
|
+
if (typeof rawComponentProps === "function" && merged.component === "Group") {
|
|
12630
|
+
merged.componentProps = (ctx) => {
|
|
12631
|
+
const result = rawComponentProps(ctx);
|
|
12632
|
+
if (Array.isArray(result.schemas)) {
|
|
12632
12633
|
return {
|
|
12633
|
-
...
|
|
12634
|
-
schemas: processSchemas(
|
|
12634
|
+
...result,
|
|
12635
|
+
schemas: processSchemas(result.schemas, ctx)
|
|
12635
12636
|
};
|
|
12636
|
-
}
|
|
12637
|
-
|
|
12637
|
+
}
|
|
12638
|
+
return result;
|
|
12639
|
+
};
|
|
12638
12640
|
}
|
|
12639
|
-
if (typeof
|
|
12641
|
+
if (typeof rawComponentProps === "object" && merged.component === "Group" && Array.isArray(rawComponentProps.schemas)) {
|
|
12640
12642
|
merged.componentProps = {
|
|
12641
|
-
...
|
|
12642
|
-
schemas: processSchemas(
|
|
12643
|
+
...rawComponentProps,
|
|
12644
|
+
schemas: processSchemas(rawComponentProps.schemas, context)
|
|
12643
12645
|
};
|
|
12644
12646
|
}
|
|
12647
|
+
processedMap.set(merged, merged);
|
|
12645
12648
|
return merged;
|
|
12646
12649
|
});
|
|
12647
12650
|
}
|
package/lib/index.js
CHANGED
|
@@ -12640,32 +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 };
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12650
|
+
if (processedMap.has(merged))
|
|
12651
|
+
return processedMap.get(merged);
|
|
12652
|
+
const rawComponentProps = merged.componentProps;
|
|
12653
|
+
if (typeof rawComponentProps === "function" && merged.component === "Group") {
|
|
12654
|
+
merged.componentProps = (ctx) => {
|
|
12655
|
+
const result = rawComponentProps(ctx);
|
|
12656
|
+
if (Array.isArray(result.schemas)) {
|
|
12656
12657
|
return {
|
|
12657
|
-
...
|
|
12658
|
-
schemas: processSchemas(
|
|
12658
|
+
...result,
|
|
12659
|
+
schemas: processSchemas(result.schemas, ctx)
|
|
12659
12660
|
};
|
|
12660
|
-
}
|
|
12661
|
-
|
|
12661
|
+
}
|
|
12662
|
+
return result;
|
|
12663
|
+
};
|
|
12662
12664
|
}
|
|
12663
|
-
if (typeof
|
|
12665
|
+
if (typeof rawComponentProps === "object" && merged.component === "Group" && Array.isArray(rawComponentProps.schemas)) {
|
|
12664
12666
|
merged.componentProps = {
|
|
12665
|
-
...
|
|
12666
|
-
schemas: processSchemas(
|
|
12667
|
+
...rawComponentProps,
|
|
12668
|
+
schemas: processSchemas(rawComponentProps.schemas, context)
|
|
12667
12669
|
};
|
|
12668
12670
|
}
|
|
12671
|
+
processedMap.set(merged, merged);
|
|
12669
12672
|
return merged;
|
|
12670
12673
|
});
|
|
12671
12674
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "3h1-ui",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.247",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"vue-json-pretty": "^2.2.3",
|
|
30
30
|
"vxe-table": "4.3.6",
|
|
31
31
|
"xe-utils": "^3.5.7",
|
|
32
|
-
"@shy-plugins/use": "1.0.1-next.5",
|
|
33
32
|
"@shy-plugins/tinymce": "^1.0.6",
|
|
34
|
-
"@shy-plugins/utils": "1.0.0-next.1"
|
|
33
|
+
"@shy-plugins/utils": "1.0.0-next.1",
|
|
34
|
+
"@shy-plugins/use": "1.0.1-next.5"
|
|
35
35
|
},
|
|
36
36
|
"types": "es/ui/index.d.ts",
|
|
37
37
|
"devDependencies": {
|