@griddo/ax 10.1.92 → 10.1.94

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/ax",
3
3
  "description": "Griddo Author Experience",
4
- "version": "10.1.92",
4
+ "version": "10.1.94",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -230,5 +230,5 @@
230
230
  "publishConfig": {
231
231
  "access": "public"
232
232
  },
233
- "gitHead": "eef1e074f0da3e789d40f8e337934c125bb73b7e"
233
+ "gitHead": "29cb48bebb7d76b9704b2548625063aab682e548"
234
234
  }
@@ -2,6 +2,8 @@ import { getRichTextConfig, parseClassNames } from "./helpers";
2
2
 
3
3
  const richTextConfig = getRichTextConfig();
4
4
  const paragraphStyles = richTextConfig?.paragraphStyles ? parseClassNames(richTextConfig.paragraphStyles) : undefined;
5
+ const tableStyles = richTextConfig?.tableStyles ? parseClassNames(richTextConfig.tableStyles) : undefined;
6
+ const tableCellStyles = richTextConfig?.tableCellStyles ? parseClassNames(richTextConfig.tableCellStyles) : undefined;
5
7
 
6
8
  const miscButtons = [
7
9
  "underline",
@@ -89,6 +91,8 @@ const wysiwygConfig = {
89
91
  imageManagerLoadURL: `${process.env.REACT_APP_API_ENDPOINT}/images/wysiwyg`,
90
92
  requestWithCORS: false,
91
93
  paragraphStyles,
94
+ tableStyles,
95
+ tableCellStyles,
92
96
  };
93
97
 
94
98
  export { buttonsFull, buttons, wysiwygConfig };
@@ -4,14 +4,16 @@ const getRichTextConfig = (): IRichTextConfig | null => {
4
4
  return schemas?.richTextConfig ? schemas.richTextConfig : null;
5
5
  };
6
6
 
7
- const parseClassNames = (paragraphStyles: { label: string; className: string }[]) =>
8
- paragraphStyles.reduce(
7
+ const parseClassNames = (styles: { label: string; className: string }[]) =>
8
+ styles.reduce(
9
9
  (acc, current: { label: string; className: string }) => ({ ...acc, [current.className]: current.label }),
10
10
  {}
11
11
  );
12
12
 
13
13
  interface IRichTextConfig {
14
14
  paragraphStyles?: { label: string; className: string }[];
15
+ tableStyles?: { label: string; className: string }[];
16
+ tableCellStyles?: { label: string; className: string }[];
15
17
  }
16
18
 
17
19
  export { getRichTextConfig, parseClassNames };