@mosaicajs/components 0.3.0 → 0.4.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.
- package/README.md +2 -0
- package/dist/aggregate.d.ts +4 -10
- package/dist/aggregate.js +7 -13
- package/dist/artifact-card.d.ts +21 -7
- package/dist/artifact-card.js +136 -79
- package/dist/base.d.ts +44 -5
- package/dist/base.js +54 -5
- package/dist/cluster-filter.d.ts +29 -25
- package/dist/cluster-filter.js +123 -106
- package/dist/colour-editor.d.ts +15 -4
- package/dist/colour-editor.js +107 -34
- package/dist/colour-picker.d.ts +12 -5
- package/dist/colour-picker.js +119 -32
- package/dist/display.js +77 -9
- package/dist/events.d.ts +21 -7
- package/dist/explorer.d.ts +116 -37
- package/dist/explorer.js +476 -210
- package/dist/field-card.d.ts +304 -48
- package/dist/field-card.js +1364 -244
- package/dist/filter-panel.d.ts +54 -10
- package/dist/filter-panel.js +242 -42
- package/dist/filter.d.ts +22 -4
- package/dist/filter.js +113 -34
- package/dist/hierarchy.d.ts +68 -45
- package/dist/hierarchy.js +320 -243
- package/dist/item-card.d.ts +47 -16
- package/dist/item-card.js +241 -108
- package/dist/key-picker.d.ts +2 -1
- package/dist/key-picker.js +4 -3
- package/dist/layer-picker.d.ts +4 -2
- package/dist/layer-picker.js +16 -7
- package/dist/lineage.d.ts +132 -0
- package/dist/lineage.js +307 -0
- package/dist/map.d.ts +135 -24
- package/dist/map.js +387 -117
- package/dist/mosaica-components.js +1837 -833
- package/dist/mosaica-components.js.sri +1 -1
- package/dist/mosaica-components.json +2 -2
- package/dist/parts.d.ts +4 -4
- package/dist/parts.js +18 -4
- package/dist/paths.d.ts +34 -12
- package/dist/paths.js +84 -46
- package/dist/selection.d.ts +22 -3
- package/dist/selection.js +125 -59
- package/dist/states.d.ts +72 -0
- package/dist/states.js +135 -26
- package/dist/status.d.ts +63 -5
- package/dist/status.js +215 -36
- package/dist/tokens.d.ts +8 -4
- package/dist/tokens.js +144 -14
- package/dist/view-picker.js +5 -0
- package/package.json +4 -3
package/dist/explorer.d.ts
CHANGED
|
@@ -59,7 +59,20 @@ type Pinned = {
|
|
|
59
59
|
* HTML.
|
|
60
60
|
*
|
|
61
61
|
* Below 1000 px the explorer uses the overlay layout whatever `layout` says. At 720 px or less it
|
|
62
|
-
* opens its panels as sheets from a
|
|
62
|
+
* opens its panels as sheets from a bar of buttons under the map, and a picked item's card opens
|
|
63
|
+
* in the Item sheet. A sheet that reaches up over the map's tools makes the map behind it inert
|
|
64
|
+
* until it closes.
|
|
65
|
+
*
|
|
66
|
+
* The status strip speaks for the explorer: its map and its selection card are set `quiet`, so a
|
|
67
|
+
* change is announced once. Where you put something other than a `<mosaica-status>` in the
|
|
68
|
+
* `status` slot, they announce for themselves.
|
|
69
|
+
*
|
|
70
|
+
* An `aria-label` on the explorer names its map, so a page with several explorers can tell them
|
|
71
|
+
* apart.
|
|
72
|
+
*
|
|
73
|
+
* A dataset title, a view's name or a layer's name too long for its line is cut with an ellipsis
|
|
74
|
+
* and keeps all of it in its `title`. Set `--mosaica-long-text: normal` to wrap them. The narrow
|
|
75
|
+
* layout wraps them itself.
|
|
63
76
|
*
|
|
64
77
|
* @summary A complete map application in a single element.
|
|
65
78
|
* @tagname mosaica-explorer
|
|
@@ -69,7 +82,7 @@ type Pinned = {
|
|
|
69
82
|
* @slot filters - Replaces the filter panel.
|
|
70
83
|
* @slot selection - Replaces the selection panel, shown while a region is selected.
|
|
71
84
|
* @slot detail - Replaces the item and artifact cards, in the card beside the point.
|
|
72
|
-
* @slot status - Replaces the status strip
|
|
85
|
+
* @slot status - Replaces the status strip: on the map, or under it in the narrow layout.
|
|
73
86
|
* @slot tooltip - Replaces the map's hover tooltip.
|
|
74
87
|
* @slot top-right - Content in the map's top-right corner, above the selection's card.
|
|
75
88
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-viewchange']>} mosaica-viewchange - The map's camera moved.
|
|
@@ -82,11 +95,11 @@ type Pinned = {
|
|
|
82
95
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-selectchange']>} mosaica-selectchange - A selection was drawn, changed or cleared, or its counts arrived.
|
|
83
96
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-layerchange']>} mosaica-layerchange - The layers chosen changed.
|
|
84
97
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-colourchange']>} mosaica-colourchange - Colour by changed, in the Layers popover or by a card's paint button.
|
|
85
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-levelchange']>} mosaica-levelchange - The level
|
|
98
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-levelchange']>} mosaica-levelchange - The level one layer is counted, coloured and labelled at changed.
|
|
86
99
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-displaychange']>} mosaica-displaychange - A setting in the Points or Density section changed.
|
|
87
100
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-sizechange']>} mosaica-sizechange - Size by, the size range or the scale changed in the Points section.
|
|
88
101
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-budgetchange']>} mosaica-budgetchange - Most points was let go at a new number.
|
|
89
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-
|
|
102
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clusterspacingchange']>} mosaica-clusterspacingchange - Cluster density was let go at a new spacing.
|
|
90
103
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-fold']>} mosaica-fold - A field card was folded to one line or opened.
|
|
91
104
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-valuecolour']>} mosaica-valuecolour - Colours were chosen or reset for values of a category, on a field card or in Edit colours.
|
|
92
105
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clustercolour']>} mosaica-clustercolour - Colours were chosen or reset for clusters of a layer, on a field card or in Edit colours.
|
|
@@ -123,8 +136,9 @@ type Pinned = {
|
|
|
123
136
|
* @csspart points-toggle - The Points switch, with `aria-checked`.
|
|
124
137
|
* @csspart most-points - The Most points slider.
|
|
125
138
|
* @csspart most-points-value - The number of points it stands at, such as "250K".
|
|
126
|
-
* @csspart
|
|
127
|
-
*
|
|
139
|
+
* @csspart cluster-density - The Cluster density slider, while a `nested` or `dag` layer is drawn, or a
|
|
140
|
+
* levelled layer whose level follows the zoom is drawn or coloured by.
|
|
141
|
+
* @csspart cluster-density-value - How many clusters it gives the map at its size, such as "96".
|
|
128
142
|
* @csspart size-by - The Size by button, naming the column the points are sized by or None, with
|
|
129
143
|
* `aria-expanded` while its menu is open.
|
|
130
144
|
* @csspart size-menu - The Size by menu, while it is open.
|
|
@@ -141,7 +155,8 @@ type Pinned = {
|
|
|
141
155
|
* `aria-expanded` while its menu is open.
|
|
142
156
|
* @csspart colour-menu - The Colour by menu, while it is open.
|
|
143
157
|
* @csspart colour-option - An entry in the Colour by menu, with `data-value` (empty for None,
|
|
144
|
-
* `cluster:<layer>@<level>` for one level of a levelled layer
|
|
158
|
+
* `cluster:<layer>@<level>` for one level of a levelled layer, `cluster:<layer>@` for Follow zoom
|
|
159
|
+
* on one whose levels declare no zoom range) and `aria-checked`.
|
|
145
160
|
* @csspart palette - The Palette button, while the points are coloured by a layer or a category.
|
|
146
161
|
* @csspart palette-menu - The Palette menu, while it is open.
|
|
147
162
|
* @csspart palette-option - A palette in that menu, with `data-value` and `aria-checked`.
|
|
@@ -165,9 +180,10 @@ type Pinned = {
|
|
|
165
180
|
* @csspart detail - The item or artifact card in the map's top-right corner, used when the picked
|
|
166
181
|
* item or artifact has no position on the map, such as after following an item into another
|
|
167
182
|
* view.
|
|
168
|
-
* @csspart sheet - The open sheet, in the narrow layout.
|
|
183
|
+
* @csspart sheet - The open sheet, over the map in the narrow layout.
|
|
169
184
|
* @csspart strip-row - The full-width status strip, in the narrow layout.
|
|
170
|
-
* @csspart tabs - The
|
|
185
|
+
* @csspart tabs - The bar of buttons that open the sheets, in the narrow layout, each with
|
|
186
|
+
* `data-sheet` and `aria-expanded`.
|
|
171
187
|
* @csspart map-<part> - A part of the inner `<mosaica-map>`, such as `map-controls`.
|
|
172
188
|
* @csspart status-<part> - A part of an inner `<mosaica-status>`.
|
|
173
189
|
* @csspart view-picker-<part> - A part of the inner `<mosaica-view-picker>`.
|
|
@@ -227,14 +243,16 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
227
243
|
/** The highest value of the Most points slider. */
|
|
228
244
|
accessor budgetMax: number;
|
|
229
245
|
/**
|
|
230
|
-
* The
|
|
231
|
-
*
|
|
246
|
+
* The side in CSS pixels of the square of the map each cluster is given, as for `<mosaica-map>`'s
|
|
247
|
+
* `cluster-spacing`: at 100, a map 1,200 by 800 pixels cuts a `nested` or `dag` layer to 96
|
|
248
|
+
* clusters, and a level that follows the zoom may have 96 in view. `0` removes the limit. Most
|
|
249
|
+
* clusters in the Layers popover changes it.
|
|
232
250
|
*/
|
|
233
|
-
accessor
|
|
234
|
-
/** The
|
|
235
|
-
accessor
|
|
236
|
-
/** The
|
|
237
|
-
accessor
|
|
251
|
+
accessor clusterSpacing: number;
|
|
252
|
+
/** The smallest spacing Cluster density offers, at its More end. */
|
|
253
|
+
accessor clusterSpacingMin: number;
|
|
254
|
+
/** The largest spacing Cluster density offers, at its Fewer end. */
|
|
255
|
+
accessor clusterSpacingMax: number;
|
|
238
256
|
/**
|
|
239
257
|
* What is drawn under the points, as for `<mosaica-map>`'s `basemap`. The attribute takes `world`
|
|
240
258
|
* and `none`. Unset, a view with a map projection gets the world outline and any other view gets
|
|
@@ -297,16 +315,32 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
297
315
|
accessor menu: Menu | null;
|
|
298
316
|
/** Where Most points is being dragged, before it is let go. @internal */
|
|
299
317
|
accessor pointsDragged: number | null;
|
|
300
|
-
/**
|
|
318
|
+
/** The cluster spacing Cluster density is being dragged to, before it is let go. @internal */
|
|
301
319
|
accessor clustersDragged: number | null;
|
|
302
320
|
/** Whether the list of density colours in the Layers popover is open. @internal */
|
|
303
321
|
accessor densityColoursOpen: boolean;
|
|
304
322
|
/** @internal */
|
|
305
323
|
accessor sheet: Sheet | null;
|
|
306
|
-
/** The narrow layout's
|
|
324
|
+
/** The narrow layout's button focused last, which keeps the bar's one place in the tab order. */
|
|
307
325
|
private accessor tabFocus;
|
|
308
|
-
/**
|
|
309
|
-
|
|
326
|
+
/**
|
|
327
|
+
* What the selection's card shows, as last seen: the record or the refusal the store holds, or
|
|
328
|
+
* the map's broken pick; null for no card. Picking the same item again brings a new record.
|
|
329
|
+
*/
|
|
330
|
+
private cardSeen;
|
|
331
|
+
/** Where focus was before the update being drawn: in the open sheet, elsewhere in the explorer, or outside it. */
|
|
332
|
+
private focusBefore;
|
|
333
|
+
/** Whether the host put something other than a status strip in the `status` slot, so no strip speaks. */
|
|
334
|
+
private get stripReplaced();
|
|
335
|
+
/** What the host put in the `status` slot changed, and with it whether a strip speaks. */
|
|
336
|
+
private onStatusSlot;
|
|
337
|
+
/** What the status region says: the card that opened last. */
|
|
338
|
+
private announced;
|
|
339
|
+
/**
|
|
340
|
+
* The level each layer is counted, coloured and labelled at, chosen on its card or in Colour by,
|
|
341
|
+
* keyed by layer name. A layer with no entry takes its default level. @internal
|
|
342
|
+
*/
|
|
343
|
+
accessor levels: ReadonlyMap<string, number>;
|
|
310
344
|
/** The cards kept open by Pin, oldest first. @internal */
|
|
311
345
|
accessor pinned: Pinned[];
|
|
312
346
|
/** Each callout's size as last measured, by its key. */
|
|
@@ -347,6 +381,23 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
347
381
|
protected resetServerData(): void;
|
|
348
382
|
protected onStoreAdopted(store: Store | null): void;
|
|
349
383
|
protected onStoreChange(): void;
|
|
384
|
+
static get observedAttributes(): string[];
|
|
385
|
+
/** An `aria-label` on the explorer is passed to its map. */
|
|
386
|
+
attributeChangedCallback(name: string, old: string | null, value: string | null): void;
|
|
387
|
+
/**
|
|
388
|
+
* As the selection's card comes, changes or goes. The wide layouts say which card opened in the
|
|
389
|
+
* status region. The narrow layout opens the Item sheet for it, and closes that sheet with it; a
|
|
390
|
+
* card that arrives while the viewer's focus is in another sheet leaves that sheet open. Sheets
|
|
391
|
+
* are the narrow layout's: growing wider closes the open one, and growing narrow with a card
|
|
392
|
+
* open opens the Item sheet.
|
|
393
|
+
*/
|
|
394
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
395
|
+
/** Whether focus is in the explorer: in its own tree, or in an element the host put in a slot. */
|
|
396
|
+
private holdsFocus;
|
|
397
|
+
/** What the selection's card shows, or null where it has nothing to show or `panels` leaves the card out. */
|
|
398
|
+
private cardSubject;
|
|
399
|
+
/** Whether the selection has a card to show: a click that found nothing shows none, and a broken pick shows its fault. */
|
|
400
|
+
private hasDetail;
|
|
350
401
|
connectedCallback(): void;
|
|
351
402
|
/** Take the compact or the narrow form, or neither, for a container `width` pixels wide. */
|
|
352
403
|
private fitWidth;
|
|
@@ -358,6 +409,11 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
358
409
|
private has;
|
|
359
410
|
/** A press anywhere outside the Layers button, its popover and the Edit colours dialog it opens closes the popover. */
|
|
360
411
|
private onOutside;
|
|
412
|
+
/**
|
|
413
|
+
* Focus going from the Layers button, its popover or their menus to somewhere else in the page
|
|
414
|
+
* closes the popover. The Edit colours dialog it opens is not somewhere else.
|
|
415
|
+
*/
|
|
416
|
+
private onLayersFocusOut;
|
|
361
417
|
private openLayers;
|
|
362
418
|
private closeLayers;
|
|
363
419
|
render(): TemplateResult | typeof nothing;
|
|
@@ -393,7 +449,8 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
393
449
|
/**
|
|
394
450
|
* Place each callout beside its point under the camera as it stands, clear of the cards over the
|
|
395
451
|
* map and of the callouts placed before it, and join it to its point. A callout whose point is off
|
|
396
|
-
* the map is hidden with its leader
|
|
452
|
+
* the map is hidden with its leader, and gives the focus it holds to the map. Reads no layout: the
|
|
453
|
+
* sizes are those {@link measure} took.
|
|
397
454
|
*/
|
|
398
455
|
private placeCallouts;
|
|
399
456
|
/**
|
|
@@ -415,11 +472,6 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
415
472
|
/** The enabled resolution stops the popover last drew, so a camera change that alters them redraws it. */
|
|
416
473
|
private stopsSeen;
|
|
417
474
|
private onCamera;
|
|
418
|
-
/**
|
|
419
|
-
* Tab from the map itself goes to the card beside the point, the selection's where it shows, so
|
|
420
|
-
* the card is the next stop after the map; from there Tab goes on in the page's order.
|
|
421
|
-
*/
|
|
422
|
-
private onMapKey;
|
|
423
475
|
/** Escape on a card: the card not pinned closes, dropping the selection; focus goes back to the map. */
|
|
424
476
|
private onCalloutKey;
|
|
425
477
|
/** The display settings as they stand. */
|
|
@@ -436,16 +488,22 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
436
488
|
*/
|
|
437
489
|
private mostPoints;
|
|
438
490
|
/**
|
|
439
|
-
*
|
|
440
|
-
*
|
|
491
|
+
* Cluster density, while a `nested` or `dag` layer is drawn, or a levelled layer following the zoom
|
|
492
|
+
* is drawn or coloured by: a slider over the cluster spacing on a log scale, from
|
|
493
|
+
* `cluster-spacing-max` at its Fewer end to `cluster-spacing-min` at its More end, with how many
|
|
494
|
+
* clusters the spacing gives the map at its size. Letting go sets the store's spacing.
|
|
495
|
+
*/
|
|
496
|
+
private clusterDensity;
|
|
497
|
+
/**
|
|
498
|
+
* A slider standing `at` of the way along, with its readout, its ends' labels and its ticks. `of`
|
|
499
|
+
* gives the value at a share of the way along; dragging passes it to `drag`, and letting go to
|
|
500
|
+
* `set`.
|
|
441
501
|
*/
|
|
442
|
-
private mostClusters;
|
|
443
|
-
/** A log-scale slider over `range` on round numbers, with the number it stands at. */
|
|
444
502
|
private mostSlider;
|
|
445
503
|
/** Set the store's budget from Most points, and report it. */
|
|
446
504
|
private setBudget;
|
|
447
|
-
/** Set the
|
|
448
|
-
private
|
|
505
|
+
/** Set the store's cluster spacing from Cluster density, and report it. */
|
|
506
|
+
private setClusterSpacing;
|
|
449
507
|
/**
|
|
450
508
|
* The Colour section: Colour by, then the palette for a category, or the ramp, its scale and
|
|
451
509
|
* Reverse for a number or a date, unless `hide-palettes` is set.
|
|
@@ -453,11 +511,17 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
453
511
|
private colourSection;
|
|
454
512
|
/**
|
|
455
513
|
* What Colour by offers: None, every layer that can colour (a levelled layer once per level, by
|
|
456
|
-
* its levels' titles
|
|
514
|
+
* its levels' titles, after Follow zoom where no level declares a zoom range), and the rendered
|
|
515
|
+
* category and number columns.
|
|
457
516
|
*/
|
|
458
517
|
private colourOptions;
|
|
459
|
-
/**
|
|
518
|
+
/**
|
|
519
|
+
* Colour by `value`: a column, `cluster:<layer>`, `cluster:<layer>@<level>` for one level of a
|
|
520
|
+
* layer, or `cluster:<layer>@` for the level that follows the zoom.
|
|
521
|
+
*/
|
|
460
522
|
private chooseColour;
|
|
523
|
+
/** Count, colour and label `layer` at `level`, or at its default level where `level` is null; other layers keep theirs. */
|
|
524
|
+
private chooseLevel;
|
|
461
525
|
/** Colour a layer's clusters from `palette`, and report it. */
|
|
462
526
|
private chooseClusterPalette;
|
|
463
527
|
/** Change the palette, the ramp, its scale or its direction, and report all four. */
|
|
@@ -497,7 +561,7 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
497
561
|
private closeMenu;
|
|
498
562
|
/** The arrow keys on a menu's button open the menu, as a menu button's do. */
|
|
499
563
|
private onMenuButtonKey;
|
|
500
|
-
/** Focus leaving the open menu
|
|
564
|
+
/** Focus leaving the open menu closes it. */
|
|
501
565
|
private onMenuFocusOut;
|
|
502
566
|
/** A press in the Layers popover outside the open menu's button closes the menu. */
|
|
503
567
|
private onPopoverPress;
|
|
@@ -508,14 +572,29 @@ export declare class MosaicaExplorer extends MosaicaElement {
|
|
|
508
572
|
private changeSize;
|
|
509
573
|
/** Apply a change made in the Display section, and report every setting as it now stands. */
|
|
510
574
|
private changeDisplay;
|
|
575
|
+
/** Close the list of density colours, with focus on its button. */
|
|
576
|
+
private closeDensityColours;
|
|
577
|
+
/** Escape in the list of density colours closes the list alone. */
|
|
578
|
+
private onDensityColoursKey;
|
|
579
|
+
/** Focus leaving the list of density colours and its button closes the list. */
|
|
580
|
+
private onDensityColoursFocusOut;
|
|
511
581
|
/** Escape closes the Layers popover and returns focus to its button. */
|
|
512
582
|
private onLayersKey;
|
|
513
|
-
/** The
|
|
583
|
+
/** The bar's keys: the arrows move between its buttons, wrapping, and Home and End go to the ends. */
|
|
514
584
|
private onTabKey;
|
|
515
585
|
/** Escape closes the sheet. */
|
|
516
586
|
private onSheetKey;
|
|
517
|
-
/**
|
|
587
|
+
/**
|
|
588
|
+
* Focus goes to the first control of the Layers popover as it opens. A sheet that opens takes
|
|
589
|
+
* the focus the explorer held, and none from the page around it. A sheet that closes gives the
|
|
590
|
+
* focus it held to its button, or to the map where the layout has grown wide and has no button.
|
|
591
|
+
*/
|
|
518
592
|
protected updated(changed: PropertyValues<this>): void;
|
|
593
|
+
/**
|
|
594
|
+
* While an open sheet reaches up over the map's tools, the map behind it is inert: nothing under
|
|
595
|
+
* the sheet takes focus or a press. A shorter sheet leaves the map above it in use.
|
|
596
|
+
*/
|
|
597
|
+
private coverMap;
|
|
519
598
|
/**
|
|
520
599
|
* Hold the open Layers popover within the explorer's visible box: the part of it inside the
|
|
521
600
|
* window. It opens down from its button, or up from it in the compact form, and is as tall as the
|