venue-js 1.0.0-next.1 → 1.0.0-next.3
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.d.mts +40 -27
- package/dist/index.d.ts +40 -27
- package/dist/index.js +221 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +219 -80
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -3
package/dist/index.d.mts
CHANGED
|
@@ -3,8 +3,8 @@ export { QueryObserver } from '@tanstack/query-core';
|
|
|
3
3
|
import * as geojson from 'geojson';
|
|
4
4
|
import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, GeometryCollection } from 'geojson';
|
|
5
5
|
import * as maptalks from 'maptalks';
|
|
6
|
-
import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent
|
|
7
|
-
import {
|
|
6
|
+
import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent } from 'maptalks';
|
|
7
|
+
import { ThreeLayer, BaseObject } from 'maptalks.three';
|
|
8
8
|
import { ExtrudePolygonOptionType } from 'maptalks.three/dist/type';
|
|
9
9
|
import { SpriteMaterial, AmbientLight, DirectionalLight } from 'three';
|
|
10
10
|
|
|
@@ -627,6 +627,14 @@ type FeaturePopulatedResponseMap = {
|
|
|
627
627
|
};
|
|
628
628
|
type PopulatableFeatureType = keyof FeaturePopulatedResponseMap;
|
|
629
629
|
|
|
630
|
+
type Value = string | boolean | number;
|
|
631
|
+
type EqFilter = Value;
|
|
632
|
+
type InFilter = {
|
|
633
|
+
$in: (Value)[];
|
|
634
|
+
};
|
|
635
|
+
type Filter = EqFilter | InFilter;
|
|
636
|
+
type Filters = Record<string, Filter>;
|
|
637
|
+
|
|
630
638
|
interface VenueClientOptions {
|
|
631
639
|
projectId: string;
|
|
632
640
|
apiKey: string;
|
|
@@ -638,6 +646,7 @@ interface FindParams {
|
|
|
638
646
|
}
|
|
639
647
|
interface FilterParams {
|
|
640
648
|
populate?: boolean;
|
|
649
|
+
filters?: Filters;
|
|
641
650
|
}
|
|
642
651
|
interface PopulatedParams {
|
|
643
652
|
populate: true;
|
|
@@ -684,7 +693,7 @@ type Element2DRendererOptions = {
|
|
|
684
693
|
unit?: TypeRenderOptions<maptalks.PolygonOptionsType>;
|
|
685
694
|
kiosk?: TypeRenderOptions<maptalks.PolygonOptionsType>;
|
|
686
695
|
door?: TypeRenderOptions<maptalks.LineStringOptionsType>;
|
|
687
|
-
|
|
696
|
+
fixture?: TypeRenderOptions<maptalks.PolygonOptionsType>;
|
|
688
697
|
};
|
|
689
698
|
/** 3D */
|
|
690
699
|
type CreateExtrudePolygonOptionType = ExtrudePolygonOptionType & {
|
|
@@ -715,9 +724,13 @@ declare class RendererManager extends EventTarget {
|
|
|
715
724
|
private elementsByOrdinal;
|
|
716
725
|
constructor(map: maptalks.Map, options: RendererManagerOptions);
|
|
717
726
|
set dataClient(value: any);
|
|
718
|
-
getElementsByOrdinal: (ordinal: number) =>
|
|
727
|
+
getElementsByOrdinal: (ordinal: number) => any[];
|
|
719
728
|
changeLevelByOrdinal(targetOrdinal: null | number | number[]): void;
|
|
720
|
-
|
|
729
|
+
/**
|
|
730
|
+
* ========================================================================
|
|
731
|
+
* Markers
|
|
732
|
+
* ======================================================================== */
|
|
733
|
+
createMarker(coordinate: Position, ordinal: number, markerSymbol: any): void;
|
|
721
734
|
}
|
|
722
735
|
|
|
723
736
|
interface IndoorMapOptions {
|
|
@@ -870,13 +883,13 @@ declare class IndoorMap extends EventTarget {
|
|
|
870
883
|
/**
|
|
871
884
|
* Change Level & animate to path / geometry / view / etc.
|
|
872
885
|
* ================================== */
|
|
873
|
-
changeLevelByOrdinal(ordinal: number | number[]): void;
|
|
874
|
-
getFeatureExtent: (feature: any, scaleFactor?: number) =>
|
|
875
|
-
getExtentCenter: (extent: Extent) =>
|
|
886
|
+
changeLevelByOrdinal(ordinal: null | number | number[]): void;
|
|
887
|
+
getFeatureExtent: (feature: any, scaleFactor?: number) => any;
|
|
888
|
+
getExtentCenter: (extent: Extent) => any;
|
|
876
889
|
getExtentZoom: (extent: Extent, options?: {
|
|
877
890
|
isFraction?: boolean;
|
|
878
891
|
padding?: MapPaddingType;
|
|
879
|
-
}) =>
|
|
892
|
+
}) => any;
|
|
880
893
|
findVenueInView: () => {
|
|
881
894
|
venueId: string;
|
|
882
895
|
distance: number;
|
|
@@ -942,10 +955,10 @@ declare class IndoorMap extends EventTarget {
|
|
|
942
955
|
/**
|
|
943
956
|
* Other functions
|
|
944
957
|
*/
|
|
945
|
-
enableClick: () =>
|
|
946
|
-
disableClick: () =>
|
|
947
|
-
freeze: () =>
|
|
948
|
-
unfreeze: () =>
|
|
958
|
+
enableClick: () => any;
|
|
959
|
+
disableClick: () => any;
|
|
960
|
+
freeze: () => any;
|
|
961
|
+
unfreeze: () => any;
|
|
949
962
|
/**
|
|
950
963
|
* render (frame)
|
|
951
964
|
*/
|
|
@@ -956,8 +969,8 @@ declare class IndoorMap extends EventTarget {
|
|
|
956
969
|
right: number;
|
|
957
970
|
bottom: number;
|
|
958
971
|
};
|
|
959
|
-
}) =>
|
|
960
|
-
setMaxExtent(extent: Extent):
|
|
972
|
+
}) => any;
|
|
973
|
+
setMaxExtent(extent: Extent): any;
|
|
961
974
|
render(): void;
|
|
962
975
|
}
|
|
963
976
|
|
|
@@ -1038,22 +1051,22 @@ declare function styledFeatureGenerator(mapTheme: any): {
|
|
|
1038
1051
|
createVenue: (feature: any) => any;
|
|
1039
1052
|
createLevel: (feature: any) => any;
|
|
1040
1053
|
createUnit: (feature: any) => any;
|
|
1041
|
-
createMarker: (feature: any) =>
|
|
1042
|
-
createOriginMarker: (feature: any) =>
|
|
1043
|
-
createDestinationPinMarker: (feature: any, mapConfig: any) =>
|
|
1044
|
-
createDestinationLogoMarker: (feature: any, mapConfig?: {}) =>
|
|
1045
|
-
createUserLocationMarker: (feature: any) =>
|
|
1046
|
-
createLastUserLocationMarker: (feature: any) =>
|
|
1047
|
-
createHighlightOccupantMarker: (feature: any, mapConfig: any) =>
|
|
1048
|
-
createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) =>
|
|
1054
|
+
createMarker: (feature: any) => any;
|
|
1055
|
+
createOriginMarker: (feature: any) => any;
|
|
1056
|
+
createDestinationPinMarker: (feature: any, mapConfig: any) => any;
|
|
1057
|
+
createDestinationLogoMarker: (feature: any, mapConfig?: {}) => any;
|
|
1058
|
+
createUserLocationMarker: (feature: any) => any;
|
|
1059
|
+
createLastUserLocationMarker: (feature: any) => any;
|
|
1060
|
+
createHighlightOccupantMarker: (feature: any, mapConfig: any) => any;
|
|
1061
|
+
createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => any;
|
|
1049
1062
|
createKiosk: (feature: any) => any;
|
|
1050
1063
|
createSection: (feature: any) => any;
|
|
1051
|
-
createOccupant: (feature: any, location: any, mapConfig: any) =>
|
|
1052
|
-
createOpening: (feature: any) =>
|
|
1064
|
+
createOccupant: (feature: any, location: any, mapConfig: any) => any;
|
|
1065
|
+
createOpening: (feature: any) => any;
|
|
1053
1066
|
createFixture: (feature: any) => any;
|
|
1054
|
-
createLineStringFromGeometries: (geometries: any) =>
|
|
1067
|
+
createLineStringFromGeometries: (geometries: any) => any;
|
|
1055
1068
|
create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
|
|
1056
|
-
createDecoration: (decoration: any, options: any) =>
|
|
1069
|
+
createDecoration: (decoration: any, options: any) => any;
|
|
1057
1070
|
/** Three JS */
|
|
1058
1071
|
create3DFootprint: (feature: any, threeLayer: any, options: any) => Promise<any[]>;
|
|
1059
1072
|
create3DGroundLabel: (label: any, threeLayer: any) => GroundLabel;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export { QueryObserver } from '@tanstack/query-core';
|
|
|
3
3
|
import * as geojson from 'geojson';
|
|
4
4
|
import { Position, Geometry, GeoJsonProperties, Feature, Point, Polygon, MultiPolygon, LineString, GeometryCollection } from 'geojson';
|
|
5
5
|
import * as maptalks from 'maptalks';
|
|
6
|
-
import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent
|
|
7
|
-
import {
|
|
6
|
+
import { Coordinate, Map, MapViewType, MapAnimationOptionsType, HandlerFn, EventParams, MapPaddingType, Extent } from 'maptalks';
|
|
7
|
+
import { ThreeLayer, BaseObject } from 'maptalks.three';
|
|
8
8
|
import { ExtrudePolygonOptionType } from 'maptalks.three/dist/type';
|
|
9
9
|
import { SpriteMaterial, AmbientLight, DirectionalLight } from 'three';
|
|
10
10
|
|
|
@@ -627,6 +627,14 @@ type FeaturePopulatedResponseMap = {
|
|
|
627
627
|
};
|
|
628
628
|
type PopulatableFeatureType = keyof FeaturePopulatedResponseMap;
|
|
629
629
|
|
|
630
|
+
type Value = string | boolean | number;
|
|
631
|
+
type EqFilter = Value;
|
|
632
|
+
type InFilter = {
|
|
633
|
+
$in: (Value)[];
|
|
634
|
+
};
|
|
635
|
+
type Filter = EqFilter | InFilter;
|
|
636
|
+
type Filters = Record<string, Filter>;
|
|
637
|
+
|
|
630
638
|
interface VenueClientOptions {
|
|
631
639
|
projectId: string;
|
|
632
640
|
apiKey: string;
|
|
@@ -638,6 +646,7 @@ interface FindParams {
|
|
|
638
646
|
}
|
|
639
647
|
interface FilterParams {
|
|
640
648
|
populate?: boolean;
|
|
649
|
+
filters?: Filters;
|
|
641
650
|
}
|
|
642
651
|
interface PopulatedParams {
|
|
643
652
|
populate: true;
|
|
@@ -684,7 +693,7 @@ type Element2DRendererOptions = {
|
|
|
684
693
|
unit?: TypeRenderOptions<maptalks.PolygonOptionsType>;
|
|
685
694
|
kiosk?: TypeRenderOptions<maptalks.PolygonOptionsType>;
|
|
686
695
|
door?: TypeRenderOptions<maptalks.LineStringOptionsType>;
|
|
687
|
-
|
|
696
|
+
fixture?: TypeRenderOptions<maptalks.PolygonOptionsType>;
|
|
688
697
|
};
|
|
689
698
|
/** 3D */
|
|
690
699
|
type CreateExtrudePolygonOptionType = ExtrudePolygonOptionType & {
|
|
@@ -715,9 +724,13 @@ declare class RendererManager extends EventTarget {
|
|
|
715
724
|
private elementsByOrdinal;
|
|
716
725
|
constructor(map: maptalks.Map, options: RendererManagerOptions);
|
|
717
726
|
set dataClient(value: any);
|
|
718
|
-
getElementsByOrdinal: (ordinal: number) =>
|
|
727
|
+
getElementsByOrdinal: (ordinal: number) => any[];
|
|
719
728
|
changeLevelByOrdinal(targetOrdinal: null | number | number[]): void;
|
|
720
|
-
|
|
729
|
+
/**
|
|
730
|
+
* ========================================================================
|
|
731
|
+
* Markers
|
|
732
|
+
* ======================================================================== */
|
|
733
|
+
createMarker(coordinate: Position, ordinal: number, markerSymbol: any): void;
|
|
721
734
|
}
|
|
722
735
|
|
|
723
736
|
interface IndoorMapOptions {
|
|
@@ -870,13 +883,13 @@ declare class IndoorMap extends EventTarget {
|
|
|
870
883
|
/**
|
|
871
884
|
* Change Level & animate to path / geometry / view / etc.
|
|
872
885
|
* ================================== */
|
|
873
|
-
changeLevelByOrdinal(ordinal: number | number[]): void;
|
|
874
|
-
getFeatureExtent: (feature: any, scaleFactor?: number) =>
|
|
875
|
-
getExtentCenter: (extent: Extent) =>
|
|
886
|
+
changeLevelByOrdinal(ordinal: null | number | number[]): void;
|
|
887
|
+
getFeatureExtent: (feature: any, scaleFactor?: number) => any;
|
|
888
|
+
getExtentCenter: (extent: Extent) => any;
|
|
876
889
|
getExtentZoom: (extent: Extent, options?: {
|
|
877
890
|
isFraction?: boolean;
|
|
878
891
|
padding?: MapPaddingType;
|
|
879
|
-
}) =>
|
|
892
|
+
}) => any;
|
|
880
893
|
findVenueInView: () => {
|
|
881
894
|
venueId: string;
|
|
882
895
|
distance: number;
|
|
@@ -942,10 +955,10 @@ declare class IndoorMap extends EventTarget {
|
|
|
942
955
|
/**
|
|
943
956
|
* Other functions
|
|
944
957
|
*/
|
|
945
|
-
enableClick: () =>
|
|
946
|
-
disableClick: () =>
|
|
947
|
-
freeze: () =>
|
|
948
|
-
unfreeze: () =>
|
|
958
|
+
enableClick: () => any;
|
|
959
|
+
disableClick: () => any;
|
|
960
|
+
freeze: () => any;
|
|
961
|
+
unfreeze: () => any;
|
|
949
962
|
/**
|
|
950
963
|
* render (frame)
|
|
951
964
|
*/
|
|
@@ -956,8 +969,8 @@ declare class IndoorMap extends EventTarget {
|
|
|
956
969
|
right: number;
|
|
957
970
|
bottom: number;
|
|
958
971
|
};
|
|
959
|
-
}) =>
|
|
960
|
-
setMaxExtent(extent: Extent):
|
|
972
|
+
}) => any;
|
|
973
|
+
setMaxExtent(extent: Extent): any;
|
|
961
974
|
render(): void;
|
|
962
975
|
}
|
|
963
976
|
|
|
@@ -1038,22 +1051,22 @@ declare function styledFeatureGenerator(mapTheme: any): {
|
|
|
1038
1051
|
createVenue: (feature: any) => any;
|
|
1039
1052
|
createLevel: (feature: any) => any;
|
|
1040
1053
|
createUnit: (feature: any) => any;
|
|
1041
|
-
createMarker: (feature: any) =>
|
|
1042
|
-
createOriginMarker: (feature: any) =>
|
|
1043
|
-
createDestinationPinMarker: (feature: any, mapConfig: any) =>
|
|
1044
|
-
createDestinationLogoMarker: (feature: any, mapConfig?: {}) =>
|
|
1045
|
-
createUserLocationMarker: (feature: any) =>
|
|
1046
|
-
createLastUserLocationMarker: (feature: any) =>
|
|
1047
|
-
createHighlightOccupantMarker: (feature: any, mapConfig: any) =>
|
|
1048
|
-
createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) =>
|
|
1054
|
+
createMarker: (feature: any) => any;
|
|
1055
|
+
createOriginMarker: (feature: any) => any;
|
|
1056
|
+
createDestinationPinMarker: (feature: any, mapConfig: any) => any;
|
|
1057
|
+
createDestinationLogoMarker: (feature: any, mapConfig?: {}) => any;
|
|
1058
|
+
createUserLocationMarker: (feature: any) => any;
|
|
1059
|
+
createLastUserLocationMarker: (feature: any) => any;
|
|
1060
|
+
createHighlightOccupantMarker: (feature: any, mapConfig: any) => any;
|
|
1061
|
+
createHighlight2DAmenityMarkerFrom3DMarker: (feature: any, mapConfig: any) => any;
|
|
1049
1062
|
createKiosk: (feature: any) => any;
|
|
1050
1063
|
createSection: (feature: any) => any;
|
|
1051
|
-
createOccupant: (feature: any, location: any, mapConfig: any) =>
|
|
1052
|
-
createOpening: (feature: any) =>
|
|
1064
|
+
createOccupant: (feature: any, location: any, mapConfig: any) => any;
|
|
1065
|
+
createOpening: (feature: any) => any;
|
|
1053
1066
|
createFixture: (feature: any) => any;
|
|
1054
|
-
createLineStringFromGeometries: (geometries: any) =>
|
|
1067
|
+
createLineStringFromGeometries: (geometries: any) => any;
|
|
1055
1068
|
create3DStepPath: (feature: any, threeLayer: any, option?: {}) => NavigationPath;
|
|
1056
|
-
createDecoration: (decoration: any, options: any) =>
|
|
1069
|
+
createDecoration: (decoration: any, options: any) => any;
|
|
1057
1070
|
/** Three JS */
|
|
1058
1071
|
create3DFootprint: (feature: any, threeLayer: any, options: any) => Promise<any[]>;
|
|
1059
1072
|
create3DGroundLabel: (label: any, threeLayer: any) => GroundLabel;
|