@sitecore/byoc
Advanced tools
Comparing version 0.0.18-alpha.2 to 0.0.18-alpha.3
@@ -42,5 +42,5 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
if (clientFallback) | ||
props = Object.assign({ clientFallback: React.createElement(() => NextDynamicFunction(() => Promise.resolve(() => clientFallback))) }, props); | ||
props = Object.assign(Object.assign({}, props), { clientFallback: React.createElement(() => NextDynamicFunction(() => Promise.resolve(() => clientFallback))) }); | ||
const External = NextComponents.get(componentName); | ||
return React.createElement(External, Object.assign({}, props, { fallback: Component ? React.createElement(Component, Object.assign({}, props)) : null })); | ||
return React.createElement(External, Object.assign({}, props, { fallback: Component ? React.createElement(Component, Object.assign({}, props)) : props.fallback })); | ||
} | ||
@@ -47,0 +47,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import n from"react";import{getComponent as g,getComponentProperties as x,isWebComponent as j,registered as E}from"@sitecore/byoc";import{objectKeysToKebabCase as b,toKebabCase as v}from"@sitecore/byoc";export*from"@sitecore/byoc";var p=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r},d=new Map,f=null,c=null;function C(e){var t;let{componentName:r}=e,a=p(e,["componentName"]),o=(t=g(r))===null||t===void 0?void 0:t.component;if(!d.get(r)){let l=c(()=>Promise.resolve(f),{ssr:!1,loading:()=>n.createElement(y,Object.assign({},a,{componentName:r}))});d.set(r,l)}let s=e.clientFallback;s&&(e=Object.assign({clientFallback:n.createElement(()=>c(()=>Promise.resolve(()=>s)))},e));let m=d.get(r);return n.createElement(m,Object.assign({},e,{fallback:o?n.createElement(o,Object.assign({},e)):null}))}function _(e,t){return c=e,f=t,t}function h(e){if(Object.keys(e).length!=0)return c&&!e._dynamic?C(Object.assign({_dynamic:!0},e)):y(e)}function W(){return n.createElement(n.Fragment,null,n.createElement("byoc-registration",{components:JSON.stringify(Object.values(E)),suppressHydrationWarning:!0}),n.createElement(f,null))}function y(e){let{componentName:t,fallback:r,clientFallback:a,suppressHydrationWarning:o,_dynamic:s}=e,m=p(e,["componentName","fallback","clientFallback","suppressHydrationWarning","_dynamic"]),l=g(t),i=l==null?void 0:l.component,O=r||(typeof window!="undefined"?a:null);if(!i&&r||!t)return n.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},O);let u=x(t,m);return i&&j(i)?n.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},n.createElement("byoc-"+v(l.id),Object.assign(Object.assign({},b(u)),{suppressHydrationWarning:!0}))):n.createElement(n.Fragment,null,n.createElement("feaas-external",Object.assign({},b(u),{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"}),i==null?null:n.createElement(i,Object.assign({},u))))}export{W as Bundle,h as Component,C as NextComponent,y as RegularComponent,_ as enableNextClientsideComponents}; | ||
import n from"react";import{getComponent as y,getComponentProperties as x,isWebComponent as j,registered as E}from"@sitecore/byoc";import{objectKeysToKebabCase as d,toKebabCase as v}from"@sitecore/byoc";export*from"@sitecore/byoc";var g=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r},b=new Map,f=null,c=null;function C(e){var t;let{componentName:r}=e,a=g(e,["componentName"]),o=(t=y(r))===null||t===void 0?void 0:t.component;if(!b.get(r)){let l=c(()=>Promise.resolve(f),{ssr:!1,loading:()=>n.createElement(p,Object.assign({},a,{componentName:r}))});b.set(r,l)}let s=e.clientFallback;s&&(e=Object.assign(Object.assign({},e),{clientFallback:n.createElement(()=>c(()=>Promise.resolve(()=>s)))}));let m=b.get(r);return n.createElement(m,Object.assign({},e,{fallback:o?n.createElement(o,Object.assign({},e)):e.fallback}))}function _(e,t){return c=e,f=t,t}function h(e){if(Object.keys(e).length!=0)return c&&!e._dynamic?C(Object.assign({_dynamic:!0},e)):p(e)}function W(){return n.createElement(n.Fragment,null,n.createElement("byoc-registration",{components:JSON.stringify(Object.values(E)),suppressHydrationWarning:!0}),n.createElement(f,null))}function p(e){let{componentName:t,fallback:r,clientFallback:a,suppressHydrationWarning:o,_dynamic:s}=e,m=g(e,["componentName","fallback","clientFallback","suppressHydrationWarning","_dynamic"]),l=y(t),i=l==null?void 0:l.component,O=r||(typeof window!="undefined"?a:null);if(!i&&r||!t)return n.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},O);let u=x(t,m);return i&&j(i)?n.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},n.createElement("byoc-"+v(l.id),Object.assign(Object.assign({},d(u)),{suppressHydrationWarning:!0}))):n.createElement(n.Fragment,null,n.createElement("feaas-external",Object.assign({},d(u),{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"}),i==null?null:n.createElement(i,Object.assign({},u))))}export{W as Bundle,h as Component,C as NextComponent,p as RegularComponent,_ as enableNextClientsideComponents}; | ||
//# sourceMappingURL=react.esm.js.map |
@@ -1,2 +0,2 @@ | ||
import n from"react";import{getComponent as g,getComponentProperties as x,isWebComponent as j,registered as E}from"@sitecore/byoc";import{objectKeysToKebabCase as b,toKebabCase as v}from"@sitecore/byoc";export*from"@sitecore/byoc";var p=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r},d=new Map,f=null,c=null;function C(e){var t;let{componentName:r}=e,a=p(e,["componentName"]),o=(t=g(r))===null||t===void 0?void 0:t.component;if(!d.get(r)){let l=c(()=>Promise.resolve(f),{ssr:!1,loading:()=>n.createElement(y,Object.assign({},a,{componentName:r}))});d.set(r,l)}let s=e.clientFallback;s&&(e=Object.assign({clientFallback:n.createElement(()=>c(()=>Promise.resolve(()=>s)))},e));let m=d.get(r);return n.createElement(m,Object.assign({},e,{fallback:o?n.createElement(o,Object.assign({},e)):null}))}function _(e,t){return c=e,f=t,t}function h(e){if(Object.keys(e).length!=0)return c&&!e._dynamic?C(Object.assign({_dynamic:!0},e)):y(e)}function W(){return n.createElement(n.Fragment,null,n.createElement("byoc-registration",{components:JSON.stringify(Object.values(E)),suppressHydrationWarning:!0}),n.createElement(f,null))}function y(e){let{componentName:t,fallback:r,clientFallback:a,suppressHydrationWarning:o,_dynamic:s}=e,m=p(e,["componentName","fallback","clientFallback","suppressHydrationWarning","_dynamic"]),l=g(t),i=l==null?void 0:l.component,O=r||(typeof window!="undefined"?a:null);if(!i&&r||!t)return n.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},O);let u=x(t,m);return i&&j(i)?n.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},n.createElement("byoc-"+v(l.id),Object.assign(Object.assign({},b(u)),{suppressHydrationWarning:!0}))):n.createElement(n.Fragment,null,n.createElement("feaas-external",Object.assign({},b(u),{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"}),i==null?null:n.createElement(i,Object.assign({},u))))}export{W as Bundle,h as Component,C as NextComponent,y as RegularComponent,_ as enableNextClientsideComponents}; | ||
import n from"react";import{getComponent as y,getComponentProperties as x,isWebComponent as j,registered as E}from"@sitecore/byoc";import{objectKeysToKebabCase as d,toKebabCase as v}from"@sitecore/byoc";export*from"@sitecore/byoc";var g=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r},b=new Map,f=null,c=null;function C(e){var t;let{componentName:r}=e,a=g(e,["componentName"]),o=(t=y(r))===null||t===void 0?void 0:t.component;if(!b.get(r)){let l=c(()=>Promise.resolve(f),{ssr:!1,loading:()=>n.createElement(p,Object.assign({},a,{componentName:r}))});b.set(r,l)}let s=e.clientFallback;s&&(e=Object.assign(Object.assign({},e),{clientFallback:n.createElement(()=>c(()=>Promise.resolve(()=>s)))}));let m=b.get(r);return n.createElement(m,Object.assign({},e,{fallback:o?n.createElement(o,Object.assign({},e)):e.fallback}))}function _(e,t){return c=e,f=t,t}function h(e){if(Object.keys(e).length!=0)return c&&!e._dynamic?C(Object.assign({_dynamic:!0},e)):p(e)}function W(){return n.createElement(n.Fragment,null,n.createElement("byoc-registration",{components:JSON.stringify(Object.values(E)),suppressHydrationWarning:!0}),n.createElement(f,null))}function p(e){let{componentName:t,fallback:r,clientFallback:a,suppressHydrationWarning:o,_dynamic:s}=e,m=g(e,["componentName","fallback","clientFallback","suppressHydrationWarning","_dynamic"]),l=y(t),i=l==null?void 0:l.component,O=r||(typeof window!="undefined"?a:null);if(!i&&r||!t)return n.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},O);let u=x(t,m);return i&&j(i)?n.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},n.createElement("byoc-"+v(l.id),Object.assign(Object.assign({},d(u)),{suppressHydrationWarning:!0}))):n.createElement(n.Fragment,null,n.createElement("feaas-external",Object.assign({},d(u),{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"}),i==null?null:n.createElement(i,Object.assign({},u))))}export{W as Bundle,h as Component,C as NextComponent,p as RegularComponent,_ as enableNextClientsideComponents}; | ||
//# sourceMappingURL=react.esm.js.map |
@@ -5,3 +5,3 @@ { | ||
"description": "Bring-Your-Own-Components runtime to register and retrieve react components", | ||
"version": "0.0.18-alpha.2", | ||
"version": "0.0.18-alpha.3", | ||
"scripts": { | ||
@@ -8,0 +8,0 @@ "test": "npx vitest", |
@@ -1,2 +0,2 @@ | ||
"use strict";var N=Object.create;var f=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var W=(e,t)=>{for(var n in t)f(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of F(t))!h.call(e,r)&&r!==n&&f(e,r,{get:()=>t[r],enumerable:!(a=k(t,r))||a.enumerable});return e},i=(e,t,n)=>(d(e,t,"default"),n&&d(n,t,"default")),H=(e,t,n)=>(n=e!=null?N(_(e)):{},d(t||!e||!e.__esModule?f(n,"default",{value:e,enumerable:!0}):n,e)),w=e=>d(f({},"__esModule",{value:!0}),e);var l={};W(l,{Bundle:()=>R,Component:()=>K,NextComponent:()=>v,RegularComponent:()=>j,enableNextClientsideComponents:()=>P});module.exports=w(l);var o=H(require("react"),1),c=require("@sitecore/byoc"),u=require("@sitecore/byoc");i(l,require("@sitecore/byoc"),module.exports);var E=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},O=new Map,x=null,b=null;function v(e){var t;let{componentName:n}=e,a=E(e,["componentName"]),r=(t=(0,c.getComponent)(n))===null||t===void 0?void 0:t.component;if(!O.get(n)){let s=b(()=>Promise.resolve(x),{ssr:!1,loading:()=>o.default.createElement(j,Object.assign({},a,{componentName:n}))});O.set(n,s)}let p=e.clientFallback;p&&(e=Object.assign({clientFallback:o.default.createElement(()=>b(()=>Promise.resolve(()=>p)))},e));let g=O.get(n);return o.default.createElement(g,Object.assign({},e,{fallback:r?o.default.createElement(r,Object.assign({},e)):null}))}function P(e,t){return b=e,x=t,t}function K(e){if(Object.keys(e).length!=0)return b&&!e._dynamic?v(Object.assign({_dynamic:!0},e)):j(e)}function R(){return o.default.createElement(o.default.Fragment,null,o.default.createElement("byoc-registration",{components:JSON.stringify(Object.values(c.registered)),suppressHydrationWarning:!0}),o.default.createElement(x,null))}function j(e){let{componentName:t,fallback:n,clientFallback:a,suppressHydrationWarning:r,_dynamic:p}=e,g=E(e,["componentName","fallback","clientFallback","suppressHydrationWarning","_dynamic"]),s=(0,c.getComponent)(t),m=s==null?void 0:s.component,C=n||(typeof window!="undefined"?a:null);if(!m&&n||!t)return o.default.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},C);let y=(0,c.getComponentProperties)(t,g);return m&&(0,c.isWebComponent)(m)?o.default.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},o.default.createElement("byoc-"+(0,u.toKebabCase)(s.id),Object.assign(Object.assign({},(0,u.objectKeysToKebabCase)(y)),{suppressHydrationWarning:!0}))):o.default.createElement(o.default.Fragment,null,o.default.createElement("feaas-external",Object.assign({},(0,u.objectKeysToKebabCase)(y),{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"}),m==null?null:o.default.createElement(m,Object.assign({},y))))} | ||
"use strict";var k=Object.create;var f=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var W=(e,t)=>{for(var n in t)f(e,n,{get:t[n],enumerable:!0})},b=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of F(t))!h.call(e,r)&&r!==n&&f(e,r,{get:()=>t[r],enumerable:!(a=N(t,r))||a.enumerable});return e},i=(e,t,n)=>(b(e,t,"default"),n&&b(n,t,"default")),H=(e,t,n)=>(n=e!=null?k(_(e)):{},b(t||!e||!e.__esModule?f(n,"default",{value:e,enumerable:!0}):n,e)),w=e=>b(f({},"__esModule",{value:!0}),e);var l={};W(l,{Bundle:()=>R,Component:()=>K,NextComponent:()=>v,RegularComponent:()=>j,enableNextClientsideComponents:()=>P});module.exports=w(l);var o=H(require("react"),1),c=require("@sitecore/byoc"),u=require("@sitecore/byoc");i(l,require("@sitecore/byoc"),module.exports);var E=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},O=new Map,x=null,d=null;function v(e){var t;let{componentName:n}=e,a=E(e,["componentName"]),r=(t=(0,c.getComponent)(n))===null||t===void 0?void 0:t.component;if(!O.get(n)){let s=d(()=>Promise.resolve(x),{ssr:!1,loading:()=>o.default.createElement(j,Object.assign({},a,{componentName:n}))});O.set(n,s)}let g=e.clientFallback;g&&(e=Object.assign(Object.assign({},e),{clientFallback:o.default.createElement(()=>d(()=>Promise.resolve(()=>g)))}));let y=O.get(n);return o.default.createElement(y,Object.assign({},e,{fallback:r?o.default.createElement(r,Object.assign({},e)):e.fallback}))}function P(e,t){return d=e,x=t,t}function K(e){if(Object.keys(e).length!=0)return d&&!e._dynamic?v(Object.assign({_dynamic:!0},e)):j(e)}function R(){return o.default.createElement(o.default.Fragment,null,o.default.createElement("byoc-registration",{components:JSON.stringify(Object.values(c.registered)),suppressHydrationWarning:!0}),o.default.createElement(x,null))}function j(e){let{componentName:t,fallback:n,clientFallback:a,suppressHydrationWarning:r,_dynamic:g}=e,y=E(e,["componentName","fallback","clientFallback","suppressHydrationWarning","_dynamic"]),s=(0,c.getComponent)(t),m=s==null?void 0:s.component,C=n||(typeof window!="undefined"?a:null);if(!m&&n||!t)return o.default.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},C);let p=(0,c.getComponentProperties)(t,y);return m&&(0,c.isWebComponent)(m)?o.default.createElement("feaas-external",{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"},o.default.createElement("byoc-"+(0,u.toKebabCase)(s.id),Object.assign(Object.assign({},(0,u.objectKeysToKebabCase)(p)),{suppressHydrationWarning:!0}))):o.default.createElement(o.default.Fragment,null,o.default.createElement("feaas-external",Object.assign({},(0,u.objectKeysToKebabCase)(p),{"data-external-id":t,suppressHydrationWarning:!0,hydrate:"false"}),m==null?null:o.default.createElement(m,Object.assign({},p))))} | ||
//# sourceMappingURL=react.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
353134
1816