@sydsoft/base 1.32.0 → 1.33.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/esm/form/Input.d.ts
CHANGED
package/dist/esm/form/Input.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useEffect, useRef, useState } from
|
|
4
|
-
import { seoCevirFunction, tumuBuyukCevir, tumuKucukCevir } from
|
|
5
|
-
import {
|
|
6
|
-
import { alert_add } from
|
|
7
|
-
import {
|
|
8
|
-
import styles from
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { seoCevirFunction, tumuBuyukCevir, tumuKucukCevir } from '../_lib/baseFunctions';
|
|
5
|
+
import { applyInputMask } from '../_lib/inputMask';
|
|
6
|
+
import { alert_add } from '../alert';
|
|
7
|
+
import { Dialog } from './Dialog';
|
|
8
|
+
import styles from './styles/Input.module.css';
|
|
9
9
|
export var Input = function (_a) {
|
|
10
10
|
var componentRef = _a.componentRef, inputRef = _a.inputRef, className = _a.className, propsComponent = _a.propsComponent, propsInput = _a.propsInput, id = _a.id, name = _a.name, value = _a.value, type = _a.type, label = _a.label, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, placeholder = _a.placeholder, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, onClick = _a.onClick, onKeyPress = _a.onKeyPress, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown, disabled = _a.disabled, required = _a.required, loading = _a.loading, autoFocus = _a.autoFocus, select = _a.select, _b = _a.valueKey, valueKey = _b === void 0 ? 'value' : _b, _c = _a.labelKey, labelKey = _c === void 0 ? 'label' : _c, ilkSec = _a.ilkSec, multiline = _a.multiline, rows = _a.rows, sadeceYazi = _a.sadeceYazi, sadeceSayi = _a.sadeceSayi, tumuBuyuk = _a.tumuBuyuk, tumuKucuk = _a.tumuKucuk, seoCevir = _a.seoCevir, dosyaNoGiris = _a.dosyaNoGiris, fileNameGiris = _a.fileNameGiris, dateGecmisKontrol = _a.dateGecmisKontrol, autoSelectText = _a.autoSelectText, _d = _a.mask, mask = _d === void 0 ? '' : _d, _e = _a.maskSettings, maskSettings = _e === void 0 ? {
|
|
11
11
|
clearIfNotMatch: true,
|
|
@@ -38,7 +38,7 @@ export var Input = function (_a) {
|
|
|
38
38
|
}, [value]);
|
|
39
39
|
useEffect(function () {
|
|
40
40
|
// if (type === "number") sadeceSayi = true; //TODO: sadeceSayi burada değiştirelemez ki!!!
|
|
41
|
-
if (select && ilkSec && value
|
|
41
|
+
if (select && ilkSec && (value === '' || !value)) {
|
|
42
42
|
if (select.length) {
|
|
43
43
|
var ilkItem = select[0][valueKey] ? select[0][valueKey] : '';
|
|
44
44
|
onChange && onChange({ target: { name: name, value: ilkItem } });
|