@atlaskit/smart-card 17.7.9 → 17.7.10
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 +6 -0
- package/dist/cjs/constants.js +1 -0
- package/dist/cjs/messages.js +5 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/actions/utils.js +12 -0
- package/dist/es2019/constants.js +1 -0
- package/dist/es2019/messages.js +5 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/utils.js +12 -0
- package/dist/esm/constants.js +1 -0
- package/dist/esm/messages.js +5 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/utils.js +11 -0
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/cjs/constants.js
CHANGED
|
@@ -156,6 +156,7 @@ exports.ActionName = ActionName;
|
|
|
156
156
|
|
|
157
157
|
(function (ActionName) {
|
|
158
158
|
ActionName["DeleteAction"] = "DeleteAction";
|
|
159
|
+
ActionName["EditAction"] = "EditAction";
|
|
159
160
|
ActionName["CustomAction"] = "CustomAction";
|
|
160
161
|
})(ActionName || (exports.ActionName = ActionName = {}));
|
|
161
162
|
|
package/dist/cjs/messages.js
CHANGED
|
@@ -43,6 +43,11 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
43
43
|
defaultMessage: 'Delete',
|
|
44
44
|
description: 'Allow a user to delete a link'
|
|
45
45
|
},
|
|
46
|
+
edit: {
|
|
47
|
+
id: 'fabric.linking.edit',
|
|
48
|
+
defaultMessage: 'Edit',
|
|
49
|
+
description: 'Allow a user to edit a link'
|
|
50
|
+
},
|
|
46
51
|
modified_by: {
|
|
47
52
|
id: 'fabric.linking.updated_by',
|
|
48
53
|
defaultMessage: 'Modified by {context}',
|
package/dist/cjs/version.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.DeleteAction = exports.CustomAction = void 0;
|
|
6
|
+
exports.EditAction = exports.DeleteAction = exports.CustomAction = void 0;
|
|
7
7
|
|
|
8
8
|
var _constants = require("../../../../constants");
|
|
9
9
|
|
|
@@ -16,5 +16,7 @@ var _utils = require("./utils");
|
|
|
16
16
|
// DataActions infer that the action depends on the data from the context.
|
|
17
17
|
var DeleteAction = (0, _utils.createUIAction)(_constants.ActionName.DeleteAction);
|
|
18
18
|
exports.DeleteAction = DeleteAction;
|
|
19
|
+
var EditAction = (0, _utils.createUIAction)(_constants.ActionName.EditAction);
|
|
20
|
+
exports.EditAction = EditAction;
|
|
19
21
|
var CustomAction = (0, _utils.createUIAction)(_constants.ActionName.CustomAction);
|
|
20
22
|
exports.CustomAction = CustomAction;
|
|
@@ -27,6 +27,8 @@ var _messages = require("../../../../messages");
|
|
|
27
27
|
|
|
28
28
|
var _cross = _interopRequireDefault(require("@atlaskit/icon/glyph/cross"));
|
|
29
29
|
|
|
30
|
+
var _edit = _interopRequireDefault(require("@atlaskit/icon/glyph/edit"));
|
|
31
|
+
|
|
30
32
|
var _actionMappings;
|
|
31
33
|
|
|
32
34
|
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); }
|
|
@@ -50,6 +52,16 @@ var actionMappings = (_actionMappings = {}, (0, _defineProperty2.default)(_actio
|
|
|
50
52
|
}),
|
|
51
53
|
toolTipMessage: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.delete)
|
|
52
54
|
}
|
|
55
|
+
}), (0, _defineProperty2.default)(_actionMappings, _constants.ActionName.EditAction, {
|
|
56
|
+
component: _action.default,
|
|
57
|
+
props: {
|
|
58
|
+
testId: 'smart-action-edit-action',
|
|
59
|
+
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.edit),
|
|
60
|
+
icon: /*#__PURE__*/_react.default.createElement(_edit.default, {
|
|
61
|
+
label: "Edit"
|
|
62
|
+
}),
|
|
63
|
+
toolTipMessage: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.edit)
|
|
64
|
+
}
|
|
53
65
|
}), _actionMappings);
|
|
54
66
|
|
|
55
67
|
var getContextKey = function getContextKey(name) {
|
package/dist/es2019/constants.js
CHANGED
package/dist/es2019/messages.js
CHANGED
|
@@ -35,6 +35,11 @@ export const messages = defineMessages({
|
|
|
35
35
|
defaultMessage: 'Delete',
|
|
36
36
|
description: 'Allow a user to delete a link'
|
|
37
37
|
},
|
|
38
|
+
edit: {
|
|
39
|
+
id: 'fabric.linking.edit',
|
|
40
|
+
defaultMessage: 'Edit',
|
|
41
|
+
description: 'Allow a user to edit a link'
|
|
42
|
+
},
|
|
38
43
|
modified_by: {
|
|
39
44
|
id: 'fabric.linking.updated_by',
|
|
40
45
|
defaultMessage: 'Modified by {context}',
|
package/dist/es2019/version.json
CHANGED
|
@@ -6,4 +6,5 @@ import { createUIAction } from './utils'; // Attention: Keep the export name and
|
|
|
6
6
|
// DataActions infer that the action depends on the data from the context.
|
|
7
7
|
|
|
8
8
|
export const DeleteAction = createUIAction(ActionName.DeleteAction);
|
|
9
|
+
export const EditAction = createUIAction(ActionName.EditAction);
|
|
9
10
|
export const CustomAction = createUIAction(ActionName.CustomAction);
|
|
@@ -6,6 +6,7 @@ import Action from './action';
|
|
|
6
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
7
|
import { messages } from '../../../../messages';
|
|
8
8
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
9
|
+
import EditIcon from '@atlaskit/icon/glyph/edit';
|
|
9
10
|
const actionMappings = {
|
|
10
11
|
[ActionName.CustomAction]: {
|
|
11
12
|
component: Action,
|
|
@@ -21,6 +22,17 @@ const actionMappings = {
|
|
|
21
22
|
}),
|
|
22
23
|
toolTipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.delete)
|
|
23
24
|
}
|
|
25
|
+
},
|
|
26
|
+
[ActionName.EditAction]: {
|
|
27
|
+
component: Action,
|
|
28
|
+
props: {
|
|
29
|
+
testId: 'smart-action-edit-action',
|
|
30
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.edit),
|
|
31
|
+
icon: /*#__PURE__*/React.createElement(EditIcon, {
|
|
32
|
+
label: "Edit"
|
|
33
|
+
}),
|
|
34
|
+
toolTipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.edit)
|
|
35
|
+
}
|
|
24
36
|
}
|
|
25
37
|
};
|
|
26
38
|
|
package/dist/esm/constants.js
CHANGED
package/dist/esm/messages.js
CHANGED
|
@@ -35,6 +35,11 @@ export var messages = defineMessages({
|
|
|
35
35
|
defaultMessage: 'Delete',
|
|
36
36
|
description: 'Allow a user to delete a link'
|
|
37
37
|
},
|
|
38
|
+
edit: {
|
|
39
|
+
id: 'fabric.linking.edit',
|
|
40
|
+
defaultMessage: 'Edit',
|
|
41
|
+
description: 'Allow a user to edit a link'
|
|
42
|
+
},
|
|
38
43
|
modified_by: {
|
|
39
44
|
id: 'fabric.linking.updated_by',
|
|
40
45
|
defaultMessage: 'Modified by {context}',
|
package/dist/esm/version.json
CHANGED
|
@@ -6,4 +6,5 @@ import { createUIAction } from './utils'; // Attention: Keep the export name and
|
|
|
6
6
|
// DataActions infer that the action depends on the data from the context.
|
|
7
7
|
|
|
8
8
|
export var DeleteAction = createUIAction(ActionName.DeleteAction);
|
|
9
|
+
export var EditAction = createUIAction(ActionName.EditAction);
|
|
9
10
|
export var CustomAction = createUIAction(ActionName.CustomAction);
|
|
@@ -14,6 +14,7 @@ import Action from './action';
|
|
|
14
14
|
import { FormattedMessage } from 'react-intl-next';
|
|
15
15
|
import { messages } from '../../../../messages';
|
|
16
16
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
17
|
+
import EditIcon from '@atlaskit/icon/glyph/edit';
|
|
17
18
|
var actionMappings = (_actionMappings = {}, _defineProperty(_actionMappings, ActionName.CustomAction, {
|
|
18
19
|
component: Action,
|
|
19
20
|
props: {}
|
|
@@ -27,6 +28,16 @@ var actionMappings = (_actionMappings = {}, _defineProperty(_actionMappings, Act
|
|
|
27
28
|
}),
|
|
28
29
|
toolTipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.delete)
|
|
29
30
|
}
|
|
31
|
+
}), _defineProperty(_actionMappings, ActionName.EditAction, {
|
|
32
|
+
component: Action,
|
|
33
|
+
props: {
|
|
34
|
+
testId: 'smart-action-edit-action',
|
|
35
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.edit),
|
|
36
|
+
icon: /*#__PURE__*/React.createElement(EditIcon, {
|
|
37
|
+
label: "Edit"
|
|
38
|
+
}),
|
|
39
|
+
toolTipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.edit)
|
|
40
|
+
}
|
|
30
41
|
}), _actionMappings);
|
|
31
42
|
|
|
32
43
|
var getContextKey = function getContextKey(name) {
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageDescriptor } from 'react-intl-next';
|
|
2
|
-
export declare type MessageKey = 'cannot_find_link' | 'click_to_join' | 'connect_link_account' | 'created_by' | 'created_on' | 'delete' | 'modified_by' | 'modified_on' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'restricted_link' | 'request_access' | 'request_denied';
|
|
2
|
+
export declare type MessageKey = 'cannot_find_link' | 'click_to_join' | 'connect_link_account' | 'created_by' | 'created_on' | 'delete' | 'edit' | 'modified_by' | 'modified_on' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'restricted_link' | 'request_access' | 'request_denied';
|
|
3
3
|
declare type Messages = {
|
|
4
4
|
[K in MessageKey]: MessageDescriptor;
|
|
5
5
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ActionProps } from './action/types';
|
|
3
3
|
export declare const DeleteAction: import("react").FC<ActionProps>;
|
|
4
|
+
export declare const EditAction: import("react").FC<ActionProps>;
|
|
4
5
|
export declare const CustomAction: import("react").FC<ActionProps>;
|