sales-frontend-components 0.0.216 → 0.0.218
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.cjs.js +8 -122
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -6
- package/dist/index.esm.js +10 -122
- package/dist/index.esm.js.map +1 -1
- package/package.json +9 -9
package/dist/index.cjs.js
CHANGED
|
@@ -3969,125 +3969,6 @@ const FormTextField = ({
|
|
|
3969
3969
|
);
|
|
3970
3970
|
};
|
|
3971
3971
|
|
|
3972
|
-
const FormDatePickerRenew = ({
|
|
3973
|
-
name,
|
|
3974
|
-
control,
|
|
3975
|
-
disabled,
|
|
3976
|
-
defaultValue,
|
|
3977
|
-
...props
|
|
3978
|
-
}) => {
|
|
3979
|
-
const { field, fieldState } = reactHookForm.useController({ name, control, disabled, defaultValue });
|
|
3980
|
-
const [selected, setSelected] = React.useState();
|
|
3981
|
-
React.useEffect(() => {
|
|
3982
|
-
if (isDate(field.value) && field.value !== selected) {
|
|
3983
|
-
setSelected(field.value);
|
|
3984
|
-
}
|
|
3985
|
-
}, [field.value]);
|
|
3986
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3987
|
-
salesFrontendDesignSystem.DatePickerSingleRenew,
|
|
3988
|
-
{
|
|
3989
|
-
validator: () => {
|
|
3990
|
-
if (props.validator) {
|
|
3991
|
-
return props.validator();
|
|
3992
|
-
}
|
|
3993
|
-
const _fieldState = fieldState;
|
|
3994
|
-
if (_fieldState.invalid) {
|
|
3995
|
-
throw new Error(_fieldState.error?.message ?? "");
|
|
3996
|
-
}
|
|
3997
|
-
return true;
|
|
3998
|
-
},
|
|
3999
|
-
defaultValue: dayjs(selected),
|
|
4000
|
-
onValueChange: field.onChange,
|
|
4001
|
-
inputProps: {
|
|
4002
|
-
comboBoxItemProps: {
|
|
4003
|
-
tabIndex: 0,
|
|
4004
|
-
id: field.name,
|
|
4005
|
-
...props.inputProps?.comboBoxItemProps,
|
|
4006
|
-
...field
|
|
4007
|
-
},
|
|
4008
|
-
...props.inputProps
|
|
4009
|
-
},
|
|
4010
|
-
...props
|
|
4011
|
-
}
|
|
4012
|
-
);
|
|
4013
|
-
};
|
|
4014
|
-
|
|
4015
|
-
const FormDateRangePickerRenew = ({
|
|
4016
|
-
name,
|
|
4017
|
-
control,
|
|
4018
|
-
disabled,
|
|
4019
|
-
defaultValue,
|
|
4020
|
-
startDateProps,
|
|
4021
|
-
endDateProps
|
|
4022
|
-
}) => {
|
|
4023
|
-
const { field, fieldState } = reactHookForm.useController({
|
|
4024
|
-
name,
|
|
4025
|
-
control,
|
|
4026
|
-
disabled,
|
|
4027
|
-
defaultValue
|
|
4028
|
-
});
|
|
4029
|
-
const [selected, setSelected] = React.useState();
|
|
4030
|
-
React.useEffect(() => {
|
|
4031
|
-
const fieldValue = field.value;
|
|
4032
|
-
if (!fieldValue) {
|
|
4033
|
-
setSelected(void 0);
|
|
4034
|
-
return;
|
|
4035
|
-
}
|
|
4036
|
-
const isStartDateDifferent = fieldValue.startDate?.getTime() !== selected?.startDate?.getTime();
|
|
4037
|
-
const isEndDateDifferent = fieldValue.endDate?.getTime() !== selected?.endDate?.getTime();
|
|
4038
|
-
if (!selected || isStartDateDifferent || isEndDateDifferent) {
|
|
4039
|
-
setSelected(fieldValue);
|
|
4040
|
-
}
|
|
4041
|
-
}, [field.value]);
|
|
4042
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4043
|
-
salesFrontendDesignSystem.DatePickerRangeRenew,
|
|
4044
|
-
{
|
|
4045
|
-
startDateProps: {
|
|
4046
|
-
validator: () => {
|
|
4047
|
-
const _fieldState = fieldState;
|
|
4048
|
-
if (_fieldState.invalid) {
|
|
4049
|
-
throw new Error(_fieldState.error?.message ?? "");
|
|
4050
|
-
}
|
|
4051
|
-
return true;
|
|
4052
|
-
},
|
|
4053
|
-
defaultValue: dayjs(selected?.startDate),
|
|
4054
|
-
onValueChange: field.onChange,
|
|
4055
|
-
inputProps: {
|
|
4056
|
-
comboBoxItemProps: {
|
|
4057
|
-
tabIndex: 0,
|
|
4058
|
-
id: field.name,
|
|
4059
|
-
...startDateProps?.inputProps?.comboBoxItemProps,
|
|
4060
|
-
...field
|
|
4061
|
-
},
|
|
4062
|
-
...startDateProps?.inputProps
|
|
4063
|
-
},
|
|
4064
|
-
...startDateProps
|
|
4065
|
-
},
|
|
4066
|
-
endDateProps: {
|
|
4067
|
-
validator: () => {
|
|
4068
|
-
const _fieldState = fieldState;
|
|
4069
|
-
if (_fieldState.invalid) {
|
|
4070
|
-
throw new Error(_fieldState.error?.message ?? "");
|
|
4071
|
-
}
|
|
4072
|
-
return true;
|
|
4073
|
-
},
|
|
4074
|
-
defaultValue: dayjs(selected?.endDate),
|
|
4075
|
-
onValueChange: field.onChange,
|
|
4076
|
-
inputProps: {
|
|
4077
|
-
comboBoxItemProps: {
|
|
4078
|
-
tabIndex: 0,
|
|
4079
|
-
id: field.name,
|
|
4080
|
-
...endDateProps?.inputProps?.comboBoxItemProps,
|
|
4081
|
-
...field
|
|
4082
|
-
},
|
|
4083
|
-
...endDateProps?.inputProps
|
|
4084
|
-
},
|
|
4085
|
-
...endDateProps
|
|
4086
|
-
}
|
|
4087
|
-
}
|
|
4088
|
-
);
|
|
4089
|
-
};
|
|
4090
|
-
|
|
4091
3972
|
const cx$1 = classNames.bind(styles$c);
|
|
4092
3973
|
const StepIndicator = ({
|
|
4093
3974
|
items,
|
|
@@ -4178,7 +4059,14 @@ function Attachment({
|
|
|
4178
4059
|
}
|
|
4179
4060
|
return photos.map((photo) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("single-photo-item"), children: [
|
|
4180
4061
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("photo-placeholder"), children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: photo.src, alt: photo.name, className: cx("photo-image") }) }),
|
|
4181
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4062
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4063
|
+
"button",
|
|
4064
|
+
{
|
|
4065
|
+
className: cx("remove-button", "dsp-icons", "dsp-icons-icons-sub-ui-reset"),
|
|
4066
|
+
onClick: () => handleRemovePhoto(photo.id),
|
|
4067
|
+
"aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C"
|
|
4068
|
+
}
|
|
4069
|
+
)
|
|
4182
4070
|
] }, photo.id));
|
|
4183
4071
|
};
|
|
4184
4072
|
const renderPhotoGrid = () => {
|
|
@@ -5095,9 +4983,7 @@ exports.EmployeeSearchModal = EmployeeSearchModal;
|
|
|
5095
4983
|
exports.FormCheckbox = FormCheckbox;
|
|
5096
4984
|
exports.FormCheckboxButton = FormCheckboxButton;
|
|
5097
4985
|
exports.FormDatePicker = FormDatePicker;
|
|
5098
|
-
exports.FormDatePickerRenew = FormDatePickerRenew;
|
|
5099
4986
|
exports.FormDateRangePicker = FormDateRangePicker;
|
|
5100
|
-
exports.FormDateRangePickerRenew = FormDateRangePickerRenew;
|
|
5101
4987
|
exports.FormSearchJobField = FormSearchJobField;
|
|
5102
4988
|
exports.FormSegmentGroup = FormSegmentGroup;
|
|
5103
4989
|
exports.FormSelect = FormSelect;
|