@teselagen/ove 0.8.20 → 0.8.22

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
@@ -44330,7 +44330,8 @@ ${latestSubscriptionCallbackError.current.stack}
44330
44330
  onMultiRowSelect,
44331
44331
  noDeselectAll,
44332
44332
  onRowSelect,
44333
- change: change2
44333
+ change: change2,
44334
+ getCheckboxGroupId
44334
44335
  }) {
44335
44336
  const entity = rowInfo.original;
44336
44337
  onRowClick(e2, entity, rowInfo);
@@ -44402,6 +44403,38 @@ ${latestSubscriptionCallbackError.current.stack}
44402
44403
  }
44403
44404
  }
44404
44405
  }
44406
+ if (getCheckboxGroupId) {
44407
+ const clickedRowId = rowId;
44408
+ const clickedEntity = entity;
44409
+ const clickedGroupId = getCheckboxGroupId(clickedEntity, rowInfo.index);
44410
+ if (!newIdMap[clickedRowId] && clickedGroupId) {
44411
+ entities.forEach((e22, i2) => {
44412
+ if (getCheckboxGroupId(e22, i2) === clickedGroupId) {
44413
+ const id2 = getIdOrCodeOrIndex(e22, i2);
44414
+ delete newIdMap[id2];
44415
+ }
44416
+ });
44417
+ }
44418
+ const selectedGroupIds = /* @__PURE__ */ new Set();
44419
+ entities.forEach((e22, i2) => {
44420
+ const id2 = getIdOrCodeOrIndex(e22, i2);
44421
+ if (newIdMap[id2]) {
44422
+ const gid = getCheckboxGroupId(e22, i2);
44423
+ if (gid) selectedGroupIds.add(gid);
44424
+ }
44425
+ });
44426
+ if (selectedGroupIds.size > 0) {
44427
+ entities.forEach((e22, i2) => {
44428
+ const gid = getCheckboxGroupId(e22, i2);
44429
+ if (gid && selectedGroupIds.has(gid)) {
44430
+ const id2 = getIdOrCodeOrIndex(e22, i2);
44431
+ if (!newIdMap[id2]) {
44432
+ newIdMap[id2] = { entity: e22, time: Date.now() };
44433
+ }
44434
+ }
44435
+ });
44436
+ }
44437
+ }
44405
44438
  finalizeSelection({
44406
44439
  idMap: newIdMap,
44407
44440
  entities,
@@ -80887,6 +80920,7 @@ ${latestSubscriptionCallbackError.current.stack}
80887
80920
  resetDefaultVisibility,
80888
80921
  currentParams,
80889
80922
  compact,
80923
+ hideExpandSubCompColumn,
80890
80924
  editingCell,
80891
80925
  editingCellSelectAll,
80892
80926
  entities,
@@ -80934,7 +80968,8 @@ ${latestSubscriptionCallbackError.current.stack}
80934
80968
  withSort = true,
80935
80969
  recordIdToIsVisibleMap,
80936
80970
  setRecordIdToIsVisibleMap,
80937
- withDisplayOptions
80971
+ withDisplayOptions,
80972
+ getCheckboxGroupId
80938
80973
  }) => {
80939
80974
  const dispatch = useDispatch();
80940
80975
  const change$12 = reactExports.useCallback(
@@ -81182,6 +81217,14 @@ ${latestSubscriptionCallbackError.current.stack}
81182
81217
  return /* @__PURE__ */ React.createElement("div", null);
81183
81218
  }
81184
81219
  const entity = entities[rowIndex];
81220
+ if (getCheckboxGroupId) {
81221
+ const currentGroupId = getCheckboxGroupId(entity, rowIndex);
81222
+ const previousEntity = entities[rowIndex - 1];
81223
+ const previousGroupId = previousEntity ? getCheckboxGroupId(previousEntity, rowIndex - 1) : void 0;
81224
+ if (currentGroupId && currentGroupId === previousGroupId) {
81225
+ return /* @__PURE__ */ React.createElement("div", null);
81226
+ }
81227
+ }
81185
81228
  return /* @__PURE__ */ React.createElement(
81186
81229
  Checkbox,
81187
81230
  {
@@ -81200,7 +81243,8 @@ ${latestSubscriptionCallbackError.current.stack}
81200
81243
  onMultiRowSelect,
81201
81244
  noDeselectAll,
81202
81245
  onRowSelect,
81203
- change: change$12
81246
+ change: change$12,
81247
+ getCheckboxGroupId
81204
81248
  });
81205
81249
  }, "onClick"),
81206
81250
  checked: isSelected
@@ -81221,7 +81265,8 @@ ${latestSubscriptionCallbackError.current.stack}
81221
81265
  onRowSelect,
81222
81266
  onSingleRowSelect,
81223
81267
  reduxFormSelectedEntityIdMap,
81224
- withCheckboxes
81268
+ withCheckboxes,
81269
+ getCheckboxGroupId
81225
81270
  ]
81226
81271
  );
81227
81272
  const finishCellEdit = reactExports.useCallback(
@@ -81296,13 +81341,14 @@ ${latestSubscriptionCallbackError.current.stack}
81296
81341
  );
81297
81342
  }, "Header")
81298
81343
  }), {
81344
+ show: !hideExpandSubCompColumn,
81299
81345
  expander: true,
81300
81346
  Expander: /* @__PURE__ */ __name(({ isExpanded, original: record }) => {
81301
81347
  let shouldShow = true;
81302
81348
  if (shouldShowSubComponent) {
81303
81349
  shouldShow = shouldShowSubComponent(record);
81304
81350
  }
81305
- if (!shouldShow) return null;
81351
+ if (!shouldShow || hideExpandSubCompColumn) return null;
81306
81352
  return /* @__PURE__ */ React.createElement(
81307
81353
  Button,
81308
81354
  {
@@ -85844,6 +85890,7 @@ ${latestSubscriptionCallbackError.current.stack}
85844
85890
  minimalStyle,
85845
85891
  mustClickCheckboxToSelect,
85846
85892
  noDeselectAll,
85893
+ hideExpandSubCompColumn,
85847
85894
  noFooter = isSimple ? !withPaging : false,
85848
85895
  noFullscreenButton = isSimple,
85849
85896
  noHeader = false,
@@ -85891,7 +85938,8 @@ ${latestSubscriptionCallbackError.current.stack}
85891
85938
  withSort,
85892
85939
  withTitle = !isSimple,
85893
85940
  noExcessiveCheck,
85894
- isEntityCountLoading
85941
+ isEntityCountLoading,
85942
+ getCheckboxGroupId
85895
85943
  } = props;
85896
85944
  const _entities = reactExports.useMemo(
85897
85945
  () => ((reduxFormEntities == null ? void 0 : reduxFormEntities.length) ? reduxFormEntities : _origEntities) || [],
@@ -87428,6 +87476,15 @@ ${latestSubscriptionCallbackError.current.stack}
87428
87476
  const isExpanded = expandedEntityIdMap[rowId];
87429
87477
  const rowDisabled = isEntityDisabled(entity);
87430
87478
  const dataId = entity.id || entity.code;
87479
+ let noGroupBorder = false;
87480
+ if (getCheckboxGroupId) {
87481
+ const currentGroupId = getCheckboxGroupId(entity, rowInfo.index);
87482
+ const nextEntity = entities[rowInfo.index + 1];
87483
+ const nextGroupId = nextEntity ? getCheckboxGroupId(nextEntity, rowInfo.index + 1) : void 0;
87484
+ if (currentGroupId && currentGroupId === nextGroupId) {
87485
+ noGroupBorder = true;
87486
+ }
87487
+ }
87431
87488
  return {
87432
87489
  onClick: /* @__PURE__ */ __name((e2) => {
87433
87490
  if (isCellEditable) return;
@@ -87454,7 +87511,8 @@ ${latestSubscriptionCallbackError.current.stack}
87454
87511
  onMultiRowSelect,
87455
87512
  noDeselectAll,
87456
87513
  onRowSelect,
87457
- change: change$12
87514
+ change: change$12,
87515
+ getCheckboxGroupId
87458
87516
  });
87459
87517
  }, "onClick"),
87460
87518
  //row right click
@@ -87496,9 +87554,11 @@ ${latestSubscriptionCallbackError.current.stack}
87496
87554
  {
87497
87555
  disabled: rowDisabled,
87498
87556
  selected: rowSelected && !withCheckboxes,
87499
- "rt-tr-last-row": rowInfo.index === entities.length - 1
87557
+ "rt-tr-last-row": rowInfo.index === entities.length - 1,
87558
+ "no-group-border": noGroupBorder
87500
87559
  }
87501
87560
  ),
87561
+ "data-test-selected": !!rowSelected,
87502
87562
  "data-test-id": dataId === void 0 ? rowInfo.index : dataId,
87503
87563
  "data-index": rowInfo.index,
87504
87564
  "data-tip": typeof rowDisabled === "string" ? rowDisabled : void 0,
@@ -87529,7 +87589,8 @@ ${latestSubscriptionCallbackError.current.stack}
87529
87589
  reduxFormSelectedEntityIdMap,
87530
87590
  selectedCells,
87531
87591
  showContextMenu2,
87532
- withCheckboxes
87592
+ withCheckboxes,
87593
+ getCheckboxGroupId
87533
87594
  ]
87534
87595
  );
87535
87596
  const getTableCellProps = reactExports.useCallback(
@@ -87842,6 +87903,7 @@ ${latestSubscriptionCallbackError.current.stack}
87842
87903
  isSingleSelect,
87843
87904
  isSelectionARectangle,
87844
87905
  noDeselectAll,
87906
+ hideExpandSubCompColumn,
87845
87907
  noSelect,
87846
87908
  noUserSelect,
87847
87909
  onDeselect,
@@ -87873,6 +87935,7 @@ ${latestSubscriptionCallbackError.current.stack}
87873
87935
  withFilter,
87874
87936
  withSort,
87875
87937
  recordIdToIsVisibleMap,
87938
+ getCheckboxGroupId,
87876
87939
  setRecordIdToIsVisibleMap
87877
87940
  });
87878
87941
  const scrollToTop = reactExports.useCallback(
@@ -95997,9 +96060,19 @@ ${latestSubscriptionCallbackError.current.stack}
95997
96060
  content: content2,
95998
96061
  label,
95999
96062
  style: style2,
96000
- isOpenByDefault
96063
+ isOpenByDefault,
96064
+ localStorageKey
96001
96065
  }) {
96002
- const [isOpen2, setOpen] = reactExports.useState(isOpenByDefault);
96066
+ const [isOpen2, setOpen] = reactExports.useState(() => {
96067
+ if (localStorageKey) {
96068
+ if (window.localStorage.getItem(localStorageKey) === "true") {
96069
+ return true;
96070
+ } else if (window.localStorage.getItem(localStorageKey) === "false") {
96071
+ return false;
96072
+ }
96073
+ }
96074
+ return isOpenByDefault;
96075
+ });
96003
96076
  if (!(content2 || children)) {
96004
96077
  return null;
96005
96078
  }
@@ -96007,20 +96080,28 @@ ${latestSubscriptionCallbackError.current.stack}
96007
96080
  "div",
96008
96081
  {
96009
96082
  onClick: /* @__PURE__ */ __name(() => {
96010
- setOpen(!isOpen2);
96083
+ const newIsOpen = !isOpen2;
96084
+ setOpen(newIsOpen);
96085
+ if (localStorageKey) {
96086
+ window.localStorage.setItem(localStorageKey, newIsOpen);
96087
+ }
96011
96088
  }, "onClick"),
96012
- style: { cursor: "pointer", display: "flex", alignItems: "flex-end" },
96013
- className: "tg-toggle-advanced-options"
96089
+ style: {
96090
+ cursor: "pointer",
96091
+ display: "flex",
96092
+ alignItems: "center",
96093
+ userSelect: "none"
96094
+ },
96095
+ className: `tg-toggle-advanced-options`
96014
96096
  },
96015
- label || "Advanced",
96016
- " ",
96017
96097
  /* @__PURE__ */ React.createElement(
96018
96098
  Icon,
96019
96099
  {
96020
96100
  icon: isOpen2 ? "caret-down" : "caret-right",
96021
- style: { marginLeft: 5 }
96101
+ style: { marginRight: 5 }
96022
96102
  }
96023
- )
96103
+ ),
96104
+ /* @__PURE__ */ React.createElement("strong", null, label || "Advanced")
96024
96105
  ), isOpen2 && /* @__PURE__ */ React.createElement("div", { style: { marginTop: 10 } }, content2 || children));
96025
96106
  }
96026
96107
  __name(AdvancedOptions, "AdvancedOptions");
@@ -99308,6 +99389,7 @@ ${latestSubscriptionCallbackError.current.stack}
99308
99389
  topLeft: true,
99309
99390
  topRight: true
99310
99391
  },
99392
+ resizeHandleWrapperClass: "tg-dialog-resize-handle",
99311
99393
  maxHeight: windowHeight,
99312
99394
  maxWidth: windowWidth,
99313
99395
  bounds: "window",
@@ -125340,6 +125422,30 @@ ${seq.sequence}
125340
125422
  default: selectedPartTags,
125341
125423
  updateSelectedPartTags
125342
125424
  }, Symbol.toStringTag, { value: "Module" }));
125425
+ const updateTemporaryAnnotations = createMetaAction(
125426
+ "TEMPORARY_ANNOTATIONS_UPDATE"
125427
+ );
125428
+ const temporaryAnnotations = createMergedDefaultStateReducer(
125429
+ {
125430
+ TEMPORARY_ANNOTATIONS_UPDATE: /* @__PURE__ */ __name((state2, payload) => {
125431
+ return __spreadValues(__spreadValues({}, state2), payload);
125432
+ }, "TEMPORARY_ANNOTATIONS_UPDATE"),
125433
+ VECTOR_EDITOR_UPDATE: /* @__PURE__ */ __name((state2, payload) => {
125434
+ return __spreadValues(__spreadValues({}, state2), payload.temporaryAnnotations);
125435
+ }, "VECTOR_EDITOR_UPDATE")
125436
+ },
125437
+ {
125438
+ features: {},
125439
+ primers: {},
125440
+ parts: {},
125441
+ searchLayers: []
125442
+ }
125443
+ );
125444
+ const temporaryAnnotations$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
125445
+ __proto__: null,
125446
+ default: temporaryAnnotations,
125447
+ updateTemporaryAnnotations
125448
+ }, Symbol.toStringTag, { value: "Module" }));
125343
125449
  const vectorEditorMiddleware = /* @__PURE__ */ __name((store2) => (next) => (action2) => {
125344
125450
  if (action2.meta && action2.meta.disregardUndo) {
125345
125451
  return next(action2);
@@ -125455,7 +125561,8 @@ ${seq.sequence}
125455
125561
  partLengthsToHide: partLengthsToHide$1,
125456
125562
  primerLengthsToHide: primerLengthsToHide$1,
125457
125563
  featureLengthsToHide: featureLengthsToHide$1,
125458
- selectedPartTags: selectedPartTags$1
125564
+ selectedPartTags: selectedPartTags$1,
125565
+ temporaryAnnotations: temporaryAnnotations$1
125459
125566
  };
125460
125567
  const vectorEditorInitialize = createMetaAction("VECTOR_EDITOR_UPDATE");
125461
125568
  const vectorEditorClear = createMetaAction("VECTOR_EDITOR_CLEAR");
@@ -126134,9 +126241,10 @@ ${seq.sequence}
126134
126241
  }
126135
126242
  __name(translationsRawSelector, "translationsRawSelector");
126136
126243
  const translationsRawSelector$1 = createSelector(sequenceDataSelector, translationsRawSelector);
126137
- function searchLayersSelector(sequence2, isCircular, isOpen2, searchString, ambiguousOrLiteral, dnaOrAA, isProtein2, proteinSequence, mismatchesAllowed) {
126244
+ function searchLayersSelector(sequence2, isCircular, isOpen2, searchString, ambiguousOrLiteral, dnaOrAA, isProtein2, proteinSequence, mismatchesAllowed, tempSearchLayers = []) {
126245
+ const toReturn = [...tempSearchLayers];
126138
126246
  if (!searchString || !isOpen2) {
126139
- return [];
126247
+ return toReturn;
126140
126248
  }
126141
126249
  if (isProtein2) {
126142
126250
  const searchingDna = dnaOrAA === "DNA";
@@ -126153,7 +126261,7 @@ ${seq.sequence}
126153
126261
  ).sort(({ start: start2 }, { start: start22 }) => {
126154
126262
  return start2 - start22;
126155
126263
  });
126156
- return searchingDna ? matches2 : matches2.map((_a2) => {
126264
+ const r2 = searchingDna ? matches2 : matches2.map((_a2) => {
126157
126265
  var _b2 = _a2, { start: start2, end: end2 } = _b2, rest = __objRest(_b2, ["start", "end"]);
126158
126266
  return __spreadProps(__spreadValues({}, rest), {
126159
126267
  isSearchLayer: true,
@@ -126161,6 +126269,10 @@ ${seq.sequence}
126161
126269
  end: end2 * 3 + 2
126162
126270
  });
126163
126271
  });
126272
+ return [
126273
+ ...toReturn,
126274
+ ...r2
126275
+ ];
126164
126276
  }
126165
126277
  if (dnaOrAA === "DNA" && ambiguousOrLiteral === "LITERAL" && mismatchesAllowed > 0) {
126166
126278
  const approxMatches = findApproxMatches(
@@ -126178,9 +126290,9 @@ ${seq.sequence}
126178
126290
  isSearchLayer: true,
126179
126291
  forward: true
126180
126292
  })).sort((a2, b3) => a2.start - b3.start);
126181
- return matches2.map((match) => __spreadProps(__spreadValues({}, match), {
126293
+ return [...toReturn, ...matches2.map((match) => __spreadProps(__spreadValues({}, match), {
126182
126294
  className: "veSearchLayer"
126183
- }));
126295
+ }))];
126184
126296
  }
126185
126297
  const matches = findSequenceMatches(sequence2, searchString, {
126186
126298
  isCircular,
@@ -126190,11 +126302,11 @@ ${seq.sequence}
126190
126302
  }).sort(({ start: start2 }, { start: start22 }) => {
126191
126303
  return start2 - start22;
126192
126304
  });
126193
- return matches.map((match) => __spreadProps(__spreadValues({}, match), {
126305
+ return [...toReturn, ...matches.map((match) => __spreadProps(__spreadValues({}, match), {
126194
126306
  forward: !match.bottomStrand,
126195
126307
  className: "veSearchLayer " + (match.bottomStrand ? " veSearchLayerBottomStrand" : ""),
126196
126308
  isSearchLayer: true
126197
- }));
126309
+ }))];
126198
126310
  }
126199
126311
  __name(searchLayersSelector, "searchLayersSelector");
126200
126312
  const searchLayersSelector$1 = createSelector(
@@ -126207,6 +126319,7 @@ ${seq.sequence}
126207
126319
  (state2) => state2.sequenceData.isProtein,
126208
126320
  (state2) => state2.sequenceData.proteinSequence,
126209
126321
  (state2) => state2.findTool && state2.findTool.mismatchesAllowed,
126322
+ (state2) => state2.temporaryAnnotations.searchLayers,
126210
126323
  searchLayersSelector
126211
126324
  );
126212
126325
  const translationSearchMatchesSelector = createSelector(
@@ -126220,11 +126333,16 @@ ${seq.sequence}
126220
126333
  return searchLayers;
126221
126334
  }
126222
126335
  );
126223
- function featuresRawSelector(sequenceData2) {
126224
- return sequenceData2.features;
126336
+ const temporaryAnnotationsSelector = /* @__PURE__ */ __name((editor) => editor.temporaryAnnotations, "temporaryAnnotationsSelector");
126337
+ function featuresRawSelector(sequenceData2, temporaryAnnotations2) {
126338
+ return __spreadValues(__spreadValues({}, sequenceData2.features), temporaryAnnotations2 == null ? void 0 : temporaryAnnotations2.features);
126225
126339
  }
126226
126340
  __name(featuresRawSelector, "featuresRawSelector");
126227
- const featuresSelector = createSelector(sequenceDataSelector, featuresRawSelector);
126341
+ const featuresSelector = createSelector(
126342
+ sequenceDataSelector,
126343
+ temporaryAnnotationsSelector,
126344
+ featuresRawSelector
126345
+ );
126228
126346
  function cdsFeaturesRawSelector(features2) {
126229
126347
  return filter(features2, ({ type: type2 }) => type2 && type2.toUpperCase() === "CDS");
126230
126348
  }
@@ -126504,11 +126622,15 @@ ${seq.sequence}
126504
126622
  (state2) => state2.featureLengthsToHide,
126505
126623
  filteredFeaturesSelector
126506
126624
  );
126507
- function primersRawSelector(sequenceData2) {
126508
- return sequenceData2.primers;
126625
+ function primersRawSelector(sequenceData2, temporaryAnnotations2) {
126626
+ return __spreadValues(__spreadValues({}, sequenceData2.primers), temporaryAnnotations2 == null ? void 0 : temporaryAnnotations2.primers);
126509
126627
  }
126510
126628
  __name(primersRawSelector, "primersRawSelector");
126511
- const primersSelector = createSelector(sequenceDataSelector, primersRawSelector);
126629
+ const primersSelector = createSelector(
126630
+ sequenceDataSelector,
126631
+ temporaryAnnotationsSelector,
126632
+ primersRawSelector
126633
+ );
126512
126634
  function filteredPrimersSelector(primers2, seqLen, primerIndividualToHide, lengthsToHide) {
126513
126635
  return omitBy(primers2, (ann) => {
126514
126636
  const hideIndividually = primerIndividualToHide[ann.id];
@@ -126523,11 +126645,15 @@ ${seq.sequence}
126523
126645
  (state2) => state2.primerLengthsToHide,
126524
126646
  filteredPrimersSelector
126525
126647
  );
126526
- function partsRawSelector(sequenceData2) {
126527
- return sequenceData2.parts;
126648
+ function partsRawSelector(sequenceData2, temporaryAnnotations2) {
126649
+ return __spreadValues(__spreadValues({}, sequenceData2.parts), temporaryAnnotations2 == null ? void 0 : temporaryAnnotations2.parts);
126528
126650
  }
126529
126651
  __name(partsRawSelector, "partsRawSelector");
126530
- const partsSelector = createSelector(sequenceDataSelector, partsRawSelector);
126652
+ const partsSelector = createSelector(
126653
+ sequenceDataSelector,
126654
+ temporaryAnnotationsSelector,
126655
+ partsRawSelector
126656
+ );
126531
126657
  const tagsToBoldSelector = /* @__PURE__ */ __name((state2) => state2.selectedPartTags.parts, "tagsToBoldSelector");
126532
126658
  function addWrappedAddons(anns, seqLen) {
126533
126659
  return flatMap(anns, (ann) => {
@@ -127354,7 +127480,8 @@ ${seq.sequence}
127354
127480
  annotationVisibility: annotationVisibility2,
127355
127481
  annotationsToSupport: annotationsToSupport2,
127356
127482
  findTool: findTool2,
127357
- justPassingPartialSeqData
127483
+ justPassingPartialSeqData,
127484
+ temporaryAnnotations: temporaryAnnotations2
127358
127485
  } = initialValues2;
127359
127486
  const currentEditor = store2.getState().VectorEditor[editorName] || {};
127360
127487
  const isAlreadyProteinEditor = currentEditor.sequenceData && currentEditor.sequenceData.isProtein;
@@ -127476,12 +127603,14 @@ ${seq.sequence}
127476
127603
  };
127477
127604
  }
127478
127605
  }
127479
- payload = __spreadValues(__spreadValues(__spreadValues({}, initialValues2), toSpread), sequenceData2 && {
127606
+ payload = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, initialValues2), toSpread), sequenceData2 && {
127480
127607
  sequenceData: tidyUpSequenceData(sequenceData2, {
127481
127608
  convertAnnotationsFromAAIndices,
127482
127609
  //if we have sequence data coming in make sure to tidy it up for the user :)
127483
127610
  annotationsAsObjects: true
127484
127611
  })
127612
+ }), temporaryAnnotations2 && {
127613
+ temporaryAnnotations: temporaryAnnotations2
127485
127614
  });
127486
127615
  }
127487
127616
  annotationTypes.forEach((t2) => {
@@ -144906,7 +145035,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
144906
145035
  input.click();
144907
145036
  }
144908
145037
  __name(showFileDialog, "showFileDialog");
144909
- const version = "0.8.19";
145038
+ const version = "0.8.21";
144910
145039
  const packageJson = {
144911
145040
  version
144912
145041
  };
package/ove.css CHANGED
@@ -8819,12 +8819,14 @@ span.bp3-popover-target{
8819
8819
  /*# sourceMappingURL=blueprint-icons.css.map */:root {
8820
8820
  --base1: #ffffff;
8821
8821
  --base2: #cdcdcd;
8822
+ --base3: #a1a3a5;
8822
8823
  --reversed: #293742;
8823
8824
  }
8824
8825
 
8825
8826
  body.bp3-dark {
8826
8827
  --base1: #393a3a;
8827
8828
  --base2: #293742;
8829
+ --base3: #959697;
8828
8830
  --reversed: #cdcdcd;
8829
8831
  }
8830
8832
 
@@ -9611,6 +9613,50 @@ button:not(:disabled):active {
9611
9613
  border: none;
9612
9614
  }
9613
9615
 
9616
+ .ReactTable.ReactTable .rt-tbody .rt-tr-group.no-group-border {
9617
+ border-bottom: none;
9618
+ }
9619
+
9620
+ .react-draggable .bp3-dialog {
9621
+ /* add little chevrons in the bottom corners of the dialog to show its draggable */
9622
+ position: relative;
9623
+ }
9624
+
9625
+ .react-draggable .bp3-dialog::before,
9626
+ .react-draggable .bp3-dialog::after {
9627
+ content: "";
9628
+ position: absolute;
9629
+ bottom: 3px;
9630
+ width: 10px;
9631
+ height: 10px;
9632
+ border-style: double;
9633
+ border-color: var(--base3);
9634
+ border-width: 0;
9635
+ border-bottom-width: 6px;
9636
+ pointer-events: none;
9637
+ }
9638
+
9639
+ .react-draggable .bp3-dialog::before {
9640
+ left: 3px;
9641
+ border-left-width: 6px;
9642
+ border-bottom-left-radius: 2px;
9643
+ }
9644
+
9645
+ .react-draggable .bp3-dialog::after {
9646
+ right: 3px;
9647
+ border-right-width: 6px;
9648
+ border-bottom-right-radius: 2px;
9649
+ }
9650
+
9651
+ .react-draggable .tg-dialog-resize-handle div:first-child {
9652
+ bottom: 0px !important;
9653
+ left: 0px !important;
9654
+ }
9655
+ .react-draggable .tg-dialog-resize-handle div:nth-child(2) {
9656
+ bottom: 0px !important;
9657
+ right: 0px !important;
9658
+ }
9659
+
9614
9660
  .bp3-dark .ReactTable.ReactTable .rt-tbody .rt-tr-group {
9615
9661
  border-bottom-color: rgba(16, 22, 26, 0.15);
9616
9662
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.8.20",
3
+ "version": "0.8.22",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -19,7 +19,7 @@
19
19
  "@teselagen/range-utils": "0.3.13",
20
20
  "@teselagen/react-list": "0.8.18",
21
21
  "@teselagen/sequence-utils": "0.3.36",
22
- "@teselagen/ui": "0.10.9",
22
+ "@teselagen/ui": "0.10.10",
23
23
  "@use-gesture/react": "10.3.0",
24
24
  "biomsa": "^0.2.4",
25
25
  "classnames": "^2.3.2",
@@ -0,0 +1,6 @@
1
+ export const updateTemporaryAnnotations: import('redux-act').ComplexActionCreator1<any, any, any>;
2
+ declare const _default: {
3
+ (newState: {} | undefined, action: any): any;
4
+ __shouldUseMergedState: boolean;
5
+ };
6
+ export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any) => any, {
1
+ declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any, args_1: any) => any, {
2
2
  clearCache: () => void;
3
3
  }> & {
4
4
  clearCache: () => void;
@@ -1,4 +1,4 @@
1
- declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any) => any, {
1
+ declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any, args_1: any) => any, {
2
2
  clearCache: () => void;
3
3
  }> & {
4
4
  clearCache: () => void;
@@ -1,4 +1,4 @@
1
- declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any) => any, {
1
+ declare const _default: ((state: any) => any) & import('reselect').OutputSelectorFields<(args_0: any, args_1: any) => any, {
2
2
  clearCache: () => void;
3
3
  }> & {
4
4
  clearCache: () => void;
@@ -1,4 +1,4 @@
1
- declare const _default: ((state: any) => any[]) & import('reselect').OutputSelectorFields<(args_0: any, args_1: any, args_2: any, args_3: any, args_4: any, args_5: any, args_6: any, args_7: any, args_8: any) => any[], {
1
+ declare const _default: ((state: any, ...params: any[]) => any[]) & import('reselect').OutputSelectorFields<(...args: readonly unknown[]) => any[], {
2
2
  clearCache: () => void;
3
3
  }> & {
4
4
  clearCache: () => void;
@@ -0,0 +1,2 @@
1
+ declare function _default(editor: any): any;
2
+ export default _default;
@@ -34,6 +34,7 @@ import * as featureLengthsToHide from "./featureLengthsToHide";
34
34
  import * as primerLengthsToHide from "./primerLengthsToHide";
35
35
  import * as partLengthsToHide from "./partLengthsToHide";
36
36
  import * as selectedPartTags from "./selectedPartTags";
37
+ import * as temporaryAnnotations from "./temporaryAnnotations";
37
38
  import { combineReducers } from "redux";
38
39
  import createAction from "./utils/createMetaAction";
39
40
  export { default as vectorEditorMiddleware } from "./middleware";
@@ -72,7 +73,8 @@ const subReducers = {
72
73
  partLengthsToHide,
73
74
  primerLengthsToHide,
74
75
  featureLengthsToHide,
75
- selectedPartTags
76
+ selectedPartTags,
77
+ temporaryAnnotations
76
78
  };
77
79
 
78
80
  const vectorEditorInitialize = createAction("VECTOR_EDITOR_UPDATE");
@@ -0,0 +1,23 @@
1
+ import createAction from "./utils/createMetaAction";
2
+ import createMergedDefaultStateReducer from "./utils/createMergedDefaultStateReducer";
3
+
4
+ export const updateTemporaryAnnotations = createAction(
5
+ "TEMPORARY_ANNOTATIONS_UPDATE"
6
+ );
7
+
8
+ export default createMergedDefaultStateReducer(
9
+ {
10
+ TEMPORARY_ANNOTATIONS_UPDATE: (state, payload) => {
11
+ return { ...state, ...payload };
12
+ },
13
+ VECTOR_EDITOR_UPDATE: (state, payload) => {
14
+ return { ...state, ...payload.temporaryAnnotations };
15
+ }
16
+ },
17
+ {
18
+ features: {},
19
+ primers: {},
20
+ parts: {},
21
+ searchLayers: []
22
+ }
23
+ );
@@ -1,8 +1,13 @@
1
1
  import { createSelector } from "reselect";
2
2
  import sequenceDataSelector from "./sequenceDataSelector";
3
+ import temporaryAnnotationsSelector from "./temporaryAnnotationsSelector";
3
4
 
4
- function featuresRawSelector(sequenceData) {
5
- return sequenceData.features;
5
+ function featuresRawSelector(sequenceData, temporaryAnnotations) {
6
+ return { ...sequenceData.features, ...temporaryAnnotations?.features };
6
7
  }
7
8
 
8
- export default createSelector(sequenceDataSelector, featuresRawSelector);
9
+ export default createSelector(
10
+ sequenceDataSelector,
11
+ temporaryAnnotationsSelector,
12
+ featuresRawSelector
13
+ );
@@ -1,8 +1,14 @@
1
1
  import { createSelector } from "reselect";
2
2
  import sequenceDataSelector from "./sequenceDataSelector";
3
3
 
4
- function partsRawSelector(sequenceData) {
5
- return sequenceData.parts;
4
+ import temporaryAnnotationsSelector from "./temporaryAnnotationsSelector";
5
+
6
+ function partsRawSelector(sequenceData, temporaryAnnotations) {
7
+ return { ...sequenceData.parts, ...temporaryAnnotations?.parts };
6
8
  }
7
9
 
8
- export default createSelector(sequenceDataSelector, partsRawSelector);
10
+ export default createSelector(
11
+ sequenceDataSelector,
12
+ temporaryAnnotationsSelector,
13
+ partsRawSelector
14
+ );
@@ -1,8 +1,14 @@
1
1
  import { createSelector } from "reselect";
2
2
  import sequenceDataSelector from "./sequenceDataSelector";
3
3
 
4
- function primersRawSelector(sequenceData) {
5
- return sequenceData.primers;
4
+ import temporaryAnnotationsSelector from "./temporaryAnnotationsSelector";
5
+
6
+ function primersRawSelector(sequenceData, temporaryAnnotations) {
7
+ return { ...sequenceData.primers, ...temporaryAnnotations?.primers };
6
8
  }
7
9
 
8
- export default createSelector(sequenceDataSelector, primersRawSelector);
10
+ export default createSelector(
11
+ sequenceDataSelector,
12
+ temporaryAnnotationsSelector,
13
+ primersRawSelector
14
+ );