@financial-times/x-teaser 20.0.1 → 21.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/CustomSlotTop.test.jsx +1 -1
- package/__tests__/RelativeTime.test.jsx +1 -1
- package/__tests__/Status.test.jsx +1 -1
- package/dist/Teaser.es5.js +61 -75
- package/package.json +7 -11
- package/rollup.js +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { h } = require('@financial-times/x-engine')
|
|
2
|
-
const { mount } = require('
|
|
2
|
+
const { mount } = require('../../../utils/enzyme')
|
|
3
3
|
const renderer = require('react-test-renderer')
|
|
4
4
|
const { Teaser } = require('../')
|
|
5
5
|
const article = require('../__fixtures__/article.json')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { h } = require('@financial-times/x-engine')
|
|
2
|
-
const { mount } = require('
|
|
2
|
+
const { mount } = require('../../../utils/enzyme')
|
|
3
3
|
|
|
4
4
|
import * as LiveBlogStatus from '../src/LiveBlogStatus'
|
|
5
5
|
import * as ExclusiveLabel from '../src/ExclusiveLabel'
|
package/dist/Teaser.es5.js
CHANGED
|
@@ -153,6 +153,22 @@ var CustomSlot = (function (_ref) {
|
|
|
153
153
|
}, render$1(customSlot)) : null;
|
|
154
154
|
});
|
|
155
155
|
|
|
156
|
+
function _arrayLikeToArray(r, a) {
|
|
157
|
+
(null == a || a > r.length) && (a = r.length);
|
|
158
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
159
|
+
return n;
|
|
160
|
+
}
|
|
161
|
+
function _arrayWithHoles(r) {
|
|
162
|
+
if (Array.isArray(r)) return r;
|
|
163
|
+
}
|
|
164
|
+
function _defineProperty(e, r, t) {
|
|
165
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
166
|
+
value: t,
|
|
167
|
+
enumerable: !0,
|
|
168
|
+
configurable: !0,
|
|
169
|
+
writable: !0
|
|
170
|
+
}) : e[r] = t, e;
|
|
171
|
+
}
|
|
156
172
|
function _iterableToArrayLimit(r, l) {
|
|
157
173
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
158
174
|
if (null != t) {
|
|
@@ -180,6 +196,9 @@ function _iterableToArrayLimit(r, l) {
|
|
|
180
196
|
return a;
|
|
181
197
|
}
|
|
182
198
|
}
|
|
199
|
+
function _nonIterableRest() {
|
|
200
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
201
|
+
}
|
|
183
202
|
function ownKeys(e, r) {
|
|
184
203
|
var t = Object.keys(e);
|
|
185
204
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -201,6 +220,43 @@ function _objectSpread2(e) {
|
|
|
201
220
|
}
|
|
202
221
|
return e;
|
|
203
222
|
}
|
|
223
|
+
function _objectWithoutProperties(e, t) {
|
|
224
|
+
if (null == e) return {};
|
|
225
|
+
var o,
|
|
226
|
+
r,
|
|
227
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
228
|
+
if (Object.getOwnPropertySymbols) {
|
|
229
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
230
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
231
|
+
}
|
|
232
|
+
return i;
|
|
233
|
+
}
|
|
234
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
235
|
+
if (null == r) return {};
|
|
236
|
+
var t = {};
|
|
237
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
238
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
239
|
+
t[n] = r[n];
|
|
240
|
+
}
|
|
241
|
+
return t;
|
|
242
|
+
}
|
|
243
|
+
function _slicedToArray(r, e) {
|
|
244
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
245
|
+
}
|
|
246
|
+
function _toPrimitive(t, r) {
|
|
247
|
+
if ("object" != typeof t || !t) return t;
|
|
248
|
+
var e = t[Symbol.toPrimitive];
|
|
249
|
+
if (void 0 !== e) {
|
|
250
|
+
var i = e.call(t, r || "default");
|
|
251
|
+
if ("object" != typeof i) return i;
|
|
252
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
253
|
+
}
|
|
254
|
+
return ("string" === r ? String : Number)(t);
|
|
255
|
+
}
|
|
256
|
+
function _toPropertyKey(t) {
|
|
257
|
+
var i = _toPrimitive(t, "string");
|
|
258
|
+
return "symbol" == typeof i ? i : i + "";
|
|
259
|
+
}
|
|
204
260
|
function _typeof(o) {
|
|
205
261
|
"@babel/helpers - typeof";
|
|
206
262
|
|
|
@@ -210,82 +266,12 @@ function _typeof(o) {
|
|
|
210
266
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
211
267
|
}, _typeof(o);
|
|
212
268
|
}
|
|
213
|
-
function
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
enumerable: true,
|
|
219
|
-
configurable: true,
|
|
220
|
-
writable: true
|
|
221
|
-
});
|
|
222
|
-
} else {
|
|
223
|
-
obj[key] = value;
|
|
224
|
-
}
|
|
225
|
-
return obj;
|
|
226
|
-
}
|
|
227
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
228
|
-
if (source == null) return {};
|
|
229
|
-
var target = {};
|
|
230
|
-
var sourceKeys = Object.keys(source);
|
|
231
|
-
var key, i;
|
|
232
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
233
|
-
key = sourceKeys[i];
|
|
234
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
235
|
-
target[key] = source[key];
|
|
236
|
-
}
|
|
237
|
-
return target;
|
|
238
|
-
}
|
|
239
|
-
function _objectWithoutProperties(source, excluded) {
|
|
240
|
-
if (source == null) return {};
|
|
241
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
242
|
-
var key, i;
|
|
243
|
-
if (Object.getOwnPropertySymbols) {
|
|
244
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
245
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
246
|
-
key = sourceSymbolKeys[i];
|
|
247
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
248
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
249
|
-
target[key] = source[key];
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return target;
|
|
253
|
-
}
|
|
254
|
-
function _slicedToArray(arr, i) {
|
|
255
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
256
|
-
}
|
|
257
|
-
function _arrayWithHoles(arr) {
|
|
258
|
-
if (Array.isArray(arr)) return arr;
|
|
259
|
-
}
|
|
260
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
261
|
-
if (!o) return;
|
|
262
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
263
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
264
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
265
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
266
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
267
|
-
}
|
|
268
|
-
function _arrayLikeToArray(arr, len) {
|
|
269
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
270
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
271
|
-
return arr2;
|
|
272
|
-
}
|
|
273
|
-
function _nonIterableRest() {
|
|
274
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
275
|
-
}
|
|
276
|
-
function _toPrimitive(input, hint) {
|
|
277
|
-
if (typeof input !== "object" || input === null) return input;
|
|
278
|
-
var prim = input[Symbol.toPrimitive];
|
|
279
|
-
if (prim !== undefined) {
|
|
280
|
-
var res = prim.call(input, hint || "default");
|
|
281
|
-
if (typeof res !== "object") return res;
|
|
282
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
269
|
+
function _unsupportedIterableToArray(r, a) {
|
|
270
|
+
if (r) {
|
|
271
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
272
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
273
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
283
274
|
}
|
|
284
|
-
return (hint === "string" ? String : Number)(input);
|
|
285
|
-
}
|
|
286
|
-
function _toPropertyKey(arg) {
|
|
287
|
-
var key = _toPrimitive(arg, "string");
|
|
288
|
-
return typeof key === "symbol" ? key : String(key);
|
|
289
275
|
}
|
|
290
276
|
|
|
291
277
|
var ImageSizes = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@financial-times/x-teaser",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0-beta.1",
|
|
4
4
|
"description": "This module provides templates for use with o-teaser. Teasers are used to present content.",
|
|
5
5
|
"source": "src/Teaser.jsx",
|
|
6
6
|
"main": "dist/Teaser.cjs.js",
|
|
@@ -9,27 +9,23 @@
|
|
|
9
9
|
"style": "src/Teaser.scss",
|
|
10
10
|
"types": "Props.d.ts",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "
|
|
13
|
-
"start": "
|
|
12
|
+
"build": "FROM=components/x-teaser rollup -c ../../rollup.config.js",
|
|
13
|
+
"start": "FROM=components/x-teaser rollup -c ../../rollup.config.js --watch"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
|
-
"x-
|
|
16
|
+
"x-teaser"
|
|
17
17
|
],
|
|
18
18
|
"author": "",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@financial-times/x-engine": "^20.0.
|
|
21
|
+
"@financial-times/x-engine": "^20.0.0",
|
|
22
22
|
"dateformat": "^3.0.3"
|
|
23
23
|
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@financial-times/x-rollup": "file:../../packages/x-rollup",
|
|
26
|
-
"check-engine": "^1.10.1"
|
|
27
|
-
},
|
|
28
24
|
"repository": {
|
|
29
25
|
"type": "git",
|
|
30
|
-
"url": "https://github.com/Financial-Times/x-
|
|
26
|
+
"url": "https://github.com/Financial-Times/x-teaser.git"
|
|
31
27
|
},
|
|
32
|
-
"homepage": "https://github.com/Financial-Times/x-
|
|
28
|
+
"homepage": "https://github.com/Financial-Times/x-teaser/tree/HEAD/components/x-teaser",
|
|
33
29
|
"engines": {
|
|
34
30
|
"node": "16.x || 18.x || 20.x",
|
|
35
31
|
"npm": "7.x || 8.x || 9.x || 10.x"
|
package/rollup.js
DELETED