Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sitecore-feaas/clientside

Package Overview
Dependencies
Maintainers
5
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sitecore-feaas/clientside - npm Package Compare versions

Comparing version 0.5.16-alpha.1 to 0.5.17

cdn/browser/index.esm.js

17

build/ui/react.js

@@ -71,3 +71,3 @@ import * as BYOC from '@sitecore/byoc/react';

*/
export function FEAASReactComponent({ data, lastModified, fetchedData, ...props }) {
export function FEAASReactComponent({ data, lastModified, fetchedData, renderNode, ...props }) {
let preload = null;

@@ -77,2 +77,13 @@ let children;

children = parseHTMLContent(props.template, fetchedData || data || {}).map((node, index) => HTMLNodeToReact(node, (node, attributes) => {
// invoke customization of HTML node rendering
if (renderNode) {
const override = renderNode === null || renderNode === void 0 ? void 0 : renderNode(node, attributes);
if (override != null && 'type' in override) {
return [override.type, override.props];
}
attributes = {
...attributes,
...override
};
}
// Override rendering of html tag if user provided

@@ -112,2 +123,3 @@ if (ReactElementComponents[node.localName]) {

export function HTMLNodeToReact(node, callback, key) {
var _a;
if (node.nodeType === 3) {

@@ -145,3 +157,4 @@ return node.textContent;

const reactAttributes = Object.assign({ key, suppressHydrationWarning: true }, (reactNode === null || reactNode === void 0 ? void 0 : reactNode[1]) || attributes);
return React.createElement(reactName, reactAttributes, ['img', 'br', 'input', 'style'].includes(reactName) ? null : children);
const reactChildren = ((_a = reactNode === null || reactNode === void 0 ? void 0 : reactNode[1]) === null || _a === void 0 ? void 0 : _a.children) || children;
return React.createElement(reactName, reactAttributes, ['img', 'br', 'input', 'style'].includes(reactName) ? null : reactChildren);
}

@@ -148,0 +161,0 @@ export const enableNextClientsideComponents = BYOC.enableNextClientsideComponents;

4

package.json
{
"name": "@sitecore-feaas/clientside",
"version": "0.5.16-alpha.1",
"version": "0.5.17",
"scripts": {

@@ -14,3 +14,3 @@ "start": "webpack serve --open",

"types": "tsc --build; cd src/ui && tsc --build",
"postpublish": "node ../cdn/upload-package.js clientside $npm_package_version"
"postpublish": "node ../cdn/upload-package.js clientside $npm_package_version cdn"
},

@@ -17,0 +17,0 @@ "license": "ISC",

@@ -56,3 +56,3 @@ /// <reference types="@types/react" />

whenSDKReady: ControlledPromise<FEAASContextImports.SDK>;
getPortalRoot(): HTMLElement | ShadowRoot | FEAASElement<any, any>;
getPortalRoot(): HTMLElement | FEAASElement<any, any> | ShadowRoot;
render({ children, library }: React.PropsWithChildren<FEAASContextProps>, { AppContext, Chakra: { Button, Tooltip }, React }: typeof this.payload): FEAASContextImports.React.JSX.Element;

@@ -59,0 +59,0 @@ }

@@ -15,3 +15,3 @@ /// <reference types="@types/react" />

*/
export declare function setElementImplementation(tagName: string, Component: React.Component | React.FC): void;
export declare function setElementImplementation(tagName: string, Component: React.Component<Record<string, string>> | React.FC<Record<string, string>>): void;
type FEEASReactComponentFetch = string[] | string | null | undefined | boolean;

@@ -23,2 +23,3 @@ export declare function normalizeFetchAttribute(fetch: FEEASReactComponentFetch): any[];

lastModified?: Date | string;
renderNode?: (node: HTMLNode, attributes: Record<string, any>) => JSX.Element | Record<string, any> | null;
};

@@ -48,3 +49,3 @@ /**

*/
export declare function FEAASReactComponent({ data, lastModified, fetchedData, ...props }: FEAASReactComponentProps & {
export declare function FEAASReactComponent({ data, lastModified, fetchedData, renderNode, ...props }: FEAASReactComponentProps & {
fetchedData?: any;

@@ -51,0 +52,0 @@ }): React.JSX.Element;

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 too big to display

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 too big to display

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 too big to display

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc