@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
package/dist/RESB_UrlBuilder.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var c=(o=>(o[o.SELLING=0]="SELLING",o[o.SALE=1]="SALE",o[o.RENT=2]="RENT",o[o.AUCTION=3]="AUCTION",o))(c||{});const u={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"},s={sale:"Vendita",rent:"Affitto",auctionType:"Asta",bareOwnershipType:"NudaProprieta",typologyIdList:"Tipologia",filterOrderId:"Ordinamento"};function m(o,r,i,n,l,t,a){let e="/";return i&&(e+=(i==c.AUCTION?window._auctionLabel:i==c.RENT?window._rentLabel:window._saleLabel)+"-"),e+=`${r}/`,t&&(e+=`${t}/`),o&&(e+=`${o.replace(/^-+|-+$/g,"")}/`),n&&(e+=`${n.replace(/^_+|_+$/g,"")}/`),!n&&a&&(e+=`${a.replace(/^_+|_+$/g,"")}/`),l&&(e+=`${l.replace(/^_+|_+$/g,"")}/`),e}function d(o){const r=Object.keys(u).map(i=>o[i]?encodeURIComponent(u[i])+"="+encodeURIComponent(o[i]):null).filter(i=>i!==null);return r.length?`?${r.join("&")}`:""}function p(o){const r=Object.keys(s).map(i=>{if(o[i])if(Array.isArray(o[i])){const n=o[i],l=s[i];let t="";for(let a=0;a<n.length;a++)t+=encodeURIComponent(l)+"="+encodeURIComponent(n[a]),t+=a<n.length-1?"&":"";return t}else return encodeURIComponent(s[i])+"="+encodeURIComponent(o[i]);else return null}).filter(i=>i!==null);return r.length?`?${r.join("&")}`:""}exports.buildParams=d;exports.buildParamsForAgency=p;exports.buildURL=m;
|
package/dist/RESB_UrlBuilder.js
CHANGED
|
@@ -1,30 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var c = /* @__PURE__ */ ((o) => (o[o.SELLING = 0] = "SELLING", o[o.SALE = 1] = "SALE", o[o.RENT = 2] = "RENT", o[o.AUCTION = 3] = "AUCTION", o))(c || {});
|
|
2
|
+
const u = {
|
|
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
|
+
}, s = {
|
|
45
|
+
sale: "Vendita",
|
|
46
|
+
rent: "Affitto",
|
|
47
|
+
auctionType: "Asta",
|
|
48
|
+
bareOwnershipType: "NudaProprieta",
|
|
49
|
+
typologyIdList: "Tipologia",
|
|
50
|
+
filterOrderId: "Ordinamento"
|
|
51
|
+
};
|
|
52
|
+
function m(o, e, i, n, l, t, a) {
|
|
3
53
|
let r = "/";
|
|
4
|
-
return
|
|
54
|
+
return i && (r += (i == c.AUCTION ? window._auctionLabel : i == c.RENT ? window._rentLabel : window._saleLabel) + "-"), r += `${e}/`, t && (r += `${t}/`), o && (r += `${o.replace(/^-+|-+$/g, "")}/`), n && (r += `${n.replace(/^_+|_+$/g, "")}/`), !n && a && (r += `${a.replace(/^_+|_+$/g, "")}/`), l && (r += `${l.replace(/^_+|_+$/g, "")}/`), r;
|
|
5
55
|
}
|
|
6
|
-
function d(
|
|
7
|
-
const
|
|
8
|
-
return
|
|
56
|
+
function d(o) {
|
|
57
|
+
const e = Object.keys(u).map((i) => o[i] ? encodeURIComponent(u[i]) + "=" + encodeURIComponent(o[i]) : null).filter((i) => i !== null);
|
|
58
|
+
return e.length ? `?${e.join("&")}` : "";
|
|
9
59
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
if (Array.isArray(
|
|
14
|
-
const
|
|
15
|
-
let
|
|
16
|
-
for (let
|
|
17
|
-
|
|
18
|
-
return
|
|
60
|
+
function p(o) {
|
|
61
|
+
const e = Object.keys(s).map((i) => {
|
|
62
|
+
if (o[i])
|
|
63
|
+
if (Array.isArray(o[i])) {
|
|
64
|
+
const n = o[i], l = s[i];
|
|
65
|
+
let t = "";
|
|
66
|
+
for (let a = 0; a < n.length; a++)
|
|
67
|
+
t += encodeURIComponent(l) + "=" + encodeURIComponent(n[a]), t += a < n.length - 1 ? "&" : "";
|
|
68
|
+
return t;
|
|
19
69
|
} else
|
|
20
|
-
return encodeURIComponent(
|
|
70
|
+
return encodeURIComponent(s[i]) + "=" + encodeURIComponent(o[i]);
|
|
21
71
|
else
|
|
22
72
|
return null;
|
|
23
|
-
}).filter((
|
|
24
|
-
return
|
|
73
|
+
}).filter((i) => i !== null);
|
|
74
|
+
return e.length ? `?${e.join("&")}` : "";
|
|
25
75
|
}
|
|
26
76
|
export {
|
|
27
77
|
d as buildParams,
|
|
28
|
-
|
|
29
|
-
|
|
78
|
+
p as buildParamsForAgency,
|
|
79
|
+
m as buildURL
|
|
30
80
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./ArrayUtils.cjs"),u=require("./ColorUtils.cjs"),t=require("./CookieUtils.cjs"),d=require("./CurrencyUtils.cjs"),b=require("./DateUtils.cjs"),o=require("./DeviceDetectionUtils.cjs"),i=require("./DOMUtils.cjs"),p=require("./EmailUtils.cjs"),l=require("./FunctionUtils.cjs"),n=require("./GenericUtils.cjs"),r=require("./NumberUtils.cjs"),s=require("./ObjectUtils.cjs"),C=require("./ObserverUtils.cjs"),c=require("./PermissionUtils.cjs"),a=require("./RESB_UrlBuilder.cjs"),e=require("./StringUtils.cjs"),y=require("./URLBuilderUtils.cjs");exports.isArrNullOrEmpty=m.isArrNullOrEmpty;exports.rgba=u.rgba;exports.decodeCookie=t.decodeCookie;exports.encodeCookie=t.encodeCookie;exports.getCookie=t.getCookie;exports.removeCookie=t.removeCookie;exports.formatCurrency=d.formatCurrency;exports.formatDate=b.formatDate;exports.isMobile=o.isMobile;exports.isSafari=o.isSafari;exports.isiOSDevice=o.isiOSDevice;exports.emptyElem=i.emptyElem;exports.getSingleElement=i.getSingleElement;exports.hideElem=i.hideElem;exports.showElem=i.showElem;exports.hashEmail=p.hashEmail;exports.debounce=l.debounce;exports.isPromise=l.isPromise;exports.awaitableSetTimeout=n.awaitableSetTimeout;exports.createCustomEvent=n.createCustomEvent;exports.formatFloat=r.formatFloat;exports.formatInteger=r.formatInteger;exports.formatLocaleNumber=r.formatLocaleNumber;exports.formatNumber=r.formatNumber;exports.formatterNumberObj=r.formatterNumberObj;exports.parseLocaleNumber=r.parseLocaleNumber;exports.deepCopy=s.deepCopy;exports.isEmptyObject=s.isEmptyObject;exports.shallowCopyObjectTo=s.shallowCopyObjectTo;exports.observeOnce=C.observeOnce;exports.addPermissionStateListener=c.addPermissionStateListener;exports.onNotificationsPermissionChange=c.onNotificationsPermissionChange;exports.buildParams=a.buildParams;exports.buildParamsForAgency=a.buildParamsForAgency;exports.buildURL=a.buildURL;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.cleanASCII=e.cleanASCII;exports.decodeTextWithEntities=e.decodeTextWithEntities;exports.formatAddress=e.formatAddress;exports.replaceAll=e.replaceAll;exports.replaceAllTokens=e.replaceAllTokens;exports.stringToHyphened=e.stringToHyphened;exports.appendQueryString=y.appendQueryString;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
export { sendAgencyContactAsync, getAgencyById, sendMortgage, getAgenciesData, } from './services/agencyAPI';
|
|
2
|
-
export * from './services/geographyAPI';
|
|
3
|
-
export * from './services/insightsAPI';
|
|
4
|
-
export * from './services/mailAPI';
|
|
5
|
-
export * from './services/placesAPI';
|
|
6
|
-
export * from './services/portfolioCustomerAPI';
|
|
7
|
-
export * from './services/publicUserAPI';
|
|
8
|
-
export * from './services/realEstateAPI';
|
|
9
|
-
export * from './services/requestAPI';
|
|
10
|
-
export * from './services/servicesUtils';
|
|
11
|
-
export * from './services/statisticsAPI';
|
|
12
|
-
export * from './services/valuationAPI';
|
|
13
|
-
export * from './services/wikicasaPro';
|
|
14
1
|
export * from './utils/ArrayUtils';
|
|
15
2
|
export * from './utils/ColorUtils';
|
|
16
3
|
export * from './utils/CookieUtils';
|
|
@@ -20,15 +7,11 @@ export * from './utils/DeviceDetectionUtils';
|
|
|
20
7
|
export * from './utils/DOMUtils';
|
|
21
8
|
export * from './utils/EmailUtils';
|
|
22
9
|
export * from './utils/FunctionUtils';
|
|
23
|
-
export * from './utils/FavoriteUtils';
|
|
24
|
-
export * from './utils/GAutocompleteUtils';
|
|
25
10
|
export * from './utils/GenericUtils';
|
|
26
11
|
export * from './utils/NumberUtils';
|
|
27
12
|
export * from './utils/ObjectUtils';
|
|
28
13
|
export * from './utils/ObserverUtils';
|
|
29
14
|
export * from './utils/PermissionUtils';
|
|
30
|
-
export * from './utils/RequestUtils';
|
|
31
15
|
export * from './utils/RESB_UrlBuilder';
|
|
32
16
|
export * from './utils/StringUtils';
|
|
33
17
|
export * from './utils/URLBuilderUtils';
|
|
34
|
-
export * from './utils/URLPagesFactory';
|
package/dist/index.js
CHANGED
|
@@ -1,142 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { formatDate as ke } from "./DateUtils.js";
|
|
19
|
-
import { isMobile as De, isSafari as Oe, isiOSDevice as Ue } from "./DeviceDetectionUtils.js";
|
|
20
|
-
import { emptyElem as Me, getSingleElement as Te, hideElem as we, showElem as Be } from "./DOMUtils.js";
|
|
21
|
-
import { hashEmail as Ge } from "./EmailUtils.js";
|
|
22
|
-
import { debounce as We, isPromise as je } from "./FunctionUtils.js";
|
|
23
|
-
import { showAddFavoritesIcon as Qe, showRemoveFavoritesIcons as Ze } from "./FavoriteUtils.js";
|
|
24
|
-
import { getPlaceFromGAutocomplete as He, googlePlaceConverter as Ke } from "./GAutocompleteUtils.js";
|
|
25
|
-
import { awaitableSetTimeout as Ye, createCustomEvent as _e } from "./GenericUtils.js";
|
|
26
|
-
import { formatFloat as et, formatInteger as tt, formatLocaleNumber as ot, formatNumber as rt, formatterNumberObj as at, parseLocaleNumber as st } from "./NumberUtils.js";
|
|
27
|
-
import { deepCopy as it, isEmptyObject as mt, shallowCopyObjectTo as lt } from "./ObjectUtils.js";
|
|
28
|
-
import { observeOnce as gt } from "./ObserverUtils.js";
|
|
29
|
-
import { addPermissionStateListener as dt, onNotificationsPermissionChange as ft } from "./PermissionUtils.js";
|
|
30
|
-
import { sendRequestGeneric as xt } from "./RequestUtils.js";
|
|
31
|
-
import { buildParams as ht, buildParamsForAgency as St, buildURL as bt } from "./RESB_UrlBuilder.js";
|
|
32
|
-
import { capitalizeFirstLetter as yt, cleanASCII as Ct, decodeTextWithEntities as At, formatAddress as Rt, replaceAll as Ft, replaceAllTokens as Et, stringToHyphened as Nt } from "./StringUtils.js";
|
|
33
|
-
import { appendQueryString as It } from "./URLBuilderUtils.js";
|
|
34
|
-
import { getURLPage as Ot } from "./URLPagesFactory.js";
|
|
1
|
+
import { isArrNullOrEmpty as r } from "./ArrayUtils.js";
|
|
2
|
+
import { rgba as m } from "./ColorUtils.js";
|
|
3
|
+
import { decodeCookie as a, encodeCookie as p, getCookie as f, removeCookie as s } from "./CookieUtils.js";
|
|
4
|
+
import { formatCurrency as n } from "./CurrencyUtils.js";
|
|
5
|
+
import { formatDate as x } from "./DateUtils.js";
|
|
6
|
+
import { isMobile as b, isSafari as u, isiOSDevice as C } from "./DeviceDetectionUtils.js";
|
|
7
|
+
import { emptyElem as y, getSingleElement as E, hideElem as h, showElem as S } from "./DOMUtils.js";
|
|
8
|
+
import { hashEmail as N } from "./EmailUtils.js";
|
|
9
|
+
import { debounce as k, isPromise as L } from "./FunctionUtils.js";
|
|
10
|
+
import { awaitableSetTimeout as T, createCustomEvent as v } from "./GenericUtils.js";
|
|
11
|
+
import { formatFloat as w, formatInteger as F, formatLocaleNumber as I, formatNumber as D, formatterNumberObj as z, parseLocaleNumber as H } from "./NumberUtils.js";
|
|
12
|
+
import { deepCopy as Q, isEmptyObject as R, shallowCopyObjectTo as U } from "./ObjectUtils.js";
|
|
13
|
+
import { observeOnce as q } from "./ObserverUtils.js";
|
|
14
|
+
import { addPermissionStateListener as G, onNotificationsPermissionChange as J } from "./PermissionUtils.js";
|
|
15
|
+
import { buildParams as V, buildParamsForAgency as X, buildURL as Y } from "./RESB_UrlBuilder.js";
|
|
16
|
+
import { capitalizeFirstLetter as _, cleanASCII as $, decodeTextWithEntities as ee, formatAddress as oe, replaceAll as re, replaceAllTokens as te, stringToHyphened as me } from "./StringUtils.js";
|
|
17
|
+
import { appendQueryString as ae } from "./URLBuilderUtils.js";
|
|
35
18
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
l as getPlaceFromPlaceID,
|
|
80
|
-
me as getPlaceTrendData,
|
|
81
|
-
p as getPlacesAddressAutocomplete,
|
|
82
|
-
F as getPlacesByQuery,
|
|
83
|
-
g as getPlacesDetails,
|
|
84
|
-
c as getProvincePolygonJSON,
|
|
85
|
-
q as getPublicUser,
|
|
86
|
-
G as getPublicUserSaveSearchList,
|
|
87
|
-
K as getRealEstateCounter,
|
|
88
|
-
X as getRealEstateNotes,
|
|
89
|
-
Y as getRealEstatesData,
|
|
90
|
-
d as getRegionPolygonJSON,
|
|
91
|
-
le as getSaleGraphData,
|
|
92
|
-
J as getSavedSearchesCount,
|
|
93
|
-
Te as getSingleElement,
|
|
94
|
-
x as getTransactionGraphData,
|
|
95
|
-
Ot as getURLPage,
|
|
96
|
-
E as getZones,
|
|
97
|
-
Ke as googlePlaceConverter,
|
|
98
|
-
f as guessPlace,
|
|
99
|
-
ne as handleAxiosError,
|
|
100
|
-
Ge as hashEmail,
|
|
101
|
-
we as hideElem,
|
|
102
|
-
he as isArrNullOrEmpty,
|
|
103
|
-
mt as isEmptyObject,
|
|
104
|
-
De as isMobile,
|
|
105
|
-
je as isPromise,
|
|
106
|
-
Oe as isSafari,
|
|
107
|
-
Ue as isiOSDevice,
|
|
108
|
-
gt as observeOnce,
|
|
109
|
-
ft as onNotificationsPermissionChange,
|
|
110
|
-
st as parseLocaleNumber,
|
|
111
|
-
Re as removeCookie,
|
|
112
|
-
W as removeFavourites,
|
|
113
|
-
Ft as replaceAll,
|
|
114
|
-
Et as replaceAllTokens,
|
|
115
|
-
be as rgba,
|
|
116
|
-
_ as saveSearch,
|
|
117
|
-
$ as saveSearchFromRequest,
|
|
118
|
-
j as saveUserFirebaseToken,
|
|
119
|
-
a as sendAgencyContactAsync,
|
|
120
|
-
h as sendBrochureMR,
|
|
121
|
-
S as sendBrochureRequest,
|
|
122
|
-
b as sendInfoMR,
|
|
123
|
-
v as sendInfoPremium,
|
|
124
|
-
y as sendJobApplicationForm,
|
|
125
|
-
s as sendMortgage,
|
|
126
|
-
xt as sendRequestGeneric,
|
|
127
|
-
oe as sendSuggestion,
|
|
128
|
-
re as sendWidgetRequest,
|
|
129
|
-
lt as shallowCopyObjectTo,
|
|
130
|
-
Qe as showAddFavoritesIcon,
|
|
131
|
-
Be as showElem,
|
|
132
|
-
Ze as showRemoveFavoritesIcons,
|
|
133
|
-
Nt as stringToHyphened,
|
|
134
|
-
V as updateMarketingConsent,
|
|
135
|
-
k as updateNewsletterConsent,
|
|
136
|
-
Q as updateNote,
|
|
137
|
-
pe as updatePhoneView,
|
|
138
|
-
Z as updatePublicUserSavedSearchBean,
|
|
139
|
-
ge as updateRealEstateSearch,
|
|
140
|
-
ce as updateViewListing,
|
|
141
|
-
xe as userValuationWithPhotoFeedback
|
|
19
|
+
G as addPermissionStateListener,
|
|
20
|
+
ae as appendQueryString,
|
|
21
|
+
T as awaitableSetTimeout,
|
|
22
|
+
V as buildParams,
|
|
23
|
+
X as buildParamsForAgency,
|
|
24
|
+
Y as buildURL,
|
|
25
|
+
_ as capitalizeFirstLetter,
|
|
26
|
+
$ as cleanASCII,
|
|
27
|
+
v as createCustomEvent,
|
|
28
|
+
k as debounce,
|
|
29
|
+
a as decodeCookie,
|
|
30
|
+
ee as decodeTextWithEntities,
|
|
31
|
+
Q as deepCopy,
|
|
32
|
+
y as emptyElem,
|
|
33
|
+
p as encodeCookie,
|
|
34
|
+
oe as formatAddress,
|
|
35
|
+
n as formatCurrency,
|
|
36
|
+
x as formatDate,
|
|
37
|
+
w as formatFloat,
|
|
38
|
+
F as formatInteger,
|
|
39
|
+
I as formatLocaleNumber,
|
|
40
|
+
D as formatNumber,
|
|
41
|
+
z as formatterNumberObj,
|
|
42
|
+
f as getCookie,
|
|
43
|
+
E as getSingleElement,
|
|
44
|
+
N as hashEmail,
|
|
45
|
+
h as hideElem,
|
|
46
|
+
r as isArrNullOrEmpty,
|
|
47
|
+
R as isEmptyObject,
|
|
48
|
+
b as isMobile,
|
|
49
|
+
L as isPromise,
|
|
50
|
+
u as isSafari,
|
|
51
|
+
C as isiOSDevice,
|
|
52
|
+
q as observeOnce,
|
|
53
|
+
J as onNotificationsPermissionChange,
|
|
54
|
+
H as parseLocaleNumber,
|
|
55
|
+
s as removeCookie,
|
|
56
|
+
re as replaceAll,
|
|
57
|
+
te as replaceAllTokens,
|
|
58
|
+
m as rgba,
|
|
59
|
+
U as shallowCopyObjectTo,
|
|
60
|
+
S as showElem,
|
|
61
|
+
me as stringToHyphened
|
|
142
62
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/utilities",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Wikicasa frontend utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"typescript": "^5.4.3",
|
|
40
40
|
"vite": "^5.2.3",
|
|
41
41
|
"vite-plugin-dts": "^3.7.3",
|
|
42
|
-
"@wikicasa-dev/types": "^0.
|
|
42
|
+
"@wikicasa-dev/types": "^1.0.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"axios": "^1.4.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/FavoriteUtils.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=e=>{document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach(s=>{s.classList.contains("fav-save")?s.style.display="none":s.classList.contains("fav-remove")&&(s.style.display="block")})},t=e=>{document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach(s=>{s.classList.contains("fav-save")?s.style.display="block":s.classList.contains("fav-remove")&&(s.style.display="none")})};exports.showAddFavoritesIcon=t;exports.showRemoveFavoritesIcons=a;
|
package/dist/FavoriteUtils.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const l = (a) => {
|
|
2
|
-
document.querySelectorAll(`a[class^=fav][data-id='${a}']`).forEach((s) => {
|
|
3
|
-
s.classList.contains("fav-save") ? s.style.display = "none" : s.classList.contains("fav-remove") && (s.style.display = "block");
|
|
4
|
-
});
|
|
5
|
-
}, o = (a) => {
|
|
6
|
-
document.querySelectorAll(`a[class^=fav][data-id='${a}']`).forEach((s) => {
|
|
7
|
-
s.classList.contains("fav-save") ? s.style.display = "block" : s.classList.contains("fav-remove") && (s.style.display = "none");
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
o as showAddFavoritesIcon,
|
|
12
|
-
l as showRemoveFavoritesIcons
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./StringUtils.cjs"),a=require("./geographyAPI.cjs"),d=async(s,n)=>{const o={};for(let e=0;e<s.address_components.length;e++)s.address_components[e].types.indexOf("administrative_area_level_3")!==-1?o.city=s.address_components[e].long_name:s.address_components[e].types.indexOf("locality")!==-1?o.locality=s.address_components[e].long_name:s.address_components[e].types.indexOf("route")!==-1?o.streetName=s.address_components[e].long_name:s.address_components[e].types.indexOf("street_number")!==-1?o.streetNumber=s.address_components[e].long_name:s.address_components[e].types.indexOf("postal_code")!==-1&&(o.zip=s.address_components[e].long_name);o.latitude=s.geometry.location.lat,o.longitude=s.geometry.location.lng,o.address=r.cleanASCII(n),typeof o.streetNumber>"u"&&(o.streetNumber=null);let t=await a.guessPlace(o.latitude,o.longitude);if(delete t.city,delete t.locality,t={...t,...o},!t.streetNumber){const e=parseInt(t.address.split(",")[1]),i=parseInt(t.zip);e&&e!==i&&(t.streetNumber=e.toString())}return t},l=async(s,n)=>{const o=await a.getPlacesDetails(s),t=await d(o,n),e=t.streetName?r.formatAddress(t.streetName,t.streetNumber||"",t.cityName):t.address;return{place:t,address:e}};exports.getPlaceFromGAutocomplete=l;exports.googlePlaceConverter=d;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { cleanASCII as d, formatAddress as a } from "./StringUtils.js";
|
|
2
|
-
import { guessPlace as i, getPlacesDetails as m } from "./geographyAPI.js";
|
|
3
|
-
const l = async (s, o) => {
|
|
4
|
-
const n = {};
|
|
5
|
-
for (let e = 0; e < s.address_components.length; e++)
|
|
6
|
-
s.address_components[e].types.indexOf(
|
|
7
|
-
"administrative_area_level_3"
|
|
8
|
-
) !== -1 ? n.city = s.address_components[e].long_name : s.address_components[e].types.indexOf("locality") !== -1 ? n.locality = s.address_components[e].long_name : s.address_components[e].types.indexOf("route") !== -1 ? n.streetName = s.address_components[e].long_name : s.address_components[e].types.indexOf("street_number") !== -1 ? n.streetNumber = s.address_components[e].long_name : s.address_components[e].types.indexOf("postal_code") !== -1 && (n.zip = s.address_components[e].long_name);
|
|
9
|
-
n.latitude = s.geometry.location.lat, n.longitude = s.geometry.location.lng, n.address = d(o), typeof n.streetNumber > "u" && (n.streetNumber = null);
|
|
10
|
-
let t = await i(n.latitude, n.longitude);
|
|
11
|
-
if (delete t.city, delete t.locality, t = { ...t, ...n }, !t.streetNumber) {
|
|
12
|
-
const e = parseInt(t.address.split(",")[1]), r = parseInt(t.zip);
|
|
13
|
-
e && e !== r && (t.streetNumber = e.toString());
|
|
14
|
-
}
|
|
15
|
-
return t;
|
|
16
|
-
}, _ = async (s, o) => {
|
|
17
|
-
const n = await m(s), t = await l(n, o), e = t.streetName ? a(t.streetName, t.streetNumber || "", t.cityName) : t.address;
|
|
18
|
-
return { place: t, address: e };
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
_ as getPlaceFromGAutocomplete,
|
|
22
|
-
l as googlePlaceConverter
|
|
23
|
-
};
|