@atlaskit/link-picker 1.16.4 → 1.16.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/link-picker
2
2
 
3
+ ## 1.16.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3a35da6c331`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a35da6c331) - DTR-825 ED-9775: added jamfselfservice:// to whitelistedURLPatterns
8
+
3
9
  ## 1.16.4
4
10
 
5
11
  ### Patch Changes
@@ -10,13 +10,18 @@ exports.normalizeUrl = normalizeUrl;
10
10
 
11
11
  var _linkifyIt = _interopRequireDefault(require("linkify-it"));
12
12
 
13
+ /**
14
+ * This file has been duplicated in packages/editor/adf-schema/src/utils/url.ts
15
+ * Any changes made here should be mirrored there.
16
+ */
13
17
  var linkify = (0, _linkifyIt.default)();
14
18
  linkify.add('sourcetree:', 'http:');
19
+ linkify.add('jamfselfservice:', 'http:');
15
20
  var tlds = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
16
21
  var tlds2Char = 'a[cdefgilmnoqrtuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrtuvwxyz]|n[acefgilopruz]|om|p[aefghkmnrtw]|qa|r[eosuw]|s[abcdegijklmnrtuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
17
22
  tlds.push(tlds2Char);
18
23
  linkify.tlds(tlds, false);
19
- var whitelistedURLPatterns = [/^https?:\/\/[^\s]*$/im, /^ftps?:\/\//im, /^\//im, /^mailto:/im, /^skype:/im, /^callto:[^\s]*$/im, /^facetime:[^\s]*$/im, /^git:/im, /^irc6?:/im, /^news:/im, /^nntp:/im, /^feed:/im, /^cvs:/im, /^svn:/im, /^mvn:/im, /^ssh:/im, /^scp:\/\//im, /^sftp:\/\//im, /^itms:/im, /^notes:/im, /^hipchat:\/\//im, /^sourcetree:/im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^whatsapp:/im, /^slack:/im, /^sips?:/im, /^magnet:/im, /^foo:/im, /^#/im];
24
+ var whitelistedURLPatterns = [/^https?:\/\/[^\s]*$/im, /^ftps?:\/\//im, /^jamfselfservice:\/\/[^\s]*$/im, /^\//im, /^mailto:/im, /^skype:/im, /^callto:[^\s]*$/im, /^facetime:[^\s]*$/im, /^git:/im, /^irc6?:/im, /^news:/im, /^nntp:/im, /^feed:/im, /^cvs:/im, /^svn:/im, /^mvn:/im, /^ssh:/im, /^scp:\/\//im, /^sftp:\/\//im, /^itms:/im, /^notes:/im, /^hipchat:\/\//im, /^sourcetree:/im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^whatsapp:/im, /^slack:/im, /^sips?:/im, /^magnet:/im, /^foo:/im, /^#/im];
20
25
 
21
26
  var normaliseLinkHref = function normaliseLinkHref(url) {
22
27
  var match = getLinkMatch(url);
@@ -37,7 +42,7 @@ var getLinkMatch = function getLinkMatch(str) {
37
42
  return match && match.length > 0 && match[0].index === 0 && match[0].lastIndex === str.trim().length ? match[0] : null;
38
43
  };
39
44
 
40
- var LINK_REGEXP = /(https?|ftp):\/\/[^\s]+/;
45
+ var LINK_REGEXP = /(https?|ftp|jamfselfservice):\/\/[^\s]+/;
41
46
 
42
47
  var linkifyMatch = function linkifyMatch(text) {
43
48
  var matches = [];
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "sideEffects": false
5
5
  }
@@ -1,11 +1,16 @@
1
+ /**
2
+ * This file has been duplicated in packages/editor/adf-schema/src/utils/url.ts
3
+ * Any changes made here should be mirrored there.
4
+ */
1
5
  import LinkifyIt from 'linkify-it';
2
6
  const linkify = LinkifyIt();
3
7
  linkify.add('sourcetree:', 'http:');
8
+ linkify.add('jamfselfservice:', 'http:');
4
9
  const tlds = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
5
10
  const tlds2Char = 'a[cdefgilmnoqrtuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrtuvwxyz]|n[acefgilopruz]|om|p[aefghkmnrtw]|qa|r[eosuw]|s[abcdegijklmnrtuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
6
11
  tlds.push(tlds2Char);
7
12
  linkify.tlds(tlds, false);
8
- const whitelistedURLPatterns = [/^https?:\/\/[^\s]*$/im, /^ftps?:\/\//im, /^\//im, /^mailto:/im, /^skype:/im, /^callto:[^\s]*$/im, /^facetime:[^\s]*$/im, /^git:/im, /^irc6?:/im, /^news:/im, /^nntp:/im, /^feed:/im, /^cvs:/im, /^svn:/im, /^mvn:/im, /^ssh:/im, /^scp:\/\//im, /^sftp:\/\//im, /^itms:/im, /^notes:/im, /^hipchat:\/\//im, /^sourcetree:/im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^whatsapp:/im, /^slack:/im, /^sips?:/im, /^magnet:/im, /^foo:/im, /^#/im];
13
+ const whitelistedURLPatterns = [/^https?:\/\/[^\s]*$/im, /^ftps?:\/\//im, /^jamfselfservice:\/\/[^\s]*$/im, /^\//im, /^mailto:/im, /^skype:/im, /^callto:[^\s]*$/im, /^facetime:[^\s]*$/im, /^git:/im, /^irc6?:/im, /^news:/im, /^nntp:/im, /^feed:/im, /^cvs:/im, /^svn:/im, /^mvn:/im, /^ssh:/im, /^scp:\/\//im, /^sftp:\/\//im, /^itms:/im, /^notes:/im, /^hipchat:\/\//im, /^sourcetree:/im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^whatsapp:/im, /^slack:/im, /^sips?:/im, /^magnet:/im, /^foo:/im, /^#/im];
9
14
 
10
15
  const normaliseLinkHref = url => {
11
16
  const match = getLinkMatch(url);
@@ -26,7 +31,7 @@ const getLinkMatch = str => {
26
31
  return match && match.length > 0 && match[0].index === 0 && match[0].lastIndex === str.trim().length ? match[0] : null;
27
32
  };
28
33
 
29
- const LINK_REGEXP = /(https?|ftp):\/\/[^\s]+/;
34
+ const LINK_REGEXP = /(https?|ftp|jamfselfservice):\/\/[^\s]+/;
30
35
 
31
36
  const linkifyMatch = text => {
32
37
  const matches = [];
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "sideEffects": false
5
5
  }
@@ -1,11 +1,16 @@
1
+ /**
2
+ * This file has been duplicated in packages/editor/adf-schema/src/utils/url.ts
3
+ * Any changes made here should be mirrored there.
4
+ */
1
5
  import LinkifyIt from 'linkify-it';
2
6
  var linkify = LinkifyIt();
3
7
  linkify.add('sourcetree:', 'http:');
8
+ linkify.add('jamfselfservice:', 'http:');
4
9
  var tlds = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
5
10
  var tlds2Char = 'a[cdefgilmnoqrtuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrtuvwxyz]|n[acefgilopruz]|om|p[aefghkmnrtw]|qa|r[eosuw]|s[abcdegijklmnrtuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
6
11
  tlds.push(tlds2Char);
7
12
  linkify.tlds(tlds, false);
8
- var whitelistedURLPatterns = [/^https?:\/\/[^\s]*$/im, /^ftps?:\/\//im, /^\//im, /^mailto:/im, /^skype:/im, /^callto:[^\s]*$/im, /^facetime:[^\s]*$/im, /^git:/im, /^irc6?:/im, /^news:/im, /^nntp:/im, /^feed:/im, /^cvs:/im, /^svn:/im, /^mvn:/im, /^ssh:/im, /^scp:\/\//im, /^sftp:\/\//im, /^itms:/im, /^notes:/im, /^hipchat:\/\//im, /^sourcetree:/im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^whatsapp:/im, /^slack:/im, /^sips?:/im, /^magnet:/im, /^foo:/im, /^#/im];
13
+ var whitelistedURLPatterns = [/^https?:\/\/[^\s]*$/im, /^ftps?:\/\//im, /^jamfselfservice:\/\/[^\s]*$/im, /^\//im, /^mailto:/im, /^skype:/im, /^callto:[^\s]*$/im, /^facetime:[^\s]*$/im, /^git:/im, /^irc6?:/im, /^news:/im, /^nntp:/im, /^feed:/im, /^cvs:/im, /^svn:/im, /^mvn:/im, /^ssh:/im, /^scp:\/\//im, /^sftp:\/\//im, /^itms:/im, /^notes:/im, /^hipchat:\/\//im, /^sourcetree:/im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^whatsapp:/im, /^slack:/im, /^sips?:/im, /^magnet:/im, /^foo:/im, /^#/im];
9
14
 
10
15
  var normaliseLinkHref = function normaliseLinkHref(url) {
11
16
  var match = getLinkMatch(url);
@@ -26,7 +31,7 @@ var getLinkMatch = function getLinkMatch(str) {
26
31
  return match && match.length > 0 && match[0].index === 0 && match[0].lastIndex === str.trim().length ? match[0] : null;
27
32
  };
28
33
 
29
- var LINK_REGEXP = /(https?|ftp):\/\/[^\s]+/;
34
+ var LINK_REGEXP = /(https?|ftp|jamfselfservice):\/\/[^\s]+/;
30
35
 
31
36
  var linkifyMatch = function linkifyMatch(text) {
32
37
  var matches = [];
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -61,8 +61,8 @@
61
61
  "devDependencies": {
62
62
  "@af/codegen": "*",
63
63
  "@atlaskit/activity-provider": "^2.3.2",
64
- "@atlaskit/adf-schema": "^24.0.0",
65
- "@atlaskit/adf-utils": "^17.1.4",
64
+ "@atlaskit/adf-schema": "^25.0.0",
65
+ "@atlaskit/adf-utils": "^18.0.0",
66
66
  "@atlaskit/docs": "*",
67
67
  "@atlaskit/link-analytics": "^2.0.0",
68
68
  "@atlaskit/link-provider": "^1.3.0",