@cakemail-org/ui-components-v2 2.0.89 → 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.
@@ -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";
@@ -5,6 +5,7 @@ export type TInlineTextEdit = {
5
5
  tooltipTitle: string;
6
6
  tooltipPlacement?: TTooltipPlacement;
7
7
  value?: string;
8
+ defaultValue?: string;
8
9
  placeholder?: string;
9
10
  name?: string;
10
11
  onChange: TTextFieldChange;
package/dist/cjs/index.js CHANGED
@@ -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";
@@ -5,6 +5,7 @@ export type TInlineTextEdit = {
5
5
  tooltipTitle: string;
6
6
  tooltipPlacement?: TTooltipPlacement;
7
7
  value?: string;
8
+ defaultValue?: string;
8
9
  placeholder?: string;
9
10
  name?: string;
10
11
  onChange: TTextFieldChange;
package/dist/esm/index.js CHANGED
@@ -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 &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.0.89",
3
+ "version": "2.0.90",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",