@financial-times/n-myft-ui 30.1.0 → 30.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -101,7 +101,6 @@
101
101
  "@financial-times/o-overlay": "^4.0.0",
102
102
  "@financial-times/o-spacing": "^3.0.0",
103
103
  "@financial-times/o-tooltip": "^5.2.4",
104
- "@financial-times/o-topper": "^5.2.3",
105
104
  "n-ui-foundations": "^9.0.0"
106
105
  }
107
106
  },
@@ -2851,12 +2850,6 @@
2851
2850
  "node": "12.x"
2852
2851
  }
2853
2852
  },
2854
- "node_modules/@financial-times/n-map-content-to-topper": {
2855
- "version": "1.6.0",
2856
- "resolved": "https://registry.npmjs.org/@financial-times/n-map-content-to-topper/-/n-map-content-to-topper-1.6.0.tgz",
2857
- "integrity": "sha512-7AezWXpfEEZkz21Taw47h9SoM6Ycg7vrKZ3SOVpo1f0vqRbK7VpnvLOTjhTGOkMdPi5z/5kvjN5ag5P4yvpRMg==",
2858
- "peer": true
2859
- },
2860
2853
  "node_modules/@financial-times/n-notification": {
2861
2854
  "version": "8.2.2",
2862
2855
  "resolved": "https://registry.npmjs.org/@financial-times/n-notification/-/n-notification-8.2.2.tgz",
@@ -3117,24 +3110,6 @@
3117
3110
  "@financial-times/o-visual-effects": "^4.0.1"
3118
3111
  }
3119
3112
  },
3120
- "node_modules/@financial-times/o-topper": {
3121
- "version": "5.2.3",
3122
- "resolved": "https://registry.npmjs.org/@financial-times/o-topper/-/o-topper-5.2.3.tgz",
3123
- "integrity": "sha512-4CoeEp5nG7ecmZuJMr7DlEs0w5mPS3jikHxOlVZqMP18qWlwXC6BgbPz1ZslxBt/+SnJmHlNN2VIQevPQLNtEQ==",
3124
- "peer": true,
3125
- "engines": {
3126
- "npm": "^7 || ^8"
3127
- },
3128
- "peerDependencies": {
3129
- "@financial-times/n-map-content-to-topper": "^1.5.0",
3130
- "@financial-times/o-colors": "^6.0.1",
3131
- "@financial-times/o-editorial-typography": "^2.0.1",
3132
- "@financial-times/o-grid": "^6.0.0",
3133
- "@financial-times/o-icons": "^7.0.1",
3134
- "@financial-times/o-spacing": "^3.0.0",
3135
- "@financial-times/o-typography": "^7.0.1"
3136
- }
3137
- },
3138
3113
  "node_modules/@financial-times/o-typography": {
3139
3114
  "version": "7.3.2",
3140
3115
  "resolved": "https://registry.npmjs.org/@financial-times/o-typography/-/o-typography-7.3.2.tgz",
@@ -26123,12 +26098,6 @@
26123
26098
  "winston": "^2.4.0"
26124
26099
  }
26125
26100
  },
26126
- "@financial-times/n-map-content-to-topper": {
26127
- "version": "1.6.0",
26128
- "resolved": "https://registry.npmjs.org/@financial-times/n-map-content-to-topper/-/n-map-content-to-topper-1.6.0.tgz",
26129
- "integrity": "sha512-7AezWXpfEEZkz21Taw47h9SoM6Ycg7vrKZ3SOVpo1f0vqRbK7VpnvLOTjhTGOkMdPi5z/5kvjN5ag5P4yvpRMg==",
26130
- "peer": true
26131
- },
26132
26101
  "@financial-times/n-notification": {
26133
26102
  "version": "8.2.2",
26134
26103
  "resolved": "https://registry.npmjs.org/@financial-times/n-notification/-/n-notification-8.2.2.tgz",
@@ -26268,13 +26237,6 @@
26268
26237
  "ftdomdelegate": "^4.0.6"
26269
26238
  }
26270
26239
  },
26271
- "@financial-times/o-topper": {
26272
- "version": "5.2.3",
26273
- "resolved": "https://registry.npmjs.org/@financial-times/o-topper/-/o-topper-5.2.3.tgz",
26274
- "integrity": "sha512-4CoeEp5nG7ecmZuJMr7DlEs0w5mPS3jikHxOlVZqMP18qWlwXC6BgbPz1ZslxBt/+SnJmHlNN2VIQevPQLNtEQ==",
26275
- "peer": true,
26276
- "requires": {}
26277
- },
26278
26240
  "@financial-times/o-typography": {
26279
26241
  "version": "7.3.2",
26280
26242
  "resolved": "https://registry.npmjs.org/@financial-times/o-typography/-/o-typography-7.3.2.tgz",
@@ -4,8 +4,7 @@
4
4
  data-myft-ui="saved"
5
5
  action="/myft/save/{{contentId}}"
6
6
  data-js-action="/__myft/api/core/saved/content/{{contentId}}?method=put"
7
- {{#if @root.flags.manageArticleLists}}data-myft-ui-save-new="manageArticleLists"{{/if}}
8
- {{#if @root.flags.manageArticleLists}}data-myft-ui-save-new-config="{{#if modal}}modal{{/if}}"{{/if}}>
7
+ data-myft-ui-save-config="{{#if nonModal}}nonModal{{/if}}">
9
8
  {{> n-myft-ui/components/csrf-token/input}}
10
9
  <div
11
10
  class="n-myft-ui__announcement o-normalise-visually-hidden"
package/myft/main.scss CHANGED
@@ -174,7 +174,7 @@ $spacing-unit: 20px;
174
174
 
175
175
  }
176
176
 
177
- .myft-ui-create-list-variant-message {
177
+ .myft-ui-create-list {
178
178
  border-radius: 10px;
179
179
  border: 1px solid oColorsByName('black-5');
180
180
  background: oColorsByName('white-80');
@@ -193,7 +193,7 @@ $spacing-unit: 20px;
193
193
  }
194
194
  }
195
195
 
196
- .myft-ui-create-list-variant {
196
+ .myft-ui-create-list {
197
197
  @include oButtons($opts: (
198
198
  'sizes': ('big'),
199
199
  'types': ('primary', 'secondary'),
@@ -0,0 +1,15 @@
1
+ export default function escapeText (text) {
2
+ if (typeof text !== 'string' || !text instanceof String) {
3
+ return '';
4
+ }
5
+
6
+ const tagsToReplace = {
7
+ '&': '&amp;',
8
+ '<': '&lt;',
9
+ '>': '&gt;'
10
+ };
11
+
12
+ return text.replace(/[&<>]/g, function (tag) {
13
+ return tagsToReplace[tag] || tag;
14
+ });
15
+ }