@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.
- package/_dist/_lib/baseFunctions.js +24 -11
- package/_dist/_lib/inputMask.js +7 -3
- package/_dist/_lib/listFunctions.js +7 -2
- package/_dist/_lib/storage/cookies.js +20 -12
- package/_dist/_lib/storage/encData.js +10 -5
- package/_dist/_lib/storage/localStorage.js +23 -14
- package/_dist/_lib/storage/sessionStorage.js +23 -14
- package/_dist/_lib/useInterval.js +8 -5
- package/_dist/alert/index.js +22 -13
- package/_dist/box/Box.js +12 -8
- package/_dist/box/BoxContent.js +9 -4
- package/_dist/box/BoxFooter.js +9 -5
- package/_dist/box/BoxHeader.js +10 -6
- package/_dist/box/index.js +7 -4
- package/_dist/countDown/index.js +17 -12
- package/_dist/dateTime/index.js +4 -1
- package/_dist/form/Button.js +24 -20
- package/_dist/form/Checkbox.js +11 -6
- package/_dist/form/Dialog.js +12 -8
- package/_dist/form/Form.js +7 -4
- package/_dist/form/FormOlustur.js +16 -12
- package/_dist/form/Input.js +49 -44
- package/_dist/form/Label.js +10 -6
- package/_dist/form/SearchableInput.js +47 -43
- package/_dist/form/UploadBase.js +16 -11
- package/_dist/form/index.js +12 -9
- package/_dist/grid/index.js +38 -30
- package/_dist/icon/icons.js +10 -7
- package/_dist/icon/index.js +13 -9
- package/_dist/icon/mui.js +2 -1
- package/_dist/index.js +22 -19
- package/_dist/menu/index.js +20 -16
- package/_dist/modal/index.js +16 -12
- package/_dist/popover/index.js +37 -33
- package/_dist/tooltip/index.js +8 -4
- package/package.json +3 -5
- package/_lib/baseFunctions.ts +0 -94
- package/_lib/inputMask.ts +0 -257
- package/_lib/listFunctions.ts +0 -106
- package/_lib/storage/cookies.ts +0 -39
- package/_lib/storage/encData.ts +0 -41
- package/_lib/storage/localStorage.ts +0 -67
- package/_lib/storage/sessionStorage.ts +0 -67
- package/_lib/useInterval.ts +0 -30
- package/alert/index.module.css +0 -119
- package/alert/index.tsx +0 -131
- package/box/Box.module.css +0 -153
- package/box/Box.tsx +0 -33
- package/box/BoxContent.tsx +0 -18
- package/box/BoxFooter.tsx +0 -25
- package/box/BoxHeader.tsx +0 -46
- package/box/index.ts +0 -10
- package/countDown/index.tsx +0 -116
- package/dateTime/index.ts +0 -79
- package/form/Button.tsx +0 -143
- package/form/Checkbox.tsx +0 -48
- package/form/Dialog.tsx +0 -109
- package/form/Form.tsx +0 -19
- package/form/FormOlustur.tsx +0 -105
- package/form/Input.tsx +0 -364
- package/form/Label.tsx +0 -20
- package/form/SearchableInput.tsx +0 -406
- package/form/UploadBase.tsx +0 -133
- package/form/index.ts +0 -10
- package/form/styles/Button.module.css +0 -145
- package/form/styles/Input.module.css +0 -221
- package/form/styles/Label.module.css +0 -31
- package/form/styles/SearchableInput.module.css +0 -80
- package/global.d.ts +0 -9
- package/grid/index.module.css +0 -805
- package/grid/index.tsx +0 -171
- package/icon/icons.tsx +0 -33
- package/icon/index.tsx +0 -95
- package/icon/mui.tsx +0 -5932
- package/index.ts +0 -21
- package/menu/index.module.css +0 -92
- package/menu/index.tsx +0 -143
- package/modal/index.module.css +0 -77
- package/modal/index.tsx +0 -106
- package/npm_recovery_codes.txt +0 -5
- package/popover/index.module.css +0 -89
- package/popover/index.tsx +0 -392
- package/tooltip/index.tsx +0 -216
- package/tsconfig.json +0 -24
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const [
|
|
17
|
-
const [
|
|
18
|
-
const [
|
|
19
|
-
const [
|
|
20
|
-
|
|
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 (
|
|
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 && (
|
|
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 (
|
|
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) => {
|
package/_dist/form/UploadBase.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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 (
|
|
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
|
-
|
|
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;
|
package/_dist/form/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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);
|
package/_dist/grid/index.js
CHANGED
|
@@ -1,45 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
7
|
-
rowSpacing !== undefined &&
|
|
8
|
-
colSpacing !== undefined &&
|
|
9
|
-
flexDirection !== 'row' &&
|
|
10
|
-
flexWrap !== 'wrap' &&
|
|
11
|
-
justifyContent !== 'flex-start' &&
|
|
12
|
-
alignItems !== 'center' &&
|
|
13
|
-
alignContent !== 'center' &&
|
|
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 (
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: classes, style: style, ...other, children: children }));
|
|
19
23
|
};
|
|
20
|
-
|
|
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
|
-
|
|
28
|
+
index_module_css_1.default.col,
|
|
24
29
|
// Sadece belirtilen breakpoint'ler için class ekle
|
|
25
|
-
xs &&
|
|
26
|
-
sm &&
|
|
27
|
-
md &&
|
|
28
|
-
lg &&
|
|
29
|
-
xl &&
|
|
30
|
-
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 (
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: classes, style: style, ...other, children: children }));
|
|
36
41
|
};
|
|
37
|
-
|
|
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(
|
|
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(
|
|
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
|
|
62
|
+
return react_1.default.cloneElement(children, {
|
|
57
63
|
className: newClassName,
|
|
58
64
|
...other
|
|
59
65
|
});
|
|
60
66
|
};
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
exports.Hidden = Hidden;
|
|
68
|
+
const DevelopGridComponent = () => {
|
|
69
|
+
const [currentBreakpoint, setCurrentBreakpoint] = (0, react_1.useState)('');
|
|
63
70
|
// Breakpoint detector
|
|
64
|
-
|
|
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 (
|
|
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;
|
package/_dist/icon/icons.js
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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: (
|
|
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: (
|
|
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: (
|
|
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:
|
|
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:
|
|
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
|
};
|
package/_dist/icon/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
18
|
+
const Icon = ({ name, iconMui, customIcon, fontSize, color, className, style, ...other }) => {
|
|
16
19
|
if (iconMui) {
|
|
17
|
-
return (
|
|
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
|
|
29
|
+
return (0, jsx_runtime_1.jsx)("span", { children: "\u26A0\uFE0F" });
|
|
27
30
|
}
|
|
28
|
-
return (
|
|
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:
|
|
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
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/_dist/index.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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);
|