@elaraai/east-ui 1.0.94 → 1.0.95
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.
- package/dist/src/contracts/index.d.ts +1 -1
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/index.js +1 -1
- package/dist/src/contracts/index.js.map +1 -1
- package/dist/src/contracts/source.d.ts +118 -12
- package/dist/src/contracts/source.d.ts.map +1 -1
- package/dist/src/contracts/source.js +88 -20
- package/dist/src/contracts/source.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +2 -1
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +2 -1
- package/dist/src/internal.js.map +1 -1
- package/dist/src/platform/slice/index.d.ts +23 -0
- package/dist/src/platform/slice/index.d.ts.map +1 -1
- package/dist/src/platform/slice/index.js +29 -1
- package/dist/src/platform/slice/index.js.map +1 -1
- package/dist/src/platform/slice/record-chrome.d.ts +298 -1
- package/dist/src/platform/slice/record-chrome.d.ts.map +1 -1
- package/dist/src/platform/slice/record-chrome.js +45 -1
- package/dist/src/platform/slice/record-chrome.js.map +1 -1
- package/dist/src/platform/slice/record-sources.d.ts +98 -0
- package/dist/src/platform/slice/record-sources.d.ts.map +1 -0
- package/dist/src/platform/slice/record-sources.js +100 -0
- package/dist/src/platform/slice/record-sources.js.map +1 -0
- package/dist/src/platform/slice/record-types.d.ts +889 -29
- package/dist/src/platform/slice/record-types.d.ts.map +1 -1
- package/dist/src/platform/slice/record-types.js +62 -6
- package/dist/src/platform/slice/record-types.js.map +1 -1
- package/dist/src/platform/slice/record.d.ts +1 -1
- package/dist/src/platform/slice/record.d.ts.map +1 -1
- package/dist/src/platform/slice/record.js +6 -0
- package/dist/src/platform/slice/record.js.map +1 -1
- package/dist/src/runtime/record-slice-source.d.ts +6 -1
- package/dist/src/runtime/record-slice-source.d.ts.map +1 -1
- package/dist/src/runtime/record-slice-source.js +21 -3
- package/dist/src/runtime/record-slice-source.js.map +1 -1
- package/dist/src/runtime/record-slice.d.ts +15 -0
- package/dist/src/runtime/record-slice.d.ts.map +1 -1
- package/dist/src/runtime/record-slice.js +20 -1
- package/dist/src/runtime/record-slice.js.map +1 -1
- package/dist/src/runtime/slice.d.ts +1 -0
- package/dist/src/runtime/slice.d.ts.map +1 -1
- package/dist/src/runtime/slice.js +3 -1
- package/dist/src/runtime/slice.js.map +1 -1
- package/dist/src/slice/index.d.ts +6 -0
- package/dist/src/slice/index.d.ts.map +1 -1
- package/dist/src/slice/record/index.d.ts +8 -0
- package/dist/src/slice/record/index.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/** Record-only chrome, separate from the frozen local Slice wire. */
|
|
6
6
|
import { ArrayType, NullType, OptionType, StructType, VariantType, type SubtypeExprOrValue, type ExprType } from "@elaraai/east";
|
|
7
|
-
import { RecordSliceBindType } from "./record-types.js";
|
|
7
|
+
import { RecordSliceBindType, RecordSlicesBindType } from "./record-types.js";
|
|
8
8
|
import { SlicePersistType } from "./index.js";
|
|
9
9
|
/** Controls a record can answer without evaluating row predicates. */
|
|
10
10
|
export declare const RecordSliceAffordanceType: VariantType<{
|
|
@@ -174,6 +174,14 @@ export declare const RecordSliceChromeType: StructType<{
|
|
|
174
174
|
}>;
|
|
175
175
|
readonly prefix: import("@elaraai/east").StringType;
|
|
176
176
|
}>>, import("@elaraai/east").StringType], OptionType<import("@elaraai/east").BooleanType>>;
|
|
177
|
+
readonly containsRow: import("@elaraai/east").FunctionType<[import("@elaraai/east").DictType<import("@elaraai/east").StringType, VariantType<{
|
|
178
|
+
readonly values: ArrayType<import("@elaraai/east").StringType>;
|
|
179
|
+
readonly range: StructType<{
|
|
180
|
+
readonly from: import("@elaraai/east").StringType;
|
|
181
|
+
readonly to: import("@elaraai/east").StringType;
|
|
182
|
+
}>;
|
|
183
|
+
readonly prefix: import("@elaraai/east").StringType;
|
|
184
|
+
}>>, import("@elaraai/east").StringType, import("@elaraai/east").BlobType], OptionType<import("@elaraai/east").BooleanType>>;
|
|
177
185
|
}>;
|
|
178
186
|
readonly affordances: ArrayType<VariantType<{
|
|
179
187
|
readonly fields: NullType;
|
|
@@ -208,4 +216,293 @@ export declare function isRecordSlice(input: unknown): boolean;
|
|
|
208
216
|
* @returns The record chrome payload.
|
|
209
217
|
*/
|
|
210
218
|
export declare function recordSliceChrome(options: RecordSliceChromeOptions): ExprType<RecordSliceChromeType>;
|
|
219
|
+
/**
|
|
220
|
+
* Narrowing over several records in a component's existing toolbar: one rail
|
|
221
|
+
* for every source.
|
|
222
|
+
* @property slice - The product's non-generic handle; each source's typed data stays in the component's source.
|
|
223
|
+
* @property affordances - Explicit controls the host offers, for every source.
|
|
224
|
+
* @property persist - Optional store persistence, for every source under its own key.
|
|
225
|
+
*/
|
|
226
|
+
export declare const RecordSlicesChromeType: StructType<{
|
|
227
|
+
readonly slice: StructType<{
|
|
228
|
+
readonly key: import("@elaraai/east").StringType;
|
|
229
|
+
readonly parts: ArrayType<StructType<{
|
|
230
|
+
readonly source: import("@elaraai/east").StringType;
|
|
231
|
+
readonly label: OptionType<import("@elaraai/east").StringType>;
|
|
232
|
+
readonly icon: OptionType<StructType<{
|
|
233
|
+
readonly name: import("@elaraai/east").StringType;
|
|
234
|
+
readonly prefix: import("@elaraai/east").StringType;
|
|
235
|
+
readonly label: OptionType<import("@elaraai/east").StringType>;
|
|
236
|
+
readonly style: OptionType<StructType<{
|
|
237
|
+
readonly size: OptionType<VariantType<{
|
|
238
|
+
readonly xs: NullType;
|
|
239
|
+
readonly sm: NullType;
|
|
240
|
+
readonly md: NullType;
|
|
241
|
+
readonly lg: NullType;
|
|
242
|
+
readonly xl: NullType;
|
|
243
|
+
readonly "2xl": NullType;
|
|
244
|
+
}>>;
|
|
245
|
+
readonly variant: OptionType<VariantType<{
|
|
246
|
+
readonly solid: NullType;
|
|
247
|
+
}>>;
|
|
248
|
+
readonly color: OptionType<import("@elaraai/east").StringType>;
|
|
249
|
+
readonly background: OptionType<import("@elaraai/east").StringType>;
|
|
250
|
+
readonly colorPalette: OptionType<VariantType<{
|
|
251
|
+
readonly brand: NullType;
|
|
252
|
+
readonly gray: NullType;
|
|
253
|
+
readonly red: NullType;
|
|
254
|
+
readonly orange: NullType;
|
|
255
|
+
readonly yellow: NullType;
|
|
256
|
+
readonly green: NullType;
|
|
257
|
+
readonly teal: NullType;
|
|
258
|
+
readonly blue: NullType;
|
|
259
|
+
readonly cyan: NullType;
|
|
260
|
+
readonly purple: NullType;
|
|
261
|
+
readonly pink: NullType;
|
|
262
|
+
readonly success: NullType;
|
|
263
|
+
readonly warning: NullType;
|
|
264
|
+
readonly danger: NullType;
|
|
265
|
+
readonly info: NullType;
|
|
266
|
+
readonly neutral: NullType;
|
|
267
|
+
}>>;
|
|
268
|
+
readonly opacity: OptionType<import("@elaraai/east").FloatType>;
|
|
269
|
+
readonly borderRadius: OptionType<import("@elaraai/east").StringType>;
|
|
270
|
+
readonly overflow: OptionType<VariantType<{
|
|
271
|
+
readonly visible: NullType;
|
|
272
|
+
readonly hidden: NullType;
|
|
273
|
+
readonly scroll: NullType;
|
|
274
|
+
readonly auto: NullType;
|
|
275
|
+
}>>;
|
|
276
|
+
readonly overflowX: OptionType<VariantType<{
|
|
277
|
+
readonly visible: NullType;
|
|
278
|
+
readonly hidden: NullType;
|
|
279
|
+
readonly scroll: NullType;
|
|
280
|
+
readonly auto: NullType;
|
|
281
|
+
}>>;
|
|
282
|
+
readonly overflowY: OptionType<VariantType<{
|
|
283
|
+
readonly visible: NullType;
|
|
284
|
+
readonly hidden: NullType;
|
|
285
|
+
readonly scroll: NullType;
|
|
286
|
+
readonly auto: NullType;
|
|
287
|
+
}>>;
|
|
288
|
+
readonly width: OptionType<import("@elaraai/east").StringType>;
|
|
289
|
+
readonly height: OptionType<import("@elaraai/east").StringType>;
|
|
290
|
+
readonly minWidth: OptionType<import("@elaraai/east").StringType>;
|
|
291
|
+
readonly minHeight: OptionType<import("@elaraai/east").StringType>;
|
|
292
|
+
readonly maxWidth: OptionType<import("@elaraai/east").StringType>;
|
|
293
|
+
readonly maxHeight: OptionType<import("@elaraai/east").StringType>;
|
|
294
|
+
readonly padding: OptionType<StructType<{
|
|
295
|
+
readonly top: OptionType<import("@elaraai/east").StringType>;
|
|
296
|
+
readonly right: OptionType<import("@elaraai/east").StringType>;
|
|
297
|
+
readonly bottom: OptionType<import("@elaraai/east").StringType>;
|
|
298
|
+
readonly left: OptionType<import("@elaraai/east").StringType>;
|
|
299
|
+
}>>;
|
|
300
|
+
readonly margin: OptionType<StructType<{
|
|
301
|
+
readonly top: OptionType<import("@elaraai/east").StringType>;
|
|
302
|
+
readonly right: OptionType<import("@elaraai/east").StringType>;
|
|
303
|
+
readonly bottom: OptionType<import("@elaraai/east").StringType>;
|
|
304
|
+
readonly left: OptionType<import("@elaraai/east").StringType>;
|
|
305
|
+
}>>;
|
|
306
|
+
}>>;
|
|
307
|
+
}>>;
|
|
308
|
+
readonly slice: StructType<{
|
|
309
|
+
readonly key: import("@elaraai/east").StringType;
|
|
310
|
+
readonly config: StructType<{
|
|
311
|
+
readonly fields: ArrayType<StructType<{
|
|
312
|
+
readonly fieldId: import("@elaraai/east").StringType;
|
|
313
|
+
readonly label: import("@elaraai/east").StringType;
|
|
314
|
+
readonly kind: import("@elaraai/east").StringType;
|
|
315
|
+
readonly optional: import("@elaraai/east").BooleanType;
|
|
316
|
+
readonly multiple: import("@elaraai/east").BooleanType;
|
|
317
|
+
readonly set: import("@elaraai/east").BooleanType;
|
|
318
|
+
readonly values: ArrayType<StructType<{
|
|
319
|
+
readonly value: import("@elaraai/east").StringType;
|
|
320
|
+
readonly label: import("@elaraai/east").StringType;
|
|
321
|
+
}>>;
|
|
322
|
+
readonly format: OptionType<VariantType<{
|
|
323
|
+
readonly number: NullType;
|
|
324
|
+
readonly currency: StructType<{
|
|
325
|
+
readonly code: import("@elaraai/east").StringType;
|
|
326
|
+
readonly compact: import("@elaraai/east").BooleanType;
|
|
327
|
+
}>;
|
|
328
|
+
readonly percent: NullType;
|
|
329
|
+
readonly compact: NullType;
|
|
330
|
+
readonly date: import("@elaraai/east").StringType;
|
|
331
|
+
readonly time: import("@elaraai/east").StringType;
|
|
332
|
+
readonly datetime: import("@elaraai/east").StringType;
|
|
333
|
+
}>>;
|
|
334
|
+
}>>;
|
|
335
|
+
readonly indexes: ArrayType<StructType<{
|
|
336
|
+
readonly name: import("@elaraai/east").StringType;
|
|
337
|
+
readonly fields: ArrayType<import("@elaraai/east").StringType>;
|
|
338
|
+
readonly sets: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
339
|
+
readonly structured: import("@elaraai/east").BooleanType;
|
|
340
|
+
readonly interval: OptionType<StructType<{
|
|
341
|
+
readonly from: import("@elaraai/east").StringType;
|
|
342
|
+
readonly to: import("@elaraai/east").StringType;
|
|
343
|
+
readonly optional: import("@elaraai/east").BooleanType;
|
|
344
|
+
}>>;
|
|
345
|
+
}>>;
|
|
346
|
+
readonly range: OptionType<import("@elaraai/east").StringType>;
|
|
347
|
+
readonly search: ArrayType<import("@elaraai/east").StringType>;
|
|
348
|
+
readonly presets: ArrayType<StructType<{
|
|
349
|
+
readonly id: import("@elaraai/east").StringType;
|
|
350
|
+
readonly name: import("@elaraai/east").StringType;
|
|
351
|
+
readonly where: import("@elaraai/east").DictType<import("@elaraai/east").StringType, VariantType<{
|
|
352
|
+
readonly values: ArrayType<import("@elaraai/east").StringType>;
|
|
353
|
+
readonly range: StructType<{
|
|
354
|
+
readonly from: import("@elaraai/east").StringType;
|
|
355
|
+
readonly to: import("@elaraai/east").StringType;
|
|
356
|
+
}>;
|
|
357
|
+
readonly prefix: import("@elaraai/east").StringType;
|
|
358
|
+
}>>;
|
|
359
|
+
}>>;
|
|
360
|
+
}>;
|
|
361
|
+
readonly read: import("@elaraai/east").FunctionType<[], StructType<{
|
|
362
|
+
readonly where: import("@elaraai/east").DictType<import("@elaraai/east").StringType, VariantType<{
|
|
363
|
+
readonly values: ArrayType<import("@elaraai/east").StringType>;
|
|
364
|
+
readonly range: StructType<{
|
|
365
|
+
readonly from: import("@elaraai/east").StringType;
|
|
366
|
+
readonly to: import("@elaraai/east").StringType;
|
|
367
|
+
}>;
|
|
368
|
+
readonly prefix: import("@elaraai/east").StringType;
|
|
369
|
+
}>>;
|
|
370
|
+
readonly preset: OptionType<import("@elaraai/east").StringType>;
|
|
371
|
+
readonly resolution: OptionType<VariantType<{
|
|
372
|
+
readonly auto: NullType;
|
|
373
|
+
readonly hour: NullType;
|
|
374
|
+
readonly day: NullType;
|
|
375
|
+
readonly week: NullType;
|
|
376
|
+
readonly month: NullType;
|
|
377
|
+
readonly quarter: NullType;
|
|
378
|
+
readonly year: NullType;
|
|
379
|
+
}>>;
|
|
380
|
+
}>>;
|
|
381
|
+
readonly write: import("@elaraai/east").FunctionType<[StructType<{
|
|
382
|
+
readonly where: import("@elaraai/east").DictType<import("@elaraai/east").StringType, VariantType<{
|
|
383
|
+
readonly values: ArrayType<import("@elaraai/east").StringType>;
|
|
384
|
+
readonly range: StructType<{
|
|
385
|
+
readonly from: import("@elaraai/east").StringType;
|
|
386
|
+
readonly to: import("@elaraai/east").StringType;
|
|
387
|
+
}>;
|
|
388
|
+
readonly prefix: import("@elaraai/east").StringType;
|
|
389
|
+
}>>;
|
|
390
|
+
readonly preset: OptionType<import("@elaraai/east").StringType>;
|
|
391
|
+
readonly resolution: OptionType<VariantType<{
|
|
392
|
+
readonly auto: NullType;
|
|
393
|
+
readonly hour: NullType;
|
|
394
|
+
readonly day: NullType;
|
|
395
|
+
readonly week: NullType;
|
|
396
|
+
readonly month: NullType;
|
|
397
|
+
readonly quarter: NullType;
|
|
398
|
+
readonly year: NullType;
|
|
399
|
+
}>>;
|
|
400
|
+
}>], NullType>;
|
|
401
|
+
readonly choose: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType, ArrayType<import("@elaraai/east").StringType>], NullType>;
|
|
402
|
+
readonly range: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType, import("@elaraai/east").StringType, import("@elaraai/east").StringType], NullType>;
|
|
403
|
+
readonly prefix: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType, import("@elaraai/east").StringType], NullType>;
|
|
404
|
+
readonly clear: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], NullType>;
|
|
405
|
+
readonly clearAll: import("@elaraai/east").FunctionType<[], NullType>;
|
|
406
|
+
readonly count: import("@elaraai/east").FunctionType<[], OptionType<import("@elaraai/east").IntegerType>>;
|
|
407
|
+
readonly countWhere: import("@elaraai/east").FunctionType<[import("@elaraai/east").DictType<import("@elaraai/east").StringType, VariantType<{
|
|
408
|
+
readonly values: ArrayType<import("@elaraai/east").StringType>;
|
|
409
|
+
readonly range: StructType<{
|
|
410
|
+
readonly from: import("@elaraai/east").StringType;
|
|
411
|
+
readonly to: import("@elaraai/east").StringType;
|
|
412
|
+
}>;
|
|
413
|
+
readonly prefix: import("@elaraai/east").StringType;
|
|
414
|
+
}>>], OptionType<import("@elaraai/east").IntegerType>>;
|
|
415
|
+
readonly total: import("@elaraai/east").FunctionType<[], OptionType<import("@elaraai/east").IntegerType>>;
|
|
416
|
+
readonly domain: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], OptionType<StructType<{
|
|
417
|
+
readonly from: import("@elaraai/east").StringType;
|
|
418
|
+
readonly to: import("@elaraai/east").StringType;
|
|
419
|
+
}>>>;
|
|
420
|
+
readonly values: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], ArrayType<StructType<{
|
|
421
|
+
readonly value: import("@elaraai/east").StringType;
|
|
422
|
+
readonly label: import("@elaraai/east").StringType;
|
|
423
|
+
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
424
|
+
readonly selected: import("@elaraai/east").BooleanType;
|
|
425
|
+
readonly error: OptionType<import("@elaraai/east").StringType>;
|
|
426
|
+
}>>>;
|
|
427
|
+
readonly suggest: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType, import("@elaraai/east").StringType], OptionType<ArrayType<StructType<{
|
|
428
|
+
readonly value: import("@elaraai/east").StringType;
|
|
429
|
+
readonly label: import("@elaraai/east").StringType;
|
|
430
|
+
readonly count: OptionType<import("@elaraai/east").IntegerType>;
|
|
431
|
+
readonly selected: import("@elaraai/east").BooleanType;
|
|
432
|
+
readonly error: OptionType<import("@elaraai/east").StringType>;
|
|
433
|
+
}>>>>;
|
|
434
|
+
readonly replaces: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], ArrayType<import("@elaraai/east").StringType>>;
|
|
435
|
+
readonly togglePreset: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], NullType>;
|
|
436
|
+
readonly setResolution: import("@elaraai/east").FunctionType<[OptionType<VariantType<{
|
|
437
|
+
readonly auto: NullType;
|
|
438
|
+
readonly hour: NullType;
|
|
439
|
+
readonly day: NullType;
|
|
440
|
+
readonly week: NullType;
|
|
441
|
+
readonly month: NullType;
|
|
442
|
+
readonly quarter: NullType;
|
|
443
|
+
readonly year: NullType;
|
|
444
|
+
}>>], NullType>;
|
|
445
|
+
readonly retry: import("@elaraai/east").FunctionType<[], NullType>;
|
|
446
|
+
readonly sourceId: import("@elaraai/east").StringType;
|
|
447
|
+
readonly readEntry: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], OptionType<OptionType<import("@elaraai/east").BlobType>>>;
|
|
448
|
+
readonly contains: import("@elaraai/east").FunctionType<[import("@elaraai/east").DictType<import("@elaraai/east").StringType, VariantType<{
|
|
449
|
+
readonly values: ArrayType<import("@elaraai/east").StringType>;
|
|
450
|
+
readonly range: StructType<{
|
|
451
|
+
readonly from: import("@elaraai/east").StringType;
|
|
452
|
+
readonly to: import("@elaraai/east").StringType;
|
|
453
|
+
}>;
|
|
454
|
+
readonly prefix: import("@elaraai/east").StringType;
|
|
455
|
+
}>>, import("@elaraai/east").StringType], OptionType<import("@elaraai/east").BooleanType>>;
|
|
456
|
+
readonly containsRow: import("@elaraai/east").FunctionType<[import("@elaraai/east").DictType<import("@elaraai/east").StringType, VariantType<{
|
|
457
|
+
readonly values: ArrayType<import("@elaraai/east").StringType>;
|
|
458
|
+
readonly range: StructType<{
|
|
459
|
+
readonly from: import("@elaraai/east").StringType;
|
|
460
|
+
readonly to: import("@elaraai/east").StringType;
|
|
461
|
+
}>;
|
|
462
|
+
readonly prefix: import("@elaraai/east").StringType;
|
|
463
|
+
}>>, import("@elaraai/east").StringType, import("@elaraai/east").BlobType], OptionType<import("@elaraai/east").BooleanType>>;
|
|
464
|
+
}>;
|
|
465
|
+
}>>;
|
|
466
|
+
readonly presets: ArrayType<StructType<{
|
|
467
|
+
readonly id: import("@elaraai/east").StringType;
|
|
468
|
+
readonly name: import("@elaraai/east").StringType;
|
|
469
|
+
}>>;
|
|
470
|
+
readonly clearAll: import("@elaraai/east").FunctionType<[], NullType>;
|
|
471
|
+
readonly togglePreset: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], NullType>;
|
|
472
|
+
}>;
|
|
473
|
+
readonly affordances: ArrayType<VariantType<{
|
|
474
|
+
readonly fields: NullType;
|
|
475
|
+
readonly search: NullType;
|
|
476
|
+
readonly range: NullType;
|
|
477
|
+
readonly presets: NullType;
|
|
478
|
+
readonly resolution: NullType;
|
|
479
|
+
readonly brush: NullType;
|
|
480
|
+
readonly summary: NullType;
|
|
481
|
+
}>>;
|
|
482
|
+
readonly persist: OptionType<VariantType<{
|
|
483
|
+
readonly local: NullType;
|
|
484
|
+
readonly session: NullType;
|
|
485
|
+
readonly url: NullType;
|
|
486
|
+
}>>;
|
|
487
|
+
}>;
|
|
488
|
+
export type RecordSlicesChromeType = typeof RecordSlicesChromeType;
|
|
489
|
+
/** Shared authoring options for a component narrowed over several records. */
|
|
490
|
+
export interface RecordSlicesChromeOptions {
|
|
491
|
+
/** A `Slice.bindRecords` handle, including its typed authoring form. */
|
|
492
|
+
slice: SubtypeExprOrValue<RecordSlicesBindType>;
|
|
493
|
+
/** Controls to mount; defaults to field chips, presets and summary. */
|
|
494
|
+
affordances?: readonly RecordSliceAffordance[];
|
|
495
|
+
/** Persist validated narrowing in local/session storage or the URL. */
|
|
496
|
+
persist?: keyof SlicePersistType["cases"];
|
|
497
|
+
}
|
|
498
|
+
/** Recognise a `Slice.bindRecords` handle at authoring time. */
|
|
499
|
+
export declare function isRecordSlices(input: unknown): boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Build the chrome over several records, evaluating the handle once and
|
|
502
|
+
* dropping each source's typed data.
|
|
503
|
+
* @param options - Bound handle, requested controls and persistence.
|
|
504
|
+
* @returns The chrome payload.
|
|
505
|
+
* @throws {Error} When the handle is not `Slice.bindRecords`', or an affordance is not a record one
|
|
506
|
+
*/
|
|
507
|
+
export declare function recordSlicesChrome(options: RecordSlicesChromeOptions): ExprType<RecordSlicesChromeType>;
|
|
211
508
|
//# sourceMappingURL=record-chrome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-chrome.d.ts","sourceRoot":"","sources":["../../../../src/platform/slice/record-chrome.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qEAAqE;AACrE,OAAO,EAAE,SAAS,EAAc,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAkC,KAAK,kBAAkB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7K,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"record-chrome.d.ts","sourceRoot":"","sources":["../../../../src/platform/slice/record-chrome.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qEAAqE;AACrE,OAAO,EAAE,SAAS,EAAc,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAkC,KAAK,kBAAkB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC;AAEnE,8EAA8E;AAC9E,MAAM,WAAW,yBAAyB;IACtC,wEAAwE;IACxE,KAAK,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;IAChD,uEAAuE;IACvE,WAAW,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC/C,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAC;CAC7C;AAED,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAGtD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,QAAQ,CAAC,sBAAsB,CAAC,CAgBvG"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/** Record-only chrome, separate from the frozen local Slice wire. */
|
|
6
6
|
import { ArrayType, East, Expr, NullType, OptionType, StructType, VariantType, isSubtype, none, some, variant } from "@elaraai/east";
|
|
7
|
-
import { RecordSliceBindType } from "./record-types.js";
|
|
7
|
+
import { RecordSliceBindType, RecordSlicesBindType } from "./record-types.js";
|
|
8
8
|
import { SlicePersistType } from "./index.js";
|
|
9
9
|
/** Controls a record can answer without evaluating row predicates. */
|
|
10
10
|
export const RecordSliceAffordanceType = VariantType({
|
|
@@ -49,4 +49,48 @@ export function recordSliceChrome(options) {
|
|
|
49
49
|
}
|
|
50
50
|
return East.value({ slice, affordances: affordances.map(value => variant(value, null)), persist: options.persist === undefined ? none : some(variant(options.persist, null)) }, RecordSliceChromeType);
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Narrowing over several records in a component's existing toolbar: one rail
|
|
54
|
+
* for every source.
|
|
55
|
+
* @property slice - The product's non-generic handle; each source's typed data stays in the component's source.
|
|
56
|
+
* @property affordances - Explicit controls the host offers, for every source.
|
|
57
|
+
* @property persist - Optional store persistence, for every source under its own key.
|
|
58
|
+
*/
|
|
59
|
+
export const RecordSlicesChromeType = StructType({
|
|
60
|
+
slice: RecordSlicesBindType,
|
|
61
|
+
affordances: ArrayType(RecordSliceAffordanceType),
|
|
62
|
+
persist: OptionType(SlicePersistType),
|
|
63
|
+
});
|
|
64
|
+
/** Recognise a `Slice.bindRecords` handle at authoring time. */
|
|
65
|
+
export function isRecordSlices(input) {
|
|
66
|
+
const type = Expr.type(East.value(input));
|
|
67
|
+
return type.type === "Struct" && type.fields.parts !== undefined && type.fields.togglePreset !== undefined;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Build the chrome over several records, evaluating the handle once and
|
|
71
|
+
* dropping each source's typed data.
|
|
72
|
+
* @param options - Bound handle, requested controls and persistence.
|
|
73
|
+
* @returns The chrome payload.
|
|
74
|
+
* @throws {Error} When the handle is not `Slice.bindRecords`', or an affordance is not a record one
|
|
75
|
+
*/
|
|
76
|
+
export function recordSlicesChrome(options) {
|
|
77
|
+
const source = East.value(options.slice);
|
|
78
|
+
const type = Expr.type(source);
|
|
79
|
+
if (type.type !== "Struct")
|
|
80
|
+
throw new Error("A Slice.bindRecords handle is required");
|
|
81
|
+
for (const [field, expected] of Object.entries(RecordSlicesBindType.fields)) {
|
|
82
|
+
if (type.fields[field] === undefined || !isSubtype(type.fields[field], expected))
|
|
83
|
+
throw new Error(`Invalid Slice.bindRecords member '${field}'`);
|
|
84
|
+
}
|
|
85
|
+
const affordances = options.affordances ?? ["fields", "presets", "summary"];
|
|
86
|
+
for (const affordance of affordances) {
|
|
87
|
+
if (!(affordance in RecordSliceAffordanceType.cases))
|
|
88
|
+
throw new Error(`Record slices do not support '${affordance}'; use indexed field choices`);
|
|
89
|
+
}
|
|
90
|
+
const slice = East.function([], RecordSlicesBindType, $ => {
|
|
91
|
+
const handle = $.const(source);
|
|
92
|
+
return Object.fromEntries(Object.keys(RecordSlicesBindType.fields).map(field => [field, handle[field]]));
|
|
93
|
+
})();
|
|
94
|
+
return East.value({ slice, affordances: affordances.map(value => variant(value, null)), persist: options.persist === undefined ? none : some(variant(options.persist, null)) }, RecordSlicesChromeType);
|
|
95
|
+
}
|
|
52
96
|
//# sourceMappingURL=record-chrome.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-chrome.js","sourceRoot":"","sources":["../../../../src/platform/slice/record-chrome.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qEAAqE;AACrE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAA0C,MAAM,eAAe,CAAC;AAC7K,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"record-chrome.js","sourceRoot":"","sources":["../../../../src/platform/slice/record-chrome.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qEAAqE;AACrE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAA0C,MAAM,eAAe,CAAC;AAC7K,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,sEAAsE;AACtE,MAAM,CAAC,MAAM,yBAAyB,GAAG,WAAW,CAAC;IACjD,MAAM,EAAE,QAAQ,EAAE,MAAM,EA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AAC,EAAE;QACtD,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,CAAoC,CAAC;QAClE,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,EAAG,MAA6C,CAAC,KAAK,CAAC,CAAC,CAAC,CAAU,CAAC;IAC9J,CAAC,CAAC,EAAE,CAAC;IACL,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,sBAAsB,CAAC,CAAC;AAC5M,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Several records narrowed together: the product of one record Slice per
|
|
7
|
+
* source. Each part is an ordinary `Slice.bindRecord`, under its own store
|
|
8
|
+
* key; no index relates two records, so no choice in one part reaches another.
|
|
9
|
+
* The product adds Clear all and presets over several sources, both East
|
|
10
|
+
* functions over its parts, and keeps no state of its own.
|
|
11
|
+
*/
|
|
12
|
+
import { StringType, StructType, type EastType, type ExprType, type SubtypeExprOrValue, type TypeOf, type VariantType } from "@elaraai/east";
|
|
13
|
+
import type { IndexedSource } from "../../contracts/indexed-source.js";
|
|
14
|
+
import { type IconName, type SolidIconPrefix } from "../../display/icon/types.js";
|
|
15
|
+
import { bindRecord, type RecordSliceOptions, type RecordSliceWhere } from "./record.js";
|
|
16
|
+
import { RecordSlicesHandleType } from "./record-types.js";
|
|
17
|
+
/** An indexed binding's type parameters, recovered from its expression. */
|
|
18
|
+
type Parameters_<S> = S extends IndexedSource<infer K extends EastType, infer R extends StructType, infer P extends EastType, infer M extends StructType, infer IK extends VariantType> ? {
|
|
19
|
+
K: K;
|
|
20
|
+
R: R;
|
|
21
|
+
P: P;
|
|
22
|
+
M: M;
|
|
23
|
+
IK: IK;
|
|
24
|
+
} : never;
|
|
25
|
+
type RowOf<S> = Parameters_<S> extends {
|
|
26
|
+
R: infer R extends StructType;
|
|
27
|
+
} ? R : never;
|
|
28
|
+
type MetaOf<S> = Parameters_<S> extends {
|
|
29
|
+
M: infer M extends StructType;
|
|
30
|
+
} ? M : never;
|
|
31
|
+
/**
|
|
32
|
+
* One source of `Slice.bindRecords`: an indexed binding, how the rail names it,
|
|
33
|
+
* and its controls, typed against its own row and indexes. Presets belong to
|
|
34
|
+
* the product.
|
|
35
|
+
* @typeParam S - The indexed binding's expression type.
|
|
36
|
+
*/
|
|
37
|
+
export type RecordSlicesPart<S> = {
|
|
38
|
+
/** The indexed binding: `Data.bindPaged(record, { indexes })`. */
|
|
39
|
+
source: S;
|
|
40
|
+
/** How the rail names the source (`Bays`): the heading over its fields in the folded rail. With none, the host's noun for it. */
|
|
41
|
+
label?: string;
|
|
42
|
+
/** Its icon on the rail, a Font Awesome solid icon (`{ prefix: "fas", name: "warehouse" }`): on its heading and its fields' chips. With none, the rail's own. */
|
|
43
|
+
icon?: {
|
|
44
|
+
prefix: SolidIconPrefix;
|
|
45
|
+
name: IconName;
|
|
46
|
+
};
|
|
47
|
+
} & Omit<RecordSliceOptions<RowOf<S>, MetaOf<S>>, "presets">;
|
|
48
|
+
/**
|
|
49
|
+
* Each source's narrowing in a preset: a source it does not name is cleared.
|
|
50
|
+
* @typeParam S - Each source's indexed binding expression type, by name.
|
|
51
|
+
*/
|
|
52
|
+
export type RecordSlicesWhere<S> = {
|
|
53
|
+
[N in keyof S]?: RecordSliceWhere<RowOf<S[N]>, MetaOf<S[N]>>;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Options of `Slice.bindRecords` beyond its sources.
|
|
57
|
+
* @typeParam S - Each source's indexed binding expression type, by name.
|
|
58
|
+
*/
|
|
59
|
+
export interface RecordSlicesOptions<S> {
|
|
60
|
+
/** Named narrowings over any sources, selected one at a time. */
|
|
61
|
+
presets?: readonly {
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
where: RecordSlicesWhere<S>;
|
|
65
|
+
}[];
|
|
66
|
+
}
|
|
67
|
+
/** The typed handle of one part, as `Slice.bindRecord` returns it. */
|
|
68
|
+
type PartHandle<S> = Parameters_<S> extends {
|
|
69
|
+
K: infer K extends EastType;
|
|
70
|
+
R: infer R extends StructType;
|
|
71
|
+
P: infer P extends EastType;
|
|
72
|
+
M: infer M extends StructType;
|
|
73
|
+
IK: infer IK extends VariantType;
|
|
74
|
+
} ? TypeOf<ReturnType<typeof bindRecord<K, R, P, M, IK>>> : never;
|
|
75
|
+
/**
|
|
76
|
+
* The typed handle `Slice.bindRecords` returns.
|
|
77
|
+
* @typeParam S - Each source's indexed binding expression type, by name.
|
|
78
|
+
*/
|
|
79
|
+
export type RecordSlicesHandle<S> = ExprType<ReturnType<typeof RecordSlicesHandleType<{
|
|
80
|
+
[N in keyof S & string]: PartHandle<S[N]>;
|
|
81
|
+
}>>>;
|
|
82
|
+
/**
|
|
83
|
+
* Narrow several records together from one set of controls: one record Slice
|
|
84
|
+
* per source, under `${key}.${source}`, read with `Slice.rows(slice, source)`.
|
|
85
|
+
* A choice in one source never changes another's rows or counts. A preset is
|
|
86
|
+
* every source's narrowing at once; a source it does not name is cleared.
|
|
87
|
+
*
|
|
88
|
+
* @param key - Stable UI state key.
|
|
89
|
+
* @param parts - Each source by name: an indexed binding (`Data.bindPaged(record, { indexes })`), how the rail names it (`label`, `icon`), and its fields, range, search and initial narrowing.
|
|
90
|
+
* @param options - Presets over the sources.
|
|
91
|
+
* @returns A serializable handle with each source's typed narrowed data.
|
|
92
|
+
* @throws {Error} When there is no source, a preset repeats, a preset names a source the Slice lacks, a part declares its own presets, a label is empty or an icon is not a Font Awesome solid one; and as `Slice.bindRecord` refuses a part, naming its source
|
|
93
|
+
*/
|
|
94
|
+
export declare function bindRecords<S extends Record<string, unknown>>(key: SubtypeExprOrValue<StringType>, parts: {
|
|
95
|
+
[N in keyof S]: RecordSlicesPart<S[N]>;
|
|
96
|
+
}, options?: RecordSlicesOptions<NoInfer<S>>): RecordSlicesHandle<S>;
|
|
97
|
+
export {};
|
|
98
|
+
//# sourceMappingURL=record-sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-sources.d.ts","sourceRoot":"","sources":["../../../../src/platform/slice/record-sources.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,OAAO,EAC0C,UAAU,EAAE,UAAU,EACnE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EACvF,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAkB,KAAK,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EAA4C,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAErG,2EAA2E;AAC3E,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,SAAS,QAAQ,EAAE,MAAM,CAAC,SAAS,UAAU,EAAE,MAAM,CAAC,SAAS,QAAQ,EAAE,MAAM,CAAC,SAAS,UAAU,EAA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+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Several records narrowed together: the product of one record Slice per
|
|
7
|
+
* source. Each part is an ordinary `Slice.bindRecord`, under its own store
|
|
8
|
+
* key; no index relates two records, so no choice in one part reaches another.
|
|
9
|
+
* The product adds Clear all and presets over several sources, both East
|
|
10
|
+
* functions over its parts, and keeps no state of its own.
|
|
11
|
+
*/
|
|
12
|
+
import { ArrayType, East, Expr, NullType, OptionType, StringType, StructType, isValueOf, none, some, } from "@elaraai/east";
|
|
13
|
+
import { refuseNonSolid } from "../../display/icon/types.js";
|
|
14
|
+
import { bindRecord } from "./record.js";
|
|
15
|
+
import { RecordSliceBindType, RecordSlicePartType, RecordSlicesHandleType } from "./record-types.js";
|
|
16
|
+
/**
|
|
17
|
+
* Narrow several records together from one set of controls: one record Slice
|
|
18
|
+
* per source, under `${key}.${source}`, read with `Slice.rows(slice, source)`.
|
|
19
|
+
* A choice in one source never changes another's rows or counts. A preset is
|
|
20
|
+
* every source's narrowing at once; a source it does not name is cleared.
|
|
21
|
+
*
|
|
22
|
+
* @param key - Stable UI state key.
|
|
23
|
+
* @param parts - Each source by name: an indexed binding (`Data.bindPaged(record, { indexes })`), how the rail names it (`label`, `icon`), and its fields, range, search and initial narrowing.
|
|
24
|
+
* @param options - Presets over the sources.
|
|
25
|
+
* @returns A serializable handle with each source's typed narrowed data.
|
|
26
|
+
* @throws {Error} When there is no source, a preset repeats, a preset names a source the Slice lacks, a part declares its own presets, a label is empty or an icon is not a Font Awesome solid one; and as `Slice.bindRecord` refuses a part, naming its source
|
|
27
|
+
*/
|
|
28
|
+
export function bindRecords(key, parts, options = {}) {
|
|
29
|
+
const names = Object.keys(parts);
|
|
30
|
+
if (names.length === 0)
|
|
31
|
+
throw new Error("Slice.bindRecords needs at least one source: Slice.bindRecords(key, { name: { source, fields } })");
|
|
32
|
+
const presets = options.presets ?? [];
|
|
33
|
+
const ids = new Set();
|
|
34
|
+
for (const preset of presets) {
|
|
35
|
+
if (ids.has(preset.id))
|
|
36
|
+
throw new Error(`Slice.bindRecords: repeated preset '${preset.id}'`);
|
|
37
|
+
ids.add(preset.id);
|
|
38
|
+
for (const source of Object.keys(preset.where)) {
|
|
39
|
+
if (!names.includes(source))
|
|
40
|
+
throw new Error(`Slice.bindRecords: preset '${preset.id}' narrows '${source}', which is not one of its sources (${names.join(", ")})`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// How the rail names each source: its label and its icon, as the Icon definition holds one.
|
|
44
|
+
const named = names.map(name => {
|
|
45
|
+
const { label, icon } = parts[name];
|
|
46
|
+
if (label !== undefined && label.trim() === "")
|
|
47
|
+
throw new Error(`Slice.bindRecords: '${name}' has an empty label; give it a name or leave it out`);
|
|
48
|
+
refuseNonSolid(`Slice.bindRecords: '${name}'`, icon);
|
|
49
|
+
return {
|
|
50
|
+
label: label === undefined ? none : some(label),
|
|
51
|
+
icon: icon === undefined ? none : some({ prefix: icon.prefix, name: icon.name, label: none, style: none }),
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
const handles = names.map(name => {
|
|
55
|
+
const { source, label: _label, icon: _icon, ...controls } = parts[name];
|
|
56
|
+
if (controls.presets !== undefined)
|
|
57
|
+
throw new Error(`Slice.bindRecords: '${name}' declares presets; declare them once, in the options, over any sources`);
|
|
58
|
+
const where = (preset) => preset.where[name] ?? {};
|
|
59
|
+
const partKey = isValueOf(key, StringType) ? `${key}.${name}` : East.value(key, StringType).concat(`.${name}`);
|
|
60
|
+
try {
|
|
61
|
+
return bindRecord(partKey, source, { ...controls,
|
|
62
|
+
presets: presets.map(preset => ({ id: preset.id, name: preset.name, where: where(preset) })) });
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
// A part's refusal names its source: several sources may hold fields of one name.
|
|
66
|
+
throw new Error(`Slice.bindRecords: the '${name}' source — ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const sources = Object.fromEntries(names.map((name, i) => [name, Expr.type(handles[i])]));
|
|
70
|
+
const type = RecordSlicesHandleType(sources);
|
|
71
|
+
return East.function([], type, $ => {
|
|
72
|
+
// Each part is bound once; the product's functions loop over their controls.
|
|
73
|
+
const bound = handles.map(handle => $.const(handle));
|
|
74
|
+
const controls = (handle) => Object.fromEntries(Object.keys(RecordSliceBindType.fields)
|
|
75
|
+
.map(field => [field, handle[field]]));
|
|
76
|
+
const all = $.const(names.map((name, i) => ({ source: name, ...named[i], slice: controls(bound[i]) })), ArrayType(RecordSlicePartType));
|
|
77
|
+
return {
|
|
78
|
+
key, parts: all, presets: presets.map(preset => ({ id: preset.id, name: preset.name })),
|
|
79
|
+
clearAll: East.function([], NullType, $2 => {
|
|
80
|
+
$2.for(all, ($3, part) => { $3(part.slice.clearAll()); });
|
|
81
|
+
}),
|
|
82
|
+
togglePreset: East.function([StringType], NullType, ($2, id) => {
|
|
83
|
+
const chosen = $2.const(some(id), OptionType(StringType));
|
|
84
|
+
const everywhere = $2.let(true);
|
|
85
|
+
$2.for(all, ($3, part) => {
|
|
86
|
+
$3.if(East.notEqual(part.slice.read().preset, chosen), $4 => { $4.assign(everywhere, false); });
|
|
87
|
+
});
|
|
88
|
+
$2.if(everywhere, $3 => {
|
|
89
|
+
$3.for(all, ($4, part) => { $4(part.slice.clearAll()); });
|
|
90
|
+
}).else($3 => {
|
|
91
|
+
$3.for(all, ($4, part) => {
|
|
92
|
+
$4.if(East.notEqual(part.slice.read().preset, chosen), $5 => { $5(part.slice.togglePreset(id)); });
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}),
|
|
96
|
+
sources: Object.fromEntries(names.map((name, i) => [name, bound[i]])),
|
|
97
|
+
};
|
|
98
|
+
})();
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=record-sources.js.map
|
|
@@ -0,0 +1 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