tinybase 3.1.0-beta.4 → 3.1.0

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 (85) hide show
  1. package/lib/debug/ui-react.js +2 -2
  2. package/lib/{checkpoints.d.ts → types/checkpoints.d.ts} +13 -13
  3. package/lib/{debug → types}/indexes.d.ts +10 -16
  4. package/lib/{debug → types}/metrics.d.ts +49 -50
  5. package/lib/{debug → types}/persisters.d.ts +26 -30
  6. package/lib/{cjs-es6 → types}/queries.d.ts +474 -309
  7. package/lib/{debug → types}/relationships.d.ts +11 -17
  8. package/lib/{debug → types}/store.d.ts +180 -1038
  9. package/lib/types/tinybase.d.ts +14 -0
  10. package/lib/{debug → types}/tools.d.ts +12 -12
  11. package/lib/{debug → types}/ui-react.d.ts +11 -5
  12. package/lib/{cjs-es6 → types/with-schemas}/checkpoints.d.ts +93 -7
  13. package/lib/{cjs → types/with-schemas}/indexes.d.ts +136 -18
  14. package/lib/types/with-schemas/internal/queries.d.ts +15 -0
  15. package/lib/types/with-schemas/internal/store.d.ts +101 -0
  16. package/lib/types/with-schemas/internal/ui-react.d.ts +776 -0
  17. package/lib/{cjs → types/with-schemas}/metrics.d.ts +115 -50
  18. package/lib/{cjs → types/with-schemas}/persisters.d.ts +102 -4
  19. package/lib/{debug → types/with-schemas}/queries.d.ts +865 -346
  20. package/lib/{cjs → types/with-schemas}/relationships.d.ts +151 -20
  21. package/lib/{cjs-es6 → types/with-schemas}/store.d.ts +1082 -801
  22. package/lib/types/with-schemas/tinybase.d.ts +14 -0
  23. package/lib/{cjs-es6 → types/with-schemas}/tools.d.ts +21 -10
  24. package/lib/{cjs-es6 → types/with-schemas}/ui-react.d.ts +1871 -1314
  25. package/package.json +145 -29
  26. package/readme.md +14 -14
  27. package/lib/cjs/checkpoints.d.ts +0 -961
  28. package/lib/cjs/queries.d.ts +0 -3028
  29. package/lib/cjs/store.d.ts +0 -6143
  30. package/lib/cjs/tinybase.d.ts +0 -14
  31. package/lib/cjs/tools.d.ts +0 -536
  32. package/lib/cjs/ui-react.d.ts +0 -10921
  33. package/lib/cjs-es6/indexes.d.ts +0 -974
  34. package/lib/cjs-es6/metrics.d.ts +0 -829
  35. package/lib/cjs-es6/persisters.d.ts +0 -733
  36. package/lib/cjs-es6/relationships.d.ts +0 -1209
  37. package/lib/cjs-es6/tinybase.d.ts +0 -14
  38. package/lib/common.d.ts +0 -115
  39. package/lib/debug/checkpoints.d.ts +0 -961
  40. package/lib/debug/common.d.ts +0 -115
  41. package/lib/debug/tinybase.d.ts +0 -14
  42. package/lib/es6/checkpoints.d.ts +0 -961
  43. package/lib/es6/common.d.ts +0 -115
  44. package/lib/es6/indexes.d.ts +0 -974
  45. package/lib/es6/metrics.d.ts +0 -829
  46. package/lib/es6/persisters.d.ts +0 -733
  47. package/lib/es6/queries.d.ts +0 -3028
  48. package/lib/es6/relationships.d.ts +0 -1209
  49. package/lib/es6/store.d.ts +0 -6143
  50. package/lib/es6/tinybase.d.ts +0 -14
  51. package/lib/es6/tools.d.ts +0 -536
  52. package/lib/es6/ui-react.d.ts +0 -10921
  53. package/lib/indexes.d.ts +0 -974
  54. package/lib/metrics.d.ts +0 -829
  55. package/lib/persisters.d.ts +0 -733
  56. package/lib/queries.d.ts +0 -3028
  57. package/lib/relationships.d.ts +0 -1209
  58. package/lib/store.d.ts +0 -6143
  59. package/lib/tinybase.d.ts +0 -14
  60. package/lib/tools.d.ts +0 -536
  61. package/lib/ui-react.d.ts +0 -10921
  62. package/lib/umd/checkpoints.d.ts +0 -961
  63. package/lib/umd/common.d.ts +0 -115
  64. package/lib/umd/indexes.d.ts +0 -974
  65. package/lib/umd/metrics.d.ts +0 -829
  66. package/lib/umd/persisters.d.ts +0 -733
  67. package/lib/umd/queries.d.ts +0 -3028
  68. package/lib/umd/relationships.d.ts +0 -1209
  69. package/lib/umd/store.d.ts +0 -6143
  70. package/lib/umd/tinybase.d.ts +0 -14
  71. package/lib/umd/tools.d.ts +0 -536
  72. package/lib/umd/ui-react.d.ts +0 -10921
  73. package/lib/umd-es6/checkpoints.d.ts +0 -961
  74. package/lib/umd-es6/common.d.ts +0 -115
  75. package/lib/umd-es6/indexes.d.ts +0 -974
  76. package/lib/umd-es6/metrics.d.ts +0 -829
  77. package/lib/umd-es6/persisters.d.ts +0 -733
  78. package/lib/umd-es6/queries.d.ts +0 -3028
  79. package/lib/umd-es6/relationships.d.ts +0 -1209
  80. package/lib/umd-es6/store.d.ts +0 -6143
  81. package/lib/umd-es6/tinybase.d.ts +0 -14
  82. package/lib/umd-es6/tools.d.ts +0 -536
  83. package/lib/umd-es6/ui-react.d.ts +0 -10921
  84. /package/lib/{cjs-es6 → types}/common.d.ts +0 -0
  85. /package/lib/{cjs → types/with-schemas}/common.d.ts +0 -0
@@ -11,13 +11,7 @@
11
11
  * @module relationships
12
12
  */
13
13
 
14
- import {
15
- GetCell,
16
- NoSchemas,
17
- OptionalSchemas,
18
- RowCallback,
19
- Store,
20
- } from './store.d';
14
+ import {GetCell, RowCallback, Store} from './store.d';
21
15
  import {Id, IdOrNull, Ids} from './common.d';
22
16
 
23
17
  /**
@@ -253,7 +247,8 @@ export type RelationshipsListenerStats = {
253
247
  * @see Drawing demo
254
248
  * @category Relationships
255
249
  */
256
- export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
250
+ export interface Relationships {
251
+ //
257
252
  /**
258
253
  * The setRelationshipDefinition method lets you set the definition of a
259
254
  * Relationship.
@@ -345,7 +340,7 @@ export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
345
340
  localTableId: Id,
346
341
  remoteTableId: Id,
347
342
  getRemoteRowId: Id | ((getCell: GetCell, localRowId: Id) => Id),
348
- ): Relationships<Schemas>;
343
+ ): Relationships;
349
344
 
350
345
  /**
351
346
  * The delRelationshipDefinition method removes an existing Relationship
@@ -385,7 +380,7 @@ export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
385
380
  * ```
386
381
  * @category Configuration
387
382
  */
388
- delRelationshipDefinition(relationshipId: Id): Relationships<Schemas>;
383
+ delRelationshipDefinition(relationshipId: Id): Relationships;
389
384
 
390
385
  /**
391
386
  * The getStore method returns a reference to the underlying Store that is
@@ -410,7 +405,7 @@ export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
410
405
  * ```
411
406
  * @category Getter
412
407
  */
413
- getStore(): Store<Schemas>;
408
+ getStore(): Store;
414
409
 
415
410
  /**
416
411
  * The getRelationshipIds method returns an array of the Relationship Ids
@@ -528,7 +523,7 @@ export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
528
523
  * ```
529
524
  * @category Getter
530
525
  */
531
- getLocalTableId(relationshipId: Id): Id;
526
+ getLocalTableId(relationshipId: Id): Id | undefined;
532
527
 
533
528
  /**
534
529
  * The getRemoteTableId method returns the Id of the underlying remote Table
@@ -560,7 +555,7 @@ export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
560
555
  * ```
561
556
  * @category Getter
562
557
  */
563
- getRemoteTableId(relationshipId: Id): Id;
558
+ getRemoteTableId(relationshipId: Id): Id | undefined;
564
559
 
565
560
  /**
566
561
  * The getRemoteRowId method gets the remote Row Id for a given local Row in a
@@ -1087,7 +1082,7 @@ export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
1087
1082
  * ```
1088
1083
  * @category Listener
1089
1084
  */
1090
- delListener(listenerId: Id): Relationships<Schemas>;
1085
+ delListener(listenerId: Id): Relationships;
1091
1086
 
1092
1087
  /**
1093
1088
  * The destroy method should be called when this Relationships object is no
@@ -1170,6 +1165,7 @@ export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
1170
1165
  * @category Development
1171
1166
  */
1172
1167
  getListenerStats(): RelationshipsListenerStats;
1168
+ //
1173
1169
  }
1174
1170
 
1175
1171
  /**
@@ -1204,6 +1200,4 @@ export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
1204
1200
  * ```
1205
1201
  * @category Creation
1206
1202
  */
1207
- export function createRelationships<Schemas extends OptionalSchemas>(
1208
- store: Store<Schemas>,
1209
- ): Relationships<Schemas>;
1203
+ export function createRelationships(store: Store): Relationships;