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

@sendbird/uikit-message-template

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sendbird/uikit-message-template - npm Package Compare versions

Comparing version 0.0.1-alpha.7 to 0.0.1-alpha.8

12

dist/core/messageTemplate.js

@@ -19,16 +19,16 @@ import React from 'react';

case ComponentType.Box: {
return (React.createElement(renderer.box, { ...item, ...props },
return (React.createElement(renderer.box, Object.assign({}, item, props),
React.createElement(MessageTemplateBase, { templateItems: item.items || [] })));
}
case ComponentType.Text: {
return React.createElement(renderer.text, { ...item, ...props });
return React.createElement(renderer.text, Object.assign({}, item, props));
}
case ComponentType.Image: {
return React.createElement(renderer.image, { ...item, ...props });
return React.createElement(renderer.image, Object.assign({}, item, props));
}
case ComponentType.TextButton: {
return React.createElement(renderer.textButton, { ...item, ...props });
return React.createElement(renderer.textButton, Object.assign({}, item, props));
}
case ComponentType.ImageButton: {
return React.createElement(renderer.imageButton, { ...item, ...props });
return React.createElement(renderer.imageButton, Object.assign({}, item, props));
}

@@ -44,5 +44,5 @@ default: {

MessageTemplate: (props) => (React.createElement(Container, null,
React.createElement(MessageTemplateBase, { ...props }))),
React.createElement(MessageTemplateBase, Object.assign({}, props)))),
MessageTemplateBase,
};
};

@@ -6,7 +6,7 @@ // -------- Set property mapper

const mapper = {
box: opts?.mapBoxProps || opts?.defaultMapper || MAPPER,
text: opts?.mapTextProps || opts?.defaultMapper || MAPPER,
image: opts?.mapImageProps || opts?.defaultMapper || MAPPER,
textButton: opts?.mapTextButtonProps || opts?.defaultMapper || MAPPER,
imageButton: opts?.mapImageButtonProps || opts?.defaultMapper || MAPPER,
box: (opts === null || opts === void 0 ? void 0 : opts.mapBoxProps) || (opts === null || opts === void 0 ? void 0 : opts.defaultMapper) || MAPPER,
text: (opts === null || opts === void 0 ? void 0 : opts.mapTextProps) || (opts === null || opts === void 0 ? void 0 : opts.defaultMapper) || MAPPER,
image: (opts === null || opts === void 0 ? void 0 : opts.mapImageProps) || (opts === null || opts === void 0 ? void 0 : opts.defaultMapper) || MAPPER,
textButton: (opts === null || opts === void 0 ? void 0 : opts.mapTextButtonProps) || (opts === null || opts === void 0 ? void 0 : opts.defaultMapper) || MAPPER,
imageButton: (opts === null || opts === void 0 ? void 0 : opts.mapImageButtonProps) || (opts === null || opts === void 0 ? void 0 : opts.defaultMapper) || MAPPER,
};

@@ -13,0 +13,0 @@ return {

import React from 'react';
const FRAGMENT = ({ children }) => React.createElement(React.Fragment, null, children);
export function createRenderer(opts) {
var _a, _b, _c, _d, _e;
return {
box: opts?.views?.box || FRAGMENT,
text: opts?.views?.text || FRAGMENT,
image: opts?.views?.image || FRAGMENT,
imageButton: opts?.views?.imageButton || FRAGMENT,
textButton: opts?.views?.textButton || FRAGMENT,
box: ((_a = opts === null || opts === void 0 ? void 0 : opts.views) === null || _a === void 0 ? void 0 : _a.box) || FRAGMENT,
text: ((_b = opts === null || opts === void 0 ? void 0 : opts.views) === null || _b === void 0 ? void 0 : _b.text) || FRAGMENT,
image: ((_c = opts === null || opts === void 0 ? void 0 : opts.views) === null || _c === void 0 ? void 0 : _c.image) || FRAGMENT,
imageButton: ((_d = opts === null || opts === void 0 ? void 0 : opts.views) === null || _d === void 0 ? void 0 : _d.imageButton) || FRAGMENT,
textButton: ((_e = opts === null || opts === void 0 ? void 0 : opts.views) === null || _e === void 0 ? void 0 : _e.textButton) || FRAGMENT,
};
}
{
"name": "@sendbird/uikit-message-template",
"version": "0.0.1-alpha.7",
"version": "0.0.1-alpha.8",
"main": "./dist/index.js",

@@ -12,5 +12,5 @@ "module": "./dist/index.js",

"scripts": {
"build": "tsc --module commonjs"
"build": "tsc"
},
"gitHead": "da8823e6865a1d4b2b04017884e116658fc5492c"
"gitHead": "486ba2c8f4fcc9ae09d95ccbbfaf4ebac366d69a"
}

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