oolib 2.67.7 → 2.67.9

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.
@@ -5,8 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ColActionsMenu = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
+ var ActionMenu_1 = require("../../../ActionMenu");
8
9
  var ColActionsMenu = function (_a) {
9
- return (react_1.default.createElement("div", { style: { position: 'absolute', top: 0, left: '50%', transform: 'translate(-50%, -50%)' } },
10
- react_1.default.createElement("div", { style: { width: '50px', height: '50px', background: 'red' } })));
10
+ return (react_1.default.createElement("div", { style: { position: 'absolute', top: 0, left: '50%', transform: 'translate(-50%, -100%)' } },
11
+ react_1.default.createElement(ActionMenu_1.ActionMenu, { actions: [
12
+ {
13
+ display: 'Dummy',
14
+ onClick: function () { return console.log('dummy'); },
15
+ }
16
+ ] })));
11
17
  };
12
18
  exports.ColActionsMenu = ColActionsMenu;
@@ -64,14 +64,10 @@ var greyColor100 = themes_1.colors.greyColor100;
64
64
  /*pending:
65
65
  - first test whatever is done on okf
66
66
  - add col is still buggy. cannot resize, plus width seems wrong of new col
67
- - fix bugs in the pointer and risize hover
68
- - action menu to toggle header styles for col & row
69
- - action menu to toggle between stretch to available width vs fixed col widths (this might not be straightforward)
67
+ - fix bugs in the pointer and resize hover
70
68
  - col Actions
71
69
  - focussed css can be refined.
72
- - in general table styling should be slightly different i think.
73
70
  - mobile responsiveness
74
- - reposition cols & rows
75
71
  */
76
72
  function SimpleTable(_a) {
77
73
  var id = _a.id, readOnly = _a.readOnly, _b = _a.config, config = _b === void 0 ? {
@@ -168,10 +164,6 @@ function SimpleTable(_a) {
168
164
  borderRight: (colResizeState === null || colResizeState === void 0 ? void 0 : colResizeState.colId) === "col_".concat(cellIdx) &&
169
165
  "2px solid ".concat((0, utilsOolib_1.getPrimaryColor100)(theme === null || theme === void 0 ? void 0 : theme.colors)),
170
166
  }, onMouseEnter: function (e) {
171
- console.log({
172
- row: rowIdx,
173
- col: cellIdx,
174
- });
175
167
  setHoveredRowAndCol({
176
168
  rowIdx: rowIdx,
177
169
  colIdx: cellIdx,
@@ -183,10 +175,10 @@ function SimpleTable(_a) {
183
175
  onMouseDown: function (e) {
184
176
  initColResizeState(e, { colId: "col_".concat(cellIdx) });
185
177
  }, onMouseOut: resetDragZoneIndicator, onMouseMove: hideShowDragZoneIndicator, tabIndex: 0 },
186
- enableColActions &&
178
+ !readOnly && enableColActions &&
187
179
  rowIdx === 0 &&
188
180
  hoveredRowAndCol.colIdx === cellIdx && react_1.default.createElement(ColActionsMenu_1.ColActionsMenu, null),
189
- enableRowActions &&
181
+ !readOnly && enableRowActions &&
190
182
  cellIdx === 0 &&
191
183
  rowIdx !== undefined && //cuz for fixed col headers, rowIdx is undefined
192
184
  hoveredRowAndCol.rowIdx === rowIdx && (react_1.default.createElement(RowActionsMenu_1.RowActionsMenu, __assign({}, { value: value, rowIdx: rowIdx, onChange: onChange, id: id }))),
@@ -37,7 +37,7 @@ exports.StyledSimpleTableRow = styled_components_1.default.div(templateObject_2
37
37
  var rowIdx = _a.rowIdx;
38
38
  return rowIdx % 2 === 1 ? themes_1.colors.white : themes_1.colors.greyColor3;
39
39
  });
40
- exports.StyledSimpleTableCell = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n /* max-width: 300px; */\n /* padding: 0 1rem; */\n /* margin: 0 1rem; */\n position: relative;\n border-right: 1px solid ", ";\n ", ";\n ", "\n"], ["\n /* max-width: 300px; */\n /* padding: 0 1rem; */\n /* margin: 0 1rem; */\n position: relative;\n border-right: 1px solid ", ";\n ", ";\n ", "\n"])), themes_1.colors.greyColor10, (0, transitions_1.transition)("background-color"), function (_a) {
40
+ exports.StyledSimpleTableCell = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: relative;\n border-right: 1px solid ", ";\n ", ";\n ", "\n"], ["\n position: relative;\n border-right: 1px solid ", ";\n ", ";\n ", "\n"])), themes_1.colors.greyColor10, (0, transitions_1.transition)("background-color"), function (_a) {
41
41
  var readOnly = _a.readOnly, theme = _a.theme;
42
42
  return !readOnly && (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n :hover{\n background-color: ", ";\n }\n :focus-within{\n outline: 1px solid ", ";\n background-color: ", ";\n } \n "], ["\n :hover{\n background-color: ", ";\n }\n :focus-within{\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);
43
43
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.67.7",
3
+ "version": "2.67.9",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",