@pdg/react-form 1.0.131 → 1.0.133
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/@private/PrivateTimeSection/PrivateTimeSection.types.d.ts +3 -3
- package/dist/Form/Form.types.d.ts +1 -0
- package/dist/FormCommon/FormButton/FormButton.d.ts +1 -1
- package/dist/FormCommon/FormLabel/FormLabel.d.ts +1 -1
- package/dist/FormContext/FormContext.d.ts +0 -1
- package/dist/FormContext/FormContext.types.d.ts +2 -0
- package/dist/FormItemCustom/FormAutocomplete/FormAutocomplete.d.ts +1 -1
- package/dist/FormItemCustom/FormRadioGroup/FormRadioGroup.d.ts +1 -1
- package/dist/FormItemCustom/FormToggleButtonGroup/FormToggleButtonGroup.d.ts +1 -1
- package/dist/FormItemTextFieldBase/FormNumber/FormNumber.d.ts +6 -6
- package/dist/FormItemTextFieldBase/FormPersonalNo/FormPersonalNo.d.ts +2 -2
- package/dist/FormItemTextFieldBase/FormSelect/FormSelect.d.ts +7 -8
- package/dist/FormItemTextFieldBase/FormTag/FormTag.d.ts +7 -8
- package/dist/FormItemTextFieldBase/FormTag/FormTagText/FormTagText.d.ts +5 -0
- package/dist/FormItemTextFieldBase/FormTag/FormTagText/FormTagText.types.d.ts +4 -0
- package/dist/FormItemTextFieldBase/FormTag/FormTagText/index.d.ts +4 -0
- package/dist/FormItemTextFieldBase/FormTextField/FormTextField.types.d.ts +2 -1
- package/dist/assets/output-BOj-2pX9.css +719 -0
- package/dist/index.esm.js +529 -587
- package/dist/index.js +529 -587
- package/package.json +33 -32
package/dist/index.js
CHANGED
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
'use strict';var React=require('react'),classNames=require('classnames'),material=require('@mui/material'),util=require('@pdg/util'),dayjs=require('dayjs'),reactHook=require('@pdg/react-hook'),reactComponent=require('@pdg/react-component'),reactResizeDetector=require('react-resize-detector'),reactNumberFormat=require('react-number-format'),iconsMaterial=require('@mui/icons-material'),tinymceReact=require('@tinymce/tinymce-react'),AdapterDayjs=require('@mui/x-date-pickers/AdapterDayjs'),xDatePickers=require('@mui/x-date-pickers'),SimpleBar=require('simplebar-react');require('dayjs/locale/ko')
|
|
2
|
-
if ( ref === void 0 ) ref = {};
|
|
3
|
-
var insertAt = ref.insertAt;
|
|
4
|
-
|
|
5
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
6
|
-
|
|
7
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
|
-
var style = document.createElement('style');
|
|
9
|
-
style.type = 'text/css';
|
|
10
|
-
|
|
11
|
-
if (insertAt === 'top') {
|
|
12
|
-
if (head.firstChild) {
|
|
13
|
-
head.insertBefore(style, head.firstChild);
|
|
14
|
-
} else {
|
|
15
|
-
head.appendChild(style);
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
head.appendChild(style);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (style.styleSheet) {
|
|
22
|
-
style.styleSheet.cssText = css;
|
|
23
|
-
} else {
|
|
24
|
-
style.appendChild(document.createTextNode(css));
|
|
25
|
-
}
|
|
26
|
-
}var css_248z$m = ".simplebar-track.simplebar-vertical {\n width: 8px !important;\n}\n.simplebar-track.simplebar-vertical .simplebar-scrollbar.simplebar-visible:before {\n opacity: 0.3 !important;\n}";
|
|
27
|
-
styleInject(css_248z$m);/******************************************************************************
|
|
1
|
+
'use strict';var React=require('react'),classNames=require('classnames'),material=require('@mui/material'),util=require('@pdg/util'),dayjs=require('dayjs'),reactHook=require('@pdg/react-hook'),reactComponent=require('@pdg/react-component'),reactResizeDetector=require('react-resize-detector'),reactNumberFormat=require('react-number-format'),iconsMaterial=require('@mui/icons-material'),tinymceReact=require('@tinymce/tinymce-react'),AdapterDayjs=require('@mui/x-date-pickers/AdapterDayjs'),xDatePickers=require('@mui/x-date-pickers'),SimpleBar=require('simplebar-react');require('dayjs/locale/ko');/******************************************************************************
|
|
28
2
|
Copyright (c) Microsoft Corporation.
|
|
29
3
|
|
|
30
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -38,7 +12,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
38
12
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
39
13
|
PERFORMANCE OF THIS SOFTWARE.
|
|
40
14
|
***************************************************************************** */
|
|
41
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
42
16
|
|
|
43
17
|
|
|
44
18
|
var __assign = function() {
|
|
@@ -99,6 +73,8 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
99
73
|
// eslint-disable-next-line
|
|
100
74
|
onValueChangeByUser: function () { },
|
|
101
75
|
// eslint-disable-next-line
|
|
76
|
+
onRequestSubmit: function () { },
|
|
77
|
+
// eslint-disable-next-line
|
|
102
78
|
onRequestSearchSubmit: function () { },
|
|
103
79
|
};var FormContext = React.createContext(FormContextDefaultValue);function useFormState() {
|
|
104
80
|
var value = React.useContext(FormContext);
|
|
@@ -232,10 +208,10 @@ var appendFormValueData = function (data, itemCommands) {
|
|
|
232
208
|
//--------------------------------------------------------------------------------------------------------------------
|
|
233
209
|
_b = _a.variant,
|
|
234
210
|
//--------------------------------------------------------------------------------------------------------------------
|
|
235
|
-
initVariant = _b === void 0 ? 'outlined' : _b, _c = _a.size, initSize = _c === void 0 ? 'medium' : _c, _d = _a.color, initColor = _d === void 0 ? 'primary' : _d, _e = _a.spacing, initSpacing = _e === void 0 ? 2 : _e, _f = _a.formColGap, initFormColGap = _f === void 0 ? 1.5 : _f, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth, initFullHeight = _a.fullHeight, initDisabled = _a.disabled,
|
|
211
|
+
initVariant = _b === void 0 ? 'outlined' : _b, _c = _a.size, initSize = _c === void 0 ? 'medium' : _c, _d = _a.color, initColor = _d === void 0 ? 'primary' : _d, _e = _a.spacing, initSpacing = _e === void 0 ? 2 : _e, _f = _a.formColGap, initFormColGap = _f === void 0 ? 1.5 : _f, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth, initFullHeight = _a.fullHeight, initDisabled = _a.disabled, initSubmitWhenReturnKey = _a.submitWhenReturnKey,
|
|
236
212
|
//----------------------------------------------------------------------------------------------------------------
|
|
237
213
|
initOnSubmit = _a.onSubmit, initOnValid = _a.onInvalid, initOnValueChange = _a.onValueChange, initOnValueChangeByUser = _a.onValueChangeByUser;
|
|
238
|
-
var _g = useFormState(), formId = _g.id, formVariant = _g.variant, formSize = _g.size, formColor = _g.color, formDisabled = _g.disabled, formSpacing = _g.spacing, formFormColGap = _g.formColGap, formFocused = _g.focused, formLabelShrink = _g.labelShrink, formFullWidth = _g.fullWidth, formFullHeight = _g.fullHeight, formColAutoXs = _g.formColAutoXs, formColWidth = _g.formColWidth, onAddFormCol = _g.onAddFormCol, onRemoveFormCol = _g.onRemoveFormCol, formColXs = _g.formColXs, formColWithLabel = _g.formColWithLabel, formColWithHelperText = _g.formColWithHelperText, formAddValueItem = _g.onAddValueItem, formRemoveValueItem = _g.onRemoveValueItem, formValueChange = _g.onValueChange, formValueChangeByUser = _g.onValueChangeByUser, formRequestSearchSubmit = _g.onRequestSearchSubmit;
|
|
214
|
+
var _g = useFormState(), formId = _g.id, formVariant = _g.variant, formSize = _g.size, formColor = _g.color, formDisabled = _g.disabled, formSubmitWhenReturnKey = _g.submitWhenReturnKey, formSpacing = _g.spacing, formFormColGap = _g.formColGap, formFocused = _g.focused, formLabelShrink = _g.labelShrink, formFullWidth = _g.fullWidth, formFullHeight = _g.fullHeight, formColAutoXs = _g.formColAutoXs, formColWidth = _g.formColWidth, onAddFormCol = _g.onAddFormCol, onRemoveFormCol = _g.onRemoveFormCol, formColXs = _g.formColXs, formColWithLabel = _g.formColWithLabel, formColWithHelperText = _g.formColWithHelperText, formAddValueItem = _g.onAddValueItem, formRemoveValueItem = _g.onRemoveValueItem, formValueChange = _g.onValueChange, formValueChangeByUser = _g.onValueChangeByUser, formRequestSubmit = _g.onRequestSubmit, formRequestSearchSubmit = _g.onRequestSearchSubmit;
|
|
239
215
|
/********************************************************************************************************************
|
|
240
216
|
* Memo - FormState
|
|
241
217
|
* ******************************************************************************************************************/
|
|
@@ -249,6 +225,7 @@ var appendFormValueData = function (data, itemCommands) {
|
|
|
249
225
|
var fullWidth = util.ifUndefined(util.ifUndefined(initFullWidth, formFullWidth), true);
|
|
250
226
|
var fullHeight = util.ifUndefined(util.ifUndefined(initFullHeight, formFullHeight), false);
|
|
251
227
|
var disabled = util.ifUndefined(util.ifUndefined(initDisabled, formDisabled), false);
|
|
228
|
+
var submitWhenReturnKey = util.ifUndefined(util.ifUndefined(initSubmitWhenReturnKey, formSubmitWhenReturnKey), false);
|
|
252
229
|
/********************************************************************************************************************
|
|
253
230
|
* Ref
|
|
254
231
|
* ******************************************************************************************************************/
|
|
@@ -556,6 +533,7 @@ var appendFormValueData = function (data, itemCommands) {
|
|
|
556
533
|
fullWidth: fullWidth,
|
|
557
534
|
fullHeight: fullHeight,
|
|
558
535
|
disabled: disabled,
|
|
536
|
+
submitWhenReturnKey: submitWhenReturnKey,
|
|
559
537
|
onAddValueItem: function (id, item) {
|
|
560
538
|
valueItems.current[id] = item;
|
|
561
539
|
if (formAddValueItem)
|
|
@@ -578,6 +556,12 @@ var appendFormValueData = function (data, itemCommands) {
|
|
|
578
556
|
if (formValueChangeByUser)
|
|
579
557
|
formValueChangeByUser(name, value);
|
|
580
558
|
},
|
|
559
|
+
onRequestSubmit: function (name, value) {
|
|
560
|
+
if (!disabled)
|
|
561
|
+
submit();
|
|
562
|
+
if (formRequestSubmit)
|
|
563
|
+
formRequestSubmit(name, value);
|
|
564
|
+
},
|
|
581
565
|
onRequestSearchSubmit: formRequestSearchSubmit,
|
|
582
566
|
formColAutoXs: formColAutoXs,
|
|
583
567
|
formColWidth: formColWidth,
|
|
@@ -599,6 +583,7 @@ var appendFormValueData = function (data, itemCommands) {
|
|
|
599
583
|
fullWidth,
|
|
600
584
|
fullHeight,
|
|
601
585
|
disabled,
|
|
586
|
+
submitWhenReturnKey,
|
|
602
587
|
formRequestSearchSubmit,
|
|
603
588
|
formColAutoXs,
|
|
604
589
|
formColWidth,
|
|
@@ -613,6 +598,8 @@ var appendFormValueData = function (data, itemCommands) {
|
|
|
613
598
|
formValueChange,
|
|
614
599
|
onValueChangeByUserRef,
|
|
615
600
|
formValueChangeByUser,
|
|
601
|
+
submit,
|
|
602
|
+
formRequestSubmit,
|
|
616
603
|
]);
|
|
617
604
|
/********************************************************************************************************************
|
|
618
605
|
* Render
|
|
@@ -641,9 +628,9 @@ var appendFormValueData = function (data, itemCommands) {
|
|
|
641
628
|
* ******************************************************************************************************************/
|
|
642
629
|
return (React.createElement(reactComponent.PdgButton, __assign({ ref: ref, className: classNames(className, 'FormButton'), type: type, variant: initVariant ? initVariant : type === 'submit' ? 'contained' : 'outlined', size: size, color: color, fullWidth: fullWidth, onClick: onClick }, props)));
|
|
643
630
|
});
|
|
644
|
-
var FormButton$1 = React.memo(FormButton);var IconPdgIcon = material.styled(reactComponent.PdgIcon)(templateObject_1$
|
|
631
|
+
var FormButton$1 = React.memo(FormButton);var IconPdgIcon = material.styled(reactComponent.PdgIcon)(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"], ["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"])));
|
|
645
632
|
var ChildrenSpan = material.styled('span')(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n vertical-align: middle;\n"], ["\n vertical-align: middle;\n"])));
|
|
646
|
-
var templateObject_1$
|
|
633
|
+
var templateObject_1$j, templateObject_2$9;var FormLabel = React.forwardRef(function (_a, ref) {
|
|
647
634
|
/********************************************************************************************************************
|
|
648
635
|
* Use
|
|
649
636
|
* ******************************************************************************************************************/
|
|
@@ -659,11 +646,11 @@ var templateObject_1$i, templateObject_2$9;var FormLabel = React.forwardRef(func
|
|
|
659
646
|
/********************************************************************************************************************
|
|
660
647
|
* Render
|
|
661
648
|
* ******************************************************************************************************************/
|
|
662
|
-
return (React.createElement(material.InputLabel, __assign({ ref: ref, shrink: true, className: 'FormItemBase-InputLabel', size: size
|
|
649
|
+
return (React.createElement(material.InputLabel, __assign({ ref: ref, shrink: true, className: 'FormItemBase-InputLabel', size: size, error: error, style: newStyle }, props), icon ? (React.createElement(React.Fragment, null,
|
|
663
650
|
React.createElement(IconPdgIcon, null, icon),
|
|
664
651
|
React.createElement(ChildrenSpan, null, children))) : (children)));
|
|
665
652
|
});
|
|
666
|
-
var FormLabel$1 = React.memo(FormLabel);var StyledLineBox = material.styled(material.Box)(templateObject_1$
|
|
653
|
+
var FormLabel$1 = React.memo(FormLabel);var StyledLineBox = material.styled(material.Box)(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n border-bottom: thin solid #dfdfdf;\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n"], ["\n border-bottom: thin solid #dfdfdf;\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n"])));
|
|
667
654
|
var StyledErrorLineBox = material.styled(material.Box)(function (_a) {
|
|
668
655
|
var theme = _a.theme;
|
|
669
656
|
return ({
|
|
@@ -686,7 +673,7 @@ var StyledWarningLineBox = material.styled(material.Box)(function (_a) {
|
|
|
686
673
|
opacity: 0.4,
|
|
687
674
|
});
|
|
688
675
|
});
|
|
689
|
-
var templateObject_1$
|
|
676
|
+
var templateObject_1$i;var DEFAULT_LINE_STYLE = { flex: 1, position: 'relative' };
|
|
690
677
|
var FormDivider = React.forwardRef(function (_a, ref) {
|
|
691
678
|
/********************************************************************************************************************
|
|
692
679
|
* FormState
|
|
@@ -731,7 +718,7 @@ var FormDivider = React.forwardRef(function (_a, ref) {
|
|
|
731
718
|
/********************************************************************************************************************
|
|
732
719
|
* Render
|
|
733
720
|
* ******************************************************************************************************************/
|
|
734
|
-
return (React.createElement(material.Grid, { ref: ref,
|
|
721
|
+
return (React.createElement(material.Grid, { ref: ref, size: { xs: 12 }, style: style, className: classNames(className, 'FormDivider'), sx: sx },
|
|
735
722
|
React.createElement(material.Box, { sx: {
|
|
736
723
|
display: 'flex',
|
|
737
724
|
py: 1,
|
|
@@ -749,8 +736,8 @@ var FormDivider = React.forwardRef(function (_a, ref) {
|
|
|
749
736
|
} }, label)),
|
|
750
737
|
(line || collapse) && (React.createElement("div", { style: lineStyle }, error ? React.createElement(StyledErrorLineBox, null) : warning ? React.createElement(StyledWarningLineBox, null) : React.createElement(StyledLineBox, null))),
|
|
751
738
|
collapse && (React.createElement(reactComponent.PdgIcon, { sx: { opacity: 0.6, ml: 1 }, color: error ? 'error' : warning ? 'warning' : undefined }, collapseIn ? 'KeyboardDoubleArrowUp' : 'KeyboardDoubleArrowDown')))));
|
|
752
|
-
});var StyledWrapGrid$1 = material.styled(material.Grid)(templateObject_1$
|
|
753
|
-
var templateObject_1$
|
|
739
|
+
});var StyledWrapGrid$1 = material.styled(material.Grid)(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
740
|
+
var templateObject_1$h;var FormBlock = React.forwardRef(function (_a, ref) {
|
|
754
741
|
/********************************************************************************************************************
|
|
755
742
|
* FormState
|
|
756
743
|
* ******************************************************************************************************************/
|
|
@@ -806,16 +793,16 @@ var templateObject_1$g;var FormBlock = React.forwardRef(function (_a, ref) {
|
|
|
806
793
|
* Render
|
|
807
794
|
* ******************************************************************************************************************/
|
|
808
795
|
return (React.createElement(FormContext.Provider, { value: __assign(__assign({}, otherFormState), { variant: variant, size: size, color: color, spacing: spacing, focused: focused, labelShrink: labelShrink, fullWidth: fullWidth }) },
|
|
809
|
-
React.createElement(material.Grid, {
|
|
796
|
+
React.createElement(material.Grid, { ref: ref, size: { xs: 12 }, className: classNames(className, 'FormBlock'), style: style, sx: sx },
|
|
810
797
|
React.createElement(material.Grid, { container: true, spacing: spacing },
|
|
811
798
|
(icon || label || line || collapse) && (React.createElement(FormDivider, { className: 'FormBlock-header', collapse: collapse, collapseIn: collapseIn, size: size, icon: icon, color: color, label: label, line: line, error: error, warning: warning, lineVerticalMargin: lineVerticalMargin, hidden: hidden, onCollapseChange: collapse ? function (newCollapseIn) { return setCollapseIn(newCollapseIn); } : undefined })),
|
|
812
|
-
React.createElement(StyledWrapGrid$1, {
|
|
799
|
+
React.createElement(StyledWrapGrid$1, { size: { xs: 12 } },
|
|
813
800
|
React.createElement(Container, __assign({}, containerProps),
|
|
814
801
|
React.createElement(material.Grid, { container: true, spacing: spacing },
|
|
815
|
-
React.createElement(StyledWrapGrid$1, {
|
|
802
|
+
React.createElement(StyledWrapGrid$1, { size: { xs: 12 }, className: 'FormBlock-body' },
|
|
816
803
|
React.createElement(material.Grid, { className: 'FormBlock-content', container: true, spacing: spacing }, children)))))))));
|
|
817
|
-
});var StyledWrapGrid = material.styled(material.Grid)(templateObject_1$
|
|
818
|
-
var templateObject_1$
|
|
804
|
+
});var StyledWrapGrid = material.styled(material.Grid)(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
805
|
+
var templateObject_1$g;var FormRow = React.forwardRef(function (_a, ref) {
|
|
819
806
|
/********************************************************************************************************************
|
|
820
807
|
* FormState
|
|
821
808
|
* ******************************************************************************************************************/
|
|
@@ -883,16 +870,16 @@ var templateObject_1$f;var FormRow = React.forwardRef(function (_a, ref) {
|
|
|
883
870
|
* Render
|
|
884
871
|
* ******************************************************************************************************************/
|
|
885
872
|
return (React.createElement(FormContextProvider, { value: __assign(__assign({}, otherFormState), { variant: variant, size: size, color: color, spacing: spacing, focused: focused, labelShrink: labelShrink, fullWidth: fullWidth, formColAutoXs: formColAutoXs, onAddFormCol: handleAddFormCol, onRemoveFormCol: handleRemoveFormCol }) },
|
|
886
|
-
React.createElement(material.Grid, {
|
|
873
|
+
React.createElement(material.Grid, { ref: ref, size: { xs: 12 }, className: classNames(className, 'FormRow'), style: style, sx: sx },
|
|
887
874
|
React.createElement(material.Grid, { container: true, spacing: spacing },
|
|
888
875
|
(icon || label || line) && (React.createElement(FormDivider, { className: classNames(className, 'FormRow-header'), size: size, icon: icon, color: color, label: label, line: line, error: error, warning: warning, lineVerticalMargin: lineVerticalMargin, hidden: hidden })),
|
|
889
|
-
React.createElement(StyledWrapGrid, {
|
|
876
|
+
React.createElement(StyledWrapGrid, { size: { xs: 12 }, className: 'FormRow-body' },
|
|
890
877
|
React.createElement(material.Grid, { className: 'FormRow-content', container: true, spacing: spacing, direction: 'row', style: { flexWrap: 'nowrap' } }, children),
|
|
891
878
|
helperText && (React.createElement(material.FormHelperText, { className: 'FormRow-helper-text', component: 'div', error: error }, helperText)))))));
|
|
892
|
-
});var StyledFormLabelContainerDiv = material.styled('div')(templateObject_1$
|
|
879
|
+
});var StyledFormLabelContainerDiv = material.styled('div')(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n position: relative;\n height: 20px;\n"], ["\n position: relative;\n height: 20px;\n"])));
|
|
893
880
|
var StyledFormLabel = material.styled(FormLabel$1)(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n position: absolute;\n left: 5px;\n top: 0;\n"], ["\n position: absolute;\n left: 5px;\n top: 0;\n"])));
|
|
894
881
|
var StyledContentContainerBox = material.styled(material.Box)(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n"], ["\n display: flex;\n flex-wrap: wrap;\n"])));
|
|
895
|
-
var templateObject_1$
|
|
882
|
+
var templateObject_1$f, templateObject_2$8, templateObject_3$4;var FormCol = React.forwardRef(function (_a, ref) {
|
|
896
883
|
/********************************************************************************************************************
|
|
897
884
|
* ID
|
|
898
885
|
* ******************************************************************************************************************/
|
|
@@ -902,10 +889,6 @@ var templateObject_1$e, templateObject_2$8, templateObject_3$4;var FormCol = Rea
|
|
|
902
889
|
//----------------------------------------------------------------------------------------------------------------
|
|
903
890
|
xs = _a.xs, className = _a.className, children = _a.children, initStyle = _a.style, sx = _a.sx;
|
|
904
891
|
var id = React.useId();
|
|
905
|
-
/********************************************************************************************************************
|
|
906
|
-
* Ref
|
|
907
|
-
* ******************************************************************************************************************/
|
|
908
|
-
var gridRef = React.useRef(null);
|
|
909
892
|
/********************************************************************************************************************
|
|
910
893
|
* FormState
|
|
911
894
|
* ******************************************************************************************************************/
|
|
@@ -924,11 +907,8 @@ var templateObject_1$e, templateObject_2$8, templateObject_3$4;var FormCol = Rea
|
|
|
924
907
|
/********************************************************************************************************************
|
|
925
908
|
* ResizeDetector
|
|
926
909
|
* ******************************************************************************************************************/
|
|
927
|
-
var
|
|
928
|
-
|
|
929
|
-
handleWidth: true,
|
|
930
|
-
handleHeight: false,
|
|
931
|
-
}).width;
|
|
910
|
+
var _c = reactResizeDetector.useResizeDetector({ handleHeight: false }), gridRef = _c.ref, resizedFormColWidth = _c.width;
|
|
911
|
+
var formColWidth = util.ifUndefined(resizedFormColWidth, 0);
|
|
932
912
|
/********************************************************************************************************************
|
|
933
913
|
* LayoutEffect
|
|
934
914
|
* ******************************************************************************************************************/
|
|
@@ -959,40 +939,28 @@ var templateObject_1$e, templateObject_2$8, templateObject_3$4;var FormCol = Rea
|
|
|
959
939
|
* Render
|
|
960
940
|
* ******************************************************************************************************************/
|
|
961
941
|
return (React.createElement(FormContextProvider, { value: __assign(__assign({}, otherFormState), { variant: variant, size: size, color: color, spacing: spacing, focused: focused, labelShrink: labelShrink, fullWidth: fullWidth, formColGap: formColGap, formColXs: xs || formColAutoXs || 12, formColWidth: formColWidth, formColWithLabel: !!label, formColWithHelperText: !!helperText }) },
|
|
962
|
-
React.createElement(material.Grid, { ref: gridRef,
|
|
942
|
+
React.createElement(material.Grid, { ref: gridRef, size: { xs: xs || formColAutoXs || 12 }, className: classNames(className, 'FormCol', !!label && 'with-label', !!helperText && 'with-helper-text'), style: hidden ? __assign(__assign({}, initStyle), { display: 'none' }) : initStyle, sx: sx },
|
|
963
943
|
React.createElement(material.Grid, { container: true, direction: 'column' },
|
|
964
|
-
label && (React.createElement(material.Grid, {
|
|
944
|
+
label && (React.createElement(material.Grid, { className: 'FormCol-header' },
|
|
965
945
|
React.createElement(StyledFormLabelContainerDiv, null,
|
|
966
946
|
React.createElement(StyledFormLabel, { className: 'FormCol-FormLabel', size: size, icon: icon, focused: focused, color: color, error: error, warning: warning }, label)))),
|
|
967
|
-
React.createElement(material.Grid, {
|
|
947
|
+
React.createElement(material.Grid, { size: { xs: 2, sm: 12 }, className: 'FormCol-content' },
|
|
968
948
|
React.createElement(StyledContentContainerBox, { gap: formColGap }, children)),
|
|
969
|
-
helperText && (React.createElement(material.Grid, {
|
|
949
|
+
helperText && (React.createElement(material.Grid, { className: 'FormCol-helper-text' },
|
|
970
950
|
React.createElement(material.FormHelperText, { component: 'div', error: error, style: { marginLeft: helperTextShift ? 14 : 5 } }, helperText)))))));
|
|
971
|
-
});var StyledContainerDiv = material.styled('div')(templateObject_1$
|
|
951
|
+
});var StyledContainerDiv = material.styled('div')(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n flex: 1;\n position: relative;\n"], ["\n flex: 1;\n position: relative;\n"])));
|
|
972
952
|
var StyledContentDiv = material.styled('div')(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n ::-webkit-scrollbar {\n width: 8px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: #e4e4e4;\n border-radius: 100px;\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background-color: #cfcfcf;\n border-radius: 100px;\n }\n"], ["\n ::-webkit-scrollbar {\n width: 8px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: #e4e4e4;\n border-radius: 100px;\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background-color: #cfcfcf;\n border-radius: 100px;\n }\n"])));
|
|
973
|
-
var templateObject_1$
|
|
974
|
-
/********************************************************************************************************************
|
|
975
|
-
* Ref
|
|
976
|
-
* ******************************************************************************************************************/
|
|
977
|
-
var children = _a.children, hidden = _a.hidden;
|
|
978
|
-
var containerRef = React.useRef(null);
|
|
953
|
+
var templateObject_1$e, templateObject_2$7;var FormBody = function (_a) {
|
|
979
954
|
/********************************************************************************************************************
|
|
980
955
|
* State
|
|
981
956
|
* ******************************************************************************************************************/
|
|
957
|
+
var children = _a.children, hidden = _a.hidden;
|
|
982
958
|
var _b = useFormState(), spacing = _b.spacing, fullHeight = _b.fullHeight;
|
|
983
|
-
var _c = React.useState(0), height = _c[0], setHeight = _c[1];
|
|
984
959
|
/********************************************************************************************************************
|
|
985
960
|
* ResizeDetector
|
|
986
961
|
* ******************************************************************************************************************/
|
|
987
|
-
reactResizeDetector.useResizeDetector({
|
|
988
|
-
|
|
989
|
-
handleWidth: false,
|
|
990
|
-
handleHeight: true,
|
|
991
|
-
onResize: function () {
|
|
992
|
-
var _a, _b;
|
|
993
|
-
setHeight(((_b = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height) || 0);
|
|
994
|
-
},
|
|
995
|
-
});
|
|
962
|
+
var _c = reactResizeDetector.useResizeDetector({ handleWidth: false }), containerRef = _c.ref, resizedHeight = _c.height;
|
|
963
|
+
var height = util.ifUndefined(resizedHeight, 0);
|
|
996
964
|
/********************************************************************************************************************
|
|
997
965
|
* Style
|
|
998
966
|
* ******************************************************************************************************************/
|
|
@@ -1015,26 +983,24 @@ var templateObject_1$d, templateObject_2$7;var FormBody = function (_a) {
|
|
|
1015
983
|
var children = _a.children, noLine = _a.noLine, hidden = _a.hidden;
|
|
1016
984
|
var spacing = useFormState().spacing;
|
|
1017
985
|
var style = React.useMemo(function () { return (hidden ? { display: 'none' } : undefined); }, [hidden]);
|
|
1018
|
-
return (React.createElement(material.Grid, {
|
|
986
|
+
return (React.createElement(material.Grid, { size: { xs: 12 }, className: 'FormFooter', style: style },
|
|
1019
987
|
React.createElement(material.Grid, { container: true, spacing: spacing, direction: 'column' },
|
|
1020
|
-
!noLine && (React.createElement(material.Grid, {
|
|
988
|
+
!noLine && (React.createElement(material.Grid, { size: { xs: 12 }, sx: { mt: spacing } },
|
|
1021
989
|
React.createElement(FormDivider, { line: true }))),
|
|
1022
990
|
children)));
|
|
1023
|
-
};var
|
|
1024
|
-
styleInject(css_248z$l);var FormTextField = React.forwardRef(function (_a, ref) {
|
|
991
|
+
};var FormTextField = React.forwardRef(function (_a, ref) {
|
|
1025
992
|
/********************************************************************************************************************
|
|
1026
993
|
* ID
|
|
1027
994
|
* ******************************************************************************************************************/
|
|
1028
|
-
var
|
|
1029
|
-
var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
|
|
995
|
+
var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth, initSubmitWhenReturnKey = _a.submitWhenReturnKey,
|
|
1030
996
|
//----------------------------------------------------------------------------------------------------------------
|
|
1031
|
-
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,
|
|
997
|
+
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, initSlotProps = _a.slotProps, initInputRef = _a.inputRef, select = _a.select, multiline = _a.multiline, validPattern = _a.validPattern, invalidPattern = _a.invalidPattern, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, noFormValueItem = _a.noFormValueItem, initHidden = _a.hidden, disableReturnKey = _a.disableReturnKey,
|
|
1032
998
|
//----------------------------------------------------------------------------------------------------------------
|
|
1033
999
|
onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate, onBlur = _a.onBlur, onKeyDown = _a.onKeyDown,
|
|
1034
1000
|
//----------------------------------------------------------------------------------------------------------------
|
|
1035
1001
|
className = _a.className, initStyle = _a.style,
|
|
1036
1002
|
//----------------------------------------------------------------------------------------------------------------
|
|
1037
|
-
props = __rest(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "name", "required", "value", "data", "icon", "labelIcon", "label", "error", "helperText", "exceptValue", "readOnly", "tabIndex", "disabled", "placeholder", "maxLength", "clear", "width", "
|
|
1003
|
+
props = __rest(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "submitWhenReturnKey", "name", "required", "value", "data", "icon", "labelIcon", "label", "error", "helperText", "exceptValue", "readOnly", "tabIndex", "disabled", "placeholder", "maxLength", "clear", "width", "slotProps", "inputRef", "select", "multiline", "validPattern", "invalidPattern", "startAdornment", "endAdornment", "noFormValueItem", "hidden", "disableReturnKey", "onChange", "onValue", "onValidate", "onBlur", "onKeyDown", "className", "style"]);
|
|
1038
1004
|
var id = React.useId();
|
|
1039
1005
|
/********************************************************************************************************************
|
|
1040
1006
|
* Ref
|
|
@@ -1043,7 +1009,7 @@ styleInject(css_248z$l);var FormTextField = React.forwardRef(function (_a, ref)
|
|
|
1043
1009
|
/********************************************************************************************************************
|
|
1044
1010
|
* FormState
|
|
1045
1011
|
* ******************************************************************************************************************/
|
|
1046
|
-
var
|
|
1012
|
+
var _b = useFormState(), formVariant = _b.variant, formSize = _b.size, formColor = _b.color, formFocused = _b.focused, formLabelShrink = _b.labelShrink, formFullWidth = _b.fullWidth, formDisabled = _b.disabled, formSubmitWhenReturnKey = _b.submitWhenReturnKey, formColWithHelperText = _b.formColWithHelperText, onAddValueItem = _b.onAddValueItem, onRemoveValueItem = _b.onRemoveValueItem, onValueChange = _b.onValueChange, onValueChangeByUser = _b.onValueChangeByUser, onRequestSubmit = _b.onRequestSubmit, onRequestSearchSubmit = _b.onRequestSearchSubmit;
|
|
1047
1013
|
/********************************************************************************************************************
|
|
1048
1014
|
* Memo - FormState
|
|
1049
1015
|
* ******************************************************************************************************************/
|
|
@@ -1053,14 +1019,15 @@ styleInject(css_248z$l);var FormTextField = React.forwardRef(function (_a, ref)
|
|
|
1053
1019
|
var focused = util.ifUndefined(initFocused, formFocused);
|
|
1054
1020
|
var labelShrink = util.ifUndefined(initLabelShrink, formLabelShrink);
|
|
1055
1021
|
var fullWidth = util.ifUndefined(initFullWidth, formFullWidth);
|
|
1022
|
+
var submitWhenReturnKey = util.ifUndefined(initSubmitWhenReturnKey, formSubmitWhenReturnKey);
|
|
1056
1023
|
/********************************************************************************************************************
|
|
1057
1024
|
* State
|
|
1058
1025
|
* ******************************************************************************************************************/
|
|
1059
|
-
var
|
|
1060
|
-
var
|
|
1061
|
-
var
|
|
1062
|
-
var
|
|
1063
|
-
var
|
|
1026
|
+
var _c = reactHook.useAutoUpdateState(initError), error = _c[0], setError = _c[1];
|
|
1027
|
+
var _d = React.useState(), errorHelperText = _d[0], setErrorHelperText = _d[1];
|
|
1028
|
+
var _e = reactHook.useAutoUpdateRefState(initData), dataRef = _e[0], setData = _e[2];
|
|
1029
|
+
var _f = reactHook.useAutoUpdateRefState(React.useMemo(function () { return (initDisabled == null ? formDisabled : initDisabled); }, [initDisabled, formDisabled])), disabledRef = _f[0], disabled = _f[1], setDisabled = _f[2];
|
|
1030
|
+
var _g = reactHook.useAutoUpdateRefState(initHidden), hiddenRef = _g[0], hidden = _g[1], setHidden = _g[2];
|
|
1064
1031
|
/********************************************************************************************************************
|
|
1065
1032
|
* Function - setErrorErrorHelperText
|
|
1066
1033
|
* ******************************************************************************************************************/
|
|
@@ -1104,7 +1071,7 @@ styleInject(css_248z$l);var FormTextField = React.forwardRef(function (_a, ref)
|
|
|
1104
1071
|
var getFinalValue = React.useCallback(function (newValue) {
|
|
1105
1072
|
return onValue ? onValue(newValue) : newValue;
|
|
1106
1073
|
}, [onValue]);
|
|
1107
|
-
var
|
|
1074
|
+
var _h = reactHook.useAutoUpdateRefState(initValue, getFinalValue), valueRef = _h[0], value = _h[1], setValue = _h[2];
|
|
1108
1075
|
reactHook.useFirstSkipEffect(function () {
|
|
1109
1076
|
if (error)
|
|
1110
1077
|
validate(value);
|
|
@@ -1130,52 +1097,6 @@ styleInject(css_248z$l);var FormTextField = React.forwardRef(function (_a, ref)
|
|
|
1130
1097
|
(_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1131
1098
|
}
|
|
1132
1099
|
}, [initInputRef, inputRef]);
|
|
1133
|
-
/********************************************************************************************************************
|
|
1134
|
-
* Memo - muiInputProps
|
|
1135
|
-
* ******************************************************************************************************************/
|
|
1136
|
-
var muiInputProps = React.useMemo(function () {
|
|
1137
|
-
var muiInputProps = __assign({}, initMuiInputProps);
|
|
1138
|
-
if (startAdornment || icon || muiInputProps.startAdornment) {
|
|
1139
|
-
muiInputProps.startAdornment = (React.createElement(React.Fragment, null,
|
|
1140
|
-
icon && (React.createElement(material.InputAdornment, { position: 'start' },
|
|
1141
|
-
React.createElement(reactComponent.PdgIcon, { size: 'small' }, icon))),
|
|
1142
|
-
startAdornment && React.createElement(material.InputAdornment, { position: 'start' }, startAdornment),
|
|
1143
|
-
muiInputProps.startAdornment));
|
|
1144
|
-
}
|
|
1145
|
-
if (endAdornment || muiInputProps.endAdornment || (clear && !readOnly && !disabled)) {
|
|
1146
|
-
muiInputProps.endAdornment = (React.createElement(React.Fragment, null,
|
|
1147
|
-
clear && !readOnly && !disabled && (React.createElement(material.InputAdornment, { className: classNames('clear-icon-button-wrap', showClear && 'show'), position: 'end' },
|
|
1148
|
-
React.createElement(material.IconButton, { className: 'clear-icon-button', size: 'small', tabIndex: -1, onClick: function () {
|
|
1149
|
-
var finalValue = setValue('');
|
|
1150
|
-
focus();
|
|
1151
|
-
if (!noFormValueItem) {
|
|
1152
|
-
util.nextTick(function () {
|
|
1153
|
-
onValueChangeByUser(name, finalValue);
|
|
1154
|
-
onRequestSearchSubmit(name, finalValue);
|
|
1155
|
-
});
|
|
1156
|
-
}
|
|
1157
|
-
} },
|
|
1158
|
-
React.createElement(reactComponent.PdgIcon, { size: 'inherit' }, "ClearRounded")))),
|
|
1159
|
-
muiInputProps.endAdornment,
|
|
1160
|
-
endAdornment && React.createElement(material.InputAdornment, { position: 'end' }, endAdornment)));
|
|
1161
|
-
}
|
|
1162
|
-
return muiInputProps;
|
|
1163
|
-
}, [
|
|
1164
|
-
clear,
|
|
1165
|
-
disabled,
|
|
1166
|
-
endAdornment,
|
|
1167
|
-
focus,
|
|
1168
|
-
icon,
|
|
1169
|
-
initMuiInputProps,
|
|
1170
|
-
name,
|
|
1171
|
-
noFormValueItem,
|
|
1172
|
-
onRequestSearchSubmit,
|
|
1173
|
-
onValueChangeByUser,
|
|
1174
|
-
readOnly,
|
|
1175
|
-
setValue,
|
|
1176
|
-
showClear,
|
|
1177
|
-
startAdornment,
|
|
1178
|
-
]);
|
|
1179
1100
|
/********************************************************************************************************************
|
|
1180
1101
|
* Commands
|
|
1181
1102
|
* ******************************************************************************************************************/
|
|
@@ -1274,11 +1195,25 @@ styleInject(css_248z$l);var FormTextField = React.forwardRef(function (_a, ref)
|
|
|
1274
1195
|
!noFormValueItem) {
|
|
1275
1196
|
e.preventDefault();
|
|
1276
1197
|
e.stopPropagation();
|
|
1198
|
+
if (submitWhenReturnKey) {
|
|
1199
|
+
onRequestSubmit(name, valueRef.current);
|
|
1200
|
+
}
|
|
1277
1201
|
onRequestSearchSubmit(name, valueRef.current);
|
|
1278
1202
|
}
|
|
1279
1203
|
if (onKeyDown)
|
|
1280
1204
|
onKeyDown(e);
|
|
1281
|
-
}, [
|
|
1205
|
+
}, [
|
|
1206
|
+
select,
|
|
1207
|
+
multiline,
|
|
1208
|
+
disableReturnKey,
|
|
1209
|
+
noFormValueItem,
|
|
1210
|
+
onKeyDown,
|
|
1211
|
+
submitWhenReturnKey,
|
|
1212
|
+
onRequestSearchSubmit,
|
|
1213
|
+
name,
|
|
1214
|
+
valueRef,
|
|
1215
|
+
onRequestSubmit,
|
|
1216
|
+
]);
|
|
1282
1217
|
/********************************************************************************************************************
|
|
1283
1218
|
* Variable
|
|
1284
1219
|
* ******************************************************************************************************************/
|
|
@@ -1290,30 +1225,99 @@ styleInject(css_248z$l);var FormTextField = React.forwardRef(function (_a, ref)
|
|
|
1290
1225
|
if (hidden) {
|
|
1291
1226
|
style.display = 'none';
|
|
1292
1227
|
}
|
|
1293
|
-
//
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
//
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1228
|
+
// // inputProps
|
|
1229
|
+
// let inputProps: FormTextProps['inputProps'] = initInputProps;
|
|
1230
|
+
// if ((!initInputProps?.className?.includes('FormTag-Input') && readOnly != null) || maxLength != null) {
|
|
1231
|
+
// inputProps = {
|
|
1232
|
+
// ...initInputProps,
|
|
1233
|
+
// readOnly: readOnly,
|
|
1234
|
+
// maxLength: maxLength,
|
|
1235
|
+
// };
|
|
1236
|
+
//
|
|
1237
|
+
// if (readOnly) {
|
|
1238
|
+
// inputProps.tabIndex = -1;
|
|
1239
|
+
// inputProps.className = classNames(inputProps.className, 'Mui-disabled');
|
|
1240
|
+
// } else {
|
|
1241
|
+
// inputProps.tabIndex = tabIndex;
|
|
1242
|
+
// }
|
|
1243
|
+
// }
|
|
1244
|
+
/********************************************************************************************************************
|
|
1245
|
+
* Memo - slotProps
|
|
1246
|
+
* ******************************************************************************************************************/
|
|
1247
|
+
var inputSlotProps = React.useMemo(function () {
|
|
1248
|
+
var newProps = __assign({}, initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.input);
|
|
1249
|
+
if (startAdornment || icon || newProps.startAdornment) {
|
|
1250
|
+
newProps.startAdornment = (React.createElement(React.Fragment, null,
|
|
1251
|
+
icon && (React.createElement(material.InputAdornment, { position: 'start' },
|
|
1252
|
+
React.createElement(reactComponent.PdgIcon, { size: 'small' }, icon))),
|
|
1253
|
+
startAdornment && React.createElement(material.InputAdornment, { position: 'start' }, startAdornment),
|
|
1254
|
+
newProps.startAdornment));
|
|
1303
1255
|
}
|
|
1304
|
-
|
|
1305
|
-
|
|
1256
|
+
if (endAdornment || newProps.endAdornment || (clear && !readOnly && !disabled)) {
|
|
1257
|
+
newProps.endAdornment = (React.createElement(React.Fragment, null,
|
|
1258
|
+
clear && !readOnly && !disabled && (React.createElement(material.InputAdornment, { className: classNames('clear-icon-button-wrap', showClear && 'show'), position: 'end' },
|
|
1259
|
+
React.createElement(material.IconButton, { className: 'clear-icon-button', size: 'small', tabIndex: -1, onClick: function () {
|
|
1260
|
+
var finalValue = setValue('');
|
|
1261
|
+
focus();
|
|
1262
|
+
if (!noFormValueItem) {
|
|
1263
|
+
util.nextTick(function () {
|
|
1264
|
+
onValueChangeByUser(name, finalValue);
|
|
1265
|
+
onRequestSearchSubmit(name, finalValue);
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
} },
|
|
1269
|
+
React.createElement(reactComponent.PdgIcon, { size: 'inherit' }, "ClearRounded")))),
|
|
1270
|
+
newProps.endAdornment,
|
|
1271
|
+
endAdornment && React.createElement(material.InputAdornment, { position: 'end' }, endAdornment)));
|
|
1306
1272
|
}
|
|
1307
|
-
|
|
1273
|
+
return newProps;
|
|
1274
|
+
}, [
|
|
1275
|
+
clear,
|
|
1276
|
+
disabled,
|
|
1277
|
+
endAdornment,
|
|
1278
|
+
focus,
|
|
1279
|
+
icon,
|
|
1280
|
+
initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.input,
|
|
1281
|
+
name,
|
|
1282
|
+
noFormValueItem,
|
|
1283
|
+
onRequestSearchSubmit,
|
|
1284
|
+
onValueChangeByUser,
|
|
1285
|
+
readOnly,
|
|
1286
|
+
setValue,
|
|
1287
|
+
showClear,
|
|
1288
|
+
startAdornment,
|
|
1289
|
+
]);
|
|
1290
|
+
var slotProps = React.useMemo(function () {
|
|
1291
|
+
var _a;
|
|
1292
|
+
var newSlotProps = __assign(__assign({}, initSlotProps), { formHelperText: { component: 'div' } });
|
|
1293
|
+
// input
|
|
1294
|
+
newSlotProps.input = __assign(__assign({}, initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.input), inputSlotProps);
|
|
1295
|
+
// inputLabel
|
|
1296
|
+
newSlotProps.inputLabel =
|
|
1297
|
+
labelShrink || placeholder
|
|
1298
|
+
? __assign(__assign({}, initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.inputLabel), { shrink: true }) : initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.inputLabel;
|
|
1299
|
+
// htmlInput
|
|
1300
|
+
var initHtmlInputProps = initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.htmlInput;
|
|
1301
|
+
if ((!((_a = initHtmlInputProps === null || initHtmlInputProps === void 0 ? void 0 : initHtmlInputProps.className) === null || _a === void 0 ? void 0 : _a.includes('FormTag-Input')) && readOnly != null) || maxLength != null) {
|
|
1302
|
+
newSlotProps.htmlInput = __assign(__assign({}, initHtmlInputProps), { readOnly: readOnly, maxLength: maxLength });
|
|
1303
|
+
if (readOnly) {
|
|
1304
|
+
newSlotProps.htmlInput.tabIndex = -1;
|
|
1305
|
+
newSlotProps.htmlInput.className = classNames(newSlotProps.htmlInput.className, 'Mui-disabled');
|
|
1306
|
+
}
|
|
1307
|
+
else {
|
|
1308
|
+
newSlotProps.htmlInput.tabIndex = tabIndex;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
return newSlotProps;
|
|
1312
|
+
}, [initSlotProps, inputSlotProps, labelShrink, maxLength, placeholder, readOnly, tabIndex]);
|
|
1308
1313
|
/********************************************************************************************************************
|
|
1309
1314
|
* Render
|
|
1310
1315
|
* ******************************************************************************************************************/
|
|
1311
1316
|
return (React.createElement(material.TextField, __assign({}, props, { variant: variant, size: size, color: color, focused: focused || undefined, name: name, label: labelIcon ? (React.createElement(React.Fragment, null,
|
|
1312
1317
|
React.createElement(reactComponent.PdgIcon, { style: { verticalAlign: 'middle', marginRight: 4 } }, labelIcon),
|
|
1313
|
-
React.createElement(
|
|
1318
|
+
React.createElement(material.Box, { component: 'span', style: { verticalAlign: 'middle' } }, initLabel))) : (initLabel), placeholder: placeholder, className: classNames(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, slotProps: slotProps, disabled: disabled, style: style, select: select, multiline: multiline, onChange: handleChange, onBlur: handleBlur, onKeyDown: handleKeyDown })));
|
|
1314
1319
|
});
|
|
1315
|
-
FormTextField.displayName = 'FormTextField';var
|
|
1316
|
-
styleInject(css_248z$k);var FormHidden = React.forwardRef(function (_a, ref) {
|
|
1320
|
+
FormTextField.displayName = 'FormTextField';var FormHidden = React.forwardRef(function (_a, ref) {
|
|
1317
1321
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
1318
1322
|
return (React.createElement(FormTextField, __assign({ ref: ref, className: classNames(className, 'FormHidden'), type: 'hidden', variant: 'standard' }, props)));
|
|
1319
1323
|
});
|
|
@@ -1321,12 +1325,69 @@ FormHidden.displayName = 'FormHidden';var FormText = React.forwardRef(function (
|
|
|
1321
1325
|
var className = _a.className, _b = _a.clear, clear = _b === void 0 ? true : _b, _c = _a.value, value = _c === void 0 ? '' : _c, props = __rest(_a, ["className", "clear", "value"]);
|
|
1322
1326
|
return (React.createElement(FormTextField, __assign({ ref: ref, className: classNames(className, 'FormText'), clear: clear, value: value, disableReturnKey: true }, props)));
|
|
1323
1327
|
});
|
|
1324
|
-
FormText.displayName = 'FormText';var
|
|
1325
|
-
|
|
1328
|
+
FormText.displayName = 'FormText';var FormTagText = React.forwardRef(function (_a, ref) {
|
|
1329
|
+
/********************************************************************************************************************
|
|
1330
|
+
* Use
|
|
1331
|
+
* ******************************************************************************************************************/
|
|
1332
|
+
var onKeyDown = _a.onKeyDown, onBlur = _a.onBlur, onAppendTag = _a.onAppendTag, props = __rest(_a, ["onKeyDown", "onBlur", "onAppendTag"]);
|
|
1333
|
+
var forceUpdate = reactHook.useForceUpdate();
|
|
1334
|
+
/********************************************************************************************************************
|
|
1335
|
+
* Ref
|
|
1336
|
+
* ******************************************************************************************************************/
|
|
1337
|
+
var valueRef = React.useRef('');
|
|
1338
|
+
/********************************************************************************************************************
|
|
1339
|
+
* Function
|
|
1340
|
+
* ******************************************************************************************************************/
|
|
1341
|
+
var appendTag = React.useCallback(function () {
|
|
1342
|
+
onAppendTag(valueRef.current);
|
|
1343
|
+
valueRef.current = ' ';
|
|
1344
|
+
forceUpdate();
|
|
1345
|
+
util.nextTick(function () {
|
|
1346
|
+
valueRef.current = '';
|
|
1347
|
+
forceUpdate();
|
|
1348
|
+
});
|
|
1349
|
+
}, [forceUpdate, onAppendTag]);
|
|
1350
|
+
/********************************************************************************************************************
|
|
1351
|
+
* Event Handler
|
|
1352
|
+
* ******************************************************************************************************************/
|
|
1353
|
+
var handleKeyDown = React.useCallback(function (e) {
|
|
1354
|
+
if ([' ', ',', 'Enter'].includes(e.key)) {
|
|
1355
|
+
e.preventDefault();
|
|
1356
|
+
e.stopPropagation();
|
|
1357
|
+
if (util.notEmpty(valueRef.current)) {
|
|
1358
|
+
appendTag();
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
else {
|
|
1362
|
+
if (onKeyDown)
|
|
1363
|
+
onKeyDown(e);
|
|
1364
|
+
}
|
|
1365
|
+
}, [appendTag, onKeyDown]);
|
|
1366
|
+
var handleChange = React.useCallback(function (value) {
|
|
1367
|
+
valueRef.current = value.replace(/ /g, '').replace(/,/g, '');
|
|
1368
|
+
}, []);
|
|
1369
|
+
var handleBlur = React.useCallback(function (e) {
|
|
1370
|
+
if (util.notEmpty(valueRef.current)) {
|
|
1371
|
+
appendTag();
|
|
1372
|
+
}
|
|
1373
|
+
if (onBlur)
|
|
1374
|
+
onBlur(e);
|
|
1375
|
+
}, [onBlur, appendTag]);
|
|
1376
|
+
/********************************************************************************************************************
|
|
1377
|
+
* Render
|
|
1378
|
+
* ******************************************************************************************************************/
|
|
1379
|
+
return (React.createElement(StyledFormText, __assign({ ref: ref }, props, { value: valueRef.current, onChange: handleChange, onKeyDown: handleKeyDown, onBlur: handleBlur })));
|
|
1380
|
+
});
|
|
1381
|
+
/********************************************************************************************************************
|
|
1382
|
+
* Styled Components
|
|
1383
|
+
* ******************************************************************************************************************/
|
|
1384
|
+
var StyledFormText = material.styled(FormText)(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n .FormTag-Input {\n flex: 1;\n min-width: 50px;\n padding-left: 5px;\n }\n &.variant-outlined {\n .MuiInputBase-root {\n .FormTag-Input {\n padding-top: 7px;\n padding-bottom: 8px;\n }\n\n &.MuiInputBase-sizeSmall {\n .FormTag-Input {\n padding-top: 0;\n padding-bottom: 0;\n }\n }\n }\n }\n"], ["\n .FormTag-Input {\n flex: 1;\n min-width: 50px;\n padding-left: 5px;\n }\n &.variant-outlined {\n .MuiInputBase-root {\n .FormTag-Input {\n padding-top: 7px;\n padding-bottom: 8px;\n }\n\n &.MuiInputBase-sizeSmall {\n .FormTag-Input {\n padding-top: 0;\n padding-bottom: 0;\n }\n }\n }\n }\n"])));
|
|
1385
|
+
var templateObject_1$d;var _emptyValue = [];
|
|
1386
|
+
var FormTag = React.forwardRef(function (_a, ref) {
|
|
1326
1387
|
/********************************************************************************************************************
|
|
1327
1388
|
* FormState
|
|
1328
1389
|
* ******************************************************************************************************************/
|
|
1329
|
-
var className = _a.className, name = _a.name, _b = _a.value, initValue = _b === void 0 ?
|
|
1390
|
+
var className = _a.className, name = _a.name, _b = _a.value, initValue = _b === void 0 ? _emptyValue : _b, exceptValue = _a.exceptValue, _c = _a.clear, clear = _c === void 0 ? true : _c, required = _a.required, readOnly = _a.readOnly, maxLength = _a.maxLength, initDisabled = _a.disabled, initFullWidth = _a.fullWidth, initError = _a.error, helperText = _a.helperText, _d = _a.formValueSeparator, formValueSeparator = _d === void 0 ? ',' : _d, formValueSort = _a.formValueSort, limitTags = _a.limitTags, getLimitTagsText = _a.getLimitTagsText, slotProps = _a.slotProps, onAppendTag = _a.onAppendTag, onRemoveTag = _a.onRemoveTag, onValidate = _a.onValidate, onChange = _a.onChange, onValue = _a.onValue, props = __rest(_a, ["className", "name", "value", "exceptValue", "clear", "required", "readOnly", "maxLength", "disabled", "fullWidth", "error", "helperText", "formValueSeparator", "formValueSort", "limitTags", "getLimitTagsText", "slotProps", "onAppendTag", "onRemoveTag", "onValidate", "onChange", "onValue"]);
|
|
1330
1391
|
var _e = useFormState(), formFullWidth = _e.fullWidth, formDisabled = _e.disabled, onAddValueItem = _e.onAddValueItem, onValueChange = _e.onValueChange, onValueChangeByUser = _e.onValueChangeByUser, onRequestSearchSubmit = _e.onRequestSearchSubmit, otherFormState = __rest(_e, ["fullWidth", "disabled", "onAddValueItem", "onValueChange", "onValueChangeByUser", "onRequestSearchSubmit"]);
|
|
1331
1392
|
/********************************************************************************************************************
|
|
1332
1393
|
* FormState - Variables
|
|
@@ -1335,9 +1396,8 @@ styleInject(css_248z$j);var FormTag = React.forwardRef(function (_a, ref) {
|
|
|
1335
1396
|
/********************************************************************************************************************
|
|
1336
1397
|
* State
|
|
1337
1398
|
* ******************************************************************************************************************/
|
|
1338
|
-
var _f =
|
|
1339
|
-
var _g =
|
|
1340
|
-
var _h = React.useState(), errorHelperText = _h[0], setErrorHelperText = _h[1];
|
|
1399
|
+
var _f = reactHook.useAutoUpdateState(initError), error = _f[0], setError = _f[1];
|
|
1400
|
+
var _g = React.useState(), errorHelperText = _g[0], setErrorHelperText = _g[1];
|
|
1341
1401
|
var disabled = reactHook.useAutoUpdateState(initDisabled == null ? formDisabled : initDisabled)[0];
|
|
1342
1402
|
/********************************************************************************************************************
|
|
1343
1403
|
* Function - setErrorErrorHelperText
|
|
@@ -1376,7 +1436,7 @@ styleInject(css_248z$j);var FormTag = React.forwardRef(function (_a, ref) {
|
|
|
1376
1436
|
}
|
|
1377
1437
|
return onValue ? onValue(finalValue) : finalValue;
|
|
1378
1438
|
}, [onValue]);
|
|
1379
|
-
var
|
|
1439
|
+
var _h = reactHook.useAutoUpdateRefState(initValue, getFinalValue), valueRef = _h[0], value = _h[1], setValue = _h[2];
|
|
1380
1440
|
var valueSet = React.useMemo(function () { return new Set(value); }, [value]);
|
|
1381
1441
|
reactHook.useFirstSkipEffect(function () {
|
|
1382
1442
|
if (error)
|
|
@@ -1415,16 +1475,12 @@ styleInject(css_248z$j);var FormTag = React.forwardRef(function (_a, ref) {
|
|
|
1415
1475
|
* Function - appendTag, removeTag
|
|
1416
1476
|
* ******************************************************************************************************************/
|
|
1417
1477
|
var appendTag = React.useCallback(function (tag) {
|
|
1418
|
-
if (valueSet.has(tag)) {
|
|
1419
|
-
setInputValue('');
|
|
1420
|
-
}
|
|
1421
|
-
else {
|
|
1478
|
+
if (!valueSet.has(tag)) {
|
|
1422
1479
|
if (onAppendTag && !onAppendTag(tag))
|
|
1423
1480
|
return;
|
|
1424
1481
|
valueSet.add(tag);
|
|
1425
1482
|
var finalValue_1 = setValue(valueSet);
|
|
1426
1483
|
util.nextTick(function () {
|
|
1427
|
-
setInputValue('');
|
|
1428
1484
|
onValueChangeByUser(name, finalValue_1);
|
|
1429
1485
|
onRequestSearchSubmit(name, finalValue_1);
|
|
1430
1486
|
});
|
|
@@ -1459,60 +1515,20 @@ styleInject(css_248z$j);var FormTag = React.forwardRef(function (_a, ref) {
|
|
|
1459
1515
|
}
|
|
1460
1516
|
}
|
|
1461
1517
|
}, [ref, getCommands]);
|
|
1462
|
-
var
|
|
1463
|
-
if ([' ', ',', 'Enter'].includes(e.key)) {
|
|
1464
|
-
e.preventDefault();
|
|
1465
|
-
e.stopPropagation();
|
|
1466
|
-
if (util.notEmpty(inputValue)) {
|
|
1467
|
-
appendTag(inputValue);
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
else {
|
|
1471
|
-
if (onKeyDown)
|
|
1472
|
-
onKeyDown(e);
|
|
1473
|
-
}
|
|
1474
|
-
}, [inputValue, appendTag, onKeyDown]);
|
|
1475
|
-
var handleInputChange = React.useCallback(function (value) {
|
|
1476
|
-
setInputValue(value.replace(/ /g, '').replace(/,/g, ''));
|
|
1477
|
-
setInputValue(value);
|
|
1478
|
-
}, []);
|
|
1479
|
-
var handleBlur = React.useCallback(function (e) {
|
|
1480
|
-
if (util.notEmpty(inputValue)) {
|
|
1481
|
-
appendTag(inputValue);
|
|
1482
|
-
}
|
|
1483
|
-
if (onBlur)
|
|
1484
|
-
onBlur(e);
|
|
1485
|
-
}, [appendTag, inputValue, onBlur]);
|
|
1486
|
-
var handleRenderTags = React.useCallback(function (tags) {
|
|
1518
|
+
var handleRenderValue = React.useCallback(function (tags) {
|
|
1487
1519
|
return tags.map(function (tag) { return (React.createElement(material.Chip, { className: 'MuiAutocomplete-tag', key: tag, label: tag, size: 'small', disabled: readOnly || disabled, onDelete: readOnly || disabled ? undefined : function () { return removeTag(tag); } })); });
|
|
1488
1520
|
}, [disabled, readOnly, removeTag]);
|
|
1489
1521
|
/********************************************************************************************************************
|
|
1490
1522
|
* Render
|
|
1491
1523
|
* ******************************************************************************************************************/
|
|
1492
1524
|
var handleRenderInput = React.useCallback(function (params) {
|
|
1493
|
-
var
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
renderProps
|
|
1497
|
-
|
|
1498
|
-
renderProps.InputProps.startAdornment = (React.createElement(React.Fragment, null,
|
|
1499
|
-
renderProps.InputProps.startAdornment,
|
|
1500
|
-
params.InputProps.startAdornment));
|
|
1501
|
-
}
|
|
1502
|
-
renderProps.inputProps = __assign(__assign({}, renderProps.inputProps), params.inputProps);
|
|
1503
|
-
renderProps.inputProps.className = classNames(renderProps.inputProps.className, 'FormTag-Input');
|
|
1504
|
-
renderProps.inputProps.readOnly = readOnly;
|
|
1505
|
-
if (readOnly) {
|
|
1506
|
-
renderProps.inputProps.tabIndex = -1;
|
|
1507
|
-
}
|
|
1508
|
-
renderProps.inputProps.maxLength = maxLength;
|
|
1509
|
-
if (readOnly) {
|
|
1510
|
-
renderProps.inputProps.className = classNames(renderProps.inputProps.className, 'Mui-disabled');
|
|
1511
|
-
}
|
|
1512
|
-
delete renderProps.inputProps.onChange;
|
|
1513
|
-
delete renderProps.inputProps.value;
|
|
1514
|
-
return (React.createElement(FormText, __assign({}, renderProps, { ref: handleRef, name: name, className: classNames(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 })));
|
|
1525
|
+
var htmlInputProps = __assign(__assign({}, params.inputProps), { className: classNames('FormTag-Input', readOnly && 'Mui-disabled'), readOnly: readOnly, tabIndex: readOnly ? -1 : undefined, maxLength: maxLength });
|
|
1526
|
+
delete htmlInputProps.onChange;
|
|
1527
|
+
delete htmlInputProps.value;
|
|
1528
|
+
var renderProps = __assign({ name: name, clear: clear, className: classNames(className, 'FormValueItem', 'FormTag'), error: error, disabled: disabled, fullWidth: fullWidth, required: required, exceptValue: exceptValue, slotProps: __assign(__assign({}, slotProps), { inputLabel: __assign(__assign({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.inputLabel), { htmlFor: params.InputLabelProps.htmlFor, id: params.InputLabelProps.id }), input: __assign(__assign({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.input), { className: params.InputProps.className, ref: params.InputProps.ref, startAdornment: params.InputProps.startAdornment }), htmlInput: __assign(__assign({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.htmlInput), htmlInputProps) }), helperText: error ? errorHelperText : helperText, onAppendTag: appendTag }, props);
|
|
1529
|
+
return React.createElement(FormTagText, __assign({ ref: handleRef }, renderProps));
|
|
1515
1530
|
}, [
|
|
1531
|
+
appendTag,
|
|
1516
1532
|
className,
|
|
1517
1533
|
clear,
|
|
1518
1534
|
disabled,
|
|
@@ -1520,20 +1536,17 @@ styleInject(css_248z$j);var FormTag = React.forwardRef(function (_a, ref) {
|
|
|
1520
1536
|
errorHelperText,
|
|
1521
1537
|
exceptValue,
|
|
1522
1538
|
fullWidth,
|
|
1523
|
-
handleBlur,
|
|
1524
|
-
handleInputChange,
|
|
1525
|
-
handleInputKeyDown,
|
|
1526
1539
|
handleRef,
|
|
1527
1540
|
helperText,
|
|
1528
|
-
inputValue,
|
|
1529
1541
|
maxLength,
|
|
1530
1542
|
name,
|
|
1531
1543
|
props,
|
|
1532
1544
|
readOnly,
|
|
1533
1545
|
required,
|
|
1546
|
+
slotProps,
|
|
1534
1547
|
]);
|
|
1535
1548
|
return (React.createElement(FormContextProvider, { value: __assign(__assign({}, otherFormState), { fullWidth: formFullWidth, onAddValueItem: handleAddValueItem, onValueChange: function () { }, onValueChangeByUser: function () { }, onRequestSearchSubmit: function () { } }) },
|
|
1536
|
-
React.createElement(material.Autocomplete, { options: [], multiple: true, freeSolo: true, value: value, readOnly: readOnly, disableClearable: true, limitTags: limitTags, getLimitTagsText: getLimitTagsText, disabled: disabled,
|
|
1549
|
+
React.createElement(material.Autocomplete, { options: [], multiple: true, freeSolo: true, value: value, readOnly: readOnly, disableClearable: true, limitTags: limitTags, getLimitTagsText: getLimitTagsText, disabled: disabled, renderValue: handleRenderValue, style: { display: fullWidth ? 'block' : 'inline-block', width: fullWidth ? '100%' : undefined }, renderInput: handleRenderInput })));
|
|
1537
1550
|
});
|
|
1538
1551
|
FormTag.displayName = 'FormTag';var FormEmail = React.forwardRef(function (_a, ref) {
|
|
1539
1552
|
/********************************************************************************************************************
|
|
@@ -1549,34 +1562,27 @@ FormTag.displayName = 'FormTag';var FormEmail = React.forwardRef(function (_a, r
|
|
|
1549
1562
|
* ******************************************************************************************************************/
|
|
1550
1563
|
return (React.createElement(FormText, __assign({ ref: ref, className: classNames(className, 'FormEmail'), type: 'email', validPattern: validPattern, onValue: handleValue }, props)));
|
|
1551
1564
|
});
|
|
1552
|
-
FormEmail.displayName = 'FormEmail';var
|
|
1553
|
-
styleInject(css_248z$i);var StyledEyeInputAdornment = material.styled(material.InputAdornment)(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n visibility: hidden;\n"], ["\n visibility: hidden;\n"])));
|
|
1565
|
+
FormEmail.displayName = 'FormEmail';var StyledEyeInputAdornment = material.styled(material.InputAdornment)(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n visibility: hidden;\n"], ["\n visibility: hidden;\n"])));
|
|
1554
1566
|
var FormPassword = React.forwardRef(function (_a, ref) {
|
|
1555
1567
|
/********************************************************************************************************************
|
|
1556
1568
|
* State
|
|
1557
1569
|
* ******************************************************************************************************************/
|
|
1558
|
-
var className = _a.className,
|
|
1570
|
+
var className = _a.className, initSlotProps = _a.slotProps, _b = _a.clear, clear = _b === void 0 ? false : _b, _c = _a.eye, eye = _c === void 0 ? true : _c, onChange = _a.onChange, props = __rest(_a, ["className", "slotProps", "clear", "eye", "onChange"]);
|
|
1559
1571
|
var _d = React.useState('password'), type = _d[0], setType = _d[1];
|
|
1560
1572
|
var _e = React.useState(util.notEmpty(props.value)), showEye = _e[0], setShowEye = _e[1];
|
|
1561
1573
|
/********************************************************************************************************************
|
|
1562
1574
|
* Memo
|
|
1563
1575
|
* ******************************************************************************************************************/
|
|
1564
|
-
var
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
return newProps;
|
|
1575
|
-
}
|
|
1576
|
-
else {
|
|
1577
|
-
return initMuiInputProps;
|
|
1578
|
-
}
|
|
1579
|
-
}, [eye, initMuiInputProps, showEye, type]);
|
|
1576
|
+
var slotProps = React.useMemo(function () {
|
|
1577
|
+
var _a;
|
|
1578
|
+
return __assign(__assign({}, initSlotProps), { input: __assign(__assign({}, initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.input), { endAdornment: (React.createElement(React.Fragment, null,
|
|
1579
|
+
eye && (React.createElement(StyledEyeInputAdornment, { position: 'end', className: classNames('eye-icon-button-wrap', showEye && 'show') },
|
|
1580
|
+
React.createElement(material.IconButton, { size: 'small', tabIndex: -1, onClick: function () {
|
|
1581
|
+
setType(type === 'password' ? 'text' : 'password');
|
|
1582
|
+
} },
|
|
1583
|
+
React.createElement(material.Icon, { fontSize: 'inherit' }, type === 'password' ? 'visibility' : 'visibility_off')))), (_a = initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.input) === null || _a === void 0 ? void 0 :
|
|
1584
|
+
_a.endAdornment)) }) });
|
|
1585
|
+
}, [eye, initSlotProps, showEye, type]);
|
|
1580
1586
|
/********************************************************************************************************************
|
|
1581
1587
|
* Event Handler
|
|
1582
1588
|
* ******************************************************************************************************************/
|
|
@@ -1587,7 +1593,7 @@ var FormPassword = React.forwardRef(function (_a, ref) {
|
|
|
1587
1593
|
/********************************************************************************************************************
|
|
1588
1594
|
* Render
|
|
1589
1595
|
* ******************************************************************************************************************/
|
|
1590
|
-
return (React.createElement(FormText, __assign({ ref: ref, className: classNames(className, 'FormPassword'), onChange: handleChange, type: type,
|
|
1596
|
+
return (React.createElement(FormText, __assign({ ref: ref, className: classNames(className, 'FormPassword'), onChange: handleChange, type: type, slotProps: slotProps, clear: clear }, props)));
|
|
1591
1597
|
});
|
|
1592
1598
|
FormPassword.displayName = 'FormPassword';
|
|
1593
1599
|
var templateObject_1$c;var FormTel = React.forwardRef(function (_a, ref) {
|
|
@@ -1616,20 +1622,28 @@ FormMobile.displayName = 'FormMobile';var NumberFormatCustom = React.forwardRef(
|
|
|
1616
1622
|
} })));
|
|
1617
1623
|
});var FormNumber = React.forwardRef(function (_a, ref) {
|
|
1618
1624
|
/********************************************************************************************************************
|
|
1619
|
-
*
|
|
1625
|
+
* Use
|
|
1620
1626
|
* ******************************************************************************************************************/
|
|
1621
|
-
var className = _a.className, allowNegative = _a.allowNegative, thousandSeparator = _a.thousandSeparator, allowDecimal = _a.allowDecimal, decimalScale = _a.decimalScale, prefix = _a.prefix, suffix = _a.suffix, readOnly = _a.readOnly, tabIndex = _a.tabIndex, labelShrink = _a.labelShrink, _b = _a.clear, clear = _b === void 0 ? true : _b,
|
|
1622
|
-
var
|
|
1627
|
+
var className = _a.className, allowNegative = _a.allowNegative, thousandSeparator = _a.thousandSeparator, allowDecimal = _a.allowDecimal, decimalScale = _a.decimalScale, prefix = _a.prefix, suffix = _a.suffix, readOnly = _a.readOnly, tabIndex = _a.tabIndex, labelShrink = _a.labelShrink, _b = _a.clear, clear = _b === void 0 ? true : _b, initSlotProps = _a.slotProps, initValue = _a.value, onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate, props = __rest(_a, ["className", "allowNegative", "thousandSeparator", "allowDecimal", "decimalScale", "prefix", "suffix", "readOnly", "tabIndex", "labelShrink", "clear", "slotProps", "value", "onChange", "onValue", "onValidate"]);
|
|
1628
|
+
var forceUpdate = reactHook.useForceUpdate(1);
|
|
1629
|
+
/********************************************************************************************************************
|
|
1630
|
+
* Ref
|
|
1631
|
+
* ******************************************************************************************************************/
|
|
1632
|
+
var strValueRef = React.useRef(undefined);
|
|
1623
1633
|
/********************************************************************************************************************
|
|
1624
1634
|
* Effect
|
|
1625
1635
|
* ******************************************************************************************************************/
|
|
1626
1636
|
React.useEffect(function () {
|
|
1627
|
-
|
|
1637
|
+
strValueRef.current = util.empty(initValue) ? '' : "".concat(initValue);
|
|
1638
|
+
forceUpdate();
|
|
1639
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1628
1640
|
}, [initValue]);
|
|
1629
1641
|
/********************************************************************************************************************
|
|
1630
1642
|
* Memo
|
|
1631
1643
|
* ******************************************************************************************************************/
|
|
1632
|
-
var
|
|
1644
|
+
var slotProps = React.useMemo(function () {
|
|
1645
|
+
var _a;
|
|
1646
|
+
var newSlotProps = __assign({}, initSlotProps);
|
|
1633
1647
|
var inputProps = {
|
|
1634
1648
|
className: readOnly ? 'Mui-disabled' : undefined,
|
|
1635
1649
|
allowNegative: !!allowNegative,
|
|
@@ -1647,27 +1661,54 @@ FormMobile.displayName = 'FormMobile';var NumberFormatCustom = React.forwardRef(
|
|
|
1647
1661
|
else {
|
|
1648
1662
|
inputProps.decimalScale = 0;
|
|
1649
1663
|
}
|
|
1650
|
-
|
|
1664
|
+
newSlotProps.input = __assign(__assign({}, newSlotProps.input), { inputComponent: NumberFormatCustom, inputProps: __assign(__assign({}, (_a = newSlotProps.input) === null || _a === void 0 ? void 0 : _a.inputProps), inputProps) });
|
|
1665
|
+
return newSlotProps;
|
|
1651
1666
|
}, [
|
|
1652
|
-
|
|
1667
|
+
allowDecimal,
|
|
1653
1668
|
allowNegative,
|
|
1654
|
-
|
|
1669
|
+
decimalScale,
|
|
1670
|
+
initSlotProps,
|
|
1655
1671
|
prefix,
|
|
1672
|
+
readOnly,
|
|
1656
1673
|
suffix,
|
|
1657
1674
|
tabIndex,
|
|
1658
|
-
|
|
1659
|
-
initMuiInputProps,
|
|
1660
|
-
initInputProps,
|
|
1661
|
-
decimalScale,
|
|
1675
|
+
thousandSeparator,
|
|
1662
1676
|
]);
|
|
1663
1677
|
/********************************************************************************************************************
|
|
1664
1678
|
* Event Handler
|
|
1665
1679
|
* ******************************************************************************************************************/
|
|
1666
1680
|
var handleChange = React.useCallback(function (value) {
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1681
|
+
if (Number(value) > Number.MAX_SAFE_INTEGER) {
|
|
1682
|
+
var newValue = Number.MAX_SAFE_INTEGER;
|
|
1683
|
+
var newStrValue = "".concat(newValue);
|
|
1684
|
+
if (strValueRef.current === newStrValue) {
|
|
1685
|
+
strValueRef.current = "".concat(newValue, " ");
|
|
1686
|
+
}
|
|
1687
|
+
else {
|
|
1688
|
+
strValueRef.current = "".concat(newValue);
|
|
1689
|
+
}
|
|
1690
|
+
onChange && onChange(newValue);
|
|
1691
|
+
forceUpdate();
|
|
1692
|
+
}
|
|
1693
|
+
else if (Number(value) < Number.MIN_SAFE_INTEGER) {
|
|
1694
|
+
var newValue = Number.MIN_SAFE_INTEGER;
|
|
1695
|
+
var newStrValue = "".concat(newValue);
|
|
1696
|
+
if (strValueRef.current === newStrValue) {
|
|
1697
|
+
strValueRef.current = "".concat(newValue, " ");
|
|
1698
|
+
}
|
|
1699
|
+
else {
|
|
1700
|
+
strValueRef.current = "".concat(newValue);
|
|
1701
|
+
}
|
|
1702
|
+
onChange && onChange(newValue);
|
|
1703
|
+
forceUpdate();
|
|
1704
|
+
}
|
|
1705
|
+
else {
|
|
1706
|
+
var newValue = util.empty(value) || value === '-' || value === '.' ? undefined : Number(value);
|
|
1707
|
+
onChange && onChange(newValue);
|
|
1708
|
+
strValueRef.current = value;
|
|
1709
|
+
forceUpdate();
|
|
1710
|
+
}
|
|
1711
|
+
}, [forceUpdate, onChange]);
|
|
1671
1712
|
var handleValue = React.useCallback(function (value) {
|
|
1672
1713
|
var finalValue = util.empty(value) || value === '-' || value === '.' ? undefined : Number(value);
|
|
1673
1714
|
if (onValue) {
|
|
@@ -1687,15 +1728,13 @@ FormMobile.displayName = 'FormMobile';var NumberFormatCustom = React.forwardRef(
|
|
|
1687
1728
|
/********************************************************************************************************************
|
|
1688
1729
|
* Render
|
|
1689
1730
|
* ******************************************************************************************************************/
|
|
1690
|
-
return (React.createElement(FormTextField, __assign({ ref: ref, className: classNames(className, 'FormNumber'), disableReturnKey: true, labelShrink:
|
|
1731
|
+
return (React.createElement(FormTextField, __assign({ ref: ref, className: classNames(className, 'FormNumber'), disableReturnKey: true, labelShrink: strValueRef.current === '' || strValueRef.current === undefined ? labelShrink : true, slotProps: slotProps, readOnly: readOnly, clear: clear, value: strValueRef.current, onChange: handleChange, onValue: handleValue, onValidate: handleValidate }, props)));
|
|
1691
1732
|
});
|
|
1692
|
-
FormNumber.displayName = 'FormNumber';var
|
|
1693
|
-
styleInject(css_248z$h);var FormSearch = React.forwardRef(function (_a, ref) {
|
|
1733
|
+
FormNumber.displayName = 'FormNumber';var FormSearch = React.forwardRef(function (_a, ref) {
|
|
1694
1734
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
1695
1735
|
return React.createElement(FormText, __assign({ className: classNames(className, 'FormSearch'), ref: ref, type: 'search' }, props));
|
|
1696
1736
|
});
|
|
1697
|
-
FormSearch.displayName = 'FormSearch';var
|
|
1698
|
-
styleInject(css_248z$g);var FormTextarea = React.forwardRef(function (_a, ref) {
|
|
1737
|
+
FormSearch.displayName = 'FormSearch';var FormTextarea = React.forwardRef(function (_a, ref) {
|
|
1699
1738
|
var className = _a.className, _b = _a.clear, clear = _b === void 0 ? false : _b, _c = _a.rows, rows = _c === void 0 ? 3 : _c, _d = _a.value, value = _d === void 0 ? '' : _d, props = __rest(_a, ["className", "clear", "rows", "value"]);
|
|
1700
1739
|
return (React.createElement(FormTextField, __assign({ ref: ref, className: classNames(className, 'FormTextarea'), clear: clear, rows: rows, value: value }, props, { multiline: true })));
|
|
1701
1740
|
});
|
|
@@ -2016,12 +2055,17 @@ function checkDateAvailable(date, availableDate, type, time) {
|
|
|
2016
2055
|
}
|
|
2017
2056
|
function AutoTypeForwardRef(render) {
|
|
2018
2057
|
return React.forwardRef(render);
|
|
2019
|
-
}var
|
|
2020
|
-
styleInject(css_248z$f);var FormSelect = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a, ref) {
|
|
2058
|
+
}var FormSelect = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a, ref) {
|
|
2021
2059
|
/********************************************************************************************************************
|
|
2022
2060
|
* type
|
|
2023
2061
|
* ******************************************************************************************************************/
|
|
2024
|
-
var className = _a.className, name = _a.name, initItems = _a.items, initFullWidth = _a.fullWidth, onLoadItems = _a.onLoadItems, readOnly = _a.readOnly, multiple = _a.multiple, checkbox = _a.checkbox, placeholder = _a.placeholder, initStartAdornment = _a.startAdornment, initValue = _a.value,
|
|
2062
|
+
var className = _a.className, name = _a.name, initItems = _a.items, initFullWidth = _a.fullWidth, onLoadItems = _a.onLoadItems, readOnly = _a.readOnly, multiple = _a.multiple, checkbox = _a.checkbox, placeholder = _a.placeholder, initStartAdornment = _a.startAdornment, initValue = _a.value, initSlotProps = _a.slotProps,
|
|
2063
|
+
// InputLabelProps: initInputLabelProps,
|
|
2064
|
+
// SelectProps: initSelectProps,
|
|
2065
|
+
_b = _a.formValueSeparator,
|
|
2066
|
+
// InputLabelProps: initInputLabelProps,
|
|
2067
|
+
// SelectProps: initSelectProps,
|
|
2068
|
+
formValueSeparator = _b === void 0 ? ',' : _b, formValueSort = _a.formValueSort, width = _a.width, _c = _a.minWidth, minWidth = _c === void 0 ? 120 : _c, initLoading = _a.loading, onChange = _a.onChange, onValue = _a.onValue, props = __rest(_a, ["className", "name", "items", "fullWidth", "onLoadItems", "readOnly", "multiple", "checkbox", "placeholder", "startAdornment", "value", "slotProps", "formValueSeparator", "formValueSort", "width", "minWidth", "loading", "onChange", "onValue"]);
|
|
2025
2069
|
/********************************************************************************************************************
|
|
2026
2070
|
* FormState
|
|
2027
2071
|
* ******************************************************************************************************************/
|
|
@@ -2086,17 +2130,6 @@ styleInject(css_248z$f);var FormSelect = ToForwardRefExoticComponent(AutoTypeFor
|
|
|
2086
2130
|
return {};
|
|
2087
2131
|
}
|
|
2088
2132
|
}, [items]);
|
|
2089
|
-
/********************************************************************************************************************
|
|
2090
|
-
* inputLabelProps
|
|
2091
|
-
* ******************************************************************************************************************/
|
|
2092
|
-
var inputLabelProps = React.useMemo(function () {
|
|
2093
|
-
if (hasEmptyValue || (!hasEmptyValue && placeholder)) {
|
|
2094
|
-
return __assign(__assign({}, initInputLabelProps), { shrink: true });
|
|
2095
|
-
}
|
|
2096
|
-
else {
|
|
2097
|
-
return initInputLabelProps;
|
|
2098
|
-
}
|
|
2099
|
-
}, [hasEmptyValue, initInputLabelProps, placeholder]);
|
|
2100
2133
|
/********************************************************************************************************************
|
|
2101
2134
|
* Function - getFinalValue
|
|
2102
2135
|
* ******************************************************************************************************************/
|
|
@@ -2177,34 +2210,9 @@ styleInject(css_248z$f);var FormSelect = ToForwardRefExoticComponent(AutoTypeFor
|
|
|
2177
2210
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2178
2211
|
}, []);
|
|
2179
2212
|
/********************************************************************************************************************
|
|
2180
|
-
*
|
|
2213
|
+
* Variable
|
|
2181
2214
|
* ******************************************************************************************************************/
|
|
2182
2215
|
var isSelectedPlaceholder = util.notEmpty(items) && util.empty(value) && !!placeholder && !hasEmptyValue;
|
|
2183
|
-
var selectProps = React.useMemo(function () {
|
|
2184
|
-
var _a;
|
|
2185
|
-
var finalSelectProps = __assign(__assign({}, initSelectProps), { displayEmpty: true, multiple: !!multiple, value: value });
|
|
2186
|
-
if (multiple) {
|
|
2187
|
-
finalSelectProps.renderValue = function (selected) {
|
|
2188
|
-
if (isSelectedPlaceholder) {
|
|
2189
|
-
return placeholder;
|
|
2190
|
-
}
|
|
2191
|
-
else {
|
|
2192
|
-
return (React.createElement(material.Box, { className: 'selected-list', sx: { display: 'flex', flexWrap: 'wrap', gap: 0.5 } }, Array.isArray(selected) &&
|
|
2193
|
-
selected.map(function (selectedValue) {
|
|
2194
|
-
if (isSelectedPlaceholder) {
|
|
2195
|
-
return React.createElement(material.Chip, { key: selectedValue || '$$$EmptyValuePlaceholder$$$', label: 'hahaha', size: 'small' });
|
|
2196
|
-
}
|
|
2197
|
-
else {
|
|
2198
|
-
return React.createElement(material.Chip, { key: selectedValue, label: itemValueLabels["".concat(selectedValue)], size: 'small' });
|
|
2199
|
-
}
|
|
2200
|
-
})));
|
|
2201
|
-
}
|
|
2202
|
-
};
|
|
2203
|
-
}
|
|
2204
|
-
finalSelectProps.style = __assign(__assign({}, finalSelectProps.style), { minWidth: width || minWidth });
|
|
2205
|
-
finalSelectProps.MenuProps = __assign(__assign({}, finalSelectProps.MenuProps), { className: classNames((_a = finalSelectProps.MenuProps) === null || _a === void 0 ? void 0 : _a.className, 'FormSelect-Menu-Popover') });
|
|
2206
|
-
return finalSelectProps;
|
|
2207
|
-
}, [initSelectProps, isSelectedPlaceholder, itemValueLabels, minWidth, multiple, placeholder, value, width]);
|
|
2208
2216
|
/********************************************************************************************************************
|
|
2209
2217
|
* Function - getExtraCommands
|
|
2210
2218
|
* ******************************************************************************************************************/
|
|
@@ -2262,6 +2270,35 @@ styleInject(css_248z$f);var FormSelect = ToForwardRefExoticComponent(AutoTypeFor
|
|
|
2262
2270
|
/********************************************************************************************************************
|
|
2263
2271
|
* Render
|
|
2264
2272
|
* ******************************************************************************************************************/
|
|
2273
|
+
var selectProps = React.useMemo(function () {
|
|
2274
|
+
var _a;
|
|
2275
|
+
var finalSelectProps = {
|
|
2276
|
+
displayEmpty: true,
|
|
2277
|
+
multiple: !!multiple,
|
|
2278
|
+
value: value,
|
|
2279
|
+
};
|
|
2280
|
+
if (multiple) {
|
|
2281
|
+
finalSelectProps.renderValue = function (selected) {
|
|
2282
|
+
if (isSelectedPlaceholder) {
|
|
2283
|
+
return placeholder;
|
|
2284
|
+
}
|
|
2285
|
+
else {
|
|
2286
|
+
return (React.createElement(material.Box, { className: 'selected-list', sx: { display: 'flex', flexWrap: 'wrap', gap: 0.5 } }, Array.isArray(selected) &&
|
|
2287
|
+
selected.map(function (selectedValue) {
|
|
2288
|
+
if (isSelectedPlaceholder) {
|
|
2289
|
+
return React.createElement(material.Chip, { key: selectedValue || '$$$EmptyValuePlaceholder$$$', label: 'hahaha', size: 'small' });
|
|
2290
|
+
}
|
|
2291
|
+
else {
|
|
2292
|
+
return React.createElement(material.Chip, { key: selectedValue, label: itemValueLabels["".concat(selectedValue)], size: 'small' });
|
|
2293
|
+
}
|
|
2294
|
+
})));
|
|
2295
|
+
}
|
|
2296
|
+
};
|
|
2297
|
+
}
|
|
2298
|
+
finalSelectProps.style = __assign(__assign({}, finalSelectProps.style), { minWidth: width || minWidth });
|
|
2299
|
+
finalSelectProps.MenuProps = __assign(__assign({}, finalSelectProps.MenuProps), { className: classNames((_a = finalSelectProps.MenuProps) === null || _a === void 0 ? void 0 : _a.className, 'FormSelect-Menu-Popover') });
|
|
2300
|
+
return finalSelectProps;
|
|
2301
|
+
}, [isSelectedPlaceholder, itemValueLabels, minWidth, multiple, placeholder, value, width]);
|
|
2265
2302
|
var finalValue = React.useMemo(function () {
|
|
2266
2303
|
var newFinalValue;
|
|
2267
2304
|
if (util.notEmpty(items)) {
|
|
@@ -2290,8 +2327,18 @@ styleInject(css_248z$f);var FormSelect = ToForwardRefExoticComponent(AutoTypeFor
|
|
|
2290
2327
|
}
|
|
2291
2328
|
return newFinalValue;
|
|
2292
2329
|
}, [emptyValue, items, multiple, selectProps, value]);
|
|
2330
|
+
var slotProps = React.useMemo(function () {
|
|
2331
|
+
var inputLabelAdditionalProps = {};
|
|
2332
|
+
if (hasEmptyValue || (!hasEmptyValue && placeholder)) {
|
|
2333
|
+
inputLabelAdditionalProps.shrink = true;
|
|
2334
|
+
}
|
|
2335
|
+
return {
|
|
2336
|
+
inputLabel: __assign(__assign({}, initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.inputLabel), inputLabelAdditionalProps),
|
|
2337
|
+
select: __assign(__assign({}, initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.select), selectProps),
|
|
2338
|
+
};
|
|
2339
|
+
}, [hasEmptyValue, initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.inputLabel, initSlotProps === null || initSlotProps === void 0 ? void 0 : initSlotProps.select, placeholder, selectProps]);
|
|
2293
2340
|
return (React.createElement(FormContextProvider, { value: __assign(__assign({}, otherFormState), { fullWidth: formFullWidth, onAddValueItem: handleAddValueItem, onValueChange: function () { } }) },
|
|
2294
|
-
React.createElement(FormTextField, __assign({ select: true, ref: handleRef, name: name, className: classNames(className, 'FormSelect', isSelectedPlaceholder && 'is-selected-placeholder'), fullWidth: fullWidth }, props, { startAdornment: startAdornment, value: finalValue, clear: false, readOnly: readOnly || util.empty(items),
|
|
2341
|
+
React.createElement(FormTextField, __assign({ select: true, ref: handleRef, name: name, className: classNames(className, 'FormSelect', isSelectedPlaceholder && 'is-selected-placeholder'), fullWidth: fullWidth }, props, { startAdornment: startAdornment, value: finalValue, clear: false, readOnly: readOnly || util.empty(items), slotProps: slotProps, onChange: handleChange, onValue: handleValue }),
|
|
2295
2342
|
isSelectedPlaceholder && (React.createElement(material.MenuItem, { key: '$$$EmptyValuePlaceholder$$$', value: '', disabled: true, sx: { display: 'none' } }, placeholder)),
|
|
2296
2343
|
items && util.notEmpty(items) ? (items.map(function (_a) {
|
|
2297
2344
|
var itemLabel = _a.label, itemValue = _a.value, disabled = _a.disabled;
|
|
@@ -2362,20 +2409,15 @@ FormCompanyNo.displayName = 'FormCompanyNo';var FormPersonalNo = React.forwardRe
|
|
|
2362
2409
|
* ******************************************************************************************************************/
|
|
2363
2410
|
return (React.createElement(FormText, __assign({ ref: ref, className: classNames(className, 'FormPersonalNo'), maxLength: 14, validPattern: validPattern, onValue: handleValue, onValidate: handleValidate }, props)));
|
|
2364
2411
|
});
|
|
2365
|
-
FormPersonalNo.displayName = 'FormPersonalNo';var
|
|
2366
|
-
styleInject(css_248z$e);var FormItemBase = React.forwardRef(function (_a, ref) {
|
|
2412
|
+
FormPersonalNo.displayName = 'FormPersonalNo';var FormItemBase = React.forwardRef(function (_a, ref) {
|
|
2367
2413
|
/********************************************************************************************************************
|
|
2368
|
-
*
|
|
2414
|
+
* FormState
|
|
2369
2415
|
* ******************************************************************************************************************/
|
|
2370
2416
|
var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFullWidth = _a.fullWidth,
|
|
2371
2417
|
//----------------------------------------------------------------------------------------------------------------
|
|
2372
2418
|
control = _a.control, controlHeight = _a.controlHeight, controlSingleHeight = _a.controlSingleHeight, controlVerticalCenter = _a.controlVerticalCenter, controlContainerStyle = _a.controlContainerStyle, required = _a.required, labelIcon = _a.labelIcon, label = _a.label, focused = _a.focused, helperText = _a.helperText, helperTextProps = _a.helperTextProps, error = _a.error, hideLabel = _a.hideLabel, hidden = _a.hidden, autoSize = _a.autoSize,
|
|
2373
2419
|
//----------------------------------------------------------------------------------------------------------------
|
|
2374
2420
|
className = _a.className, style = _a.style, sx = _a.sx;
|
|
2375
|
-
var inputRef = React.useRef(null);
|
|
2376
|
-
/********************************************************************************************************************
|
|
2377
|
-
* FormState
|
|
2378
|
-
* ******************************************************************************************************************/
|
|
2379
2421
|
var _b = useFormState(), formVariant = _b.variant, formSize = _b.size, formColor = _b.color, formFullWidth = _b.fullWidth, formColWithLabel = _b.formColWithLabel, formColWithHelperText = _b.formColWithHelperText;
|
|
2380
2422
|
/********************************************************************************************************************
|
|
2381
2423
|
* Memo - FormState
|
|
@@ -2387,16 +2429,8 @@ styleInject(css_248z$e);var FormItemBase = React.forwardRef(function (_a, ref) {
|
|
|
2387
2429
|
/********************************************************************************************************************
|
|
2388
2430
|
* State - inputHeight
|
|
2389
2431
|
* ******************************************************************************************************************/
|
|
2390
|
-
var _c =
|
|
2391
|
-
|
|
2392
|
-
targetRef: inputRef,
|
|
2393
|
-
handleWidth: false,
|
|
2394
|
-
handleHeight: true,
|
|
2395
|
-
onResize: function () {
|
|
2396
|
-
var _a, _b;
|
|
2397
|
-
setInputHeight(((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height) || 0);
|
|
2398
|
-
},
|
|
2399
|
-
});
|
|
2432
|
+
var _c = reactResizeDetector.useResizeDetector({ handleWidth: false }), inputRef = _c.ref, resizedInputHeight = _c.height;
|
|
2433
|
+
var inputHeight = util.ifUndefined(resizedInputHeight, 0);
|
|
2400
2434
|
/********************************************************************************************************************
|
|
2401
2435
|
* Memo
|
|
2402
2436
|
* ******************************************************************************************************************/
|
|
@@ -2467,7 +2501,7 @@ styleInject(css_248z$e);var FormItemBase = React.forwardRef(function (_a, ref) {
|
|
|
2467
2501
|
* ******************************************************************************************************************/
|
|
2468
2502
|
return (React.createElement("div", { style: wrapStyle },
|
|
2469
2503
|
React.createElement(material.FormControl, { ref: ref, variant: 'standard', className: classNames(className, 'FormItemBase', !!label && 'with-label', "variant-".concat(variant), controlVerticalCenter && 'control-vertical-center', !!error && 'error'), style: style, color: color, error: error, focused: focused, sx: sx },
|
|
2470
|
-
!formColWithLabel && label && (React.createElement(material.InputLabel, { shrink: true, className: 'FormItemBase-InputLabel', size: size
|
|
2504
|
+
!formColWithLabel && label && (React.createElement(material.InputLabel, { shrink: true, className: 'FormItemBase-InputLabel', size: size, required: required }, labelIcon ? (React.createElement(React.Fragment, null,
|
|
2471
2505
|
React.createElement(reactComponent.PdgIcon, { style: { verticalAlign: 'middle', marginRight: 3, marginTop: -4, marginBottom: -2 } }, labelIcon),
|
|
2472
2506
|
React.createElement("span", { style: { verticalAlign: 'middle' } }, label))) : (label))),
|
|
2473
2507
|
React.createElement("div", { className: 'FormItemBase-Control-wrap', style: __assign({ display: 'grid', marginTop: hideLabel ? 0 : undefined }, controlContainerStyle) }, autoSize ? (React.createElement(React.Fragment, null,
|
|
@@ -2520,15 +2554,10 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React.forwardRef(fu
|
|
|
2520
2554
|
* ******************************************************************************************************************/
|
|
2521
2555
|
var inputRef = React.useRef(null);
|
|
2522
2556
|
var actionRef = React.useRef(null);
|
|
2523
|
-
var labelRef = React.useRef(null);
|
|
2524
2557
|
/********************************************************************************************************************
|
|
2525
2558
|
* ResizeDetector
|
|
2526
2559
|
* ******************************************************************************************************************/
|
|
2527
|
-
var _f = reactResizeDetector.useResizeDetector(
|
|
2528
|
-
targetRef: labelRef,
|
|
2529
|
-
handleWidth: true,
|
|
2530
|
-
handleHeight: true,
|
|
2531
|
-
}), width = _f.width, height = _f.height;
|
|
2560
|
+
var _f = reactResizeDetector.useResizeDetector(), labelRef = _f.ref, width = _f.width, height = _f.height;
|
|
2532
2561
|
/********************************************************************************************************************
|
|
2533
2562
|
* State
|
|
2534
2563
|
* ******************************************************************************************************************/
|
|
@@ -3011,8 +3040,7 @@ var FormRadioGroup = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a
|
|
|
3011
3040
|
}, value: value, disabled: disabled || readOnly || itemDisabled }));
|
|
3012
3041
|
})))))) }));
|
|
3013
3042
|
}));
|
|
3014
|
-
FormRadioGroup.displayName = 'FormRadioGroup';var
|
|
3015
|
-
styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a, ref) {
|
|
3043
|
+
FormRadioGroup.displayName = 'FormRadioGroup';var FormToggleButtonGroup = ToForwardRefExoticComponent(AutoTypeForwardRef(function (_a, ref) {
|
|
3016
3044
|
/********************************************************************************************************************
|
|
3017
3045
|
* type
|
|
3018
3046
|
* ******************************************************************************************************************/
|
|
@@ -3028,13 +3056,6 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
|
|
|
3028
3056
|
* ******************************************************************************************************************/
|
|
3029
3057
|
var id = React.useId();
|
|
3030
3058
|
var labelId = React.useId();
|
|
3031
|
-
/********************************************************************************************************************
|
|
3032
|
-
* Ref
|
|
3033
|
-
* ******************************************************************************************************************/
|
|
3034
|
-
var refForResizeWidthDetect = React.useRef(null);
|
|
3035
|
-
var refForButtonResizeHeightDetect = React.useRef(null);
|
|
3036
|
-
var refForButtonsResizeHeightDetect = React.useRef(null);
|
|
3037
|
-
var refForLoadingResizeHeightDetect = React.useRef(null);
|
|
3038
3059
|
/********************************************************************************************************************
|
|
3039
3060
|
* FormState
|
|
3040
3061
|
* ******************************************************************************************************************/
|
|
@@ -3057,55 +3078,25 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
|
|
|
3057
3078
|
/********************************************************************************************************************
|
|
3058
3079
|
* State - width (ResizeDetector)
|
|
3059
3080
|
* ******************************************************************************************************************/
|
|
3060
|
-
var _f =
|
|
3061
|
-
reactResizeDetector.useResizeDetector({
|
|
3062
|
-
targetRef: refForResizeWidthDetect,
|
|
3063
|
-
handleWidth: true,
|
|
3064
|
-
onResize: function () {
|
|
3065
|
-
var _a, _b;
|
|
3066
|
-
setWidth((_b = (_a = refForResizeWidthDetect.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width);
|
|
3067
|
-
},
|
|
3068
|
-
});
|
|
3081
|
+
var _f = reactResizeDetector.useResizeDetector({ handleHeight: false }), refForResizeWidthDetect = _f.ref, width = _f.width;
|
|
3069
3082
|
/********************************************************************************************************************
|
|
3070
3083
|
* State - height (ResizeDetector)
|
|
3071
3084
|
* ******************************************************************************************************************/
|
|
3072
|
-
var _g =
|
|
3073
|
-
var _h =
|
|
3074
|
-
reactResizeDetector.useResizeDetector({
|
|
3075
|
-
|
|
3076
|
-
handleHeight: true,
|
|
3077
|
-
onResize: function () {
|
|
3078
|
-
var _a, _b;
|
|
3079
|
-
setHeight((_b = (_a = refForButtonResizeHeightDetect.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height);
|
|
3080
|
-
},
|
|
3081
|
-
});
|
|
3082
|
-
reactResizeDetector.useResizeDetector({
|
|
3083
|
-
targetRef: refForButtonsResizeHeightDetect,
|
|
3084
|
-
handleHeight: true,
|
|
3085
|
-
onResize: function () {
|
|
3086
|
-
var _a, _b;
|
|
3087
|
-
setRealHeight((_b = (_a = refForButtonsResizeHeightDetect.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height);
|
|
3088
|
-
},
|
|
3089
|
-
});
|
|
3090
|
-
reactResizeDetector.useResizeDetector({
|
|
3091
|
-
targetRef: refForLoadingResizeHeightDetect,
|
|
3092
|
-
handleHeight: true,
|
|
3093
|
-
onResize: function () {
|
|
3094
|
-
var _a, _b;
|
|
3095
|
-
setHeight((_b = (_a = refForLoadingResizeHeightDetect.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height);
|
|
3096
|
-
},
|
|
3097
|
-
});
|
|
3085
|
+
var _g = reactResizeDetector.useResizeDetector({ handleWidth: false }), refForButtonResizeHeightDetect = _g.ref, buttonHeight = _g.height;
|
|
3086
|
+
var _h = reactResizeDetector.useResizeDetector({ handleWidth: false }), refForButtonsResizeHeightDetect = _h.ref, realHeight = _h.height;
|
|
3087
|
+
var _j = reactResizeDetector.useResizeDetector({ handleWidth: false }), refForLoadingResizeHeightDetect = _j.ref, loadingHeight = _j.height;
|
|
3088
|
+
var height = util.ifUndefined(buttonHeight, loadingHeight);
|
|
3098
3089
|
/********************************************************************************************************************
|
|
3099
3090
|
* State
|
|
3100
3091
|
* ******************************************************************************************************************/
|
|
3101
|
-
var
|
|
3102
|
-
var
|
|
3103
|
-
var
|
|
3104
|
-
var
|
|
3105
|
-
var
|
|
3106
|
-
var
|
|
3107
|
-
var
|
|
3108
|
-
var
|
|
3092
|
+
var _k = React.useState(false), isOnGetItemLoading = _k[0], setIsOnGetItemLoading = _k[1];
|
|
3093
|
+
var _l = reactHook.useAutoUpdateState(initError), error = _l[0], setError = _l[1];
|
|
3094
|
+
var _m = React.useState(), errorHelperText = _m[0], setErrorHelperText = _m[1];
|
|
3095
|
+
var _o = reactHook.useAutoUpdateRefState(initData), dataRef = _o[0], setData = _o[2];
|
|
3096
|
+
var _p = reactHook.useAutoUpdateRefState(React.useMemo(function () { return (initDisabled == null ? formDisabled : initDisabled); }, [initDisabled, formDisabled])), disabledRef = _p[0], disabled = _p[1], setDisabled = _p[2];
|
|
3097
|
+
var _q = reactHook.useAutoUpdateRefState(initHidden), hiddenRef = _q[0], hidden = _q[1], setHidden = _q[2];
|
|
3098
|
+
var _r = reactHook.useAutoUpdateRefState(initLoading), loadingRef = _r[0], loading = _r[1], setLoading = _r[2];
|
|
3099
|
+
var _s = reactHook.useAutoUpdateRefState(initItems), itemsRef = _s[0], items = _s[1], setItems = _s[2];
|
|
3109
3100
|
/********************************************************************************************************************
|
|
3110
3101
|
* Memo
|
|
3111
3102
|
* ******************************************************************************************************************/
|
|
@@ -3220,7 +3211,7 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
|
|
|
3220
3211
|
finalValue = onValue ? onValue(finalValue) : finalValue;
|
|
3221
3212
|
return util.equal(value, finalValue) ? value : finalValue;
|
|
3222
3213
|
}, [multiple, formValueSeparator, itemsValues, onValue]);
|
|
3223
|
-
var
|
|
3214
|
+
var _t = reactHook.useAutoUpdateRefState(initValue, getFinalValue), valueRef = _t[0], value = _t[1], setValue = _t[2];
|
|
3224
3215
|
reactHook.useFirstSkipEffect(function () {
|
|
3225
3216
|
if (error)
|
|
3226
3217
|
validate(value);
|
|
@@ -3422,7 +3413,11 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
|
|
|
3422
3413
|
return (items &&
|
|
3423
3414
|
items.map(function (_a, idx) {
|
|
3424
3415
|
var value = _a.value, label = _a.label, itemDisabled = _a.disabled, itemColor = _a.color;
|
|
3425
|
-
return (React.createElement(material.ToggleButton, { ref:
|
|
3416
|
+
return (React.createElement(material.ToggleButton, { ref: function (ref) {
|
|
3417
|
+
if (idx === 0) {
|
|
3418
|
+
refForButtonResizeHeightDetect.current = ref;
|
|
3419
|
+
}
|
|
3420
|
+
}, key: idx, size: size, className: 'ToggleButton', value: value, color: itemColor || color, disabled: disabled || readOnly || itemDisabled, style: buttonStyle, onFocus: function () { return setFocused(initFocused || true); }, onBlur: function () { return setFocused(initFocused || false); } },
|
|
3426
3421
|
type === 'checkbox' ? (React.createElement(React.Fragment, null,
|
|
3427
3422
|
React.createElement(material.Icon, { className: '__checkbox-unchecked__' }, "check_box_outline_blank"),
|
|
3428
3423
|
React.createElement(material.Icon, { className: '__checkbox-checked__' }, "check_box"))) : (type === 'radio' && (React.createElement(React.Fragment, null,
|
|
@@ -3440,6 +3435,7 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
|
|
|
3440
3435
|
itemWidth,
|
|
3441
3436
|
items,
|
|
3442
3437
|
readOnly,
|
|
3438
|
+
refForButtonResizeHeightDetect,
|
|
3443
3439
|
setFocused,
|
|
3444
3440
|
size,
|
|
3445
3441
|
theme.palette.error.main,
|
|
@@ -3447,7 +3443,7 @@ styleInject(css_248z$d);var FormToggleButtonGroup = ToForwardRefExoticComponent(
|
|
|
3447
3443
|
]);
|
|
3448
3444
|
var controlHeight = height || 0;
|
|
3449
3445
|
var isMultiline = controlHeight <= util.ifUndefined(realHeight, 0);
|
|
3450
|
-
return (React.createElement(FormItemBase, __assign({}, formControlBaseProps, { className: classNames(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: realHeight ? realHeight + (isMultiline ? 13 : 0) : controlHeight, controlVerticalCenter: isMultiline ? false : isOnGetItemLoading || loading, control: isOnGetItemLoading || loading ? (React.createElement("div", { style: { opacity: 0.54 }, ref: refForLoadingResizeHeightDetect },
|
|
3446
|
+
return (React.createElement(FormItemBase, __assign({}, formControlBaseProps, { className: classNames(className, 'FormValueItem', 'FormToggleButtonGroup', "variant-".concat(variant), "size-".concat(size), !!label && 'with-label', !!fullWidth && 'full-width', "type-".concat(type), (isOnGetItemLoading || loading) && 'loading'), 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: realHeight ? realHeight + (isMultiline ? 13 : 0) : controlHeight, controlVerticalCenter: isMultiline ? false : isOnGetItemLoading || loading, control: isOnGetItemLoading || loading ? (React.createElement("div", { style: { opacity: 0.54 }, ref: refForLoadingResizeHeightDetect },
|
|
3451
3447
|
React.createElement(material.CircularProgress, { size: 16, color: 'inherit' }))) : (React.createElement(React.Fragment, null,
|
|
3452
3448
|
!fullWidth && !isOnGetItemLoading && !loading && items && (React.createElement("div", { ref: refForResizeWidthDetect, style: {
|
|
3453
3449
|
display: 'grid',
|
|
@@ -3494,8 +3490,7 @@ FormToggleButtonGroup.displayName = 'FormToggleButtonGroup';var FormRating = Rea
|
|
|
3494
3490
|
/********************************************************************************************************************
|
|
3495
3491
|
* Ref
|
|
3496
3492
|
* ******************************************************************************************************************/
|
|
3497
|
-
var
|
|
3498
|
-
var inputRef = React.useRef();
|
|
3493
|
+
var inputRef = React.useRef(undefined);
|
|
3499
3494
|
/********************************************************************************************************************
|
|
3500
3495
|
* State
|
|
3501
3496
|
* ******************************************************************************************************************/
|
|
@@ -3507,11 +3502,7 @@ FormToggleButtonGroup.displayName = 'FormToggleButtonGroup';var FormRating = Rea
|
|
|
3507
3502
|
/********************************************************************************************************************
|
|
3508
3503
|
* State - width, height
|
|
3509
3504
|
* ******************************************************************************************************************/
|
|
3510
|
-
var _l = reactResizeDetector.useResizeDetector(
|
|
3511
|
-
targetRef: ratingRef,
|
|
3512
|
-
handleWidth: true,
|
|
3513
|
-
handleHeight: true,
|
|
3514
|
-
}), width = _l.width, height = _l.height;
|
|
3505
|
+
var _l = reactResizeDetector.useResizeDetector(), ratingRef = _l.ref, width = _l.width, height = _l.height;
|
|
3515
3506
|
/********************************************************************************************************************
|
|
3516
3507
|
* Function
|
|
3517
3508
|
* ******************************************************************************************************************/
|
|
@@ -3655,8 +3646,7 @@ FormToggleButtonGroup.displayName = 'FormToggleButtonGroup';var FormRating = Rea
|
|
|
3655
3646
|
* ******************************************************************************************************************/
|
|
3656
3647
|
return (React.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames(className, 'FormValueItem', 'FormRating'), labelIcon: labelIcon, label: label, error: error, fullWidth: false, required: required, helperText: error ? errorHelperText : helperText, helperTextProps: { style: { marginLeft: 5 } }, style: __assign({ width: width || 100 }, initStyle), sx: sx, hidden: hidden, autoSize: true, controlHeight: height || (size === 'small' ? 21 : 26), controlVerticalCenter: true, control: React.createElement(material.Rating, { ref: ratingRef, size: size === 'medium' ? 'large' : 'medium', name: name, precision: precision, highlightSelectedOnly: highlightSelectedOnly, value: value, disabled: disabled || readOnly, max: max, icon: React.createElement(reactComponent.PdgIcon, { color: color, size: 'inherit' }, icon ? icon : 'Star'), emptyIcon: React.createElement(reactComponent.PdgIcon, { size: 'inherit' }, emptyIcon ? emptyIcon : 'StarBorder'), onChange: handleChange, onFocus: function () { return setFocused(initFocused || true); }, onBlur: function () { return setFocused(initFocused || false); } }) }));
|
|
3657
3648
|
});
|
|
3658
|
-
FormRating.displayName = 'FormRating';var
|
|
3659
|
-
styleInject(css_248z$c);var getFinalValue$8 = function (value) {
|
|
3649
|
+
FormRating.displayName = 'FormRating';var getFinalValue$8 = function (value) {
|
|
3660
3650
|
return value || '';
|
|
3661
3651
|
};var FormTextEditor = React.forwardRef(function (_a, ref) {
|
|
3662
3652
|
/********************************************************************************************************************
|
|
@@ -3691,7 +3681,7 @@ styleInject(css_248z$c);var getFinalValue$8 = function (value) {
|
|
|
3691
3681
|
/********************************************************************************************************************
|
|
3692
3682
|
* Ref
|
|
3693
3683
|
* ******************************************************************************************************************/
|
|
3694
|
-
var editorRef = React.useRef();
|
|
3684
|
+
var editorRef = React.useRef(null);
|
|
3695
3685
|
var keyDownTime = React.useRef(0);
|
|
3696
3686
|
/********************************************************************************************************************
|
|
3697
3687
|
* State
|
|
@@ -3713,8 +3703,8 @@ styleInject(css_248z$c);var getFinalValue$8 = function (value) {
|
|
|
3713
3703
|
* Function - validate
|
|
3714
3704
|
* ******************************************************************************************************************/
|
|
3715
3705
|
var validate = React.useCallback(function (value) {
|
|
3716
|
-
var _a;
|
|
3717
|
-
if (required && util.empty((_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getContent())) {
|
|
3706
|
+
var _a, _b;
|
|
3707
|
+
if (required && util.empty((_b = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.editor()) === null || _b === void 0 ? void 0 : _b.getContent())) {
|
|
3718
3708
|
setErrorErrorHelperText(true, '필수 입력 항목입니다.');
|
|
3719
3709
|
return false;
|
|
3720
3710
|
}
|
|
@@ -3743,8 +3733,8 @@ styleInject(css_248z$c);var getFinalValue$8 = function (value) {
|
|
|
3743
3733
|
* Function - focus
|
|
3744
3734
|
* ******************************************************************************************************************/
|
|
3745
3735
|
var focus = React.useCallback(function () {
|
|
3746
|
-
var _a;
|
|
3747
|
-
(_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3736
|
+
var _a, _b;
|
|
3737
|
+
(_b = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.editor()) === null || _b === void 0 ? void 0 : _b.focus();
|
|
3748
3738
|
}, [editorRef]);
|
|
3749
3739
|
/********************************************************************************************************************
|
|
3750
3740
|
* Commands
|
|
@@ -3846,7 +3836,7 @@ styleInject(css_248z$c);var getFinalValue$8 = function (value) {
|
|
|
3846
3836
|
React.createElement(tinymceReact.Editor, { apiKey: apiKey, value: value, disabled: readOnly || disabled, init: {
|
|
3847
3837
|
height: height,
|
|
3848
3838
|
menubar: menubar,
|
|
3849
|
-
|
|
3839
|
+
disabled: true,
|
|
3850
3840
|
language: 'ko_KR',
|
|
3851
3841
|
contextmenu: false,
|
|
3852
3842
|
content_style: 'body {font-size: 0.875rem; font-weight: 400; line-height: 1.5; color: hsl(0,0%,20%);} p {padding:0; margin:0}',
|
|
@@ -4357,14 +4347,24 @@ FormTextEditor.displayName = 'FormTextEditor';var FormAutocomplete = ToForwardRe
|
|
|
4357
4347
|
else if (reason === 'reset') {
|
|
4358
4348
|
setInputValue(undefined);
|
|
4359
4349
|
}
|
|
4360
|
-
},
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4350
|
+
}, renderValue: function (value, getItemProps) {
|
|
4351
|
+
if (Array.isArray(value)) {
|
|
4352
|
+
return value.map(function (option, index) { return (React.createElement(material.Chip, __assign({ size: 'small', label: onRenderTag ? onRenderTag(option) : option.label }, getItemProps({ index: index })))); });
|
|
4353
|
+
}
|
|
4354
|
+
else {
|
|
4355
|
+
return (React.createElement(material.Chip, __assign({ size: 'small', label: onRenderTag ? onRenderTag(value) : value.label }, getItemProps({ index: 0 }))));
|
|
4356
|
+
}
|
|
4357
|
+
}, renderInput: function (params) {
|
|
4358
|
+
var slotProps = {
|
|
4359
|
+
input: __assign(__assign({}, params.InputProps), { endAdornment: (React.createElement(React.Fragment, null,
|
|
4360
|
+
loading || isOnGetItemLoading ? React.createElement(material.CircularProgress, { color: 'inherit', size: 20 }) : null,
|
|
4361
|
+
params.InputProps.endAdornment)) }),
|
|
4362
|
+
htmlInput: __assign(__assign({}, params.inputProps), { tabIndex: readOnly || disabled ? -1 : undefined }),
|
|
4363
|
+
};
|
|
4364
|
+
return (React.createElement(FormTextField, __assign({}, params, { ref: textFieldRef, name: name, variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, labelShrink: labelShrink, required: required, focused: focused, error: error, readOnly: readOnly, helperText: error ? errorHelperText : helperText, slotProps: slotProps, placeholder: placeholder, noFormValueItem: true })));
|
|
4365
|
+
} }));
|
|
4365
4366
|
}));
|
|
4366
|
-
FormAutocomplete.displayName = 'FormAutocomplete';var
|
|
4367
|
-
styleInject(css_248z$b);var PrivateToggleButton = React.forwardRef(function (_a, ref) {
|
|
4367
|
+
FormAutocomplete.displayName = 'FormAutocomplete';var PrivateToggleButton = React.forwardRef(function (_a, ref) {
|
|
4368
4368
|
/********************************************************************************************************************
|
|
4369
4369
|
* Use
|
|
4370
4370
|
* ******************************************************************************************************************/
|
|
@@ -4449,11 +4449,10 @@ var PrivateYearSelect = function (_a) {
|
|
|
4449
4449
|
var isActive = y === activeYear;
|
|
4450
4450
|
var isSelected = y === selectYear;
|
|
4451
4451
|
var disabled = (!!availableDate[0] && y < availableDate[0].year) || (!!availableDate[1] && y > availableDate[1].year);
|
|
4452
|
-
return (React.createElement(material.Grid, { key: y,
|
|
4452
|
+
return (React.createElement(material.Grid, { key: y, size: { xs: 3 } },
|
|
4453
4453
|
React.createElement(PrivateToggleButton, { "data-id": y, className: "private-year-select-value-".concat(y), fullWidth: true, selected: isSelected, activated: isActive, outlined: isToday, disabled: disabled, onClick: handleClick }, y)));
|
|
4454
4454
|
})))));
|
|
4455
|
-
};var
|
|
4456
|
-
styleInject(css_248z$a);var MONTHS$1 = new Array(12).fill(0);
|
|
4455
|
+
};var MONTHS$1 = new Array(12).fill(0);
|
|
4457
4456
|
for (var i$5 = 0; i$5 < 12; i$5 += 1) {
|
|
4458
4457
|
MONTHS$1[i$5] = i$5;
|
|
4459
4458
|
}
|
|
@@ -4467,13 +4466,12 @@ var PrivateMonthSelect = function (_a) {
|
|
|
4467
4466
|
var isSelected = selectYear === year && m === selectMonth;
|
|
4468
4467
|
var ym = year * 100 + (m + 1);
|
|
4469
4468
|
var disabled = (!!availableDate[0] && ym < availableDate[0].month) || (!!availableDate[1] && ym > availableDate[1].month);
|
|
4470
|
-
return (React.createElement(material.Grid, { key: m,
|
|
4469
|
+
return (React.createElement(material.Grid, { key: m, size: { xs: 4 } },
|
|
4471
4470
|
React.createElement(PrivateToggleButton, { fullWidth: true, selected: isSelected, activated: isActive, outlined: isToday, disabled: disabled, onClick: function () { return onSelect(m); } },
|
|
4472
4471
|
m + 1,
|
|
4473
4472
|
"\uC6D4")));
|
|
4474
4473
|
}))));
|
|
4475
|
-
};var
|
|
4476
|
-
styleInject(css_248z$9);var DEFAULT_MINUTES$3 = new Array(60).fill(0);
|
|
4474
|
+
};var DEFAULT_MINUTES$3 = new Array(60).fill(0);
|
|
4477
4475
|
for (var i$4 = 0; i$4 < DEFAULT_MINUTES$3.length; i$4 += 1) {
|
|
4478
4476
|
DEFAULT_MINUTES$3[i$4] = i$4;
|
|
4479
4477
|
}
|
|
@@ -4484,7 +4482,7 @@ var PrivateTimeSelect = React.forwardRef(function (_a, ref) {
|
|
|
4484
4482
|
var list = _a.list, listInterval = _a.listInterval, unit = _a.unit, value = _a.value, _b = _a.cols, cols = _b === void 0 ? 1 : _b, disableList = _a.disableList, initOnSelect = _a.onSelect;
|
|
4485
4483
|
var containerRef = React.useRef(null);
|
|
4486
4484
|
var simpleBarRef = React.useRef(null);
|
|
4487
|
-
var scrollTimerRef = React.useRef();
|
|
4485
|
+
var scrollTimerRef = React.useRef(undefined);
|
|
4488
4486
|
var onSelectRef = reactHook.useAutoUpdateLayoutRef(initOnSelect);
|
|
4489
4487
|
/********************************************************************************************************************
|
|
4490
4488
|
* Function - scrollToValue
|
|
@@ -4588,7 +4586,7 @@ var PrivateTimeSelect = React.forwardRef(function (_a, ref) {
|
|
|
4588
4586
|
.map(function (v) {
|
|
4589
4587
|
var isSelected = v === value;
|
|
4590
4588
|
var disabled = !!disableList && disableList.includes(v);
|
|
4591
|
-
return (React.createElement(material.Grid, {
|
|
4589
|
+
return (React.createElement(material.Grid, { key: v, size: { xs: 12 / (cols || 1) } },
|
|
4592
4590
|
React.createElement(PrivateToggleButton, { "data-id": v, className: "private-time-select-value-".concat(v), fullWidth: true, disabled: disabled, selected: isSelected, onClick: handleClick },
|
|
4593
4591
|
v,
|
|
4594
4592
|
unit)));
|
|
@@ -4650,30 +4648,29 @@ var PrivateTimeSection = function (_a) {
|
|
|
4650
4648
|
/********************************************************************************************************************
|
|
4651
4649
|
* Render
|
|
4652
4650
|
* ******************************************************************************************************************/
|
|
4653
|
-
return (React.createElement(material.Grid, {
|
|
4651
|
+
return (React.createElement(material.Grid, { className: 'time' },
|
|
4654
4652
|
React.createElement(material.Grid, { container: true, direction: 'column', className: 'time-container' },
|
|
4655
|
-
React.createElement(material.Grid, {
|
|
4653
|
+
React.createElement(material.Grid, { className: 'time-title' },
|
|
4656
4654
|
time === 'hour' && (value ? value.format('HH시') : '00시'),
|
|
4657
4655
|
time === 'minute' && (value ? value.format('HH시 mm분') : '00시 00분'),
|
|
4658
4656
|
time === 'second' && (value ? value.format('HH시 mm분 ss초') : '00시 00분 00초')),
|
|
4659
|
-
React.createElement(material.Grid, {
|
|
4657
|
+
React.createElement(material.Grid, { className: 'time-select-wrap' },
|
|
4660
4658
|
React.createElement(material.Grid, { container: true, style: { height: '100%' } },
|
|
4661
|
-
React.createElement(material.Grid, {
|
|
4659
|
+
React.createElement(material.Grid, { style: { position: 'relative', width: width } },
|
|
4662
4660
|
React.createElement(PrivateTimeSelect, { ref: hourSelectRef, value: value && value.hour(), unit: '\uC2DC', list: hours, disableList: disableHours, cols: cols, onSelect: function (newValue) {
|
|
4663
4661
|
onChange('hour', value ? value.set('hour', newValue) : dayjs().startOf('date').set('hour', newValue));
|
|
4664
4662
|
} })),
|
|
4665
|
-
(time === 'minute' || time === 'second') && (React.createElement(material.Grid, {
|
|
4663
|
+
(time === 'minute' || time === 'second') && (React.createElement(material.Grid, { style: { position: 'relative', width: width } },
|
|
4666
4664
|
React.createElement(PrivateTimeSelect, { ref: minuteSelectRef, value: value && value.minute(), unit: '\uBD84', list: minutes, disableList: disableMinutes, cols: cols, listInterval: minuteInterval, onSelect: function (newValue) {
|
|
4667
4665
|
onChange('minute', value ? value.set('minute', newValue) : dayjs().startOf('date').set('minute', newValue));
|
|
4668
4666
|
} }))),
|
|
4669
|
-
time === 'second' && (React.createElement(material.Grid, {
|
|
4667
|
+
time === 'second' && (React.createElement(material.Grid, { style: { position: 'relative', width: width } },
|
|
4670
4668
|
React.createElement(PrivateTimeSelect, { ref: secondSelectRef, value: value && value.second(), unit: '\uCD08', list: seconds, disableList: disableSeconds, cols: cols, listInterval: secondInterval, onSelect: function (newValue) {
|
|
4671
4669
|
onChange('second', value ? value.set('second', newValue) : dayjs().startOf('date').set('second', newValue));
|
|
4672
4670
|
} }))))),
|
|
4673
|
-
onClose && (React.createElement(material.Grid, {
|
|
4671
|
+
onClose && (React.createElement(material.Grid, { className: 'action-buttons' },
|
|
4674
4672
|
React.createElement(material.Button, { variant: 'text', onClick: onClose }, "\uB2EB\uAE30"))))));
|
|
4675
|
-
};var
|
|
4676
|
-
styleInject(css_248z$8);var DEFAULT_HOURS$1 = new Array(24).fill(0);
|
|
4673
|
+
};var DEFAULT_HOURS$1 = new Array(24).fill(0);
|
|
4677
4674
|
for (var i$2 = 0; i$2 < DEFAULT_HOURS$1.length; i$2 += 1) {
|
|
4678
4675
|
DEFAULT_HOURS$1[i$2] = i$2;
|
|
4679
4676
|
}
|
|
@@ -4689,7 +4686,7 @@ var PrivateStaticDatePicker = React.forwardRef(function (_a, ref) {
|
|
|
4689
4686
|
/********************************************************************************************************************
|
|
4690
4687
|
* Ref
|
|
4691
4688
|
* ******************************************************************************************************************/
|
|
4692
|
-
var value = _a.value, initAvailableDate = _a.availableDate,
|
|
4689
|
+
var value = _a.value, initAvailableDate = _a.availableDate, type = _a.type, time = _a.time, _b = _a.hours, hours = _b === void 0 ? DEFAULT_HOURS$1 : _b, _c = _a.minutes, minutes = _c === void 0 ? DEFAULT_MINUTES$1 : _c, _d = _a.seconds, seconds = _d === void 0 ? DEFAULT_SECONDS$1 : _d, minuteInterval = _a.minuteInterval, secondInterval = _a.secondInterval, minDate = _a.minDate, maxDate = _a.maxDate, disablePast = _a.disablePast, disableFuture = _a.disableFuture, onChange = _a.onChange, onMonthChange = _a.onMonthChange, onClose = _a.onClose, props = __rest(_a, ["value", "availableDate", "type", "time", "hours", "minutes", "seconds", "minuteInterval", "secondInterval", "minDate", "maxDate", "disablePast", "disableFuture", "onChange", "onMonthChange", "onClose"]);
|
|
4693
4690
|
var hourSelectRef = React.useRef(null);
|
|
4694
4691
|
var minuteSelectRef = React.useRef(null);
|
|
4695
4692
|
var secondSelectRef = React.useRef(null);
|
|
@@ -4699,8 +4696,6 @@ var PrivateStaticDatePicker = React.forwardRef(function (_a, ref) {
|
|
|
4699
4696
|
var _e = React.useState(function () {
|
|
4700
4697
|
if (value)
|
|
4701
4698
|
return value;
|
|
4702
|
-
else if (defaultCalendarMonth)
|
|
4703
|
-
return defaultCalendarMonth;
|
|
4704
4699
|
else
|
|
4705
4700
|
return dayjs();
|
|
4706
4701
|
}), month = _e[0], setMonth = _e[1];
|
|
@@ -4724,8 +4719,8 @@ var PrivateStaticDatePicker = React.forwardRef(function (_a, ref) {
|
|
|
4724
4719
|
/********************************************************************************************************************
|
|
4725
4720
|
* Arrow
|
|
4726
4721
|
* ******************************************************************************************************************/
|
|
4727
|
-
var leftArrowOnClickRef = React.useRef();
|
|
4728
|
-
var rightArrowOnClickRef = React.useRef();
|
|
4722
|
+
var leftArrowOnClickRef = React.useRef(undefined);
|
|
4723
|
+
var rightArrowOnClickRef = React.useRef(undefined);
|
|
4729
4724
|
var LeftArrowButton = React.useMemo(function () {
|
|
4730
4725
|
return function (props) {
|
|
4731
4726
|
leftArrowOnClickRef.current = props.onClick;
|
|
@@ -4816,11 +4811,11 @@ var PrivateStaticDatePicker = React.forwardRef(function (_a, ref) {
|
|
|
4816
4811
|
* Render
|
|
4817
4812
|
* ******************************************************************************************************************/
|
|
4818
4813
|
return (React.createElement(material.Grid, { container: true, className: classNames('PrivateStaticDatePicker', type) },
|
|
4819
|
-
type !== 'time' && (React.createElement(material.Grid,
|
|
4814
|
+
type !== 'time' && (React.createElement(material.Grid, null,
|
|
4820
4815
|
React.createElement(material.Grid, { container: true, direction: 'column' },
|
|
4821
|
-
React.createElement(material.Grid, {
|
|
4816
|
+
React.createElement(material.Grid, { sx: { p: 2, width: '100%' } },
|
|
4822
4817
|
React.createElement(material.Grid, { container: true, className: 'month-change-arrow-wrap' },
|
|
4823
|
-
React.createElement(material.Grid, {
|
|
4818
|
+
React.createElement(material.Grid, { flex: 1, className: 'month-title-container' },
|
|
4824
4819
|
React.createElement("div", { className: 'month-title-wrap' },
|
|
4825
4820
|
React.createElement("div", { className: 'month-title' },
|
|
4826
4821
|
React.createElement(material.Button, { variant: 'text', className: yearSelectOpen ? 'active' : undefined, onClick: function () {
|
|
@@ -4846,12 +4841,12 @@ var PrivateStaticDatePicker = React.forwardRef(function (_a, ref) {
|
|
|
4846
4841
|
} },
|
|
4847
4842
|
month.format('M월'),
|
|
4848
4843
|
React.createElement(material.Icon, null, monthSelectOpen ? 'arrow_drop_up' : 'arrow_drop_down'))))),
|
|
4849
|
-
!yearSelectOpen && !monthSelectOpen && (React.createElement(material.Grid, {
|
|
4844
|
+
!yearSelectOpen && !monthSelectOpen && (React.createElement(material.Grid, { style: { textAlign: 'right' } },
|
|
4850
4845
|
React.createElement(material.IconButton, { onClick: previousMonth, sx: { mr: 1 } },
|
|
4851
4846
|
React.createElement(material.Icon, null, "keyboard_arrow_left")),
|
|
4852
4847
|
React.createElement(material.IconButton, { onClick: nextMonth },
|
|
4853
4848
|
React.createElement(material.Icon, null, "keyboard_arrow_right")))))),
|
|
4854
|
-
React.createElement(material.Grid, {
|
|
4849
|
+
React.createElement(material.Grid, { style: { position: 'relative' } },
|
|
4855
4850
|
React.createElement(xDatePickers.StaticDatePicker, __assign({}, props, { value: activeMonthValue, referenceDate: month, slots: {
|
|
4856
4851
|
previousIconButton: LeftArrowButton,
|
|
4857
4852
|
nextIconButton: RightArrowButton,
|
|
@@ -4870,7 +4865,7 @@ var PrivateStaticDatePicker = React.forwardRef(function (_a, ref) {
|
|
|
4870
4865
|
} })),
|
|
4871
4866
|
yearSelectOpen && (React.createElement(PrivateYearSelect, { selectYear: value == null ? null : value.year(), activeYear: month.year(), availableDate: availableDate, onSelect: handleYearSelect })),
|
|
4872
4867
|
monthSelectOpen && (React.createElement(PrivateMonthSelect, { year: month.year(), selectYear: value == null ? null : value.year(), selectMonth: value == null ? null : value.month(), activeMonth: month.month(), availableDate: availableDate, onSelect: handleMonthSelect }))),
|
|
4873
|
-
React.createElement(material.Grid, {
|
|
4868
|
+
React.createElement(material.Grid, { className: 'action-buttons' },
|
|
4874
4869
|
getActionButton(dayjs()
|
|
4875
4870
|
.startOf('d')
|
|
4876
4871
|
.subtract(1, 'month')
|
|
@@ -4914,8 +4909,7 @@ var PrivateStaticDatePicker = React.forwardRef(function (_a, ref) {
|
|
|
4914
4909
|
boxShadow: theme.shadows[8],
|
|
4915
4910
|
},
|
|
4916
4911
|
_b);
|
|
4917
|
-
});var
|
|
4918
|
-
styleInject(css_248z$7);var PrivateDatePicker = React.forwardRef(function (_a, ref) {
|
|
4912
|
+
});var PrivateDatePicker = React.forwardRef(function (_a, ref) {
|
|
4919
4913
|
/********************************************************************************************************************
|
|
4920
4914
|
* ID
|
|
4921
4915
|
* ******************************************************************************************************************/
|
|
@@ -4929,9 +4923,9 @@ styleInject(css_248z$7);var PrivateDatePicker = React.forwardRef(function (_a, r
|
|
|
4929
4923
|
* Ref
|
|
4930
4924
|
* ******************************************************************************************************************/
|
|
4931
4925
|
var privateStaticDatePickerRef = React.useRef(null);
|
|
4932
|
-
var textFieldInputRef = React.useRef();
|
|
4933
|
-
var closeTimeoutRef = React.useRef();
|
|
4934
|
-
var mouseDownTimeRef = React.useRef();
|
|
4926
|
+
var textFieldInputRef = React.useRef(undefined);
|
|
4927
|
+
var closeTimeoutRef = React.useRef(undefined);
|
|
4928
|
+
var mouseDownTimeRef = React.useRef(undefined);
|
|
4935
4929
|
var datePickerErrorRef = React.useRef(null);
|
|
4936
4930
|
var openValueRef = React.useRef(null);
|
|
4937
4931
|
var onValidateRef = reactHook.useAutoUpdateLayoutRef(initOnValidate);
|
|
@@ -5309,9 +5303,7 @@ styleInject(css_248z$7);var PrivateDatePicker = React.forwardRef(function (_a, r
|
|
|
5309
5303
|
React.createElement("div", { style: { display: fullWidth ? 'block' : 'inline-block' } },
|
|
5310
5304
|
React.createElement(xDatePickers.DesktopDatePicker, __assign({ value: inputValue, label: labelIcon ? React.createElement(reactComponent.PdgIconText, { icon: labelIcon }, initLabel) : initLabel, open: false, format: format ? format : getDateTimeFormat(type, time), 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, showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth }, otherProps)))),
|
|
5311
5305
|
!formColWithHelperText && (helperText || (error && errorHelperText)) && (React.createElement(material.FormHelperText, { error: error, style: { marginLeft: variant === 'standard' ? 0 : 14 } }, error ? errorHelperText : helperText))))));
|
|
5312
|
-
});var
|
|
5313
|
-
styleInject(css_248z$6);var css_248z$5 = ".PrivateStaticDateTimePicker.time {\n height: 400px;\n}\n.PrivateStaticDateTimePicker .MuiPickersCalendarHeader-root {\n display: none;\n}\n.PrivateStaticDateTimePicker .month-title-container {\n display: flex;\n align-items: center;\n margin-left: 5px;\n}\n.PrivateStaticDateTimePicker .month-title-container .month-title-wrap {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.PrivateStaticDateTimePicker .month-title-container .month-title-wrap .month-title button {\n font-size: 15px;\n padding-left: 8px;\n padding-right: 0;\n min-width: 0;\n}\n.PrivateStaticDateTimePicker .month-title-container .month-title-wrap .month-title button:not(.active) {\n color: unset;\n}\n.PrivateStaticDateTimePicker .action-buttons {\n border-top: 1px solid #efefef;\n padding: 10px;\n text-align: right;\n}\n.PrivateStaticDateTimePicker .action-buttons button {\n min-width: 0;\n color: inherit;\n}\n.PrivateStaticDateTimePicker .action-buttons button:not(:first-of-type) {\n margin-left: 5px;\n}\n.PrivateStaticDateTimePicker .action-buttons button.disabled {\n color: rgba(0, 0, 0, 0.5);\n}\n.PrivateStaticDateTimePicker .time {\n border-left: 2px solid #bfbfbf;\n}\n.PrivateStaticDateTimePicker .time .time-container {\n height: 100%;\n}\n.PrivateStaticDateTimePicker .time .time-container .time-title {\n text-align: center;\n padding: 22px 0;\n font-size: 15px;\n}\n.PrivateStaticDateTimePicker .time .time-container .time-select-wrap {\n flex: 1;\n border-top: 1px solid #efefef;\n}\n.PrivateStaticDateTimePicker.time .time .time-container .time-select-wrap > div > div:not(:first-of-type) {\n border-left: 1px solid #efefef;\n}";
|
|
5314
|
-
styleInject(css_248z$5);var DEFAULT_HOURS = new Array(24).fill(0);
|
|
5306
|
+
});var DEFAULT_HOURS = new Array(24).fill(0);
|
|
5315
5307
|
for (var i$1 = 0; i$1 < DEFAULT_HOURS.length; i$1 += 1) {
|
|
5316
5308
|
DEFAULT_HOURS[i$1] = i$1;
|
|
5317
5309
|
}
|
|
@@ -5327,7 +5319,7 @@ var PrivateStaticDateTimePicker = React.forwardRef(function (_a, ref) {
|
|
|
5327
5319
|
/********************************************************************************************************************
|
|
5328
5320
|
* Ref
|
|
5329
5321
|
* ******************************************************************************************************************/
|
|
5330
|
-
var value = _a.value, initAvailableDate = _a.availableDate,
|
|
5322
|
+
var value = _a.value, initAvailableDate = _a.availableDate, type = _a.type, time = _a.time, _b = _a.hours, hours = _b === void 0 ? DEFAULT_HOURS : _b, _c = _a.minutes, minutes = _c === void 0 ? DEFAULT_MINUTES : _c, _d = _a.seconds, seconds = _d === void 0 ? DEFAULT_SECONDS : _d, minuteInterval = _a.minuteInterval, secondInterval = _a.secondInterval, minDate = _a.minDate, maxDate = _a.maxDate, disablePast = _a.disablePast, disableFuture = _a.disableFuture, onChange = _a.onChange, onMonthChange = _a.onMonthChange, onClose = _a.onClose, props = __rest(_a, ["value", "availableDate", "type", "time", "hours", "minutes", "seconds", "minuteInterval", "secondInterval", "minDate", "maxDate", "disablePast", "disableFuture", "onChange", "onMonthChange", "onClose"]);
|
|
5331
5323
|
var hourSelectRef = React.useRef(null);
|
|
5332
5324
|
var minuteSelectRef = React.useRef(null);
|
|
5333
5325
|
var secondSelectRef = React.useRef(null);
|
|
@@ -5337,8 +5329,6 @@ var PrivateStaticDateTimePicker = React.forwardRef(function (_a, ref) {
|
|
|
5337
5329
|
var _e = React.useState(function () {
|
|
5338
5330
|
if (value)
|
|
5339
5331
|
return value;
|
|
5340
|
-
else if (defaultCalendarMonth)
|
|
5341
|
-
return defaultCalendarMonth;
|
|
5342
5332
|
else
|
|
5343
5333
|
return dayjs();
|
|
5344
5334
|
}), month = _e[0], setMonth = _e[1];
|
|
@@ -5360,8 +5350,8 @@ var PrivateStaticDateTimePicker = React.forwardRef(function (_a, ref) {
|
|
|
5360
5350
|
}
|
|
5361
5351
|
}, [yearSelectOpen]);
|
|
5362
5352
|
//--------------------------------------------------------------------------------------------------------------------
|
|
5363
|
-
var leftArrowOnClickRef = React.useRef();
|
|
5364
|
-
var rightArrowOnClickRef = React.useRef();
|
|
5353
|
+
var leftArrowOnClickRef = React.useRef(undefined);
|
|
5354
|
+
var rightArrowOnClickRef = React.useRef(undefined);
|
|
5365
5355
|
var LeftArrowButton = React.useState(function () {
|
|
5366
5356
|
var ArrowButton = function (props) {
|
|
5367
5357
|
leftArrowOnClickRef.current = props.onClick;
|
|
@@ -5465,11 +5455,11 @@ var PrivateStaticDateTimePicker = React.forwardRef(function (_a, ref) {
|
|
|
5465
5455
|
* Render
|
|
5466
5456
|
* ******************************************************************************************************************/
|
|
5467
5457
|
return (React.createElement(material.Grid, { container: true, className: classNames('PrivateStaticDateTimePicker', type) },
|
|
5468
|
-
type !== 'time' && (React.createElement(material.Grid,
|
|
5458
|
+
type !== 'time' && (React.createElement(material.Grid, null,
|
|
5469
5459
|
React.createElement(material.Grid, { container: true, direction: 'column' },
|
|
5470
|
-
React.createElement(material.Grid, {
|
|
5460
|
+
React.createElement(material.Grid, { sx: { p: 2, width: '100%' } },
|
|
5471
5461
|
React.createElement(material.Grid, { container: true, className: 'month-change-arrow-wrap' },
|
|
5472
|
-
React.createElement(material.Grid, {
|
|
5462
|
+
React.createElement(material.Grid, { flex: 1, className: 'month-title-container' },
|
|
5473
5463
|
React.createElement("div", { className: 'month-title-wrap' },
|
|
5474
5464
|
React.createElement("div", { className: 'month-title' },
|
|
5475
5465
|
React.createElement(material.Button, { variant: 'text', className: yearSelectOpen ? 'active' : undefined, onClick: function () {
|
|
@@ -5495,12 +5485,12 @@ var PrivateStaticDateTimePicker = React.forwardRef(function (_a, ref) {
|
|
|
5495
5485
|
} },
|
|
5496
5486
|
month.format('M월'),
|
|
5497
5487
|
React.createElement(material.Icon, null, monthSelectOpen ? 'arrow_drop_up' : 'arrow_drop_down'))))),
|
|
5498
|
-
!yearSelectOpen && !monthSelectOpen && (React.createElement(material.Grid, {
|
|
5488
|
+
!yearSelectOpen && !monthSelectOpen && (React.createElement(material.Grid, { style: { textAlign: 'right' } },
|
|
5499
5489
|
React.createElement(material.IconButton, { onClick: previousMonth, sx: { mr: 1 } },
|
|
5500
5490
|
React.createElement(material.Icon, null, "keyboard_arrow_left")),
|
|
5501
5491
|
React.createElement(material.IconButton, { onClick: nextMonth },
|
|
5502
5492
|
React.createElement(material.Icon, null, "keyboard_arrow_right")))))),
|
|
5503
|
-
React.createElement(material.Grid, {
|
|
5493
|
+
React.createElement(material.Grid, { style: { position: 'relative' } },
|
|
5504
5494
|
React.createElement(xDatePickers.StaticDateTimePicker, __assign({}, props, { value: activeMonthValue, referenceDate: month, slots: {
|
|
5505
5495
|
previousIconButton: LeftArrowButton,
|
|
5506
5496
|
nextIconButton: RightArrowButton,
|
|
@@ -5519,7 +5509,7 @@ var PrivateStaticDateTimePicker = React.forwardRef(function (_a, ref) {
|
|
|
5519
5509
|
} })),
|
|
5520
5510
|
yearSelectOpen && (React.createElement(PrivateYearSelect, { selectYear: value == null ? null : value.year(), activeYear: month.year(), availableDate: availableDate, onSelect: handleYearSelect })),
|
|
5521
5511
|
monthSelectOpen && (React.createElement(PrivateMonthSelect, { year: month.year(), selectYear: value == null ? null : value.year(), selectMonth: value == null ? null : value.month(), activeMonth: month.month(), availableDate: availableDate, onSelect: handleMonthSelect }))),
|
|
5522
|
-
React.createElement(material.Grid, {
|
|
5512
|
+
React.createElement(material.Grid, { className: 'action-buttons' },
|
|
5523
5513
|
getActionButton(dayjs()
|
|
5524
5514
|
.startOf('d')
|
|
5525
5515
|
.subtract(1, 'month')
|
|
@@ -5560,9 +5550,9 @@ var PrivateStaticDateTimePicker = React.forwardRef(function (_a, ref) {
|
|
|
5560
5550
|
* Ref
|
|
5561
5551
|
* ******************************************************************************************************************/
|
|
5562
5552
|
var privateStaticDateTimePickerRef = React.useRef(null);
|
|
5563
|
-
var textFieldInputRef = React.useRef();
|
|
5564
|
-
var closeTimeoutRef = React.useRef();
|
|
5565
|
-
var mouseDownTimeRef = React.useRef();
|
|
5553
|
+
var textFieldInputRef = React.useRef(undefined);
|
|
5554
|
+
var closeTimeoutRef = React.useRef(undefined);
|
|
5555
|
+
var mouseDownTimeRef = React.useRef(undefined);
|
|
5566
5556
|
var datePickerErrorRef = React.useRef(null);
|
|
5567
5557
|
var openValueRef = React.useRef(null);
|
|
5568
5558
|
var onValidateRef = reactHook.useAutoUpdateLayoutRef(initOnValidate);
|
|
@@ -5978,8 +5968,7 @@ var PrivateStaticDateTimePicker = React.forwardRef(function (_a, ref) {
|
|
|
5978
5968
|
React.createElement(material.DialogContent, null, content),
|
|
5979
5969
|
React.createElement(material.DialogActions, null,
|
|
5980
5970
|
React.createElement(material.Button, { variant: 'text', onClick: handleClose, autoFocus: true }, "\uD655\uC778"))));
|
|
5981
|
-
};var
|
|
5982
|
-
styleInject(css_248z$4);var PrivateInputDatePicker = React.forwardRef(function (_a, ref) {
|
|
5971
|
+
};var PrivateInputDatePicker = React.forwardRef(function (_a, ref) {
|
|
5983
5972
|
/********************************************************************************************************************
|
|
5984
5973
|
* ID
|
|
5985
5974
|
* ******************************************************************************************************************/
|
|
@@ -6072,7 +6061,7 @@ styleInject(css_248z$4);var PrivateInputDatePicker = React.forwardRef(function (
|
|
|
6072
6061
|
var StyledButton$2 = material.styled(material.Button)(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n font-size: 12px;\n background-color: transparent;\n color: unset;\n outline: 0;\n font-weight: 400;\n line-height: 1.75;\n border-radius: 18px;\n cursor: pointer;\n width: 100%;\n border: 1px solid transparent;\n\n &:focus {\n background-color: rgba(0, 0, 0, 0.12);\n }\n &.default {\n background-color: #efefef;\n }\n &.selected,\n &.selected-temp {\n background-color: rgba(66, 165, 245, 0.6);\n }\n &.selected-start,\n &.selected-end {\n color: #fff;\n background-color: #1976d2;\n }\n &.disabled {\n opacity: 0.8;\n border: 1px solid transparent;\n }\n &:hover:not(.disabled):not(.selected-start):not(.selected-end) {\n color: inherit;\n border: 1px solid transparent;\n background-color: rgba(66, 165, 245, 0.3);\n }\n"], ["\n font-size: 12px;\n background-color: transparent;\n color: unset;\n outline: 0;\n font-weight: 400;\n line-height: 1.75;\n border-radius: 18px;\n cursor: pointer;\n width: 100%;\n border: 1px solid transparent;\n\n &:focus {\n background-color: rgba(0, 0, 0, 0.12);\n }\n &.default {\n background-color: #efefef;\n }\n &.selected,\n &.selected-temp {\n background-color: rgba(66, 165, 245, 0.6);\n }\n &.selected-start,\n &.selected-end {\n color: #fff;\n background-color: #1976d2;\n }\n &.disabled {\n opacity: 0.8;\n border: 1px solid transparent;\n }\n &:hover:not(.disabled):not(.selected-start):not(.selected-end) {\n color: inherit;\n border: 1px solid transparent;\n background-color: rgba(66, 165, 245, 0.3);\n }\n"])));
|
|
6073
6062
|
var templateObject_1$b, templateObject_2$6;var PrivateYearRangePickerYear = React.forwardRef(function (_a, ref) {
|
|
6074
6063
|
var year = _a.year, disabled = _a.disabled, isDefault = _a.isDefault, selected = _a.selected, selectedStart = _a.selectedStart, selectedEnd = _a.selectedEnd, selectedTemp = _a.selectedTemp, onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave;
|
|
6075
|
-
return (React.createElement(StyledContainer$6, { className: 'PrivateYearRangePickerYear', ref: ref,
|
|
6064
|
+
return (React.createElement(StyledContainer$6, { className: 'PrivateYearRangePickerYear', ref: ref, size: { xs: 4 } },
|
|
6076
6065
|
React.createElement(StyledButton$2, { className: classNames(isDefault && 'default', selected && 'selected', selectedStart && 'selected-start', selectedEnd && 'selected-end', selectedTemp && 'selected-temp', disabled && 'disabled'), disabled: disabled, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, year)));
|
|
6077
6066
|
});var StyledContainer$5 = material.styled(material.Grid)(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n width: 240px;\n height: inherit;\n max-height: 240px;\n overflow-y: auto;\n padding: 4px;\n"], ["\n width: 240px;\n height: inherit;\n max-height: 240px;\n overflow-y: auto;\n padding: 4px;\n"])));
|
|
6078
6067
|
var templateObject_1$a;var _lastCloseTime$1 = 0;
|
|
@@ -6084,7 +6073,7 @@ var PrivateYearRangePickerYearList = function (_a) {
|
|
|
6084
6073
|
var yearsContainerRef = React.useRef(null);
|
|
6085
6074
|
var startButtonRef = React.useRef(null);
|
|
6086
6075
|
var endButtonRef = React.useRef(null);
|
|
6087
|
-
var mouseOverTimer = React.useRef();
|
|
6076
|
+
var mouseOverTimer = React.useRef(undefined);
|
|
6088
6077
|
/********************************************************************************************************************
|
|
6089
6078
|
* State
|
|
6090
6079
|
* ******************************************************************************************************************/
|
|
@@ -6345,7 +6334,7 @@ var PrivateYearRangePicker = function (_a) {
|
|
|
6345
6334
|
var StyledButton$1 = material.styled(material.Button)(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n font-size: 12px;\n background-color: transparent;\n color: unset;\n outline: 0;\n font-weight: 400;\n line-height: 1.75;\n border-radius: 18px;\n cursor: pointer;\n width: 100%;\n border: 1px solid transparent;\n\n &:focus {\n background-color: rgba(0, 0, 0, 0.12);\n }\n &.default {\n background-color: #efefef;\n }\n &.selected,\n &.selected-temp {\n background-color: rgba(66, 165, 245, 0.6);\n }\n &.selected-start,\n &.selected-end {\n color: #fff;\n background-color: rgba(25, 118, 210, 1);\n\n &.range:not(.active) {\n background-color: rgba(25, 118, 210, 0.8);\n }\n }\n &.active {\n color: #fff;\n background-color: rgba(25, 118, 210, 1);\n box-shadow: inset 1px 1px 1px 1px #05569f;\n }\n &.disabled {\n opacity: 0.8;\n border: 1px solid transparent;\n }\n &:hover:not(.disabled):not(.selected-start):not(.selected-end) {\n color: inherit;\n border: 1px solid transparent;\n background-color: rgba(66, 165, 245, 0.3);\n }\n"], ["\n font-size: 12px;\n background-color: transparent;\n color: unset;\n outline: 0;\n font-weight: 400;\n line-height: 1.75;\n border-radius: 18px;\n cursor: pointer;\n width: 100%;\n border: 1px solid transparent;\n\n &:focus {\n background-color: rgba(0, 0, 0, 0.12);\n }\n &.default {\n background-color: #efefef;\n }\n &.selected,\n &.selected-temp {\n background-color: rgba(66, 165, 245, 0.6);\n }\n &.selected-start,\n &.selected-end {\n color: #fff;\n background-color: rgba(25, 118, 210, 1);\n\n &.range:not(.active) {\n background-color: rgba(25, 118, 210, 0.8);\n }\n }\n &.active {\n color: #fff;\n background-color: rgba(25, 118, 210, 1);\n box-shadow: inset 1px 1px 1px 1px #05569f;\n }\n &.disabled {\n opacity: 0.8;\n border: 1px solid transparent;\n }\n &:hover:not(.disabled):not(.selected-start):not(.selected-end) {\n color: inherit;\n border: 1px solid transparent;\n background-color: rgba(66, 165, 245, 0.3);\n }\n"])));
|
|
6346
6335
|
var templateObject_1$8, templateObject_2$4;var PrivateYearPickerYear = React.forwardRef(function (_a, ref) {
|
|
6347
6336
|
var year = _a.year, disabled = _a.disabled, active = _a.active, range = _a.range, isDefault = _a.isDefault, selected = _a.selected, selectedStart = _a.selectedStart, selectedEnd = _a.selectedEnd, selectedTemp = _a.selectedTemp, onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave;
|
|
6348
|
-
return (React.createElement(StyledContainer$4, { className: 'PrivateYearPickerYear', ref: ref,
|
|
6337
|
+
return (React.createElement(StyledContainer$4, { className: 'PrivateYearPickerYear', ref: ref, size: { xs: 4 } },
|
|
6349
6338
|
React.createElement(StyledButton$1, { className: classNames(range && 'range', isDefault && 'default', selected && 'selected', selectedStart && 'selected-start', selectedEnd && 'selected-end', selectedTemp && 'selected-temp', active && 'active', disabled && 'disabled'), disabled: disabled, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, year)));
|
|
6350
6339
|
});var StyledContainer$3 = material.styled(material.Grid)(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n width: 240px;\n height: inherit;\n max-height: 240px;\n overflow-y: auto;\n padding: 4px;\n"], ["\n width: 240px;\n height: inherit;\n max-height: 240px;\n overflow-y: auto;\n padding: 4px;\n"])));
|
|
6351
6340
|
var templateObject_1$7;var _lastCloseTime = 0;
|
|
@@ -6358,7 +6347,7 @@ var PrivateYearPickerYearList = function (_a) {
|
|
|
6358
6347
|
var defaultButtonRef = React.useRef(null);
|
|
6359
6348
|
var startButtonRef = React.useRef(null);
|
|
6360
6349
|
var endButtonRef = React.useRef(null);
|
|
6361
|
-
var mouseOverTimer = React.useRef();
|
|
6350
|
+
var mouseOverTimer = React.useRef(undefined);
|
|
6362
6351
|
/********************************************************************************************************************
|
|
6363
6352
|
* State
|
|
6364
6353
|
* ******************************************************************************************************************/
|
|
@@ -6623,7 +6612,7 @@ var templateObject_1$5, templateObject_2$2;var PrivateMonthPickerMonth = React.f
|
|
|
6623
6612
|
/********************************************************************************************************************
|
|
6624
6613
|
* Render
|
|
6625
6614
|
* ******************************************************************************************************************/
|
|
6626
|
-
return (React.createElement(StyledContainer$2, { className: 'PrivateMonthPickerMonth', ref: ref,
|
|
6615
|
+
return (React.createElement(StyledContainer$2, { className: 'PrivateMonthPickerMonth', ref: ref, size: { xs: 4 } },
|
|
6627
6616
|
React.createElement(StyledButton, { className: classNames(range && 'range', isDefault && 'default', active && 'active', selected && 'selected', selectedStart && 'selected-start', selectedEnd && 'selected-end', selectedTemp && 'selected-temp', disabled && 'disabled'), disabled: disabled, onClick: handleClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave },
|
|
6628
6617
|
month,
|
|
6629
6618
|
"\uC6D4")));
|
|
@@ -6993,10 +6982,10 @@ var PrivateMonthRangePicker = function (_a) {
|
|
|
6993
6982
|
* ******************************************************************************************************************/
|
|
6994
6983
|
return (React.createElement("div", null,
|
|
6995
6984
|
React.createElement(material.Grid, { container: true, className: 'PrivateMonthRangePicker' },
|
|
6996
|
-
React.createElement(material.Grid,
|
|
6985
|
+
React.createElement(material.Grid, null,
|
|
6997
6986
|
React.createElement(PrivateMonthPicker, { value: value[0], selectToValue: value[1], minValue: minValue, maxValue: maxValue, disablePast: disablePast, disableFuture: disableFuture, onChange: handleStartMonthChange })),
|
|
6998
6987
|
React.createElement(StyledDiv, null, "~"),
|
|
6999
|
-
React.createElement(material.Grid,
|
|
6988
|
+
React.createElement(material.Grid, null,
|
|
7000
6989
|
React.createElement(PrivateMonthPicker, { value: value[1], selectFromValue: value[0], minValue: minValue, maxValue: maxValue, disablePast: disablePast, disableFuture: disableFuture, onChange: handleEndMonthChange }))),
|
|
7001
6990
|
actionButtons));
|
|
7002
6991
|
};
|
|
@@ -7061,8 +7050,7 @@ FormDateTimePicker.displayName = 'FormDateTimePicker';var FormTimePicker = React
|
|
|
7061
7050
|
return (React.createElement(FormContextProvider, { value: __assign(__assign({}, otherFormState), { onAddValueItem: handleAddValueItem }) },
|
|
7062
7051
|
React.createElement(PrivateDateTimePicker, __assign({ className: classNames(className, 'FormTimePicker') }, props, { ref: ref, type: 'time' }))));
|
|
7063
7052
|
});
|
|
7064
|
-
FormTimePicker.displayName = 'FormTimePicker';var
|
|
7065
|
-
styleInject(css_248z$3);var FormDateRangePickerTooltipPicker = React.forwardRef(function (_a, ref) {
|
|
7053
|
+
FormTimePicker.displayName = 'FormTimePicker';var FormDateRangePickerTooltipPicker = React.forwardRef(function (_a, ref) {
|
|
7066
7054
|
/********************************************************************************************************************
|
|
7067
7055
|
* State
|
|
7068
7056
|
* ******************************************************************************************************************/
|
|
@@ -7079,8 +7067,8 @@ styleInject(css_248z$3);var FormDateRangePickerTooltipPicker = React.forwardRef(
|
|
|
7079
7067
|
setActiveMonthValue(null);
|
|
7080
7068
|
}, [selectType]);
|
|
7081
7069
|
//--------------------------------------------------------------------------------------------------------------------
|
|
7082
|
-
var leftArrowOnClickRef = React.useRef();
|
|
7083
|
-
var rightArrowOnClickRef = React.useRef();
|
|
7070
|
+
var leftArrowOnClickRef = React.useRef(undefined);
|
|
7071
|
+
var rightArrowOnClickRef = React.useRef(undefined);
|
|
7084
7072
|
var LeftArrowButton = React.useState(function () {
|
|
7085
7073
|
var ArrowButton = function (props) {
|
|
7086
7074
|
leftArrowOnClickRef.current = props.onClick;
|
|
@@ -7253,8 +7241,7 @@ styleInject(css_248z$3);var FormDateRangePickerTooltipPicker = React.forwardRef(
|
|
|
7253
7241
|
onMonthChange(month);
|
|
7254
7242
|
setActiveMonthValue(null);
|
|
7255
7243
|
} }));
|
|
7256
|
-
});var
|
|
7257
|
-
styleInject(css_248z$2);var YEARS = new Array(200).fill(0);
|
|
7244
|
+
});var YEARS = new Array(200).fill(0);
|
|
7258
7245
|
for (var i = 0; i < 200; i += 1) {
|
|
7259
7246
|
YEARS[i] = 1900 + i;
|
|
7260
7247
|
}
|
|
@@ -7469,26 +7456,26 @@ var FormDateRangePickerTooltipPickerContainer = React.forwardRef(function (_a, r
|
|
|
7469
7456
|
}, [onGetActionButtons, getActionButton]);
|
|
7470
7457
|
return (React.createElement("div", { className: 'FormDateRangePickerTooltipPickerContainer' },
|
|
7471
7458
|
React.createElement(material.Grid, { container: true, direction: 'column' },
|
|
7472
|
-
!yearSelectOpen && !monthSelectOpen && (React.createElement(material.Grid,
|
|
7459
|
+
!yearSelectOpen && !monthSelectOpen && (React.createElement(material.Grid, null,
|
|
7473
7460
|
React.createElement(material.Grid, { container: true, className: 'month-change-arrow-wrap' },
|
|
7474
|
-
React.createElement(material.Grid, {
|
|
7461
|
+
React.createElement(material.Grid, { size: { xs: 6 } },
|
|
7475
7462
|
React.createElement(material.IconButton, { onClick: previousMonth },
|
|
7476
7463
|
React.createElement(material.Icon, null, "keyboard_arrow_left"))),
|
|
7477
|
-
React.createElement(material.Grid, {
|
|
7464
|
+
React.createElement(material.Grid, { size: { xs: 6 } },
|
|
7478
7465
|
React.createElement(material.IconButton, { onClick: nextMonth },
|
|
7479
7466
|
React.createElement(material.Icon, null, "keyboard_arrow_right")))))),
|
|
7480
|
-
React.createElement(material.Grid, {
|
|
7467
|
+
React.createElement(material.Grid, { onMouseLeave: function () { return setFocusedDate(undefined); } },
|
|
7481
7468
|
React.createElement("div", { style: { display: 'flex' } },
|
|
7482
7469
|
React.createElement("div", { style: { flex: 1 } }, getMonthTitle(0)),
|
|
7483
7470
|
React.createElement("div", { style: { flex: 1, borderLeft: '1px solid #efefef' } }, getMonthTitle(1)),
|
|
7484
7471
|
Number(calendarCount) >= 3 && (React.createElement("div", { style: { flex: 1, borderLeft: '1px solid #efefef' } }, getMonthTitle(2)))),
|
|
7485
7472
|
React.createElement("div", { className: 'date-picker-wrap' },
|
|
7486
7473
|
React.createElement(material.Grid, { container: true, flexWrap: 'nowrap' },
|
|
7487
|
-
React.createElement(material.Grid,
|
|
7474
|
+
React.createElement(material.Grid, null,
|
|
7488
7475
|
React.createElement(FormDateRangePickerTooltipPicker, __assign({}, customDatePickerProps, { ref: datePicker1Ref, focusedDate: focusedDate, month: months[0], onMouseEnterPickersDay: setFocusedDate, onMonthChange: handleFirstDatePickerMonthChange }))),
|
|
7489
|
-
React.createElement(material.Grid, {
|
|
7476
|
+
React.createElement(material.Grid, { style: { borderLeft: '1px solid #efefef' } },
|
|
7490
7477
|
React.createElement(FormDateRangePickerTooltipPicker, __assign({}, customDatePickerProps, { ref: datePicker2Ref, focusedDate: focusedDate, month: months[1], onMouseEnterPickersDay: setFocusedDate }))),
|
|
7491
|
-
Number(calendarCount) >= 3 && (React.createElement(material.Grid, {
|
|
7478
|
+
Number(calendarCount) >= 3 && (React.createElement(material.Grid, { style: { borderLeft: '1px solid #efefef' } },
|
|
7492
7479
|
React.createElement(FormDateRangePickerTooltipPicker, __assign({}, customDatePickerProps, { ref: datePicker3Ref, focusedDate: focusedDate, month: months[2], onMouseEnterPickersDay: setFocusedDate }))))),
|
|
7493
7480
|
yearSelectOpen && (React.createElement("div", { ref: yearSelectRef, className: 'year-select' },
|
|
7494
7481
|
React.createElement(material.Grid, { container: true, style: { padding: '5px 10px' }, spacing: 1 }, YEARS.map(function (y) {
|
|
@@ -7498,7 +7485,7 @@ var FormDateRangePickerTooltipPickerContainer = React.forwardRef(function (_a, r
|
|
|
7498
7485
|
var isActive = y === months[yearMonthSelectIndex].year();
|
|
7499
7486
|
var isSelected = y === ((_a = value[yearMonthSelectIndex]) === null || _a === void 0 ? void 0 : _a.year());
|
|
7500
7487
|
var disabled = !isDateAvailable(dayjs(y.toString(), 'YYYY'), availableDate, 'year');
|
|
7501
|
-
return (React.createElement(material.Grid, { key: y,
|
|
7488
|
+
return (React.createElement(material.Grid, { key: y, size: { xs: 2 } },
|
|
7502
7489
|
React.createElement(material.Button, { variant: 'text', fullWidth: true, disabled: disabled, className: classNames(isSelected && 'selected', isActive && 'active', isToday && 'today'), ref: isActive ? activeYearBtnRef : undefined, sx: {
|
|
7503
7490
|
backgroundColor: isSelected ? theme.palette.primary.main : undefined,
|
|
7504
7491
|
color: isSelected ? 'white' : 'unset',
|
|
@@ -7519,7 +7506,7 @@ var FormDateRangePickerTooltipPickerContainer = React.forwardRef(function (_a, r
|
|
|
7519
7506
|
m === ((_b = value[yearMonthSelectIndex]) === null || _b === void 0 ? void 0 : _b.month());
|
|
7520
7507
|
var ym = months[yearMonthSelectIndex].year() * 100 + (m + 1);
|
|
7521
7508
|
var disabled = !isDateAvailable(dayjs(ym.toString(), 'YYYYMM'), availableDate, 'month');
|
|
7522
|
-
return (React.createElement(material.Grid, { key: m,
|
|
7509
|
+
return (React.createElement(material.Grid, { key: m, size: { xs: 4 } },
|
|
7523
7510
|
React.createElement(material.Button, { variant: 'text', fullWidth: true, disabled: disabled, className: classNames(isSelected && 'selected', isActive && 'active', isToday && 'today'), ref: isActive ? activeYearBtnRef : undefined, sx: {
|
|
7524
7511
|
backgroundColor: isSelected ? theme.palette.primary.main : undefined,
|
|
7525
7512
|
color: isSelected ? 'white' : 'unset',
|
|
@@ -7532,7 +7519,7 @@ var FormDateRangePickerTooltipPickerContainer = React.forwardRef(function (_a, r
|
|
|
7532
7519
|
m + 1,
|
|
7533
7520
|
"\uC6D4")));
|
|
7534
7521
|
})))))),
|
|
7535
|
-
React.createElement(material.Grid, { className: 'action-buttons',
|
|
7522
|
+
React.createElement(material.Grid, { className: 'action-buttons', style: { borderTop: '1px solid #efefef', padding: 10, textAlign: 'right' } }, actionButtons))));
|
|
7536
7523
|
});var DEFAULT_VALUE$2 = [null, null];
|
|
7537
7524
|
var getFinalValue$6 = function (value) {
|
|
7538
7525
|
return value || DEFAULT_VALUE$2;
|
|
@@ -7564,13 +7551,13 @@ var FormDateRangePicker = React.forwardRef(function (_a, ref) {
|
|
|
7564
7551
|
* Ref
|
|
7565
7552
|
* ******************************************************************************************************************/
|
|
7566
7553
|
var containerRef = React.useRef(null);
|
|
7567
|
-
var startDateTextFieldRef = React.useRef();
|
|
7568
|
-
var endDateTextFieldRef = React.useRef();
|
|
7569
|
-
var closeTimeoutRef = React.useRef();
|
|
7570
|
-
var mouseDownTimeRef = React.useRef();
|
|
7554
|
+
var startDateTextFieldRef = React.useRef(undefined);
|
|
7555
|
+
var endDateTextFieldRef = React.useRef(undefined);
|
|
7556
|
+
var closeTimeoutRef = React.useRef(undefined);
|
|
7557
|
+
var mouseDownTimeRef = React.useRef(undefined);
|
|
7571
7558
|
var startInputDatePickerErrorRef = React.useRef(null);
|
|
7572
7559
|
var endInputDatePickerErrorRef = React.useRef(null);
|
|
7573
|
-
var openValueRef = React.useRef();
|
|
7560
|
+
var openValueRef = React.useRef(undefined);
|
|
7574
7561
|
/********************************************************************************************************************
|
|
7575
7562
|
* State
|
|
7576
7563
|
* ******************************************************************************************************************/
|
|
@@ -8059,10 +8046,10 @@ var FormDateRangePicker = React.forwardRef(function (_a, ref) {
|
|
|
8059
8046
|
}, title: React.createElement("div", { style: { display: 'flex' } },
|
|
8060
8047
|
React.createElement(FormDateRangePickerTooltipPickerContainer, { ref: containerRef, calendarCount: calendarCount, selectType: selectType, value: value, months: months, disablePast: disablePast, disableFuture: disableFuture, minDate: minDate, maxDate: maxDate, onGetActionButtons: onGetActionButtons, onChange: handleChange, onValueChange: handleValueChange, onMonthsChange: setMonths })) },
|
|
8061
8048
|
React.createElement(material.Grid, { container: true, alignItems: 'center' },
|
|
8062
|
-
React.createElement(material.Grid, {
|
|
8049
|
+
React.createElement(material.Grid, { flex: 1 },
|
|
8063
8050
|
React.createElement(PrivateInputDatePicker, __assign({}, inputDatePickerProps, { style: inputStyle, value: value[0], label: fromLabel, labelIcon: fromLabelIcon, error: error || fromError, focused: focused || (open && selectType === 'start'), required: required || requiredStart, readOnly: readOnly || readOnlyStart, readOnlyInput: readOnlyInput, icon: startIcon || icon, startAdornment: startStartAdornment || startAdornment, endAdornment: startEndAdornment || endAdornment, inputRef: startDateTextFieldRef, onChange: function (newValue) { return handleInputDatePickerChange('start', newValue); }, onFocus: function () { return handleInputDatePickerFocus('start'); }, onError: function (reason) { return (startInputDatePickerErrorRef.current = reason); } }))),
|
|
8064
|
-
React.createElement(material.Grid, {
|
|
8065
|
-
React.createElement(material.Grid, {
|
|
8051
|
+
React.createElement(material.Grid, { sx: { px: 1 } }, "~"),
|
|
8052
|
+
React.createElement(material.Grid, { flex: 1 },
|
|
8066
8053
|
React.createElement(PrivateInputDatePicker, __assign({}, inputDatePickerProps, { style: inputStyle, value: value[1], label: toLabel, labelIcon: toLabelIcon, error: error || toError, 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); } }))))),
|
|
8067
8054
|
!formColWithHelperText &&
|
|
8068
8055
|
(helperText ||
|
|
@@ -8075,7 +8062,7 @@ FormDateRangePicker.displayName = 'FormDateRangePicker';var LinkDialog = functio
|
|
|
8075
8062
|
* Ref
|
|
8076
8063
|
* ******************************************************************************************************************/
|
|
8077
8064
|
var open = _a.open, onConfirm = _a.onConfirm, onCancel = _a.onCancel, onClose = _a.onClose;
|
|
8078
|
-
var inputRef = React.useRef();
|
|
8065
|
+
var inputRef = React.useRef(null);
|
|
8079
8066
|
/********************************************************************************************************************
|
|
8080
8067
|
* State
|
|
8081
8068
|
* ******************************************************************************************************************/
|
|
@@ -8128,8 +8115,7 @@ FormDateRangePicker.displayName = 'FormDateRangePicker';var LinkDialog = functio
|
|
|
8128
8115
|
React.createElement(material.DialogActions, null,
|
|
8129
8116
|
React.createElement(material.Button, { variant: 'text', onClick: handleCancel }, "\uCDE8\uC18C"),
|
|
8130
8117
|
React.createElement(material.Button, { variant: 'text', onClick: handleSubmit }, "\uD655\uC778"))));
|
|
8131
|
-
};var
|
|
8132
|
-
styleInject(css_248z$1);var StyledPdgButton = material.styled(reactComponent.PdgButton)(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n min-width: 0;\n\n &.input-file-btn {\n padding: 0 !important;\n position: relative;\n\n .PdgFlexRowBox {\n height: 100%;\n .PdgText {\n height: 100%;\n\n label {\n cursor: pointer;\n display: flex;\n flex: 1;\n width: 100%;\n height: 100%;\n justify-content: center;\n align-items: center;\n padding: 0 10px;\n\n .PdgIcon {\n margin-right: 0.2em;\n }\n }\n }\n }\n }\n\n &.hidden-label.input-file-btn .PdgFlexRowBox .PdgText label .PdgIcon {\n margin-left: 0;\n margin-right: 0;\n }\n\n &.MuiButton-outlined {\n &:first-of-type:not(:last-of-type) {\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n &:last-of-type:not(:first-of-type) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n &:not(:first-of-type):not(:last-of-type) {\n border-right: 0;\n border-radius: 0;\n }\n }\n"], ["\n min-width: 0;\n\n &.input-file-btn {\n padding: 0 !important;\n position: relative;\n\n .PdgFlexRowBox {\n height: 100%;\n .PdgText {\n height: 100%;\n\n label {\n cursor: pointer;\n display: flex;\n flex: 1;\n width: 100%;\n height: 100%;\n justify-content: center;\n align-items: center;\n padding: 0 10px;\n\n .PdgIcon {\n margin-right: 0.2em;\n }\n }\n }\n }\n }\n\n &.hidden-label.input-file-btn .PdgFlexRowBox .PdgText label .PdgIcon {\n margin-left: 0;\n margin-right: 0;\n }\n\n &.MuiButton-outlined {\n &:first-of-type:not(:last-of-type) {\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n &:last-of-type:not(:first-of-type) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n &:not(:first-of-type):not(:last-of-type) {\n border-right: 0;\n border-radius: 0;\n }\n }\n"])));
|
|
8118
|
+
};var StyledPdgButton = material.styled(reactComponent.PdgButton)(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n min-width: 0;\n\n &.input-file-btn {\n padding: 0 !important;\n position: relative;\n\n .PdgFlexRowBox {\n height: 100%;\n .PdgText {\n height: 100%;\n\n label {\n cursor: pointer;\n display: flex;\n flex: 1;\n width: 100%;\n height: 100%;\n justify-content: center;\n align-items: center;\n padding: 0 10px;\n\n .PdgIcon {\n margin-right: 0.2em;\n }\n }\n }\n }\n }\n\n &.hidden-label.input-file-btn .PdgFlexRowBox .PdgText label .PdgIcon {\n margin-left: 0;\n margin-right: 0;\n }\n\n &.MuiButton-outlined {\n &:first-of-type:not(:last-of-type) {\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n &:last-of-type:not(:first-of-type) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n &:not(:first-of-type):not(:last-of-type) {\n border-right: 0;\n border-radius: 0;\n }\n }\n"], ["\n min-width: 0;\n\n &.input-file-btn {\n padding: 0 !important;\n position: relative;\n\n .PdgFlexRowBox {\n height: 100%;\n .PdgText {\n height: 100%;\n\n label {\n cursor: pointer;\n display: flex;\n flex: 1;\n width: 100%;\n height: 100%;\n justify-content: center;\n align-items: center;\n padding: 0 10px;\n\n .PdgIcon {\n margin-right: 0.2em;\n }\n }\n }\n }\n }\n\n &.hidden-label.input-file-btn .PdgFlexRowBox .PdgText label .PdgIcon {\n margin-left: 0;\n margin-right: 0;\n }\n\n &.MuiButton-outlined {\n &:first-of-type:not(:last-of-type) {\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n &:last-of-type:not(:first-of-type) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n &:not(:first-of-type):not(:last-of-type) {\n border-right: 0;\n border-radius: 0;\n }\n }\n"])));
|
|
8133
8119
|
var templateObject_1$1;var getFinalValue$5 = function (value) { return value || ''; };var FILE_VALUE = '';
|
|
8134
8120
|
var FormFile = React.forwardRef(function (_a, ref) {
|
|
8135
8121
|
/********************************************************************************************************************
|
|
@@ -8159,7 +8145,6 @@ var FormFile = React.forwardRef(function (_a, ref) {
|
|
|
8159
8145
|
/********************************************************************************************************************
|
|
8160
8146
|
* Ref
|
|
8161
8147
|
* ******************************************************************************************************************/
|
|
8162
|
-
var innerRef = React.useRef(null);
|
|
8163
8148
|
var textFieldRef = React.useRef(null);
|
|
8164
8149
|
var fileUploadBtnRef = React.useRef(null);
|
|
8165
8150
|
var linkBtnRef = React.useRef(null);
|
|
@@ -8176,11 +8161,7 @@ var FormFile = React.forwardRef(function (_a, ref) {
|
|
|
8176
8161
|
/********************************************************************************************************************
|
|
8177
8162
|
* State - width, height
|
|
8178
8163
|
* ******************************************************************************************************************/
|
|
8179
|
-
var
|
|
8180
|
-
targetRef: innerRef,
|
|
8181
|
-
handleWidth: false,
|
|
8182
|
-
handleHeight: true,
|
|
8183
|
-
}).height;
|
|
8164
|
+
var _l = reactResizeDetector.useResizeDetector({ handleWidth: false }), innerRef = _l.ref, height = _l.height;
|
|
8184
8165
|
/********************************************************************************************************************
|
|
8185
8166
|
* Function - setErrorErrorHelperText
|
|
8186
8167
|
* ******************************************************************************************************************/
|
|
@@ -8216,7 +8197,7 @@ var FormFile = React.forwardRef(function (_a, ref) {
|
|
|
8216
8197
|
/********************************************************************************************************************
|
|
8217
8198
|
* State - value
|
|
8218
8199
|
* ******************************************************************************************************************/
|
|
8219
|
-
var
|
|
8200
|
+
var _m = reactHook.useAutoUpdateRefState(initValue, getFinalValue$5), valueRef = _m[0], value = _m[1], setValue = _m[2];
|
|
8220
8201
|
reactHook.useFirstSkipEffect(function () {
|
|
8221
8202
|
if (error)
|
|
8222
8203
|
validate(value);
|
|
@@ -8398,17 +8379,21 @@ var FormFile = React.forwardRef(function (_a, ref) {
|
|
|
8398
8379
|
!hideUrl && (React.createElement("div", { className: 'file-name-wrap' },
|
|
8399
8380
|
React.createElement(material.TextField, { ref: innerRef, inputRef: textFieldRef, className: 'file-name', variant: variant, label: labelIcon ? (React.createElement(React.Fragment, null,
|
|
8400
8381
|
React.createElement(reactComponent.PdgIcon, { style: { verticalAlign: 'middle', marginRight: 4 } }, labelIcon),
|
|
8401
|
-
React.createElement("span", { style: { verticalAlign: 'middle' } }, initLabel))) : (initLabel), size: size, required: required, value: value || '', focused: focused, disabled: disabled, fullWidth: true, error: error,
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8382
|
+
React.createElement("span", { style: { verticalAlign: 'middle' } }, initLabel))) : (initLabel), size: size, required: required, value: value || '', focused: focused, disabled: disabled, fullWidth: true, error: error, slotProps: {
|
|
8383
|
+
inputLabel: labelShrink ? { shrink: labelShrink } : undefined,
|
|
8384
|
+
htmlInput: { readOnly: true },
|
|
8385
|
+
input: {
|
|
8386
|
+
endAdornment: (React.createElement(material.InputAdornment, { position: 'end' },
|
|
8387
|
+
React.createElement("div", { className: 'input-file-wrap' },
|
|
8388
|
+
!hideUpload && (React.createElement(React.Fragment, null,
|
|
8389
|
+
React.createElement(StyledPdgButton, { variant: 'text', tabIndex: uploadTabIndex == null ? -1 : uploadTabIndex, className: classNames('input-file-btn form-file-btn', !!hideUploadLabel && 'hidden-label'), color: error ? 'error' : color, size: size, disabled: readOnly || disabled, ref: fileUploadBtnRef },
|
|
8390
|
+
React.createElement("label", { htmlFor: id },
|
|
8391
|
+
React.createElement(reactComponent.PdgIcon, { size: size }, "upload"),
|
|
8392
|
+
!hideUploadLabel && (uploadLabel || '파일 업로드'))),
|
|
8393
|
+
React.createElement("input", { type: 'file', accept: accept, id: id, value: FILE_VALUE, className: 'input-file', onChange: handleFileChange }))),
|
|
8394
|
+
!hideLink && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: linkTabIndex == null ? -1 : linkTabIndex, className: classNames('link-btn form-file-btn', !!hideLinkLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'link', size: size, disabled: readOnly || disabled, ref: linkBtnRef, onClick: handleLinkClick }, !hideLinkLabel && (linkLabel || '링크'))),
|
|
8395
|
+
!hideRemove && util.notEmpty(value) && (React.createElement(StyledPdgButton, { variant: 'text', tabIndex: removeTabIndex == null ? -1 : removeTabIndex, className: classNames('remove-btn form-file-btn', !!hideRemoveLabel && 'hidden-label'), color: error ? 'error' : color, startIcon: 'close', size: size, disabled: readOnly || disabled, onClick: handleRemoveClick }, !hideRemoveLabel && (removeLabel || '삭제')))))),
|
|
8396
|
+
},
|
|
8412
8397
|
}, placeholder: '\uD30C\uC77C\uC744 \uC120\uD0DD\uD558\uC138\uC694' }))),
|
|
8413
8398
|
!!hideUrl && (React.createElement("div", { className: 'input-file-wrap' },
|
|
8414
8399
|
!hideUpload && (React.createElement(React.Fragment, null,
|
|
@@ -8422,8 +8407,7 @@ var FormFile = React.forwardRef(function (_a, ref) {
|
|
|
8422
8407
|
React.createElement(PrivateAlertDialog, __assign({}, alertDialogProps, { onClose: function () { return setAlertDialogProps({ open: false }); } })),
|
|
8423
8408
|
React.createElement(LinkDialog, { open: isOpenLinkDialog, onConfirm: handleLinkDialogConfirm, onClose: function () { return setIsOpenLinkDialog(false); } })) }));
|
|
8424
8409
|
});
|
|
8425
|
-
FormFile.displayName = 'FormFile';var
|
|
8426
|
-
styleInject(css_248z);var getFinalValue$4 = function (value) { return value || ''; };var FormImageFile = React.forwardRef(function (_a, ref) {
|
|
8410
|
+
FormFile.displayName = 'FormFile';var getFinalValue$4 = function (value) { return value || ''; };var FormImageFile = React.forwardRef(function (_a, ref) {
|
|
8427
8411
|
var className = _a.className, imageSize = _a.imageSize, preview = _a.preview, previewMaxHeight = _a.previewMaxHeight, _b = _a.accept, accept = _b === void 0 ? '.jpg,.jpeg,.png' : _b, initValue = _a.value, onChange = _a.onChange, onFile = _a.onFile, onLink = _a.onLink, props = __rest(_a, ["className", "imageSize", "preview", "previewMaxHeight", "accept", "value", "onChange", "onFile", "onLink"]);
|
|
8428
8412
|
var _c = React.useState({
|
|
8429
8413
|
open: false,
|
|
@@ -8604,11 +8588,11 @@ var FormMonthPicker = React.forwardRef(function (_a, ref) {
|
|
|
8604
8588
|
* Ref
|
|
8605
8589
|
* ******************************************************************************************************************/
|
|
8606
8590
|
var ratingRef = React.useRef(null);
|
|
8607
|
-
var inputRef = React.useRef();
|
|
8608
|
-
var closeTimeoutRef = React.useRef();
|
|
8609
|
-
var mouseDownTimeRef = React.useRef();
|
|
8591
|
+
var inputRef = React.useRef(undefined);
|
|
8592
|
+
var closeTimeoutRef = React.useRef(undefined);
|
|
8593
|
+
var mouseDownTimeRef = React.useRef(undefined);
|
|
8610
8594
|
var inputDatePickerErrorRef = React.useRef(null);
|
|
8611
|
-
var openValueRef = React.useRef();
|
|
8595
|
+
var openValueRef = React.useRef(undefined);
|
|
8612
8596
|
/********************************************************************************************************************
|
|
8613
8597
|
* State
|
|
8614
8598
|
* ******************************************************************************************************************/
|
|
@@ -8950,11 +8934,11 @@ var FormMonthRangePicker = React.forwardRef(function (_a, ref) {
|
|
|
8950
8934
|
/********************************************************************************************************************
|
|
8951
8935
|
* Ref
|
|
8952
8936
|
* ******************************************************************************************************************/
|
|
8953
|
-
var startInputRef = React.useRef();
|
|
8954
|
-
var endInputRef = React.useRef();
|
|
8937
|
+
var startInputRef = React.useRef(undefined);
|
|
8938
|
+
var endInputRef = React.useRef(undefined);
|
|
8955
8939
|
var startInputDatePickerErrorRef = React.useRef(null);
|
|
8956
8940
|
var endInputDatePickerErrorRef = React.useRef(null);
|
|
8957
|
-
var openValueRef = React.useRef();
|
|
8941
|
+
var openValueRef = React.useRef(undefined);
|
|
8958
8942
|
/********************************************************************************************************************
|
|
8959
8943
|
* State
|
|
8960
8944
|
* ******************************************************************************************************************/
|
|
@@ -9338,10 +9322,10 @@ var FormMonthRangePicker = React.forwardRef(function (_a, ref) {
|
|
|
9338
9322
|
}, title: React.createElement("div", { style: { display: 'flex' } },
|
|
9339
9323
|
React.createElement(PrivateMonthRangePicker, { minValue: minValue, maxValue: maxValue, disablePast: disablePast, disableFuture: disableFuture, value: value, onChange: handleContainerChange })) },
|
|
9340
9324
|
React.createElement(material.Grid, { container: true, alignItems: 'center' },
|
|
9341
|
-
React.createElement(material.Grid, {
|
|
9325
|
+
React.createElement(material.Grid, { flex: 1 },
|
|
9342
9326
|
React.createElement(PrivateInputDatePicker, __assign({}, inputDatePickerProps, { style: inputStyle, sx: sx, value: valueDate[0], label: fromLabel, labelIcon: fromLabelIcon, error: error || fromError, focused: focused || open, required: required, readOnly: readOnly, readOnlyInput: readOnlyInput, icon: icon, startAdornment: startAdornment, endAdornment: endAdornment, inputRef: startInputRef, onChange: function (v) { return handleInputDatePickerChange('start', v); }, onFocus: function () { return handleInputDatePickerFocus('start'); }, onError: function (reason) { return (startInputDatePickerErrorRef.current = reason); }, shouldDisableYear: handleInputDatePickerShouldDisableYear }))),
|
|
9343
|
-
React.createElement(material.Grid, {
|
|
9344
|
-
React.createElement(material.Grid, {
|
|
9327
|
+
React.createElement(material.Grid, { sx: { px: 1 } }, "~"),
|
|
9328
|
+
React.createElement(material.Grid, { flex: 1 },
|
|
9345
9329
|
React.createElement(PrivateInputDatePicker, __assign({}, inputDatePickerProps, { style: inputStyle, sx: sx, value: valueDate[1], label: toLabel, labelIcon: toLabelIcon, error: error || toError, focused: focused || open, required: required, readOnly: readOnly, readOnlyInput: readOnlyInput, icon: icon, startAdornment: startAdornment, endAdornment: endAdornment, inputRef: endInputRef, onChange: function (v) { return handleInputDatePickerChange('end', v); }, onFocus: function () { return handleInputDatePickerFocus('end'); }, onError: function (reason) { return (endInputDatePickerErrorRef.current = reason); }, shouldDisableYear: handleInputDatePickerShouldDisableYear }))))),
|
|
9346
9330
|
!formColWithHelperText &&
|
|
9347
9331
|
(helperText ||
|
|
@@ -9385,11 +9369,11 @@ var FormYearPicker = React.forwardRef(function (_a, ref) {
|
|
|
9385
9369
|
* Ref
|
|
9386
9370
|
* ******************************************************************************************************************/
|
|
9387
9371
|
var ratingRef = React.useRef(null);
|
|
9388
|
-
var inputRef = React.useRef();
|
|
9389
|
-
var closeTimeoutRef = React.useRef();
|
|
9390
|
-
var mouseDownTimeRef = React.useRef();
|
|
9372
|
+
var inputRef = React.useRef(undefined);
|
|
9373
|
+
var closeTimeoutRef = React.useRef(undefined);
|
|
9374
|
+
var mouseDownTimeRef = React.useRef(undefined);
|
|
9391
9375
|
var inputDatePickerErrorRef = React.useRef(null);
|
|
9392
|
-
var openValueRef = React.useRef();
|
|
9376
|
+
var openValueRef = React.useRef(undefined);
|
|
9393
9377
|
/********************************************************************************************************************
|
|
9394
9378
|
* State
|
|
9395
9379
|
* ******************************************************************************************************************/
|
|
@@ -9664,11 +9648,11 @@ var getFinalValue = function (value) {
|
|
|
9664
9648
|
/********************************************************************************************************************
|
|
9665
9649
|
* Ref
|
|
9666
9650
|
* ******************************************************************************************************************/
|
|
9667
|
-
var startInputRef = React.useRef();
|
|
9668
|
-
var endInputRef = React.useRef();
|
|
9651
|
+
var startInputRef = React.useRef(undefined);
|
|
9652
|
+
var endInputRef = React.useRef(undefined);
|
|
9669
9653
|
var startInputDatePickerErrorRef = React.useRef(null);
|
|
9670
9654
|
var endInputDatePickerErrorRef = React.useRef(null);
|
|
9671
|
-
var openValueRef = React.useRef();
|
|
9655
|
+
var openValueRef = React.useRef(undefined);
|
|
9672
9656
|
/********************************************************************************************************************
|
|
9673
9657
|
* State
|
|
9674
9658
|
* ******************************************************************************************************************/
|
|
@@ -9979,10 +9963,10 @@ var getFinalValue = function (value) {
|
|
|
9979
9963
|
}, title: React.createElement("div", { style: { display: 'flex' } },
|
|
9980
9964
|
React.createElement(PrivateYearRangePicker, { selectType: selectType, minYear: minYear, maxYear: maxYear, disablePast: disablePast, disableFuture: disableFuture, value: value, onChange: handleContainerChange })) },
|
|
9981
9965
|
React.createElement(material.Grid, { container: true, alignItems: 'center' },
|
|
9982
|
-
React.createElement(material.Grid, {
|
|
9966
|
+
React.createElement(material.Grid, { flex: 1 },
|
|
9983
9967
|
React.createElement(PrivateInputDatePicker, __assign({}, privateInputDatePickerProps, { inputRef: startInputRef, value: valueDate[0], label: fromLabel, labelIcon: fromLabelIcon, error: error || fromError, focused: focused || (open && selectType === 'start'), onChange: function (v) { return handleInputDatePickerChange('start', v); }, onFocus: function () { return handleInputDatePickerFocus('start'); }, onError: function (reason) { return (startInputDatePickerErrorRef.current = reason); }, shouldDisableYear: handleInputDatePickerShouldDisableYear }))),
|
|
9984
|
-
React.createElement(material.Grid, {
|
|
9985
|
-
React.createElement(material.Grid, {
|
|
9968
|
+
React.createElement(material.Grid, { sx: { px: 1 } }, "~"),
|
|
9969
|
+
React.createElement(material.Grid, { flex: 1 },
|
|
9986
9970
|
React.createElement(PrivateInputDatePicker, __assign({}, privateInputDatePickerProps, { inputRef: endInputRef, value: valueDate[1], label: toLabel, labelIcon: toLabelIcon, error: error || toError, focused: focused || (open && selectType === 'end'), onChange: function (v) { return handleInputDatePickerChange('end', v); }, onFocus: function () { return handleInputDatePickerFocus('end'); }, onError: function (reason) { return (endInputDatePickerErrorRef.current = reason); }, shouldDisableYear: handleInputDatePickerShouldDisableYear }))))),
|
|
9987
9971
|
!formColWithHelperText &&
|
|
9988
9972
|
(helperText ||
|
|
@@ -10021,7 +10005,7 @@ FormYearRangePicker.displayName = 'FormYearRangePicker';var FormSwitch = React.f
|
|
|
10021
10005
|
/********************************************************************************************************************
|
|
10022
10006
|
* Ref
|
|
10023
10007
|
* ******************************************************************************************************************/
|
|
10024
|
-
var inputRef = React.useRef();
|
|
10008
|
+
var inputRef = React.useRef(undefined);
|
|
10025
10009
|
/********************************************************************************************************************
|
|
10026
10010
|
* State
|
|
10027
10011
|
* ******************************************************************************************************************/
|
|
@@ -10175,7 +10159,7 @@ FormSwitch.displayName = 'FormSwitch';var SearchGroupRow = function (_a) {
|
|
|
10175
10159
|
_b = _a.color,
|
|
10176
10160
|
//----------------------------------------------------------------------------------------------------------------
|
|
10177
10161
|
color = _b === void 0 ? 'primary' : _b, spacing = _a.spacing, focused = _a.focused, labelShrink = _a.labelShrink, autoSubmit = _a.autoSubmit, otherProps = __rest(_a, ["children", "className", "style", "sx", "color", "spacing", "focused", "labelShrink", "autoSubmit"]);
|
|
10178
|
-
var formRef = React.useRef();
|
|
10162
|
+
var formRef = React.useRef(undefined);
|
|
10179
10163
|
/********************************************************************************************************************
|
|
10180
10164
|
* Effect
|
|
10181
10165
|
* ******************************************************************************************************************/
|
|
@@ -10230,6 +10214,10 @@ FormSwitch.displayName = 'FormSwitch';var SearchGroupRow = function (_a) {
|
|
|
10230
10214
|
onValueChange: function () { },
|
|
10231
10215
|
// eslint-disable-next-line
|
|
10232
10216
|
onValueChangeByUser: function () { },
|
|
10217
|
+
onRequestSubmit: function () {
|
|
10218
|
+
var _a;
|
|
10219
|
+
(_a = formRef.current) === null || _a === void 0 ? void 0 : _a.submit();
|
|
10220
|
+
},
|
|
10233
10221
|
onRequestSearchSubmit: function () {
|
|
10234
10222
|
var _a;
|
|
10235
10223
|
if (autoSubmit) {
|
|
@@ -10264,7 +10252,7 @@ var templateObject_1;var isReactFragment = function (child) {
|
|
|
10264
10252
|
try {
|
|
10265
10253
|
return child.type.toString() === React.Fragment.toString();
|
|
10266
10254
|
}
|
|
10267
|
-
catch (
|
|
10255
|
+
catch (_a) {
|
|
10268
10256
|
return false;
|
|
10269
10257
|
}
|
|
10270
10258
|
};
|
|
@@ -10278,27 +10266,27 @@ var removeReactFragment = function (el) {
|
|
|
10278
10266
|
return removeReactFragment(child);
|
|
10279
10267
|
}
|
|
10280
10268
|
else {
|
|
10281
|
-
return React.createElement(material.Grid,
|
|
10269
|
+
return React.createElement(material.Grid, null, child);
|
|
10282
10270
|
}
|
|
10283
10271
|
});
|
|
10284
10272
|
}
|
|
10285
10273
|
else {
|
|
10286
|
-
return
|
|
10274
|
+
return React.createElement(StyledItem, { style: { display: el.type === FormHidden ? 'none' : undefined } }, el);
|
|
10287
10275
|
}
|
|
10288
10276
|
}
|
|
10289
10277
|
else {
|
|
10290
|
-
return
|
|
10278
|
+
return React.createElement(StyledItem, { style: { display: el.type === FormHidden ? 'none' : undefined } }, el);
|
|
10291
10279
|
}
|
|
10292
10280
|
}
|
|
10293
10281
|
else {
|
|
10294
|
-
return
|
|
10282
|
+
return React.createElement(StyledItem, { style: { display: el.type === FormHidden ? 'none' : undefined } }, el);
|
|
10295
10283
|
}
|
|
10296
10284
|
};
|
|
10297
10285
|
var SearchGroup = function (_a) {
|
|
10298
10286
|
var children = _a.children, className = _a.className, style = _a.style, sx = _a.sx,
|
|
10299
10287
|
//--------------------------------------------------------------------------------------------------------------------
|
|
10300
10288
|
max = _a.max, align = _a.align, hidden = _a.hidden, _b = _a.spacing, spacing = _b === void 0 ? 1 : _b;
|
|
10301
|
-
return (React.createElement(material.Grid, {
|
|
10289
|
+
return (React.createElement(material.Grid, { className: classNames(className, 'SearchGroup'), style: { flex: max ? 1 : undefined, display: hidden ? 'none' : undefined } },
|
|
10302
10290
|
React.createElement(material.Grid, { container: true, wrap: 'wrap', spacing: spacing, justifyContent: align === undefined || align === 'left' ? 'start' : align === 'center' ? 'center' : 'end', alignItems: 'start', style: style, sx: sx }, React.Children.map(children, function (child) {
|
|
10303
10291
|
if (React.isValidElement(child)) {
|
|
10304
10292
|
return removeReactFragment(child);
|
|
@@ -10318,7 +10306,7 @@ var SearchButton$1 = React.memo(SearchButton);var SearchMenuButton = function (_
|
|
|
10318
10306
|
/********************************************************************************************************************
|
|
10319
10307
|
* ID
|
|
10320
10308
|
* ******************************************************************************************************************/
|
|
10321
|
-
var children = _a.children, className = _a.className, initSx = _a.sx, menuList = _a.menuList
|
|
10309
|
+
var children = _a.children, className = _a.className, initSx = _a.sx, menuList = _a.menuList; _a.placement; var props = __rest(_a, ["children", "className", "sx", "menuList", "placement"]);
|
|
10322
10310
|
var buttonId = React.useId();
|
|
10323
10311
|
var menuId = React.useId();
|
|
10324
10312
|
/********************************************************************************************************************
|
|
@@ -10341,56 +10329,10 @@ var SearchButton$1 = React.memo(SearchButton);var SearchMenuButton = function (_
|
|
|
10341
10329
|
* Memo
|
|
10342
10330
|
* ******************************************************************************************************************/
|
|
10343
10331
|
var open = !!anchorEl;
|
|
10344
|
-
var anchorOrigin =
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
: placement === 'bottom-right'
|
|
10349
|
-
? { vertical: 'bottom', horizontal: 'right' }
|
|
10350
|
-
: placement === 'top'
|
|
10351
|
-
? { vertical: 'top', horizontal: 'center' }
|
|
10352
|
-
: placement === 'top-left'
|
|
10353
|
-
? { vertical: 'top', horizontal: 'left' }
|
|
10354
|
-
: placement === 'top-right'
|
|
10355
|
-
? { vertical: 'top', horizontal: 'right' }
|
|
10356
|
-
: placement === 'left'
|
|
10357
|
-
? { vertical: 'center', horizontal: 'left' }
|
|
10358
|
-
: placement === 'left-top'
|
|
10359
|
-
? { vertical: 'top', horizontal: 'left' }
|
|
10360
|
-
: placement === 'left-bottom'
|
|
10361
|
-
? { vertical: 'bottom', horizontal: 'left' }
|
|
10362
|
-
: placement === 'right'
|
|
10363
|
-
? { vertical: 'center', horizontal: 'right' }
|
|
10364
|
-
: placement === 'right-top'
|
|
10365
|
-
? { vertical: 'top', horizontal: 'right' }
|
|
10366
|
-
: placement === 'right-bottom'
|
|
10367
|
-
? { vertical: 'bottom', horizontal: 'right' }
|
|
10368
|
-
: { vertical: 'bottom', horizontal: 'center' };
|
|
10369
|
-
var transformOrigin = placement || 'bottom' === 'bottom'
|
|
10370
|
-
? { vertical: 'top', horizontal: 'center' }
|
|
10371
|
-
: placement === 'bottom-left'
|
|
10372
|
-
? { vertical: 'top', horizontal: 'left' }
|
|
10373
|
-
: placement === 'bottom-right'
|
|
10374
|
-
? { vertical: 'top', horizontal: 'right' }
|
|
10375
|
-
: placement === 'top'
|
|
10376
|
-
? { vertical: 'bottom', horizontal: 'center' }
|
|
10377
|
-
: placement === 'top-left'
|
|
10378
|
-
? { vertical: 'bottom', horizontal: 'left' }
|
|
10379
|
-
: placement === 'top-right'
|
|
10380
|
-
? { vertical: 'bottom', horizontal: 'right' }
|
|
10381
|
-
: placement === 'left'
|
|
10382
|
-
? { vertical: 'center', horizontal: 'right' }
|
|
10383
|
-
: placement === 'left-top'
|
|
10384
|
-
? { vertical: 'top', horizontal: 'right' }
|
|
10385
|
-
: placement === 'left-bottom'
|
|
10386
|
-
? { vertical: 'bottom', horizontal: 'right' }
|
|
10387
|
-
: placement === 'right'
|
|
10388
|
-
? { vertical: 'center', horizontal: 'left' }
|
|
10389
|
-
: placement === 'right-top'
|
|
10390
|
-
? { vertical: 'top', horizontal: 'left' }
|
|
10391
|
-
: placement === 'right-bottom'
|
|
10392
|
-
? { vertical: 'bottom', horizontal: 'left' }
|
|
10393
|
-
: { vertical: 'top', horizontal: 'center' };
|
|
10332
|
+
var anchorOrigin = { vertical: 'bottom', horizontal: 'center' }
|
|
10333
|
+
;
|
|
10334
|
+
var transformOrigin = { vertical: 'top', horizontal: 'center' }
|
|
10335
|
+
;
|
|
10394
10336
|
/********************************************************************************************************************
|
|
10395
10337
|
* Render
|
|
10396
10338
|
* ******************************************************************************************************************/
|