albinasoft-ui-package 1.0.83 → 1.0.85

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,19 +15,24 @@ interface CustomDatatableProps<T> {
15
15
  labelButton1?: string;
16
16
  onClickButton1?: (event: React.FormEvent) => void;
17
17
  typeButton1?: string;
18
+ disabledButton1?: boolean;
18
19
  labelButton2?: string;
19
20
  onClickButton2?: (event: React.FormEvent) => void;
20
21
  typeButton2?: string;
22
+ disabledButton2?: boolean;
21
23
  labelButton3?: string;
22
24
  onClickButton3?: (event: React.FormEvent) => void;
23
25
  typeButton3?: string;
26
+ disabledButton3?: boolean;
24
27
  labelButton4?: string;
25
28
  onClickButton4?: (event: React.FormEvent) => void;
26
29
  typeButton4?: string;
30
+ disabledButton4?: boolean;
27
31
  labelButton5?: string;
28
32
  onClickButton5?: (event: React.FormEvent) => void;
29
33
  typeButton5?: string;
34
+ disabledButton5?: boolean;
30
35
  }
31
- declare function CustomDatatable<T extends {}>({ rowData, columnDefs, filter, floatingFilter, minWidth, pagination, paginationPageSize, localeText, filterAll, tableTitle, tableHeight, labelButton1, onClickButton1, typeButton1, labelButton2, onClickButton2, typeButton2, labelButton3, onClickButton3, typeButton3, labelButton4, onClickButton4, typeButton4, labelButton5, onClickButton5, typeButton5, }: CustomDatatableProps<T>): React.JSX.Element;
36
+ declare function CustomDatatable<T extends {}>({ rowData, columnDefs, filter, floatingFilter, minWidth, pagination, paginationPageSize, localeText, filterAll, tableTitle, tableHeight, 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;
32
37
  export { CustomDatatable, ColDef };
33
38
  export default CustomDatatable;
@@ -36,8 +36,8 @@ var CustomText_1 = __importStar(require("./CustomText"));
36
36
  var CustomButton_1 = __importDefault(require("./CustomButton"));
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.filter, filter = _b === void 0 ? true : _b, _c = _a.floatingFilter, floatingFilter = _c === void 0 ? true : _c, _d = _a.minWidth, minWidth = _d === void 0 ? 100 : _d, _e = _a.pagination, pagination = _e === void 0 ? true : _e, _f = _a.paginationPageSize, paginationPageSize = _f === void 0 ? 10 : _f, _g = _a.localeText, localeText = _g === void 0 ? locale_1.AG_GRID_LOCALE_TR : _g, _h = _a.filterAll, filterAll = _h === void 0 ? true : _h, _j = _a.tableTitle, tableTitle = _j === void 0 ? "" : _j, _k = _a.tableHeight, tableHeight = _k === void 0 ? 500 : _k, _l = _a.labelButton1, labelButton1 = _l === void 0 ? "" : _l, onClickButton1 = _a.onClickButton1, _m = _a.typeButton1, typeButton1 = _m === void 0 ? "primary" : _m, _o = _a.labelButton2, labelButton2 = _o === void 0 ? "" : _o, onClickButton2 = _a.onClickButton2, _p = _a.typeButton2, typeButton2 = _p === void 0 ? "primary" : _p, _q = _a.labelButton3, labelButton3 = _q === void 0 ? "" : _q, onClickButton3 = _a.onClickButton3, _r = _a.typeButton3, typeButton3 = _r === void 0 ? "primary" : _r, _s = _a.labelButton4, labelButton4 = _s === void 0 ? "" : _s, onClickButton4 = _a.onClickButton4, _t = _a.typeButton4, typeButton4 = _t === void 0 ? "primary" : _t, _u = _a.labelButton5, labelButton5 = _u === void 0 ? "" : _u, onClickButton5 = _a.onClickButton5, _v = _a.typeButton5, typeButton5 = _v === void 0 ? "primary" : _v;
40
- var _w = (0, react_1.useState)(""), quickFilterText = _w[0], setQuickFilterText = _w[1];
39
+ var rowData = _a.rowData, columnDefs = _a.columnDefs, _b = _a.filter, filter = _b === void 0 ? true : _b, _c = _a.floatingFilter, floatingFilter = _c === void 0 ? true : _c, _d = _a.minWidth, minWidth = _d === void 0 ? 100 : _d, _e = _a.pagination, pagination = _e === void 0 ? true : _e, _f = _a.paginationPageSize, paginationPageSize = _f === void 0 ? 10 : _f, _g = _a.localeText, localeText = _g === void 0 ? locale_1.AG_GRID_LOCALE_TR : _g, _h = _a.filterAll, filterAll = _h === void 0 ? true : _h, _j = _a.tableTitle, tableTitle = _j === void 0 ? "" : _j, tableHeight = _a.tableHeight, _k = _a.labelButton1, labelButton1 = _k === void 0 ? "" : _k, onClickButton1 = _a.onClickButton1, _l = _a.typeButton1, typeButton1 = _l === void 0 ? "primary" : _l, _m = _a.disabledButton1, disabledButton1 = _m === void 0 ? false : _m, _o = _a.labelButton2, labelButton2 = _o === void 0 ? "" : _o, onClickButton2 = _a.onClickButton2, _p = _a.typeButton2, typeButton2 = _p === void 0 ? "primary" : _p, _q = _a.disabledButton2, disabledButton2 = _q === void 0 ? false : _q, _r = _a.labelButton3, labelButton3 = _r === void 0 ? "" : _r, onClickButton3 = _a.onClickButton3, _s = _a.typeButton3, typeButton3 = _s === void 0 ? "primary" : _s, _t = _a.disabledButton3, disabledButton3 = _t === void 0 ? false : _t, _u = _a.labelButton4, labelButton4 = _u === void 0 ? "" : _u, onClickButton4 = _a.onClickButton4, _v = _a.typeButton4, typeButton4 = _v === void 0 ? "primary" : _v, _w = _a.disabledButton4, disabledButton4 = _w === void 0 ? false : _w, _x = _a.labelButton5, labelButton5 = _x === void 0 ? "" : _x, onClickButton5 = _a.onClickButton5, _y = _a.typeButton5, typeButton5 = _y === void 0 ? "primary" : _y, _z = _a.disabledButton5, disabledButton5 = _z === void 0 ? false : _z;
40
+ var _0 = (0, react_1.useState)(""), quickFilterText = _0[0], setQuickFilterText = _0[1];
41
41
  var myTheme = ag_grid_community_1.themeQuartz.withParams({
42
42
  accentColor: "var(--bs-grid-accentColor)",
43
43
  backgroundColor: "var(--bs-grid-backgroundColor)",
@@ -50,11 +50,11 @@ function CustomDatatable(_a) {
50
50
  react_1.default.createElement("div", { className: "d-flex justify-content-between align-items-center" },
51
51
  react_1.default.createElement("div", { className: "text-start" }, tableTitle && (react_1.default.createElement(CustomText_1.default, { value: tableTitle, textType: CustomText_1.TextType.HEADING, textAlign: CustomText_1.TextAlign.START, lineHeight: CustomText_1.LineHeight.XXS }))),
52
52
  react_1.default.createElement("div", { className: "text-end" },
53
- labelButton5 && onClickButton5 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton5, onClick: onClickButton5 !== null && onClickButton5 !== void 0 ? onClickButton5 : (function () { }), className: "btn btn-".concat(typeButton5, " me-1") })),
54
- labelButton4 && onClickButton4 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton4, onClick: onClickButton4 !== null && onClickButton4 !== void 0 ? onClickButton4 : (function () { }), className: "btn btn-".concat(typeButton4, " me-1") })),
55
- labelButton3 && onClickButton3 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton3, onClick: onClickButton3 !== null && onClickButton3 !== void 0 ? onClickButton3 : (function () { }), className: "btn btn-".concat(typeButton3, " me-1") })),
56
- labelButton2 && onClickButton2 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton2, onClick: onClickButton2 !== null && onClickButton2 !== void 0 ? onClickButton2 : (function () { }), className: "btn btn-".concat(typeButton2, " me-1") })),
57
- labelButton1 && onClickButton1 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton1, onClick: onClickButton1 !== null && onClickButton1 !== void 0 ? onClickButton1 : (function () { }), className: "btn btn-".concat(typeButton1, " me-1") })))),
53
+ labelButton5 && onClickButton5 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton5, onClick: onClickButton5 !== null && onClickButton5 !== void 0 ? onClickButton5 : (function () { }), className: "btn btn-".concat(typeButton5, " me-1"), disabled: disabledButton5 })),
54
+ labelButton4 && onClickButton4 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton4, onClick: onClickButton4 !== null && onClickButton4 !== void 0 ? onClickButton4 : (function () { }), className: "btn btn-".concat(typeButton4, " me-1"), disabled: disabledButton4 })),
55
+ labelButton3 && onClickButton3 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton3, onClick: onClickButton3 !== null && onClickButton3 !== void 0 ? onClickButton3 : (function () { }), className: "btn btn-".concat(typeButton3, " me-1"), disabled: disabledButton3 })),
56
+ labelButton2 && onClickButton2 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton2, onClick: onClickButton2 !== null && onClickButton2 !== void 0 ? onClickButton2 : (function () { }), className: "btn btn-".concat(typeButton2, " me-1"), disabled: disabledButton2 })),
57
+ labelButton1 && onClickButton1 && (react_1.default.createElement(CustomButton_1.default, { label: labelButton1, onClick: onClickButton1 !== null && onClickButton1 !== void 0 ? onClickButton1 : (function () { }), className: "btn btn-".concat(typeButton1, " me-1"), disabled: disabledButton1 })))),
58
58
  filterAll && (react_1.default.createElement(CustomInput_1.default, { value: quickFilterText, onChange: function (e) { return setQuickFilterText(e.target.value); }, placeholder: "B\u00FCt\u00FCn tabloda ara...", style: {
59
59
  marginTop: "-15px",
60
60
  width: "100%",
@@ -63,8 +63,8 @@ function CustomDatatable(_a) {
63
63
  background: "var(--bs-grid-searchBoxBackgroundColor)",
64
64
  borderRadius: "10px",
65
65
  } }))),
66
- react_1.default.createElement("div", { style: { width: "100%", height: "".concat(tableHeight, "px") } },
67
- react_1.default.createElement(ag_grid_react_1.AgGridReact, { theme: myTheme, rowData: rowData, columnDefs: columnDefs, localeText: localeText, defaultColDef: {
66
+ react_1.default.createElement("div", { style: { width: "100%", height: tableHeight ? "".concat(tableHeight, "px") : "auto" } },
67
+ react_1.default.createElement(ag_grid_react_1.AgGridReact, { domLayout: tableHeight ? undefined : "autoHeight", theme: myTheme, rowData: rowData, columnDefs: columnDefs, localeText: localeText, defaultColDef: {
68
68
  flex: 1,
69
69
  minWidth: minWidth,
70
70
  resizable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "albinasoft-ui-package",
3
- "version": "1.0.83",
3
+ "version": "1.0.85",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {