@ckeditor/ckeditor5-table 48.1.1 → 48.2.0-alpha.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.
package/dist/index.js CHANGED
@@ -107,7 +107,7 @@ const FLOAT_VALUES_REG_EXP = /^(left|none|right)$/;
107
107
  dispatcher.on(`element:${viewElementName}`, (evt, data, conversionApi)=>{
108
108
  const { modelRange, viewItem } = data;
109
109
  // If the element was not converted by element-to-element converter,
110
- // we should not try to convert the style. See #8393.
110
+ // we should not try to convert the style. See https://github.com/ckeditor/ckeditor5/issues/8393.
111
111
  if (!modelRange) {
112
112
  return;
113
113
  }
@@ -295,7 +295,7 @@ const FLOAT_VALUES_REG_EXP = /^(left|none|right)$/;
295
295
  dispatcher.on(`element:${viewElementName}`, (evt, data, conversionApi)=>{
296
296
  const { modelRange, viewItem } = data;
297
297
  // If the element was not converted by element-to-element converter,
298
- // we should not try to convert the style. See #8393.
298
+ // we should not try to convert the style. See https://github.com/ckeditor/ckeditor5/issues/8393.
299
299
  if (!modelRange) {
300
300
  return;
301
301
  }
@@ -1824,7 +1824,7 @@ const downcastTableAlignmentConfig = {
1824
1824
  firstTheadElement = tableChild;
1825
1825
  }
1826
1826
  // There might be some extra empty text nodes between the `<tr>`s.
1827
- // Make sure further code operates on `tr`s only. (#145)
1827
+ // Make sure further code operates on `tr`s only. (https://github.com/ckeditor/ckeditor5/issues/145)
1828
1828
  const trs = Array.from(tableChild.getChildren()).filter((el)=>el.is('element', 'tr'));
1829
1829
  // Keep tracking of the previous row columns count to improve detection of heading rows.
1830
1830
  let maxPrevColumns = null;
@@ -2117,7 +2117,8 @@ const downcastTableAlignmentConfig = {
2117
2117
  ].includes(change.name) ? change.position : null;
2118
2118
  break;
2119
2119
  case 'remove':
2120
- // If the whole table is removed, there's no need to update its column widths (#12201).
2120
+ // If the whole table is removed, there's no need to update its column widths.
2121
+ // See https://github.com/ckeditor/ckeditor5/issues/12201.
2121
2122
  referencePosition = [
2122
2123
  'tableRow',
2123
2124
  'tableCell'
@@ -2168,7 +2169,7 @@ const downcastTableAlignmentConfig = {
2168
2169
  * @param editor The editor instance.
2169
2170
  * @returns The width of the table in pixels.
2170
2171
  */ function getTableWidthInPixels(modelTable, editor) {
2171
- // It is possible for a table to not have a <tbody> element - see #11878.
2172
+ // It is possible for a table to not have a <tbody> element - see https://github.com/ckeditor/ckeditor5/issues/11878.
2172
2173
  const referenceElement = getChildrenViewElement(modelTable, 'tbody', editor) || getChildrenViewElement(modelTable, 'thead', editor) || getChildrenViewElement(modelTable, 'tfoot', editor);
2173
2174
  const domReferenceElement = editor.editing.view.domConverter.mapViewToDom(referenceElement);
2174
2175
  return getElementWidthInPixels(domReferenceElement);
@@ -2197,7 +2198,7 @@ const downcastTableAlignmentConfig = {
2197
2198
  */ function getElementWidthInPixels(domElement) {
2198
2199
  const styles = global.window.getComputedStyle(domElement);
2199
2200
  // In the 'border-box' box sizing algorithm, the element's width
2200
- // already includes the padding and border width (#12335).
2201
+ // already includes the padding and border width (https://github.com/ckeditor/ckeditor5/issues/12335).
2201
2202
  if (styles.boxSizing === 'border-box') {
2202
2203
  return parseFloat(styles.width) - parseFloat(styles.paddingLeft) - parseFloat(styles.paddingRight) - parseFloat(styles.borderLeftWidth) - parseFloat(styles.borderRightWidth);
2203
2204
  } else {
@@ -2332,7 +2333,7 @@ const downcastTableAlignmentConfig = {
2332
2333
  */ function getDomCellOuterWidth(domCell) {
2333
2334
  const styles = global.window.getComputedStyle(domCell);
2334
2335
  // In the 'border-box' box sizing algorithm, the element's width
2335
- // already includes the padding and border width (#12335).
2336
+ // already includes the padding and border width (https://github.com/ckeditor/ckeditor5/issues/12335).
2336
2337
  if (styles.boxSizing === 'border-box') {
2337
2338
  return parseInt(styles.width);
2338
2339
  } else {
@@ -3808,7 +3809,7 @@ function moveCellsToRow(table, targetRowIndex, cellsToMove, writer) {
3808
3809
  updateNumericAttribute('rowspan', rowspan, cellToMove, writer);
3809
3810
  previousCell = cellToMove;
3810
3811
  } else if (isAnchor) {
3811
- // If cell is spanned then `cell` holds reference to overlapping cell. See ckeditor/ckeditor5#6502.
3812
+ // If cell is spanned then `cell` holds reference to overlapping cell. See https://github.com/ckeditor/ckeditor5/issues/6502.
3812
3813
  previousCell = cell;
3813
3814
  }
3814
3815
  }
@@ -11615,7 +11616,7 @@ const toPx = /* #__PURE__ */ toUnit('px');
11615
11616
  // Currently the states of column resize and table resize (which is actually the last column resize) features
11616
11617
  // are bound together. They can be separated in the future by adding distinct listeners and applying
11617
11618
  // different CSS classes (e.g. `ck-column-resize_disabled` and `ck-table-resize_disabled`) to the editor root.
11618
- // See #12148 for the details.
11619
+ // See https://github.com/ckeditor/ckeditor5/issues/12148 for the details.
11619
11620
  this.bind('_isResizingAllowed').to(editor, 'isReadOnly', columnResizePlugin, 'isEnabled', tableWidthsCommand, 'isEnabled', (isEditorReadOnly, isPluginEnabled, isTableWidthsCommandCommandEnabled)=>!isEditorReadOnly && isPluginEnabled && isTableWidthsCommandCommandEnabled);
11620
11621
  }
11621
11622
  /**