@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.
Files changed (82) hide show
  1. package/dist/RESB_UrlBuilder.cjs +1 -1
  2. package/dist/RESB_UrlBuilder.js +70 -20
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +0 -17
  5. package/dist/index.js +60 -140
  6. package/package.json +2 -2
  7. package/dist/Control.Geocoder-Dyvby5gX.cjs +0 -1
  8. package/dist/Control.Geocoder-l0sNRNKZ.js +0 -1
  9. package/dist/FavoriteUtils.cjs +0 -1
  10. package/dist/FavoriteUtils.js +0 -13
  11. package/dist/GAutocompleteUtils.cjs +0 -1
  12. package/dist/GAutocompleteUtils.js +0 -23
  13. package/dist/Leaflet-BKkoCsyw.js +0 -6436
  14. package/dist/Leaflet-CHOsN941.cjs +0 -1
  15. package/dist/MapUtils.cjs +0 -1
  16. package/dist/MapUtils.js +0 -79
  17. package/dist/RequestUtils.cjs +0 -1
  18. package/dist/RequestUtils.js +0 -13
  19. package/dist/URLPagesFactory.cjs +0 -1
  20. package/dist/URLPagesFactory.js +0 -12
  21. package/dist/agencyAPI.cjs +0 -1
  22. package/dist/agencyAPI.js +0 -61
  23. package/dist/constants.cjs +0 -1
  24. package/dist/constants.js +0 -5
  25. package/dist/custom/constants.d.ts +0 -2
  26. package/dist/custom/icons.d.ts +0 -5
  27. package/dist/custom/leaflet_map.d.ts +0 -99
  28. package/dist/geographyAPI.cjs +0 -1
  29. package/dist/geographyAPI.js +0 -73
  30. package/dist/icons.cjs +0 -1
  31. package/dist/icons.js +0 -32
  32. package/dist/insightsAPI.cjs +0 -1
  33. package/dist/insightsAPI.js +0 -15
  34. package/dist/leaflet-Dyvby5gX.cjs +0 -1
  35. package/dist/leaflet-freedraw.esm-D8SxeKC1.js +0 -26934
  36. package/dist/leaflet-freedraw.esm-DSDVLXDC.cjs +0 -7
  37. package/dist/leaflet-l0sNRNKZ.js +0 -1
  38. package/dist/leaflet.draw-Dyvby5gX.cjs +0 -1
  39. package/dist/leaflet.draw-l0sNRNKZ.js +0 -1
  40. package/dist/leaflet_map.cjs +0 -1
  41. package/dist/leaflet_map.js +0 -454
  42. package/dist/mailAPI.cjs +0 -1
  43. package/dist/mailAPI.js +0 -51
  44. package/dist/placesAPI.cjs +0 -1
  45. package/dist/placesAPI.js +0 -47
  46. package/dist/portfolioCustomerAPI.cjs +0 -1
  47. package/dist/portfolioCustomerAPI.js +0 -14
  48. package/dist/publicUserAPI.cjs +0 -1
  49. package/dist/publicUserAPI.js +0 -142
  50. package/dist/realEstateAPI.cjs +0 -1
  51. package/dist/realEstateAPI.js +0 -67
  52. package/dist/requestAPI.cjs +0 -1
  53. package/dist/requestAPI.js +0 -17
  54. package/dist/services/agencyAPI.d.ts +0 -19
  55. package/dist/services/geographyAPI.d.ts +0 -9
  56. package/dist/services/insightsAPI.d.ts +0 -2
  57. package/dist/services/mailAPI.d.ts +0 -24
  58. package/dist/services/placesAPI.d.ts +0 -5
  59. package/dist/services/portfolioCustomerAPI.d.ts +0 -1
  60. package/dist/services/publicUserAPI.d.ts +0 -20
  61. package/dist/services/realEstateAPI.d.ts +0 -14
  62. package/dist/services/requestAPI.d.ts +0 -16
  63. package/dist/services/servicesUtils.d.ts +0 -8
  64. package/dist/services/statisticsAPI.d.ts +0 -9
  65. package/dist/services/valuationAPI.d.ts +0 -11
  66. package/dist/services/wikicasaPro.d.ts +0 -2
  67. package/dist/servicesUtils.cjs +0 -3
  68. package/dist/servicesUtils.js +0 -12
  69. package/dist/statisticsAPI.cjs +0 -1
  70. package/dist/statisticsAPI.js +0 -58
  71. package/dist/style.css +0 -1
  72. package/dist/types-BaBnqzzG.js +0 -85
  73. package/dist/types-CwWBrQCP.cjs +0 -1
  74. package/dist/utils/FavoriteUtils.d.ts +0 -2
  75. package/dist/utils/GAutocompleteUtils.d.ts +0 -6
  76. package/dist/utils/MapUtils.d.ts +0 -23
  77. package/dist/utils/RequestUtils.d.ts +0 -2
  78. package/dist/utils/URLPagesFactory.d.ts +0 -9
  79. package/dist/valuationAPI.cjs +0 -1
  80. package/dist/valuationAPI.js +0 -21
  81. package/dist/wikicasaPro.cjs +0 -1
  82. package/dist/wikicasaPro.js +0 -14
@@ -1,85 +0,0 @@
1
- var i = /* @__PURE__ */ ((o) => (o[o.SELLING = 0] = "SELLING", o[o.SALE = 1] = "SALE", o[o.RENT = 2] = "RENT", o[o.AUCTION = 3] = "AUCTION", o))(i || {});
2
- const r = {
3
- priceFrom: "PrezzoMinimo",
4
- priceTo: "PrezzoMassimo",
5
- sqMfrom: "SuperficieMinima",
6
- sqMto: "SuperficieMassima",
7
- roomsFrom: "NumeroMinimoLocali",
8
- roomsTo: "NumeroMassimoLocali",
9
- bathroomsFrom: "NumeroMinimoBagni",
10
- bathroomsTo: "NumeroMassimoBagni",
11
- conditionType: "StatoImmobile",
12
- energyClassFilter: "ClasseEnergetica",
13
- floor: "Piano",
14
- excludeAuctions: "EscludiAste",
15
- shortRentOnly: "SoloAffittiBrevi",
16
- excludeBareOwnership: "EscludiNudaProprieta",
17
- onlyPublicUser: "DaPrivato",
18
- balcony: "Balcone",
19
- terrace: "Terrazzo",
20
- balconyTerrace: "BalconeTerrazzo",
21
- boxCarSpot: "BoxPostoAuto",
22
- carSpot: "PostoAuto",
23
- box: "Box",
24
- lift: "Ascensore",
25
- privateGarden: "GiardinoPrivato",
26
- publicGarden: "GiardinoPubblico",
27
- cellar: "Cantina",
28
- airConditioning: "AriaCondizionata",
29
- furnished: "Arredato",
30
- publicTransport: "Trasporti",
31
- school: "Istruzione",
32
- market: "Supermercati",
33
- hospital: "Ospedali",
34
- pharmacy: "Farmacie",
35
- charging: "Ricarica",
36
- post: "UfficioPostale",
37
- bank: "Banche",
38
- swimmingPoolPrivate: "PiscinaPrivata",
39
- swimmingPoolPublic: "PiscinaCondominiale",
40
- luxury: "Lusso",
41
- discounted: "Sconto",
42
- /* Don't consider this prop in the filters counter */
43
- filterOrderId: "Ordinamento"
44
- }, a = {
45
- sale: "Vendita",
46
- rent: "Affitto",
47
- auctionType: "Asta",
48
- bareOwnershipType: "NudaProprieta",
49
- typologyIdList: "Tipologia",
50
- filterOrderId: "Ordinamento"
51
- };
52
- function e() {
53
- return {
54
- sale: !0,
55
- rent: !1,
56
- contractType: window._contractDefault,
57
- excludeAuctions: !1,
58
- shortRentOnly: !1,
59
- excludeBareOwnership: !1,
60
- macroTypologyId: window._macroTypologyDefault,
61
- listingTypologyId: 0,
62
- listingTypologyURL: window._listingTypologyURLDefault,
63
- listingTypologyIdList: [0],
64
- typologyIdList: window._typologyIdListDefault,
65
- onlyVisible: !0,
66
- subscriptionTypes: window._subscriptionTypesDefault
67
- };
68
- }
69
- function t() {
70
- return {
71
- active: !0,
72
- hourly: !1,
73
- latitude: 0,
74
- longitude: 0,
75
- saveSearchParameterId: null,
76
- searchBean: e(),
77
- title: ""
78
- };
79
- }
80
- export {
81
- t as $,
82
- r as k,
83
- i as r,
84
- a as z
85
- };
@@ -1 +0,0 @@
1
- "use strict";var i=(o=>(o[o.SELLING=0]="SELLING",o[o.SALE=1]="SALE",o[o.RENT=2]="RENT",o[o.AUCTION=3]="AUCTION",o))(i||{});const r={priceFrom:"PrezzoMinimo",priceTo:"PrezzoMassimo",sqMfrom:"SuperficieMinima",sqMto:"SuperficieMassima",roomsFrom:"NumeroMinimoLocali",roomsTo:"NumeroMassimoLocali",bathroomsFrom:"NumeroMinimoBagni",bathroomsTo:"NumeroMassimoBagni",conditionType:"StatoImmobile",energyClassFilter:"ClasseEnergetica",floor:"Piano",excludeAuctions:"EscludiAste",shortRentOnly:"SoloAffittiBrevi",excludeBareOwnership:"EscludiNudaProprieta",onlyPublicUser:"DaPrivato",balcony:"Balcone",terrace:"Terrazzo",balconyTerrace:"BalconeTerrazzo",boxCarSpot:"BoxPostoAuto",carSpot:"PostoAuto",box:"Box",lift:"Ascensore",privateGarden:"GiardinoPrivato",publicGarden:"GiardinoPubblico",cellar:"Cantina",airConditioning:"AriaCondizionata",furnished:"Arredato",publicTransport:"Trasporti",school:"Istruzione",market:"Supermercati",hospital:"Ospedali",pharmacy:"Farmacie",charging:"Ricarica",post:"UfficioPostale",bank:"Banche",swimmingPoolPrivate:"PiscinaPrivata",swimmingPoolPublic:"PiscinaCondominiale",luxury:"Lusso",discounted:"Sconto",filterOrderId:"Ordinamento"},e={sale:"Vendita",rent:"Affitto",auctionType:"Asta",bareOwnershipType:"NudaProprieta",typologyIdList:"Tipologia",filterOrderId:"Ordinamento"};function a(){return{sale:!0,rent:!1,contractType:window._contractDefault,excludeAuctions:!1,shortRentOnly:!1,excludeBareOwnership:!1,macroTypologyId:window._macroTypologyDefault,listingTypologyId:0,listingTypologyURL:window._listingTypologyURLDefault,listingTypologyIdList:[0],typologyIdList:window._typologyIdListDefault,onlyVisible:!0,subscriptionTypes:window._subscriptionTypesDefault}}function t(){return{active:!0,hourly:!1,latitude:0,longitude:0,saveSearchParameterId:null,searchBean:a(),title:""}}exports.$=t;exports.k=r;exports.r=i;exports.z=e;
@@ -1,2 +0,0 @@
1
- export declare const showRemoveFavoritesIcons: (id: number) => void;
2
- export declare const showAddFavoritesIcon: (id: number) => void;
@@ -1,6 +0,0 @@
1
- import type { Place, GPlaceDetails } from "@wikicasa-dev/types";
2
- export declare const googlePlaceConverter: (gPlace: GPlaceDetails, address: string) => Promise<Place>;
3
- export declare const getPlaceFromGAutocomplete: (placeId: string, label: string) => Promise<{
4
- place: Place;
5
- address: string;
6
- }>;
@@ -1,23 +0,0 @@
1
- import type { LatLng } from "leaflet";
2
- import Leaflet_map from "../custom/leaflet_map";
3
- declare global {
4
- interface Window {
5
- _mapRange?: number;
6
- }
7
- }
8
- export declare function parsePoints(polygonFromMap: string): Array<LatLng> | undefined;
9
- /**
10
- * @param polygon An array of latitude and polygon that will be used to design an area in a map
11
- * @param forUrl If true, the output string will be encoded as a URI so respecting the UTF-8 encoding
12
- * */
13
- export declare function encodePolygon(polygon: Array<LatLng>, forUrl?: boolean): string;
14
- export declare function getMinMaxLatLng(polygon: Array<LatLng>): {
15
- miny: number;
16
- maxy: number;
17
- minx: number;
18
- maxx: number;
19
- };
20
- export declare function removeDuplicatePoints(latLngs: Array<LatLng>): Array<LatLng>;
21
- export declare function calcPolygonCenter(points: Array<LatLng>): LatLng;
22
- export declare function validateMap(map: Leaflet_map): boolean;
23
- export declare function getPolygonString(shapePoints: Array<LatLng>): string;
@@ -1,2 +0,0 @@
1
- import type { RequestGeneric } from "@wikicasa-dev/types";
2
- export declare function sendRequestGeneric(rg: RequestGeneric): Promise<unknown>;
@@ -1,9 +0,0 @@
1
- import type { PAGES } from "@wikicasa-dev/types";
2
- declare global {
3
- interface Window {
4
- _baseURL: string;
5
- _privateURL: string;
6
- _saveSearchesURL: string;
7
- }
8
- }
9
- export declare const getURLPage: (page: PAGES) => string;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("axios"),s=require("./servicesUtils.cjs"),c=require("./URLBuilderUtils.cjs"),d="/rest/wikicasaPro",u=async(o,a,r=void 0,i=void 0)=>{if(!a)throw new Error("The token can't be null");try{let e={token:a};r&&(e={...e,conditionTypeId:r}),i!=null&&(e={...e,floor:i});const l=c.appendQueryString(new URL(`${s.baseURL}${d}/evaluateRealEstateWidget`),e),t=await n.post(l.toString(),o);return t.data.valid=!!t.data.valid,t.data}catch(e){throw s.handleAxiosError(e),e}};exports.evaluateRealEstateWidget=u;
@@ -1,21 +0,0 @@
1
- import n from "axios";
2
- import { baseURL as l, handleAxiosError as d } from "./servicesUtils.js";
3
- import { appendQueryString as c } from "./URLBuilderUtils.js";
4
- const m = "/rest/wikicasaPro", w = async (i, r, e = void 0, o = void 0) => {
5
- if (!r)
6
- throw new Error("The token can't be null");
7
- try {
8
- let t = { token: r };
9
- e && (t = { ...t, conditionTypeId: e }), o != null && (t = { ...t, floor: o });
10
- const s = c(
11
- new URL(`${l}${m}/evaluateRealEstateWidget`),
12
- t
13
- ), a = await n.post(s.toString(), i);
14
- return a.data.valid = !!a.data.valid, a.data;
15
- } catch (t) {
16
- throw d(t), t;
17
- }
18
- };
19
- export {
20
- w as evaluateRealEstateWidget
21
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("axios"),i=require("./servicesUtils.cjs"),c="/rest/wikicasaPro",n=async(r,o,a,t=0)=>{try{return(await s.post(`${c}/userValuationWithPhotoFeedback/?email=${r}&token=${o}&feedback=${a}${t>0?"&userFeedbackValue="+t:""}`)).data}catch(e){throw i.handleAxiosError(e),e}};exports.userValuationWithPhotoFeedback=n;
@@ -1,14 +0,0 @@
1
- import s from "axios";
2
- import { handleAxiosError as i } from "./servicesUtils.js";
3
- const c = "/rest/wikicasaPro", l = async (r, a, e, o = 0) => {
4
- try {
5
- return (await s.post(
6
- `${c}/userValuationWithPhotoFeedback/?email=${r}&token=${a}&feedback=${e}${o > 0 ? "&userFeedbackValue=" + o : ""}`
7
- )).data;
8
- } catch (t) {
9
- throw i(t), t;
10
- }
11
- };
12
- export {
13
- l as userValuationWithPhotoFeedback
14
- };