arengibook 2.0.7-table → 2.0.8-table

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -47687,9 +47687,12 @@ var Table = function Table(_ref7) {
47687
47687
  var _ref8, _col$href;
47688
47688
  var label = rowData[col.field];
47689
47689
  var href = typeof col.href === 'function' ? col.href(rowData) : (_ref8 = (_col$href = col.href) !== null && _col$href !== void 0 ? _col$href : rowData[col.field + 'Url']) !== null && _ref8 !== void 0 ? _ref8 : '#';
47690
- return /*#__PURE__*/React__default.createElement("a", {
47691
- href: href
47692
- }, label);
47690
+ return /*#__PURE__*/React__default.createElement("div", {
47691
+ className: "arengi-table-grey-title-box"
47692
+ }, /*#__PURE__*/React__default.createElement("a", {
47693
+ href: href,
47694
+ className: "table-item-title"
47695
+ }, label));
47693
47696
  };
47694
47697
  }, []);
47695
47698
  var dateTemplate = useCallback(function (rowData, options) {
@@ -47947,7 +47950,8 @@ var Table = function Table(_ref7) {
47947
47950
  return undefined;
47948
47951
  }, []);
47949
47952
  var getEditorTemplate = useCallback(function (col) {
47950
- if (!editable || col.editable === false) return undefined;
47953
+ var colEditable = editable ? col.editable !== false : col.editable === true;
47954
+ if (!colEditable) return undefined;
47951
47955
  switch (col.type) {
47952
47956
  case 'date':
47953
47957
  return dateEditor;
@@ -48117,7 +48121,9 @@ var Table = function Table(_ref7) {
48117
48121
  selection: selection,
48118
48122
  onSelectionChange: onSelectionChange,
48119
48123
  globalFilter: globalFilter,
48120
- editMode: editable ? 'cell' : undefined,
48124
+ editMode: editable || columns.some(function (c) {
48125
+ return c.editable === true;
48126
+ }) ? 'cell' : undefined,
48121
48127
  dataKey: "id",
48122
48128
  tableClassName: 'arengi-table',
48123
48129
  resizableColumns: true,
@@ -48128,7 +48134,7 @@ var Table = function Table(_ref7) {
48128
48134
  scrollable: true,
48129
48135
  scrollHeight: "70vh"
48130
48136
  }, visibleColumns.map(function (col, index) {
48131
- var _col$field;
48137
+ var _col$field, _col$minWidth;
48132
48138
  return /*#__PURE__*/React__default.createElement(Column, {
48133
48139
  key: (_col$field = col.field) !== null && _col$field !== void 0 ? _col$field : index,
48134
48140
  sortable: true,
@@ -48137,8 +48143,11 @@ var Table = function Table(_ref7) {
48137
48143
  header: col.header,
48138
48144
  body: getBodyTemplate(col),
48139
48145
  editor: getEditorTemplate(col),
48140
- onCellEditComplete: editable && col.editable !== false ? onCellEditComplete : undefined,
48141
- className: col.field === 'nom' ? 'arengi-table-grey-title' : 'hide1time'
48146
+ onCellEditComplete: (editable ? col.editable !== false : col.editable === true) ? onCellEditComplete : undefined,
48147
+ className: col.field === 'nom' ? 'arengi-table-grey-title' : 'hide1time',
48148
+ style: {
48149
+ minWidth: (_col$minWidth = col.minWidth) !== null && _col$minWidth !== void 0 ? _col$minWidth : '200px'
48150
+ }
48142
48151
  });
48143
48152
  })));
48144
48153
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "2.0.7-table",
4
+ "version": "2.0.8-table",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {