@atlaskit/profilecard 18.2.2 → 18.2.4
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/client/CachingClient.js +8 -22
- package/dist/cjs/client/ProfileCardClient.js +0 -18
- package/dist/cjs/client/TeamCentralCardClient.js +2 -55
- package/dist/cjs/client/TeamProfileCardClient.js +0 -36
- package/dist/cjs/client/UserProfileCardClient.js +1 -46
- package/dist/cjs/client/errorUtils.js +4 -6
- package/dist/cjs/client/getTeamFromAGG.js +0 -23
- package/dist/cjs/client/graphqlUtils.js +1 -7
- package/dist/cjs/client/index.js +0 -9
- package/dist/cjs/components/Error/ErrorBoundary.js +0 -14
- package/dist/cjs/components/Error/ErrorIllustration.js +1 -4
- package/dist/cjs/components/Error/ErrorMessage.js +1 -15
- package/dist/cjs/components/Error/index.js +0 -4
- package/dist/cjs/components/Icon/IconLabel.js +2 -23
- package/dist/cjs/components/Icon/index.js +0 -2
- package/dist/cjs/components/Team/TeamLoadingState.js +0 -10
- package/dist/cjs/components/Team/TeamProfileCard.js +29 -87
- package/dist/cjs/components/Team/TeamProfileCardTrigger.js +19 -85
- package/dist/cjs/components/Team/index.js +0 -4
- package/dist/cjs/components/Team/lazyTeamProfileCard.js +0 -6
- package/dist/cjs/components/User/OverflowProfileCardButtons.js +7 -30
- package/dist/cjs/components/User/ProfileCard.js +11 -57
- package/dist/cjs/components/User/ProfileCardDetails.js +11 -40
- package/dist/cjs/components/User/ProfileCardResourced.js +15 -61
- package/dist/cjs/components/User/ProfileCardTrigger.js +8 -63
- package/dist/cjs/components/User/ReportingLinesDetails.js +7 -23
- package/dist/cjs/components/User/UserLoadingState.js +0 -10
- package/dist/cjs/components/User/index.js +0 -5
- package/dist/cjs/components/User/lazyProfileCard.js +0 -6
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -31
- package/dist/cjs/i18n/is.js +0 -1
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/languages.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ro.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/index.js +0 -15
- package/dist/cjs/internal/filterActions.js +0 -3
- package/dist/cjs/internal/relative-date.js +0 -15
- package/dist/cjs/messages.js +0 -2
- package/dist/cjs/mocks/index.js +0 -5
- package/dist/cjs/mocks/mock-profile-client.js +0 -34
- package/dist/cjs/mocks/mock-team-client.js +0 -16
- package/dist/cjs/mocks/profile-data.js +0 -5
- package/dist/cjs/mocks/reporting-lines-data.js +0 -4
- package/dist/cjs/mocks/simple-mock-clients.js +0 -28
- package/dist/cjs/mocks/team-data.js +7 -12
- package/dist/cjs/mocks/util.js +0 -7
- package/dist/cjs/styled/Card.js +0 -53
- package/dist/cjs/styled/Error.js +0 -18
- package/dist/cjs/styled/ReportingLines.js +0 -16
- package/dist/cjs/styled/TeamCard.js +3 -35
- package/dist/cjs/styled/constants.js +0 -2
- package/dist/cjs/util/analytics.js +1 -36
- package/dist/cjs/util/click.js +0 -2
- package/dist/cjs/util/performance.js +0 -5
- package/dist/cjs/util/withOuterListeners.js +0 -24
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/client/CachingClient.js +10 -17
- package/dist/es2019/client/ProfileCardClient.js +2 -16
- package/dist/es2019/client/TeamCentralCardClient.js +2 -34
- package/dist/es2019/client/TeamProfileCardClient.js +0 -16
- package/dist/es2019/client/UserProfileCardClient.js +4 -18
- package/dist/es2019/client/errorUtils.js +4 -5
- package/dist/es2019/client/getTeamFromAGG.js +2 -2
- package/dist/es2019/client/graphqlUtils.js +1 -6
- package/dist/es2019/components/Error/ErrorBoundary.js +0 -2
- package/dist/es2019/components/Error/ErrorMessage.js +0 -5
- package/dist/es2019/components/Icon/IconLabel.js +2 -4
- package/dist/es2019/components/Team/TeamProfileCard.js +5 -29
- package/dist/es2019/components/Team/TeamProfileCardTrigger.js +2 -54
- package/dist/es2019/components/Team/lazyTeamProfileCard.js +1 -2
- package/dist/es2019/components/User/OverflowProfileCardButtons.js +0 -1
- package/dist/es2019/components/User/ProfileCard.js +0 -16
- package/dist/es2019/components/User/ProfileCardDetails.js +0 -12
- package/dist/es2019/components/User/ProfileCardResourced.js +0 -25
- package/dist/es2019/components/User/ProfileCardTrigger.js +2 -40
- package/dist/es2019/components/User/ReportingLinesDetails.js +0 -7
- package/dist/es2019/components/User/UserLoadingState.js +0 -2
- package/dist/es2019/components/User/lazyProfileCard.js +1 -2
- package/dist/es2019/index.js +6 -5
- package/dist/es2019/internal/filterActions.js +0 -2
- package/dist/es2019/internal/relative-date.js +0 -7
- package/dist/es2019/mocks/mock-profile-client.js +4 -13
- package/dist/es2019/mocks/mock-team-client.js +0 -5
- package/dist/es2019/mocks/profile-data.js +0 -1
- package/dist/es2019/mocks/simple-mock-clients.js +2 -6
- package/dist/es2019/mocks/team-data.js +0 -1
- package/dist/es2019/mocks/util.js +0 -1
- package/dist/es2019/styled/Card.js +0 -2
- package/dist/es2019/styled/TeamCard.js +4 -1
- package/dist/es2019/util/analytics.js +2 -10
- package/dist/es2019/util/performance.js +0 -2
- package/dist/es2019/util/withOuterListeners.js +0 -10
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/CachingClient.js +8 -20
- package/dist/esm/client/ProfileCardClient.js +0 -14
- package/dist/esm/client/TeamCentralCardClient.js +2 -48
- package/dist/esm/client/TeamProfileCardClient.js +0 -25
- package/dist/esm/client/UserProfileCardClient.js +2 -33
- package/dist/esm/client/errorUtils.js +4 -5
- package/dist/esm/client/getTeamFromAGG.js +0 -8
- package/dist/esm/client/graphqlUtils.js +1 -6
- package/dist/esm/components/Error/ErrorBoundary.js +0 -8
- package/dist/esm/components/Error/ErrorMessage.js +1 -6
- package/dist/esm/components/Icon/IconLabel.js +2 -13
- package/dist/esm/components/Team/TeamProfileCard.js +29 -61
- package/dist/esm/components/Team/TeamProfileCardTrigger.js +19 -83
- package/dist/esm/components/Team/lazyTeamProfileCard.js +1 -2
- package/dist/esm/components/User/OverflowProfileCardButtons.js +7 -12
- package/dist/esm/components/User/ProfileCard.js +11 -31
- package/dist/esm/components/User/ProfileCardDetails.js +11 -26
- package/dist/esm/components/User/ProfileCardResourced.js +15 -48
- package/dist/esm/components/User/ProfileCardTrigger.js +8 -57
- package/dist/esm/components/User/ReportingLinesDetails.js +7 -14
- package/dist/esm/components/User/UserLoadingState.js +0 -2
- package/dist/esm/components/User/lazyProfileCard.js +1 -2
- package/dist/esm/index.js +6 -5
- package/dist/esm/internal/filterActions.js +0 -2
- package/dist/esm/internal/relative-date.js +0 -8
- package/dist/esm/mocks/mock-profile-client.js +0 -28
- package/dist/esm/mocks/mock-team-client.js +0 -11
- package/dist/esm/mocks/profile-data.js +0 -1
- package/dist/esm/mocks/simple-mock-clients.js +0 -20
- package/dist/esm/mocks/team-data.js +7 -8
- package/dist/esm/mocks/util.js +0 -1
- package/dist/esm/styled/Card.js +0 -4
- package/dist/esm/styled/Error.js +0 -2
- package/dist/esm/styled/ReportingLines.js +0 -2
- package/dist/esm/styled/TeamCard.js +4 -3
- package/dist/esm/util/analytics.js +2 -13
- package/dist/esm/util/performance.js +0 -2
- package/dist/esm/util/withOuterListeners.js +0 -17
- package/dist/esm/version.json +1 -1
- package/package.json +8 -4
package/dist/cjs/styled/Card.js
CHANGED
|
@@ -1,113 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.SpinnerContainer = exports.ProfileImage = exports.OverflowActionButtonsWrapper = exports.LozengeWrapper = exports.KudosBlobAnimationStyle = exports.KudosBlobAnimation = exports.JobTitleLabel = exports.FullNameLabel = exports.DisabledInfo = exports.DetailsLabelText = exports.DetailsLabelIcon = exports.DetailsLabel = exports.DetailsGroup = exports.CustomLozengeContainer = exports.CardWrapper = exports.CardContent = exports.CardContainerEmpty = exports.CardContainer = exports.AppTitleLabel = exports.AnimatedKudosButton = exports.ActionsFlexSpacer = exports.ActionButtonGroup = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
11
|
var _react2 = require("@emotion/react");
|
|
17
|
-
|
|
18
12
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
19
|
-
|
|
20
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
|
-
|
|
22
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
23
|
-
|
|
24
15
|
var _constants2 = require("./constants");
|
|
25
|
-
|
|
26
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22;
|
|
27
|
-
|
|
28
17
|
var getFullNameMargin = function getFullNameMargin(props) {
|
|
29
18
|
return props.noMeta ? "".concat((0, _constants.gridSize)() * 4.5, "px 0 ").concat((0, _constants.gridSize)() * 1.5, "px 0") : "".concat((0, _constants.gridSize)() * 1.5, "px 0 0 0");
|
|
30
19
|
};
|
|
31
|
-
|
|
32
20
|
var CardContainerEmpty = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)([""])));
|
|
33
|
-
|
|
34
21
|
exports.CardContainerEmpty = CardContainerEmpty;
|
|
35
|
-
|
|
36
22
|
var CardWrapper = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n width: ", "px;\n"])), _constants2.bgColor, _constants.borderRadius, (0, _constants.gridSize)() * 45);
|
|
37
|
-
|
|
38
23
|
exports.CardWrapper = CardWrapper;
|
|
39
|
-
|
|
40
24
|
var ProfileImage = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n"])), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 3);
|
|
41
|
-
|
|
42
25
|
exports.ProfileImage = ProfileImage;
|
|
43
|
-
|
|
44
26
|
var ActionsFlexSpacer = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1 0 auto;\n"])));
|
|
45
|
-
|
|
46
27
|
exports.ActionsFlexSpacer = ActionsFlexSpacer;
|
|
47
28
|
var kudosButtonAnimationTransformation = (0, _react2.keyframes)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["{\n 0% { transform: translate(-80px, -50px); }\n 100% { transform: translate(90px, -70px); }\n}"])));
|
|
48
|
-
|
|
49
29
|
var KudosBlobAnimationStyle = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: none;\n height: 150px;\n width: 150px;\n z-index: -1;\n position: absolute;\n animation-name: ", ";\n animation-iteration-count: 1;\n animation-duration: 3s;\n background-image: radial-gradient(\n circle,\n ", " 0%,\n ", " 25%,\n transparent 50%\n );\n overflow: hidden;\n"])), kudosButtonAnimationTransformation, "var(--ds-background-information-pressed, #85B8FF)", "var(--ds-background-discovery-pressed, #B8ACF6)");
|
|
50
|
-
|
|
51
30
|
exports.KudosBlobAnimationStyle = KudosBlobAnimationStyle;
|
|
52
|
-
|
|
53
31
|
var KudosBlobAnimation = function KudosBlobAnimation(props) {
|
|
54
32
|
return /*#__PURE__*/_react.default.createElement(KudosBlobAnimationStyle, (0, _extends2.default)({
|
|
55
33
|
className: "kudos-blob-animation"
|
|
56
34
|
}, props));
|
|
57
35
|
};
|
|
58
|
-
|
|
59
36
|
exports.KudosBlobAnimation = KudosBlobAnimation;
|
|
60
|
-
|
|
61
37
|
var AnimatedKudosButton = _styled.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", "px;\n\n /* Need babel-plugin-emotion to use component selector */\n /* Previously with styled-components: &:hover {KudosBlobAnimation} { */\n &:hover .kudos-blob-animation {\n display: block;\n }\n\n button,\n a {\n clip-path: inset(0px 0px 0px 0px round ", "px);\n }\n overflow: hidden;\n"])), _constants.gridSize, _constants.borderRadius);
|
|
62
|
-
|
|
63
38
|
exports.AnimatedKudosButton = AnimatedKudosButton;
|
|
64
|
-
|
|
65
39
|
var ActionButtonGroup = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n user-select: none;\n margin: ", "px 0 0 0;\n text-align: right;\n display: flex;\n justify-content: flex-end;\n\n button,\n a,\n span {\n margin-left: ", "px;\n\n &:first-child {\n margin-left: 0;\n }\n }\n"])), 2 * (0, _constants.gridSize)(), _constants.gridSize);
|
|
66
|
-
|
|
67
40
|
exports.ActionButtonGroup = ActionButtonGroup;
|
|
68
|
-
|
|
69
41
|
var OverflowActionButtonsWrapper = _styled.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n width: 32px;\n height: 32px;\n margin-left: ", "px;\n"])), _constants.gridSize);
|
|
70
|
-
|
|
71
42
|
exports.OverflowActionButtonsWrapper = OverflowActionButtonsWrapper;
|
|
72
|
-
|
|
73
43
|
var CardContent = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n min-height: ", "px;\n"])), (0, _constants.gridSize)() * 17);
|
|
74
|
-
|
|
75
44
|
exports.CardContent = CardContent;
|
|
76
|
-
|
|
77
45
|
var DetailsGroup = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n width: ", "px;\n"])), (0, _constants.gridSize)() * 14.5, (0, _constants.gridSize)() * 24.5);
|
|
78
|
-
|
|
79
46
|
exports.DetailsGroup = DetailsGroup;
|
|
80
|
-
|
|
81
47
|
var DisabledInfo = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n color: ", ";\n margin: ", "px 0 0 0;\n line-height: ", "px;\n"])), _constants.fontSizeSmall, _constants2.labelTextColor, (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)() * 2);
|
|
82
|
-
|
|
83
48
|
exports.DisabledInfo = DisabledInfo;
|
|
84
|
-
|
|
85
49
|
var FullNameLabel = _styled.default.span(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 18px;\n color: ", ";\n margin: ", ";\n line-height: ", "em;\n"])), function (props) {
|
|
86
50
|
return props.isDisabledAccount ? _constants2.headerTextColorInactive : _constants2.headerTextColor;
|
|
87
51
|
}, function (props) {
|
|
88
52
|
return getFullNameMargin(props);
|
|
89
53
|
}, 24 / 18);
|
|
90
|
-
|
|
91
54
|
exports.FullNameLabel = FullNameLabel;
|
|
92
|
-
|
|
93
55
|
var LozengeWrapper = _styled.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n text-transform: uppercase;\n display: block;\n"])), (0, _constants.gridSize)() * 2);
|
|
94
|
-
|
|
95
56
|
exports.LozengeWrapper = LozengeWrapper;
|
|
96
57
|
var CustomLozengeContainer = (0, _styled.default)(LozengeWrapper)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: ", "px;\n > * {\n margin-top: ", "px;\n &:not(:last-child) {\n margin-right: ", "px;\n }\n }\n"])), (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)() / 2, (0, _constants.gridSize)() / 2);
|
|
97
58
|
exports.CustomLozengeContainer = CustomLozengeContainer;
|
|
98
|
-
|
|
99
59
|
var JobTitleLabel = _styled.default.span(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 14px;\n color: ", ";\n margin: 0 0 ", "px 0;\n line-height: ", "em;\n"])), _constants2.headerTextColor, (0, _constants.gridSize)() * 1.5, 24 / 14);
|
|
100
|
-
|
|
101
60
|
exports.JobTitleLabel = JobTitleLabel;
|
|
102
|
-
|
|
103
61
|
var AppTitleLabel = _styled.default.span(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n color: ", ";\n border-radius: ", ";\n padding: 0 6px;\n width: fit-content;\n font-weight: bold;\n text-transform: uppercase;\n\n font-size: 12px;\n margin: 4px 0 ", "px 0;\n line-height: ", "em;\n"])), _constants2.appLabelBgColor, _constants2.appLabelTextColor, (0, _constants.borderRadius)(), (0, _constants.gridSize)() * 1.5, 24 / 14);
|
|
104
|
-
|
|
105
62
|
exports.AppTitleLabel = AppTitleLabel;
|
|
106
|
-
|
|
107
63
|
var SpinnerContainer = _styled.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n height: ", "px;\n justify-content: center;\n position: relative;\n"])), (0, _constants.gridSize)() * 12);
|
|
108
|
-
|
|
109
64
|
exports.SpinnerContainer = SpinnerContainer;
|
|
110
|
-
|
|
111
65
|
var CardContainer = _styled.default.div(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-image: linear-gradient(\n to bottom,\n ", "\n 0%,\n ", "\n 100%\n );\n background-repeat: no-repeat;\n background-size: 100% ", "px;\n box-sizing: content-box;\n padding: ", "px;\n box-shadow: ", ";\n border-radius: ", ";\n\n overflow: hidden;\n"])), function (props) {
|
|
112
66
|
return props.isDisabledUser ? _constants2.headerBgColorDisabledUser : _constants2.headerBgColor;
|
|
113
67
|
}, function (props) {
|
|
@@ -117,17 +71,10 @@ var CardContainer = _styled.default.div(_templateObject19 || (_templateObject19
|
|
|
117
71
|
}, function (props) {
|
|
118
72
|
return props.withoutElevation ? '' : "".concat((0, _constants.borderRadius)(), "px");
|
|
119
73
|
});
|
|
120
|
-
|
|
121
74
|
exports.CardContainer = CardContainer;
|
|
122
|
-
|
|
123
75
|
var DetailsLabel = _styled.default.div(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n line-height: ", "px;\n font-size: ", "px;\n margin: ", "px 0 0 0;\n white-space: nowrap;\n\n & + & {\n margin-top: ", "px;\n }\n"])), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() / 4);
|
|
124
|
-
|
|
125
76
|
exports.DetailsLabel = DetailsLabel;
|
|
126
|
-
|
|
127
77
|
var DetailsLabelIcon = _styled.default.div(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-shrink: 0;\n color: ", ";\n width: ", "px;\n height: ", "px;\n padding: ", "px;\n vertical-align: top;\n\n svg {\n width: 100%;\n height: 100%;\n }\n"])), _constants2.labelIconColor, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() / 2);
|
|
128
|
-
|
|
129
78
|
exports.DetailsLabelIcon = DetailsLabelIcon;
|
|
130
|
-
|
|
131
79
|
var DetailsLabelText = _styled.default.span(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n padding-left: ", "px;\n"])), _constants2.labelTextColor, (0, _constants.gridSize)() / 2);
|
|
132
|
-
|
|
133
80
|
exports.DetailsLabelText = DetailsLabelText;
|
package/dist/cjs/styled/Error.js
CHANGED
|
@@ -1,42 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.TeamErrorTitle = exports.TeamErrorText = exports.ErrorWrapper = exports.ErrorTitle = exports.ErrorText = void 0;
|
|
9
|
-
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
|
-
|
|
14
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
|
-
|
|
16
11
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
|
-
|
|
18
12
|
var _typography = require("@atlaskit/theme/typography");
|
|
19
|
-
|
|
20
13
|
var _constants2 = require("./constants");
|
|
21
|
-
|
|
22
14
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
23
|
-
|
|
24
15
|
var ErrorWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n text-align: center;\n padding: ", "px;\n color: ", ";\n"])), (0, _constants.gridSize)() * 3, _constants2.errorIconColor);
|
|
25
|
-
|
|
26
16
|
exports.ErrorWrapper = ErrorWrapper;
|
|
27
|
-
|
|
28
17
|
var ErrorTitle = _styled.default.p(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n line-height: ", "px;\n margin: ", "px 0;\n"])), _constants2.errorTitleColor, (0, _constants.gridSize)() * 3, _constants.gridSize);
|
|
29
|
-
|
|
30
18
|
exports.ErrorTitle = ErrorTitle;
|
|
31
|
-
|
|
32
19
|
var ErrorText = _styled.default.span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _constants2.errorTextColor);
|
|
33
|
-
|
|
34
20
|
exports.ErrorText = ErrorText;
|
|
35
|
-
|
|
36
21
|
var TeamErrorTitle = _styled.default.p(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n"])), _typography.h400);
|
|
37
|
-
|
|
38
22
|
exports.TeamErrorTitle = TeamErrorTitle;
|
|
39
|
-
|
|
40
23
|
var TeamErrorText = _styled.default.p(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n margin-top: ", "px;\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), (0, _constants.gridSize)() * 1);
|
|
41
|
-
|
|
42
24
|
exports.TeamErrorText = TeamErrorText;
|
|
@@ -1,38 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.ReportingLinesSection = exports.ReportingLinesHeading = exports.OffsetWrapper = exports.ManagerSection = exports.ManagerName = void 0;
|
|
9
|
-
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
|
-
|
|
14
10
|
var _constants = require("@atlaskit/theme/constants");
|
|
15
|
-
|
|
16
11
|
var _constants2 = require("./constants");
|
|
17
|
-
|
|
18
12
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
19
|
-
|
|
20
13
|
var ReportingLinesSection = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n // Minor left margin to align better with existing icon fields\n margin-left: ", "px;\n margin-top: ", "px;\n"])), (0, _constants.gridSize)() / 2, (0, _constants.gridSize)());
|
|
21
|
-
|
|
22
14
|
exports.ReportingLinesSection = ReportingLinesSection;
|
|
23
|
-
|
|
24
15
|
var ReportingLinesHeading = _styled.default.h5(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: ", "px;\n font-weight: 600;\n margin-bottom: ", "px;\n"])), _constants2.appLabelTextColor, (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)());
|
|
25
|
-
|
|
26
16
|
exports.ReportingLinesHeading = ReportingLinesHeading;
|
|
27
|
-
|
|
28
17
|
var ManagerSection = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n margin: ", "px ", "px;\n"])), (0, _constants.gridSize)() / 2, (0, _constants.gridSize)() / 2);
|
|
29
|
-
|
|
30
18
|
exports.ManagerSection = ManagerSection;
|
|
31
|
-
|
|
32
19
|
var ManagerName = _styled.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n margin-left: ", "px;\n"])), (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)());
|
|
33
|
-
|
|
34
20
|
exports.ManagerName = ManagerName;
|
|
35
|
-
|
|
36
21
|
var OffsetWrapper = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n // Offset left margin so the avatar aligns with the heading\n margin-left: -", "px;\n"])), (0, _constants.gridSize)() / 2, (0, _constants.gridSize)() / 2);
|
|
37
|
-
|
|
38
22
|
exports.OffsetWrapper = OffsetWrapper;
|
|
@@ -1,84 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.WrappedButton = exports.TeamName = exports.MoreButton = exports.MemberCount = exports.LoadingWrapper = exports.DescriptionWrapper = exports.Description = exports.CardWrapper = exports.CardTriggerWrapper = exports.CardHeader = exports.CardContent = exports.AvatarSection = exports.ActionButtons = void 0;
|
|
9
|
-
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
|
-
|
|
14
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
|
-
|
|
16
11
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
|
-
|
|
18
12
|
var _typography = require("@atlaskit/theme/typography");
|
|
19
|
-
|
|
20
13
|
var _constants2 = require("./constants");
|
|
21
|
-
|
|
22
14
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
23
|
-
|
|
24
15
|
var CardTriggerWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inherit;\n"])));
|
|
25
|
-
|
|
26
16
|
exports.CardTriggerWrapper = CardTriggerWrapper;
|
|
27
|
-
|
|
28
17
|
var CardWrapper = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n width: ", "px;\n position: relative;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n"])), _constants2.bgColor, _constants.borderRadius, (0, _constants.gridSize)() * 40);
|
|
29
|
-
|
|
30
18
|
exports.CardWrapper = CardWrapper;
|
|
31
|
-
|
|
32
19
|
var CardHeader = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n box-sizing: content-box;\n height: ", "px;\n"])), function (props) {
|
|
33
20
|
return props.isLoading ? "var(--ds-background-neutral, ".concat(_colors.N20, ")") : props.image ? '' : _constants2.teamHeaderBgColor;
|
|
34
21
|
}, function (props) {
|
|
35
22
|
return props.image ? "url(".concat(props.image, ")") : '';
|
|
36
23
|
}, (0, _constants.gridSize)() * 16);
|
|
37
|
-
|
|
38
24
|
exports.CardHeader = CardHeader;
|
|
39
|
-
|
|
40
25
|
var CardContent = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n padding: ", "px;\n min-height: ", "px;\n"])), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 13);
|
|
41
|
-
|
|
42
26
|
exports.CardContent = CardContent;
|
|
43
|
-
|
|
44
27
|
var TeamName = _styled.default.h6(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n text-transform: none;\n overflow: hidden;\n max-height: 48px;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"])), _typography.h600);
|
|
45
|
-
|
|
46
28
|
exports.TeamName = TeamName;
|
|
47
|
-
|
|
48
29
|
var MemberCount = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n margin-top: ", "px;\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), (0, _constants.gridSize)() * 0.5);
|
|
49
|
-
|
|
50
30
|
exports.MemberCount = MemberCount;
|
|
51
|
-
|
|
52
31
|
var AvatarSection = _styled.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n margin-left: -2px;\n"])), (0, _constants.gridSize)() * 2);
|
|
53
|
-
|
|
54
32
|
exports.AvatarSection = AvatarSection;
|
|
55
|
-
|
|
56
33
|
var DescriptionWrapper = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n align-items: center;\n display: flex;\n"])), (0, _constants.gridSize)() * 2);
|
|
57
|
-
|
|
58
34
|
exports.DescriptionWrapper = DescriptionWrapper;
|
|
59
|
-
|
|
60
35
|
var Description = _styled.default.span(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n max-height: 60px;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n"])));
|
|
61
|
-
|
|
62
36
|
exports.Description = Description;
|
|
63
|
-
|
|
64
37
|
var ActionButtons = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n width: calc(100% + 8px);\n display: flex;\n justify-content: space-between;\n margin: ", "px -", "px 0 -", "px;\n background-color: ", ";\n"])), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 3, (0, _constants.gridSize)(), "var(--ds-surface-overlay, hsla(0, 100%, 100%, 0.2))");
|
|
65
|
-
|
|
66
38
|
exports.ActionButtons = ActionButtons;
|
|
67
|
-
|
|
68
39
|
var WrappedButton = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n flex-basis: 0;\n flex-grow: 1;\n margin-left: 8px;\n"])));
|
|
69
|
-
|
|
70
40
|
exports.WrappedButton = WrappedButton;
|
|
71
|
-
|
|
72
41
|
var MoreButton = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 8px;\n"])));
|
|
73
|
-
|
|
74
42
|
exports.MoreButton = MoreButton;
|
|
43
|
+
var LoadingWrapper = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n text-align: center;\n margin-top: ", "px;\n"])), (0, _constants.gridSize)() * 5);
|
|
75
44
|
|
|
76
|
-
|
|
45
|
+
// export const LoadingTeamName = styled.div`
|
|
77
46
|
// width: 175px;
|
|
78
47
|
// height: ${gridSize () *3)px;
|
|
79
48
|
// border-radius: ${borderRadius}px;
|
|
80
49
|
// background-color: #f4f5f7;
|
|
81
50
|
// `;
|
|
51
|
+
|
|
82
52
|
// export const LoadingMemberCount = styled.div`
|
|
83
53
|
// width: 81px;
|
|
84
54
|
// height: ${gridSize () *2)px;
|
|
@@ -86,6 +56,4 @@ var LoadingWrapper = _styled.default.div(_templateObject13 || (_templateObject13
|
|
|
86
56
|
// background-color: #f4f5f7;
|
|
87
57
|
// margin: 4px 0;
|
|
88
58
|
// `;
|
|
89
|
-
|
|
90
|
-
|
|
91
59
|
exports.LoadingWrapper = LoadingWrapper;
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.teamHeaderBgColor = exports.labelTextColor = exports.labelIconColor = exports.headerTextColorInactive = exports.headerTextColor = exports.headerBgColorDisabledUser = exports.headerBgColor = exports.errorTitleColor = exports.errorTextColor = exports.errorIconColor = exports.bgColor = exports.appLabelTextColor = exports.appLabelBgColor = void 0;
|
|
7
|
-
|
|
8
7
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
-
|
|
10
8
|
var bgColor = "var(--ds-surface-overlay, ".concat(_colors.N0, ")");
|
|
11
9
|
exports.bgColor = bgColor;
|
|
12
10
|
var headerBgColor = "var(--ds-background-brand-bold, ".concat(_colors.B500, ")");
|
|
@@ -1,55 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.userRequestAnalytics = exports.teamRequestAnalytics = exports.teamAvatarClicked = exports.reportingLinesClicked = exports.profileCardRendered = exports.moreMembersClicked = exports.moreActionsClicked = exports.fireEvent = exports.errorRetryClicked = exports.cardTriggered = exports.actionClicked = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _performance = require("./performance");
|
|
13
|
-
|
|
14
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
|
|
16
11
|
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) { (0, _defineProperty2.default)(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; }
|
|
17
|
-
|
|
18
12
|
/** Below lines are copied from teams common analytics */
|
|
19
13
|
var ANALYTICS_CHANNEL = 'peopleTeams';
|
|
20
|
-
|
|
21
14
|
var runItLater = function runItLater(cb) {
|
|
22
15
|
var requestIdleCallback = window.requestIdleCallback;
|
|
23
|
-
|
|
24
16
|
if (typeof requestIdleCallback === 'function') {
|
|
25
17
|
return requestIdleCallback(cb);
|
|
26
18
|
}
|
|
27
|
-
|
|
28
19
|
if (typeof window.requestAnimationFrame === 'function') {
|
|
29
20
|
return window.requestAnimationFrame(cb);
|
|
30
21
|
}
|
|
31
|
-
|
|
32
22
|
return function () {
|
|
33
23
|
return setTimeout(cb);
|
|
34
24
|
};
|
|
35
25
|
};
|
|
36
|
-
|
|
37
26
|
var fireEvent = function fireEvent(createAnalyticsEvent, body) {
|
|
38
27
|
if (!createAnalyticsEvent) {
|
|
39
28
|
return;
|
|
40
29
|
}
|
|
41
|
-
|
|
42
30
|
runItLater(function () {
|
|
43
31
|
createAnalyticsEvent(body).fire(ANALYTICS_CHANNEL);
|
|
44
32
|
});
|
|
45
33
|
};
|
|
46
34
|
/** Above lines are copied from teams common analytics */
|
|
47
|
-
|
|
48
|
-
|
|
49
35
|
exports.fireEvent = fireEvent;
|
|
50
36
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
51
37
|
var USER_SUBJECT = 'profilecard';
|
|
52
|
-
|
|
53
38
|
var createEvent = function createEvent(eventType, action, actionSubject, actionSubjectId) {
|
|
54
39
|
var attributes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
55
40
|
return {
|
|
@@ -59,71 +44,51 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
59
44
|
actionSubjectId: actionSubjectId,
|
|
60
45
|
attributes: _objectSpread(_objectSpread({
|
|
61
46
|
packageName: "@atlaskit/profilecard",
|
|
62
|
-
packageVersion: "18.2.
|
|
47
|
+
packageVersion: "18.2.4"
|
|
63
48
|
}, attributes), {}, {
|
|
64
49
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
65
50
|
})
|
|
66
51
|
};
|
|
67
52
|
};
|
|
68
|
-
|
|
69
53
|
var cardTriggered = function cardTriggered(type, method) {
|
|
70
54
|
return createEvent('ui', 'triggered', type === 'user' ? USER_SUBJECT : TEAM_SUBJECT, undefined, {
|
|
71
55
|
method: method
|
|
72
56
|
});
|
|
73
57
|
};
|
|
74
|
-
|
|
75
58
|
exports.cardTriggered = cardTriggered;
|
|
76
|
-
|
|
77
59
|
var teamRequestAnalytics = function teamRequestAnalytics(action, attributes) {
|
|
78
60
|
return createEvent('operational', action, TEAM_SUBJECT, 'request', attributes);
|
|
79
61
|
};
|
|
80
|
-
|
|
81
62
|
exports.teamRequestAnalytics = teamRequestAnalytics;
|
|
82
|
-
|
|
83
63
|
var userRequestAnalytics = function userRequestAnalytics(action, attributes) {
|
|
84
64
|
return createEvent('operational', action, USER_SUBJECT, 'request', attributes);
|
|
85
65
|
};
|
|
86
|
-
|
|
87
66
|
exports.userRequestAnalytics = userRequestAnalytics;
|
|
88
|
-
|
|
89
67
|
var profileCardRendered = function profileCardRendered(type, actionSubjectId, attributes) {
|
|
90
68
|
return createEvent('ui', 'rendered', type === 'user' ? USER_SUBJECT : TEAM_SUBJECT, actionSubjectId, attributes);
|
|
91
69
|
};
|
|
92
|
-
|
|
93
70
|
exports.profileCardRendered = profileCardRendered;
|
|
94
|
-
|
|
95
71
|
var actionClicked = function actionClicked(type, attributes) {
|
|
96
72
|
return createEvent('ui', 'clicked', type === 'user' ? USER_SUBJECT : TEAM_SUBJECT, 'action', attributes);
|
|
97
73
|
};
|
|
98
|
-
|
|
99
74
|
exports.actionClicked = actionClicked;
|
|
100
|
-
|
|
101
75
|
var reportingLinesClicked = function reportingLinesClicked(attributes) {
|
|
102
76
|
return createEvent('ui', 'clicked', USER_SUBJECT, 'reportingLines', attributes);
|
|
103
77
|
};
|
|
104
|
-
|
|
105
78
|
exports.reportingLinesClicked = reportingLinesClicked;
|
|
106
|
-
|
|
107
79
|
var moreActionsClicked = function moreActionsClicked(type, attributes) {
|
|
108
80
|
return createEvent('ui', 'clicked', type === 'user' ? USER_SUBJECT : TEAM_SUBJECT, 'moreActions', attributes);
|
|
109
81
|
};
|
|
110
|
-
|
|
111
82
|
exports.moreActionsClicked = moreActionsClicked;
|
|
112
|
-
|
|
113
83
|
var teamAvatarClicked = function teamAvatarClicked(attributes) {
|
|
114
84
|
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'avatar', attributes);
|
|
115
85
|
};
|
|
116
|
-
|
|
117
86
|
exports.teamAvatarClicked = teamAvatarClicked;
|
|
118
|
-
|
|
119
87
|
var moreMembersClicked = function moreMembersClicked(attributes) {
|
|
120
88
|
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'moreMembers', attributes);
|
|
121
89
|
};
|
|
122
|
-
|
|
123
90
|
exports.moreMembersClicked = moreMembersClicked;
|
|
124
|
-
|
|
125
91
|
var errorRetryClicked = function errorRetryClicked(attributes) {
|
|
126
92
|
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'errorRetry', attributes);
|
|
127
93
|
};
|
|
128
|
-
|
|
129
94
|
exports.errorRetryClicked = errorRetryClicked;
|
package/dist/cjs/util/click.js
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isBasicClick = void 0;
|
|
7
|
-
|
|
8
7
|
var isBasicClick = function isBasicClick(event) {
|
|
9
8
|
return !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
10
|
exports.isBasicClick = isBasicClick;
|
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getPageTime = void 0;
|
|
7
|
-
|
|
8
7
|
var isPerformanceAvailable = function isPerformanceAvailable() {
|
|
9
8
|
return typeof window !== 'undefined' && 'performance' in window && !!performance.now;
|
|
10
9
|
};
|
|
11
|
-
|
|
12
10
|
var performanceAvailable = isPerformanceAvailable();
|
|
13
11
|
var initialPageTime = Date.now();
|
|
14
|
-
|
|
15
12
|
var getPageTime = function getPageTime() {
|
|
16
13
|
if (performanceAvailable) {
|
|
17
14
|
return performance.now();
|
|
18
15
|
}
|
|
19
|
-
|
|
20
16
|
return Date.now() - initialPageTime;
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.getPageTime = getPageTime;
|
|
@@ -1,57 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = withOuterListeners;
|
|
9
|
-
|
|
10
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
10
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
-
|
|
16
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
22
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
15
|
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
16
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
27
|
-
|
|
28
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
29
|
-
|
|
30
18
|
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; } }
|
|
31
|
-
|
|
32
19
|
function withOuterListeners(Component) {
|
|
33
20
|
return /*#__PURE__*/function (_React$PureComponent) {
|
|
34
21
|
(0, _inherits2.default)(WithOuterListeners, _React$PureComponent);
|
|
35
|
-
|
|
36
22
|
var _super = _createSuper(WithOuterListeners);
|
|
37
|
-
|
|
38
23
|
function WithOuterListeners() {
|
|
39
24
|
var _this;
|
|
40
|
-
|
|
41
25
|
(0, _classCallCheck2.default)(this, WithOuterListeners);
|
|
42
|
-
|
|
43
26
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
27
|
args[_key] = arguments[_key];
|
|
45
28
|
}
|
|
46
|
-
|
|
47
29
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
48
30
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleClick", function (evt) {
|
|
49
31
|
var handleClickOutside = _this.props.handleClickOutside;
|
|
50
|
-
|
|
51
32
|
if (handleClickOutside) {
|
|
52
33
|
var domNode = _reactDom.default.findDOMNode((0, _assertThisInitialized2.default)(_this)); // eslint-disable-line react/no-find-dom-node
|
|
53
34
|
|
|
54
|
-
|
|
55
35
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
56
36
|
handleClickOutside();
|
|
57
37
|
}
|
|
@@ -59,21 +39,18 @@ function withOuterListeners(Component) {
|
|
|
59
39
|
});
|
|
60
40
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleKeydown", function (evt) {
|
|
61
41
|
var handleEscapeKeydown = _this.props.handleEscapeKeydown;
|
|
62
|
-
|
|
63
42
|
if (handleEscapeKeydown && evt.code === 'Escape') {
|
|
64
43
|
handleEscapeKeydown();
|
|
65
44
|
}
|
|
66
45
|
});
|
|
67
46
|
return _this;
|
|
68
47
|
}
|
|
69
|
-
|
|
70
48
|
(0, _createClass2.default)(WithOuterListeners, [{
|
|
71
49
|
key: "componentDidMount",
|
|
72
50
|
value: function componentDidMount() {
|
|
73
51
|
if (this.props.handleClickOutside) {
|
|
74
52
|
document.addEventListener('click', this.handleClick, false);
|
|
75
53
|
}
|
|
76
|
-
|
|
77
54
|
if (this.props.handleEscapeKeydown) {
|
|
78
55
|
document.addEventListener('keydown', this.handleKeydown, false);
|
|
79
56
|
}
|
|
@@ -84,7 +61,6 @@ function withOuterListeners(Component) {
|
|
|
84
61
|
if (this.props.handleClickOutside) {
|
|
85
62
|
document.removeEventListener('click', this.handleClick, false);
|
|
86
63
|
}
|
|
87
|
-
|
|
88
64
|
if (this.props.handleEscapeKeydown) {
|
|
89
65
|
document.removeEventListener('keydown', this.handleKeydown, false);
|
|
90
66
|
}
|
package/dist/cjs/version.json
CHANGED
|
@@ -5,53 +5,46 @@ export default class CachingClient {
|
|
|
5
5
|
cacheSize: 10,
|
|
6
6
|
cacheMaxAge: 0
|
|
7
7
|
};
|
|
8
|
-
this.config = {
|
|
8
|
+
this.config = {
|
|
9
|
+
...defaults,
|
|
9
10
|
...config
|
|
10
|
-
};
|
|
11
|
-
|
|
11
|
+
};
|
|
12
|
+
// never set cacheSize or cacheMaxAge to negative numbers
|
|
12
13
|
this.config.cacheSize = Math.max(this.config.cacheSize || 0, 0);
|
|
13
|
-
this.config.cacheMaxAge = Math.max(this.config.cacheMaxAge || 0, 0);
|
|
14
|
-
|
|
14
|
+
this.config.cacheMaxAge = Math.max(this.config.cacheMaxAge || 0, 0);
|
|
15
|
+
// DIR-474: cap cache at 30 days.
|
|
15
16
|
if (this.config.cacheMaxAge) {
|
|
16
17
|
this.config.cacheMaxAge = Math.min(this.config.cacheMaxAge, 30 * 24 * 60 * 60 * 1000);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
}
|
|
19
|
+
// Only set cache if maxCacheAge and cacheSize are set
|
|
20
20
|
this.cache = !this.config.cacheMaxAge || !this.config.cacheSize ? null : new LRUMap(this.config.cacheSize);
|
|
21
21
|
}
|
|
22
|
-
|
|
23
22
|
setCachedProfile(cacheIdentifier, profile) {
|
|
24
23
|
this.cache && this.cache.set(cacheIdentifier, {
|
|
25
24
|
expire: Date.now() + this.config.cacheMaxAge,
|
|
26
25
|
profile
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
getCachedProfile(cacheIdentifier) {
|
|
31
29
|
if (!this.cache) {
|
|
32
30
|
return null;
|
|
33
31
|
}
|
|
34
|
-
|
|
35
32
|
const cached = this.cache.get(cacheIdentifier);
|
|
36
|
-
|
|
37
33
|
if (!cached) {
|
|
38
34
|
return null;
|
|
39
35
|
}
|
|
40
|
-
|
|
41
36
|
if (cached.expire < Date.now()) {
|
|
42
37
|
this.cache.delete(cacheIdentifier);
|
|
43
38
|
return null;
|
|
44
|
-
}
|
|
45
|
-
|
|
39
|
+
}
|
|
46
40
|
|
|
41
|
+
// Extend expiry "date"
|
|
47
42
|
this.setCachedProfile(cacheIdentifier, cached.profile);
|
|
48
43
|
return cached.profile;
|
|
49
44
|
}
|
|
50
|
-
|
|
51
45
|
flushCache() {
|
|
52
46
|
if (this.cache) {
|
|
53
47
|
this.cache.clear();
|
|
54
48
|
}
|
|
55
49
|
}
|
|
56
|
-
|
|
57
50
|
}
|