liyu-pc-base 1.0.1213 → 1.0.1215

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.
@@ -38,7 +38,15 @@ var l = r, u = [
38
38
  value: "期初",
39
39
  label: "期初"
40
40
  }
41
- ], d = (e, t) => i[e], f = (e) => e?.default_operator ? e.default_operator : e?.operator_list instanceof Array && e.operator_list.length > 0 ? e.operator_list[0] : "eq", p = Symbol("tableProState"), m = (e) => !!e && !!e.id && e.id !== "no-view" && !e.virtual, h = (e) => m(e) ? e.user_id ? e.extra_data?.inherit_view_id ?? null : e.id : null, g = () => s(p), _ = async (r, i, a, s) => {
41
+ ], d = (e, t) => i[e], f = (e) => e?.default_operator ? e.default_operator : e?.operator_list instanceof Array && e.operator_list.length > 0 ? e.operator_list[0] : "eq", p = Symbol("tableProState"), m = (e) => !!e && !!e.id && e.id !== "no-view" && !e.virtual, h = (e) => m(e) ? e.user_id ? e.extra_data?.inherit_view_id ?? null : e.id : null, g = (e, t) => {
42
+ let n = e.value;
43
+ if (!n?.id) return;
44
+ let r = (t || []).find((e) => e.id === n.id);
45
+ r && (e.value = {
46
+ ...r,
47
+ data: n.data ?? r.data
48
+ });
49
+ }, _ = () => s(p), v = async (r, i, a, s) => {
42
50
  let c = t().userid, l = await o({
43
51
  user_id: c,
44
52
  view_project__flag: e().VITE_APP_VIEW_PROJECT_FLAG,
@@ -76,16 +84,16 @@ var l = r, u = [
76
84
  data: t
77
85
  };
78
86
  }));
79
- }, v = (e, t) => e ? e.find((e) => e.group_info.value === t)?.group_info || e[0]?.group_info : null, y = "__liyu_pc_base_remote_select_pro_cache__", b = globalThis[y] = globalThis[y] || {}, x = (e, t, n) => `${e}::${t}::${n == null ? "" : String(n)}`, S = (e, t, n, r) => {
80
- let i = x(e, t, n), a = b[i];
81
- return a ? Date.now() - a.timestamp > r ? (delete b[i], null) : a.record : null;
82
- }, C = (e, t, n, r) => {
83
- let i = x(e, t, n);
84
- b[i] = {
87
+ }, y = (e, t) => e ? e.find((e) => e.group_info.value === t)?.group_info || e[0]?.group_info : null, b = "__liyu_pc_base_remote_select_pro_cache__", x = globalThis[b] = globalThis[b] || {}, S = (e, t, n) => `${e}::${t}::${n == null ? "" : String(n)}`, C = (e, t, n, r) => {
88
+ let i = S(e, t, n), a = x[i];
89
+ return a ? Date.now() - a.timestamp > r ? (delete x[i], null) : a.record : null;
90
+ }, w = (e, t, n, r) => {
91
+ let i = S(e, t, n);
92
+ x[i] = {
85
93
  record: r,
86
94
  timestamp: Date.now()
87
95
  };
88
- }, w = async (e, t = {}) => {
96
+ }, T = async (e, t = {}) => {
89
97
  let r = t.cacheTTL ?? 300 * 1e3, i = t.postUrl, o = [];
90
98
  if (e instanceof Array ? o = e.filter((e) => a(e)) : a(e) && (o = [e]), o.length === 0) return "";
91
99
  if (!i) return o.join(",");
@@ -98,7 +106,7 @@ var l = r, u = [
98
106
  if (r > 0) {
99
107
  let n = [], o = [];
100
108
  if (e.forEach((e) => {
101
- let t = S(i, s, e, r);
109
+ let t = C(i, s, e, r);
102
110
  t === null ? o.push(e) : n.push(t);
103
111
  }), a = o, n.forEach((e) => {
104
112
  t[String(e[s])] = e;
@@ -131,7 +139,7 @@ var l = r, u = [
131
139
  }]]
132
140
  }, i, !1, { skip_error: !0 }), (o?.data || []).forEach((e) => {
133
141
  let n = e?.[s];
134
- n != null && (t[String(n)] = e, r > 0 && C(i, s, n, e));
142
+ n != null && (t[String(n)] = e, r > 0 && w(i, s, n, e));
135
143
  }), t;
136
144
  }, _ = {};
137
145
  try {
@@ -149,7 +157,7 @@ var l = r, u = [
149
157
  } else v.push(t[c]);
150
158
  else v.push(e);
151
159
  }), v.join(",");
152
- }, T = (e, t) => {
160
+ }, E = (e, t) => {
153
161
  if (!e || e.length === 0) return "";
154
162
  if (e.length === 1) return String(e[0]);
155
163
  switch (t) {
@@ -161,7 +169,7 @@ var l = r, u = [
161
169
  default: return e.join("_");
162
170
  }
163
171
  };
164
- function E(e, t) {
172
+ function D(e, t) {
165
173
  let n = e || [];
166
174
  if (n.length === 0) return {
167
175
  valid: !1,
@@ -273,4 +281,4 @@ function E(e, t) {
273
281
  return { valid: !0 };
274
282
  }
275
283
  //#endregion
276
- export { h as a, l as c, p as d, w as f, f as i, u as l, E as m, _ as n, d as o, g as p, v as r, m as s, T as t, c as u };
284
+ export { h as a, l as c, g as d, p as f, D as h, f as i, u as l, _ as m, v as n, d as o, T as p, y as r, m as s, E as t, c as u };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "liyu-pc-base",
3
3
  "type": "module",
4
4
  "license": "MIT",
5
- "version": "1.0.1213",
5
+ "version": "1.0.1215",
6
6
  "scripts": {
7
7
  "build": "vite build",
8
8
  "build:watch": "vite build --watch --mode development",