albinasoft-ui-package 1.1.29 → 1.1.31

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.filterAll, filterAll = _f === void 0 ? true : _f, _g = _a.tableTitle, tableTitle = _g === void 0 ? "" : _g, tableHeight = _a.tableHeight, _h = _a.localeText, localeText = _h === void 0 ? locale_1.AG_GRID_LOCALE_TR : _h, _j = _a.filter, filter = _j === void 0 ? true : _j, _k = _a.floatingFilter, floatingFilter = _k === void 0 ? true : _k, _l = _a.minWidth, minWidth = _l === void 0 ? 100 : _l, _m = _a.labelButton1, labelButton1 = _m === void 0 ? "" : _m, onClickButton1 = _a.onClickButton1, _o = _a.typeButton1, typeButton1 = _o === void 0 ? "primary" : _o, _p = _a.disabledButton1, disabledButton1 = _p === void 0 ? false : _p, _q = _a.labelButton2, labelButton2 = _q === void 0 ? "" : _q, onClickButton2 = _a.onClickButton2, _r = _a.typeButton2, typeButton2 = _r === void 0 ? "primary" : _r, _s = _a.disabledButton2, disabledButton2 = _s === void 0 ? false : _s, _t = _a.labelButton3, labelButton3 = _t === void 0 ? "" : _t, onClickButton3 = _a.onClickButton3, _u = _a.typeButton3, typeButton3 = _u === void 0 ? "primary" : _u, _v = _a.disabledButton3, disabledButton3 = _v === void 0 ? false : _v, _w = _a.labelButton4, labelButton4 = _w === void 0 ? "" : _w, onClickButton4 = _a.onClickButton4, _x = _a.typeButton4, typeButton4 = _x === void 0 ? "primary" : _x, _y = _a.disabledButton4, disabledButton4 = _y === void 0 ? false : _y, _z = _a.labelButton5, labelButton5 = _z === void 0 ? "" : _z, onClickButton5 = _a.onClickButton5, _0 = _a.typeButton5, typeButton5 = _0 === void 0 ? "primary" : _0, _1 = _a.disabledButton5, disabledButton5 = _1 === void 0 ? false : _1;
40
- var _2 = (0, react_1.useState)(""), quickFilterText = _2[0], setQuickFilterText = _2[1];
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: { width: "100%", height: tableHeight ? "".concat(tableHeight, "px") : "auto" } },
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 ? params.value.toString().toLocaleLowerCase("tr-TR") : "";
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;
@@ -100,6 +100,10 @@ var CustomSelect = function (_a) {
100
100
  }
101
101
  setInputValue("");
102
102
  };
103
+ var clearSelection = function (e) {
104
+ e.stopPropagation();
105
+ onChange("");
106
+ };
103
107
  var filteredOptions = options.filter(function (option) {
104
108
  return option.label.toLowerCase().includes(inputValue.toLowerCase());
105
109
  });
@@ -128,8 +132,9 @@ var CustomSelect = function (_a) {
128
132
  e.stopPropagation();
129
133
  toggleValue(val);
130
134
  } })));
131
- })) : (react_1.default.createElement("span", { className: "placeholder" }, placeholder))) : selectedValue ? (react_1.default.createElement("span", { className: "badge bg-primary" },
132
- react_1.default.createElement("span", null, (_b = options.find(function (opt) { return opt.value === selectedValue; })) === null || _b === void 0 ? void 0 : _b.label))) : (react_1.default.createElement("span", { className: "placeholder" }, placeholder))),
135
+ })) : (react_1.default.createElement("span", { className: "placeholder" }, placeholder))) : selectedValue ? (react_1.default.createElement("span", { className: "badge bg-primary d-inline-flex align-items-center" },
136
+ react_1.default.createElement("span", null, (_b = options.find(function (opt) { return opt.value === selectedValue; })) === null || _b === void 0 ? void 0 : _b.label),
137
+ react_1.default.createElement(fa_1.FaTimes, { className: "ms-1", style: { cursor: "pointer" }, onClick: clearSelection }))) : (react_1.default.createElement("span", { className: "placeholder" }, placeholder))),
133
138
  react_1.default.createElement("input", { type: "text", name: name, value: Array.isArray(value) ? value.join(",") : value, required: required, onInvalid: handleInvalid, onInput: handleInput, style: {
134
139
  position: "absolute",
135
140
  left: "-9999px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "albinasoft-ui-package",
3
- "version": "1.1.29",
3
+ "version": "1.1.31",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {