@connectif/ui-components 2.0.4 → 2.0.6

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.
@@ -4,6 +4,10 @@ export type TableCellCopyProps = TableCellProps & {
4
4
  * Text to show
5
5
  */
6
6
  text: string;
7
+ /**
8
+ * Text to be copied. If it doesn't exists, text will be used instead
9
+ */
10
+ textToCopy?: string;
7
11
  };
8
- declare const TableCellCopy: ({ text, ...rest }: TableCellCopyProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const TableCellCopy: ({ text, textToCopy, ...rest }: TableCellCopyProps) => import("react/jsx-runtime").JSX.Element;
9
13
  export default TableCellCopy;
package/dist/index.js CHANGED
@@ -22657,11 +22657,9 @@ var TextEditor = function TextEditor2({
22657
22657
  );
22658
22658
  const onTextChange = React67.useCallback(() => {
22659
22659
  if (editorRef.current) {
22660
- onChange(
22661
- !isCodeEditorDirty ? contentValue : editorRef.current?.getContent()
22662
- );
22660
+ onChange(editorRef.current?.getContent());
22663
22661
  }
22664
- }, [contentValue, isCodeEditorDirty, onChange]);
22662
+ }, [onChange]);
22665
22663
  const onTextEditorDirty = React67.useCallback(
22666
22664
  (textEditorDirty) => {
22667
22665
  editorRef.current?.setDirty(textEditorDirty);
@@ -25315,12 +25313,12 @@ var TableCell_default = TableCell;
25315
25313
  // src/components/table/TableCellCopy.tsx
25316
25314
  import * as React83 from "react";
25317
25315
  import { jsx as jsx156 } from "react/jsx-runtime";
25318
- var TableCellCopy = ({ text, ...rest }) => {
25316
+ var TableCellCopy = ({ text, textToCopy, ...rest }) => {
25319
25317
  const { t } = useTranslation();
25320
25318
  const [isCopied, setIsCopied] = React83.useState(false);
25321
25319
  const [showIcon, setShowIcon] = React83.useState(false);
25322
25320
  const manageButtonClicked = () => {
25323
- void navigator.clipboard.writeText(text);
25321
+ void navigator.clipboard.writeText(textToCopy ?? text);
25324
25322
  if (isCopied) {
25325
25323
  return;
25326
25324
  }