@atlaskit/user-picker 9.5.0 → 9.6.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 +12 -0
- package/dist/cjs/analytics.js +8 -2
- package/dist/cjs/components/CustomOption/index.js +29 -0
- package/dist/cjs/components/CustomOption/main.js +115 -0
- package/dist/cjs/components/GroupOption/main.js +1 -1
- package/dist/cjs/components/MultiValue.js +2 -2
- package/dist/cjs/components/Option.js +9 -0
- package/dist/cjs/components/TeamOption/main.js +4 -4
- package/dist/cjs/components/UserPicker.js +1 -1
- package/dist/cjs/components/utils.js +8 -2
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/types.js +4 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics.js +9 -3
- package/dist/es2019/components/CustomOption/index.js +9 -0
- package/dist/es2019/components/CustomOption/main.js +73 -0
- package/dist/es2019/components/GroupOption/main.js +1 -1
- package/dist/es2019/components/MultiValue.js +2 -2
- package/dist/es2019/components/Option.js +9 -1
- package/dist/es2019/components/TeamOption/main.js +4 -4
- package/dist/es2019/components/UserPicker.js +1 -1
- package/dist/es2019/components/utils.js +3 -2
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/types.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics.js +9 -3
- package/dist/esm/components/CustomOption/index.js +11 -0
- package/dist/esm/components/CustomOption/main.js +99 -0
- package/dist/esm/components/GroupOption/main.js +1 -1
- package/dist/esm/components/MultiValue.js +2 -2
- package/dist/esm/components/Option.js +9 -1
- package/dist/esm/components/TeamOption/main.js +4 -4
- package/dist/esm/components/UserPicker.js +1 -1
- package/dist/esm/components/utils.js +5 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/types.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/BaseUserPicker.d.ts +1 -1
- package/dist/types/components/CustomOption/index.d.ts +3 -0
- package/dist/types/components/CustomOption/main.d.ts +14 -0
- package/dist/types/components/PopupUserPicker.d.ts +1 -1
- package/dist/types/components/UserPicker.d.ts +1 -1
- package/dist/types/components/utils.d.ts +2 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/types.d.ts +12 -1
- package/dist/types-ts4.0/components/BaseUserPicker.d.ts +1 -1
- package/dist/types-ts4.0/components/CustomOption/index.d.ts +3 -0
- package/dist/types-ts4.0/components/CustomOption/main.d.ts +14 -0
- package/dist/types-ts4.0/components/PopupUserPicker.d.ts +1 -1
- package/dist/types-ts4.0/components/UserPicker.d.ts +1 -1
- package/dist/types-ts4.0/components/utils.d.ts +2 -1
- package/dist/types-ts4.0/index.d.ts +2 -2
- package/dist/types-ts4.0/types.d.ts +12 -1
- package/package.json +9 -8
- package/report.api.md +25 -2
- package/tmp/api-report-tmp.d.ts +24 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
+
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
|
|
11
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
+
|
|
13
|
+
/** @jsx jsx */
|
|
14
|
+
import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
15
|
+
import { token } from '@atlaskit/tokens';
|
|
16
|
+
import { jsx } from '@emotion/core';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
|
|
19
|
+
import { HighlightText } from '../HighlightText';
|
|
20
|
+
import { SizeableAvatar } from '../SizeableAvatar';
|
|
21
|
+
export var CustomOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
22
|
+
_inherits(CustomOption, _React$PureComponent);
|
|
23
|
+
|
|
24
|
+
var _super = _createSuper(CustomOption);
|
|
25
|
+
|
|
26
|
+
function CustomOption() {
|
|
27
|
+
var _this;
|
|
28
|
+
|
|
29
|
+
_classCallCheck(this, CustomOption);
|
|
30
|
+
|
|
31
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
32
|
+
args[_key] = arguments[_key];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
36
|
+
|
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "getPrimaryText", function () {
|
|
38
|
+
var _this$props$data = _this.props.data,
|
|
39
|
+
name = _this$props$data.name,
|
|
40
|
+
highlight = _this$props$data.highlight;
|
|
41
|
+
return [jsx("span", {
|
|
42
|
+
key: "name",
|
|
43
|
+
css: textWrapper(_this.props.isSelected ? token('color.text.selected', B400) : token('color.text', N800))
|
|
44
|
+
}, jsx(HighlightText, {
|
|
45
|
+
highlights: highlight && highlight.name
|
|
46
|
+
}, name))];
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
_defineProperty(_assertThisInitialized(_this), "getBylineComponent", function (isSelected, message) {
|
|
50
|
+
return jsx("span", {
|
|
51
|
+
css: textWrapper(isSelected ? token('color.text.selected', B400) : token('color.text.subtlest', N200))
|
|
52
|
+
}, message);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
_defineProperty(_assertThisInitialized(_this), "renderByline", function () {
|
|
56
|
+
var _this$props$data2;
|
|
57
|
+
|
|
58
|
+
if (!((_this$props$data2 = _this.props.data) !== null && _this$props$data2 !== void 0 && _this$props$data2.byline)) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return _this.getBylineComponent(_this.props.isSelected, _this.props.data.byline);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
_defineProperty(_assertThisInitialized(_this), "renderAvatar", function () {
|
|
66
|
+
var _this$props$data3 = _this.props.data,
|
|
67
|
+
avatarUrl = _this$props$data3.avatarUrl,
|
|
68
|
+
name = _this$props$data3.name;
|
|
69
|
+
return jsx(SizeableAvatar, {
|
|
70
|
+
appearance: "big",
|
|
71
|
+
src: avatarUrl,
|
|
72
|
+
name: name
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
_defineProperty(_assertThisInitialized(_this), "getLozengeProps", function () {
|
|
77
|
+
return typeof _this.props.data.lozenge === 'string' ? {
|
|
78
|
+
text: _this.props.data.lozenge
|
|
79
|
+
} : _this.props.data.lozenge;
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
return _this;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
_createClass(CustomOption, [{
|
|
86
|
+
key: "render",
|
|
87
|
+
value: function render() {
|
|
88
|
+
return jsx(AvatarItemOption, {
|
|
89
|
+
avatar: this.renderAvatar(),
|
|
90
|
+
isDisabled: this.props.data.isDisabled,
|
|
91
|
+
lozenge: this.getLozengeProps(),
|
|
92
|
+
primaryText: this.getPrimaryText(),
|
|
93
|
+
secondaryText: this.renderByline()
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}]);
|
|
97
|
+
|
|
98
|
+
return CustomOption;
|
|
99
|
+
}(React.PureComponent);
|
|
@@ -18,7 +18,7 @@ import { N20, B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
|
18
18
|
import { token } from '@atlaskit/tokens';
|
|
19
19
|
import PeopleIcon from '@atlaskit/icon/glyph/people';
|
|
20
20
|
import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
|
|
21
|
-
import { messages } from '
|
|
21
|
+
import { messages } from '../i18n';
|
|
22
22
|
import { HighlightText } from '../HighlightText';
|
|
23
23
|
export var groupOptionIconWrapper = css({
|
|
24
24
|
padding: '2px',
|
|
@@ -118,8 +118,8 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
|
|
|
118
118
|
nextLabel = _nextProps$data.label,
|
|
119
119
|
nextData = _nextProps$data.data,
|
|
120
120
|
nextInnerProps = nextProps.innerProps,
|
|
121
|
-
nextIsFocused = nextProps.isFocused; // We can ignore onRemove here because it is
|
|
122
|
-
// that will recreated every time but with the same implementation.
|
|
121
|
+
nextIsFocused = nextProps.isFocused; // We can ignore onRemove here because it is an anonymous function
|
|
122
|
+
// that will be recreated every time but with the same implementation.
|
|
123
123
|
|
|
124
124
|
return data !== nextData || label !== nextLabel || innerProps !== nextInnerProps || isFocused !== nextIsFocused;
|
|
125
125
|
}
|
|
@@ -5,7 +5,8 @@ import AsyncExternalOption from './ExternalUserOption';
|
|
|
5
5
|
import AsyncTeamOption from './TeamOption';
|
|
6
6
|
import AsyncGroupOption from './GroupOption';
|
|
7
7
|
import AsyncEmailOption from './EmailOption';
|
|
8
|
-
import
|
|
8
|
+
import AsyncCustomOption from './CustomOption';
|
|
9
|
+
import { isCustom, isEmail, isTeam, isUser, isGroup, isExternalUser } from './utils';
|
|
9
10
|
import { isValidEmail } from './emailValidation';
|
|
10
11
|
|
|
11
12
|
var defaultOption = function defaultOption(_ref) {
|
|
@@ -64,6 +65,13 @@ var dataOption = function dataOption(_ref2) {
|
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
if (isCustom(data)) {
|
|
69
|
+
return /*#__PURE__*/React.createElement(AsyncCustomOption, {
|
|
70
|
+
data: data,
|
|
71
|
+
isSelected: isSelected
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
67
75
|
return null;
|
|
68
76
|
};
|
|
69
77
|
|
|
@@ -17,10 +17,10 @@ import { token } from '@atlaskit/tokens';
|
|
|
17
17
|
import { jsx } from '@emotion/core';
|
|
18
18
|
import React from 'react';
|
|
19
19
|
import { FormattedMessage } from 'react-intl-next';
|
|
20
|
-
import { AvatarItemOption, textWrapper } from '
|
|
21
|
-
import { HighlightText } from '
|
|
22
|
-
import { messages } from '
|
|
23
|
-
import { SizeableAvatar } from '
|
|
20
|
+
import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
|
|
21
|
+
import { HighlightText } from '../HighlightText';
|
|
22
|
+
import { messages } from '../i18n';
|
|
23
|
+
import { SizeableAvatar } from '../SizeableAvatar';
|
|
24
24
|
export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
25
25
|
_inherits(TeamOption, _React$PureComponent);
|
|
26
26
|
|
|
@@ -24,7 +24,7 @@ import { getComponents } from './components';
|
|
|
24
24
|
import { getCreatableProps } from './creatable';
|
|
25
25
|
import { getCreatableSuggestedEmailProps } from './creatableEmailSuggestion';
|
|
26
26
|
import MessagesIntlProvider from './MessagesIntlProvider';
|
|
27
|
-
import { ExusUserSourceProvider } from '
|
|
27
|
+
import { ExusUserSourceProvider } from '../clients/UserSourceProvider';
|
|
28
28
|
import { userPickerRenderedUfoExperience as experience, UfoErrorBoundary } from '../util/ufoExperiences';
|
|
29
29
|
import { v4 as uuidv4 } from 'uuid';
|
|
30
30
|
export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
|
|
8
8
|
import memoizeOne from 'memoize-one';
|
|
9
|
-
import { EmailType, TeamType, GroupType, UserType } from '../types';
|
|
9
|
+
import { CustomType, EmailType, TeamType, GroupType, UserType } from '../types';
|
|
10
10
|
import { PopupSelect } from '@atlaskit/select';
|
|
11
11
|
export var isExternalUser = function isExternalUser(option) {
|
|
12
12
|
return isUser(option) && Boolean(option.isExternal);
|
|
@@ -23,6 +23,9 @@ export var isGroup = function isGroup(option) {
|
|
|
23
23
|
export var isEmail = function isEmail(option) {
|
|
24
24
|
return option.type === EmailType;
|
|
25
25
|
};
|
|
26
|
+
export var isCustom = function isCustom(option) {
|
|
27
|
+
return option.type === CustomType;
|
|
28
|
+
};
|
|
26
29
|
export var isDefaultValuePopulated = function isDefaultValuePopulated(value) {
|
|
27
30
|
return value && !Array.isArray(value) || Array.isArray(value) && value.length > 0;
|
|
28
31
|
};
|
|
@@ -109,7 +112,7 @@ export var callCallback = function callCallback(callback) {
|
|
|
109
112
|
}
|
|
110
113
|
};
|
|
111
114
|
export var getAvatarUrl = function getAvatarUrl(optionData) {
|
|
112
|
-
if (isUser(optionData) || isTeam(optionData)) {
|
|
115
|
+
if (isUser(optionData) || isTeam(optionData) || isCustom(optionData)) {
|
|
113
116
|
return optionData.avatarUrl;
|
|
114
117
|
}
|
|
115
118
|
|
package/dist/esm/index.js
CHANGED
|
@@ -3,4 +3,4 @@ export { UserPicker as default } from './components/UserPicker';
|
|
|
3
3
|
export { PopupUserPicker } from './components/PopupUserPicker';
|
|
4
4
|
export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
|
|
5
5
|
export { // Constants
|
|
6
|
-
EmailType, GroupType, TeamType, UserType } from './types';
|
|
6
|
+
CustomType, EmailType, GroupType, TeamType, UserType } from './types';
|
package/dist/esm/types.js
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -51,7 +51,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
51
51
|
private getAppearance;
|
|
52
52
|
render(): JSX.Element;
|
|
53
53
|
}
|
|
54
|
-
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "
|
|
54
|
+
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive" | "SelectComponent" | "pickerProps"> & Partial<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "subtle" | "noBorder">> & Partial<Pick<{
|
|
55
55
|
isMulti: boolean;
|
|
56
56
|
subtle: boolean;
|
|
57
57
|
noBorder: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Custom } from '../../types';
|
|
3
|
+
export declare type CustomOptionProps = {
|
|
4
|
+
data: Custom;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare class CustomOption extends React.PureComponent<CustomOptionProps> {
|
|
8
|
+
private getPrimaryText;
|
|
9
|
+
private getBylineComponent;
|
|
10
|
+
private renderByline;
|
|
11
|
+
private renderAvatar;
|
|
12
|
+
private getLozengeProps;
|
|
13
|
+
render(): JSX.Element;
|
|
14
|
+
}
|
|
@@ -27,7 +27,7 @@ export declare class PopupUserPickerWithoutAnalytics extends React.Component<Pop
|
|
|
27
27
|
};
|
|
28
28
|
render(): JSX.Element;
|
|
29
29
|
}
|
|
30
|
-
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "
|
|
30
|
+
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "isDisabled" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive" | "popupTitle"> & Partial<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "offset" | "isMulti" | "width" | "rootBoundary" | "boundariesElement" | "placement" | "shouldFlip">> & Partial<Pick<{
|
|
31
31
|
boundariesElement: string;
|
|
32
32
|
width: number;
|
|
33
33
|
isMulti: boolean;
|
|
@@ -10,7 +10,7 @@ export declare class UserPickerWithoutAnalytics extends React.Component<UserPick
|
|
|
10
10
|
componentDidMount(): void;
|
|
11
11
|
render(): JSX.Element;
|
|
12
12
|
}
|
|
13
|
-
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "
|
|
13
|
+
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive"> & Partial<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isMulti" | "width">> & Partial<Pick<{
|
|
14
14
|
width: number;
|
|
15
15
|
isMulti: boolean;
|
|
16
16
|
}, never>> & React.RefAttributes<any>>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ReactChild, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { AtlaskitSelectValue, ExternalUser, Email, Option, OptionData, Promisable, Team, Group, User, OptionIdentifier, DefaultValue, LozengeProps } from '../types';
|
|
2
|
+
import { AtlaskitSelectValue, ExternalUser, Custom, Email, Option, OptionData, Promisable, Team, Group, User, OptionIdentifier, DefaultValue, LozengeProps } from '../types';
|
|
3
3
|
export declare const isExternalUser: (option: OptionData) => option is ExternalUser;
|
|
4
4
|
export declare const isUser: (option: OptionData) => option is User;
|
|
5
5
|
export declare const isTeam: (option: OptionData) => option is Team;
|
|
6
6
|
export declare const isGroup: (option: OptionData) => option is Group;
|
|
7
7
|
export declare const isEmail: (option: OptionData) => option is Email;
|
|
8
|
+
export declare const isCustom: (option: OptionData) => option is Custom;
|
|
8
9
|
export declare const isDefaultValuePopulated: (value?: DefaultValue) => boolean;
|
|
9
10
|
export declare const optionToSelectableOption: (option: OptionData | OptionIdentifier) => Option;
|
|
10
11
|
export declare const extractOptionValue: (value: AtlaskitSelectValue) => OptionData | OptionData[] | undefined;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export type { EmailValidationResponse, EmailValidator, } from './components/emai
|
|
|
3
3
|
export { UserPicker as default } from './components/UserPicker';
|
|
4
4
|
export { PopupUserPicker } from './components/PopupUserPicker';
|
|
5
5
|
export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
|
|
6
|
-
export { EmailType, GroupType, TeamType, UserType, } from './types';
|
|
7
|
-
export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamMember, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
|
|
6
|
+
export { CustomType, EmailType, GroupType, TeamType, UserType, } from './types';
|
|
7
|
+
export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Custom, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamMember, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -197,6 +197,9 @@ export interface TeamHighlight {
|
|
|
197
197
|
export interface GroupHighlight {
|
|
198
198
|
name: HighlightRange[];
|
|
199
199
|
}
|
|
200
|
+
export interface CustomHighlight {
|
|
201
|
+
name: HighlightRange[];
|
|
202
|
+
}
|
|
200
203
|
export interface OptionData {
|
|
201
204
|
avatarUrl?: any;
|
|
202
205
|
fixed?: boolean;
|
|
@@ -204,7 +207,7 @@ export interface OptionData {
|
|
|
204
207
|
isDisabled?: boolean;
|
|
205
208
|
lozenge?: string | LozengeProps | ReactNode;
|
|
206
209
|
name: string;
|
|
207
|
-
type?: 'user' | 'team' | 'email' | 'group';
|
|
210
|
+
type?: 'user' | 'team' | 'email' | 'group' | 'custom';
|
|
208
211
|
}
|
|
209
212
|
export declare const UserType = "user";
|
|
210
213
|
export declare type UserSource = 'google' | 'slack' | 'microsoft' | 'github' | 'jira' | 'confluence' | 'other-atlassian';
|
|
@@ -249,10 +252,18 @@ export interface Group extends OptionData {
|
|
|
249
252
|
highlight?: GroupHighlight;
|
|
250
253
|
type: 'group';
|
|
251
254
|
}
|
|
255
|
+
export interface Custom extends OptionData {
|
|
256
|
+
avatarUrl?: string;
|
|
257
|
+
byline?: string;
|
|
258
|
+
highlight?: CustomHighlight;
|
|
259
|
+
analyticsType?: string;
|
|
260
|
+
type: 'custom';
|
|
261
|
+
}
|
|
252
262
|
export declare type Value = OptionData | OptionData[] | null | undefined;
|
|
253
263
|
export declare type DefaultValue = Value | OptionIdentifier | OptionIdentifier[];
|
|
254
264
|
export declare type OptionIdentifier = Pick<OptionData, 'id' | 'type' | 'isDisabled'>;
|
|
255
265
|
export declare const EmailType = "email";
|
|
266
|
+
export declare const CustomType = "custom";
|
|
256
267
|
export interface Email extends OptionData {
|
|
257
268
|
type: 'email';
|
|
258
269
|
suggestion?: boolean;
|
|
@@ -51,7 +51,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
51
51
|
private getAppearance;
|
|
52
52
|
render(): JSX.Element;
|
|
53
53
|
}
|
|
54
|
-
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "
|
|
54
|
+
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive" | "SelectComponent" | "pickerProps"> & Partial<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "subtle" | "noBorder">> & Partial<Pick<{
|
|
55
55
|
isMulti: boolean;
|
|
56
56
|
subtle: boolean;
|
|
57
57
|
noBorder: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Custom } from '../../types';
|
|
3
|
+
export declare type CustomOptionProps = {
|
|
4
|
+
data: Custom;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare class CustomOption extends React.PureComponent<CustomOptionProps> {
|
|
8
|
+
private getPrimaryText;
|
|
9
|
+
private getBylineComponent;
|
|
10
|
+
private renderByline;
|
|
11
|
+
private renderAvatar;
|
|
12
|
+
private getLozengeProps;
|
|
13
|
+
render(): JSX.Element;
|
|
14
|
+
}
|
|
@@ -27,7 +27,7 @@ export declare class PopupUserPickerWithoutAnalytics extends React.Component<Pop
|
|
|
27
27
|
};
|
|
28
28
|
render(): JSX.Element;
|
|
29
29
|
}
|
|
30
|
-
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "
|
|
30
|
+
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "isDisabled" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive" | "popupTitle"> & Partial<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "offset" | "isMulti" | "width" | "rootBoundary" | "boundariesElement" | "placement" | "shouldFlip">> & Partial<Pick<{
|
|
31
31
|
boundariesElement: string;
|
|
32
32
|
width: number;
|
|
33
33
|
isMulti: boolean;
|
|
@@ -10,7 +10,7 @@ export declare class UserPickerWithoutAnalytics extends React.Component<UserPick
|
|
|
10
10
|
componentDidMount(): void;
|
|
11
11
|
render(): JSX.Element;
|
|
12
12
|
}
|
|
13
|
-
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "
|
|
13
|
+
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive"> & Partial<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isMulti" | "width">> & Partial<Pick<{
|
|
14
14
|
width: number;
|
|
15
15
|
isMulti: boolean;
|
|
16
16
|
}, never>> & React.RefAttributes<any>>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ReactChild, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { AtlaskitSelectValue, ExternalUser, Email, Option, OptionData, Promisable, Team, Group, User, OptionIdentifier, DefaultValue, LozengeProps } from '../types';
|
|
2
|
+
import { AtlaskitSelectValue, ExternalUser, Custom, Email, Option, OptionData, Promisable, Team, Group, User, OptionIdentifier, DefaultValue, LozengeProps } from '../types';
|
|
3
3
|
export declare const isExternalUser: (option: OptionData) => option is ExternalUser;
|
|
4
4
|
export declare const isUser: (option: OptionData) => option is User;
|
|
5
5
|
export declare const isTeam: (option: OptionData) => option is Team;
|
|
6
6
|
export declare const isGroup: (option: OptionData) => option is Group;
|
|
7
7
|
export declare const isEmail: (option: OptionData) => option is Email;
|
|
8
|
+
export declare const isCustom: (option: OptionData) => option is Custom;
|
|
8
9
|
export declare const isDefaultValuePopulated: (value?: DefaultValue) => boolean;
|
|
9
10
|
export declare const optionToSelectableOption: (option: OptionData | OptionIdentifier) => Option;
|
|
10
11
|
export declare const extractOptionValue: (value: AtlaskitSelectValue) => OptionData | OptionData[] | undefined;
|
|
@@ -3,5 +3,5 @@ export type { EmailValidationResponse, EmailValidator, } from './components/emai
|
|
|
3
3
|
export { UserPicker as default } from './components/UserPicker';
|
|
4
4
|
export { PopupUserPicker } from './components/PopupUserPicker';
|
|
5
5
|
export { isEmail, isExternalUser, isTeam, isUser } from './components/utils';
|
|
6
|
-
export { EmailType, GroupType, TeamType, UserType, } from './types';
|
|
7
|
-
export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamMember, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
|
|
6
|
+
export { CustomType, EmailType, GroupType, TeamType, UserType, } from './types';
|
|
7
|
+
export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Custom, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamMember, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
|
|
@@ -200,6 +200,9 @@ export interface TeamHighlight {
|
|
|
200
200
|
export interface GroupHighlight {
|
|
201
201
|
name: HighlightRange[];
|
|
202
202
|
}
|
|
203
|
+
export interface CustomHighlight {
|
|
204
|
+
name: HighlightRange[];
|
|
205
|
+
}
|
|
203
206
|
export interface OptionData {
|
|
204
207
|
avatarUrl?: any;
|
|
205
208
|
fixed?: boolean;
|
|
@@ -207,7 +210,7 @@ export interface OptionData {
|
|
|
207
210
|
isDisabled?: boolean;
|
|
208
211
|
lozenge?: string | LozengeProps | ReactNode;
|
|
209
212
|
name: string;
|
|
210
|
-
type?: 'user' | 'team' | 'email' | 'group';
|
|
213
|
+
type?: 'user' | 'team' | 'email' | 'group' | 'custom';
|
|
211
214
|
}
|
|
212
215
|
export declare const UserType = "user";
|
|
213
216
|
export declare type UserSource = 'google' | 'slack' | 'microsoft' | 'github' | 'jira' | 'confluence' | 'other-atlassian';
|
|
@@ -252,10 +255,18 @@ export interface Group extends OptionData {
|
|
|
252
255
|
highlight?: GroupHighlight;
|
|
253
256
|
type: 'group';
|
|
254
257
|
}
|
|
258
|
+
export interface Custom extends OptionData {
|
|
259
|
+
avatarUrl?: string;
|
|
260
|
+
byline?: string;
|
|
261
|
+
highlight?: CustomHighlight;
|
|
262
|
+
analyticsType?: string;
|
|
263
|
+
type: 'custom';
|
|
264
|
+
}
|
|
255
265
|
export declare type Value = OptionData | OptionData[] | null | undefined;
|
|
256
266
|
export declare type DefaultValue = Value | OptionIdentifier | OptionIdentifier[];
|
|
257
267
|
export declare type OptionIdentifier = Pick<OptionData, 'id' | 'type' | 'isDisabled'>;
|
|
258
268
|
export declare const EmailType = "email";
|
|
269
|
+
export declare const CustomType = "custom";
|
|
259
270
|
export interface Email extends OptionData {
|
|
260
271
|
type: 'email';
|
|
261
272
|
suggestion?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
">=4.0 <4.5": {
|
|
17
17
|
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
18
|
+
"dist/types-ts4.0/*",
|
|
19
|
+
"dist/types-ts4.0/index.d.ts"
|
|
19
20
|
]
|
|
20
21
|
}
|
|
21
22
|
},
|
|
@@ -37,12 +38,12 @@
|
|
|
37
38
|
"@atlaskit/avatar": "^21.1.0",
|
|
38
39
|
"@atlaskit/icon": "^21.11.0",
|
|
39
40
|
"@atlaskit/logo": "^13.10.0",
|
|
40
|
-
"@atlaskit/lozenge": "^11.
|
|
41
|
+
"@atlaskit/lozenge": "^11.3.0",
|
|
41
42
|
"@atlaskit/popper": "^5.0.0",
|
|
42
43
|
"@atlaskit/select": "^15.7.0",
|
|
43
|
-
"@atlaskit/spinner": "^15.
|
|
44
|
+
"@atlaskit/spinner": "^15.2.0",
|
|
44
45
|
"@atlaskit/theme": "^12.2.0",
|
|
45
|
-
"@atlaskit/tokens": "^0.10.
|
|
46
|
+
"@atlaskit/tokens": "^0.10.19",
|
|
46
47
|
"@atlaskit/tooltip": "^17.6.0",
|
|
47
48
|
"@atlaskit/ufo": "^0.1.0",
|
|
48
49
|
"@babel/runtime": "^7.0.0",
|
|
@@ -58,15 +59,15 @@
|
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@atlaskit/analytics-viewer": "^0.4.0",
|
|
61
|
-
"@atlaskit/button": "^16.
|
|
62
|
+
"@atlaskit/button": "^16.4.0",
|
|
62
63
|
"@atlaskit/docs": "*",
|
|
63
64
|
"@atlaskit/elements-test-helpers": "^0.7.0",
|
|
64
65
|
"@atlaskit/modal-dialog": "^12.4.0",
|
|
65
66
|
"@atlaskit/radio": "^5.4.0",
|
|
66
|
-
"@atlaskit/range": "^
|
|
67
|
+
"@atlaskit/range": "^7.0.0",
|
|
67
68
|
"@atlaskit/section-message": "^6.3.0",
|
|
68
69
|
"@atlaskit/textfield": "^5.3.0",
|
|
69
|
-
"@atlaskit/util-data-test": "^17.
|
|
70
|
+
"@atlaskit/util-data-test": "^17.6.0",
|
|
70
71
|
"@atlaskit/visual-regression": "*",
|
|
71
72
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
72
73
|
"@emotion/styled": "^10.0.7",
|
package/report.api.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- API Report Version: 2.
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/user-picker"
|
|
4
4
|
|
|
@@ -49,6 +49,29 @@ export type AtlaskitSelectValue = Array<Option_2> | Option_2 | null | undefined;
|
|
|
49
49
|
// @public (undocumented)
|
|
50
50
|
type BoundariesElement = 'scrollParent' | 'viewport' | 'window' | HTMLElement;
|
|
51
51
|
|
|
52
|
+
// @public (undocumented)
|
|
53
|
+
export interface Custom extends OptionData {
|
|
54
|
+
// (undocumented)
|
|
55
|
+
analyticsType?: string;
|
|
56
|
+
// (undocumented)
|
|
57
|
+
avatarUrl?: string;
|
|
58
|
+
// (undocumented)
|
|
59
|
+
byline?: string;
|
|
60
|
+
// (undocumented)
|
|
61
|
+
highlight?: CustomHighlight;
|
|
62
|
+
// (undocumented)
|
|
63
|
+
type: 'custom';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// @public (undocumented)
|
|
67
|
+
interface CustomHighlight {
|
|
68
|
+
// (undocumented)
|
|
69
|
+
name: HighlightRange[];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
export const CustomType = 'custom';
|
|
74
|
+
|
|
52
75
|
// @public (undocumented)
|
|
53
76
|
export type DefaultValue = OptionIdentifier | OptionIdentifier[] | Value;
|
|
54
77
|
|
|
@@ -199,7 +222,7 @@ export interface OptionData {
|
|
|
199
222
|
// (undocumented)
|
|
200
223
|
name: string;
|
|
201
224
|
// (undocumented)
|
|
202
|
-
type?: 'email' | 'group' | 'team' | 'user';
|
|
225
|
+
type?: 'custom' | 'email' | 'group' | 'team' | 'user';
|
|
203
226
|
}
|
|
204
227
|
|
|
205
228
|
// @public (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -29,6 +29,29 @@ export type AtlaskitSelectValue = Array<Option_2> | Option_2 | null | undefined;
|
|
|
29
29
|
// @public (undocumented)
|
|
30
30
|
type BoundariesElement = 'scrollParent' | 'viewport' | 'window' | HTMLElement;
|
|
31
31
|
|
|
32
|
+
// @public (undocumented)
|
|
33
|
+
export interface Custom extends OptionData {
|
|
34
|
+
// (undocumented)
|
|
35
|
+
analyticsType?: string;
|
|
36
|
+
// (undocumented)
|
|
37
|
+
avatarUrl?: string;
|
|
38
|
+
// (undocumented)
|
|
39
|
+
byline?: string;
|
|
40
|
+
// (undocumented)
|
|
41
|
+
highlight?: CustomHighlight;
|
|
42
|
+
// (undocumented)
|
|
43
|
+
type: 'custom';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// @public (undocumented)
|
|
47
|
+
interface CustomHighlight {
|
|
48
|
+
// (undocumented)
|
|
49
|
+
name: HighlightRange[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// @public (undocumented)
|
|
53
|
+
export const CustomType = "custom";
|
|
54
|
+
|
|
32
55
|
// @public (undocumented)
|
|
33
56
|
export type DefaultValue = OptionIdentifier | OptionIdentifier[] | Value;
|
|
34
57
|
|
|
@@ -165,7 +188,7 @@ export interface OptionData {
|
|
|
165
188
|
// (undocumented)
|
|
166
189
|
name: string;
|
|
167
190
|
// (undocumented)
|
|
168
|
-
type?: 'email' | 'group' | 'team' | 'user';
|
|
191
|
+
type?: 'custom' | 'email' | 'group' | 'team' | 'user';
|
|
169
192
|
}
|
|
170
193
|
|
|
171
194
|
// @public (undocumented)
|