awing-library 2.1.2-dev.70 → 2.1.2-dev.72
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.
|
@@ -24,7 +24,7 @@ export interface ColumnDefinition<T extends object> {
|
|
|
24
24
|
}
|
|
25
25
|
export type TableEditableProps<T> = {
|
|
26
26
|
columnDefinitions: Array<ColumnDefinition<Partial<T>>>;
|
|
27
|
-
fieldDefinitions
|
|
27
|
+
fieldDefinitions?: Array<ColumnDefinition<Partial<T>>>;
|
|
28
28
|
items: Array<Partial<T>>;
|
|
29
29
|
onChange(newData: Array<Partial<T>>, dataValid: boolean, fieldName?: keyof T): void;
|
|
30
30
|
getRowId?(obj: Partial<T>): number;
|
package/dist/esm/index.js
CHANGED
|
@@ -177747,7 +177747,10 @@ function TableRowEditable(props) {
|
|
|
177747
177747
|
border: '1px solid rgb(224, 224, 224)'
|
|
177748
177748
|
}
|
|
177749
177749
|
}, colDef.TableCellProps, {
|
|
177750
|
-
rowSpan: numOfRowSpan
|
|
177750
|
+
rowSpan: numOfRowSpan
|
|
177751
|
+
}, idx === 0 ? {
|
|
177752
|
+
width: '15%'
|
|
177753
|
+
} : {}, {
|
|
177751
177754
|
children: [idx === 0 &&
|
|
177752
177755
|
// Hiển thị icon mở rộng, ở cột đầu tiên
|
|
177753
177756
|
jsxRuntimeExports.jsx(IconButton$1, {
|
|
@@ -177814,7 +177817,8 @@ function TableRowEditable(props) {
|
|
|
177814
177817
|
style: {
|
|
177815
177818
|
paddingBottom: 0,
|
|
177816
177819
|
paddingTop: 0
|
|
177817
|
-
}
|
|
177820
|
+
},
|
|
177821
|
+
width: '15%'
|
|
177818
177822
|
}), jsxRuntimeExports.jsx(TableCell, {
|
|
177819
177823
|
style: {
|
|
177820
177824
|
paddingBottom: 0,
|
|
@@ -177839,7 +177843,6 @@ function TableRowEditable(props) {
|
|
|
177839
177843
|
const fieldName = (_a = colDef.fieldName) !== null && _a !== void 0 ? _a : '';
|
|
177840
177844
|
const isMergeColumn = fieldName === mergeRowsBy;
|
|
177841
177845
|
const isDisplay = isMergeColumn ? itemIndex === 0 || convertItems[itemIndex - 1][fieldName] !== row[fieldName] : true;
|
|
177842
|
-
isMergeColumn ? convertItems.filter(c => c[fieldName] === row[fieldName]).length : 1;
|
|
177843
177846
|
return isDisplay && jsxRuntimeExports.jsx(Box$1, {
|
|
177844
177847
|
sx: {
|
|
177845
177848
|
flex: '0 1 calc(33.333% - 16px)',
|
|
@@ -177905,28 +177908,6 @@ function TableRowEditable(props) {
|
|
|
177905
177908
|
});
|
|
177906
177909
|
}
|
|
177907
177910
|
|
|
177908
|
-
styled(_a => {
|
|
177909
|
-
var {
|
|
177910
|
-
className
|
|
177911
|
-
} = _a,
|
|
177912
|
-
props = __rest$1(_a, ["className"]);
|
|
177913
|
-
return jsxRuntimeExports.jsx(Tooltip$2, Object.assign({}, props, {
|
|
177914
|
-
arrow: true,
|
|
177915
|
-
classes: {
|
|
177916
|
-
popper: className
|
|
177917
|
-
}
|
|
177918
|
-
}));
|
|
177919
|
-
})(() => ({
|
|
177920
|
-
["& .".concat(tooltipClasses$1.arrow)]: {
|
|
177921
|
-
color: '#bbbbbb',
|
|
177922
|
-
maxWidth: 450
|
|
177923
|
-
},
|
|
177924
|
-
["& .".concat(tooltipClasses$1.tooltip)]: {
|
|
177925
|
-
backgroundColor: '#f5f5f5',
|
|
177926
|
-
maxWidth: 900,
|
|
177927
|
-
boxShadow: '0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%)'
|
|
177928
|
-
}
|
|
177929
|
-
}));
|
|
177930
177911
|
function TableEditableBody(props) {
|
|
177931
177912
|
const {
|
|
177932
177913
|
items,
|
|
@@ -178129,7 +178110,7 @@ function TableEditable(props) {
|
|
|
178129
178110
|
var _a;
|
|
178130
178111
|
return ((_a = x.editFieldDefinition) === null || _a === void 0 ? void 0 : _a.fieldName) === fieldName;
|
|
178131
178112
|
})) === null || _a === void 0 ? void 0 : _a.editFieldDefinition;
|
|
178132
|
-
let collapField = (_b = fieldDefinitions.find(x => {
|
|
178113
|
+
let collapField = (_b = fieldDefinitions === null || fieldDefinitions === void 0 ? void 0 : fieldDefinitions.find(x => {
|
|
178133
178114
|
var _a;
|
|
178134
178115
|
return ((_a = x.editFieldDefinition) === null || _a === void 0 ? void 0 : _a.fieldName) === fieldName;
|
|
178135
178116
|
})) === null || _b === void 0 ? void 0 : _b.editFieldDefinition;
|
|
@@ -178308,7 +178289,7 @@ function TableEditable(props) {
|
|
|
178308
178289
|
children: [jsxRuntimeExports.jsxs(TableContainer, {
|
|
178309
178290
|
component: Paper$1,
|
|
178310
178291
|
sx: {
|
|
178311
|
-
overflow: 'hidden'
|
|
178292
|
+
// overflow: 'hidden',
|
|
178312
178293
|
},
|
|
178313
178294
|
children: [selected && onSelectedChange && selected.length > 0 && selectionActions && jsxRuntimeExports.jsx(TopBarActions, {
|
|
178314
178295
|
selected: selected,
|
package/dist/index.d.ts
CHANGED
|
@@ -1826,7 +1826,7 @@ interface ColumnDefinition<T extends object> {
|
|
|
1826
1826
|
}
|
|
1827
1827
|
type TableEditableProps<T> = {
|
|
1828
1828
|
columnDefinitions: Array<ColumnDefinition<Partial<T>>>;
|
|
1829
|
-
fieldDefinitions
|
|
1829
|
+
fieldDefinitions?: Array<ColumnDefinition<Partial<T>>>;
|
|
1830
1830
|
items: Array<Partial<T>>;
|
|
1831
1831
|
onChange(newData: Array<Partial<T>>, dataValid: boolean, fieldName?: keyof T): void;
|
|
1832
1832
|
getRowId?(obj: Partial<T>): number;
|