@financial-times/n-myft-ui 27.2.0 → 28.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.circleci/config.yml +1 -1
- package/Makefile +7 -16
- package/README.md +1 -1
- package/build-state/npm-shrinkwrap.json +2009 -3983
- package/components/button/main.scss +1 -1
- package/components/instant-alert/index.js +1 -1
- package/components/pin-button/index.js +1 -1
- package/components/unread-articles-indicator/date-fns.js +6 -6
- package/components/unread-articles-indicator/device-session.js +1 -3
- package/components/unread-articles-indicator/index.js +3 -3
- package/components/unread-articles-indicator/initialise-feed-start-time.js +22 -12
- package/components/unread-articles-indicator/storage.js +10 -8
- package/karma.conf.js +2 -11
- package/myft/README.md +1 -1
- package/myft/main.scss +10 -10
- package/myft/ui/lists.js +3 -3
- package/myft/ui/myft-buttons/init.js +1 -1
- package/myft/ui/save-article-to-list-variant.js +22 -29
- package/package.json +30 -9
- package/scripts/deploy-gh-pages.sh +0 -1
- package/styles.css +1 -0
- package/test/unread-articles-indicator/device-session.spec.js +2 -2
- package/test/unread-articles-indicator/initialise-feed-start-time.spec.js +1 -1
- package/webpack.config.js +19 -0
- package/bower.json +0 -36
- package/page-kit.config.js +0 -21
- package/scripts/prevent-npm-deps.js +0 -8
@@ -1,7 +1,7 @@
|
|
1
1
|
import Delegate from 'ftdomdelegate';
|
2
2
|
import myftApiClient from 'next-myft-client';
|
3
3
|
import serialize from 'form-serialize';
|
4
|
-
import Tooltip from 'o-tooltip';
|
4
|
+
import Tooltip from '@financial-times/o-tooltip';
|
5
5
|
|
6
6
|
const delegate = new Delegate(document.body);
|
7
7
|
|
@@ -2,12 +2,12 @@
|
|
2
2
|
// the detail => https://github.com/date-fns/date-fns/blob/HEAD/CHANGELOG.md#200---2019-08-20
|
3
3
|
// By adding validation for dates before their functions allows us to know it when unexpected value passed.
|
4
4
|
|
5
|
-
import isTodayOriginal from
|
6
|
-
import isAfterOriginal from
|
7
|
-
import addMinutesOriginal from
|
8
|
-
import startOfDayOriginal from
|
9
|
-
import isValidOriginal from
|
10
|
-
import parseISO from
|
5
|
+
import isTodayOriginal from 'date-fns/src/isToday';
|
6
|
+
import isAfterOriginal from 'date-fns/src/isAfter';
|
7
|
+
import addMinutesOriginal from 'date-fns/src/addMinutes';
|
8
|
+
import startOfDayOriginal from 'date-fns/src/startOfDay';
|
9
|
+
import isValidOriginal from 'date-fns/src/isValid';
|
10
|
+
import parseISO from 'date-fns/src/parseISO';
|
11
11
|
|
12
12
|
const isValid = (date) => {
|
13
13
|
if (!isValidOriginal(date)) {
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import {isAfter, addMinutes} from '
|
1
|
+
import { isAfter, addMinutes } from 'date-fns';
|
2
2
|
import * as storage from './storage';
|
3
3
|
const SESSION_THRESHOLD_MINUTES = 30;
|
4
4
|
|
5
5
|
export default class DeviceSession {
|
6
|
-
|
7
6
|
constructor () {
|
8
7
|
this.expiry = storage.getDeviceSessionExpiry();
|
9
8
|
const newExpiry = addMinutes(new Date(), SESSION_THRESHOLD_MINUTES);
|
@@ -17,5 +16,4 @@ export default class DeviceSession {
|
|
17
16
|
return true;
|
18
17
|
}
|
19
18
|
}
|
20
|
-
|
21
19
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {startOfDay} from '
|
1
|
+
import { startOfDay } from 'date-fns';
|
2
2
|
import * as storage from './storage';
|
3
3
|
import initialiseFeedStartTime from './initialise-feed-start-time';
|
4
4
|
import sessionClient from 'next-session-client';
|
@@ -8,7 +8,7 @@ let userId;
|
|
8
8
|
|
9
9
|
async function getValidSession () {
|
10
10
|
if (!userId) {
|
11
|
-
const {uuid} = await sessionClient.uuid();
|
11
|
+
const { uuid } = await sessionClient.uuid();
|
12
12
|
if (!uuid) throw new Error('No userId');
|
13
13
|
userId = uuid;
|
14
14
|
}
|
@@ -24,7 +24,7 @@ export async function getNewArticlesSinceTime () {
|
|
24
24
|
if (!initialFeedStartTime && storage.isAvailable()) {
|
25
25
|
try {
|
26
26
|
initialFeedStartTime = await initialiseFeedStartTime(user, new Date());
|
27
|
-
} catch(e) {}
|
27
|
+
} catch (e) {}
|
28
28
|
}
|
29
29
|
|
30
30
|
return initialFeedStartTime || dayStart;
|
@@ -1,16 +1,18 @@
|
|
1
|
-
import {isToday, startOfDay} from '
|
1
|
+
import { isToday, startOfDay } from 'date-fns';
|
2
2
|
import DeviceSession from './device-session';
|
3
3
|
import * as storage from './storage';
|
4
|
-
import {json as fetchJson} from 'fetchres';
|
4
|
+
import { json as fetchJson } from 'fetchres';
|
5
5
|
|
6
6
|
const deviceSession = new DeviceSession();
|
7
7
|
|
8
8
|
export const fetchUserLastVisitedAt = (userId) => {
|
9
|
-
const url = '/__myft/users/:userId/last-seen?source=next-myft'
|
10
|
-
|
11
|
-
|
9
|
+
const url = '/__myft/users/:userId/last-seen?source=next-myft'.replace(
|
10
|
+
':userId',
|
11
|
+
userId
|
12
|
+
);
|
13
|
+
return fetch(url, { credentials: 'include' })
|
12
14
|
.then(fetchJson)
|
13
|
-
.then(({lastSeen}) => new Date(lastSeen));
|
15
|
+
.then(({ lastSeen }) => new Date(lastSeen));
|
14
16
|
};
|
15
17
|
|
16
18
|
/**
|
@@ -19,12 +21,18 @@ export const fetchUserLastVisitedAt = (userId) => {
|
|
19
21
|
* @return {Promise<Date>} date when we now determine articles to be 'new' for the user
|
20
22
|
*/
|
21
23
|
const determineFeedStartTime = (userId, now, previousFeedStartTime) => {
|
22
|
-
if (
|
24
|
+
if (
|
25
|
+
previousFeedStartTime &&
|
26
|
+
isToday(previousFeedStartTime) &&
|
27
|
+
!deviceSession.isNewSession()
|
28
|
+
) {
|
23
29
|
return Promise.resolve(previousFeedStartTime);
|
24
30
|
}
|
25
31
|
|
26
32
|
return fetchUserLastVisitedAt(userId)
|
27
|
-
.then(
|
33
|
+
.then((userLastVisitedAt) =>
|
34
|
+
isToday(userLastVisitedAt) ? userLastVisitedAt : Promise.reject()
|
35
|
+
)
|
28
36
|
.catch(() => startOfDay(now));
|
29
37
|
};
|
30
38
|
|
@@ -33,12 +41,14 @@ const determineFeedStartTime = (userId, now, previousFeedStartTime) => {
|
|
33
41
|
* @param {Date} now Date representing the time now
|
34
42
|
*/
|
35
43
|
export default (userId, now) => {
|
36
|
-
const previousFeedStartTime =
|
37
|
-
|
38
|
-
|
44
|
+
const previousFeedStartTime =
|
45
|
+
storage.isAvailable() && storage.getFeedStartTime();
|
46
|
+
return determineFeedStartTime(userId, now, previousFeedStartTime).then(
|
47
|
+
(startTime) => {
|
39
48
|
if (storage.isAvailable()) {
|
40
49
|
storage.setFeedStartTime(startTime);
|
41
50
|
}
|
42
51
|
return startTime;
|
43
|
-
}
|
52
|
+
}
|
53
|
+
);
|
44
54
|
};
|
@@ -1,23 +1,26 @@
|
|
1
|
-
import {isValid} from '
|
1
|
+
import { isValid } from 'date-fns';
|
2
2
|
|
3
3
|
const DEVICE_SESSION_EXPIRY = 'deviceSessionExpiry';
|
4
4
|
const FEED_START_TIME = 'newArticlesSinceTime';
|
5
5
|
|
6
|
-
const isISOString = str => typeof str === 'string' && str.charAt(10) === 'T';
|
7
|
-
const getStoredDate = key => {
|
6
|
+
const isISOString = (str) => typeof str === 'string' && str.charAt(10) === 'T';
|
7
|
+
const getStoredDate = (key) => {
|
8
8
|
const value = window.localStorage.getItem(key);
|
9
9
|
const date = new Date(value);
|
10
10
|
|
11
11
|
return isISOString(value) && isValid(date) ? date : null;
|
12
12
|
};
|
13
13
|
|
14
|
-
export const getDeviceSessionExpiry = () =>
|
14
|
+
export const getDeviceSessionExpiry = () =>
|
15
|
+
getStoredDate(DEVICE_SESSION_EXPIRY);
|
15
16
|
|
16
|
-
export const setDeviceSessionExpiry = date =>
|
17
|
+
export const setDeviceSessionExpiry = (date) =>
|
18
|
+
window.localStorage.setItem(DEVICE_SESSION_EXPIRY, date.toISOString());
|
17
19
|
|
18
20
|
export const getFeedStartTime = () => getStoredDate(FEED_START_TIME);
|
19
21
|
|
20
|
-
export const setFeedStartTime = date =>
|
22
|
+
export const setFeedStartTime = (date) =>
|
23
|
+
window.localStorage.setItem(FEED_START_TIME, date.toISOString());
|
21
24
|
|
22
25
|
export const isAvailable = () => {
|
23
26
|
try {
|
@@ -26,8 +29,7 @@ export const isAvailable = () => {
|
|
26
29
|
storage.setItem(x, x);
|
27
30
|
storage.removeItem(x);
|
28
31
|
return true;
|
29
|
-
}
|
30
|
-
catch(e) {
|
32
|
+
} catch (e) {
|
31
33
|
return false;
|
32
34
|
}
|
33
35
|
};
|
package/karma.conf.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
// Karma configuration
|
2
2
|
// Generated on Fri Apr 18 2014 18:19:03 GMT+0100 (BST)
|
3
|
-
const BowerResolvePlugin = require('bower-resolve-webpack-plugin');
|
4
3
|
module.exports = function (karma) {
|
5
4
|
|
6
5
|
|
@@ -41,9 +40,8 @@ module.exports = function (karma) {
|
|
41
40
|
},
|
42
41
|
webpack: {
|
43
42
|
resolve: {
|
44
|
-
|
45
|
-
|
46
|
-
descriptionFiles: ['bower.json', 'package.json'],
|
43
|
+
modules: ['node_modules'],
|
44
|
+
descriptionFiles: ['package.json'],
|
47
45
|
mainFields: ['browser', 'main'],
|
48
46
|
mainFiles: ['index', 'main'],
|
49
47
|
extensions: ['.js', '.json']
|
@@ -153,13 +151,6 @@ module.exports = function (karma) {
|
|
153
151
|
os: 'Windows',
|
154
152
|
os_version: '10'
|
155
153
|
},
|
156
|
-
ie11: {
|
157
|
-
base: 'BrowserStack',
|
158
|
-
browser: 'IE',
|
159
|
-
browser_version: '11',
|
160
|
-
os: 'Windows',
|
161
|
-
os_version: '7'
|
162
|
-
},
|
163
154
|
safari: {
|
164
155
|
base: 'BrowserStack',
|
165
156
|
os: 'OS X',
|
package/myft/README.md
CHANGED
package/myft/main.scss
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
@import 'o-normalise/main';
|
2
|
-
@import 'o-colors/main';
|
3
|
-
@import 'o-grid/main';
|
4
|
-
@import 'o-icons/main';
|
5
|
-
@import 'o-buttons/main';
|
6
|
-
@import 'o-editorial-typography/main';
|
7
|
-
@import 'o-forms/main';
|
8
|
-
@import 'o-overlay/main';
|
9
|
-
@import 'o-spacing/main';
|
1
|
+
@import '@financial-times/o-normalise/main';
|
2
|
+
@import '@financial-times/o-colors/main';
|
3
|
+
@import '@financial-times/o-grid/main';
|
4
|
+
@import '@financial-times/o-icons/main';
|
5
|
+
@import '@financial-times/o-buttons/main';
|
6
|
+
@import '@financial-times/o-editorial-typography/main';
|
7
|
+
@import '@financial-times/o-forms/main';
|
8
|
+
@import '@financial-times/o-overlay/main';
|
9
|
+
@import '@financial-times/o-spacing/main';
|
10
10
|
|
11
11
|
$n-notification-is-silent: false !default;
|
12
|
-
@import 'n-notification/main';
|
12
|
+
@import '@financial-times/n-notification/main';
|
13
13
|
|
14
14
|
@import './ui/myft-buttons/main';
|
15
15
|
@import './ui/lists';
|
package/myft/ui/lists.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import myFtClient from 'next-myft-client';
|
2
2
|
import Delegate from 'ftdomdelegate';
|
3
|
-
import Overlay from 'o-overlay';
|
3
|
+
import Overlay from '@financial-times/o-overlay';
|
4
4
|
import * as myFtUiButtonStates from './lib/button-states';
|
5
|
-
import nNotification from 'n-notification';
|
5
|
+
import nNotification from '@financial-times/n-notification';
|
6
6
|
import { uuid } from 'n-ui-foundations';
|
7
7
|
import getToken from './lib/get-csrf-token';
|
8
|
-
import oForms from 'o-forms';
|
8
|
+
import oForms from '@financial-times/o-forms';
|
9
9
|
import openSaveArticleToListVariant from './save-article-to-list-variant';
|
10
10
|
|
11
11
|
const delegate = new Delegate(document.body);
|
@@ -3,7 +3,7 @@ import * as tracking from '../lib/tracking';
|
|
3
3
|
import * as loadedRelationships from '../lib/loaded-relationships';
|
4
4
|
import relationshipConfig from '../lib/relationship-config';
|
5
5
|
import setTokens from '../lib/set-tokens';
|
6
|
-
import nNotification from 'n-notification';
|
6
|
+
import nNotification from '@financial-times/n-notification';
|
7
7
|
import Delegate from 'ftdomdelegate';
|
8
8
|
import personaliseLinks from '../personalise-links';
|
9
9
|
import doFormSubmit from './do-form-submit';
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import Overlay from 'o-overlay';
|
1
|
+
import Overlay from '@financial-times/o-overlay';
|
2
2
|
import myFtClient from 'next-myft-client';
|
3
3
|
import { uuid } from 'n-ui-foundations';
|
4
4
|
import getToken from './lib/get-csrf-token';
|
5
|
-
import oTooltip from 'o-tooltip';
|
6
5
|
|
7
6
|
const csrfToken = getToken();
|
8
7
|
|
@@ -32,6 +31,7 @@ async function openSaveArticleToListVariant (name, contentId) {
|
|
32
31
|
const announceListContainer = document.querySelector('.myft-ui-create-list-variant-announcement');
|
33
32
|
announceListContainer.textContent = `${list} created`;
|
34
33
|
triggerCreateListEvent(contentId);
|
34
|
+
contentElement.addEventListener('click', openFormHandler, { once: true });
|
35
35
|
});
|
36
36
|
});
|
37
37
|
}
|
@@ -76,8 +76,8 @@ async function openSaveArticleToListVariant (name, contentId) {
|
|
76
76
|
existingOverlay.destroy();
|
77
77
|
}
|
78
78
|
|
79
|
-
const contentElement = ContentElement();
|
80
79
|
const headingElement = HeadingElement();
|
80
|
+
let [contentElement, removeDescription] = ContentElement(!lists.length);
|
81
81
|
|
82
82
|
const createListOverlay = new Overlay(name, {
|
83
83
|
html: contentElement,
|
@@ -104,6 +104,7 @@ async function openSaveArticleToListVariant (name, contentId) {
|
|
104
104
|
try {
|
105
105
|
const formElement = FormElement(createList);
|
106
106
|
const overlayContent = document.querySelector('.o-overlay__content');
|
107
|
+
removeDescription();
|
107
108
|
overlayContent.insertAdjacentElement('beforeend', formElement);
|
108
109
|
formElement.elements[0].focus();
|
109
110
|
} catch(error) {
|
@@ -121,31 +122,12 @@ async function openSaveArticleToListVariant (name, contentId) {
|
|
121
122
|
overlayContent.insertAdjacentElement('afterbegin', listElement);
|
122
123
|
}
|
123
124
|
|
124
|
-
contentElement.addEventListener('click', openFormHandler);
|
125
|
+
contentElement.addEventListener('click', openFormHandler, { once: true });
|
125
126
|
|
126
|
-
document.querySelector('.article-content').addEventListener('click', outsideClickHandler);
|
127
|
+
document.querySelector('.article-content').addEventListener('click', outsideClickHandler, { once: true });
|
127
128
|
});
|
128
129
|
|
129
|
-
|
130
|
-
const tooltipTemplate = document.createElement('div');
|
131
|
-
const opts = {
|
132
|
-
target: 'o-header-top-link-myft',
|
133
|
-
content: 'Go to saved articles in myFT to find your lists',
|
134
|
-
showOnConstruction: true,
|
135
|
-
closeAfter: 5,
|
136
|
-
position: 'below'
|
137
|
-
};
|
138
|
-
|
139
|
-
new oTooltip(tooltipTemplate, opts);
|
140
|
-
|
141
|
-
contentElement.removeEventListener('click', openFormHandler);
|
142
|
-
|
143
|
-
document.querySelector('.article-content').removeEventListener('click', outsideClickHandler);
|
144
|
-
});
|
145
|
-
|
146
|
-
window.addEventListener('scroll', function () {
|
147
|
-
realignListener(createListOverlay.wrapper, window.scrollY);
|
148
|
-
});
|
130
|
+
window.addEventListener('scroll', realignListener(createListOverlay.wrapper, window.scrollY));
|
149
131
|
|
150
132
|
window.addEventListener('oViewport.resize', () => {
|
151
133
|
realignListener(createListOverlay.wrapper);
|
@@ -192,15 +174,26 @@ function FormElement (createList) {
|
|
192
174
|
return formElement;
|
193
175
|
}
|
194
176
|
|
195
|
-
function ContentElement () {
|
196
|
-
|
177
|
+
function ContentElement (description) {
|
178
|
+
const content = `
|
197
179
|
<div class="myft-ui-create-list-variant-footer">
|
198
180
|
<button class="myft-ui-create-list-variant-add">Add to a new list</button>
|
199
|
-
${
|
181
|
+
${description ? `
|
182
|
+
<p class="myft-ui-create-list-variant-add-description">Lists are a simple way to curate your content</p>
|
183
|
+
` : ''}
|
200
184
|
</div>
|
201
185
|
`;
|
202
186
|
|
203
|
-
|
187
|
+
const contentElement = stringToHTMLElement(content);
|
188
|
+
|
189
|
+
function removeDescription () {
|
190
|
+
const descriptionElement = contentElement.querySelector('.myft-ui-create-list-variant-add-description');
|
191
|
+
if (descriptionElement) {
|
192
|
+
descriptionElement.remove();
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
return [contentElement, removeDescription];
|
204
197
|
}
|
205
198
|
|
206
199
|
function HeadingElement () {
|
package/package.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "@financial-times/n-myft-ui",
|
3
|
-
"version": "
|
3
|
+
"version": "28.0.1",
|
4
4
|
"description": "Client side component for interaction with myft",
|
5
5
|
"main": "server.js",
|
6
6
|
"scripts": {
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
8
8
|
"commit": "commit-wizard",
|
9
9
|
"prepare": "npx snyk protect || npx snyk protect -d || true",
|
10
|
-
"preinstall": "npm_config_yes=true npx check-engine"
|
10
|
+
"preinstall": "[ \"$INIT_CWD\" != \"$PWD\" ] || npm_config_yes=true npx check-engine"
|
11
11
|
},
|
12
12
|
"repository": {
|
13
13
|
"type": "git",
|
@@ -20,11 +20,10 @@
|
|
20
20
|
},
|
21
21
|
"homepage": "https://github.com/Financial-Times/n-myft-ui#readme",
|
22
22
|
"devDependencies": {
|
23
|
-
"@financial-times/dotcom-build-
|
23
|
+
"@financial-times/dotcom-build-base": "^7.0.0",
|
24
24
|
"@financial-times/dotcom-build-code-splitting": "^5.0.0",
|
25
25
|
"@financial-times/dotcom-build-js": "^5.0.0",
|
26
26
|
"@financial-times/dotcom-build-sass": "^5.0.0",
|
27
|
-
"@financial-times/dotcom-page-kit-cli": "^0.6.5",
|
28
27
|
"@financial-times/dotcom-server-handlebars": "^5.0.0",
|
29
28
|
"@financial-times/n-express": "^23.0.1",
|
30
29
|
"@financial-times/n-gage": "^8.3.2",
|
@@ -41,9 +40,6 @@
|
|
41
40
|
"babel-preset-env": "^1.7.0",
|
42
41
|
"babel-preset-es2015": "^6.6.0",
|
43
42
|
"babel-runtime": "^6.9.2",
|
44
|
-
"bower": "^1.8.8",
|
45
|
-
"bower-resolve-webpack-plugin": "^1.0.5",
|
46
|
-
"bower-webpack-plugin": "^0.1.9",
|
47
43
|
"brotli": "^1.3.1",
|
48
44
|
"chai": "4.2.0",
|
49
45
|
"chalk": "2.4.2",
|
@@ -75,16 +71,41 @@
|
|
75
71
|
"mocha": "6.2.2",
|
76
72
|
"mockery": "2.1.0",
|
77
73
|
"node-fetch": "2.6.0",
|
78
|
-
"node-sass": "^6.0.1",
|
79
74
|
"nodemon": "^1.9.2",
|
80
75
|
"npm-prepublish": "^1.2.1",
|
81
76
|
"pa11y-ci": "^2.1.1",
|
82
77
|
"postcss-loader": "^0.9.1",
|
83
78
|
"regenerator-runtime": "^0.13.3",
|
79
|
+
"sass": "^1.51.0",
|
84
80
|
"semver": "6.3.0",
|
85
81
|
"sinon": "^7.1.0",
|
86
82
|
"sinon-chai": "^3.2.0",
|
87
|
-
"snyk": "^1.216.5"
|
83
|
+
"snyk": "^1.216.5",
|
84
|
+
"webpack": "^4.46.0",
|
85
|
+
"webpack-cli": "^4.9.2"
|
86
|
+
},
|
87
|
+
"peerDependencies": {
|
88
|
+
"@financial-times/n-notification": "^8.2.2",
|
89
|
+
"@financial-times/o-editorial-typography": "^2.3.2",
|
90
|
+
"@financial-times/o-errors": "^4.0.2",
|
91
|
+
"@financial-times/o-forms": "^9.4.0",
|
92
|
+
"@financial-times/o-grid": "^6.1.1",
|
93
|
+
"@financial-times/o-normalise": "^3.0.0",
|
94
|
+
"@financial-times/o-overlay": "^4.0.0",
|
95
|
+
"@financial-times/o-spacing": "^3.0.0",
|
96
|
+
"@financial-times/o-tooltip": "^5.0.0",
|
97
|
+
"n-ui-foundations": "^9.0.0"
|
98
|
+
},
|
99
|
+
"dependencies": {
|
100
|
+
"@financial-times/o-topper": "^5.2.3",
|
101
|
+
"date-fns": "2.16.1",
|
102
|
+
"fetchres": "^1.7.2",
|
103
|
+
"form-serialize": "^0.7.2",
|
104
|
+
"ftdomdelegate": "^4.0.6",
|
105
|
+
"js-cookie": "^2.2.1",
|
106
|
+
"next-myft-client": "^9.0.0",
|
107
|
+
"next-session-client": "^4.0.0",
|
108
|
+
"superstore-sync": "^2.1.1"
|
88
109
|
},
|
89
110
|
"volta": {
|
90
111
|
"node": "16.14.2",
|
package/styles.css
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
@keyframes load-notice{0%{max-height:0}to{max-height:200px}}.n-notification{position:fixed;top:0;left:0;width:100%;z-index:10}.n-notification__item{position:relative;background-color:rgba(255,241,229,.95);border-bottom:3px solid #33302e;color:#33302e;box-sizing:border-box;margin:0;padding:14px 0;overflow:hidden;animation:load-notice .2s forwards}.n-notification__content-wrapper{margin:0 auto;width:100%;position:relative;text-align:center;padding:0 30px;box-sizing:border-box}.n-notification__title{font-family:MetricWeb,sans-serif;font-size:20px;line-height:24px;font-weight:600;display:inline-block;padding-right:10px;margin:0}.o-typography--loading-sans-bold .n-notification__title{font-size:16.6px;font-family:sans-serif}.n-notification__content{font-family:MetricWeb,sans-serif;font-size:20px;line-height:24px;display:inline-block;margin:0}.o-typography--loading-sans .n-notification__content{font-size:17.4px;font-family:sans-serif}.n-notification__content b,.n-notification__content strong{font-family:MetricWeb,sans-serif;font-size:20px;line-height:24px;font-weight:600}.o-typography--loading-sans-bold .n-notification__content b,.o-typography--loading-sans-bold .n-notification__content strong{font-size:16.6px;font-family:sans-serif}.n-notification__content a{color:#33302e;border-bottom-color:#33302e}.n-notification--error{background-color:#fad9ce;color:#b30000}.n-notification--error .n-notification__content a{color:#fff}.n-notification--error .n-notification__close{width:40px;height:40px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23B30000%2C%23B30000)}@media screen and (-ms-high-contrast:active){.n-notification--error .n-notification__close{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-notification--error .n-notification__close{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-notification--success{background-color:#ccdfc7;color:#00572c}.n-notification--success .n-notification__content a{color:#00572c}.n-notification--success .n-notification__close{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%2300572C%2C%2300572C);position:absolute;right:0;top:0;border:0;cursor:pointer;background-size:20px;background-position:50%;margin-top:5px;width:40px;height:40px;text-indent:-999em}@media screen and (-ms-high-contrast:active){.n-notification--success .n-notification__close{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-notification--success .n-notification__close{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-notification__close{display:inline-block;background-repeat:no-repeat;background-size:contain;background-color:transparent;vertical-align:baseline;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%2333302E%2C%2333302E);position:absolute;right:0;top:0;border:0;cursor:pointer;background-size:20px;background-position:50%;margin-top:5px;width:40px;height:40px;text-indent:-999em}@media screen and (-ms-high-contrast:active){.n-notification__close{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-notification__close{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.myft-ui__logo{border:0}.myft-ui__icon{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:16px;height:16px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:logo?format=svg&source=n-myft-ui&tint=%23FFFFFF%2C%23FFFFFF);width:34px;margin:0 8px -5px}@media screen and (-ms-high-contrast:active){.myft-ui__icon{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:logo?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.myft-ui__icon{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:logo?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-notification .myft-ui__icon{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:20px;height:20px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:logo?format=svg&source=n-myft-ui&tint=%2333302E%2C%2333302E);margin:0 3px -5px}@media screen and (-ms-high-contrast:active){.n-notification .myft-ui__icon{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:logo?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-notification .myft-ui__icon{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:logo?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-notification--error .myft-ui__icon,.n-notification--success .myft-ui__icon{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:20px;height:20px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:logo?format=svg&source=n-myft-ui&tint=%23FFFFFF%2C%23FFFFFF)}@media screen and (-ms-high-contrast:active){.n-notification--error .myft-ui__icon,.n-notification--success .myft-ui__icon{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:logo?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-notification--error .myft-ui__icon,.n-notification--success .myft-ui__icon{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:logo?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.myft-pin-divider{height:18px;width:1px;background:#e6d9ce;margin:0 1px}.myft-pin-button-wrapper .myft-pin-button{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;vertical-align:baseline;width:36px;height:36px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:pin?format=svg&source=n-myft-ui&tint=%2366605C%2C%2366605C)}@media screen and (-ms-high-contrast:active){.myft-pin-button-wrapper .myft-pin-button{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:pin?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.myft-pin-button-wrapper .myft-pin-button{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:pin?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.myft-pin-button-wrapper .myft-pin-button:not([disabled]):hover,.myft-pin-button-wrapper .myft-pin-button[aria-pressed=true]{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;vertical-align:baseline;width:36px;height:36px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:pin?format=svg&source=n-myft-ui&tint=%23990F3D%2C%23990F3D);background-color:transparent;border:0}@media screen and (-ms-high-contrast:active){.myft-pin-button-wrapper .myft-pin-button:not([disabled]):hover,.myft-pin-button-wrapper .myft-pin-button[aria-pressed=true]{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:pin?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.myft-pin-button-wrapper .myft-pin-button:not([disabled]):hover,.myft-pin-button-wrapper .myft-pin-button[aria-pressed=true]{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:pin?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.myft-pin-button__label{position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0,0 0);clip-path:polygon(0 0,0 0);margin:-1px;border:0;overflow:hidden;padding:0;width:2px;height:2px;white-space:nowrap}.myft-pin-button-wrapper .myft-pin-button{background-color:transparent;border:0;padding:0;min-width:28px}.myft-pin-button-wrapper .o-tooltip--myft-pin-button{min-width:200px}.myft-pin-button-wrapper>form{display:flex}.myft-pin-button-wrapper.loading{position:relative}.myft-pin-button-wrapper.loading form{visibility:hidden}.myft-pin-button-wrapper.loading:after{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);content:" ";display:block;width:12px;height:12px;margin:0 auto;border-radius:50%;border-color:#66605c transparent;border-style:solid;border-width:3px;animation:lds-dual-ring 1.2s linear infinite}@keyframes lds-dual-ring{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}.n-myft-ui--instant{position:relative}.n-myft-ui--instant .n-myft-ui__button{position:relative;padding-left:26px;display:inline-block}.n-myft-ui--instant .n-myft-ui__button:before{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:24px;height:24px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:mail?format=svg&source=n-myft-ui&tint=%230A5E66%2C%230A5E66);content:" ";position:absolute;top:50%;left:1px;margin:-12px 1px 0 0}@media screen and (-ms-high-contrast:active){.n-myft-ui--instant .n-myft-ui__button:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:mail?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-myft-ui--instant .n-myft-ui__button:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:mail?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-myft-ui--instant .n-myft-ui__button[aria-pressed=true]:before{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:24px;height:24px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:mail?format=svg&source=n-myft-ui&tint=%23FFFFFF%2C%23FFFFFF)}@media screen and (-ms-high-contrast:active){.n-myft-ui--instant .n-myft-ui__button[aria-pressed=true]:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:mail?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-myft-ui--instant .n-myft-ui__button[aria-pressed=true]:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:mail?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-myft-ui--instant .n-myft-ui__button[aria-pressed=true]:hover:before{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:24px;height:24px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:mail?format=svg&source=n-myft-ui&tint=%230A5E66%2C%230A5E66)}@media screen and (-ms-high-contrast:active){.n-myft-ui--instant .n-myft-ui__button[aria-pressed=true]:hover:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:mail?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-myft-ui--instant .n-myft-ui__button[aria-pressed=true]:hover:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:mail?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-myft-ui__button--instant.n-myft-ui__button--instant-light{border:0;padding-left:8px;padding-right:36px;color:#33302e;font-weight:400;background:transparent}.n-myft-ui__button--instant.n-myft-ui__button--instant-light:not([disabled]):focus,.n-myft-ui__button--instant.n-myft-ui__button--instant-light:not([disabled]):hover,.n-myft-ui__button--instant.n-myft-ui__button--instant-light[aria-pressed=true]{background:transparent;color:#33302e}.n-myft-ui__button--instant.n-myft-ui__button--instant-light:before{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:36px;height:36px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:notifications?format=svg&source=n-myft-ui&tint=%2366605C%2C%2366605C);left:auto;right:1px;margin-top:-18px}@media screen and (-ms-high-contrast:active){.n-myft-ui__button--instant.n-myft-ui__button--instant-light:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:notifications?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-myft-ui__button--instant.n-myft-ui__button--instant-light:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:notifications?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-myft-ui__button--instant.n-myft-ui__button--instant-light:not([disabled]):hover:before,.n-myft-ui__button--instant.n-myft-ui__button--instant-light[aria-pressed=true]:before{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:36px;height:36px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:notifications?format=svg&source=n-myft-ui&tint=%23990F3D%2C%23990F3D)}@media screen and (-ms-high-contrast:active){.n-myft-ui__button--instant.n-myft-ui__button--instant-light:not([disabled]):hover:before,.n-myft-ui__button--instant.n-myft-ui__button--instant-light[aria-pressed=true]:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:notifications?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.n-myft-ui__button--instant.n-myft-ui__button--instant-light:not([disabled]):hover:before,.n-myft-ui__button--instant.n-myft-ui__button--instant-light[aria-pressed=true]:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:notifications?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-myft-ui--instant--hide-text .n-myft-ui__button--instant.n-myft-ui__button--instant-light{margin-top:5px;width:20px;overflow:hidden;white-space:nowrap;text-indent:-110px}.myft-ui,.n-myft-ui{display:inline-block}@keyframes myft-flash{25%{opacity:1}50%{opacity:1}}@keyframes myft-flash-white{10%{filter:brightness(0) invert(1)}75%{filter:brightness(0) invert(1)}}.experimental-myft-flash .o-header__top-column--right:before{content:" ";position:absolute;display:block;background-color:#0d7680;top:0;right:0;height:100%;opacity:0;animation:myft-flash 1.2s linear;width:58px}@media(min-width:46.25em){.experimental-myft-flash .o-header__top-column--right:before{width:88px}}@media(min-width:61.25em){.experimental-myft-flash .o-header__top-column--right:before{width:100px}}.experimental-myft-flash .o-header__top-link--myft:before{animation:myft-flash-white 1.2s linear}.myft-ui__button--manage[aria-pressed=true]:before,.myft-ui__button--myft-manage[aria-pressed=true]:before{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:28px;height:28px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23FFFFFF%2C%23FFFFFF)}@media screen and (-ms-high-contrast:active){.myft-ui__button--manage[aria-pressed=true]:before,.myft-ui__button--myft-manage[aria-pressed=true]:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.myft-ui__button--manage[aria-pressed=true]:before,.myft-ui__button--myft-manage[aria-pressed=true]:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:cross?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.n-myft-ui--article-saved__list-select{margin-bottom:10px}.o-overlay.o-overlay--myft-lists{height:100%;width:100%;max-width:640px}@media(min-width:30.625em){.o-overlay.o-overlay--myft-lists{height:auto}}.myft-list-form__wrapper{margin-bottom:20px}@media(min-width:46.25em){.myft-list-form__wrapper{display:flex}}.o-overlay__content .myft-list-form__wrapper{margin-bottom:0}.myft-list-form{overflow:hidden}@media(min-width:46.25em){.myft-list-form{flex:1}}.myft-list-form__button{float:right}.mypage .myft-list-form__message,.o-overlay .myft-list-form__message{font-family:MetricWeb,sans-serif;font-size:18px;line-height:20px;background:#fff1e5;border-radius:0;margin:3px 0 0;padding:20px}.o-typography--loading-sans .mypage .myft-list-form__message,.o-typography--loading-sans .o-overlay .myft-list-form__message{font-size:15.66px;font-family:sans-serif}.mypage .myft-list-form__message h3,.o-overlay .myft-list-form__message h3{font-family:MetricWeb,sans-serif;font-size:20px;line-height:24px;font-weight:600;margin:0 5px 0 0}.o-typography--loading-sans-bold .mypage .myft-list-form__message h3,.o-typography--loading-sans-bold .o-overlay .myft-list-form__message h3{font-size:16.6px;font-family:sans-serif}.mypage .myft-list-form__message p,.o-overlay .myft-list-form__message p{font-family:MetricWeb,sans-serif;font-size:20px;line-height:24px;padding:8px 0;margin:0}.o-typography--loading-sans .mypage .myft-list-form__message p,.o-typography--loading-sans .o-overlay .myft-list-form__message p{font-size:17.4px;font-family:sans-serif}.mypage .myft-list-form__message h3,.mypage .myft-list-form__message p,.o-overlay .myft-list-form__message h3,.o-overlay .myft-list-form__message p{display:inline-block;padding:0}.myft-list-form__message+.myft-list-form__wrapper{margin-top:20px}.o-overlay .myft-list-form__message{border-top:1px solid #ccc1b7;margin:0 -20px}.o-overlay .myft-list-form__message:first-child{border-top:0;margin-top:-20px}.myft-list-form__message--success h3{color:#00994d}.myft-list-form__message--success h3:before{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:14px;height:14px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:tick?format=svg&source=n-myft-ui&tint=%2300994D%2C%2300994D);content:"";margin-right:3px}@media screen and (-ms-high-contrast:active){.myft-list-form__message--success h3:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:tick?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.myft-list-form__message--success h3:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:tick?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.myft-list-form-divider{text-align:center;margin-bottom:32px;padding:24px 0}@media(min-width:46.25em){.myft-list-form-divider{display:flex;position:relative;justify-content:center;align-items:center;margin:0;padding:0 8px}}.myft-list-form-divider:after{content:"";display:block;border-top:1px solid #ccc1b7;margin-top:-10px}@media(min-width:46.25em){.myft-list-form-divider:after{position:absolute;top:0;height:100%;width:1px;margin-top:0;border-top:0;border-left:1px solid #ccc1b7}}.myft-list-form-divider__inner{padding:10px;background-color:#fff9f5}@media(min-width:46.25em){.myft-list-form-divider__inner{z-index:10}}.o-overlay__content .myft-list-form-divider__inner{background-color:#fff}.share-nav.data-overlap-initialised .o-overlay{transition:opacity .15s ease-in;opacity:0;z-index:-1}.share-nav .myft-ui-create-list-variant{border-radius:10px;border:1px solid #f2e5da;background:#fffcfa}.share-nav .myft-ui-create-list-variant .o-overlay__heading{border-radius:10px 10px 0 0;background:#fff9f5;font-family:MetricWeb,sans-serif;font-size:20px;line-height:24px;color:#33302e}.o-typography--loading-sans .share-nav .myft-ui-create-list-variant .o-overlay__heading{font-size:17.4px;font-family:sans-serif}.share-nav .myft-ui-create-list-variant .o-overlay__content{font-family:MetricWeb,sans-serif;font-size:16px;line-height:20px;color:#33302e;padding:0}.o-typography--loading-sans .share-nav .myft-ui-create-list-variant .o-overlay__content{font-size:13.92px;font-family:sans-serif}.share-nav .myft-ui-create-list-variant .o-overlay__title{margin:8px 14px 0 8px}.share-nav .myft-ui-create-list-variant-container{display:block;width:340px;top:115.5px;left:50px}.share-nav .myft-ui-create-list-variant-add{border:0;background:none;font-family:MetricWeb,sans-serif;font-size:18px;line-height:20px;font-weight:600;color:#33302e;padding-left:0;margin-left:-8px}.o-typography--loading-sans-bold .share-nav .myft-ui-create-list-variant-add{font-size:14.94px;font-family:sans-serif}.share-nav .myft-ui-create-list-variant-add:hover{text-decoration:underline}.share-nav .myft-ui-create-list-variant-add:before{content:"";display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:28px;height:28px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:plus?format=svg&source=n-myft-ui&tint=%2333302E%2C%2333302E);vertical-align:middle;margin-top:-2px}@media screen and (-ms-high-contrast:active){.share-nav .myft-ui-create-list-variant-add:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:plus?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.share-nav .myft-ui-create-list-variant-add:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:plus?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.share-nav .myft-ui-create-list-variant-add-description{margin:4px 0}.share-nav .myft-ui-create-list-variant-heading:before{content:"";display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;vertical-align:baseline;width:32px;height:32px;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:tick?format=svg&source=n-myft-ui&tint=%230D7680%2C%230D7680);vertical-align:middle;margin-top:-2px}@media screen and (-ms-high-contrast:active){.share-nav .myft-ui-create-list-variant-heading:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:tick?format=svg&source=n-myft-ui&tint=%23ffffff%2C%23ffffff)}}@media screen and (-ms-high-contrast:black-on-white){.share-nav .myft-ui-create-list-variant-heading:before{background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/fticon-v1:tick?format=svg&source=n-myft-ui&tint=%23000000%2C%23000000)}}.share-nav .myft-ui-create-list-variant-footer{border-top:1px solid #f2e5da;padding:16px}.share-nav .myft-ui-create-list-variant-icon:before{content:"";display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:50%;background-color:transparent;background-image:url(https://www.ft.com/__origami/service/image/v2/images/raw/ftlogo-v1:brand-myft?source=next-article);width:42px;height:42px;vertical-align:middle;margin-top:-2px}.share-nav .myft-ui-create-list-variant-icon-visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.share-nav .myft-ui-create-list-variant-form{display:flex;width:calc(100% - 32px);justify-content:space-between;height:40px;gap:8px;padding:0 16px 16px}.share-nav .myft-ui-create-list-variant-form>*{flex:1 1 auto}.share-nav .myft-ui-create-list-variant-form .o-forms-input{margin-top:0}.share-nav .myft-ui-create-list-variant-lists{padding:16px 16px 0;font-family:MetricWeb,sans-serif;font-size:18px;line-height:20px}.o-typography--loading-sans .share-nav .myft-ui-create-list-variant-lists{font-size:15.66px;font-family:sans-serif}.share-nav .myft-ui-create-list-variant-lists-text{font-family:MetricWeb,sans-serif;font-weight:600;color:#33302e;margin-bottom:16px}.share-nav .myft-ui-create-list-variant-lists-container{margin-top:0}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/* global expect */
|
2
2
|
import sinon from 'sinon';
|
3
|
-
import addMinutes from 'date-fns/
|
4
|
-
import parseISO from 'date-fns/
|
3
|
+
import addMinutes from 'date-fns/addMinutes';
|
4
|
+
import parseISO from 'date-fns/parseISO';
|
5
5
|
|
6
6
|
const expiryTimestamp = parseISO('2018-06-14T12:00:00.000Z');
|
7
7
|
const timestampBeforeExpiry = '2018-06-14T11:40:00.000Z';
|
@@ -29,7 +29,7 @@ describe('initialiseFeedStartTime', () => {
|
|
29
29
|
let lastVisitTime;
|
30
30
|
const injector = require('inject-loader!../../components/unread-articles-indicator/initialise-feed-start-time');
|
31
31
|
const initialiseFeedStartTime = injector({
|
32
|
-
'
|
32
|
+
'date-fns': {
|
33
33
|
isToday: mockDateFns.isToday,
|
34
34
|
startOfDay: mockDateFns.startOfDay
|
35
35
|
},
|
@@ -0,0 +1,19 @@
|
|
1
|
+
const path = require('path');
|
2
|
+
const { PageKitJsPlugin } = require('@financial-times/dotcom-build-js');
|
3
|
+
const { PageKitSassPlugin } = require('@financial-times/dotcom-build-sass');
|
4
|
+
|
5
|
+
module.exports = {
|
6
|
+
plugins: [
|
7
|
+
new PageKitJsPlugin(),
|
8
|
+
new PageKitSassPlugin({
|
9
|
+
includePaths: [path.resolve('./node_modules/@financial-times')],
|
10
|
+
}),
|
11
|
+
],
|
12
|
+
entry: {
|
13
|
+
scripts: ['./myft/index.js', './myft-common/index.js'],
|
14
|
+
styles: './myft/test.scss',
|
15
|
+
},
|
16
|
+
output: {
|
17
|
+
path: path.resolve(__dirname, 'public')
|
18
|
+
},
|
19
|
+
};
|
package/bower.json
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "n-myft-ui",
|
3
|
-
"homepage": "https://github.com/Financial-Times/n-myft-ui",
|
4
|
-
"authors": [
|
5
|
-
"Rhys Evans <rhys.evans@ft.com>"
|
6
|
-
],
|
7
|
-
"license": "MIT",
|
8
|
-
"ignore": [
|
9
|
-
"circle.yml",
|
10
|
-
"karma.conf.js",
|
11
|
-
"Makefile",
|
12
|
-
"n.Makefile",
|
13
|
-
"package.json",
|
14
|
-
"webpack.config.js",
|
15
|
-
"webpack.config.demo.js"
|
16
|
-
],
|
17
|
-
"main": "main.js",
|
18
|
-
"dependencies": {
|
19
|
-
"date-fns": "2.16.1",
|
20
|
-
"fetchres": "^1.7.2",
|
21
|
-
"form-serialize": "^0.7.2",
|
22
|
-
"js-cookie": "^2.2.0",
|
23
|
-
"n-notification": "^7.0.0",
|
24
|
-
"n-ui-foundations": "^6.0.0",
|
25
|
-
"next-myft-client": "^7.8.0",
|
26
|
-
"next-session-client": "^3.0.1",
|
27
|
-
"o-editorial-typography": "^1.0.1",
|
28
|
-
"o-errors": "^4.0.2",
|
29
|
-
"o-forms": "^8.0.0",
|
30
|
-
"o-grid": "^5.0.0",
|
31
|
-
"o-normalise": "^2.0.1",
|
32
|
-
"o-overlay": "^3.0.0",
|
33
|
-
"o-spacing": "^2.0.0",
|
34
|
-
"o-tooltip": "^4.0.0"
|
35
|
-
}
|
36
|
-
}
|
package/page-kit.config.js
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
const path = require('path');
|
2
|
-
|
3
|
-
module.exports = {
|
4
|
-
plugins: [
|
5
|
-
require('@financial-times/dotcom-build-js').plugin(),
|
6
|
-
require('@financial-times/dotcom-build-sass').plugin(),
|
7
|
-
require('@financial-times/dotcom-build-bower-resolve').plugin()
|
8
|
-
],
|
9
|
-
settings: {
|
10
|
-
build: {
|
11
|
-
entry: {
|
12
|
-
scripts: [
|
13
|
-
'./myft/index.js',
|
14
|
-
'./myft-common/index.js'
|
15
|
-
],
|
16
|
-
styles: './myft/test.scss'
|
17
|
-
},
|
18
|
-
outputPath: path.resolve('./public')
|
19
|
-
}
|
20
|
-
}
|
21
|
-
};
|