oolib 2.67.1 → 2.67.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.
@@ -151,7 +151,7 @@ function SimpleTable(_a) {
151
151
  // ...CellContentBlockDefaultProps[cell.comp],
152
152
  // ...(cell.props ? cell.props : {}),
153
153
  // }
154
- return (react_1.default.createElement(styled_1.StyledSimpleTableCell, { key: cell.id, id: "kp_table__cell__".concat(cell.id), style: {
154
+ return (react_1.default.createElement(styled_1.StyledSimpleTableCell, { key: cell.id, id: "kp_table__cell__".concat(cell.id), readOnly: readOnly || cell.readOnly, style: {
155
155
  color: greyColor100,
156
156
  width: "".concat(cellWidth),
157
157
  minHeight: "4rem",
@@ -159,7 +159,7 @@ function SimpleTable(_a) {
159
159
  "2px solid ".concat((0, utilsOolib_1.getPrimaryColor100)(theme === null || theme === void 0 ? void 0 : theme.colors)),
160
160
  }, onMouseDown: function (e) {
161
161
  initColResizeState(e, { colId: "col_".concat(cellIdx) });
162
- }, onMouseOut: resetDragZoneIndicator, onMouseMove: hideShowDragZoneIndicator },
162
+ }, onMouseOut: resetDragZoneIndicator, onMouseMove: hideShowDragZoneIndicator, tabIndex: 0 },
163
163
  react_1.default.createElement(CellComp, __assign({}, cellProps, { id: "kp_table_cell__".concat(cell.id, "__rich_input") /*dont mess with this id nomenclature. it needs to stay this way. check out the handleCellInputChange fn to understand */, value: cellValue, readOnly: readOnly || cell.readOnly, onChange: function (k, v) {
164
164
  return handleCellInputChange({ v: v, rowIdx: rowIdx, cellIdx: cellIdx });
165
165
  } }))));
@@ -33,13 +33,13 @@ var transitions_1 = require("../../themes/mixins/transitions");
33
33
  var styled_components_1 = __importStar(require("styled-components"));
34
34
  var utilsOolib_1 = require("../../utilsOolib");
35
35
  exports.StyledSimpleTable = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n border-left: 1px solid ", ";\n"], ["\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n border-left: 1px solid ", ";\n"])), themes_1.colors.greyColor10, themes_1.colors.greyColor10, themes_1.colors.greyColor10);
36
- exports.StyledSimpleTableRow = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n ", ";\n background-color: ", ";\n ", "\n"], ["\n display: flex;\n ", ";\n background-color: ", ";\n ", "\n"])), (0, transitions_1.transition)("background-color"), function (_a) {
36
+ exports.StyledSimpleTableRow = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n ", ";\n background-color: ", ";\n"], ["\n display: flex;\n ", ";\n background-color: ", ";\n"])), (0, transitions_1.transition)("background-color"), function (_a) {
37
37
  var rowIdx = _a.rowIdx;
38
38
  return rowIdx % 2 === 1 ? themes_1.colors.greyColor3 : themes_1.colors.white;
39
- }, function (_a) {
39
+ });
40
+ exports.StyledSimpleTableCell = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n /* max-width: 300px; */\n padding: 0.8rem 1rem;\n /* margin: 0 1rem; */\n border-right: 1px solid ", ";\n ", ";\n ", "\n"], ["\n /* max-width: 300px; */\n padding: 0.8rem 1rem;\n /* margin: 0 1rem; */\n border-right: 1px solid ", ";\n ", ";\n ", "\n"])), themes_1.colors.greyColor10, (0, transitions_1.transition)("background-color"), function (_a) {
40
41
  var readOnly = _a.readOnly, theme = _a.theme;
41
- return !readOnly && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n :hover{\n background-color: ", ";\n }\n \n "], ["\n :hover{\n background-color: ", ";\n }\n \n "])), (0, utilsOolib_1.getPrimaryColor10)(theme === null || theme === void 0 ? void 0 : theme.colors));
42
+ return !readOnly && (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n :hover{\n background-color: ", ";\n }\n :focus{\n outline: 1px solid ", ";\n background-color: ", ";\n } \n "], ["\n :hover{\n background-color: ", ";\n }\n :focus{\n outline: 1px solid ", ";\n background-color: ", ";\n } \n "])), (0, utilsOolib_1.getPrimaryColor10)(theme === null || theme === void 0 ? void 0 : theme.colors), (0, utilsOolib_1.getPrimaryColor100)(theme === null || theme === void 0 ? void 0 : theme.colors), themes_1.colors.none);
42
43
  });
43
- exports.StyledSimpleTableCell = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n /* max-width: 300px; */\n padding: 0.8rem 1rem;\n /* margin: 0 1rem; */\n border-right: 1px solid ", ";\n"], ["\n /* max-width: 300px; */\n padding: 0.8rem 1rem;\n /* margin: 0 1rem; */\n border-right: 1px solid ", ";\n"])), themes_1.colors.greyColor10);
44
44
  exports.StyledSimpleTableHeader = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n .public-DraftEditor-content {\n font-weight: 600;\n }\n background-color: ", ";\n border-bottom: 2px solid ", ";\n"], ["\n .public-DraftEditor-content {\n font-weight: 600;\n }\n background-color: ", ";\n border-bottom: 2px solid ", ";\n"])), themes_1.colors.greyColor, themes_1.colors.greyColor10);
45
45
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -41,9 +41,9 @@ var useResizeTableColumns = function (_a) {
41
41
  return mouseX > colRightEdge - dragZoneWidth;
42
42
  };
43
43
  var initColResizeState = function (e, d) {
44
- e.preventDefault();
45
- e.stopPropagation();
46
44
  if (isInDragZone(e)) {
45
+ e.preventDefault(); // these have to be inside isInDragZone, else clicking on cell wont allow rte to get focussed in SimpleTable
46
+ e.stopPropagation();
47
47
  setColResizeState({
48
48
  mousePos: e.clientX,
49
49
  initWidth: parseInt(colWidthConfig[d.colId].replace('px', '')),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.67.1",
3
+ "version": "2.67.3",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",