@mosaicajs/components 0.1.0-rc.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifact-card.d.ts +20 -26
- package/dist/artifact-card.js +20 -26
- package/dist/base.d.ts +21 -29
- package/dist/base.js +18 -26
- package/dist/basemap.d.ts +2 -2
- package/dist/cluster-filter.d.ts +19 -25
- package/dist/cluster-filter.js +19 -25
- package/dist/colour-editor.d.ts +16 -36
- package/dist/colour-editor.js +16 -36
- package/dist/context.d.ts +4 -4
- package/dist/context.js +4 -4
- package/dist/count.d.ts +16 -15
- package/dist/count.js +16 -15
- package/dist/events.d.ts +63 -68
- package/dist/explorer.d.ts +76 -119
- package/dist/explorer.js +76 -121
- package/dist/field-card.d.ts +24 -56
- package/dist/field-card.js +24 -56
- package/dist/filter-panel.d.ts +31 -45
- package/dist/filter-panel.js +31 -45
- package/dist/filter.d.ts +20 -28
- package/dist/filter.js +20 -28
- package/dist/hierarchy.d.ts +35 -36
- package/dist/hierarchy.js +35 -36
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -4
- package/dist/item-card.d.ts +34 -55
- package/dist/item-card.js +34 -55
- package/dist/key-picker.d.ts +5 -5
- package/dist/key-picker.js +5 -5
- package/dist/layer-picker.d.ts +11 -9
- package/dist/layer-picker.js +11 -9
- package/dist/map.d.ts +134 -172
- package/dist/map.js +136 -188
- package/dist/mosaica-components.js +5599 -1594
- package/dist/mosaica-components.js.LICENSE.txt +80 -16
- package/dist/mosaica-components.js.sri +1 -1
- package/dist/mosaica-components.json +2 -2
- package/dist/parts.d.ts +3 -4
- package/dist/parts.js +3 -4
- package/dist/selection.d.ts +21 -27
- package/dist/selection.js +21 -27
- package/dist/states.d.ts +15 -20
- package/dist/status.d.ts +26 -38
- package/dist/status.js +26 -38
- package/dist/store-element.d.ts +8 -7
- package/dist/store-element.js +8 -7
- package/dist/tokens.d.ts +12 -13
- package/dist/tokens.js +12 -13
- package/dist/view-picker.d.ts +10 -6
- package/dist/view-picker.js +10 -6
- package/package.json +6 -6
package/dist/artifact-card.d.ts
CHANGED
|
@@ -3,48 +3,45 @@ import { type ArtifactDetail, type Refusal } from '@mosaicajs/client';
|
|
|
3
3
|
import { MosaicaElement } from './base.js';
|
|
4
4
|
import './count.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* they differ for an artifact whose members are spread across the map. Fit is absent on a filter
|
|
11
|
-
* layer, which draws nothing. Pressing a parent or child opens it.
|
|
6
|
+
* Use the artifact card to show an artifact the viewer has opened on the map, such as a cluster. An
|
|
7
|
+
* artifact is a named group of items in an annotation layer. The card's count covers every member
|
|
8
|
+
* the viewer may see, so it does not change as the map moves. Pressing one of the artifact's
|
|
9
|
+
* parents or children opens that one instead.
|
|
12
10
|
*
|
|
13
|
-
*
|
|
11
|
+
* The card reads the store's opened artifact, or the `artifact` you set.
|
|
14
12
|
*
|
|
15
|
-
* The
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
13
|
+
* The card's buttons filter or highlight the map by the artifact's members wherever they are, or
|
|
14
|
+
* filter to everything outside it. Fit to cluster fires `mosaica-artifactfit`, and
|
|
15
|
+
* `<mosaica-explorer>` responds by fitting its map to the artifact. A filter layer draws nothing,
|
|
16
|
+
* so its artifacts have no Fit button.
|
|
19
17
|
*
|
|
20
|
-
* @summary
|
|
18
|
+
* @summary A card showing an artifact's details, parents and children.
|
|
21
19
|
* @tagname mosaica-artifact-card
|
|
22
20
|
* @category Elements
|
|
23
21
|
* @slot actions - Buttons beside the close button, such as the explorer's Pin.
|
|
24
22
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-artifactfit']>} mosaica-artifactfit - Fit to
|
|
25
23
|
* cluster was pressed. `<mosaica-explorer>` fits its map to the artifact.
|
|
26
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clausechange']>} mosaica-clausechange - A
|
|
27
|
-
* button
|
|
24
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clausechange']>} mosaica-clausechange - A filter
|
|
25
|
+
* or highlight button added or removed a `member_of` clause.
|
|
28
26
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-close']>} mosaica-close - The close button was
|
|
29
27
|
* pressed, with `what` set to `artifact`.
|
|
30
|
-
* @csspart title - The heading
|
|
31
|
-
* the card shows an artifact or a refusal.
|
|
28
|
+
* @csspart title - The heading, with the level's or layer's title and the close button.
|
|
32
29
|
* @csspart close - The close button.
|
|
33
30
|
* @csspart state - The state line, with `data-state`.
|
|
34
31
|
* @csspart refusal - The words "Not available", with `data-code` set to the refusal's code.
|
|
35
|
-
* @csspart reason - The server's reason for the refusal,
|
|
36
|
-
* @csspart headline - The artifact's name, with `data-unnamed`
|
|
37
|
-
* @csspart count - The
|
|
32
|
+
* @csspart reason - The server's reason for the refusal, under "Not available".
|
|
33
|
+
* @csspart headline - The artifact's name, with `data-unnamed` if it has none.
|
|
34
|
+
* @csspart count - The count of items the viewer may see.
|
|
38
35
|
* @csspart content - The artifact's description, or its attached topic.
|
|
39
36
|
* @csspart value - The layer and the key.
|
|
40
|
-
* @csspart shape -
|
|
37
|
+
* @csspart shape - How the layer's shapes are made, with `data-kind` (`derived`, `predicate` or
|
|
41
38
|
* `authored`).
|
|
42
39
|
* @csspart label - The headings above the parents and the children.
|
|
43
40
|
* @csspart parents - The list of parents.
|
|
44
41
|
* @csspart parent - One parent, with `data-id`.
|
|
45
42
|
* @csspart children - The list of children in this view.
|
|
46
43
|
* @csspart child - One child, with `data-id`.
|
|
47
|
-
* @csspart name - A parent's or
|
|
44
|
+
* @csspart name - A parent's or child's name, with `data-unnamed` if it has none.
|
|
48
45
|
* @csspart fit - The Fit to cluster button.
|
|
49
46
|
* @csspart verbs - The clause buttons.
|
|
50
47
|
* @csspart filter - The Filter to this button, with `aria-pressed` while its clause is on.
|
|
@@ -53,15 +50,12 @@ import './count.js';
|
|
|
53
50
|
*/
|
|
54
51
|
export declare class MosaicaArtifactCard extends MosaicaElement {
|
|
55
52
|
static styles: import("lit").CSSResult[];
|
|
56
|
-
/**
|
|
57
|
-
* The artifact to show, for a host that fetches the drill-down itself. Set with `refusal` or
|
|
58
|
-
* alone, it replaces the store's opened artifact.
|
|
59
|
-
*/
|
|
53
|
+
/** The artifact to show, if you fetch its details yourself. It replaces the store's opened artifact. */
|
|
60
54
|
accessor artifact: {
|
|
61
55
|
id: bigint;
|
|
62
56
|
detail: ArtifactDetail;
|
|
63
57
|
} | null;
|
|
64
|
-
/** A refusal to show
|
|
58
|
+
/** A refusal to show instead of an artifact, if you fetch its details yourself. */
|
|
65
59
|
accessor refusal: Refusal | null;
|
|
66
60
|
private get shown();
|
|
67
61
|
/**
|
package/dist/artifact-card.js
CHANGED
|
@@ -57,48 +57,45 @@ const SHAPE_TEXT = {
|
|
|
57
57
|
authored: 'The same for everyone'
|
|
58
58
|
};
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* they differ for an artifact whose members are spread across the map. Fit is absent on a filter
|
|
65
|
-
* layer, which draws nothing. Pressing a parent or child opens it.
|
|
60
|
+
* Use the artifact card to show an artifact the viewer has opened on the map, such as a cluster. An
|
|
61
|
+
* artifact is a named group of items in an annotation layer. The card's count covers every member
|
|
62
|
+
* the viewer may see, so it does not change as the map moves. Pressing one of the artifact's
|
|
63
|
+
* parents or children opens that one instead.
|
|
66
64
|
*
|
|
67
|
-
*
|
|
65
|
+
* The card reads the store's opened artifact, or the `artifact` you set.
|
|
68
66
|
*
|
|
69
|
-
* The
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
67
|
+
* The card's buttons filter or highlight the map by the artifact's members wherever they are, or
|
|
68
|
+
* filter to everything outside it. Fit to cluster fires `mosaica-artifactfit`, and
|
|
69
|
+
* `<mosaica-explorer>` responds by fitting its map to the artifact. A filter layer draws nothing,
|
|
70
|
+
* so its artifacts have no Fit button.
|
|
73
71
|
*
|
|
74
|
-
* @summary
|
|
72
|
+
* @summary A card showing an artifact's details, parents and children.
|
|
75
73
|
* @tagname mosaica-artifact-card
|
|
76
74
|
* @category Elements
|
|
77
75
|
* @slot actions - Buttons beside the close button, such as the explorer's Pin.
|
|
78
76
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-artifactfit']>} mosaica-artifactfit - Fit to
|
|
79
77
|
* cluster was pressed. `<mosaica-explorer>` fits its map to the artifact.
|
|
80
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clausechange']>} mosaica-clausechange - A
|
|
81
|
-
* button
|
|
78
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clausechange']>} mosaica-clausechange - A filter
|
|
79
|
+
* or highlight button added or removed a `member_of` clause.
|
|
82
80
|
* @fires {CustomEvent<MosaicaEventDetails['mosaica-close']>} mosaica-close - The close button was
|
|
83
81
|
* pressed, with `what` set to `artifact`.
|
|
84
|
-
* @csspart title - The heading
|
|
85
|
-
* the card shows an artifact or a refusal.
|
|
82
|
+
* @csspart title - The heading, with the level's or layer's title and the close button.
|
|
86
83
|
* @csspart close - The close button.
|
|
87
84
|
* @csspart state - The state line, with `data-state`.
|
|
88
85
|
* @csspart refusal - The words "Not available", with `data-code` set to the refusal's code.
|
|
89
|
-
* @csspart reason - The server's reason for the refusal,
|
|
90
|
-
* @csspart headline - The artifact's name, with `data-unnamed`
|
|
91
|
-
* @csspart count - The
|
|
86
|
+
* @csspart reason - The server's reason for the refusal, under "Not available".
|
|
87
|
+
* @csspart headline - The artifact's name, with `data-unnamed` if it has none.
|
|
88
|
+
* @csspart count - The count of items the viewer may see.
|
|
92
89
|
* @csspart content - The artifact's description, or its attached topic.
|
|
93
90
|
* @csspart value - The layer and the key.
|
|
94
|
-
* @csspart shape -
|
|
91
|
+
* @csspart shape - How the layer's shapes are made, with `data-kind` (`derived`, `predicate` or
|
|
95
92
|
* `authored`).
|
|
96
93
|
* @csspart label - The headings above the parents and the children.
|
|
97
94
|
* @csspart parents - The list of parents.
|
|
98
95
|
* @csspart parent - One parent, with `data-id`.
|
|
99
96
|
* @csspart children - The list of children in this view.
|
|
100
97
|
* @csspart child - One child, with `data-id`.
|
|
101
|
-
* @csspart name - A parent's or
|
|
98
|
+
* @csspart name - A parent's or child's name, with `data-unnamed` if it has none.
|
|
102
99
|
* @csspart fit - The Fit to cluster button.
|
|
103
100
|
* @csspart verbs - The clause buttons.
|
|
104
101
|
* @csspart filter - The Filter to this button, with `aria-pressed` while its clause is on.
|
|
@@ -214,14 +211,11 @@ let MosaicaArtifactCard = (() => {
|
|
|
214
211
|
`
|
|
215
212
|
];
|
|
216
213
|
#artifact_accessor_storage = __runInitializers(this, _artifact_initializers, null);
|
|
217
|
-
/**
|
|
218
|
-
* The artifact to show, for a host that fetches the drill-down itself. Set with `refusal` or
|
|
219
|
-
* alone, it replaces the store's opened artifact.
|
|
220
|
-
*/
|
|
214
|
+
/** The artifact to show, if you fetch its details yourself. It replaces the store's opened artifact. */
|
|
221
215
|
get artifact() { return this.#artifact_accessor_storage; }
|
|
222
216
|
set artifact(value) { this.#artifact_accessor_storage = value; }
|
|
223
217
|
#refusal_accessor_storage = (__runInitializers(this, _artifact_extraInitializers), __runInitializers(this, _refusal_initializers, null));
|
|
224
|
-
/** A refusal to show
|
|
218
|
+
/** A refusal to show instead of an artifact, if you fetch its details yourself. */
|
|
225
219
|
get refusal() { return this.#refusal_accessor_storage; }
|
|
226
220
|
set refusal(value) { this.#refusal_accessor_storage = value; }
|
|
227
221
|
get shown() {
|
package/dist/base.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { LitElement, type PropertyValues } from 'lit';
|
|
|
2
2
|
import { type SelectionShape, type Store, type TokenSupplier } from '@mosaicajs/client';
|
|
3
3
|
import type { SelectionShapeDetail, MosaicaEventDetails } from './events.js';
|
|
4
4
|
/**
|
|
5
|
-
* Where an element's store came from: its `store` property, a
|
|
6
|
-
* `<mosaica-explorer>` above it
|
|
7
|
-
* `
|
|
5
|
+
* Where an element's store came from: `property` is its `store` property, `context` a
|
|
6
|
+
* `<mosaica-store>` or `<mosaica-explorer>` above it, and `own` a store it built from `viewer-url`,
|
|
7
|
+
* `token` or `authorise`. `detached` means it has none and shows its detached state.
|
|
8
8
|
*/
|
|
9
9
|
export type StoreSource = 'property' | 'context' | 'own' | 'detached';
|
|
10
10
|
/**
|
|
@@ -23,39 +23,32 @@ export type StoreSource = 'property' | 'context' | 'own' | 'detached';
|
|
|
23
23
|
* refetch the view. An own store lives until `dispose()` or until its attributes change.
|
|
24
24
|
*/
|
|
25
25
|
export declare abstract class MosaicaElement extends LitElement {
|
|
26
|
-
/**
|
|
27
|
-
* The store to read, which outranks a store from context and the element's own. The element does
|
|
28
|
-
* not dispose a store it was given.
|
|
29
|
-
*/
|
|
26
|
+
/** The store to use, ahead of one from context or one the element would build. The element never disposes it. */
|
|
30
27
|
accessor store: Store | null;
|
|
31
28
|
/**
|
|
32
|
-
* The viewer
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* `https://maps.example.org` and a path on the page's own server such as `/mosaica` both work.
|
|
36
|
-
* Unset, requests go to `/v1/...` on the page's own origin. Changing it builds a new store. With
|
|
37
|
-
* no `token`, a store built before `authorise` is set asks once with no token, and is replaced
|
|
38
|
-
* when `authorise` arrives.
|
|
29
|
+
* The base URL of the Mosaica viewer server, for the store the element builds: a full URL such as
|
|
30
|
+
* `https://maps.example.org`, or a path such as `/mosaica`. Unset, the page's own origin. Read only
|
|
31
|
+
* by the map, the explorer and `<mosaica-store>`. Changing it builds a new store.
|
|
39
32
|
*/
|
|
40
33
|
accessor viewerUrl: string;
|
|
41
34
|
/**
|
|
42
|
-
* A viewer token for the store the element builds
|
|
43
|
-
*
|
|
44
|
-
*
|
|
35
|
+
* A viewer token for the store the element builds. Without `token` or `authorise`, only an open
|
|
36
|
+
* server (`serve.open`) answers. Read only by the map, the explorer and `<mosaica-store>`.
|
|
37
|
+
* Changing it builds a new store.
|
|
45
38
|
*/
|
|
46
39
|
accessor token: string;
|
|
47
40
|
/**
|
|
48
|
-
* A token
|
|
49
|
-
* expires.
|
|
50
|
-
*
|
|
41
|
+
* A function that returns a viewer token, used instead of `token` and called again before the
|
|
42
|
+
* token expires. A different function builds a new store, so keep it stable across renders. Set
|
|
43
|
+
* it together with `viewer-url`: a store built from `viewer-url` alone first sends a request with
|
|
44
|
+
* no token, and is replaced when `authorise` arrives.
|
|
51
45
|
*/
|
|
52
46
|
accessor authorise: TokenSupplier | null;
|
|
53
47
|
/**
|
|
54
|
-
* The most artifacts one level of a
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* Changing it builds a new store.
|
|
48
|
+
* The most artifacts one level of a layer shows per map tile, for the store the element builds.
|
|
49
|
+
* Unset, 50, or the server's `selection.max_artifacts_per_tile` if lower. A value above that
|
|
50
|
+
* maximum is refused. Read only by the map, the explorer and `<mosaica-store>`. Changing it
|
|
51
|
+
* builds a new store.
|
|
59
52
|
*/
|
|
60
53
|
accessor artifactsPerTile: number | null;
|
|
61
54
|
/** Whether this element builds its own store from attributes when nothing else supplies one. */
|
|
@@ -70,7 +63,7 @@ export declare abstract class MosaicaElement extends LitElement {
|
|
|
70
63
|
private metaHeld;
|
|
71
64
|
private consumer;
|
|
72
65
|
private unsubscribe;
|
|
73
|
-
/** The store this element
|
|
66
|
+
/** The store this element is using, or `null` if it has none. */
|
|
74
67
|
get activeStore(): Store | null;
|
|
75
68
|
/** Where `activeStore` came from. */
|
|
76
69
|
get source(): StoreSource;
|
|
@@ -100,9 +93,8 @@ export declare abstract class MosaicaElement extends LitElement {
|
|
|
100
93
|
/** Every projection change lands here; the default asks for a render. */
|
|
101
94
|
protected onStoreChange(): void;
|
|
102
95
|
/**
|
|
103
|
-
* Dispose of the store this element built
|
|
104
|
-
*
|
|
105
|
-
* left for its owner to dispose.
|
|
96
|
+
* Dispose of the store this element built. Removing the element from the page does not, so call
|
|
97
|
+
* this when you are done with the element. A store you passed in is left to you.
|
|
106
98
|
*/
|
|
107
99
|
dispose(): void;
|
|
108
100
|
}
|
package/dist/base.js
CHANGED
|
@@ -85,47 +85,40 @@ let MosaicaElement = (() => {
|
|
|
85
85
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
86
86
|
}
|
|
87
87
|
#store_accessor_storage = __runInitializers(this, _store_initializers, null);
|
|
88
|
-
/**
|
|
89
|
-
* The store to read, which outranks a store from context and the element's own. The element does
|
|
90
|
-
* not dispose a store it was given.
|
|
91
|
-
*/
|
|
88
|
+
/** The store to use, ahead of one from context or one the element would build. The element never disposes it. */
|
|
92
89
|
get store() { return this.#store_accessor_storage; }
|
|
93
90
|
set store(value) { this.#store_accessor_storage = value; }
|
|
94
91
|
#viewerUrl_accessor_storage = (__runInitializers(this, _store_extraInitializers), __runInitializers(this, _viewerUrl_initializers, ''));
|
|
95
92
|
/**
|
|
96
|
-
* The viewer
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* `https://maps.example.org` and a path on the page's own server such as `/mosaica` both work.
|
|
100
|
-
* Unset, requests go to `/v1/...` on the page's own origin. Changing it builds a new store. With
|
|
101
|
-
* no `token`, a store built before `authorise` is set asks once with no token, and is replaced
|
|
102
|
-
* when `authorise` arrives.
|
|
93
|
+
* The base URL of the Mosaica viewer server, for the store the element builds: a full URL such as
|
|
94
|
+
* `https://maps.example.org`, or a path such as `/mosaica`. Unset, the page's own origin. Read only
|
|
95
|
+
* by the map, the explorer and `<mosaica-store>`. Changing it builds a new store.
|
|
103
96
|
*/
|
|
104
97
|
get viewerUrl() { return this.#viewerUrl_accessor_storage; }
|
|
105
98
|
set viewerUrl(value) { this.#viewerUrl_accessor_storage = value; }
|
|
106
99
|
#token_accessor_storage = (__runInitializers(this, _viewerUrl_extraInitializers), __runInitializers(this, _token_initializers, ''));
|
|
107
100
|
/**
|
|
108
|
-
* A viewer token for the store the element builds
|
|
109
|
-
*
|
|
110
|
-
*
|
|
101
|
+
* A viewer token for the store the element builds. Without `token` or `authorise`, only an open
|
|
102
|
+
* server (`serve.open`) answers. Read only by the map, the explorer and `<mosaica-store>`.
|
|
103
|
+
* Changing it builds a new store.
|
|
111
104
|
*/
|
|
112
105
|
get token() { return this.#token_accessor_storage; }
|
|
113
106
|
set token(value) { this.#token_accessor_storage = value; }
|
|
114
107
|
#authorise_accessor_storage = (__runInitializers(this, _token_extraInitializers), __runInitializers(this, _authorise_initializers, null));
|
|
115
108
|
/**
|
|
116
|
-
* A token
|
|
117
|
-
* expires.
|
|
118
|
-
*
|
|
109
|
+
* A function that returns a viewer token, used instead of `token` and called again before the
|
|
110
|
+
* token expires. A different function builds a new store, so keep it stable across renders. Set
|
|
111
|
+
* it together with `viewer-url`: a store built from `viewer-url` alone first sends a request with
|
|
112
|
+
* no token, and is replaced when `authorise` arrives.
|
|
119
113
|
*/
|
|
120
114
|
get authorise() { return this.#authorise_accessor_storage; }
|
|
121
115
|
set authorise(value) { this.#authorise_accessor_storage = value; }
|
|
122
116
|
#artifactsPerTile_accessor_storage = (__runInitializers(this, _authorise_extraInitializers), __runInitializers(this, _artifactsPerTile_initializers, null));
|
|
123
117
|
/**
|
|
124
|
-
* The most artifacts one level of a
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* Changing it builds a new store.
|
|
118
|
+
* The most artifacts one level of a layer shows per map tile, for the store the element builds.
|
|
119
|
+
* Unset, 50, or the server's `selection.max_artifacts_per_tile` if lower. A value above that
|
|
120
|
+
* maximum is refused. Read only by the map, the explorer and `<mosaica-store>`. Changing it
|
|
121
|
+
* builds a new store.
|
|
129
122
|
*/
|
|
130
123
|
get artifactsPerTile() { return this.#artifactsPerTile_accessor_storage; }
|
|
131
124
|
set artifactsPerTile(value) { this.#artifactsPerTile_accessor_storage = value; }
|
|
@@ -141,7 +134,7 @@ let MosaicaElement = (() => {
|
|
|
141
134
|
metaHeld = false;
|
|
142
135
|
consumer = null;
|
|
143
136
|
unsubscribe = null;
|
|
144
|
-
/** The store this element
|
|
137
|
+
/** The store this element is using, or `null` if it has none. */
|
|
145
138
|
get activeStore() {
|
|
146
139
|
return this.resolvedStore;
|
|
147
140
|
}
|
|
@@ -285,9 +278,8 @@ let MosaicaElement = (() => {
|
|
|
285
278
|
this.requestUpdate();
|
|
286
279
|
}
|
|
287
280
|
/**
|
|
288
|
-
* Dispose of the store this element built
|
|
289
|
-
*
|
|
290
|
-
* left for its owner to dispose.
|
|
281
|
+
* Dispose of the store this element built. Removing the element from the page does not, so call
|
|
282
|
+
* this when you are done with the element. A store you passed in is left to you.
|
|
291
283
|
*/
|
|
292
284
|
dispose() {
|
|
293
285
|
const own = this.ownStore;
|
package/dist/basemap.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { Layer } from '@deck.gl/core';
|
|
|
2
2
|
import type { Store } from '@mosaicajs/client';
|
|
3
3
|
import { type BasemapValue, type DensityCamera } from '@mosaicajs/deck';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* view
|
|
5
|
+
* The value of `<mosaica-map>`'s `basemap`: one {@link BasemapValue} for every view, an object
|
|
6
|
+
* mapping view ids to one each, or a deck.gl layer you built, which is drawn as it is.
|
|
7
7
|
*/
|
|
8
8
|
export type BasemapChoice = BasemapValue | Readonly<Record<string, BasemapValue>> | Layer;
|
|
9
9
|
/**
|
package/dist/cluster-filter.d.ts
CHANGED
|
@@ -8,48 +8,42 @@ type Offer = {
|
|
|
8
8
|
beyond: boolean;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Use `<mosaica-cluster-filter>` when you want to search a layer's clusters without the field card
|
|
12
|
+
* around it. Set `layer` to a layer `meta.layers` lists.
|
|
13
13
|
*
|
|
14
|
-
* With the box empty, the list offers the layer's top-level clusters
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* names of its nearest parents in grey, cut from the left so the nearest stay. On a levelled layer
|
|
18
|
-
* the path names only parents the list has already met. Each row's count is exact, from the
|
|
19
|
-
* aggregate route (`Store.setAggregate`) over the rows listed, one grouping per level on a layer
|
|
20
|
-
* with several, under the store's filters without this layer's own filter clauses, so a cluster
|
|
21
|
-
* its clauses exclude is still counted. A row shows no count until the answer lands. The list opens
|
|
22
|
-
* over what sits below the box, in the top layer.
|
|
14
|
+
* With the box empty, the list offers the layer's top-level clusters, largest first. Typing
|
|
15
|
+
* searches the cluster names at every level. In the list, the arrow keys move between rows, Enter
|
|
16
|
+
* chooses one, and Escape closes the list.
|
|
23
17
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
18
|
+
* Each row counts the items the filters match in that cluster without applying this layer's own
|
|
19
|
+
* filter, so a cluster the viewer has filtered out still shows its count. Choosing a row filters
|
|
20
|
+
* the map to the cluster's members, and choosing it again removes that filter.
|
|
27
21
|
*
|
|
28
|
-
* @summary A
|
|
22
|
+
* @summary A search box that filters the map by a layer's clusters.
|
|
29
23
|
* @tagname mosaica-cluster-filter
|
|
30
24
|
* @category Elements
|
|
31
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clausechange']>} mosaica-clausechange -
|
|
32
|
-
* a `member_of` clause
|
|
25
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clausechange']>} mosaica-clausechange - Choosing a
|
|
26
|
+
* row added or removed a `member_of` clause.
|
|
33
27
|
* @csspart entry - The search box.
|
|
34
28
|
* @csspart values - The list, while it is open.
|
|
35
29
|
* @csspart option - One cluster in the list, with `data-id` and `aria-selected` while its clause is
|
|
36
30
|
* on.
|
|
37
|
-
* @csspart name - A row's name, with `data-unnamed`
|
|
31
|
+
* @csspart name - A row's name, with `data-unnamed` if the cluster has none.
|
|
38
32
|
* @csspart path - A row's path of parents' names.
|
|
39
33
|
* @csspart value-count - A row's exact count.
|
|
40
|
-
* @csspart more - The note under the box
|
|
41
|
-
* @csspart refusal - The words "Clusters unavailable", with `data-code`,
|
|
34
|
+
* @csspart more - The note under the box when nothing matches, or when more match than are listed.
|
|
35
|
+
* @csspart refusal - The words "Clusters unavailable", with `data-code`, if the list was refused.
|
|
42
36
|
*/
|
|
43
37
|
export declare class MosaicaClusterFilter extends MosaicaElement {
|
|
44
38
|
static styles: import("lit").CSSResult[];
|
|
45
|
-
/** The layer whose clusters are offered, a name `meta.layers` lists. Unset or unknown, the
|
|
39
|
+
/** The layer whose clusters are offered, a name `meta.layers` lists. Unset or unknown, the box shows nothing. */
|
|
46
40
|
accessor layer: string;
|
|
47
|
-
/**
|
|
41
|
+
/** Placeholder text for the box, in place of the default. */
|
|
48
42
|
accessor placeholder: string;
|
|
49
43
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
44
|
+
* Turns the box into a cluster picker. Choosing a row calls this with the cluster's `mosaica_id`
|
|
45
|
+
* (as a decimal string), its name, its parents' names as the list shows them, and its level
|
|
46
|
+
* (`rung`), then empties the box. No filter changes.
|
|
53
47
|
*/
|
|
54
48
|
accessor choose: ((cluster: {
|
|
55
49
|
id: string;
|
package/dist/cluster-filter.js
CHANGED
|
@@ -57,37 +57,31 @@ function pathText(path, beyond, n) {
|
|
|
57
57
|
/** How many parents a match's path is walked up, nearest first. */
|
|
58
58
|
const PATH_DEPTH = 3;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
60
|
+
* Use `<mosaica-cluster-filter>` when you want to search a layer's clusters without the field card
|
|
61
|
+
* around it. Set `layer` to a layer `meta.layers` lists.
|
|
62
62
|
*
|
|
63
|
-
* With the box empty, the list offers the layer's top-level clusters
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* names of its nearest parents in grey, cut from the left so the nearest stay. On a levelled layer
|
|
67
|
-
* the path names only parents the list has already met. Each row's count is exact, from the
|
|
68
|
-
* aggregate route (`Store.setAggregate`) over the rows listed, one grouping per level on a layer
|
|
69
|
-
* with several, under the store's filters without this layer's own filter clauses, so a cluster
|
|
70
|
-
* its clauses exclude is still counted. A row shows no count until the answer lands. The list opens
|
|
71
|
-
* over what sits below the box, in the top layer.
|
|
63
|
+
* With the box empty, the list offers the layer's top-level clusters, largest first. Typing
|
|
64
|
+
* searches the cluster names at every level. In the list, the arrow keys move between rows, Enter
|
|
65
|
+
* chooses one, and Escape closes the list.
|
|
72
66
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
67
|
+
* Each row counts the items the filters match in that cluster without applying this layer's own
|
|
68
|
+
* filter, so a cluster the viewer has filtered out still shows its count. Choosing a row filters
|
|
69
|
+
* the map to the cluster's members, and choosing it again removes that filter.
|
|
76
70
|
*
|
|
77
|
-
* @summary A
|
|
71
|
+
* @summary A search box that filters the map by a layer's clusters.
|
|
78
72
|
* @tagname mosaica-cluster-filter
|
|
79
73
|
* @category Elements
|
|
80
|
-
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clausechange']>} mosaica-clausechange -
|
|
81
|
-
* a `member_of` clause
|
|
74
|
+
* @fires {CustomEvent<MosaicaEventDetails['mosaica-clausechange']>} mosaica-clausechange - Choosing a
|
|
75
|
+
* row added or removed a `member_of` clause.
|
|
82
76
|
* @csspart entry - The search box.
|
|
83
77
|
* @csspart values - The list, while it is open.
|
|
84
78
|
* @csspart option - One cluster in the list, with `data-id` and `aria-selected` while its clause is
|
|
85
79
|
* on.
|
|
86
|
-
* @csspart name - A row's name, with `data-unnamed`
|
|
80
|
+
* @csspart name - A row's name, with `data-unnamed` if the cluster has none.
|
|
87
81
|
* @csspart path - A row's path of parents' names.
|
|
88
82
|
* @csspart value-count - A row's exact count.
|
|
89
|
-
* @csspart more - The note under the box
|
|
90
|
-
* @csspart refusal - The words "Clusters unavailable", with `data-code`,
|
|
83
|
+
* @csspart more - The note under the box when nothing matches, or when more match than are listed.
|
|
84
|
+
* @csspart refusal - The words "Clusters unavailable", with `data-code`, if the list was refused.
|
|
91
85
|
*/
|
|
92
86
|
let MosaicaClusterFilter = (() => {
|
|
93
87
|
let _classSuper = MosaicaElement;
|
|
@@ -225,18 +219,18 @@ let MosaicaClusterFilter = (() => {
|
|
|
225
219
|
`
|
|
226
220
|
];
|
|
227
221
|
#layer_accessor_storage = __runInitializers(this, _layer_initializers, '');
|
|
228
|
-
/** The layer whose clusters are offered, a name `meta.layers` lists. Unset or unknown, the
|
|
222
|
+
/** The layer whose clusters are offered, a name `meta.layers` lists. Unset or unknown, the box shows nothing. */
|
|
229
223
|
get layer() { return this.#layer_accessor_storage; }
|
|
230
224
|
set layer(value) { this.#layer_accessor_storage = value; }
|
|
231
225
|
#placeholder_accessor_storage = (__runInitializers(this, _layer_extraInitializers), __runInitializers(this, _placeholder_initializers, ''));
|
|
232
|
-
/**
|
|
226
|
+
/** Placeholder text for the box, in place of the default. */
|
|
233
227
|
get placeholder() { return this.#placeholder_accessor_storage; }
|
|
234
228
|
set placeholder(value) { this.#placeholder_accessor_storage = value; }
|
|
235
229
|
#choose_accessor_storage = (__runInitializers(this, _placeholder_extraInitializers), __runInitializers(this, _choose_initializers, null));
|
|
236
230
|
/**
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
231
|
+
* Turns the box into a cluster picker. Choosing a row calls this with the cluster's `mosaica_id`
|
|
232
|
+
* (as a decimal string), its name, its parents' names as the list shows them, and its level
|
|
233
|
+
* (`rung`), then empties the box. No filter changes.
|
|
240
234
|
*/
|
|
241
235
|
get choose() { return this.#choose_accessor_storage; }
|
|
242
236
|
set choose(value) { this.#choose_accessor_storage = value; }
|