oolib 2.201.1 → 2.201.2
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.
|
@@ -103,6 +103,7 @@ function SimpleTable(_a) {
|
|
|
103
103
|
blockConfig: [undefined, { comp: 'DropdownSingle', props: {} }, { comp: 'DropdownSingle', props: {} }]
|
|
104
104
|
} : _b, _value = _a.value, onChange = _a.onChange, _c = _a.defaultColWidth, defaultColWidth = _c === void 0 ? 200 : _c;
|
|
105
105
|
var props = arguments[0];
|
|
106
|
+
var localize = (0, utilsOolib_1.useLocale)();
|
|
106
107
|
var theme = (0, styled_components_1.useTheme)();
|
|
107
108
|
var _d = theme || {}, RichTextEditor = _d.RichTextEditor /*: _RichTextEditor*/, convertToRichText = _d.convertToRichText;
|
|
108
109
|
//memoizing cuz we dont want all cell rtes to render everytime one cell changes
|
|
@@ -271,7 +272,7 @@ function SimpleTable(_a) {
|
|
|
271
272
|
react_1.default.createElement(Typo2_1.UI_BODY_BOLD_SM, null, config.headerForRowHeadersColumn),
|
|
272
273
|
react_1.default.createElement(ArrowDown, { size: 14, weight: "bold" })))) : (genCell({
|
|
273
274
|
cell: (0, convertRowHeaderConfigToCellData_1.convertRowHeaderConfigToCellData)({
|
|
274
|
-
rowHeaderData: config.rowHeaderData,
|
|
275
|
+
rowHeaderData: config.rowHeaderData.map(function (d) { return localize(d); }),
|
|
275
276
|
convertToRichText: convertToRichText,
|
|
276
277
|
rowIdx: rowIdx
|
|
277
278
|
}),
|
|
@@ -343,7 +344,7 @@ function SimpleTable(_a) {
|
|
|
343
344
|
config.colHeaderData &&
|
|
344
345
|
genRow({
|
|
345
346
|
row: (0, convertColHeaderConfigToRowData_1.convertColHeaderConfigToRowData)({
|
|
346
|
-
colHeaderData: config.colHeaderData,
|
|
347
|
+
colHeaderData: config.colHeaderData.map(function (d) { return localize(d); }),
|
|
347
348
|
convertToRichText: convertToRichText,
|
|
348
349
|
}),
|
|
349
350
|
}),
|
|
@@ -84,6 +84,7 @@ exports.default = {
|
|
|
84
84
|
defaultColWidth: 200,
|
|
85
85
|
disableAddRow: false,
|
|
86
86
|
disableRowActionsMenu: false,
|
|
87
|
+
readOnly: false,
|
|
87
88
|
},
|
|
88
89
|
parameters: {
|
|
89
90
|
docs: {
|
|
@@ -113,7 +114,8 @@ var SimpleTable = function (args) {
|
|
|
113
114
|
},
|
|
114
115
|
defaultColWidth: args.defaultColWidth,
|
|
115
116
|
value: val,
|
|
116
|
-
onChange: function (k, v) { return setVal(v); }
|
|
117
|
+
onChange: function (k, v) { return setVal(v); },
|
|
118
|
+
readOnly: args.readOnly
|
|
117
119
|
};
|
|
118
120
|
// useEffect(() => {
|
|
119
121
|
// console.log({data: props})
|