@dangl/angular-material-shared 2.6.2-beta0002 → 2.6.2-beta0011

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.
Files changed (139) hide show
  1. package/esm2022/lib/components/footer/footer.component.mjs +15 -16
  2. package/esm2022/lib/components/header/header.component.mjs +14 -9
  3. package/esm2022/public_api.mjs +1 -4
  4. package/esm2022/tiny-mce/dangl-angular-material-shared-tiny-mce.mjs +5 -0
  5. package/esm2022/tiny-mce/public_api.mjs +3 -0
  6. package/esm2022/tiny-mce/tiny-mce.component.mjs +114 -0
  7. package/esm2022/tiny-mce/utils/guid-generator.mjs +36 -0
  8. package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs +156 -0
  9. package/fesm2022/dangl-angular-material-shared-tiny-mce.mjs.map +1 -0
  10. package/fesm2022/dangl-angular-material-shared.mjs +30 -179
  11. package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
  12. package/package.json +8 -3
  13. package/public_api.d.ts +0 -3
  14. package/tiny-mce/index.d.ts +5 -0
  15. package/tiny-mce/public_api.d.ts +2 -0
  16. package/{lib/components/tiny-mce → tiny-mce}/tiny-mce.component.d.ts +1 -1
  17. package/tinymce-assets/icons/default/icons.js +0 -4
  18. package/tinymce-assets/icons/default/icons.min.js +1 -1
  19. package/tinymce-assets/models/dom/model.js +64 -86
  20. package/tinymce-assets/models/dom/model.min.js +2 -2
  21. package/tinymce-assets/plugins/accordion/plugin.js +1 -1
  22. package/tinymce-assets/plugins/accordion/plugin.min.js +1 -1
  23. package/tinymce-assets/plugins/advlist/plugin.js +2 -2
  24. package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
  25. package/tinymce-assets/plugins/anchor/plugin.js +1 -1
  26. package/tinymce-assets/plugins/anchor/plugin.min.js +1 -1
  27. package/tinymce-assets/plugins/autolink/plugin.js +1 -1
  28. package/tinymce-assets/plugins/autolink/plugin.min.js +1 -1
  29. package/tinymce-assets/plugins/autoresize/plugin.js +1 -1
  30. package/tinymce-assets/plugins/autoresize/plugin.min.js +1 -1
  31. package/tinymce-assets/plugins/autosave/plugin.js +1 -1
  32. package/tinymce-assets/plugins/autosave/plugin.min.js +1 -1
  33. package/tinymce-assets/plugins/charmap/plugin.js +1 -1
  34. package/tinymce-assets/plugins/charmap/plugin.min.js +1 -1
  35. package/tinymce-assets/plugins/code/plugin.js +1 -1
  36. package/tinymce-assets/plugins/code/plugin.min.js +1 -1
  37. package/tinymce-assets/plugins/codesample/plugin.js +1 -1
  38. package/tinymce-assets/plugins/codesample/plugin.min.js +1 -1
  39. package/tinymce-assets/plugins/directionality/plugin.js +1 -1
  40. package/tinymce-assets/plugins/directionality/plugin.min.js +1 -1
  41. package/tinymce-assets/plugins/emoticons/plugin.js +1 -2
  42. package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
  43. package/tinymce-assets/plugins/fullscreen/plugin.js +2 -3
  44. package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
  45. package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +1 -1
  46. package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +1 -1
  47. package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +1 -1
  48. package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +1 -1
  49. package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +1 -1
  50. package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +1 -1
  51. package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +1 -1
  52. package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +1 -1
  53. package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +1 -1
  54. package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +1 -1
  55. package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +1 -1
  56. package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +1 -1
  57. package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +1 -1
  58. package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +1 -1
  59. package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +1 -1
  60. package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +1 -1
  61. package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +1 -1
  62. package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +1 -1
  63. package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +1 -1
  64. package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +1 -1
  65. package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +1 -1
  66. package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +1 -1
  67. package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +1 -1
  68. package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +1 -1
  69. package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +1 -1
  70. package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +1 -1
  71. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +1 -1
  72. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +1 -1
  73. package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +1 -1
  74. package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +1 -1
  75. package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +1 -1
  76. package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +2 -2
  77. package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +1 -1
  78. package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +1 -1
  79. package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +1 -1
  80. package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +1 -1
  81. package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +1 -1
  82. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +1 -1
  83. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +1 -1
  84. package/tinymce-assets/plugins/help/plugin.js +43 -53
  85. package/tinymce-assets/plugins/help/plugin.min.js +2 -2
  86. package/tinymce-assets/plugins/image/plugin.js +1 -1
  87. package/tinymce-assets/plugins/image/plugin.min.js +1 -1
  88. package/tinymce-assets/plugins/importcss/plugin.js +1 -1
  89. package/tinymce-assets/plugins/importcss/plugin.min.js +1 -1
  90. package/tinymce-assets/plugins/insertdatetime/plugin.js +1 -1
  91. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +1 -1
  92. package/tinymce-assets/plugins/link/plugin.js +3 -4
  93. package/tinymce-assets/plugins/link/plugin.min.js +2 -2
  94. package/tinymce-assets/plugins/lists/plugin.js +3 -4
  95. package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
  96. package/tinymce-assets/plugins/media/plugin.js +2 -2
  97. package/tinymce-assets/plugins/media/plugin.min.js +2 -2
  98. package/tinymce-assets/plugins/nonbreaking/plugin.js +1 -1
  99. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +1 -1
  100. package/tinymce-assets/plugins/pagebreak/plugin.js +1 -1
  101. package/tinymce-assets/plugins/pagebreak/plugin.min.js +1 -1
  102. package/tinymce-assets/plugins/preview/plugin.js +1 -1
  103. package/tinymce-assets/plugins/preview/plugin.min.js +1 -1
  104. package/tinymce-assets/plugins/quickbars/plugin.js +1 -1
  105. package/tinymce-assets/plugins/quickbars/plugin.min.js +1 -1
  106. package/tinymce-assets/plugins/save/plugin.js +2 -3
  107. package/tinymce-assets/plugins/save/plugin.min.js +2 -2
  108. package/tinymce-assets/plugins/searchreplace/plugin.js +2 -3
  109. package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
  110. package/tinymce-assets/plugins/table/plugin.js +48 -51
  111. package/tinymce-assets/plugins/table/plugin.min.js +2 -2
  112. package/tinymce-assets/plugins/template/index.js +7 -0
  113. package/tinymce-assets/plugins/template/plugin.js +567 -0
  114. package/tinymce-assets/plugins/template/plugin.min.js +4 -0
  115. package/tinymce-assets/plugins/visualblocks/plugin.js +1 -1
  116. package/tinymce-assets/plugins/visualblocks/plugin.min.js +1 -1
  117. package/tinymce-assets/plugins/visualchars/plugin.js +1 -1
  118. package/tinymce-assets/plugins/visualchars/plugin.min.js +1 -1
  119. package/tinymce-assets/plugins/wordcount/plugin.js +1 -1
  120. package/tinymce-assets/plugins/wordcount/plugin.min.js +1 -1
  121. package/tinymce-assets/skins/ui/oxide/skin.css +63 -392
  122. package/tinymce-assets/skins/ui/oxide/skin.js +1 -1
  123. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
  124. package/tinymce-assets/skins/ui/oxide-dark/skin.css +66 -395
  125. package/tinymce-assets/skins/ui/oxide-dark/skin.js +1 -1
  126. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
  127. package/tinymce-assets/skins/ui/tinymce-5/skin.css +41 -369
  128. package/tinymce-assets/skins/ui/tinymce-5/skin.js +1 -1
  129. package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -1
  130. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +46 -374
  131. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +1 -1
  132. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  133. package/tinymce-assets/themes/silver/theme.js +302 -661
  134. package/tinymce-assets/themes/silver/theme.min.js +2 -2
  135. package/esm2022/lib/angular-material-shared.module.mjs +0 -19
  136. package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +0 -107
  137. package/esm2022/lib/utils/guid-generator.mjs +0 -36
  138. package/lib/angular-material-shared.module.d.ts +0 -10
  139. /package/{lib → tiny-mce}/utils/guid-generator.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 7.0.1 (2024-04-10)
2
+ * TinyMCE version 6.8.3 (2024-02-08)
3
3
  */
4
4
 
5
5
  (function () {
@@ -879,14 +879,7 @@
879
879
  const bindFrom = (a, f) => a !== undefined && a !== null ? f(a) : Optional.none();
880
880
  const someIf = (b, a) => b ? Optional.some(a) : Optional.none();
881
881
 
882
- const removeFromStart = (str, numChars) => {
883
- return str.substring(numChars);
884
- };
885
-
886
882
  const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
887
- const removeLeading = (str, prefix) => {
888
- return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;
889
- };
890
883
  const contains = (str, substr, start = 0, end) => {
891
884
  const idx = str.indexOf(substr, start);
892
885
  if (idx !== -1) {
@@ -1842,7 +1835,6 @@
1842
1835
  const rPercentageBasedSizeRegex = /(\d+(\.\d+)?)%/;
1843
1836
  const rPixelBasedSizeRegex = /(\d+(\.\d+)?)px|em/;
1844
1837
  const isCol$2 = isTag('col');
1845
- const isRow$2 = isTag('tr');
1846
1838
  const getPercentSize = (elm, outerGetter, innerGetter) => {
1847
1839
  const relativeParent = parentElement(elm).getOrThunk(() => getBody$1(owner(elm)));
1848
1840
  return outerGetter(elm) / innerGetter(relativeParent) * 100;
@@ -1856,9 +1848,6 @@
1856
1848
  const setHeight = (cell, amount) => {
1857
1849
  set$1(cell, 'height', amount + 'px');
1858
1850
  };
1859
- const removeHeight = cell => {
1860
- remove$5(cell, 'height');
1861
- };
1862
1851
  const getHeightValue = cell => getRuntime(cell) + 'px';
1863
1852
  const convert = (cell, number, getter, setter) => {
1864
1853
  const newSize = table(cell).map(table => {
@@ -1890,11 +1879,11 @@
1890
1879
  });
1891
1880
  };
1892
1881
  const getRawWidth$1 = element => getRaw$1(element, 'width');
1893
- const getRawHeight$1 = element => getRaw$1(element, 'height');
1882
+ const getRawHeight = element => getRaw$1(element, 'height');
1894
1883
  const getPercentageWidth = cell => getPercentSize(cell, get$9, getInner);
1895
1884
  const getPixelWidth$1 = cell => isCol$2(cell) ? get$9(cell) : getRuntime$1(cell);
1896
1885
  const getHeight = cell => {
1897
- return isRow$2(cell) ? get$8(cell) : get$7(cell, 'rowspan', getTotalHeight);
1886
+ return get$7(cell, 'rowspan', getTotalHeight);
1898
1887
  };
1899
1888
  const getGenericWidth = cell => {
1900
1889
  const width = getRawWidth$1(cell);
@@ -1908,7 +1897,6 @@
1908
1897
  set$1(cell, 'width', amount + unit);
1909
1898
  };
1910
1899
  const getPixelTableWidth = table => get$9(table) + 'px';
1911
- const getPixelTableHeight = table => get$8(table) + 'px';
1912
1900
  const getPercentTableWidth = table => getPercentSize(table, get$9, getInner) + '%';
1913
1901
  const isPercentSizing$1 = table => getRawWidth$1(table).exists(size => rPercentageBasedSizeRegex.test(size));
1914
1902
  const isPixelSizing$1 = table => getRawWidth$1(table).exists(size => rPixelBasedSizeRegex.test(size));
@@ -1920,7 +1908,7 @@
1920
1908
  return getRawWidth$1(cell).getOrThunk(() => getPixelWidth$1(cell) + 'px');
1921
1909
  };
1922
1910
  const getRawH = cell => {
1923
- return getRawHeight$1(cell).getOrThunk(() => getHeight(cell) + 'px');
1911
+ return getRawHeight(cell).getOrThunk(() => getHeight(cell) + 'px');
1924
1912
  };
1925
1913
  const justCols = warehouse => map$1(Warehouse.justColumns(warehouse), column => Optional.from(column.element));
1926
1914
  const isValidColumn = cell => {
@@ -1967,19 +1955,20 @@
1967
1955
  return deduced.getOrThunk(tableSize.minCellWidth);
1968
1956
  });
1969
1957
  };
1970
- const getHeightFrom = (warehouse, table, getHeight, fallback) => {
1971
- const rowCells = rows(warehouse);
1972
- const rows$1 = map$1(warehouse.all, r => Optional.some(r.element));
1973
- const backups = [Optional.some(height.edge(table))].concat(map$1(height.positions(rowCells, table), pos => pos.map(p => p.y)));
1974
- return map$1(rows$1, (row, i) => getDimension(row, i, backups, always, getHeight, fallback));
1958
+ const getHeightFrom = (warehouse, table, direction, getHeight, fallback) => {
1959
+ const rows$1 = rows(warehouse);
1960
+ const backups = [Optional.some(direction.edge(table))].concat(map$1(direction.positions(rows$1, table), pos => pos.map(p => p.y)));
1961
+ return map$1(rows$1, (cellOption, c) => {
1962
+ return getDimension(cellOption, c, backups, not(hasRowspan), getHeight, fallback);
1963
+ });
1975
1964
  };
1976
- const getPixelHeights = (warehouse, table) => {
1977
- return getHeightFrom(warehouse, table, getHeight, deduced => {
1965
+ const getPixelHeights = (warehouse, table, direction) => {
1966
+ return getHeightFrom(warehouse, table, direction, getHeight, deduced => {
1978
1967
  return deduced.getOrThunk(minHeight);
1979
1968
  });
1980
1969
  };
1981
- const getRawHeights = (warehouse, table) => {
1982
- return getHeightFrom(warehouse, table, getRawH, getDeduced);
1970
+ const getRawHeights = (warehouse, table, direction) => {
1971
+ return getHeightFrom(warehouse, table, direction, getRawH, getDeduced);
1983
1972
  };
1984
1973
 
1985
1974
  const widthLookup = (table, getter) => () => {
@@ -2523,12 +2512,10 @@
2523
2512
  const getSelectionStart = editor => SugarElement.fromDom(editor.selection.getStart());
2524
2513
  const getPixelWidth = elm => elm.getBoundingClientRect().width;
2525
2514
  const getPixelHeight = elm => elm.getBoundingClientRect().height;
2526
- const getRawValue = prop => (editor, elm) => {
2527
- const raw = editor.dom.getStyle(elm, prop) || editor.dom.getAttrib(elm, prop);
2515
+ const getRawWidth = (editor, elm) => {
2516
+ const raw = editor.dom.getStyle(elm, 'width') || editor.dom.getAttrib(elm, 'width');
2528
2517
  return Optional.from(raw).filter(isNotEmpty);
2529
2518
  };
2530
- const getRawWidth = getRawValue('width');
2531
- const getRawHeight = getRawValue('height');
2532
2519
  const isPercentage$1 = value => /^(\d+(\.\d+)?)%$/.test(value);
2533
2520
  const isPixel = value => /^(\d+(\.\d+)?)px$/.test(value);
2534
2521
  const isInEditableContext$1 = cell => closest$2(cell, isTag('table')).exists(isEditable$1);
@@ -4170,6 +4157,17 @@
4170
4157
  colspan: column.colspan
4171
4158
  }));
4172
4159
  };
4160
+ const recalculateHeightForCells = (warehouse, heights) => {
4161
+ const all = Warehouse.justCells(warehouse);
4162
+ return map$1(all, cell => {
4163
+ const height = total(cell.row, cell.row + cell.rowspan, heights);
4164
+ return {
4165
+ element: cell.element,
4166
+ height,
4167
+ rowspan: cell.rowspan
4168
+ };
4169
+ });
4170
+ };
4173
4171
  const matchRowHeight = (warehouse, heights) => {
4174
4172
  return map$1(warehouse.all, (row, i) => {
4175
4173
  return {
@@ -4204,16 +4202,17 @@
4204
4202
  recalculateAndApply(warehouse, newWidths, tableSize);
4205
4203
  resizing.resizeTable(tableSize.adjustTableWidth, clampedStep, isLastColumn);
4206
4204
  };
4207
- const adjustHeight = (table, delta, index) => {
4205
+ const adjustHeight = (table, delta, index, direction) => {
4208
4206
  const warehouse = Warehouse.fromTable(table);
4209
- const heights = getPixelHeights(warehouse, table);
4207
+ const heights = getPixelHeights(warehouse, table, direction);
4210
4208
  const newHeights = map$1(heights, (dy, i) => index === i ? Math.max(delta + dy, minHeight()) : dy);
4209
+ const newCellSizes = recalculateHeightForCells(warehouse, newHeights);
4211
4210
  const newRowSizes = matchRowHeight(warehouse, newHeights);
4212
4211
  each$2(newRowSizes, row => {
4213
4212
  setHeight(row.element, row.height);
4214
4213
  });
4215
- each$2(Warehouse.justCells(warehouse), cell => {
4216
- removeHeight(cell.element);
4214
+ each$2(newCellSizes, cell => {
4215
+ setHeight(cell.element, cell.height);
4217
4216
  });
4218
4217
  const total = sumUp(newHeights);
4219
4218
  setHeight(table, total);
@@ -4582,7 +4581,7 @@
4582
4581
  const opEraseRows = (grid, details, _comparator, _genWrappers) => {
4583
4582
  const rows = uniqueRows(details);
4584
4583
  const newGrid = deleteRowsAt(grid, rows[0].row, rows[rows.length - 1].row);
4585
- const maxRowIndex = Math.max(extractGridDetails(newGrid).rows.length - 1, 0);
4584
+ const maxRowIndex = newGrid.length > 0 ? newGrid.length - 1 : 0;
4586
4585
  return bundle(newGrid, Math.min(details[0].row, maxRowIndex), details[0].column);
4587
4586
  };
4588
4587
  const opMergeCells = (grid, mergable, comparator, genWrappers) => {
@@ -4627,7 +4626,7 @@
4627
4626
  const context = rows[pasteDetails.cells[0].row];
4628
4627
  const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);
4629
4628
  const mergedGrid = insertCols(index, grid, gridB, pasteDetails.generators, comparator);
4630
- return bundle(mergedGrid, pasteDetails.cells[0].row, index);
4629
+ return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column);
4631
4630
  };
4632
4631
  const opPasteRowsBefore = (grid, pasteDetails, comparator, _genWrappers) => {
4633
4632
  const rows = extractGridDetails(grid).rows;
@@ -4643,7 +4642,7 @@
4643
4642
  const context = rows[pasteDetails.cells[0].row];
4644
4643
  const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);
4645
4644
  const mergedGrid = insertRows(index, grid, gridB, pasteDetails.generators, comparator);
4646
- return bundle(mergedGrid, index, pasteDetails.cells[0].column);
4645
+ return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column);
4647
4646
  };
4648
4647
  const opGetColumnsType = (table, target) => {
4649
4648
  const house = Warehouse.fromTable(table);
@@ -5111,9 +5110,11 @@
5111
5110
  set$1(column.element, 'width', width + unit);
5112
5111
  });
5113
5112
  };
5114
- const redistributeToH = (newHeights, rows, cells) => {
5113
+ const redistributeToH = (newHeights, rows, cells, unit) => {
5115
5114
  each$2(cells, cell => {
5116
- remove$5(cell.element, 'height');
5115
+ const heights = newHeights.slice(cell.row, cell.rowspan + cell.row);
5116
+ const h = sum(heights, minHeight());
5117
+ set$1(cell.element, 'height', h + unit);
5117
5118
  });
5118
5119
  each$2(rows, (row, i) => {
5119
5120
  set$1(row.element, 'height', newHeights[i]);
@@ -5140,10 +5141,11 @@
5140
5141
  set$1(table, 'width', newWidth);
5141
5142
  });
5142
5143
  optHeight.each(newHeight => {
5144
+ const hUnit = getUnit(newHeight);
5143
5145
  const totalHeight = get$8(table);
5144
- const oldHeights = getRawHeights(warehouse, table);
5146
+ const oldHeights = getRawHeights(warehouse, table, height);
5145
5147
  const nuHeights = redistribute$1(oldHeights, totalHeight, newHeight);
5146
- redistributeToH(nuHeights, rows, cells);
5148
+ redistributeToH(nuHeights, rows, cells, hUnit);
5147
5149
  set$1(table, 'height', newHeight);
5148
5150
  });
5149
5151
  };
@@ -5153,24 +5155,18 @@
5153
5155
 
5154
5156
  const cleanupLegacyAttributes = element => {
5155
5157
  remove$7(element, 'width');
5156
- remove$7(element, 'height');
5157
5158
  };
5158
- const convertToPercentSizeWidth = table => {
5159
+ const convertToPercentSize = table => {
5159
5160
  const newWidth = getPercentTableWidth(table);
5160
5161
  redistribute(table, Optional.some(newWidth), Optional.none());
5161
5162
  cleanupLegacyAttributes(table);
5162
5163
  };
5163
- const convertToPixelSizeWidth = table => {
5164
+ const convertToPixelSize = table => {
5164
5165
  const newWidth = getPixelTableWidth(table);
5165
5166
  redistribute(table, Optional.some(newWidth), Optional.none());
5166
5167
  cleanupLegacyAttributes(table);
5167
5168
  };
5168
- const convertToPixelSizeHeight = table => {
5169
- const newHeight = getPixelTableHeight(table);
5170
- redistribute(table, Optional.none(), Optional.some(newHeight));
5171
- cleanupLegacyAttributes(table);
5172
- };
5173
- const convertToNoneSizeWidth = table => {
5169
+ const convertToNoneSize = table => {
5174
5170
  remove$5(table, 'width');
5175
5171
  const columns = columns$1(table);
5176
5172
  const rowElements = columns.length > 0 ? columns : cells$1(table);
@@ -5278,11 +5274,11 @@
5278
5274
  });
5279
5275
  return descendant(getBody(editor), 'table[data-mce-id="__mce"]').map(table => {
5280
5276
  if (isTablePixelsForced(editor)) {
5281
- convertToPixelSizeWidth(table);
5277
+ convertToPixelSize(table);
5282
5278
  } else if (isTableResponsiveForced(editor)) {
5283
- convertToNoneSizeWidth(table);
5279
+ convertToNoneSize(table);
5284
5280
  } else if (isTablePercentagesForced(editor) || isPercentage(defaultStyles.width)) {
5285
- convertToPercentSizeWidth(table);
5281
+ convertToPercentSize(table);
5286
5282
  }
5287
5283
  removeDataStyle(table);
5288
5284
  remove$7(table, 'data-mce-id');
@@ -5359,11 +5355,11 @@
5359
5355
  if (!isForcedSizing) {
5360
5356
  table(cellOrCaption, isRoot).each(table => {
5361
5357
  if (sizing === 'relative' && !isPercentSizing(table)) {
5362
- convertToPercentSizeWidth(table);
5358
+ convertToPercentSize(table);
5363
5359
  } else if (sizing === 'fixed' && !isPixelSizing(table)) {
5364
- convertToPixelSizeWidth(table);
5360
+ convertToPixelSize(table);
5365
5361
  } else if (sizing === 'responsive' && !isNoneSizing(table)) {
5366
- convertToNoneSizeWidth(table);
5362
+ convertToNoneSize(table);
5367
5363
  }
5368
5364
  removeDataStyle(table);
5369
5365
  fireTableModified(editor, table.dom, structureModified);
@@ -6999,12 +6995,11 @@
6999
6995
  const onSelection = (cells, start, finish) => {
7000
6996
  const tableOpt = table(start);
7001
6997
  tableOpt.each(table => {
7002
- const cellsDom = map$1(cells, cell => cell.dom);
7003
6998
  const cloneFormats = getTableCloneElements(editor);
7004
6999
  const generators = cellOperations(noop, SugarElement.fromDom(editor.getDoc()), cloneFormats);
7005
7000
  const selectedCells = getCellsFromSelection(editor);
7006
- const otherCellsDom = getOtherCells(table, { selection: selectedCells }, generators).map(otherCells => map(otherCells, cellArr => map$1(cellArr, cell => cell.dom))).getOrUndefined();
7007
- fireTableSelectionChange(editor, cellsDom, start.dom, finish.dom, otherCellsDom);
7001
+ const otherCells = getOtherCells(table, { selection: selectedCells }, generators);
7002
+ fireTableSelectionChange(editor, cells, start, finish, otherCells);
7008
7003
  });
7009
7004
  };
7010
7005
  const onClear = () => fireTableSelectionClear(editor);
@@ -7790,7 +7785,7 @@
7790
7785
  const table = event.table;
7791
7786
  events.trigger.beforeResize(table, 'row');
7792
7787
  const delta = hdirection.delta(event.delta, table);
7793
- adjustHeight(table, delta, event.row);
7788
+ adjustHeight(table, delta, event.row, hdirection);
7794
7789
  events.trigger.afterResize(table, 'row');
7795
7790
  });
7796
7791
  manager.events.startAdjust.bind(_event => {
@@ -7873,7 +7868,7 @@
7873
7868
  const isTable = node => isNonNullable(node) && node.nodeName === 'TABLE';
7874
7869
  const barResizerPrefix = 'bar-';
7875
7870
  const isResizable = elm => get$b(elm, 'data-mce-resize') !== 'false';
7876
- const syncTableCellPixels = table => {
7871
+ const syncPixels = table => {
7877
7872
  const warehouse = Warehouse.fromTable(table);
7878
7873
  if (!Warehouse.hasColumns(warehouse)) {
7879
7874
  each$2(cells$1(table), cell => {
@@ -7883,29 +7878,19 @@
7883
7878
  });
7884
7879
  }
7885
7880
  };
7886
- const isCornerResize = origin => startsWith(origin, 'corner-');
7887
- const getCornerLocation = origin => removeLeading(origin, 'corner-');
7888
7881
  const TableResizeHandler = editor => {
7889
7882
  const selectionRng = value();
7890
7883
  const tableResize = value();
7891
7884
  const resizeWire = value();
7892
7885
  let startW;
7893
7886
  let startRawW;
7894
- let startH;
7895
- let startRawH;
7896
7887
  const lazySizing = table => get$5(editor, table);
7897
7888
  const lazyResizingBehaviour = () => isPreserveTableColumnResizing(editor) ? preserveTable() : resizeTable();
7898
7889
  const getNumColumns = table => getGridSize(table).columns;
7899
- const getNumRows = table => getGridSize(table).rows;
7900
- const afterCornerResize = (table, origin, width, height) => {
7901
- const location = getCornerLocation(origin);
7902
- const isRightEdgeResize = endsWith(location, 'e');
7903
- const isNorthEdgeResize = startsWith(location, 'n');
7890
+ const afterCornerResize = (table, origin, width) => {
7891
+ const isRightEdgeResize = endsWith(origin, 'e');
7904
7892
  if (startRawW === '') {
7905
- convertToPercentSizeWidth(table);
7906
- }
7907
- if (startRawH === '') {
7908
- convertToPixelSizeHeight(table);
7893
+ convertToPercentSize(table);
7909
7894
  }
7910
7895
  if (width !== startW && startRawW !== '') {
7911
7896
  set$1(table, 'width', startRawW);
@@ -7919,12 +7904,7 @@
7919
7904
  set$1(table, 'width', targetPercentW + '%');
7920
7905
  }
7921
7906
  if (isPixel(startRawW)) {
7922
- syncTableCellPixels(table);
7923
- }
7924
- if (height !== startH && startRawH !== '') {
7925
- set$1(table, 'height', startRawH);
7926
- const idx = isNorthEdgeResize ? 0 : getNumRows(table) - 1;
7927
- adjustHeight(table, height - startH, idx);
7907
+ syncPixels(table);
7928
7908
  }
7929
7909
  };
7930
7910
  const destroy = () => {
@@ -7971,17 +7951,15 @@
7971
7951
  editor.dom.addClass(clone, 'mce-' + getTableColumnResizingBehaviour(editor) + '-columns');
7972
7952
  });
7973
7953
  if (!isPixelSizing(table) && isTablePixelsForced(editor)) {
7974
- convertToPixelSizeWidth(table);
7954
+ convertToPixelSize(table);
7975
7955
  } else if (!isPercentSizing(table) && isTablePercentagesForced(editor)) {
7976
- convertToPercentSizeWidth(table);
7956
+ convertToPercentSize(table);
7977
7957
  }
7978
7958
  if (isNoneSizing(table) && startsWith(e.origin, barResizerPrefix)) {
7979
- convertToPercentSizeWidth(table);
7959
+ convertToPercentSize(table);
7980
7960
  }
7981
7961
  startW = e.width;
7982
7962
  startRawW = isTableResponsiveForced(editor) ? '' : getRawWidth(editor, targetElm).getOr('');
7983
- startH = e.height;
7984
- startRawH = getRawHeight(editor, targetElm).getOr('');
7985
7963
  }
7986
7964
  });
7987
7965
  editor.on('ObjectResized', e => {
@@ -7989,8 +7967,8 @@
7989
7967
  if (isTable(targetElm)) {
7990
7968
  const table = SugarElement.fromDom(targetElm);
7991
7969
  const origin = e.origin;
7992
- if (isCornerResize(origin)) {
7993
- afterCornerResize(table, origin, e.width, e.height);
7970
+ if (startsWith(origin, 'corner-')) {
7971
+ afterCornerResize(table, origin, e.width);
7994
7972
  }
7995
7973
  removeDataStyle(table);
7996
7974
  fireTableModified(editor, table.dom, styleModified);