@atlaskit/share 3.0.2 → 3.0.6
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 +24 -0
- package/dist/cjs/clients/ShareServiceClient.js +2 -2
- package/dist/cjs/components/IntegrationButton.js +3 -1
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +11 -9
- package/dist/cjs/components/MessagesIntlProvider.js +2 -2
- package/dist/cjs/components/ShareButton.js +3 -1
- package/dist/cjs/components/ShareDialogContainer.js +2 -2
- package/dist/cjs/components/ShareDialogWithTrigger.js +2 -2
- package/dist/cjs/components/ShareForm.js +27 -17
- package/dist/cjs/components/SplitButton.js +3 -1
- package/dist/cjs/components/analytics.js +3 -3
- package/dist/cjs/components/colorSlackIcon.js +67 -0
- package/dist/cjs/components/styles.js +5 -3
- package/dist/cjs/i18n/cs.js +1 -0
- package/dist/cjs/i18n/de.js +1 -0
- package/dist/cjs/i18n/fr.js +1 -0
- package/dist/cjs/i18n/pl.js +1 -0
- package/dist/cjs/i18n/pt_BR.js +1 -0
- package/dist/cjs/i18n/ru.js +1 -0
- package/dist/cjs/i18n/tr.js +1 -0
- package/dist/cjs/i18n/vi.js +1 -0
- package/dist/cjs/i18n/zh_TW.js +1 -0
- package/dist/cjs/i18n.js +10 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +12 -10
- package/dist/es2019/components/ShareForm.js +23 -12
- package/dist/es2019/components/analytics.js +1 -1
- package/dist/es2019/components/colorSlackIcon.js +57 -0
- package/dist/es2019/i18n/cs.js +1 -0
- package/dist/es2019/i18n/de.js +1 -0
- package/dist/es2019/i18n/fr.js +1 -0
- package/dist/es2019/i18n/pl.js +1 -0
- package/dist/es2019/i18n/pt_BR.js +1 -0
- package/dist/es2019/i18n/ru.js +1 -0
- package/dist/es2019/i18n/tr.js +1 -0
- package/dist/es2019/i18n/vi.js +1 -0
- package/dist/es2019/i18n/zh_TW.js +1 -0
- package/dist/es2019/i18n.js +10 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/clients/ShareServiceClient.js +2 -2
- package/dist/esm/components/IntegrationButton.js +2 -1
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +12 -10
- package/dist/esm/components/MessagesIntlProvider.js +2 -2
- package/dist/esm/components/ShareButton.js +2 -1
- package/dist/esm/components/ShareDialogContainer.js +2 -2
- package/dist/esm/components/ShareDialogWithTrigger.js +2 -2
- package/dist/esm/components/ShareForm.js +25 -17
- package/dist/esm/components/SplitButton.js +2 -1
- package/dist/esm/components/analytics.js +3 -3
- package/dist/esm/components/colorSlackIcon.js +57 -0
- package/dist/esm/components/styles.js +4 -3
- package/dist/esm/i18n/cs.js +1 -0
- package/dist/esm/i18n/de.js +1 -0
- package/dist/esm/i18n/fr.js +1 -0
- package/dist/esm/i18n/pl.js +1 -0
- package/dist/esm/i18n/pt_BR.js +1 -0
- package/dist/esm/i18n/ru.js +1 -0
- package/dist/esm/i18n/tr.js +1 -0
- package/dist/esm/i18n/vi.js +1 -0
- package/dist/esm/i18n/zh_TW.js +1 -0
- package/dist/esm/i18n.js +10 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/ShareForm.d.ts +1 -5
- package/dist/types/components/analytics.d.ts +1 -1
- package/dist/types/components/colorSlackIcon.d.ts +3 -0
- package/dist/types/i18n/cs.d.ts +1 -0
- package/dist/types/i18n/de.d.ts +1 -0
- package/dist/types/i18n/fr.d.ts +1 -0
- package/dist/types/i18n/pl.d.ts +1 -0
- package/dist/types/i18n/pt_BR.d.ts +1 -0
- package/dist/types/i18n/ru.d.ts +1 -0
- package/dist/types/i18n/tr.d.ts +1 -0
- package/dist/types/i18n/vi.d.ts +1 -0
- package/dist/types/i18n/zh_TW.d.ts +1 -0
- package/dist/types/i18n.d.ts +10 -0
- package/package.json +8 -8
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
+
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
6
7
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
7
8
|
import Form from '@atlaskit/form';
|
|
8
9
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
@@ -12,6 +13,7 @@ import { gridSize } from '@atlaskit/theme/constants';
|
|
|
12
13
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
14
|
import { messages } from '../i18n';
|
|
14
15
|
import { TabType } from '../types';
|
|
16
|
+
import { ANALYTICS_SOURCE, INTEGRATION_MODAL_SOURCE } from './analytics';
|
|
15
17
|
import { CommentField } from './CommentField';
|
|
16
18
|
import CopyLinkButton from './CopyLinkButton';
|
|
17
19
|
import { IntegrationForm } from './IntegrationForm';
|
|
@@ -31,7 +33,7 @@ const CenterAlignedIconWrapper = styled.div`
|
|
|
31
33
|
}
|
|
32
34
|
`;
|
|
33
35
|
export const FormWrapper = styled.div`
|
|
34
|
-
margin-top: ${
|
|
36
|
+
margin-top: ${gridSize()}px;
|
|
35
37
|
width: 100%;
|
|
36
38
|
|
|
37
39
|
/* jira has a class override font settings on h1 in gh-custom-field-pickers.css */
|
|
@@ -52,6 +54,7 @@ const IntegrationWrapper = styled.div`
|
|
|
52
54
|
align-items: center;
|
|
53
55
|
`;
|
|
54
56
|
const IntegrationIconWrapper = styled.span`
|
|
57
|
+
margin-bottom: -6px;
|
|
55
58
|
margin-right: 5px;
|
|
56
59
|
`;
|
|
57
60
|
|
|
@@ -94,7 +97,11 @@ class InternalForm extends React.PureComponent {
|
|
|
94
97
|
copyTooltipText,
|
|
95
98
|
helperMessage
|
|
96
99
|
} = this.props;
|
|
97
|
-
return /*#__PURE__*/React.createElement(
|
|
100
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
101
|
+
data: {
|
|
102
|
+
source: ANALYTICS_SOURCE
|
|
103
|
+
}
|
|
104
|
+
}, /*#__PURE__*/React.createElement("form", formProps, showTitle && /*#__PURE__*/React.createElement(ShareHeader, {
|
|
98
105
|
title: title
|
|
99
106
|
}), /*#__PURE__*/React.createElement(FormField, null, /*#__PURE__*/React.createElement(UserPickerField, {
|
|
100
107
|
onInputChange: onUserInputChange,
|
|
@@ -118,7 +125,7 @@ class InternalForm extends React.PureComponent {
|
|
|
118
125
|
link: copyLink,
|
|
119
126
|
isPublicLink: isPublicLink,
|
|
120
127
|
copyTooltipText: copyTooltipText
|
|
121
|
-
}), this.renderSubmitButton()));
|
|
128
|
+
}), this.renderSubmitButton())));
|
|
122
129
|
});
|
|
123
130
|
|
|
124
131
|
_defineProperty(this, "renderSubmitButton", () => {
|
|
@@ -130,11 +137,15 @@ class InternalForm extends React.PureComponent {
|
|
|
130
137
|
shareError,
|
|
131
138
|
submitButtonLabel,
|
|
132
139
|
isDisabled,
|
|
133
|
-
isPublicLink
|
|
140
|
+
isPublicLink,
|
|
141
|
+
integrationMode
|
|
134
142
|
} = this.props;
|
|
135
143
|
const shouldShowWarning = shareError && !isSharing;
|
|
136
144
|
const buttonAppearance = !shouldShowWarning ? 'primary' : 'warning';
|
|
137
|
-
const
|
|
145
|
+
const tabMode = integrationMode === 'tabs';
|
|
146
|
+
const formPublicLabel = tabMode ? messages.formSharePublic : messages.formSendPublic;
|
|
147
|
+
const formSendLabel = tabMode ? messages.formShare : messages.formSend;
|
|
148
|
+
const sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
138
149
|
const buttonLabel = shareError ? messages.formRetry : sendLabel;
|
|
139
150
|
const ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : React.Fragment;
|
|
140
151
|
return /*#__PURE__*/React.createElement(SubmitButtonWrapper, null, /*#__PURE__*/React.createElement(CenterAlignedIconWrapper, null, shouldShowWarning && /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -217,19 +228,19 @@ class InternalForm extends React.PureComponent {
|
|
|
217
228
|
key: `share-tab-${firstIntegration.type}`
|
|
218
229
|
}, /*#__PURE__*/React.createElement(IntegrationWrapper, null, /*#__PURE__*/React.createElement(IntegrationIconWrapper, null, /*#__PURE__*/React.createElement(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))), /*#__PURE__*/React.createElement(TabPanel, {
|
|
219
230
|
key: `share-tabPanel-default`
|
|
220
|
-
}, /*#__PURE__*/React.createElement(FormWrapper, {
|
|
221
|
-
isMainShare: true
|
|
222
|
-
}, this.renderShareForm())), /*#__PURE__*/React.createElement(TabPanel, {
|
|
231
|
+
}, /*#__PURE__*/React.createElement(FormWrapper, null, this.renderShareForm())), /*#__PURE__*/React.createElement(TabPanel, {
|
|
223
232
|
key: `share-tabPanel-integration`
|
|
224
|
-
}, /*#__PURE__*/React.createElement(
|
|
225
|
-
|
|
226
|
-
|
|
233
|
+
}, /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
234
|
+
data: {
|
|
235
|
+
source: INTEGRATION_MODAL_SOURCE
|
|
236
|
+
}
|
|
237
|
+
}, /*#__PURE__*/React.createElement(FormWrapper, null, /*#__PURE__*/React.createElement(IntegrationForm, {
|
|
227
238
|
Content: firstIntegration.Content,
|
|
228
239
|
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
229
240
|
changeTab: index => {
|
|
230
241
|
this.changeTab(index);
|
|
231
242
|
}
|
|
232
|
-
}))));
|
|
243
|
+
})))));
|
|
233
244
|
}
|
|
234
245
|
|
|
235
246
|
return this.renderShareForm();
|
|
@@ -24,7 +24,7 @@ const createScreenEvent = (name, attributes = {}) => ({
|
|
|
24
24
|
|
|
25
25
|
export const CHANNEL_ID = 'fabric-elements';
|
|
26
26
|
export const ANALYTICS_SOURCE = 'shareModal';
|
|
27
|
-
export const INTEGRATION_MODAL_SOURCE = '
|
|
27
|
+
export const INTEGRATION_MODAL_SOURCE = 'integrationShareDialog';
|
|
28
28
|
export const screenEvent = ({
|
|
29
29
|
isPublicLink = false
|
|
30
30
|
}) => createScreenEvent(ANALYTICS_SOURCE, {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const SlackIcon = () => {
|
|
4
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
5
|
+
width: "16",
|
|
6
|
+
height: "16",
|
|
7
|
+
viewBox: "0 0 125 125"
|
|
8
|
+
}, /*#__PURE__*/React.createElement("style", null, '.prefix__st0{fill:#e01e5a}.prefix__st1{fill:#36c5f0}.prefix__st2{fill:#2eb67d}.prefix__st3{fill:#ecb22e}'), /*#__PURE__*/React.createElement("path", {
|
|
9
|
+
fill: "none",
|
|
10
|
+
id: "prefix__canvas_background",
|
|
11
|
+
d: "M-1-1h127v127H-1z"
|
|
12
|
+
}), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("g", {
|
|
13
|
+
id: "prefix__svg_1"
|
|
14
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
15
|
+
id: "prefix__svg_2"
|
|
16
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
17
|
+
id: "prefix__svg_3",
|
|
18
|
+
d: "M27.4 79.2c0 7.1-5.8 12.9-12.9 12.9-7.1 0-12.9-5.8-12.9-12.9 0-7.1 5.8-12.9 12.9-12.9h12.9v12.9z",
|
|
19
|
+
className: "prefix__st0"
|
|
20
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
id: "prefix__svg_4",
|
|
22
|
+
d: "M33.9 79.2c0-7.1 5.8-12.9 12.9-12.9s12.9 5.8 12.9 12.9v32.3c0 7.1-5.8 12.9-12.9 12.9s-12.9-5.8-12.9-12.9V79.2z",
|
|
23
|
+
className: "prefix__st0"
|
|
24
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
25
|
+
id: "prefix__svg_5"
|
|
26
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
27
|
+
id: "prefix__svg_6",
|
|
28
|
+
d: "M46.8 27.4c-7.1 0-12.9-5.8-12.9-12.9 0-7.1 5.8-12.9 12.9-12.9s12.9 5.8 12.9 12.9v12.9H46.8z",
|
|
29
|
+
className: "prefix__st1"
|
|
30
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
31
|
+
id: "prefix__svg_7",
|
|
32
|
+
d: "M46.8 33.9c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H14.5c-7.1 0-12.9-5.8-12.9-12.9s5.8-12.9 12.9-12.9h32.3z",
|
|
33
|
+
className: "prefix__st1"
|
|
34
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
35
|
+
id: "prefix__svg_8"
|
|
36
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
37
|
+
id: "prefix__svg_9",
|
|
38
|
+
d: "M98.6 46.8c0-7.1 5.8-12.9 12.9-12.9 7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H98.6V46.8z",
|
|
39
|
+
className: "prefix__st2"
|
|
40
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
41
|
+
id: "prefix__svg_10",
|
|
42
|
+
d: "M92.1 46.8c0 7.1-5.8 12.9-12.9 12.9-7.1 0-12.9-5.8-12.9-12.9V14.5c0-7.1 5.8-12.9 12.9-12.9 7.1 0 12.9 5.8 12.9 12.9v32.3z",
|
|
43
|
+
className: "prefix__st2"
|
|
44
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
45
|
+
id: "prefix__svg_11"
|
|
46
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
47
|
+
id: "prefix__svg_12",
|
|
48
|
+
d: "M79.2 98.6c7.1 0 12.9 5.8 12.9 12.9 0 7.1-5.8 12.9-12.9 12.9-7.1 0-12.9-5.8-12.9-12.9V98.6h12.9z",
|
|
49
|
+
className: "prefix__st3"
|
|
50
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
51
|
+
id: "prefix__svg_13",
|
|
52
|
+
d: "M79.2 92.1c-7.1 0-12.9-5.8-12.9-12.9 0-7.1 5.8-12.9 12.9-12.9h32.3c7.1 0 12.9 5.8 12.9 12.9 0 7.1-5.8 12.9-12.9 12.9H79.2z",
|
|
53
|
+
className: "prefix__st3"
|
|
54
|
+
})))));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export default SlackIcon;
|
package/dist/es2019/i18n/cs.js
CHANGED
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': 'Vyberte alespoň jednoho uživatele, skupinu nebo tým.',
|
|
32
32
|
'fabric.elements.share.form.user-picker.validation.required.jira': 'Vyberte alespoň jednoho uživatele, tým nebo e-mail.',
|
|
33
33
|
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': 'Vyberte alespoň jednoho uživatele nebo tým.',
|
|
34
|
+
'fabric.elements.share.in.integration.button': 'Sdílet v: {integrationName}',
|
|
34
35
|
'fabric.elements.share.success.message': '{object, select, blogpost {Příspěvek na blogu je sdílen} board {Board je sdílen} calendar {Kalendář je sdílen} draft {Koncept je sdílen} filter {Filtr je sdílen} issue {Požadavek je sdílen} media {Multimediální soubor je sdílen} page {Stránka je sdílena} project {Projekt je sdílen} pullrequest {Pull request je sdílen} question {Otázka je sdílena} report {Sestava je sdílena} repository {Repozitář je sdílen} request {Žádost je sdílena} roadmap {Plán je sdílen} site {Web je sdílen} space {Prostor je sdílen} other {Odkaz je sdílen}}',
|
|
35
36
|
'fabric.elements.share.to.integration.button': 'Sdílet ve službě {integrationName}',
|
|
36
37
|
'fabric.elements.share.trigger.button.icon.label': 'Ikona sdílení',
|
package/dist/es2019/i18n/de.js
CHANGED
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': 'Wählen Sie mindestens einen Benutzer, eine Gruppe oder ein Team aus.',
|
|
32
32
|
'fabric.elements.share.form.user-picker.validation.required.jira': 'Bitte wählen Sie mindestens einen Benutzer, ein Team oder eine E-Mail-Adresse aus.',
|
|
33
33
|
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': 'Wählen Sie mindestens einen Benutzer oder ein Team aus.',
|
|
34
|
+
'fabric.elements.share.in.integration.button': 'In {integrationName} teilen',
|
|
34
35
|
'fabric.elements.share.success.message': '{object, select, blogpost {Geteilter Blogpost} board {Geteiltes Board} calendar {Geteilter Kalender} draft {Geteilter Entwurf} filter {Geteilter Filter} issue {Geteilter Vorgang} media {Geteilte Medien} page {Geteilte Seite} project {Geteiltes Projekt} pullrequest {Geteilte Pull-Anfrage} question {Geteilte Frage} report {Geteilter Bericht} repository {Geteiltes Repository} request {Geteilte Anfrage} roadmap {Geteilte Roadmap} site {Geteilte Site} space {Geteilter Bereich} other {Geteilter Link}}',
|
|
35
36
|
'fabric.elements.share.to.integration.button': 'Mit {integrationName} teilen',
|
|
36
37
|
'fabric.elements.share.trigger.button.icon.label': 'Teilen-Symbol',
|
package/dist/es2019/i18n/fr.js
CHANGED
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': 'Sélectionnez au moins un utilisateur, un groupe ou une équipe.',
|
|
32
32
|
'fabric.elements.share.form.user-picker.validation.required.jira': 'Sélectionnez au moins un utilisateur, une équipe ou une adresse e-mail.',
|
|
33
33
|
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': 'Sélectionnez au moins un utilisateur ou une équipe.',
|
|
34
|
+
'fabric.elements.share.in.integration.button': 'Partager dans {integrationName}',
|
|
34
35
|
'fabric.elements.share.success.message': '{object, select, blogpost {Billet de blog partagé} board {Tableau partagé} calendar {Calendrier partagé} draft {Brouillon partagé} filter {Filtre partagé} issue {Ticket partagé} media {Support partagé} page {Page partagée} project {Projet partagé} pullrequest {Pull request partagée} question {Question partagée} report {Rapport partagé} repository {Dépôt partagé} request {Demande partagée} roadmap {Feuille de route partagée} site {Site partagé} space {Espace partagé} other {Lien partagé}}',
|
|
35
36
|
'fabric.elements.share.to.integration.button': 'Partager avec {integrationName}',
|
|
36
37
|
'fabric.elements.share.trigger.button.icon.label': 'Icône de partage',
|
package/dist/es2019/i18n/pl.js
CHANGED
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': 'Wybierz co najmniej jednego użytkownika, jedną grupę lub jeden zespół.',
|
|
32
32
|
'fabric.elements.share.form.user-picker.validation.required.jira': 'Wybierz co najmniej jednego użytkownika, jeden zespół lub adres e-mail.',
|
|
33
33
|
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': 'Wybierz co najmniej jednego użytkownika lub jeden zespół.',
|
|
34
|
+
'fabric.elements.share.in.integration.button': 'Udostępnij w {integrationName}',
|
|
34
35
|
'fabric.elements.share.success.message': '{object, select, blogpost {Udostępniono wpis na blogu} board {Udostępniono tablicę} calendar {Udostępniono kalendarz} draft {Udostępniono wersję roboczą} filter {Udostępniono filtr} issue {Udostępniono zgłoszenie} media {Udostępniono media} page {Udostępniono stronę} project {Udostępniono projekt} pullrequest {Udostępniono pull request} question {Udostępniono pytanie} report {Udostępniono raport} repository {Udostępniono repozytorium} request {Udostępniono wniosek} roadmap {Udostępniono harmonogram} site {Udostępniono witrynę} space {Udostępniono przestrzeń} other {Udostępniono łącze}}',
|
|
35
36
|
'fabric.elements.share.to.integration.button': 'Udostępnij w {integrationName}',
|
|
36
37
|
'fabric.elements.share.trigger.button.icon.label': 'Ikona udostępniania',
|
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': 'Selecione pelo menos um usuário, grupo ou equipe.',
|
|
32
32
|
'fabric.elements.share.form.user-picker.validation.required.jira': 'Selecione pelo menos um usuário, equipe ou e-mail.',
|
|
33
33
|
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': 'Selecione pelo menos um usuário ou equipe.',
|
|
34
|
+
'fabric.elements.share.in.integration.button': 'Compartilhar em {integrationName}',
|
|
34
35
|
'fabric.elements.share.success.message': '{object, select, blogpost {Postagem de blog compartilhada} board {Painel compartilhado} calendar {Calendário compartilhado} draft {Rascunho compartilhado} filter {Filtro compartilhado} issue {Item compartilhado} media {Mídia compartilhada} page {Página compartilhada} project {Projeto compartilhado} pullrequest {Solicitação pull compartilhada} question {Pergunta compartilhada} report {Relatório compartilhado} repository {Repositório compartilhado} request {Solicitação compartilhada} roadmap {Roteiro compartilhado} site {Site compartilhado} space {Espaço compartilhado} other {Link compartilhado}}',
|
|
35
36
|
'fabric.elements.share.to.integration.button': 'Compartilhar em {integrationName}',
|
|
36
37
|
'fabric.elements.share.trigger.button.icon.label': 'Ícone de compartilhamento',
|
package/dist/es2019/i18n/ru.js
CHANGED
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': 'Выберите хотя бы 1 пользователя, группу или команду.',
|
|
32
32
|
'fabric.elements.share.form.user-picker.validation.required.jira': 'Выберите хотя бы 1 пользователя, команду или адрес эл. почты.',
|
|
33
33
|
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': 'Выберите хотя бы 1 пользователя или команду.',
|
|
34
|
+
'fabric.elements.share.in.integration.button': 'Поделиться в {integrationName}',
|
|
34
35
|
'fabric.elements.share.success.message': '{object, select, blogpost {Вы поделились записью в блоге} board {Вы поделились доской} calendar {Вы поделились календарем} draft {Вы поделились черновиком} filter {Вы поделились фильтром} issue {Вы поделились задачей} media {Вы поделились объектом мультимедиа} page {Вы поделились страницей} project {Вы поделились проектом} pullrequest {Вы поделились запросом pull} question {Вы поделились вопросом} report {Вы поделились отчетом} repository {Вы поделились репозиторием} request {Вы поделились запросом} roadmap {Вы поделились дорожной картой} site {Вы поделились сайтом} space {Вы поделились разделом} other {Вы поделились ссылкой}}',
|
|
35
36
|
'fabric.elements.share.to.integration.button': 'Поделиться в {integrationName}',
|
|
36
37
|
'fabric.elements.share.trigger.button.icon.label': 'Значок «Поделиться»',
|
package/dist/es2019/i18n/tr.js
CHANGED
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': 'En az bir kullanıcı, grup veya takım seçin.',
|
|
32
32
|
'fabric.elements.share.form.user-picker.validation.required.jira': 'En az bir kullanıcı, takım veya e-posta adresi seçin.',
|
|
33
33
|
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': 'En az bir kullanıcı veya takım seçin.',
|
|
34
|
+
'fabric.elements.share.in.integration.button': '{integrationName} içinde paylaş',
|
|
34
35
|
'fabric.elements.share.success.message': '{object, select, blogpost {Blog gönderisi paylaşıldı} board {Pano paylaşıldı} calendar {Takvim paylaşıldı} draft {Taslak paylaşıldı} filter {Filtre paylaşıldı} issue {Konu paylaşıldı} media {Medya paylaşıldı} page {Sayfa paylaşıldı} project {Proje paylaşıldı} pullrequest {Çekme İsteği paylaşıldı} question {Soru paylaşıldı} report {Rapor paylaşıldı} repository {Depo paylaşıldı} request {Talep paylaşıldı} roadmap {Yol haritası paylaşıldı} site {Site paylaşıldı} space {Alan paylaşıldı} other {Bağlantı paylaşıldı}}',
|
|
35
36
|
'fabric.elements.share.to.integration.button': '{integrationName} üzerinden paylaş',
|
|
36
37
|
'fabric.elements.share.trigger.button.icon.label': 'Paylaşma simgesi',
|
package/dist/es2019/i18n/vi.js
CHANGED
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': 'Chọn ít nhất một người dùng, nhóm hoặc đội ngũ.',
|
|
32
32
|
'fabric.elements.share.form.user-picker.validation.required.jira': 'Chọn ít nhất một người dùng, nhóm hoặc email.',
|
|
33
33
|
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': 'Chọn ít nhất một người dùng hoặc đội ngũ.',
|
|
34
|
+
'fabric.elements.share.in.integration.button': 'Chia sẻ trong {integrationName}',
|
|
34
35
|
'fabric.elements.share.success.message': '{object, select, blogpost {Đã chia sẻ bài đăng} board {Đã chia sẻ bảng} calendar {Đã chia sẻ lịch} draft {Đã chia sẻ bản nháp} filter {Đã chia sẻ bộ lọc} issue {Đã chia sẻ vấn đề} media {Đã chia sẻ phương tiện} page {Đã chia sẻ trang} project {Đã chia sẻ dự án} pullrequest {Đã chia sẻ yêu cầu kéo} question {Đã chia sẻ câu hỏi} report {Đã chia sẻ báo cáo} repository {Đã chia sẻ kho lưu trữ} request {Đã chia sẻ yêu cầu} roadmap {Đã chia sẻ lộ trình} site {Đã chia sẻ trang} space {Đã chia sẻ không gian} other {Đã chia sẻ liên kết}}',
|
|
35
36
|
'fabric.elements.share.to.integration.button': 'Chia sẻ với {integrationName}',
|
|
36
37
|
'fabric.elements.share.trigger.button.icon.label': 'Biểu tượng chia sẻ',
|
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': '至少選取一個使用者、群組或團隊。',
|
|
32
32
|
'fabric.elements.share.form.user-picker.validation.required.jira': '請選取至少一個使用者、團隊或電子郵件。',
|
|
33
33
|
'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': '至少選取一個使用者或團隊。',
|
|
34
|
+
'fabric.elements.share.in.integration.button': '在 {integrationName} 中分享',
|
|
34
35
|
'fabric.elements.share.success.message': '{object, select, blogpost {已分享部落格貼文} board {已分享看板} calendar {已分享日曆} draft {已分享草稿} filter {已分享篩選條件} issue {已分享問題} media {已分享媒體} page {已分享頁面} project {已分享專案} pullrequest {已分享提取請求} question {已分享問題} report {已分享報告} repository {已分享存放庫} request {已分享請求} roadmap {已分享藍圖} site {已分享網站} space {已分享空間} other {已分享連結}}',
|
|
35
36
|
'fabric.elements.share.to.integration.button': '與 {integrationName} 分享',
|
|
36
37
|
'fabric.elements.share.trigger.button.icon.label': '分享圖示',
|
package/dist/es2019/i18n.js
CHANGED
|
@@ -10,11 +10,21 @@ export const messages = defineMessages({
|
|
|
10
10
|
defaultMessage: 'Send',
|
|
11
11
|
description: 'Label for Share form submit button.'
|
|
12
12
|
},
|
|
13
|
+
formShare: {
|
|
14
|
+
id: 'fabric.elements.share.form.share',
|
|
15
|
+
defaultMessage: 'Share',
|
|
16
|
+
description: 'Label for Share form submit button.'
|
|
17
|
+
},
|
|
13
18
|
formSendPublic: {
|
|
14
19
|
id: 'fabric.elements.share.form.public.send',
|
|
15
20
|
defaultMessage: 'Send public link',
|
|
16
21
|
description: 'Label for Share form submit button when link is public.'
|
|
17
22
|
},
|
|
23
|
+
formSharePublic: {
|
|
24
|
+
id: 'fabric.elements.share.form.public.share',
|
|
25
|
+
defaultMessage: 'Share public link',
|
|
26
|
+
description: 'Label for Share form submit button when link is public.'
|
|
27
|
+
},
|
|
18
28
|
formRetry: {
|
|
19
29
|
id: 'fabric.elements.share.form.retry',
|
|
20
30
|
defaultMessage: 'Retry',
|
package/dist/es2019/version.json
CHANGED
|
@@ -2,9 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
|
|
9
9
|
import { utils } from '@atlaskit/util-service-support';
|
|
10
10
|
export var DEFAULT_SHARE_PATH = 'share';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
+
var _excluded = ["text", "textColor", "IntegrationIcon"];
|
|
3
4
|
|
|
4
5
|
var _templateObject, _templateObject2;
|
|
5
6
|
|
|
@@ -16,7 +17,7 @@ var IntegrationButton = function IntegrationButton(props) {
|
|
|
16
17
|
var text = props.text,
|
|
17
18
|
textColor = props.textColor,
|
|
18
19
|
IntegrationIcon = props.IntegrationIcon,
|
|
19
|
-
restProps = _objectWithoutProperties(props,
|
|
20
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
20
21
|
|
|
21
22
|
return /*#__PURE__*/React.createElement(Button, restProps, /*#__PURE__*/React.createElement(IntegrationButtonCopyWrapper, {
|
|
22
23
|
theme: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
|
-
import {
|
|
3
|
+
import { INTEGRATION_MODAL_SOURCE } from '../analytics';
|
|
4
4
|
import { IntegrationForm } from '../IntegrationForm';
|
|
5
5
|
import { ShareForm } from '../ShareForm';
|
|
6
6
|
import { ShareFormWrapper } from '../ShareFormWrapper';
|
|
@@ -34,6 +34,7 @@ function LazyShareForm(props) {
|
|
|
34
34
|
onDismiss = props.onDismiss,
|
|
35
35
|
onSubmit = props.onSubmit,
|
|
36
36
|
onDialogClose = props.onDialogClose,
|
|
37
|
+
onTabChange = props.onTabChange,
|
|
37
38
|
selectPortalRef = props.selectPortalRef,
|
|
38
39
|
showIntegrationForm = props.showIntegrationForm,
|
|
39
40
|
selectedIntegration = props.selectedIntegration,
|
|
@@ -42,19 +43,19 @@ function LazyShareForm(props) {
|
|
|
42
43
|
defaultValue = props.defaultValue,
|
|
43
44
|
showTitle = props.showTitle;
|
|
44
45
|
var footer = /*#__PURE__*/React.createElement("div", null, bottomMessage ? /*#__PURE__*/React.createElement(BottomMessageWrapper, null, bottomMessage) : null, customFooter && /*#__PURE__*/React.createElement(CustomFooterWrapper, null, customFooter));
|
|
45
|
-
return /*#__PURE__*/React.createElement(
|
|
46
|
-
data: {
|
|
47
|
-
source: ANALYTICS_SOURCE
|
|
48
|
-
}
|
|
49
|
-
}, /*#__PURE__*/React.createElement(ShareFormWrapper, {
|
|
46
|
+
return /*#__PURE__*/React.createElement(ShareFormWrapper, {
|
|
50
47
|
footer: footer // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
|
|
51
48
|
// so we don't need to show title via ShareFormWrapper
|
|
52
49
|
,
|
|
53
50
|
shouldShowTitle: false
|
|
54
|
-
}, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/React.createElement(
|
|
51
|
+
}, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
52
|
+
data: {
|
|
53
|
+
source: INTEGRATION_MODAL_SOURCE
|
|
54
|
+
}
|
|
55
|
+
}, /*#__PURE__*/React.createElement(IntegrationForm, {
|
|
55
56
|
Content: selectedIntegration.Content,
|
|
56
57
|
onIntegrationClose: onDialogClose
|
|
57
|
-
}) : /*#__PURE__*/React.createElement(ShareForm, {
|
|
58
|
+
})) : /*#__PURE__*/React.createElement(ShareForm, {
|
|
58
59
|
copyLink: copyLink,
|
|
59
60
|
loadOptions: loadOptions,
|
|
60
61
|
title: shareFormTitle,
|
|
@@ -80,8 +81,9 @@ function LazyShareForm(props) {
|
|
|
80
81
|
onDismiss: onDismiss,
|
|
81
82
|
onLinkCopy: onLinkCopy,
|
|
82
83
|
onUserSelectionChange: onUserSelectionChange,
|
|
83
|
-
handleCloseDialog: onDialogClose
|
|
84
|
-
|
|
84
|
+
handleCloseDialog: onDialogClose,
|
|
85
|
+
onTabChange: onTabChange
|
|
86
|
+
}));
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
export default LazyShareForm;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
import { injectIntl, IntlProvider } from 'react-intl-next';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["text"];
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
6
|
export var ShareButton = /*#__PURE__*/React.forwardRef(function ShareButton(_ref, ref) {
|
|
6
7
|
var text = _ref.text,
|
|
7
|
-
props = _objectWithoutProperties(_ref,
|
|
8
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
8
9
|
|
|
9
10
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
10
11
|
ref: ref,
|
|
@@ -8,9 +8,9 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
10
|
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
12
|
|
|
13
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
14
|
|
|
15
15
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
16
|
|
|
@@ -10,9 +10,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
10
10
|
|
|
11
11
|
var _templateObject;
|
|
12
12
|
|
|
13
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
16
|
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
18
|
|
|
@@ -10,9 +10,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
10
10
|
|
|
11
11
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
12
12
|
|
|
13
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
16
|
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
18
|
|
|
@@ -21,6 +21,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
23
23
|
import styled from 'styled-components';
|
|
24
|
+
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
24
25
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
25
26
|
import Form from '@atlaskit/form';
|
|
26
27
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
@@ -30,6 +31,7 @@ import { gridSize } from '@atlaskit/theme/constants';
|
|
|
30
31
|
import Tooltip from '@atlaskit/tooltip';
|
|
31
32
|
import { messages } from '../i18n';
|
|
32
33
|
import { TabType } from '../types';
|
|
34
|
+
import { ANALYTICS_SOURCE, INTEGRATION_MODAL_SOURCE } from './analytics';
|
|
33
35
|
import { CommentField } from './CommentField';
|
|
34
36
|
import CopyLinkButton from './CopyLinkButton';
|
|
35
37
|
import { IntegrationForm } from './IntegrationForm';
|
|
@@ -37,13 +39,11 @@ import { ShareHeader } from './ShareHeader';
|
|
|
37
39
|
import { UserPickerField } from './UserPickerField';
|
|
38
40
|
var SubmitButtonWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n margin-left: auto;\n"])));
|
|
39
41
|
var CenterAlignedIconWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-self: center;\n padding: 0 10px;\n\n > div {\n line-height: 1;\n }\n"])));
|
|
40
|
-
export var FormWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n width: 100%;\n\n /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */\n #ghx-modes-tools #ghx-share & h1:first-child {\n margin-top: 0;\n }\n"])),
|
|
41
|
-
return props.isMainShare ? gridSize() : gridSize() * 2;
|
|
42
|
-
});
|
|
42
|
+
export var FormWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n width: 100%;\n\n /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */\n #ghx-modes-tools #ghx-share & h1:first-child {\n margin-top: 0;\n }\n"])), gridSize());
|
|
43
43
|
export var FormFooter = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-bottom: ", "px;\n display: flex;\n justify-content: flex-start;\n"])), gridSize);
|
|
44
44
|
var FormField = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-bottom: 12px;\n"])));
|
|
45
45
|
var IntegrationWrapper = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
|
|
46
|
-
var IntegrationIconWrapper = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: 5px;\n"])));
|
|
46
|
+
var IntegrationIconWrapper = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-bottom: -6px;\n margin-right: 5px;\n"])));
|
|
47
47
|
|
|
48
48
|
var integrationTabText = function integrationTabText(integrationName) {
|
|
49
49
|
return /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
|
|
@@ -98,7 +98,11 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
98
98
|
isPublicLink = _this$props.isPublicLink,
|
|
99
99
|
copyTooltipText = _this$props.copyTooltipText,
|
|
100
100
|
helperMessage = _this$props.helperMessage;
|
|
101
|
-
return /*#__PURE__*/React.createElement(
|
|
101
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
102
|
+
data: {
|
|
103
|
+
source: ANALYTICS_SOURCE
|
|
104
|
+
}
|
|
105
|
+
}, /*#__PURE__*/React.createElement("form", formProps, showTitle && /*#__PURE__*/React.createElement(ShareHeader, {
|
|
102
106
|
title: title
|
|
103
107
|
}), /*#__PURE__*/React.createElement(FormField, null, /*#__PURE__*/React.createElement(UserPickerField, {
|
|
104
108
|
onInputChange: onUserInputChange,
|
|
@@ -122,7 +126,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
122
126
|
link: copyLink,
|
|
123
127
|
isPublicLink: isPublicLink,
|
|
124
128
|
copyTooltipText: copyTooltipText
|
|
125
|
-
}), _this.renderSubmitButton()));
|
|
129
|
+
}), _this.renderSubmitButton())));
|
|
126
130
|
});
|
|
127
131
|
|
|
128
132
|
_defineProperty(_assertThisInitialized(_this), "renderSubmitButton", function () {
|
|
@@ -132,10 +136,14 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
132
136
|
shareError = _this$props2.shareError,
|
|
133
137
|
submitButtonLabel = _this$props2.submitButtonLabel,
|
|
134
138
|
isDisabled = _this$props2.isDisabled,
|
|
135
|
-
isPublicLink = _this$props2.isPublicLink
|
|
139
|
+
isPublicLink = _this$props2.isPublicLink,
|
|
140
|
+
integrationMode = _this$props2.integrationMode;
|
|
136
141
|
var shouldShowWarning = shareError && !isSharing;
|
|
137
142
|
var buttonAppearance = !shouldShowWarning ? 'primary' : 'warning';
|
|
138
|
-
var
|
|
143
|
+
var tabMode = integrationMode === 'tabs';
|
|
144
|
+
var formPublicLabel = tabMode ? messages.formSharePublic : messages.formSendPublic;
|
|
145
|
+
var formSendLabel = tabMode ? messages.formShare : messages.formSend;
|
|
146
|
+
var sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
139
147
|
var buttonLabel = shareError ? messages.formRetry : sendLabel;
|
|
140
148
|
var ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : React.Fragment;
|
|
141
149
|
return /*#__PURE__*/React.createElement(SubmitButtonWrapper, null, /*#__PURE__*/React.createElement(CenterAlignedIconWrapper, null, shouldShowWarning && /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -222,13 +230,13 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
222
230
|
key: "share-tab-".concat(firstIntegration.type)
|
|
223
231
|
}, /*#__PURE__*/React.createElement(IntegrationWrapper, null, /*#__PURE__*/React.createElement(IntegrationIconWrapper, null, /*#__PURE__*/React.createElement(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))), /*#__PURE__*/React.createElement(TabPanel, {
|
|
224
232
|
key: "share-tabPanel-default"
|
|
225
|
-
}, /*#__PURE__*/React.createElement(FormWrapper, {
|
|
226
|
-
isMainShare: true
|
|
227
|
-
}, this.renderShareForm())), /*#__PURE__*/React.createElement(TabPanel, {
|
|
233
|
+
}, /*#__PURE__*/React.createElement(FormWrapper, null, this.renderShareForm())), /*#__PURE__*/React.createElement(TabPanel, {
|
|
228
234
|
key: "share-tabPanel-integration"
|
|
229
|
-
}, /*#__PURE__*/React.createElement(
|
|
230
|
-
|
|
231
|
-
|
|
235
|
+
}, /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
236
|
+
data: {
|
|
237
|
+
source: INTEGRATION_MODAL_SOURCE
|
|
238
|
+
}
|
|
239
|
+
}, /*#__PURE__*/React.createElement(FormWrapper, null, /*#__PURE__*/React.createElement(IntegrationForm, {
|
|
232
240
|
Content: firstIntegration.Content,
|
|
233
241
|
onIntegrationClose: function onIntegrationClose() {
|
|
234
242
|
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
@@ -236,7 +244,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
236
244
|
changeTab: function changeTab(index) {
|
|
237
245
|
_this2.changeTab(index);
|
|
238
246
|
}
|
|
239
|
-
}))));
|
|
247
|
+
})))));
|
|
240
248
|
}
|
|
241
249
|
|
|
242
250
|
return this.renderShareForm();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
|
+
var _excluded = ["triggerRef"];
|
|
4
5
|
|
|
5
6
|
var _templateObject, _templateObject2, _templateObject3;
|
|
6
7
|
|
|
@@ -52,7 +53,7 @@ var SplitButtonDropdown = function SplitButtonDropdown(props) {
|
|
|
52
53
|
testId: "split-button-dropdown",
|
|
53
54
|
trigger: function trigger(_ref2) {
|
|
54
55
|
var triggerRef = _ref2.triggerRef,
|
|
55
|
-
providedProps = _objectWithoutProperties(_ref2,
|
|
56
|
+
providedProps = _objectWithoutProperties(_ref2, _excluded);
|
|
56
57
|
|
|
57
58
|
return /*#__PURE__*/React.createElement(Button, _extends({}, providedProps, {
|
|
58
59
|
ref: triggerRef,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import { isEmail, isTeam, isUser } from '@atlaskit/user-picker';
|
|
8
8
|
import { name as packageName, version as packageVersion } from '../version.json';
|
|
@@ -38,7 +38,7 @@ var createScreenEvent = function createScreenEvent(name) {
|
|
|
38
38
|
|
|
39
39
|
export var CHANNEL_ID = 'fabric-elements';
|
|
40
40
|
export var ANALYTICS_SOURCE = 'shareModal';
|
|
41
|
-
export var INTEGRATION_MODAL_SOURCE = '
|
|
41
|
+
export var INTEGRATION_MODAL_SOURCE = 'integrationShareDialog';
|
|
42
42
|
export var screenEvent = function screenEvent(_ref) {
|
|
43
43
|
var _ref$isPublicLink = _ref.isPublicLink,
|
|
44
44
|
isPublicLink = _ref$isPublicLink === void 0 ? false : _ref$isPublicLink;
|