@atlaskit/share 6.6.3 → 6.7.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 +9 -0
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +4 -2
- package/dist/cjs/components/LazyShareForm/LazyShareFormNext.js +4 -2
- package/dist/cjs/components/ShareDialogContainer.js +4 -2
- package/dist/cjs/components/ShareDialogWithTrigger.js +4 -2
- package/dist/cjs/components/ShareDialogWithTriggerNext.js +4 -2
- package/dist/cjs/components/ShareForm.js +11 -2
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +4 -2
- package/dist/es2019/components/LazyShareForm/LazyShareFormNext.js +4 -2
- package/dist/es2019/components/ShareDialogContainer.js +4 -2
- package/dist/es2019/components/ShareDialogWithTrigger.js +4 -2
- package/dist/es2019/components/ShareDialogWithTriggerNext.js +4 -2
- package/dist/es2019/components/ShareForm.js +11 -2
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +4 -2
- package/dist/esm/components/LazyShareForm/LazyShareFormNext.js +4 -2
- package/dist/esm/components/ShareDialogContainer.js +4 -2
- package/dist/esm/components/ShareDialogWithTrigger.js +4 -2
- package/dist/esm/components/ShareDialogWithTriggerNext.js +4 -2
- package/dist/esm/components/ShareForm.js +11 -2
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types/components/LazyShareForm/LazyShareFormNext.d.ts +1 -1
- package/dist/types/components/ShareDialogContainer.d.ts +35 -34
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/ShareDialogContainer.d.ts +2 -0
- package/dist/types/types/ShareDialogWithTrigger.d.ts +1 -1
- package/dist/types/types/ShareForm.d.ts +2 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareFormNext.d.ts +1 -1
- package/dist/types-ts4.5/components/ShareDialogContainer.d.ts +35 -34
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +2 -0
- package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareForm.d.ts +2 -1
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 6.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#159242](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159242)
|
|
8
|
+
[`d465c0632984c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d465c0632984c) -
|
|
9
|
+
[ux] Exposing a new `CustomSubmitButton` prop to control behaviour of share form submit button.
|
|
10
|
+
This is only used when the extended share dialog is enabled.
|
|
11
|
+
|
|
3
12
|
## 6.6.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -87,7 +87,8 @@ function LazyShareForm(props) {
|
|
|
87
87
|
userPickerOptions = props.userPickerOptions,
|
|
88
88
|
isSubmitShareDisabled = props.isSubmitShareDisabled,
|
|
89
89
|
additionalUserFields = props.additionalUserFields,
|
|
90
|
-
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled
|
|
90
|
+
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled,
|
|
91
|
+
CustomSubmitButton = props.CustomSubmitButton;
|
|
91
92
|
var header = customHeader ? (0, _react2.jsx)("div", {
|
|
92
93
|
css: headerCustomStyles
|
|
93
94
|
}, customHeader) : null;
|
|
@@ -154,7 +155,8 @@ function LazyShareForm(props) {
|
|
|
154
155
|
userPickerOptions: userPickerOptions,
|
|
155
156
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
156
157
|
additionalUserFields: additionalUserFields,
|
|
157
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
158
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
159
|
+
CustomSubmitButton: CustomSubmitButton
|
|
158
160
|
}) : (0, _react2.jsx)(_compiled.Text, {
|
|
159
161
|
as: "p"
|
|
160
162
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.formNoPermissions))));
|
|
@@ -74,7 +74,8 @@ function LazyShareForm(props) {
|
|
|
74
74
|
userPickerOptions = props.userPickerOptions,
|
|
75
75
|
isSubmitShareDisabled = props.isSubmitShareDisabled,
|
|
76
76
|
additionalUserFields = props.additionalUserFields,
|
|
77
|
-
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled
|
|
77
|
+
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled,
|
|
78
|
+
CustomSubmitButton = props.CustomSubmitButton;
|
|
78
79
|
var header = customHeader ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
79
80
|
xcss: styles.headerCustomStyles
|
|
80
81
|
}, customHeader) : null;
|
|
@@ -141,7 +142,8 @@ function LazyShareForm(props) {
|
|
|
141
142
|
userPickerOptions: userPickerOptions,
|
|
142
143
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
143
144
|
additionalUserFields: additionalUserFields,
|
|
144
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
145
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
146
|
+
CustomSubmitButton: CustomSubmitButton
|
|
145
147
|
}) : /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
146
148
|
as: "p"
|
|
147
149
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _i18n.messages.formNoPermissions))));
|
|
@@ -371,7 +371,8 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
371
371
|
userPickerOptions = _this$props3.userPickerOptions,
|
|
372
372
|
isSubmitShareDisabled = _this$props3.isSubmitShareDisabled,
|
|
373
373
|
additionalUserFields = _this$props3.additionalUserFields,
|
|
374
|
-
isExtendedShareDialogEnabled = _this$props3.isExtendedShareDialogEnabled
|
|
374
|
+
isExtendedShareDialogEnabled = _this$props3.isExtendedShareDialogEnabled,
|
|
375
|
+
CustomSubmitButton = _this$props3.CustomSubmitButton;
|
|
375
376
|
var _this$state = this.state,
|
|
376
377
|
config = _this$state.config,
|
|
377
378
|
isFetchingConfig = _this$state.isFetchingConfig;
|
|
@@ -427,7 +428,8 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
427
428
|
builtInTabContentWidth: builtInTabContentWidth,
|
|
428
429
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
429
430
|
additionalUserFields: additionalUserFields,
|
|
430
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
431
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
432
|
+
CustomSubmitButton: CustomSubmitButton
|
|
431
433
|
})));
|
|
432
434
|
}
|
|
433
435
|
}]);
|
|
@@ -578,7 +578,8 @@ var ShareDialogWithTriggerInternalLegacy = exports.ShareDialogWithTriggerInterna
|
|
|
578
578
|
userPickerOptions = _this$props7.userPickerOptions,
|
|
579
579
|
isSubmitShareDisabled = _this$props7.isSubmitShareDisabled,
|
|
580
580
|
additionalUserFields = _this$props7.additionalUserFields,
|
|
581
|
-
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled
|
|
581
|
+
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled,
|
|
582
|
+
CustomSubmitButton = _this$props7.CustomSubmitButton;
|
|
582
583
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
583
584
|
outline: 'none'
|
|
584
585
|
} : undefined;
|
|
@@ -647,7 +648,8 @@ var ShareDialogWithTriggerInternalLegacy = exports.ShareDialogWithTriggerInterna
|
|
|
647
648
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
648
649
|
userPickerOptions: userPickerOptions,
|
|
649
650
|
additionalUserFields: additionalUserFields,
|
|
650
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
651
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
652
|
+
CustomSubmitButton: CustomSubmitButton
|
|
651
653
|
}));
|
|
652
654
|
},
|
|
653
655
|
isOpen: isDialogOpen,
|
|
@@ -561,7 +561,8 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
561
561
|
userPickerOptions = _this$props7.userPickerOptions,
|
|
562
562
|
isSubmitShareDisabled = _this$props7.isSubmitShareDisabled,
|
|
563
563
|
additionalUserFields = _this$props7.additionalUserFields,
|
|
564
|
-
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled
|
|
564
|
+
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled,
|
|
565
|
+
CustomSubmitButton = _this$props7.CustomSubmitButton;
|
|
565
566
|
var footer = (0, _utils.resolveShareFooter)(integrationMode, this.state.tabIndex, customFooter);
|
|
566
567
|
|
|
567
568
|
// for performance purposes, we may want to have a loadable content i.e. ShareForm
|
|
@@ -622,7 +623,8 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
622
623
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
623
624
|
userPickerOptions: userPickerOptions,
|
|
624
625
|
additionalUserFields: additionalUserFields,
|
|
625
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
626
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
627
|
+
CustomSubmitButton: CustomSubmitButton
|
|
626
628
|
}));
|
|
627
629
|
},
|
|
628
630
|
isOpen: isDialogOpen,
|
|
@@ -157,7 +157,10 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
157
157
|
userPickerOptions = _this$props.userPickerOptions,
|
|
158
158
|
productAttributes = _this$props.productAttributes,
|
|
159
159
|
additionalUserFields = _this$props.additionalUserFields,
|
|
160
|
-
isExtendedShareDialogEnabled = _this$props.isExtendedShareDialogEnabled
|
|
160
|
+
isExtendedShareDialogEnabled = _this$props.isExtendedShareDialogEnabled,
|
|
161
|
+
isSharing = _this$props.isSharing,
|
|
162
|
+
isSubmitShareDisabled = _this$props.isSubmitShareDisabled,
|
|
163
|
+
CustomSubmitButton = _this$props.CustomSubmitButton;
|
|
161
164
|
return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
162
165
|
data: {
|
|
163
166
|
source: _analytics.ANALYTICS_SOURCE
|
|
@@ -224,7 +227,13 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
224
227
|
copyTooltipText: copyTooltipText,
|
|
225
228
|
copyLinkButtonText: formatMessage(isPublicLink ? _i18n.messages.copyPublicLinkButtonText : _i18n.messages.copyLinkButtonText),
|
|
226
229
|
copiedToClipboardText: formatMessage(_i18n.messages.copiedToClipboardMessage)
|
|
227
|
-
}),
|
|
230
|
+
}), isExtendedShareDialogEnabled && CustomSubmitButton ? (0, _react2.jsx)(CustomSubmitButton, {
|
|
231
|
+
shareError: shareError,
|
|
232
|
+
isSharing: isSharing,
|
|
233
|
+
isDisabled: isDisabled,
|
|
234
|
+
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
235
|
+
isPublicLink: isPublicLink
|
|
236
|
+
}) : _this.renderSubmitButton())));
|
|
228
237
|
});
|
|
229
238
|
(0, _defineProperty2.default)(_this, "renderSubmitButton", function () {
|
|
230
239
|
var _this$props2 = _this.props,
|
|
@@ -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: "6.
|
|
16
|
+
packageVersion: "6.7.0"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -82,7 +82,8 @@ function LazyShareForm(props) {
|
|
|
82
82
|
userPickerOptions,
|
|
83
83
|
isSubmitShareDisabled,
|
|
84
84
|
additionalUserFields,
|
|
85
|
-
isExtendedShareDialogEnabled
|
|
85
|
+
isExtendedShareDialogEnabled,
|
|
86
|
+
CustomSubmitButton
|
|
86
87
|
} = props;
|
|
87
88
|
const header = customHeader ? jsx("div", {
|
|
88
89
|
css: headerCustomStyles
|
|
@@ -150,7 +151,8 @@ function LazyShareForm(props) {
|
|
|
150
151
|
userPickerOptions: userPickerOptions,
|
|
151
152
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
152
153
|
additionalUserFields: additionalUserFields,
|
|
153
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
154
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
155
|
+
CustomSubmitButton: CustomSubmitButton
|
|
154
156
|
}) : jsx(Text, {
|
|
155
157
|
as: "p"
|
|
156
158
|
}, jsx(FormattedMessage, messages.formNoPermissions))));
|
|
@@ -71,7 +71,8 @@ function LazyShareForm(props) {
|
|
|
71
71
|
userPickerOptions,
|
|
72
72
|
isSubmitShareDisabled,
|
|
73
73
|
additionalUserFields,
|
|
74
|
-
isExtendedShareDialogEnabled
|
|
74
|
+
isExtendedShareDialogEnabled,
|
|
75
|
+
CustomSubmitButton
|
|
75
76
|
} = props;
|
|
76
77
|
const header = customHeader ? /*#__PURE__*/React.createElement(Box, {
|
|
77
78
|
xcss: styles.headerCustomStyles
|
|
@@ -139,7 +140,8 @@ function LazyShareForm(props) {
|
|
|
139
140
|
userPickerOptions: userPickerOptions,
|
|
140
141
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
141
142
|
additionalUserFields: additionalUserFields,
|
|
142
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
143
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
144
|
+
CustomSubmitButton: CustomSubmitButton
|
|
143
145
|
}) : /*#__PURE__*/React.createElement(Text, {
|
|
144
146
|
as: "p"
|
|
145
147
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.formNoPermissions))));
|
|
@@ -318,7 +318,8 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
318
318
|
userPickerOptions,
|
|
319
319
|
isSubmitShareDisabled,
|
|
320
320
|
additionalUserFields,
|
|
321
|
-
isExtendedShareDialogEnabled
|
|
321
|
+
isExtendedShareDialogEnabled,
|
|
322
|
+
CustomSubmitButton
|
|
322
323
|
} = this.props;
|
|
323
324
|
const {
|
|
324
325
|
config,
|
|
@@ -376,7 +377,8 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
376
377
|
builtInTabContentWidth: builtInTabContentWidth,
|
|
377
378
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
378
379
|
additionalUserFields: additionalUserFields,
|
|
379
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
380
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
381
|
+
CustomSubmitButton: CustomSubmitButton
|
|
380
382
|
})));
|
|
381
383
|
}
|
|
382
384
|
}
|
|
@@ -526,7 +526,8 @@ export class ShareDialogWithTriggerInternalLegacy extends React.PureComponent {
|
|
|
526
526
|
userPickerOptions,
|
|
527
527
|
isSubmitShareDisabled,
|
|
528
528
|
additionalUserFields,
|
|
529
|
-
isExtendedShareDialogEnabled
|
|
529
|
+
isExtendedShareDialogEnabled,
|
|
530
|
+
CustomSubmitButton
|
|
530
531
|
} = this.props;
|
|
531
532
|
const style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
532
533
|
outline: 'none'
|
|
@@ -595,7 +596,8 @@ export class ShareDialogWithTriggerInternalLegacy extends React.PureComponent {
|
|
|
595
596
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
596
597
|
userPickerOptions: userPickerOptions,
|
|
597
598
|
additionalUserFields: additionalUserFields,
|
|
598
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
599
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
600
|
+
CustomSubmitButton: CustomSubmitButton
|
|
599
601
|
})),
|
|
600
602
|
isOpen: isDialogOpen,
|
|
601
603
|
onClose: this.handleCloseDialog,
|
|
@@ -503,7 +503,8 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
503
503
|
userPickerOptions,
|
|
504
504
|
isSubmitShareDisabled,
|
|
505
505
|
additionalUserFields,
|
|
506
|
-
isExtendedShareDialogEnabled
|
|
506
|
+
isExtendedShareDialogEnabled,
|
|
507
|
+
CustomSubmitButton
|
|
507
508
|
} = this.props;
|
|
508
509
|
const footer = resolveShareFooter(integrationMode, this.state.tabIndex, customFooter);
|
|
509
510
|
|
|
@@ -564,7 +565,8 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
564
565
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
565
566
|
userPickerOptions: userPickerOptions,
|
|
566
567
|
additionalUserFields: additionalUserFields,
|
|
567
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
568
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
569
|
+
CustomSubmitButton: CustomSubmitButton
|
|
568
570
|
})),
|
|
569
571
|
isOpen: isDialogOpen,
|
|
570
572
|
onClose: this.handleCloseDialog,
|
|
@@ -135,7 +135,10 @@ class InternalForm extends React.PureComponent {
|
|
|
135
135
|
userPickerOptions,
|
|
136
136
|
productAttributes,
|
|
137
137
|
additionalUserFields,
|
|
138
|
-
isExtendedShareDialogEnabled
|
|
138
|
+
isExtendedShareDialogEnabled,
|
|
139
|
+
isSharing,
|
|
140
|
+
isSubmitShareDisabled,
|
|
141
|
+
CustomSubmitButton
|
|
139
142
|
} = this.props;
|
|
140
143
|
return jsx(AnalyticsContext, {
|
|
141
144
|
data: {
|
|
@@ -203,7 +206,13 @@ class InternalForm extends React.PureComponent {
|
|
|
203
206
|
copyTooltipText: copyTooltipText,
|
|
204
207
|
copyLinkButtonText: formatMessage(isPublicLink ? messages.copyPublicLinkButtonText : messages.copyLinkButtonText),
|
|
205
208
|
copiedToClipboardText: formatMessage(messages.copiedToClipboardMessage)
|
|
206
|
-
}),
|
|
209
|
+
}), isExtendedShareDialogEnabled && CustomSubmitButton ? jsx(CustomSubmitButton, {
|
|
210
|
+
shareError: shareError,
|
|
211
|
+
isSharing: isSharing,
|
|
212
|
+
isDisabled: isDisabled,
|
|
213
|
+
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
214
|
+
isPublicLink: isPublicLink
|
|
215
|
+
}) : this.renderSubmitButton())));
|
|
207
216
|
});
|
|
208
217
|
_defineProperty(this, "renderSubmitButton", () => {
|
|
209
218
|
const {
|
|
@@ -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.
|
|
4
|
+
packageVersion: "6.7.0",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|
|
@@ -78,7 +78,8 @@ function LazyShareForm(props) {
|
|
|
78
78
|
userPickerOptions = props.userPickerOptions,
|
|
79
79
|
isSubmitShareDisabled = props.isSubmitShareDisabled,
|
|
80
80
|
additionalUserFields = props.additionalUserFields,
|
|
81
|
-
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled
|
|
81
|
+
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled,
|
|
82
|
+
CustomSubmitButton = props.CustomSubmitButton;
|
|
82
83
|
var header = customHeader ? jsx("div", {
|
|
83
84
|
css: headerCustomStyles
|
|
84
85
|
}, customHeader) : null;
|
|
@@ -145,7 +146,8 @@ function LazyShareForm(props) {
|
|
|
145
146
|
userPickerOptions: userPickerOptions,
|
|
146
147
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
147
148
|
additionalUserFields: additionalUserFields,
|
|
148
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
149
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
150
|
+
CustomSubmitButton: CustomSubmitButton
|
|
149
151
|
}) : jsx(Text, {
|
|
150
152
|
as: "p"
|
|
151
153
|
}, jsx(FormattedMessage, messages.formNoPermissions))));
|
|
@@ -67,7 +67,8 @@ function LazyShareForm(props) {
|
|
|
67
67
|
userPickerOptions = props.userPickerOptions,
|
|
68
68
|
isSubmitShareDisabled = props.isSubmitShareDisabled,
|
|
69
69
|
additionalUserFields = props.additionalUserFields,
|
|
70
|
-
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled
|
|
70
|
+
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled,
|
|
71
|
+
CustomSubmitButton = props.CustomSubmitButton;
|
|
71
72
|
var header = customHeader ? /*#__PURE__*/React.createElement(Box, {
|
|
72
73
|
xcss: styles.headerCustomStyles
|
|
73
74
|
}, customHeader) : null;
|
|
@@ -134,7 +135,8 @@ function LazyShareForm(props) {
|
|
|
134
135
|
userPickerOptions: userPickerOptions,
|
|
135
136
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
136
137
|
additionalUserFields: additionalUserFields,
|
|
137
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
138
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
139
|
+
CustomSubmitButton: CustomSubmitButton
|
|
138
140
|
}) : /*#__PURE__*/React.createElement(Text, {
|
|
139
141
|
as: "p"
|
|
140
142
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.formNoPermissions))));
|
|
@@ -364,7 +364,8 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
364
364
|
userPickerOptions = _this$props3.userPickerOptions,
|
|
365
365
|
isSubmitShareDisabled = _this$props3.isSubmitShareDisabled,
|
|
366
366
|
additionalUserFields = _this$props3.additionalUserFields,
|
|
367
|
-
isExtendedShareDialogEnabled = _this$props3.isExtendedShareDialogEnabled
|
|
367
|
+
isExtendedShareDialogEnabled = _this$props3.isExtendedShareDialogEnabled,
|
|
368
|
+
CustomSubmitButton = _this$props3.CustomSubmitButton;
|
|
368
369
|
var _this$state = this.state,
|
|
369
370
|
config = _this$state.config,
|
|
370
371
|
isFetchingConfig = _this$state.isFetchingConfig;
|
|
@@ -420,7 +421,8 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
420
421
|
builtInTabContentWidth: builtInTabContentWidth,
|
|
421
422
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
422
423
|
additionalUserFields: additionalUserFields,
|
|
423
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
424
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
425
|
+
CustomSubmitButton: CustomSubmitButton
|
|
424
426
|
})));
|
|
425
427
|
}
|
|
426
428
|
}]);
|
|
@@ -577,7 +577,8 @@ export var ShareDialogWithTriggerInternalLegacy = /*#__PURE__*/function (_React$
|
|
|
577
577
|
userPickerOptions = _this$props7.userPickerOptions,
|
|
578
578
|
isSubmitShareDisabled = _this$props7.isSubmitShareDisabled,
|
|
579
579
|
additionalUserFields = _this$props7.additionalUserFields,
|
|
580
|
-
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled
|
|
580
|
+
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled,
|
|
581
|
+
CustomSubmitButton = _this$props7.CustomSubmitButton;
|
|
581
582
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
582
583
|
outline: 'none'
|
|
583
584
|
} : undefined;
|
|
@@ -646,7 +647,8 @@ export var ShareDialogWithTriggerInternalLegacy = /*#__PURE__*/function (_React$
|
|
|
646
647
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
647
648
|
userPickerOptions: userPickerOptions,
|
|
648
649
|
additionalUserFields: additionalUserFields,
|
|
649
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
650
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
651
|
+
CustomSubmitButton: CustomSubmitButton
|
|
650
652
|
}));
|
|
651
653
|
},
|
|
652
654
|
isOpen: isDialogOpen,
|
|
@@ -554,7 +554,8 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
554
554
|
userPickerOptions = _this$props7.userPickerOptions,
|
|
555
555
|
isSubmitShareDisabled = _this$props7.isSubmitShareDisabled,
|
|
556
556
|
additionalUserFields = _this$props7.additionalUserFields,
|
|
557
|
-
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled
|
|
557
|
+
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled,
|
|
558
|
+
CustomSubmitButton = _this$props7.CustomSubmitButton;
|
|
558
559
|
var footer = resolveShareFooter(integrationMode, this.state.tabIndex, customFooter);
|
|
559
560
|
|
|
560
561
|
// for performance purposes, we may want to have a loadable content i.e. ShareForm
|
|
@@ -615,7 +616,8 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
615
616
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
616
617
|
userPickerOptions: userPickerOptions,
|
|
617
618
|
additionalUserFields: additionalUserFields,
|
|
618
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
619
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
620
|
+
CustomSubmitButton: CustomSubmitButton
|
|
619
621
|
}));
|
|
620
622
|
},
|
|
621
623
|
isOpen: isDialogOpen,
|
|
@@ -150,7 +150,10 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
150
150
|
userPickerOptions = _this$props.userPickerOptions,
|
|
151
151
|
productAttributes = _this$props.productAttributes,
|
|
152
152
|
additionalUserFields = _this$props.additionalUserFields,
|
|
153
|
-
isExtendedShareDialogEnabled = _this$props.isExtendedShareDialogEnabled
|
|
153
|
+
isExtendedShareDialogEnabled = _this$props.isExtendedShareDialogEnabled,
|
|
154
|
+
isSharing = _this$props.isSharing,
|
|
155
|
+
isSubmitShareDisabled = _this$props.isSubmitShareDisabled,
|
|
156
|
+
CustomSubmitButton = _this$props.CustomSubmitButton;
|
|
154
157
|
return jsx(AnalyticsContext, {
|
|
155
158
|
data: {
|
|
156
159
|
source: ANALYTICS_SOURCE
|
|
@@ -217,7 +220,13 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
217
220
|
copyTooltipText: copyTooltipText,
|
|
218
221
|
copyLinkButtonText: formatMessage(isPublicLink ? messages.copyPublicLinkButtonText : messages.copyLinkButtonText),
|
|
219
222
|
copiedToClipboardText: formatMessage(messages.copiedToClipboardMessage)
|
|
220
|
-
}),
|
|
223
|
+
}), isExtendedShareDialogEnabled && CustomSubmitButton ? jsx(CustomSubmitButton, {
|
|
224
|
+
shareError: shareError,
|
|
225
|
+
isSharing: isSharing,
|
|
226
|
+
isDisabled: isDisabled,
|
|
227
|
+
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
228
|
+
isPublicLink: isPublicLink
|
|
229
|
+
}) : _this.renderSubmitButton())));
|
|
221
230
|
});
|
|
222
231
|
_defineProperty(_this, "renderSubmitButton", function () {
|
|
223
232
|
var _this$props2 = _this.props,
|
|
@@ -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: "6.
|
|
9
|
+
packageVersion: "6.7.0"
|
|
10
10
|
}, attributes);
|
|
11
11
|
};
|
|
12
12
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -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' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled'> & 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' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & 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;
|
|
@@ -2,7 +2,7 @@ import React from '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' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled'> & 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' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & 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;
|
|
@@ -48,64 +48,65 @@ export declare class ShareDialogContainerInternal extends React.Component<ShareD
|
|
|
48
48
|
render(): React.JSX.Element;
|
|
49
49
|
}
|
|
50
50
|
export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Omit<Pick<Omit<ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, never> & {
|
|
51
|
-
|
|
51
|
+
integrationMode?: import("../types/ShareEntities").IntegrationMode | undefined;
|
|
52
|
+
shareIntegrations?: import("../types").Integration[] | undefined;
|
|
53
|
+
additionalTabs?: import("../types").AdditionalTab[] | undefined;
|
|
54
|
+
builtInTabContentWidth?: number | undefined;
|
|
55
|
+
copyTooltipText?: string | undefined;
|
|
56
|
+
isPublicLink?: boolean | undefined;
|
|
57
|
+
onUserSelectionChange?: ((value: import("@atlaskit/user-picker").Value) => void) | undefined;
|
|
58
|
+
cloudId?: string | undefined;
|
|
59
|
+
loggedInAccountId?: string | undefined;
|
|
60
|
+
enableSmartUserPicker?: boolean | undefined;
|
|
52
61
|
orgId?: string | undefined;
|
|
53
|
-
|
|
54
|
-
|
|
62
|
+
isBrowseUsersDisabled?: boolean | undefined;
|
|
63
|
+
userPickerOptions?: import("../types").UserPickerOptions | undefined;
|
|
64
|
+
productAttributes?: import("packages/smart-experiences/smart-user-picker/dist/types/types").ProductAttributes | undefined;
|
|
65
|
+
additionalUserFields?: React.ReactNode;
|
|
66
|
+
isExtendedShareDialogEnabled?: boolean | undefined;
|
|
67
|
+
CustomSubmitButton?: React.FC<import("../types").RenderCustomSubmitButtonProps> | undefined;
|
|
55
68
|
onTriggerButtonClick?: (() => void) | undefined;
|
|
69
|
+
onDialogOpen?: (() => void) | undefined;
|
|
70
|
+
onDialogClose?: (() => void) | undefined;
|
|
56
71
|
isAutoOpenDialog?: boolean | undefined;
|
|
57
|
-
|
|
72
|
+
shareClient?: ShareClient | undefined;
|
|
73
|
+
urlShortenerClient?: UrlShortenerClient | undefined;
|
|
74
|
+
shortLinkData?: ShortenRequest | undefined;
|
|
58
75
|
dialogPlacement?: import("@popperjs/core").Placement | undefined;
|
|
76
|
+
dialogZIndex?: number | undefined;
|
|
77
|
+
formatCopyLink?: ((origin: OriginTracing, link: string) => string) | undefined;
|
|
59
78
|
loadUserOptions?: import("@atlaskit/user-picker").LoadOptions | undefined;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
onUserSelectionChange?: ((value: import("@atlaskit/user-picker").Value) => void) | undefined;
|
|
79
|
+
originTracingFactory?: OriginTracingFactory | undefined;
|
|
80
|
+
productId?: import("../types").ProductId | undefined;
|
|
63
81
|
renderCustomTriggerButton?: import("../types").RenderCustomTriggerButton | undefined;
|
|
82
|
+
shareAri?: string | undefined;
|
|
64
83
|
shareContentType?: string | undefined;
|
|
65
84
|
shareContentSubType?: string | undefined;
|
|
66
85
|
shareContentId?: string | undefined;
|
|
86
|
+
shareLink?: string | undefined;
|
|
87
|
+
shareTitle?: string | undefined;
|
|
67
88
|
shareFormTitle?: React.ReactNode;
|
|
68
89
|
shareFormHelperMessage?: string | undefined;
|
|
90
|
+
shouldCloseOnEscapePress?: boolean | undefined;
|
|
69
91
|
showFlags?: ((flags: import("../types").Flag[]) => void) | undefined;
|
|
70
|
-
enableSmartUserPicker?: boolean | undefined;
|
|
71
|
-
loggedInAccountId?: string | undefined;
|
|
72
92
|
triggerButtonAppearance?: "default" | "subtle" | "primary" | "discovery" | undefined;
|
|
73
93
|
triggerButtonIcon?: React.ComponentType<import("@atlaskit/icon").NewCoreIconProps> | undefined;
|
|
74
94
|
triggerButtonStyle?: import("../types").ShareButtonStyle | undefined;
|
|
75
95
|
triggerButtonTooltipPosition?: import("../types").TooltipPosition | undefined;
|
|
76
96
|
triggerButtonTooltipText?: React.ReactNode;
|
|
77
|
-
cloudId?: string | undefined;
|
|
78
97
|
bottomMessage?: React.ReactNode;
|
|
98
|
+
useUrlShortener?: boolean | undefined;
|
|
99
|
+
shareeAction?: "view" | "edit" | undefined;
|
|
79
100
|
product?: import("../types").ProductName | undefined;
|
|
80
101
|
customHeader?: React.ReactNode;
|
|
81
102
|
customFooter?: React.ReactNode;
|
|
103
|
+
shareFieldsFooter?: React.ReactNode;
|
|
82
104
|
isCopyDisabled?: boolean | undefined;
|
|
83
|
-
isPublicLink?: boolean | undefined;
|
|
84
|
-
integrationMode?: import("../types/ShareEntities").IntegrationMode | undefined;
|
|
85
105
|
isMenuItemSelected?: boolean | undefined;
|
|
86
|
-
|
|
87
|
-
shareIntegrations?: import("../types").Integration[] | undefined;
|
|
88
|
-
additionalTabs?: import("../types").AdditionalTab[] | undefined;
|
|
89
|
-
builtInTabContentWidth?: number | undefined;
|
|
90
|
-
shareAri?: string | undefined;
|
|
91
|
-
copyTooltipText?: string | undefined;
|
|
92
|
-
dialogZIndex?: number | undefined;
|
|
93
|
-
isBrowseUsersDisabled?: boolean | undefined;
|
|
94
|
-
userPickerOptions?: import("../types").UserPickerOptions | undefined;
|
|
95
|
-
isSubmitShareDisabled?: boolean | undefined;
|
|
96
|
-
additionalUserFields?: React.ReactNode;
|
|
97
|
-
isExtendedShareDialogEnabled?: boolean | undefined;
|
|
98
|
-
shareClient?: ShareClient | undefined;
|
|
99
|
-
urlShortenerClient?: UrlShortenerClient | undefined;
|
|
100
|
-
shortLinkData?: ShortenRequest | undefined;
|
|
101
|
-
formatCopyLink?: ((origin: OriginTracing, link: string) => string) | undefined;
|
|
102
|
-
originTracingFactory?: OriginTracingFactory | undefined;
|
|
103
|
-
productId?: import("../types").ProductId | undefined;
|
|
104
|
-
shareLink?: string | undefined;
|
|
105
|
-
shareTitle?: string | undefined;
|
|
106
|
-
useUrlShortener?: boolean | undefined;
|
|
107
|
-
shareeAction?: "view" | "edit" | undefined;
|
|
106
|
+
tabIndex?: number | undefined;
|
|
108
107
|
workspaceAri?: string | undefined;
|
|
108
|
+
isSubmitShareDisabled?: boolean | undefined;
|
|
109
|
+
onSubmit?: ((formValues: ShareData) => void | Promise<void>) | undefined;
|
|
109
110
|
} & {
|
|
110
111
|
createAnalyticsEvent?: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | undefined;
|
|
111
112
|
ref?: React.Ref<any> | undefined;
|
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, AdditionalTab, Integration, ContentProps, } 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, RenderCustomSubmitButtonProps, } from './types';
|
|
@@ -11,6 +11,7 @@ import type { ProductId, ProductName } from './Products';
|
|
|
11
11
|
import type { ShareButtonStyle, TooltipPosition } from './ShareButton';
|
|
12
12
|
import type { DialogPlacement, RenderCustomTriggerButton } from './ShareDialogWithTrigger';
|
|
13
13
|
import type { AdditionalTab, Integration, IntegrationMode } from './ShareEntities';
|
|
14
|
+
import { RenderCustomSubmitButtonProps } from './ShareForm';
|
|
14
15
|
import type { UserPickerOptions } from './UserPickerOptions';
|
|
15
16
|
export type ShareDialogContainerProps = {
|
|
16
17
|
onTriggerButtonClick?: () => void;
|
|
@@ -165,4 +166,5 @@ export type ShareDialogContainerProps = {
|
|
|
165
166
|
isExtendedShareDialogEnabled?: boolean;
|
|
166
167
|
additionalUserFields?: React.ReactNode;
|
|
167
168
|
onSubmit?: (formValues: ShareData) => void | Promise<void>;
|
|
169
|
+
CustomSubmitButton?: React.FC<RenderCustomSubmitButtonProps>;
|
|
168
170
|
};
|
|
@@ -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' | 'customHeader' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled'> & {
|
|
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' | 'customHeader' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & {
|
|
23
23
|
config?: ConfigResponse;
|
|
24
24
|
isFetchingConfig?: boolean;
|
|
25
25
|
children?: RenderCustomTriggerButton;
|
|
@@ -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' | 'additionalTabs' | 'builtInTabContentWidth' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes' | 'additionalUserFields' | 'isExtendedShareDialogEnabled'> & {
|
|
8
|
+
export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & {
|
|
9
9
|
config?: ConfigResponse;
|
|
10
10
|
isFetchingConfig?: boolean;
|
|
11
11
|
copyLink: string;
|
|
@@ -33,3 +33,4 @@ export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' |
|
|
|
33
33
|
handleCloseDialog?: () => void;
|
|
34
34
|
isSubmitShareDisabled?: boolean;
|
|
35
35
|
};
|
|
36
|
+
export type RenderCustomSubmitButtonProps = Pick<ShareFormProps, 'isSharing' | 'isDisabled' | 'isSubmitShareDisabled' | 'isPublicLink' | 'shareError' | 'integrationMode' | 'submitButtonLabel'>;
|
|
@@ -15,5 +15,5 @@ export type KeysOfType<T, TProp> = {
|
|
|
15
15
|
[P in keyof T]: T[P] extends TProp ? P : never;
|
|
16
16
|
}[keyof T];
|
|
17
17
|
export type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
18
|
-
export type { ShareFormProps } from './ShareForm';
|
|
18
|
+
export type { ShareFormProps, RenderCustomSubmitButtonProps } from './ShareForm';
|
|
19
19
|
export type { UserPickerOptions } from './UserPickerOptions';
|
|
@@ -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' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled'> & 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' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & 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;
|
|
@@ -2,7 +2,7 @@ import React from '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' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled'> & 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' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & 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;
|
|
@@ -48,64 +48,65 @@ export declare class ShareDialogContainerInternal extends React.Component<ShareD
|
|
|
48
48
|
render(): React.JSX.Element;
|
|
49
49
|
}
|
|
50
50
|
export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Omit<Pick<Omit<ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, never> & {
|
|
51
|
-
|
|
51
|
+
integrationMode?: import("../types/ShareEntities").IntegrationMode | undefined;
|
|
52
|
+
shareIntegrations?: import("../types").Integration[] | undefined;
|
|
53
|
+
additionalTabs?: import("../types").AdditionalTab[] | undefined;
|
|
54
|
+
builtInTabContentWidth?: number | undefined;
|
|
55
|
+
copyTooltipText?: string | undefined;
|
|
56
|
+
isPublicLink?: boolean | undefined;
|
|
57
|
+
onUserSelectionChange?: ((value: import("@atlaskit/user-picker").Value) => void) | undefined;
|
|
58
|
+
cloudId?: string | undefined;
|
|
59
|
+
loggedInAccountId?: string | undefined;
|
|
60
|
+
enableSmartUserPicker?: boolean | undefined;
|
|
52
61
|
orgId?: string | undefined;
|
|
53
|
-
|
|
54
|
-
|
|
62
|
+
isBrowseUsersDisabled?: boolean | undefined;
|
|
63
|
+
userPickerOptions?: import("../types").UserPickerOptions | undefined;
|
|
64
|
+
productAttributes?: import("packages/smart-experiences/smart-user-picker/dist/types/types").ProductAttributes | undefined;
|
|
65
|
+
additionalUserFields?: React.ReactNode;
|
|
66
|
+
isExtendedShareDialogEnabled?: boolean | undefined;
|
|
67
|
+
CustomSubmitButton?: React.FC<import("../types").RenderCustomSubmitButtonProps> | undefined;
|
|
55
68
|
onTriggerButtonClick?: (() => void) | undefined;
|
|
69
|
+
onDialogOpen?: (() => void) | undefined;
|
|
70
|
+
onDialogClose?: (() => void) | undefined;
|
|
56
71
|
isAutoOpenDialog?: boolean | undefined;
|
|
57
|
-
|
|
72
|
+
shareClient?: ShareClient | undefined;
|
|
73
|
+
urlShortenerClient?: UrlShortenerClient | undefined;
|
|
74
|
+
shortLinkData?: ShortenRequest | undefined;
|
|
58
75
|
dialogPlacement?: import("@popperjs/core").Placement | undefined;
|
|
76
|
+
dialogZIndex?: number | undefined;
|
|
77
|
+
formatCopyLink?: ((origin: OriginTracing, link: string) => string) | undefined;
|
|
59
78
|
loadUserOptions?: import("@atlaskit/user-picker").LoadOptions | undefined;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
onUserSelectionChange?: ((value: import("@atlaskit/user-picker").Value) => void) | undefined;
|
|
79
|
+
originTracingFactory?: OriginTracingFactory | undefined;
|
|
80
|
+
productId?: import("../types").ProductId | undefined;
|
|
63
81
|
renderCustomTriggerButton?: import("../types").RenderCustomTriggerButton | undefined;
|
|
82
|
+
shareAri?: string | undefined;
|
|
64
83
|
shareContentType?: string | undefined;
|
|
65
84
|
shareContentSubType?: string | undefined;
|
|
66
85
|
shareContentId?: string | undefined;
|
|
86
|
+
shareLink?: string | undefined;
|
|
87
|
+
shareTitle?: string | undefined;
|
|
67
88
|
shareFormTitle?: React.ReactNode;
|
|
68
89
|
shareFormHelperMessage?: string | undefined;
|
|
90
|
+
shouldCloseOnEscapePress?: boolean | undefined;
|
|
69
91
|
showFlags?: ((flags: import("../types").Flag[]) => void) | undefined;
|
|
70
|
-
enableSmartUserPicker?: boolean | undefined;
|
|
71
|
-
loggedInAccountId?: string | undefined;
|
|
72
92
|
triggerButtonAppearance?: "default" | "subtle" | "primary" | "discovery" | undefined;
|
|
73
93
|
triggerButtonIcon?: React.ComponentType<import("@atlaskit/icon").NewCoreIconProps> | undefined;
|
|
74
94
|
triggerButtonStyle?: import("../types").ShareButtonStyle | undefined;
|
|
75
95
|
triggerButtonTooltipPosition?: import("../types").TooltipPosition | undefined;
|
|
76
96
|
triggerButtonTooltipText?: React.ReactNode;
|
|
77
|
-
cloudId?: string | undefined;
|
|
78
97
|
bottomMessage?: React.ReactNode;
|
|
98
|
+
useUrlShortener?: boolean | undefined;
|
|
99
|
+
shareeAction?: "view" | "edit" | undefined;
|
|
79
100
|
product?: import("../types").ProductName | undefined;
|
|
80
101
|
customHeader?: React.ReactNode;
|
|
81
102
|
customFooter?: React.ReactNode;
|
|
103
|
+
shareFieldsFooter?: React.ReactNode;
|
|
82
104
|
isCopyDisabled?: boolean | undefined;
|
|
83
|
-
isPublicLink?: boolean | undefined;
|
|
84
|
-
integrationMode?: import("../types/ShareEntities").IntegrationMode | undefined;
|
|
85
105
|
isMenuItemSelected?: boolean | undefined;
|
|
86
|
-
|
|
87
|
-
shareIntegrations?: import("../types").Integration[] | undefined;
|
|
88
|
-
additionalTabs?: import("../types").AdditionalTab[] | undefined;
|
|
89
|
-
builtInTabContentWidth?: number | undefined;
|
|
90
|
-
shareAri?: string | undefined;
|
|
91
|
-
copyTooltipText?: string | undefined;
|
|
92
|
-
dialogZIndex?: number | undefined;
|
|
93
|
-
isBrowseUsersDisabled?: boolean | undefined;
|
|
94
|
-
userPickerOptions?: import("../types").UserPickerOptions | undefined;
|
|
95
|
-
isSubmitShareDisabled?: boolean | undefined;
|
|
96
|
-
additionalUserFields?: React.ReactNode;
|
|
97
|
-
isExtendedShareDialogEnabled?: boolean | undefined;
|
|
98
|
-
shareClient?: ShareClient | undefined;
|
|
99
|
-
urlShortenerClient?: UrlShortenerClient | undefined;
|
|
100
|
-
shortLinkData?: ShortenRequest | undefined;
|
|
101
|
-
formatCopyLink?: ((origin: OriginTracing, link: string) => string) | undefined;
|
|
102
|
-
originTracingFactory?: OriginTracingFactory | undefined;
|
|
103
|
-
productId?: import("../types").ProductId | undefined;
|
|
104
|
-
shareLink?: string | undefined;
|
|
105
|
-
shareTitle?: string | undefined;
|
|
106
|
-
useUrlShortener?: boolean | undefined;
|
|
107
|
-
shareeAction?: "view" | "edit" | undefined;
|
|
106
|
+
tabIndex?: number | undefined;
|
|
108
107
|
workspaceAri?: string | undefined;
|
|
108
|
+
isSubmitShareDisabled?: boolean | undefined;
|
|
109
|
+
onSubmit?: ((formValues: ShareData) => void | Promise<void>) | undefined;
|
|
109
110
|
} & {
|
|
110
111
|
createAnalyticsEvent?: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | undefined;
|
|
111
112
|
ref?: React.Ref<any> | undefined;
|
|
@@ -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, AdditionalTab, Integration, ContentProps, } 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, RenderCustomSubmitButtonProps, } from './types';
|
|
@@ -11,6 +11,7 @@ import type { ProductId, ProductName } from './Products';
|
|
|
11
11
|
import type { ShareButtonStyle, TooltipPosition } from './ShareButton';
|
|
12
12
|
import type { DialogPlacement, RenderCustomTriggerButton } from './ShareDialogWithTrigger';
|
|
13
13
|
import type { AdditionalTab, Integration, IntegrationMode } from './ShareEntities';
|
|
14
|
+
import { RenderCustomSubmitButtonProps } from './ShareForm';
|
|
14
15
|
import type { UserPickerOptions } from './UserPickerOptions';
|
|
15
16
|
export type ShareDialogContainerProps = {
|
|
16
17
|
onTriggerButtonClick?: () => void;
|
|
@@ -165,4 +166,5 @@ export type ShareDialogContainerProps = {
|
|
|
165
166
|
isExtendedShareDialogEnabled?: boolean;
|
|
166
167
|
additionalUserFields?: React.ReactNode;
|
|
167
168
|
onSubmit?: (formValues: ShareData) => void | Promise<void>;
|
|
169
|
+
CustomSubmitButton?: React.FC<RenderCustomSubmitButtonProps>;
|
|
168
170
|
};
|
|
@@ -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' | 'customHeader' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled'> & {
|
|
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' | 'customHeader' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & {
|
|
23
23
|
config?: ConfigResponse;
|
|
24
24
|
isFetchingConfig?: boolean;
|
|
25
25
|
children?: RenderCustomTriggerButton;
|
|
@@ -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' | 'additionalTabs' | 'builtInTabContentWidth' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes' | 'additionalUserFields' | 'isExtendedShareDialogEnabled'> & {
|
|
8
|
+
export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'productAttributes' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & {
|
|
9
9
|
config?: ConfigResponse;
|
|
10
10
|
isFetchingConfig?: boolean;
|
|
11
11
|
copyLink: string;
|
|
@@ -33,3 +33,4 @@ export type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' |
|
|
|
33
33
|
handleCloseDialog?: () => void;
|
|
34
34
|
isSubmitShareDisabled?: boolean;
|
|
35
35
|
};
|
|
36
|
+
export type RenderCustomSubmitButtonProps = Pick<ShareFormProps, 'isSharing' | 'isDisabled' | 'isSubmitShareDisabled' | 'isPublicLink' | 'shareError' | 'integrationMode' | 'submitButtonLabel'>;
|
|
@@ -15,5 +15,5 @@ export type KeysOfType<T, TProp> = {
|
|
|
15
15
|
[P in keyof T]: T[P] extends TProp ? P : never;
|
|
16
16
|
}[keyof T];
|
|
17
17
|
export type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
18
|
-
export type { ShareFormProps } from './ShareForm';
|
|
18
|
+
export type { ShareFormProps, RenderCustomSubmitButtonProps } from './ShareForm';
|
|
19
19
|
export type { UserPickerOptions } from './UserPickerOptions';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.0",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/textarea": "^8.0.0",
|
|
59
59
|
"@atlaskit/theme": "^18.0.0",
|
|
60
60
|
"@atlaskit/tokens": "^4.9.0",
|
|
61
|
-
"@atlaskit/tooltip": "^20.
|
|
61
|
+
"@atlaskit/tooltip": "^20.1.0",
|
|
62
62
|
"@atlaskit/ufo": "^0.4.0",
|
|
63
63
|
"@atlaskit/user-picker": "^11.1.0",
|
|
64
64
|
"@atlaskit/util-service-support": "^6.3.0",
|