@emuanalytics/flow-rdf-core 4.0.4 → 4.0.5
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 +1 -64
- package/dist/index.d.mts +36 -31
- package/dist/index.d.ts +36 -31
- package/dist/index.mjs +20 -3249
- package/dist/lib/context/context-registry.mjs +63 -0
- package/dist/lib/context/debugger.mjs +240 -0
- package/dist/lib/context/flow-context.mjs +61 -0
- package/dist/lib/context/global-state.mjs +70 -0
- package/dist/lib/context/map-registry.mjs +59 -0
- package/dist/lib/context/query-registry.mjs +53 -0
- package/dist/lib/errors/flow-error.mjs +10 -0
- package/dist/lib/errors/flow-expression-error.mjs +14 -0
- package/dist/lib/errors/flow-map-error.mjs +9 -0
- package/dist/lib/expressions/expression-parser.mjs +198 -0
- package/dist/lib/expressions/functions/from-palette.mjs +75 -0
- package/dist/lib/expressions/functions/regex.mjs +25 -0
- package/dist/lib/expressions/functions/state.mjs +25 -0
- package/dist/lib/expressions/parser-helpers.mjs +37 -0
- package/dist/lib/expressions/reactive-expression.mjs +253 -0
- package/dist/lib/map/flow-core-map.mjs +749 -0
- package/dist/lib/map/plugins/annotations/annotation-layers.mjs +163 -0
- package/dist/lib/map/plugins/annotations/annotation.events.mjs +27 -0
- package/dist/lib/map/plugins/annotations/annotation.plugin.mjs +498 -0
- package/dist/lib/map/plugins/annotations/maplibre-gl-draw-circle/lib/modes/DirectModeOverride.mjs +67 -0
- package/dist/lib/map/plugins/annotations/maplibre-gl-draw-circle/lib/modes/DragCircleMode.mjs +65 -0
- package/dist/lib/map/plugins/annotations/maplibre-gl-draw-circle/lib/utils/create_supplementary_points_circle.mjs +15 -0
- package/dist/lib/map/plugins/annotations/maplibre-gl-draw-circle/lib/utils/drag_pan.mjs +20 -0
- package/dist/lib/map/plugins/data-join.plugin.mjs +173 -0
- package/dist/lib/map/plugins/export/export.plugin.mjs +21 -0
- package/dist/lib/map/plugins/export/map-exporter.mjs +177 -0
- package/dist/lib/map/plugins/hover-effect.plugin.mjs +58 -0
- package/dist/lib/map/plugins/index.d.mts +37 -72
- package/dist/lib/map/plugins/index.d.ts +37 -72
- package/dist/lib/map/plugins/index.mjs +11 -1810
- package/dist/lib/map/plugins/keyboard-shortcut-manager.mjs +120 -0
- package/dist/lib/map/plugins/map-plugin-base.mjs +25 -0
- package/dist/lib/map/plugins/plugin-manager.mjs +135 -0
- package/dist/lib/map/plugins/popup.plugin.mjs +55 -0
- package/dist/lib/map/plugins/selection/selection.events.mjs +21 -0
- package/dist/lib/map/plugins/selection/selection.plugin.mjs +136 -0
- package/dist/lib/map/plugins/selection/source-selection.mjs +156 -0
- package/dist/lib/map/plugins/url-sync.plugin.mjs +55 -0
- package/dist/lib/map/support/image-registry.mjs +82 -0
- package/dist/lib/map/support/map-events.mjs +71 -0
- package/dist/lib/map/support/map-feature-stream.mjs +158 -0
- package/dist/lib/map/support/map-popup.mjs +159 -0
- package/dist/lib/map/types.mjs +7 -0
- package/dist/lib/map-style/map-data-source.mjs +192 -0
- package/dist/lib/map-style/map-layer-style-builder-generated.mjs +1307 -0
- package/dist/lib/map-style/map-layer-style-builder.mjs +86 -0
- package/dist/lib/map-style/map-layer.mjs +223 -0
- package/dist/lib/map-style/map-style.mjs +178 -0
- package/dist/lib/queries/async-committer.mjs +30 -0
- package/dist/lib/queries/query.mjs +172 -0
- package/dist/lib/state-store/decorators.mjs +83 -0
- package/dist/lib/state-store/state-store.mjs +534 -0
- package/dist/lib/state-store/utils.mjs +7 -0
- package/dist/lib/utils/announce.mjs +12 -0
- package/dist/lib/utils/assert.mjs +12 -0
- package/dist/{shared/flow-rdf-core.187cb345.mjs → lib/utils/debounce.mjs} +3 -39
- package/dist/lib/utils/decorators.mjs +59 -0
- package/dist/lib/utils/deferred.mjs +11 -0
- package/dist/lib/utils/ensure-array.mjs +16 -0
- package/dist/{shared/flow-rdf-core.1f0901c5.mjs → lib/utils/feature-type-checks.mjs} +2 -2
- package/dist/lib/utils/functional.mjs +22 -0
- package/dist/lib/utils/global.mjs +18 -0
- package/dist/lib/utils/index.mjs +8 -5
- package/dist/lib/utils/random-id.mjs +9 -0
- package/dist/lib/utils/string-utils.mjs +3 -0
- package/dist/lib/utils/throttle.mjs +20 -0
- package/dist/{shared/flow-rdf-core.25e5f6d7.mjs → lib/utils/type-checks.mjs} +1 -26
- package/dist/lib/utils/watchable-promise.mjs +55 -0
- package/dist/package.json.mjs +3 -0
- package/dist/shared/{flow-rdf-core.4dde996e.d.cts → flow-rdf-core.8b5acf14.d.mts} +1315 -172
- package/dist/shared/{flow-rdf-core.4dde996e.d.ts → flow-rdf-core.8b5acf14.d.ts} +1315 -172
- package/package.json +4 -8
- package/dist/index.cjs +0 -3316
- package/dist/index.d.cts +0 -90
- package/dist/lib/map/plugins/index.cjs +0 -1850
- package/dist/lib/map/plugins/index.d.cts +0 -345
- package/dist/lib/utils/index.cjs +0 -48
- package/dist/lib/utils/index.d.cts +0 -160
- package/dist/shared/flow-rdf-core.06e85a6c.cjs +0 -1394
- package/dist/shared/flow-rdf-core.4dde996e.d.mts +0 -1916
- package/dist/shared/flow-rdf-core.55c169ca.cjs +0 -150
- package/dist/shared/flow-rdf-core.63162669.d.cts +0 -10
- package/dist/shared/flow-rdf-core.65045caf.mjs +0 -1360
- package/dist/shared/flow-rdf-core.a82b9be4.cjs +0 -34
- package/dist/shared/flow-rdf-core.f50908f0.cjs +0 -102
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a3 as MapEvent, a0 as FlowCoreMap, Y as MapSourceIdentifier, av as MapFeatureId, aw as MapPluginBase, ax as PluginManager, a5 as MapSourceEvent, a4 as MapMouseEvent, Z as MapFeatureStream, ay as PartialBy, T as MapAnimationOptions, a7 as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, a9 as MapPopupOptions, aa as MapPopup, W as MapFeatureIdentifier } from '../../../shared/flow-rdf-core.8b5acf14.mjs';
|
|
2
|
+
export { aC as EventHandlers, aB as PluginConstructor, aA as PluginEventsType, az as PluginOptionsType } from '../../../shared/flow-rdf-core.8b5acf14.mjs';
|
|
3
3
|
import { F as Func } from '../../../shared/flow-rdf-core.63162669.mjs';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import 'eventemitter3';
|
|
5
|
+
import 'lit-html';
|
|
6
6
|
import '@emuanalytics/flow-engine-client';
|
|
7
7
|
import 'mobx-utils';
|
|
8
8
|
import '@emuanalytics/maplibre-gl';
|
|
@@ -195,6 +195,12 @@ declare class DataJoin {
|
|
|
195
195
|
private doDataJoin;
|
|
196
196
|
private loadData;
|
|
197
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* dfsffd
|
|
200
|
+
*
|
|
201
|
+
* @noInheritDoc
|
|
202
|
+
*
|
|
203
|
+
*/
|
|
198
204
|
declare class DataJoinPlugin extends MapPluginBase {
|
|
199
205
|
private _joins;
|
|
200
206
|
readonly name = "DataJoinPlugin";
|
|
@@ -242,6 +248,33 @@ declare class ExportPlugin extends MapPluginBase<ExportPluginOptions> {
|
|
|
242
248
|
exportMap(options: FlowMapExportOptions): Promise<string>;
|
|
243
249
|
}
|
|
244
250
|
|
|
251
|
+
/**
|
|
252
|
+
* This plugin supports adding hover styling to map features.
|
|
253
|
+
*
|
|
254
|
+
* When active, features that are hovered over will have their `hover`
|
|
255
|
+
* feature state property set to `true`. This can be referenced in map layer
|
|
256
|
+
* style expressions to apply hover effects.
|
|
257
|
+
*
|
|
258
|
+
* The plugin exposes no additional API methods or properties.
|
|
259
|
+
*
|
|
260
|
+
* @noInheritDoc
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* This map layer definition applies a hover effect using the `circleStrokeWidth` property:
|
|
264
|
+
```js{7}
|
|
265
|
+
const circleLayer = new MapLayer({
|
|
266
|
+
id: "circle-layer",
|
|
267
|
+
type: "circle",
|
|
268
|
+
source: "airquality",
|
|
269
|
+
style: layerStyle("circle")
|
|
270
|
+
.circleColor(expr(`@no2 ? from-palette('YlOrRd', @no2, 0, 100) : gray`))
|
|
271
|
+
.circleStrokeWidth(expr("@@hover ? 5 : 0"))
|
|
272
|
+
.circleRadius(expr(`@no2 ? @no2 / 5 : 5`))
|
|
273
|
+
.build()
|
|
274
|
+
});
|
|
275
|
+
```
|
|
276
|
+
*
|
|
277
|
+
*/
|
|
245
278
|
declare class HoverEffectPlugin extends MapPluginBase {
|
|
246
279
|
private hoveredFeature;
|
|
247
280
|
readonly name = "HoverEffectPlugin";
|
|
@@ -253,74 +286,6 @@ declare class HoverEffectPlugin extends MapPluginBase {
|
|
|
253
286
|
private clearHover;
|
|
254
287
|
}
|
|
255
288
|
|
|
256
|
-
type MapPopupTemplateFn<TState extends StateStore = StateStore> = (feature: MapFeature | null, state: TState) => string | Node | lit.TemplateResult;
|
|
257
|
-
interface MapPopupEvents {
|
|
258
|
-
closed: (popup: MapPopup) => void;
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* [[MapPopup]] options.
|
|
262
|
-
*/
|
|
263
|
-
interface MapPopupOptions {
|
|
264
|
-
/** Specify a CSS class to add to the popup. */
|
|
265
|
-
class?: string;
|
|
266
|
-
/** Enable 'close' button. */
|
|
267
|
-
closeButton?: boolean;
|
|
268
|
-
/** Enable closing popup on click on map. */
|
|
269
|
-
closeOnClick?: boolean;
|
|
270
|
-
/** Enable closing pop when map is moved. */
|
|
271
|
-
closeOnMove?: boolean;
|
|
272
|
-
/** Specify popup content as HTML string or HTML node. */
|
|
273
|
-
content: string | Node | MapPopupTemplateFn;
|
|
274
|
-
/** Maximum width of popup in CSS units. */
|
|
275
|
-
maxWidth?: string;
|
|
276
|
-
trackFeature?: boolean;
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Core functionality for Flo.w map popups.
|
|
280
|
-
*
|
|
281
|
-
* @noInheritDoc
|
|
282
|
-
*/
|
|
283
|
-
declare class MapPopup extends EventEmitter<MapPopupEvents> {
|
|
284
|
-
readonly map: FlowCoreMap;
|
|
285
|
-
readonly options: MapPopupOptions;
|
|
286
|
-
private _feature?;
|
|
287
|
-
private _contentContainer;
|
|
288
|
-
private _featureStream;
|
|
289
|
-
private _maplibrePopup;
|
|
290
|
-
private _featureStreamDisposer?;
|
|
291
|
-
/**
|
|
292
|
-
* Constructs a new `MapPopup` instance.
|
|
293
|
-
*
|
|
294
|
-
* This is called by the `FlowMap::openPopup` method.
|
|
295
|
-
*
|
|
296
|
-
* @param map Parent Flo.w map.
|
|
297
|
-
* @param options Popup options.
|
|
298
|
-
*/
|
|
299
|
-
constructor(map: FlowCoreMap, options: MapPopupOptions);
|
|
300
|
-
get feature(): MapFeatureIdentifier | undefined;
|
|
301
|
-
/**
|
|
302
|
-
* Close the popup.
|
|
303
|
-
*/
|
|
304
|
-
close(): void;
|
|
305
|
-
/**
|
|
306
|
-
* Move the popup to a new location.
|
|
307
|
-
*
|
|
308
|
-
* @param lngLat New location.
|
|
309
|
-
*/
|
|
310
|
-
moveTo(lngLat: [number, number]): void;
|
|
311
|
-
/**
|
|
312
|
-
* Open the popup at the specified location.
|
|
313
|
-
*
|
|
314
|
-
* @param lngLat Popup location.
|
|
315
|
-
*/
|
|
316
|
-
open(event: MapMouseEvent): void;
|
|
317
|
-
open(lngLat: [number, number], feature?: MapFeatureIdentifier): void;
|
|
318
|
-
private cssClasses;
|
|
319
|
-
private handleFeatureUpdate;
|
|
320
|
-
private popupCloseHandler;
|
|
321
|
-
private renderContent;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
289
|
declare class PopupPlugin extends MapPluginBase {
|
|
325
290
|
private _popupTemplates;
|
|
326
291
|
private _popups;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a3 as MapEvent, a0 as FlowCoreMap, Y as MapSourceIdentifier, av as MapFeatureId, aw as MapPluginBase, ax as PluginManager, a5 as MapSourceEvent, a4 as MapMouseEvent, Z as MapFeatureStream, ay as PartialBy, T as MapAnimationOptions, a7 as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, a9 as MapPopupOptions, aa as MapPopup, W as MapFeatureIdentifier } from '../../../shared/flow-rdf-core.8b5acf14.js';
|
|
2
|
+
export { aC as EventHandlers, aB as PluginConstructor, aA as PluginEventsType, az as PluginOptionsType } from '../../../shared/flow-rdf-core.8b5acf14.js';
|
|
3
3
|
import { F as Func } from '../../../shared/flow-rdf-core.63162669.js';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import 'eventemitter3';
|
|
5
|
+
import 'lit-html';
|
|
6
6
|
import '@emuanalytics/flow-engine-client';
|
|
7
7
|
import 'mobx-utils';
|
|
8
8
|
import '@emuanalytics/maplibre-gl';
|
|
@@ -195,6 +195,12 @@ declare class DataJoin {
|
|
|
195
195
|
private doDataJoin;
|
|
196
196
|
private loadData;
|
|
197
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* dfsffd
|
|
200
|
+
*
|
|
201
|
+
* @noInheritDoc
|
|
202
|
+
*
|
|
203
|
+
*/
|
|
198
204
|
declare class DataJoinPlugin extends MapPluginBase {
|
|
199
205
|
private _joins;
|
|
200
206
|
readonly name = "DataJoinPlugin";
|
|
@@ -242,6 +248,33 @@ declare class ExportPlugin extends MapPluginBase<ExportPluginOptions> {
|
|
|
242
248
|
exportMap(options: FlowMapExportOptions): Promise<string>;
|
|
243
249
|
}
|
|
244
250
|
|
|
251
|
+
/**
|
|
252
|
+
* This plugin supports adding hover styling to map features.
|
|
253
|
+
*
|
|
254
|
+
* When active, features that are hovered over will have their `hover`
|
|
255
|
+
* feature state property set to `true`. This can be referenced in map layer
|
|
256
|
+
* style expressions to apply hover effects.
|
|
257
|
+
*
|
|
258
|
+
* The plugin exposes no additional API methods or properties.
|
|
259
|
+
*
|
|
260
|
+
* @noInheritDoc
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* This map layer definition applies a hover effect using the `circleStrokeWidth` property:
|
|
264
|
+
```js{7}
|
|
265
|
+
const circleLayer = new MapLayer({
|
|
266
|
+
id: "circle-layer",
|
|
267
|
+
type: "circle",
|
|
268
|
+
source: "airquality",
|
|
269
|
+
style: layerStyle("circle")
|
|
270
|
+
.circleColor(expr(`@no2 ? from-palette('YlOrRd', @no2, 0, 100) : gray`))
|
|
271
|
+
.circleStrokeWidth(expr("@@hover ? 5 : 0"))
|
|
272
|
+
.circleRadius(expr(`@no2 ? @no2 / 5 : 5`))
|
|
273
|
+
.build()
|
|
274
|
+
});
|
|
275
|
+
```
|
|
276
|
+
*
|
|
277
|
+
*/
|
|
245
278
|
declare class HoverEffectPlugin extends MapPluginBase {
|
|
246
279
|
private hoveredFeature;
|
|
247
280
|
readonly name = "HoverEffectPlugin";
|
|
@@ -253,74 +286,6 @@ declare class HoverEffectPlugin extends MapPluginBase {
|
|
|
253
286
|
private clearHover;
|
|
254
287
|
}
|
|
255
288
|
|
|
256
|
-
type MapPopupTemplateFn<TState extends StateStore = StateStore> = (feature: MapFeature | null, state: TState) => string | Node | lit.TemplateResult;
|
|
257
|
-
interface MapPopupEvents {
|
|
258
|
-
closed: (popup: MapPopup) => void;
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* [[MapPopup]] options.
|
|
262
|
-
*/
|
|
263
|
-
interface MapPopupOptions {
|
|
264
|
-
/** Specify a CSS class to add to the popup. */
|
|
265
|
-
class?: string;
|
|
266
|
-
/** Enable 'close' button. */
|
|
267
|
-
closeButton?: boolean;
|
|
268
|
-
/** Enable closing popup on click on map. */
|
|
269
|
-
closeOnClick?: boolean;
|
|
270
|
-
/** Enable closing pop when map is moved. */
|
|
271
|
-
closeOnMove?: boolean;
|
|
272
|
-
/** Specify popup content as HTML string or HTML node. */
|
|
273
|
-
content: string | Node | MapPopupTemplateFn;
|
|
274
|
-
/** Maximum width of popup in CSS units. */
|
|
275
|
-
maxWidth?: string;
|
|
276
|
-
trackFeature?: boolean;
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Core functionality for Flo.w map popups.
|
|
280
|
-
*
|
|
281
|
-
* @noInheritDoc
|
|
282
|
-
*/
|
|
283
|
-
declare class MapPopup extends EventEmitter<MapPopupEvents> {
|
|
284
|
-
readonly map: FlowCoreMap;
|
|
285
|
-
readonly options: MapPopupOptions;
|
|
286
|
-
private _feature?;
|
|
287
|
-
private _contentContainer;
|
|
288
|
-
private _featureStream;
|
|
289
|
-
private _maplibrePopup;
|
|
290
|
-
private _featureStreamDisposer?;
|
|
291
|
-
/**
|
|
292
|
-
* Constructs a new `MapPopup` instance.
|
|
293
|
-
*
|
|
294
|
-
* This is called by the `FlowMap::openPopup` method.
|
|
295
|
-
*
|
|
296
|
-
* @param map Parent Flo.w map.
|
|
297
|
-
* @param options Popup options.
|
|
298
|
-
*/
|
|
299
|
-
constructor(map: FlowCoreMap, options: MapPopupOptions);
|
|
300
|
-
get feature(): MapFeatureIdentifier | undefined;
|
|
301
|
-
/**
|
|
302
|
-
* Close the popup.
|
|
303
|
-
*/
|
|
304
|
-
close(): void;
|
|
305
|
-
/**
|
|
306
|
-
* Move the popup to a new location.
|
|
307
|
-
*
|
|
308
|
-
* @param lngLat New location.
|
|
309
|
-
*/
|
|
310
|
-
moveTo(lngLat: [number, number]): void;
|
|
311
|
-
/**
|
|
312
|
-
* Open the popup at the specified location.
|
|
313
|
-
*
|
|
314
|
-
* @param lngLat Popup location.
|
|
315
|
-
*/
|
|
316
|
-
open(event: MapMouseEvent): void;
|
|
317
|
-
open(lngLat: [number, number], feature?: MapFeatureIdentifier): void;
|
|
318
|
-
private cssClasses;
|
|
319
|
-
private handleFeatureUpdate;
|
|
320
|
-
private popupCloseHandler;
|
|
321
|
-
private renderContent;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
289
|
declare class PopupPlugin extends MapPluginBase {
|
|
325
290
|
private _popupTemplates;
|
|
326
291
|
private _popups;
|