@wikicasa-dev/utilities 1.1.20-alpha.2 → 1.1.20
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/{utils/AdressUtils.cjs → AdressUtils.cjs} +1 -1
- package/dist/DeviceDetectionUtils.cjs +1 -0
- package/dist/DeviceDetectionUtils.js +19 -0
- package/dist/RESB_UrlBuilder.cjs +1 -0
- package/dist/RESB_UrlBuilder.js +17 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +23 -23
- package/dist/types-B87NrRgz.cjs +1 -0
- package/dist/types-CBgxV9we.js +3526 -0
- package/package.json +2 -6
- package/dist/utils/DeviceDetectionUtils.cjs +0 -1
- package/dist/utils/DeviceDetectionUtils.js +0 -77
- package/dist/utils/RESB_UrlBuilder.cjs +0 -1
- package/dist/utils/RESB_UrlBuilder.js +0 -78
- /package/dist/{utils/AdressUtils.js → AdressUtils.js} +0 -0
- /package/dist/{utils/ArrayUtils.cjs → ArrayUtils.cjs} +0 -0
- /package/dist/{utils/ArrayUtils.js → ArrayUtils.js} +0 -0
- /package/dist/{utils/ColorUtils.cjs → ColorUtils.cjs} +0 -0
- /package/dist/{utils/ColorUtils.js → ColorUtils.js} +0 -0
- /package/dist/{utils/CookieUtils.cjs → CookieUtils.cjs} +0 -0
- /package/dist/{utils/CookieUtils.js → CookieUtils.js} +0 -0
- /package/dist/{utils/CurrencyUtils.cjs → CurrencyUtils.cjs} +0 -0
- /package/dist/{utils/CurrencyUtils.js → CurrencyUtils.js} +0 -0
- /package/dist/{utils/DOMUtils.cjs → DOMUtils.cjs} +0 -0
- /package/dist/{utils/DOMUtils.js → DOMUtils.js} +0 -0
- /package/dist/{utils/DateUtils.cjs → DateUtils.cjs} +0 -0
- /package/dist/{utils/DateUtils.js → DateUtils.js} +0 -0
- /package/dist/{utils/DownloadUtils.cjs → DownloadUtils.cjs} +0 -0
- /package/dist/{utils/DownloadUtils.js → DownloadUtils.js} +0 -0
- /package/dist/{utils/EmailUtils.cjs → EmailUtils.cjs} +0 -0
- /package/dist/{utils/EmailUtils.js → EmailUtils.js} +0 -0
- /package/dist/{utils/FunctionUtils.cjs → FunctionUtils.cjs} +0 -0
- /package/dist/{utils/FunctionUtils.js → FunctionUtils.js} +0 -0
- /package/dist/{utils/GAutocompleteUtils.cjs → GAutocompleteUtils.cjs} +0 -0
- /package/dist/{utils/GAutocompleteUtils.js → GAutocompleteUtils.js} +0 -0
- /package/dist/{utils/GenericUtils.cjs → GenericUtils.cjs} +0 -0
- /package/dist/{utils/GenericUtils.js → GenericUtils.js} +0 -0
- /package/dist/{utils/GeolocationUtils.cjs → GeolocationUtils.cjs} +0 -0
- /package/dist/{utils/GeolocationUtils.js → GeolocationUtils.js} +0 -0
- /package/dist/{utils/LazyLoadingBg.cjs → LazyLoadingBg.cjs} +0 -0
- /package/dist/{utils/LazyLoadingBg.js → LazyLoadingBg.js} +0 -0
- /package/dist/{utils/MapUtils.cjs → MapUtils.cjs} +0 -0
- /package/dist/{utils/MapUtils.js → MapUtils.js} +0 -0
- /package/dist/{utils/NumberUtils.cjs → NumberUtils.cjs} +0 -0
- /package/dist/{utils/NumberUtils.js → NumberUtils.js} +0 -0
- /package/dist/{utils/ObjectUtils.cjs → ObjectUtils.cjs} +0 -0
- /package/dist/{utils/ObjectUtils.js → ObjectUtils.js} +0 -0
- /package/dist/{types/ObjectUtilsTypes.cjs → ObjectUtilsTypes.cjs} +0 -0
- /package/dist/{types/ObjectUtilsTypes.js → ObjectUtilsTypes.js} +0 -0
- /package/dist/{utils/ObserverUtils.cjs → ObserverUtils.cjs} +0 -0
- /package/dist/{utils/ObserverUtils.js → ObserverUtils.js} +0 -0
- /package/dist/{utils/PermissionUtils.cjs → PermissionUtils.cjs} +0 -0
- /package/dist/{utils/PermissionUtils.js → PermissionUtils.js} +0 -0
- /package/dist/{utils/RegexUtils.cjs → RegexUtils.cjs} +0 -0
- /package/dist/{utils/RegexUtils.js → RegexUtils.js} +0 -0
- /package/dist/{utils/StringUtils.cjs → StringUtils.cjs} +0 -0
- /package/dist/{utils/StringUtils.js → StringUtils.js} +0 -0
- /package/dist/{utils/URLBuilderUtils.cjs → URLBuilderUtils.cjs} +0 -0
- /package/dist/{utils/URLBuilderUtils.js → URLBuilderUtils.js} +0 -0
- /package/dist/{vite-env.d.cjs → vite-env.cjs} +0 -0
- /package/dist/{vite-env.d.js → vite-env.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/utilities",
|
|
3
|
-
"version": "1.1.20
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"description": "Wikicasa frontend utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./functions/*": {
|
|
14
|
-
"import": "./dist/utils/*.js",
|
|
15
|
-
"types": "./dist/utils/*.d.ts"
|
|
16
12
|
}
|
|
17
13
|
},
|
|
18
14
|
"files": [
|
|
@@ -35,7 +31,7 @@
|
|
|
35
31
|
"@types/js-cookie": "^3.0.6",
|
|
36
32
|
"@types/leaflet": "^1.9.3",
|
|
37
33
|
"@types/node": "^20.5.0",
|
|
38
|
-
"@wikicasa-dev/types": "2.1.1
|
|
34
|
+
"@wikicasa-dev/types": "^2.1.1",
|
|
39
35
|
"glob": "^10.3.10",
|
|
40
36
|
"jest-environment-jsdom": "^29.7.0",
|
|
41
37
|
"ts-jest": "^29.2.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=n=>{const r=()=>{const e=[];for(const i in n){const l=n[i];e.push(l.id)}return e},s=()=>{const e=[];for(const i in n){const l=n[i];e.push(l.label)}return e},a=()=>{const e=[];for(const i in n)e.push(i);return e},u=()=>n,d=e=>{if(e==null)return null;for(const i in n)if(n[i].id===e)return n[i];return null},c=e=>{if(e==null)return null;for(const i in n)if(n[i].label===e)return n[i];return null},t=n;for(const e in t)t[e]!==void 0&&(t[e].key=e);return Object.defineProperty(t,"lookupById",{value:d,enumerable:!1}),Object.defineProperty(t,"lookupByLabel",{value:c,enumerable:!1}),Object.defineProperty(t,"getIds",{value:r,enumerable:!1}),Object.defineProperty(t,"getLabels",{value:s,enumerable:!1}),Object.defineProperty(t,"getKeys",{value:a,enumerable:!1}),Object.defineProperty(t,"getValues",{value:u,enumerable:!1}),t},o=b({SMALL:{id:576,label:"Small"},MEDIUM:{id:768,label:"Medium"},LARGE:{id:992,label:"Large"},EXTRA_LARGE:{id:1200,label:"Extra large"}}),f=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window?.MSStream,g=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator?.userAgent),v=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),m=()=>navigator?.userAgent.includes("Windows"),p=(n={sm:o.SMALL.id,md:o.MEDIUM.id,lg:o.LARGE.id,xl:o.EXTRA_LARGE.id})=>{const r=n;return window?.innerWidth<r.sm?"mobile":window?.innerWidth<r.lg?"tablet":"desktop"};exports.getCurrentDeviceSize=p;exports.isMobile=g;exports.isSafari=v;exports.isWindows=m;exports.isiOSDevice=f;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
const b = (n) => {
|
|
2
|
-
const o = () => {
|
|
3
|
-
const e = [];
|
|
4
|
-
for (const t in n) {
|
|
5
|
-
const l = n[t];
|
|
6
|
-
e.push(l.id);
|
|
7
|
-
}
|
|
8
|
-
return e;
|
|
9
|
-
}, s = () => {
|
|
10
|
-
const e = [];
|
|
11
|
-
for (const t in n) {
|
|
12
|
-
const l = n[t];
|
|
13
|
-
e.push(l.label);
|
|
14
|
-
}
|
|
15
|
-
return e;
|
|
16
|
-
}, a = () => {
|
|
17
|
-
const e = [];
|
|
18
|
-
for (const t in n)
|
|
19
|
-
e.push(t);
|
|
20
|
-
return e;
|
|
21
|
-
}, u = () => n, d = (e) => {
|
|
22
|
-
if (e == null) return null;
|
|
23
|
-
for (const t in n)
|
|
24
|
-
if (n[t].id === e)
|
|
25
|
-
return n[t];
|
|
26
|
-
return null;
|
|
27
|
-
}, c = (e) => {
|
|
28
|
-
if (e == null) return null;
|
|
29
|
-
for (const t in n)
|
|
30
|
-
if (n[t].label === e)
|
|
31
|
-
return n[t];
|
|
32
|
-
return null;
|
|
33
|
-
}, i = n;
|
|
34
|
-
for (const e in i)
|
|
35
|
-
i[e] !== void 0 && (i[e].key = e);
|
|
36
|
-
return Object.defineProperty(i, "lookupById", {
|
|
37
|
-
value: d,
|
|
38
|
-
enumerable: !1
|
|
39
|
-
}), Object.defineProperty(i, "lookupByLabel", {
|
|
40
|
-
value: c,
|
|
41
|
-
enumerable: !1
|
|
42
|
-
}), Object.defineProperty(i, "getIds", {
|
|
43
|
-
value: o,
|
|
44
|
-
enumerable: !1
|
|
45
|
-
}), Object.defineProperty(i, "getLabels", {
|
|
46
|
-
value: s,
|
|
47
|
-
enumerable: !1
|
|
48
|
-
}), Object.defineProperty(i, "getKeys", {
|
|
49
|
-
value: a,
|
|
50
|
-
enumerable: !1
|
|
51
|
-
}), Object.defineProperty(i, "getValues", {
|
|
52
|
-
value: u,
|
|
53
|
-
enumerable: !1
|
|
54
|
-
}), i;
|
|
55
|
-
}, r = /* @__PURE__ */ b({
|
|
56
|
-
SMALL: { id: 576, label: "Small" },
|
|
57
|
-
MEDIUM: { id: 768, label: "Medium" },
|
|
58
|
-
LARGE: { id: 992, label: "Large" },
|
|
59
|
-
EXTRA_LARGE: { id: 1200, label: "Extra large" }
|
|
60
|
-
}), f = () => /iPad|iPhone|iPod/.test(navigator.userAgent) && !window?.MSStream, g = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
61
|
-
navigator?.userAgent
|
|
62
|
-
), p = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent), m = () => navigator?.userAgent.includes("Windows"), v = (n = {
|
|
63
|
-
sm: r.SMALL.id,
|
|
64
|
-
md: r.MEDIUM.id,
|
|
65
|
-
lg: r.LARGE.id,
|
|
66
|
-
xl: r.EXTRA_LARGE.id
|
|
67
|
-
}) => {
|
|
68
|
-
const o = n;
|
|
69
|
-
return window?.innerWidth < o.sm ? "mobile" : window?.innerWidth < o.lg ? "tablet" : "desktop";
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
v as getCurrentDeviceSize,
|
|
73
|
-
g as isMobile,
|
|
74
|
-
p as isSafari,
|
|
75
|
-
m as isWindows,
|
|
76
|
-
f as isiOSDevice
|
|
77
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={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",auctionMinimumOfferFrom:"OffertaMinimaAstaDa",auctionMinimumOfferTo:"OffertaMinimaAstaA",auctionMinimumBid:"RialzoMinimoAsta",auctionCourtTypeID:"TribunaleAsta",auctionSaleModeID:"ModalitaVenditaAsta",auctionProcedureNumber:"NumeroProceduraAsta",auctionProcedureTypologyID:"TipologiaProceduraAsta",auctionReferenceYear:"AnnoRiferimentoAsta",auctionPublicationDateFrom:"DataPubblicazioneAstaDa",auctionPublicationDateTo:"DataPubblicazioneAstaA",auctionDateFrom:"DataAstaDa",auctionDateTo:"DataAstaA",filterOrderId:"Ordinamento"},u={sale:"Vendita",rent:"Affitto",auctionType:"Asta",bareOwnershipType:"NudaProprieta",typologyIdList:"Tipologia",filterOrderId:"Ordinamento"};function l(t,c,e,r,a,o,n){let i="/";return e&&(i+=e+"-"),i+=`${c}/`,o&&(i+=`${o}/`),t&&(i+=`${t.replace(/^-+|-+$/g,"")}/`),r&&(i+=`${r.replace(/^_+|_+$/g,"")}/`),!r&&n&&(i+=`${n.replace(/^_+|_+$/g,"")}/`),a&&(i+=`${a.replace(/^_+|_+$/g,"")}/`),i}function m(t,c=!1){const e=c?{...u}:{...s},r=Object.entries(t).filter(([a,o])=>e[a]&&o!==void 0&&o!==null&&o!==!1&&o!=="").flatMap(([a,o])=>Array.isArray(o)?o.map(n=>`${encodeURIComponent(e[a])}=${encodeURIComponent(n)}`):o!=null?`${encodeURIComponent(e[a])}=${o instanceof Date?encodeURIComponent(o.toISOString()):encodeURIComponent(o)}`:[]).join("&");return r?`?${r}`:""}exports.buildParams=m;exports.buildURL=l;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
const s = {
|
|
2
|
-
priceFrom: "PrezzoMinimo",
|
|
3
|
-
priceTo: "PrezzoMassimo",
|
|
4
|
-
sqMfrom: "SuperficieMinima",
|
|
5
|
-
sqMto: "SuperficieMassima",
|
|
6
|
-
roomsFrom: "NumeroMinimoLocali",
|
|
7
|
-
roomsTo: "NumeroMassimoLocali",
|
|
8
|
-
bathroomsFrom: "NumeroMinimoBagni",
|
|
9
|
-
bathroomsTo: "NumeroMassimoBagni",
|
|
10
|
-
conditionType: "StatoImmobile",
|
|
11
|
-
energyClassFilter: "ClasseEnergetica",
|
|
12
|
-
floor: "Piano",
|
|
13
|
-
excludeAuctions: "EscludiAste",
|
|
14
|
-
shortRentOnly: "SoloAffittiBrevi",
|
|
15
|
-
excludeBareOwnership: "EscludiNudaProprieta",
|
|
16
|
-
onlyPublicUser: "DaPrivato",
|
|
17
|
-
balcony: "Balcone",
|
|
18
|
-
terrace: "Terrazzo",
|
|
19
|
-
balconyTerrace: "BalconeTerrazzo",
|
|
20
|
-
boxCarSpot: "BoxPostoAuto",
|
|
21
|
-
carSpot: "PostoAuto",
|
|
22
|
-
box: "Box",
|
|
23
|
-
lift: "Ascensore",
|
|
24
|
-
privateGarden: "GiardinoPrivato",
|
|
25
|
-
publicGarden: "GiardinoPubblico",
|
|
26
|
-
cellar: "Cantina",
|
|
27
|
-
airConditioning: "AriaCondizionata",
|
|
28
|
-
furnished: "Arredato",
|
|
29
|
-
publicTransport: "Trasporti",
|
|
30
|
-
school: "Istruzione",
|
|
31
|
-
market: "Supermercati",
|
|
32
|
-
hospital: "Ospedali",
|
|
33
|
-
pharmacy: "Farmacie",
|
|
34
|
-
charging: "Ricarica",
|
|
35
|
-
post: "UfficioPostale",
|
|
36
|
-
bank: "Banche",
|
|
37
|
-
swimmingPoolPrivate: "PiscinaPrivata",
|
|
38
|
-
swimmingPoolPublic: "PiscinaCondominiale",
|
|
39
|
-
luxury: "Lusso",
|
|
40
|
-
discounted: "Sconto",
|
|
41
|
-
auctionMinimumOfferFrom: "OffertaMinimaAstaDa",
|
|
42
|
-
auctionMinimumOfferTo: "OffertaMinimaAstaA",
|
|
43
|
-
auctionMinimumBid: "RialzoMinimoAsta",
|
|
44
|
-
auctionCourtTypeID: "TribunaleAsta",
|
|
45
|
-
auctionSaleModeID: "ModalitaVenditaAsta",
|
|
46
|
-
auctionProcedureNumber: "NumeroProceduraAsta",
|
|
47
|
-
auctionProcedureTypologyID: "TipologiaProceduraAsta",
|
|
48
|
-
auctionReferenceYear: "AnnoRiferimentoAsta",
|
|
49
|
-
auctionPublicationDateFrom: "DataPubblicazioneAstaDa",
|
|
50
|
-
auctionPublicationDateTo: "DataPubblicazioneAstaA",
|
|
51
|
-
auctionDateFrom: "DataAstaDa",
|
|
52
|
-
auctionDateTo: "DataAstaA",
|
|
53
|
-
/* Don't consider this prop in the filters counter */
|
|
54
|
-
filterOrderId: "Ordinamento"
|
|
55
|
-
}, u = {
|
|
56
|
-
sale: "Vendita",
|
|
57
|
-
rent: "Affitto",
|
|
58
|
-
auctionType: "Asta",
|
|
59
|
-
bareOwnershipType: "NudaProprieta",
|
|
60
|
-
typologyIdList: "Tipologia",
|
|
61
|
-
filterOrderId: "Ordinamento"
|
|
62
|
-
};
|
|
63
|
-
function m(t, c, e, r, a, o, n) {
|
|
64
|
-
let i = "/";
|
|
65
|
-
return e && (i += e + "-"), i += `${c}/`, o && (i += `${o}/`), t && (i += `${t.replace(/^-+|-+$/g, "")}/`), r && (i += `${r.replace(/^_+|_+$/g, "")}/`), !r && n && (i += `${n.replace(/^_+|_+$/g, "")}/`), a && (i += `${a.replace(/^_+|_+$/g, "")}/`), i;
|
|
66
|
-
}
|
|
67
|
-
function l(t, c = !1) {
|
|
68
|
-
const e = c ? { ...u } : { ...s }, r = Object.entries(t).filter(
|
|
69
|
-
([a, o]) => e[a] && o !== void 0 && o !== null && o !== !1 && o !== ""
|
|
70
|
-
).flatMap(([a, o]) => Array.isArray(o) ? o.map(
|
|
71
|
-
(n) => `${encodeURIComponent(e[a])}=${encodeURIComponent(n)}`
|
|
72
|
-
) : o != null ? `${encodeURIComponent(e[a])}=${o instanceof Date ? encodeURIComponent(o.toISOString()) : encodeURIComponent(o)}` : []).join("&");
|
|
73
|
-
return r ? `?${r}` : "";
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
l as buildParams,
|
|
77
|
-
m as buildURL
|
|
78
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|