albinasoft-ui-package 1.0.49 → 1.0.51
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/CustomButton.d.ts +2 -1
- package/dist/components/CustomButton.js +12 -6
- package/dist/components/CustomForm.d.ts +2 -2
- package/dist/components/CustomForm.js +112 -62
- package/dist/components/CustomInput.d.ts +1 -1
- package/dist/components/CustomInput.js +17 -6
- package/package.json +3 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from
|
1
|
+
import React from "react";
|
2
2
|
interface CustomButtonProps {
|
3
3
|
id?: string;
|
4
4
|
label: React.ReactNode;
|
@@ -8,6 +8,7 @@ interface CustomButtonProps {
|
|
8
8
|
className?: string;
|
9
9
|
tooltip?: string;
|
10
10
|
disabled?: boolean;
|
11
|
+
isLoading?: boolean;
|
11
12
|
}
|
12
13
|
declare const CustomButton: React.FC<CustomButtonProps>;
|
13
14
|
export default CustomButton;
|
@@ -62,14 +62,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
62
|
var react_1 = __importStar(require("react"));
|
63
63
|
var react_bootstrap_1 = require("react-bootstrap");
|
64
64
|
var CustomButton = function (_a) {
|
65
|
-
var id = _a.id, name = _a.name, label = _a.label, onClick = _a.onClick, style = _a.style, className = _a.className, tooltip = _a.tooltip, disabled = _a.disabled;
|
66
|
-
var _b = (0, react_1.useState)(false),
|
65
|
+
var id = _a.id, name = _a.name, label = _a.label, onClick = _a.onClick, style = _a.style, className = _a.className, tooltip = _a.tooltip, disabled = _a.disabled, externalIsLoading = _a.isLoading;
|
66
|
+
var _b = (0, react_1.useState)(false), internalIsLoading = _b[0], setInternalIsLoading = _b[1];
|
67
|
+
var isLoading = externalIsLoading !== undefined ? externalIsLoading : internalIsLoading;
|
67
68
|
var handleClick = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
68
69
|
return __generator(this, function (_a) {
|
69
70
|
switch (_a.label) {
|
70
71
|
case 0:
|
71
72
|
event.preventDefault();
|
72
|
-
|
73
|
+
if (!!isLoading) return [3 /*break*/, 4];
|
74
|
+
if (externalIsLoading === undefined) {
|
75
|
+
// Eğer dışsal loading durumu yoksa içsel durumu güncelle
|
76
|
+
setInternalIsLoading(true);
|
77
|
+
}
|
73
78
|
_a.label = 1;
|
74
79
|
case 1:
|
75
80
|
_a.trys.push([1, , 3, 4]);
|
@@ -78,15 +83,16 @@ var CustomButton = function (_a) {
|
|
78
83
|
_a.sent();
|
79
84
|
return [3 /*break*/, 4];
|
80
85
|
case 3:
|
81
|
-
|
86
|
+
if (externalIsLoading === undefined) {
|
87
|
+
setInternalIsLoading(false); // İçsel durumu sıfırla
|
88
|
+
}
|
82
89
|
return [7 /*endfinally*/];
|
83
90
|
case 4: return [2 /*return*/];
|
84
91
|
}
|
85
92
|
});
|
86
93
|
}); };
|
87
|
-
var buttonClassName = className || 'btn btn-primary';
|
88
94
|
return tooltip ? (react_1.default.createElement(react_bootstrap_1.OverlayTrigger, { placement: "top", overlay: react_1.default.createElement(react_bootstrap_1.Tooltip, { id: "tooltip-".concat(tooltip) }, tooltip) },
|
89
95
|
react_1.default.createElement("span", null,
|
90
|
-
react_1.default.createElement("button", { className:
|
96
|
+
react_1.default.createElement("button", { className: className || "btn btn-primary", onClick: handleClick, disabled: isLoading || disabled, style: style }, isLoading ? (react_1.default.createElement("span", { className: "spinner spinner-border spinner-border-sm", role: "status", "aria-hidden": "true" })) : (label))))) : (react_1.default.createElement("button", { className: className || "btn btn-primary", onClick: handleClick, disabled: isLoading || disabled, style: style }, isLoading ? (react_1.default.createElement("span", { className: "spinner spinner-border spinner-border-sm", role: "status", "aria-hidden": "true" })) : (label)));
|
91
97
|
};
|
92
98
|
exports.default = CustomButton;
|
@@ -33,6 +33,42 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
33
33
|
__setModuleDefault(result, mod);
|
34
34
|
return result;
|
35
35
|
};
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
43
|
+
});
|
44
|
+
};
|
45
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
46
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
47
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
48
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
49
|
+
function step(op) {
|
50
|
+
if (f) throw new TypeError("Generator is already executing.");
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
52
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
53
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
54
|
+
switch (op[0]) {
|
55
|
+
case 0: case 1: t = op; break;
|
56
|
+
case 4: _.label++; return { value: op[1], done: false };
|
57
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
58
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
59
|
+
default:
|
60
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
61
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
62
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
63
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
64
|
+
if (t[2]) _.ops.pop();
|
65
|
+
_.trys.pop(); continue;
|
66
|
+
}
|
67
|
+
op = body.call(thisArg, _);
|
68
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
69
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
70
|
+
}
|
71
|
+
};
|
36
72
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
37
73
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
38
74
|
};
|
@@ -69,61 +105,87 @@ var ElementType;
|
|
69
105
|
})(ElementType || (ElementType = {}));
|
70
106
|
exports.ElementType = ElementType;
|
71
107
|
var CustomForm = function (_a) {
|
72
|
-
var elements = _a.elements, innerRowCustomClass = _a.innerRowCustomClass, onSubmit = _a.onSubmit, _b = _a.confirmLabel, confirmLabel = _b === void 0 ?
|
108
|
+
var elements = _a.elements, innerRowCustomClass = _a.innerRowCustomClass, onSubmit = _a.onSubmit, _b = _a.confirmLabel, confirmLabel = _b === void 0 ? "Confirm" : _b, // Varsayılan değer
|
73
109
|
_c = _a.cancelLabel, // Varsayılan değer
|
74
|
-
cancelLabel = _c === void 0 ?
|
110
|
+
cancelLabel = _c === void 0 ? "Cancel" : _c, // Varsayılan değer
|
75
111
|
handleCancel = _a.handleCancel, _d = _a.showConfirmButton, showConfirmButton = _d === void 0 ? true : _d, // Varsayılan olarak görünür
|
76
112
|
_e = _a.showCancelButton, // Varsayılan olarak görünür
|
77
113
|
showCancelButton = _e === void 0 ? false : _e;
|
78
114
|
var formRef = (0, react_1.useRef)(null);
|
79
|
-
var
|
80
|
-
|
81
|
-
var form
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
115
|
+
var _f = (0, react_1.useState)(false), isLoading = _f[0], setIsLoading = _f[1];
|
116
|
+
var handleConfirm = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
117
|
+
var form, isValid, formValues_1, error_1;
|
118
|
+
return __generator(this, function (_a) {
|
119
|
+
switch (_a.label) {
|
120
|
+
case 0:
|
121
|
+
e.preventDefault();
|
122
|
+
form = formRef.current;
|
123
|
+
if (!form)
|
124
|
+
return [2 /*return*/];
|
125
|
+
isValid = form.checkValidity();
|
126
|
+
if (!isValid) return [3 /*break*/, 6];
|
127
|
+
setIsLoading(true);
|
128
|
+
_a.label = 1;
|
129
|
+
case 1:
|
130
|
+
_a.trys.push([1, 3, 4, 5]);
|
131
|
+
formValues_1 = {};
|
132
|
+
Array.from(form.elements).forEach(function (element) {
|
133
|
+
if (element instanceof HTMLInputElement ||
|
134
|
+
element instanceof HTMLTextAreaElement ||
|
135
|
+
element instanceof HTMLSelectElement) {
|
136
|
+
if (element.id) {
|
137
|
+
//RichTextbox boş göndermemesi için
|
138
|
+
var name_1 = element.name || element.id;
|
139
|
+
if (element instanceof HTMLInputElement &&
|
140
|
+
element.type === ElementType.RADIO) {
|
141
|
+
if (element.checked) {
|
142
|
+
formValues_1[name_1] = element.value;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
else if (element instanceof HTMLInputElement &&
|
146
|
+
element.type === ElementType.CHECKBOX) {
|
147
|
+
formValues_1[name_1] = element.checked;
|
148
|
+
}
|
149
|
+
else if (element instanceof HTMLSelectElement &&
|
150
|
+
element.multiple) {
|
151
|
+
var selectedOptions = Array.from(element.selectedOptions).map(function (option) { return option.value; });
|
152
|
+
formValues_1[name_1] = selectedOptions;
|
153
|
+
}
|
154
|
+
else if (element instanceof HTMLSelectElement) {
|
155
|
+
formValues_1[name_1] = [element.value]; // Tekli seçim bile array olarak döner
|
156
|
+
}
|
157
|
+
else {
|
158
|
+
formValues_1[name_1] = element.value;
|
159
|
+
}
|
96
160
|
}
|
97
161
|
}
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
formValues_1[name_1] = selectedOptions;
|
104
|
-
}
|
105
|
-
else if (element instanceof HTMLSelectElement) {
|
106
|
-
formValues_1[name_1] = [element.value]; // Tekli seçim bile array olarak döner
|
162
|
+
});
|
163
|
+
// CustomForm elemanlarını kontrol etme
|
164
|
+
elements.forEach(function (element) {
|
165
|
+
if ("value" in element && element.type === ElementType.RICHTEXTBOX) {
|
166
|
+
formValues_1[element.id] = element.value; // RichTextbox değerini ekleme
|
107
167
|
}
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
168
|
+
});
|
169
|
+
return [4 /*yield*/, onSubmit(formValues_1)];
|
170
|
+
case 2:
|
171
|
+
_a.sent();
|
172
|
+
return [3 /*break*/, 5];
|
173
|
+
case 3:
|
174
|
+
error_1 = _a.sent();
|
175
|
+
react_toastify_1.toast.error("Form gönderimi sırasında bir hata oluştu.");
|
176
|
+
return [3 /*break*/, 5];
|
177
|
+
case 4:
|
178
|
+
setIsLoading(false); // Loading state'i durdur
|
179
|
+
return [7 /*endfinally*/];
|
180
|
+
case 5: return [3 /*break*/, 7];
|
181
|
+
case 6:
|
182
|
+
react_toastify_1.toast.error("Gerekli tüm alanları doldurunuz.");
|
183
|
+
form.classList.add("was-validated");
|
184
|
+
_a.label = 7;
|
185
|
+
case 7: return [2 /*return*/];
|
186
|
+
}
|
187
|
+
});
|
188
|
+
}); };
|
127
189
|
// Elemanları satır, sütun ve iç satıra göre gruplama
|
128
190
|
var groupedElements = elements.reduce(function (acc, el) {
|
129
191
|
var row = el.rowId || 0;
|
@@ -145,26 +207,14 @@ var CustomForm = function (_a) {
|
|
145
207
|
var colId = _a[0], innerRows = _a[1];
|
146
208
|
return (react_1.default.createElement("div", { className: "col", key: "col-".concat(rowId, "-").concat(colId) }, Object.entries(innerRows).map(function (_a) {
|
147
209
|
var innerRowId = _a[0], elements = _a[1];
|
148
|
-
return (react_1.default.createElement("div", { className: "row ".concat(innerRowCustomClass), key: "inner-row-".concat(rowId, "-").concat(colId, "-").concat(innerRowId) }, elements.map(function (element) { return (react_1.default.createElement("div", { className: element.colClass ||
|
149
|
-
(react_1.default.createElement(CustomText_1.default, __assign({}, element))) : element.type === ElementType.INPUT ?
|
150
|
-
(react_1.default.createElement(CustomInput_1.default, __assign({}, element))) : element.type === ElementType.TEXTAREA ?
|
151
|
-
(react_1.default.createElement(CustomTextarea_1.default, __assign({}, element))) : element.type === ElementType.CHECKBOX ?
|
152
|
-
(react_1.default.createElement(CustomCheckbox_1.default, __assign({}, element))) : element.type === ElementType.RADIO ?
|
153
|
-
(react_1.default.createElement(CustomRadioButton_1.default, __assign({}, element))) : element.type === ElementType.SELECT ?
|
154
|
-
(react_1.default.createElement(CustomSelect_1.default, __assign({}, element))) : element.type === ElementType.DATETIMEPICKER ?
|
155
|
-
(react_1.default.createElement(CustomDateTimePicker_1.default, __assign({}, element))) : element.type === ElementType.DIVIDER ?
|
156
|
-
(react_1.default.createElement(CustomDivider_1.default, __assign({}, element))) : element.type === ElementType.RICHTEXTBOX ?
|
157
|
-
(react_1.default.createElement(CustomRichTextbox_1.default, __assign({}, element))) : element.type === ElementType.TREEVIEW ?
|
158
|
-
(react_1.default.createElement(CustomTreeView_1.default, __assign({}, element))) : element.type === ElementType.BUTTON ?
|
159
|
-
(react_1.default.createElement(CustomButton_1.default, __assign({}, element))) : element.type === ElementType.AUTOCOMPLETEINPUT ?
|
160
|
-
(react_1.default.createElement(CustomAutocompleteInput_1.default, __assign({}, element))) : null)); })));
|
210
|
+
return (react_1.default.createElement("div", { className: "row ".concat(innerRowCustomClass), key: "inner-row-".concat(rowId, "-").concat(colId, "-").concat(innerRowId) }, elements.map(function (element) { return (react_1.default.createElement("div", { className: element.colClass || "col-12", key: element.id }, element.type === ElementType.TEXT ? (react_1.default.createElement(CustomText_1.default, __assign({}, element))) : element.type === ElementType.INPUT ? (react_1.default.createElement(CustomInput_1.default, __assign({}, element))) : element.type === ElementType.TEXTAREA ? (react_1.default.createElement(CustomTextarea_1.default, __assign({}, element))) : element.type === ElementType.CHECKBOX ? (react_1.default.createElement(CustomCheckbox_1.default, __assign({}, element))) : element.type === ElementType.RADIO ? (react_1.default.createElement(CustomRadioButton_1.default, __assign({}, element))) : element.type === ElementType.SELECT ? (react_1.default.createElement(CustomSelect_1.default, __assign({}, element))) : element.type === ElementType.DATETIMEPICKER ? (react_1.default.createElement(CustomDateTimePicker_1.default, __assign({}, element))) : element.type === ElementType.DIVIDER ? (react_1.default.createElement(CustomDivider_1.default, __assign({}, element))) : element.type === ElementType.RICHTEXTBOX ? (react_1.default.createElement(CustomRichTextbox_1.default, __assign({}, element))) : element.type === ElementType.TREEVIEW ? (react_1.default.createElement(CustomTreeView_1.default, __assign({}, element))) : element.type === ElementType.BUTTON ? (react_1.default.createElement(CustomButton_1.default, __assign({}, element, { isLoading: isLoading }))) : element.type === ElementType.AUTOCOMPLETEINPUT ? (react_1.default.createElement(CustomAutocompleteInput_1.default, __assign({}, element))) : null)); })));
|
161
211
|
})));
|
162
212
|
})));
|
163
213
|
}),
|
164
214
|
(showConfirmButton || showCancelButton) && (react_1.default.createElement("div", { className: "card-footer mt-3" },
|
165
215
|
react_1.default.createElement("div", { className: "form-actions mt-3", style: { display: "flex", justifyContent: "flex-end", gap: "10px" } },
|
166
|
-
showCancelButton && (react_1.default.createElement(CustomButton_1.default, { label: cancelLabel, className: "btn btn-secondary", onClick: handleCancel || (function () { }) })),
|
167
|
-
showConfirmButton && (react_1.default.createElement(CustomButton_1.default, { label: confirmLabel, onClick: handleConfirm })))))));
|
216
|
+
showCancelButton && (react_1.default.createElement(CustomButton_1.default, { label: cancelLabel, className: "btn btn-secondary", onClick: handleCancel || (function () { }), isLoading: isLoading })),
|
217
|
+
showConfirmButton && (react_1.default.createElement(CustomButton_1.default, { label: confirmLabel, className: "btn btn-primary", onClick: handleConfirm, isLoading: isLoading })))))));
|
168
218
|
};
|
169
219
|
exports.CustomForm = CustomForm;
|
170
220
|
exports.default = CustomForm;
|
@@ -22,11 +22,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
22
|
__setModuleDefault(result, mod);
|
23
23
|
return result;
|
24
24
|
};
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
+
};
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
29
|
exports.InputType = exports.CustomInput = void 0;
|
27
30
|
var react_1 = __importStar(require("react"));
|
28
31
|
var react_bootstrap_1 = require("react-bootstrap");
|
29
32
|
var fa_1 = require("react-icons/fa");
|
33
|
+
var react_input_mask_1 = __importDefault(require("react-input-mask"));
|
30
34
|
var InputType;
|
31
35
|
(function (InputType) {
|
32
36
|
InputType["TEXT"] = "text";
|
@@ -40,25 +44,32 @@ exports.InputType = InputType;
|
|
40
44
|
var CustomInput = function (_a) {
|
41
45
|
var id = _a.id, name = _a.name, label = _a.label, _b = _a.inputType, inputType = _b === void 0 ? InputType.TEXT : _b, value = _a.value, placeholder = _a.placeholder, _c = _a.required, required = _c === void 0 ? false : _c, errorMessage = _a.errorMessage, _d = _a.conditionalErrorVisible, conditionalErrorVisible = _d === void 0 ? false : _d, conditionalErrorMessage = _a.conditionalErrorMessage, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.readOnly, readOnly = _f === void 0 ? false : _f, buttonIcon = _a.buttonIcon, buttonClass = _a.buttonClass, buttonTooltip = _a.buttonTooltip, description = _a.description, tooltip = _a.tooltip, style = _a.style, mainClass = _a.mainClass, className = _a.className, buttonOnClick = _a.buttonOnClick, onChange = _a.onChange;
|
42
46
|
var _g = (0, react_1.useState)(false), showPassword = _g[0], setShowPassword = _g[1];
|
43
|
-
var handleType = inputType === InputType.PASSWORD && showPassword
|
47
|
+
var handleType = inputType === InputType.PASSWORD && showPassword
|
48
|
+
? InputType.TEXT
|
49
|
+
: inputType;
|
44
50
|
var togglePasswordVisibility = function () {
|
45
51
|
setShowPassword(function (prev) { return !prev; });
|
46
52
|
};
|
53
|
+
var renderInput = function () {
|
54
|
+
// If inputType is TEL, use ReactInputMask
|
55
|
+
if (inputType === InputType.TEL) {
|
56
|
+
return (react_1.default.createElement(react_input_mask_1.default, { mask: "0(999) 999 99 99", value: value, onChange: onChange, className: "form-control ".concat(className), style: style, required: required, disabled: disabled, readOnly: readOnly, autoComplete: "new-password" }));
|
57
|
+
}
|
58
|
+
// Otherwise, return a normal input element
|
59
|
+
return (react_1.default.createElement("input", { id: id, name: name, type: handleType, value: value, placeholder: placeholder, onChange: onChange, className: "form-control ".concat(className), style: style, required: required, disabled: disabled, readOnly: readOnly, autoComplete: "new-password" }));
|
60
|
+
};
|
47
61
|
return (react_1.default.createElement("div", { className: mainClass },
|
48
62
|
react_1.default.createElement("div", { className: "form-group" },
|
49
63
|
react_1.default.createElement("label", { htmlFor: id, className: "form-label" }, label),
|
50
64
|
react_1.default.createElement("div", { className: "input-group position-relative" },
|
51
|
-
tooltip ? (react_1.default.createElement(react_bootstrap_1.OverlayTrigger, { placement: "bottom", overlay: react_1.default.createElement(react_bootstrap_1.Tooltip, { id: "tooltip-".concat(tooltip) }, tooltip) },
|
52
|
-
react_1.default.createElement("input", { id: id, name: name, type: handleType, value: value, placeholder: placeholder, onChange: onChange, className: "form-control ".concat(className), style: style, required: required, disabled: disabled, readOnly: readOnly, autoComplete: "new-password" // Modern tarayıcılarda autocomplete autofill engellemek için
|
53
|
-
}))) : (react_1.default.createElement("input", { id: id, name: name, type: handleType, value: value, placeholder: placeholder, onChange: onChange, className: "form-control ".concat(className), style: style, required: required, disabled: disabled, readOnly: readOnly, autoComplete: "new-password" // Modern tarayıcılarda autocomplete autofill engellemek için
|
54
|
-
})),
|
65
|
+
tooltip ? (react_1.default.createElement(react_bootstrap_1.OverlayTrigger, { placement: "bottom", overlay: react_1.default.createElement(react_bootstrap_1.Tooltip, { id: "tooltip-".concat(tooltip) }, tooltip) }, renderInput())) : (renderInput()),
|
55
66
|
inputType === InputType.PASSWORD && (react_1.default.createElement("button", { type: "button", onClick: togglePasswordVisibility, className: "btn btn-outline-secondary", title: showPassword ? "Parolayı Gizle" : "Parolayı Göster" }, showPassword ? react_1.default.createElement(fa_1.FaEyeSlash, null) : react_1.default.createElement(fa_1.FaEye, null))),
|
56
67
|
buttonIcon && buttonOnClick && (react_1.default.createElement("button", { type: "button", onClick: buttonOnClick, className: buttonClass || "btn btn-outline-secondary", title: buttonTooltip || "" }, buttonIcon)),
|
57
68
|
required && (react_1.default.createElement("div", { className: "invalid-feedback text-danger" },
|
58
69
|
react_1.default.createElement("div", { className: "description-icon" },
|
59
70
|
react_1.default.createElement(fa_1.FaExclamationTriangle, null)),
|
60
71
|
react_1.default.createElement("div", { className: "description-text" },
|
61
|
-
react_1.default.createElement("span", null, errorMessage ||
|
72
|
+
react_1.default.createElement("span", null, errorMessage || "Bu alan boş bırakılamaz.")))),
|
62
73
|
conditionalErrorVisible && (react_1.default.createElement("div", { className: "conditional-error-message text-warning" },
|
63
74
|
react_1.default.createElement("div", { className: "description-icon" },
|
64
75
|
react_1.default.createElement(fa_1.FaExclamationTriangle, null)),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "albinasoft-ui-package",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.51",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"types": "dist/index.d.ts",
|
6
6
|
"scripts": {
|
@@ -15,6 +15,7 @@
|
|
15
15
|
"react-datepicker": "^7.5.0",
|
16
16
|
"react-dom": "^18.0.0",
|
17
17
|
"react-icons": "^5.4.0",
|
18
|
+
"react-input-mask": "^2.0.4",
|
18
19
|
"react-quill": "^2.0.0",
|
19
20
|
"react-router-dom": "^7.1.1",
|
20
21
|
"react-toastify": "^10.0.6"
|
@@ -22,6 +23,7 @@
|
|
22
23
|
"devDependencies": {
|
23
24
|
"@types/react": "^19.0.1",
|
24
25
|
"@types/react-bootstrap": "^0.32.37",
|
26
|
+
"@types/react-input-mask": "^3.0.6",
|
25
27
|
"typescript": "^4.5.0"
|
26
28
|
},
|
27
29
|
"peerDependencies": {
|