@teselagen/ove 0.7.29 → 0.7.30-beta.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.
@@ -1,5 +1,5 @@
1
1
  import { reduce } from "lodash-es";
2
- import uuid from "shortid";
2
+ import { nanoid } from "nanoid";
3
3
  import sequenceSelector from "./sequenceSelector";
4
4
  import orfsSelector from "./orfsSelector";
5
5
  import { createSelector } from "reselect";
@@ -28,7 +28,7 @@ function translationsSelector(
28
28
  const translationsToPass = {
29
29
  ...translationSearchMatches.reduce((acc, match) => {
30
30
  if (!match) return acc;
31
- const id = match.id || uuid();
31
+ const id = match.id || nanoid();
32
32
  acc[id] = {
33
33
  ...match,
34
34
  id,
@@ -79,7 +79,7 @@ function translationsSelector(
79
79
  (acc, isActive, frameName) => {
80
80
  const frameOffset = Number(frameName);
81
81
  if (isActive) {
82
- const id = uuid();
82
+ const id = nanoid();
83
83
  acc[id] = {
84
84
  id,
85
85
  start:
@@ -1,6 +1,6 @@
1
1
  //helper function to make sure any arrays coming in
2
2
 
3
- import shortid from "shortid";
3
+ import { nanoid } from "nanoid";
4
4
 
5
5
  //get converted to objects with unique ids
6
6
  export default function arrayToObjWithIds(array) {
@@ -8,7 +8,7 @@ export default function arrayToObjWithIds(array) {
8
8
  array.forEach(function (item) {
9
9
  const newItem = {
10
10
  ...item,
11
- id: item.id || shortid()
11
+ id: item.id || nanoid()
12
12
  };
13
13
  newObj[newItem.id] = newItem;
14
14
  });
@@ -27,7 +27,7 @@ import {
27
27
  invertRange,
28
28
  normalizeRange
29
29
  } from "@teselagen/range-utils";
30
- import shortid from "shortid";
30
+ import { nanoid } from "nanoid";
31
31
 
32
32
  import addMetaToActionCreators from "../redux/utils/addMetaToActionCreators";
33
33
  import { actions, editorReducer } from "../redux";
@@ -268,7 +268,7 @@ export const importSequenceFromFile =
268
268
  }
269
269
 
270
270
  if (seqData) {
271
- seqData.stateTrackingId = shortid();
271
+ seqData.stateTrackingId = nanoid();
272
272
  updateEditor(
273
273
  {
274
274
  getState: () => ({ VectorEditor: { [props.editorName]: props } }),