@financial-times/n-myft-ui 40.0.1 → 40.0.2
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/.toolkitstate/ci.json +2 -2
- package/myft/ui/lists.js +4 -2
- package/package.json +2 -2
package/.toolkitstate/ci.json
CHANGED
package/myft/ui/lists.js
CHANGED
@@ -12,7 +12,7 @@ let haveLoadedLists = false;
|
|
12
12
|
let createListOverlay;
|
13
13
|
|
14
14
|
async function openSaveArticleToList (contentId, options = {}) {
|
15
|
-
const { name, nonModal = false } = options;
|
15
|
+
const { name, nonModal = false, triggerElement } = options;
|
16
16
|
const modal = !nonModal;
|
17
17
|
function createList (newList, cb) {
|
18
18
|
if(!newList || !newList.name) {
|
@@ -85,6 +85,7 @@ async function openSaveArticleToList (contentId, options = {}) {
|
|
85
85
|
heading: { title: headingElement.outerHTML },
|
86
86
|
parentnode: isMobile() ? '.o-share--horizontal' : '.o-share--vertical',
|
87
87
|
class: 'myft-ui-create-list',
|
88
|
+
trigger: triggerElement,
|
88
89
|
});
|
89
90
|
|
90
91
|
function addCloseButtonDataTrackable () {
|
@@ -513,7 +514,8 @@ function initialEventListeners () {
|
|
513
514
|
return openCreateListAndAddArticleOverlay(contentId);
|
514
515
|
}
|
515
516
|
const configKeys = configSet.dataset.myftUiSaveConfig.split(',');
|
516
|
-
const
|
517
|
+
const triggerElement = configSet.querySelector('button[type="submit"]');
|
518
|
+
const config = configKeys.reduce((configObj, key) => (key ? { ...configObj, [key]: true} : configObj), { triggerElement });
|
517
519
|
return openCreateListAndAddArticleOverlay(contentId, config);
|
518
520
|
});
|
519
521
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@financial-times/n-myft-ui",
|
3
|
-
"version": "40.0.
|
3
|
+
"version": "40.0.2",
|
4
4
|
"description": "Client side component for interaction with myft",
|
5
5
|
"main": "server.js",
|
6
6
|
"scripts": {
|
@@ -108,7 +108,7 @@
|
|
108
108
|
"@financial-times/n-notification": "^9.0.0",
|
109
109
|
"@financial-times/o-forms": "^10.0.1",
|
110
110
|
"@financial-times/o-grid": "^6.1.8",
|
111
|
-
"@financial-times/o-overlay": "^5.0.
|
111
|
+
"@financial-times/o-overlay": "^5.0.2",
|
112
112
|
"@financial-times/o-tooltip": "^6.0.0",
|
113
113
|
"@financial-times/o3-button": "^3.0.0",
|
114
114
|
"@financial-times/o3-editorial-typography": "^3.0.2",
|