@progress/kendo-spreadsheet-common 1.2.9-develop.1 → 1.2.9-develop.3

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-esm.js CHANGED
@@ -18859,6 +18859,16 @@ function stripStyle(style) {
18859
18859
  return style.replace(/^-(?:ms|moz|webkit)-/, "");
18860
18860
  }
18861
18861
 
18862
+ function textAlign(align) {
18863
+ switch (align) {
18864
+ case "start":
18865
+ return "left";
18866
+ case "end":
18867
+ return "right";
18868
+ }
18869
+ return align;
18870
+ }
18871
+
18862
18872
  function borderObject(element, styles) {
18863
18873
  // MS Office uses class name and writes borders in the <style> section, so for it we need to
18864
18874
  // use the computed styles. For Google Sheets / LibreOffice, however, the inline styles are
@@ -18950,7 +18960,7 @@ function cellState(row, col, element, hBorders, vBorders, program) {
18950
18960
  state.background = styles["backgroundColor"];
18951
18961
  }
18952
18962
  if (stripStyle(styles["textAlign"]) !== "right") {
18953
- state.textAlign = stripStyle(styles["textAlign"]);
18963
+ state.textAlign = textAlign(stripStyle(styles["textAlign"]));
18954
18964
  }
18955
18965
  if (styles["verticalAlign"] !== "middle") {
18956
18966
  state.verticalAlign = styles["verticalAlign"];
@@ -21865,11 +21875,21 @@ function applyStyle(sheet, ref, styles, styleIndex) {
21865
21875
  }
21866
21876
 
21867
21877
  range._property(prop, value);
21878
+ return true;
21879
+ }
21880
+
21881
+ if (!set("left", "borderLeft")) {
21882
+ // start/end should mean right/left borders in RtL
21883
+ // context, but we don't support that anyway; assume
21884
+ // LtR for now.
21885
+ set("start", "borderLeft");
21886
+ }
21887
+
21888
+ if (!set("right", "borderRight")) {
21889
+ set("end", "borderRight");
21868
21890
  }
21869
21891
 
21870
- set("left", "borderLeft");
21871
21892
  set("top", "borderTop");
21872
- set("right", "borderRight");
21873
21893
  set("bottom", "borderBottom");
21874
21894
  set("diagonal", "dBorders");
21875
21895
  }
@@ -22056,7 +22076,7 @@ async function readStyles(zip, theme) {
22056
22076
  border = null;
22057
22077
  }
22058
22078
  } else if (border) {
22059
- if (/^(?:left|top|right|bottom|diagonal)$/.test(tag)) {
22079
+ if (/^(?:left|start|top|right|end|bottom|diagonal)$/.test(tag)) {
22060
22080
  border[tag] = { style: attrs.style || "none" };
22061
22081
  if (tag === "diagonal") {
22062
22082
  border.diagonal.up = border.diagonalUp;
package/dist/index.js CHANGED
@@ -18860,6 +18860,16 @@
18860
18860
  return style.replace(/^-(?:ms|moz|webkit)-/, "");
18861
18861
  }
18862
18862
 
18863
+ function textAlign(align) {
18864
+ switch (align) {
18865
+ case "start":
18866
+ return "left";
18867
+ case "end":
18868
+ return "right";
18869
+ }
18870
+ return align;
18871
+ }
18872
+
18863
18873
  function borderObject(element, styles) {
18864
18874
  // MS Office uses class name and writes borders in the <style> section, so for it we need to
18865
18875
  // use the computed styles. For Google Sheets / LibreOffice, however, the inline styles are
@@ -18951,7 +18961,7 @@
18951
18961
  state.background = styles["backgroundColor"];
18952
18962
  }
18953
18963
  if (stripStyle(styles["textAlign"]) !== "right") {
18954
- state.textAlign = stripStyle(styles["textAlign"]);
18964
+ state.textAlign = textAlign(stripStyle(styles["textAlign"]));
18955
18965
  }
18956
18966
  if (styles["verticalAlign"] !== "middle") {
18957
18967
  state.verticalAlign = styles["verticalAlign"];
@@ -21866,11 +21876,21 @@
21866
21876
  }
21867
21877
 
21868
21878
  range._property(prop, value);
21879
+ return true;
21880
+ }
21881
+
21882
+ if (!set("left", "borderLeft")) {
21883
+ // start/end should mean right/left borders in RtL
21884
+ // context, but we don't support that anyway; assume
21885
+ // LtR for now.
21886
+ set("start", "borderLeft");
21887
+ }
21888
+
21889
+ if (!set("right", "borderRight")) {
21890
+ set("end", "borderRight");
21869
21891
  }
21870
21892
 
21871
- set("left", "borderLeft");
21872
21893
  set("top", "borderTop");
21873
- set("right", "borderRight");
21874
21894
  set("bottom", "borderBottom");
21875
21895
  set("diagonal", "dBorders");
21876
21896
  }
@@ -22057,7 +22077,7 @@
22057
22077
  border = null;
22058
22078
  }
22059
22079
  } else if (border) {
22060
- if (/^(?:left|top|right|bottom|diagonal)$/.test(tag)) {
22080
+ if (/^(?:left|start|top|right|end|bottom|diagonal)$/.test(tag)) {
22061
22081
  border[tag] = { style: attrs.style || "none" };
22062
22082
  if (tag === "diagonal") {
22063
22083
  border.diagonal.up = border.diagonalUp;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-spreadsheet-common",
3
3
  "description": "Kendo UI platform-independent Spreadsheet library",
4
- "version": "1.2.9-develop.1",
4
+ "version": "1.2.9-develop.3",
5
5
  "keywords": [
6
6
  "Kendo UI"
7
7
  ],