@uwdata/mosaic-core 0.17.0 → 0.19.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 (178) hide show
  1. package/LICENSE +47 -0
  2. package/README.md +0 -1
  3. package/dist/src/Coordinator.d.ts +159 -0
  4. package/dist/src/Coordinator.d.ts.map +1 -0
  5. package/dist/src/Coordinator.js +250 -0
  6. package/dist/src/Coordinator.js.map +1 -0
  7. package/dist/src/MosaicClient.d.ts +138 -0
  8. package/dist/src/MosaicClient.d.ts.map +1 -0
  9. package/dist/src/MosaicClient.js +214 -0
  10. package/dist/src/MosaicClient.js.map +1 -0
  11. package/dist/src/Param.d.ts +56 -0
  12. package/dist/src/Param.d.ts.map +1 -0
  13. package/dist/src/Param.js +89 -0
  14. package/dist/src/Param.js.map +1 -0
  15. package/dist/src/QueryConsolidator.d.ts +11 -0
  16. package/dist/src/QueryConsolidator.d.ts.map +1 -0
  17. package/dist/src/QueryConsolidator.js +249 -0
  18. package/dist/src/QueryConsolidator.js.map +1 -0
  19. package/dist/src/QueryManager.d.ts +77 -0
  20. package/dist/src/QueryManager.d.ts.map +1 -0
  21. package/dist/src/QueryManager.js +174 -0
  22. package/dist/src/QueryManager.js.map +1 -0
  23. package/dist/src/Selection.d.ts +222 -0
  24. package/dist/src/Selection.d.ts.map +1 -0
  25. package/dist/src/Selection.js +322 -0
  26. package/dist/src/Selection.js.map +1 -0
  27. package/dist/src/SelectionClause.d.ts +222 -0
  28. package/dist/src/SelectionClause.d.ts.map +1 -0
  29. package/dist/src/SelectionClause.js +168 -0
  30. package/dist/src/SelectionClause.js.map +1 -0
  31. package/dist/src/connectors/Connector.d.ts +26 -0
  32. package/dist/src/connectors/Connector.d.ts.map +1 -0
  33. package/dist/src/connectors/Connector.js +2 -0
  34. package/dist/src/connectors/Connector.js.map +1 -0
  35. package/dist/src/connectors/rest.d.ts +24 -0
  36. package/dist/src/connectors/rest.d.ts.map +1 -0
  37. package/dist/src/connectors/rest.js +37 -0
  38. package/dist/src/connectors/rest.js.map +1 -0
  39. package/dist/src/connectors/socket.d.ts +40 -0
  40. package/dist/src/connectors/socket.d.ts.map +1 -0
  41. package/dist/src/connectors/socket.js +115 -0
  42. package/dist/src/connectors/socket.js.map +1 -0
  43. package/dist/src/connectors/wasm.d.ts +56 -0
  44. package/dist/src/connectors/wasm.d.ts.map +1 -0
  45. package/dist/src/connectors/wasm.js +116 -0
  46. package/dist/src/connectors/wasm.js.map +1 -0
  47. package/dist/src/index.d.ts +28 -0
  48. package/dist/src/index.d.ts.map +1 -0
  49. package/{src → dist/src}/index.js +8 -11
  50. package/dist/src/index.js.map +1 -0
  51. package/dist/src/make-client.d.ts +33 -0
  52. package/dist/src/make-client.d.ts.map +1 -0
  53. package/dist/src/make-client.js +52 -0
  54. package/dist/src/make-client.js.map +1 -0
  55. package/dist/src/preagg/PreAggregator.d.ts +150 -0
  56. package/dist/src/preagg/PreAggregator.d.ts.map +1 -0
  57. package/dist/src/preagg/PreAggregator.js +382 -0
  58. package/dist/src/preagg/PreAggregator.js.map +1 -0
  59. package/dist/src/preagg/preagg-columns.d.ts +16 -0
  60. package/dist/src/preagg/preagg-columns.d.ts.map +1 -0
  61. package/dist/src/preagg/preagg-columns.js +95 -0
  62. package/dist/src/preagg/preagg-columns.js.map +1 -0
  63. package/dist/src/preagg/sufficient-statistics.d.ts +14 -0
  64. package/dist/src/preagg/sufficient-statistics.d.ts.map +1 -0
  65. package/dist/src/preagg/sufficient-statistics.js +446 -0
  66. package/dist/src/preagg/sufficient-statistics.js.map +1 -0
  67. package/dist/src/types.d.ts +77 -0
  68. package/dist/src/types.d.ts.map +1 -0
  69. package/dist/src/types.js +2 -0
  70. package/dist/src/types.js.map +1 -0
  71. package/dist/src/util/AsyncDispatch.d.ts +121 -0
  72. package/dist/src/util/AsyncDispatch.d.ts.map +1 -0
  73. package/dist/src/util/AsyncDispatch.js +188 -0
  74. package/dist/src/util/AsyncDispatch.js.map +1 -0
  75. package/dist/src/util/cache.d.ts +19 -0
  76. package/dist/src/util/cache.d.ts.map +1 -0
  77. package/dist/src/util/cache.js +66 -0
  78. package/dist/src/util/cache.js.map +1 -0
  79. package/dist/src/util/decode-ipc.d.ts +12 -0
  80. package/dist/src/util/decode-ipc.d.ts.map +1 -0
  81. package/{src → dist/src}/util/decode-ipc.js +5 -6
  82. package/dist/src/util/decode-ipc.js.map +1 -0
  83. package/dist/src/util/distinct.d.ts +3 -0
  84. package/dist/src/util/distinct.d.ts.map +1 -0
  85. package/dist/src/util/distinct.js +16 -0
  86. package/dist/src/util/distinct.js.map +1 -0
  87. package/dist/src/util/field-info.d.ts +26 -0
  88. package/dist/src/util/field-info.d.ts.map +1 -0
  89. package/dist/src/util/field-info.js +91 -0
  90. package/dist/src/util/field-info.js.map +1 -0
  91. package/dist/src/util/hash.d.ts +2 -0
  92. package/dist/src/util/hash.d.ts.map +1 -0
  93. package/dist/src/util/hash.js +26 -0
  94. package/dist/src/util/hash.js.map +1 -0
  95. package/dist/src/util/is-activatable.d.ts +8 -0
  96. package/dist/src/util/is-activatable.d.ts.map +1 -0
  97. package/dist/src/util/is-activatable.js +10 -0
  98. package/dist/src/util/is-activatable.js.map +1 -0
  99. package/dist/src/util/is-arrow-table.d.ts +9 -0
  100. package/dist/src/util/is-arrow-table.d.ts.map +1 -0
  101. package/dist/src/util/is-arrow-table.js +11 -0
  102. package/dist/src/util/is-arrow-table.js.map +1 -0
  103. package/dist/src/util/js-type.d.ts +9 -0
  104. package/dist/src/util/js-type.d.ts.map +1 -0
  105. package/dist/src/util/js-type.js +59 -0
  106. package/dist/src/util/js-type.js.map +1 -0
  107. package/dist/src/util/priority-queue.d.ts +35 -0
  108. package/dist/src/util/priority-queue.d.ts.map +1 -0
  109. package/dist/src/util/priority-queue.js +81 -0
  110. package/dist/src/util/priority-queue.js.map +1 -0
  111. package/dist/src/util/query-result.d.ts +47 -0
  112. package/dist/src/util/query-result.d.ts.map +1 -0
  113. package/dist/src/util/query-result.js +83 -0
  114. package/dist/src/util/query-result.js.map +1 -0
  115. package/dist/src/util/synchronizer.d.ts +36 -0
  116. package/dist/src/util/synchronizer.d.ts.map +1 -0
  117. package/dist/src/util/synchronizer.js +52 -0
  118. package/dist/src/util/synchronizer.js.map +1 -0
  119. package/dist/src/util/throttle.d.ts +12 -0
  120. package/dist/src/util/throttle.d.ts.map +1 -0
  121. package/dist/src/util/throttle.js +51 -0
  122. package/dist/src/util/throttle.js.map +1 -0
  123. package/dist/src/util/to-data-columns.d.ts +22 -0
  124. package/dist/src/util/to-data-columns.d.ts.map +1 -0
  125. package/dist/src/util/to-data-columns.js +51 -0
  126. package/dist/src/util/to-data-columns.js.map +1 -0
  127. package/dist/src/util/void-logger.d.ts +13 -0
  128. package/dist/src/util/void-logger.d.ts.map +1 -0
  129. package/dist/src/util/void-logger.js +13 -0
  130. package/dist/src/util/void-logger.js.map +1 -0
  131. package/package.json +17 -11
  132. package/src/Coordinator.ts +396 -0
  133. package/src/{MosaicClient.js → MosaicClient.ts} +50 -43
  134. package/src/{Param.js → Param.ts} +29 -28
  135. package/src/{QueryConsolidator.js → QueryConsolidator.ts} +85 -62
  136. package/src/{QueryManager.js → QueryManager.ts} +61 -54
  137. package/src/Selection.ts +391 -0
  138. package/src/SelectionClause.ts +357 -0
  139. package/src/connectors/Connector.ts +6 -6
  140. package/src/connectors/rest.ts +56 -0
  141. package/src/connectors/{socket.js → socket.ts} +53 -42
  142. package/src/connectors/{wasm.js → wasm.ts} +52 -63
  143. package/src/index.ts +42 -0
  144. package/src/make-client.ts +93 -0
  145. package/src/preagg/{PreAggregator.js → PreAggregator.ts} +164 -145
  146. package/src/preagg/{preagg-columns.js → preagg-columns.ts} +27 -24
  147. package/src/preagg/{sufficient-statistics.js → sufficient-statistics.ts} +160 -110
  148. package/src/types.ts +24 -9
  149. package/src/util/{AsyncDispatch.js → AsyncDispatch.ts} +62 -43
  150. package/src/util/{cache.js → cache.ts} +25 -15
  151. package/src/util/decode-ipc.ts +15 -0
  152. package/src/util/{distinct.js → distinct.ts} +3 -3
  153. package/src/util/{field-info.js → field-info.ts} +30 -31
  154. package/src/util/{hash.js → hash.ts} +4 -4
  155. package/src/util/is-activatable.ts +11 -0
  156. package/src/util/is-arrow-table.ts +12 -0
  157. package/src/util/{js-type.js → js-type.ts} +7 -5
  158. package/src/util/{priority-queue.js → priority-queue.ts} +32 -20
  159. package/src/util/{query-result.js → query-result.ts} +24 -17
  160. package/src/util/synchronizer.ts +56 -0
  161. package/src/util/throttle.ts +59 -0
  162. package/src/util/to-data-columns.ts +65 -0
  163. package/src/util/void-logger.ts +23 -0
  164. package/src/Coordinator.js +0 -313
  165. package/src/Selection.js +0 -380
  166. package/src/SelectionClause.js +0 -159
  167. package/src/connectors/rest.js +0 -38
  168. package/src/index-types.ts +0 -5
  169. package/src/make-client.js +0 -101
  170. package/src/util/is-activatable.js +0 -8
  171. package/src/util/is-arrow-table.js +0 -10
  172. package/src/util/selection-types.ts +0 -137
  173. package/src/util/synchronizer.js +0 -47
  174. package/src/util/throttle.js +0 -54
  175. package/src/util/to-data-columns.js +0 -60
  176. package/src/util/void-logger.js +0 -13
  177. package/tsconfig.json +0 -9
  178. package/vitest.config.ts +0 -3
@@ -0,0 +1,322 @@
1
+ import { literal, or } from '@uwdata/mosaic-sql';
2
+ import { Param } from './Param.js';
3
+ /**
4
+ * Test if a value is a Selection instance.
5
+ * @param x The value to test.
6
+ * @returns True if the input is a Selection, false otherwise.
7
+ */
8
+ export function isSelection(x) {
9
+ return x instanceof Selection;
10
+ }
11
+ function create(options, include) {
12
+ return new Selection(new SelectionResolver(options), include ? [include].flat() : undefined);
13
+ }
14
+ /**
15
+ * Represents a dynamic set of query filter predicates.
16
+ */
17
+ export class Selection extends Param {
18
+ _resolved;
19
+ _resolver;
20
+ _relay;
21
+ /**
22
+ * Create a new Selection instance with an
23
+ * intersect (conjunction) resolution strategy.
24
+ * @param options The selection options.
25
+ * @returns The new Selection instance.
26
+ */
27
+ static intersect({ cross = false, empty = false, include = [] } = {}) {
28
+ return create({ cross, empty }, include);
29
+ }
30
+ /**
31
+ * Create a new Selection instance with a
32
+ * union (disjunction) resolution strategy.
33
+ * @param options The selection options.
34
+ * @returns The new Selection instance.
35
+ */
36
+ static union({ cross = false, empty = false, include = [] } = {}) {
37
+ return create({ cross, empty, union: true }, include);
38
+ }
39
+ /**
40
+ * Create a new Selection instance with a singular resolution strategy
41
+ * that keeps only the most recent selection clause.
42
+ * @param options The selection options.
43
+ * @returns The new Selection instance.
44
+ */
45
+ static single({ cross = false, empty = false, include = [] } = {}) {
46
+ return create({ cross, empty, single: true }, include);
47
+ }
48
+ /**
49
+ * Create a new Selection instance with a
50
+ * cross-filtered intersect resolution strategy.
51
+ * @param options The selection options.
52
+ * @returns The new Selection instance.
53
+ */
54
+ static crossfilter({ empty = false, include = [] } = {}) {
55
+ return create({ cross: true, empty }, include);
56
+ }
57
+ /**
58
+ * Create a new Selection instance.
59
+ * @param resolver The selection resolution
60
+ * strategy to apply.
61
+ * @param include Upstream selections whose clauses
62
+ * should be included as part of this selection. Any clauses published
63
+ * to these upstream selections will be relayed to this selection.
64
+ */
65
+ constructor(resolver = new SelectionResolver(), include = []) {
66
+ super([]);
67
+ this._resolved = this._value;
68
+ this._resolver = resolver;
69
+ this._relay = new Set();
70
+ if (Array.isArray(include)) {
71
+ for (const sel of include) {
72
+ sel._relay.add(this);
73
+ }
74
+ }
75
+ }
76
+ /**
77
+ * Create a cloned copy of this Selection instance.
78
+ * @returns A clone of this selection.
79
+ */
80
+ clone() {
81
+ const s = new Selection(this._resolver);
82
+ s._value = s._resolved = this._value;
83
+ return s;
84
+ }
85
+ /**
86
+ * Create a clone of this Selection with clauses corresponding
87
+ * to the provided source removed.
88
+ * @param source The clause source to remove.
89
+ * @returns A cloned and updated Selection.
90
+ */
91
+ remove(source) {
92
+ const s = this.clone();
93
+ s._value = s._resolved = s._resolver.resolve(this._resolved, { source });
94
+ s._value.active = { source };
95
+ return s;
96
+ }
97
+ /**
98
+ * The selection clause resolver.
99
+ */
100
+ get resolver() {
101
+ return this._resolver;
102
+ }
103
+ /**
104
+ * Indicate if this selection has a single resolution strategy.
105
+ */
106
+ get single() {
107
+ return this._resolver.single;
108
+ }
109
+ /**
110
+ * The current array of selection clauses.
111
+ */
112
+ get clauses() {
113
+ return super.value;
114
+ }
115
+ /**
116
+ * The current active (most recently updated) selection clause.
117
+ */
118
+ get active() {
119
+ return this.clauses.active;
120
+ }
121
+ /**
122
+ * The value corresponding to the current active selection clause.
123
+ * This method ensures compatibility where a normal Param is expected.
124
+ */
125
+ // @ts-expect-error return type differs from Param parent class
126
+ get value() {
127
+ return this.active?.value;
128
+ }
129
+ /**
130
+ * The value corresponding to a given source. Returns undefined if
131
+ * this selection does not include a clause from this source.
132
+ * @param source The clause source to look up the value for.
133
+ */
134
+ valueFor(source) {
135
+ return this.clauses.find(c => c.source === source)?.value;
136
+ }
137
+ /**
138
+ * Emit an activate event with the given selection clause.
139
+ * @param clause The clause representing the potential activation.
140
+ */
141
+ activate(clause) {
142
+ // @ts-expect-error selection operates differently than scalar param
143
+ this.emit('activate', clause);
144
+ this._relay.forEach(sel => sel.activate(clause));
145
+ }
146
+ /**
147
+ * Update the selection with a new selection clause.
148
+ * @param clause The selection clause to add.
149
+ * @returns This Selection instance.
150
+ */
151
+ // @ts-expect-error selection and param use differing value types
152
+ update(clause) {
153
+ // we maintain an up-to-date list of all resolved clauses
154
+ // this ensures consistent clause state across unemitted event values
155
+ this._resolved = this._resolver.resolve(this._resolved, clause, true);
156
+ this._resolved.active = clause;
157
+ this._relay.forEach(sel => sel.update(clause));
158
+ return super.update(this._resolved);
159
+ }
160
+ /**
161
+ * Reset the selection state by removing all provided clauses. If no clause
162
+ * array is provided as an argument, all current clauses are removed. The
163
+ * reset method (if defined) is invoked on all corresponding clause sources.
164
+ * The reset is relayed to downstream selections that include this selection.
165
+ * @param clauses The clauses to remove. If unspecified, all current clauses are removed.
166
+ * @returns This selection instance.
167
+ */
168
+ reset(clauses) {
169
+ clauses ??= this._resolved;
170
+ clauses.forEach(c => c.source?.reset?.());
171
+ this._resolved = this._resolved.filter(c => clauses.includes(c));
172
+ this._relay.forEach(sel => sel.reset(clauses));
173
+ return super.update(this._resolved = []);
174
+ }
175
+ /**
176
+ * Upon value-typed updates, sets the current clause list to the
177
+ * input value and returns the active clause value.
178
+ * @param type The event type.
179
+ * @param value The input event value.
180
+ * @returns For value-typed events, returns the active clause
181
+ * values. Otherwise returns the input event value as-is.
182
+ */
183
+ // @ts-expect-error selection and param use differing value types
184
+ willEmit(type, value) {
185
+ if (type === 'value') {
186
+ this._value = value;
187
+ return this.value;
188
+ }
189
+ return value;
190
+ }
191
+ /**
192
+ * Upon value-typed updates, returns a dispatch queue filter function.
193
+ * The return value depends on the selection resolution strategy.
194
+ * @param type The event type.
195
+ * @param value The new event value that will be enqueued.
196
+ * @returns A dispatch queue filter function. For non-value events,
197
+ * returns a function that always returns null (no filtering).
198
+ */
199
+ // @ts-expect-error selection and param use differing value types
200
+ emitQueueFilter(type, value) {
201
+ return type === 'value'
202
+ ? this._resolver.queueFilter(value)
203
+ : null;
204
+ }
205
+ /**
206
+ * Indicates if a selection clause should not be applied to a given client.
207
+ * The return value depends on the selection resolution strategy.
208
+ * @param client The client to test. If null or undefined, return false.
209
+ * @param clause The selection clause.
210
+ * @returns True if the client should be skipped, false otherwise.
211
+ */
212
+ skip(client, clause) {
213
+ return this._resolver.skip(client, clause);
214
+ }
215
+ /**
216
+ * Return a selection query predicate for the given client.
217
+ * @param client The client whose data may be filtered. If null or undefined, return a predicate with all clauses.
218
+ * @param noSkip Disable skipping of active
219
+ * cross-filtered sources. If set true, the source of the active
220
+ * clause in a cross-filtered selection will not be skipped.
221
+ * @returns The query predicate for filtering client data,
222
+ * based on the current state of this selection.
223
+ */
224
+ predicate(client = undefined, noSkip = false) {
225
+ const { clauses } = this;
226
+ const active = noSkip ? null : clauses.active;
227
+ return this._resolver.predicate(clauses, active, client);
228
+ }
229
+ }
230
+ /**
231
+ * Implements selection clause resolution strategies.
232
+ */
233
+ export class SelectionResolver {
234
+ union;
235
+ cross;
236
+ single;
237
+ empty;
238
+ /**
239
+ * Create a new selection resolved instance.
240
+ * @param options The resolution strategy options.
241
+ * @param options.union Boolean flag to indicate a union strategy.
242
+ * If false, an intersection strategy is used.
243
+ * @param options.cross Boolean flag to indicate cross-filtering.
244
+ * @param options.single Boolean flag to indicate single clauses only.
245
+ * @param options.empty Boolean flag indicating if a lack
246
+ * of clauses should correspond to an empty selection with no records. This
247
+ * setting determines the default selection state.
248
+ */
249
+ constructor({ union, cross, single, empty } = {}) {
250
+ this.union = !!union;
251
+ this.cross = !!cross;
252
+ this.single = !!single;
253
+ this.empty = !!empty;
254
+ }
255
+ /**
256
+ * Resolve a list of selection clauses according to the resolution strategy.
257
+ * @param clauseList An array of selection clauses.
258
+ * @param clause A new selection clause to add.
259
+ * @returns An updated array of selection clauses.
260
+ */
261
+ resolve(clauseList, clause, reset = false) {
262
+ const { source, predicate } = clause;
263
+ const filtered = clauseList.filter(c => source !== c.source);
264
+ const clauses = this.single ? [] : filtered;
265
+ if (this.single && reset)
266
+ filtered.forEach(c => c.source?.reset?.());
267
+ if (predicate)
268
+ clauses.push(clause);
269
+ return clauses;
270
+ }
271
+ /**
272
+ * Indicates if a selection clause should not be applied to a given client.
273
+ * The return value depends on the resolution strategy.
274
+ * @param client The client to test. If null or undefined, return false.
275
+ * @param clause The selection clause.
276
+ * @returns True if the client should be skipped, false otherwise.
277
+ */
278
+ skip(client, clause) {
279
+ if (client == null) {
280
+ return false;
281
+ }
282
+ return Boolean(this.cross && clause?.clients?.has(client));
283
+ }
284
+ /**
285
+ * Return a selection query predicate for the given client.
286
+ * @param clauseList An array of selection clauses.
287
+ * @param active The current active selection clause.
288
+ * @param client The client whose data may be filtered. If null or undefined, return all clauses.
289
+ * @returns The query predicate for filtering client data,
290
+ * based on the current state of this selection.
291
+ */
292
+ predicate(clauseList, active, client) {
293
+ const { empty, union } = this;
294
+ if (empty && !clauseList.length) {
295
+ return [literal(false)];
296
+ }
297
+ // do nothing if cross-filtering and client is currently active
298
+ if (this.skip(client, active))
299
+ return undefined;
300
+ // remove client-specific predicates if cross-filtering
301
+ const predicates = clauseList
302
+ .filter(clause => !this.skip(client, clause))
303
+ .map(clause => clause.predicate);
304
+ // return appropriate conjunction or disjunction
305
+ // an array of predicates is implicitly conjunctive
306
+ return union && predicates.length > 1 ? or(predicates) : predicates;
307
+ }
308
+ /**
309
+ * Returns a filter function for queued selection updates.
310
+ * @param value The new event value that will be enqueued.
311
+ * @returns A dispatch queue filter
312
+ * function, or null if all unemitted event values should be filtered.
313
+ */
314
+ queueFilter(value) {
315
+ if (this.cross) {
316
+ const source = value.active?.source;
317
+ return value => value.active?.source !== source;
318
+ }
319
+ return null;
320
+ }
321
+ }
322
+ //# sourceMappingURL=Selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Selection.js","sourceRoot":"","sources":["../../src/Selection.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,OAAO,EAAc,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAmBnC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,CAAU;IACpC,OAAO,CAAC,YAAY,SAAS,CAAC;AAChC,CAAC;AAED,SAAS,MAAM,CAAC,OAAiC,EAAE,OAAiC;IAClF,OAAO,IAAI,SAAS,CAClB,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAC9B,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CACvC,CAAC;AACJ,CAAC;AAKD;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,KAA2B;IACxD,SAAS,CAAuB;IAChC,SAAS,CAAoB;IAC7B,MAAM,CAAiB;IAEvB;;;;;OAKG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,K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AAC,KAAK,CAAC,CAAC,CAAC;QAC1B,CAAC;QAED,+DAA+D;QAC/D,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;YAAE,OAAO,SAAS,CAAC;QAEhD,uDAAuD;QACvD,MAAM,UAAU,GAAe,UAAU;aACtC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;aAC5C,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,SAAU,CAAC,CAAC;QAEpC,gDAAgD;QAChD,mDAAmD;QACnD,OAAO,KAAK,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACtE,CAAC;IAED;;;;;OAKG;IACH,WAAW,CACT,KAA2B;QAE3B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC;YACpC,OAAO,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;QAClD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,222 @@
1
+ import { MosaicClient } from './MosaicClient.js';
2
+ import { type ExprNode, type ExprValue, type ScaleOptions, type ScaleDomain, contains, prefix, regexp_matches, suffix } from '@uwdata/mosaic-sql';
3
+ /**
4
+ * Selection clause metadata to guide possible query optimizations.
5
+ * Sub-interfaces provide more information about the specifics of a
6
+ * given selection based on the selection type.
7
+ */
8
+ export interface ClauseMetadata {
9
+ /**
10
+ * The selection type, such as `'point'`, `'interval'`, or `'match'`.
11
+ */
12
+ type: string;
13
+ }
14
+ /**
15
+ * Selection clause metadata indicating selection of one or more discrete
16
+ * point values, typically based on equality or is distinctiveness checks.
17
+ */
18
+ export interface PointMetadata extends ClauseMetadata {
19
+ type: 'point';
20
+ }
21
+ /**
22
+ * Selection clause metadata indicating text search matching.
23
+ */
24
+ export interface MatchMetadata extends ClauseMetadata {
25
+ type: 'match';
26
+ /** The text search matching method used. */
27
+ method?: 'contains' | 'prefix' | 'suffix' | 'regexp' | (string & {});
28
+ }
29
+ /** A binning method name. */
30
+ export type BinMethod = 'floor' | 'ceil' | 'round';
31
+ /**
32
+ * Selection clause metadata for one or more selected intervals. This
33
+ * metadata can be used to determine appropriate data-space binning
34
+ * schemes that correspond to pixel-level bins in screen space.
35
+ */
36
+ export interface IntervalMetadata extends ClauseMetadata {
37
+ type: 'interval';
38
+ /**
39
+ * The interactive pixel size used by the generating component.
40
+ * Values larger than one indicate intervals that "snap-to" values
41
+ * greater than a single pixel. If unspecified, assumed to be `1`.
42
+ */
43
+ pixelSize?: number;
44
+ /**
45
+ * An array of one or more scale descriptors that describe the
46
+ * mapping from data values to screen pixels.
47
+ */
48
+ scales?: ScaleOptions[];
49
+ /**
50
+ * A hint for the binning method to use when discretizing the
51
+ * interval domain. If unspecified, the default is `'floor'`.
52
+ */
53
+ bin?: BinMethod;
54
+ }
55
+ export type ClauseSource = object & {
56
+ reset?: () => void;
57
+ };
58
+ /**
59
+ * A selection clause representing filtering criteria
60
+ * to apply within a Mosaic Selection.
61
+ */
62
+ export interface SelectionClause {
63
+ /**
64
+ * A unique identifier (according to object equality) for the source
65
+ * component that generated this clause. In many cases, this is a
66
+ * reference to the originating component itself.
67
+ */
68
+ source: ClauseSource;
69
+ /**
70
+ * A set of Mosaic clients associated with this clause that should not
71
+ * be updated when this clause is applied in a cross-filtering context.
72
+ */
73
+ clients?: Set<MosaicClient>;
74
+ /**
75
+ * A selected value associated with this clause. For example, for a 1D
76
+ * interval selection clause the value may be a [lo, hi] array.
77
+ */
78
+ value: unknown;
79
+ /**
80
+ * A predicate SQL expression suitable for use in a query WHERE clause.
81
+ * The predicate should apply filtering criteria consistent with this
82
+ * clause's *value* property.
83
+ */
84
+ predicate: ExprNode | null;
85
+ /**
86
+ * Optional clause metadata that varies based on the selection type.
87
+ * The metadata can be used to optimize selection queries, for example
88
+ * by creating materialized views of pre-aggregated data when applicable.
89
+ */
90
+ meta?: ClauseMetadata;
91
+ }
92
+ interface PointOptions {
93
+ source: ClauseSource;
94
+ clients?: Set<MosaicClient>;
95
+ }
96
+ /**
97
+ * Generate a selection clause for a single selected point value.
98
+ * @param field The table column or expression to select.
99
+ * @param value The selected value.
100
+ * @param options Additional clause properties.
101
+ * @param options.source The source component generating this clause.
102
+ * @param options.clients The Mosaic clients associated
103
+ * with this clause. These clients are not filtered by this clause in
104
+ * cross-filtering contexts.
105
+ * @returns The generated selection clause.
106
+ */
107
+ export declare function clausePoint(field: ExprValue, value: unknown, { source, clients }: PointOptions): SelectionClause;
108
+ /**
109
+ * Generate a selection clause for multiple selected point values.
110
+ * @param fields The table columns or expressions to select.
111
+ * @param value The selected values, as an array of
112
+ * arrays. Each subarray contains values for each *fields* entry.
113
+ * @param options Additional clause properties.
114
+ * @param options.source The source component generating this clause.
115
+ * @param options.clients The Mosaic clients associated
116
+ * with this clause. These clients are not filtered by this clause in
117
+ * cross-filtering contexts.
118
+ * @returns The generated selection clause.
119
+ */
120
+ export declare function clausePoints(fields: ExprValue[], value: unknown[][] | null | undefined, { source, clients }: PointOptions): SelectionClause;
121
+ /** Interval selection clause options. */
122
+ interface IntervalOptions {
123
+ source: ClauseSource;
124
+ clients?: Set<MosaicClient>;
125
+ bin?: BinMethod;
126
+ pixelSize?: number;
127
+ }
128
+ /**
129
+ * Generate a selection clause for a selected 1D interval.
130
+ * @param field The table column or expression to select.
131
+ * @param value The selected interval as a [lo, hi] array.
132
+ * @param options Additional clause properties.
133
+ * @param options.source The source component generating this clause.
134
+ * @param options.clients The Mosaic clients associated
135
+ * with this clause. These clients are not filtered by this clause in
136
+ * cross-filtering contexts.
137
+ * @param options.scale The scale mapping descriptor.
138
+ * @param options.bin A binning method hint.
139
+ * @param options.pixelSize The interactive pixel size.
140
+ * @returns The generated selection clause.
141
+ */
142
+ export declare function clauseInterval(field: ExprValue, value: ScaleDomain | null | undefined, { source, clients, bin, scale, pixelSize }: IntervalOptions & {
143
+ scale?: ScaleOptions;
144
+ }): SelectionClause;
145
+ /**
146
+ * Generate a selection clause for multiple selected intervals.
147
+ * @param fields The table columns or expressions to select.
148
+ * @param value The selected intervals, as an array of extents.
149
+ * @param options Additional clause properties.
150
+ * @param options.source The source component generating this clause.
151
+ * @param options.clients The Mosaic clients associated
152
+ * with this clause. These clients are not filtered by this clause in
153
+ * cross-filtering contexts.
154
+ * @param options.scales The scale mapping descriptors,
155
+ * in an order matching the given *fields* and *value* extents.
156
+ * @param options.bin A binning method hint.
157
+ * @param options.pixelSize The interactive pixel size.
158
+ * @returns The generated selection clause.
159
+ */
160
+ export declare function clauseIntervals(fields: ExprValue[], value: ScaleDomain[] | null | undefined, { source, clients, bin, scales, pixelSize }: IntervalOptions & {
161
+ scales?: ScaleOptions[];
162
+ }): SelectionClause;
163
+ declare const MATCH_METHODS: {
164
+ contains: typeof contains;
165
+ prefix: typeof prefix;
166
+ suffix: typeof suffix;
167
+ regexp: typeof regexp_matches;
168
+ };
169
+ /** Text search matching methods. */
170
+ export type MatchMethod = keyof typeof MATCH_METHODS;
171
+ /** Text matching selection clause options. */
172
+ export interface MatchOptions {
173
+ source: ClauseSource;
174
+ clients?: Set<MosaicClient>;
175
+ method?: MatchMethod;
176
+ caseSensitive?: boolean;
177
+ }
178
+ /**
179
+ * Generate a selection clause for text search matching over a single column.
180
+ * @param field The table column or expression to match.
181
+ * @param value The selected text search query string.
182
+ * @param options Additional clause properties.
183
+ * @param options.source The source component generating this clause.
184
+ * @param options.clients Mosaic clients associated with this clause.
185
+ * These clients are not filtered by this clause in cross-filtering contexts.
186
+ * @param options.method The text matching method to use, default `'contains'`.
187
+ * @param options.caseSensitive Flag for case sensitive matching, default `false`.
188
+ * @returns The generated selection clause.
189
+ */
190
+ export declare function clauseMatch(field: string | ExprNode, value: string | null | undefined, { source, clients, method, caseSensitive }: MatchOptions): SelectionClause;
191
+ /**
192
+ * Generate a selection clause for text search matching over multiple columns.
193
+ * A match will succeed if any field successfully matches.
194
+ * @param fields The table columns or expressions to match.
195
+ * @param value The selected text search query string.
196
+ * @param options Additional clause properties.
197
+ * @param options.source The source component generating this clause.
198
+ * @param options.clients Mosaic clients associated with this clause.
199
+ * These clients are not filtered by this clause in cross-filtering contexts.
200
+ * @param options.method The text matching method to use, default `'contains'`.
201
+ * @param options.caseSensitive Flag for case sensitive matching, default `false`.
202
+ * @returns The generated selection clause.
203
+ */
204
+ export declare function clauseMatchAny(fields: (string | ExprNode)[], value: string | null, { source, clients, method, caseSensitive }: MatchOptions): SelectionClause;
205
+ /**
206
+ * Generate a selection clause for a single selected point value in a list.
207
+ * @param field The table column or expression to select, which must be a list.
208
+ * @param value The selected value.
209
+ * @param options Additional clause properties.
210
+ * @param options.source The source component generating this clause.
211
+ * @param options.clients The Mosaic clients associated
212
+ * with this clause. These clients are not filtered by this clause in
213
+ * cross-filtering contexts.
214
+ * @returns The generated selection clause.
215
+ */
216
+ export declare function clauseList(field: ExprValue, value: unknown, { source, clients, listMatch }: {
217
+ source: ClauseSource;
218
+ clients?: Set<MosaicClient>;
219
+ listMatch?: 'any' | 'all';
220
+ }): SelectionClause;
221
+ export {};
222
+ //# sourceMappingURL=SelectionClause.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionClause.d.ts","sourceRoot":"","sources":["../../src/SelectionClause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAO,QAAQ,EAA+C,MAAM,EAAE,cAAc,EAAE,MAAM,EAAiC,MAAM,oBAAoB,CAAC;AAEnO;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IA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