@conveyorhq/arrow-ds 1.147.1 → 1.147.2

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@conveyorhq/arrow-ds",
3
3
  "author": "Conveyor",
4
4
  "license": "MIT",
5
- "version": "1.147.1",
5
+ "version": "1.147.2",
6
6
  "description": "Arrow Design System",
7
7
  "repository": "https://github.com/conveyor/arrow-ds",
8
8
  "publishConfig": {
@@ -20,7 +20,16 @@ const Markdown = ({ children, className, escapeHtml = true, skipHtml = false, re
20
20
  emphasis: TextRenderer("span"),
21
21
  }
22
22
  : undefined;
23
- const linkRenderer = ({ href, children: text, }) => (react_1.default.createElement("a", { href: href, target: "_blank", rel: "noopener noreferrer" }, text));
23
+ const linkRenderer = ({ href, children: text, }) => {
24
+ const externalLinkProps = {
25
+ target: "_blank",
26
+ rel: "noopener noreferrer",
27
+ };
28
+ if (href.startsWith("http")) {
29
+ return (react_1.default.createElement("a", { href: href, ...externalLinkProps }, text));
30
+ }
31
+ return react_1.default.createElement("a", { href: href }, text);
32
+ };
24
33
  return (react_1.default.createElement(react_markdown_1.default, { className: (0, classnames_1.default)((0, bem_1.bem)(cn), className), source: children, escapeHtml: escapeHtml, skipHtml: skipHtml, renderers: {
25
34
  ...plainTextRenderers,
26
35
  link: linkRenderer,
@@ -44,11 +44,22 @@ export const Markdown = ({
44
44
  }: {
45
45
  href: string;
46
46
  children: string;
47
- }) => (
48
- <a href={href} target="_blank" rel="noopener noreferrer">
49
- {text}
50
- </a>
51
- );
47
+ }) => {
48
+ const externalLinkProps = {
49
+ target: "_blank",
50
+ rel: "noopener noreferrer",
51
+ };
52
+
53
+ if (href.startsWith("http")) {
54
+ return (
55
+ <a href={href} {...externalLinkProps}>
56
+ {text}
57
+ </a>
58
+ );
59
+ }
60
+
61
+ return <a href={href}>{text}</a>;
62
+ };
52
63
 
53
64
  return (
54
65
  <ReactMarkdown
@@ -39,7 +39,7 @@ MarkdownEditor uses [react-codemirror](https://github.com/JedWatson/react-codemi
39
39
  import { MarkdownEditor } from "@conveyorhq/arrow-ds";
40
40
  ```
41
41
 
42
- export const exampleContent = `[Control: Third Party Access Review Control](/)\n## Third Party Access Reviews Procedure\n\n### Review Access Controls\n\n**To be performed at the following times:**\n* Whenever an ISMS Role Membership is added, updated, or deleted\n* Whenever an Access Control Review is due (Every 7 months)\n\n**In accordance with the following requirements:**\n\n**1. Review Access Grants to Information Systems**\n\nThe Security Team shall ensure that a review of access grants to information systems is completed. To perform an access review, either the Security Team or asset owners shall open the Security Management Tasks and review the access grants to ensure that:\n\n* All users of each information system have a business need for access\n* User permissions are set appropriately based on business needs\n* Multi-factor authentication status is appropriate for relevant systems\n\nThe Security Team or asset owners shall log the following information in the Security Management Tasks:\n\n* The date of the review\n* The information systems that were reviewed\n* The individual(s) who performed the review Notes from the review, including any changes to access as a result of the review\n* If the Security Team has delegated the access reviews to asset owners, the Security Team shall ensure that the reviews are completed.\n\n**2. Review privileged utility programs**\n\nThe Security Officer shall review the access levels of utility programs that can override system and application controls ("privileged utility programs") that have access to Sensitive/Regulated Information to ensure that the permissions granted to them continue to be appropriate.`;
42
+ export const exampleContent = `[Conveyor](https://www.conveyor.com)\n\n[Control: Third Party Access Review Control](/)\n## Third Party Access Reviews Procedure\n\n### Review Access Controls\n\n**To be performed at the following times:**\n* Whenever an ISMS Role Membership is added, updated, or deleted\n* Whenever an Access Control Review is due (Every 7 months)\n\n**In accordance with the following requirements:**\n\n**1. Review Access Grants to Information Systems**\n\nThe Security Team shall ensure that a review of access grants to information systems is completed. To perform an access review, either the Security Team or asset owners shall open the Security Management Tasks and review the access grants to ensure that:\n\n* All users of each information system have a business need for access\n* User permissions are set appropriately based on business needs\n* Multi-factor authentication status is appropriate for relevant systems\n\nThe Security Team or asset owners shall log the following information in the Security Management Tasks:\n\n* The date of the review\n* The information systems that were reviewed\n* The individual(s) who performed the review Notes from the review, including any changes to access as a result of the review\n* If the Security Team has delegated the access reviews to asset owners, the Security Team shall ensure that the reviews are completed.\n\n**2. Review privileged utility programs**\n\nThe Security Officer shall review the access levels of utility programs that can override system and application controls ("privileged utility programs") that have access to Sensitive/Regulated Information to ensure that the permissions granted to them continue to be appropriate.`;
43
43
 
44
44
  ## Basic usage
45
45