@rpcbase/ui 0.217.0 → 0.219.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/components/AddressAutocompleteInput/index.d.ts.map +1 -1
- package/dist/components/HourPickerField/index.d.ts.map +1 -1
- package/dist/index10.js +544 -489
- package/dist/index10.js.map +1 -1
- package/dist/index107.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index12.js +3 -3
- package/dist/index13.js +2 -2
- package/dist/index14.js +2 -2
- package/dist/index15.js +2 -2
- package/dist/index150.js +1 -1
- package/dist/index151.js +46 -5
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +223 -62
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +22 -2
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +24 -363
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +382 -243
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +5 -60
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +62 -40
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +2 -170
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +356 -102
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +2 -2
- package/dist/index160.js +261 -24
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +61 -8
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +46 -4
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +169 -5
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +109 -4
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +24 -466
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +8 -186
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +4 -107
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +5 -262
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +4 -9
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +1 -1
- package/dist/index170.js +462 -38
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +185 -4
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +103 -42
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +253 -220
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +10 -22
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +42 -24
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +4 -400
- package/dist/index176.js.map +1 -1
- package/dist/index18.js +7 -7
- package/dist/index19.js +3 -3
- package/dist/index21.js +1 -1
- package/dist/index22.js +2 -2
- package/dist/index229.js +1 -1
- package/dist/index23.js +1 -1
- package/dist/index235.js +1 -1
- package/dist/index237.js +23 -12
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +29 -155
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +5 -31
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index240.js +13 -9
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +147 -41
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +29 -10
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +9 -44
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +41 -88
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +10 -85
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +41 -102
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +88 -45
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +85 -10
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +96 -28
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +1 -1
- package/dist/index250.js +52 -8
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +10 -115
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +36 -16
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +8 -15
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +116 -3
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +16 -35
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +14 -19
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +3 -9
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +36 -8
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +19 -18
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +9 -28
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +7 -15
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +19 -24
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +29 -29
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +17 -5
- package/dist/index264.js.map +1 -1
- package/dist/index268.js +5 -21
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +3 -5
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +24 -3
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +111 -22
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +14 -111
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +528 -14
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +111 -515
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +117 -109
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +20 -133
- package/dist/index276.js.map +1 -1
- package/dist/index28.js +2 -2
- package/dist/index29.js +3 -37
- package/dist/index29.js.map +1 -1
- package/dist/index294.js +69 -65
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +8 -68
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +14 -9
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +66 -14
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +64 -65
- package/dist/index298.js.map +1 -1
- package/dist/index3.js +92 -86
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +125 -3
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +227 -120
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +21 -229
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +50 -23
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +21 -50
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +126 -18
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +205 -113
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +74 -205
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +115 -87
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +5 -118
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +2 -2
- package/dist/index40.js +819 -5
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +56 -847
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +37 -57
- package/dist/index42.js.map +1 -1
- package/dist/index45.js +1 -1
- package/dist/index46.js +1 -1
- package/dist/index49.js +1 -1
- package/dist/index5.js +2 -2
- package/dist/index50.js +1 -1
- package/dist/index52.js +1 -1
- package/dist/index56.js +2 -6
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +2 -8
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +3 -5
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +47 -3
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +5 -5
- package/dist/index60.js +48 -45
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +7 -50
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +14 -7
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +133 -14
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +10 -133
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +216 -10
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +12 -216
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +47 -13
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +47 -44
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +4 -50
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +2 -2
- package/dist/index70.js +6 -4
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +28 -6
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +50 -28
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +9 -50
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +2 -9
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +2 -2
- package/dist/index76.js +6 -2
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +8 -2
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +6 -2
- package/dist/index78.js.map +1 -1
- package/dist/index8.js +3 -3
- package/dist/index9.js +1 -1
- package/package.json +3 -2
package/dist/index33.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index33.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index33.js","sources":["../../../node_modules/blurhash/dist/esm/index.js"],"sourcesContent":["var q=[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"#\",\"$\",\"%\",\"*\",\"+\",\",\",\"-\",\".\",\":\",\";\",\"=\",\"?\",\"@\",\"[\",\"]\",\"^\",\"_\",\"{\",\"|\",\"}\",\"~\"],x=t=>{let e=0;for(let r=0;r<t.length;r++){let n=t[r],l=q.indexOf(n);e=e*83+l}return e},p=(t,e)=>{var r=\"\";for(let n=1;n<=e;n++){let l=Math.floor(t)/Math.pow(83,e-n)%83;r+=q[Math.floor(l)]}return r};var f=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},h=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(e*12.92*255+.5):Math.trunc((1.055*Math.pow(e,.4166666666666667)-.055)*255+.5)},F=t=>t<0?-1:1,M=(t,e)=>F(t)*Math.pow(Math.abs(t),e);var d=class extends Error{constructor(e){super(e),this.name=\"ValidationError\",this.message=e}};var C=t=>{if(!t||t.length<6)throw new d(\"The blurhash string must be at least 6 characters\");let e=x(t[0]),r=Math.floor(e/9)+1,n=e%9+1;if(t.length!==4+2*n*r)throw new d(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*n*r}`)},N=t=>{try{C(t)}catch(e){return{result:!1,errorReason:e.message}}return{result:!0}},z=t=>{let e=t>>16,r=t>>8&255,n=t&255;return[f(e),f(r),f(n)]},L=(t,e)=>{let r=Math.floor(t/361),n=Math.floor(t/19)%19,l=t%19;return[M((r-9)/9,2)*e,M((n-9)/9,2)*e,M((l-9)/9,2)*e]},U=(t,e,r,n)=>{C(t),n=n|1;let l=x(t[0]),m=Math.floor(l/9)+1,b=l%9+1,i=(x(t[1])+1)/166,u=new Array(b*m);for(let o=0;o<u.length;o++)if(o===0){let a=x(t.substring(2,6));u[o]=z(a)}else{let a=x(t.substring(4+o*2,6+o*2));u[o]=L(a,i*n)}let c=e*4,s=new Uint8ClampedArray(c*r);for(let o=0;o<r;o++)for(let a=0;a<e;a++){let y=0,B=0,R=0;for(let w=0;w<m;w++)for(let P=0;P<b;P++){let G=Math.cos(Math.PI*a*P/e)*Math.cos(Math.PI*o*w/r),T=u[P+w*b];y+=T[0]*G,B+=T[1]*G,R+=T[2]*G}let V=h(y),I=h(B),E=h(R);s[4*a+0+o*c]=V,s[4*a+1+o*c]=I,s[4*a+2+o*c]=E,s[4*a+3+o*c]=255}return s},j=U;var A=4,D=(t,e,r,n)=>{let l=0,m=0,b=0,g=e*A;for(let u=0;u<e;u++){let c=A*u;for(let s=0;s<r;s++){let o=c+s*g,a=n(u,s);l+=a*f(t[o]),m+=a*f(t[o+1]),b+=a*f(t[o+2])}}let i=1/(e*r);return[l*i,m*i,b*i]},$=t=>{let e=h(t[0]),r=h(t[1]),n=h(t[2]);return(e<<16)+(r<<8)+n},H=(t,e)=>{let r=Math.floor(Math.max(0,Math.min(18,Math.floor(M(t[0]/e,.5)*9+9.5)))),n=Math.floor(Math.max(0,Math.min(18,Math.floor(M(t[1]/e,.5)*9+9.5)))),l=Math.floor(Math.max(0,Math.min(18,Math.floor(M(t[2]/e,.5)*9+9.5))));return r*19*19+n*19+l},O=(t,e,r,n,l)=>{if(n<1||n>9||l<1||l>9)throw new d(\"BlurHash must have between 1 and 9 components\");if(e*r*4!==t.length)throw new d(\"Width and height must match the pixels array\");let m=[];for(let s=0;s<l;s++)for(let o=0;o<n;o++){let a=o==0&&s==0?1:2,y=D(t,e,r,(B,R)=>a*Math.cos(Math.PI*o*B/e)*Math.cos(Math.PI*s*R/r));m.push(y)}let b=m[0],g=m.slice(1),i=\"\",u=n-1+(l-1)*9;i+=p(u,1);let c;if(g.length>0){let s=Math.max(...g.map(a=>Math.max(...a))),o=Math.floor(Math.max(0,Math.min(82,Math.floor(s*166-.5))));c=(o+1)/166,i+=p(o,1)}else c=1,i+=p(0,1);return i+=p($(b),4),g.forEach(s=>{i+=p(H(s,c),2)}),i},S=O;export{d as ValidationError,j as decode,S as encode,N as isBlurhashValid};\n//# sourceMappingURL=index.js.map"],"names":["q","x","e","r","n","l","f","h","F","M","d","C","z","L","U","m","b","i","o","a","c","y","B","R","w","P","G","T","V","I","E","j"],"mappings":"AAAG,IAACA,IAAE,CAAC,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAAI,KAA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IAAE,GAAEA,IAAEf,GAAEe,IAAI,UAAQC,IAAE,GAAEA,IAAEjB,GAAEiB,KAAI;AAAC,QAAIE,IAAE,GAAEC,IAAE,GAAEC,IAAE;AAAE,aAAQC,IAAE,GAAEA,IAAET,GAAES,IAAI,UAAQC,IAAE,GAAEA,IAAET,GAAES,KAAI;AAAC,UAAIC,IAAE,KAAK,IAAI,KAAK,KAAGP,IAAEM,IAAEvB,CAAC,IAAE,KAAK,IAAI,KAAK,KAAGgB,IAAEM,IAAErB,CAAC,GAAEwB,IAAE,EAAEF,IAAED,IAAER,CAAC;AAAE,MAAAK,KAAGM,EAAE,CAAC,IAAED,GAAEJ,KAAGK,EAAE,CAAC,IAAED,GAAEH,KAAGI,EAAE,CAAC,IAAED;AAAA,IAAC;AAAC,QAAIE,IAAErB,EAAEc,CAAC,GAAEQ,IAAEtB,EAAEe,CAAC,GAAEQ,IAAEvB,EAAEgB,CAAC;AAAE,MAAE,IAAEJ,IAAE,IAAED,IAAEE,CAAC,IAAEQ,GAAE,EAAE,IAAET,IAAE,IAAED,IAAEE,CAAC,IAAES,GAAE,EAAE,IAAEV,IAAE,IAAED,IAAEE,CAAC,IAAEU,GAAE,EAAE,IAAEX,IAAE,IAAED,IAAEE,CAAC,IAAE;AAAA,EAAG;AAAC,SAAO;AAAC,GAAEW,IAAEjB;","x_google_ignoreList":[0]}
|
package/dist/index34.js
CHANGED
|
@@ -1,54 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const n = {
|
|
2
|
+
en: {
|
|
3
|
+
lengthTooLong: (e) => e ? `This number looks too long for ${e}.` : "This number looks too long.",
|
|
4
|
+
noMatches: "No matching countries",
|
|
5
|
+
selectCountryLabel: "Select a country",
|
|
6
|
+
selectedCountryLabel: (e) => e ? `${e} flag` : "Selected country"
|
|
7
|
+
},
|
|
8
|
+
fr: {
|
|
9
|
+
lengthTooLong: (e) => e ? `This number looks too long for ${e}.` : "This number looks too long.",
|
|
10
|
+
noMatches: "Aucun pays correspondant",
|
|
11
|
+
selectCountryLabel: "Select a country",
|
|
12
|
+
selectedCountryLabel: (e) => e ? `${e} flag` : "Selected country"
|
|
6
13
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
constructor(t) {
|
|
16
|
-
super(t), this.name = "ValidationError", this.message = t;
|
|
17
|
-
}
|
|
18
|
-
}, U = (t) => {
|
|
19
|
-
if (!t || t.length < 6) throw new y("The blurhash string must be at least 6 characters");
|
|
20
|
-
let r = i(t[0]), a = Math.floor(r / 9) + 1, l = r % 9 + 1;
|
|
21
|
-
if (t.length !== 4 + 2 * l * a) throw new y(`blurhash length mismatch: length is ${t.length} but it should be ${4 + 2 * l * a}`);
|
|
22
|
-
}, $ = (t) => {
|
|
23
|
-
let r = t >> 16, a = t >> 8 & 255, l = t & 255;
|
|
24
|
-
return [b(r), b(a), b(l)];
|
|
25
|
-
}, j = (t, r) => {
|
|
26
|
-
let a = Math.floor(t / 361), l = Math.floor(t / 19) % 19, o = t % 19;
|
|
27
|
-
return [m((a - 9) / 9, 2) * r, m((l - 9) / 9, 2) * r, m((o - 9) / 9, 2) * r];
|
|
28
|
-
}, q = (t, r, a, l) => {
|
|
29
|
-
U(t), l = l | 1;
|
|
30
|
-
let o = i(t[0]), p = Math.floor(o / 9) + 1, c = o % 9 + 1, I = (i(t[1]) + 1) / 166, u = new Array(c * p);
|
|
31
|
-
for (let e = 0; e < u.length; e++) if (e === 0) {
|
|
32
|
-
let h = i(t.substring(2, 6));
|
|
33
|
-
u[e] = $(h);
|
|
34
|
-
} else {
|
|
35
|
-
let h = i(t.substring(4 + e * 2, 6 + e * 2));
|
|
36
|
-
u[e] = j(h, I * l);
|
|
37
|
-
}
|
|
38
|
-
let n = r * 4, s = new Uint8ClampedArray(n * a);
|
|
39
|
-
for (let e = 0; e < a; e++) for (let h = 0; h < r; h++) {
|
|
40
|
-
let x = 0, v = 0, E = 0;
|
|
41
|
-
for (let M = 0; M < p; M++) for (let f = 0; f < c; f++) {
|
|
42
|
-
let g = Math.cos(Math.PI * h * f / r) * Math.cos(Math.PI * e * M / a), w = u[f + M * c];
|
|
43
|
-
x += w[0] * g, v += w[1] * g, E += w[2] * g;
|
|
44
|
-
}
|
|
45
|
-
let P = d(x), V = d(v), A = d(E);
|
|
46
|
-
s[4 * h + 0 + e * n] = P, s[4 * h + 1 + e * n] = V, s[4 * h + 2 + e * n] = A, s[4 * h + 3 + e * n] = 255;
|
|
47
|
-
}
|
|
48
|
-
return s;
|
|
49
|
-
}, z = q;
|
|
14
|
+
};
|
|
15
|
+
function a(e, s) {
|
|
16
|
+
const t = (Array.isArray(e) ? e : e ? [e] : []).map((o) => o.split("-")[0]?.toLowerCase()).find((o) => o && n[o]);
|
|
17
|
+
return {
|
|
18
|
+
...n[t ?? "en"] ?? n.en,
|
|
19
|
+
...s ?? {}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
50
22
|
export {
|
|
51
|
-
|
|
52
|
-
z as decode
|
|
23
|
+
a as resolveMessages
|
|
53
24
|
};
|
|
54
25
|
//# sourceMappingURL=index34.js.map
|
package/dist/index34.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index34.js","sources":["
|
|
1
|
+
{"version":3,"file":"index34.js","sources":["../src/components/PhoneNumberInput/messages.ts"],"sourcesContent":["import type { PhoneNumberInputMessages } from \"./types\"\n\n\nconst MESSAGE_DICTIONARY: Record<string, PhoneNumberInputMessages> = {\n en: {\n lengthTooLong: (country) =>\n country ? `This number looks too long for ${country}.` : \"This number looks too long.\",\n noMatches: \"No matching countries\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n fr: {\n lengthTooLong: (country) =>\n country\n ? `This number looks too long for ${country}.`\n : \"This number looks too long.\",\n noMatches: \"Aucun pays correspondant\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n}\n\nexport function resolveMessages(\n locale: string | string[] | undefined,\n overrides?: Partial<PhoneNumberInputMessages>\n): PhoneNumberInputMessages {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : []\n const preferred = locales\n .map((entry) => entry.split(\"-\")[0]?.toLowerCase())\n .find((code) => code && MESSAGE_DICTIONARY[code])\n const base = MESSAGE_DICTIONARY[preferred ?? \"en\"] ?? MESSAGE_DICTIONARY.en\n return {\n ...base,\n ...(overrides ?? {}),\n }\n}\n\n"],"names":["MESSAGE_DICTIONARY","en","lengthTooLong","country","noMatches","selectCountryLabel","selectedCountryLabel","fr","resolveMessages","locale","overrides","preferred","Array","isArray","map","entry","split","toLowerCase","find","code"],"mappings":"AAGA,MAAMA,IAA+D;AAAA,EACnEC,IAAI;AAAA,IACFC,eAAgBC,CAAAA,MACdA,IAAU,kCAAkCA,CAAO,MAAM;AAAA,IAC3DC,WAAW;AAAA,IACXC,oBAAoB;AAAA,IACpBC,sBAAuBH,CAAAA,MAAaA,IAAU,GAAGA,CAAO,UAAU;AAAA,EAAA;AAAA,EAEpEI,IAAI;AAAA,IACFL,eAAgBC,CAAAA,MACdA,IACI,kCAAkCA,CAAO,MACzC;AAAA,IACNC,WAAW;AAAA,IACXC,oBAAoB;AAAA,IACpBC,sBAAuBH,CAAAA,MAAaA,IAAU,GAAGA,CAAO,UAAU;AAAA,EAAA;AAEtE;AAEO,SAASK,EACdC,GACAC,GAC0B;AAE1B,QAAMC,KADUC,MAAMC,QAAQJ,CAAM,IAAIA,IAASA,IAAS,CAACA,CAAM,IAAI,CAAA,GAElEK,IAAKC,OAAUA,EAAMC,MAAM,GAAG,EAAE,CAAC,GAAGC,YAAAA,CAAa,EACjDC,KAAMC,OAASA,KAAQnB,EAAmBmB,CAAI,CAAC;AAElD,SAAO;AAAA,IACL,GAFWnB,EAAmBW,KAAa,IAAI,KAAKX,EAAmBC;AAAAA,IAGvE,GAAIS,KAAa,CAAA;AAAA,EAAC;AAEtB;"}
|
package/dist/index35.js
CHANGED
|
@@ -1,25 +1,133 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { getCountryList as E } from "./index76.js";
|
|
2
|
+
import { getCountryCallingCode as s } from "./index39.js";
|
|
3
|
+
const c = "US", u = E(), f = /* @__PURE__ */ new Map(), m = "__default_locale__", _ = Array.from(new Set(u.map((e) => s(e)))).sort((e, t) => t.length - e.length), O = _.reduce((e, t) => Math.max(e, t.length), 0), y = ["0011", "001", "011", "00", "810"];
|
|
4
|
+
function R(e) {
|
|
5
|
+
return e && u.includes(e) ? e : c;
|
|
6
|
+
}
|
|
7
|
+
function C(e) {
|
|
8
|
+
if (typeof Intl > "u" || typeof Intl.DisplayNames > "u")
|
|
9
|
+
return null;
|
|
10
|
+
try {
|
|
11
|
+
const t = Array.isArray(e) ? e : e ? [e] : void 0;
|
|
12
|
+
return new Intl.DisplayNames(t, {
|
|
13
|
+
type: "region"
|
|
14
|
+
});
|
|
15
|
+
} catch {
|
|
16
|
+
return null;
|
|
13
17
|
}
|
|
14
|
-
}
|
|
15
|
-
function
|
|
16
|
-
const t = (
|
|
18
|
+
}
|
|
19
|
+
function N(e) {
|
|
20
|
+
const t = C(e), r = C("en");
|
|
21
|
+
return u.map((n) => {
|
|
22
|
+
const a = s(n), o = t?.of(n) ?? r?.of(n) ?? n, i = r?.of(n) ?? o, g = D(n), l = Array.from(new Set([o, i, n.toUpperCase(), n.toLowerCase(), ...g].filter(Boolean)));
|
|
23
|
+
return {
|
|
24
|
+
value: n,
|
|
25
|
+
name: o,
|
|
26
|
+
dialCode: a,
|
|
27
|
+
label: `${o} (+${a})`,
|
|
28
|
+
flag: A(n),
|
|
29
|
+
searchableTokens: l,
|
|
30
|
+
normalizedSearchableTokens: l.map((p) => U(p))
|
|
31
|
+
};
|
|
32
|
+
}).sort((n, a) => {
|
|
33
|
+
const o = d(n.value), i = d(a.value);
|
|
34
|
+
return o !== i ? o - i : n.name.localeCompare(a.name);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function d(e) {
|
|
38
|
+
return e === "US" ? 0 : e === "CA" ? 1 : s(e) === "1" ? 2 : 3;
|
|
39
|
+
}
|
|
40
|
+
function b(e) {
|
|
41
|
+
return e ? Array.isArray(e) ? e.join("\0") : e : m;
|
|
42
|
+
}
|
|
43
|
+
function L(e) {
|
|
44
|
+
if (e !== m) {
|
|
45
|
+
if (e.includes("\0")) {
|
|
46
|
+
const t = e.split("\0").filter(Boolean);
|
|
47
|
+
return t.length === 0 ? void 0 : t.length === 1 ? t[0] ?? void 0 : t;
|
|
48
|
+
}
|
|
49
|
+
return e;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function v(e, t) {
|
|
53
|
+
const r = f.get(t);
|
|
54
|
+
if (r)
|
|
55
|
+
return r;
|
|
56
|
+
const n = N(e);
|
|
57
|
+
return f.set(t, n), n;
|
|
58
|
+
}
|
|
59
|
+
function F(e) {
|
|
17
60
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
61
|
+
code: e.value,
|
|
62
|
+
name: e.name,
|
|
63
|
+
dialCode: e.dialCode,
|
|
64
|
+
flag: e.flag
|
|
20
65
|
};
|
|
21
66
|
}
|
|
67
|
+
function M(e) {
|
|
68
|
+
return {
|
|
69
|
+
code: e,
|
|
70
|
+
name: e,
|
|
71
|
+
dialCode: s(e),
|
|
72
|
+
flag: A(e)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function A(e) {
|
|
76
|
+
const t = e?.toUpperCase();
|
|
77
|
+
if (!t || t.length !== 2 || /[^A-Z]/.test(t))
|
|
78
|
+
return "";
|
|
79
|
+
const r = 127397;
|
|
80
|
+
return String.fromCodePoint(t.charCodeAt(0) + r, t.charCodeAt(1) + r);
|
|
81
|
+
}
|
|
82
|
+
const S = /[\u0300-\u036f]/g;
|
|
83
|
+
function h(e) {
|
|
84
|
+
return e.normalize("NFD").replace(S, "");
|
|
85
|
+
}
|
|
86
|
+
function U(e) {
|
|
87
|
+
return h(e).toLowerCase();
|
|
88
|
+
}
|
|
89
|
+
function B(e, t) {
|
|
90
|
+
let r = Number.MAX_SAFE_INTEGER;
|
|
91
|
+
for (const n of e) {
|
|
92
|
+
const a = n.indexOf(t);
|
|
93
|
+
a >= 0 && a < r && (r = a);
|
|
94
|
+
}
|
|
95
|
+
return r === Number.MAX_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : r;
|
|
96
|
+
}
|
|
97
|
+
function D(e) {
|
|
98
|
+
switch (e) {
|
|
99
|
+
case "US":
|
|
100
|
+
return ["USA", "United States", "America", "United States of America"];
|
|
101
|
+
case "GB":
|
|
102
|
+
return ["UK", "United Kingdom", "Great Britain", "England"];
|
|
103
|
+
case "AE":
|
|
104
|
+
return ["UAE", "United Arab Emirates"];
|
|
105
|
+
case "KR":
|
|
106
|
+
return ["South Korea", "Korea"];
|
|
107
|
+
case "CN":
|
|
108
|
+
return ["China", "PRC"];
|
|
109
|
+
case "CD":
|
|
110
|
+
return ["DRC", "Congo-Kinshasa"];
|
|
111
|
+
case "CG":
|
|
112
|
+
return ["Congo-Brazzaville"];
|
|
113
|
+
case "BR":
|
|
114
|
+
return ["Brazil"];
|
|
115
|
+
default:
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
22
119
|
export {
|
|
23
|
-
|
|
120
|
+
y as COMMON_IDD_PREFIXES,
|
|
121
|
+
_ as COUNTRY_DIAL_CODES,
|
|
122
|
+
c as DEFAULT_COUNTRY,
|
|
123
|
+
O as MAX_DIAL_CODE_LENGTH,
|
|
124
|
+
M as buildFallbackSelectedCountry,
|
|
125
|
+
v as getCachedCountryOptions,
|
|
126
|
+
b as getLocaleCacheKey,
|
|
127
|
+
R as getValidCountry,
|
|
128
|
+
U as normalizeSearchValue,
|
|
129
|
+
B as optionMatchIndex,
|
|
130
|
+
L as parseLocaleCacheKey,
|
|
131
|
+
F as toSelectedCountry
|
|
24
132
|
};
|
|
25
133
|
//# sourceMappingURL=index35.js.map
|
package/dist/index35.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index35.js","sources":["../src/components/PhoneNumberInput/messages.ts"],"sourcesContent":["import type { PhoneNumberInputMessages } from \"./types\"\n\n\nconst MESSAGE_DICTIONARY: Record<string, PhoneNumberInputMessages> = {\n en: {\n lengthTooLong: (country) =>\n country ? `This number looks too long for ${country}.` : \"This number looks too long.\",\n noMatches: \"No matching countries\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n fr: {\n lengthTooLong: (country) =>\n country\n ? `This number looks too long for ${country}.`\n : \"This number looks too long.\",\n noMatches: \"Aucun pays correspondant\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n}\n\nexport function resolveMessages(\n locale: string | string[] | undefined,\n overrides?: Partial<PhoneNumberInputMessages>\n): PhoneNumberInputMessages {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : []\n const preferred = locales\n .map((entry) => entry.split(\"-\")[0]?.toLowerCase())\n .find((code) => code && MESSAGE_DICTIONARY[code])\n const base = MESSAGE_DICTIONARY[preferred ?? \"en\"] ?? MESSAGE_DICTIONARY.en\n return {\n ...base,\n ...(overrides ?? {}),\n }\n}\n\n"],"names":["MESSAGE_DICTIONARY","en","lengthTooLong","country","noMatches","selectCountryLabel","selectedCountryLabel","fr","resolveMessages","locale","overrides","preferred","Array","isArray","map","entry","split","toLowerCase","find","code"],"mappings":"AAGA,MAAMA,IAA+D;AAAA,EACnEC,IAAI;AAAA,IACFC,eAAgBC,CAAAA,MACdA,IAAU,kCAAkCA,CAAO,MAAM;AAAA,IAC3DC,WAAW;AAAA,IACXC,oBAAoB;AAAA,IACpBC,sBAAuBH,CAAAA,MAAaA,IAAU,GAAGA,CAAO,UAAU;AAAA,EAAA;AAAA,EAEpEI,IAAI;AAAA,IACFL,eAAgBC,CAAAA,MACdA,IACI,kCAAkCA,CAAO,MACzC;AAAA,IACNC,WAAW;AAAA,IACXC,oBAAoB;AAAA,IACpBC,sBAAuBH,CAAAA,MAAaA,IAAU,GAAGA,CAAO,UAAU;AAAA,EAAA;AAEtE;AAEO,SAASK,EACdC,GACAC,GAC0B;AAE1B,QAAMC,KADUC,MAAMC,QAAQJ,CAAM,IAAIA,IAASA,IAAS,CAACA,CAAM,IAAI,CAAA,GAElEK,IAAKC,OAAUA,EAAMC,MAAM,GAAG,EAAE,CAAC,GAAGC,YAAAA,CAAa,EACjDC,KAAMC,OAASA,KAAQnB,EAAmBmB,CAAI,CAAC;AAElD,SAAO;AAAA,IACL,GAFWnB,EAAmBW,KAAa,IAAI,KAAKX,EAAmBC;AAAAA,IAGvE,GAAIS,KAAa,CAAA;AAAA,EAAC;AAEtB;"}
|
|
1
|
+
{"version":3,"file":"index35.js","sources":["../src/components/PhoneNumberInput/country-options.ts"],"sourcesContent":["import type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\n\nimport type { CountryOption, PhoneNumberSelectedCountry } from \"./types\"\nimport { getCountryList } from \"./countries\"\n\n\nexport const DEFAULT_COUNTRY: CountryCode = \"US\"\nconst COUNTRY_OPTIONS = getCountryList()\n\nconst COUNTRY_OPTIONS_CACHE = new Map<string, CountryOption[]>()\nconst DEFAULT_LOCALE_CACHE_KEY = \"__default_locale__\"\nexport const COUNTRY_DIAL_CODES = Array.from(\n new Set(COUNTRY_OPTIONS.map((code) => getCountryCallingCode(code)))\n).sort((a, b) => b.length - a.length)\nexport const MAX_DIAL_CODE_LENGTH = COUNTRY_DIAL_CODES.reduce(\n (max, dial) => Math.max(max, dial.length),\n 0\n)\nexport const COMMON_IDD_PREFIXES = [\"0011\", \"001\", \"011\", \"00\", \"810\"]\n\nexport function getValidCountry(input: CountryCode | undefined) {\n if (!input) {\n return DEFAULT_COUNTRY\n }\n\n return COUNTRY_OPTIONS.includes(input) ? input : DEFAULT_COUNTRY\n}\n\nfunction createDisplayNames(locale?: string | string[]) {\n if (typeof Intl === \"undefined\" || typeof Intl.DisplayNames === \"undefined\") {\n return null\n }\n\n try {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : undefined\n return new Intl.DisplayNames(locales, { type: \"region\" })\n } catch {\n return null\n }\n}\n\nfunction buildCountryOptions(locale?: string | string[]) {\n const displayNames = createDisplayNames(locale)\n const englishDisplayNames = createDisplayNames(\"en\")\n\n return COUNTRY_OPTIONS\n .map((country) => {\n const dialCode = getCountryCallingCode(country)\n const localizedName = displayNames?.of(country) ?? englishDisplayNames?.of(country) ?? country\n const englishName = englishDisplayNames?.of(country) ?? localizedName\n const aliasTokens = getCountryAliases(country)\n const searchableTokens = Array.from(\n new Set(\n [localizedName, englishName, country.toUpperCase(), country.toLowerCase(), ...aliasTokens].filter(\n Boolean\n )\n )\n ) as string[]\n return {\n value: country,\n name: localizedName,\n dialCode,\n label: `${localizedName} (+${dialCode})`,\n flag: countryCodeToFlagEmoji(country),\n searchableTokens,\n normalizedSearchableTokens: searchableTokens.map((token) => normalizeSearchValue(token)),\n }\n })\n .sort((a, b) => {\n const priorityA = getCountryPriority(a.value)\n const priorityB = getCountryPriority(b.value)\n if (priorityA !== priorityB) {\n return priorityA - priorityB\n }\n return a.name.localeCompare(b.name)\n })\n}\n\nfunction getCountryPriority(code: CountryCode) {\n if (code === \"US\") return 0\n if (code === \"CA\") return 1\n if (getCountryCallingCode(code) === \"1\") return 2\n return 3\n}\n\nexport function getLocaleCacheKey(locale?: string | string[]) {\n if (!locale) {\n return DEFAULT_LOCALE_CACHE_KEY\n }\n if (Array.isArray(locale)) {\n return locale.join(\"\\u0000\")\n }\n return locale\n}\n\nexport function parseLocaleCacheKey(cacheKey: string): string | string[] | undefined {\n if (cacheKey === DEFAULT_LOCALE_CACHE_KEY) {\n return undefined\n }\n\n if (cacheKey.includes(\"\\u0000\")) {\n const parts = cacheKey.split(\"\\u0000\").filter(Boolean)\n if (parts.length === 0) {\n return undefined\n }\n if (parts.length === 1) {\n return parts[0] ?? undefined\n }\n return parts\n }\n\n return cacheKey\n}\n\nexport function getCachedCountryOptions(locale: string | string[] | undefined, cacheKey: string) {\n const cached = COUNTRY_OPTIONS_CACHE.get(cacheKey)\n if (cached) {\n return cached\n }\n const built = buildCountryOptions(locale)\n COUNTRY_OPTIONS_CACHE.set(cacheKey, built)\n return built\n}\n\nexport function toSelectedCountry(option: CountryOption): PhoneNumberSelectedCountry {\n return {\n code: option.value,\n name: option.name,\n dialCode: option.dialCode,\n flag: option.flag,\n }\n}\n\nexport function buildFallbackSelectedCountry(country: CountryCode): PhoneNumberSelectedCountry {\n return {\n code: country,\n name: country,\n dialCode: getCountryCallingCode(country),\n flag: countryCodeToFlagEmoji(country),\n }\n}\n\nfunction countryCodeToFlagEmoji(country: CountryCode) {\n const upper = country?.toUpperCase()\n\n if (!upper || upper.length !== 2 || /[^A-Z]/.test(upper)) {\n return \"\"\n }\n\n const base = 127397\n return String.fromCodePoint(\n upper.charCodeAt(0) + base,\n upper.charCodeAt(1) + base\n )\n}\n\nconst DIACRITICS_REGEX = /[\\u0300-\\u036f]/g\n\nfunction stripDiacritics(value: string) {\n return value.normalize(\"NFD\").replace(DIACRITICS_REGEX, \"\")\n}\n\nexport function normalizeSearchValue(value: string) {\n return stripDiacritics(value).toLowerCase()\n}\n\nexport function optionMatchIndex(tokens: string[], query: string) {\n let best = Number.MAX_SAFE_INTEGER\n for (const token of tokens) {\n const index = token.indexOf(query)\n if (index >= 0 && index < best) {\n best = index\n }\n }\n return best === Number.MAX_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : best\n}\n\nfunction getCountryAliases(code: CountryCode): string[] {\n switch (code) {\n case \"US\":\n return [\"USA\", \"United States\", \"America\", \"United States of America\"]\n case \"GB\":\n return [\"UK\", \"United Kingdom\", \"Great Britain\", \"England\"]\n case \"AE\":\n return [\"UAE\", \"United Arab Emirates\"]\n case \"KR\":\n return [\"South Korea\", \"Korea\"]\n case \"CN\":\n return [\"China\", \"PRC\"]\n case \"CD\":\n return [\"DRC\", \"Congo-Kinshasa\"]\n case \"CG\":\n return [\"Congo-Brazzaville\"]\n case \"BR\":\n return [\"Brazil\"]\n default:\n return []\n }\n}\n\n"],"names":["DEFAULT_COUNTRY","COUNTRY_OPTIONS","getCountryList","COUNTRY_OPTIONS_CACHE","Map","DEFAULT_LOCALE_CACHE_KEY","COUNTRY_DIAL_CODES","Array","from","Set","map","code","getCountryCallingCode","sort","a","b","length","MAX_DIAL_CODE_LENGTH","reduce","max","dial","Math","COMMON_IDD_PREFIXES","getValidCountry","input","includes","createDisplayNames","locale","Intl","DisplayNames","locales","isArray","undefined","type","buildCountryOptions","displayNames","englishDisplayNames","country","dialCode","localizedName","of","englishName","aliasTokens","getCountryAliases","searchableTokens","toUpperCase","toLowerCase","filter","Boolean","value","name","label","flag","countryCodeToFlagEmoji","normalizedSearchableTokens","token","normalizeSearchValue","priorityA","getCountryPriority","priorityB","localeCompare","getLocaleCacheKey","join","parseLocaleCacheKey","cacheKey","parts","split","getCachedCountryOptions","cached","get","built","set","toSelectedCountry","option","buildFallbackSelectedCountry","upper","test","base","String","fromCodePoint","charCodeAt","DIACRITICS_REGEX","stripDiacritics","normalize","replace","optionMatchIndex","tokens","query","best","Number","MAX_SAFE_INTEGER","index","indexOf"],"mappings":";;AAOO,MAAMA,IAA+B,MACtCC,IAAkBC,EAAAA,GAElBC,wBAA4BC,IAAAA,GAC5BC,IAA2B,sBACpBC,IAAqBC,MAAMC,KACtC,IAAIC,IAAIR,EAAgBS,IAAKC,OAASC,EAAsBD,CAAI,CAAC,CAAC,CACpE,EAAEE,KAAK,CAACC,GAAGC,MAAMA,EA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