@aggdirect/coolmap-services 1.4.9 → 4.0.1
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 +43 -18
- package/fesm2022/aggdirect-coolmap-services.mjs +851 -646
- package/fesm2022/aggdirect-coolmap-services.mjs.map +1 -1
- package/index.d.ts +212 -5
- package/package.json +13 -26
- package/esm2022/aggdirect-coolmap-services.mjs +0 -5
- package/esm2022/lib/service/coolmap.service.mjs +0 -637
- package/esm2022/lib/service/data-model.mjs +0 -92
- package/esm2022/lib/service/utils.service.mjs +0 -400
- package/esm2022/public-api.mjs +0 -7
- package/lib/service/coolmap.service.d.ts +0 -47
- package/lib/service/data-model.d.ts +0 -94
- package/lib/service/utils.service.d.ts +0 -78
- package/public-api.d.ts +0 -3
package/index.d.ts
CHANGED
|
@@ -1,5 +1,212 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import * as _aggdirect_coolmap_services from '@aggdirect/coolmap-services';
|
|
4
|
+
import * as rxjs from 'rxjs';
|
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
|
6
|
+
import * as mapbox_gl from 'mapbox-gl';
|
|
7
|
+
|
|
8
|
+
declare class CoolmapServices {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoolmapServices, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CoolmapServices, "lib-coolmap-services", never, {}, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface CoolmapRoute {
|
|
14
|
+
route_details_id?: string;
|
|
15
|
+
route_id?: string;
|
|
16
|
+
route_name?: string;
|
|
17
|
+
driver_id?: string | null;
|
|
18
|
+
driver_name?: string | null;
|
|
19
|
+
driver_phone?: string | null;
|
|
20
|
+
driver_email?: string | null;
|
|
21
|
+
truck_no?: string | null;
|
|
22
|
+
company_id?: string;
|
|
23
|
+
company_name?: string;
|
|
24
|
+
status?: string;
|
|
25
|
+
driver_flag?: string | null;
|
|
26
|
+
driver_first_login?: string | null;
|
|
27
|
+
start_time?: string | null;
|
|
28
|
+
is_overnight?: boolean;
|
|
29
|
+
route_visibility?: number;
|
|
30
|
+
pickup_location?: string;
|
|
31
|
+
delivery_location?: string;
|
|
32
|
+
order_number?: string;
|
|
33
|
+
customer_name?: string;
|
|
34
|
+
project?: string;
|
|
35
|
+
unit?: string;
|
|
36
|
+
material?: string;
|
|
37
|
+
job_id?: string;
|
|
38
|
+
path?: any;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface LocationAll {
|
|
42
|
+
city: string;
|
|
43
|
+
latitude: string;
|
|
44
|
+
location_id: string;
|
|
45
|
+
longitude: string;
|
|
46
|
+
name: string;
|
|
47
|
+
state: string;
|
|
48
|
+
street: string;
|
|
49
|
+
suite: null;
|
|
50
|
+
zip: string;
|
|
51
|
+
formatted_address: string;
|
|
52
|
+
complete_address: string;
|
|
53
|
+
}
|
|
54
|
+
declare class UtilsService {
|
|
55
|
+
private http;
|
|
56
|
+
private config;
|
|
57
|
+
private ngZone;
|
|
58
|
+
preventnavChange: BehaviorSubject<boolean>;
|
|
59
|
+
navChangeObserve: rxjs.Observable<boolean>;
|
|
60
|
+
clearViewRouteforJobCode: BehaviorSubject<boolean>;
|
|
61
|
+
clearViewRouteforJobCodeObserve: rxjs.Observable<boolean>;
|
|
62
|
+
preVentJobdetailclose: BehaviorSubject<boolean>;
|
|
63
|
+
getpreVentJobdetailclose: rxjs.Observable<boolean>;
|
|
64
|
+
routeDetailsUtility: BehaviorSubject<{}>;
|
|
65
|
+
getrouteDetailsUtility: rxjs.Observable<{}>;
|
|
66
|
+
removeMapEntity: BehaviorSubject<any>;
|
|
67
|
+
removeMapEntityUtility: rxjs.Observable<any>;
|
|
68
|
+
dict: Map<string, string>;
|
|
69
|
+
unitsList: any;
|
|
70
|
+
materialsList: any;
|
|
71
|
+
materialsListForCustomer: any;
|
|
72
|
+
customersList: any;
|
|
73
|
+
locationList: any;
|
|
74
|
+
pickupOptions: any[];
|
|
75
|
+
destOptions: any[];
|
|
76
|
+
ownerOptions: any[];
|
|
77
|
+
customerOptions: any[];
|
|
78
|
+
unitOptions: any[];
|
|
79
|
+
materialOptions: any[];
|
|
80
|
+
jcodeOptions: any[];
|
|
81
|
+
driverOption: any[];
|
|
82
|
+
truckingCompanayOption: any[];
|
|
83
|
+
routeNameOptions: any[];
|
|
84
|
+
getDateFormat(strVal: Date | null, seprater?: string): string;
|
|
85
|
+
getData(path: string): rxjs.Observable<Object>;
|
|
86
|
+
getRestData(path: string): rxjs.Observable<Object>;
|
|
87
|
+
postdata(path: string, data: any): rxjs.Observable<Object>;
|
|
88
|
+
postDataWithRestUrl(path: string, data: any): rxjs.Observable<Object>;
|
|
89
|
+
openSnackBar(message: string, className?: string): void;
|
|
90
|
+
clearOptions(): void;
|
|
91
|
+
makeOptions(item: CoolmapRoute): void;
|
|
92
|
+
setdictValue(key: string, value: string): void;
|
|
93
|
+
getdictValue(key: string): any;
|
|
94
|
+
removedictValue(key: string): void;
|
|
95
|
+
filter(value: string, filters: any[]): any[];
|
|
96
|
+
getSearchResults(list: CoolmapRoute[], filterval: any[]): any[];
|
|
97
|
+
fetchUnitsList(): Promise<unknown>;
|
|
98
|
+
fetchMaterialsListForCustomer(): Promise<unknown>;
|
|
99
|
+
filtermaterialList(list: any[]): any[];
|
|
100
|
+
fetchCustomersList(): Promise<unknown>;
|
|
101
|
+
fetchLocationlist(): Promise<unknown>;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UtilsService, never>;
|
|
103
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UtilsService>;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface PopupData {
|
|
107
|
+
coordinate: [number, number];
|
|
108
|
+
pickup?: string;
|
|
109
|
+
drop?: string;
|
|
110
|
+
jobCode?: string;
|
|
111
|
+
customer?: string;
|
|
112
|
+
routeType?: string;
|
|
113
|
+
title?: string;
|
|
114
|
+
material?: string;
|
|
115
|
+
type?: string;
|
|
116
|
+
}
|
|
117
|
+
declare class MapboxService {
|
|
118
|
+
map: mapboxgl.Map;
|
|
119
|
+
mapContainer: HTMLElement | null;
|
|
120
|
+
markerOriginList: Map<string, mapbox_gl.Marker>;
|
|
121
|
+
markerDestinationList: Map<string, mapbox_gl.Marker>;
|
|
122
|
+
private activeRoutesRegistry;
|
|
123
|
+
private pathCache;
|
|
124
|
+
svgOverlay: SVGSVGElement | null;
|
|
125
|
+
activeArcs: {
|
|
126
|
+
[index: string]: {
|
|
127
|
+
origin: [number, number];
|
|
128
|
+
destination: [number, number];
|
|
129
|
+
color: string;
|
|
130
|
+
pathEl: SVGPathElement;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
initiatecoolmap: BehaviorSubject<boolean>;
|
|
134
|
+
reintiatecoolmap: rxjs.Observable<boolean>;
|
|
135
|
+
isMapReady: i0.WritableSignal<boolean>;
|
|
136
|
+
bounds: mapbox_gl.LngLatBounds;
|
|
137
|
+
originDestinationCordinates: any;
|
|
138
|
+
padding: any;
|
|
139
|
+
windowActualHeightWidth: any;
|
|
140
|
+
popup: mapboxgl.Popup;
|
|
141
|
+
customTopForCustomer: number;
|
|
142
|
+
utils: UtilsService;
|
|
143
|
+
config: _aggdirect_coolmap_services.CoolmapConfigModel;
|
|
144
|
+
private currentStyleIsDark;
|
|
145
|
+
constructor();
|
|
146
|
+
updateTheme(isDark: boolean): void;
|
|
147
|
+
getRegistryKeys(): string[];
|
|
148
|
+
initializeMap(el: HTMLElement, isDark?: boolean): Promise<unknown>;
|
|
149
|
+
loadMapProperty(pinRouteGeojson: any, index: number, unit: any, routeProps?: any, bottom?: number): Promise<unknown>;
|
|
150
|
+
createMarker(routeDetails: any): void;
|
|
151
|
+
showRoutePopup(arcDetails: any, event: any, isViewRoute?: boolean): void;
|
|
152
|
+
createPopup(datasetForPopup: PopupData): void;
|
|
153
|
+
drawLine(cordinates?: any, index?: number | any, route?: any, enablefitbound?: boolean, routeType?: string, isStyleRefresh?: boolean): Promise<void>;
|
|
154
|
+
provideLineColor(unitType: string, type?: string): string;
|
|
155
|
+
hexToRGB(hex: any): [number, number, number];
|
|
156
|
+
initSvgOverlay(): void;
|
|
157
|
+
updateSvgPaths(): void;
|
|
158
|
+
removeRouteAndMarker(index: number | string | any, routeType?: string): Promise<boolean>;
|
|
159
|
+
private reAddLayers;
|
|
160
|
+
findMarkerBound(index: any): void;
|
|
161
|
+
filterRoute(ID: any, visibility: 'visible' | 'none', showAllFitbound?: boolean): Promise<boolean>;
|
|
162
|
+
extendBound(route: any, showAllFitbound: boolean | undefined): Promise<unknown>;
|
|
163
|
+
extendReBound(bottom?: number): Promise<unknown>;
|
|
164
|
+
plotRoute(route: any, i: number | any, type: string, enablefitbound?: boolean, showAllFitbound?: boolean): Promise<boolean>;
|
|
165
|
+
/**
|
|
166
|
+
* Batch toggle visibility for routes on the map.
|
|
167
|
+
* If visibleIds is empty, shows everything in the registry.
|
|
168
|
+
* Otherwise, shows only those in visibleIds and hides the rest.
|
|
169
|
+
*/
|
|
170
|
+
setRoutesVisibility(visibleIds: string[], showAllOverride?: boolean, prefix?: string): void;
|
|
171
|
+
private recalculateVisibleBounds;
|
|
172
|
+
clearAllRoutes(): Promise<boolean>;
|
|
173
|
+
clearBound(): void;
|
|
174
|
+
formateLatLong(latlong: string): number[] | null;
|
|
175
|
+
clearBoundWithCordinates(): void;
|
|
176
|
+
onResize(event: any): void;
|
|
177
|
+
setWindowHeight(screen: any): void;
|
|
178
|
+
setPadding(padding: any): void;
|
|
179
|
+
clearPadding(): void;
|
|
180
|
+
removeJobFromMap(data: any[]): void;
|
|
181
|
+
resize(): void;
|
|
182
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MapboxService, never>;
|
|
183
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MapboxService>;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
interface CoolmapConfigModel {
|
|
187
|
+
analyticsRESTURL: string | null;
|
|
188
|
+
RESTURLPrefix: string | null;
|
|
189
|
+
repository: string | null;
|
|
190
|
+
mapboxStyle: string | null;
|
|
191
|
+
mapboxAccessToken: string | null;
|
|
192
|
+
}
|
|
193
|
+
declare const COOLMAP_CONFIG: InjectionToken<CoolmapConfigModel>;
|
|
194
|
+
declare function provideCoolmapConfig(config: CoolmapConfigModel): {
|
|
195
|
+
provide: InjectionToken<CoolmapConfigModel>;
|
|
196
|
+
useValue: CoolmapConfigModel;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
declare class CoolmapService {
|
|
200
|
+
mapbox: MapboxService;
|
|
201
|
+
isLoading: i0.WritableSignal<boolean>;
|
|
202
|
+
plottingIds: i0.WritableSignal<Set<string>>;
|
|
203
|
+
plotRoute(route: any, i?: number | any, type?: string, enablefitbound?: boolean, showAllFitbound?: boolean): Promise<boolean> | undefined;
|
|
204
|
+
loadMapProperty(pinRouteGeojson: any, index: number, unit: any, routeProps?: any): void;
|
|
205
|
+
removeRouteAndMarker(index: number | any, type?: string): Promise<boolean>;
|
|
206
|
+
clearAllRoutes(): Promise<boolean>;
|
|
207
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoolmapService, never>;
|
|
208
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CoolmapService>;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export { COOLMAP_CONFIG, CoolmapService, CoolmapServices, MapboxService, UtilsService, provideCoolmapConfig };
|
|
212
|
+
export type { CoolmapConfigModel, CoolmapRoute, LocationAll, PopupData };
|
package/package.json
CHANGED
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aggdirect/coolmap-services",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^20.3.0",
|
|
6
|
+
"@angular/core": "^20.3.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.3.0"
|
|
10
10
|
},
|
|
11
|
-
"
|
|
12
|
-
"mapbox-gl": "^2.10.0",
|
|
13
|
-
"@types/mapbox-gl": "^2.7.5",
|
|
14
|
-
"@turf/turf": "^6.5.0",
|
|
15
|
-
"deck.gl": "^8.4.16"
|
|
16
|
-
},
|
|
17
|
-
"description": "This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.",
|
|
18
|
-
"main": "karma.conf.js",
|
|
19
|
-
"author": "Navin Vishwakarma <navin@ogmaconceptions.com>",
|
|
20
|
-
"contributors": [
|
|
21
|
-
"Santanu Das <santanu.das@ogmaconceptions.com>"
|
|
22
|
-
],
|
|
23
|
-
"license": "ISC",
|
|
24
|
-
"keywords": [
|
|
25
|
-
"Coolmap-service"
|
|
26
|
-
],
|
|
11
|
+
"sideEffects": false,
|
|
27
12
|
"module": "fesm2022/aggdirect-coolmap-services.mjs",
|
|
28
13
|
"typings": "index.d.ts",
|
|
29
14
|
"exports": {
|
|
@@ -32,16 +17,18 @@
|
|
|
32
17
|
},
|
|
33
18
|
".": {
|
|
34
19
|
"types": "./index.d.ts",
|
|
35
|
-
"esm2022": "./esm2022/aggdirect-coolmap-services.mjs",
|
|
36
|
-
"esm": "./esm2022/aggdirect-coolmap-services.mjs",
|
|
37
20
|
"default": "./fesm2022/aggdirect-coolmap-services.mjs"
|
|
38
21
|
}
|
|
39
22
|
},
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"lib": "lib"
|
|
43
|
-
},
|
|
23
|
+
"description": "This is a major update of design and removal material dependency with angular 20 version upgrade",
|
|
24
|
+
"main": "index.js",
|
|
44
25
|
"scripts": {
|
|
45
26
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
46
|
-
}
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/bulldog-dev/npm-packages/blob/coolmap-v2/packages/coolmap-v2/README.md"
|
|
31
|
+
},
|
|
32
|
+
"author": "navin.ogma@gmail.com",
|
|
33
|
+
"license": "ISC"
|
|
47
34
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWdnZGlyZWN0LWNvb2xtYXAtc2VydmljZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jb29sbWFwLXNlcnZpY2VzL3NyYy9hZ2dkaXJlY3QtY29vbG1hcC1zZXJ2aWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
|