@financial-times/community-event-teaser
Advanced tools
Comparing version 6.0.0 to 6.0.1
@@ -15,3 +15,3 @@ 'use strict'; | ||
var dateFormat = isSameYear ? "EEEE, do MMMM" : "EEEE, do MMMM yyyy"; | ||
return ftDateFormat__default['default'].format(scheduledStartTime, dateFormat); | ||
return ftDateFormat__default["default"].format(scheduledStartTime, dateFormat); | ||
} | ||
@@ -28,3 +28,3 @@ | ||
dateString = | ||
"Started at " + ftDateFormat__default['default'].format(scheduledStartTime, "HH:mm"); | ||
"Started at " + ftDateFormat__default["default"].format(scheduledStartTime, "HH:mm"); | ||
} | ||
@@ -34,7 +34,7 @@ else if (inProgress && daysAway === -1) { | ||
"Started yesterday at " + | ||
ftDateFormat__default['default'].format(scheduledStartTime, "HH:mm"); | ||
ftDateFormat__default["default"].format(scheduledStartTime, "HH:mm"); | ||
} | ||
else if (inProgress && daysAway > -7) { | ||
dateString = | ||
"Started on " + ftDateFormat__default['default'].format(scheduledStartTime, "EEEE"); | ||
"Started on " + ftDateFormat__default["default"].format(scheduledStartTime, "EEEE"); | ||
} | ||
@@ -45,7 +45,7 @@ else if (inProgress) { | ||
else if (daysAway === 0) { | ||
dateString = "Today at " + ftDateFormat__default['default'].format(scheduledStartTime, "HH:mm"); | ||
dateString = "Today at " + ftDateFormat__default["default"].format(scheduledStartTime, "HH:mm"); | ||
} | ||
else if (daysAway === 1) { | ||
dateString = | ||
"Tomorrow at " + ftDateFormat__default['default'].format(scheduledStartTime, "HH:mm"); | ||
"Tomorrow at " + ftDateFormat__default["default"].format(scheduledStartTime, "HH:mm"); | ||
} | ||
@@ -87,3 +87,3 @@ else { | ||
var title = props.title, eventUrl = props.eventUrl, location = props.location, scheduledStartTime = props.scheduledStartTime, scheduledEndTime = props.scheduledEndTime, showTimeInTimestamp = props.showTimeInTimestamp; | ||
return (xEngine.h("div", { className: "event-teaser event-teaser--topic-card-item", "data-trackable": "event-teaser" }, | ||
return (xEngine.h("div", { className: "event-teaser event-teaser--topic-card-item", "data-trackable": "event-teaser", "data-o-tracking-view": true }, | ||
xEngine.h("div", { className: "event-teaser__content-container" }, | ||
@@ -97,3 +97,3 @@ xEngine.h("div", { className: "event-teaser__details" }, | ||
/*! ***************************************************************************** | ||
/****************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
@@ -193,3 +193,5 @@ | ||
var imageSrc = url; | ||
if (!url.startsWith("data:") && !url.startsWith("blob:")) { | ||
if (!url.startsWith("data:") && | ||
!url.startsWith("blob:") && | ||
!url.includes("localhost")) { | ||
imageSrc = getImageServiceUrl(url, (ImageSizes.get(imageSize) || ImageSizes.get("XS"))); | ||
@@ -213,3 +215,3 @@ } | ||
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" }, | ||
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 })), | ||
@@ -216,0 +218,0 @@ xEngine.h("div", { className: "event-teaser__content-container" }, |
{ | ||
"name": "@financial-times/community-event-teaser", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "UI for community events", | ||
@@ -26,5 +26,10 @@ "main": "dist/index.js", | ||
}, | ||
"volta": { | ||
"node": "16.14.2", | ||
"npm": "7.20.2" | ||
}, | ||
"homepage": "https://github.com/Financial-Times/community-event-ui#readme", | ||
"devDependencies": { | ||
"@babel/core": "^7.15.0", | ||
"@financial-times/math": "^1.1.0", | ||
"@financial-times/secret-squirrel": "^2.18.4", | ||
@@ -74,14 +79,18 @@ "@rollup/plugin-commonjs": "^20.0.0", | ||
}, | ||
"dependencies": { | ||
"@financial-times/ft-date-format": "^2.1.0", | ||
"@financial-times/x-engine": "^8.0.1" | ||
}, | ||
"peerDependencies": { | ||
"@financial-times/o-spacing": "^3.0.0", | ||
"@financial-times/o-brand": "^4.2.1", | ||
"@financial-times/o-buttons": "^7.0.0", | ||
"@financial-times/o-colors": "^6.0.0", | ||
"@financial-times/o-fonts": "^5.3.3", | ||
"@financial-times/o-grid": "^6.0.0", | ||
"@financial-times/o-icons": "^7.4.0", | ||
"@financial-times/o-normalise": "^3.0.0", | ||
"@financial-times/o-spacing": "^3.0.0", | ||
"@financial-times/o-typography": "^7.0.0", | ||
"@financial-times/o-normalise": "^3.0.0", | ||
"@financial-times/o-buttons": "^7.0.0" | ||
"@financial-times/sass-mq": "^5.2.3" | ||
}, | ||
"dependencies": { | ||
"@financial-times/ft-date-format": "^2.1.0", | ||
"@financial-times/x-engine": "^8.0.1" | ||
}, | ||
"x-dash": { | ||
@@ -88,0 +97,0 @@ "engine": { |
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
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
2015029
50450
12
45