@cakemail-org/ui-components-v2 2.0.88 → 2.0.90
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/cjs/components/inlineTextEdit/index.d.ts +1 -1
- package/dist/cjs/components/inlineTextEdit/types.d.ts +1 -0
- package/dist/cjs/index.js +3 -3
- package/dist/esm/components/inlineTextEdit/index.d.ts +1 -1
- package/dist/esm/components/inlineTextEdit/types.d.ts +1 -0
- package/dist/esm/index.js +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./styles.scss";
|
|
3
3
|
import { TInlineTextEdit } from "./types";
|
|
4
|
-
export declare function InlineTextEdit({ children, disabled, tooltipTitle, tooltipPlacement, value, name, onChange, onTimeoutChange, onConfirm, onCancel, placeholder, showActionButtons, maxRows, maxLength }: TInlineTextEdit): React.JSX.Element;
|
|
4
|
+
export declare function InlineTextEdit({ children, disabled, tooltipTitle, tooltipPlacement, value, defaultValue, name, onChange, onTimeoutChange, onConfirm, onCancel, placeholder, showActionButtons, maxRows, maxLength }: TInlineTextEdit): React.JSX.Element;
|
|
5
5
|
export default InlineTextEdit;
|
|
6
6
|
export * from "./types";
|
package/dist/cjs/index.js
CHANGED
|
@@ -2756,7 +2756,7 @@ function modelToJson(model) {
|
|
|
2756
2756
|
obj[key] = value;
|
|
2757
2757
|
}
|
|
2758
2758
|
}
|
|
2759
|
-
else if (value) {
|
|
2759
|
+
else if (value != null) {
|
|
2760
2760
|
obj[key] = value;
|
|
2761
2761
|
}
|
|
2762
2762
|
});
|
|
@@ -10395,7 +10395,7 @@ styleInject(css_248z$5);
|
|
|
10395
10395
|
|
|
10396
10396
|
function InlineTextEdit(_a) {
|
|
10397
10397
|
var _b, _c;
|
|
10398
|
-
var children = _a.children, disabled = _a.disabled, tooltipTitle = _a.tooltipTitle, tooltipPlacement = _a.tooltipPlacement, value = _a.value, name = _a.name, onChange = _a.onChange, onTimeoutChange = _a.onTimeoutChange, onConfirm = _a.onConfirm, onCancel = _a.onCancel, placeholder = _a.placeholder, showActionButtons = _a.showActionButtons, maxRows = _a.maxRows, maxLength = _a.maxLength;
|
|
10398
|
+
var children = _a.children, disabled = _a.disabled, tooltipTitle = _a.tooltipTitle, tooltipPlacement = _a.tooltipPlacement, value = _a.value, defaultValue = _a.defaultValue, name = _a.name, onChange = _a.onChange, onTimeoutChange = _a.onTimeoutChange, onConfirm = _a.onConfirm, onCancel = _a.onCancel, placeholder = _a.placeholder, showActionButtons = _a.showActionButtons, maxRows = _a.maxRows, maxLength = _a.maxLength;
|
|
10399
10399
|
var _d = React.useState(false), editing = _d[0], setEditing = _d[1];
|
|
10400
10400
|
var id = React.useRef(Math.floor(Math.random() * 1000000000));
|
|
10401
10401
|
var spanRef = React.useRef(null);
|
|
@@ -10441,7 +10441,7 @@ function InlineTextEdit(_a) {
|
|
|
10441
10441
|
React.createElement(Tooltip, { title: tooltipTitle, arrow: true, placement: tooltipPlacement },
|
|
10442
10442
|
React.createElement(Box, { component: "span", className: "".concat(!children && placeholder ? "hasPlaceholder" : "", " pointer"), onClick: handleClick, style: { maxHeight: offsetHeightOfSpan * maxRows } }, children || placeholder)),
|
|
10443
10443
|
editing && React.createElement(Box, null,
|
|
10444
|
-
React.createElement(TextField, { disabled: disabled, inputProps: { maxLength: maxLength || 256 }, maxRows: maxRows, multiline: multiline, placeholder: placeholder, variant: "standard", name: name, style: { width: "".concat(offsetWidthOfSpan, "px") }, value: value, onChange: onChange, timeout: onTimeoutChange && {
|
|
10444
|
+
React.createElement(TextField, { disabled: disabled, inputProps: { maxLength: maxLength || 256 }, maxRows: maxRows, multiline: multiline, placeholder: placeholder, variant: "standard", name: name, style: { width: "".concat(offsetWidthOfSpan, "px") }, defaultValue: defaultValue, value: value, onChange: onChange, timeout: onTimeoutChange && {
|
|
10445
10445
|
callback: onTimeoutChange
|
|
10446
10446
|
} }),
|
|
10447
10447
|
showActionButtons &&
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./styles.scss";
|
|
3
3
|
import { TInlineTextEdit } from "./types";
|
|
4
|
-
export declare function InlineTextEdit({ children, disabled, tooltipTitle, tooltipPlacement, value, name, onChange, onTimeoutChange, onConfirm, onCancel, placeholder, showActionButtons, maxRows, maxLength }: TInlineTextEdit): React.JSX.Element;
|
|
4
|
+
export declare function InlineTextEdit({ children, disabled, tooltipTitle, tooltipPlacement, value, defaultValue, name, onChange, onTimeoutChange, onConfirm, onCancel, placeholder, showActionButtons, maxRows, maxLength }: TInlineTextEdit): React.JSX.Element;
|
|
5
5
|
export default InlineTextEdit;
|
|
6
6
|
export * from "./types";
|
package/dist/esm/index.js
CHANGED
|
@@ -2736,7 +2736,7 @@ function modelToJson(model) {
|
|
|
2736
2736
|
obj[key] = value;
|
|
2737
2737
|
}
|
|
2738
2738
|
}
|
|
2739
|
-
else if (value) {
|
|
2739
|
+
else if (value != null) {
|
|
2740
2740
|
obj[key] = value;
|
|
2741
2741
|
}
|
|
2742
2742
|
});
|
|
@@ -10375,7 +10375,7 @@ styleInject(css_248z$5);
|
|
|
10375
10375
|
|
|
10376
10376
|
function InlineTextEdit(_a) {
|
|
10377
10377
|
var _b, _c;
|
|
10378
|
-
var children = _a.children, disabled = _a.disabled, tooltipTitle = _a.tooltipTitle, tooltipPlacement = _a.tooltipPlacement, value = _a.value, name = _a.name, onChange = _a.onChange, onTimeoutChange = _a.onTimeoutChange, onConfirm = _a.onConfirm, onCancel = _a.onCancel, placeholder = _a.placeholder, showActionButtons = _a.showActionButtons, maxRows = _a.maxRows, maxLength = _a.maxLength;
|
|
10378
|
+
var children = _a.children, disabled = _a.disabled, tooltipTitle = _a.tooltipTitle, tooltipPlacement = _a.tooltipPlacement, value = _a.value, defaultValue = _a.defaultValue, name = _a.name, onChange = _a.onChange, onTimeoutChange = _a.onTimeoutChange, onConfirm = _a.onConfirm, onCancel = _a.onCancel, placeholder = _a.placeholder, showActionButtons = _a.showActionButtons, maxRows = _a.maxRows, maxLength = _a.maxLength;
|
|
10379
10379
|
var _d = useState(false), editing = _d[0], setEditing = _d[1];
|
|
10380
10380
|
var id = useRef(Math.floor(Math.random() * 1000000000));
|
|
10381
10381
|
var spanRef = useRef(null);
|
|
@@ -10421,7 +10421,7 @@ function InlineTextEdit(_a) {
|
|
|
10421
10421
|
React__default.createElement(Tooltip$1, { title: tooltipTitle, arrow: true, placement: tooltipPlacement },
|
|
10422
10422
|
React__default.createElement(Box$1, { component: "span", className: "".concat(!children && placeholder ? "hasPlaceholder" : "", " pointer"), onClick: handleClick, style: { maxHeight: offsetHeightOfSpan * maxRows } }, children || placeholder)),
|
|
10423
10423
|
editing && React__default.createElement(Box$1, null,
|
|
10424
|
-
React__default.createElement(TextField, { disabled: disabled, inputProps: { maxLength: maxLength || 256 }, maxRows: maxRows, multiline: multiline, placeholder: placeholder, variant: "standard", name: name, style: { width: "".concat(offsetWidthOfSpan, "px") }, value: value, onChange: onChange, timeout: onTimeoutChange && {
|
|
10424
|
+
React__default.createElement(TextField, { disabled: disabled, inputProps: { maxLength: maxLength || 256 }, maxRows: maxRows, multiline: multiline, placeholder: placeholder, variant: "standard", name: name, style: { width: "".concat(offsetWidthOfSpan, "px") }, defaultValue: defaultValue, value: value, onChange: onChange, timeout: onTimeoutChange && {
|
|
10425
10425
|
callback: onTimeoutChange
|
|
10426
10426
|
} }),
|
|
10427
10427
|
showActionButtons &&
|