@bluemarble/bm-components 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +28 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2919,7 +2919,7 @@ var _moment = require('moment'); var _moment2 = _interopRequireDefault(_moment);
|
|
|
2919
2919
|
var DefaultInput = (allProps) => {
|
|
2920
2920
|
var _a;
|
|
2921
2921
|
const {
|
|
2922
|
-
TextFieldProps:
|
|
2922
|
+
TextFieldProps: TextFieldProps3,
|
|
2923
2923
|
onSave,
|
|
2924
2924
|
name,
|
|
2925
2925
|
onUpdateValue,
|
|
@@ -2973,7 +2973,7 @@ var DefaultInput = (allProps) => {
|
|
|
2973
2973
|
defaultValue: formatDefaultValue(rowData == null ? void 0 : rowData[name]),
|
|
2974
2974
|
sx: __spreadValues({
|
|
2975
2975
|
width: fullWidth ? "100%" : "intial"
|
|
2976
|
-
},
|
|
2976
|
+
}, TextFieldProps3 == null ? void 0 : TextFieldProps3.sx),
|
|
2977
2977
|
inputProps: {
|
|
2978
2978
|
style: {
|
|
2979
2979
|
paddingBottom: 6,
|
|
@@ -2981,13 +2981,13 @@ var DefaultInput = (allProps) => {
|
|
|
2981
2981
|
},
|
|
2982
2982
|
onKeyDown
|
|
2983
2983
|
},
|
|
2984
|
-
InputProps: __spreadProps(__spreadValues({},
|
|
2984
|
+
InputProps: __spreadProps(__spreadValues({}, TextFieldProps3 == null ? void 0 : TextFieldProps3.InputProps), {
|
|
2985
2985
|
sx: __spreadValues({
|
|
2986
2986
|
fontSize: 14,
|
|
2987
2987
|
pl: 0.2
|
|
2988
|
-
}, (_a =
|
|
2988
|
+
}, (_a = TextFieldProps3 == null ? void 0 : TextFieldProps3.InputProps) == null ? void 0 : _a.sx)
|
|
2989
2989
|
})
|
|
2990
|
-
},
|
|
2990
|
+
}, TextFieldProps3)
|
|
2991
2991
|
);
|
|
2992
2992
|
};
|
|
2993
2993
|
|
|
@@ -2998,7 +2998,7 @@ var _reactimask = require('react-imask');
|
|
|
2998
2998
|
var InputMask = (allProps) => {
|
|
2999
2999
|
var _a;
|
|
3000
3000
|
const {
|
|
3001
|
-
TextFieldProps:
|
|
3001
|
+
TextFieldProps: TextFieldProps3,
|
|
3002
3002
|
onSave,
|
|
3003
3003
|
name,
|
|
3004
3004
|
rowData,
|
|
@@ -3045,7 +3045,7 @@ var InputMask = (allProps) => {
|
|
|
3045
3045
|
size: "small",
|
|
3046
3046
|
sx: __spreadValues({
|
|
3047
3047
|
width: fullWidth ? "100%" : "intial"
|
|
3048
|
-
},
|
|
3048
|
+
}, TextFieldProps3 == null ? void 0 : TextFieldProps3.sx),
|
|
3049
3049
|
inputProps: {
|
|
3050
3050
|
style: {
|
|
3051
3051
|
paddingBottom: 6,
|
|
@@ -3053,20 +3053,20 @@ var InputMask = (allProps) => {
|
|
|
3053
3053
|
},
|
|
3054
3054
|
onKeyDown
|
|
3055
3055
|
},
|
|
3056
|
-
InputProps: __spreadProps(__spreadValues({},
|
|
3056
|
+
InputProps: __spreadProps(__spreadValues({}, TextFieldProps3 == null ? void 0 : TextFieldProps3.InputProps), {
|
|
3057
3057
|
sx: __spreadValues({
|
|
3058
3058
|
fontSize: 14,
|
|
3059
3059
|
pl: 0.2
|
|
3060
|
-
}, (_a =
|
|
3060
|
+
}, (_a = TextFieldProps3 == null ? void 0 : TextFieldProps3.InputProps) == null ? void 0 : _a.sx)
|
|
3061
3061
|
})
|
|
3062
|
-
},
|
|
3062
|
+
}, TextFieldProps3)
|
|
3063
3063
|
);
|
|
3064
3064
|
};
|
|
3065
3065
|
|
|
3066
3066
|
// src/components/Grid/EditableTableCell/index.tsx
|
|
3067
3067
|
var EditableTableCell = (allProps) => {
|
|
3068
3068
|
const _a = allProps, {
|
|
3069
|
-
TextFieldProps:
|
|
3069
|
+
TextFieldProps: TextFieldProps3,
|
|
3070
3070
|
onSave = () => {
|
|
3071
3071
|
},
|
|
3072
3072
|
onCancel,
|
|
@@ -3356,6 +3356,7 @@ function FormikSelect(_a) {
|
|
|
3356
3356
|
|
|
3357
3357
|
|
|
3358
3358
|
|
|
3359
|
+
var _styles = require('@mui/material/styles');
|
|
3359
3360
|
function Autocomplete2(_a) {
|
|
3360
3361
|
var _b = _a, {
|
|
3361
3362
|
withFormik = true,
|
|
@@ -3396,23 +3397,29 @@ function FormikAutocomplete(_a) {
|
|
|
3396
3397
|
]);
|
|
3397
3398
|
const [_a2, ..._b2] = _formik.useField.call(void 0, {
|
|
3398
3399
|
name: props.name
|
|
3399
|
-
}), _c = _a2, { value
|
|
3400
|
+
}), _c = _a2, { value } = _c, field = __objRest(_c, ["value"]), [meta, { setValue }] = _b2;
|
|
3401
|
+
const theme = _styles.useTheme.call(void 0, );
|
|
3402
|
+
const isLegacyBehaviorDisabledTheme = _react.useMemo.call(void 0, () => {
|
|
3403
|
+
var _a3, _b3, _c2;
|
|
3404
|
+
return ((_c2 = (_b3 = (_a3 = theme.components) == null ? void 0 : _a3.MuiAutocomplete) == null ? void 0 : _b3.defaultProps) == null ? void 0 : _c2["data-legacy-behavior"]) === "disabled";
|
|
3405
|
+
}, [theme]);
|
|
3406
|
+
const isLegacyBehaviorDisabled = typeof (props == null ? void 0 : props["data-legacy-behavior"]) !== "undefined" ? props["data-legacy-behavior"] === "disabled" : isLegacyBehaviorDisabledTheme;
|
|
3400
3407
|
const defaultOption = _react.useMemo.call(void 0, () => {
|
|
3401
|
-
if (!option)
|
|
3402
|
-
return
|
|
3408
|
+
if (!option && isLegacyBehaviorDisabled)
|
|
3409
|
+
return value;
|
|
3403
3410
|
const key = option == null ? void 0 : option.key;
|
|
3404
3411
|
if (key)
|
|
3405
|
-
return props.options.find((option2) => option2[key] ===
|
|
3412
|
+
return props.options.find((option2) => option2[key] === value);
|
|
3406
3413
|
return props.options.find(
|
|
3407
|
-
(option2) => Object.values(option2)[0] ===
|
|
3414
|
+
(option2) => Object.values(option2)[0] === value
|
|
3408
3415
|
);
|
|
3409
|
-
}, [
|
|
3416
|
+
}, [value, option, props.options.find, isLegacyBehaviorDisabled]);
|
|
3410
3417
|
const onChange = (_, newValue) => {
|
|
3411
|
-
const
|
|
3418
|
+
const value2 = option == null ? void 0 : option.value;
|
|
3412
3419
|
if (getOptionValue) {
|
|
3413
3420
|
setValue(getOptionValue(newValue));
|
|
3414
|
-
} else if (
|
|
3415
|
-
setValue(newValue[
|
|
3421
|
+
} else if (value2) {
|
|
3422
|
+
setValue(newValue[value2]);
|
|
3416
3423
|
} else
|
|
3417
3424
|
setValue(newValue);
|
|
3418
3425
|
};
|
|
@@ -3449,7 +3456,7 @@ function FormikAutocomplete(_a) {
|
|
|
3449
3456
|
autoFocus: props.autoFocus
|
|
3450
3457
|
}), props.textFieldProps)
|
|
3451
3458
|
),
|
|
3452
|
-
|
|
3459
|
+
value: defaultOption || null,
|
|
3453
3460
|
onChange,
|
|
3454
3461
|
isOptionEqualToValue
|
|
3455
3462
|
}, props)
|