@emuanalytics/flow-rdf-core 0.0.22 → 0.0.23
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/index.cjs +10 -6
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +11 -7
- package/dist/lib/map/plugins/index.cjs +4 -4
- package/dist/lib/map/plugins/index.d.cts +2 -2
- package/dist/lib/map/plugins/index.d.mts +2 -2
- package/dist/lib/map/plugins/index.d.ts +2 -2
- package/dist/lib/map/plugins/index.mjs +7 -7
- package/dist/shared/{flow-rdf-core.90aa4382.d.cts → flow-rdf-core.25dff7db.d.cts} +2 -1
- package/dist/shared/{flow-rdf-core.90aa4382.d.mts → flow-rdf-core.25dff7db.d.mts} +2 -1
- package/dist/shared/{flow-rdf-core.90aa4382.d.ts → flow-rdf-core.25dff7db.d.ts} +2 -1
- package/dist/shared/{flow-rdf-core.33c3a1eb.mjs → flow-rdf-core.9f1d67b5.mjs} +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5,8 +5,8 @@ const Debug = require('debug');
|
|
|
5
5
|
const flowEngineClient = require('@emuanalytics/flow-engine-client');
|
|
6
6
|
const stringUtils = require('./shared/flow-rdf-core.3042be4a.cjs');
|
|
7
7
|
const mapFeatureStream = require('./shared/flow-rdf-core.585aa641.cjs');
|
|
8
|
-
const EventEmitter = require('eventemitter3');
|
|
9
8
|
const maplibre = require('@emuanalytics/maplibre-gl');
|
|
9
|
+
const EventEmitter = require('eventemitter3');
|
|
10
10
|
const mobxUtils = require('mobx-utils');
|
|
11
11
|
const functional = require('./shared/flow-rdf-core.c44cf082.cjs');
|
|
12
12
|
require('@emuanalytics/maplibre-gl-style-spec');
|
|
@@ -30,10 +30,10 @@ function _interopNamespaceCompat(e) {
|
|
|
30
30
|
|
|
31
31
|
const mobx__namespace = /*#__PURE__*/_interopNamespaceCompat(mobx);
|
|
32
32
|
const Debug__default = /*#__PURE__*/_interopDefaultCompat(Debug);
|
|
33
|
-
const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
|
|
34
33
|
const maplibre__default = /*#__PURE__*/_interopDefaultCompat(maplibre);
|
|
34
|
+
const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
|
|
35
35
|
|
|
36
|
-
const version = "0.0.
|
|
36
|
+
const version = "0.0.23";
|
|
37
37
|
|
|
38
38
|
const CONSOLE_HIGHLIGHT_STYLE$1 = `
|
|
39
39
|
padding: 2px 4px;
|
|
@@ -608,7 +608,7 @@ class MapLayerStyleBuilder {
|
|
|
608
608
|
this._styles.set(property, this.formatValue(value));
|
|
609
609
|
}
|
|
610
610
|
formatValue(value) {
|
|
611
|
-
if (value
|
|
611
|
+
if (isStyleExpression(value)) {
|
|
612
612
|
return value.toString();
|
|
613
613
|
} else if (stringUtils.isString(value)) {
|
|
614
614
|
return `'${value.toString()}'`;
|
|
@@ -627,11 +627,15 @@ __publicField$7(MapLayerStyleBuilder, "_styleBuilders", /* @__PURE__ */ new Map(
|
|
|
627
627
|
class StyleExpression {
|
|
628
628
|
constructor(_expr) {
|
|
629
629
|
this._expr = _expr;
|
|
630
|
+
__publicField$7(this, "__styleExpression", "styleexpression");
|
|
630
631
|
}
|
|
631
632
|
toString() {
|
|
632
633
|
return this._expr;
|
|
633
634
|
}
|
|
634
635
|
}
|
|
636
|
+
function isStyleExpression(val) {
|
|
637
|
+
return val && val.__styleExpression;
|
|
638
|
+
}
|
|
635
639
|
function expr(expr2) {
|
|
636
640
|
return new StyleExpression(expr2);
|
|
637
641
|
}
|
|
@@ -2264,12 +2268,12 @@ const _FlowMap = class _FlowMap extends EventEmitter__default {
|
|
|
2264
2268
|
return this._style.styleSpecification;
|
|
2265
2269
|
}
|
|
2266
2270
|
addLayer(layerOrOptions) {
|
|
2267
|
-
const layer = layerOrOptions
|
|
2271
|
+
const layer = stringUtils.isPlainObject(layerOrOptions) ? new mapFeatureStream.MapLayer(layerOrOptions) : layerOrOptions;
|
|
2268
2272
|
this._style.addLayer(layer);
|
|
2269
2273
|
return layer;
|
|
2270
2274
|
}
|
|
2271
2275
|
addSource(sourceOrOptions) {
|
|
2272
|
-
const source = sourceOrOptions
|
|
2276
|
+
const source = stringUtils.isPlainObject(sourceOrOptions) ? new mapFeatureStream.MapDataSource(sourceOrOptions) : sourceOrOptions;
|
|
2273
2277
|
this.emitEvent(new mapFeatureStream.MapSourceEvent("beforeSourceAdded", this, source.id));
|
|
2274
2278
|
source.setFlowEndpoint({
|
|
2275
2279
|
host: this.context.flowClient.baseUrl,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.
|
|
2
|
-
export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, P as Path, G as PathValue, Q as Query, R as ReactiveExpression, I as StoreAnnotations, H as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, E as traceReaction } from './shared/flow-rdf-core.
|
|
1
|
+
import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.25dff7db.cjs';
|
|
2
|
+
export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, P as Path, G as PathValue, Q as Query, R as ReactiveExpression, I as StoreAnnotations, H as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, E as traceReaction } from './shared/flow-rdf-core.25dff7db.cjs';
|
|
3
3
|
export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
|
|
4
4
|
import '@emuanalytics/flow-engine-client';
|
|
5
|
-
import 'eventemitter3';
|
|
6
5
|
import '@emuanalytics/maplibre-gl';
|
|
6
|
+
import 'eventemitter3';
|
|
7
7
|
|
|
8
8
|
interface SyncAnnotation<T = any> extends Annotation {
|
|
9
9
|
serialize(val: T): string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.
|
|
2
|
-
export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, P as Path, G as PathValue, Q as Query, R as ReactiveExpression, I as StoreAnnotations, H as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, E as traceReaction } from './shared/flow-rdf-core.
|
|
1
|
+
import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.25dff7db.mjs';
|
|
2
|
+
export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, P as Path, G as PathValue, Q as Query, R as ReactiveExpression, I as StoreAnnotations, H as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, E as traceReaction } from './shared/flow-rdf-core.25dff7db.mjs';
|
|
3
3
|
export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
|
|
4
4
|
import '@emuanalytics/flow-engine-client';
|
|
5
|
-
import 'eventemitter3';
|
|
6
5
|
import '@emuanalytics/maplibre-gl';
|
|
6
|
+
import 'eventemitter3';
|
|
7
7
|
|
|
8
8
|
interface SyncAnnotation<T = any> extends Annotation {
|
|
9
9
|
serialize(val: T): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.
|
|
2
|
-
export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, P as Path, G as PathValue, Q as Query, R as ReactiveExpression, I as StoreAnnotations, H as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, E as traceReaction } from './shared/flow-rdf-core.
|
|
1
|
+
import { A as Annotation, S as StateStore, F as FlowContextOptions, a as FlowContext, M as MapStyleSpecification, b as MapDataSource, c as MapLayer } from './shared/flow-rdf-core.25dff7db.js';
|
|
2
|
+
export { D as DEFAULT_CONTEXT_ID, d as FlowEngineEndpoint, y as FlowMap, r as MapAnimationOptions, s as MapCenterOptions, o as MapDataSourceOptions, p as MapDataSourceSpecification, n as MapDataSourceType, t as MapFeature, u as MapFeatureIdentifier, q as MapGeojsonData, j as MapLayerExpression, i as MapLayerOptions, m as MapLayerPropertyMetadataIndex, k as MapLayerSpecification, f as MapLayerStyleBuilder, e as MapLayerType, x as MapOptions, v as MapPaddingOptions, w as MapSourceIdentifier, P as Path, G as PathValue, Q as Query, R as ReactiveExpression, I as StoreAnnotations, H as StoreConstructor, g as StyleExpression, h as expr, l as layerStyle, z as query, B as queryMany, C as queryOne, E as traceReaction } from './shared/flow-rdf-core.25dff7db.js';
|
|
3
3
|
export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
|
|
4
4
|
import '@emuanalytics/flow-engine-client';
|
|
5
|
-
import 'eventemitter3';
|
|
6
5
|
import '@emuanalytics/maplibre-gl';
|
|
6
|
+
import 'eventemitter3';
|
|
7
7
|
|
|
8
8
|
interface SyncAnnotation<T = any> extends Annotation {
|
|
9
9
|
serialize(val: T): string;
|
package/dist/index.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import * as mobx from 'mobx';
|
|
|
2
2
|
import { isObservable, isComputed, isObservableArray, isObservableSet, isObservableMap, makeObservable, observable as observable$1, computed as computed$1, action, runInAction, onBecomeObserved, onBecomeUnobserved, reaction, trace, configure } from 'mobx';
|
|
3
3
|
import Debug from 'debug';
|
|
4
4
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
5
|
-
import { i as isUndefined, f as isString, o as isNumber, s as isBoolean, j as isArray, b as isNil, d as isDefined, g as isStringFull, z as isURL, e as ensureArray } from './shared/flow-rdf-core.b80085b4.mjs';
|
|
6
|
-
import { R as ReactiveExpression, F as FlowError,
|
|
7
|
-
import EventEmitter from 'eventemitter3';
|
|
5
|
+
import { i as isUndefined, f as isString, o as isNumber, s as isBoolean, j as isArray, b as isNil, y as isPlainObject, d as isDefined, g as isStringFull, z as isURL, e as ensureArray } from './shared/flow-rdf-core.b80085b4.mjs';
|
|
6
|
+
import { R as ReactiveExpression, F as FlowError, f as MapStyleChangeEvent, r as randomId, P as PluginManager, e as MapLayer, d as MapDataSource, g as MapSourceEvent, M as MapEvent, c as FlowMapError, b as MapFeatureStream, a as assert, h as MapLoadingEvent, i as MapMouseEvent, j as die } from './shared/flow-rdf-core.9f1d67b5.mjs';
|
|
8
7
|
import maplibre from '@emuanalytics/maplibre-gl';
|
|
8
|
+
import EventEmitter from 'eventemitter3';
|
|
9
9
|
import { toStream } from 'mobx-utils';
|
|
10
10
|
import { t as throttle, a as debounceWithArgs } from './shared/flow-rdf-core.2e456f93.mjs';
|
|
11
11
|
import '@emuanalytics/maplibre-gl-style-spec';
|
|
@@ -13,7 +13,7 @@ import 'parsimmon';
|
|
|
13
13
|
import 'colorbrewer';
|
|
14
14
|
import 'nanoid';
|
|
15
15
|
|
|
16
|
-
const version = "0.0.
|
|
16
|
+
const version = "0.0.23";
|
|
17
17
|
|
|
18
18
|
const CONSOLE_HIGHLIGHT_STYLE$1 = `
|
|
19
19
|
padding: 2px 4px;
|
|
@@ -588,7 +588,7 @@ class MapLayerStyleBuilder {
|
|
|
588
588
|
this._styles.set(property, this.formatValue(value));
|
|
589
589
|
}
|
|
590
590
|
formatValue(value) {
|
|
591
|
-
if (value
|
|
591
|
+
if (isStyleExpression(value)) {
|
|
592
592
|
return value.toString();
|
|
593
593
|
} else if (isString(value)) {
|
|
594
594
|
return `'${value.toString()}'`;
|
|
@@ -607,11 +607,15 @@ __publicField$7(MapLayerStyleBuilder, "_styleBuilders", /* @__PURE__ */ new Map(
|
|
|
607
607
|
class StyleExpression {
|
|
608
608
|
constructor(_expr) {
|
|
609
609
|
this._expr = _expr;
|
|
610
|
+
__publicField$7(this, "__styleExpression", "styleexpression");
|
|
610
611
|
}
|
|
611
612
|
toString() {
|
|
612
613
|
return this._expr;
|
|
613
614
|
}
|
|
614
615
|
}
|
|
616
|
+
function isStyleExpression(val) {
|
|
617
|
+
return val && val.__styleExpression;
|
|
618
|
+
}
|
|
615
619
|
function expr(expr2) {
|
|
616
620
|
return new StyleExpression(expr2);
|
|
617
621
|
}
|
|
@@ -2244,12 +2248,12 @@ const _FlowMap = class _FlowMap extends EventEmitter {
|
|
|
2244
2248
|
return this._style.styleSpecification;
|
|
2245
2249
|
}
|
|
2246
2250
|
addLayer(layerOrOptions) {
|
|
2247
|
-
const layer = layerOrOptions
|
|
2251
|
+
const layer = isPlainObject(layerOrOptions) ? new MapLayer(layerOrOptions) : layerOrOptions;
|
|
2248
2252
|
this._style.addLayer(layer);
|
|
2249
2253
|
return layer;
|
|
2250
2254
|
}
|
|
2251
2255
|
addSource(sourceOrOptions) {
|
|
2252
|
-
const source = sourceOrOptions
|
|
2256
|
+
const source = isPlainObject(sourceOrOptions) ? new MapDataSource(sourceOrOptions) : sourceOrOptions;
|
|
2253
2257
|
this.emitEvent(new MapSourceEvent("beforeSourceAdded", this, source.id));
|
|
2254
2258
|
source.setFlowEndpoint({
|
|
2255
2259
|
host: this.context.flowClient.baseUrl,
|
|
@@ -162,7 +162,7 @@ class MapPopup extends EventEmitter__default {
|
|
|
162
162
|
if (this._maplibrePopup) {
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
if (eventOrLngLat
|
|
165
|
+
if (!stringUtils.isArray(eventOrLngLat)) {
|
|
166
166
|
if (isFeatureWithId(eventOrLngLat.features[0])) {
|
|
167
167
|
feature = eventOrLngLat.features[0];
|
|
168
168
|
}
|
|
@@ -277,10 +277,10 @@ class PopupPlugin extends MapPluginBase {
|
|
|
277
277
|
popup.once("closed", () => {
|
|
278
278
|
this._popups.delete(popup);
|
|
279
279
|
});
|
|
280
|
-
if (eventOrLngLat
|
|
281
|
-
popup.open(eventOrLngLat);
|
|
282
|
-
} else {
|
|
280
|
+
if (stringUtils.isArray(eventOrLngLat)) {
|
|
283
281
|
popup.open(eventOrLngLat, feature);
|
|
282
|
+
} else {
|
|
283
|
+
popup.open(eventOrLngLat);
|
|
284
284
|
}
|
|
285
285
|
return popup;
|
|
286
286
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.
|
|
2
|
-
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.
|
|
1
|
+
import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.25dff7db.cjs';
|
|
2
|
+
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.25dff7db.cjs';
|
|
3
3
|
import { F as Func } from '../../../shared/flow-rdf-core.08975378.cjs';
|
|
4
4
|
import EventEmitter from 'eventemitter3';
|
|
5
5
|
import * as lit from 'lit-html';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.
|
|
2
|
-
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.
|
|
1
|
+
import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.25dff7db.mjs';
|
|
2
|
+
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.25dff7db.mjs';
|
|
3
3
|
import { F as Func } from '../../../shared/flow-rdf-core.08975378.mjs';
|
|
4
4
|
import EventEmitter from 'eventemitter3';
|
|
5
5
|
import * as lit from 'lit-html';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.
|
|
2
|
-
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.
|
|
1
|
+
import { J as MapEvent, y as FlowMap, w as MapSourceIdentifier, K as MapFeatureId, L as MapPluginBase, N as PluginManager, O as MapSourceEvent, T as MapMouseEvent, U as MapFeatureStream, V as PartialBy, r as MapAnimationOptions, W as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, u as MapFeatureIdentifier, t as MapFeature } from '../../../shared/flow-rdf-core.25dff7db.js';
|
|
2
|
+
export { _ as EventHandlers, Z as PluginConstructor, Y as PluginEventsType, X as PluginOptionsType } from '../../../shared/flow-rdf-core.25dff7db.js';
|
|
3
3
|
import { F as Func } from '../../../shared/flow-rdf-core.08975378.js';
|
|
4
4
|
import EventEmitter from 'eventemitter3';
|
|
5
5
|
import * as lit from 'lit-html';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MapEvent, a as
|
|
2
|
-
export { P as PluginManager } from '../../../shared/flow-rdf-core.
|
|
1
|
+
import { M as MapEvent, a as assert, b as MapFeatureStream, F as FlowError, c as FlowMapError, d as MapDataSource, e as MapLayer, r as randomId, R as ReactiveExpression } from '../../../shared/flow-rdf-core.9f1d67b5.mjs';
|
|
2
|
+
export { P as PluginManager } from '../../../shared/flow-rdf-core.9f1d67b5.mjs';
|
|
3
3
|
import MapboxDraw from '@emuanalytics/mapbox-gl-draw';
|
|
4
4
|
import turfArea from '@turf/area';
|
|
5
5
|
import turfBBox from '@turf/bbox';
|
|
@@ -9,7 +9,7 @@ import turfLength from '@turf/length';
|
|
|
9
9
|
import Debug from 'debug';
|
|
10
10
|
import { c as isPolygon, i as isLineString, b as isPoint } from '../../../shared/flow-rdf-core.bd95d618.mjs';
|
|
11
11
|
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
12
|
-
import { d as isDefined, g as isStringFull, x as isFunction, f as isString, e as ensureArray, o as isNumber, z as isURL, k as isArrayFull, b as isNil, a as isNull, m as isObject } from '../../../shared/flow-rdf-core.b80085b4.mjs';
|
|
12
|
+
import { d as isDefined, j as isArray, g as isStringFull, x as isFunction, f as isString, e as ensureArray, o as isNumber, z as isURL, k as isArrayFull, b as isNil, a as isNull, m as isObject } from '../../../shared/flow-rdf-core.b80085b4.mjs';
|
|
13
13
|
import * as lit from 'lit-html';
|
|
14
14
|
import maplibre from '@emuanalytics/maplibre-gl';
|
|
15
15
|
import turfCircle from '@turf/circle';
|
|
@@ -134,7 +134,7 @@ class MapPopup extends EventEmitter$1 {
|
|
|
134
134
|
if (this._maplibrePopup) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
if (eventOrLngLat
|
|
137
|
+
if (!isArray(eventOrLngLat)) {
|
|
138
138
|
if (isFeatureWithId(eventOrLngLat.features[0])) {
|
|
139
139
|
feature = eventOrLngLat.features[0];
|
|
140
140
|
}
|
|
@@ -249,10 +249,10 @@ class PopupPlugin extends MapPluginBase {
|
|
|
249
249
|
popup.once("closed", () => {
|
|
250
250
|
this._popups.delete(popup);
|
|
251
251
|
});
|
|
252
|
-
if (eventOrLngLat
|
|
253
|
-
popup.open(eventOrLngLat);
|
|
254
|
-
} else {
|
|
252
|
+
if (isArray(eventOrLngLat)) {
|
|
255
253
|
popup.open(eventOrLngLat, feature);
|
|
254
|
+
} else {
|
|
255
|
+
popup.open(eventOrLngLat);
|
|
256
256
|
}
|
|
257
257
|
return popup;
|
|
258
258
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
2
2
|
import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
|
|
3
|
-
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
4
3
|
import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
|
|
4
|
+
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
5
5
|
|
|
6
6
|
type Annotation = {
|
|
7
7
|
annotationType: string;
|
|
@@ -176,6 +176,7 @@ declare class MapLayerStyleBuilder {
|
|
|
176
176
|
}
|
|
177
177
|
declare class StyleExpression {
|
|
178
178
|
private _expr;
|
|
179
|
+
__styleExpression: string;
|
|
179
180
|
constructor(_expr: string);
|
|
180
181
|
toString(): string;
|
|
181
182
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
2
2
|
import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
|
|
3
|
-
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
4
3
|
import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
|
|
4
|
+
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
5
5
|
|
|
6
6
|
type Annotation = {
|
|
7
7
|
annotationType: string;
|
|
@@ -176,6 +176,7 @@ declare class MapLayerStyleBuilder {
|
|
|
176
176
|
}
|
|
177
177
|
declare class StyleExpression {
|
|
178
178
|
private _expr;
|
|
179
|
+
__styleExpression: string;
|
|
179
180
|
constructor(_expr: string);
|
|
180
181
|
toString(): string;
|
|
181
182
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
2
2
|
import { IObservableStream, IDisposer, ISubscription } from 'mobx-utils';
|
|
3
|
-
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
4
3
|
import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
|
|
4
|
+
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
5
5
|
|
|
6
6
|
type Annotation = {
|
|
7
7
|
annotationType: string;
|
|
@@ -176,6 +176,7 @@ declare class MapLayerStyleBuilder {
|
|
|
176
176
|
}
|
|
177
177
|
declare class StyleExpression {
|
|
178
178
|
private _expr;
|
|
179
|
+
__styleExpression: string;
|
|
179
180
|
constructor(_expr: string);
|
|
180
181
|
toString(): string;
|
|
181
182
|
}
|
|
@@ -1352,4 +1352,4 @@ class MapFeatureStream {
|
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
1354
|
|
|
1355
|
-
export { FlowError as F, MapEvent as M, PluginManager as P, ReactiveExpression as R,
|
|
1355
|
+
export { FlowError as F, MapEvent as M, PluginManager as P, ReactiveExpression as R, assert as a, MapFeatureStream as b, FlowMapError as c, MapDataSource as d, MapLayer as e, MapStyleChangeEvent as f, MapSourceEvent as g, MapLoadingEvent as h, MapMouseEvent as i, die as j, randomId as r };
|