namirasoft-site-react 1.3.357 → 1.3.359
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.
- package/dist/components/NSTable.d.ts +1 -1
- package/dist/components/NSTable.js +4 -4
- package/dist/main.d.ts +9 -0
- package/dist/main.js +9 -0
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NSTable.tsx +5 -5
- package/src/main.ts +9 -0
|
@@ -30,7 +30,7 @@ export interface INSTableProps<RowType> extends IBaseComponentProps {
|
|
|
30
30
|
getColumnAttributes?: (column: TableColumnInfo) => {
|
|
31
31
|
[key: string]: string;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
getCellFormattedValue?: (value: any, column: TableColumnInfo, row: TableRowInfo<RowType>) => any;
|
|
34
34
|
onColumnClick?: (e: React.MouseEvent<HTMLTableDataCellElement, MouseEvent>, column: TableColumnInfo) => void;
|
|
35
35
|
onRowClick?: (e: React.MouseEvent<HTMLTableRowElement, MouseEvent>, row: TableRowInfo<RowType>) => void;
|
|
36
36
|
onCellClick?: (e: React.MouseEvent<HTMLTableDataCellElement, MouseEvent>, cell: TableCellInfo<RowType>) => boolean | undefined;
|
|
@@ -141,7 +141,7 @@ export class NSTable extends Component {
|
|
|
141
141
|
var _a;
|
|
142
142
|
let getCellTableInfo = (column, row) => {
|
|
143
143
|
let value = row[column.name];
|
|
144
|
-
let formatted =
|
|
144
|
+
let formatted = getCellFormattedValue(value, column, row);
|
|
145
145
|
return { column, row, value, formatted };
|
|
146
146
|
};
|
|
147
147
|
let getColumnAttributes = (column) => {
|
|
@@ -149,9 +149,9 @@ export class NSTable extends Component {
|
|
|
149
149
|
return this.props.getColumnAttributes(column);
|
|
150
150
|
return {};
|
|
151
151
|
};
|
|
152
|
-
let
|
|
153
|
-
if (this.props.
|
|
154
|
-
return this.props.
|
|
152
|
+
let getCellFormattedValue = (value, column, row) => {
|
|
153
|
+
if (this.props.getCellFormattedValue)
|
|
154
|
+
return this.props.getCellFormattedValue(value, column, row);
|
|
155
155
|
return column.formatter.format(value, column, row);
|
|
156
156
|
};
|
|
157
157
|
let onColumnClick = (e, column) => {
|
package/dist/main.d.ts
CHANGED
|
@@ -63,6 +63,15 @@ export * from "./components/NSTag";
|
|
|
63
63
|
export * from "./components/NSTabPage";
|
|
64
64
|
export * from "./components/NSTitle";
|
|
65
65
|
export * from "./components/NSVerification";
|
|
66
|
+
export * from "./formatter/AnyFormatter";
|
|
67
|
+
export * from "./formatter/BaseColumnFormatter";
|
|
68
|
+
export * from "./formatter/BooleanFormatter";
|
|
69
|
+
export * from "./formatter/DateFormatter";
|
|
70
|
+
export * from "./formatter/DateTimeFormatter";
|
|
71
|
+
export * from "./formatter/IDFormatter";
|
|
72
|
+
export * from "./formatter/PresentFormatter";
|
|
73
|
+
export * from "./formatter/StringFormatter";
|
|
74
|
+
export * from "./formatter/TimeFormatter";
|
|
66
75
|
export * from "./pages/NSNotFoundPage";
|
|
67
76
|
export * from "./props/IBaseComponentProps";
|
|
68
77
|
export * from "./props/IHeaderIconProps";
|
package/dist/main.js
CHANGED
|
@@ -63,6 +63,15 @@ export * from "./components/NSTag";
|
|
|
63
63
|
export * from "./components/NSTabPage";
|
|
64
64
|
export * from "./components/NSTitle";
|
|
65
65
|
export * from "./components/NSVerification";
|
|
66
|
+
export * from "./formatter/AnyFormatter";
|
|
67
|
+
export * from "./formatter/BaseColumnFormatter";
|
|
68
|
+
export * from "./formatter/BooleanFormatter";
|
|
69
|
+
export * from "./formatter/DateFormatter";
|
|
70
|
+
export * from "./formatter/DateTimeFormatter";
|
|
71
|
+
export * from "./formatter/IDFormatter";
|
|
72
|
+
export * from "./formatter/PresentFormatter";
|
|
73
|
+
export * from "./formatter/StringFormatter";
|
|
74
|
+
export * from "./formatter/TimeFormatter";
|
|
66
75
|
export * from "./pages/NSNotFoundPage";
|
|
67
76
|
export * from "./props/IBaseComponentProps";
|
|
68
77
|
export * from "./props/IHeaderIconProps";
|
package/d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C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@ export interface INSTableProps<RowType> extends IBaseComponentProps
|
|
|
43
43
|
getRows: (page: number, size: number) => Promise<{ rows: RowType[], count: number }>;
|
|
44
44
|
getRowKey: (row: TableRowInfo<RowType>) => string;
|
|
45
45
|
getColumnAttributes?: (column: TableColumnInfo) => { [key: string]: string };
|
|
46
|
-
|
|
46
|
+
getCellFormattedValue?: (value: any, column: TableColumnInfo, row: TableRowInfo<RowType>) => any;
|
|
47
47
|
onColumnClick?: (e: React.MouseEvent<HTMLTableDataCellElement, MouseEvent>, column: TableColumnInfo) => void;
|
|
48
48
|
onRowClick?: (e: React.MouseEvent<HTMLTableRowElement, MouseEvent>, row: TableRowInfo<RowType>) => void;
|
|
49
49
|
onCellClick?: (e: React.MouseEvent<HTMLTableDataCellElement, MouseEvent>, cell: TableCellInfo<RowType>) => boolean | undefined;
|
|
@@ -217,7 +217,7 @@ export class NSTable<RowType> extends Component<INSTableProps<RowType>, NSTableS
|
|
|
217
217
|
let getCellTableInfo = (column: TableColumnInfo, row: TableRowInfo<RowType>) =>
|
|
218
218
|
{
|
|
219
219
|
let value = (row as any)[column.name];
|
|
220
|
-
let formatted =
|
|
220
|
+
let formatted = getCellFormattedValue(value, column, row);
|
|
221
221
|
return { column, row, value, formatted };
|
|
222
222
|
}
|
|
223
223
|
let getColumnAttributes = (column: TableColumnInfo) =>
|
|
@@ -226,10 +226,10 @@ export class NSTable<RowType> extends Component<INSTableProps<RowType>, NSTableS
|
|
|
226
226
|
return this.props.getColumnAttributes(column);
|
|
227
227
|
return {};
|
|
228
228
|
}
|
|
229
|
-
let
|
|
229
|
+
let getCellFormattedValue = (value: any, column: TableColumnInfo, row: TableRowInfo<RowType>) =>
|
|
230
230
|
{
|
|
231
|
-
if (this.props.
|
|
232
|
-
return this.props.
|
|
231
|
+
if (this.props.getCellFormattedValue)
|
|
232
|
+
return this.props.getCellFormattedValue(value, column, row);
|
|
233
233
|
return column.formatter.format(value, column, row);
|
|
234
234
|
}
|
|
235
235
|
let onColumnClick = (e: React.MouseEvent<HTMLTableDataCellElement, MouseEvent>, column: TableColumnInfo) =>
|
package/src/main.ts
CHANGED
|
@@ -63,6 +63,15 @@ export * from "./components/NSTag";
|
|
|
63
63
|
export * from "./components/NSTabPage";
|
|
64
64
|
export * from "./components/NSTitle";
|
|
65
65
|
export * from "./components/NSVerification";
|
|
66
|
+
export * from "./formatter/AnyFormatter";
|
|
67
|
+
export * from "./formatter/BaseColumnFormatter";
|
|
68
|
+
export * from "./formatter/BooleanFormatter";
|
|
69
|
+
export * from "./formatter/DateFormatter";
|
|
70
|
+
export * from "./formatter/DateTimeFormatter";
|
|
71
|
+
export * from "./formatter/IDFormatter";
|
|
72
|
+
export * from "./formatter/PresentFormatter";
|
|
73
|
+
export * from "./formatter/StringFormatter";
|
|
74
|
+
export * from "./formatter/TimeFormatter";
|
|
66
75
|
export * from "./pages/NSNotFoundPage";
|
|
67
76
|
export * from "./props/IBaseComponentProps";
|
|
68
77
|
export * from "./props/IHeaderIconProps";
|