@connectif/ui-components 2.0.5 → 2.0.7

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
@@ -22720,10 +22720,6 @@ var TextEditor = function TextEditor2({
22720
22720
  icon: "sourcecode",
22721
22721
  onAction: () => {
22722
22722
  showCodeEditor();
22723
- const button = document.querySelector(
22724
- "button.tox-tbtn--enabled"
22725
- );
22726
- typeof button?.click === "function" && button.click();
22727
22723
  }
22728
22724
  });
22729
22725
  const setupProp = init?.setup;
@@ -25313,12 +25309,12 @@ var TableCell_default = TableCell;
25313
25309
  // src/components/table/TableCellCopy.tsx
25314
25310
  import * as React83 from "react";
25315
25311
  import { jsx as jsx156 } from "react/jsx-runtime";
25316
- var TableCellCopy = ({ text, ...rest }) => {
25312
+ var TableCellCopy = ({ text, textToCopy, ...rest }) => {
25317
25313
  const { t } = useTranslation();
25318
25314
  const [isCopied, setIsCopied] = React83.useState(false);
25319
25315
  const [showIcon, setShowIcon] = React83.useState(false);
25320
25316
  const manageButtonClicked = () => {
25321
- void navigator.clipboard.writeText(text);
25317
+ void navigator.clipboard.writeText(textToCopy ?? text);
25322
25318
  if (isCopied) {
25323
25319
  return;
25324
25320
  }