@atlaskit/share 6.6.2 → 6.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/components/ShareForm.js +68 -165
- package/dist/cjs/components/ShareFormNext.js +70 -169
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/ShareForm.js +36 -119
- package/dist/es2019/components/ShareFormNext.js +37 -122
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/ShareForm.js +68 -165
- package/dist/esm/components/ShareFormNext.js +70 -169
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/package.json +3 -6
|
@@ -227,7 +227,7 @@ class InternalForm extends React.PureComponent {
|
|
|
227
227
|
const formSendLabel = messages.formShare;
|
|
228
228
|
const sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
229
229
|
const buttonLabel = isRetryableError ? messages.formRetry : sendLabel;
|
|
230
|
-
const buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled
|
|
230
|
+
const buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled;
|
|
231
231
|
const ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : React.Fragment;
|
|
232
232
|
return jsx("div", {
|
|
233
233
|
css: submitButtonWrapperStyles
|
|
@@ -301,123 +301,40 @@ class InternalForm extends React.PureComponent {
|
|
|
301
301
|
const {
|
|
302
302
|
selectedMenuItem
|
|
303
303
|
} = this.state;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
308
|
-
return this.renderShareForm();
|
|
309
|
-
}
|
|
310
|
-
if (selectedMenuItem === 'default') {
|
|
311
|
-
return this.renderShareForm();
|
|
312
|
-
}
|
|
313
|
-
if (hasShareIntegrations) {
|
|
314
|
-
const firstIntegration = shareIntegrations[0];
|
|
315
|
-
if (selectedMenuItem === 'Slack') {
|
|
316
|
-
return jsx(IntegrationForm, {
|
|
317
|
-
Content: firstIntegration.Content,
|
|
318
|
-
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog()
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
if (integrationMode === 'menu') {
|
|
322
|
-
return jsx(Box, {
|
|
323
|
-
xcss: menuGroupContainerStyles
|
|
324
|
-
}, jsx(MenuGroup, null, jsx(ShareMenuItem, {
|
|
325
|
-
iconName: jsx(firstIntegration.Icon, null),
|
|
326
|
-
labelId: messages.slackMenuItemText,
|
|
327
|
-
onClickHandler: () => this.changeMenuItem('Slack')
|
|
328
|
-
}), jsx(ShareMenuItem, {
|
|
329
|
-
iconName: jsx(EmailIcon, {
|
|
330
|
-
color: "currentColor",
|
|
331
|
-
label: "",
|
|
332
|
-
LEGACY_size: "medium",
|
|
333
|
-
spacing: "spacious"
|
|
334
|
-
}),
|
|
335
|
-
labelId: messages.emailMenuItemText,
|
|
336
|
-
onClickHandler: () => this.changeMenuItem('default')
|
|
337
|
-
})));
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
if (integrationMode === 'tabs') {
|
|
341
|
-
const DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
342
|
-
return jsx(Tabs, {
|
|
343
|
-
id: "ShareForm-Tabs-Integrations",
|
|
344
|
-
onChange: this.changeTab,
|
|
345
|
-
selected: this.state.selectedTab
|
|
346
|
-
}, jsx(TabList, null, jsx(Tab, {
|
|
347
|
-
key: `share-tab-default`
|
|
348
|
-
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => jsx(Tab, {
|
|
349
|
-
key: `share-tab-${integration.type}`
|
|
350
|
-
}, jsx("div", {
|
|
351
|
-
css: integrationWrapperStyles
|
|
352
|
-
}, jsx("span", {
|
|
353
|
-
css: integrationIconWrapperStyles
|
|
354
|
-
}, jsx(integration.Icon, null)), integrationTabText(integration.type)))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(Tab, {
|
|
355
|
-
key: `share-tab-${tab.label}`
|
|
356
|
-
}, tab.label)))), jsx(TabPanel, {
|
|
357
|
-
key: `share-tabPanel-default`
|
|
358
|
-
}, jsx("div", {
|
|
359
|
-
css: formWrapperStyles
|
|
360
|
-
}, jsx("div", {
|
|
361
|
-
style: {
|
|
362
|
-
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
363
|
-
}
|
|
364
|
-
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => jsx(TabPanel, {
|
|
365
|
-
key: `share-tabPanel-integration`
|
|
366
|
-
}, jsx(AnalyticsContext, {
|
|
367
|
-
data: {
|
|
368
|
-
source: INTEGRATION_MODAL_SOURCE
|
|
369
|
-
}
|
|
370
|
-
}, jsx("div", {
|
|
371
|
-
css: formWrapperStyles
|
|
372
|
-
}, jsx("div", {
|
|
373
|
-
style: {
|
|
374
|
-
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
375
|
-
}
|
|
376
|
-
}, jsx(IntegrationForm, {
|
|
377
|
-
Content: integration.Content,
|
|
378
|
-
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
379
|
-
changeTab: this.changeTab
|
|
380
|
-
})))))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(TabPanel, {
|
|
381
|
-
key: `share-tabPanel-${tab.label}`
|
|
382
|
-
}, jsx("div", {
|
|
383
|
-
css: formWrapperStyles
|
|
384
|
-
}, jsx(IntegrationForm, {
|
|
385
|
-
Content: tab.Content,
|
|
386
|
-
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
387
|
-
changeTab: this.changeTab
|
|
388
|
-
}))))));
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
if (integrationMode === 'off' || !shareIntegrations || !shareIntegrations.length) {
|
|
304
|
+
const hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
305
|
+
const hasAdditionalTabs = additionalTabs && additionalTabs.length;
|
|
306
|
+
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
392
307
|
return this.renderShareForm();
|
|
393
308
|
}
|
|
394
|
-
const firstIntegration = shareIntegrations[0];
|
|
395
309
|
if (selectedMenuItem === 'default') {
|
|
396
310
|
return this.renderShareForm();
|
|
397
311
|
}
|
|
398
|
-
if (
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
312
|
+
if (hasShareIntegrations) {
|
|
313
|
+
const firstIntegration = shareIntegrations[0];
|
|
314
|
+
if (selectedMenuItem === 'Slack') {
|
|
315
|
+
return jsx(IntegrationForm, {
|
|
316
|
+
Content: firstIntegration.Content,
|
|
317
|
+
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog()
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
if (integrationMode === 'menu') {
|
|
321
|
+
return jsx(Box, {
|
|
322
|
+
xcss: menuGroupContainerStyles
|
|
323
|
+
}, jsx(MenuGroup, null, jsx(ShareMenuItem, {
|
|
324
|
+
iconName: jsx(firstIntegration.Icon, null),
|
|
325
|
+
labelId: messages.slackMenuItemText,
|
|
326
|
+
onClickHandler: () => this.changeMenuItem('Slack')
|
|
327
|
+
}), jsx(ShareMenuItem, {
|
|
328
|
+
iconName: jsx(EmailIcon, {
|
|
329
|
+
color: "currentColor",
|
|
330
|
+
label: "",
|
|
331
|
+
LEGACY_size: "medium",
|
|
332
|
+
spacing: "spacious"
|
|
333
|
+
}),
|
|
334
|
+
labelId: messages.emailMenuItemText,
|
|
335
|
+
onClickHandler: () => this.changeMenuItem('default')
|
|
336
|
+
})));
|
|
337
|
+
}
|
|
421
338
|
}
|
|
422
339
|
if (integrationMode === 'tabs') {
|
|
423
340
|
const DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
@@ -427,13 +344,13 @@ class InternalForm extends React.PureComponent {
|
|
|
427
344
|
selected: this.state.selectedTab
|
|
428
345
|
}, jsx(TabList, null, jsx(Tab, {
|
|
429
346
|
key: `share-tab-default`
|
|
430
|
-
}, this.renderMainTabTitle()), jsx(Tab, {
|
|
431
|
-
key: `share-tab-${
|
|
347
|
+
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => jsx(Tab, {
|
|
348
|
+
key: `share-tab-${integration.type}`
|
|
432
349
|
}, jsx("div", {
|
|
433
350
|
css: integrationWrapperStyles
|
|
434
351
|
}, jsx("span", {
|
|
435
352
|
css: integrationIconWrapperStyles
|
|
436
|
-
}, jsx(
|
|
353
|
+
}, jsx(integration.Icon, null)), integrationTabText(integration.type)))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(Tab, {
|
|
437
354
|
key: `share-tab-${tab.label}`
|
|
438
355
|
}, tab.label)))), jsx(TabPanel, {
|
|
439
356
|
key: `share-tabPanel-default`
|
|
@@ -443,7 +360,7 @@ class InternalForm extends React.PureComponent {
|
|
|
443
360
|
style: {
|
|
444
361
|
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
445
362
|
}
|
|
446
|
-
}, this.renderShareForm()))), jsx(TabPanel, {
|
|
363
|
+
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => jsx(TabPanel, {
|
|
447
364
|
key: `share-tabPanel-integration`
|
|
448
365
|
}, jsx(AnalyticsContext, {
|
|
449
366
|
data: {
|
|
@@ -456,10 +373,10 @@ class InternalForm extends React.PureComponent {
|
|
|
456
373
|
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
457
374
|
}
|
|
458
375
|
}, jsx(IntegrationForm, {
|
|
459
|
-
Content:
|
|
376
|
+
Content: integration.Content,
|
|
460
377
|
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
461
378
|
changeTab: this.changeTab
|
|
462
|
-
}))))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(TabPanel, {
|
|
379
|
+
})))))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(TabPanel, {
|
|
463
380
|
key: `share-tabPanel-${tab.label}`
|
|
464
381
|
}, jsx("div", {
|
|
465
382
|
css: formWrapperStyles
|
|
@@ -149,7 +149,7 @@ class InternalForm extends React.PureComponent {
|
|
|
149
149
|
const formSendLabel = messages.formShare;
|
|
150
150
|
const sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
151
151
|
const buttonLabel = isRetryableError ? messages.formRetry : sendLabel;
|
|
152
|
-
const buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled
|
|
152
|
+
const buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled;
|
|
153
153
|
const ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : React.Fragment;
|
|
154
154
|
return /*#__PURE__*/React.createElement(Box, {
|
|
155
155
|
xcss: cx(styles.submitButtonWrapperStyles)
|
|
@@ -222,126 +222,41 @@ class InternalForm extends React.PureComponent {
|
|
|
222
222
|
const {
|
|
223
223
|
selectedMenuItem
|
|
224
224
|
} = this.state;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
229
|
-
return this.renderShareForm();
|
|
230
|
-
}
|
|
231
|
-
if (selectedMenuItem === 'default') {
|
|
232
|
-
return this.renderShareForm();
|
|
233
|
-
}
|
|
234
|
-
if (hasShareIntegrations) {
|
|
235
|
-
const firstIntegration = shareIntegrations[0];
|
|
236
|
-
if (selectedMenuItem === 'Slack') {
|
|
237
|
-
return /*#__PURE__*/React.createElement(IntegrationForm, {
|
|
238
|
-
Content: firstIntegration.Content,
|
|
239
|
-
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog()
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
if (integrationMode === 'menu') {
|
|
243
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
244
|
-
xcss: cx(styles.menuGroupContainerStyles),
|
|
245
|
-
backgroundColor: "elevation.surface.overlay"
|
|
246
|
-
}, /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(ShareMenuItem, {
|
|
247
|
-
iconName: /*#__PURE__*/React.createElement(firstIntegration.Icon, null),
|
|
248
|
-
labelId: messages.slackMenuItemText,
|
|
249
|
-
onClickHandler: () => this.changeMenuItem('Slack')
|
|
250
|
-
}), /*#__PURE__*/React.createElement(ShareMenuItem, {
|
|
251
|
-
iconName: /*#__PURE__*/React.createElement(EmailIcon, {
|
|
252
|
-
color: "currentColor",
|
|
253
|
-
label: "",
|
|
254
|
-
LEGACY_size: "medium",
|
|
255
|
-
spacing: "spacious"
|
|
256
|
-
}),
|
|
257
|
-
labelId: messages.emailMenuItemText,
|
|
258
|
-
onClickHandler: () => this.changeMenuItem('default')
|
|
259
|
-
})));
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if (integrationMode === 'tabs') {
|
|
263
|
-
const DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
264
|
-
return /*#__PURE__*/React.createElement(Tabs, {
|
|
265
|
-
id: "ShareForm-Tabs-Integrations",
|
|
266
|
-
onChange: this.changeTab,
|
|
267
|
-
selected: this.state.selectedTab
|
|
268
|
-
}, /*#__PURE__*/React.createElement(TabList, null, /*#__PURE__*/React.createElement(Tab, {
|
|
269
|
-
key: `share-tab-default`
|
|
270
|
-
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => /*#__PURE__*/React.createElement(Tab, {
|
|
271
|
-
key: `share-tab-${integration.type}`
|
|
272
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
273
|
-
xcss: cx(styles.integrationWrapperStyles)
|
|
274
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
275
|
-
as: "span",
|
|
276
|
-
xcss: cx(styles.integrationIconWrapperStyles)
|
|
277
|
-
}, /*#__PURE__*/React.createElement(integration.Icon, null)), integrationTabText(integration.type)))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => /*#__PURE__*/React.createElement(Tab, {
|
|
278
|
-
key: `share-tab-${tab.label}`
|
|
279
|
-
}, tab.label)))), /*#__PURE__*/React.createElement(TabPanel, {
|
|
280
|
-
key: `share-tabPanel-default`
|
|
281
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
282
|
-
xcss: cx(styles.formWrapperStyles)
|
|
283
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
284
|
-
style: {
|
|
285
|
-
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
286
|
-
}
|
|
287
|
-
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => /*#__PURE__*/React.createElement(TabPanel, {
|
|
288
|
-
key: `share-tabPanel-integration`
|
|
289
|
-
}, /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
290
|
-
data: {
|
|
291
|
-
source: INTEGRATION_MODAL_SOURCE
|
|
292
|
-
}
|
|
293
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
294
|
-
xcss: cx(styles.formWrapperStyles)
|
|
295
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
296
|
-
style: {
|
|
297
|
-
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
298
|
-
}
|
|
299
|
-
}, /*#__PURE__*/React.createElement(IntegrationForm, {
|
|
300
|
-
Content: integration.Content,
|
|
301
|
-
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
302
|
-
changeTab: this.changeTab
|
|
303
|
-
})))))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => /*#__PURE__*/React.createElement(TabPanel, {
|
|
304
|
-
key: `share-tabPanel-${tab.label}`
|
|
305
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
306
|
-
xcss: cx(styles.formWrapperStyles)
|
|
307
|
-
}, /*#__PURE__*/React.createElement(IntegrationForm, {
|
|
308
|
-
Content: tab.Content,
|
|
309
|
-
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
310
|
-
changeTab: this.changeTab
|
|
311
|
-
}))))));
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
if (integrationMode === 'off' || !shareIntegrations || !shareIntegrations.length) {
|
|
225
|
+
const hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
226
|
+
const hasAdditionalTabs = additionalTabs && additionalTabs.length;
|
|
227
|
+
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
315
228
|
return this.renderShareForm();
|
|
316
229
|
}
|
|
317
|
-
const firstIntegration = shareIntegrations[0];
|
|
318
230
|
if (selectedMenuItem === 'default') {
|
|
319
231
|
return this.renderShareForm();
|
|
320
232
|
}
|
|
321
|
-
if (
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
233
|
+
if (hasShareIntegrations) {
|
|
234
|
+
const firstIntegration = shareIntegrations[0];
|
|
235
|
+
if (selectedMenuItem === 'Slack') {
|
|
236
|
+
return /*#__PURE__*/React.createElement(IntegrationForm, {
|
|
237
|
+
Content: firstIntegration.Content,
|
|
238
|
+
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog()
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
if (integrationMode === 'menu') {
|
|
242
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
243
|
+
xcss: cx(styles.menuGroupContainerStyles),
|
|
244
|
+
backgroundColor: "elevation.surface.overlay"
|
|
245
|
+
}, /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(ShareMenuItem, {
|
|
246
|
+
iconName: /*#__PURE__*/React.createElement(firstIntegration.Icon, null),
|
|
247
|
+
labelId: messages.slackMenuItemText,
|
|
248
|
+
onClickHandler: () => this.changeMenuItem('Slack')
|
|
249
|
+
}), /*#__PURE__*/React.createElement(ShareMenuItem, {
|
|
250
|
+
iconName: /*#__PURE__*/React.createElement(EmailIcon, {
|
|
251
|
+
color: "currentColor",
|
|
252
|
+
label: "",
|
|
253
|
+
LEGACY_size: "medium",
|
|
254
|
+
spacing: "spacious"
|
|
255
|
+
}),
|
|
256
|
+
labelId: messages.emailMenuItemText,
|
|
257
|
+
onClickHandler: () => this.changeMenuItem('default')
|
|
258
|
+
})));
|
|
259
|
+
}
|
|
345
260
|
}
|
|
346
261
|
if (integrationMode === 'tabs') {
|
|
347
262
|
const DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
@@ -351,14 +266,14 @@ class InternalForm extends React.PureComponent {
|
|
|
351
266
|
selected: this.state.selectedTab
|
|
352
267
|
}, /*#__PURE__*/React.createElement(TabList, null, /*#__PURE__*/React.createElement(Tab, {
|
|
353
268
|
key: `share-tab-default`
|
|
354
|
-
}, this.renderMainTabTitle()), /*#__PURE__*/React.createElement(Tab, {
|
|
355
|
-
key: `share-tab-${
|
|
269
|
+
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => /*#__PURE__*/React.createElement(Tab, {
|
|
270
|
+
key: `share-tab-${integration.type}`
|
|
356
271
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
357
272
|
xcss: cx(styles.integrationWrapperStyles)
|
|
358
273
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
359
274
|
as: "span",
|
|
360
275
|
xcss: cx(styles.integrationIconWrapperStyles)
|
|
361
|
-
}, /*#__PURE__*/React.createElement(
|
|
276
|
+
}, /*#__PURE__*/React.createElement(integration.Icon, null)), integrationTabText(integration.type)))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => /*#__PURE__*/React.createElement(Tab, {
|
|
362
277
|
key: `share-tab-${tab.label}`
|
|
363
278
|
}, tab.label)))), /*#__PURE__*/React.createElement(TabPanel, {
|
|
364
279
|
key: `share-tabPanel-default`
|
|
@@ -368,7 +283,7 @@ class InternalForm extends React.PureComponent {
|
|
|
368
283
|
style: {
|
|
369
284
|
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
370
285
|
}
|
|
371
|
-
}, this.renderShareForm()))), /*#__PURE__*/React.createElement(TabPanel, {
|
|
286
|
+
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => /*#__PURE__*/React.createElement(TabPanel, {
|
|
372
287
|
key: `share-tabPanel-integration`
|
|
373
288
|
}, /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
374
289
|
data: {
|
|
@@ -381,10 +296,10 @@ class InternalForm extends React.PureComponent {
|
|
|
381
296
|
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
382
297
|
}
|
|
383
298
|
}, /*#__PURE__*/React.createElement(IntegrationForm, {
|
|
384
|
-
Content:
|
|
299
|
+
Content: integration.Content,
|
|
385
300
|
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
386
301
|
changeTab: this.changeTab
|
|
387
|
-
}))))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => /*#__PURE__*/React.createElement(TabPanel, {
|
|
302
|
+
})))))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => /*#__PURE__*/React.createElement(TabPanel, {
|
|
388
303
|
key: `share-tabPanel-${tab.label}`
|
|
389
304
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
390
305
|
xcss: cx(styles.formWrapperStyles)
|
|
@@ -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: "6.6.
|
|
4
|
+
packageVersion: "6.6.3",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|