@wikicasa-dev/utilities 0.2.1 → 1.0.0
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/RESB_UrlBuilder.cjs +1 -1
- package/dist/RESB_UrlBuilder.js +70 -20
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.js +60 -140
- package/package.json +2 -2
- package/dist/Control.Geocoder-Dyvby5gX.cjs +0 -1
- package/dist/Control.Geocoder-l0sNRNKZ.js +0 -1
- package/dist/FavoriteUtils.cjs +0 -1
- package/dist/FavoriteUtils.js +0 -13
- package/dist/GAutocompleteUtils.cjs +0 -1
- package/dist/GAutocompleteUtils.js +0 -23
- package/dist/Leaflet-BKkoCsyw.js +0 -6436
- package/dist/Leaflet-CHOsN941.cjs +0 -1
- package/dist/MapUtils.cjs +0 -1
- package/dist/MapUtils.js +0 -79
- package/dist/RequestUtils.cjs +0 -1
- package/dist/RequestUtils.js +0 -13
- package/dist/URLPagesFactory.cjs +0 -1
- package/dist/URLPagesFactory.js +0 -12
- package/dist/agencyAPI.cjs +0 -1
- package/dist/agencyAPI.js +0 -61
- package/dist/constants.cjs +0 -1
- package/dist/constants.js +0 -5
- package/dist/custom/constants.d.ts +0 -2
- package/dist/custom/icons.d.ts +0 -5
- package/dist/custom/leaflet_map.d.ts +0 -99
- package/dist/geographyAPI.cjs +0 -1
- package/dist/geographyAPI.js +0 -73
- package/dist/icons.cjs +0 -1
- package/dist/icons.js +0 -32
- package/dist/insightsAPI.cjs +0 -1
- package/dist/insightsAPI.js +0 -15
- package/dist/leaflet-Dyvby5gX.cjs +0 -1
- package/dist/leaflet-freedraw.esm-D8SxeKC1.js +0 -26934
- package/dist/leaflet-freedraw.esm-DSDVLXDC.cjs +0 -7
- package/dist/leaflet-l0sNRNKZ.js +0 -1
- package/dist/leaflet.draw-Dyvby5gX.cjs +0 -1
- package/dist/leaflet.draw-l0sNRNKZ.js +0 -1
- package/dist/leaflet_map.cjs +0 -1
- package/dist/leaflet_map.js +0 -454
- package/dist/mailAPI.cjs +0 -1
- package/dist/mailAPI.js +0 -51
- package/dist/placesAPI.cjs +0 -1
- package/dist/placesAPI.js +0 -47
- package/dist/portfolioCustomerAPI.cjs +0 -1
- package/dist/portfolioCustomerAPI.js +0 -14
- package/dist/publicUserAPI.cjs +0 -1
- package/dist/publicUserAPI.js +0 -142
- package/dist/realEstateAPI.cjs +0 -1
- package/dist/realEstateAPI.js +0 -67
- package/dist/requestAPI.cjs +0 -1
- package/dist/requestAPI.js +0 -17
- package/dist/services/agencyAPI.d.ts +0 -19
- package/dist/services/geographyAPI.d.ts +0 -9
- package/dist/services/insightsAPI.d.ts +0 -2
- package/dist/services/mailAPI.d.ts +0 -24
- package/dist/services/placesAPI.d.ts +0 -5
- package/dist/services/portfolioCustomerAPI.d.ts +0 -1
- package/dist/services/publicUserAPI.d.ts +0 -20
- package/dist/services/realEstateAPI.d.ts +0 -14
- package/dist/services/requestAPI.d.ts +0 -16
- package/dist/services/servicesUtils.d.ts +0 -8
- package/dist/services/statisticsAPI.d.ts +0 -9
- package/dist/services/valuationAPI.d.ts +0 -11
- package/dist/services/wikicasaPro.d.ts +0 -2
- package/dist/servicesUtils.cjs +0 -3
- package/dist/servicesUtils.js +0 -12
- package/dist/statisticsAPI.cjs +0 -1
- package/dist/statisticsAPI.js +0 -58
- package/dist/style.css +0 -1
- package/dist/types-BaBnqzzG.js +0 -85
- package/dist/types-CwWBrQCP.cjs +0 -1
- package/dist/utils/FavoriteUtils.d.ts +0 -2
- package/dist/utils/GAutocompleteUtils.d.ts +0 -6
- package/dist/utils/MapUtils.d.ts +0 -23
- package/dist/utils/RequestUtils.d.ts +0 -2
- package/dist/utils/URLPagesFactory.d.ts +0 -9
- package/dist/valuationAPI.cjs +0 -1
- package/dist/valuationAPI.js +0 -21
- package/dist/wikicasaPro.cjs +0 -1
- package/dist/wikicasaPro.js +0 -14
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/// <reference types="jquery" />
|
|
2
|
-
/// <reference types="jquery" />
|
|
3
|
-
/// <reference types="jquery" />
|
|
4
|
-
import type { LatLng, MarkerCluster, Popup, Marker, Polyline, MarkerClusterGroup, FitBoundsOptions } from "leaflet";
|
|
5
|
-
declare global {
|
|
6
|
-
interface Window {
|
|
7
|
-
_cdn: string;
|
|
8
|
-
touch: boolean;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare const MAX_ZOOM = 18;
|
|
12
|
-
interface LMap extends L.Map {
|
|
13
|
-
touchExtend: Record<string, any>;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @author Andrea Moraglia
|
|
17
|
-
*/
|
|
18
|
-
export default class {
|
|
19
|
-
private markers;
|
|
20
|
-
private callbacks;
|
|
21
|
-
private initialized;
|
|
22
|
-
private markerClusterer;
|
|
23
|
-
private clusterHightlight;
|
|
24
|
-
private map;
|
|
25
|
-
private mapContainer;
|
|
26
|
-
private infowindow;
|
|
27
|
-
private infowindowCarousel;
|
|
28
|
-
private freeDraw;
|
|
29
|
-
private shapeLayer;
|
|
30
|
-
private config;
|
|
31
|
-
private drawHandler;
|
|
32
|
-
private spinner;
|
|
33
|
-
private buttonsWrapper;
|
|
34
|
-
private spinnerIcon;
|
|
35
|
-
private drawing;
|
|
36
|
-
private search;
|
|
37
|
-
constructor();
|
|
38
|
-
findMarker(id: number): Marker | undefined;
|
|
39
|
-
findCluster(id: number): Marker | undefined;
|
|
40
|
-
highlightCluster(cluster: MarkerCluster): void;
|
|
41
|
-
highlightMarker(id: number): void;
|
|
42
|
-
clearHighlight(): void;
|
|
43
|
-
addMarkerBulk(data: Array<Marker>, center: L.LatLng | null, limit: number, icon?: string): void;
|
|
44
|
-
addMarker(key: number | null, position: LatLng, icon?: any): void;
|
|
45
|
-
addCompleteMarker(marker: Marker): void;
|
|
46
|
-
removeMarker(id: number): void;
|
|
47
|
-
getVisibleMarkersId(): Array<number>;
|
|
48
|
-
initMarkerClusterer(): Promise<unknown>;
|
|
49
|
-
detachMarkerClusterer(): void;
|
|
50
|
-
attachMarkerClusterer(): void;
|
|
51
|
-
disableControls(): void;
|
|
52
|
-
enableControls(): void;
|
|
53
|
-
setDrawing(): void;
|
|
54
|
-
stopDrawing(): void;
|
|
55
|
-
isDrawing(): boolean;
|
|
56
|
-
initDrawingManager(): Promise<unknown>;
|
|
57
|
-
drawPolygonFromPoints(latLngs: Array<LatLng>): void;
|
|
58
|
-
deleteMarkers(): void;
|
|
59
|
-
deleteShape(): void;
|
|
60
|
-
hasShape(): boolean;
|
|
61
|
-
getShape(): Polyline;
|
|
62
|
-
getShapePoints(): Array<LatLng>;
|
|
63
|
-
initSearch(): Promise<unknown>;
|
|
64
|
-
isInitialized(): boolean;
|
|
65
|
-
getInfowindow(): Popup;
|
|
66
|
-
getInfowindowCarousel(): Popup;
|
|
67
|
-
getMap(): LMap;
|
|
68
|
-
getMapContainer(): HTMLElement;
|
|
69
|
-
getMarkers(): Map<number, Marker>;
|
|
70
|
-
getMarkersCount(): number;
|
|
71
|
-
getMarkerClusterer(): MarkerClusterGroup;
|
|
72
|
-
addListener(obj: any, event: string, fn: (args?: any) => unknown | void): void;
|
|
73
|
-
init(selector: JQuery, apiKey: string, COLORS: Record<string, string>, opts?: any, longLat?: {
|
|
74
|
-
longitude: number;
|
|
75
|
-
latitude: number;
|
|
76
|
-
} | null, zoom?: number): void;
|
|
77
|
-
load(config: any, apiKey: string, opts: any): void;
|
|
78
|
-
startSpinner(): void;
|
|
79
|
-
stopSpinner(): void;
|
|
80
|
-
ready(fn: () => unknown): void;
|
|
81
|
-
on(event: string, fn: any): void;
|
|
82
|
-
setCenter(lat: number, lng: number, zoom?: number): void;
|
|
83
|
-
setZoom(zoom: number): void;
|
|
84
|
-
getZoom(): number;
|
|
85
|
-
reset(): void;
|
|
86
|
-
fitBounds(myBounds: {
|
|
87
|
-
getNorthEast: () => LatLng;
|
|
88
|
-
getSouthWest: () => LatLng;
|
|
89
|
-
}, opts?: FitBoundsOptions): void;
|
|
90
|
-
fitZoom(myPoint: LatLng): void;
|
|
91
|
-
validateCoordinate(lat: number, lng: number): boolean;
|
|
92
|
-
getDistance(latLng: LatLng, otherLatLng: LatLng): number;
|
|
93
|
-
geocode(address: string): JQueryPromise<unknown>;
|
|
94
|
-
isMarkerInsidePolygon(coordinates: Array<number>, points: Array<LatLng>): boolean;
|
|
95
|
-
addButton(btn: JQuery): void;
|
|
96
|
-
addTouchHandler(): void;
|
|
97
|
-
}
|
|
98
|
-
export declare function getL(): any;
|
|
99
|
-
export {};
|
package/dist/geographyAPI.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("axios"),y=require("uuid"),P=require("./URLBuilderUtils.cjs"),c=require("./servicesUtils.cjs"),o=`${c.baseURL}/rest/geography`;let a=y.v4();const S=async(t,e,n=[])=>{a||(a=y.v4());const s=new URL(`${o}/placesAddressAutocomplete`),g=n.length,d=n.reduce((l,u,w)=>g===1?u:w===g-1?l:l+=`${u}|`,""),h=P.appendQueryString(s,{query:t,radius:e,sessionToken:a,types:d}),i=await r.get(h.toString());if(i.data.status!=="OK")throw new Error("There was an error in the request");return i.data.predictions},$=async t=>{const e=new URL(`${o}/getPlacesDetails`),n=P.appendQueryString(e,{placeId:t,sessionToken:a}),s=await r.get(n.toString());if(a="",s.data.status!=="OK")throw new Error("There was an error in the request");return s.data.result},p=async(t,e)=>{const n=new URL(`${o}/guessCityPlace/${t}/${e}`);return(await r.get(n.toString())).data},J=async t=>{if(t==null)throw new Error("The id can't be null");return(await r.get(`${o}/getPlaceFromPlaceID/${t}`)).data},O=async t=>{try{return(await r.get(`${o}/getCountryPolygonJson/${t}`)).data}catch(e){throw c.handleAxiosError(e),e}},A=async t=>{try{return(await r.get(`${o}/getRegionPolygonJson/${t}`)).data}catch(e){throw c.handleAxiosError(e),e}},v=async t=>{try{return(await r.get(`${o}/getCityPolygonJson/${t}`)).data}catch(e){throw c.handleAxiosError(e),e}},C=async t=>{try{return(await r.get(`${o}/getProvincePolygonJson/${t}`)).data}catch(e){throw c.handleAxiosError(e),e}};exports.getCityPolygonJSON=v;exports.getCountryPolygonJSON=O;exports.getPlaceFromPlaceID=J;exports.getPlacesAddressAutocomplete=S;exports.getPlacesDetails=$;exports.getProvincePolygonJSON=C;exports.getRegionPolygonJSON=A;exports.guessPlace=p;
|
package/dist/geographyAPI.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import r from "axios";
|
|
2
|
-
import { v4 as y } from "uuid";
|
|
3
|
-
import { appendQueryString as w } from "./URLBuilderUtils.js";
|
|
4
|
-
import { handleAxiosError as c, baseURL as $ } from "./servicesUtils.js";
|
|
5
|
-
const o = `${$}/rest/geography`;
|
|
6
|
-
let a = y();
|
|
7
|
-
const J = async (e, t, n = []) => {
|
|
8
|
-
a || (a = y());
|
|
9
|
-
const s = new URL(`${o}/placesAddressAutocomplete`), g = n.length, h = n.reduce((l, u, d) => g === 1 ? u : d === g - 1 ? l : l += `${u}|`, ""), P = w(s, {
|
|
10
|
-
query: e,
|
|
11
|
-
radius: t,
|
|
12
|
-
sessionToken: a,
|
|
13
|
-
types: h
|
|
14
|
-
}), i = await r.get(P.toString());
|
|
15
|
-
if (i.data.status !== "OK")
|
|
16
|
-
throw new Error("There was an error in the request");
|
|
17
|
-
return i.data.predictions;
|
|
18
|
-
}, C = async (e) => {
|
|
19
|
-
const t = new URL(`${o}/getPlacesDetails`), n = w(t, {
|
|
20
|
-
placeId: e,
|
|
21
|
-
sessionToken: a
|
|
22
|
-
}), s = await r.get(n.toString());
|
|
23
|
-
if (a = "", s.data.status !== "OK")
|
|
24
|
-
throw new Error("There was an error in the request");
|
|
25
|
-
return s.data.result;
|
|
26
|
-
}, O = async (e, t) => {
|
|
27
|
-
const n = new URL(
|
|
28
|
-
`${o}/guessCityPlace/${e}/${t}`
|
|
29
|
-
);
|
|
30
|
-
return (await r.get(n.toString())).data;
|
|
31
|
-
}, R = async (e) => {
|
|
32
|
-
if (e == null)
|
|
33
|
-
throw new Error("The id can't be null");
|
|
34
|
-
return (await r.get(`${o}/getPlaceFromPlaceID/${e}`)).data;
|
|
35
|
-
}, A = async (e) => {
|
|
36
|
-
try {
|
|
37
|
-
return (await r.get(
|
|
38
|
-
`${o}/getCountryPolygonJson/${e}`
|
|
39
|
-
)).data;
|
|
40
|
-
} catch (t) {
|
|
41
|
-
throw c(t), t;
|
|
42
|
-
}
|
|
43
|
-
}, v = async (e) => {
|
|
44
|
-
try {
|
|
45
|
-
return (await r.get(`${o}/getRegionPolygonJson/${e}`)).data;
|
|
46
|
-
} catch (t) {
|
|
47
|
-
throw c(t), t;
|
|
48
|
-
}
|
|
49
|
-
}, D = async (e) => {
|
|
50
|
-
try {
|
|
51
|
-
return (await r.get(`${o}/getCityPolygonJson/${e}`)).data;
|
|
52
|
-
} catch (t) {
|
|
53
|
-
throw c(t), t;
|
|
54
|
-
}
|
|
55
|
-
}, E = async (e) => {
|
|
56
|
-
try {
|
|
57
|
-
return (await r.get(
|
|
58
|
-
`${o}/getProvincePolygonJson/${e}`
|
|
59
|
-
)).data;
|
|
60
|
-
} catch (t) {
|
|
61
|
-
throw c(t), t;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
export {
|
|
65
|
-
D as getCityPolygonJSON,
|
|
66
|
-
A as getCountryPolygonJSON,
|
|
67
|
-
R as getPlaceFromPlaceID,
|
|
68
|
-
J as getPlacesAddressAutocomplete,
|
|
69
|
-
C as getPlacesDetails,
|
|
70
|
-
E as getProvincePolygonJSON,
|
|
71
|
-
v as getRegionPolygonJSON,
|
|
72
|
-
O as guessPlace
|
|
73
|
-
};
|
package/dist/icons.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r='<svg viewBox="0 0 128 128" class="icon-spin"><circle class="path" cx="64" cy="64" r="42" fill="none" stroke-width="9"></circle></svg>';function c(i,n=!1){if(!i)return;const e=$(i),t=$(r);e.attr("disabled","disabled");const s=e.find(".icon");s.length?(e.data("icon-prev",s),t.addClass(s.attr("class")||""),s.replaceWith(t)):(t.addClass(`icon icon-md ${n?"ml-5":"mr-5"}`),n?e.append(t):e.prepend(t))}function o(i){if(!i)return;const n=$(i);n.removeAttr("disabled");const e=n.find(".icon-spin"),t=n.data("icon-prev");t?e.replaceWith(t):e.remove()}$(()=>{[].slice.call(document.querySelectorAll("[data-spinner]")).forEach(n=>{const e=$(n);e.on("click",()=>{e[0].hasAttribute("disabled")||(c(e),setTimeout(()=>{o(e)},3e4))})})});exports.SVG=r;exports.addSpinner=c;exports.removeSpinner=o;
|
package/dist/icons.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const c = '<svg viewBox="0 0 128 128" class="icon-spin"><circle class="path" cx="64" cy="64" r="42" fill="none" stroke-width="9"></circle></svg>';
|
|
2
|
-
function r(i, n = !1) {
|
|
3
|
-
if (!i)
|
|
4
|
-
return;
|
|
5
|
-
const e = $(i), t = $(c);
|
|
6
|
-
e.attr("disabled", "disabled");
|
|
7
|
-
const s = e.find(".icon");
|
|
8
|
-
s.length ? (e.data("icon-prev", s), t.addClass(s.attr("class") || ""), s.replaceWith(t)) : (t.addClass(`icon icon-md ${n ? "ml-5" : "mr-5"}`), n ? e.append(t) : e.prepend(t));
|
|
9
|
-
}
|
|
10
|
-
function a(i) {
|
|
11
|
-
if (!i)
|
|
12
|
-
return;
|
|
13
|
-
const n = $(i);
|
|
14
|
-
n.removeAttr("disabled");
|
|
15
|
-
const e = n.find(".icon-spin"), t = n.data("icon-prev");
|
|
16
|
-
t ? e.replaceWith(t) : e.remove();
|
|
17
|
-
}
|
|
18
|
-
$(() => {
|
|
19
|
-
[].slice.call(document.querySelectorAll("[data-spinner]")).forEach((n) => {
|
|
20
|
-
const e = $(n);
|
|
21
|
-
e.on("click", () => {
|
|
22
|
-
e[0].hasAttribute("disabled") || (r(e), setTimeout(() => {
|
|
23
|
-
a(e);
|
|
24
|
-
}, 3e4));
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
export {
|
|
29
|
-
c as SVG,
|
|
30
|
-
r as addSpinner,
|
|
31
|
-
a as removeSpinner
|
|
32
|
-
};
|
package/dist/insightsAPI.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("axios"),s=require("./servicesUtils.cjs"),e="/rest/insights",o=async r=>{try{return(await a.post(`${e}/getTransactionsGraphData`,r)).data}catch(t){throw s.handleAxiosError(t),t}};exports.getTransactionGraphData=o;
|
package/dist/insightsAPI.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import a from "axios";
|
|
2
|
-
import { handleAxiosError as o } from "./servicesUtils.js";
|
|
3
|
-
const s = "/rest/insights", i = async (t) => {
|
|
4
|
-
try {
|
|
5
|
-
return (await a.post(
|
|
6
|
-
`${s}/getTransactionsGraphData`,
|
|
7
|
-
t
|
|
8
|
-
)).data;
|
|
9
|
-
} catch (r) {
|
|
10
|
-
throw o(r), r;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
i as getTransactionGraphData
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|