@emuanalytics/flow-rdf-core 4.0.1 → 4.0.2
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 +29 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +29 -1
- 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/shared/{flow-rdf-core.dd931ace.d.cts → flow-rdf-core.4dde996e.d.cts} +11 -1
- package/dist/shared/{flow-rdf-core.dd931ace.d.mts → flow-rdf-core.4dde996e.d.mts} +11 -1
- package/dist/shared/{flow-rdf-core.dd931ace.d.ts → flow-rdf-core.4dde996e.d.ts} +11 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -35,7 +35,7 @@ const maplibre__default = /*#__PURE__*/_interopDefaultCompat(maplibre);
|
|
|
35
35
|
const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
|
|
36
36
|
const lzString__default = /*#__PURE__*/_interopDefaultCompat(lzString);
|
|
37
37
|
|
|
38
|
-
const version = "4.0.
|
|
38
|
+
const version = "4.0.2";
|
|
39
39
|
|
|
40
40
|
const CONSOLE_HIGHLIGHT_STYLE$1 = `
|
|
41
41
|
padding: 2px 4px;
|
|
@@ -3101,6 +3101,34 @@ class StateStore {
|
|
|
3101
3101
|
this.set(path, val);
|
|
3102
3102
|
return val;
|
|
3103
3103
|
}
|
|
3104
|
+
bindControl(el, statePath, options) {
|
|
3105
|
+
const toState = options?.toState ?? ((v) => v);
|
|
3106
|
+
const fromState = options?.fromState ?? ((v) => v);
|
|
3107
|
+
el.addEventListener("input", () => {
|
|
3108
|
+
this.set(statePath, toState(el.value));
|
|
3109
|
+
});
|
|
3110
|
+
el.addEventListener("flow-ui-change", () => {
|
|
3111
|
+
this.set(statePath, toState(el.value));
|
|
3112
|
+
});
|
|
3113
|
+
return this.toStream(statePath, true).subscribe((value) => {
|
|
3114
|
+
if (value !== el.value) {
|
|
3115
|
+
el.value = fromState(value);
|
|
3116
|
+
}
|
|
3117
|
+
});
|
|
3118
|
+
}
|
|
3119
|
+
bindElementProp(el, prop, statePath, options) {
|
|
3120
|
+
const fromState = options?.fromState ?? ((v) => v);
|
|
3121
|
+
return this.toStream(statePath, true).subscribe((value) => {
|
|
3122
|
+
if (value !== el[prop]) {
|
|
3123
|
+
el[prop] = fromState(value);
|
|
3124
|
+
}
|
|
3125
|
+
});
|
|
3126
|
+
}
|
|
3127
|
+
bindElementAttr(el, attr, statePath) {
|
|
3128
|
+
return this.toStream(statePath, true).subscribe((value) => {
|
|
3129
|
+
el.setAttribute(attr, value);
|
|
3130
|
+
});
|
|
3131
|
+
}
|
|
3104
3132
|
toStream(path, fireImmediately = true) {
|
|
3105
3133
|
this.checkInitialized();
|
|
3106
3134
|
return mobxUtils.toStream(() => this.get(path), fireImmediately);
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, i as FillExtrusionLayerStyleBuilder, g as FillLayerStyleBuilder, K as FlowCoreMap, e as FlowEngineEndpoint, H as HeatmapLayerStyleBuilder, k as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, x as MapAnimationOptions, y as MapCenterOptions, u as MapDataSourceOptions, v as MapDataSourceSpecification, t as MapDataSourceType, z as MapFeature, E as MapFeatureIdentifier, w as MapGeojsonData, q as MapLayerExpression, p as MapLayerOptions, s as MapLayerPropertyMetadataIndex, r as MapLayerSpecification, m as MapLayerStyleBuilder, f as MapLayerType, J as MapOptions, G as MapPaddingOptions, d as MapRegistry, I as MapSourceIdentifier, a3 as Path, a4 as PathValue, N as Query, V as QueryAttribute, _ as QueryDefinition, a0 as QueryDefinitionFn, X as QueryExtraParams, $ as QueryOptions, Y as QueryOrderClause, Q as QueryRegistry, U as QueryResultFormat, a1 as QueryResultTransformFn, Z as QuerySampleOptions, W as QueryWhereClauses, j as RasterLayerStyleBuilder, R as ReactiveExpression, a7 as SerializationFormat, a6 as StoreAnnotations, a5 as StoreConstructor, n as StyleExpression, h as SymbolLayerStyleBuilder, o as expr, l as layerStyle, O as query, P as queryMany, T as queryOne, a2 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.4dde996e.cjs';
|
|
2
|
+
export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, i as FillExtrusionLayerStyleBuilder, g as FillLayerStyleBuilder, K as FlowCoreMap, e as FlowEngineEndpoint, H as HeatmapLayerStyleBuilder, k as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, x as MapAnimationOptions, y as MapCenterOptions, u as MapDataSourceOptions, v as MapDataSourceSpecification, t as MapDataSourceType, z as MapFeature, E as MapFeatureIdentifier, w as MapGeojsonData, q as MapLayerExpression, p as MapLayerOptions, s as MapLayerPropertyMetadataIndex, r as MapLayerSpecification, m as MapLayerStyleBuilder, f as MapLayerType, J as MapOptions, G as MapPaddingOptions, d as MapRegistry, I as MapSourceIdentifier, a3 as Path, a4 as PathValue, N as Query, V as QueryAttribute, _ as QueryDefinition, a0 as QueryDefinitionFn, X as QueryExtraParams, $ as QueryOptions, Y as QueryOrderClause, Q as QueryRegistry, U as QueryResultFormat, a1 as QueryResultTransformFn, Z as QuerySampleOptions, W as QueryWhereClauses, j as RasterLayerStyleBuilder, R as ReactiveExpression, a7 as SerializationFormat, a6 as StoreAnnotations, a5 as StoreConstructor, n as StyleExpression, h as SymbolLayerStyleBuilder, o as expr, l as layerStyle, O as query, P as queryMany, T as queryOne, a2 as traceReaction } from './shared/flow-rdf-core.4dde996e.cjs';
|
|
3
3
|
export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
|
|
4
4
|
export { makeAutoObservable, makeObservable } from 'mobx';
|
|
5
5
|
import '@emuanalytics/flow-engine-client';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, i as FillExtrusionLayerStyleBuilder, g as FillLayerStyleBuilder, K as FlowCoreMap, e as FlowEngineEndpoint, H as HeatmapLayerStyleBuilder, k as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, x as MapAnimationOptions, y as MapCenterOptions, u as MapDataSourceOptions, v as MapDataSourceSpecification, t as MapDataSourceType, z as MapFeature, E as MapFeatureIdentifier, w as MapGeojsonData, q as MapLayerExpression, p as MapLayerOptions, s as MapLayerPropertyMetadataIndex, r as MapLayerSpecification, m as MapLayerStyleBuilder, f as MapLayerType, J as MapOptions, G as MapPaddingOptions, d as MapRegistry, I as MapSourceIdentifier, a3 as Path, a4 as PathValue, N as Query, V as QueryAttribute, _ as QueryDefinition, a0 as QueryDefinitionFn, X as QueryExtraParams, $ as QueryOptions, Y as QueryOrderClause, Q as QueryRegistry, U as QueryResultFormat, a1 as QueryResultTransformFn, Z as QuerySampleOptions, W as QueryWhereClauses, j as RasterLayerStyleBuilder, R as ReactiveExpression, a7 as SerializationFormat, a6 as StoreAnnotations, a5 as StoreConstructor, n as StyleExpression, h as SymbolLayerStyleBuilder, o as expr, l as layerStyle, O as query, P as queryMany, T as queryOne, a2 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.4dde996e.mjs';
|
|
2
|
+
export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, i as FillExtrusionLayerStyleBuilder, g as FillLayerStyleBuilder, K as FlowCoreMap, e as FlowEngineEndpoint, H as HeatmapLayerStyleBuilder, k as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, x as MapAnimationOptions, y as MapCenterOptions, u as MapDataSourceOptions, v as MapDataSourceSpecification, t as MapDataSourceType, z as MapFeature, E as MapFeatureIdentifier, w as MapGeojsonData, q as MapLayerExpression, p as MapLayerOptions, s as MapLayerPropertyMetadataIndex, r as MapLayerSpecification, m as MapLayerStyleBuilder, f as MapLayerType, J as MapOptions, G as MapPaddingOptions, d as MapRegistry, I as MapSourceIdentifier, a3 as Path, a4 as PathValue, N as Query, V as QueryAttribute, _ as QueryDefinition, a0 as QueryDefinitionFn, X as QueryExtraParams, $ as QueryOptions, Y as QueryOrderClause, Q as QueryRegistry, U as QueryResultFormat, a1 as QueryResultTransformFn, Z as QuerySampleOptions, W as QueryWhereClauses, j as RasterLayerStyleBuilder, R as ReactiveExpression, a7 as SerializationFormat, a6 as StoreAnnotations, a5 as StoreConstructor, n as StyleExpression, h as SymbolLayerStyleBuilder, o as expr, l as layerStyle, O as query, P as queryMany, T as queryOne, a2 as traceReaction } from './shared/flow-rdf-core.4dde996e.mjs';
|
|
3
3
|
export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
|
|
4
4
|
export { makeAutoObservable, makeObservable } from 'mobx';
|
|
5
5
|
import '@emuanalytics/flow-engine-client';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, i as FillExtrusionLayerStyleBuilder, g as FillLayerStyleBuilder, K as FlowCoreMap, e as FlowEngineEndpoint, H as HeatmapLayerStyleBuilder, k as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, x as MapAnimationOptions, y as MapCenterOptions, u as MapDataSourceOptions, v as MapDataSourceSpecification, t as MapDataSourceType, z as MapFeature, E as MapFeatureIdentifier, w as MapGeojsonData, q as MapLayerExpression, p as MapLayerOptions, s as MapLayerPropertyMetadataIndex, r as MapLayerSpecification, m as MapLayerStyleBuilder, f as MapLayerType, J as MapOptions, G as MapPaddingOptions, d as MapRegistry, I as MapSourceIdentifier, a3 as Path, a4 as PathValue, N as Query, V as QueryAttribute, _ as QueryDefinition, a0 as QueryDefinitionFn, X as QueryExtraParams, $ as QueryOptions, Y as QueryOrderClause, Q as QueryRegistry, U as QueryResultFormat, a1 as QueryResultTransformFn, Z as QuerySampleOptions, W as QueryWhereClauses, j as RasterLayerStyleBuilder, R as ReactiveExpression, a7 as SerializationFormat, a6 as StoreAnnotations, a5 as StoreConstructor, n as StyleExpression, h as SymbolLayerStyleBuilder, o as expr, l as layerStyle, O as query, P as queryMany, T as queryOne, a2 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.4dde996e.js';
|
|
2
|
+
export { B as BackgroundLayerStyleBuilder, C as CircleLayerStyleBuilder, D as DEFAULT_CONTEXT_ID, i as FillExtrusionLayerStyleBuilder, g as FillLayerStyleBuilder, K as FlowCoreMap, e as FlowEngineEndpoint, H as HeatmapLayerStyleBuilder, k as HillshadeLayerStyleBuilder, L as LineLayerStyleBuilder, x as MapAnimationOptions, y as MapCenterOptions, u as MapDataSourceOptions, v as MapDataSourceSpecification, t as MapDataSourceType, z as MapFeature, E as MapFeatureIdentifier, w as MapGeojsonData, q as MapLayerExpression, p as MapLayerOptions, s as MapLayerPropertyMetadataIndex, r as MapLayerSpecification, m as MapLayerStyleBuilder, f as MapLayerType, J as MapOptions, G as MapPaddingOptions, d as MapRegistry, I as MapSourceIdentifier, a3 as Path, a4 as PathValue, N as Query, V as QueryAttribute, _ as QueryDefinition, a0 as QueryDefinitionFn, X as QueryExtraParams, $ as QueryOptions, Y as QueryOrderClause, Q as QueryRegistry, U as QueryResultFormat, a1 as QueryResultTransformFn, Z as QuerySampleOptions, W as QueryWhereClauses, j as RasterLayerStyleBuilder, R as ReactiveExpression, a7 as SerializationFormat, a6 as StoreAnnotations, a5 as StoreConstructor, n as StyleExpression, h as SymbolLayerStyleBuilder, o as expr, l as layerStyle, O as query, P as queryMany, T as queryOne, a2 as traceReaction } from './shared/flow-rdf-core.4dde996e.js';
|
|
3
3
|
export { IDisposer, IObservableStream, ISubscription } from 'mobx-utils';
|
|
4
4
|
export { makeAutoObservable, makeObservable } from 'mobx';
|
|
5
5
|
import '@emuanalytics/flow-engine-client';
|
package/dist/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import lzString from 'lz-string';
|
|
|
15
15
|
import 'parsimmon';
|
|
16
16
|
import 'colorbrewer';
|
|
17
17
|
|
|
18
|
-
const version = "4.0.
|
|
18
|
+
const version = "4.0.2";
|
|
19
19
|
|
|
20
20
|
const CONSOLE_HIGHLIGHT_STYLE$1 = `
|
|
21
21
|
padding: 2px 4px;
|
|
@@ -3081,6 +3081,34 @@ class StateStore {
|
|
|
3081
3081
|
this.set(path, val);
|
|
3082
3082
|
return val;
|
|
3083
3083
|
}
|
|
3084
|
+
bindControl(el, statePath, options) {
|
|
3085
|
+
const toState = options?.toState ?? ((v) => v);
|
|
3086
|
+
const fromState = options?.fromState ?? ((v) => v);
|
|
3087
|
+
el.addEventListener("input", () => {
|
|
3088
|
+
this.set(statePath, toState(el.value));
|
|
3089
|
+
});
|
|
3090
|
+
el.addEventListener("flow-ui-change", () => {
|
|
3091
|
+
this.set(statePath, toState(el.value));
|
|
3092
|
+
});
|
|
3093
|
+
return this.toStream(statePath, true).subscribe((value) => {
|
|
3094
|
+
if (value !== el.value) {
|
|
3095
|
+
el.value = fromState(value);
|
|
3096
|
+
}
|
|
3097
|
+
});
|
|
3098
|
+
}
|
|
3099
|
+
bindElementProp(el, prop, statePath, options) {
|
|
3100
|
+
const fromState = options?.fromState ?? ((v) => v);
|
|
3101
|
+
return this.toStream(statePath, true).subscribe((value) => {
|
|
3102
|
+
if (value !== el[prop]) {
|
|
3103
|
+
el[prop] = fromState(value);
|
|
3104
|
+
}
|
|
3105
|
+
});
|
|
3106
|
+
}
|
|
3107
|
+
bindElementAttr(el, attr, statePath) {
|
|
3108
|
+
return this.toStream(statePath, true).subscribe((value) => {
|
|
3109
|
+
el.setAttribute(attr, value);
|
|
3110
|
+
});
|
|
3111
|
+
}
|
|
3084
3112
|
toStream(path, fireImmediately = true) {
|
|
3085
3113
|
this.checkInitialized();
|
|
3086
3114
|
return toStream(() => this.get(path), fireImmediately);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a8 as MapEvent, K as FlowCoreMap, I as MapSourceIdentifier, a9 as MapFeatureId, aa as MapPluginBase, ab as PluginManager, ac as MapSourceEvent, ad as MapMouseEvent, ae as MapFeatureStream, af as PartialBy, x as MapAnimationOptions, ag as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, E as MapFeatureIdentifier, z as MapFeature } from '../../../shared/flow-rdf-core.
|
|
2
|
-
export { ak as EventHandlers, aj as PluginConstructor, ai as PluginEventsType, ah as PluginOptionsType } from '../../../shared/flow-rdf-core.
|
|
1
|
+
import { a8 as MapEvent, K as FlowCoreMap, I as MapSourceIdentifier, a9 as MapFeatureId, aa as MapPluginBase, ab as PluginManager, ac as MapSourceEvent, ad as MapMouseEvent, ae as MapFeatureStream, af as PartialBy, x as MapAnimationOptions, ag as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, E as MapFeatureIdentifier, z as MapFeature } from '../../../shared/flow-rdf-core.4dde996e.cjs';
|
|
2
|
+
export { ak as EventHandlers, aj as PluginConstructor, ai as PluginEventsType, ah as PluginOptionsType } from '../../../shared/flow-rdf-core.4dde996e.cjs';
|
|
3
3
|
import { F as Func } from '../../../shared/flow-rdf-core.63162669.cjs';
|
|
4
4
|
import EventEmitter from 'eventemitter3';
|
|
5
5
|
import * as lit from 'lit-html';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a8 as MapEvent, K as FlowCoreMap, I as MapSourceIdentifier, a9 as MapFeatureId, aa as MapPluginBase, ab as PluginManager, ac as MapSourceEvent, ad as MapMouseEvent, ae as MapFeatureStream, af as PartialBy, x as MapAnimationOptions, ag as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, E as MapFeatureIdentifier, z as MapFeature } from '../../../shared/flow-rdf-core.
|
|
2
|
-
export { ak as EventHandlers, aj as PluginConstructor, ai as PluginEventsType, ah as PluginOptionsType } from '../../../shared/flow-rdf-core.
|
|
1
|
+
import { a8 as MapEvent, K as FlowCoreMap, I as MapSourceIdentifier, a9 as MapFeatureId, aa as MapPluginBase, ab as PluginManager, ac as MapSourceEvent, ad as MapMouseEvent, ae as MapFeatureStream, af as PartialBy, x as MapAnimationOptions, ag as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, E as MapFeatureIdentifier, z as MapFeature } from '../../../shared/flow-rdf-core.4dde996e.mjs';
|
|
2
|
+
export { ak as EventHandlers, aj as PluginConstructor, ai as PluginEventsType, ah as PluginOptionsType } from '../../../shared/flow-rdf-core.4dde996e.mjs';
|
|
3
3
|
import { F as Func } from '../../../shared/flow-rdf-core.63162669.mjs';
|
|
4
4
|
import EventEmitter from 'eventemitter3';
|
|
5
5
|
import * as lit from 'lit-html';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a8 as MapEvent, K as FlowCoreMap, I as MapSourceIdentifier, a9 as MapFeatureId, aa as MapPluginBase, ab as PluginManager, ac as MapSourceEvent, ad as MapMouseEvent, ae as MapFeatureStream, af as PartialBy, x as MapAnimationOptions, ag as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, E as MapFeatureIdentifier, z as MapFeature } from '../../../shared/flow-rdf-core.
|
|
2
|
-
export { ak as EventHandlers, aj as PluginConstructor, ai as PluginEventsType, ah as PluginOptionsType } from '../../../shared/flow-rdf-core.
|
|
1
|
+
import { a8 as MapEvent, K as FlowCoreMap, I as MapSourceIdentifier, a9 as MapFeatureId, aa as MapPluginBase, ab as PluginManager, ac as MapSourceEvent, ad as MapMouseEvent, ae as MapFeatureStream, af as PartialBy, x as MapAnimationOptions, ag as MapStyleChangeEvent, M as MapStyleSpecification, S as StateStore, E as MapFeatureIdentifier, z as MapFeature } from '../../../shared/flow-rdf-core.4dde996e.js';
|
|
2
|
+
export { ak as EventHandlers, aj as PluginConstructor, ai as PluginEventsType, ah as PluginOptionsType } from '../../../shared/flow-rdf-core.4dde996e.js';
|
|
3
3
|
import { F as Func } from '../../../shared/flow-rdf-core.63162669.js';
|
|
4
4
|
import EventEmitter from 'eventemitter3';
|
|
5
5
|
import * as lit from 'lit-html';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
2
|
-
import { IObservableStream, IDisposer
|
|
2
|
+
import { ISubscription, IObservableStream, IDisposer } from 'mobx-utils';
|
|
3
3
|
import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
|
|
4
4
|
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
5
5
|
|
|
@@ -34,6 +34,16 @@ declare class StateStore {
|
|
|
34
34
|
toggle<P extends Path<this, StateStore>>(path: P): boolean;
|
|
35
35
|
increment<P extends Path<this, StateStore>>(path: P): number;
|
|
36
36
|
decrement<P extends Path<this, StateStore>>(path: P): number;
|
|
37
|
+
bindControl<TStatePath extends Path<this, StateStore>, TStateValue extends PathValue<this, TStatePath, StateStore>, TElementValue, TElement extends HTMLElement & {
|
|
38
|
+
value: TElementValue;
|
|
39
|
+
}>(el: TElement, statePath: TStatePath, options?: {
|
|
40
|
+
toState?: (value: TElementValue) => TStateValue;
|
|
41
|
+
fromState?: (value: TStateValue) => TElementValue;
|
|
42
|
+
}): ISubscription;
|
|
43
|
+
bindElementProp<TElementProp extends keyof TElement, TElement extends HTMLElement, TStatePath extends Path<this, StateStore>, TStateValue extends PathValue<this, TStatePath, StateStore>>(el: TElement, prop: TElementProp, statePath: TStatePath, options?: {
|
|
44
|
+
fromState?: (value: TStateValue) => TElement[TElementProp];
|
|
45
|
+
}): ISubscription;
|
|
46
|
+
bindElementAttr<TElement extends HTMLElement, P extends Path<this, StateStore>>(el: TElement, attr: string, statePath: P): ISubscription;
|
|
37
47
|
toStream<P extends Path<this, StateStore>>(path: P, fireImmediately?: boolean): IObservableStream<PathValue<this, P, StateStore>>;
|
|
38
48
|
autorun(autorunFn: (state: this) => void, name?: string): IDisposer;
|
|
39
49
|
initialize(annotations?: StoreAnnotations<this>): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
2
|
-
import { IObservableStream, IDisposer
|
|
2
|
+
import { ISubscription, IObservableStream, IDisposer } from 'mobx-utils';
|
|
3
3
|
import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
|
|
4
4
|
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
5
5
|
|
|
@@ -34,6 +34,16 @@ declare class StateStore {
|
|
|
34
34
|
toggle<P extends Path<this, StateStore>>(path: P): boolean;
|
|
35
35
|
increment<P extends Path<this, StateStore>>(path: P): number;
|
|
36
36
|
decrement<P extends Path<this, StateStore>>(path: P): number;
|
|
37
|
+
bindControl<TStatePath extends Path<this, StateStore>, TStateValue extends PathValue<this, TStatePath, StateStore>, TElementValue, TElement extends HTMLElement & {
|
|
38
|
+
value: TElementValue;
|
|
39
|
+
}>(el: TElement, statePath: TStatePath, options?: {
|
|
40
|
+
toState?: (value: TElementValue) => TStateValue;
|
|
41
|
+
fromState?: (value: TStateValue) => TElementValue;
|
|
42
|
+
}): ISubscription;
|
|
43
|
+
bindElementProp<TElementProp extends keyof TElement, TElement extends HTMLElement, TStatePath extends Path<this, StateStore>, TStateValue extends PathValue<this, TStatePath, StateStore>>(el: TElement, prop: TElementProp, statePath: TStatePath, options?: {
|
|
44
|
+
fromState?: (value: TStateValue) => TElement[TElementProp];
|
|
45
|
+
}): ISubscription;
|
|
46
|
+
bindElementAttr<TElement extends HTMLElement, P extends Path<this, StateStore>>(el: TElement, attr: string, statePath: P): ISubscription;
|
|
37
47
|
toStream<P extends Path<this, StateStore>>(path: P, fireImmediately?: boolean): IObservableStream<PathValue<this, P, StateStore>>;
|
|
38
48
|
autorun(autorunFn: (state: this) => void, name?: string): IDisposer;
|
|
39
49
|
initialize(annotations?: StoreAnnotations<this>): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from '@emuanalytics/flow-engine-client';
|
|
2
|
-
import { IObservableStream, IDisposer
|
|
2
|
+
import { ISubscription, IObservableStream, IDisposer } from 'mobx-utils';
|
|
3
3
|
import { MapLibreEvent, MapMouseEvent as MapMouseEvent$1, MapOptions as MapOptions$1, Map } from '@emuanalytics/maplibre-gl';
|
|
4
4
|
import EventEmitter$1, { EventEmitter } from 'eventemitter3';
|
|
5
5
|
|
|
@@ -34,6 +34,16 @@ declare class StateStore {
|
|
|
34
34
|
toggle<P extends Path<this, StateStore>>(path: P): boolean;
|
|
35
35
|
increment<P extends Path<this, StateStore>>(path: P): number;
|
|
36
36
|
decrement<P extends Path<this, StateStore>>(path: P): number;
|
|
37
|
+
bindControl<TStatePath extends Path<this, StateStore>, TStateValue extends PathValue<this, TStatePath, StateStore>, TElementValue, TElement extends HTMLElement & {
|
|
38
|
+
value: TElementValue;
|
|
39
|
+
}>(el: TElement, statePath: TStatePath, options?: {
|
|
40
|
+
toState?: (value: TElementValue) => TStateValue;
|
|
41
|
+
fromState?: (value: TStateValue) => TElementValue;
|
|
42
|
+
}): ISubscription;
|
|
43
|
+
bindElementProp<TElementProp extends keyof TElement, TElement extends HTMLElement, TStatePath extends Path<this, StateStore>, TStateValue extends PathValue<this, TStatePath, StateStore>>(el: TElement, prop: TElementProp, statePath: TStatePath, options?: {
|
|
44
|
+
fromState?: (value: TStateValue) => TElement[TElementProp];
|
|
45
|
+
}): ISubscription;
|
|
46
|
+
bindElementAttr<TElement extends HTMLElement, P extends Path<this, StateStore>>(el: TElement, attr: string, statePath: P): ISubscription;
|
|
37
47
|
toStream<P extends Path<this, StateStore>>(path: P, fireImmediately?: boolean): IObservableStream<PathValue<this, P, StateStore>>;
|
|
38
48
|
autorun(autorunFn: (state: this) => void, name?: string): IDisposer;
|
|
39
49
|
initialize(annotations?: StoreAnnotations<this>): void;
|