@arrai-innovations/reactive-helpers 8.1.1 → 8.1.2

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.
Files changed (41) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
  3. package/tests/unit/poll.js +1 -1
  4. package/tests/unit/use/index.spec.js +1 -1
  5. package/tests/unit/use/listFilter.spec.js +2 -2
  6. package/tests/unit/use/listInstance.spec.js +1 -1
  7. package/tests/unit/use/listRelated.spec.js +1 -1
  8. package/tests/unit/use/listSort.spec.js +1 -1
  9. package/tests/unit/use/listSubscription.spec.js +3 -3
  10. package/tests/unit/use/objectInstance.spec.js +2 -2
  11. package/tests/unit/use/objectSubscription.spec.js +5 -5
  12. package/tests/unit/use/search.spec.js +1 -1
  13. package/tests/unit/use/watches.spec.js +1 -1
  14. package/tests/unit/utils/assignReactiveObject.spec.js +1 -1
  15. package/tests/unit/utils/classes.spec.js +1 -1
  16. package/tests/unit/utils/flattenPaths.spec.js +1 -1
  17. package/tests/unit/utils/index.spec.js +1 -1
  18. package/tests/unit/utils/keyDiff.spec.js +1 -1
  19. package/tests/unit/utils/set.spec.js +1 -1
  20. package/use/combineClasses.js +1 -1
  21. package/use/index.js +17 -17
  22. package/use/list.js +5 -5
  23. package/use/listCalculated.js +5 -5
  24. package/use/listFilter.js +2 -2
  25. package/use/listRelated.js +4 -4
  26. package/use/listSort.js +1 -1
  27. package/use/listSubscription.js +3 -3
  28. package/use/object.js +4 -4
  29. package/use/objectCalculated.js +2 -2
  30. package/use/objectInstance.js +1 -1
  31. package/use/objectRelated.js +1 -1
  32. package/use/objectSubscription.js +3 -3
  33. package/use/paginatedListInstance.js +1 -1
  34. package/use/search.js +1 -1
  35. package/use/watchesRunning.js +1 -1
  36. package/utils/assignReactiveObject.js +1 -1
  37. package/utils/debugMessage.js +2 -2
  38. package/utils/debugWatch.js +1 -1
  39. package/utils/index.js +12 -12
  40. package/utils/keyDiff.js +2 -2
  41. package/utils/lifecycleDebug.js +3 -3
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./use/";
2
- export * from "./utils/";
1
+ export * from "./use/index.js";
2
+ export * from "./utils/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrai-innovations/reactive-helpers",
3
- "version": "8.1.1",
3
+ "version": "8.1.2",
4
4
  "description": "VueJS 3 utility composition functions to help manipulate objects and lists.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,4 +1,4 @@
1
- import { Resolvable } from "./crudPromise";
1
+ import { Resolvable } from "./crudPromise.js";
2
2
 
3
3
  export async function poll(condition, interval = 100, timeout = 1000) {
4
4
  let intervalId,
@@ -1,4 +1,4 @@
1
- import * as use from "../../../use";
1
+ import * as use from "../../../use/index.js";
2
2
  import fs from "fs/promises";
3
3
 
4
4
  describe("use/index.js", function () {
@@ -1,5 +1,5 @@
1
- import { useListFilters, useListSort } from "../../../use";
2
- import { doAwaitNot } from "../../../utils/watches";
1
+ import { useListFilters, useListSort } from "../../../use/index.js";
2
+ import { doAwaitNot } from "../../../utils/watches.js";
3
3
  import { nextTick, reactive, ref } from "vue";
4
4
  import { deepUnref } from "vue-deepunref";
5
5
 
@@ -1,4 +1,4 @@
1
- import { expectErrorToBeNull } from "../expectHelpers";
1
+ import { expectErrorToBeNull } from "../expectHelpers.js";
2
2
  import flushPromises from "flush-promises";
3
3
  import keyBy from "lodash-es/keyBy";
4
4
  import { inspect } from "util";
@@ -1,4 +1,4 @@
1
- // import { useListInstance, useListRelated } from "../../../use/listRelated";
1
+ // import { useListInstance, useListRelated } from "../../../use/listRelated.js";
2
2
  import { nextTick } from "vue";
3
3
  import { deepUnref } from "vue-deepunref";
4
4
 
@@ -1,4 +1,4 @@
1
- import { doAwaitTimeout } from "../../../utils";
1
+ import { doAwaitTimeout } from "../../../utils/index.js";
2
2
  import { nextTick } from "vue";
3
3
  import { deepUnref } from "vue-deepunref";
4
4
 
@@ -1,6 +1,6 @@
1
- import { doAwaitNot, doAwaitTimeout } from "../../../utils";
2
- import { CancellableResolvable } from "../crudPromise";
3
- import { poll } from "../poll";
1
+ import { doAwaitNot, doAwaitTimeout } from "../../../utils/index.js";
2
+ import { CancellableResolvable } from "../crudPromise.js";
3
+ import { poll } from "../poll.js";
4
4
  import flushPromises from "flush-promises";
5
5
  import { inspect } from "util";
6
6
  import { nextTick, reactive } from "vue";
@@ -1,5 +1,5 @@
1
- import { assignReactiveObject } from "../../../utils";
2
- import { expectErrorToBeNull } from "../expectHelpers";
1
+ import { assignReactiveObject } from "../../../utils/index.js";
2
+ import { expectErrorToBeNull } from "../expectHelpers.js";
3
3
  import flushPromises from "flush-promises";
4
4
  import { inspect } from "util";
5
5
  import { nextTick, reactive, ref } from "vue";
@@ -1,8 +1,8 @@
1
- import { doAwaitTimeout } from "../../../utils";
2
- import { assignReactiveObject } from "../../../utils/assignReactiveObject";
3
- import { expectErrorToBeNull } from "../expectHelpers";
4
- // import { getMockOnUnmounted } from "../mockOnUnmounted";
5
- import { poll } from "../poll";
1
+ import { assignReactiveObject } from "../../../utils/assignReactiveObject.js";
2
+ import { doAwaitTimeout } from "../../../utils/index.js";
3
+ import { expectErrorToBeNull } from "../expectHelpers.js";
4
+ // import { getMockOnUnmounted } from "../mockOnUnmounted.js";
5
+ import { poll } from "../poll.js";
6
6
  import flushPromises from "flush-promises";
7
7
  import cloneDeep from "lodash-es/cloneDeep";
8
8
  import { inspect } from "util";
@@ -1,4 +1,4 @@
1
- import { doAwaitTimeout } from "../../../utils";
1
+ import { doAwaitTimeout } from "../../../utils/index.js";
2
2
 
3
3
  describe("use/search", () => {
4
4
  let useSearch, setDefaultSearchOptions;
@@ -5,7 +5,7 @@ import {
5
5
  AwaitTimeoutError,
6
6
  doAwaitTimeout,
7
7
  ImmediateStopWatch,
8
- } from "../../../utils";
8
+ } from "../../../utils/index.js";
9
9
  import { performance } from "perf_hooks";
10
10
  import { nextTick, reactive } from "vue";
11
11
 
@@ -2,7 +2,7 @@ import {
2
2
  addOrUpdateReactiveObject,
3
3
  assignReactiveObject,
4
4
  AssignReactiveObjectError,
5
- } from "../../../utils/assignReactiveObject";
5
+ } from "../../../utils/assignReactiveObject.js";
6
6
  import { computed, EffectScope, effectScope, reactive, toRef } from "vue";
7
7
 
8
8
  describe("utils/assignReactiveObject", function () {
@@ -1,4 +1,4 @@
1
- import { combineClasses, objectifyClasses, stringifyClass, stringifyClasses } from "../../../utils/classes";
1
+ import { combineClasses, objectifyClasses, stringifyClass, stringifyClasses } from "../../../utils/classes.js";
2
2
  import { describe, expect, it } from "vitest";
3
3
  import { ref, shallowRef } from "vue";
4
4
 
@@ -1,4 +1,4 @@
1
- import { flattenPaths } from "../../../utils/flattenPaths";
1
+ import { flattenPaths } from "../../../utils/flattenPaths.js";
2
2
 
3
3
  describe("utils/flattenPaths", () => {
4
4
  describe("flattenPaths", () => {
@@ -1,4 +1,4 @@
1
- import * as utils from "../../../utils";
1
+ import * as utils from "../../../utils/index.js";
2
2
  import fs from "fs/promises";
3
3
 
4
4
  describe("utils/index.js", function () {
@@ -1,4 +1,4 @@
1
- import { keyDiff } from "../../../utils/keyDiff";
1
+ import { keyDiff } from "../../../utils/keyDiff.js";
2
2
 
3
3
  describe("keyDiff", function () {
4
4
  describe("should return the difference between two arrays of object keys", function () {
@@ -1,4 +1,4 @@
1
- import { difference, intersection, isSuperset, symmetricDifference, union } from "../../../utils/set";
1
+ import { difference, intersection, isSuperset, symmetricDifference, union } from "../../../utils/set.js";
2
2
 
3
3
  describe("utils/set", function () {
4
4
  describe("isSuperset", function () {
@@ -1,4 +1,4 @@
1
- import { combineClasses } from "../utils/classes";
1
+ import { combineClasses } from "../utils/classes.js";
2
2
  import { cloneDeep } from "lodash-es";
3
3
  import { isRef, ref, watch, isReactive } from "vue";
4
4
 
package/use/index.js CHANGED
@@ -1,17 +1,17 @@
1
- export * from "./cancellableIntent";
2
- export * from "./combineClasses";
3
- export * from "./list";
4
- export * from "./listCalculated";
5
- export * from "./listFilter";
6
- export * from "./listInstance";
7
- export * from "./listRelated";
8
- export * from "./listSort";
9
- export * from "./listSubscription";
10
- export * from "./object";
11
- export * from "./objectCalculated";
12
- export * from "./objectInstance";
13
- export * from "./objectRelated";
14
- export * from "./objectSubscription";
15
- export * from "./paginatedListInstance";
16
- export * from "./search";
17
- export * from "./watchesRunning";
1
+ export * from "./cancellableIntent.js";
2
+ export * from "./combineClasses.js";
3
+ export * from "./list.js";
4
+ export * from "./listCalculated.js";
5
+ export * from "./listFilter.js";
6
+ export * from "./listInstance.js";
7
+ export * from "./listRelated.js";
8
+ export * from "./listSort.js";
9
+ export * from "./listSubscription.js";
10
+ export * from "./object.js";
11
+ export * from "./objectCalculated.js";
12
+ export * from "./objectInstance.js";
13
+ export * from "./objectRelated.js";
14
+ export * from "./objectSubscription.js";
15
+ export * from "./paginatedListInstance.js";
16
+ export * from "./search.js";
17
+ export * from "./watchesRunning.js";
package/use/list.js CHANGED
@@ -1,8 +1,8 @@
1
- import { useListCalculated } from "./listCalculated";
2
- import { useListInstance } from "./listInstance";
3
- import { useListRelated } from "./listRelated";
4
- import { useListSubscription } from "./listSubscription";
5
- import { usePagedListInstance } from "./paginatedListInstance";
1
+ import { useListCalculated } from "./listCalculated.js";
2
+ import { useListInstance } from "./listInstance.js";
3
+ import { useListRelated } from "./listRelated.js";
4
+ import { useListSubscription } from "./listSubscription.js";
5
+ import { usePagedListInstance } from "./paginatedListInstance.js";
6
6
  import { effectScope, reactive, shallowReactive, shallowReadonly, toRef } from "vue";
7
7
 
8
8
  export const useLists = (listArgs) => {
@@ -1,8 +1,8 @@
1
- import { keyDiff, loadingCombine } from "../utils";
2
- import { listInstanceStateKeys } from "./listInstance";
3
- import { listRelatedStateKeys } from "./listRelated";
4
- import { listSubscriptionStateKeys } from "./listSubscription";
5
- import { useWatchesRunning } from "./watchesRunning";
1
+ import { keyDiff, loadingCombine } from "../utils/index.js";
2
+ import { listInstanceStateKeys } from "./listInstance.js";
3
+ import { listRelatedStateKeys } from "./listRelated.js";
4
+ import { listSubscriptionStateKeys } from "./listSubscription.js";
5
+ import { useWatchesRunning } from "./watchesRunning.js";
6
6
  import isEmpty from "lodash-es/isEmpty";
7
7
  import { computed, effectScope, onScopeDispose, reactive, toRef, watch } from "vue";
8
8
 
package/use/listFilter.js CHANGED
@@ -1,5 +1,5 @@
1
- import { keyDiff } from "../utils/keyDiff";
2
- import { useSearch } from "./search";
1
+ import { keyDiff } from "../utils/keyDiff.js";
2
+ import { useSearch } from "./search.js";
3
3
  import get from "lodash-es/get";
4
4
  import identity from "lodash-es/identity";
5
5
  import isEmpty from "lodash-es/isEmpty";
@@ -1,7 +1,7 @@
1
- import { keyDiff, loadingCombine } from "../utils";
2
- import { listInstanceStateKeys } from "./listInstance";
3
- import { listSubscriptionStateKeys } from "./listSubscription";
4
- import { useWatchesRunning } from "./watchesRunning";
1
+ import { keyDiff, loadingCombine } from "../utils/index.js";
2
+ import { listInstanceStateKeys } from "./listInstance.js";
3
+ import { listSubscriptionStateKeys } from "./listSubscription.js";
4
+ import { useWatchesRunning } from "./watchesRunning.js";
5
5
  import get from "lodash-es/get";
6
6
  import isArray from "lodash-es/isArray";
7
7
  import isEmpty from "lodash-es/isEmpty";
package/use/listSort.js CHANGED
@@ -1,4 +1,4 @@
1
- import { assignReactiveObject, keyDiff } from "../utils";
1
+ import { assignReactiveObject, keyDiff } from "../utils/index.js";
2
2
  import cloneDeep from "lodash-es/cloneDeep";
3
3
  import get from "lodash-es/get";
4
4
  import identity from "lodash-es/identity";
@@ -1,6 +1,6 @@
1
- import { loadingCombine } from "../utils/loadingCombine";
2
- import { useCancellableIntent } from "./cancellableIntent";
3
- import { listInstanceStateKeys, useListInstance } from "./listInstance";
1
+ import { loadingCombine } from "../utils/loadingCombine.js";
2
+ import { useCancellableIntent } from "./cancellableIntent.js";
3
+ import { listInstanceStateKeys, useListInstance } from "./listInstance.js";
4
4
  import inspect from "browser-util-inspect";
5
5
  import cloneDeep from "lodash-es/cloneDeep";
6
6
  import isEmpty from "lodash-es/isEmpty";
package/use/object.js CHANGED
@@ -1,7 +1,7 @@
1
- import { useObjectCalculated } from "./objectCalculated";
2
- import { useObjectInstance } from "./objectInstance";
3
- import { useObjectRelated } from "./objectRelated";
4
- import { useObjectSubscription } from "./objectSubscription";
1
+ import { useObjectCalculated } from "./objectCalculated.js";
2
+ import { useObjectInstance } from "./objectInstance.js";
3
+ import { useObjectRelated } from "./objectRelated.js";
4
+ import { useObjectSubscription } from "./objectSubscription.js";
5
5
  import { effectScope, reactive, shallowReadonly, toRef } from "vue";
6
6
 
7
7
  // Manages a chain of useObject* functions
@@ -1,5 +1,5 @@
1
- import { keyDiff, loadingCombine } from "../utils";
2
- import { useWatchesRunning } from "./watchesRunning";
1
+ import { keyDiff, loadingCombine } from "../utils/index.js";
2
+ import { useWatchesRunning } from "./watchesRunning.js";
3
3
  import isEmpty from "lodash-es/isEmpty";
4
4
  import { computed, effectScope, onScopeDispose, reactive, toRef, watch } from "vue";
5
5
 
@@ -1,4 +1,4 @@
1
- import { addOrUpdateReactiveObject, assignReactiveObject } from "../utils";
1
+ import { addOrUpdateReactiveObject, assignReactiveObject } from "../utils/index.js";
2
2
  import cloneDeep from "lodash-es/cloneDeep";
3
3
  import isFunction from "lodash-es/isFunction";
4
4
  import { reactive, toRef } from "vue";
@@ -1,4 +1,4 @@
1
- import { keyDiff } from "../utils";
1
+ import { keyDiff } from "../utils/index.js";
2
2
  import { useWatchesRunning } from "./watchesRunning";
3
3
  import get from "lodash-es/get";
4
4
  import isArray from "lodash-es/isArray";
@@ -1,6 +1,6 @@
1
- import { assignReactiveObject, loadingCombine } from "../utils";
2
- import { useCancellableIntent } from "./cancellableIntent";
3
- import { useObjectInstance } from "./objectInstance";
1
+ import { assignReactiveObject, loadingCombine } from "../utils/index.js";
2
+ import { useCancellableIntent } from "./cancellableIntent.js";
3
+ import { useObjectInstance } from "./objectInstance.js";
4
4
  import { computed, effectScope, reactive, toRef } from "vue";
5
5
 
6
6
  export class ObjectSubscriptionError extends Error {
@@ -1,4 +1,4 @@
1
- import { useListInstance } from "./listInstance";
1
+ import { useListInstance } from "./listInstance.js";
2
2
 
3
3
  export function usePagedListInstance({ keepOldPages = false, ...useListInstanceArgs }) {
4
4
  const listInstance = useListInstance(useListInstanceArgs);
package/use/search.js CHANGED
@@ -1,4 +1,4 @@
1
- import { assignReactiveObject } from "../utils/assignReactiveObject";
1
+ import { assignReactiveObject } from "../utils/assignReactiveObject.js";
2
2
  import FlexSearch from "flexsearch";
3
3
  import fromPairs from "lodash-es/fromPairs";
4
4
  import throttle from "lodash-es/throttle";
@@ -1,4 +1,4 @@
1
- import { loadingCombine } from "../utils";
1
+ import { loadingCombine } from "../utils/index.js";
2
2
  import { computed, effectScope, reactive, unref, watch } from "vue";
3
3
 
4
4
  export function useWatchesRunning({ triggerRefs, watchSentinelRefs }) {
@@ -1,4 +1,4 @@
1
- import { keyDiff } from "./keyDiff";
1
+ import { keyDiff } from "./keyDiff.js";
2
2
  import inspect from "browser-util-inspect";
3
3
  import isArray from "lodash-es/isArray";
4
4
  import isObject from "lodash-es/isObject";
@@ -1,5 +1,5 @@
1
- import { isSuperset } from "./set";
2
- import { transformWalk } from "./transformWalk";
1
+ import { isSuperset } from "./set.js";
2
+ import { transformWalk } from "./transformWalk.js";
3
3
  import { isSet, partial, union } from "lodash-es";
4
4
  import debounce from "lodash-es/debounce";
5
5
  import { unref } from "vue";
@@ -1,4 +1,4 @@
1
- import { keyDiff } from "./keyDiff";
1
+ import { keyDiff } from "./keyDiff.js";
2
2
  import isEqual from "lodash-es/isEqual";
3
3
  import { watch } from "vue";
4
4
  import { deepUnref } from "vue-deepunref";
package/utils/index.js CHANGED
@@ -1,12 +1,12 @@
1
- export * from "./assignReactiveObject";
2
- export * from "./classes";
3
- export * from "./debugMessage";
4
- export * from "./debugWatch";
5
- export * from "./flattenPaths";
6
- export * from "./getFakeId";
7
- export * from "./keyDiff";
8
- export * from "./lifecycleDebug";
9
- export * from "./loadingCombine";
10
- export * from "./set";
11
- export * from "./transformWalk";
12
- export * from "./watches";
1
+ export * from "./assignReactiveObject.js";
2
+ export * from "./classes.js";
3
+ export * from "./debugMessage.js";
4
+ export * from "./debugWatch.js";
5
+ export * from "./flattenPaths.js";
6
+ export * from "./getFakeId.js";
7
+ export * from "./keyDiff.js";
8
+ export * from "./lifecycleDebug.js";
9
+ export * from "./loadingCombine.js";
10
+ export * from "./set.js";
11
+ export * from "./transformWalk.js";
12
+ export * from "./watches.js";
package/utils/keyDiff.js CHANGED
@@ -1,5 +1,5 @@
1
- import { flattenPaths } from "./flattenPaths";
2
- import { difference, intersection } from "./set";
1
+ import { flattenPaths } from "./flattenPaths.js";
2
+ import { difference, intersection } from "./set.js";
3
3
 
4
4
  /**
5
5
  * Calculate the difference between objects in terms of what keys
@@ -1,6 +1,6 @@
1
- import { inspectWalkFn, useDebugMessage } from "./debugMessage";
2
- import { keyDiffDeep } from "./keyDiff";
3
- import { transformWalk } from "./transformWalk";
1
+ import { inspectWalkFn, useDebugMessage } from "./debugMessage.js";
2
+ import { keyDiffDeep } from "./keyDiff.js";
3
+ import { transformWalk } from "./transformWalk.js";
4
4
  import { isEqual, partial } from "lodash-es";
5
5
  import {
6
6
  onActivated,