albinasoft-ui-package 1.1.42 → 1.1.44

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 +84 -0
  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 +91 -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 -243
  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 -191
  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 -22
  55. package/dist/components/CustomTreeView.js +168 -157
  56. package/dist/index.d.ts +22 -22
  57. package/dist/index.js +48 -48
  58. package/package.json +44 -43
  59. package/readme.md +9 -9
@@ -1,28 +1,28 @@
1
- import React from "react";
2
- export interface AlbinaFormHandles {
3
- getFormValues: () => Record<string, any>;
4
- }
5
- export interface AlbinaFormProps {
6
- /** Başlangıç form değerleri */
7
- initialValues?: Record<string, any>;
8
- /** Form elemanları konfigürasyonu (CustomForm’un elements prop’una verilecek) */
9
- elements: any[];
10
- /** İç satırın sınıfı */
11
- innerRowCustomClass?: string;
12
- /** Onay buton etiketi */
13
- confirmLabel?: string;
14
- /** İptal buton etiketi */
15
- cancelLabel?: string;
16
- /** Onay butonu görünürlüğü */
17
- showConfirmButton?: boolean;
18
- /** İptal butonu görünürlüğü */
19
- showCancelButton?: boolean;
20
- /** Form gönderme işlemi */
21
- onSubmit: (values: Record<string, any>) => Promise<any> | void;
22
- /** İptal işlemi */
23
- onCancel?: () => void;
24
- /** Form değeri değiştiğinde çağrılacak callback */
25
- onValuesChange?: (values: Record<string, any>) => void;
26
- }
27
- declare const AlbinaForm: React.ForwardRefExoticComponent<AlbinaFormProps & React.RefAttributes<AlbinaFormHandles>>;
28
- export default AlbinaForm;
1
+ import React from "react";
2
+ export interface AlbinaFormHandles {
3
+ getFormValues: () => Record<string, any>;
4
+ }
5
+ export interface AlbinaFormProps {
6
+ /** Başlangıç form değerleri */
7
+ initialValues?: Record<string, any>;
8
+ /** Form elemanları konfigürasyonu (CustomForm’un elements prop’una verilecek) */
9
+ elements: any[];
10
+ /** İç satırın sınıfı */
11
+ innerRowCustomClass?: string;
12
+ /** Onay buton etiketi */
13
+ confirmLabel?: string;
14
+ /** İptal buton etiketi */
15
+ cancelLabel?: string;
16
+ /** Onay butonu görünürlüğü */
17
+ showConfirmButton?: boolean;
18
+ /** İptal butonu görünürlüğü */
19
+ showCancelButton?: boolean;
20
+ /** Form gönderme işlemi */
21
+ onSubmit: (values: Record<string, any>) => Promise<any> | void;
22
+ /** İptal işlemi */
23
+ onCancel?: () => void;
24
+ /** Form değeri değiştiğinde çağrılacak callback */
25
+ onValuesChange?: (values: Record<string, any>) => void;
26
+ }
27
+ declare const AlbinaForm: React.ForwardRefExoticComponent<AlbinaFormProps & React.RefAttributes<AlbinaFormHandles>>;
28
+ export default AlbinaForm;
@@ -1,88 +1,88 @@
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- var react_1 = __importStar(require("react"));
38
- var CustomForm_1 = __importStar(require("./CustomForm"));
39
- var AlbinaForm = (0, react_1.forwardRef)(function (_a, ref) {
40
- var _b = _a.initialValues, initialValues = _b === void 0 ? {} : _b, elements = _a.elements, _c = _a.innerRowCustomClass, innerRowCustomClass = _c === void 0 ? "justify-content-evenly" : _c, _d = _a.confirmLabel, confirmLabel = _d === void 0 ? "Gönder" : _d, _e = _a.cancelLabel, cancelLabel = _e === void 0 ? "İptal" : _e, _f = _a.showConfirmButton, showConfirmButton = _f === void 0 ? true : _f, _g = _a.showCancelButton, showCancelButton = _g === void 0 ? false : _g, onSubmit = _a.onSubmit, onCancel = _a.onCancel, onValuesChange = _a.onValuesChange;
41
- var _h = (0, react_1.useState)(initialValues), formValues = _h[0], setFormValues = _h[1];
42
- // Form değerleri değiştikçe dışarıya bildiriyoruz.
43
- (0, react_1.useEffect)(function () {
44
- if (onValuesChange) {
45
- onValuesChange(formValues);
46
- }
47
- }, [formValues, onValuesChange]);
48
- var handleInputChange = function (id) { return function (e) {
49
- if (e instanceof Date || e === null) {
50
- setFormValues(function (prev) {
51
- var _a;
52
- return (__assign(__assign({}, prev), (_a = {}, _a[id] = e, _a)));
53
- });
54
- }
55
- else if (e.target) {
56
- var _a = e.target, type_1 = _a.type, checked_1 = _a.checked, value_1 = _a.value;
57
- setFormValues(function (prev) {
58
- var _a;
59
- return (__assign(__assign({}, prev), (_a = {}, _a[id] = type_1 === "checkbox" ? checked_1 : value_1, _a)));
60
- });
61
- }
62
- else {
63
- setFormValues(function (prev) {
64
- var _a;
65
- return (__assign(__assign({}, prev), (_a = {}, _a[id] = e, _a)));
66
- });
67
- }
68
- }; };
69
- var enhancedElements = elements.map(function (element) {
70
- if (element.id && element.type === CustomForm_1.ElementType.SELECT) {
71
- return __assign(__assign({}, element), { value: formValues[element.id] || [], onChange: handleInputChange(element.id) });
72
- }
73
- else if (element.id) {
74
- return __assign(__assign({}, element), { value: formValues[element.id] || "", onChange: handleInputChange(element.id) });
75
- }
76
- return element;
77
- });
78
- var handleFormSubmit = function (values) {
79
- onSubmit(formValues);
80
- };
81
- // Ref üzerinden dışarıya sunulacak metod
82
- var getFormValues = function () { return formValues; };
83
- (0, react_1.useImperativeHandle)(ref, function () { return ({
84
- getFormValues: getFormValues,
85
- }); });
86
- return (react_1.default.createElement(CustomForm_1.default, { elements: enhancedElements, innerRowCustomClass: innerRowCustomClass, confirmLabel: confirmLabel, cancelLabel: cancelLabel, showConfirmButton: showConfirmButton, showCancelButton: showCancelButton, onSubmit: handleFormSubmit, handleCancel: onCancel }));
87
- });
88
- exports.default = AlbinaForm;
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ var react_1 = __importStar(require("react"));
38
+ var CustomForm_1 = __importStar(require("./CustomForm"));
39
+ var AlbinaForm = (0, react_1.forwardRef)(function (_a, ref) {
40
+ var _b = _a.initialValues, initialValues = _b === void 0 ? {} : _b, elements = _a.elements, _c = _a.innerRowCustomClass, innerRowCustomClass = _c === void 0 ? "justify-content-evenly" : _c, _d = _a.confirmLabel, confirmLabel = _d === void 0 ? "Gönder" : _d, _e = _a.cancelLabel, cancelLabel = _e === void 0 ? "İptal" : _e, _f = _a.showConfirmButton, showConfirmButton = _f === void 0 ? true : _f, _g = _a.showCancelButton, showCancelButton = _g === void 0 ? false : _g, onSubmit = _a.onSubmit, onCancel = _a.onCancel, onValuesChange = _a.onValuesChange;
41
+ var _h = (0, react_1.useState)(initialValues), formValues = _h[0], setFormValues = _h[1];
42
+ // Form değerleri değiştikçe dışarıya bildiriyoruz.
43
+ (0, react_1.useEffect)(function () {
44
+ if (onValuesChange) {
45
+ onValuesChange(formValues);
46
+ }
47
+ }, [formValues, onValuesChange]);
48
+ var handleInputChange = function (id) { return function (e) {
49
+ if (e instanceof Date || e === null) {
50
+ setFormValues(function (prev) {
51
+ var _a;
52
+ return (__assign(__assign({}, prev), (_a = {}, _a[id] = e, _a)));
53
+ });
54
+ }
55
+ else if (e.target) {
56
+ var _a = e.target, type_1 = _a.type, checked_1 = _a.checked, value_1 = _a.value;
57
+ setFormValues(function (prev) {
58
+ var _a;
59
+ return (__assign(__assign({}, prev), (_a = {}, _a[id] = type_1 === "checkbox" ? checked_1 : value_1, _a)));
60
+ });
61
+ }
62
+ else {
63
+ setFormValues(function (prev) {
64
+ var _a;
65
+ return (__assign(__assign({}, prev), (_a = {}, _a[id] = e, _a)));
66
+ });
67
+ }
68
+ }; };
69
+ var enhancedElements = elements.map(function (element) {
70
+ if (element.id && element.type === CustomForm_1.ElementType.SELECT) {
71
+ return __assign(__assign({}, element), { value: formValues[element.id] || [], onChange: handleInputChange(element.id) });
72
+ }
73
+ else if (element.id) {
74
+ return __assign(__assign({}, element), { value: formValues[element.id] || "", onChange: handleInputChange(element.id) });
75
+ }
76
+ return element;
77
+ });
78
+ var handleFormSubmit = function (values) {
79
+ onSubmit(formValues);
80
+ };
81
+ // Ref üzerinden dışarıya sunulacak metod
82
+ var getFormValues = function () { return formValues; };
83
+ (0, react_1.useImperativeHandle)(ref, function () { return ({
84
+ getFormValues: getFormValues,
85
+ }); });
86
+ return (react_1.default.createElement(CustomForm_1.default, { elements: enhancedElements, innerRowCustomClass: innerRowCustomClass, confirmLabel: confirmLabel, cancelLabel: cancelLabel, showConfirmButton: showConfirmButton, showCancelButton: showCancelButton, onSubmit: handleFormSubmit, handleCancel: onCancel }));
87
+ });
88
+ exports.default = AlbinaForm;
@@ -1,23 +1,23 @@
1
- import React from 'react';
2
- import '../assets/css/custom-autocomplete-input.css';
3
- interface CustomAutocompleteInputProps {
4
- id?: string;
5
- name?: string;
6
- label: string;
7
- value: string;
8
- placeholder?: string;
9
- required?: boolean;
10
- description?: string | null;
11
- errorMessage?: string;
12
- conditionalErrorVisible?: boolean;
13
- conditionalErrorMessage?: string;
14
- disabled?: boolean;
15
- tooltip?: string;
16
- className?: string;
17
- style?: React.CSSProperties;
18
- lang?: string;
19
- fetchOptions: (query: string) => Promise<string[]>;
20
- onSelect: (value: string) => void;
21
- }
22
- declare const CustomAutocompleteInput: React.FC<CustomAutocompleteInputProps>;
23
- export default CustomAutocompleteInput;
1
+ import React from 'react';
2
+ import '../assets/css/custom-autocomplete-input.css';
3
+ interface CustomAutocompleteInputProps {
4
+ id?: string;
5
+ name?: string;
6
+ label: string;
7
+ value: string;
8
+ placeholder?: string;
9
+ required?: boolean;
10
+ description?: string | null;
11
+ errorMessage?: string;
12
+ conditionalErrorVisible?: boolean;
13
+ conditionalErrorMessage?: string;
14
+ disabled?: boolean;
15
+ tooltip?: string;
16
+ className?: string;
17
+ style?: React.CSSProperties;
18
+ lang?: string;
19
+ fetchOptions: (query: string) => Promise<string[]>;
20
+ onSelect: (value: string) => void;
21
+ }
22
+ declare const CustomAutocompleteInput: React.FC<CustomAutocompleteInputProps>;
23
+ export default CustomAutocompleteInput;