@arrai-innovations/reactive-helpers 4.1.1 → 4.1.3
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/package.json +1 -1
- package/use/list.js +5 -1
- package/use/listCalculated.js +1 -1
- package/use/listRelated.js +1 -1
- package/use/listSubscription.js +1 -1
- package/use/objectCalculated.js +1 -1
- package/use/objectRelated.js +1 -1
package/package.json
CHANGED
package/use/list.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useListSubscription } from "./listSubscription";
|
|
|
6
6
|
import { usePagedListInstance } from "./paginatedListInstance";
|
|
7
7
|
|
|
8
8
|
// the big brother of useObject, managing a chain of useList* instances.
|
|
9
|
-
export const useList = ({ props, functions, paged = false }) => {
|
|
9
|
+
export const useList = ({ props, functions, paged = false, passThroughPropertyNames = [] }) => {
|
|
10
10
|
const managed = shallowReactive({
|
|
11
11
|
listInstance: null,
|
|
12
12
|
listSubscription: null,
|
|
@@ -84,6 +84,10 @@ export const useList = ({ props, functions, paged = false }) => {
|
|
|
84
84
|
"running",
|
|
85
85
|
"relatedObjects",
|
|
86
86
|
"calculatedObjects",
|
|
87
|
+
"totalRecords",
|
|
88
|
+
"totalPages",
|
|
89
|
+
"perPage",
|
|
90
|
+
...passThroughPropertyNames,
|
|
87
91
|
];
|
|
88
92
|
watch(
|
|
89
93
|
() =>
|
package/use/listCalculated.js
CHANGED
|
@@ -103,7 +103,7 @@ export function useListCalculated({
|
|
|
103
103
|
state.objects = toRef(parentState, "objects");
|
|
104
104
|
state.objectsInOrder = toRef(parentState, "objectsInOrder");
|
|
105
105
|
state[copn] = toRef(state, "calculatedObjectsObjects");
|
|
106
|
-
for (let key
|
|
106
|
+
for (let key of passThroughPropertyNames) {
|
|
107
107
|
state[key] = toRef(parentState, key);
|
|
108
108
|
}
|
|
109
109
|
|
package/use/listRelated.js
CHANGED
|
@@ -110,7 +110,7 @@ export function useListRelated({
|
|
|
110
110
|
state.objects = toRef(parentState, "objects");
|
|
111
111
|
state.objectsInOrder = toRef(parentState, "objectsInOrder");
|
|
112
112
|
state[ropn] = toRef(state, "relatedObjectsObjects");
|
|
113
|
-
for (let key
|
|
113
|
+
for (let key of passThroughPropertyNames) {
|
|
114
114
|
state[key] = toRef(parentState, key);
|
|
115
115
|
}
|
|
116
116
|
|
package/use/listSubscription.js
CHANGED
|
@@ -155,7 +155,7 @@ export function useListSubscription({
|
|
|
155
155
|
state.objects = toRef(parentState, "objects");
|
|
156
156
|
state.order = toRef(parentState, "order");
|
|
157
157
|
state.objectsInOrder = toRef(parentState, "objectsInOrder");
|
|
158
|
-
for (let key
|
|
158
|
+
for (let key of passThroughPropertyNames) {
|
|
159
159
|
state[key] = toRef(parentState, key);
|
|
160
160
|
}
|
|
161
161
|
|
package/use/objectCalculated.js
CHANGED
|
@@ -42,7 +42,7 @@ export function useObjectCalculated({
|
|
|
42
42
|
state.deleted = toRef(parentState, "deleted");
|
|
43
43
|
state.object = toRef(parentState, "object");
|
|
44
44
|
state[copn] = toRef(state, "calculatedObjectObjects");
|
|
45
|
-
for (let key
|
|
45
|
+
for (let key of passThroughPropertyNames) {
|
|
46
46
|
state[key] = toRef(parentState, key);
|
|
47
47
|
}
|
|
48
48
|
|
package/use/objectRelated.js
CHANGED
|
@@ -41,7 +41,7 @@ export function useObjectRelated({
|
|
|
41
41
|
state.deleted = toRef(parentState, "deleted");
|
|
42
42
|
state.object = toRef(parentState, "object");
|
|
43
43
|
state[ropn] = toRef(state, "relatedObjectObjects");
|
|
44
|
-
for (let key
|
|
44
|
+
for (let key of passThroughPropertyNames) {
|
|
45
45
|
state[key] = toRef(parentState, key);
|
|
46
46
|
}
|
|
47
47
|
|