@atlaskit/link-create 1.15.1 → 1.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/controllers/experience-tracker/index.js +9 -14
- package/dist/cjs/ui/main.js +1 -1
- package/dist/es2019/controllers/experience-tracker/index.js +9 -14
- package/dist/es2019/ui/main.js +1 -1
- package/dist/esm/controllers/experience-tracker/index.js +9 -14
- package/dist/esm/ui/main.js +1 -1
- package/dist/types/ui/create-form/main.d.ts +1 -1
- package/dist/types-ts4.5/ui/create-form/main.d.ts +1 -1
- package/example-helpers/mock-disclaimer.tsx +19 -0
- package/example-helpers/mock-plugin-form.tsx +3 -1
- package/package.json +11 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-create
|
|
2
2
|
|
|
3
|
+
## 1.15.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#86416](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86416) [`91c59efc1417`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/91c59efc1417) - Cleans up feature flag platform.linking-platform.link-create.slo-ignore-failed-fetch permanently marking failed to fetch errors to be ignored for SLO metrics.
|
|
8
|
+
|
|
9
|
+
## 1.15.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
14
|
+
|
|
3
15
|
## 1.15.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -91,7 +91,7 @@ var Experience = exports.Experience = function Experience(_ref) {
|
|
|
91
91
|
/**
|
|
92
92
|
* Whether the failure should be involved when considering SLI/SLO
|
|
93
93
|
*/
|
|
94
|
-
isSLOFailure:
|
|
94
|
+
isSLOFailure: isErrorSLOFailure(error)
|
|
95
95
|
}, (0, _errors.getNetworkFields)(error)))).fire(_constants.ANALYTICS_CHANNEL);
|
|
96
96
|
if (error instanceof Error) {
|
|
97
97
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.enable-sentry-client')) {
|
|
@@ -99,19 +99,14 @@ var Experience = exports.Experience = function Experience(_ref) {
|
|
|
99
99
|
(0, _sentry.captureException)(error, 'link-create');
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (experience.current !== experienceStatus) {
|
|
111
|
-
experience.current = experienceStatus;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Only consider the experience truly failed if the
|
|
105
|
+
* failure is one we haven't correctly handled.
|
|
106
|
+
*
|
|
107
|
+
* In otherwords allow the experience to be "restarted" for the user to try again
|
|
108
|
+
*/
|
|
109
|
+
if (isErrorSLOFailure(error)) {
|
|
115
110
|
if (experience.current !== experienceStatus) {
|
|
116
111
|
experience.current = experienceStatus;
|
|
117
112
|
}
|
package/dist/cjs/ui/main.js
CHANGED
|
@@ -31,7 +31,7 @@ var LinkCreateWithAnalyticsContext = (0, _analytics.withLinkCreateAnalyticsConte
|
|
|
31
31
|
}));
|
|
32
32
|
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
33
33
|
packageName: "@atlaskit/link-create" || '',
|
|
34
|
-
packageVersion: "1.15.
|
|
34
|
+
packageVersion: "1.15.3" || '',
|
|
35
35
|
component: _constants.COMPONENT_NAME,
|
|
36
36
|
componentName: _constants.COMPONENT_NAME
|
|
37
37
|
};
|
|
@@ -77,7 +77,7 @@ export const Experience = ({
|
|
|
77
77
|
/**
|
|
78
78
|
* Whether the failure should be involved when considering SLI/SLO
|
|
79
79
|
*/
|
|
80
|
-
isSLOFailure:
|
|
80
|
+
isSLOFailure: isErrorSLOFailure(error),
|
|
81
81
|
/**
|
|
82
82
|
* Fields related to `Response` object that can help with debugging
|
|
83
83
|
* what has gone wrong
|
|
@@ -90,19 +90,14 @@ export const Experience = ({
|
|
|
90
90
|
captureException(error, 'link-create');
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (experience.current !== experienceStatus) {
|
|
102
|
-
experience.current = experienceStatus;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
} else {
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Only consider the experience truly failed if the
|
|
96
|
+
* failure is one we haven't correctly handled.
|
|
97
|
+
*
|
|
98
|
+
* In otherwords allow the experience to be "restarted" for the user to try again
|
|
99
|
+
*/
|
|
100
|
+
if (isErrorSLOFailure(error)) {
|
|
106
101
|
if (experience.current !== experienceStatus) {
|
|
107
102
|
experience.current = experienceStatus;
|
|
108
103
|
}
|
package/dist/es2019/ui/main.js
CHANGED
|
@@ -23,7 +23,7 @@ const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE
|
|
|
23
23
|
}));
|
|
24
24
|
export const PACKAGE_DATA = {
|
|
25
25
|
packageName: "@atlaskit/link-create" || '',
|
|
26
|
-
packageVersion: "1.15.
|
|
26
|
+
packageVersion: "1.15.3" || '',
|
|
27
27
|
component: COMPONENT_NAME,
|
|
28
28
|
componentName: COMPONENT_NAME
|
|
29
29
|
};
|
|
@@ -81,7 +81,7 @@ export var Experience = function Experience(_ref) {
|
|
|
81
81
|
/**
|
|
82
82
|
* Whether the failure should be involved when considering SLI/SLO
|
|
83
83
|
*/
|
|
84
|
-
isSLOFailure:
|
|
84
|
+
isSLOFailure: isErrorSLOFailure(error)
|
|
85
85
|
}, getNetworkFields(error)))).fire(ANALYTICS_CHANNEL);
|
|
86
86
|
if (error instanceof Error) {
|
|
87
87
|
if (getBooleanFF('platform.linking-platform.link-create.enable-sentry-client')) {
|
|
@@ -89,19 +89,14 @@ export var Experience = function Experience(_ref) {
|
|
|
89
89
|
captureException(error, 'link-create');
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (experience.current !== experienceStatus) {
|
|
101
|
-
experience.current = experienceStatus;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
} else {
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Only consider the experience truly failed if the
|
|
95
|
+
* failure is one we haven't correctly handled.
|
|
96
|
+
*
|
|
97
|
+
* In otherwords allow the experience to be "restarted" for the user to try again
|
|
98
|
+
*/
|
|
99
|
+
if (isErrorSLOFailure(error)) {
|
|
105
100
|
if (experience.current !== experienceStatus) {
|
|
106
101
|
experience.current = experienceStatus;
|
|
107
102
|
}
|
package/dist/esm/ui/main.js
CHANGED
|
@@ -23,7 +23,7 @@ var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__
|
|
|
23
23
|
}));
|
|
24
24
|
export var PACKAGE_DATA = {
|
|
25
25
|
packageName: "@atlaskit/link-create" || '',
|
|
26
|
-
packageVersion: "1.15.
|
|
26
|
+
packageVersion: "1.15.3" || '',
|
|
27
27
|
component: COMPONENT_NAME,
|
|
28
28
|
componentName: COMPONENT_NAME
|
|
29
29
|
};
|
|
@@ -43,5 +43,5 @@ export interface CreateFormProps<FormData> {
|
|
|
43
43
|
initialValues?: DisallowReservedFields<FormData>;
|
|
44
44
|
}
|
|
45
45
|
export declare const TEST_ID = "link-create-form";
|
|
46
|
-
export declare const CreateForm: <
|
|
46
|
+
export declare const CreateForm: <FormData extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, initialValues, }: CreateFormProps<FormData>) => jsx.JSX.Element;
|
|
47
47
|
export {};
|
|
@@ -45,5 +45,5 @@ export interface CreateFormProps<FormData> {
|
|
|
45
45
|
initialValues?: DisallowReservedFields<FormData>;
|
|
46
46
|
}
|
|
47
47
|
export declare const TEST_ID = "link-create-form";
|
|
48
|
-
export declare const CreateForm: <
|
|
48
|
+
export declare const CreateForm: <FormData extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, initialValues, }: CreateFormProps<FormData>) => jsx.JSX.Element;
|
|
49
49
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
|
+
|
|
5
|
+
export const MockDisclaimer = () => {
|
|
6
|
+
const { locale } = useIntl();
|
|
7
|
+
const parentLocale = locale.split(/[-_]/)[0];
|
|
8
|
+
const disclaimer = 'This is a mocked plugin.';
|
|
9
|
+
|
|
10
|
+
if (parentLocale !== 'en') {
|
|
11
|
+
return (
|
|
12
|
+
<p>
|
|
13
|
+
{disclaimer} <small>{`(locale ${locale} not available)`}</small>
|
|
14
|
+
</p>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return <p>{disclaimer}</p>;
|
|
19
|
+
};
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
Validator,
|
|
10
10
|
} from '../src';
|
|
11
11
|
|
|
12
|
+
import { MockDisclaimer } from './mock-disclaimer';
|
|
13
|
+
|
|
12
14
|
interface pluginProps {
|
|
13
15
|
shouldThrowError?: boolean;
|
|
14
16
|
}
|
|
@@ -62,7 +64,7 @@ export function MockPluginForm({ shouldThrowError }: pluginProps) {
|
|
|
62
64
|
|
|
63
65
|
return (
|
|
64
66
|
<div>
|
|
65
|
-
|
|
67
|
+
<MockDisclaimer />
|
|
66
68
|
<CreateForm<CreateFormProps<FormData>>
|
|
67
69
|
onSubmit={mockHandleSubmit}
|
|
68
70
|
onCancel={onCancel}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-create",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.3",
|
|
4
4
|
"description": "The driver component of meta creation flow",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
],
|
|
17
17
|
"website": {
|
|
18
18
|
"name": "LinkCreate"
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"i18n": true
|
|
20
21
|
},
|
|
21
22
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
22
23
|
"main": "dist/cjs/index.js",
|
|
@@ -38,19 +39,19 @@
|
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
41
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
41
|
-
"@atlaskit/button": "^17.
|
|
42
|
+
"@atlaskit/button": "^17.8.0",
|
|
42
43
|
"@atlaskit/empty-state": "^7.7.0",
|
|
43
|
-
"@atlaskit/form": "^9.0
|
|
44
|
+
"@atlaskit/form": "^9.1.0",
|
|
44
45
|
"@atlaskit/icon": "^22.1.0",
|
|
45
46
|
"@atlaskit/intl-messages-provider": "^1.0.2",
|
|
46
|
-
"@atlaskit/linking-common": "^5.
|
|
47
|
+
"@atlaskit/linking-common": "^5.6.0",
|
|
47
48
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
48
49
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
49
|
-
"@atlaskit/primitives": "^5.
|
|
50
|
+
"@atlaskit/primitives": "^5.2.0",
|
|
50
51
|
"@atlaskit/select": "^17.3.0",
|
|
51
52
|
"@atlaskit/spinner": "^16.0.0",
|
|
52
53
|
"@atlaskit/textfield": "^6.1.0",
|
|
53
|
-
"@atlaskit/tokens": "^1.
|
|
54
|
+
"@atlaskit/tokens": "^1.42.0",
|
|
54
55
|
"@babel/runtime": "^7.0.0",
|
|
55
56
|
"@emotion/react": "^11.7.1",
|
|
56
57
|
"debounce-promise": "^3.1.2",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"devDependencies": {
|
|
65
66
|
"@af/integration-testing": "*",
|
|
66
67
|
"@af/visual-regression": "*",
|
|
67
|
-
"@atlaskit/link-test-helpers": "^
|
|
68
|
+
"@atlaskit/link-test-helpers": "^7.0.0",
|
|
68
69
|
"@atlaskit/visual-regression": "*",
|
|
69
70
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
70
71
|
"@atlassian/feature-flags-test-utils": "*",
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
"@types/debounce-promise": "^3.1.2",
|
|
74
75
|
"fetch-mock": "^8.0.0",
|
|
75
76
|
"react-dom": "^16.8.0",
|
|
76
|
-
"typescript": "~4.
|
|
77
|
+
"typescript": "~5.4.2",
|
|
77
78
|
"wait-for-expect": "^1.2.0"
|
|
78
79
|
},
|
|
79
80
|
"scripts": {
|
|
@@ -126,11 +127,8 @@
|
|
|
126
127
|
"platform.linking-platform.link-create.tmp-log-error-message": {
|
|
127
128
|
"type": "boolean"
|
|
128
129
|
},
|
|
129
|
-
"platform.linking-platform.link-create.slo-ignore-failed-fetch": {
|
|
130
|
-
"type": "boolean"
|
|
131
|
-
},
|
|
132
130
|
"platform.linking-platform.link-create.enable-expected-field-errors": {
|
|
133
131
|
"type": "boolean"
|
|
134
132
|
}
|
|
135
133
|
}
|
|
136
|
-
}
|
|
134
|
+
}
|