@iobroker/adapter-react-v5 4.9.4 → 4.9.5

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.
@@ -155,7 +155,7 @@ declare class Utils {
155
155
  /**
156
156
  * Copy text to the clipboard.
157
157
  */
158
- static copyToClipboard(text: string, e: Event): boolean;
158
+ static copyToClipboard(text: string, e?: Event): boolean;
159
159
  /**
160
160
  * Gets the extension of a file name.
161
161
  * @param fileName the file name.
@@ -873,8 +873,10 @@ class Utils {
873
873
  * Copy text to the clipboard.
874
874
  */
875
875
  static copyToClipboard(text, e) {
876
- e && e.stopPropagation();
877
- e && e.preventDefault();
876
+ if (e) {
877
+ e.stopPropagation();
878
+ e.preventDefault();
879
+ }
878
880
  return (0, CopyToClipboard_1.default)(text);
879
881
  }
880
882
  /**
package/README.md CHANGED
@@ -670,6 +670,9 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
670
670
  -->
671
671
 
672
672
  ## Changelog
673
+ ### 4.9.5 (2024-01-01)
674
+ * (foxriver76) make `copyToClipboard` event parameter optional
675
+
673
676
  ### 4.9.4 (2024-01-01)
674
677
  * (foxriver76) try to fix `SelectID` scrolling
675
678
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/adapter-react-v5",
3
- "version": "4.9.4",
3
+ "version": "4.9.5",
4
4
  "description": "React classes to develop admin interfaces for ioBroker with react.",
5
5
  "author": {
6
6
  "name": "Denis Haev (bluefox)",