@atlaskit/smart-card 26.15.1 → 26.15.3
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 +12 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +1 -1
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +14 -8
- package/dist/cjs/view/LinkUrl/LinkWarningModal/styled.js +12 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +1 -1
- package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +13 -8
- package/dist/es2019/view/LinkUrl/LinkWarningModal/styled.js +5 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +1 -1
- package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +13 -8
- package/dist/esm/view/LinkUrl/LinkWarningModal/styled.js +4 -0
- package/dist/types/view/LinkUrl/LinkWarningModal/index.d.ts +1 -0
- package/dist/types/view/LinkUrl/LinkWarningModal/styled.d.ts +1 -0
- package/dist/types-ts4.5/view/LinkUrl/LinkWarningModal/index.d.ts +1 -0
- package/dist/types-ts4.5/view/LinkUrl/LinkWarningModal/styled.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.15.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5ef68120bed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5ef68120bed) - fix for the padding issue on the Link Safety Warning Modal
|
|
8
|
+
|
|
9
|
+
## 26.15.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`3355d65ed83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3355d65ed83) - Fix duplicate WebpackChunkName for GlyphSubtask & GlyphSubtaskProgress"
|
|
14
|
+
|
|
3
15
|
## 26.15.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -269,7 +269,7 @@ var importIconMapper = (_importIconMapper = {}, (0, _defineProperty2.default)(_i
|
|
|
269
269
|
});
|
|
270
270
|
}), (0, _defineProperty2.default)(_importIconMapper, _constants.IconType.SubTasksProgress, function () {
|
|
271
271
|
return Promise.resolve().then(function () {
|
|
272
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "
|
|
272
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "glyphSubtaskProgress" */'@atlaskit/icon/glyph/subtask'));
|
|
273
273
|
});
|
|
274
274
|
}), _importIconMapper);
|
|
275
275
|
var getIconImportFn = function getIconImportFn(icon) {
|
|
@@ -11,9 +11,13 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
12
12
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
|
+
var _styled = require("./styled");
|
|
15
|
+
var _react2 = require("@emotion/react");
|
|
14
16
|
var _messages = require("../../../messages");
|
|
15
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
/** @jsx jsx */
|
|
20
|
+
|
|
17
21
|
var WarningModal = function WarningModal(props) {
|
|
18
22
|
var isOpen = props.isOpen,
|
|
19
23
|
unsafeLinkText = props.unsafeLinkText,
|
|
@@ -21,31 +25,33 @@ var WarningModal = function WarningModal(props) {
|
|
|
21
25
|
onClose = props.onClose,
|
|
22
26
|
onContinue = props.onContinue,
|
|
23
27
|
intl = props.intl;
|
|
24
|
-
var content =
|
|
28
|
+
var content = (0, _react2.jsx)(_modalDialog.ModalTransition, null, isOpen && (0, _react2.jsx)(_modalDialog.default, {
|
|
25
29
|
onClose: onClose,
|
|
26
30
|
testId: "link-with-safety-warning"
|
|
27
|
-
},
|
|
31
|
+
}, (0, _react2.jsx)(_modalDialog.ModalHeader, null, (0, _react2.jsx)(_modalDialog.ModalTitle, {
|
|
28
32
|
appearance: "warning"
|
|
29
|
-
},
|
|
33
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.check_this_link))), (0, _react2.jsx)(_modalDialog.ModalBody, null, (0, _react2.jsx)("div", {
|
|
34
|
+
css: _styled.breakWordsCss
|
|
35
|
+
}, url && unsafeLinkText && (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages.link_safety_warning_message, {
|
|
30
36
|
values: {
|
|
31
37
|
unsafeLinkText: unsafeLinkText,
|
|
32
38
|
a: function a() {
|
|
33
|
-
return
|
|
39
|
+
return (0, _react2.jsx)("a", {
|
|
34
40
|
href: url,
|
|
35
41
|
target: "_blank",
|
|
36
42
|
rel: "noopener noreferrer"
|
|
37
43
|
}, url);
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
|
-
}))),
|
|
46
|
+
})))), (0, _react2.jsx)(_modalDialog.ModalFooter, null, (0, _react2.jsx)(_standardButton.default, {
|
|
41
47
|
appearance: "subtle",
|
|
42
48
|
onClick: onClose
|
|
43
|
-
},
|
|
49
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.go_back)), (0, _react2.jsx)(_standardButton.default, {
|
|
44
50
|
appearance: "warning",
|
|
45
51
|
onClick: onContinue,
|
|
46
52
|
autoFocus: true
|
|
47
|
-
},
|
|
48
|
-
return intl ? content :
|
|
53
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.continue)))));
|
|
54
|
+
return intl ? content : (0, _react2.jsx)(_reactIntlNext.IntlProvider, {
|
|
49
55
|
locale: "en"
|
|
50
56
|
}, content);
|
|
51
57
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.breakWordsCss = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _templateObject;
|
|
11
|
+
var breakWordsCss = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n white-space: pre-line;\n word-break: break-all;\n"])));
|
|
12
|
+
exports.breakWordsCss = breakWordsCss;
|
package/dist/es2019/version.json
CHANGED
|
@@ -79,7 +79,7 @@ const importIconMapper = {
|
|
|
79
79
|
[IconType.PriorityUndefined]: () => import( /* webpackChunkName: "glyphUndefined" */'@atlaskit/icon/glyph/question'),
|
|
80
80
|
[IconType.ProgrammingLanguage]: () => import( /* webpackChunkName: "glyphProgrammingLanguage" */'@atlaskit/icon/glyph/code'),
|
|
81
81
|
[IconType.Subscriber]: () => import( /* webpackChunkName: "glyphSubscriber" */'@atlaskit/icon/glyph/people'),
|
|
82
|
-
[IconType.SubTasksProgress]: () => import( /* webpackChunkName: "
|
|
82
|
+
[IconType.SubTasksProgress]: () => import( /* webpackChunkName: "glyphSubtaskProgress" */'@atlaskit/icon/glyph/subtask')
|
|
83
83
|
};
|
|
84
84
|
const getIconImportFn = icon => importIconMapper[icon];
|
|
85
85
|
const importIcon = importFn => {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import Button from '@atlaskit/button/standard-button';
|
|
4
5
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
6
|
import { FormattedMessage, IntlProvider, injectIntl } from 'react-intl-next';
|
|
7
|
+
import { breakWordsCss } from './styled';
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
6
9
|
import { messages } from '../../../messages';
|
|
7
10
|
const WarningModal = props => {
|
|
8
11
|
const {
|
|
@@ -13,29 +16,31 @@ const WarningModal = props => {
|
|
|
13
16
|
onContinue,
|
|
14
17
|
intl
|
|
15
18
|
} = props;
|
|
16
|
-
const content =
|
|
19
|
+
const content = jsx(ModalTransition, null, isOpen && jsx(Modal, {
|
|
17
20
|
onClose: onClose,
|
|
18
21
|
testId: "link-with-safety-warning"
|
|
19
|
-
},
|
|
22
|
+
}, jsx(ModalHeader, null, jsx(ModalTitle, {
|
|
20
23
|
appearance: "warning"
|
|
21
|
-
},
|
|
24
|
+
}, jsx(FormattedMessage, messages.check_this_link))), jsx(ModalBody, null, jsx("div", {
|
|
25
|
+
css: breakWordsCss
|
|
26
|
+
}, url && unsafeLinkText && jsx(FormattedMessage, _extends({}, messages.link_safety_warning_message, {
|
|
22
27
|
values: {
|
|
23
28
|
unsafeLinkText: unsafeLinkText,
|
|
24
|
-
a: () =>
|
|
29
|
+
a: () => jsx("a", {
|
|
25
30
|
href: url,
|
|
26
31
|
target: "_blank",
|
|
27
32
|
rel: "noopener noreferrer"
|
|
28
33
|
}, url)
|
|
29
34
|
}
|
|
30
|
-
}))),
|
|
35
|
+
})))), jsx(ModalFooter, null, jsx(Button, {
|
|
31
36
|
appearance: "subtle",
|
|
32
37
|
onClick: onClose
|
|
33
|
-
},
|
|
38
|
+
}, jsx(FormattedMessage, messages.go_back)), jsx(Button, {
|
|
34
39
|
appearance: "warning",
|
|
35
40
|
onClick: onContinue,
|
|
36
41
|
autoFocus: true
|
|
37
|
-
},
|
|
38
|
-
return intl ? content :
|
|
42
|
+
}, jsx(FormattedMessage, messages.continue)))));
|
|
43
|
+
return intl ? content : jsx(IntlProvider, {
|
|
39
44
|
locale: "en"
|
|
40
45
|
}, content);
|
|
41
46
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -138,7 +138,7 @@ var importIconMapper = (_importIconMapper = {}, _defineProperty(_importIconMappe
|
|
|
138
138
|
}), _defineProperty(_importIconMapper, IconType.Subscriber, function () {
|
|
139
139
|
return import( /* webpackChunkName: "glyphSubscriber" */'@atlaskit/icon/glyph/people');
|
|
140
140
|
}), _defineProperty(_importIconMapper, IconType.SubTasksProgress, function () {
|
|
141
|
-
return import( /* webpackChunkName: "
|
|
141
|
+
return import( /* webpackChunkName: "glyphSubtaskProgress" */'@atlaskit/icon/glyph/subtask');
|
|
142
142
|
}), _importIconMapper);
|
|
143
143
|
var getIconImportFn = function getIconImportFn(icon) {
|
|
144
144
|
return importIconMapper[icon];
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import Button from '@atlaskit/button/standard-button';
|
|
4
5
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
6
|
import { FormattedMessage, IntlProvider, injectIntl } from 'react-intl-next';
|
|
7
|
+
import { breakWordsCss } from './styled';
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
6
9
|
import { messages } from '../../../messages';
|
|
7
10
|
var WarningModal = function WarningModal(props) {
|
|
8
11
|
var isOpen = props.isOpen,
|
|
@@ -11,31 +14,33 @@ var WarningModal = function WarningModal(props) {
|
|
|
11
14
|
onClose = props.onClose,
|
|
12
15
|
onContinue = props.onContinue,
|
|
13
16
|
intl = props.intl;
|
|
14
|
-
var content =
|
|
17
|
+
var content = jsx(ModalTransition, null, isOpen && jsx(Modal, {
|
|
15
18
|
onClose: onClose,
|
|
16
19
|
testId: "link-with-safety-warning"
|
|
17
|
-
},
|
|
20
|
+
}, jsx(ModalHeader, null, jsx(ModalTitle, {
|
|
18
21
|
appearance: "warning"
|
|
19
|
-
},
|
|
22
|
+
}, jsx(FormattedMessage, messages.check_this_link))), jsx(ModalBody, null, jsx("div", {
|
|
23
|
+
css: breakWordsCss
|
|
24
|
+
}, url && unsafeLinkText && jsx(FormattedMessage, _extends({}, messages.link_safety_warning_message, {
|
|
20
25
|
values: {
|
|
21
26
|
unsafeLinkText: unsafeLinkText,
|
|
22
27
|
a: function a() {
|
|
23
|
-
return
|
|
28
|
+
return jsx("a", {
|
|
24
29
|
href: url,
|
|
25
30
|
target: "_blank",
|
|
26
31
|
rel: "noopener noreferrer"
|
|
27
32
|
}, url);
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
|
-
}))),
|
|
35
|
+
})))), jsx(ModalFooter, null, jsx(Button, {
|
|
31
36
|
appearance: "subtle",
|
|
32
37
|
onClick: onClose
|
|
33
|
-
},
|
|
38
|
+
}, jsx(FormattedMessage, messages.go_back)), jsx(Button, {
|
|
34
39
|
appearance: "warning",
|
|
35
40
|
onClick: onContinue,
|
|
36
41
|
autoFocus: true
|
|
37
|
-
},
|
|
38
|
-
return intl ? content :
|
|
42
|
+
}, jsx(FormattedMessage, messages.continue)))));
|
|
43
|
+
return intl ? content : jsx(IntlProvider, {
|
|
39
44
|
locale: "en"
|
|
40
45
|
}, content);
|
|
41
46
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
export var breakWordsCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: pre-line;\n word-break: break-all;\n"])));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const breakWordsCss: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const breakWordsCss: import("@emotion/react").SerializedStyles;
|