@arrai-innovations/reactive-helpers 8.5.2 → 8.5.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrai-innovations/reactive-helpers",
3
- "version": "8.5.2",
3
+ "version": "8.5.3",
4
4
  "description": "VueJS 3 utility composition functions to help manipulate objects and lists.",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/use/list.js CHANGED
@@ -22,6 +22,13 @@ export const useList = ({ props, functions, paged = false, keepOldPages = false
22
22
  listCalculated: null,
23
23
  });
24
24
 
25
+ if (!("listArgs" in props)) {
26
+ console.error("listArgs not set, must be true for intendToList or intendToSubscribe to work.");
27
+ }
28
+ if (!("retrieveArgs" in props)) {
29
+ console.error("retrieveArgs not set, must be true for intendToList or intendToSubscribe to work.");
30
+ }
31
+
25
32
  const es = effectScope();
26
33
 
27
34
  es.run(() => {
@@ -50,16 +50,17 @@ export function useListSubscription({ listInstance, props, functions }) {
50
50
  }
51
51
  if (!listInstance) {
52
52
  listInstance = useListInstance({ props, functions });
53
+ } else {
54
+ if (!("listArgs" in props)) {
55
+ console.error("listArgs not set, must be true for intendToList or intendToSubscribe to work.");
56
+ }
57
+ if (!("retrieveArgs" in props)) {
58
+ console.error("retrieveArgs not set, must be true for intendToList or intendToSubscribe to work.");
59
+ }
53
60
  }
54
61
  if (!listInstance.state.crud.subscribe) {
55
62
  listInstance.state.crud.subscribe = defaultCrud.subscribe;
56
63
  }
57
- if (!("listArgs" in props)) {
58
- console.error("listArgs not set, must be true for intendToList or intendToSubscribe to work.");
59
- }
60
- if (!("retrieveArgs" in props)) {
61
- console.error("retrieveArgs not set, must be true for intendToList or intendToSubscribe to work.");
62
- }
63
64
  const parentState = listInstance.state;
64
65
 
65
66
  let subscribeIntent, listIntent;
package/use/object.js CHANGED
@@ -13,6 +13,13 @@ export const useObject = ({ props, functions }) => {
13
13
  objectCalculated: null,
14
14
  });
15
15
 
16
+ if (!("id" in props)) {
17
+ console.error("id not set, must be true for intendToRetrieve or intendToSubscribe to work.");
18
+ }
19
+ if (!("retrieveArgs" in props)) {
20
+ console.error("retrieveArgs not set, must be true for intendToRetrieve or intendToSubscribe to work.");
21
+ }
22
+
16
23
  const es = effectScope();
17
24
 
18
25
  es.run(() => {
@@ -48,13 +48,17 @@ export function useObjectSubscription({
48
48
  }
49
49
  if (!objectInstance) {
50
50
  objectInstance = useObjectInstance({ props });
51
+ } else {
52
+ if (!("id" in props)) {
53
+ console.error("id not set, must be true for intendToRetrieve or intendToSubscribe to work.");
54
+ }
55
+ if (!("retrieveArgs" in props)) {
56
+ console.error("retrieveArgs not set, must be true for intendToRetrieve or intendToSubscribe to work.");
57
+ }
51
58
  }
52
59
  if (!objectInstance.state.crud.subscribe) {
53
60
  objectInstance.state.crud.subscribe = defaultCrud.subscribe;
54
61
  }
55
- if (!("retrieveArgs" in props)) {
56
- console.error("retrieveArgs not set, must be true for intendToRetrieve or intendToSubscribe to work.");
57
- }
58
62
  const parentState = objectInstance.state;
59
63
  const state = reactive({
60
64
  subscriptionLoading: undefined,