tsviewer 1.0.11 → 1.0.13

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.
@@ -12803,7 +12803,14 @@ function useHandleXhrError(e) {
12803
12803
  EventBus.$emit("ajaxError", e);
12804
12804
  }
12805
12805
  }
12806
- const getLayerIndex = (e, t, n) => {
12806
+ const useToken = () => {
12807
+ const e = inject("getToken");
12808
+ if (!e)
12809
+ throw new Error(
12810
+ "getToken is not provided. Please use a Nuxt plugin or Vue app to provide it."
12811
+ );
12812
+ return e;
12813
+ }, getLayerIndex = (e, t, n) => {
12807
12814
  const r = propOr("", e, t);
12808
12815
  return findIndex(propEq("id", r), n);
12809
12816
  }, initialState = () => ({
@@ -12858,7 +12865,7 @@ const getLayerIndex = (e, t, n) => {
12858
12865
  this.activeViewer = e;
12859
12866
  },
12860
12867
  async fetchAndSetActiveViewer(e) {
12861
- const t = e.packageId, n = this.userToken, r = `https://api.pennsieve.net/packages/${t}?api_key=${n}`, i = await useSendXhr(r);
12868
+ const t = e.packageId, n = await useToken(), r = `https://api.pennsieve.net/packages/${t}?api_key=${n}`, i = await useSendXhr(r);
12862
12869
  this.setActiveViewer(i);
12863
12870
  },
12864
12871
  closeViewer() {
@@ -14212,14 +14219,7 @@ const __unplugin_components_2 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["rend
14212
14219
  console.log(e), EventBus.$emit("ajaxError", e);
14213
14220
  }
14214
14221
  }
14215
- };
14216
- function useToken() {
14217
- const e = inject("useGetToken");
14218
- if (!e)
14219
- throw new Error("useGetToken is not provided. Make sure to provide it in your app.");
14220
- return e;
14221
- }
14222
- const _sfc_main$4 = {
14222
+ }, _sfc_main$4 = {
14223
14223
  name: "TimeseriesAnnotationCanvas",
14224
14224
  mixins: [
14225
14225
  Request,