intable 0.0.72 → 0.0.74
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.
|
@@ -8,7 +8,7 @@ const ExpressPlugin = {
|
|
|
8
8
|
let n = i.props.columns[e];
|
|
9
9
|
if (!(!n.valueGetter && !n.valueSetter)) for (let r = 0; r < i.props.data.length; r++) {
|
|
10
10
|
let a = i.props.data[r];
|
|
11
|
-
n.id
|
|
11
|
+
n.id && Object.defineProperty(a, n.id, {
|
|
12
12
|
get: () => n.valueGetter?.({
|
|
13
13
|
col: n,
|
|
14
14
|
data: a,
|
|
@@ -19,15 +19,12 @@ const OrmPlugin = {
|
|
|
19
19
|
let x = createMutable({});
|
|
20
20
|
return createComputed(() => {
|
|
21
21
|
let e = y.props.columns?.filter((e) => (e.type == "fk" || e.type == "fks") && e.foreignField);
|
|
22
|
-
if (e.length) for (let b of e) for (let e of y.props.data) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
configurable: !0
|
|
29
|
-
});
|
|
30
|
-
}
|
|
22
|
+
if (e.length) for (let b of e) for (let e of y.props.data) Object.defineProperty(e, b.foreignField, {
|
|
23
|
+
get: () => get(x, [b.id, e[y.props.rowKey]]),
|
|
24
|
+
set: (S) => untrack(() => set(x, [b.id, e[y.props.rowKey]], S)),
|
|
25
|
+
enumerable: !0,
|
|
26
|
+
configurable: !0
|
|
27
|
+
});
|
|
31
28
|
}), createComponent(e, b);
|
|
32
29
|
} }
|
|
33
30
|
};
|
|
@@ -211,18 +208,18 @@ const fetchDataByKeys = (() => {
|
|
|
211
208
|
};
|
|
212
209
|
return async (e, x) => {
|
|
213
210
|
if (!x.request || (e = e.filter((e) => !isEmpty(e)), !e.length)) return [];
|
|
214
|
-
let [S, C] = b(x), w = e.filter((e) => !S[e])
|
|
215
|
-
if (
|
|
211
|
+
let [S, C] = b(x), w = e.filter((e) => !S[e]).filter((e) => !C[e]);
|
|
212
|
+
if (w.length) {
|
|
216
213
|
let e = x.request({ filters: [{
|
|
217
214
|
field: x.rowKey,
|
|
218
215
|
op: "in",
|
|
219
|
-
value:
|
|
216
|
+
value: w
|
|
220
217
|
}] });
|
|
221
|
-
|
|
218
|
+
w.forEach((y, b) => {
|
|
222
219
|
C[y] = e.then((e) => S[y] = e.data[b]).finally(() => delete C[y]);
|
|
223
|
-
})
|
|
220
|
+
});
|
|
224
221
|
}
|
|
225
|
-
return e.map((e) => S[e]);
|
|
222
|
+
return await Promise.all(e.map((e) => C[e])), e.map((e) => S[e]);
|
|
226
223
|
};
|
|
227
224
|
})();
|
|
228
225
|
delegateEvents(["click"]);
|