@oat-sa/tao-core-ui 3.13.5 → 3.14.0

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.
@@ -130,7 +130,7 @@ define(['jquery', 'lodash', 'ui/ckeditor/dtdHandler', 'ckeditor', 'context', 'mo
130
130
  }],
131
131
  htmlField: [{
132
132
  name: 'basicstyles',
133
- items: ['Bold', 'Italic', 'Strike', 'Underline']
133
+ items: ['Bold', 'Italic', 'Underline']
134
134
  }, {
135
135
  name: 'exponent',
136
136
  items: ['Subscript', 'Superscript']
@@ -203,6 +203,24 @@ define(['jquery', 'lodash', 'ui/ckeditor/dtdHandler', 'ckeditor', 'context', 'mo
203
203
  class: 'txt-underline'
204
204
  }
205
205
  },
206
+ coreStyles_strike: {
207
+ element: 'span',
208
+ attributes: {
209
+ class: 'txt-strike'
210
+ }
211
+ },
212
+ coreStyles_subscript: {
213
+ element: 'sub',
214
+ attributes: {
215
+ class: 'txt-subscript'
216
+ }
217
+ },
218
+ coreStyles_superscript: {
219
+ element: 'sup',
220
+ attributes: {
221
+ class: 'txt-superscript'
222
+ }
223
+ },
206
224
  coreStyles_highlight: {
207
225
  element: 'span',
208
226
  attributes: {
@@ -379,10 +397,17 @@ define(['jquery', 'lodash', 'ui/ckeditor/dtdHandler', 'ckeditor', 'context', 'mo
379
397
  insertAfter: 'SpecialChar'
380
398
  };
381
399
  }
382
- if (options.underline) {
383
- positionedPlugins.TaoUnderline = {
384
- insertAfter: 'Italic'
385
- };
400
+ if (context.featureFlags && context.featureFlags.FEATURE_FLAG_CKEDITOR_DECORATIONS) {
401
+ if (options.strike) {
402
+ positionedPlugins.TaoStrike = {
403
+ insertAfter: 'Italic'
404
+ };
405
+ }
406
+ if (options.underline) {
407
+ positionedPlugins.TaoUnderline = {
408
+ insertAfter: options.strike ? 'TaoStrike' : 'Italic'
409
+ };
410
+ }
386
411
  }
387
412
  if (options.highlight) {
388
413
  if (options.underline) {
@@ -458,7 +483,7 @@ define(['jquery', 'lodash', 'ui/ckeditor/dtdHandler', 'ckeditor', 'context', 'mo
458
483
  }
459
484
 
460
485
  // forward the options to ckConfig, exclude local options
461
- config = _.assign({}, _.cloneDeep(originalConfig), ckConfig, _.omit(options, ['qtiImage', 'qtiInclude', 'underline', 'highlight', 'mathJax', 'toolbar', 'positionedPlugins']));
486
+ config = _.assign({}, _.cloneDeep(originalConfig), ckConfig, _.omit(options, ['qtiImage', 'qtiInclude', 'underline', 'strike', 'highlight', 'mathJax', 'toolbar', 'positionedPlugins']));
462
487
 
463
488
  // debugger: has this config been used?
464
489
  //config.aaaConfigurationHasBeenLoadedFromConfigurator = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oat-sa/tao-core-ui",
3
- "version": "3.13.5",
3
+ "version": "3.14.0",
4
4
  "displayName": "TAO Core UI",
5
5
  "description": "UI libraries of TAO",
6
6
  "scripts": {
@@ -93,9 +93,24 @@ legend.cke_voice_label {
93
93
  // added to make _u_ in ck QTI compatible
94
94
  .txt-underline {
95
95
  text-decoration: underline;
96
+ text-underline-offset: 0.4em;
96
97
  font-size : inherit;
97
98
  }
98
99
 
100
+ .txt-dashed {
101
+ text-decoration: underline dashed;
102
+ text-underline-offset: 0.4em;
103
+ }
104
+
105
+ .txt-wavy {
106
+ text-decoration: underline wavy;
107
+ text-underline-offset: 0.4em;
108
+ }
109
+
110
+ .txt-strike {
111
+ text-decoration: line-through;
112
+ }
113
+
99
114
  .txt-highlight {
100
115
  padding: 0 5px;
101
116
  background: #FF6416;
@@ -499,9 +499,32 @@ body {
499
499
  text-decoration: underline;
500
500
  font-size: inherit;
501
501
  }
502
- .writing-mode-vertical-rl .txt-underline {
503
- text-underline-position: right;
502
+ .txt-dashed {
503
+ text-decoration: underline dashed;
504
+ text-underline-offset: 0.4em;
504
505
  }
506
+
507
+ .txt-wavy {
508
+ text-decoration: underline wavy;
509
+ text-underline-offset: 0.4em;
510
+ }
511
+
512
+ .txt-strike {
513
+ text-decoration: line-through;
514
+ }
515
+
516
+ .writing-mode-vertical-rl {
517
+ .txt-underline {
518
+ text-underline-position: right;
519
+ }
520
+ .txt-subscript {
521
+ right: -0.6em;
522
+ }
523
+ .txt-superscript {
524
+ left: -0.6em;
525
+ }
526
+ }
527
+
505
528
  .writing-mode-vertical-rl[data-useragent-browser='safari'] .txt-underline {
506
529
  // for Safari < 18.2 which doesn't support "text-underline-position: right"
507
530
  text-decoration: none;
@@ -61,7 +61,6 @@ const ckConfigurator = (function () {
61
61
  {
62
62
  name: 'language',
63
63
  items: ['Language']
64
-
65
64
  },
66
65
  {
67
66
  name: 'styles',
@@ -69,7 +68,16 @@ const ckConfigurator = (function () {
69
68
  },
70
69
  {
71
70
  name: 'paragraph',
72
- items: ['NumberedList', 'BulletedList', '-', 'Blockquote', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']
71
+ items: [
72
+ 'NumberedList',
73
+ 'BulletedList',
74
+ '-',
75
+ 'Blockquote',
76
+ 'JustifyLeft',
77
+ 'JustifyCenter',
78
+ 'JustifyRight',
79
+ 'JustifyBlock'
80
+ ]
73
81
  },
74
82
  {
75
83
  name: 'interactionsource',
@@ -174,7 +182,7 @@ const ckConfigurator = (function () {
174
182
  htmlField: [
175
183
  {
176
184
  name: 'basicstyles',
177
- items: ['Bold', 'Italic', 'Strike', 'Underline']
185
+ items: ['Bold', 'Italic', 'Underline']
178
186
  },
179
187
  {
180
188
  name: 'exponent',
@@ -262,6 +270,20 @@ const ckConfigurator = (function () {
262
270
  element: 'span',
263
271
  attributes: { class: 'txt-underline' }
264
272
  },
273
+ coreStyles_strike: {
274
+ element: 'span',
275
+ attributes: {
276
+ class: 'txt-strike'
277
+ }
278
+ },
279
+ coreStyles_subscript: {
280
+ element: 'sub',
281
+ attributes: { class: 'txt-subscript' }
282
+ },
283
+ coreStyles_superscript: {
284
+ element: 'sup',
285
+ attributes: { class: 'txt-superscript' }
286
+ },
265
287
  coreStyles_highlight: {
266
288
  element: 'span',
267
289
  attributes: { class: 'txt-highlight' }
@@ -655,8 +677,17 @@ const ckConfigurator = (function () {
655
677
  if (options.qtiInclude) {
656
678
  positionedPlugins.TaoQtiInclude = { insertAfter: 'SpecialChar' };
657
679
  }
658
- if (options.underline) {
659
- positionedPlugins.TaoUnderline = { insertAfter: 'Italic' };
680
+ if (context.featureFlags && context.featureFlags.FEATURE_FLAG_CKEDITOR_DECORATIONS) {
681
+ if (options.strike) {
682
+ positionedPlugins.TaoStrike = {
683
+ insertAfter: 'Italic'
684
+ };
685
+ }
686
+ if (options.underline) {
687
+ positionedPlugins.TaoUnderline = {
688
+ insertAfter: options.strike ? 'TaoStrike' : 'Italic'
689
+ };
690
+ }
660
691
  }
661
692
  if (options.highlight) {
662
693
  if (options.underline) {
@@ -725,6 +756,7 @@ const ckConfigurator = (function () {
725
756
  'qtiImage',
726
757
  'qtiInclude',
727
758
  'underline',
759
+ 'strike',
728
760
  'highlight',
729
761
  'mathJax',
730
762
  'toolbar',
package/src/css/basic.css CHANGED
@@ -1462,9 +1462,28 @@ html .txt-underline {
1462
1462
  text-decoration: underline;
1463
1463
  font-size: inherit;
1464
1464
  }
1465
+ html .txt-dashed {
1466
+ -webkit-text-decoration: underline dashed;
1467
+ text-decoration: underline dashed;
1468
+ text-underline-offset: 0.4em;
1469
+ }
1470
+ html .txt-wavy {
1471
+ -webkit-text-decoration: underline wavy;
1472
+ text-decoration: underline wavy;
1473
+ text-underline-offset: 0.4em;
1474
+ }
1475
+ html .txt-strike {
1476
+ text-decoration: line-through;
1477
+ }
1465
1478
  html .writing-mode-vertical-rl .txt-underline {
1466
1479
  text-underline-position: right;
1467
1480
  }
1481
+ html .writing-mode-vertical-rl .txt-subscript {
1482
+ right: -0.6em;
1483
+ }
1484
+ html .writing-mode-vertical-rl .txt-superscript {
1485
+ left: -0.6em;
1486
+ }
1468
1487
  html .writing-mode-vertical-rl[data-useragent-browser=safari] .txt-underline {
1469
1488
  text-decoration: none;
1470
1489
  border-right: 1px solid currentColor;
@@ -5264,9 +5283,26 @@ legend.cke_voice_label {
5264
5283
 
5265
5284
  .txt-underline {
5266
5285
  text-decoration: underline;
5286
+ text-underline-offset: 0.4em;
5267
5287
  font-size: inherit;
5268
5288
  }
5269
5289
 
5290
+ .txt-dashed {
5291
+ -webkit-text-decoration: underline dashed;
5292
+ text-decoration: underline dashed;
5293
+ text-underline-offset: 0.4em;
5294
+ }
5295
+
5296
+ .txt-wavy {
5297
+ -webkit-text-decoration: underline wavy;
5298
+ text-decoration: underline wavy;
5299
+ text-underline-offset: 0.4em;
5300
+ }
5301
+
5302
+ .txt-strike {
5303
+ text-decoration: line-through;
5304
+ }
5305
+
5270
5306
  .txt-highlight {
5271
5307
  padding: 0 5px;
5272
5308
  background: #FF6416;