@pdg/react-form 1.0.151 → 1.0.152
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.
|
@@ -12,7 +12,7 @@ export interface FormAutocompleteItem<T extends FormAutocompleteSingleValue> {
|
|
|
12
12
|
export type FormAutocompleteItems<T extends FormAutocompleteSingleValue> = FormAutocompleteItem<T>[];
|
|
13
13
|
export type FormAutocompleteValue<T extends FormAutocompleteSingleValue, Multiple extends boolean | undefined> = ([Multiple] extends [true] ? T[] : T) | undefined;
|
|
14
14
|
export type FormAutocompleteComponentValue<T extends FormAutocompleteSingleValue, Multiple extends boolean | undefined> = ([Multiple] extends [true] ? FormAutocompleteItem<T>[] : FormAutocompleteItem<T>) | null;
|
|
15
|
-
export interface FormAutocompleteProps<T extends FormAutocompleteSingleValue, Multiple extends boolean | undefined = undefined> extends CommonSxProps, Omit<FormValueItemProps<FormAutocompleteValue<T, Multiple>>, 'value'>, Pick<FormTextFieldProps<T>, 'required' | 'focused' | 'labelShrink'> {
|
|
15
|
+
export interface FormAutocompleteProps<T extends FormAutocompleteSingleValue, Multiple extends boolean | undefined = undefined> extends CommonSxProps, Omit<FormValueItemProps<FormAutocompleteValue<T, Multiple>>, 'value'>, Pick<FormTextFieldProps<T>, 'required' | 'focused' | 'labelShrink' | 'onFocus' | 'onBlur'> {
|
|
16
16
|
value?: FormAutocompleteValue<T, Multiple>;
|
|
17
17
|
items?: FormAutocompleteItems<T>;
|
|
18
18
|
multiple?: Multiple;
|
package/dist/index.esm.js
CHANGED
|
@@ -4050,7 +4050,7 @@ FormTextEditor.displayName = 'FormTextEditor';var FormAutocomplete = ToForwardRe
|
|
|
4050
4050
|
//----------------------------------------------------------------------------------------------------------------
|
|
4051
4051
|
name = _a.name, labelIcon = _a.labelIcon, label = _a.label, initLoading = _a.loading, initItems = _a.items, initValue = _a.value, initData = _a.data, initError = _a.error, helperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, exceptValue = _a.exceptValue, width = _a.width, placeholder = _a.placeholder, multiple = _a.multiple, _b = _a.formValueSeparator, formValueSeparator = _b === void 0 ? ',' : _b, formValueSort = _a.formValueSort, disablePortal = _a.disablePortal, _c = _a.noOptionsText, noOptionsText = _c === void 0 ? '항목이 없습니다' : _c, loadingText = _a.loadingText, limitTags = _a.limitTags, getLimitTagsText = _a.getLimitTagsText, openOnFocus = _a.openOnFocus, disableClearable = _a.disableClearable, async = _a.async, initHidden = _a.hidden, onLoadItems = _a.onLoadItems, onAsyncLoadValueItem = _a.onAsyncLoadValueItem, onRenderItem = _a.onRenderItem, onRenderTag = _a.onRenderTag, onAddItem = _a.onAddItem, getOptionDisabled = _a.getOptionDisabled,
|
|
4052
4052
|
//----------------------------------------------------------------------------------------------------------------
|
|
4053
|
-
onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate,
|
|
4053
|
+
onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate, onFocus = _a.onFocus, onBlur = _a.onBlur,
|
|
4054
4054
|
//----------------------------------------------------------------------------------------------------------------
|
|
4055
4055
|
className = _a.className, initStyle = _a.style, sx = _a.sx;
|
|
4056
4056
|
/********************************************************************************************************************
|
|
@@ -4541,7 +4541,15 @@ FormTextEditor.displayName = 'FormTextEditor';var FormAutocomplete = ToForwardRe
|
|
|
4541
4541
|
}, endAdornment: (React.createElement(React.Fragment, null,
|
|
4542
4542
|
loading || isOnGetItemLoading ? React.createElement(CircularProgress, { color: 'inherit', size: 20 }) : null,
|
|
4543
4543
|
params.InputProps.endAdornment)) }),
|
|
4544
|
-
htmlInput: __assign(__assign({}, params.inputProps), { style: __assign(__assign({}, (_a = params.inputProps) === null || _a === void 0 ? void 0 : _a.style), (variant === 'outlined' && size === 'small' ? { marginTop: 1 } : undefined)), tabIndex: readOnly || disabled ? -1 : undefined
|
|
4544
|
+
htmlInput: __assign(__assign({}, params.inputProps), { style: __assign(__assign({}, (_a = params.inputProps) === null || _a === void 0 ? void 0 : _a.style), (variant === 'outlined' && size === 'small' ? { marginTop: 1 } : undefined)), tabIndex: readOnly || disabled ? -1 : undefined, onFocus: function (e) {
|
|
4545
|
+
var _a, _b;
|
|
4546
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
4547
|
+
(_b = params === null || params === void 0 ? void 0 : (_a = params.inputProps).onFocus) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
4548
|
+
}, onBlur: function (e) {
|
|
4549
|
+
var _a, _b;
|
|
4550
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
4551
|
+
(_b = params === null || params === void 0 ? void 0 : (_a = params.inputProps).onBlur) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
4552
|
+
} }),
|
|
4545
4553
|
};
|
|
4546
4554
|
return (React.createElement(FormTextField, __assign({}, params, { ref: textFieldRef, name: name, variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, labelShrink: labelShrink, required: required, focused: focused, error: error, readOnly: readOnly, helperText: error ? errorHelperText : helperText, slotProps: slotProps, placeholder: placeholder, noFormValueItem: true })));
|
|
4547
4555
|
} }));
|
package/dist/index.js
CHANGED
|
@@ -4050,7 +4050,7 @@ FormTextEditor.displayName = 'FormTextEditor';var FormAutocomplete = ToForwardRe
|
|
|
4050
4050
|
//----------------------------------------------------------------------------------------------------------------
|
|
4051
4051
|
name = _a.name, labelIcon = _a.labelIcon, label = _a.label, initLoading = _a.loading, initItems = _a.items, initValue = _a.value, initData = _a.data, initError = _a.error, helperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, exceptValue = _a.exceptValue, width = _a.width, placeholder = _a.placeholder, multiple = _a.multiple, _b = _a.formValueSeparator, formValueSeparator = _b === void 0 ? ',' : _b, formValueSort = _a.formValueSort, disablePortal = _a.disablePortal, _c = _a.noOptionsText, noOptionsText = _c === void 0 ? '항목이 없습니다' : _c, loadingText = _a.loadingText, limitTags = _a.limitTags, getLimitTagsText = _a.getLimitTagsText, openOnFocus = _a.openOnFocus, disableClearable = _a.disableClearable, async = _a.async, initHidden = _a.hidden, onLoadItems = _a.onLoadItems, onAsyncLoadValueItem = _a.onAsyncLoadValueItem, onRenderItem = _a.onRenderItem, onRenderTag = _a.onRenderTag, onAddItem = _a.onAddItem, getOptionDisabled = _a.getOptionDisabled,
|
|
4052
4052
|
//----------------------------------------------------------------------------------------------------------------
|
|
4053
|
-
onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate,
|
|
4053
|
+
onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate, onFocus = _a.onFocus, onBlur = _a.onBlur,
|
|
4054
4054
|
//----------------------------------------------------------------------------------------------------------------
|
|
4055
4055
|
className = _a.className, initStyle = _a.style, sx = _a.sx;
|
|
4056
4056
|
/********************************************************************************************************************
|
|
@@ -4541,7 +4541,15 @@ FormTextEditor.displayName = 'FormTextEditor';var FormAutocomplete = ToForwardRe
|
|
|
4541
4541
|
}, endAdornment: (React.createElement(React.Fragment, null,
|
|
4542
4542
|
loading || isOnGetItemLoading ? React.createElement(material.CircularProgress, { color: 'inherit', size: 20 }) : null,
|
|
4543
4543
|
params.InputProps.endAdornment)) }),
|
|
4544
|
-
htmlInput: __assign(__assign({}, params.inputProps), { style: __assign(__assign({}, (_a = params.inputProps) === null || _a === void 0 ? void 0 : _a.style), (variant === 'outlined' && size === 'small' ? { marginTop: 1 } : undefined)), tabIndex: readOnly || disabled ? -1 : undefined
|
|
4544
|
+
htmlInput: __assign(__assign({}, params.inputProps), { style: __assign(__assign({}, (_a = params.inputProps) === null || _a === void 0 ? void 0 : _a.style), (variant === 'outlined' && size === 'small' ? { marginTop: 1 } : undefined)), tabIndex: readOnly || disabled ? -1 : undefined, onFocus: function (e) {
|
|
4545
|
+
var _a, _b;
|
|
4546
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
4547
|
+
(_b = params === null || params === void 0 ? void 0 : (_a = params.inputProps).onFocus) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
4548
|
+
}, onBlur: function (e) {
|
|
4549
|
+
var _a, _b;
|
|
4550
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
4551
|
+
(_b = params === null || params === void 0 ? void 0 : (_a = params.inputProps).onBlur) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
4552
|
+
} }),
|
|
4545
4553
|
};
|
|
4546
4554
|
return (React.createElement(FormTextField, __assign({}, params, { ref: textFieldRef, name: name, variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, labelShrink: labelShrink, required: required, focused: focused, error: error, readOnly: readOnly, helperText: error ? errorHelperText : helperText, slotProps: slotProps, placeholder: placeholder, noFormValueItem: true })));
|
|
4547
4555
|
} }));
|