gramene-search 1.7.16 → 1.7.18

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.
@@ -49,7 +49,8 @@
49
49
  "Bash(git -C /Users/olson/src/warelab/gramene-search diff src/bundles/index.js src/bundles/views.js src/components/geneSearchUI.js src/components/results/details/VEP.js src/demo.js)",
50
50
  "Bash(git -C /Users/olson/src/warelab/gramene-search add src/bundles/index.js src/bundles/views.js src/bundles/exporter.js src/bundles/ontologies.js src/bundles/swaggerFields.js src/components/geneSearchUI.js src/components/results/details/VEP.js src/components/exporter/ src/demo.js src/fieldCatalog.overlay.json src/vepStudyInfo.js)",
51
51
  "Bash(git -C /Users/olson/src/warelab/gramene-search commit -m ' *)",
52
- "Bash(git -C /Users/olson/src/warelab/gramene-search add src/bundles/swaggerFields.js)"
52
+ "Bash(git -C /Users/olson/src/warelab/gramene-search add src/bundles/swaggerFields.js)",
53
+ "Bash(git commit -m ' *)"
53
54
  ]
54
55
  }
55
56
  }
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- 281877745
2
- 1776798889143349000
1
+ 283337474
2
+ 1776808721094207000
package/dist/index.js CHANGED
@@ -1407,6 +1407,7 @@ $af4441dd29af05df$var$grameneFilters.reactGrameneFilters = (0, $gXNCa$reduxbundl
1407
1407
  var $af4441dd29af05df$export$2e2bcd8739ae039 = $af4441dd29af05df$var$grameneFilters;
1408
1408
 
1409
1409
 
1410
+
1410
1411
  const $24971af0a229e0e3$var$grameneViews = {
1411
1412
  name: 'grameneViews',
1412
1413
  getReducer: ()=>{
@@ -1455,13 +1456,18 @@ const $24971af0a229e0e3$var$grameneViews = {
1455
1456
  show: 'off',
1456
1457
  shouldScroll: false
1457
1458
  }
1458
- ]
1459
+ ],
1460
+ touched: {}
1459
1461
  };
1460
1462
  return (state = initialState, { type: type, payload: payload })=>{
1461
1463
  let newState;
1462
1464
  switch(type){
1463
1465
  case 'GRAMENE_VIEW_TOGGLED':
1464
1466
  newState = Object.assign({}, state);
1467
+ newState.touched = {
1468
+ ...state.touched || {},
1469
+ [payload]: true
1470
+ };
1465
1471
  newState.options.forEach((view)=>{
1466
1472
  view.shouldScroll = false;
1467
1473
  if (view.id === payload) {
@@ -1472,6 +1478,10 @@ const $24971af0a229e0e3$var$grameneViews = {
1472
1478
  return newState;
1473
1479
  case 'GRAMENE_VIEW_CLICKED':
1474
1480
  newState = Object.assign({}, state);
1481
+ newState.touched = {
1482
+ ...state.touched || {},
1483
+ [payload]: true
1484
+ };
1475
1485
  newState.options.forEach((view)=>{
1476
1486
  view.shouldScroll = false;
1477
1487
  if (view.id === payload) {
@@ -1507,7 +1517,28 @@ const $24971af0a229e0e3$var$grameneViews = {
1507
1517
  payload: null
1508
1518
  });
1509
1519
  },
1510
- selectGrameneViews: (state)=>state.grameneViews
1520
+ selectRawGrameneViews: (state)=>state.grameneViews,
1521
+ selectGrameneViews: (0, $gXNCa$reduxbundler.createSelector)('selectRawGrameneViews', 'selectConfiguration', (raw, config)=>{
1522
+ const overrides = config && config.views || null;
1523
+ if (!overrides) return raw;
1524
+ const touched = raw.touched || {};
1525
+ return {
1526
+ ...raw,
1527
+ options: raw.options.filter((v)=>overrides[v.id] !== 'hidden').map((v)=>{
1528
+ const o = overrides[v.id];
1529
+ if (!o) return v;
1530
+ if (o === 'disabled') return {
1531
+ ...v,
1532
+ show: 'disabled'
1533
+ };
1534
+ if (touched[v.id]) return v;
1535
+ return {
1536
+ ...v,
1537
+ show: o
1538
+ };
1539
+ })
1540
+ };
1541
+ })
1511
1542
  };
1512
1543
  var $24971af0a229e0e3$export$2e2bcd8739ae039 = $24971af0a229e0e3$var$grameneViews;
1513
1544