oolib 2.132.0 → 2.132.1
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.
|
@@ -66,6 +66,7 @@ var useResizeTableColumns_1 = require("./useResizeTableColumns");
|
|
|
66
66
|
var convertColHeaderConfigToRowData_1 = require("./utils/convertColHeaderConfigToRowData");
|
|
67
67
|
var convertRowHeaderConfigToCellData_1 = require("./utils/convertRowHeaderConfigToCellData");
|
|
68
68
|
var prepInitValueFromConfigIfNoValue_1 = require("./utils/prepInitValueFromConfigIfNoValue");
|
|
69
|
+
var DropdownSingle_1 = require("../Dropdowns/DropdownSingle");
|
|
69
70
|
var greyColor100 = themes_1.colors.greyColor100;
|
|
70
71
|
/*pending:
|
|
71
72
|
- first test whatever is done on okf
|
|
@@ -126,6 +127,7 @@ function SimpleTable(_a) {
|
|
|
126
127
|
}, [colResizeState]);
|
|
127
128
|
var CellContentBlocks = {
|
|
128
129
|
RichTextEditor: RichTextEditor,
|
|
130
|
+
DropdownSingle: DropdownSingle_1.DropdownSingle
|
|
129
131
|
// KPDropdown,
|
|
130
132
|
// TextInput,
|
|
131
133
|
// RadioList,
|
|
@@ -178,11 +180,11 @@ function SimpleTable(_a) {
|
|
|
178
180
|
var cell = _a.cell, cellIdx = _a.cellIdx, rowIdx = _a.rowIdx, _b = _a.enableColResizeActions // cuz in the case of pre fixed column (via config.rowHeaderData), enableResize will be set to false
|
|
179
181
|
, enableColResizeActions = _b === void 0 ? true : _b // cuz in the case of pre fixed column (via config.rowHeaderData), enableResize will be set to false
|
|
180
182
|
;
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
var cellProps =
|
|
185
|
-
var cellValue = CellValueGetters[
|
|
183
|
+
var cellCompName = cell.comp || 'RichTextEditor';
|
|
184
|
+
var NoCompPlaceholder = function () { return react_1.default.createElement("div", null, "No comp exists"); };
|
|
185
|
+
var CellComp = CellContentBlocks[cellCompName] || NoCompPlaceholder;
|
|
186
|
+
var cellProps = CellContentBlockDefaultProps[cellCompName] ? __assign(__assign({}, CellContentBlockDefaultProps[cell.comp]), (cell.props || {})) : {};
|
|
187
|
+
var cellValue = CellValueGetters[cellCompName] ? CellValueGetters[cellCompName](cell.value) : cell.value;
|
|
186
188
|
var cellWidth = value.colWidthConfig["col_".concat(cellIdx)] || defaultColWidth + 'px'; //cuz when pre-fixed column is applied via config.rowHeaderData, no colWidthConfig will be there for it in value.colWidthConfig
|
|
187
189
|
//(100% - totalExplicitWidths)/(totalColumns - noOfColsWithExplicitWidths)
|
|
188
190
|
// let cellProps = {
|