@nanoporetech-digital/components 4.8.0 → 4.9.1

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cjs/{nano-table-8ac4ae00.js → nano-table-ba660665.js} +12 -10
  3. package/dist/cjs/nano-table-ba660665.js.map +1 -0
  4. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  5. package/dist/cjs/{table.worker-f8d9d66b.js → table.worker-1e265707.js} +3 -3
  6. package/dist/cjs/table.worker-1e265707.js.map +1 -0
  7. package/dist/cjs/table.worker-f820b411.js +4 -0
  8. package/dist/collection/components/table/table-interface.js.map +1 -1
  9. package/dist/collection/components/table/table.cell.js +1 -1
  10. package/dist/collection/components/table/table.cell.js.map +1 -1
  11. package/dist/collection/components/table/table.header.js +3 -3
  12. package/dist/collection/components/table/table.header.js.map +1 -1
  13. package/dist/collection/components/table/table.js +6 -3
  14. package/dist/collection/components/table/table.js.map +1 -1
  15. package/dist/collection/components/table/table.store.js +2 -2
  16. package/dist/collection/components/table/table.store.js.map +1 -1
  17. package/dist/collection/components/table/table.worker.js +86 -66
  18. package/dist/collection/components/table/table.worker.js.map +1 -1
  19. package/dist/components/table.js +12 -9
  20. package/dist/components/table.js.map +1 -1
  21. package/dist/components/table.worker.js +1 -1
  22. package/dist/esm/{nano-table-2b97d794.js → nano-table-c68bc58c.js} +12 -10
  23. package/dist/esm/nano-table-c68bc58c.js.map +1 -0
  24. package/dist/esm/nano-table.entry.js +1 -1
  25. package/dist/esm/{table.worker-6eec124e.js → table.worker-8c883d01.js} +3 -3
  26. package/dist/esm/table.worker-8c883d01.js.map +1 -0
  27. package/dist/esm/table.worker-f820b411.js +4 -0
  28. package/dist/nano-assets/fonts/MHeiPRCBold_normal_normal.woff +0 -0
  29. package/dist/nano-assets/fonts/MHeiPRCBold_normal_normal.woff2 +0 -0
  30. package/dist/nano-assets/fonts/MHeiPRCHeavy_normal_normal.woff +0 -0
  31. package/dist/nano-assets/fonts/MHeiPRCHeavy_normal_normal.woff2 +0 -0
  32. package/dist/nano-assets/fonts/MHeiPRCLight_normal_normal.woff +0 -0
  33. package/dist/nano-assets/fonts/MHeiPRCLight_normal_normal.woff2 +0 -0
  34. package/dist/nano-assets/fonts/MHeiPRCMedium_normal_normal.woff +0 -0
  35. package/dist/nano-assets/fonts/MHeiPRCMedium_normal_normal.woff2 +0 -0
  36. package/dist/nano-assets/hash.txt +1 -1
  37. package/dist/nano-components/nano-components.esm.js +1 -1
  38. package/dist/nano-components/p-097270e7.js +5 -0
  39. package/dist/nano-components/p-097270e7.js.map +1 -0
  40. package/dist/nano-components/{p-0af67aaf.entry.js → p-26cae735.entry.js} +2 -2
  41. package/dist/nano-components/p-a26ec47a.js +5 -0
  42. package/dist/nano-components/p-f820b411.js +4 -0
  43. package/dist/themes/nanopore.cn.css +1 -1
  44. package/dist/themes/nanopore.cn.css.map +1 -1
  45. package/dist/types/components/table/table-interface.d.ts +3 -3
  46. package/dist/types/components/table/table.worker.d.ts +3 -3
  47. package/docs-json.json +1 -1
  48. package/hydrate/index.js +154 -125
  49. package/package.json +3 -3
  50. package/dist/cjs/nano-table-8ac4ae00.js.map +0 -1
  51. package/dist/cjs/table.worker-e2f9ccfa.js +0 -4
  52. package/dist/cjs/table.worker-f8d9d66b.js.map +0 -1
  53. package/dist/esm/nano-table-2b97d794.js.map +0 -1
  54. package/dist/esm/table.worker-6eec124e.js.map +0 -1
  55. package/dist/esm/table.worker-e2f9ccfa.js +0 -4
  56. package/dist/nano-components/p-7c43c880.js +0 -5
  57. package/dist/nano-components/p-c83c8784.js +0 -5
  58. package/dist/nano-components/p-c83c8784.js.map +0 -1
  59. package/dist/nano-components/p-e2f9ccfa.js +0 -4
  60. /package/dist/nano-components/{p-0af67aaf.entry.js.map → p-26cae735.entry.js.map} +0 -0
  61. /package/dist/nano-components/{p-7c43c880.js.map → p-a26ec47a.js.map} +0 -0
package/hydrate/index.js CHANGED
@@ -29099,17 +29099,17 @@ function nativeMatch(element, keyword) {
29099
29099
  * RecursiveMatch.
29100
29100
  *
29101
29101
  * @param element - String | number | Record<string, string>.
29102
- * @param criterium - Criterion.
29102
+ * @param criterion - Criterion.
29103
29103
  * @param keys - String[].
29104
29104
  * @param options - Object.
29105
29105
  * @param options.ignorePaths - RegExp[].
29106
29106
  * @returns Boolean.
29107
29107
  */
29108
- function recursiveMatch(element, criterium, keys, options) {
29108
+ function recursiveMatch(element, criterion, keys, options) {
29109
29109
  if (typeof element === 'object') {
29110
29110
  if (Array.isArray(element)) {
29111
29111
  for (const elm of element) {
29112
- if (recursiveMatch(elm, criterium, keys, options)) {
29112
+ if (recursiveMatch(elm, criterion, keys, options)) {
29113
29113
  return true;
29114
29114
  }
29115
29115
  }
@@ -29117,16 +29117,16 @@ function recursiveMatch(element, criterium, keys, options) {
29117
29117
  else {
29118
29118
  for (const i in element) {
29119
29119
  keys.push(i);
29120
- const didMatch = recursiveMatch(element[i], criterium, keys, options);
29120
+ const didMatch = recursiveMatch(element[i], criterion, keys, options);
29121
29121
  keys.pop();
29122
29122
  if (didMatch)
29123
29123
  return true;
29124
29124
  }
29125
29125
  }
29126
29126
  }
29127
- else if (criterium.is) {
29127
+ else if (criterion.type === 'exists') {
29128
29128
  // we check for the presence of a key (jpath)
29129
- if (criterium.is.test(keys.join('.'))) {
29129
+ if (criterion.key.test(keys.join('.'))) {
29130
29130
  return !!element;
29131
29131
  }
29132
29132
  else {
@@ -29151,11 +29151,11 @@ function recursiveMatch(element, criterium, keys, options) {
29151
29151
  if (!included)
29152
29152
  return false;
29153
29153
  }
29154
- if (criterium.key) {
29155
- if (!criterium.key.test(joinedKeys))
29154
+ if (criterion.key) {
29155
+ if (!criterion.key.test(joinedKeys))
29156
29156
  return false;
29157
29157
  }
29158
- return nativeMatch(element, criterium);
29158
+ return nativeMatch(element, criterion);
29159
29159
  }
29160
29160
  return false;
29161
29161
  }
@@ -29297,7 +29297,7 @@ function getCheckNumber(keyword) {
29297
29297
  * @internal
29298
29298
  */
29299
29299
  function splitNumberOperator(keyword) {
29300
- const match = /^\s*\(?\s*(?<startOperator><=|>=|<|=|>|\.\.)?(?<firstValue>-?\d*\.?\d+)(?:(?<afterDots>\.\.)(?<secondValue>-?\d*\.?\d*))?\s*\)?\s*$/.exec(keyword);
29300
+ const match = /^\s*\(?\s*(?<startOperator><=|>=|<|=|>|\.\.\s*)?\s*(?<firstValue>-?\d*\.?\d+)\s*(?:(?<afterDots>\.\.)\s*(?<secondValue>-?\d*\.?\d*))?\s*\)?\s*$/.exec(keyword);
29301
29301
  if (!match) {
29302
29302
  return {
29303
29303
  operator: '=',
@@ -29416,7 +29416,7 @@ function splitStringOperator(keyword) {
29416
29416
  throw new Error('unreachable');
29417
29417
  }
29418
29418
  let { operator, value } = match.groups;
29419
- let secondQuery = parts[1];
29419
+ let secondQuery = parts[1]?.trim();
29420
29420
  let values = [value];
29421
29421
  if (parts.length > 1) {
29422
29422
  operator = '..';
@@ -29440,48 +29440,55 @@ function splitStringOperator(keyword) {
29440
29440
  /**
29441
29441
  * @internal
29442
29442
  */
29443
- function convertKeywordsToCriteria(keywords, options) {
29444
- const { insensitive, pathAlias } = options;
29445
- return keywords.map((keyword) => {
29446
- const criterion = {};
29447
- if (keyword.startsWith('-')) {
29448
- criterion.negate = true;
29449
- keyword = keyword.substring(1);
29450
- }
29451
- const colon = keyword.indexOf(':');
29452
- if (colon > -1) {
29453
- const value = keyword.substring(colon + 1);
29454
- if (colon > 0) {
29455
- const key = keyword.substring(0, colon);
29456
- if (key === 'is') {
29457
- // a property path exists
29458
- criterion.is = new RegExp(`(^|\\.)${lodash_escaperegexp(value)}(\\.|$)`, insensitive);
29459
- }
29460
- if (pathAlias[key]) {
29461
- criterion.key = pathAlias[key];
29462
- }
29463
- else {
29464
- criterion.key = new RegExp(`(^|\\.)${lodash_escaperegexp(key)}(\\.|$)`, insensitive);
29465
- }
29443
+ function convertKeywordToCriterion(keyword, options = {
29444
+ pathAlias: {},
29445
+ }) {
29446
+ const { caseSensitive, pathAlias } = options;
29447
+ const regexpFlags = caseSensitive ? '' : 'i';
29448
+ let negate = false;
29449
+ if (keyword.startsWith('-')) {
29450
+ negate = true;
29451
+ keyword = keyword.substring(1);
29452
+ }
29453
+ const colon = keyword.indexOf(':');
29454
+ if (colon > -1) {
29455
+ const value = keyword.substring(colon + 1);
29456
+ if (colon > 0) {
29457
+ const key = keyword.substring(0, colon);
29458
+ if (key === 'is') {
29459
+ // a property path exists
29460
+ return {
29461
+ type: 'exists',
29462
+ negate,
29463
+ key: new RegExp(`(^|\\.)${lodash_escaperegexp(value)}(\\.|$)`, regexpFlags),
29464
+ };
29465
+ }
29466
+ else {
29467
+ return {
29468
+ type: 'matches',
29469
+ negate,
29470
+ key: pathAlias[key]
29471
+ ? pathAlias[key]
29472
+ : new RegExp(`(^|\\.)${lodash_escaperegexp(key)}(\\.|$)`, regexpFlags),
29473
+ checkNumber: getCheckNumber(value),
29474
+ checkString: getCheckString(value, regexpFlags),
29475
+ };
29466
29476
  }
29467
- fillCriterion(criterion, value, insensitive);
29468
- }
29469
- else {
29470
- fillCriterion(criterion, keyword, insensitive);
29471
29477
  }
29472
- return criterion;
29473
- });
29478
+ }
29479
+ return {
29480
+ type: 'matches',
29481
+ negate,
29482
+ checkNumber: getCheckNumber(keyword),
29483
+ checkString: getCheckString(keyword, regexpFlags),
29484
+ };
29474
29485
  }
29475
- /**
29476
- * FillCriterion.
29477
- *
29478
- * @param criterion - Criterion.
29479
- * @param keyword - String.
29480
- * @param insensitive - String.
29481
- */
29482
- function fillCriterion(criterion, keyword, insensitive) {
29483
- criterion.checkString = getCheckString(keyword, insensitive);
29484
- criterion.checkNumber = getCheckNumber(keyword);
29486
+ function convertKeywordsToCriteria(keywords, options = {
29487
+ pathAlias: {},
29488
+ }) {
29489
+ return keywords.map((keyword) => {
29490
+ return convertKeywordToCriterion(keyword, options);
29491
+ });
29485
29492
  }
29486
29493
 
29487
29494
  /**
@@ -29540,7 +29547,7 @@ function filter$1(data, options = {}) {
29540
29547
  keywords = charSplit(keywords, /[ \t\r\n]/);
29541
29548
  }
29542
29549
  const criteria = convertKeywordsToCriteria(keywords, {
29543
- insensitive,
29550
+ caseSensitive: options.caseSensitive,
29544
29551
  pathAlias,
29545
29552
  });
29546
29553
  let matched = 0;
@@ -29572,21 +29579,7 @@ function filter$1(data, options = {}) {
29572
29579
  }
29573
29580
  }
29574
29581
 
29575
- // we'll do ordering and filtering in here
29576
- // https://fusejs.io/demo.html
29577
- //https://github.com/bvaughn/js-search
29578
- // https://github.com/cheminfo/smart-array-filter
29579
- // https://github.com/thundermiracle/filter-data
29580
- function colsFromStore(safeColumns) {
29581
- return safeColumns.map((c) => {
29582
- if (!!c.sortCompareFn) {
29583
- c.sortCompareFn = new Function('return ' + c.sortCompareFn)();
29584
- }
29585
- return c;
29586
- });
29587
- }
29588
29582
  const dataWorkers = new Map();
29589
- /** SETUP / SYNC */
29590
29583
  function uid() {
29591
29584
  return Date.now().toString(36) + Math.random().toString(36).substring(2);
29592
29585
  }
@@ -29613,6 +29606,82 @@ async function syncConfigToWorker(workerId, columns) {
29613
29606
  destroyWorkerStore(workerId);
29614
29607
  return true;
29615
29608
  }
29609
+ /** SEARCH */
29610
+ /**
29611
+ * A general text search across all table columns.
29612
+ * Search is the first thing we do. Cache the result for filtering / sorting
29613
+ * @param workerId
29614
+ * @param term
29615
+ * @returns the searched for data rows - with col filters / sorts also applied
29616
+ */
29617
+ async function workerSearch(workerId, term) {
29618
+ const workerStore = dataWorkers.get(workerId);
29619
+ if (!workerStore)
29620
+ throw 'cannot find worker with ID ' + workerId;
29621
+ workerStore.searchTerm = term;
29622
+ if (!term || !term.length) {
29623
+ workerStore.filterRows = workerStore.rows;
29624
+ return applyFiltersAndSort(workerStore, workerStore.rows);
29625
+ }
29626
+ const availCols = workerStore.columns.filter((c) => c.searchable !== false);
29627
+ // cache result
29628
+ workerStore.filterRows = filter$1(workerStore.rows, {
29629
+ keywords: term,
29630
+ predicate: 'OR',
29631
+ includePaths: [...availCols.map((c) => c.prop)],
29632
+ ignorePaths: ['__uuid', '__index'],
29633
+ });
29634
+ // apply filter and sort
29635
+ return applyFiltersAndSort(workerStore, workerStore.filterRows);
29636
+ }
29637
+ /** FILTER */
29638
+ /**
29639
+ * Finds any currently applied filter conditions from the column config
29640
+ * @param workerStore
29641
+ * @returns the found column filter object array
29642
+ */
29643
+ function getCurrentFilters(workerStore) {
29644
+ return workerStore.columns
29645
+ .filter((c) => c.filter !== undefined && c.filter !== null)
29646
+ .reduce((filters, col) => {
29647
+ const { prop, filter } = col;
29648
+ filters.push({ prop, filter });
29649
+ return filters;
29650
+ }, []);
29651
+ }
29652
+ function filter(workerStore, rows, filters = []) {
29653
+ if (!filters || !filters.length)
29654
+ filters = getCurrentFilters(workerStore);
29655
+ if (!filters || !filters.length)
29656
+ return rows;
29657
+ filters.forEach((filter) => {
29658
+ if (typeof filter.filter === 'boolean') {
29659
+ rows = rows.filter((row) => row[filter.prop] === filter.filter);
29660
+ }
29661
+ else {
29662
+ rows = filter$1(rows, {
29663
+ keywords: filter.filter,
29664
+ includePaths: [filter.prop],
29665
+ ignorePaths: ['__uuid', '__index'],
29666
+ });
29667
+ }
29668
+ });
29669
+ return rows;
29670
+ }
29671
+ async function workerFilter(workerId, filters) {
29672
+ const workerStore = dataWorkers.get(workerId);
29673
+ if (!workerStore)
29674
+ throw 'cannot find worker with ID ' + workerId;
29675
+ // get cached results from a search
29676
+ const data = (!filters || !filters.length) && workerStore.searchTerm
29677
+ ? await workerSearch(workerId, workerStore.searchTerm)
29678
+ : workerStore.searchTerm
29679
+ ? workerStore.filterRows
29680
+ : workerStore.rows;
29681
+ workerStore.filterRows = filter(workerStore, data, filters);
29682
+ // apply sort
29683
+ return sort(workerStore, workerStore.filterRows);
29684
+ }
29616
29685
  /** SORT */
29617
29686
  /**
29618
29687
  * Finds any currently applied sort conditions from the column config
@@ -29678,62 +29747,20 @@ async function workerSort(workerId, prop, order) {
29678
29747
  const data = workerStore.filterRows || workerStore.rows;
29679
29748
  return sort(workerStore, data, prop, order);
29680
29749
  }
29681
- /** FILTER */
29682
- function filter(rows, filters = []) {
29683
- if (!filters)
29684
- return rows;
29685
- filters.forEach((filter) => {
29686
- rows = filter$1(rows, {
29687
- keywords: filter.filter,
29688
- includePaths: [filter.prop],
29689
- ignorePaths: ['__uuid', '__index'],
29690
- });
29691
- });
29692
- return rows;
29693
- }
29750
+ /** UTILS */
29751
+ // used after a search, it only sorts rn
29752
+ // (search acting like a filter 'reset' atm)
29694
29753
  function applyFiltersAndSort(workerStore, rows) {
29695
- rows = filter(rows);
29754
+ rows = filter(workerStore, rows);
29696
29755
  return sort(workerStore, rows);
29697
29756
  }
29698
- async function workerFilter(workerId, filters) {
29699
- const workerStore = dataWorkers.get(workerId);
29700
- if (!workerStore)
29701
- throw 'cannot find worker with ID ' + workerId;
29702
- // get cached results from a search
29703
- const data = !filters || !filters.length
29704
- ? await workerSearch(workerId, workerStore.searchTerm)
29705
- : workerStore.filterRows || workerStore.rows;
29706
- workerStore.filterRows = filter(data, filters);
29707
- // apply sort
29708
- return sort(workerStore, workerStore.filterRows);
29709
- }
29710
- /** SEARCH */
29711
- /**
29712
- * A general text search across all table columns.
29713
- * Search is the first thing we do. Cache the result for filtering / sorting
29714
- * @param workerId
29715
- * @param term
29716
- * @returns the searched for data rows - with col filters / sorts also applied
29717
- */
29718
- async function workerSearch(workerId, term) {
29719
- const workerStore = dataWorkers.get(workerId);
29720
- if (!workerStore)
29721
- throw 'cannot find worker with ID ' + workerId;
29722
- workerStore.searchTerm = term;
29723
- if (!term || !term.length) {
29724
- workerStore.filterRows = workerStore.rows;
29725
- return applyFiltersAndSort(workerStore, workerStore.rows);
29726
- }
29727
- const availCols = workerStore.columns.filter((c) => c.searchable !== false);
29728
- // cache result
29729
- workerStore.filterRows = filter$1(workerStore.rows, {
29730
- keywords: term,
29731
- predicate: 'OR',
29732
- includePaths: [...availCols.map((c) => c.prop)],
29733
- ignorePaths: ['__uuid', '__index'],
29757
+ function colsFromStore(safeColumns) {
29758
+ return safeColumns.map((c) => {
29759
+ if (!!c.sortCompareFn) {
29760
+ c.sortCompareFn = new Function('return ' + c.sortCompareFn)();
29761
+ }
29762
+ return c;
29734
29763
  });
29735
- // apply filter and sort
29736
- return applyFiltersAndSort(workerStore, workerStore.filterRows);
29737
29764
  }
29738
29765
  /**
29739
29766
  * Clean up
@@ -29793,7 +29820,7 @@ function getDataType(value) {
29793
29820
  if (value instanceof Date) {
29794
29821
  return 'date';
29795
29822
  }
29796
- if (['number', 'string'].includes(typeof value)) {
29823
+ if (['number', 'string', 'boolean'].includes(typeof value)) {
29797
29824
  return typeof value;
29798
29825
  }
29799
29826
  return 'unknown';
@@ -29809,7 +29836,7 @@ function storeSetData(host, rows) {
29809
29836
  return [...prev, curr.prop];
29810
29837
  }, []);
29811
29838
  const unknownCols = cols.filter((col) => !col.type);
29812
- // augments data with some internal.
29839
+ // augments data with some internal props.
29813
29840
  // discern unknown column types
29814
29841
  // convert dates to numbers for worker
29815
29842
  rows = rows.map((row, i) => {
@@ -30237,7 +30264,7 @@ const TableColHead = ({ column, headRenderer, onColumnSortClick, onColumnPinned,
30237
30264
  extraProps = column.columnProperties(column) || extraProps;
30238
30265
  }
30239
30266
  const baseProps = {
30240
- class: Object.assign(Object.assign({}, headerPinClasses('th', headRenderer === null || headRenderer === void 0 ? void 0 : headRenderer.pinned)), { [`${CSSNAMESPACE}__pin--start`]: column.pinned === 'start', [`${CSSNAMESPACE}__pin--end`]: column.pinned === 'end', [`${CSSNAMESPACE}__ordered`]: !!column.order, [`${CSSNAMESPACE}__filtered`]: !!column.filter }),
30267
+ class: Object.assign(Object.assign({}, headerPinClasses('th', headRenderer === null || headRenderer === void 0 ? void 0 : headRenderer.pinned)), { [`${CSSNAMESPACE}__pin--start`]: column.pinned === 'start', [`${CSSNAMESPACE}__pin--end`]: column.pinned === 'end', [`${CSSNAMESPACE}__ordered`]: !!column.order, [`${CSSNAMESPACE}__filtered`]: column.filter !== undefined && column.filter !== null }),
30241
30268
  };
30242
30269
  let props = extraProps ? mergeProperties(baseProps, extraProps) : baseProps;
30243
30270
  const content = colheadFootRender(column);
@@ -30278,13 +30305,13 @@ const TableColHead = ({ column, headRenderer, onColumnSortClick, onColumnPinned,
30278
30305
  [`${CSSNAMESPACE}__cell-content`]: true,
30279
30306
  }, onClick: handleColumnSortClick },
30280
30307
  colheadFootRender(column),
30281
- !!column.filter && hAsync("nano-icon", { name: "light/filter" }),
30308
+ column.filter !== undefined && column.filter !== null && (hAsync("nano-icon", { name: "light/filter" })),
30282
30309
  !!column.order &&
30283
30310
  (column.order === 'desc' ? (hAsync("nano-icon", { name: "solid/long-arrow-down" })) : (hAsync("nano-icon", { name: "solid/long-arrow-up" }))),
30284
30311
  hAsync("div", { class: `${CSSNAMESPACE}__status-icons` },
30285
30312
  hAsync("nano-icon", { name: "light/chevron-down" })))) : (hAsync("div", { class: `${CSSNAMESPACE}__cell-content` },
30286
30313
  colheadFootRender(column),
30287
- !!column.filter && hAsync("nano-icon", { name: "light/bars-filter" })))));
30314
+ column.filter !== undefined && column.filter !== null && (hAsync("nano-icon", { name: "light/bars-filter" }))))));
30288
30315
  };
30289
30316
 
30290
30317
  // TABLE CELL
@@ -30309,7 +30336,7 @@ function cellRender(rowIndex, colIndex) {
30309
30336
  : d;
30310
30337
  }
30311
30338
  }
30312
- return tpl ? (tpl(hAsync, model)) : model.cellModel ? (hAsync(Fragment, null, (_b = model.cellModel) === null || _b === void 0 ? void 0 : _b.toString())) : ('');
30339
+ return tpl ? (tpl(hAsync, model)) : model.cellModel !== undefined && model.cellModel !== null ? (hAsync(Fragment, null, (_b = model.cellModel) === null || _b === void 0 ? void 0 : _b.toString())) : ('');
30313
30340
  }
30314
30341
  const baseCellClasses = (colIndex, toString = false) => {
30315
30342
  const store = fetchStores();
@@ -30895,6 +30922,8 @@ class Table {
30895
30922
  const cFilter = this.filters.find((f) => f.prop === c.prop);
30896
30923
  if (cFilter)
30897
30924
  c.filter = cFilter.filter;
30925
+ else if (c.filter !== null && c.filter !== undefined)
30926
+ c.filter = undefined;
30898
30927
  return c;
30899
30928
  });
30900
30929
  this.nanoTblAfterFilter.emit({ filters: this.filters });
@@ -30958,7 +30987,7 @@ class Table {
30958
30987
  /** Apply initial columns settings */
30959
30988
  async columnInit() {
30960
30989
  this.filters = this.columns
30961
- .filter((c) => !!c.filter)
30990
+ .filter((c) => c.filter !== undefined && c.filter !== null)
30962
30991
  .map((c) => {
30963
30992
  const { filter, prop } = c;
30964
30993
  return { filter, prop };
@@ -31094,7 +31123,7 @@ class Table {
31094
31123
  sortable: this.defaultSort,
31095
31124
  draggable: this.defaultColDraggable,
31096
31125
  } }),
31097
- ]))), this._loading && !this.blocks.length && (hAsync("tbody", { class: `${CSSNAMESPACE}__active` }, [...Array(10).keys()].map((rowIndex) => (hAsync("tr", null, this.store.config.state.columns.map((_colModel, colIndex) => (hAsync(TableCell, { rowIndex: rowIndex, colIndex: colIndex, nestedContent: () => hAsync("nano-skeleton", null) })))))))), !this._loading && !this.blocks.length && (hAsync("tr", null, hAsync("th", { class: `${CSSNAMESPACE}__th`, colSpan: this.store.config.state.columns.length }, hAsync("div", { class: "nano-tbl__cell-content nano-tbl__cell-content--no-result" }, hAsync("slot", { name: "no-results" }, "No results found"))))), this.blocks.map((block, blockIndex) => (hAsync("tbody", { key: block.__uuid, id: `tbody-${this.renderId}-${blockIndex}`, ref: (tb) => {
31126
+ ]))), this._loading && !this.blocks.length && (hAsync("tbody", { class: `${CSSNAMESPACE}__active` }, [...Array(10).keys()].map((rowIndex) => (hAsync("tr", null, this.store.config.state.columns.map((_colModel, colIndex) => (hAsync(TableCell, { rowIndex: rowIndex, colIndex: colIndex, nestedContent: () => hAsync("nano-skeleton", null) })))))))), hAsync("tr", { hidden: !!this._loading || !!this.blocks.length }, hAsync("th", { class: `${CSSNAMESPACE}__th`, colSpan: this.store.config.state.columns.length }, hAsync("div", { class: "nano-tbl__cell-content nano-tbl__cell-content--no-result" }, hAsync("slot", { name: "no-results" }, "No results found")))), this.blocks.map((block, blockIndex) => (hAsync("tbody", { key: block.__uuid, id: `tbody-${this.renderId}-${blockIndex}`, ref: (tb) => {
31098
31127
  this.blockElements.push(tb);
31099
31128
  }, class: {
31100
31129
  [`${CSSNAMESPACE}__inactive`]: !this.activeBlocks.includes(blockIndex),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanoporetech-digital/components",
3
- "version": "4.8.0",
3
+ "version": "4.9.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://git.oxfordnanolabs.local/Digital/nano-components"
@@ -64,7 +64,7 @@
64
64
  "flickity": "^2.2.1",
65
65
  "focus-options-polyfill": "^1.4.0",
66
66
  "qs": "^6.9.4",
67
- "smart-array-filter": "^4.0.0",
67
+ "smart-array-filter": "^4.0.2",
68
68
  "squirrelly": "^8",
69
69
  "stencil-wormhole": "3.2.1"
70
70
  },
@@ -131,7 +131,7 @@
131
131
  "nanopore",
132
132
  "digital"
133
133
  ],
134
- "gitHead": "d65087c0710a69432fffc3d923ebb9514f7177d4",
134
+ "gitHead": "9bb5cb1dbbbd3cad4d4fd594054659a180a5e48e",
135
135
  "volta": {
136
136
  "node": "14.18.1",
137
137
  "npm": "8.6.0"