Socket
Socket
Sign inDemoInstall

@financial-times/community-event-teaser

Package Overview
Dependencies
Maintainers
11
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/community-event-teaser - npm Package Compare versions

Comparing version 7.0.2 to 7.1.0-alpha.0

6

dist/index.d.ts

@@ -1,2 +0,3 @@

export { EventTopicCardItem, EventTopicCardItemProps, } from "./event-topic-card-item";
import { eventpromoToEventTeaserProps } from "./utils/eventpromoToEventTeaserProps";
export { EventTopicCardItem, EventTopicCardItemProps } from "./event-topic-card-item";
export { EventTeaserProps, EventTeaser } from "./event-teaser";

@@ -6,2 +7,5 @@ export { BrandBanner, BrandBannerProps } from "./brand-banner";

export { EventTeaserSlice } from "./event-teaser-slice";
export declare const utils: {
eventpromoToEventTeaserProps: typeof eventpromoToEventTeaserProps;
};
//# sourceMappingURL=index.d.ts.map

45

dist/index.js

@@ -12,2 +12,20 @@ 'use strict';

function eventpromoToEventTeaserProps(eventpromo) {
return {
eventUrl: eventpromo.eventUrl,
imgUrl: eventpromo.imageUrl,
lazyLoadImage: false,
location: eventpromo.location,
scheduledEndTime: new Date(eventpromo.scheduledEndTime),
scheduledStartTime: new Date(eventpromo.scheduledStartTime),
showBrand: false,
showImage: false,
showStandfirst: false,
showTimeInTimestamp: false,
standfirst: eventpromo.strapline,
title: eventpromo.title,
id: eventpromo.contentId
};
}
function formatEventDate(scheduledStartTime) {

@@ -208,13 +226,13 @@ var isSameYear = new Date().getFullYear() === scheduledStartTime.getFullYear();

function EventTeaser(props) {
var title = props.title, eventUrl = props.eventUrl, location = props.location, scheduledStartTime = props.scheduledStartTime, scheduledEndTime = props.scheduledEndTime, standfirst = props.standfirst, imgUrl = props.imgUrl, _a = props.showStandfirst, showStandfirst = _a === void 0 ? true : _a, _b = props.showImage, showImage = _b === void 0 ? true : _b, _c = props.showTimeInTimestamp, showTimeInTimestamp = _c === void 0 ? false : _c, _d = props.lazyLoadImage, lazyLoadImage = _d === void 0 ? false : _d, _e = props.showBrand, showBrand = _e === void 0 ? true : _e;
return (xEngine.h("div", { className: "event-teaser", "data-trackable": "event-teaser", "data-o-tracking-view": true },
showImage && imgUrl && (xEngine.h(Image, { url: imgUrl, eventUrl: eventUrl, imageSize: "Small", lazyLoad: lazyLoadImage })),
xEngine.h("div", { className: "event-teaser__content-container" },
xEngine.h("div", { className: "event-teaser__details" },
showBrand && xEngine.h(Brand, null),
xEngine.h(Title, { title: title, eventUrl: eventUrl }),
showStandfirst && standfirst && (xEngine.h(Standfirst, { standfirst: standfirst }))),
xEngine.h("div", { className: "event-teaser__footer" },
xEngine.h(Timestamp, { scheduledStartTime: scheduledStartTime, scheduledEndTime: scheduledEndTime, showTime: showTimeInTimestamp }),
xEngine.h(Location, { location: location })))));
var id = props.id, title = props.title, eventUrl = props.eventUrl, location = props.location, scheduledStartTime = props.scheduledStartTime, scheduledEndTime = props.scheduledEndTime, standfirst = props.standfirst, imgUrl = props.imgUrl, _a = props.showStandfirst, showStandfirst = _a === void 0 ? true : _a, _b = props.showImage, showImage = _b === void 0 ? true : _b, _c = props.showTimeInTimestamp, showTimeInTimestamp = _c === void 0 ? false : _c, _d = props.lazyLoadImage, lazyLoadImage = _d === void 0 ? false : _d, _e = props.showBrand, showBrand = _e === void 0 ? true : _e;
return (h("div", { className: "event-teaser", "data-trackable": "event-teaser", "data-trackable-context-content-id": id, "data-o-tracking-view": true },
showImage && imgUrl && (h(Image, { url: imgUrl, eventUrl: eventUrl, imageSize: "Small", lazyLoad: lazyLoadImage })),
h("div", { className: "event-teaser__content-container" },
h("div", { className: "event-teaser__details" },
showBrand && h(Brand, null),
h(Title, { title: title, eventUrl: eventUrl }),
showStandfirst && standfirst && (h(Standfirst, { standfirst: standfirst }))),
h("div", { className: "event-teaser__footer" },
h(Timestamp, { scheduledStartTime: scheduledStartTime, scheduledEndTime: scheduledEndTime, showTime: showTimeInTimestamp }),
h(Location, { location: location })))));
}

@@ -411,2 +429,6 @@

var utils = {
eventpromoToEventTeaserProps: eventpromoToEventTeaserProps
};
exports.BrandBanner = BrandBanner;

@@ -417,2 +439,3 @@ exports.CityBanner = CityBanner;

exports.EventTopicCardItem = EventTopicCardItem;
exports.utils = utils;
//# sourceMappingURL=index.js.map
{
"name": "@financial-times/community-event-teaser",
"version": "7.0.2",
"version": "7.1.0-alpha.0",
"description": "UI for community events",

@@ -43,3 +43,6 @@ "main": "dist/index.js",

},
"gitHead": "72faf1137e482c1e8f6593e17d68ec018f564bd2"
"devDependencies": {
"@financial-times/community-event-client": "^0.0.5-alpha.0"
},
"gitHead": "8fac9c7a201815436ce99d53a06ed18b1632dc89"
}

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