@appquality/unguess-design-system 2.10.61 → 2.10.62

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v2.10.62 (Fri Jul 22 2022)
2
+
3
+ #### ⚠️ Pushed to `master`
4
+
5
+ - fix(editor): Trigger save on ctrl+click or cmd+click ([@cannarocks](https://github.com/cannarocks))
6
+
7
+ #### Authors: 1
8
+
9
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
10
+
11
+ ---
12
+
1
13
  # v2.10.61 (Fri Jul 22 2022)
2
14
 
3
15
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -1294,11 +1294,11 @@ var EditorContainer = styled__default["default"].div(templateObject_1$R || (temp
1294
1294
  - Simple text input, use textarea instead.
1295
1295
  */
1296
1296
  var Editor = function (_a) {
1297
- var onSave = _a.onSave, headerTitle = _a.headerTitle, footerSaveText = _a.footerSaveText, props = __rest(_a, ["onSave", "headerTitle", "footerSaveText"]);
1298
- var children = props.children, placeholderOptions = props.placeholderOptions, hasInlineMenu = props.hasInlineMenu, bubbleOptions = props.bubbleOptions;
1297
+ var onSave = _a.onSave, headerTitle = _a.headerTitle, footerSaveText = _a.footerSaveText, placeholderOptions = _a.placeholderOptions, props = __rest(_a, ["onSave", "headerTitle", "footerSaveText", "placeholderOptions"]);
1298
+ var children = props.children, hasInlineMenu = props.hasInlineMenu, bubbleOptions = props.bubbleOptions;
1299
1299
  var _b = React.useState(), activeEditor = _b[0], setActiveEditor = _b[1];
1300
1300
  var onKeyDown = function (event) {
1301
- if (event.ctrlKey && event.key === "Enter") {
1301
+ if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
1302
1302
  if (onSave && activeEditor)
1303
1303
  onSave(activeEditor);
1304
1304
  }
@@ -1315,7 +1315,7 @@ var Editor = function (_a) {
1315
1315
  } }, placeholderOptions)),
1316
1316
  ], content: children || "", editorProps: {
1317
1317
  handleKeyDown: function (view, event) {
1318
- if (event.ctrlKey && event.key === "Enter") {
1318
+ if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
1319
1319
  return true;
1320
1320
  }
1321
1321
  return false;
@@ -12,5 +12,5 @@ import { PropsWithChildren } from "react";
12
12
  Not for this:
13
13
  - Simple text input, use textarea instead.
14
14
  */
15
- declare const Editor: ({ onSave, headerTitle, footerSaveText, ...props }: PropsWithChildren<EditorArgs>) => JSX.Element | null;
15
+ declare const Editor: ({ onSave, headerTitle, footerSaveText, placeholderOptions, ...props }: PropsWithChildren<EditorArgs>) => JSX.Element | null;
16
16
  export { Editor };
@@ -7,5 +7,5 @@ interface EditorStoryArgs extends EditorArgs {
7
7
  export declare const Default: Story<EditorStoryArgs>;
8
8
  export declare const Placeholder: Story<EditorStoryArgs>;
9
9
  export declare const BubbleMenu: Story<EditorStoryArgs>;
10
- declare const _default: ComponentMeta<({ onSave, headerTitle, footerSaveText, ...props }: import("react").PropsWithChildren<EditorArgs>) => JSX.Element | null>;
10
+ declare const _default: ComponentMeta<({ onSave, headerTitle, footerSaveText, placeholderOptions, ...props }: import("react").PropsWithChildren<EditorArgs>) => JSX.Element | null>;
11
11
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.10.61",
3
+ "version": "2.10.62",
4
4
  "dependencies": {
5
5
  "@tiptap/extension-bubble-menu": "^2.0.0-beta.61",
6
6
  "@tiptap/extension-placeholder": "^2.0.0-beta.53",