@jtigernova-npm/tiffany-vue 2.0.0 → 2.1.0

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.
@@ -1,11 +1,11 @@
1
- import { logDebug, logErrorAlways } from "@jtigernova-npm/tiffany";
1
+ import { TiffanyLog } from "@jtigernova-npm/tiffany";
2
2
  import { ref } from "vue";
3
3
  export function getBaseStateOpts() {
4
4
  return {
5
5
  allowLoad: ref(true),
6
6
  loading: ref(false),
7
7
  onLoad: () => {
8
- logDebug("nothing to load. skipping...");
8
+ TiffanyLog.debug("nothing to load. skipping...");
9
9
  return Promise.resolve();
10
10
  },
11
11
  };
@@ -13,15 +13,16 @@ export function getBaseStateOpts() {
13
13
  export function getBaseStateHelper(loadable) {
14
14
  return {
15
15
  load() {
16
- if (!loadable.allowLoad)
16
+ if (!loadable.allowLoad.value) {
17
17
  return;
18
+ }
18
19
  loadable
19
20
  .onLoad()
20
21
  .then(() => {
21
- logDebug("BaseState.onLoad() done");
22
+ TiffanyLog.debug("BaseState.onLoad() done");
22
23
  })
23
24
  .catch((reason) => {
24
- logErrorAlways("BaseState.load() error", reason);
25
+ TiffanyLog.error("BaseState.load() error", reason);
25
26
  });
26
27
  },
27
28
  };
@@ -50,7 +51,7 @@ export function getTrackableScrollHelper(opts) {
50
51
  opts.onReachedBottom();
51
52
  }
52
53
  if (opts?.debug) {
53
- logDebug(`scroll -> top=${scrollTop.value}, topWithBuffer=${withBuffer}, scrollBottom=${sh}`);
54
+ TiffanyLog.debug(`scroll -> top=${scrollTop.value}, topWithBuffer=${withBuffer}, scrollBottom=${sh}`);
54
55
  }
55
56
  }
56
57
  },
@@ -60,7 +61,7 @@ export function getTrackableScrollHelper(opts) {
60
61
  f.scrollTop = scrollTop.value;
61
62
  }
62
63
  else {
63
- logDebug(`[setScrollTop] element not found with ID: ${scrollElementID}`);
64
+ TiffanyLog.debug(`[setScrollTop] element not found with ID: ${scrollElementID}`);
64
65
  }
65
66
  },
66
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jtigernova-npm/tiffany-vue",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "module": "out/index.js",
5
5
  "type": "module",
6
6
  "typings": "index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "vue": "^3.5.44"
33
33
  },
34
34
  "dependencies": {
35
- "@jtigernova-npm/tiffany": "^2.1.0",
35
+ "@jtigernova-npm/tiffany": "^3.0.0",
36
36
  "vue-router": "^4.3.3"
37
37
  },
38
38
  "peerDependencies": {