@simoncomputing/mui-bueno-v2 0.20.1 → 0.21.1

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
@@ -11,6 +11,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
  - Minor increment --> singlular/minor changes. Minimal breaking changes.
12
12
  - Patch increment --> singlular/minor changes. Zero breaking changes.
13
13
 
14
+ ## [0.21.1] - 2025-12-18
15
+
16
+ ### Changed
17
+
18
+ - `CitationField`
19
+ - Editor will now update formik value periodically, rather than just waiting until the field blurs, to allow for autosaving
20
+
21
+ ## [0.21.0] - 2025-12-18
22
+
23
+ ### Changed
24
+
25
+ - `Header`, `Footer`, `MenuButton`, `Drawer`, `Tabs`
26
+ - Renamed `MenuOption.externalLink` to `MenuOption.externalUrl`
27
+ - Added `MenuOption.openInNewTab` to allow links to be opened in a new tab. Only for internal app links (`MenuOption.path`), as external links (`MenuOption.externalUrl`) will always open in a new tab.
28
+
29
+ ### Fixed
30
+
31
+ - `Header`, `Footer`, `MenuButton`, `Drawer`, `Tabs`
32
+ - Fixed `MenuOption.externalLink` opening in current tab when `onClick` is not defined. These should always open in a new/separate tab.
33
+
14
34
  ## [0.20.1] - 2025-12-18
15
35
 
16
36
  ### Changed
@@ -69,9 +69,9 @@ export type MenuOption = LabelWithIcon & {
69
69
  minPermission?: string | string[];
70
70
 
71
71
  /**
72
- * Performs the action when clicked (ex. toggle dark mode). Avoid using this to navigate (use `path` or `externalLink` instead).
72
+ * Performs the action when clicked (ex. toggle dark mode). Avoid using this to navigate (use `path` or `externalUrl` instead).
73
73
  *
74
- * When `path` or `externalLink` is defined, this onClick will run right before navigating. Use this to handle any non-navigation logic that needs to happen.
74
+ * When `path` or `externalUrl` is defined, this onClick will run right before navigating. Use this to handle any non-navigation logic that needs to happen.
75
75
  */
76
76
  onClick?: () => void; // TODO update this to allow for conditional navigating based on the return value (true = navigate, false = don't navigate)
77
77
  } & (
@@ -80,18 +80,23 @@ export type MenuOption = LabelWithIcon & {
80
80
  * Internal path that this navigation item should navigate to (ex '/home')
81
81
  */
82
82
  path: string;
83
- externalLink?: never;
83
+ externalUrl?: never;
84
+ openInNewTab?: boolean;
84
85
  }
85
86
  | {
86
87
  /**
87
- * External path that this navigation item should navigate to (ex 'https://www.google.com')
88
+ * External Url that opens in new tab. Can be external URL (ex 'https://www.google.com')
89
+ *
90
+ * IMPORTANT: Make sure to include the "https://" prefix!
88
91
  */
89
- externalLink: string;
92
+ externalUrl: string;
90
93
  path?: never;
94
+ openInNewTab?: true;
91
95
  }
92
96
  | {
93
97
  path?: never;
94
- externalLink?: never;
98
+ externalUrl?: never;
99
+ openInNewTab?: never;
95
100
  }
96
101
  );
97
102
 
@@ -34,6 +34,8 @@ export declare function renderValue<T>(options: SelectOption<T>[], value?: strin
34
34
  * onClick only --> button
35
35
  * path & onClick --> button (onClick will be executed before navigating to path)
36
36
  *
37
+ * The reason we want to use links where possible, is because links can be opened in a new tab.
38
+ *
37
39
  * @param menuOption -- menuOption to generate the button/link props for
38
40
  * @param naviate -- pass useNavigate's navigate fn. used when onClick & path are both present to navigate to the path
39
41
  * @param onClickCallback -- (optional) called at the end of the onClick in case any additional execution is needed (ex. closing a modal)
@@ -43,21 +45,29 @@ export declare function generateButtonLinkProps(menuOption: MenuOption, navigate
43
45
  component?: undefined;
44
46
  to?: undefined;
45
47
  href?: undefined;
48
+ target?: undefined;
49
+ rel?: undefined;
46
50
  } | {
47
51
  component: import('react').ForwardRefExoticComponent<import('react-router-dom').LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
48
52
  to: string;
49
53
  onClick?: undefined;
50
54
  href?: undefined;
55
+ target?: undefined;
56
+ rel?: undefined;
51
57
  } | {
58
+ component: string;
52
59
  href: string;
60
+ target: string;
61
+ rel: string;
53
62
  onClick?: undefined;
54
- component?: undefined;
55
63
  to?: undefined;
56
64
  } | {
57
65
  onClick?: undefined;
58
66
  component?: undefined;
59
67
  to?: undefined;
60
68
  href?: undefined;
69
+ target?: undefined;
70
+ rel?: undefined;
61
71
  };
62
72
  /**
63
73
  * Opens the specified URL in a new tab
@@ -1,5 +1,9 @@
1
1
  import { TypographyProps } from '@mui/material';
2
2
  import { ImageNodeAttributes } from 'mui-tiptap';
3
+ /**
4
+ * TODO: update syncing of formik value to be more often (not just on blur) using debounced solution from CitationField,
5
+ * in order to support this field being autosave-able.
6
+ */
3
7
  export type RichTextEditorProps = {
4
8
  /**
5
9
  * Name and ID of the component. Must match a key from initialValues in Formik.