@foxford/ui 2.0.11 → 2.0.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxford/ui",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "UI components library",
5
5
  "main": "index.cjs.js",
6
6
  "module": "index.js",
@@ -1,2 +1,2 @@
1
- function n(n,t,e){if(t){var o=[];if(function(n,t){var e=arguments.length>0&&void 0!==n?n:'';var o=arguments.length>1?t:void 0;return/^((http|https):\/\/)/.test(e)&&!new URL(e).hostname.endsWith(o)}(t,n)&&('_blank'===e&&o.push('noopener'),o.push('nofollow')),0!==o.length)return o.join(' ')}}export{n as relBuilder};
1
+ function n(n,t){if(n){var o=[];if(function(n,t){var o=arguments.length>0&&void 0!==n?n:'';var e=arguments.length>1?t:void 0;return/^((http|https):\/\/)/.test(o)&&!new URL(o).hostname.endsWith(e)}(n,window.location.hostname)&&('_blank'===t&&o.push('noopener'),o.push('nofollow')),0!==o.length)return o.join(' ')}}export{n as relBuilder};
2
2
  //# sourceMappingURL=rel-builder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rel-builder.js","sources":["../../../../src/shared/utils/rel-builder.ts"],"sourcesContent":["function isExternalUrl(url = '', hostname: string): boolean {\n return /^((http|https):\\/\\/)/.test(url) && !new URL(url).hostname.endsWith(hostname)\n}\n\nexport function relBuilder(hostname: string, link?: string, target?: string): undefined | string {\n if (!link) return\n\n const relStr = []\n\n if (isExternalUrl(link, hostname)) {\n if (target === '_blank') relStr.push('noopener')\n relStr.push('nofollow')\n }\n\n if (relStr.length === 0) return\n\n return relStr.join(' ')\n}\n"],"names":["relBuilder","hostname","link","target","relStr","n","t","url","arguments","length","test","URL","endsWith","push","join"],"mappings":"AAIO,SAASA,EAAWC,EAAkBC,EAAeC,GAC1D,GAAKD,EAAL,CAEA,IAAME,EAAS,GAOf,GAdF,SAAAC,EAAAC,GAA4D,IAArCC,+BAAvBF,EAAAA,EAA6B,GAA+B,IAA3BJ,EAA2BO,UAAAC,OAAA,EAA5DH,SACE,MAAO,uBAAuBI,KAAKH,KAAS,IAAII,IAAIJ,GAAKN,SAASW,SAASX,GAD7E,CASoBC,EAAMD,KACP,WAAXE,GAAqBC,EAAOS,KAAK,YACrCT,EAAOS,KAAK,aAGQ,IAAlBT,EAAOK,OAEX,OAAOL,EAAOU,KAAK"}
1
+ {"version":3,"file":"rel-builder.js","sources":["../../../../src/shared/utils/rel-builder.ts"],"sourcesContent":["function isExternalUrl(url = '', hostname: string): boolean {\n return /^((http|https):\\/\\/)/.test(url) && !new URL(url).hostname.endsWith(hostname)\n}\n\nexport function relBuilder(link?: string, target?: string): undefined | string {\n if (!link) return\n\n const relStr = []\n\n if (isExternalUrl(link, window.location.hostname)) {\n if (target === '_blank') relStr.push('noopener')\n relStr.push('nofollow')\n }\n\n if (relStr.length === 0) return\n\n return relStr.join(' ')\n}\n"],"names":["relBuilder","link","target","relStr","n","t","url","hostname","arguments","length","undefined","test","URL","endsWith","window","location","push","join"],"mappings":"AAIO,SAASA,EAAWC,EAAeC,GACxC,GAAKD,EAAL,CAEA,IAAME,EAAS,GAOf,GAdF,SAAAC,EAAAC,GAA4D,IAArCC,+BAAvBF,EAAAA,EAA6B,GAA+B,IAA3BG,EAA2BC,UAAAC,OAAA,EAA5DJ,OAA4DK,EAC1D,MAAO,uBAAuBC,KAAKL,KAAS,IAAIM,IAAIN,GAAKC,SAASM,SAASN,GAD7E,CASoBN,EAAMa,OAAOC,SAASR,YACvB,WAAXL,GAAqBC,EAAOa,KAAK,YACrCb,EAAOa,KAAK,aAGQ,IAAlBb,EAAOM,OAEX,OAAON,EAAOc,KAAK"}