@sydsoft/base 1.49.0 → 1.51.0

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 (84) hide show
  1. package/_dist/_lib/baseFunctions.js +24 -11
  2. package/_dist/_lib/inputMask.js +7 -3
  3. package/_dist/_lib/listFunctions.js +7 -2
  4. package/_dist/_lib/storage/cookies.js +20 -12
  5. package/_dist/_lib/storage/encData.js +10 -5
  6. package/_dist/_lib/storage/localStorage.js +23 -14
  7. package/_dist/_lib/storage/sessionStorage.js +23 -14
  8. package/_dist/_lib/useInterval.js +8 -5
  9. package/_dist/alert/index.js +22 -13
  10. package/_dist/box/Box.js +12 -8
  11. package/_dist/box/BoxContent.js +9 -4
  12. package/_dist/box/BoxFooter.js +9 -5
  13. package/_dist/box/BoxHeader.js +10 -6
  14. package/_dist/box/index.js +7 -4
  15. package/_dist/countDown/index.js +17 -12
  16. package/_dist/dateTime/index.js +4 -1
  17. package/_dist/form/Button.js +24 -20
  18. package/_dist/form/Checkbox.js +11 -6
  19. package/_dist/form/Dialog.js +12 -8
  20. package/_dist/form/Form.js +7 -4
  21. package/_dist/form/FormOlustur.js +16 -12
  22. package/_dist/form/Input.js +49 -44
  23. package/_dist/form/Label.js +10 -6
  24. package/_dist/form/SearchableInput.js +47 -43
  25. package/_dist/form/UploadBase.js +16 -11
  26. package/_dist/form/index.js +12 -9
  27. package/_dist/grid/index.js +38 -30
  28. package/_dist/icon/icons.js +10 -7
  29. package/_dist/icon/index.js +13 -9
  30. package/_dist/icon/mui.js +2 -1
  31. package/_dist/index.js +22 -19
  32. package/_dist/menu/index.js +20 -16
  33. package/_dist/modal/index.js +16 -12
  34. package/_dist/popover/index.js +37 -33
  35. package/_dist/tooltip/index.js +8 -4
  36. package/package.json +3 -5
  37. package/_lib/baseFunctions.ts +0 -94
  38. package/_lib/inputMask.ts +0 -257
  39. package/_lib/listFunctions.ts +0 -106
  40. package/_lib/storage/cookies.ts +0 -39
  41. package/_lib/storage/encData.ts +0 -41
  42. package/_lib/storage/localStorage.ts +0 -67
  43. package/_lib/storage/sessionStorage.ts +0 -67
  44. package/_lib/useInterval.ts +0 -30
  45. package/alert/index.module.css +0 -119
  46. package/alert/index.tsx +0 -131
  47. package/box/Box.module.css +0 -153
  48. package/box/Box.tsx +0 -33
  49. package/box/BoxContent.tsx +0 -18
  50. package/box/BoxFooter.tsx +0 -25
  51. package/box/BoxHeader.tsx +0 -46
  52. package/box/index.ts +0 -10
  53. package/countDown/index.tsx +0 -116
  54. package/dateTime/index.ts +0 -79
  55. package/form/Button.tsx +0 -143
  56. package/form/Checkbox.tsx +0 -48
  57. package/form/Dialog.tsx +0 -109
  58. package/form/Form.tsx +0 -19
  59. package/form/FormOlustur.tsx +0 -105
  60. package/form/Input.tsx +0 -364
  61. package/form/Label.tsx +0 -20
  62. package/form/SearchableInput.tsx +0 -406
  63. package/form/UploadBase.tsx +0 -133
  64. package/form/index.ts +0 -10
  65. package/form/styles/Button.module.css +0 -145
  66. package/form/styles/Input.module.css +0 -221
  67. package/form/styles/Label.module.css +0 -31
  68. package/form/styles/SearchableInput.module.css +0 -80
  69. package/global.d.ts +0 -9
  70. package/grid/index.module.css +0 -805
  71. package/grid/index.tsx +0 -171
  72. package/icon/icons.tsx +0 -33
  73. package/icon/index.tsx +0 -95
  74. package/icon/mui.tsx +0 -5932
  75. package/index.ts +0 -21
  76. package/menu/index.module.css +0 -92
  77. package/menu/index.tsx +0 -143
  78. package/modal/index.module.css +0 -77
  79. package/modal/index.tsx +0 -106
  80. package/npm_recovery_codes.txt +0 -5
  81. package/popover/index.module.css +0 -89
  82. package/popover/index.tsx +0 -392
  83. package/tooltip/index.tsx +0 -216
  84. package/tsconfig.json +0 -24
@@ -1,23 +1,27 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, Input } from './index';
3
- import { convertForSearch, convertLowerCase } from '../_lib/baseFunctions';
4
- import { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
5
- import { onKeyboardSelection, setScrollListPosition } from '../_lib/listFunctions';
6
- import { Icon } from '../icon';
7
- import styles from './styles/SearchableInput.module.css';
8
- export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromApi, name, value, parentInputValue, disabled, itemComponent, valueKey = 'value', labelKey = 'label', onSelect, onChange, onText, onLoad, style, listPositionRelative = false, loadingMessage = 'Lütfen bekleyiniz...', notFoundMessage = 'Kayıt bulunamadı...', placeholder, endAdornment, ilkSec = false, newCreate = false, inputRef, ...other }, ref) => {
9
- const refMain = useRef(null);
10
- const refInput = useRef(null);
11
- const refList = useRef(null);
12
- const [data, setData] = useState(autoCompleteList !== null && autoCompleteList !== void 0 ? autoCompleteList : []);
13
- const [selectedValue, setSelectedValue] = useState(value !== null && value !== void 0 ? value : undefined);
14
- const [parentValue, setParentValue] = useState(parentInputValue !== null && parentInputValue !== void 0 ? parentInputValue : undefined);
15
- const [text, setText] = useState(''); //Inputta görünen
16
- const [filter, setFilter] = useState(''); // Filtrelemeye tabi tutulan
17
- const [newItemCreate, setNewItemCreate] = useState({ created: false });
18
- const [open, setOpen] = useState(false);
19
- const [loading, setLoading] = useState(isDataFromApi && (!autoCompleteList || (autoCompleteList === null || autoCompleteList === void 0 ? void 0 : autoCompleteList.length) == 0));
20
- useImperativeHandle(ref, () => ({
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchableInput = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const index_1 = require("./index");
7
+ const baseFunctions_1 = require("../_lib/baseFunctions");
8
+ const react_1 = require("react");
9
+ const listFunctions_1 = require("../_lib/listFunctions");
10
+ const icon_1 = require("../icon");
11
+ const SearchableInput_module_css_1 = tslib_1.__importDefault(require("./styles/SearchableInput.module.css"));
12
+ exports.SearchableInput = (0, react_1.forwardRef)(({ autoCompleteList = [], isDataFromApi, name, value, parentInputValue, disabled, itemComponent, valueKey = 'value', labelKey = 'label', onSelect, onChange, onText, onLoad, style, listPositionRelative = false, loadingMessage = 'Lütfen bekleyiniz...', notFoundMessage = 'Kayıt bulunamadı...', placeholder, endAdornment, ilkSec = false, newCreate = false, inputRef, ...other }, ref) => {
13
+ const refMain = (0, react_1.useRef)(null);
14
+ const refInput = (0, react_1.useRef)(null);
15
+ const refList = (0, react_1.useRef)(null);
16
+ const [data, setData] = (0, react_1.useState)(autoCompleteList !== null && autoCompleteList !== void 0 ? autoCompleteList : []);
17
+ const [selectedValue, setSelectedValue] = (0, react_1.useState)(value !== null && value !== void 0 ? value : undefined);
18
+ const [parentValue, setParentValue] = (0, react_1.useState)(parentInputValue !== null && parentInputValue !== void 0 ? parentInputValue : undefined);
19
+ const [text, setText] = (0, react_1.useState)(''); //Inputta görünen
20
+ const [filter, setFilter] = (0, react_1.useState)(''); // Filtrelemeye tabi tutulan
21
+ const [newItemCreate, setNewItemCreate] = (0, react_1.useState)({ created: false });
22
+ const [open, setOpen] = (0, react_1.useState)(false);
23
+ const [loading, setLoading] = (0, react_1.useState)(isDataFromApi && (!autoCompleteList || (autoCompleteList === null || autoCompleteList === void 0 ? void 0 : autoCompleteList.length) == 0));
24
+ (0, react_1.useImperativeHandle)(ref, () => ({
21
25
  setAutoCompleteList: (list, value = undefined, callback) => {
22
26
  if (autoCompleteList && (autoCompleteList === null || autoCompleteList === void 0 ? void 0 : autoCompleteList.length) > 0) {
23
27
  alert('AutoCompleteList zaten tanımlı olduğundan dışardan data seti değiştirilemez.');
@@ -41,12 +45,12 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
41
45
  checkByValue: (value, openList = false) => checkByValue(value, openList),
42
46
  setLoading: (value) => setLoading(value)
43
47
  }), [autoCompleteList, data, value]);
44
- useEffect(() => {
48
+ (0, react_1.useEffect)(() => {
45
49
  if (inputRef)
46
50
  inputRef.current = refInput.current;
47
51
  }, [refInput.current]);
48
- useEffect(() => onLoad && onLoad(value), []);
49
- useEffect(() => {
52
+ (0, react_1.useEffect)(() => onLoad && onLoad(value), []);
53
+ (0, react_1.useEffect)(() => {
50
54
  if (autoCompleteList && Array.isArray(autoCompleteList)) {
51
55
  if (autoCompleteList.length > 0) {
52
56
  // Sadece gerçekten farklıysa set et
@@ -64,7 +68,7 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
64
68
  }
65
69
  }
66
70
  }, [autoCompleteList]);
67
- useEffect(() => {
71
+ (0, react_1.useEffect)(() => {
68
72
  // isDev && console.log('data =>', name, data, 'selectedValue =>', selectedValue, 'value =>', value);
69
73
  if (!Array.isArray(data)) {
70
74
  setData([]);
@@ -81,21 +85,21 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
81
85
  }
82
86
  }, [data]);
83
87
  // Seçim değişikliğinde parent'ı bilgilendir
84
- useEffect(() => {
88
+ (0, react_1.useEffect)(() => {
85
89
  // isDev && console.log('selectedValue =>', name, selectedValue, 'value =>', value);
86
90
  if ((value === null || value === void 0 ? void 0 : value.toString()) != (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.toString())) {
87
91
  checkByValue(value, open);
88
92
  // isDev && console.log('value Kontrol ediliyor', value, selectedValue);
89
93
  }
90
94
  }, [value]);
91
- useEffect(() => {
95
+ (0, react_1.useEffect)(() => {
92
96
  if (parentInputValue !== parentValue) {
93
97
  setParentValue(parentInputValue);
94
98
  clear(false);
95
99
  // isDev && console.log(name, "parentInputValueDeğişti =>", parentInputValue);
96
100
  }
97
101
  }, [parentInputValue]);
98
- useEffect(() => {
102
+ (0, react_1.useEffect)(() => {
99
103
  const checkHideBackDrop = (e) => {
100
104
  if (open && refMain.current && !refMain.current.contains(e.target)) {
101
105
  checkByInput();
@@ -109,7 +113,7 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
109
113
  if (refMain.current)
110
114
  refMain.current.addEventListener('keydown', checkESC);
111
115
  if (open) {
112
- setScrollListPosition(refList);
116
+ (0, listFunctions_1.setScrollListPosition)(refList);
113
117
  if (!listPositionRelative) {
114
118
  window.addEventListener('scroll', handleUpdatePosition, true);
115
119
  window.addEventListener('resize', handleUpdatePosition);
@@ -123,8 +127,8 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
123
127
  window.removeEventListener('resize', handleUpdatePosition);
124
128
  };
125
129
  }, [open]);
126
- useLayoutEffect(() => handleUpdatePosition(), [open]);
127
- const setValue = useCallback((item, openList) => {
130
+ (0, react_1.useLayoutEffect)(() => handleUpdatePosition(), [open]);
131
+ const setValue = (0, react_1.useCallback)((item, openList) => {
128
132
  var _a, _b;
129
133
  const newValue = (_a = item === null || item === void 0 ? void 0 : item[valueKey]) !== null && _a !== void 0 ? _a : '';
130
134
  const newLabel = (_b = item === null || item === void 0 ? void 0 : item[labelKey]) !== null && _b !== void 0 ? _b : '';
@@ -138,24 +142,24 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
138
142
  onChange && sendChange(newValue);
139
143
  onSelect && onSelect(item);
140
144
  }, [onChange, onSelect, name, selectedValue, valueKey, labelKey]);
141
- const textInputOnChange = useCallback((e) => {
145
+ const textInputOnChange = (0, react_1.useCallback)((e) => {
142
146
  setSelectedValue(undefined);
143
147
  setText(e.target.value);
144
148
  setFilter(e.target.value.trim());
145
149
  setOpen(true);
146
150
  onText && onText(e.target.value);
147
151
  }, [setValue, onText]);
148
- const checkByValue = useCallback((value, openList = false, list = []) => {
152
+ const checkByValue = (0, react_1.useCallback)((value, openList = false, list = []) => {
149
153
  const targetList = list.length > 0 ? list : data;
150
- let find = Object.values(targetList).find((item) => convertLowerCase(item[valueKey]) === convertLowerCase(value));
154
+ let find = Object.values(targetList).find((item) => (0, baseFunctions_1.convertLowerCase)(item[valueKey]) === (0, baseFunctions_1.convertLowerCase)(value));
151
155
  if (!find && newCreate && newItemCreate.create) {
152
156
  find = newItemCreate;
153
157
  }
154
158
  // isDev && console.log('find', find, 'value', value, data);
155
159
  setValue(find, openList);
156
160
  }, [data, valueKey, newCreate, newItemCreate, setValue]);
157
- const checkByInput = useCallback(() => {
158
- const findByLabel = data.find((item) => { var _a; return convertLowerCase(item[labelKey]) === convertLowerCase((_a = refInput.current) === null || _a === void 0 ? void 0 : _a.value); });
161
+ const checkByInput = (0, react_1.useCallback)(() => {
162
+ const findByLabel = data.find((item) => { var _a; return (0, baseFunctions_1.convertLowerCase)(item[labelKey]) === (0, baseFunctions_1.convertLowerCase)((_a = refInput.current) === null || _a === void 0 ? void 0 : _a.value); });
159
163
  if (findByLabel && value == findByLabel[valueKey]) {
160
164
  setOpen(false);
161
165
  return;
@@ -168,7 +172,7 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
168
172
  onText('');
169
173
  }
170
174
  }, [data, labelKey, value, valueKey, isDataFromApi, onText, setValue, refInput.current]);
171
- const clear = useCallback((openList = true, focusInput = false) => {
175
+ const clear = (0, react_1.useCallback)((openList = true, focusInput = false) => {
172
176
  var _a;
173
177
  setFilter('');
174
178
  setText('');
@@ -176,16 +180,16 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
176
180
  onText && onText('');
177
181
  focusInput && ((_a = refInput === null || refInput === void 0 ? void 0 : refInput.current) === null || _a === void 0 ? void 0 : _a.focus());
178
182
  }, [setValue, onText]);
179
- const sendChange = useCallback((value) => {
183
+ const sendChange = (0, react_1.useCallback)((value) => {
180
184
  // isDev && console.log(name, "sendChange", value, "selectedValue", selectedValue);
181
185
  if (onChange && value !== selectedValue) {
182
186
  onChange({ target: { name, value } });
183
187
  }
184
188
  }, [onChange, name]);
185
- const filteredData = useMemo(() => {
189
+ const filteredData = (0, react_1.useMemo)(() => {
186
190
  let list;
187
191
  if (filter.length > 0) {
188
- list = data.filter((item) => convertForSearch(item[labelKey]).includes(convertForSearch(filter)) || item[labelKey] == filter);
192
+ list = data.filter((item) => (0, baseFunctions_1.convertForSearch)(item[labelKey]).includes((0, baseFunctions_1.convertForSearch)(filter)) || item[labelKey] == filter);
189
193
  }
190
194
  else {
191
195
  list = data;
@@ -212,7 +216,7 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
212
216
  const onKeyDown = (e) => {
213
217
  if (!open || !refList.current)
214
218
  return null;
215
- onKeyboardSelection({
219
+ (0, listFunctions_1.onKeyboardSelection)({
216
220
  e,
217
221
  targetElement: refList,
218
222
  checkByInput,
@@ -222,13 +226,13 @@ export const SearchableInput = forwardRef(({ autoCompleteList = [], isDataFromAp
222
226
  selectedClass: 'selected'
223
227
  });
224
228
  };
225
- return (_jsxs("div", { ref: refMain, className: styles.searchableInputComponent, onKeyDown: onKeyDown, style: style, children: [_jsx(Input, { ...other, inputRef: refInput, name: name, value: text, onFocus: () => !disabled && setOpen(true), onChange: textInputOnChange, endAdornment: !disabled && (_jsxs("div", { style: { marginRight: 5 }, tabIndex: -1, children: [_jsx(Button, { title: 'Temizle', tabIndex: -1, hidden: !(text && text.length > 0), onClick: () => clear(true, true), onlyIcon: _jsx(Icon, { name: 'close', style: { color: '#444' } }) }), endAdornment, _jsx(Button, { tabIndex: -1, hidden: !data || !(data.length > 0), onClick: () => !disabled && setOpen(!open), onlyIcon: _jsx(Icon, { name: open ? 'keyboard_arrow_up' : 'keyboard_arrow_down', style: { color: '#444' } }) })] })), placeholder: loading ? 'Lütfen bekleyiniz...' : placeholder, loading: loading, disabled: disabled, propsInput: {
229
+ return ((0, jsx_runtime_1.jsxs)("div", { ref: refMain, className: SearchableInput_module_css_1.default.searchableInputComponent, onKeyDown: onKeyDown, style: style, children: [(0, jsx_runtime_1.jsx)(index_1.Input, { ...other, inputRef: refInput, name: name, value: text, onFocus: () => !disabled && setOpen(true), onChange: textInputOnChange, endAdornment: !disabled && ((0, jsx_runtime_1.jsxs)("div", { style: { marginRight: 5 }, tabIndex: -1, children: [(0, jsx_runtime_1.jsx)(index_1.Button, { title: 'Temizle', tabIndex: -1, hidden: !(text && text.length > 0), onClick: () => clear(true, true), onlyIcon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: 'close', style: { color: '#444' } }) }), endAdornment, (0, jsx_runtime_1.jsx)(index_1.Button, { tabIndex: -1, hidden: !data || !(data.length > 0), onClick: () => !disabled && setOpen(!open), onlyIcon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: open ? 'keyboard_arrow_up' : 'keyboard_arrow_down', style: { color: '#444' } }) })] })), placeholder: loading ? 'Lütfen bekleyiniz...' : placeholder, loading: loading, disabled: disabled, propsInput: {
226
230
  ...other === null || other === void 0 ? void 0 : other.propsInput,
227
231
  autoComplete: 'off'
228
- } }), open && (_jsx("div", { className: 'listDiv', "data-relative": listPositionRelative, children: _jsxs("ul", { ref: refList, className: `list ${open ? 'open' : ''}`, children: [(filteredData.length === 0 || loading) && _jsx("div", { className: `message ${loading ? 'loading' : ''}`, children: loading ? loadingMessage : notFoundMessage }), filteredData.map((item, key) => {
232
+ } }), open && ((0, jsx_runtime_1.jsx)("div", { className: 'listDiv', "data-relative": listPositionRelative, children: (0, jsx_runtime_1.jsxs)("ul", { ref: refList, className: `list ${open ? 'open' : ''}`, children: [(filteredData.length === 0 || loading) && (0, jsx_runtime_1.jsx)("div", { className: `message ${loading ? 'loading' : ''}`, children: loading ? loadingMessage : notFoundMessage }), filteredData.map((item, key) => {
229
233
  const itemValue = item[valueKey];
230
234
  const itemLabel = item[labelKey];
231
- return (_jsxs("li", { className: `item ${itemValue === selectedValue ? 'active' : ''}`, "data-value": itemValue, "data-label": itemLabel, onClick: () => setValue(item, false), children: [item.create && _jsx("span", { className: 'newCreate', children: "Yeni Olu\u015Ftur: " }), itemComponent ? itemComponent(item) : itemLabel] }, key));
235
+ return ((0, jsx_runtime_1.jsxs)("li", { className: `item ${itemValue === selectedValue ? 'active' : ''}`, "data-value": itemValue, "data-label": itemLabel, onClick: () => setValue(item, false), children: [item.create && (0, jsx_runtime_1.jsx)("span", { className: 'newCreate', children: "Yeni Olu\u015Ftur: " }), itemComponent ? itemComponent(item) : itemLabel] }, key));
232
236
  })] }) }))] }));
233
237
  });
234
238
  const setFixedPosition = (refMain) => {
@@ -1,17 +1,20 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uploadBase_CreateForm = exports.UploadBase = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
2
5
  /**
3
6
  * Copyright (c) 2024
4
7
  * @author: izzetseydaoglu
5
8
  * @last-modified: 11.06.2024 02:39
6
9
  */
7
- import { useEffect, useRef } from "react";
8
- import { alert_add } from "../alert";
10
+ const react_1 = require("react");
11
+ const alert_1 = require("../alert");
9
12
  const upload_ext_ok = ["pdf", "doc", "docx", "xls", "xlsx", "jpg", "jpeg", "png", "bmp", "tiff", "tif", "udf", "txt", "rtf", "csv", "xml", "zip", "rar"];
10
13
  const upload_maxsize = 30;
11
14
  const upload_maxfile = 50;
12
- export const UploadBase = ({ component = "div", children, targetForm, onChange, name = "file__", required = true, multiple = false, maxSize = upload_maxsize, maxFile = upload_maxfile, ext_ok = upload_ext_ok, style, className, refUploadInput = null, label }) => {
13
- const ref = useRef(null);
14
- useEffect(() => {
15
+ const UploadBase = ({ component = "div", children, targetForm, onChange, name = "file__", required = true, multiple = false, maxSize = upload_maxsize, maxFile = upload_maxfile, ext_ok = upload_ext_ok, style, className, refUploadInput = null, label }) => {
16
+ const ref = (0, react_1.useRef)(null);
17
+ (0, react_1.useEffect)(() => {
15
18
  if (refUploadInput)
16
19
  refUploadInput.current = ref.current;
17
20
  }, [ref.current]);
@@ -21,7 +24,7 @@ export const UploadBase = ({ component = "div", children, targetForm, onChange,
21
24
  return null;
22
25
  }
23
26
  if (e.target.files.length > maxFile) {
24
- alert_add({ type: "error", message: "En fazla " + maxFile + " dosya seçebilirsiniz." });
27
+ (0, alert_1.alert_add)({ type: "error", message: "En fazla " + maxFile + " dosya seçebilirsiniz." });
25
28
  e.target.value = null;
26
29
  return null;
27
30
  }
@@ -30,10 +33,10 @@ export const UploadBase = ({ component = "div", children, targetForm, onChange,
30
33
  const size = file.size;
31
34
  const ext = file.name.replace(/^.*\./, "").toLowerCase();
32
35
  if (ext_ok.indexOf(ext) === -1) {
33
- alert_add({ type: "error", message: "Yüklemeye çalıştığınız dosya türü desteklenmiyor. Desteklenen dosya türleri: " + ext_ok.join(", ") });
36
+ (0, alert_1.alert_add)({ type: "error", message: "Yüklemeye çalıştığınız dosya türü desteklenmiyor. Desteklenen dosya türleri: " + ext_ok.join(", ") });
34
37
  }
35
38
  else if (size > maxSize * 1000000) {
36
- alert_add({ type: "error", message: "En fazla " + maxSize + "MB büyüklüğündeki dosyaları seçebilirsiniz." });
39
+ (0, alert_1.alert_add)({ type: "error", message: "En fazla " + maxSize + "MB büyüklüğündeki dosyaları seçebilirsiniz." });
37
40
  }
38
41
  else {
39
42
  fileList.push(file);
@@ -62,7 +65,7 @@ export const UploadBase = ({ component = "div", children, targetForm, onChange,
62
65
  cursor: "pointer"
63
66
  };
64
67
  const Component = component.toLowerCase();
65
- return (_jsxs(Component, { className: className, style: { ...defaultStyle, ...style }, "data-label": label !== null && label !== void 0 ? label : "", children: [children, _jsx("input", { ref: ref, type: "file", required: required, onChange: fileSelected, multiple: multiple, accept: ext_ok.map((i) => "." + i).join(","), style: {
68
+ return ((0, jsx_runtime_1.jsxs)(Component, { className: className, style: { ...defaultStyle, ...style }, "data-label": label !== null && label !== void 0 ? label : "", children: [children, (0, jsx_runtime_1.jsx)("input", { ref: ref, type: "file", required: required, onChange: fileSelected, multiple: multiple, accept: ext_ok.map((i) => "." + i).join(","), style: {
66
69
  position: "absolute",
67
70
  top: 0,
68
71
  left: 0,
@@ -73,7 +76,8 @@ export const UploadBase = ({ component = "div", children, targetForm, onChange,
73
76
  zIndex: 1
74
77
  } })] }));
75
78
  };
76
- export const uploadBase_CreateForm = (formData) => {
79
+ exports.UploadBase = UploadBase;
80
+ const uploadBase_CreateForm = (formData) => {
77
81
  var _a;
78
82
  let newform = { ...formData };
79
83
  const list = (_a = formData["uploadBaseList"]) !== null && _a !== void 0 ? _a : {};
@@ -82,3 +86,4 @@ export const uploadBase_CreateForm = (formData) => {
82
86
  delete newform["uploadBaseListName"];
83
87
  return newform;
84
88
  };
89
+ exports.uploadBase_CreateForm = uploadBase_CreateForm;
@@ -1,9 +1,12 @@
1
- export * from "./Button";
2
- export * from "./Checkbox";
3
- export * from "./Dialog";
4
- export * from "./Form";
5
- export * from "./FormOlustur";
6
- export * from "./Input";
7
- export * from "./Label";
8
- export * from "./SearchableInput";
9
- export * from "./UploadBase";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./Button"), exports);
5
+ tslib_1.__exportStar(require("./Checkbox"), exports);
6
+ tslib_1.__exportStar(require("./Dialog"), exports);
7
+ tslib_1.__exportStar(require("./Form"), exports);
8
+ tslib_1.__exportStar(require("./FormOlustur"), exports);
9
+ tslib_1.__exportStar(require("./Input"), exports);
10
+ tslib_1.__exportStar(require("./Label"), exports);
11
+ tslib_1.__exportStar(require("./SearchableInput"), exports);
12
+ tslib_1.__exportStar(require("./UploadBase"), exports);
@@ -1,45 +1,51 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useState } from 'react';
3
- import styles from './index.module.css';
4
- export const Row = ({ children, className = '', style, flexDirection = 'row', flexWrap = 'wrap', justifyContent = 'flex-start', alignContent = 'center', alignItems = 'center', rowSpacing = 2, colSpacing = 2, ...other }) => {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DevelopGridComponent = exports.Hidden = exports.Col = exports.Row = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = tslib_1.__importStar(require("react"));
7
+ const index_module_css_1 = tslib_1.__importDefault(require("./index.module.css"));
8
+ const Row = ({ children, className = '', style, flexDirection = 'row', flexWrap = 'wrap', justifyContent = 'flex-start', alignContent = 'center', alignItems = 'center', rowSpacing = 2, colSpacing = 2, ...other }) => {
5
9
  const classes = [
6
- styles.row,
7
- rowSpacing !== undefined && styles[`row-spacing-${rowSpacing}`],
8
- colSpacing !== undefined && styles[`col-spacing-${colSpacing}`],
9
- flexDirection !== 'row' && styles[`flex-${flexDirection.replace('-', '-')}`],
10
- flexWrap !== 'wrap' && styles[`flex-${flexWrap}`],
11
- justifyContent !== 'flex-start' && styles[`justify-${justifyContent.replace('flex-', '').replace('space-', '')}`],
12
- alignItems !== 'center' && styles[`align-items-${alignItems.replace('flex-', '')}`],
13
- alignContent !== 'center' && styles[`align-content-${alignContent.replace('flex-', '')}`],
10
+ index_module_css_1.default.row,
11
+ rowSpacing !== undefined && index_module_css_1.default[`row-spacing-${rowSpacing}`],
12
+ colSpacing !== undefined && index_module_css_1.default[`col-spacing-${colSpacing}`],
13
+ flexDirection !== 'row' && index_module_css_1.default[`flex-${flexDirection.replace('-', '-')}`],
14
+ flexWrap !== 'wrap' && index_module_css_1.default[`flex-${flexWrap}`],
15
+ justifyContent !== 'flex-start' && index_module_css_1.default[`justify-${justifyContent.replace('flex-', '').replace('space-', '')}`],
16
+ alignItems !== 'center' && index_module_css_1.default[`align-items-${alignItems.replace('flex-', '')}`],
17
+ alignContent !== 'center' && index_module_css_1.default[`align-content-${alignContent.replace('flex-', '')}`],
14
18
  className
15
19
  ]
16
20
  .filter(Boolean)
17
21
  .join(' ');
18
- return (_jsx("div", { className: classes, style: style, ...other, children: children }));
22
+ return ((0, jsx_runtime_1.jsx)("div", { className: classes, style: style, ...other, children: children }));
19
23
  };
20
- export const Col = ({ children, className = '', style, xs, sm, md, lg, xl, xxl, ...other }) => {
24
+ exports.Row = Row;
25
+ const Col = ({ children, className = '', style, xs, sm, md, lg, xl, xxl, ...other }) => {
21
26
  // Cascading logic - aynı sizin component'inizdeki gibi
22
27
  const classes = [
23
- styles.col,
28
+ index_module_css_1.default.col,
24
29
  // Sadece belirtilen breakpoint'ler için class ekle
25
- xs && styles[`col-xs-${xs}`],
26
- sm && styles[`col-sm-${sm}`],
27
- md && styles[`col-md-${md}`],
28
- lg && styles[`col-lg-${lg}`],
29
- xl && styles[`col-xl-${xl}`],
30
- xxl && styles[`col-xxl-${xxl}`],
30
+ xs && index_module_css_1.default[`col-xs-${xs}`],
31
+ sm && index_module_css_1.default[`col-sm-${sm}`],
32
+ md && index_module_css_1.default[`col-md-${md}`],
33
+ lg && index_module_css_1.default[`col-lg-${lg}`],
34
+ xl && index_module_css_1.default[`col-xl-${xl}`],
35
+ xxl && index_module_css_1.default[`col-xxl-${xxl}`],
31
36
  className
32
37
  ]
33
38
  .filter(Boolean)
34
39
  .join(' ');
35
- return (_jsx("div", { className: classes, style: style, ...other, children: children }));
40
+ return ((0, jsx_runtime_1.jsx)("div", { className: classes, style: style, ...other, children: children }));
36
41
  };
37
- export const Hidden = ({ children, hidden, onlyHidden, ...other }) => {
42
+ exports.Col = Col;
43
+ const Hidden = ({ children, hidden, onlyHidden, ...other }) => {
38
44
  const existingClassName = children.props.className || '';
39
45
  const hiddenClasses = [];
40
46
  if (onlyHidden) {
41
47
  onlyHidden.forEach((breakpoint) => {
42
- hiddenClasses.push(styles[`hidden-${breakpoint}`]);
48
+ hiddenClasses.push(index_module_css_1.default[`hidden-${breakpoint}`]);
43
49
  });
44
50
  }
45
51
  else if (hidden) {
@@ -48,20 +54,21 @@ export const Hidden = ({ children, hidden, onlyHidden, ...other }) => {
48
54
  const targetIndex = breakpoints.indexOf(hidden);
49
55
  if (targetIndex !== -1) {
50
56
  for (let i = 0; i <= targetIndex; i++) {
51
- hiddenClasses.push(styles[`hidden-${breakpoints[i]}`]);
57
+ hiddenClasses.push(index_module_css_1.default[`hidden-${breakpoints[i]}`]);
52
58
  }
53
59
  }
54
60
  }
55
61
  const newClassName = [existingClassName, ...hiddenClasses].filter(Boolean).join(' ');
56
- return React.cloneElement(children, {
62
+ return react_1.default.cloneElement(children, {
57
63
  className: newClassName,
58
64
  ...other
59
65
  });
60
66
  };
61
- export const DevelopGridComponent = () => {
62
- const [currentBreakpoint, setCurrentBreakpoint] = useState('');
67
+ exports.Hidden = Hidden;
68
+ const DevelopGridComponent = () => {
69
+ const [currentBreakpoint, setCurrentBreakpoint] = (0, react_1.useState)('');
63
70
  // Breakpoint detector
64
- React.useEffect(() => {
71
+ react_1.default.useEffect(() => {
65
72
  const updateBreakpoint = () => {
66
73
  const width = window.innerWidth;
67
74
  let breakpoint = '';
@@ -83,7 +90,7 @@ export const DevelopGridComponent = () => {
83
90
  window.addEventListener('resize', updateBreakpoint);
84
91
  return () => window.removeEventListener('resize', updateBreakpoint);
85
92
  }, []);
86
- return (_jsxs("div", { style: {
93
+ return ((0, jsx_runtime_1.jsxs)("div", { style: {
87
94
  position: 'fixed',
88
95
  bottom: '10px',
89
96
  right: '10px',
@@ -94,3 +101,4 @@ export const DevelopGridComponent = () => {
94
101
  zIndex: 9999999
95
102
  }, children: ["Current: ", currentBreakpoint] }));
96
103
  };
104
+ exports.DevelopGridComponent = DevelopGridComponent;
@@ -1,23 +1,26 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const iconMap = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.iconMap = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ exports.iconMap = {
3
6
  close: {
4
7
  viewBox: '0 -960 960 960',
5
- content: (_jsx(_Fragment, { children: _jsx("path", { d: "m336-280-56-56 144-144-144-143 56-56 144 144 143-144 56 56-144 143 144 144-56 56-143-144-144 144Z" }) }))
8
+ content: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("path", { d: "m336-280-56-56 144-144-144-143 56-56 144 144 143-144 56 56-144 143 144 144-56 56-143-144-144 144Z" }) }))
6
9
  },
7
10
  search: {
8
11
  viewBox: '0 0 24 24',
9
- content: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M0 0h24v24H0V0z", fill: "none" }), _jsx("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })] }))
12
+ content: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }), (0, jsx_runtime_1.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })] }))
10
13
  },
11
14
  edit: {
12
15
  viewBox: '0 -960 960 960',
13
- content: (_jsx("path", { d: "M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z" }))
16
+ content: ((0, jsx_runtime_1.jsx)("path", { d: "M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z" }))
14
17
  },
15
18
  keyboard_arrow_up: {
16
19
  viewBox: '0 -960 960 960',
17
- content: _jsx("path", { d: "M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z" })
20
+ content: (0, jsx_runtime_1.jsx)("path", { d: "M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z" })
18
21
  },
19
22
  keyboard_arrow_down: {
20
23
  viewBox: '0 -960 960 960',
21
- content: _jsx("path", { d: "M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z" })
24
+ content: (0, jsx_runtime_1.jsx)("path", { d: "M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z" })
22
25
  }
23
26
  };
@@ -1,6 +1,9 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { iconMap } from './icons';
3
- export const iconList = Object.keys(iconMap);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Icon = exports.iconList = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const icons_1 = require("./icons");
6
+ exports.iconList = Object.keys(icons_1.iconMap);
4
7
  const defaultIconStyle = {
5
8
  userSelect: 'none',
6
9
  width: '1em',
@@ -12,23 +15,24 @@ const defaultIconStyle = {
12
15
  alignItems: 'center',
13
16
  justifyContent: 'center'
14
17
  };
15
- export const Icon = ({ name, iconMui, customIcon, fontSize, color, className, style, ...other }) => {
18
+ const Icon = ({ name, iconMui, customIcon, fontSize, color, className, style, ...other }) => {
16
19
  if (iconMui) {
17
- return (_jsx("span", { className: `material-icons ${className || ''}`, style: {
20
+ return ((0, jsx_runtime_1.jsx)("span", { className: `material-icons ${className || ''}`, style: {
18
21
  ...defaultIconStyle,
19
22
  ...style,
20
23
  fontSize: fontSize || '1.3rem',
21
24
  color: color || 'inherit'
22
25
  }, "aria-hidden": "true", ...other, children: iconMui }));
23
26
  }
24
- const iconComponent = name ? iconMap[name] : customIcon;
27
+ const iconComponent = name ? icons_1.iconMap[name] : customIcon;
25
28
  if (!iconComponent) {
26
- return _jsx("span", { children: "\u26A0\uFE0F" });
29
+ return (0, jsx_runtime_1.jsx)("span", { children: "\u26A0\uFE0F" });
27
30
  }
28
- return (_jsx("span", { className: className, style: {
31
+ return ((0, jsx_runtime_1.jsx)("span", { className: className, style: {
29
32
  ...defaultIconStyle,
30
33
  ...style,
31
34
  fontSize: fontSize || '1.5rem',
32
35
  color: color || 'inherit'
33
- }, ...other, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: iconComponent.viewBox, fill: 'currentColor', width: "1em", height: "1em", style: { display: 'block', flexShrink: 0 }, children: iconComponent.content }) }));
36
+ }, ...other, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: iconComponent.viewBox, fill: 'currentColor', width: "1em", height: "1em", style: { display: 'block', flexShrink: 0 }, children: iconComponent.content }) }));
34
37
  };
38
+ exports.Icon = Icon;
package/_dist/icon/mui.js CHANGED
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/_dist/index.js CHANGED
@@ -1,19 +1,22 @@
1
- export * from './_lib/baseFunctions';
2
- export * from './_lib/inputMask';
3
- export * from './_lib/listFunctions';
4
- export * from './_lib/storage/cookies';
5
- export * from './_lib/storage/encData';
6
- export * from './_lib/storage/localStorage';
7
- export * from './_lib/storage/sessionStorage';
8
- export * from './_lib/useInterval';
9
- export * from './alert';
10
- export * from './box';
11
- export * from './countDown';
12
- export * from './dateTime';
13
- export * from './form';
14
- export * from './grid';
15
- export * from './icon';
16
- export * from './menu';
17
- export * from './modal';
18
- export * from './popover';
19
- export * from './tooltip';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./_lib/baseFunctions"), exports);
5
+ tslib_1.__exportStar(require("./_lib/inputMask"), exports);
6
+ tslib_1.__exportStar(require("./_lib/listFunctions"), exports);
7
+ tslib_1.__exportStar(require("./_lib/storage/cookies"), exports);
8
+ tslib_1.__exportStar(require("./_lib/storage/encData"), exports);
9
+ tslib_1.__exportStar(require("./_lib/storage/localStorage"), exports);
10
+ tslib_1.__exportStar(require("./_lib/storage/sessionStorage"), exports);
11
+ tslib_1.__exportStar(require("./_lib/useInterval"), exports);
12
+ tslib_1.__exportStar(require("./alert"), exports);
13
+ tslib_1.__exportStar(require("./box"), exports);
14
+ tslib_1.__exportStar(require("./countDown"), exports);
15
+ tslib_1.__exportStar(require("./dateTime"), exports);
16
+ tslib_1.__exportStar(require("./form"), exports);
17
+ tslib_1.__exportStar(require("./grid"), exports);
18
+ tslib_1.__exportStar(require("./icon"), exports);
19
+ tslib_1.__exportStar(require("./menu"), exports);
20
+ tslib_1.__exportStar(require("./modal"), exports);
21
+ tslib_1.__exportStar(require("./popover"), exports);
22
+ tslib_1.__exportStar(require("./tooltip"), exports);