albinasoft-ui-package 1.1.44 → 1.1.46

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.
Files changed (59) hide show
  1. package/LICENSE +21 -21
  2. package/dist/assets/css/custom-autocomplete-input.css +49 -49
  3. package/dist/assets/css/custom-datatable.css +2 -2
  4. package/dist/assets/css/custom-datetime-picker.css +779 -779
  5. package/dist/assets/css/custom-progress-bar.css +37 -37
  6. package/dist/assets/css/custom-select.css +62 -62
  7. package/dist/assets/css/custom-simple-select.css +117 -117
  8. package/dist/assets/css/custom-timeline.css +43 -43
  9. package/dist/assets/css/custom-treeview.css +83 -83
  10. package/dist/assets/css/dark.css +2159 -2159
  11. package/dist/assets/css/main.css +26664 -26664
  12. package/dist/components/AlbinaForm.d.ts +28 -28
  13. package/dist/components/AlbinaForm.js +88 -88
  14. package/dist/components/CustomAutocompleteInput.d.ts +23 -23
  15. package/dist/components/CustomAutocompleteInput.js +185 -185
  16. package/dist/components/CustomButton.d.ts +14 -14
  17. package/dist/components/CustomButton.js +98 -98
  18. package/dist/components/CustomCheckbox.d.ts +20 -20
  19. package/dist/components/CustomCheckbox.js +58 -58
  20. package/dist/components/CustomDatatable.d.ts +42 -42
  21. package/dist/components/CustomDatatable.js +92 -92
  22. package/dist/components/CustomDateTimePicker.d.ts +33 -33
  23. package/dist/components/CustomDateTimePicker.js +97 -91
  24. package/dist/components/CustomDivider.d.ts +51 -51
  25. package/dist/components/CustomDivider.js +87 -87
  26. package/dist/components/CustomFileUploader.d.ts +65 -65
  27. package/dist/components/CustomFileUploader.js +460 -460
  28. package/dist/components/CustomForm.d.ts +225 -225
  29. package/dist/components/CustomForm.js +259 -259
  30. package/dist/components/CustomInput.d.ts +37 -37
  31. package/dist/components/CustomInput.js +85 -85
  32. package/dist/components/CustomModal.d.ts +15 -15
  33. package/dist/components/CustomModal.js +17 -17
  34. package/dist/components/CustomPhoneInput.d.ts +29 -29
  35. package/dist/components/CustomPhoneInput.js +251 -251
  36. package/dist/components/CustomProgressBar.d.ts +9 -9
  37. package/dist/components/CustomProgressBar.js +40 -40
  38. package/dist/components/CustomRadioButton.d.ts +25 -25
  39. package/dist/components/CustomRadioButton.js +34 -34
  40. package/dist/components/CustomRichTextbox.d.ts +14 -14
  41. package/dist/components/CustomRichTextbox.js +89 -89
  42. package/dist/components/CustomSelect.d.ts +32 -32
  43. package/dist/components/CustomSelect.js +193 -193
  44. package/dist/components/CustomSimpleSelect.d.ts +21 -21
  45. package/dist/components/CustomSimpleSelect.js +64 -64
  46. package/dist/components/CustomTab.d.ts +44 -44
  47. package/dist/components/CustomTab.js +122 -122
  48. package/dist/components/CustomText.d.ts +72 -72
  49. package/dist/components/CustomText.js +158 -158
  50. package/dist/components/CustomTextarea.d.ts +22 -22
  51. package/dist/components/CustomTextarea.js +33 -33
  52. package/dist/components/CustomTimeline.d.ts +30 -30
  53. package/dist/components/CustomTimeline.js +80 -80
  54. package/dist/components/CustomTreeView.d.ts +20 -20
  55. package/dist/components/CustomTreeView.js +197 -168
  56. package/dist/index.d.ts +22 -22
  57. package/dist/index.js +48 -48
  58. package/package.json +45 -44
  59. package/readme.md +9 -9
@@ -1,91 +1,97 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TimeFormat = exports.CustomDateTimePicker = void 0;
7
- var react_1 = __importDefault(require("react"));
8
- var react_bootstrap_1 = require("react-bootstrap");
9
- var fa_1 = require("react-icons/fa");
10
- var react_datepicker_1 = __importDefault(require("react-datepicker"));
11
- require("../assets/css/custom-datetime-picker.css");
12
- var TimeFormat;
13
- (function (TimeFormat) {
14
- TimeFormat["H"] = "HH";
15
- TimeFormat["M"] = "mm";
16
- TimeFormat["HM"] = "HH:mm";
17
- })(TimeFormat || (TimeFormat = {}));
18
- exports.TimeFormat = TimeFormat;
19
- // Manuel Türkçe locale objesi
20
- var customTrLocale = {
21
- localize: {
22
- month: function (n) {
23
- var months = [
24
- "Ocak",
25
- "Şubat",
26
- "Mart",
27
- "Nisan",
28
- "Mayıs",
29
- "Haziran",
30
- "Temmuz",
31
- "Ağustos",
32
- "Eylül",
33
- "Ekim",
34
- "Kasım",
35
- "Aralık",
36
- ];
37
- return months[n];
38
- },
39
- day: function (n) {
40
- var days = ["Pzr", "Pts", "Sal", "Çrş", "Prş", "Cum", "Cts"];
41
- return days[n];
42
- },
43
- },
44
- formatLong: {
45
- date: function () { return "dd.MM.yyyy"; },
46
- time: function () { return "HH:mm"; },
47
- dateTime: function () { return "dd.MM.yyyy HH:mm"; },
48
- },
49
- options: {
50
- weekStartsOn: 1,
51
- },
52
- };
53
- var CustomDateTimePicker = function (_a) {
54
- var id = _a.id, name = _a.name, label = _a.label, value = _a.value, placeholder = _a.placeholder, _b = _a.required, required = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, _c = _a.conditionalErrorVisible, conditionalErrorVisible = _c === void 0 ? false : _c, conditionalErrorMessage = _a.conditionalErrorMessage, tooltip = _a.tooltip, description = _a.description, _d = _a.disabled, disabled = _d === void 0 ? false : _d, className = _a.className, style = _a.style, showTimeSelect = _a.showTimeSelect, showTimeSelectOnly = _a.showTimeSelectOnly, showYearDropdown = _a.showYearDropdown, _e = _a.timeFormat, timeFormat = _e === void 0 ? TimeFormat.HM : _e, timeIntervals = _a.timeIntervals, submitted = _a.submitted, onChange = _a.onChange;
55
- // Eğer form gönderildiyse ve required field boşsa hata durumu geçerli olsun.
56
- var isInvalid = submitted && required && !value;
57
- return (react_1.default.createElement("div", { className: "col-12", style: style },
58
- react_1.default.createElement("div", { className: "form-group" },
59
- react_1.default.createElement("label", { htmlFor: id, className: "form-label" }, label),
60
- react_1.default.createElement("div", { className: "position-relative" },
61
- react_1.default.createElement(react_bootstrap_1.OverlayTrigger, { placement: "bottom", overlay: tooltip ? (react_1.default.createElement(react_bootstrap_1.Tooltip, { id: "tooltip-".concat(id) }, tooltip)) : (react_1.default.createElement(react_1.default.Fragment, null)) },
62
- react_1.default.createElement("div", null,
63
- react_1.default.createElement(react_datepicker_1.default, { id: id, name: name, selected: value, onChange: onChange, className: "form-control ".concat(className || "", " ").concat(submitted ? (isInvalid ? "is-invalid" : "is-valid") : ""), placeholderText: placeholder, disabled: disabled, required: required, showTimeSelect: showTimeSelect || false, showTimeSelectOnly: showTimeSelectOnly || false, showYearDropdown: showYearDropdown || false, showTimeCaption: false, timeFormat: timeFormat, locale: customTrLocale, dateFormat: showTimeSelectOnly
64
- ? timeFormat
65
- : showTimeSelect
66
- ? "dd.MM.yyyy HH:mm"
67
- : "dd.MM.yyyy", timeIntervals: timeFormat === TimeFormat.H
68
- ? 60
69
- : timeFormat === TimeFormat.M
70
- ? 1
71
- : timeIntervals
72
- ? timeIntervals
73
- : 30 }))),
74
- react_1.default.createElement("div", { className: "invalid-feedback text-danger mt-2 ".concat(isInvalid ? "d-flex" : "") },
75
- react_1.default.createElement("div", { className: "description-icon" },
76
- react_1.default.createElement(fa_1.FaExclamationTriangle, null)),
77
- react_1.default.createElement("div", { className: "description-text" },
78
- react_1.default.createElement("span", null, errorMessage || "Tarih seçimi zorunludur."))),
79
- conditionalErrorVisible && (react_1.default.createElement("div", { className: "conditional-error-message text-warning mt-2" },
80
- react_1.default.createElement("div", { className: "description-icon" },
81
- react_1.default.createElement(fa_1.FaExclamationTriangle, null)),
82
- react_1.default.createElement("div", { className: "description-text" },
83
- react_1.default.createElement("span", null, conditionalErrorMessage)))),
84
- description && (react_1.default.createElement("div", { className: "form-description text-secondary mt-2" },
85
- react_1.default.createElement("div", { className: "description-icon" },
86
- react_1.default.createElement(fa_1.FaInfoCircle, null)),
87
- react_1.default.createElement("div", { className: "description-text" },
88
- react_1.default.createElement("span", null, description))))))));
89
- };
90
- exports.CustomDateTimePicker = CustomDateTimePicker;
91
- exports.default = CustomDateTimePicker;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.TimeFormat = exports.CustomDateTimePicker = void 0;
30
+ var react_1 = __importDefault(require("react"));
31
+ var react_bootstrap_1 = require("react-bootstrap");
32
+ var fa_1 = require("react-icons/fa");
33
+ var react_datepicker_1 = __importStar(require("react-datepicker"));
34
+ var tr_1 = __importDefault(require("date-fns/locale/tr"));
35
+ var date_fns_tz_1 = require("date-fns-tz");
36
+ require("../assets/css/custom-datetime-picker.css");
37
+ // date-fns locale tipi TypeScript’te bazen uyumsuz görünüyor, bu yüzden type assertion yapıyoruz
38
+ (0, react_datepicker_1.registerLocale)("tr", tr_1.default);
39
+ var TimeFormat;
40
+ (function (TimeFormat) {
41
+ TimeFormat["H"] = "HH";
42
+ TimeFormat["M"] = "mm";
43
+ TimeFormat["HM"] = "HH:mm";
44
+ })(TimeFormat || (TimeFormat = {}));
45
+ exports.TimeFormat = TimeFormat;
46
+ var CustomDateTimePicker = function (_a) {
47
+ var id = _a.id, name = _a.name, label = _a.label, value = _a.value, placeholder = _a.placeholder, _b = _a.required, required = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, _c = _a.conditionalErrorVisible, conditionalErrorVisible = _c === void 0 ? false : _c, conditionalErrorMessage = _a.conditionalErrorMessage, tooltip = _a.tooltip, description = _a.description, _d = _a.disabled, disabled = _d === void 0 ? false : _d, className = _a.className, style = _a.style, showTimeSelect = _a.showTimeSelect, showTimeSelectOnly = _a.showTimeSelectOnly, showYearDropdown = _a.showYearDropdown, _e = _a.timeFormat, timeFormat = _e === void 0 ? TimeFormat.HM : _e, timeIntervals = _a.timeIntervals, submitted = _a.submitted, onChange = _a.onChange;
48
+ var isInvalid = submitted && required && !value;
49
+ var timeZone = "Europe/Istanbul";
50
+ // TR saatini UTC'ye dönüştür ve öyle gönder
51
+ var handleDateChange = function (date) {
52
+ if (!date)
53
+ return onChange(null);
54
+ var zonedDate = (0, date_fns_tz_1.fromZonedTime)(date, timeZone);
55
+ onChange(zonedDate);
56
+ };
57
+ // UTC saklanmış tarihleri TR saatine çevirerek input’ta göster
58
+ var displayedDate = value ? (0, date_fns_tz_1.toZonedTime)(value, timeZone) : null;
59
+ return (react_1.default.createElement("div", { className: "col-12", style: style },
60
+ react_1.default.createElement("div", { className: "form-group" },
61
+ react_1.default.createElement("label", { htmlFor: id, className: "form-label" }, label),
62
+ react_1.default.createElement("div", { className: "position-relative" },
63
+ react_1.default.createElement(react_bootstrap_1.OverlayTrigger, { placement: "bottom", overlay: tooltip ? (react_1.default.createElement(react_bootstrap_1.Tooltip, { id: "tooltip-".concat(id) }, tooltip)) : (react_1.default.createElement(react_1.default.Fragment, null)) },
64
+ react_1.default.createElement("div", null,
65
+ react_1.default.createElement(react_datepicker_1.default, { id: id, name: name, selected: displayedDate, onChange: handleDateChange, className: "form-control ".concat(className || "", " ").concat(submitted
66
+ ? isInvalid
67
+ ? "is-invalid"
68
+ : "is-valid"
69
+ : ""), placeholderText: placeholder, disabled: disabled, required: required, showTimeSelect: showTimeSelect || false, showTimeSelectOnly: showTimeSelectOnly || false, showYearDropdown: showYearDropdown || false, showTimeCaption: false, timeFormat: timeFormat, locale: "tr", dateFormat: showTimeSelectOnly
70
+ ? timeFormat
71
+ : showTimeSelect
72
+ ? "dd.MM.yyyy HH:mm"
73
+ : "dd.MM.yyyy", timeIntervals: timeFormat === TimeFormat.H
74
+ ? 60
75
+ : timeFormat === TimeFormat.M
76
+ ? 1
77
+ : timeIntervals
78
+ ? timeIntervals
79
+ : 30 }))),
80
+ react_1.default.createElement("div", { className: "invalid-feedback text-danger mt-2 ".concat(isInvalid ? "d-flex" : "") },
81
+ react_1.default.createElement("div", { className: "description-icon" },
82
+ react_1.default.createElement(fa_1.FaExclamationTriangle, null)),
83
+ react_1.default.createElement("div", { className: "description-text" },
84
+ react_1.default.createElement("span", null, errorMessage || "Tarih seçimi zorunludur."))),
85
+ conditionalErrorVisible && (react_1.default.createElement("div", { className: "conditional-error-message text-warning mt-2" },
86
+ react_1.default.createElement("div", { className: "description-icon" },
87
+ react_1.default.createElement(fa_1.FaExclamationTriangle, null)),
88
+ react_1.default.createElement("div", { className: "description-text" },
89
+ react_1.default.createElement("span", null, conditionalErrorMessage)))),
90
+ description && (react_1.default.createElement("div", { className: "form-description text-secondary mt-2" },
91
+ react_1.default.createElement("div", { className: "description-icon" },
92
+ react_1.default.createElement(fa_1.FaInfoCircle, null)),
93
+ react_1.default.createElement("div", { className: "description-text" },
94
+ react_1.default.createElement("span", null, description))))))));
95
+ };
96
+ exports.CustomDateTimePicker = CustomDateTimePicker;
97
+ exports.default = CustomDateTimePicker;
@@ -1,51 +1,51 @@
1
- import React from 'react';
2
- declare enum Color {
3
- DEFAULT = "currentColor",
4
- PRIMARY = "text-primary",
5
- SECONDARY = "text-secondary",
6
- SUCCESS = "text-success",
7
- WARNING = "text-warning",
8
- DANGER = "text-danger",
9
- INFO = "text-info",
10
- DARK = "text-dark",
11
- LIGHT = "text-light"
12
- }
13
- declare enum Alignment {
14
- LEFT = "left",
15
- CENTER = "center",
16
- RIGHT = "right"
17
- }
18
- declare enum Thickness {
19
- T1 = "1px",
20
- T2 = "2px",
21
- T3 = "3px",
22
- T4 = "4px",
23
- T5 = "5px",
24
- T6 = "6px",
25
- T8 = "8px",
26
- T10 = "10px",
27
- T12 = "12px",
28
- T16 = "16px",
29
- T24 = "24px"
30
- }
31
- declare enum Width {
32
- W10 = "10%",
33
- W25 = "25%",
34
- W33 = "33%",
35
- W50 = "50%",
36
- W66 = "66%",
37
- W75 = "75%",
38
- W100 = "100%"
39
- }
40
- interface CustomDividerProps {
41
- id?: string;
42
- color?: Color;
43
- thickness?: Thickness;
44
- width?: Width;
45
- alignment?: Alignment;
46
- className?: string;
47
- style?: React.CSSProperties;
48
- }
49
- declare const CustomDivider: React.FC<CustomDividerProps>;
50
- export { CustomDivider, Color, Alignment, Thickness, Width };
51
- export default CustomDivider;
1
+ import React from 'react';
2
+ declare enum Color {
3
+ DEFAULT = "currentColor",
4
+ PRIMARY = "text-primary",
5
+ SECONDARY = "text-secondary",
6
+ SUCCESS = "text-success",
7
+ WARNING = "text-warning",
8
+ DANGER = "text-danger",
9
+ INFO = "text-info",
10
+ DARK = "text-dark",
11
+ LIGHT = "text-light"
12
+ }
13
+ declare enum Alignment {
14
+ LEFT = "left",
15
+ CENTER = "center",
16
+ RIGHT = "right"
17
+ }
18
+ declare enum Thickness {
19
+ T1 = "1px",
20
+ T2 = "2px",
21
+ T3 = "3px",
22
+ T4 = "4px",
23
+ T5 = "5px",
24
+ T6 = "6px",
25
+ T8 = "8px",
26
+ T10 = "10px",
27
+ T12 = "12px",
28
+ T16 = "16px",
29
+ T24 = "24px"
30
+ }
31
+ declare enum Width {
32
+ W10 = "10%",
33
+ W25 = "25%",
34
+ W33 = "33%",
35
+ W50 = "50%",
36
+ W66 = "66%",
37
+ W75 = "75%",
38
+ W100 = "100%"
39
+ }
40
+ interface CustomDividerProps {
41
+ id?: string;
42
+ color?: Color;
43
+ thickness?: Thickness;
44
+ width?: Width;
45
+ alignment?: Alignment;
46
+ className?: string;
47
+ style?: React.CSSProperties;
48
+ }
49
+ declare const CustomDivider: React.FC<CustomDividerProps>;
50
+ export { CustomDivider, Color, Alignment, Thickness, Width };
51
+ export default CustomDivider;
@@ -1,87 +1,87 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Width = exports.Thickness = exports.Alignment = exports.Color = exports.CustomDivider = void 0;
18
- var react_1 = __importDefault(require("react"));
19
- var Color;
20
- (function (Color) {
21
- Color["DEFAULT"] = "currentColor";
22
- Color["PRIMARY"] = "text-primary";
23
- Color["SECONDARY"] = "text-secondary";
24
- Color["SUCCESS"] = "text-success";
25
- Color["WARNING"] = "text-warning";
26
- Color["DANGER"] = "text-danger";
27
- Color["INFO"] = "text-info";
28
- Color["DARK"] = "text-dark";
29
- Color["LIGHT"] = "text-light";
30
- })(Color || (Color = {}));
31
- exports.Color = Color;
32
- var Alignment;
33
- (function (Alignment) {
34
- Alignment["LEFT"] = "left";
35
- Alignment["CENTER"] = "center";
36
- Alignment["RIGHT"] = "right";
37
- })(Alignment || (Alignment = {}));
38
- exports.Alignment = Alignment;
39
- var Thickness;
40
- (function (Thickness) {
41
- Thickness["T1"] = "1px";
42
- Thickness["T2"] = "2px";
43
- Thickness["T3"] = "3px";
44
- Thickness["T4"] = "4px";
45
- Thickness["T5"] = "5px";
46
- Thickness["T6"] = "6px";
47
- Thickness["T8"] = "8px";
48
- Thickness["T10"] = "10px";
49
- Thickness["T12"] = "12px";
50
- Thickness["T16"] = "16px";
51
- Thickness["T24"] = "24px";
52
- })(Thickness || (Thickness = {}));
53
- exports.Thickness = Thickness;
54
- var Width;
55
- (function (Width) {
56
- Width["W10"] = "10%";
57
- Width["W25"] = "25%";
58
- Width["W33"] = "33%";
59
- Width["W50"] = "50%";
60
- Width["W66"] = "66%";
61
- Width["W75"] = "75%";
62
- Width["W100"] = "100%";
63
- })(Width || (Width = {}));
64
- exports.Width = Width;
65
- var CustomDivider = function (_a) {
66
- var id = _a.id, _b = _a.color, color = _b === void 0 ? Color.DEFAULT : _b, // Varsayılan renk (gri ton)
67
- _c = _a.thickness, // Varsayılan renk (gri ton)
68
- thickness = _c === void 0 ? Thickness.T1 : _c, // Varsayılan kalınlık
69
- _d = _a.width, // Varsayılan kalınlık
70
- width = _d === void 0 ? Width.W100 : _d, // Varsayılan genişlik
71
- _e = _a.alignment, // Varsayılan genişlik
72
- alignment = _e === void 0 ? Alignment.CENTER : _e, // Varsayılan hizalama
73
- _f = _a.className, // Varsayılan hizalama
74
- className = _f === void 0 ? '' : _f, _g = _a.style, style = _g === void 0 ? {} : _g;
75
- var combinedClassName = "".concat(color, " ").concat(className).trim();
76
- // Hizalama stilini belirleme
77
- var alignmentStyle = {
78
- marginLeft: alignment === 'left' ? '0' : 'auto',
79
- marginRight: alignment === 'right' ? '0' : 'auto',
80
- };
81
- return (react_1.default.createElement("hr", { id: id || "custom-divider-".concat(Date.now()),
82
- //className={`custom-divider ${className}`.trim()}
83
- className: "custom-divider ".concat(combinedClassName), style: __assign(__assign({ border: 'none', borderTop: "".concat(thickness, " solid"), // Çizgiyi oluştur
84
- width: width }, alignmentStyle), style) }));
85
- };
86
- exports.CustomDivider = CustomDivider;
87
- exports.default = CustomDivider;
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Width = exports.Thickness = exports.Alignment = exports.Color = exports.CustomDivider = void 0;
18
+ var react_1 = __importDefault(require("react"));
19
+ var Color;
20
+ (function (Color) {
21
+ Color["DEFAULT"] = "currentColor";
22
+ Color["PRIMARY"] = "text-primary";
23
+ Color["SECONDARY"] = "text-secondary";
24
+ Color["SUCCESS"] = "text-success";
25
+ Color["WARNING"] = "text-warning";
26
+ Color["DANGER"] = "text-danger";
27
+ Color["INFO"] = "text-info";
28
+ Color["DARK"] = "text-dark";
29
+ Color["LIGHT"] = "text-light";
30
+ })(Color || (Color = {}));
31
+ exports.Color = Color;
32
+ var Alignment;
33
+ (function (Alignment) {
34
+ Alignment["LEFT"] = "left";
35
+ Alignment["CENTER"] = "center";
36
+ Alignment["RIGHT"] = "right";
37
+ })(Alignment || (Alignment = {}));
38
+ exports.Alignment = Alignment;
39
+ var Thickness;
40
+ (function (Thickness) {
41
+ Thickness["T1"] = "1px";
42
+ Thickness["T2"] = "2px";
43
+ Thickness["T3"] = "3px";
44
+ Thickness["T4"] = "4px";
45
+ Thickness["T5"] = "5px";
46
+ Thickness["T6"] = "6px";
47
+ Thickness["T8"] = "8px";
48
+ Thickness["T10"] = "10px";
49
+ Thickness["T12"] = "12px";
50
+ Thickness["T16"] = "16px";
51
+ Thickness["T24"] = "24px";
52
+ })(Thickness || (Thickness = {}));
53
+ exports.Thickness = Thickness;
54
+ var Width;
55
+ (function (Width) {
56
+ Width["W10"] = "10%";
57
+ Width["W25"] = "25%";
58
+ Width["W33"] = "33%";
59
+ Width["W50"] = "50%";
60
+ Width["W66"] = "66%";
61
+ Width["W75"] = "75%";
62
+ Width["W100"] = "100%";
63
+ })(Width || (Width = {}));
64
+ exports.Width = Width;
65
+ var CustomDivider = function (_a) {
66
+ var id = _a.id, _b = _a.color, color = _b === void 0 ? Color.DEFAULT : _b, // Varsayılan renk (gri ton)
67
+ _c = _a.thickness, // Varsayılan renk (gri ton)
68
+ thickness = _c === void 0 ? Thickness.T1 : _c, // Varsayılan kalınlık
69
+ _d = _a.width, // Varsayılan kalınlık
70
+ width = _d === void 0 ? Width.W100 : _d, // Varsayılan genişlik
71
+ _e = _a.alignment, // Varsayılan genişlik
72
+ alignment = _e === void 0 ? Alignment.CENTER : _e, // Varsayılan hizalama
73
+ _f = _a.className, // Varsayılan hizalama
74
+ className = _f === void 0 ? '' : _f, _g = _a.style, style = _g === void 0 ? {} : _g;
75
+ var combinedClassName = "".concat(color, " ").concat(className).trim();
76
+ // Hizalama stilini belirleme
77
+ var alignmentStyle = {
78
+ marginLeft: alignment === 'left' ? '0' : 'auto',
79
+ marginRight: alignment === 'right' ? '0' : 'auto',
80
+ };
81
+ return (react_1.default.createElement("hr", { id: id || "custom-divider-".concat(Date.now()),
82
+ //className={`custom-divider ${className}`.trim()}
83
+ className: "custom-divider ".concat(combinedClassName), style: __assign(__assign({ border: 'none', borderTop: "".concat(thickness, " solid"), // Çizgiyi oluştur
84
+ width: width }, alignmentStyle), style) }));
85
+ };
86
+ exports.CustomDivider = CustomDivider;
87
+ exports.default = CustomDivider;
@@ -1,65 +1,65 @@
1
- import React from "react";
2
- export declare enum AllowedTypes {
3
- PDF = "pdf",
4
- FILE = "file",
5
- IMAGE = "image",
6
- VIDEO = "video",
7
- VISUAL = "visual",
8
- ALL = "all"
9
- }
10
- export interface FileUploaderTranslations {
11
- dropAreaText: string;
12
- fileLimitMultiText: string;
13
- fileLimitSingleText: string;
14
- uploadButtonText: string;
15
- removeButtonTitle: string;
16
- uploadSuccessToast: string;
17
- uploadErrorToast: string;
18
- uploadWarningLimit: string;
19
- uploadWarningExceed: string;
20
- fileSizeError: string;
21
- fileTypeError: string;
22
- noFileSelectedWarning: string;
23
- }
24
- export declare const defaultTranslations: FileUploaderTranslations;
25
- export interface CustomFileUploaderProps {
26
- /** Sunucuya dosyaların yükleneceği URL */
27
- url: string;
28
- /** Çoklu dosya seçimine izin verilsin mi? */
29
- multi: boolean;
30
- /** İzin verilen dosya türü */
31
- allowedTypes: AllowedTypes;
32
- /** Eğer multi true ise aynı anda seçilebilecek maksimum dosya sayısı */
33
- maxFile: number;
34
- /** Her bir dosya için maksimum boyut (byte cinsinden) */
35
- maxSize: number;
36
- /**
37
- * Opsiyonel: Yükleme tamamlandığında dönen dosya isimlerini almak için callback.
38
- */
39
- onUploadComplete?: (uploadedFileNames: string[]) => void;
40
- /**
41
- * Opsiyonel: Yüklenmiş bir dosya kaldırıldığında, dosya adı bilgisini parent bileşene bildirmek için callback.
42
- */
43
- onRemoveUploaded?: (fileName: string) => void;
44
- /** Opsiyonel: Yükleyici için gösterilecek label */
45
- label?: string;
46
- /**
47
- * Opsiyonel: Pending (henüz yüklenmemiş) dosya sayısını parent'a iletecek callback.
48
- */
49
- onPendingChange?: (pendingFileCount: number) => void;
50
- /**
51
- * Opsiyonel: Çoklu dil desteği için kullanılan çeviri metinleri.
52
- */
53
- translations?: FileUploaderTranslations;
54
- /**
55
- * Eğer bu prop’un değeri değişirse uploader içini temizle
56
- */
57
- clearTrigger?: any;
58
- /**
59
- * Yükleme işlemi sırasında yükleme durumunu parent'a bildirmek için callback.
60
- * Bu, yükleme işlemi başladığında ve bittiğinde çağrılabilir.
61
- */
62
- onUploadingChange?: (uploading: boolean) => void;
63
- }
64
- declare const CustomFileUploader: React.FC<CustomFileUploaderProps>;
65
- export default CustomFileUploader;
1
+ import React from "react";
2
+ export declare enum AllowedTypes {
3
+ PDF = "pdf",
4
+ FILE = "file",
5
+ IMAGE = "image",
6
+ VIDEO = "video",
7
+ VISUAL = "visual",
8
+ ALL = "all"
9
+ }
10
+ export interface FileUploaderTranslations {
11
+ dropAreaText: string;
12
+ fileLimitMultiText: string;
13
+ fileLimitSingleText: string;
14
+ uploadButtonText: string;
15
+ removeButtonTitle: string;
16
+ uploadSuccessToast: string;
17
+ uploadErrorToast: string;
18
+ uploadWarningLimit: string;
19
+ uploadWarningExceed: string;
20
+ fileSizeError: string;
21
+ fileTypeError: string;
22
+ noFileSelectedWarning: string;
23
+ }
24
+ export declare const defaultTranslations: FileUploaderTranslations;
25
+ export interface CustomFileUploaderProps {
26
+ /** Sunucuya dosyaların yükleneceği URL */
27
+ url: string;
28
+ /** Çoklu dosya seçimine izin verilsin mi? */
29
+ multi: boolean;
30
+ /** İzin verilen dosya türü */
31
+ allowedTypes: AllowedTypes;
32
+ /** Eğer multi true ise aynı anda seçilebilecek maksimum dosya sayısı */
33
+ maxFile: number;
34
+ /** Her bir dosya için maksimum boyut (byte cinsinden) */
35
+ maxSize: number;
36
+ /**
37
+ * Opsiyonel: Yükleme tamamlandığında dönen dosya isimlerini almak için callback.
38
+ */
39
+ onUploadComplete?: (uploadedFileNames: string[]) => void;
40
+ /**
41
+ * Opsiyonel: Yüklenmiş bir dosya kaldırıldığında, dosya adı bilgisini parent bileşene bildirmek için callback.
42
+ */
43
+ onRemoveUploaded?: (fileName: string) => void;
44
+ /** Opsiyonel: Yükleyici için gösterilecek label */
45
+ label?: string;
46
+ /**
47
+ * Opsiyonel: Pending (henüz yüklenmemiş) dosya sayısını parent'a iletecek callback.
48
+ */
49
+ onPendingChange?: (pendingFileCount: number) => void;
50
+ /**
51
+ * Opsiyonel: Çoklu dil desteği için kullanılan çeviri metinleri.
52
+ */
53
+ translations?: FileUploaderTranslations;
54
+ /**
55
+ * Eğer bu prop’un değeri değişirse uploader içini temizle
56
+ */
57
+ clearTrigger?: any;
58
+ /**
59
+ * Yükleme işlemi sırasında yükleme durumunu parent'a bildirmek için callback.
60
+ * Bu, yükleme işlemi başladığında ve bittiğinde çağrılabilir.
61
+ */
62
+ onUploadingChange?: (uploading: boolean) => void;
63
+ }
64
+ declare const CustomFileUploader: React.FC<CustomFileUploaderProps>;
65
+ export default CustomFileUploader;