@atlaskit/smart-card 18.0.21 → 19.0.1
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 +49 -0
- package/dist/cjs/client/index.js +6 -379
- package/dist/cjs/constants.js +4 -4
- package/dist/cjs/extractors/embed/index.js +2 -2
- package/dist/cjs/extractors/hover/extractMetadata.js +31 -0
- package/dist/cjs/index.js +7 -13
- package/dist/cjs/state/actions/constants.js +1 -13
- package/dist/cjs/state/actions/index.js +20 -22
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +2 -2
- package/dist/cjs/state/config/index.js +2 -2
- package/dist/cjs/state/helpers.js +1 -9
- package/dist/cjs/state/hooks/usePrefetch.js +2 -2
- package/dist/cjs/state/index.js +4 -4
- package/dist/cjs/state/renderers/index.js +2 -2
- package/dist/cjs/state/store/index.js +5 -5
- package/dist/cjs/utils/mocks.js +2 -2
- package/dist/cjs/utils/test-utils.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.js +19 -6
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +2 -2
- package/dist/cjs/view/HoverCard/index.js +11 -2
- package/dist/cjs/view/HoverCard/utils.js +36 -0
- package/dist/es2019/client/index.js +1 -214
- package/dist/es2019/constants.js +4 -4
- package/dist/es2019/extractors/embed/index.js +1 -1
- package/dist/es2019/extractors/hover/extractMetadata.js +18 -0
- package/dist/es2019/index.js +4 -4
- package/dist/es2019/state/actions/constants.js +0 -6
- package/dist/es2019/state/actions/index.js +4 -4
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +1 -1
- package/dist/es2019/state/config/index.js +1 -1
- package/dist/es2019/state/helpers.js +0 -5
- package/dist/es2019/state/hooks/usePrefetch.js +1 -1
- package/dist/es2019/state/index.js +1 -1
- package/dist/es2019/state/renderers/index.js +1 -1
- package/dist/es2019/state/store/index.js +2 -2
- package/dist/es2019/utils/mocks.js +1 -1
- package/dist/es2019/utils/test-utils.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/container/index.js +19 -6
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +2 -2
- package/dist/es2019/view/HoverCard/index.js +27 -18
- package/dist/es2019/view/HoverCard/utils.js +27 -0
- package/dist/esm/client/index.js +1 -360
- package/dist/esm/constants.js +4 -4
- package/dist/esm/extractors/embed/index.js +1 -1
- package/dist/esm/extractors/hover/extractMetadata.js +22 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/state/actions/constants.js +0 -6
- package/dist/esm/state/actions/index.js +4 -4
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +1 -1
- package/dist/esm/state/config/index.js +1 -1
- package/dist/esm/state/helpers.js +0 -5
- package/dist/esm/state/hooks/usePrefetch.js +1 -1
- package/dist/esm/state/index.js +1 -1
- package/dist/esm/state/renderers/index.js +1 -1
- package/dist/esm/state/store/index.js +2 -2
- package/dist/esm/utils/mocks.js +1 -1
- package/dist/esm/utils/test-utils.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/container/index.js +19 -6
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +3 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +2 -2
- package/dist/esm/view/HoverCard/index.js +10 -3
- package/dist/esm/view/HoverCard/utils.js +27 -0
- package/dist/types/__tests_external__/page-objects/BaseCard.d.ts +1 -2
- package/dist/types/client/index.d.ts +1 -18
- package/dist/types/constants.d.ts +4 -4
- package/dist/types/extractors/block/index.d.ts +1 -1
- package/dist/types/extractors/common/title-prefix/extractTitlePrefix.d.ts +1 -1
- package/dist/types/extractors/flexible/icon/extract-icon-renderer.d.ts +1 -1
- package/dist/types/extractors/flexible/icon/index.d.ts +1 -1
- package/dist/types/extractors/flexible/index.d.ts +1 -1
- package/dist/types/extractors/hover/extractMetadata.d.ts +3 -0
- package/dist/types/extractors/inline/index.d.ts +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/model/invoke-opts.d.ts +1 -14
- package/dist/types/state/actions/constants.d.ts +0 -6
- package/dist/types/state/actions/types.d.ts +2 -13
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -2
- package/dist/types/state/config/index.d.ts +1 -1
- package/dist/types/state/helpers.d.ts +1 -3
- package/dist/types/state/hooks/useSmartLink.d.ts +6 -6
- package/dist/types/state/index.d.ts +3 -3
- package/dist/types/state/reducers/types.d.ts +1 -1
- package/dist/types/state/renderers/index.d.ts +1 -1
- package/dist/types/state/store/index.d.ts +2 -2
- package/dist/types/state/types.d.ts +1 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types/utils/analytics/analytics.d.ts +1 -1
- package/dist/types/utils/analytics/index.d.ts +1 -2
- package/dist/types/utils/performance.d.ts +1 -1
- package/dist/types/view/BlockCard/types.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +2 -3
- package/dist/types/view/FlexibleCard/components/actions/action/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +43 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +25 -0
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +3 -2
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/types.d.ts +8 -2
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/types.d.ts +22 -2
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +6 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +63 -13
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +68 -2
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +5 -1
- package/dist/types/view/FlexibleCard/components/container/layered-link/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +20 -10
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/types.d.ts +12 -0
- package/dist/types/view/FlexibleCard/components/elements/badge/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/badge/types.d.ts +10 -0
- package/dist/types/view/FlexibleCard/components/elements/date-time/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/date-time/types.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +16 -3
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/link/index.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/elements/link/types.d.ts +21 -1
- package/dist/types/view/FlexibleCard/components/elements/lozenge/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/lozenge/types.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/media/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/media/types.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +10 -0
- package/dist/types/view/FlexibleCard/components/elements/types.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/types.d.ts +73 -3
- package/dist/types/view/FlexibleCard/utils.d.ts +1 -1
- package/dist/types/view/HoverCard/types.d.ts +5 -0
- package/dist/types/view/HoverCard/utils.d.ts +2 -0
- package/dist/types/view/InlineCard/types.d.ts +1 -1
- package/docs-helpers/flexible-ui-action-item.tsx +6 -0
- package/docs-helpers/flexible-ui-actions-prop.tsx +6 -0
- package/docs-helpers/flexible-ui-element-item.tsx +6 -0
- package/docs-helpers/flexible-ui-prop.tsx +6 -0
- package/docs-helpers/flexible-ui.tsx +28 -0
- package/package.json +3 -9
- package/dist/cjs/client/api.js +0 -119
- package/dist/cjs/client/errors.js +0 -55
- package/dist/cjs/client/types/index.js +0 -5
- package/dist/cjs/client/types/requests.js +0 -5
- package/dist/cjs/client/types/responses.js +0 -31
- package/dist/cjs/client/utils/environments.js +0 -47
- package/dist/cjs/providers/editor/index.js +0 -283
- package/dist/cjs/providers/editor/transformer.js +0 -90
- package/dist/cjs/providers/editor/types.js +0 -5
- package/dist/cjs/state/actions/helpers.js +0 -18
- package/dist/cjs/state/context/index.js +0 -34
- package/dist/cjs/state/context/provider.js +0 -74
- package/dist/cjs/state/context/types.js +0 -5
- package/dist/cjs/state/reducers/index.js +0 -89
- package/dist/cjs/state/store/types.js +0 -5
- package/dist/es2019/client/api.js +0 -38
- package/dist/es2019/client/errors.js +0 -19
- package/dist/es2019/client/types/index.js +0 -1
- package/dist/es2019/client/types/requests.js +0 -1
- package/dist/es2019/client/types/responses.js +0 -19
- package/dist/es2019/client/utils/environments.js +0 -33
- package/dist/es2019/providers/editor/index.js +0 -82
- package/dist/es2019/providers/editor/transformer.js +0 -57
- package/dist/es2019/providers/editor/types.js +0 -1
- package/dist/es2019/state/actions/helpers.js +0 -8
- package/dist/es2019/state/context/index.js +0 -14
- package/dist/es2019/state/context/provider.js +0 -51
- package/dist/es2019/state/context/types.js +0 -1
- package/dist/es2019/state/reducers/index.js +0 -74
- package/dist/es2019/state/store/types.js +0 -1
- package/dist/esm/client/api.js +0 -98
- package/dist/esm/client/errors.js +0 -40
- package/dist/esm/client/types/index.js +0 -1
- package/dist/esm/client/types/requests.js +0 -1
- package/dist/esm/client/types/responses.js +0 -19
- package/dist/esm/client/utils/environments.js +0 -33
- package/dist/esm/providers/editor/index.js +0 -257
- package/dist/esm/providers/editor/transformer.js +0 -79
- package/dist/esm/providers/editor/types.js +0 -1
- package/dist/esm/state/actions/helpers.js +0 -9
- package/dist/esm/state/context/index.js +0 -14
- package/dist/esm/state/context/provider.js +0 -50
- package/dist/esm/state/context/types.js +0 -1
- package/dist/esm/state/reducers/index.js +0 -69
- package/dist/esm/state/store/types.js +0 -1
- package/dist/types/client/api.d.ts +0 -5
- package/dist/types/client/errors.d.ts +0 -9
- package/dist/types/client/types/index.d.ts +0 -13
- package/dist/types/client/types/requests.d.ts +0 -9
- package/dist/types/client/types/responses.d.ts +0 -19
- package/dist/types/client/utils/environments.d.ts +0 -12
- package/dist/types/providers/editor/index.d.ts +0 -22
- package/dist/types/providers/editor/transformer.d.ts +0 -8
- package/dist/types/providers/editor/types.d.ts +0 -19
- package/dist/types/state/actions/helpers.d.ts +0 -2
- package/dist/types/state/context/index.d.ts +0 -8
- package/dist/types/state/context/provider.d.ts +0 -5
- package/dist/types/state/context/types.d.ts +0 -39
- package/dist/types/state/reducers/index.d.ts +0 -4
- package/dist/types/state/store/types.d.ts +0 -18
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSimulatedMetadata = void 0;
|
|
7
|
+
|
|
8
|
+
var getSimulatedMetadata = function getSimulatedMetadata(extensionKey) {
|
|
9
|
+
switch (extensionKey) {
|
|
10
|
+
case 'confluence-object-provider':
|
|
11
|
+
return {
|
|
12
|
+
metadata: {
|
|
13
|
+
primary: ['AuthorGroup', 'CreatedBy', 'CommentCount', 'ReactCount'],
|
|
14
|
+
secondary: []
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
case 'jira-object-provider':
|
|
19
|
+
return {
|
|
20
|
+
metadata: {
|
|
21
|
+
primary: ['AuthorGroup', 'State', 'Priority'],
|
|
22
|
+
secondary: []
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
default:
|
|
27
|
+
return {
|
|
28
|
+
metadata: {
|
|
29
|
+
primary: ['ModifiedOn'],
|
|
30
|
+
secondary: []
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.getSimulatedMetadata = getSimulatedMetadata;
|
|
@@ -1,214 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// import setimmediate to temporary fix dataloader 2.0.0 bug
|
|
3
|
-
// @see https://github.com/graphql/dataloader/issues/249
|
|
4
|
-
import 'setimmediate';
|
|
5
|
-
import DataLoader from 'dataloader';
|
|
6
|
-
import retry from 'async-retry';
|
|
7
|
-
import * as api from './api';
|
|
8
|
-
import { APIError } from './errors';
|
|
9
|
-
import { getResolverUrl } from './utils/environments';
|
|
10
|
-
import pThrottle from 'p-throttle';
|
|
11
|
-
import { isSuccessfulResponse, isErrorResponse } from './types/responses';
|
|
12
|
-
const MAX_BATCH_SIZE = 50;
|
|
13
|
-
const MIN_TIME_BETWEEN_BATCHES = 250;
|
|
14
|
-
export default class CardClient {
|
|
15
|
-
constructor(envKey) {
|
|
16
|
-
_defineProperty(this, "batchResolve", async urls => {
|
|
17
|
-
// De-duplicate requested URLs (see `this.createLoader` for more detail).
|
|
18
|
-
const deDuplicatedUrls = [...new Set(urls)];
|
|
19
|
-
let resolvedUrls = [];
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
// Ask the backend to resolve the URLs for us.
|
|
23
|
-
resolvedUrls = await api.request('post', `${this.resolverUrl}/resolve/batch`, deDuplicatedUrls.map(resourceUrl => ({
|
|
24
|
-
resourceUrl
|
|
25
|
-
})));
|
|
26
|
-
} catch (error) {
|
|
27
|
-
// we make sure we return a valid dataloader response by creating an error
|
|
28
|
-
// response for each url
|
|
29
|
-
resolvedUrls = urls.map(() => {
|
|
30
|
-
const status = isErrorResponse(error) ? error.status : 500;
|
|
31
|
-
const errorResponse = {
|
|
32
|
-
status,
|
|
33
|
-
error
|
|
34
|
-
};
|
|
35
|
-
return errorResponse;
|
|
36
|
-
});
|
|
37
|
-
} // Reduce into a map to make accessing faster and easier.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const map = {}; // NOTE: the batch endpoint returns the URLs in the same order they were given.
|
|
41
|
-
|
|
42
|
-
for (let i = 0; i < deDuplicatedUrls.length; ++i) {
|
|
43
|
-
const url = deDuplicatedUrls[i];
|
|
44
|
-
const data = resolvedUrls[i];
|
|
45
|
-
map[url] = data;
|
|
46
|
-
} // Reconvert list back into the original order in which it was given to us.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return urls.map(originalUrl => map[originalUrl]);
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
this.resolverUrl = getResolverUrl(envKey);
|
|
53
|
-
this.loadersByDomain = {};
|
|
54
|
-
this.retryConfig = {
|
|
55
|
-
retries: 2
|
|
56
|
-
};
|
|
57
|
-
this.resolvedCache = {};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
createLoader() {
|
|
61
|
-
const batchResolveThrottler = pThrottle({
|
|
62
|
-
limit: 1,
|
|
63
|
-
interval: MIN_TIME_BETWEEN_BATCHES
|
|
64
|
-
});
|
|
65
|
-
const throttledBatchResolve = batchResolveThrottler(this.batchResolve);
|
|
66
|
-
return new DataLoader( // We place all calls to `batchResolve` in a limiter so we don't send off several simultaneous batch requests.
|
|
67
|
-
// This is for two reasons:
|
|
68
|
-
// 1: we want to avoid getting rate limited upstream (eg: forge and other APIs)
|
|
69
|
-
// 2: we want to avoid sending out heaps of requests from the client at once
|
|
70
|
-
urls => throttledBatchResolve(urls), {
|
|
71
|
-
maxBatchSize: MAX_BATCH_SIZE,
|
|
72
|
-
// NOTE: we turn off DataLoader's cache because it doesn't work for our use-case. Consider the following:
|
|
73
|
-
// - a smartlink to a restricted item is resolved to "forbidden" with a "request access button"
|
|
74
|
-
// - the user clicks "request access", and then following the auth prompts and gets access
|
|
75
|
-
// - the frontend now re-renders the smartlink, but due to DataLoader's caching, the previous "forbidden" state is
|
|
76
|
-
// because the smartlink's URL (which is the cache key) is exactly the same
|
|
77
|
-
//
|
|
78
|
-
// For this reason, we disable DataLoader's cache.
|
|
79
|
-
// This means that URLs will not be de-duplicated by DataLoader, so we perform the de-duplication logic
|
|
80
|
-
// ourselves in `this.batchResolve`.
|
|
81
|
-
cache: false
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
getLoader(hostname) {
|
|
86
|
-
if (!this.loadersByDomain[hostname]) {
|
|
87
|
-
this.loadersByDomain[hostname] = this.createLoader();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return this.loadersByDomain[hostname];
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
async prefetchData(url) {
|
|
94
|
-
// 1. Queue the URL as part of a dataloader batch.
|
|
95
|
-
const hostname = new URL(url).hostname;
|
|
96
|
-
const loader = this.getLoader(hostname);
|
|
97
|
-
const response = await loader.load(url);
|
|
98
|
-
|
|
99
|
-
if (isSuccessfulResponse(response)) {
|
|
100
|
-
// 2. If the URL resolves, send it back.
|
|
101
|
-
return response.body;
|
|
102
|
-
} else {
|
|
103
|
-
try {
|
|
104
|
-
// 3. If the URL does not resolve, retry it with exponential backoff.
|
|
105
|
-
// This is done so that we avoid the scenario where users are unable to
|
|
106
|
-
// see a resolved Smart Link, when their expectation is to be able to.
|
|
107
|
-
const retriedResponse = await retry(async () => {
|
|
108
|
-
// We check if the link has resolved in the cache and stop trying if so.
|
|
109
|
-
// We do this by triggering an error that the link has already been resolved.
|
|
110
|
-
// This cascades <retryCount> times after which it is handled like a normal
|
|
111
|
-
// 'error', returning `undefined`.
|
|
112
|
-
if (!this.resolvedCache[url]) {
|
|
113
|
-
const response = await loader.load(url);
|
|
114
|
-
|
|
115
|
-
if (isSuccessfulResponse(response)) {
|
|
116
|
-
return response;
|
|
117
|
-
} else {
|
|
118
|
-
throw new Error('Retry for URL failed');
|
|
119
|
-
}
|
|
120
|
-
} else {
|
|
121
|
-
// Short-circuit each of the retries, as described above.
|
|
122
|
-
throw new Error('Retry unneeded - link has been resolved.');
|
|
123
|
-
}
|
|
124
|
-
}, this.retryConfig); // Trigger callback after successful backoff.
|
|
125
|
-
|
|
126
|
-
return retriedResponse.body;
|
|
127
|
-
} catch (err) {
|
|
128
|
-
// Do nothing in the case of an error - prefetching
|
|
129
|
-
// failures should be silent. Once a link is visible,
|
|
130
|
-
// it will be re-fetched anyhow, in which case a
|
|
131
|
-
// user-facing error is required.
|
|
132
|
-
return undefined;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
async fetchData(url) {
|
|
138
|
-
const hostname = new URL(url).hostname;
|
|
139
|
-
const loader = this.getLoader(hostname);
|
|
140
|
-
const response = await loader.load(url);
|
|
141
|
-
|
|
142
|
-
if (!isSuccessfulResponse(response)) {
|
|
143
|
-
// Catch non-200 server responses to fallback or return useful information.
|
|
144
|
-
if (response.error) {
|
|
145
|
-
const errorType = response.error.type;
|
|
146
|
-
const errorMessage = response.error.message; // this means there was a network error and we fallback to blue link
|
|
147
|
-
// without impacting SLO's
|
|
148
|
-
|
|
149
|
-
if (response.error instanceof api.NetworkError) {
|
|
150
|
-
throw new APIError('fallback', hostname, errorMessage, errorType);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
switch (errorType) {
|
|
154
|
-
// BadRequestError - indicative of an API error, render
|
|
155
|
-
// a blue link to mitigate customer impact.
|
|
156
|
-
case 'ResolveBadRequestError':
|
|
157
|
-
throw new APIError('fallback', hostname, errorMessage, errorType);
|
|
158
|
-
// AuthError - if the user logs in, we may be able
|
|
159
|
-
// to recover. Render an unauthorized card.
|
|
160
|
-
|
|
161
|
-
case 'ResolveAuthError':
|
|
162
|
-
throw new APIError('auth', hostname, errorMessage, errorType);
|
|
163
|
-
// UnsupportedError - we do not know how to render this URL.
|
|
164
|
-
// Bail out and ask the Editor to render as a blue link.
|
|
165
|
-
|
|
166
|
-
case 'ResolveUnsupportedError':
|
|
167
|
-
// URL isn't supported
|
|
168
|
-
throw new APIError('fatal', hostname, errorMessage, errorType);
|
|
169
|
-
// ResolveFailedError - link resolver may have failed.
|
|
170
|
-
// We could recover on re-resolve; render with fallback state.
|
|
171
|
-
|
|
172
|
-
case 'ResolveFailedError':
|
|
173
|
-
// Timeouts
|
|
174
|
-
throw new APIError('error', hostname, errorMessage, errorType);
|
|
175
|
-
// TimeoutError - link resolver may be taking a long time.
|
|
176
|
-
// We could recover on re-resolve; render with fallback state.
|
|
177
|
-
|
|
178
|
-
case 'ResolveTimeoutError':
|
|
179
|
-
// Timeouts
|
|
180
|
-
throw new APIError('error', hostname, errorMessage, errorType);
|
|
181
|
-
// InternalServerError - API call failed.
|
|
182
|
-
// We may recover later; render with fallback state.
|
|
183
|
-
|
|
184
|
-
case 'InternalServerError':
|
|
185
|
-
// ORS failures
|
|
186
|
-
throw new APIError('error', hostname, errorMessage, errorType);
|
|
187
|
-
}
|
|
188
|
-
} // Catch all: we don't know this error, bail out.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
throw new APIError('fatal', hostname, response.toString(), 'UnexpectedError');
|
|
192
|
-
} else {
|
|
193
|
-
// Set a flag in the `resolvedCache` for this URL. The intent of this is
|
|
194
|
-
// to ensure that the exponential backoff method in `prefetchData` does
|
|
195
|
-
// not continue to retry fetching for this URL, especially if it was previously
|
|
196
|
-
// in a failed state. Note: this scenario only occurs on initial page load, if the
|
|
197
|
-
// user scrolls through the page very fast. Once the URL is visible, prefetching
|
|
198
|
-
// no longer takes place.
|
|
199
|
-
this.resolvedCache[url] = true; // Return the JSON-LD response back up!
|
|
200
|
-
|
|
201
|
-
return response.body;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
async postData(data) {
|
|
206
|
-
const request = {
|
|
207
|
-
key: data.key,
|
|
208
|
-
action: data.action,
|
|
209
|
-
context: data.context
|
|
210
|
-
};
|
|
211
|
-
return await api.request('post', `${this.resolverUrl}/invoke`, request);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
}
|
|
1
|
+
export { CardClient as default } from '@atlaskit/link-provider';
|
package/dist/es2019/constants.js
CHANGED
|
@@ -109,9 +109,6 @@ export let ElementName;
|
|
|
109
109
|
ElementName["AuthorGroup"] = "AuthorGroup";
|
|
110
110
|
ElementName["CollaboratorGroup"] = "CollaboratorGroup";
|
|
111
111
|
ElementName["CommentCount"] = "CommentCount";
|
|
112
|
-
ElementName["ViewCount"] = "ViewCount";
|
|
113
|
-
ElementName["ReactCount"] = "ReactCount";
|
|
114
|
-
ElementName["VoteCount"] = "VoteCount";
|
|
115
112
|
ElementName["CreatedBy"] = "CreatedBy";
|
|
116
113
|
ElementName["CreatedOn"] = "CreatedOn";
|
|
117
114
|
ElementName["LinkIcon"] = "LinkIcon";
|
|
@@ -120,11 +117,14 @@ export let ElementName;
|
|
|
120
117
|
ElementName["Preview"] = "Preview";
|
|
121
118
|
ElementName["Priority"] = "Priority";
|
|
122
119
|
ElementName["ProgrammingLanguage"] = "ProgrammingLanguage";
|
|
120
|
+
ElementName["Provider"] = "Provider";
|
|
121
|
+
ElementName["ReactCount"] = "ReactCount";
|
|
123
122
|
ElementName["Snippet"] = "Snippet";
|
|
124
123
|
ElementName["State"] = "State";
|
|
125
124
|
ElementName["SubscriberCount"] = "SubscriberCount";
|
|
126
125
|
ElementName["Title"] = "Title";
|
|
127
|
-
ElementName["
|
|
126
|
+
ElementName["ViewCount"] = "ViewCount";
|
|
127
|
+
ElementName["VoteCount"] = "VoteCount";
|
|
128
128
|
})(ElementName || (ElementName = {}));
|
|
129
129
|
|
|
130
130
|
export let ActionName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { extractPreview } from '@atlaskit/linking-common';
|
|
2
1
|
import { extractLink, extractTitle } from '../common/primitives';
|
|
3
2
|
import { extractProvider } from '../common/context';
|
|
3
|
+
import { extractPreview } from '@atlaskit/linking-common';
|
|
4
4
|
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
5
5
|
|
|
6
6
|
const extractEmbedPreview = (jsonLd, platform) => {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ElementName } from '../../constants';
|
|
2
|
+
|
|
3
|
+
const elementNamesToItems = elementNames => {
|
|
4
|
+
return elementNames.filter(element => element in ElementName).map(elementName => ({
|
|
5
|
+
name: elementName,
|
|
6
|
+
testId: `${elementName.toLowerCase()}-metadata-element`
|
|
7
|
+
}));
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const extractMetadata = jsonLd => {
|
|
11
|
+
var _jsonLd$metadata, _metadata$primary, _metadata$secondary;
|
|
12
|
+
|
|
13
|
+
const metadata = (_jsonLd$metadata = jsonLd.metadata) !== null && _jsonLd$metadata !== void 0 ? _jsonLd$metadata : [];
|
|
14
|
+
return {
|
|
15
|
+
primary: elementNamesToItems((_metadata$primary = metadata.primary) !== null && _metadata$primary !== void 0 ? _metadata$primary : []),
|
|
16
|
+
secondary: elementNamesToItems((_metadata$secondary = metadata.secondary) !== null && _metadata$secondary !== void 0 ? _metadata$secondary : [])
|
|
17
|
+
};
|
|
18
|
+
};
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { SmartCardProvider as Provider, SmartCardContext } from './state';
|
|
2
|
-
export { EditorCardProvider, editorCardProvider } from '
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
2
|
+
export { EditorCardProvider, editorCardProvider } from '@atlaskit/link-provider';
|
|
3
|
+
export { APIError } from '@atlaskit/linking-common';
|
|
4
|
+
export { CardClient as Client } from '@atlaskit/link-provider';
|
|
5
5
|
export { Card } from './view/Card';
|
|
6
|
-
export {
|
|
6
|
+
export { SmartCardContext as Context } from '@atlaskit/link-provider';
|
|
7
7
|
export { EmbedResizeMessageListener } from './view/EmbedCard/EmbedResizeMessageListener';
|
|
8
8
|
export { embedHeaderHeight } from './view/EmbedCard/components/styled';
|
|
9
9
|
export { SmartLinkEvents } from './utils/analytics/analytics';
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export const ACTION_PENDING = 'pending';
|
|
2
|
-
export const ACTION_RESOLVING = 'resolving';
|
|
3
|
-
export const ACTION_RESOLVED = 'resolved';
|
|
4
|
-
export const ACTION_ERROR = 'errored';
|
|
5
|
-
export const ACTION_ERROR_FALLBACK = 'fallback';
|
|
6
|
-
export const ACTION_PRELOAD = 'preload';
|
|
7
1
|
export const ANALYTICS_RESOLVING = 'resolving';
|
|
8
2
|
export const ANALYTICS_ERROR = 'errored';
|
|
9
3
|
export const ANALYTICS_FALLBACK = 'fallback';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useMemo, useCallback } from 'react';
|
|
2
2
|
import { auth } from '@atlaskit/outbound-auth-flow-client';
|
|
3
|
-
import {
|
|
3
|
+
import { APIError } from '@atlaskit/linking-common';
|
|
4
|
+
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
5
|
+
import { ACTION_PENDING, ACTION_RESOLVED, ACTION_ERROR, ACTION_ERROR_FALLBACK, cardAction } from '@atlaskit/linking-common';
|
|
4
6
|
import { getDefinitionId, getByDefinitionId, getServices, getStatus, getExtensionKey } from '../helpers';
|
|
5
|
-
import {
|
|
6
|
-
import { useSmartLinkContext } from '../context';
|
|
7
|
+
import { ERROR_MESSAGE_OAUTH, ERROR_MESSAGE_FATAL } from './constants';
|
|
7
8
|
import * as measure from '../../utils/performance';
|
|
8
|
-
import { APIError } from '../../client/errors';
|
|
9
9
|
import { getUnauthorizedJsonLd } from '../../utils/jsonld';
|
|
10
10
|
import { addMetadataToExperience } from '../analytics';
|
|
11
11
|
export const useSmartCardActions = (id, url, analytics) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountConnected, screenAuthPopupEvent, instrumentEvent } from '../../utils/analytics';
|
|
2
1
|
import { useMemo } from 'react';
|
|
2
|
+
import { uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountConnected, screenAuthPopupEvent, instrumentEvent } from '../../utils/analytics';
|
|
3
3
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
|
|
4
4
|
export const useSmartLinkAnalytics = dispatchAnalytics => {
|
|
5
5
|
const ui = useMemo(() => ({
|
|
@@ -8,11 +8,6 @@ export const getByDefinitionId = (definitionId, store) => {
|
|
|
8
8
|
return details && details.meta.definitionId === definitionId;
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
export const getUrl = (store, url) => {
|
|
12
|
-
return store.getState()[url] || {
|
|
13
|
-
status: 'pending'
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
11
|
export const getClickUrl = (url, jsonLd) => {
|
|
17
12
|
if (jsonLd && jsonLd.data) {
|
|
18
13
|
const visitUrl = extractVisitUrl(jsonLd.data);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SmartCardContext, SmartCardProvider, useSmartLinkContext } from '
|
|
1
|
+
export { SmartCardContext, SmartCardProvider, useSmartLinkContext } from '@atlaskit/link-provider';
|
|
2
2
|
export { useSmartLink, usePrefetch } from './hooks';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import { useSmartLinkContext } from '
|
|
2
|
+
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
3
3
|
export const useSmartLinkRenderers = () => {
|
|
4
4
|
const context = useSmartLinkContext();
|
|
5
5
|
let renderers = context === null || context === void 0 ? void 0 : context.renderers;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import { useSmartLinkContext } from '
|
|
3
|
-
import { getUrl } from '
|
|
2
|
+
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
3
|
+
import { getUrl } from '@atlaskit/linking-common';
|
|
4
4
|
export function useSmartCardState(url) {
|
|
5
5
|
const {
|
|
6
6
|
store
|
package/dist/es2019/version.json
CHANGED
|
@@ -84,8 +84,8 @@ export const sizeToSpacing = {
|
|
|
84
84
|
[SmartLinkSize.XLarge]: 'default'
|
|
85
85
|
};
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
88
|
-
* @
|
|
87
|
+
* A base action that can be triggered with an on click.
|
|
88
|
+
* @internal
|
|
89
89
|
* @param {ActionProps} ActionProps - The props necessary for the Action.
|
|
90
90
|
* @see DeleteAction
|
|
91
91
|
* @see EditAction
|
|
@@ -13,8 +13,9 @@ const getBlockStyles = (direction, size) => css`
|
|
|
13
13
|
}
|
|
14
14
|
`;
|
|
15
15
|
/**
|
|
16
|
-
* A block represents a collection of elements and actions that are arranged
|
|
17
|
-
* All elements and actions should be contained within a Block.
|
|
16
|
+
* A block represents a collection of elements and actions that are arranged
|
|
17
|
+
* in a row. All elements and actions should be contained within a Block.
|
|
18
|
+
* @internal
|
|
18
19
|
* @param {ActionGroupProps} ActionGroupProps
|
|
19
20
|
* @see Action
|
|
20
21
|
*/
|
|
@@ -30,6 +30,7 @@ export const getElementGroupStyles = (direction, size, align, width) => css`
|
|
|
30
30
|
/**
|
|
31
31
|
* Creates a group of Action components. Accepts an array of Actions, in addition to some styling
|
|
32
32
|
* preferences.
|
|
33
|
+
* @internal
|
|
33
34
|
* @param {ActionGroupProps} ActionGroupProps
|
|
34
35
|
* @see Action
|
|
35
36
|
*/
|
|
@@ -63,6 +63,7 @@ const getMaxLines = maxLines => {
|
|
|
63
63
|
/**
|
|
64
64
|
* Represents a MetadataBlock, designed to contain groups of metadata in the form of elements.
|
|
65
65
|
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
66
|
+
* @public
|
|
66
67
|
* @param {MetadataBlockProps} MetadataBlockProps
|
|
67
68
|
* @see Block
|
|
68
69
|
*/
|
|
@@ -42,10 +42,11 @@ const getTitleBlockViewComponent = status => {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
|
-
* Represents a TitleBlock, which is the foundation of
|
|
45
|
+
* Represents a TitleBlock, which is the foundation of Flexible UI.
|
|
46
46
|
* This contains an icon, the link, and any associated metadata and actions in one block.
|
|
47
47
|
* The TitleBlock will also render differently given the state of the smart link.
|
|
48
48
|
* This can be found in the corresponding Resolving, Resolved and Errored views.
|
|
49
|
+
* @public
|
|
49
50
|
* @param {TitleBlockProps} TitleBlockProps
|
|
50
51
|
* @see Block
|
|
51
52
|
* @see TitleBlockResolvingView
|
|
@@ -81,12 +81,21 @@ const renderChildren = (children, containerSize, containerTheme, status, retry,
|
|
|
81
81
|
const {
|
|
82
82
|
size: blockSize
|
|
83
83
|
} = child.props;
|
|
84
|
+
const size = blockSize || containerSize;
|
|
85
|
+
|
|
86
|
+
if (isFlexibleUiTitleBlock(child)) {
|
|
87
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
88
|
+
onClick,
|
|
89
|
+
retry,
|
|
90
|
+
size,
|
|
91
|
+
status,
|
|
92
|
+
theme: containerTheme
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
84
96
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
size: blockSize || containerSize,
|
|
88
|
-
status,
|
|
89
|
-
theme: containerTheme
|
|
97
|
+
size,
|
|
98
|
+
status
|
|
90
99
|
});
|
|
91
100
|
}
|
|
92
101
|
});
|
|
@@ -116,7 +125,11 @@ const getLayeredLink = (testId, context, children) => {
|
|
|
116
125
|
});
|
|
117
126
|
};
|
|
118
127
|
/**
|
|
119
|
-
*
|
|
128
|
+
* A container is a hidden component that build the Flexible Smart Link.
|
|
129
|
+
* All of the Flexible UI components are wrapped inside the container.
|
|
130
|
+
* It inherits the ui props from Card component and applies the custom styling
|
|
131
|
+
* accordingly.
|
|
132
|
+
* @internal
|
|
120
133
|
* @see Block
|
|
121
134
|
*/
|
|
122
135
|
|
|
@@ -27,8 +27,8 @@ const getStyles = size => {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @
|
|
30
|
+
* A base element that displays a group of avatars.
|
|
31
|
+
* @internal
|
|
32
32
|
* @param {AvatarGroupProps} AvatarGroupProps - The props necessary for the AvatarGroup.
|
|
33
33
|
* @see AuthorGroup
|
|
34
34
|
* @see CollaboratorGroup
|
|
@@ -71,8 +71,8 @@ const renderImageIcon = (url, testId) => {
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @
|
|
74
|
+
* A base element that displays some text with an associated icon.
|
|
75
|
+
* @internal
|
|
76
76
|
* @param {BadgeProps} BadgeProps - The props necessary for the Badge.
|
|
77
77
|
* @see CommentCount
|
|
78
78
|
* @see ViewCount
|
|
@@ -19,8 +19,8 @@ const typeToDescriptorMap = {
|
|
|
19
19
|
modified: messages.modified_on
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
22
|
+
* A base element that displays an ISO Timestamp in text.
|
|
23
|
+
* @internal
|
|
24
24
|
* @param {DateTimeProps} DateTimeProps - The props necessary for the DateTime element.
|
|
25
25
|
* @see CreatedOn
|
|
26
26
|
* @see ModifiedOn
|
|
@@ -67,8 +67,8 @@ const renderImageIcon = (defaultIcon, icon, url, testId) => {
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @
|
|
70
|
+
* A base element that displays an Icon or favicon.
|
|
71
|
+
* @internal
|
|
72
72
|
* @param {IconProps} IconProps - The props necessary for the Icon element.
|
|
73
73
|
* @see LinkIcon
|
|
74
74
|
*/
|
|
@@ -5,12 +5,12 @@ import { ElementName } from '../../../../constants';
|
|
|
5
5
|
// createElement and renderElementItems
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* An AvatarGroup element using the data from AuthorGroup in the Flexible UI Context.
|
|
9
9
|
* @see AvatarGroup
|
|
10
10
|
*/
|
|
11
11
|
export const AuthorGroup = createElement(ElementName.AuthorGroup);
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* An AvatarGroup element using the data from CollaboratorGroup in the Flexible UI Context.
|
|
14
14
|
* @see AvatarGroup
|
|
15
15
|
*/
|
|
16
16
|
|