@atlaskit/util-data-test 17.2.2 → 17.3.0
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 +23 -0
- package/dist/cjs/emoji/mock-emoji-resource.js +36 -0
- package/dist/cjs/emoji/mock-non-uploading-emoji-resource.js +24 -0
- package/dist/cjs/mention/create-mock-mention-name-resolver.js +3 -1
- package/dist/cjs/profilecard/get-mock-profilecard-client.js +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/emoji/mock-emoji-resource.js +8 -0
- package/dist/es2019/emoji/mock-non-uploading-emoji-resource.js +4 -0
- package/dist/es2019/mention/create-mock-mention-name-resolver.js +3 -1
- package/dist/es2019/profilecard/get-mock-profilecard-client.js +3 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/emoji/mock-emoji-resource.js +34 -0
- package/dist/esm/emoji/mock-non-uploading-emoji-resource.js +24 -0
- package/dist/esm/mention/create-mock-mention-name-resolver.js +3 -1
- package/dist/esm/profilecard/get-mock-profilecard-client.js +6 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/emoji/mock-emoji-resource.d.ts +1 -0
- package/dist/types/emoji/mock-non-uploading-emoji-resource.d.ts +1 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/util-data-test
|
|
2
2
|
|
|
3
|
+
## 17.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`31ca93c69a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/31ca93c69a3) - [ux] Adding give kudos button to the profile card
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 17.2.4
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`b926172a999`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b926172a999) - Custom Emoji Assets now load using inline media tokens preventing 401s
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
20
|
+
## 17.2.3
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
25
|
+
|
|
3
26
|
## 17.2.2
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -7,6 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.MockEmojiResource = void 0;
|
|
9
9
|
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
+
|
|
10
14
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
15
|
|
|
12
16
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -53,6 +57,38 @@ var MockEmojiResource = /*#__PURE__*/function (_MockNonUploadingEmoj) {
|
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
(0, _createClass2.default)(MockEmojiResource, [{
|
|
60
|
+
key: "getMediaEmojiDescriptionURLWithInlineToken",
|
|
61
|
+
value: function () {
|
|
62
|
+
var _getMediaEmojiDescriptionURLWithInlineToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(emoji) {
|
|
63
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
64
|
+
while (1) {
|
|
65
|
+
switch (_context.prev = _context.next) {
|
|
66
|
+
case 0:
|
|
67
|
+
if (!this.promiseBuilder) {
|
|
68
|
+
_context.next = 2;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return _context.abrupt("return", this.promiseBuilder(emoji, 'getMediaEmojiDescriptionURLWithInlineToken'));
|
|
73
|
+
|
|
74
|
+
case 2:
|
|
75
|
+
return _context.abrupt("return", emoji);
|
|
76
|
+
|
|
77
|
+
case 3:
|
|
78
|
+
case "end":
|
|
79
|
+
return _context.stop();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, _callee, this);
|
|
83
|
+
}));
|
|
84
|
+
|
|
85
|
+
function getMediaEmojiDescriptionURLWithInlineToken(_x) {
|
|
86
|
+
return _getMediaEmojiDescriptionURLWithInlineToken.apply(this, arguments);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return getMediaEmojiDescriptionURLWithInlineToken;
|
|
90
|
+
}()
|
|
91
|
+
}, {
|
|
56
92
|
key: "isUploadSupported",
|
|
57
93
|
value: function isUploadSupported() {
|
|
58
94
|
return this.promiseBuilder(this.uploadSupported, 'isUploadSupported');
|
|
@@ -148,6 +148,30 @@ var MockNonUploadingEmojiResource = /*#__PURE__*/function (_AbstractResource) {
|
|
|
148
148
|
|
|
149
149
|
return getFrequentlyUsed;
|
|
150
150
|
}()
|
|
151
|
+
}, {
|
|
152
|
+
key: "getMediaEmojiDescriptionURLWithInlineToken",
|
|
153
|
+
value: function () {
|
|
154
|
+
var _getMediaEmojiDescriptionURLWithInlineToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(emoji) {
|
|
155
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
156
|
+
while (1) {
|
|
157
|
+
switch (_context2.prev = _context2.next) {
|
|
158
|
+
case 0:
|
|
159
|
+
return _context2.abrupt("return", emoji);
|
|
160
|
+
|
|
161
|
+
case 1:
|
|
162
|
+
case "end":
|
|
163
|
+
return _context2.stop();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}, _callee2);
|
|
167
|
+
}));
|
|
168
|
+
|
|
169
|
+
function getMediaEmojiDescriptionURLWithInlineToken(_x2) {
|
|
170
|
+
return _getMediaEmojiDescriptionURLWithInlineToken.apply(this, arguments);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return getMediaEmojiDescriptionURLWithInlineToken;
|
|
174
|
+
}()
|
|
151
175
|
}, {
|
|
152
176
|
key: "recordSelection",
|
|
153
177
|
value: function recordSelection(emoji) {
|
|
@@ -13,7 +13,9 @@ var _mockMentionNameClient = require("./mock-mention-name-client");
|
|
|
13
13
|
|
|
14
14
|
var createMockMentionNameResolver = function createMockMentionNameResolver() {
|
|
15
15
|
var analyticsProps = {
|
|
16
|
-
createAnalyticsEvent: function createAnalyticsEvent(payload
|
|
16
|
+
createAnalyticsEvent: function createAnalyticsEvent( // error TS7006: Parameter 'payload' implicitly has an 'any' type.
|
|
17
|
+
// @ts-ignore @fixme TypeScript 4.2.4 upgrade
|
|
18
|
+
payload) {
|
|
17
19
|
// eslint-disable-next-line no-console
|
|
18
20
|
console.log('analytics event', payload);
|
|
19
21
|
return new _analyticsNext.UIAnalyticsEvent({
|
|
@@ -187,6 +187,12 @@ function simpleMockProfilecardClient() {
|
|
|
187
187
|
managers: reportingLinesUsers.slice(0, halfCount),
|
|
188
188
|
reports: reportingLinesUsers.slice(-halfCount)
|
|
189
189
|
});
|
|
190
|
+
},
|
|
191
|
+
getTeamCentralBaseUrl: function getTeamCentralBaseUrl() {
|
|
192
|
+
return 'teamCentralUrl';
|
|
193
|
+
},
|
|
194
|
+
shouldShowGiveKudos: function shouldShowGiveKudos() {
|
|
195
|
+
return Promise.resolve(true);
|
|
190
196
|
}
|
|
191
197
|
};
|
|
192
198
|
}
|
package/dist/cjs/version.json
CHANGED
|
@@ -15,6 +15,14 @@ export class MockEmojiResource extends MockNonUploadingEmojiResource {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
async getMediaEmojiDescriptionURLWithInlineToken(emoji) {
|
|
19
|
+
if (this.promiseBuilder) {
|
|
20
|
+
return this.promiseBuilder(emoji, 'getMediaEmojiDescriptionURLWithInlineToken');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return emoji;
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
isUploadSupported() {
|
|
19
27
|
return this.promiseBuilder(this.uploadSupported, 'isUploadSupported');
|
|
20
28
|
}
|
|
@@ -81,6 +81,10 @@ export class MockNonUploadingEmojiResource extends AbstractResource {
|
|
|
81
81
|
return this.promiseBuilder(this.emojiRepository.getFrequentlyUsed(options), 'getFrequentlyUsed');
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
async getMediaEmojiDescriptionURLWithInlineToken(emoji) {
|
|
85
|
+
return emoji;
|
|
86
|
+
}
|
|
87
|
+
|
|
84
88
|
recordSelection(emoji) {
|
|
85
89
|
this.recordedSelections.push(emoji);
|
|
86
90
|
this.emojiRepository.used(emoji);
|
|
@@ -3,7 +3,9 @@ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
3
3
|
import { MockMentionNameClient } from './mock-mention-name-client';
|
|
4
4
|
export const createMockMentionNameResolver = () => {
|
|
5
5
|
const analyticsProps = {
|
|
6
|
-
createAnalyticsEvent: payload
|
|
6
|
+
createAnalyticsEvent: ( // error TS7006: Parameter 'payload' implicitly has an 'any' type.
|
|
7
|
+
// @ts-ignore @fixme TypeScript 4.2.4 upgrade
|
|
8
|
+
payload) => {
|
|
7
9
|
// eslint-disable-next-line no-console
|
|
8
10
|
console.log('analytics event', payload);
|
|
9
11
|
return new UIAnalyticsEvent({
|
|
@@ -96,6 +96,8 @@ export function simpleMockProfilecardClient() {
|
|
|
96
96
|
managers: reportingLinesUsers.slice(0, halfCount),
|
|
97
97
|
reports: reportingLinesUsers.slice(-halfCount)
|
|
98
98
|
});
|
|
99
|
-
}
|
|
99
|
+
},
|
|
100
|
+
getTeamCentralBaseUrl: () => 'teamCentralUrl',
|
|
101
|
+
shouldShowGiveKudos: () => Promise.resolve(true)
|
|
100
102
|
};
|
|
101
103
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
1
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
5
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
@@ -38,6 +40,38 @@ export var MockEmojiResource = /*#__PURE__*/function (_MockNonUploadingEmoj) {
|
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
_createClass(MockEmojiResource, [{
|
|
43
|
+
key: "getMediaEmojiDescriptionURLWithInlineToken",
|
|
44
|
+
value: function () {
|
|
45
|
+
var _getMediaEmojiDescriptionURLWithInlineToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(emoji) {
|
|
46
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
47
|
+
while (1) {
|
|
48
|
+
switch (_context.prev = _context.next) {
|
|
49
|
+
case 0:
|
|
50
|
+
if (!this.promiseBuilder) {
|
|
51
|
+
_context.next = 2;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return _context.abrupt("return", this.promiseBuilder(emoji, 'getMediaEmojiDescriptionURLWithInlineToken'));
|
|
56
|
+
|
|
57
|
+
case 2:
|
|
58
|
+
return _context.abrupt("return", emoji);
|
|
59
|
+
|
|
60
|
+
case 3:
|
|
61
|
+
case "end":
|
|
62
|
+
return _context.stop();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, _callee, this);
|
|
66
|
+
}));
|
|
67
|
+
|
|
68
|
+
function getMediaEmojiDescriptionURLWithInlineToken(_x) {
|
|
69
|
+
return _getMediaEmojiDescriptionURLWithInlineToken.apply(this, arguments);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return getMediaEmojiDescriptionURLWithInlineToken;
|
|
73
|
+
}()
|
|
74
|
+
}, {
|
|
41
75
|
key: "isUploadSupported",
|
|
42
76
|
value: function isUploadSupported() {
|
|
43
77
|
return this.promiseBuilder(this.uploadSupported, 'isUploadSupported');
|
|
@@ -133,6 +133,30 @@ export var MockNonUploadingEmojiResource = /*#__PURE__*/function (_AbstractResou
|
|
|
133
133
|
|
|
134
134
|
return getFrequentlyUsed;
|
|
135
135
|
}()
|
|
136
|
+
}, {
|
|
137
|
+
key: "getMediaEmojiDescriptionURLWithInlineToken",
|
|
138
|
+
value: function () {
|
|
139
|
+
var _getMediaEmojiDescriptionURLWithInlineToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(emoji) {
|
|
140
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
141
|
+
while (1) {
|
|
142
|
+
switch (_context2.prev = _context2.next) {
|
|
143
|
+
case 0:
|
|
144
|
+
return _context2.abrupt("return", emoji);
|
|
145
|
+
|
|
146
|
+
case 1:
|
|
147
|
+
case "end":
|
|
148
|
+
return _context2.stop();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, _callee2);
|
|
152
|
+
}));
|
|
153
|
+
|
|
154
|
+
function getMediaEmojiDescriptionURLWithInlineToken(_x2) {
|
|
155
|
+
return _getMediaEmojiDescriptionURLWithInlineToken.apply(this, arguments);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return getMediaEmojiDescriptionURLWithInlineToken;
|
|
159
|
+
}()
|
|
136
160
|
}, {
|
|
137
161
|
key: "recordSelection",
|
|
138
162
|
value: function recordSelection(emoji) {
|
|
@@ -3,7 +3,9 @@ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
3
3
|
import { MockMentionNameClient } from './mock-mention-name-client';
|
|
4
4
|
export var createMockMentionNameResolver = function createMockMentionNameResolver() {
|
|
5
5
|
var analyticsProps = {
|
|
6
|
-
createAnalyticsEvent: function createAnalyticsEvent(payload
|
|
6
|
+
createAnalyticsEvent: function createAnalyticsEvent( // error TS7006: Parameter 'payload' implicitly has an 'any' type.
|
|
7
|
+
// @ts-ignore @fixme TypeScript 4.2.4 upgrade
|
|
8
|
+
payload) {
|
|
7
9
|
// eslint-disable-next-line no-console
|
|
8
10
|
console.log('analytics event', payload);
|
|
9
11
|
return new UIAnalyticsEvent({
|
|
@@ -168,6 +168,12 @@ export function simpleMockProfilecardClient() {
|
|
|
168
168
|
managers: reportingLinesUsers.slice(0, halfCount),
|
|
169
169
|
reports: reportingLinesUsers.slice(-halfCount)
|
|
170
170
|
});
|
|
171
|
+
},
|
|
172
|
+
getTeamCentralBaseUrl: function getTeamCentralBaseUrl() {
|
|
173
|
+
return 'teamCentralUrl';
|
|
174
|
+
},
|
|
175
|
+
shouldShowGiveKudos: function shouldShowGiveKudos() {
|
|
176
|
+
return Promise.resolve(true);
|
|
171
177
|
}
|
|
172
178
|
};
|
|
173
179
|
}
|
package/dist/esm/version.json
CHANGED
|
@@ -7,6 +7,7 @@ export declare class MockEmojiResource extends MockNonUploadingEmojiResource imp
|
|
|
7
7
|
private uploadSupported;
|
|
8
8
|
private uploadError?;
|
|
9
9
|
constructor(emojiService: EmojiRepository, config?: MockEmojiResourceConfig);
|
|
10
|
+
getMediaEmojiDescriptionURLWithInlineToken(emoji: EmojiDescription): Promise<EmojiDescription>;
|
|
10
11
|
isUploadSupported(): Promise<boolean>;
|
|
11
12
|
uploadCustomEmoji(upload: EmojiUpload): Promise<any>;
|
|
12
13
|
getUploads(): UploadDetail[];
|
|
@@ -19,6 +19,7 @@ export declare class MockNonUploadingEmojiResource extends AbstractResource<stri
|
|
|
19
19
|
findInCategory(categoryId: CategoryId): Promise<EmojiDescription[]>;
|
|
20
20
|
getAsciiMap(): Promise<Map<string, EmojiDescription>>;
|
|
21
21
|
getFrequentlyUsed(options?: SearchOptions): Promise<EmojiDescription[]>;
|
|
22
|
+
getMediaEmojiDescriptionURLWithInlineToken(emoji: EmojiDescription): Promise<EmojiDescription>;
|
|
22
23
|
recordSelection?(emoji: EmojiDescription): Promise<any>;
|
|
23
24
|
deleteSiteEmoji(emoji: EmojiDescription): Promise<boolean>;
|
|
24
25
|
loadMediaEmoji(emoji: EmojiDescription): OptionalEmojiDescription | Promise<OptionalEmojiDescription>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/util-data-test",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.3.0",
|
|
4
4
|
"description": "Shared test and story data",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"atlassian": {
|
|
58
58
|
"releaseModel": "continuous",
|
|
59
|
-
"team": "
|
|
59
|
+
"team": "UIP: Monorepo"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"ak-postbuild": "ls -d dist/* | xargs -n 1 cp -v -r src/json-data"
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
69
|
-
"@atlaskit/emoji": "^64.
|
|
69
|
+
"@atlaskit/emoji": "^64.7.0",
|
|
70
70
|
"@atlaskit/mention": "^21.0.0",
|
|
71
|
-
"@atlaskit/profilecard": "^16.
|
|
72
|
-
"@atlaskit/task-decision": "^17.
|
|
71
|
+
"@atlaskit/profilecard": "^16.5.0",
|
|
72
|
+
"@atlaskit/task-decision": "^17.4.0",
|
|
73
73
|
"@atlaskit/util-service-support": "^6.1.0",
|
|
74
74
|
"@babel/runtime": "^7.0.0",
|
|
75
75
|
"lodash": "^4.17.21",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@atlaskit/docs": "^9.0.0",
|
|
86
86
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
87
|
-
"typescript": "
|
|
87
|
+
"typescript": "4.2.4"
|
|
88
88
|
},
|
|
89
89
|
"keywords": [
|
|
90
90
|
"fabric",
|