@pdg/react-form 1.0.65 → 1.0.66

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/index.esm.js CHANGED
@@ -2207,7 +2207,7 @@ styleInject(css_248z$l);var FormTextField = React__default.forwardRef(function (
2207
2207
  var _b;
2208
2208
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
2209
2209
  //----------------------------------------------------------------------------------------------------------------
2210
- name = _a.name, required = _a.required, initValue = _a.value, initData = _a.data, icon = _a.icon, labelIcon = _a.labelIcon, initLabel = _a.label, initError = _a.error, initHelperText = _a.helperText, exceptValue = _a.exceptValue, readOnly = _a.readOnly, tabIndex = _a.tabIndex, initDisabled = _a.disabled, placeholder = _a.placeholder, maxLength = _a.maxLength, clear = _a.clear, width = _a.width, initMuiInputProps = _a.InputProps, initMuiInputLabelProps = _a.InputLabelProps, initInputProps = _a.inputProps, initInputRef = _a.inputRef, select = _a.select, SelectProps = _a.SelectProps, multiline = _a.multiline, validPattern = _a.validPattern, invalidPattern = _a.invalidPattern, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, noFormValueItem = _a.noFormValueItem, hidden = _a.hidden, disableReturnKey = _a.disableReturnKey,
2210
+ name = _a.name, required = _a.required, initValue = _a.value, initData = _a.data, icon = _a.icon, labelIcon = _a.labelIcon, initLabel = _a.label, initError = _a.error, helperText = _a.helperText, exceptValue = _a.exceptValue, readOnly = _a.readOnly, tabIndex = _a.tabIndex, initDisabled = _a.disabled, placeholder = _a.placeholder, maxLength = _a.maxLength, clear = _a.clear, width = _a.width, initMuiInputProps = _a.InputProps, initMuiInputLabelProps = _a.InputLabelProps, initInputProps = _a.inputProps, initInputRef = _a.inputRef, select = _a.select, SelectProps = _a.SelectProps, multiline = _a.multiline, validPattern = _a.validPattern, invalidPattern = _a.invalidPattern, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, noFormValueItem = _a.noFormValueItem, hidden = _a.hidden, disableReturnKey = _a.disableReturnKey,
2211
2211
  //----------------------------------------------------------------------------------------------------------------
2212
2212
  onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate, onBlur = _a.onBlur, onKeyDown = _a.onKeyDown,
2213
2213
  //----------------------------------------------------------------------------------------------------------------
@@ -2228,7 +2228,7 @@ styleInject(css_248z$l);var FormTextField = React__default.forwardRef(function (
2228
2228
  var fullWidth = useMemo(function () { return (initFullWidth == null ? formFullWidth : initFullWidth); }, [initFullWidth, formFullWidth]);
2229
2229
  // State -----------------------------------------------------------------------------------------------------------
2230
2230
  var _d = useAutoUpdateState$1(initError), error = _d[0], setError = _d[1];
2231
- var _e = useAutoUpdateState$1(initHelperText), helperText = _e[0], setHelperText = _e[1];
2231
+ var _e = useState(), errorHelperText = _e[0], setErrorHelperText = _e[1];
2232
2232
  var _f = useState(false), showClear = _f[0], setShowClear = _f[1];
2233
2233
  var _g = useAutoUpdateState$1(initDisabled), disabled = _g[0], setDisabled = _g[1];
2234
2234
  var _h = useAutoUpdateState$1(initData), data = _h[0], setData = _h[1];
@@ -2304,39 +2304,39 @@ styleInject(css_248z$l);var FormTextField = React__default.forwardRef(function (
2304
2304
  (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.focus();
2305
2305
  }
2306
2306
  }, [initInputRef, inputRef]);
2307
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
2308
- var setErrorHelperText = useCallback(function (error, helperText) {
2307
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
2308
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
2309
2309
  setError(error);
2310
- setHelperText(helperText);
2311
- }, [setError, setHelperText]);
2310
+ setErrorHelperText(errorHelperText);
2311
+ }, [setError]);
2312
2312
  // Function - validate ---------------------------------------------------------------------------------------------
2313
2313
  var validate = useCallback(function (value) {
2314
2314
  if (required && empty(value)) {
2315
- setErrorHelperText(true, '필수 입력 항목입니다.');
2315
+ setErrorErrorHelperText(true, '필수 입력 항목입니다.');
2316
2316
  return false;
2317
2317
  }
2318
2318
  if (notEmpty(value) && validPattern) {
2319
2319
  if (!new RegExp(validPattern).test(value)) {
2320
- setErrorHelperText(true, '형식이 일치하지 않습니다.');
2320
+ setErrorErrorHelperText(true, '형식이 일치하지 않습니다.');
2321
2321
  return false;
2322
2322
  }
2323
2323
  }
2324
2324
  if (notEmpty(value) && invalidPattern) {
2325
2325
  if (new RegExp(invalidPattern).test(value)) {
2326
- setErrorHelperText(true, '형식이 일치하지 않습니다.');
2326
+ setErrorErrorHelperText(true, '형식이 일치하지 않습니다.');
2327
2327
  return false;
2328
2328
  }
2329
2329
  }
2330
2330
  if (onValidate) {
2331
2331
  var validateResult = onValidate(value);
2332
2332
  if (validateResult != null && validateResult !== true) {
2333
- setErrorHelperText(true, validateResult);
2333
+ setErrorErrorHelperText(true, validateResult);
2334
2334
  return false;
2335
2335
  }
2336
2336
  }
2337
- setErrorHelperText(false, initHelperText);
2337
+ setErrorErrorHelperText(false, undefined);
2338
2338
  return true;
2339
- }, [required, validPattern, invalidPattern, onValidate, setErrorHelperText, initHelperText]);
2339
+ }, [required, validPattern, invalidPattern, onValidate, setErrorErrorHelperText]);
2340
2340
  // Memo - muiInputProps --------------------------------------------------------------------------------------------
2341
2341
  var muiInputProps = useMemo(function () {
2342
2342
  var muiInputProps = __assign$7({}, initMuiInputProps);
@@ -2426,7 +2426,7 @@ styleInject(css_248z$l);var FormTextField = React__default.forwardRef(function (
2426
2426
  focusValidate: focus,
2427
2427
  validate: function () { return validate(lastValue_1); },
2428
2428
  setError: function (error, errorText) {
2429
- return setErrorHelperText(error, error ? errorText : initHelperText);
2429
+ return setErrorErrorHelperText(error, error ? errorText : undefined);
2430
2430
  },
2431
2431
  };
2432
2432
  if (ref) {
@@ -2469,8 +2469,7 @@ styleInject(css_248z$l);var FormTextField = React__default.forwardRef(function (
2469
2469
  id,
2470
2470
  setValue,
2471
2471
  setDisabled,
2472
- setErrorHelperText,
2473
- initHelperText,
2472
+ setErrorErrorHelperText,
2474
2473
  setData,
2475
2474
  ]);
2476
2475
  // Event Handler ---------------------------------------------------------------------------------------------------
@@ -2505,7 +2504,7 @@ styleInject(css_248z$l);var FormTextField = React__default.forwardRef(function (
2505
2504
  onKeyDown(e);
2506
2505
  }, [select, multiline, disableReturnKey, noFormValueItem, onKeyDown, onRequestSearchSubmit, name, value]);
2507
2506
  // Render ----------------------------------------------------------------------------------------------------------
2508
- return (React__default.createElement(TextField, __assign$7({}, props, { variant: variant, size: size, color: color, focused: focused || undefined, name: name, label: label, placeholder: placeholder, className: classNames$1(className, 'FormValueItem', 'FormTextField', "variant-".concat(variant)), inputRef: initInputRef ? initInputRef : inputRef, value: value, required: required, fullWidth: !width && fullWidth, error: error, helperText: formColWithHelperText ? undefined : helperText, FormHelperTextProps: { component: 'div' }, disabled: disabled, InputProps: muiInputProps, InputLabelProps: muiInputLabelProps, inputProps: ((_b = initInputProps === null || initInputProps === void 0 ? void 0 : initInputProps.className) === null || _b === void 0 ? void 0 : _b.includes('FormTag-Input')) ? initInputProps : inputProps, style: style, select: select, SelectProps: SelectProps, multiline: multiline, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown })));
2507
+ return (React__default.createElement(TextField, __assign$7({}, props, { variant: variant, size: size, color: color, focused: focused || undefined, name: name, label: label, placeholder: placeholder, className: classNames$1(className, 'FormValueItem', 'FormTextField', "variant-".concat(variant)), inputRef: initInputRef ? initInputRef : inputRef, value: value, required: required, fullWidth: !width && fullWidth, error: error, helperText: formColWithHelperText ? undefined : error ? errorHelperText : helperText, FormHelperTextProps: { component: 'div' }, disabled: disabled, InputProps: muiInputProps, InputLabelProps: muiInputLabelProps, inputProps: ((_b = initInputProps === null || initInputProps === void 0 ? void 0 : initInputProps.className) === null || _b === void 0 ? void 0 : _b.includes('FormTag-Input')) ? initInputProps : inputProps, style: style, select: select, SelectProps: SelectProps, multiline: multiline, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown })));
2509
2508
  });
2510
2509
  FormTextField.displayName = 'FormText';
2511
2510
  FormTextField.defaultProps = FormTextFieldDefaultProps;var FormHiddenDefaultProps = __assign$7({}, FormTextFieldDefaultProps);var css_248z$k = ".FormHidden {\n display: none !important;\n}";
@@ -2522,7 +2521,7 @@ FormText.displayName = 'FormText';
2522
2521
  FormText.defaultProps = FormTextDefaultProps;var css_248z$j = ".FormTag.FormTextField {\n min-width: 200px;\n}";
2523
2522
  styleInject(css_248z$j);var FormTag = React__default.forwardRef(function (_a, ref) {
2524
2523
  // FormState -------------------------------------------------------------------------------------------------------
2525
- var className = _a.className, name = _a.name, initValue = _a.value, exceptValue = _a.exceptValue, required = _a.required, readOnly = _a.readOnly, maxLength = _a.maxLength, disabled = _a.disabled, initFullWidth = _a.fullWidth, initError = _a.error, initHelperText = _a.helperText, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, onValidate = _a.onValidate, onKeyDown = _a.onKeyDown, onChange = _a.onChange, onValue = _a.onValue, onBlur = _a.onBlur, props = __rest$4(_a, ["className", "name", "value", "exceptValue", "required", "readOnly", "maxLength", "disabled", "fullWidth", "error", "helperText", "formValueSeparator", "formValueSort", "onValidate", "onKeyDown", "onChange", "onValue", "onBlur"]);
2524
+ var className = _a.className, name = _a.name, initValue = _a.value, exceptValue = _a.exceptValue, required = _a.required, readOnly = _a.readOnly, maxLength = _a.maxLength, disabled = _a.disabled, initFullWidth = _a.fullWidth, initError = _a.error, helperText = _a.helperText, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, onValidate = _a.onValidate, onKeyDown = _a.onKeyDown, onChange = _a.onChange, onValue = _a.onValue, onBlur = _a.onBlur, props = __rest$4(_a, ["className", "name", "value", "exceptValue", "required", "readOnly", "maxLength", "disabled", "fullWidth", "error", "helperText", "formValueSeparator", "formValueSort", "onValidate", "onKeyDown", "onChange", "onValue", "onBlur"]);
2526
2525
  var _b = useFormState(), formFullWidth = _b.fullWidth, onAddValueItem = _b.onAddValueItem, onValueChange = _b.onValueChange, onValueChangeByUser = _b.onValueChangeByUser, onRequestSearchSubmit = _b.onRequestSearchSubmit, otherFormState = __rest$4(_b, ["fullWidth", "onAddValueItem", "onValueChange", "onValueChangeByUser", "onRequestSearchSubmit"]);
2527
2526
  // State - FormState -----------------------------------------------------------------------------------------------
2528
2527
  var fullWidth = useAutoUpdateState$1(initFullWidth == null ? formFullWidth : initFullWidth)[0];
@@ -2554,7 +2553,7 @@ styleInject(css_248z$j);var FormTag = React__default.forwardRef(function (_a, re
2554
2553
  //------------------------------------------------------------------------------------------------------------------
2555
2554
  var _e = useState(''), inputValue = _e[0], setInputValue = _e[1];
2556
2555
  var _f = useAutoUpdateState$1(initError), error = _f[0], setError = _f[1];
2557
- var _g = useAutoUpdateState$1(initHelperText), helperText = _g[0], setHelperText = _g[1];
2556
+ var _g = useState(), errorHelperText = _g[0], setErrorHelperText = _g[1];
2558
2557
  // Effect ----------------------------------------------------------------------------------------------------------
2559
2558
  useEffect(function () {
2560
2559
  if (!isSame$2(value, initValue)) {
@@ -2564,27 +2563,27 @@ styleInject(css_248z$j);var FormTag = React__default.forwardRef(function (_a, re
2564
2563
  }
2565
2564
  // eslint-disable-next-line react-hooks/exhaustive-deps
2566
2565
  }, []);
2567
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
2568
- var setErrorHelperText = useCallback(function (error, helperText) {
2566
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
2567
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
2569
2568
  setError(error);
2570
- setHelperText(helperText);
2571
- }, [setError, setHelperText]);
2569
+ setErrorHelperText(errorHelperText);
2570
+ }, [setError]);
2572
2571
  // Function - validate ---------------------------------------------------------------------------------------------
2573
2572
  var validate = useCallback(function (value) {
2574
2573
  if (required && empty(value)) {
2575
- setErrorHelperText(true, '필수 입력 항목입니다.');
2574
+ setErrorErrorHelperText(true, '필수 입력 항목입니다.');
2576
2575
  return false;
2577
2576
  }
2578
2577
  if (onValidate) {
2579
2578
  var onValidateResult = onValidate(value);
2580
2579
  if (onValidateResult != null && onValidateResult !== true) {
2581
- setErrorHelperText(true, onValidateResult);
2580
+ setErrorErrorHelperText(true, onValidateResult);
2582
2581
  return false;
2583
2582
  }
2584
2583
  }
2585
- setErrorHelperText(false, initHelperText);
2584
+ setErrorErrorHelperText(false, undefined);
2586
2585
  return true;
2587
- }, [required, onValidate, setErrorHelperText, initHelperText]);
2586
+ }, [required, onValidate, setErrorErrorHelperText]);
2588
2587
  // Function - getExtraCommands -------------------------------------------------------------------------------------
2589
2588
  var getExtraCommands = useCallback(function () {
2590
2589
  return {
@@ -2704,7 +2703,7 @@ styleInject(css_248z$j);var FormTag = React__default.forwardRef(function (_a, re
2704
2703
  if (readOnly) {
2705
2704
  renderProps.inputProps.className = classNames$1(renderProps.inputProps.className, 'Mui-disabled');
2706
2705
  }
2707
- return (React__default.createElement(FormText, __assign$7({}, renderProps, { ref: handleRef, name: name, className: classNames$1(className, 'FormValueItem', 'FormTag'), error: error, disabled: disabled, fullWidth: fullWidth, required: required, value: inputValue, exceptValue: exceptValue, helperText: helperText, onKeyDown: handleInputKeyDown, onChange: handleInputChange, onBlur: handleBlur })));
2706
+ return (React__default.createElement(FormText, __assign$7({}, renderProps, { ref: handleRef, name: name, className: classNames$1(className, 'FormValueItem', 'FormTag'), error: error, disabled: disabled, fullWidth: fullWidth, required: required, value: inputValue, exceptValue: exceptValue, helperText: error ? errorHelperText : helperText, onKeyDown: handleInputKeyDown, onChange: handleInputChange, onBlur: handleBlur })));
2708
2707
  } })));
2709
2708
  });
2710
2709
  FormTag.displayName = 'FormTag';
@@ -4359,32 +4358,37 @@ function autoDash$1(companyNo) {
4359
4358
  return onValue ? onValue(newValue) : newValue;
4360
4359
  }, [onValue]);
4361
4360
  var handleValidate = useCallback(function (value) {
4362
- if (notEmpty(value) && value.length === 14 && value.includes('-')) {
4363
- var jumin = value
4364
- .replace(/-/g, '')
4365
- .split('')
4366
- .map(function (v) { return Number(v); });
4367
- var ckarr = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5];
4368
- for (var i = 0; i < jumin.length - 1; i += 1) {
4369
- jumin[i] = jumin[i] * ckarr[i];
4370
- }
4371
- var juminlast = jumin[jumin.length - 1];
4372
- var sum = 0;
4373
- for (var i = 0; i < jumin.length - 1; i += 1) {
4374
- sum += jumin[i];
4375
- }
4376
- sum = sum % 11;
4377
- sum = 11 - sum;
4378
- if (sum > 9) {
4379
- sum = sum % 10;
4380
- }
4381
- if (sum != juminlast && juminlast != undefined) {
4361
+ if (notEmpty(value)) {
4362
+ if (value.length === 14 && value.includes('-')) {
4363
+ var jumin = value
4364
+ .replace(/-/g, '')
4365
+ .split('')
4366
+ .map(function (v) { return Number(v); });
4367
+ var ckarr = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5];
4368
+ for (var i = 0; i < jumin.length - 1; i += 1) {
4369
+ jumin[i] = jumin[i] * ckarr[i];
4370
+ }
4371
+ var juminlast = jumin[jumin.length - 1];
4372
+ var sum = 0;
4373
+ for (var i = 0; i < jumin.length - 1; i += 1) {
4374
+ sum += jumin[i];
4375
+ }
4376
+ sum = sum % 11;
4377
+ sum = 11 - sum;
4378
+ if (sum > 9) {
4379
+ sum = sum % 10;
4380
+ }
4381
+ if (sum != juminlast && juminlast != undefined) {
4382
+ return '유효하지 않은 값입니다.';
4383
+ }
4384
+ return onValidate ? onValidate(value) : true;
4385
+ }
4386
+ else {
4382
4387
  return '유효하지 않은 값입니다.';
4383
4388
  }
4384
- return onValidate ? onValidate(value) : true;
4385
4389
  }
4386
4390
  else {
4387
- return '유효하지 않은 값입니다.';
4391
+ return onValidate ? onValidate(value) : true;
4388
4392
  }
4389
4393
  }, [onValidate]);
4390
4394
  // Render ----------------------------------------------------------------------------------------------------------
@@ -4527,7 +4531,7 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
4527
4531
  // ID --------------------------------------------------------------------------------------------------------------
4528
4532
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initFullWidth = _a.fullWidth,
4529
4533
  //----------------------------------------------------------------------------------------------------------------
4530
- name = _a.name, labelIcon = _a.labelIcon, label = _a.label, initChecked = _a.checked, initInputRef = _a.inputRef, initAction = _a.action, readOnly = _a.readOnly, initDisabled = _a.disabled, text = _a.text, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, initData = _a.data, initUncheckedValue = _a.uncheckedValue, exceptValue = _a.exceptValue, hidden = _a.hidden, onChange = _a.onChange, onValidate = _a.onValidate,
4534
+ name = _a.name, labelIcon = _a.labelIcon, label = _a.label, initChecked = _a.checked, initInputRef = _a.inputRef, initAction = _a.action, readOnly = _a.readOnly, initDisabled = _a.disabled, text = _a.text, initError = _a.error, helperText = _a.helperText, initValue = _a.value, initData = _a.data, initUncheckedValue = _a.uncheckedValue, exceptValue = _a.exceptValue, hidden = _a.hidden, onChange = _a.onChange, onValidate = _a.onValidate,
4531
4535
  //----------------------------------------------------------------------------------------------------------------
4532
4536
  className = _a.className, initStyle = _a.style, sx = _a.sx, props = __rest$4(_a, ["variant", "size", "color", "focused", "fullWidth", "name", "labelIcon", "label", "checked", "inputRef", "action", "readOnly", "disabled", "text", "error", "helperText", "value", "data", "uncheckedValue", "exceptValue", "hidden", "onChange", "onValidate", "className", "style", "sx"]);
4533
4537
  var id = useId();
@@ -4555,7 +4559,7 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
4555
4559
  var _d = useAutoUpdateState$1(initValue), value = _d[0], setValue = _d[1];
4556
4560
  var _e = useAutoUpdateState$1(initUncheckedValue), uncheckedValue = _e[0], setUncheckedValue = _e[1];
4557
4561
  var _f = useAutoUpdateState$1(initError), error = _f[0], setError = _f[1];
4558
- var _g = useAutoUpdateState$1(initHelperText), helperText = _g[0], setHelperText = _g[1];
4562
+ var _g = useState(), errorHelperText = _g[0], setErrorHelperText = _g[1];
4559
4563
  var _h = useAutoUpdateState$1(initDisabled), disabled = _h[0], setDisabled = _h[1];
4560
4564
  var _j = useAutoUpdateState$1(initData), data = _j[0], setData = _j[1];
4561
4565
  // State - checked -------------------------------------------------------------------------------------------------
@@ -4585,23 +4589,23 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
4585
4589
  (_d = actionRef.current) === null || _d === void 0 ? void 0 : _d.focusVisible();
4586
4590
  }
4587
4591
  }, [initInputRef, inputRef, initAction, actionRef]);
4588
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
4589
- var setErrorHelperText = useCallback(function (error, helperText) {
4592
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
4593
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
4590
4594
  setError(error);
4591
- setHelperText(helperText);
4592
- }, [setError, setHelperText]);
4595
+ setErrorHelperText(errorHelperText);
4596
+ }, [setError]);
4593
4597
  // Function - validate ---------------------------------------------------------------------------------------------
4594
4598
  var validate = useCallback(function (checked) {
4595
4599
  if (onValidate) {
4596
4600
  var onValidateResult = onValidate(checked);
4597
4601
  if (onValidateResult != null && onValidateResult !== true) {
4598
- setErrorHelperText(true, onValidateResult);
4602
+ setErrorErrorHelperText(true, onValidateResult);
4599
4603
  return false;
4600
4604
  }
4601
4605
  }
4602
- setErrorHelperText(false, initHelperText);
4606
+ setErrorErrorHelperText(false, undefined);
4603
4607
  return true;
4604
- }, [onValidate, setErrorHelperText, initHelperText]);
4608
+ }, [onValidate, setErrorErrorHelperText]);
4605
4609
  // Commands --------------------------------------------------------------------------------------------------------
4606
4610
  useLayoutEffect(function () {
4607
4611
  var lastChecked = checked;
@@ -4646,8 +4650,8 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
4646
4650
  focus: focus,
4647
4651
  focusValidate: focus,
4648
4652
  validate: function () { return validate(checked); },
4649
- setError: function (error, helperText) {
4650
- return setErrorHelperText(error, error ? helperText : initHelperText);
4653
+ setError: function (error, errorHelperText) {
4654
+ return setErrorErrorHelperText(error, error ? errorHelperText : undefined);
4651
4655
  },
4652
4656
  };
4653
4657
  onAddValueItem(id, commands);
@@ -4683,13 +4687,12 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
4683
4687
  exceptValue,
4684
4688
  disabled,
4685
4689
  validate,
4686
- initHelperText,
4687
4690
  id,
4688
4691
  setChecked,
4689
4692
  setValue,
4690
4693
  setUncheckedValue,
4691
4694
  setDisabled,
4692
- setErrorHelperText,
4695
+ setErrorErrorHelperText,
4693
4696
  data,
4694
4697
  setData,
4695
4698
  ]);
@@ -4707,7 +4710,7 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
4707
4710
  }
4708
4711
  }, [readOnly, setChecked, onValueChangeByUser, name, onRequestSearchSubmit]);
4709
4712
  // Render ----------------------------------------------------------------------------------------------------------
4710
- return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormCheckbox'), labelIcon: labelIcon, label: label, error: error, fullWidth: fullWidth, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, autoSize: true, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(FormControlLabel, { ref: labelRef, control: React__default.createElement(Checkbox, __assign$7({ name: name, color: color, size: size, inputRef: initInputRef ? initInputRef : inputRef, action: initAction ? initAction : actionRef, checked: checked, checkedIcon: React__default.createElement(CheckBox, { color: error ? 'error' : undefined }), icon: React__default.createElement(CheckBoxOutlineBlank, { color: error ? 'error' : undefined }), onChange: handleChange, disabled: disabled || readOnly }, props)), label: React__default.createElement(Typography, { color: error ? 'error' : readOnly || disabled ? theme.palette.text.disabled : undefined, whiteSpace: 'nowrap' }, text) }) }));
4713
+ return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormCheckbox'), labelIcon: labelIcon, label: label, error: error, fullWidth: fullWidth, helperText: error ? errorHelperText : helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, autoSize: true, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(FormControlLabel, { ref: labelRef, control: React__default.createElement(Checkbox, __assign$7({ name: name, color: color, size: size, inputRef: initInputRef ? initInputRef : inputRef, action: initAction ? initAction : actionRef, checked: checked, checkedIcon: React__default.createElement(CheckBox, { color: error ? 'error' : undefined }), icon: React__default.createElement(CheckBoxOutlineBlank, { color: error ? 'error' : undefined }), onChange: handleChange, disabled: disabled || readOnly }, props)), label: React__default.createElement(Typography, { color: error ? 'error' : readOnly || disabled ? theme.palette.text.disabled : undefined, whiteSpace: 'nowrap' }, text) }) }));
4711
4714
  });
4712
4715
  FormCheckbox.displayName = 'FormCheckbox';
4713
4716
  FormCheckbox.defaultProps = FormCheckboxDefaultProps;var FormRadioGroupDefaultProps = {
@@ -4717,7 +4720,7 @@ var FormRadioGroup = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a
4717
4720
  // type ------------------------------------------------------------------------------------------------------------
4718
4721
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initFullWidth = _a.fullWidth, hidden = _a.hidden,
4719
4722
  //----------------------------------------------------------------------------------------------------------------
4720
- name = _a.name, initWidth = _a.width, labelIcon = _a.labelIcon, label = _a.label, inline = _a.inline, initLoading = _a.loading, nowrap = _a.nowrap, initItems = _a.items, initValue = _a.value, initData = _a.data, initError = _a.error, initHelperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, exceptValue = _a.exceptValue, onLoadItems = _a.onLoadItems, onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate,
4723
+ name = _a.name, initWidth = _a.width, labelIcon = _a.labelIcon, label = _a.label, inline = _a.inline, initLoading = _a.loading, nowrap = _a.nowrap, 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, onLoadItems = _a.onLoadItems, onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate,
4721
4724
  //----------------------------------------------------------------------------------------------------------------
4722
4725
  className = _a.className, initStyle = _a.style, sx = _a.sx,
4723
4726
  //----------------------------------------------------------------------------------------------------------------
@@ -4741,7 +4744,7 @@ var FormRadioGroup = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a
4741
4744
  // State -----------------------------------------------------------------------------------------------------------
4742
4745
  var _d = useAutoUpdateState$1(initItems), items = _d[0], setItems = _d[1];
4743
4746
  var _e = useAutoUpdateState$1(initError), error = _e[0], setError = _e[1];
4744
- var _f = useAutoUpdateState$1(initHelperText), helperText = _f[0], setHelperText = _f[1];
4747
+ var _f = useState(), errorHelperText = _f[0], setErrorHelperText = _f[1];
4745
4748
  var _g = useAutoUpdateState$1(initDisabled), disabled = _g[0], setDisabled = _g[1];
4746
4749
  var _h = useState(false), isOnGetItemLoading = _h[0], setIsOnGetItemLoading = _h[1];
4747
4750
  var _j = useAutoUpdateState$1(initLoading), loading = _j[0], setLoading = _j[1];
@@ -4846,27 +4849,27 @@ var FormRadioGroup = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a
4846
4849
  var _a;
4847
4850
  (_a = firstInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
4848
4851
  }, []);
4849
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
4850
- var setErrorHelperText = useCallback(function (error, helperText) {
4852
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
4853
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
4851
4854
  setError(error);
4852
- setHelperText(helperText);
4853
- }, [setError, setHelperText]);
4855
+ setErrorHelperText(errorHelperText);
4856
+ }, [setError]);
4854
4857
  // Function - validate ---------------------------------------------------------------------------------------------
4855
4858
  var validate = useCallback(function (value) {
4856
4859
  if (required && empty(value)) {
4857
- setErrorHelperText(true, '필수 선택 항목입니다.');
4860
+ setErrorErrorHelperText(true, '필수 선택 항목입니다.');
4858
4861
  return false;
4859
4862
  }
4860
4863
  if (onValidate) {
4861
4864
  var onValidateResult = onValidate(value);
4862
4865
  if (onValidateResult != null && onValidateResult !== true) {
4863
- setErrorHelperText(true, onValidateResult);
4866
+ setErrorErrorHelperText(true, onValidateResult);
4864
4867
  return false;
4865
4868
  }
4866
4869
  }
4867
- setErrorHelperText(false, initHelperText);
4870
+ setErrorErrorHelperText(false, undefined);
4868
4871
  return true;
4869
- }, [required, onValidate, setErrorHelperText, initHelperText]);
4872
+ }, [required, onValidate, setErrorErrorHelperText]);
4870
4873
  // Commands --------------------------------------------------------------------------------------------------------
4871
4874
  useLayoutEffect(function () {
4872
4875
  var lastValue = value;
@@ -4901,8 +4904,8 @@ var FormRadioGroup = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a
4901
4904
  focus: focus,
4902
4905
  focusValidate: focus,
4903
4906
  validate: function () { return validate(value); },
4904
- setError: function (error, helperText) {
4905
- return setErrorHelperText(error, error ? helperText : initHelperText);
4907
+ setError: function (error, errorHelperText) {
4908
+ return setErrorErrorHelperText(error, error ? errorHelperText : undefined);
4906
4909
  },
4907
4910
  getItems: function () { return lastItems; },
4908
4911
  setItems: function (items) {
@@ -4952,8 +4955,7 @@ var FormRadioGroup = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a
4952
4955
  id,
4953
4956
  setValue,
4954
4957
  setDisabled,
4955
- setErrorHelperText,
4956
- initHelperText,
4958
+ setErrorErrorHelperText,
4957
4959
  setItems,
4958
4960
  setLoading,
4959
4961
  data,
@@ -4996,7 +4998,7 @@ var FormRadioGroup = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a
4996
4998
  }
4997
4999
  }, [readOnly, items, getFinalValue, value, setValue, onValueChangeByUser, name, onRequestSearchSubmit]);
4998
5000
  // Render ----------------------------------------------------------------------------------------------------------
4999
- return (React__default.createElement(FormItemBase, { focused: focused, ref: baseRef, className: classNames$1(className, 'FormValueItem', 'FormRadioGroup'), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, fullWidth: fullWidth, required: required, error: error, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, autoSize: true, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(React__default.Fragment, null,
5001
+ return (React__default.createElement(FormItemBase, { focused: focused, ref: baseRef, className: classNames$1(className, 'FormValueItem', 'FormRadioGroup'), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, fullWidth: fullWidth, required: required, error: error, helperText: error ? errorHelperText : helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, autoSize: true, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(React__default.Fragment, null,
5000
5002
  !fullWidth && !isOnGetItemLoading && !loading && items && (React__default.createElement("div", { ref: resizeWidthDetectorRef, style: {
5001
5003
  display: 'grid',
5002
5004
  position: 'absolute',
@@ -5032,7 +5034,7 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
5032
5034
  // type ------------------------------------------------------------------------------------------------------------
5033
5035
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initFullWidth = _a.fullWidth,
5034
5036
  //----------------------------------------------------------------------------------------------------------------
5035
- name = _a.name, labelIcon = _a.labelIcon, label = _a.label, type = _a.type, initLoading = _a.loading, initItems = _a.items, initValue = _a.value, initData = _a.data, initError = _a.error, initHelperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, notAllowEmptyValue = _a.notAllowEmptyValue, exceptValue = _a.exceptValue, initWidth = _a.width, multiple = _a.multiple, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, hidden = _a.hidden, itemWidth = _a.itemWidth, onLoadItems = _a.onLoadItems,
5037
+ name = _a.name, labelIcon = _a.labelIcon, label = _a.label, type = _a.type, 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, notAllowEmptyValue = _a.notAllowEmptyValue, exceptValue = _a.exceptValue, initWidth = _a.width, multiple = _a.multiple, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, hidden = _a.hidden, itemWidth = _a.itemWidth, onLoadItems = _a.onLoadItems,
5036
5038
  //----------------------------------------------------------------------------------------------------------------
5037
5039
  onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate,
5038
5040
  //----------------------------------------------------------------------------------------------------------------
@@ -5087,7 +5089,7 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
5087
5089
  var _f = useState(false), isOnGetItemLoading = _f[0], setIsOnGetItemLoading = _f[1];
5088
5090
  var _g = useAutoUpdateState$1(initItems), items = _g[0], setItems = _g[1];
5089
5091
  var _h = useAutoUpdateState$1(initError), error = _h[0], setError = _h[1];
5090
- var _j = useAutoUpdateState$1(initHelperText), helperText = _j[0], setHelperText = _j[1];
5092
+ var _j = useState(), errorHelperText = _j[0], setErrorHelperText = _j[1];
5091
5093
  var _k = useAutoUpdateState$1(initLoading), loading = _k[0], setLoading = _k[1];
5092
5094
  var _l = useAutoUpdateState$1(initDisabled), disabled = _l[0], setDisabled = _l[1];
5093
5095
  var _m = useAutoUpdateState$1(initData), data = _m[0], setData = _m[1];
@@ -5226,27 +5228,27 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
5226
5228
  var _a;
5227
5229
  (_a = refForButtonResizeHeightDetect.current) === null || _a === void 0 ? void 0 : _a.focus();
5228
5230
  }, [refForButtonResizeHeightDetect]);
5229
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
5230
- var setErrorHelperText = useCallback(function (error, helperText) {
5231
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
5232
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
5231
5233
  setError(error);
5232
- setHelperText(helperText);
5233
- }, [setError, setHelperText]);
5234
+ setErrorHelperText(errorHelperText);
5235
+ }, [setError]);
5234
5236
  // Function - validate ---------------------------------------------------------------------------------------------
5235
5237
  var validate = useCallback(function (value) {
5236
5238
  if (required && empty(value)) {
5237
- setErrorHelperText(true, '필수 선택 항목입니다.');
5239
+ setErrorErrorHelperText(true, '필수 선택 항목입니다.');
5238
5240
  return false;
5239
5241
  }
5240
5242
  if (onValidate) {
5241
5243
  var onValidateResult = onValidate(value);
5242
5244
  if (onValidateResult != null && onValidateResult !== true) {
5243
- setErrorHelperText(true, onValidateResult);
5245
+ setErrorErrorHelperText(true, onValidateResult);
5244
5246
  return false;
5245
5247
  }
5246
5248
  }
5247
- setErrorHelperText(false, initHelperText);
5249
+ setErrorErrorHelperText(false, undefined);
5248
5250
  return true;
5249
- }, [required, onValidate, setErrorHelperText, initHelperText]);
5251
+ }, [required, onValidate, setErrorErrorHelperText]);
5250
5252
  // Commands --------------------------------------------------------------------------------------------------------
5251
5253
  useLayoutEffect(function () {
5252
5254
  if (ref || onAddValueItem) {
@@ -5283,7 +5285,7 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
5283
5285
  focusValidate: focus,
5284
5286
  validate: function () { return validate(value); },
5285
5287
  setError: function (error, errorText) {
5286
- return setErrorHelperText(error, error ? errorText : initHelperText);
5288
+ return setErrorErrorHelperText(error, error ? errorText : undefined);
5287
5289
  },
5288
5290
  getFormValueSeparator: function () { return formValueSeparator; },
5289
5291
  isFormValueSort: function () { return !!formValueSort; },
@@ -5342,8 +5344,7 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
5342
5344
  id,
5343
5345
  setValue,
5344
5346
  setDisabled,
5345
- setErrorHelperText,
5346
- initHelperText,
5347
+ setErrorErrorHelperText,
5347
5348
  setItems,
5348
5349
  setLoading,
5349
5350
  data,
@@ -5434,7 +5435,7 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
5434
5435
  theme.palette.error.main,
5435
5436
  type,
5436
5437
  ]);
5437
- return (React__default.createElement(FormItemBase, __assign$7({}, formControlBaseProps, { className: classNames$1(className, 'FormValueItem', 'FormToggleButtonGroup', "variant-".concat(variant), "size-".concat(size), !!label && 'with-label', !!fullWidth && 'full-width', "type-".concat(type)), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, required: required, fullWidth: fullWidth, error: error, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, autoSize: true, controlHeight: height || 0, controlVerticalCenter: isOnGetItemLoading || loading, control: isOnGetItemLoading || loading ? (React__default.createElement("div", { style: { opacity: 0.54 }, ref: refForLoadingResizeHeightDetect },
5438
+ return (React__default.createElement(FormItemBase, __assign$7({}, formControlBaseProps, { className: classNames$1(className, 'FormValueItem', 'FormToggleButtonGroup', "variant-".concat(variant), "size-".concat(size), !!label && 'with-label', !!fullWidth && 'full-width', "type-".concat(type)), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, required: required, fullWidth: fullWidth, error: error, helperText: error ? errorHelperText : helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, autoSize: true, controlHeight: height || 0, controlVerticalCenter: isOnGetItemLoading || loading, control: isOnGetItemLoading || loading ? (React__default.createElement("div", { style: { opacity: 0.54 }, ref: refForLoadingResizeHeightDetect },
5438
5439
  React__default.createElement(CircularProgress, { size: 16, color: 'inherit' }))) : (React__default.createElement(React__default.Fragment, null,
5439
5440
  !fullWidth && !isOnGetItemLoading && !loading && items && (React__default.createElement("div", { ref: refForResizeWidthDetect, style: {
5440
5441
  display: 'grid',
@@ -5460,7 +5461,7 @@ FormToggleButtonGroup.defaultProps = FormToggleButtonGroupDefaultProps;var FormR
5460
5461
  //----------------------------------------------------------------------------------------------------------------
5461
5462
  precision = _a.precision, highlightSelectedOnly = _a.highlightSelectedOnly, icon = _a.icon, emptyIcon = _a.emptyIcon, max = _a.max, hidden = _a.hidden,
5462
5463
  //----------------------------------------------------------------------------------------------------------------
5463
- name = _a.name, labelIcon = _a.labelIcon, label = _a.label, readOnly = _a.readOnly, required = _a.required, initDisabled = _a.disabled, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, initData = _a.data, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate, onValue = _a.onValue,
5464
+ name = _a.name, labelIcon = _a.labelIcon, label = _a.label, readOnly = _a.readOnly, required = _a.required, initDisabled = _a.disabled, initError = _a.error, helperText = _a.helperText, initValue = _a.value, initData = _a.data, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate, onValue = _a.onValue,
5464
5465
  //----------------------------------------------------------------------------------------------------------------
5465
5466
  className = _a.className, initStyle = _a.style, sx = _a.sx;
5466
5467
  var id = useId();
@@ -5477,7 +5478,7 @@ FormToggleButtonGroup.defaultProps = FormToggleButtonGroupDefaultProps;var FormR
5477
5478
  var inputRef = useRef();
5478
5479
  // State -----------------------------------------------------------------------------------------------------------
5479
5480
  var _d = useAutoUpdateState$1(initError), error = _d[0], setError = _d[1];
5480
- var _e = useAutoUpdateState$1(initHelperText), helperText = _e[0], setHelperText = _e[1];
5481
+ var _e = useState(), errorHelperText = _e[0], setErrorHelperText = _e[1];
5481
5482
  var _f = useAutoUpdateState$1(initDisabled), disabled = _f[0], setDisabled = _f[1];
5482
5483
  var _g = useAutoUpdateState$1(initData), data = _g[0], setData = _g[1];
5483
5484
  // State - width, height -------------------------------------------------------------------------------------------
@@ -5522,25 +5523,25 @@ FormToggleButtonGroup.defaultProps = FormToggleButtonGroupDefaultProps;var FormR
5522
5523
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
5523
5524
  });
5524
5525
  }, []);
5525
- var setErrorHelperText = useCallback(function (error, helperText) {
5526
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
5526
5527
  setError(error);
5527
- setHelperText(helperText);
5528
- }, [setError, setHelperText]);
5528
+ setErrorHelperText(errorHelperText);
5529
+ }, [setError]);
5529
5530
  var validate = useCallback(function (value) {
5530
5531
  if (required && (empty(value) || value === 0)) {
5531
- setErrorHelperText(true, '필수 선택 항목입니다.');
5532
+ setErrorErrorHelperText(true, '필수 선택 항목입니다.');
5532
5533
  return false;
5533
5534
  }
5534
5535
  if (onValidate) {
5535
5536
  var onValidateResult = onValidate(value);
5536
5537
  if (onValidateResult != null && onValidateResult !== true) {
5537
- setErrorHelperText(true, onValidateResult);
5538
+ setErrorErrorHelperText(true, onValidateResult);
5538
5539
  return false;
5539
5540
  }
5540
5541
  }
5541
- setErrorHelperText(false, initHelperText);
5542
+ setErrorErrorHelperText(false, undefined);
5542
5543
  return true;
5543
- }, [required, onValidate, setErrorHelperText, initHelperText]);
5544
+ }, [required, onValidate, setErrorErrorHelperText]);
5544
5545
  // Commands --------------------------------------------------------------------------------------------------------
5545
5546
  useLayoutEffect(function () {
5546
5547
  var lastValue = value;
@@ -5573,8 +5574,8 @@ FormToggleButtonGroup.defaultProps = FormToggleButtonGroupDefaultProps;var FormR
5573
5574
  focus: focus,
5574
5575
  focusValidate: focus,
5575
5576
  validate: function () { return validate(value); },
5576
- setError: function (error, helperText) {
5577
- return setErrorHelperText(error, error ? helperText : initHelperText);
5577
+ setError: function (error, errorHelperText) {
5578
+ return setErrorErrorHelperText(error, error ? errorHelperText : undefined);
5578
5579
  },
5579
5580
  };
5580
5581
  onAddValueItem(id, commands);
@@ -5606,14 +5607,13 @@ FormToggleButtonGroup.defaultProps = FormToggleButtonGroupDefaultProps;var FormR
5606
5607
  disabled,
5607
5608
  focus,
5608
5609
  validate,
5609
- initHelperText,
5610
5610
  ref,
5611
5611
  onAddValueItem,
5612
5612
  onRemoveValueItem,
5613
5613
  id,
5614
5614
  setValue,
5615
5615
  setDisabled,
5616
- setErrorHelperText,
5616
+ setErrorErrorHelperText,
5617
5617
  data,
5618
5618
  setData,
5619
5619
  ]);
@@ -5632,7 +5632,7 @@ FormToggleButtonGroup.defaultProps = FormToggleButtonGroupDefaultProps;var FormR
5632
5632
  }
5633
5633
  }, [readOnly, getFinalValue, setValue, onValueChangeByUser, name, onRequestSearchSubmit]);
5634
5634
  // Render ----------------------------------------------------------------------------------------------------------
5635
- return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormRating'), labelIcon: labelIcon, label: label, error: error, fullWidth: false, required: required, helperText: helperText, helperTextProps: { style: { marginLeft: 5 } }, style: style, sx: sx, hidden: hidden, autoSize: true, controlHeight: height || (size === 'small' ? 21 : 26), controlVerticalCenter: true, control: React__default.createElement(Rating, { ref: ratingRef, size: size === 'medium' ? 'large' : 'medium', name: name, precision: precision, highlightSelectedOnly: highlightSelectedOnly, value: value, disabled: disabled || readOnly, max: max, icon: React__default.createElement(FormIcon, { color: color, fontSize: 'inherit' }, icon ? icon : 'Star'), emptyIcon: React__default.createElement(FormIcon, { fontSize: 'inherit' }, emptyIcon ? emptyIcon : 'StarBorder'), onChange: handleChange, onFocus: function () { return setFocused(initFocused || true); }, onBlur: function () { return setFocused(initFocused || false); } }) }));
5635
+ return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormRating'), labelIcon: labelIcon, label: label, error: error, fullWidth: false, required: required, helperText: error ? errorHelperText : helperText, helperTextProps: { style: { marginLeft: 5 } }, style: style, sx: sx, hidden: hidden, autoSize: true, controlHeight: height || (size === 'small' ? 21 : 26), controlVerticalCenter: true, control: React__default.createElement(Rating, { ref: ratingRef, size: size === 'medium' ? 'large' : 'medium', name: name, precision: precision, highlightSelectedOnly: highlightSelectedOnly, value: value, disabled: disabled || readOnly, max: max, icon: React__default.createElement(FormIcon, { color: color, fontSize: 'inherit' }, icon ? icon : 'Star'), emptyIcon: React__default.createElement(FormIcon, { fontSize: 'inherit' }, emptyIcon ? emptyIcon : 'StarBorder'), onChange: handleChange, onFocus: function () { return setFocused(initFocused || true); }, onBlur: function () { return setFocused(initFocused || false); } }) }));
5636
5636
  });
5637
5637
  FormRating.displayName = 'FormRating';
5638
5638
  FormRating.defaultProps = FormRatingDefaultProps;var propTypes = {exports: {}};var reactIs = {exports: {}};var reactIs_production_min = {};/** @license React v16.13.1
@@ -7478,7 +7478,7 @@ styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function
7478
7478
  //----------------------------------------------------------------------------------------------------------------
7479
7479
  menubar = _a.menubar, height = _a.height, hidden = _a.hidden, onImageUpload = _a.onImageUpload,
7480
7480
  //----------------------------------------------------------------------------------------------------------------
7481
- name = _a.name, labelIcon = _a.labelIcon, label = _a.label, readOnly = _a.readOnly, required = _a.required, initDisabled = _a.disabled, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, initData = _a.data, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate,
7481
+ name = _a.name, labelIcon = _a.labelIcon, label = _a.label, readOnly = _a.readOnly, required = _a.required, initDisabled = _a.disabled, initError = _a.error, helperText = _a.helperText, initValue = _a.value, initData = _a.data, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate,
7482
7482
  //----------------------------------------------------------------------------------------------------------------
7483
7483
  className = _a.className;
7484
7484
  var id = useId();
@@ -7504,7 +7504,7 @@ styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function
7504
7504
  }, [value]);
7505
7505
  // State -----------------------------------------------------------------------------------------------------------
7506
7506
  var _e = useAutoUpdateState$1(initError), error = _e[0], setError = _e[1];
7507
- var _f = useAutoUpdateState$1(initHelperText), helperText = _f[0], setHelperText = _f[1];
7507
+ var _f = useState(), errorHelperText = _f[0], setErrorHelperText = _f[1];
7508
7508
  var _g = useState(false), initialized = _g[0], setInitialized = _g[1];
7509
7509
  var _h = useAutoUpdateState$1(initDisabled), disabled = _h[0], setDisabled = _h[1];
7510
7510
  var _j = useAutoUpdateState$1(initData), data = _j[0], setData = _j[1];
@@ -7518,11 +7518,11 @@ styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function
7518
7518
  textarea.style.display = 'none';
7519
7519
  }
7520
7520
  }, [editorRef]);
7521
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
7522
- var setErrorHelperText = useCallback(function (error, helperText) {
7521
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
7522
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
7523
7523
  setError(error);
7524
- setHelperText(helperText);
7525
- }, [setError, setHelperText]);
7524
+ setErrorHelperText(errorHelperText);
7525
+ }, [setError]);
7526
7526
  // Function - validate ---------------------------------------------------------------------------------------------
7527
7527
  var validate = useCallback(function (value) {
7528
7528
  var isEmptyValue = false;
@@ -7533,19 +7533,19 @@ styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function
7533
7533
  isEmptyValue = empty(text.trim());
7534
7534
  }
7535
7535
  if (required && (isEmptyValue || empty(value))) {
7536
- setErrorHelperText(true, '필수 입력 항목입니다.');
7536
+ setErrorErrorHelperText(true, '필수 입력 항목입니다.');
7537
7537
  return false;
7538
7538
  }
7539
7539
  if (onValidate) {
7540
7540
  var onValidateResult = onValidate(value);
7541
7541
  if (onValidateResult != null && onValidateResult !== true) {
7542
- setErrorHelperText(true, onValidateResult);
7542
+ setErrorErrorHelperText(true, onValidateResult);
7543
7543
  return false;
7544
7544
  }
7545
7545
  }
7546
- setErrorHelperText(false, initHelperText);
7546
+ setErrorErrorHelperText(false, undefined);
7547
7547
  return true;
7548
- }, [required, onValidate, setErrorHelperText, initHelperText]);
7548
+ }, [required, onValidate, setErrorErrorHelperText]);
7549
7549
  // Commands --------------------------------------------------------------------------------------------------------
7550
7550
  useLayoutEffect(function () {
7551
7551
  var lastValue = value;
@@ -7578,8 +7578,8 @@ styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function
7578
7578
  focus: focus,
7579
7579
  focusValidate: focus,
7580
7580
  validate: function () { return validate(value); },
7581
- setError: function (error, helperText) {
7582
- return setErrorHelperText(error, error ? helperText : initHelperText);
7581
+ setError: function (error, errorText) {
7582
+ return setErrorErrorHelperText(error, error ? errorText : undefined);
7583
7583
  },
7584
7584
  };
7585
7585
  onAddValueItem(id, commands);
@@ -7609,17 +7609,16 @@ styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function
7609
7609
  exceptValue,
7610
7610
  disabled,
7611
7611
  focus,
7612
- validate,
7613
- initHelperText,
7614
7612
  ref,
7615
7613
  onAddValueItem,
7616
7614
  onRemoveValueItem,
7617
7615
  id,
7618
7616
  setValue,
7619
7617
  setDisabled,
7620
- setErrorHelperText,
7618
+ setErrorErrorHelperText,
7621
7619
  data,
7622
7620
  setData,
7621
+ validate,
7623
7622
  ]);
7624
7623
  // Event Handler ---------------------------------------------------------------------------------------------------
7625
7624
  var handleEditorChange = useCallback(function (value) {
@@ -7647,7 +7646,7 @@ styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function
7647
7646
  });
7648
7647
  }, [onImageUpload]);
7649
7648
  // Render ----------------------------------------------------------------------------------------------------------
7650
- return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormTextEditor', !initialized && 'initializing'), labelIcon: labelIcon, label: label, error: error, required: required, fullWidth: true, helperText: helperText, helperTextProps: { style: { marginLeft: 5 } }, style: { width: '100%' }, hidden: hidden, controlHeight: height, control: React__default.createElement(React__default.Fragment, null,
7649
+ return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormTextEditor', !initialized && 'initializing'), labelIcon: labelIcon, label: label, error: error, required: required, fullWidth: true, helperText: error ? errorHelperText : helperText, helperTextProps: { style: { marginLeft: 5 } }, style: { width: '100%' }, hidden: hidden, controlHeight: height, control: React__default.createElement(React__default.Fragment, null,
7651
7650
  !initialized ? React__default.createElement(Skeleton, { variant: 'rectangular', width: '100%', height: height }) : null,
7652
7651
  React__default.createElement(Editor, { ref: editorRef, value: value, disabled: readOnly || disabled, init: {
7653
7652
  height: height,
@@ -7680,7 +7679,7 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
7680
7679
  // type ------------------------------------------------------------------------------------------------------------
7681
7680
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
7682
7681
  //----------------------------------------------------------------------------------------------------------------
7683
- name = _a.name, labelIcon = _a.labelIcon, label = _a.label, initLoading = _a.loading, initItems = _a.items, initValue = _a.value, initData = _a.data, initError = _a.error, initHelperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, exceptValue = _a.exceptValue, width = _a.width, placeholder = _a.placeholder, multiple = _a.multiple, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, disablePortal = _a.disablePortal, noOptionsText = _a.noOptionsText, loadingText = _a.loadingText, limitTags = _a.limitTags, openOnFocus = _a.openOnFocus, disableClearable = _a.disableClearable, async = _a.async, hidden = _a.hidden, onLoadItems = _a.onLoadItems, onAsyncLoadValueItem = _a.onAsyncLoadValueItem, onRenderItem = _a.onRenderItem, onRenderTag = _a.onRenderTag, onAddItem = _a.onAddItem, getOptionDisabled = _a.getOptionDisabled,
7682
+ 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, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, disablePortal = _a.disablePortal, noOptionsText = _a.noOptionsText, loadingText = _a.loadingText, limitTags = _a.limitTags, openOnFocus = _a.openOnFocus, disableClearable = _a.disableClearable, async = _a.async, hidden = _a.hidden, onLoadItems = _a.onLoadItems, onAsyncLoadValueItem = _a.onAsyncLoadValueItem, onRenderItem = _a.onRenderItem, onRenderTag = _a.onRenderTag, onAddItem = _a.onAddItem, getOptionDisabled = _a.getOptionDisabled,
7684
7683
  //----------------------------------------------------------------------------------------------------------------
7685
7684
  onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate,
7686
7685
  //----------------------------------------------------------------------------------------------------------------
@@ -7704,7 +7703,7 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
7704
7703
  var _c = useState(false), isOnGetItemLoading = _c[0], setIsOnGetItemLoading = _c[1];
7705
7704
  var _d = useAutoUpdateState$1(initItems), items = _d[0], setItems = _d[1];
7706
7705
  var _e = useAutoUpdateState$1(initError), error = _e[0], setError = _e[1];
7707
- var _f = useAutoUpdateState$1(initHelperText), helperText = _f[0], setHelperText = _f[1];
7706
+ var _f = useState(), errorHelperText = _f[0], setErrorHelperText = _f[1];
7708
7707
  var _g = useAutoUpdateState$1(initLoading), loading = _g[0], setLoading = _g[1];
7709
7708
  var _h = useAutoUpdateState$1(initDisabled), disabled = _h[0], setDisabled = _h[1];
7710
7709
  var _j = useState(undefined), inputValue = _j[0], setInputValue = _j[1];
@@ -7946,27 +7945,27 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
7946
7945
  var _a;
7947
7946
  (_a = textFieldRef.current) === null || _a === void 0 ? void 0 : _a.focus();
7948
7947
  }, [textFieldRef]);
7949
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
7950
- var setErrorHelperText = useCallback(function (error, helperText) {
7948
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
7949
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
7951
7950
  setError(error);
7952
- setHelperText(helperText);
7953
- }, [setError, setHelperText]);
7951
+ setErrorHelperText(errorHelperText);
7952
+ }, [setError]);
7954
7953
  // Function - validate ---------------------------------------------------------------------------------------------
7955
7954
  var validate = useCallback(function (value) {
7956
7955
  if (required && empty(value)) {
7957
- setErrorHelperText(true, '필수 선택 항목입니다.');
7956
+ setErrorErrorHelperText(true, '필수 선택 항목입니다.');
7958
7957
  return false;
7959
7958
  }
7960
7959
  if (onValidate) {
7961
7960
  var onValidateResult = onValidate(value);
7962
7961
  if (onValidateResult != null && onValidateResult !== true) {
7963
- setErrorHelperText(true, onValidateResult);
7962
+ setErrorErrorHelperText(true, onValidateResult);
7964
7963
  return false;
7965
7964
  }
7966
7965
  }
7967
- setErrorHelperText(false, initHelperText);
7966
+ setErrorErrorHelperText(false, undefined);
7968
7967
  return true;
7969
- }, [required, onValidate, setErrorHelperText, initHelperText]);
7968
+ }, [required, onValidate, setErrorErrorHelperText]);
7970
7969
  // Commands --------------------------------------------------------------------------------------------------------
7971
7970
  useLayoutEffect(function () {
7972
7971
  if (ref || onAddValueItem) {
@@ -8003,7 +8002,7 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
8003
8002
  focusValidate: focus,
8004
8003
  validate: function () { return validate(value); },
8005
8004
  setError: function (error, errorText) {
8006
- return setErrorHelperText(error, error ? errorText : initHelperText);
8005
+ return setErrorErrorHelperText(error, error ? errorText : undefined);
8007
8006
  },
8008
8007
  getFormValueSeparator: function () { return formValueSeparator; },
8009
8008
  isFormValueSort: function () { return !!formValueSort; },
@@ -8062,8 +8061,7 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
8062
8061
  id,
8063
8062
  setValue,
8064
8063
  setDisabled,
8065
- setErrorHelperText,
8066
- initHelperText,
8064
+ setErrorErrorHelperText,
8067
8065
  setItems,
8068
8066
  setLoading,
8069
8067
  data,
@@ -8132,7 +8130,7 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
8132
8130
  }
8133
8131
  }, renderTags: function (value, getTagProps) {
8134
8132
  return value.map(function (option, index) { return (React__default.createElement(Chip, __assign$7({ size: 'small', label: onRenderTag ? onRenderTag(option) : option.label }, getTagProps({ index: index })))); });
8135
- }, renderInput: function (params) { return (React__default.createElement(FormTextField, __assign$7({}, 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: helperText, placeholder: placeholder, noFormValueItem: true, InputProps: __assign$7(__assign$7({}, params.InputProps), { endAdornment: (React__default.createElement(React__default.Fragment, null,
8133
+ }, renderInput: function (params) { return (React__default.createElement(FormTextField, __assign$7({}, 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, placeholder: placeholder, noFormValueItem: true, InputProps: __assign$7(__assign$7({}, params.InputProps), { endAdornment: (React__default.createElement(React__default.Fragment, null,
8136
8134
  loading || isOnGetItemLoading ? React__default.createElement(CircularProgress$1, { color: 'inherit', size: 20 }) : null,
8137
8135
  params.InputProps.endAdornment)) }), inputProps: readOnly || disabled ? __assign$7(__assign$7({}, params.inputProps), { tabIndex: -1 }) : params.inputProps }))); } }));
8138
8136
  }));
@@ -10370,7 +10368,7 @@ styleInject(css_248z$7);var PrivateDatePicker = React__default.forwardRef(functi
10370
10368
  // ID --------------------------------------------------------------------------------------------------------------
10371
10369
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
10372
10370
  //--------------------------------------------------------------------------------------------------------------------
10373
- name = _a.name, type = _a.type, time = _a.time, initValue = _a.value, initData = _a.data, initLabel = _a.label, labelIcon = _a.labelIcon, initFormat = _a.format, initFormValueFormat = _a.formValueFormat, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, width = _a.width, initError = _a.error, initHelperText = _a.helperText, minDate = _a.minDate, maxDate = _a.maxDate, disableFuture = _a.disableFuture, disablePast = _a.disablePast, exceptValue = _a.exceptValue, icon = _a.icon, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, align = _a.align, hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds, minuteInterval = _a.minuteInterval, secondInterval = _a.secondInterval, readOnlyInput = _a.readOnlyInput, hidden = _a.hidden, onChange = _a.onChange, onValidate = _a.onValidate,
10371
+ name = _a.name, type = _a.type, time = _a.time, initValue = _a.value, initData = _a.data, initLabel = _a.label, labelIcon = _a.labelIcon, initFormat = _a.format, initFormValueFormat = _a.formValueFormat, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, width = _a.width, initError = _a.error, helperText = _a.helperText, minDate = _a.minDate, maxDate = _a.maxDate, disableFuture = _a.disableFuture, disablePast = _a.disablePast, exceptValue = _a.exceptValue, icon = _a.icon, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, align = _a.align, hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds, minuteInterval = _a.minuteInterval, secondInterval = _a.secondInterval, readOnlyInput = _a.readOnlyInput, hidden = _a.hidden, onChange = _a.onChange, onValidate = _a.onValidate,
10374
10372
  //--------------------------------------------------------------------------------------------------------------------
10375
10373
  className = _a.className, initStyle = _a.style, sx = _a.sx, otherProps = __rest$4(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "name", "type", "time", "value", "data", "label", "labelIcon", "format", "formValueFormat", "required", "readOnly", "disabled", "width", "error", "helperText", "minDate", "maxDate", "disableFuture", "disablePast", "exceptValue", "icon", "startAdornment", "endAdornment", "align", "hours", "minutes", "seconds", "minuteInterval", "secondInterval", "readOnlyInput", "hidden", "onChange", "onValidate", "className", "style", "sx"]);
10376
10374
  var id = useId();
@@ -10395,7 +10393,7 @@ styleInject(css_248z$7);var PrivateDatePicker = React__default.forwardRef(functi
10395
10393
  // State -----------------------------------------------------------------------------------------------------------
10396
10394
  var _d = useAutoUpdateState$1(initError), error = _d[0], setError = _d[1];
10397
10395
  var _e = useState(null), timeError = _e[0], setTimeError = _e[1];
10398
- var _f = useAutoUpdateState$1(initHelperText), helperText = _f[0], setHelperText = _f[1];
10396
+ var _f = useState(), errorHelperText = _f[0], setErrorHelperText = _f[1];
10399
10397
  var _g = useAutoUpdateState$1(initDisabled), disabled = _g[0], setDisabled = _g[1];
10400
10398
  var _h = useAutoUpdateState$1(initData), data = _h[0], setData = _h[1];
10401
10399
  // Memo --------------------------------------------------------------------------------------------------------------
@@ -10510,39 +10508,39 @@ styleInject(css_248z$7);var PrivateDatePicker = React__default.forwardRef(functi
10510
10508
  var _a;
10511
10509
  (_a = textFieldInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
10512
10510
  }, [textFieldInputRef]);
10513
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
10514
- var setErrorHelperText = useCallback(function (error, helperText) {
10511
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
10512
+ var setErrorErrorHelperText = useCallback(function (error, helperText) {
10515
10513
  setError(error);
10516
- setHelperText(helperText);
10517
- }, [setError, setHelperText]);
10514
+ setErrorHelperText(helperText);
10515
+ }, [setError]);
10518
10516
  // Function - validate ---------------------------------------------------------------------------------------------
10519
10517
  var validate = useCallback(function (value) {
10520
10518
  if (required && empty(value)) {
10521
- setErrorHelperText(true, '필수 입력 항목입니다.');
10519
+ setErrorErrorHelperText(true, '필수 입력 항목입니다.');
10522
10520
  return false;
10523
10521
  }
10524
10522
  if (value && !value.isValid()) {
10525
- setErrorHelperText(true, '형식이 일치하지 않습니다.');
10523
+ setErrorErrorHelperText(true, '형식이 일치하지 않습니다.');
10526
10524
  return false;
10527
10525
  }
10528
10526
  if (datePickerErrorRef.current) {
10529
- setErrorHelperText(true, getDateValidationErrorText(datePickerErrorRef.current));
10527
+ setErrorErrorHelperText(true, getDateValidationErrorText(datePickerErrorRef.current));
10530
10528
  return false;
10531
10529
  }
10532
10530
  if (timeError) {
10533
- setErrorHelperText(true, getDateValidationErrorText(timeError));
10531
+ setErrorErrorHelperText(true, getDateValidationErrorText(timeError));
10534
10532
  return false;
10535
10533
  }
10536
10534
  if (onValidate) {
10537
10535
  var onValidateResult = onValidate(value);
10538
10536
  if (onValidateResult != null && onValidateResult !== true) {
10539
- setErrorHelperText(true, onValidateResult);
10537
+ setErrorErrorHelperText(true, onValidateResult);
10540
10538
  return false;
10541
10539
  }
10542
10540
  }
10543
- setErrorHelperText(false, initHelperText);
10541
+ setErrorErrorHelperText(false, undefined);
10544
10542
  return true;
10545
- }, [required, timeError, onValidate, setErrorHelperText, initHelperText]);
10543
+ }, [required, timeError, onValidate, setErrorErrorHelperText]);
10546
10544
  // Commands --------------------------------------------------------------------------------------------------------
10547
10545
  useLayoutEffect(function () {
10548
10546
  if (ref || onAddValueItem) {
@@ -10577,7 +10575,7 @@ styleInject(css_248z$7);var PrivateDatePicker = React__default.forwardRef(functi
10577
10575
  focusValidate: focus,
10578
10576
  validate: function () { return validate(value); },
10579
10577
  setError: function (error, errorText) {
10580
- return setErrorHelperText(error, error ? errorText : initHelperText);
10578
+ return setErrorErrorHelperText(error, error ? errorText : undefined);
10581
10579
  },
10582
10580
  getFormValueFormat: function () { return formValueFormat; },
10583
10581
  };
@@ -10620,8 +10618,7 @@ styleInject(css_248z$7);var PrivateDatePicker = React__default.forwardRef(functi
10620
10618
  id,
10621
10619
  setValue,
10622
10620
  setDisabled,
10623
- setErrorHelperText,
10624
- initHelperText,
10621
+ setErrorErrorHelperText,
10625
10622
  data,
10626
10623
  setData,
10627
10624
  ]);
@@ -10776,14 +10773,14 @@ styleInject(css_248z$7);var PrivateDatePicker = React__default.forwardRef(functi
10776
10773
  {
10777
10774
  name: 'offset',
10778
10775
  options: {
10779
- offset: [0, error && helperText ? 8 : -14],
10776
+ offset: [0, error && errorHelperText ? 8 : -14],
10780
10777
  },
10781
10778
  },
10782
10779
  ],
10783
10780
  }, title: React__default.createElement(PrivateStaticDatePicker, __assign$7({}, otherProps, { ref: privateStaticDatePickerRef, type: type, time: time, value: value, availableDate: availableDate, minDate: minDate, maxDate: maxDate, disablePast: disablePast, disableFuture: disableFuture, hours: hours, minutes: minutes, seconds: seconds, minuteInterval: minuteInterval, secondInterval: secondInterval, onChange: handleChange, onAccept: function () { return !time && setOpen(false); }, onClose: function () { return setOpen(false); } })) },
10784
10781
  React__default.createElement("div", { style: { display: fullWidth ? 'block' : 'inline-block' } },
10785
10782
  React__default.createElement(DesktopDatePicker, __assign$7({ value: inputValue, label: label, open: false, format: format, disabled: disabled, readOnly: readOnly, minDate: minDate, maxDate: maxDate, disablePast: disablePast, disableFuture: disableFuture, onClose: function () { return setOpen(false); }, onError: function (reason) { return (datePickerErrorRef.current = reason); }, onChange: function (newValue) { return handleChange('date', newValue); }, slotProps: slotProps }, otherProps)))),
10786
- !formColWithHelperText && helperText && (React__default.createElement(FormHelperText, { error: error, style: { marginLeft: variant === 'standard' ? 0 : 14 } }, helperText))))));
10783
+ !formColWithHelperText && (helperText || (error && errorHelperText)) && (React__default.createElement(FormHelperText, { error: error, style: { marginLeft: variant === 'standard' ? 0 : 14 } }, error ? errorHelperText : helperText))))));
10787
10784
  });
10788
10785
  PrivateDatePicker.displayName = 'PrivateDatePicker';
10789
10786
  PrivateDatePicker.defaultProps = PrivateDatePickerDefaultProps;var PrivateDateTimePickerDefaultProps = {
@@ -11074,7 +11071,7 @@ PrivateStaticDateTimePicker.defaultProps = PrivateStaticDateTimePickerDefaultPro
11074
11071
  // ID --------------------------------------------------------------------------------------------------------------
11075
11072
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
11076
11073
  //--------------------------------------------------------------------------------------------------------------------
11077
- name = _a.name, type = _a.type, time = _a.time, initValue = _a.value, initData = _a.data, initLabel = _a.label, labelIcon = _a.labelIcon, initFormat = _a.format, initFormValueFormat = _a.formValueFormat, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, width = _a.width, initError = _a.error, initHelperText = _a.helperText, minDate = _a.minDate, maxDate = _a.maxDate, disableFuture = _a.disableFuture, disablePast = _a.disablePast, exceptValue = _a.exceptValue, icon = _a.icon, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, align = _a.align, hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds, minuteInterval = _a.minuteInterval, secondInterval = _a.secondInterval, readOnlyInput = _a.readOnlyInput, hidden = _a.hidden, onChange = _a.onChange, onValidate = _a.onValidate,
11074
+ name = _a.name, type = _a.type, time = _a.time, initValue = _a.value, initData = _a.data, initLabel = _a.label, labelIcon = _a.labelIcon, initFormat = _a.format, initFormValueFormat = _a.formValueFormat, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, width = _a.width, initError = _a.error, helperText = _a.helperText, minDate = _a.minDate, maxDate = _a.maxDate, disableFuture = _a.disableFuture, disablePast = _a.disablePast, exceptValue = _a.exceptValue, icon = _a.icon, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, align = _a.align, hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds, minuteInterval = _a.minuteInterval, secondInterval = _a.secondInterval, readOnlyInput = _a.readOnlyInput, hidden = _a.hidden, onChange = _a.onChange, onValidate = _a.onValidate,
11078
11075
  //--------------------------------------------------------------------------------------------------------------------
11079
11076
  className = _a.className, initStyle = _a.style, sx = _a.sx, otherProps = __rest$4(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "name", "type", "time", "value", "data", "label", "labelIcon", "format", "formValueFormat", "required", "readOnly", "disabled", "width", "error", "helperText", "minDate", "maxDate", "disableFuture", "disablePast", "exceptValue", "icon", "startAdornment", "endAdornment", "align", "hours", "minutes", "seconds", "minuteInterval", "secondInterval", "readOnlyInput", "hidden", "onChange", "onValidate", "className", "style", "sx"]);
11080
11077
  var id = useId();
@@ -11099,7 +11096,7 @@ PrivateStaticDateTimePicker.defaultProps = PrivateStaticDateTimePickerDefaultPro
11099
11096
  // State -----------------------------------------------------------------------------------------------------------
11100
11097
  var _d = useAutoUpdateState$1(initError), error = _d[0], setError = _d[1];
11101
11098
  var _e = useState(null), timeError = _e[0], setTimeError = _e[1];
11102
- var _f = useAutoUpdateState$1(initHelperText), helperText = _f[0], setHelperText = _f[1];
11099
+ var _f = useState(), errorHelperText = _f[0], setErrorHelperText = _f[1];
11103
11100
  var _g = useAutoUpdateState$1(initDisabled), disabled = _g[0], setDisabled = _g[1];
11104
11101
  var _h = useAutoUpdateState$1(initData), data = _h[0], setData = _h[1];
11105
11102
  // Memo --------------------------------------------------------------------------------------------------------------
@@ -11214,39 +11211,39 @@ PrivateStaticDateTimePicker.defaultProps = PrivateStaticDateTimePickerDefaultPro
11214
11211
  var _a;
11215
11212
  (_a = textFieldInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
11216
11213
  }, [textFieldInputRef]);
11217
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
11218
- var setErrorHelperText = useCallback(function (error, helperText) {
11214
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
11215
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
11219
11216
  setError(error);
11220
- setHelperText(helperText);
11221
- }, [setError, setHelperText]);
11217
+ setErrorHelperText(errorHelperText);
11218
+ }, [setError]);
11222
11219
  // Function - validate ---------------------------------------------------------------------------------------------
11223
11220
  var validate = useCallback(function (value) {
11224
11221
  if (required && empty(value)) {
11225
- setErrorHelperText(true, '필수 입력 항목입니다.');
11222
+ setErrorErrorHelperText(true, '필수 입력 항목입니다.');
11226
11223
  return false;
11227
11224
  }
11228
11225
  if (value && !value.isValid()) {
11229
- setErrorHelperText(true, '형식이 일치하지 않습니다.');
11226
+ setErrorErrorHelperText(true, '형식이 일치하지 않습니다.');
11230
11227
  return false;
11231
11228
  }
11232
11229
  if (datePickerErrorRef.current) {
11233
- setErrorHelperText(true, getDateValidationErrorText(datePickerErrorRef.current));
11230
+ setErrorErrorHelperText(true, getDateValidationErrorText(datePickerErrorRef.current));
11234
11231
  return false;
11235
11232
  }
11236
11233
  if (timeError) {
11237
- setErrorHelperText(true, getDateValidationErrorText(timeError));
11234
+ setErrorErrorHelperText(true, getDateValidationErrorText(timeError));
11238
11235
  return false;
11239
11236
  }
11240
11237
  if (onValidate) {
11241
11238
  var onValidateResult = onValidate(value);
11242
11239
  if (onValidateResult != null && onValidateResult !== true) {
11243
- setErrorHelperText(true, onValidateResult);
11240
+ setErrorErrorHelperText(true, onValidateResult);
11244
11241
  return false;
11245
11242
  }
11246
11243
  }
11247
- setErrorHelperText(false, initHelperText);
11244
+ setErrorErrorHelperText(false, undefined);
11248
11245
  return true;
11249
- }, [required, timeError, onValidate, setErrorHelperText, initHelperText]);
11246
+ }, [required, timeError, onValidate, setErrorErrorHelperText]);
11250
11247
  // Commands --------------------------------------------------------------------------------------------------------
11251
11248
  useLayoutEffect(function () {
11252
11249
  if (ref || onAddValueItem) {
@@ -11281,7 +11278,7 @@ PrivateStaticDateTimePicker.defaultProps = PrivateStaticDateTimePickerDefaultPro
11281
11278
  focusValidate: focus,
11282
11279
  validate: function () { return validate(value); },
11283
11280
  setError: function (error, errorText) {
11284
- return setErrorHelperText(error, error ? errorText : initHelperText);
11281
+ return setErrorErrorHelperText(error, error ? errorText : undefined);
11285
11282
  },
11286
11283
  getFormValueFormat: function () { return formValueFormat; },
11287
11284
  };
@@ -11324,8 +11321,7 @@ PrivateStaticDateTimePicker.defaultProps = PrivateStaticDateTimePickerDefaultPro
11324
11321
  id,
11325
11322
  setValue,
11326
11323
  setDisabled,
11327
- setErrorHelperText,
11328
- initHelperText,
11324
+ setErrorErrorHelperText,
11329
11325
  data,
11330
11326
  setData,
11331
11327
  ]);
@@ -11504,7 +11500,7 @@ PrivateStaticDateTimePicker.defaultProps = PrivateStaticDateTimePickerDefaultPro
11504
11500
  }, title: React__default.createElement(PrivateStaticDateTimePicker, __assign$7({}, otherProps, { ref: privateStaticDateTimePickerRef, type: type, time: time, value: value, availableDate: availableDate, minDate: minDate, maxDate: maxDate, disablePast: disablePast, disableFuture: disableFuture, hours: hours, minutes: minutes, seconds: seconds, minuteInterval: minuteInterval, secondInterval: secondInterval, onChange: handleChange, onAccept: function () { return !time && setOpen(false); }, onClose: function () { return setOpen(false); } })) },
11505
11501
  React__default.createElement("div", { style: { display: fullWidth ? 'block' : 'inline-block' } },
11506
11502
  React__default.createElement(DesktopDateTimePicker, __assign$7({ value: inputValue, label: label, open: false, format: format, disabled: disabled, readOnly: readOnly, minDate: minDate, maxDate: maxDate, disablePast: disablePast, disableFuture: disableFuture, onClose: function () { return setOpen(false); }, onError: function (reason) { return (datePickerErrorRef.current = reason); }, onChange: function (newValue) { return handleChange('date', newValue); }, slotProps: slotProps }, otherProps)))),
11507
- !formColWithHelperText && helperText && (React__default.createElement(FormHelperText, { error: error, style: { marginLeft: variant === 'standard' ? 0 : 14 } }, helperText))))));
11503
+ !formColWithHelperText && (helperText || (error && errorHelperText)) && (React__default.createElement(FormHelperText, { error: error, style: { marginLeft: variant === 'standard' ? 0 : 14 } }, error ? errorHelperText : helperText))))));
11508
11504
  });
11509
11505
  PrivateDateTimePicker.displayName = 'PrivateDateTimePicker';
11510
11506
  PrivateDateTimePicker.defaultProps = PrivateDateTimePickerDefaultProps;var PrivateAlertDialogDefaultProps = {
@@ -12133,7 +12129,7 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12133
12129
  // ID --------------------------------------------------------------------------------------------------------------
12134
12130
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
12135
12131
  //--------------------------------------------------------------------------------------------------------------------
12136
- name = _a.name, initValue = _a.value, initData = _a.data, startLabel = _a.startLabel, startLabelIcon = _a.startLabelIcon, endLabel = _a.endLabel, endLabelIcon = _a.endLabelIcon, initCalendarCount = _a.calendarCount, initFormat = _a.format, formValueFormat = _a.formValueFormat, allowSingleSelect = _a.allowSingleSelect, required = _a.required, requiredStart = _a.requiredStart, requiredEnd = _a.requiredEnd, readOnly = _a.readOnly, readOnlyStart = _a.readOnlyStart, readOnlyEnd = _a.readOnlyEnd, readOnlyInput = _a.readOnlyInput, initDisabled = _a.disabled, inputWidth = _a.inputWidth, exceptValue = _a.exceptValue, initError = _a.error, initHelperText = _a.helperText, formValueStartNameSuffix = _a.formValueStartNameSuffix, formValueEndNameSuffix = _a.formValueEndNameSuffix, icon = _a.icon, startIcon = _a.startIcon, endIcon = _a.endIcon, startAdornment = _a.startAdornment, startStartAdornment = _a.startStartAdornment, endStartAdornment = _a.endStartAdornment, endAdornment = _a.endAdornment, startEndAdornment = _a.startEndAdornment, endEndAdornment = _a.endEndAdornment, disablePast = _a.disablePast, disableFuture = _a.disableFuture, minDate = _a.minDate, maxDate = _a.maxDate, hidden = _a.hidden, onGetActionButtons = _a.onGetActionButtons, onChange = _a.onChange, onValidate = _a.onValidate,
12132
+ name = _a.name, initValue = _a.value, initData = _a.data, startLabel = _a.startLabel, startLabelIcon = _a.startLabelIcon, endLabel = _a.endLabel, endLabelIcon = _a.endLabelIcon, initCalendarCount = _a.calendarCount, initFormat = _a.format, formValueFormat = _a.formValueFormat, allowSingleSelect = _a.allowSingleSelect, required = _a.required, requiredStart = _a.requiredStart, requiredEnd = _a.requiredEnd, readOnly = _a.readOnly, readOnlyStart = _a.readOnlyStart, readOnlyEnd = _a.readOnlyEnd, readOnlyInput = _a.readOnlyInput, initDisabled = _a.disabled, inputWidth = _a.inputWidth, exceptValue = _a.exceptValue, initError = _a.error, helperText = _a.helperText, formValueStartNameSuffix = _a.formValueStartNameSuffix, formValueEndNameSuffix = _a.formValueEndNameSuffix, icon = _a.icon, startIcon = _a.startIcon, endIcon = _a.endIcon, startAdornment = _a.startAdornment, startStartAdornment = _a.startStartAdornment, endStartAdornment = _a.endStartAdornment, endAdornment = _a.endAdornment, startEndAdornment = _a.startEndAdornment, endEndAdornment = _a.endEndAdornment, disablePast = _a.disablePast, disableFuture = _a.disableFuture, minDate = _a.minDate, maxDate = _a.maxDate, hidden = _a.hidden, onGetActionButtons = _a.onGetActionButtons, onChange = _a.onChange, onValidate = _a.onValidate,
12137
12133
  // -------------------------------------------------------------------------------------------------------------------
12138
12134
  className = _a.className;
12139
12135
  var id = useId();
@@ -12160,8 +12156,10 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12160
12156
  var _d = useState(false), startError = _d[0], setStartError = _d[1];
12161
12157
  var _e = useState(false), endError = _e[0], setEndError = _e[1];
12162
12158
  var _f = useAutoUpdateState$1(initDisabled), disabled = _f[0], setDisabled = _f[1];
12163
- var _g = useAutoUpdateState$1(initHelperText), helperText = _g[0], setHelperText = _g[1];
12164
- var _h = useAutoUpdateState$1(initData), data = _h[0], setData = _h[1];
12159
+ var _g = useState(), errorHelperText = _g[0], setErrorHelperText = _g[1];
12160
+ var _h = useState(), startErrorHelperText = _h[0], setStartErrorHelperText = _h[1];
12161
+ var _j = useState(), endErrorHelperText = _j[0], setEndErrorHelperText = _j[1];
12162
+ var _k = useAutoUpdateState$1(initData), data = _k[0], setData = _k[1];
12165
12163
  // Memo --------------------------------------------------------------------------------------------------------------
12166
12164
  var format = useMemo(function () { return initFormat || DEFAULT_FORMAT; }, [initFormat]);
12167
12165
  // Function - getFinalValue ----------------------------------------------------------------------------------------
@@ -12182,77 +12180,77 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12182
12180
  (_b = startDateTextFieldRef.current) === null || _b === void 0 ? void 0 : _b.focus();
12183
12181
  }
12184
12182
  }, [endError, startDateTextFieldRef, endDateTextFieldRef]);
12185
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
12186
- var setErrorHelperText = useCallback(function (error, helperText) {
12183
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
12184
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
12187
12185
  setError(error);
12188
- setHelperText(helperText);
12189
- }, [setError, setHelperText]);
12190
- var setStartErrorHelperText = useCallback(function (error, helperText) {
12186
+ setErrorHelperText(errorHelperText);
12187
+ }, [setError]);
12188
+ var setStartErrorErrorHelperText = useCallback(function (error, startErrorHelperText) {
12191
12189
  setStartError(error);
12192
- setHelperText(helperText);
12193
- }, [setHelperText]);
12194
- var setEndErrorHelperText = useCallback(function (error, helperText) {
12190
+ setStartErrorHelperText(startErrorHelperText);
12191
+ }, []);
12192
+ var setEndErrorErrorHelperText = useCallback(function (error, endErrorHelperText) {
12195
12193
  setEndError(error);
12196
- setHelperText(helperText);
12197
- }, [setHelperText]);
12194
+ setEndErrorHelperText(endErrorHelperText);
12195
+ }, []);
12198
12196
  // Function - validate ---------------------------------------------------------------------------------------------
12199
12197
  var validate = useCallback(function (value) {
12200
12198
  var _a, _b;
12201
12199
  if (required && (value[0] == null || value[1] == null)) {
12202
12200
  if (value[0] == null && value[1] == null) {
12203
- setErrorHelperText(true, '필수 입력 항목입니다.');
12201
+ setErrorErrorHelperText(true, '필수 입력 항목입니다.');
12204
12202
  }
12205
12203
  else if (value[0] == null) {
12206
- setStartErrorHelperText(true, '필수 입력 항목입니다.');
12204
+ setStartErrorErrorHelperText(true, '필수 입력 항목입니다.');
12207
12205
  }
12208
12206
  else {
12209
- setEndErrorHelperText(true, '필수 입력 항목입니다.');
12207
+ setEndErrorErrorHelperText(true, '필수 입력 항목입니다.');
12210
12208
  }
12211
12209
  return false;
12212
12210
  }
12213
12211
  if (requiredStart && value[0] == null) {
12214
- setStartErrorHelperText(true, '필수 입력 항목입니다.');
12212
+ setStartErrorErrorHelperText(true, '필수 입력 항목입니다.');
12215
12213
  return false;
12216
12214
  }
12217
12215
  if (requiredEnd && value[1] == null) {
12218
- setEndErrorHelperText(true, '필수 입력 항목입니다.');
12216
+ setEndErrorErrorHelperText(true, '필수 입력 항목입니다.');
12219
12217
  return false;
12220
12218
  }
12221
12219
  if (!allowSingleSelect && (value[0] || value[1]) && (value[0] == null || value[1] == null)) {
12222
12220
  if (value[0] == null) {
12223
- setStartErrorHelperText(true, '필수 입력 항목입니다.');
12221
+ setStartErrorErrorHelperText(true, '필수 입력 항목입니다.');
12224
12222
  }
12225
12223
  else {
12226
- setEndErrorHelperText(true, '필수 입력 항목입니다.');
12224
+ setEndErrorErrorHelperText(true, '필수 입력 항목입니다.');
12227
12225
  }
12228
12226
  return false;
12229
12227
  }
12230
12228
  var startInputValue = ((_a = startDateTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.value) || '';
12231
12229
  var endInputValue = ((_b = endDateTextFieldRef.current) === null || _b === void 0 ? void 0 : _b.value) || '';
12232
12230
  if (notEmpty(startInputValue) && !dayjs(startInputValue, format).isValid()) {
12233
- setStartErrorHelperText(true, '형식이 일치하지 않습니다.');
12231
+ setStartErrorErrorHelperText(true, '형식이 일치하지 않습니다.');
12234
12232
  return false;
12235
12233
  }
12236
12234
  if (notEmpty(endInputValue) && !dayjs(endInputValue, format).isValid()) {
12237
- setEndErrorHelperText(true, '형식이 일치하지 않습니다.');
12235
+ setEndErrorErrorHelperText(true, '형식이 일치하지 않습니다.');
12238
12236
  return false;
12239
12237
  }
12240
12238
  if (startInputDatePickerErrorRef.current) {
12241
- setStartErrorHelperText(true, getDateValidationErrorText(startInputDatePickerErrorRef.current));
12239
+ setStartErrorErrorHelperText(true, getDateValidationErrorText(startInputDatePickerErrorRef.current));
12242
12240
  return false;
12243
12241
  }
12244
12242
  if (endInputDatePickerErrorRef.current) {
12245
- setEndErrorHelperText(true, getDateValidationErrorText(endInputDatePickerErrorRef.current));
12243
+ setEndErrorErrorHelperText(true, getDateValidationErrorText(endInputDatePickerErrorRef.current));
12246
12244
  return false;
12247
12245
  }
12248
12246
  if (onValidate) {
12249
12247
  var onValidateResult = onValidate(value);
12250
12248
  if (onValidateResult != null && onValidateResult !== true) {
12251
- setErrorHelperText(true, onValidateResult);
12249
+ setErrorErrorHelperText(true, onValidateResult);
12252
12250
  return false;
12253
12251
  }
12254
12252
  }
12255
- setErrorHelperText(false, initHelperText);
12253
+ setErrorErrorHelperText(false, undefined);
12256
12254
  setStartError(false);
12257
12255
  setEndError(false);
12258
12256
  return true;
@@ -12263,10 +12261,9 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12263
12261
  allowSingleSelect,
12264
12262
  format,
12265
12263
  onValidate,
12266
- setErrorHelperText,
12267
- initHelperText,
12268
- setStartErrorHelperText,
12269
- setEndErrorHelperText,
12264
+ setErrorErrorHelperText,
12265
+ setStartErrorErrorHelperText,
12266
+ setEndErrorErrorHelperText,
12270
12267
  ]);
12271
12268
  // Function activeMonth --------------------------------------------------------------------------------------------
12272
12269
  var activeMonth = useCallback(function (month) {
@@ -12275,16 +12272,16 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12275
12272
  (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.activeMonth(month);
12276
12273
  }, [containerRef]);
12277
12274
  // State -----------------------------------------------------------------------------------------------------------
12278
- var _j = useState(false), open = _j[0], setOpen = _j[1];
12279
- var _k = useState('start'), selectType = _k[0], setSelectType = _k[1];
12280
- var _l = useAutoUpdateState$1(useCallback(function () {
12275
+ var _l = useState(false), open = _l[0], setOpen = _l[1];
12276
+ var _m = useState('start'), selectType = _m[0], setSelectType = _m[1];
12277
+ var _o = useAutoUpdateState$1(useCallback(function () {
12281
12278
  return initValue || DEFAULT_VALUE;
12282
- }, [initValue])), value = _l[0], setValue = _l[1];
12279
+ }, [initValue])), value = _o[0], setValue = _o[1];
12283
12280
  var calendarCount = useAutoUpdateState$1(initCalendarCount || 2)[0];
12284
- var _m = useState(function () {
12281
+ var _p = useState(function () {
12285
12282
  var now = dayjs();
12286
12283
  return [now, now.add(1, 'month'), now.add(2, 'month')];
12287
- }), months = _m[0], setMonths = _m[1];
12284
+ }), months = _p[0], setMonths = _p[1];
12288
12285
  // Memo --------------------------------------------------------------------------------------------------------------
12289
12286
  var inputDatePickerProps = useMemo(function () { return ({
12290
12287
  variant: variant,
@@ -12360,9 +12357,9 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12360
12357
  var handleChange = useCallback(function (newValue) {
12361
12358
  setValue(newValue);
12362
12359
  setOpen(false);
12363
- setStartErrorHelperText(false, initHelperText);
12364
- setEndErrorHelperText(false, initHelperText);
12365
- }, [initHelperText, setEndErrorHelperText, setStartErrorHelperText, setValue]);
12360
+ setStartErrorErrorHelperText(false, undefined);
12361
+ setEndErrorErrorHelperText(false, undefined);
12362
+ }, [setEndErrorErrorHelperText, setStartErrorErrorHelperText, setValue]);
12366
12363
  var handleValueChange = useCallback(function (selectType, newValue, fromInput) {
12367
12364
  var _a;
12368
12365
  var finalValue;
@@ -12391,7 +12388,7 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12391
12388
  }
12392
12389
  }
12393
12390
  }
12394
- setStartErrorHelperText(false, initHelperText);
12391
+ setStartErrorErrorHelperText(false, undefined);
12395
12392
  if (fromInput && newValue) {
12396
12393
  activeMonth(newValue);
12397
12394
  }
@@ -12402,7 +12399,7 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12402
12399
  if (fromInput && newValue) {
12403
12400
  activeMonth(newValue.subtract(calendarCount - 1, 'month'));
12404
12401
  }
12405
- setStartErrorHelperText(false, initHelperText);
12402
+ setStartErrorErrorHelperText(false, undefined);
12406
12403
  }
12407
12404
  else {
12408
12405
  finalValue = [value[0], newValue];
@@ -12423,7 +12420,7 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12423
12420
  (_a = startDateTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.focus();
12424
12421
  });
12425
12422
  }
12426
- setEndErrorHelperText(false, initHelperText);
12423
+ setEndErrorErrorHelperText(false, undefined);
12427
12424
  }
12428
12425
  break;
12429
12426
  }
@@ -12434,11 +12431,10 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12434
12431
  }, [
12435
12432
  setValue,
12436
12433
  value,
12437
- setStartErrorHelperText,
12438
- initHelperText,
12434
+ setStartErrorErrorHelperText,
12439
12435
  activeMonth,
12440
12436
  calendarCount,
12441
- setEndErrorHelperText,
12437
+ setEndErrorErrorHelperText,
12442
12438
  open,
12443
12439
  onRequestSearchSubmit,
12444
12440
  name,
@@ -12570,7 +12566,7 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12570
12566
  focusValidate: focusValidate,
12571
12567
  validate: function () { return validate(value); },
12572
12568
  setError: function (error, errorText) {
12573
- return setErrorHelperText(error, error ? errorText : initHelperText);
12569
+ return setErrorErrorHelperText(error, error ? errorText : undefined);
12574
12570
  },
12575
12571
  getFormValueFormat: function () { return formValueFormat || FormDateRangePickerDefaultProps.format; },
12576
12572
  getFormValueStartNameSuffix: function () {
@@ -12628,8 +12624,7 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12628
12624
  id,
12629
12625
  setValue,
12630
12626
  setDisabled,
12631
- setErrorHelperText,
12632
- initHelperText,
12627
+ setErrorErrorHelperText,
12633
12628
  data,
12634
12629
  setData,
12635
12630
  ]);
@@ -12642,7 +12637,14 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12642
12637
  {
12643
12638
  name: 'offset',
12644
12639
  options: {
12645
- offset: [0, (error || startError || endError) && helperText ? 8 : -14],
12640
+ offset: [
12641
+ 0,
12642
+ (error && errorHelperText) ||
12643
+ (startError && startErrorHelperText) ||
12644
+ (endError && endErrorHelperText)
12645
+ ? 8
12646
+ : -14,
12647
+ ],
12646
12648
  },
12647
12649
  },
12648
12650
  ],
@@ -12654,7 +12656,17 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
12654
12656
  React__default.createElement(Grid, { item: true, sx: { px: 1 } }, "~"),
12655
12657
  React__default.createElement(Grid, { item: true, flex: 1 },
12656
12658
  React__default.createElement(InputDatePicker, __assign$7({}, inputDatePickerProps, { style: inputStyle, value: value[1], label: endLabel, labelIcon: endLabelIcon, error: error || endError, focused: focused || (open && selectType === 'end'), required: required || requiredEnd, readOnly: readOnly || readOnlyEnd, readOnlyInput: readOnlyInput, icon: endIcon || icon, startAdornment: endStartAdornment || startAdornment, endAdornment: endEndAdornment || endAdornment, inputRef: endDateTextFieldRef, onChange: function (newValue) { return handleInputDatePickerChange('end', newValue); }, onFocus: function () { return handleInputDatePickerFocus('end'); }, onError: function (reason) { return (endInputDatePickerErrorRef.current = reason); } }))))),
12657
- !formColWithHelperText && helperText && (React__default.createElement(FormHelperText, { error: error || startError || endError, style: { marginLeft: variant === 'standard' ? 0 : 14 } }, helperText))))));
12659
+ !formColWithHelperText &&
12660
+ (helperText ||
12661
+ (error && errorHelperText) ||
12662
+ (startError && startErrorHelperText) ||
12663
+ (endError && endErrorHelperText)) && (React__default.createElement(FormHelperText, { error: error || startError || endError, style: { marginLeft: variant === 'standard' ? 0 : 14 } }, error
12664
+ ? errorHelperText
12665
+ : startError
12666
+ ? startErrorHelperText
12667
+ : endError
12668
+ ? endErrorHelperText
12669
+ : helperText))))));
12658
12670
  });
12659
12671
  FormDateRangePicker.displayName = 'FormDateRangePicker';
12660
12672
  FormDateRangePicker.defaultProps = FormDateRangePickerDefaultProps;var FormFileDefaultProps = {
@@ -12716,7 +12728,7 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
12716
12728
  //----------------------------------------------------------------------------------------------------------------
12717
12729
  accept = _a.accept, hideUrl = _a.hideUrl, uploadLabel = _a.uploadLabel, uploadTabIndex = _a.uploadTabIndex, hideUpload = _a.hideUpload, hideUploadLabel = _a.hideUploadLabel, linkLabel = _a.linkLabel, linkTabIndex = _a.linkTabIndex, hideLink = _a.hideLink, hideLinkLabel = _a.hideLinkLabel, removeLabel = _a.removeLabel, removeTabIndex = _a.removeTabIndex, hideRemove = _a.hideRemove, hideRemoveLabel = _a.hideRemoveLabel, maxFileSize = _a.maxFileSize, preview = _a.preview, hidden = _a.hidden, onFile = _a.onFile, onLink = _a.onLink,
12718
12730
  //----------------------------------------------------------------------------------------------------------------
12719
- name = _a.name, labelIcon = _a.labelIcon, initLabel = _a.label, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, initData = _a.data, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate,
12731
+ name = _a.name, labelIcon = _a.labelIcon, initLabel = _a.label, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, initError = _a.error, helperText = _a.helperText, initValue = _a.value, initData = _a.data, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate,
12720
12732
  //----------------------------------------------------------------------------------------------------------------
12721
12733
  className = _a.className;
12722
12734
  var id = useId();
@@ -12745,7 +12757,7 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
12745
12757
  }, [value]);
12746
12758
  // State -----------------------------------------------------------------------------------------------------------
12747
12759
  var _d = useAutoUpdateState$1(initError), error = _d[0], setError = _d[1];
12748
- var _e = useAutoUpdateState$1(initHelperText), helperText = _e[0], setHelperText = _e[1];
12760
+ var _e = useState(), errorHelperText = _e[0], setErrorHelperText = _e[1];
12749
12761
  var _f = useAutoUpdateState$1(initDisabled), disabled = _f[0], setDisabled = _f[1];
12750
12762
  var _g = useState(false), isOpenLinkDialog = _g[0], setIsOpenLinkDialog = _g[1];
12751
12763
  var _h = useAutoUpdateState$1(initData), data = _h[0], setData = _h[1];
@@ -12771,11 +12783,11 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
12771
12783
  (_c = textFieldRef.current) === null || _c === void 0 ? void 0 : _c.focus();
12772
12784
  }
12773
12785
  }, [hideUpload, hideUrl]);
12774
- // Function - setErrorHelperText -----------------------------------------------------------------------------------
12775
- var setErrorHelperText = useCallback(function (error, helperText) {
12786
+ // Function - setErrorErrorHelperText -----------------------------------------------------------------------------------
12787
+ var setErrorErrorHelperText = useCallback(function (error, errorHelperText) {
12776
12788
  setError(error);
12777
- setHelperText(helperText);
12778
- }, [setError, setHelperText]);
12789
+ setErrorHelperText(errorHelperText);
12790
+ }, [setError]);
12779
12791
  // Function - validate ---------------------------------------------------------------------------------------------
12780
12792
  var validate = useCallback(function (value) {
12781
12793
  var isEmptyValue = false;
@@ -12786,19 +12798,19 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
12786
12798
  isEmptyValue = empty(text.trim());
12787
12799
  }
12788
12800
  if (required && (isEmptyValue || empty(value))) {
12789
- setErrorHelperText(true, '필수 선택 항목입니다.');
12801
+ setErrorErrorHelperText(true, '필수 선택 항목입니다.');
12790
12802
  return false;
12791
12803
  }
12792
12804
  if (onValidate) {
12793
12805
  var onValidateResult = onValidate(value);
12794
12806
  if (onValidateResult != null && onValidateResult !== true) {
12795
- setErrorHelperText(true, onValidateResult);
12807
+ setErrorErrorHelperText(true, onValidateResult);
12796
12808
  return false;
12797
12809
  }
12798
12810
  }
12799
- setErrorHelperText(false, initHelperText);
12811
+ setErrorErrorHelperText(false, undefined);
12800
12812
  return true;
12801
- }, [required, onValidate, setErrorHelperText, initHelperText]);
12813
+ }, [required, onValidate, setErrorErrorHelperText]);
12802
12814
  // Commands --------------------------------------------------------------------------------------------------------
12803
12815
  useLayoutEffect(function () {
12804
12816
  var lastValue = value;
@@ -12831,8 +12843,8 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
12831
12843
  focus: focus,
12832
12844
  focusValidate: focus,
12833
12845
  validate: function () { return validate(value); },
12834
- setError: function (error, helperText) {
12835
- return setErrorHelperText(error, error ? helperText : initHelperText);
12846
+ setError: function (error, errorHelperText) {
12847
+ return setErrorErrorHelperText(error, error ? errorHelperText : undefined);
12836
12848
  },
12837
12849
  };
12838
12850
  onAddValueItem(id, commands);
@@ -12863,14 +12875,13 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
12863
12875
  disabled,
12864
12876
  focus,
12865
12877
  validate,
12866
- initHelperText,
12867
12878
  ref,
12868
12879
  onAddValueItem,
12869
12880
  onRemoveValueItem,
12870
12881
  id,
12871
12882
  setValue,
12872
12883
  setDisabled,
12873
- setErrorHelperText,
12884
+ setErrorErrorHelperText,
12874
12885
  data,
12875
12886
  setData,
12876
12887
  ]);
@@ -12956,7 +12967,7 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
12956
12967
  // Render ----------------------------------------------------------------------------------------------------------
12957
12968
  return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormFile', "variant-".concat(variant), "size-".concat(size), !!initLabel && 'with-label', !!fullWidth && 'full-width', !!hideUrl && 'hide-file-name', !!hideLink && 'hide-link', !!hideUpload && 'hide-upload', !!hideRemove && 'hide-remove', notEmpty(value) && 'with-value'), labelIcon: hideUrl ? labelIcon : undefined, label: hideUrl ? initLabel : undefined, error: error, required: required, fullWidth: fullWidth, hidden: hidden, helperText: React__default.createElement("div", null,
12958
12969
  preview,
12959
- React__default.createElement("div", null, helperText)), hideLabel: !hideUrl, helperTextProps: {
12970
+ React__default.createElement("div", null, error ? errorHelperText : helperText)), hideLabel: !hideUrl, helperTextProps: {
12960
12971
  style: {
12961
12972
  marginLeft: !hideUrl && variant !== 'standard' ? 14 : undefined,
12962
12973
  marginTop: !hideUrl && variant === 'standard' ? 19 : undefined,