albinasoft-ui-package 1.1.29 → 1.1.30
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.
@@ -15,6 +15,7 @@ export interface CustomDatatableProps<T> {
|
|
15
15
|
filter?: boolean;
|
16
16
|
floatingFilter?: boolean;
|
17
17
|
minWidth?: number;
|
18
|
+
tooltipHideDelay?: number;
|
18
19
|
labelButton1?: string;
|
19
20
|
onClickButton1?: (e: React.FormEvent) => void;
|
20
21
|
typeButton1?: string;
|
@@ -36,6 +37,6 @@ export interface CustomDatatableProps<T> {
|
|
36
37
|
typeButton5?: string;
|
37
38
|
disabledButton5?: boolean;
|
38
39
|
}
|
39
|
-
declare function CustomDatatable<T extends {}>({ rowData, columnDefs, loading, pagination, paginationPageSize, paginationPageSizeSelector, filterAll, tableTitle, tableHeight, localeText, filter, floatingFilter, minWidth, labelButton1, onClickButton1, typeButton1, disabledButton1, labelButton2, onClickButton2, typeButton2, disabledButton2, labelButton3, onClickButton3, typeButton3, disabledButton3, labelButton4, onClickButton4, typeButton4, disabledButton4, labelButton5, onClickButton5, typeButton5, disabledButton5, }: CustomDatatableProps<T>): React.JSX.Element;
|
40
|
+
declare function CustomDatatable<T extends {}>({ rowData, columnDefs, loading, pagination, paginationPageSize, paginationPageSizeSelector, tooltipHideDelay, filterAll, tableTitle, tableHeight, localeText, filter, floatingFilter, minWidth, labelButton1, onClickButton1, typeButton1, disabledButton1, labelButton2, onClickButton2, typeButton2, disabledButton2, labelButton3, onClickButton3, typeButton3, disabledButton3, labelButton4, onClickButton4, typeButton4, disabledButton4, labelButton5, onClickButton5, typeButton5, disabledButton5, }: CustomDatatableProps<T>): React.JSX.Element;
|
40
41
|
export type { ColDef };
|
41
42
|
export default CustomDatatable;
|
@@ -36,8 +36,8 @@ var CustomButton_1 = __importDefault(require("./CustomButton"));
|
|
36
36
|
var CustomInput_1 = __importDefault(require("./CustomInput"));
|
37
37
|
ag_grid_community_1.ModuleRegistry.registerModules([ag_grid_community_1.AllCommunityModule]);
|
38
38
|
function CustomDatatable(_a) {
|
39
|
-
var rowData = _a.rowData, columnDefs = _a.columnDefs, _b = _a.loading, loading = _b === void 0 ? false : _b, _c = _a.pagination, pagination = _c === void 0 ? true : _c, _d = _a.paginationPageSize, paginationPageSize = _d === void 0 ? 10 : _d, _e = _a.paginationPageSizeSelector, paginationPageSizeSelector = _e === void 0 ? [10, 20, 50, 100] : _e, _f = _a.
|
40
|
-
var
|
39
|
+
var rowData = _a.rowData, columnDefs = _a.columnDefs, _b = _a.loading, loading = _b === void 0 ? false : _b, _c = _a.pagination, pagination = _c === void 0 ? true : _c, _d = _a.paginationPageSize, paginationPageSize = _d === void 0 ? 10 : _d, _e = _a.paginationPageSizeSelector, paginationPageSizeSelector = _e === void 0 ? [10, 20, 50, 100] : _e, _f = _a.tooltipHideDelay, tooltipHideDelay = _f === void 0 ? 2000 : _f, _g = _a.filterAll, filterAll = _g === void 0 ? true : _g, _h = _a.tableTitle, tableTitle = _h === void 0 ? "" : _h, tableHeight = _a.tableHeight, _j = _a.localeText, localeText = _j === void 0 ? locale_1.AG_GRID_LOCALE_TR : _j, _k = _a.filter, filter = _k === void 0 ? true : _k, _l = _a.floatingFilter, floatingFilter = _l === void 0 ? true : _l, _m = _a.minWidth, minWidth = _m === void 0 ? 100 : _m, _o = _a.labelButton1, labelButton1 = _o === void 0 ? "" : _o, onClickButton1 = _a.onClickButton1, _p = _a.typeButton1, typeButton1 = _p === void 0 ? "primary" : _p, _q = _a.disabledButton1, disabledButton1 = _q === void 0 ? false : _q, _r = _a.labelButton2, labelButton2 = _r === void 0 ? "" : _r, onClickButton2 = _a.onClickButton2, _s = _a.typeButton2, typeButton2 = _s === void 0 ? "primary" : _s, _t = _a.disabledButton2, disabledButton2 = _t === void 0 ? false : _t, _u = _a.labelButton3, labelButton3 = _u === void 0 ? "" : _u, onClickButton3 = _a.onClickButton3, _v = _a.typeButton3, typeButton3 = _v === void 0 ? "primary" : _v, _w = _a.disabledButton3, disabledButton3 = _w === void 0 ? false : _w, _x = _a.labelButton4, labelButton4 = _x === void 0 ? "" : _x, onClickButton4 = _a.onClickButton4, _y = _a.typeButton4, typeButton4 = _y === void 0 ? "primary" : _y, _z = _a.disabledButton4, disabledButton4 = _z === void 0 ? false : _z, _0 = _a.labelButton5, labelButton5 = _0 === void 0 ? "" : _0, onClickButton5 = _a.onClickButton5, _1 = _a.typeButton5, typeButton5 = _1 === void 0 ? "primary" : _1, _2 = _a.disabledButton5, disabledButton5 = _2 === void 0 ? false : _2;
|
40
|
+
var _3 = (0, react_1.useState)(""), quickFilterText = _3[0], setQuickFilterText = _3[1];
|
41
41
|
// Tema ayarları
|
42
42
|
var theme = ag_grid_community_1.themeQuartz.withParams({
|
43
43
|
accentColor: "var(--bs-grid-accentColor)",
|
@@ -64,7 +64,10 @@ function CustomDatatable(_a) {
|
|
64
64
|
background: "var(--bs-grid-searchBoxBackgroundColor)",
|
65
65
|
borderRadius: 10,
|
66
66
|
} }))),
|
67
|
-
react_1.default.createElement("div", { style: {
|
67
|
+
react_1.default.createElement("div", { style: {
|
68
|
+
width: "100%",
|
69
|
+
height: tableHeight ? "".concat(tableHeight, "px") : "auto",
|
70
|
+
} },
|
68
71
|
react_1.default.createElement(ag_grid_react_1.AgGridReact, { loading: loading, domLayout: tableHeight ? undefined : "autoHeight", theme: theme, rowData: rowData, columnDefs: columnDefs, localeText: localeText, quickFilterText: quickFilterText.toLowerCase(), defaultColDef: {
|
69
72
|
flex: 1,
|
70
73
|
minWidth: minWidth,
|
@@ -72,7 +75,9 @@ function CustomDatatable(_a) {
|
|
72
75
|
filter: filter,
|
73
76
|
floatingFilter: floatingFilter,
|
74
77
|
getQuickFilterText: function (params) {
|
75
|
-
return params.value
|
78
|
+
return params.value
|
79
|
+
? params.value.toString().toLocaleLowerCase("tr-TR")
|
80
|
+
: "";
|
76
81
|
},
|
77
82
|
filterParams: {
|
78
83
|
textFormatter: function (value) {
|
@@ -82,6 +87,6 @@ function CustomDatatable(_a) {
|
|
82
87
|
defaultOption: "contains",
|
83
88
|
suppressAndOrCondition: true,
|
84
89
|
},
|
85
|
-
}, suppressServerSideFullWidthLoadingRow: true, overlayLoadingTemplate: "\n <div class=\"spinner-border spinner-border-lg\" role=\"status\">\n </div>", overlayNoRowsTemplate: '<span class="ag-overlay-no-rows-center">G\u00F6sterilecek Sat\u0131r Yok</span>', pagination: pagination, paginationPageSize: paginationPageSize, paginationPageSizeSelector: paginationPageSizeSelector }))));
|
90
|
+
}, suppressServerSideFullWidthLoadingRow: true, overlayLoadingTemplate: "\n <div class=\"spinner-border spinner-border-lg\" role=\"status\">\n </div>", overlayNoRowsTemplate: '<span class="ag-overlay-no-rows-center">G\u00F6sterilecek Sat\u0131r Yok</span>', pagination: pagination, paginationPageSize: paginationPageSize, paginationPageSizeSelector: paginationPageSizeSelector, tooltipShowDelay: 0, tooltipHideDelay: tooltipHideDelay }))));
|
86
91
|
}
|
87
92
|
exports.default = CustomDatatable;
|