@pdg/react-form 1.0.150 → 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;
@@ -1,4 +1,4 @@
1
1
  import { SearchProps } from '../Search';
2
- export interface HashSearchProps extends SearchProps {
2
+ export interface HashSearchProps extends Omit<SearchProps, 'autoSubmit'> {
3
3
  onRequestHashChange(hash: string): void;
4
4
  }
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
  } }));
@@ -10814,5 +10822,5 @@ var SearchButton$1 = React.memo(SearchButton);var SearchMenuButton = function (_
10814
10822
  ref.current = r;
10815
10823
  }
10816
10824
  }
10817
- } }, props, { onSubmit: handleSubmit })));
10825
+ } }, props, { autoSubmit: true, onSubmit: handleSubmit })));
10818
10826
  });export{Form,FormAutocomplete,FormBlock,FormBody,FormButton$1 as FormButton,FormCheckbox,FormCol,FormCompanyNo,FormContext,FormContextDefaultValue,FormContextProvider,FormDatePicker,FormDateRangePicker,FormDateTimePicker,FormDivider,FormEmail,FormFile,FormFooter,FormHidden,FormImageFile,FormLabel$1 as FormLabel,FormMobile,FormMonthPicker,FormMonthRangePicker,FormNumber,FormPassword,FormPersonalNo,FormRadioGroup,FormRating,FormRow,FormSearch,FormSelect,FormSwitch,FormTag,FormTel,FormText,FormTextEditor,FormTextField,FormTextarea,FormTimePicker,FormToggleButtonGroup,FormUrl,FormYearPicker,FormYearRangePicker,HashSearch,Search,SearchButton$1 as SearchButton,SearchGroup,SearchGroupRow,SearchMenuButton,useFormState};
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
  } }));
@@ -10814,5 +10822,5 @@ var SearchButton$1 = React.memo(SearchButton);var SearchMenuButton = function (_
10814
10822
  ref.current = r;
10815
10823
  }
10816
10824
  }
10817
- } }, props, { onSubmit: handleSubmit })));
10825
+ } }, props, { autoSubmit: true, onSubmit: handleSubmit })));
10818
10826
  });exports.Form=Form;exports.FormAutocomplete=FormAutocomplete;exports.FormBlock=FormBlock;exports.FormBody=FormBody;exports.FormButton=FormButton$1;exports.FormCheckbox=FormCheckbox;exports.FormCol=FormCol;exports.FormCompanyNo=FormCompanyNo;exports.FormContext=FormContext;exports.FormContextDefaultValue=FormContextDefaultValue;exports.FormContextProvider=FormContextProvider;exports.FormDatePicker=FormDatePicker;exports.FormDateRangePicker=FormDateRangePicker;exports.FormDateTimePicker=FormDateTimePicker;exports.FormDivider=FormDivider;exports.FormEmail=FormEmail;exports.FormFile=FormFile;exports.FormFooter=FormFooter;exports.FormHidden=FormHidden;exports.FormImageFile=FormImageFile;exports.FormLabel=FormLabel$1;exports.FormMobile=FormMobile;exports.FormMonthPicker=FormMonthPicker;exports.FormMonthRangePicker=FormMonthRangePicker;exports.FormNumber=FormNumber;exports.FormPassword=FormPassword;exports.FormPersonalNo=FormPersonalNo;exports.FormRadioGroup=FormRadioGroup;exports.FormRating=FormRating;exports.FormRow=FormRow;exports.FormSearch=FormSearch;exports.FormSelect=FormSelect;exports.FormSwitch=FormSwitch;exports.FormTag=FormTag;exports.FormTel=FormTel;exports.FormText=FormText;exports.FormTextEditor=FormTextEditor;exports.FormTextField=FormTextField;exports.FormTextarea=FormTextarea;exports.FormTimePicker=FormTimePicker;exports.FormToggleButtonGroup=FormToggleButtonGroup;exports.FormUrl=FormUrl;exports.FormYearPicker=FormYearPicker;exports.FormYearRangePicker=FormYearRangePicker;exports.HashSearch=HashSearch;exports.Search=Search;exports.SearchButton=SearchButton$1;exports.SearchGroup=SearchGroup;exports.SearchGroupRow=SearchGroupRow;exports.SearchMenuButton=SearchMenuButton;exports.useFormState=useFormState;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pdg/react-form",
3
3
  "title": "React Form",
4
- "version": "1.0.150",
4
+ "version": "1.0.152",
5
5
  "description": "React Form",
6
6
  "type": "module",
7
7
  "types": "dist/index.d.ts",