@atlaskit/share 4.20.9 → 4.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +2 -0
- package/dist/cjs/components/ShareDialogContainer.js +3 -1
- package/dist/cjs/components/ShareDialogWithTrigger.js +2 -0
- package/dist/cjs/components/ShareForm.js +20 -2
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/cjs/i18n/languages.js +4 -2
- package/dist/cjs/util/i18n-util.js +1 -0
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +2 -0
- package/dist/es2019/components/ShareDialogContainer.js +3 -1
- package/dist/es2019/components/ShareDialogWithTrigger.js +2 -0
- package/dist/es2019/components/ShareForm.js +14 -2
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/es2019/i18n/languages.js +4 -2
- package/dist/es2019/util/i18n-util.js +2 -1
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +2 -0
- package/dist/esm/components/ShareDialogContainer.js +3 -1
- package/dist/esm/components/ShareDialogWithTrigger.js +2 -0
- package/dist/esm/components/ShareForm.js +20 -2
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/esm/i18n/languages.js +4 -2
- package/dist/esm/util/i18n-util.js +2 -1
- package/dist/types/components/IntegrationForm.d.ts +2 -2
- package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types/i18n/languages.d.ts +4 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/ShareDialogContainer.d.ts +2 -1
- package/dist/types/types/ShareDialogWithTrigger.d.ts +1 -1
- package/dist/types/types/ShareEntities.d.ts +6 -2
- package/dist/types/types/ShareForm.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types-ts4.5/components/IntegrationForm.d.ts +2 -2
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types-ts4.5/i18n/languages.d.ts +4 -2
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +2 -1
- package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareEntities.d.ts +6 -2
- package/dist/types-ts4.5/types/ShareForm.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/package.json +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 4.22.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#161683](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161683)
|
|
8
|
+
[`f3f374290027a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f3f374290027a) -
|
|
9
|
+
Adding en-zz locale support to elements package
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 4.21.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#162409](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/162409)
|
|
20
|
+
[`ae63cc5942832`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ae63cc5942832) -
|
|
21
|
+
[ux] Added additional tab prop
|
|
22
|
+
|
|
3
23
|
## 4.20.9
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -61,6 +61,7 @@ function LazyShareForm(props) {
|
|
|
61
61
|
copyTooltipText = props.copyTooltipText,
|
|
62
62
|
shareIntegrations = props.shareIntegrations,
|
|
63
63
|
integrationMode = props.integrationMode,
|
|
64
|
+
additionalTabs = props.additionalTabs,
|
|
64
65
|
isMenuItemSelected = props.isMenuItemSelected,
|
|
65
66
|
onLinkCopy = props.onLinkCopy,
|
|
66
67
|
onDismiss = props.onDismiss,
|
|
@@ -122,6 +123,7 @@ function LazyShareForm(props) {
|
|
|
122
123
|
copyTooltipText: copyTooltipText,
|
|
123
124
|
integrationMode: integrationMode,
|
|
124
125
|
shareIntegrations: shareIntegrations,
|
|
126
|
+
additionalTabs: additionalTabs,
|
|
125
127
|
isSharing: isSharing,
|
|
126
128
|
isFetchingConfig: isFetchingConfig,
|
|
127
129
|
isPublicLink: isPublicLink,
|
|
@@ -353,6 +353,7 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
353
353
|
isPublicLink = _this$props2.isPublicLink,
|
|
354
354
|
integrationMode = _this$props2.integrationMode,
|
|
355
355
|
shareIntegrations = _this$props2.shareIntegrations,
|
|
356
|
+
additionalTabs = _this$props2.additionalTabs,
|
|
356
357
|
shareAri = _this$props2.shareAri,
|
|
357
358
|
tabIndex = _this$props2.tabIndex,
|
|
358
359
|
copyTooltipText = _this$props2.copyTooltipText,
|
|
@@ -408,7 +409,8 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
408
409
|
copyTooltipText: copyTooltipText,
|
|
409
410
|
onDialogClose: onDialogClose,
|
|
410
411
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
411
|
-
userPickerOptions: userPickerOptions
|
|
412
|
+
userPickerOptions: userPickerOptions,
|
|
413
|
+
additionalTabs: additionalTabs
|
|
412
414
|
})));
|
|
413
415
|
}
|
|
414
416
|
}]);
|
|
@@ -556,6 +556,7 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
556
556
|
copyTooltipText = _this$props7.copyTooltipText,
|
|
557
557
|
integrationMode = _this$props7.integrationMode,
|
|
558
558
|
shareIntegrations = _this$props7.shareIntegrations,
|
|
559
|
+
additionalTabs = _this$props7.additionalTabs,
|
|
559
560
|
isBrowseUsersDisabled = _this$props7.isBrowseUsersDisabled,
|
|
560
561
|
userPickerOptions = _this$props7.userPickerOptions;
|
|
561
562
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
@@ -605,6 +606,7 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
605
606
|
copyTooltipText: copyTooltipText,
|
|
606
607
|
integrationMode: integrationMode,
|
|
607
608
|
shareIntegrations: shareIntegrations,
|
|
609
|
+
additionalTabs: additionalTabs,
|
|
608
610
|
isMenuItemSelected: isMenuItemSelected
|
|
609
611
|
// actions
|
|
610
612
|
,
|
|
@@ -23,6 +23,7 @@ var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
|
23
23
|
var _email = _interopRequireDefault(require("@atlaskit/icon/core/migration/email"));
|
|
24
24
|
var _error = _interopRequireDefault(require("@atlaskit/icon/core/migration/error"));
|
|
25
25
|
var _menu = require("@atlaskit/menu");
|
|
26
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
27
|
var _primitives = require("@atlaskit/primitives");
|
|
27
28
|
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
28
29
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -283,6 +284,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
283
284
|
_this$props7$integrat = _this$props7.integrationMode,
|
|
284
285
|
integrationMode = _this$props7$integrat === void 0 ? 'off' : _this$props7$integrat,
|
|
285
286
|
shareIntegrations = _this$props7.shareIntegrations,
|
|
287
|
+
additionalTabs = _this$props7.additionalTabs,
|
|
286
288
|
handleCloseDialog = _this$props7.handleCloseDialog;
|
|
287
289
|
var selectedMenuItem = this.state.selectedMenuItem;
|
|
288
290
|
if (integrationMode === 'off' || !shareIntegrations || !shareIntegrations.length) {
|
|
@@ -335,7 +337,11 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
335
337
|
css: integrationWrapperStyles
|
|
336
338
|
}, (0, _react2.jsx)("span", {
|
|
337
339
|
css: integrationIconWrapperStyles
|
|
338
|
-
}, (0, _react2.jsx)(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))
|
|
340
|
+
}, (0, _react2.jsx)(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type))), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
341
|
+
return (0, _react2.jsx)(_tabs.Tab, {
|
|
342
|
+
key: "share-tab-".concat(tab.label)
|
|
343
|
+
}, tab.label);
|
|
344
|
+
}))), (0, _react2.jsx)(_tabs.TabPanel, {
|
|
339
345
|
key: "share-tabPanel-default"
|
|
340
346
|
}, (0, _react2.jsx)("div", {
|
|
341
347
|
css: formWrapperStyles
|
|
@@ -353,7 +359,19 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
353
359
|
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
354
360
|
},
|
|
355
361
|
changeTab: this.changeTab
|
|
356
|
-
})))))
|
|
362
|
+
})))), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
363
|
+
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
364
|
+
key: "share-tabPanel-".concat(tab.label)
|
|
365
|
+
}, (0, _react2.jsx)("div", {
|
|
366
|
+
css: formWrapperStyles
|
|
367
|
+
}, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
368
|
+
Content: tab.Content,
|
|
369
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
370
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
371
|
+
},
|
|
372
|
+
changeTab: _this2.changeTab
|
|
373
|
+
})));
|
|
374
|
+
})));
|
|
357
375
|
}
|
|
358
376
|
return this.renderShareForm();
|
|
359
377
|
}
|
|
@@ -13,7 +13,7 @@ var buildAttributes = function buildAttributes() {
|
|
|
13
13
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14
14
|
return _objectSpread({
|
|
15
15
|
packageName: "@atlaskit/share",
|
|
16
|
-
packageVersion: "4.
|
|
16
|
+
packageVersion: "4.22.0"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -7,8 +7,9 @@ exports.default = void 0;
|
|
|
7
7
|
/**
|
|
8
8
|
* NOTE:
|
|
9
9
|
*
|
|
10
|
-
* This file
|
|
11
|
-
*
|
|
10
|
+
* This file was automatically generated by i18n-tools
|
|
11
|
+
* which is now deprecated. Changes must now be made
|
|
12
|
+
* manually.
|
|
12
13
|
*/
|
|
13
14
|
var _default = exports.default = {
|
|
14
15
|
zh: 'Chinese',
|
|
@@ -17,6 +18,7 @@ var _default = exports.default = {
|
|
|
17
18
|
nl: 'Dutch',
|
|
18
19
|
en: 'English',
|
|
19
20
|
en_GB: 'English (United Kingdom)',
|
|
21
|
+
en_ZZ: 'English (Instrumented)',
|
|
20
22
|
et: 'Estonian',
|
|
21
23
|
fi: 'Finnish',
|
|
22
24
|
fr: 'French',
|
|
@@ -53,6 +53,7 @@ function LazyShareForm(props) {
|
|
|
53
53
|
copyTooltipText,
|
|
54
54
|
shareIntegrations,
|
|
55
55
|
integrationMode,
|
|
56
|
+
additionalTabs,
|
|
56
57
|
isMenuItemSelected,
|
|
57
58
|
// actions
|
|
58
59
|
onLinkCopy,
|
|
@@ -118,6 +119,7 @@ function LazyShareForm(props) {
|
|
|
118
119
|
copyTooltipText: copyTooltipText,
|
|
119
120
|
integrationMode: integrationMode,
|
|
120
121
|
shareIntegrations: shareIntegrations,
|
|
122
|
+
additionalTabs: additionalTabs,
|
|
121
123
|
isSharing: isSharing,
|
|
122
124
|
isFetchingConfig: isFetchingConfig,
|
|
123
125
|
isPublicLink: isPublicLink,
|
|
@@ -299,6 +299,7 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
299
299
|
isPublicLink,
|
|
300
300
|
integrationMode,
|
|
301
301
|
shareIntegrations,
|
|
302
|
+
additionalTabs,
|
|
302
303
|
shareAri,
|
|
303
304
|
tabIndex,
|
|
304
305
|
copyTooltipText,
|
|
@@ -356,7 +357,8 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
356
357
|
copyTooltipText: copyTooltipText,
|
|
357
358
|
onDialogClose: onDialogClose,
|
|
358
359
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
359
|
-
userPickerOptions: userPickerOptions
|
|
360
|
+
userPickerOptions: userPickerOptions,
|
|
361
|
+
additionalTabs: additionalTabs
|
|
360
362
|
})));
|
|
361
363
|
}
|
|
362
364
|
}
|
|
@@ -502,6 +502,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
502
502
|
copyTooltipText,
|
|
503
503
|
integrationMode,
|
|
504
504
|
shareIntegrations,
|
|
505
|
+
additionalTabs,
|
|
505
506
|
isBrowseUsersDisabled,
|
|
506
507
|
userPickerOptions
|
|
507
508
|
} = this.props;
|
|
@@ -551,6 +552,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
551
552
|
copyTooltipText: copyTooltipText,
|
|
552
553
|
integrationMode: integrationMode,
|
|
553
554
|
shareIntegrations: shareIntegrations,
|
|
555
|
+
additionalTabs: additionalTabs,
|
|
554
556
|
isMenuItemSelected: isMenuItemSelected
|
|
555
557
|
// actions
|
|
556
558
|
,
|
|
@@ -15,6 +15,7 @@ import Form, { RequiredAsterisk } from '@atlaskit/form';
|
|
|
15
15
|
import EmailIcon from '@atlaskit/icon/core/migration/email';
|
|
16
16
|
import ErrorIcon from '@atlaskit/icon/core/migration/error';
|
|
17
17
|
import { MenuGroup } from '@atlaskit/menu';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
19
20
|
import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
|
|
20
21
|
import { N300, R400 } from '@atlaskit/theme/colors';
|
|
@@ -261,6 +262,7 @@ class InternalForm extends React.PureComponent {
|
|
|
261
262
|
const {
|
|
262
263
|
integrationMode = 'off',
|
|
263
264
|
shareIntegrations,
|
|
265
|
+
additionalTabs,
|
|
264
266
|
handleCloseDialog
|
|
265
267
|
} = this.props;
|
|
266
268
|
const {
|
|
@@ -310,7 +312,9 @@ class InternalForm extends React.PureComponent {
|
|
|
310
312
|
css: integrationWrapperStyles
|
|
311
313
|
}, jsx("span", {
|
|
312
314
|
css: integrationIconWrapperStyles
|
|
313
|
-
}, jsx(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))
|
|
315
|
+
}, jsx(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(Tab, {
|
|
316
|
+
key: `share-tab-${tab.label}`
|
|
317
|
+
}, tab.label)))), jsx(TabPanel, {
|
|
314
318
|
key: `share-tabPanel-default`
|
|
315
319
|
}, jsx("div", {
|
|
316
320
|
css: formWrapperStyles
|
|
@@ -326,7 +330,15 @@ class InternalForm extends React.PureComponent {
|
|
|
326
330
|
Content: firstIntegration.Content,
|
|
327
331
|
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
328
332
|
changeTab: this.changeTab
|
|
329
|
-
})))))
|
|
333
|
+
})))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(TabPanel, {
|
|
334
|
+
key: `share-tabPanel-${tab.label}`
|
|
335
|
+
}, jsx("div", {
|
|
336
|
+
css: formWrapperStyles
|
|
337
|
+
}, jsx(IntegrationForm, {
|
|
338
|
+
Content: tab.Content,
|
|
339
|
+
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
340
|
+
changeTab: this.changeTab
|
|
341
|
+
}))))));
|
|
330
342
|
}
|
|
331
343
|
return this.renderShareForm();
|
|
332
344
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isEmail, isExternalUser, isGroup, isTeam, isUser } from '@atlaskit/smart-user-picker';
|
|
2
2
|
const buildAttributes = (attributes = {}) => ({
|
|
3
3
|
packageName: "@atlaskit/share",
|
|
4
|
-
packageVersion: "4.
|
|
4
|
+
packageVersion: "4.22.0",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file
|
|
5
|
-
*
|
|
4
|
+
* This file was automatically generated by i18n-tools
|
|
5
|
+
* which is now deprecated. Changes must now be made
|
|
6
|
+
* manually.
|
|
6
7
|
*/
|
|
7
8
|
export default {
|
|
8
9
|
zh: 'Chinese',
|
|
@@ -11,6 +12,7 @@ export default {
|
|
|
11
12
|
nl: 'Dutch',
|
|
12
13
|
en: 'English',
|
|
13
14
|
en_GB: 'English (United Kingdom)',
|
|
15
|
+
en_ZZ: 'English (Instrumented)',
|
|
14
16
|
et: 'Estonian',
|
|
15
17
|
fi: 'Finnish',
|
|
16
18
|
fr: 'French',
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// Cannot import from `../i18n` because there is `../i18n.tsx` file there.
|
|
2
2
|
/* eslint-disable @atlassian/tangerine/import/no-dangling-index */
|
|
3
|
-
import { cs, da, de, en, en_GB, es, et, fi, fr, hu, is, it, ja, ko, nb, nl, pl, pt_BR, pt_PT, ro, ru, sk, sv, zh } from '../i18n/index';
|
|
3
|
+
import { cs, da, de, en, en_GB, en_ZZ, es, et, fi, fr, hu, is, it, ja, ko, nb, nl, pl, pt_BR, pt_PT, ro, ru, sk, sv, zh } from '../i18n/index';
|
|
4
4
|
const localesMessagesMap = {
|
|
5
5
|
cs,
|
|
6
6
|
da,
|
|
7
7
|
de,
|
|
8
8
|
en,
|
|
9
9
|
en_GB,
|
|
10
|
+
en_ZZ,
|
|
10
11
|
es,
|
|
11
12
|
et,
|
|
12
13
|
fi,
|
|
@@ -52,6 +52,7 @@ function LazyShareForm(props) {
|
|
|
52
52
|
copyTooltipText = props.copyTooltipText,
|
|
53
53
|
shareIntegrations = props.shareIntegrations,
|
|
54
54
|
integrationMode = props.integrationMode,
|
|
55
|
+
additionalTabs = props.additionalTabs,
|
|
55
56
|
isMenuItemSelected = props.isMenuItemSelected,
|
|
56
57
|
onLinkCopy = props.onLinkCopy,
|
|
57
58
|
onDismiss = props.onDismiss,
|
|
@@ -113,6 +114,7 @@ function LazyShareForm(props) {
|
|
|
113
114
|
copyTooltipText: copyTooltipText,
|
|
114
115
|
integrationMode: integrationMode,
|
|
115
116
|
shareIntegrations: shareIntegrations,
|
|
117
|
+
additionalTabs: additionalTabs,
|
|
116
118
|
isSharing: isSharing,
|
|
117
119
|
isFetchingConfig: isFetchingConfig,
|
|
118
120
|
isPublicLink: isPublicLink,
|
|
@@ -346,6 +346,7 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
346
346
|
isPublicLink = _this$props2.isPublicLink,
|
|
347
347
|
integrationMode = _this$props2.integrationMode,
|
|
348
348
|
shareIntegrations = _this$props2.shareIntegrations,
|
|
349
|
+
additionalTabs = _this$props2.additionalTabs,
|
|
349
350
|
shareAri = _this$props2.shareAri,
|
|
350
351
|
tabIndex = _this$props2.tabIndex,
|
|
351
352
|
copyTooltipText = _this$props2.copyTooltipText,
|
|
@@ -401,7 +402,8 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
401
402
|
copyTooltipText: copyTooltipText,
|
|
402
403
|
onDialogClose: onDialogClose,
|
|
403
404
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
404
|
-
userPickerOptions: userPickerOptions
|
|
405
|
+
userPickerOptions: userPickerOptions,
|
|
406
|
+
additionalTabs: additionalTabs
|
|
405
407
|
})));
|
|
406
408
|
}
|
|
407
409
|
}]);
|
|
@@ -555,6 +555,7 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
555
555
|
copyTooltipText = _this$props7.copyTooltipText,
|
|
556
556
|
integrationMode = _this$props7.integrationMode,
|
|
557
557
|
shareIntegrations = _this$props7.shareIntegrations,
|
|
558
|
+
additionalTabs = _this$props7.additionalTabs,
|
|
558
559
|
isBrowseUsersDisabled = _this$props7.isBrowseUsersDisabled,
|
|
559
560
|
userPickerOptions = _this$props7.userPickerOptions;
|
|
560
561
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
@@ -604,6 +605,7 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
604
605
|
copyTooltipText: copyTooltipText,
|
|
605
606
|
integrationMode: integrationMode,
|
|
606
607
|
shareIntegrations: shareIntegrations,
|
|
608
|
+
additionalTabs: additionalTabs,
|
|
607
609
|
isMenuItemSelected: isMenuItemSelected
|
|
608
610
|
// actions
|
|
609
611
|
,
|
|
@@ -25,6 +25,7 @@ import Form, { RequiredAsterisk } from '@atlaskit/form';
|
|
|
25
25
|
import EmailIcon from '@atlaskit/icon/core/migration/email';
|
|
26
26
|
import ErrorIcon from '@atlaskit/icon/core/migration/error';
|
|
27
27
|
import { MenuGroup } from '@atlaskit/menu';
|
|
28
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
28
29
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
29
30
|
import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
|
|
30
31
|
import { N300, R400 } from '@atlaskit/theme/colors';
|
|
@@ -276,6 +277,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
276
277
|
_this$props7$integrat = _this$props7.integrationMode,
|
|
277
278
|
integrationMode = _this$props7$integrat === void 0 ? 'off' : _this$props7$integrat,
|
|
278
279
|
shareIntegrations = _this$props7.shareIntegrations,
|
|
280
|
+
additionalTabs = _this$props7.additionalTabs,
|
|
279
281
|
handleCloseDialog = _this$props7.handleCloseDialog;
|
|
280
282
|
var selectedMenuItem = this.state.selectedMenuItem;
|
|
281
283
|
if (integrationMode === 'off' || !shareIntegrations || !shareIntegrations.length) {
|
|
@@ -328,7 +330,11 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
328
330
|
css: integrationWrapperStyles
|
|
329
331
|
}, jsx("span", {
|
|
330
332
|
css: integrationIconWrapperStyles
|
|
331
|
-
}, jsx(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))
|
|
333
|
+
}, jsx(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
334
|
+
return jsx(Tab, {
|
|
335
|
+
key: "share-tab-".concat(tab.label)
|
|
336
|
+
}, tab.label);
|
|
337
|
+
}))), jsx(TabPanel, {
|
|
332
338
|
key: "share-tabPanel-default"
|
|
333
339
|
}, jsx("div", {
|
|
334
340
|
css: formWrapperStyles
|
|
@@ -346,7 +352,19 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
346
352
|
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
347
353
|
},
|
|
348
354
|
changeTab: this.changeTab
|
|
349
|
-
})))))
|
|
355
|
+
})))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
356
|
+
return jsx(TabPanel, {
|
|
357
|
+
key: "share-tabPanel-".concat(tab.label)
|
|
358
|
+
}, jsx("div", {
|
|
359
|
+
css: formWrapperStyles
|
|
360
|
+
}, jsx(IntegrationForm, {
|
|
361
|
+
Content: tab.Content,
|
|
362
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
363
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
364
|
+
},
|
|
365
|
+
changeTab: _this2.changeTab
|
|
366
|
+
})));
|
|
367
|
+
})));
|
|
350
368
|
}
|
|
351
369
|
return this.renderShareForm();
|
|
352
370
|
}
|
|
@@ -6,7 +6,7 @@ var buildAttributes = function buildAttributes() {
|
|
|
6
6
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
7
|
return _objectSpread({
|
|
8
8
|
packageName: "@atlaskit/share",
|
|
9
|
-
packageVersion: "4.
|
|
9
|
+
packageVersion: "4.22.0"
|
|
10
10
|
}, attributes);
|
|
11
11
|
};
|
|
12
12
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file
|
|
5
|
-
*
|
|
4
|
+
* This file was automatically generated by i18n-tools
|
|
5
|
+
* which is now deprecated. Changes must now be made
|
|
6
|
+
* manually.
|
|
6
7
|
*/
|
|
7
8
|
export default {
|
|
8
9
|
zh: 'Chinese',
|
|
@@ -11,6 +12,7 @@ export default {
|
|
|
11
12
|
nl: 'Dutch',
|
|
12
13
|
en: 'English',
|
|
13
14
|
en_GB: 'English (United Kingdom)',
|
|
15
|
+
en_ZZ: 'English (Instrumented)',
|
|
14
16
|
et: 'Estonian',
|
|
15
17
|
fi: 'Finnish',
|
|
16
18
|
fr: 'French',
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// Cannot import from `../i18n` because there is `../i18n.tsx` file there.
|
|
2
2
|
/* eslint-disable @atlassian/tangerine/import/no-dangling-index */
|
|
3
|
-
import { cs, da, de, en, en_GB, es, et, fi, fr, hu, is, it, ja, ko, nb, nl, pl, pt_BR, pt_PT, ro, ru, sk, sv, zh } from '../i18n/index';
|
|
3
|
+
import { cs, da, de, en, en_GB, en_ZZ, es, et, fi, fr, hu, is, it, ja, ko, nb, nl, pl, pt_BR, pt_PT, ro, ru, sk, sv, zh } from '../i18n/index';
|
|
4
4
|
var localesMessagesMap = {
|
|
5
5
|
cs: cs,
|
|
6
6
|
da: da,
|
|
7
7
|
de: de,
|
|
8
8
|
en: en,
|
|
9
9
|
en_GB: en_GB,
|
|
10
|
+
en_ZZ: en_ZZ,
|
|
10
11
|
es: es,
|
|
11
12
|
et: et,
|
|
12
13
|
fi: fi,
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import { type
|
|
7
|
+
import { type ContentProps } from '../types';
|
|
8
8
|
export declare const formWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
9
9
|
export type IntegrationFormProps = {
|
|
10
|
-
Content: React.ComponentType<
|
|
10
|
+
Content: React.ComponentType<ContentProps> | null;
|
|
11
11
|
onIntegrationClose?: () => void;
|
|
12
12
|
changeTab?: (index: number) => void;
|
|
13
13
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
3
3
|
import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
4
|
import { type IntegrationFormProps } from '../IntegrationForm';
|
|
5
|
-
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
5
|
+
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
6
6
|
onLinkCopy: () => void;
|
|
7
7
|
onDismiss: (data: ShareData) => void;
|
|
8
8
|
onSubmit: (data: ShareData) => void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file
|
|
5
|
-
*
|
|
4
|
+
* This file was automatically generated by i18n-tools
|
|
5
|
+
* which is now deprecated. Changes must now be made
|
|
6
|
+
* manually.
|
|
6
7
|
*/
|
|
7
8
|
declare const _default: {
|
|
8
9
|
zh: string;
|
|
@@ -11,6 +12,7 @@ declare const _default: {
|
|
|
11
12
|
nl: string;
|
|
12
13
|
en: string;
|
|
13
14
|
en_GB: string;
|
|
15
|
+
en_ZZ: string;
|
|
14
16
|
et: string;
|
|
15
17
|
fi: string;
|
|
16
18
|
fr: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ShareDialogContainer } from './components/ShareDialogContainer';
|
|
2
2
|
export { CopyLinkButton } from './components/CopyLinkButton';
|
|
3
3
|
export { ADMIN_NOTIFIED, OBJECT_SHARED, } from './types';
|
|
4
|
-
export type { Comment, Content, DialogContentState, DialogPlacement, Flag, FlagType, FormChildrenArgs, KeysOfType, MessageDescriptor, MetaData, OriginAnalyticAttributes, OriginTracing, OriginTracingFactory, OriginTracingForSubSequentEvents, OriginTracingWithIdGenerated, ProductId, ProductName, RenderCustomTriggerButton, ShareButtonStyle, ShareContentState, ShareError, ShareRequest, ShareResponse, ConfigResponse, TooltipPosition, User, UserWithEmail, UserWithId, ShareDialogContainerProps, } from './types';
|
|
4
|
+
export type { Comment, Content, DialogContentState, DialogPlacement, Flag, FlagType, FormChildrenArgs, KeysOfType, MessageDescriptor, MetaData, OriginAnalyticAttributes, OriginTracing, OriginTracingFactory, OriginTracingForSubSequentEvents, OriginTracingWithIdGenerated, ProductId, ProductName, RenderCustomTriggerButton, ShareButtonStyle, ShareContentState, ShareError, ShareRequest, ShareResponse, ConfigResponse, TooltipPosition, User, UserWithEmail, UserWithId, ShareDialogContainerProps, AdditionalTab, Integration, ContentProps, } from './types';
|
|
@@ -9,7 +9,7 @@ import type { OriginTracing, OriginTracingFactory } from './OriginTracing';
|
|
|
9
9
|
import type { ProductId, ProductName } from './Products';
|
|
10
10
|
import type { ShareButtonStyle, TooltipPosition } from './ShareButton';
|
|
11
11
|
import type { DialogPlacement, RenderCustomTriggerButton } from './ShareDialogWithTrigger';
|
|
12
|
-
import type { Integration, IntegrationMode } from './ShareEntities';
|
|
12
|
+
import type { AdditionalTab, Integration, IntegrationMode } from './ShareEntities';
|
|
13
13
|
import type { UserPickerOptions } from './UserPickerOptions';
|
|
14
14
|
export type ShareDialogContainerProps = {
|
|
15
15
|
onTriggerButtonClick?: () => void;
|
|
@@ -147,6 +147,7 @@ export type ShareDialogContainerProps = {
|
|
|
147
147
|
integrationMode?: IntegrationMode;
|
|
148
148
|
isMenuItemSelected?: boolean;
|
|
149
149
|
shareIntegrations?: Array<Integration>;
|
|
150
|
+
additionalTabs?: Array<AdditionalTab>;
|
|
150
151
|
/**
|
|
151
152
|
* Optionally sets a tabIndex value if you need to set focus
|
|
152
153
|
*/
|
|
@@ -19,7 +19,7 @@ export type DialogPlacement = Placement;
|
|
|
19
19
|
* with the demo page and clearly visible options on that page.
|
|
20
20
|
*/
|
|
21
21
|
export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
|
|
22
|
-
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & {
|
|
22
|
+
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & {
|
|
23
23
|
config?: ConfigResponse;
|
|
24
24
|
isFetchingConfig?: boolean;
|
|
25
25
|
children?: RenderCustomTriggerButton;
|
|
@@ -15,7 +15,7 @@ export type MetaData = {
|
|
|
15
15
|
atlOriginId: string;
|
|
16
16
|
shareeAction?: 'view' | 'edit';
|
|
17
17
|
};
|
|
18
|
-
export type
|
|
18
|
+
export type ContentProps = {
|
|
19
19
|
onClose: () => void;
|
|
20
20
|
changeTab?: (index: TabType) => void;
|
|
21
21
|
};
|
|
@@ -27,6 +27,10 @@ export type MenuType = 'none' | 'default' | 'Slack';
|
|
|
27
27
|
export type Integration = {
|
|
28
28
|
type: string;
|
|
29
29
|
Icon: React.ComponentType;
|
|
30
|
-
Content: React.ComponentType<
|
|
30
|
+
Content: React.ComponentType<ContentProps>;
|
|
31
31
|
};
|
|
32
32
|
export type IntegrationMode = 'tabs' | 'split' | 'menu' | 'off';
|
|
33
|
+
export type AdditionalTab = {
|
|
34
|
+
label: string;
|
|
35
|
+
Content: React.ComponentType<ContentProps>;
|
|
36
|
+
};
|
|
@@ -5,7 +5,7 @@ import type { ProductName } from './Products';
|
|
|
5
5
|
import type { ShareData, ShareError } from './ShareContentState';
|
|
6
6
|
import type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
7
7
|
import { type MenuType } from './ShareEntities';
|
|
8
|
-
export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes'> & {
|
|
8
|
+
export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'additionalTabs' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes'> & {
|
|
9
9
|
config?: ConfigResponse;
|
|
10
10
|
isFetchingConfig?: boolean;
|
|
11
11
|
copyLink: string;
|
|
@@ -8,7 +8,7 @@ export type { ShareButtonStyle, TooltipPosition } from './ShareButton';
|
|
|
8
8
|
export type { ShareData, ShareData as DialogContentState, ShareContentState, ShareError, } from './ShareContentState';
|
|
9
9
|
export type { DialogPlacement, DialogBoundariesElement, RenderCustomTriggerButton, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates, } from './ShareDialogWithTrigger';
|
|
10
10
|
export type { User, UserWithEmail, UserWithId } from './User';
|
|
11
|
-
export type { Comment, Content, MetaData, Integration,
|
|
11
|
+
export type { Comment, Content, MetaData, Integration, AdditionalTab, ContentProps, } from './ShareEntities';
|
|
12
12
|
export { TabType } from './ShareEntities';
|
|
13
13
|
export type { MenuType } from './ShareEntities';
|
|
14
14
|
export type KeysOfType<T, TProp> = {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import { type
|
|
7
|
+
import { type ContentProps } from '../types';
|
|
8
8
|
export declare const formWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
9
9
|
export type IntegrationFormProps = {
|
|
10
|
-
Content: React.ComponentType<
|
|
10
|
+
Content: React.ComponentType<ContentProps> | null;
|
|
11
11
|
onIntegrationClose?: () => void;
|
|
12
12
|
changeTab?: (index: number) => void;
|
|
13
13
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
3
3
|
import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
4
|
import { type IntegrationFormProps } from '../IntegrationForm';
|
|
5
|
-
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
5
|
+
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
6
6
|
onLinkCopy: () => void;
|
|
7
7
|
onDismiss: (data: ShareData) => void;
|
|
8
8
|
onSubmit: (data: ShareData) => void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file
|
|
5
|
-
*
|
|
4
|
+
* This file was automatically generated by i18n-tools
|
|
5
|
+
* which is now deprecated. Changes must now be made
|
|
6
|
+
* manually.
|
|
6
7
|
*/
|
|
7
8
|
declare const _default: {
|
|
8
9
|
zh: string;
|
|
@@ -11,6 +12,7 @@ declare const _default: {
|
|
|
11
12
|
nl: string;
|
|
12
13
|
en: string;
|
|
13
14
|
en_GB: string;
|
|
15
|
+
en_ZZ: string;
|
|
14
16
|
et: string;
|
|
15
17
|
fi: string;
|
|
16
18
|
fr: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ShareDialogContainer } from './components/ShareDialogContainer';
|
|
2
2
|
export { CopyLinkButton } from './components/CopyLinkButton';
|
|
3
3
|
export { ADMIN_NOTIFIED, OBJECT_SHARED, } from './types';
|
|
4
|
-
export type { Comment, Content, DialogContentState, DialogPlacement, Flag, FlagType, FormChildrenArgs, KeysOfType, MessageDescriptor, MetaData, OriginAnalyticAttributes, OriginTracing, OriginTracingFactory, OriginTracingForSubSequentEvents, OriginTracingWithIdGenerated, ProductId, ProductName, RenderCustomTriggerButton, ShareButtonStyle, ShareContentState, ShareError, ShareRequest, ShareResponse, ConfigResponse, TooltipPosition, User, UserWithEmail, UserWithId, ShareDialogContainerProps, } from './types';
|
|
4
|
+
export type { Comment, Content, DialogContentState, DialogPlacement, Flag, FlagType, FormChildrenArgs, KeysOfType, MessageDescriptor, MetaData, OriginAnalyticAttributes, OriginTracing, OriginTracingFactory, OriginTracingForSubSequentEvents, OriginTracingWithIdGenerated, ProductId, ProductName, RenderCustomTriggerButton, ShareButtonStyle, ShareContentState, ShareError, ShareRequest, ShareResponse, ConfigResponse, TooltipPosition, User, UserWithEmail, UserWithId, ShareDialogContainerProps, AdditionalTab, Integration, ContentProps, } from './types';
|
|
@@ -9,7 +9,7 @@ import type { OriginTracing, OriginTracingFactory } from './OriginTracing';
|
|
|
9
9
|
import type { ProductId, ProductName } from './Products';
|
|
10
10
|
import type { ShareButtonStyle, TooltipPosition } from './ShareButton';
|
|
11
11
|
import type { DialogPlacement, RenderCustomTriggerButton } from './ShareDialogWithTrigger';
|
|
12
|
-
import type { Integration, IntegrationMode } from './ShareEntities';
|
|
12
|
+
import type { AdditionalTab, Integration, IntegrationMode } from './ShareEntities';
|
|
13
13
|
import type { UserPickerOptions } from './UserPickerOptions';
|
|
14
14
|
export type ShareDialogContainerProps = {
|
|
15
15
|
onTriggerButtonClick?: () => void;
|
|
@@ -147,6 +147,7 @@ export type ShareDialogContainerProps = {
|
|
|
147
147
|
integrationMode?: IntegrationMode;
|
|
148
148
|
isMenuItemSelected?: boolean;
|
|
149
149
|
shareIntegrations?: Array<Integration>;
|
|
150
|
+
additionalTabs?: Array<AdditionalTab>;
|
|
150
151
|
/**
|
|
151
152
|
* Optionally sets a tabIndex value if you need to set focus
|
|
152
153
|
*/
|
|
@@ -19,7 +19,7 @@ export type DialogPlacement = Placement;
|
|
|
19
19
|
* with the demo page and clearly visible options on that page.
|
|
20
20
|
*/
|
|
21
21
|
export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
|
|
22
|
-
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & {
|
|
22
|
+
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & {
|
|
23
23
|
config?: ConfigResponse;
|
|
24
24
|
isFetchingConfig?: boolean;
|
|
25
25
|
children?: RenderCustomTriggerButton;
|
|
@@ -15,7 +15,7 @@ export type MetaData = {
|
|
|
15
15
|
atlOriginId: string;
|
|
16
16
|
shareeAction?: 'view' | 'edit';
|
|
17
17
|
};
|
|
18
|
-
export type
|
|
18
|
+
export type ContentProps = {
|
|
19
19
|
onClose: () => void;
|
|
20
20
|
changeTab?: (index: TabType) => void;
|
|
21
21
|
};
|
|
@@ -27,6 +27,10 @@ export type MenuType = 'none' | 'default' | 'Slack';
|
|
|
27
27
|
export type Integration = {
|
|
28
28
|
type: string;
|
|
29
29
|
Icon: React.ComponentType;
|
|
30
|
-
Content: React.ComponentType<
|
|
30
|
+
Content: React.ComponentType<ContentProps>;
|
|
31
31
|
};
|
|
32
32
|
export type IntegrationMode = 'tabs' | 'split' | 'menu' | 'off';
|
|
33
|
+
export type AdditionalTab = {
|
|
34
|
+
label: string;
|
|
35
|
+
Content: React.ComponentType<ContentProps>;
|
|
36
|
+
};
|
|
@@ -5,7 +5,7 @@ import type { ProductName } from './Products';
|
|
|
5
5
|
import type { ShareData, ShareError } from './ShareContentState';
|
|
6
6
|
import type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
7
7
|
import { type MenuType } from './ShareEntities';
|
|
8
|
-
export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes'> & {
|
|
8
|
+
export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'additionalTabs' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes'> & {
|
|
9
9
|
config?: ConfigResponse;
|
|
10
10
|
isFetchingConfig?: boolean;
|
|
11
11
|
copyLink: string;
|
|
@@ -8,7 +8,7 @@ export type { ShareButtonStyle, TooltipPosition } from './ShareButton';
|
|
|
8
8
|
export type { ShareData, ShareData as DialogContentState, ShareContentState, ShareError, } from './ShareContentState';
|
|
9
9
|
export type { DialogPlacement, DialogBoundariesElement, RenderCustomTriggerButton, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates, } from './ShareDialogWithTrigger';
|
|
10
10
|
export type { User, UserWithEmail, UserWithId } from './User';
|
|
11
|
-
export type { Comment, Content, MetaData, Integration,
|
|
11
|
+
export type { Comment, Content, MetaData, Integration, AdditionalTab, ContentProps, } from './ShareEntities';
|
|
12
12
|
export { TabType } from './ShareEntities';
|
|
13
13
|
export type { MenuType } from './ShareEntities';
|
|
14
14
|
export type KeysOfType<T, TProp> = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.0",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"@atlaskit/popper": "^6.3.0",
|
|
51
51
|
"@atlaskit/popup": "^1.29.0",
|
|
52
52
|
"@atlaskit/portal": "^4.9.0",
|
|
53
|
-
"@atlaskit/primitives": "^13.
|
|
53
|
+
"@atlaskit/primitives": "^13.2.0",
|
|
54
54
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
55
55
|
"@atlaskit/spinner": "^16.3.0",
|
|
56
56
|
"@atlaskit/tabs": "^16.5.0",
|
|
57
57
|
"@atlaskit/textarea": "^5.6.0",
|
|
58
58
|
"@atlaskit/theme": "^14.0.0",
|
|
59
59
|
"@atlaskit/tokens": "^2.2.0",
|
|
60
|
-
"@atlaskit/tooltip": "^18.
|
|
60
|
+
"@atlaskit/tooltip": "^18.9.0",
|
|
61
61
|
"@atlaskit/ufo": "^0.3.0",
|
|
62
|
-
"@atlaskit/user-picker": "^10.
|
|
62
|
+
"@atlaskit/user-picker": "^10.27.0",
|
|
63
63
|
"@atlaskit/util-service-support": "^6.2.0",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|
|
65
65
|
"@emotion/react": "^11.7.1",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@atlaskit/editor-test-helpers": "^20.0.0",
|
|
76
76
|
"@atlaskit/flag": "^15.8.0",
|
|
77
|
+
"@atlassian/feature-flags-test-utils": "^0.2.0",
|
|
77
78
|
"@testing-library/react": "^12.1.5",
|
|
78
79
|
"@testing-library/user-event": "^14.4.3",
|
|
79
80
|
"enzyme": "^3.10.0",
|
|
@@ -119,6 +120,9 @@
|
|
|
119
120
|
"platform-feature-flags": {
|
|
120
121
|
"enable-appropriate-reading-order-in-share-dialog": {
|
|
121
122
|
"type": "boolean"
|
|
123
|
+
},
|
|
124
|
+
"smart_links_for_plans_platform": {
|
|
125
|
+
"type": "boolean"
|
|
122
126
|
}
|
|
123
127
|
}
|
|
124
128
|
}
|