szld-libs 0.2.85 → 0.2.86

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.
@@ -26616,26 +26616,31 @@ const KM = (n) => {
26616
26616
  }, R6 = async ({
26617
26617
  attrList: n,
26618
26618
  params: l,
26619
- commonRequest: a,
26620
- extra: s = {}
26619
+ extra: a = {},
26620
+ commonRequest: s
26621
26621
  }) => {
26622
- var g, S;
26623
- const h = await a("YLFWLRDataDetails", l), v = ((S = (g = h == null ? void 0 : h.data) == null ? void 0 : g.list) == null ? void 0 : S[0]) || {};
26624
- return await Promise.all(
26625
- (n == null ? void 0 : n.map(async (d) => {
26626
- const x = { ...d, ...s };
26627
- if (x.attrvalue = (v == null ? void 0 : v[d.attrid]) || "", d.attrtype === 1 && Array.isArray(d.children) && d.children.length > 0) {
26628
- const w = (v == null ? void 0 : v[d.attrid]) || {};
26629
- x.children = await R6({
26630
- attrList: d.children,
26631
- params: w,
26632
- extra: s,
26633
- commonRequest: a
26634
- });
26635
- }
26636
- return x;
26637
- })) || []
26622
+ var g;
26623
+ const h = await s("YLFWLRDataDetails", l), v = ((g = h == null ? void 0 : h.data) == null ? void 0 : g.list) || [];
26624
+ if (!v.length)
26625
+ return n.map((S) => ({ ...S, ...a, attrvalue: "", children: [] }));
26626
+ const p = await Promise.all(
26627
+ v.map(async (S) => await Promise.all(
26628
+ (n == null ? void 0 : n.map(async (x) => {
26629
+ const w = { ...x, ...a };
26630
+ if (w.attrvalue = (S == null ? void 0 : S[x.attrid]) || "", x.attrtype === 1 && Array.isArray(x.children) && x.children.length > 0) {
26631
+ const C = (S == null ? void 0 : S[x.attrid]) || {};
26632
+ w.children = await R6({
26633
+ attrList: x.children,
26634
+ params: C,
26635
+ extra: a,
26636
+ commonRequest: s
26637
+ });
26638
+ }
26639
+ return w;
26640
+ })) || []
26641
+ ))
26638
26642
  );
26643
+ return p.length === 1 ? p[0] : p;
26639
26644
  }, Nh = (n, l, a) => {
26640
26645
  let s = [];
26641
26646
  return a.forEach((h) => {