@teselagen/ove 0.2.1 → 0.3.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/index.umd.js CHANGED
@@ -57197,12 +57197,20 @@
57197
57197
  return toString$4.call(it).slice(8, -1);
57198
57198
  };
57199
57199
 
57200
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
57201
- var cof$2 = _cof;
57202
- // eslint-disable-next-line no-prototype-builtins
57203
- var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
57204
- return cof$2(it) == 'String' ? it.split('') : Object(it);
57205
- };
57200
+ var _iobject;
57201
+ var hasRequired_iobject;
57202
+
57203
+ function require_iobject () {
57204
+ if (hasRequired_iobject) return _iobject;
57205
+ hasRequired_iobject = 1;
57206
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
57207
+ var cof = _cof;
57208
+ // eslint-disable-next-line no-prototype-builtins
57209
+ _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
57210
+ return cof(it) == 'String' ? it.split('') : Object(it);
57211
+ };
57212
+ return _iobject;
57213
+ }
57206
57214
 
57207
57215
  // 7.2.1 RequireObjectCoercible(argument)
57208
57216
  var _defined = function (it) {
@@ -57211,7 +57219,7 @@
57211
57219
  };
57212
57220
 
57213
57221
  // to indexed object, toObject with fallback for non-array-like ES3 strings
57214
- var IObject = _iobject;
57222
+ var IObject = require_iobject();
57215
57223
  var defined$2 = _defined;
57216
57224
  var _toIobject = function (it) {
57217
57225
  return IObject(defined$2(it));
@@ -57358,7 +57366,7 @@
57358
57366
  var gOPS = _objectGops;
57359
57367
  var pIE = require_objectPie();
57360
57368
  var toObject = _toObject;
57361
- var IObject = _iobject;
57369
+ var IObject = require_iobject();
57362
57370
  var $assign = Object.assign;
57363
57371
 
57364
57372
  // should work with symbols and should have deterministic property order (V8 bug)
@@ -188618,7 +188626,7 @@ double click --> edit`}`;
188618
188626
  }
188619
188627
 
188620
188628
  const name = "@teselagen/ove";
188621
- const version = "0.2.0";
188629
+ const version = "0.3.2";
188622
188630
  const main = "./src/index.js";
188623
188631
  const packageJson = {
188624
188632
  name: name,
@@ -192448,13 +192456,22 @@ double click --> edit`}`;
192448
192456
  sequenceData,
192449
192457
  selectionLayerUpdate,
192450
192458
  caretPosition,
192451
- selectionLayer
192459
+ selectionLayer,
192460
+ bpLimit
192452
192461
  } = props;
192453
192462
  const [newSeqData, { maintainOriginSplit }] = wrappedInsertSequenceDataAtPositionOrRange(
192454
192463
  seqDataToInsert,
192455
192464
  sequenceData,
192456
192465
  caretPosition > -1 ? caretPosition : selectionLayer
192457
192466
  );
192467
+ if (bpLimit) {
192468
+ if (newSeqData.sequence.length > bpLimit) {
192469
+ window.toastr.error(
192470
+ `Sorry, you cannot go over the limit of ${bpLimit} base pairs`
192471
+ );
192472
+ throw new Error("bpLimit exceeded");
192473
+ }
192474
+ }
192458
192475
  updateSequenceData(newSeqData);
192459
192476
  const seqDataInsertLength = seqDataToInsert.sequence ? seqDataToInsert.sequence.length : null;
192460
192477
  const selectionStartDistanceFromEnd = Math.min(sequenceData.size - selectionLayer.start, seqDataInsertLength) || seqDataInsertLength;
@@ -206983,6 +207000,7 @@ ${seqDataToCopy}\r
206983
207000
  "smartCircViewLabelRender",
206984
207001
  "onConfigureFeatureTypesClick",
206985
207002
  "allPartTags",
207003
+ "bpLimit",
206986
207004
  "editTagsLink",
206987
207005
  "readOnly",
206988
207006
  "shouldAutosave",
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.2.1",
3
+ "version": "0.3.3",
4
4
  "main": "./src/index.js",
5
5
  "dependencies": {
6
- "@teselagen/sequence-utils": "0.2.1",
7
- "@teselagen/range-utils": "0.2.1",
8
- "@teselagen/ui": "0.2.1",
9
- "@teselagen/file-utils": "0.2.1",
10
- "@teselagen/bounce-loader": "0.2.1",
11
- "@teselagen/bio-parsers": "0.2.1",
6
+ "@teselagen/sequence-utils": "0.3.3",
7
+ "@teselagen/range-utils": "0.3.3",
8
+ "@teselagen/ui": "0.3.3",
9
+ "@teselagen/file-utils": "0.3.3",
10
+ "@teselagen/bounce-loader": "0.3.3",
11
+ "@teselagen/bio-parsers": "0.3.3",
12
12
  "@blueprintjs/core": "3.52.0",
13
13
  "@blueprintjs/datetime": "3.23.19",
14
14
  "@blueprintjs/icons": "3.33.0",
@@ -12,6 +12,7 @@ export const userDefinedHandlersAndOpts = [
12
12
  "smartCircViewLabelRender",
13
13
  "onConfigureFeatureTypesClick",
14
14
  "allPartTags",
15
+ "bpLimit",
15
16
  "editTagsLink",
16
17
  "readOnly",
17
18
  "shouldAutosave",
@@ -1195,7 +1195,8 @@ const insertAndSelectHelper = ({ seqDataToInsert, props }) => {
1195
1195
  sequenceData,
1196
1196
  selectionLayerUpdate,
1197
1197
  caretPosition,
1198
- selectionLayer
1198
+ selectionLayer,
1199
+ bpLimit
1199
1200
  } = props;
1200
1201
 
1201
1202
  // sequenceData,
@@ -1222,6 +1223,14 @@ const insertAndSelectHelper = ({ seqDataToInsert, props }) => {
1222
1223
  sequenceData,
1223
1224
  caretPosition > -1 ? caretPosition : selectionLayer
1224
1225
  );
1226
+ if (bpLimit) {
1227
+ if (newSeqData.sequence.length > bpLimit) {
1228
+ window.toastr.error(
1229
+ `Sorry, you cannot go over the limit of ${bpLimit} base pairs`
1230
+ );
1231
+ throw new Error('bpLimit exceeded')
1232
+ }
1233
+ }
1225
1234
  updateSequenceData(newSeqData);
1226
1235
  const seqDataInsertLength = seqDataToInsert.sequence
1227
1236
  ? seqDataToInsert.sequence.length