@@ -97,6 +97,7 @@ export type TableTypes = [
9797 cellIdType : string ,
9898 cellCallbackType : string ,
9999 rowCallbackType : string ,
100+ tableCellCallbackType : string ,
100101] ;
101102export type SharedTableTypes = [
102103 tablesType : string ,
@@ -106,6 +107,7 @@ export type SharedTableTypes = [
106107 tablesListenerType : string ,
107108 tableIdsListenerType : string ,
108109 tableListenerType : string ,
110+ tableCellIdsListenerType : string ,
109111 rowIdsListenerType : string ,
110112 sortedRowIdsListenerType : string ,
111113 rowListenerType : string ,
@@ -290,10 +292,12 @@ export const getStoreCoreApi = (
290292 _cellType ,
291293 cellCallbackType ,
292294 rowCallbackType ,
295+ tableCellCallbackType ,
293296 tableCallbackType ,
294297 tablesListenerType ,
295298 tableIdsListenerType ,
296299 tableListenerType ,
300+ tableCellIdsListenerType ,
297301 rowIdsListenerType ,
298302 sortedRowIdsListenerType ,
299303 rowListenerType ,
@@ -359,6 +363,16 @@ export const getStoreCoreApi = (
359363 `a Row Id from the '${ tableId } ' Table, and a Cell iterator` ,
360364 ) ,
361365 ) ,
366+
367+ // TableCellCallbackType
368+ addType (
369+ tableName + TABLE + CELL + CALLBACK ,
370+ tableCellCallbackType + tableIdGeneric ,
371+ getCallbackDoc (
372+ `a Cell Id from anywhere in the '${ tableId } ' Table, and a count ` +
373+ 'of how many times it appears' ,
374+ ) ,
375+ ) ,
362376 ] ;
363377 mapSet ( tablesTypes , tableId , tableTypes ) ;
364378 addImport ( 1 , moduleDefinition , ...tableTypes ) ;
@@ -375,6 +389,7 @@ export const getStoreCoreApi = (
375389 tablesListenerType ,
376390 tableIdsListenerType ,
377391 tableListenerType ,
392+ tableCellIdsListenerType ,
378393 rowIdsListenerType ,
379394 sortedRowIdsListenerType ,
380395 rowListenerType ,
@@ -391,6 +406,7 @@ export const getStoreCoreApi = (
391406 tablesListenerType ,
392407 tableIdsListenerType ,
393408 tableListenerType ,
409+ tableCellIdsListenerType ,
394410 rowIdsListenerType ,
395411 sortedRowIdsListenerType ,
396412 rowListenerType ,
@@ -448,6 +464,7 @@ export const getStoreCoreApi = (
448464 cellIdType ,
449465 cellCallbackType ,
450466 rowCallbackType ,
467+ tableCellCallbackType ,
451468 ] = mapGet ( tablesTypes , tableId ) as TableTypes ;
452469
453470 // getTable, hasTable, setTable, delTable
@@ -470,6 +487,28 @@ export const getStoreCoreApi = (
470487 ) ,
471488 ) ;
472489
490+ // getTableCellIds
491+ addProxyMethod (
492+ 0 ,
493+ tableName ,
494+ TABLE + CELL_IDS ,
495+ IDS ,
496+ getIdsDoc ( CELL , 'the whole of ' + getTableDoc ( tableId ) ) ,
497+ EMPTY_STRING ,
498+ TABLE_ID ,
499+ ) ;
500+
501+ // forEachTableCell
502+ addProxyMethod (
503+ 5 ,
504+ tableName ,
505+ TABLE + CELL ,
506+ VOID ,
507+ getForEachDoc ( TABLE + CELL , 'the whole of ' + getTableDoc ( tableId ) ) ,
508+ 'tableCellCallback: ' + tableCellCallbackType ,
509+ TABLE_ID + ', tableCellCallback as any' ,
510+ ) ;
511+
473512 // getRowIds
474513 addProxyMethod (
475514 0 ,
@@ -591,6 +630,19 @@ export const getStoreCoreApi = (
591630 TABLE_ID + ', rowId, ' + CELL_ID + paramsInCall ,
592631 ) ,
593632 ) ;
633+
634+ // hasTableCell
635+ addProxyMethod (
636+ 1 ,
637+ tableName + cellName ,
638+ TABLE + CELL ,
639+ BOOLEAN ,
640+ VERBS [ 1 ] +
641+ ` the '${ cellId } ' Cell anywhere in ` +
642+ getTableDoc ( tableId ) ,
643+ EMPTY_STRING ,
644+ TABLE_ID + ', ' + CELL_ID ,
645+ ) ;
594646 } ,
595647 ) ;
596648 } ) ;
@@ -634,6 +686,15 @@ export const getStoreCoreApi = (
634686 'tableId' ,
635687 ) ;
636688
689+ // addTableCellIdsListener
690+ addProxyListener (
691+ TABLE + CELL_IDS ,
692+ tableCellIdsListenerType ,
693+ getListenerDoc ( 14 , 3 , 1 ) ,
694+ `tableId: ${ tableIdType } | null` ,
695+ 'tableId' ,
696+ ) ;
697+
637698 // addRowIdsListener
638699 addProxyListener (
639700 ROW_IDS ,
0 commit comments