@activecollab/components 2.0.484 → 2.0.486
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/dist/cjs/components/Menu/Menu.js +5 -2
- package/dist/cjs/components/Menu/Menu.js.map +1 -1
- package/dist/cjs/presentation/reports/allReports.js +223 -0
- package/dist/cjs/presentation/reports/allReports.js.map +1 -0
- package/dist/cjs/presentation/reports/availability.js +685 -0
- package/dist/cjs/presentation/reports/availability.js.map +1 -0
- package/dist/cjs/presentation/reports/availabilityExport.js +117 -0
- package/dist/cjs/presentation/reports/availabilityExport.js.map +1 -0
- package/dist/cjs/presentation/reports/controls.js +236 -0
- package/dist/cjs/presentation/reports/controls.js.map +1 -0
- package/dist/cjs/presentation/reports/dashboards.js +434 -0
- package/dist/cjs/presentation/reports/dashboards.js.map +1 -0
- package/dist/cjs/presentation/reports/data.js +2309 -0
- package/dist/cjs/presentation/reports/data.js.map +1 -0
- package/dist/cjs/presentation/reports/payments.js +294 -0
- package/dist/cjs/presentation/reports/payments.js.map +1 -0
- package/dist/cjs/presentation/reports/uninvoiced.js +223 -0
- package/dist/cjs/presentation/reports/uninvoiced.js.map +1 -0
- package/dist/cjs/presentation/shared/PageStickyHeader.js +76 -0
- package/dist/cjs/presentation/shared/PageStickyHeader.js.map +1 -0
- package/dist/cjs/presentation/shared/PresentationShell.js +22 -14
- package/dist/cjs/presentation/shared/PresentationShell.js.map +1 -1
- package/dist/cjs/presentation/shared/UserDetailsDialog.js +18 -5
- package/dist/cjs/presentation/shared/UserDetailsDialog.js.map +1 -1
- package/dist/cjs/presentation/shared/dashboardWidgets.js +116 -71
- package/dist/cjs/presentation/shared/dashboardWidgets.js.map +1 -1
- package/dist/cjs/presentation/shared/headers.js +7 -2
- package/dist/cjs/presentation/shared/headers.js.map +1 -1
- package/dist/cjs/presentation/shared/index.js +22 -0
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/esm/components/Menu/Menu.d.ts.map +1 -1
- package/dist/esm/components/Menu/Menu.js +2 -1
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/presentation/reports/allReports.d.ts +3 -0
- package/dist/esm/presentation/reports/allReports.d.ts.map +1 -0
- package/dist/esm/presentation/reports/allReports.js +210 -0
- package/dist/esm/presentation/reports/allReports.js.map +1 -0
- package/dist/esm/presentation/reports/availability.d.ts +9 -0
- package/dist/esm/presentation/reports/availability.d.ts.map +1 -0
- package/dist/esm/presentation/reports/availability.js +532 -0
- package/dist/esm/presentation/reports/availability.js.map +1 -0
- package/dist/esm/presentation/reports/availabilityExport.d.ts +17 -0
- package/dist/esm/presentation/reports/availabilityExport.d.ts.map +1 -0
- package/dist/esm/presentation/reports/availabilityExport.js +97 -0
- package/dist/esm/presentation/reports/availabilityExport.js.map +1 -0
- package/dist/esm/presentation/reports/controls.d.ts +50 -0
- package/dist/esm/presentation/reports/controls.d.ts.map +1 -0
- package/dist/esm/presentation/reports/controls.js +205 -0
- package/dist/esm/presentation/reports/controls.js.map +1 -0
- package/dist/esm/presentation/reports/dashboards.d.ts +4 -0
- package/dist/esm/presentation/reports/dashboards.d.ts.map +1 -0
- package/dist/esm/presentation/reports/dashboards.js +390 -0
- package/dist/esm/presentation/reports/dashboards.js.map +1 -0
- package/dist/esm/presentation/reports/data.d.ts +171 -0
- package/dist/esm/presentation/reports/data.d.ts.map +1 -0
- package/dist/esm/presentation/reports/data.js +2303 -0
- package/dist/esm/presentation/reports/data.js.map +1 -0
- package/dist/esm/presentation/reports/payments.d.ts +3 -0
- package/dist/esm/presentation/reports/payments.d.ts.map +1 -0
- package/dist/esm/presentation/reports/payments.js +235 -0
- package/dist/esm/presentation/reports/payments.js.map +1 -0
- package/dist/esm/presentation/reports/uninvoiced.d.ts +3 -0
- package/dist/esm/presentation/reports/uninvoiced.d.ts.map +1 -0
- package/dist/esm/presentation/reports/uninvoiced.js +208 -0
- package/dist/esm/presentation/reports/uninvoiced.js.map +1 -0
- package/dist/esm/presentation/shared/PageStickyHeader.d.ts +10 -0
- package/dist/esm/presentation/shared/PageStickyHeader.d.ts.map +1 -0
- package/dist/esm/presentation/shared/PageStickyHeader.js +70 -0
- package/dist/esm/presentation/shared/PageStickyHeader.js.map +1 -0
- package/dist/esm/presentation/shared/PresentationShell.d.ts +2 -1
- package/dist/esm/presentation/shared/PresentationShell.d.ts.map +1 -1
- package/dist/esm/presentation/shared/PresentationShell.js +22 -14
- package/dist/esm/presentation/shared/PresentationShell.js.map +1 -1
- package/dist/esm/presentation/shared/UserDetailsDialog.d.ts +4 -1
- package/dist/esm/presentation/shared/UserDetailsDialog.d.ts.map +1 -1
- package/dist/esm/presentation/shared/UserDetailsDialog.js +18 -5
- package/dist/esm/presentation/shared/UserDetailsDialog.js.map +1 -1
- package/dist/esm/presentation/shared/dashboardWidgets.d.ts +14 -1
- package/dist/esm/presentation/shared/dashboardWidgets.d.ts.map +1 -1
- package/dist/esm/presentation/shared/dashboardWidgets.js +107 -68
- package/dist/esm/presentation/shared/dashboardWidgets.js.map +1 -1
- package/dist/esm/presentation/shared/headers.d.ts +2 -1
- package/dist/esm/presentation/shared/headers.d.ts.map +1 -1
- package/dist/esm/presentation/shared/headers.js +7 -2
- package/dist/esm/presentation/shared/headers.js.map +1 -1
- package/dist/esm/presentation/shared/index.d.ts +4 -2
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +2 -1
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -34,12 +34,15 @@ export interface UserDetailsDialogProps {
|
|
|
34
34
|
extraContactsCount?: number;
|
|
35
35
|
/** Free-form joined line, e.g. "Joined: Feb 7. 2009". */
|
|
36
36
|
joinedDate: string;
|
|
37
|
+
team?: string;
|
|
38
|
+
online?: boolean;
|
|
39
|
+
avatarSize?: number;
|
|
37
40
|
onSendMessage?: () => void;
|
|
38
41
|
onSeeFullProfile?: () => void;
|
|
39
42
|
onClose?: () => void;
|
|
40
43
|
}
|
|
41
44
|
export declare const UserDetailsDialog: {
|
|
42
|
-
({ open, avatar, name, hoursLabel, email, extraContactsCount, joinedDate, onSendMessage, onSeeFullProfile, onClose, }: UserDetailsDialogProps): ReactElement;
|
|
45
|
+
({ open, avatar, name, hoursLabel, email, extraContactsCount, joinedDate, team, online, avatarSize, onSendMessage, onSeeFullProfile, onClose, }: UserDetailsDialogProps): ReactElement;
|
|
43
46
|
displayName: string;
|
|
44
47
|
};
|
|
45
48
|
//# sourceMappingURL=UserDetailsDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserDetailsDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/UserDetailsDialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"UserDetailsDialog.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/UserDetailsDialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAiB5C;;;;;;;;;;;;;;GAcG;AAIH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,MAAM,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AA2FD,eAAO,MAAM,iBAAiB;qJAc3B,sBAAsB,GAAG,YAAY;;CAsFvC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { RoundAvatar } from "./RoundAvatar";
|
|
4
|
+
import { Badge } from "../../components/Badge";
|
|
4
5
|
import { Button } from "../../components/Button";
|
|
5
6
|
import { Chip } from "../../components/Chip";
|
|
6
7
|
import { Dialog } from "../../components/Dialog";
|
|
@@ -40,7 +41,7 @@ const StyledHeader = styled.div.withConfig({
|
|
|
40
41
|
const StyledAvatar = styled.div.withConfig({
|
|
41
42
|
displayName: "UserDetailsDialog__StyledAvatar",
|
|
42
43
|
componentId: "sc-4r9p4-1"
|
|
43
|
-
})(["flex-shrink:0;width:", "px;height:", "px;.udd-avatar-image{background-size:cover;background-position:center;color:transparent;}"], props => props.$size, props => props.$size);
|
|
44
|
+
})(["position:relative;flex-shrink:0;.udd-online{border:2px solid var(--page-paper-main);box-sizing:border-box;}width:", "px;height:", "px;.udd-avatar-image{background-size:cover;background-position:center;color:transparent;}"], props => props.$size, props => props.$size);
|
|
44
45
|
const StyledInfo = styled.div.withConfig({
|
|
45
46
|
displayName: "UserDetailsDialog__StyledInfo",
|
|
46
47
|
componentId: "sc-4r9p4-2"
|
|
@@ -61,6 +62,11 @@ export const UserDetailsDialog = _ref => {
|
|
|
61
62
|
email = _ref.email,
|
|
62
63
|
extraContactsCount = _ref.extraContactsCount,
|
|
63
64
|
joinedDate = _ref.joinedDate,
|
|
65
|
+
team = _ref.team,
|
|
66
|
+
_ref$online = _ref.online,
|
|
67
|
+
online = _ref$online === void 0 ? false : _ref$online,
|
|
68
|
+
_ref$avatarSize = _ref.avatarSize,
|
|
69
|
+
avatarSize = _ref$avatarSize === void 0 ? USER_DETAILS_AVATAR_SIZE : _ref$avatarSize,
|
|
64
70
|
onSendMessage = _ref.onSendMessage,
|
|
65
71
|
onSeeFullProfile = _ref.onSeeFullProfile,
|
|
66
72
|
onClose = _ref.onClose;
|
|
@@ -69,16 +75,21 @@ export const UserDetailsDialog = _ref => {
|
|
|
69
75
|
onClose: onClose,
|
|
70
76
|
enableBackgroundClick: true
|
|
71
77
|
}, /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(StyledHeader, null, /*#__PURE__*/React.createElement(StyledAvatar, {
|
|
72
|
-
$size:
|
|
78
|
+
$size: avatarSize
|
|
73
79
|
}, /*#__PURE__*/React.createElement(RoundAvatar, {
|
|
74
|
-
$size:
|
|
80
|
+
$size: avatarSize,
|
|
75
81
|
$bg: avatar.color,
|
|
76
82
|
$bordered: false,
|
|
77
83
|
className: avatar.imageUrl ? "udd-avatar-image" : undefined,
|
|
78
84
|
style: avatar.imageUrl ? {
|
|
79
85
|
backgroundImage: "url(" + avatar.imageUrl + ")"
|
|
80
86
|
} : undefined
|
|
81
|
-
}, avatar.imageUrl ? "" : avatar.initials)
|
|
87
|
+
}, avatar.imageUrl ? "" : avatar.initials), online ? /*#__PURE__*/React.createElement(Badge, {
|
|
88
|
+
dimension: 20,
|
|
89
|
+
position: "bottom-right",
|
|
90
|
+
backgroundColor: "var(--color-sucess-green)",
|
|
91
|
+
className: "udd-online"
|
|
92
|
+
}) : null), /*#__PURE__*/React.createElement(StyledInfo, null, /*#__PURE__*/React.createElement("div", {
|
|
82
93
|
className: "udd-name-row"
|
|
83
94
|
}, /*#__PURE__*/React.createElement(Header2, null, name), hoursLabel ? /*#__PURE__*/React.createElement("span", {
|
|
84
95
|
className: "udd-hours"
|
|
@@ -97,7 +108,9 @@ export const UserDetailsDialog = _ref => {
|
|
|
97
108
|
className: "udd-more"
|
|
98
109
|
}, "+ ", extraContactsCount, " more") : null), /*#__PURE__*/React.createElement(Caption1, {
|
|
99
110
|
color: "secondary"
|
|
100
|
-
}, joinedDate)
|
|
111
|
+
}, joinedDate), team ? /*#__PURE__*/React.createElement(Caption1, {
|
|
112
|
+
color: "secondary"
|
|
113
|
+
}, "Team: ", team) : null), /*#__PURE__*/React.createElement(IconButton, {
|
|
101
114
|
className: "udd-close",
|
|
102
115
|
variant: "text gray",
|
|
103
116
|
onClick: onClose,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserDetailsDialog.js","names":["React","styled","RoundAvatar","Button","Chip","Dialog","IconButton","CancelCrossIcon","Body2","Caption1","Header2","USER_DETAILS_AVATAR_SIZE","StyledHeader","div","withConfig","displayName","componentId","StyledAvatar","props","$size","StyledInfo","StyledActions","UserDetailsDialog","_ref","open","avatar","name","hoursLabel","email","extraContactsCount","joinedDate","onSendMessage","onSeeFullProfile","onClose","createElement","enableBackgroundClick","Content","$bg","color","$bordered","className","imageUrl","undefined","style","backgroundImage","initials","size","label","backgroundColor","variant","onClick","ContentDivider","Actions"],"sources":["../../../../src/presentation/shared/UserDetailsDialog.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { RoundAvatar } from \"./RoundAvatar\";\nimport { Button } from \"../../components/Button\";\nimport { Chip } from \"../../components/Chip\";\nimport { Dialog } from \"../../components/Dialog\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon } from \"../../components/Icons\";\nimport { Body2, Caption1, Header2 } from \"../../components/Typography\";\n\n/* ------------------------------------------------------------------ */\n/* UserDetailsDialog — a reusable person \"quick look\" dialog */\n/* ------------------------------------------------------------------ */\n\n/**\n * A small, props-driven person card shown in a centred DS `Dialog`. It is built\n * only from design-system primitives (Dialog, RoundAvatar, Chip, Button,\n * Typography, Icons) so any story can drop it in with its own data — nothing\n * about a specific person is baked in.\n *\n * The face mirrors the product's person quick-look:\n * - a large circular avatar;\n * - the name in bold, immediately followed by a small grey working-hours pill;\n * - the primary email, with a trailing \"+ N more\" overflow for extra contacts;\n * - the joined date, in secondary text;\n * - a close (X) in the top-right corner;\n * - a left-aligned footer: a filled \"Send message\" and a text \"See full\n * profile\" link.\n */\n\n/* Diameter of the header avatar. ~96px per the spec, large enough to carry an\n image or two-letter initials comfortably. */\nexport const USER_DETAILS_AVATAR_SIZE = 96;\n\nexport interface UserDetailsAvatar {\n /** Background colour behind the initials (data, stands in for a real avatar). */\n color: string;\n /** Two-letter initials, shown when there is no image. */\n initials: string;\n /** Optional avatar image; when set it replaces the initials. */\n imageUrl?: string;\n}\n\nexport interface UserDetailsDialogProps {\n open: boolean;\n avatar: UserDetailsAvatar;\n name: string;\n /** A short working-hours pill next to the name, e.g. \"40 h/w\". Omit to hide. */\n hoursLabel?: string;\n email: string;\n /** Count of extra contacts, rendered as \"+ N more\". Omit / 0 to hide. */\n extraContactsCount?: number;\n /** Free-form joined line, e.g. \"Joined: Feb 7. 2009\". */\n joinedDate: string;\n onSendMessage?: () => void;\n onSeeFullProfile?: () => void;\n onClose?: () => void;\n}\n\nconst StyledHeader = styled.div`\n position: relative;\n display: flex;\n align-items: flex-start;\n gap: 16px;\n\n .udd-close {\n position: absolute;\n top: -8px;\n right: -12px;\n }\n`;\n\n/* The avatar. A plain circle — a fixed box so it never shrinks beside the info. */\nconst StyledAvatar = styled.div<{ $size: number }>`\n flex-shrink: 0;\n width: ${(props) => props.$size}px;\n height: ${(props) => props.$size}px;\n\n .udd-avatar-image {\n background-size: cover;\n background-position: center;\n color: transparent;\n }\n`;\n\nconst StyledInfo = styled.div`\n min-width: 0;\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding-top: 4px;\n\n .udd-name-row {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n }\n\n .udd-name-row > .typography {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .udd-hours {\n flex-shrink: 0;\n }\n\n .udd-contact-row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n }\n\n .udd-email {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .udd-more {\n flex-shrink: 0;\n }\n`;\n\n/* Dialog.Actions is only padding, so the footer lays itself out: left-aligned,\n the filled action first and the text link beside it. The link is underlined to\n match the reference. */\nconst StyledActions = styled.div`\n display: flex;\n align-items: center;\n gap: 12px;\n\n .udd-profile-link {\n text-decoration: underline;\n }\n`;\n\nexport const UserDetailsDialog = ({\n open,\n avatar,\n name,\n hoursLabel,\n email,\n extraContactsCount,\n joinedDate,\n onSendMessage,\n onSeeFullProfile,\n onClose,\n}: UserDetailsDialogProps): ReactElement => (\n <Dialog open={open} onClose={onClose} enableBackgroundClick>\n <Dialog.Content>\n <StyledHeader>\n <StyledAvatar $size={USER_DETAILS_AVATAR_SIZE}>\n <RoundAvatar\n $size={USER_DETAILS_AVATAR_SIZE}\n $bg={avatar.color}\n $bordered={false}\n className={avatar.imageUrl ? \"udd-avatar-image\" : undefined}\n style={\n avatar.imageUrl\n ? { backgroundImage: `url(${avatar.imageUrl})` }\n : undefined\n }\n >\n {avatar.imageUrl ? \"\" : avatar.initials}\n </RoundAvatar>\n </StyledAvatar>\n\n <StyledInfo>\n <div className=\"udd-name-row\">\n <Header2>{name}</Header2>\n {hoursLabel ? (\n <span className=\"udd-hours\">\n <Chip\n size=\"small\"\n label={hoursLabel}\n backgroundColor=\"var(--color-theme-300)\"\n color=\"var(--color-theme-900)\"\n />\n </span>\n ) : null}\n </div>\n\n <div className=\"udd-contact-row\">\n <Body2 color=\"secondary\" className=\"udd-email\">\n {email}\n </Body2>\n {extraContactsCount ? (\n <Body2 color=\"secondary\" className=\"udd-more\">\n + {extraContactsCount} more\n </Body2>\n ) : null}\n </div>\n\n <Caption1 color=\"secondary\">{joinedDate}</Caption1>\n </StyledInfo>\n\n <IconButton\n className=\"udd-close\"\n variant=\"text gray\"\n onClick={onClose}\n aria-label=\"Close\"\n >\n <CancelCrossIcon />\n </IconButton>\n </StyledHeader>\n </Dialog.Content>\n\n <Dialog.ContentDivider />\n\n <Dialog.Actions>\n <StyledActions>\n <Button variant=\"primary\" onClick={onSendMessage}>\n Send message\n </Button>\n <Button\n variant=\"text colored\"\n className=\"udd-profile-link\"\n onClick={onSeeFullProfile}\n >\n See full profile\n </Button>\n </StyledActions>\n </Dialog.Actions>\n </Dialog>\n);\n\nUserDetailsDialog.displayName = \"UserDetailsDialog\";\n"],"mappings":"AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,6BAA6B;;AAEtE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAG,EAAE;AA2B1C,MAAMC,YAAY,GAAGX,MAAM,CAACY,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0HAW9B;;AAED;AACA,MAAMC,YAAY,GAAGhB,MAAM,CAACY,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wIAEnBE,KAAK,IAAKA,KAAK,CAACC,KAAK,EACpBD,KAAK,IAAKA,KAAK,CAACC,KAAK,CAOjC;AAED,MAAMC,UAAU,GAAGnB,MAAM,CAACY,GAAG,C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AA,CAAC7B,MAAM,CAAC+C,OAAO,qBACbpD,KAAA,CAAAkC,aAAA,CAACb,aAAa,qBACZrB,KAAA,CAAAkC,aAAA,CAAC/B,MAAM;IAAC8C,OAAO,EAAC,SAAS;IAACC,OAAO,EAAEnB;EAAc,GAAC,cAE1C,CAAC,eACT/B,KAAA,CAAAkC,aAAA,CAAC/B,MAAM;IACL8C,OAAO,EAAC,cAAc;IACtBT,SAAS,EAAC,kBAAkB;IAC5BU,OAAO,EAAElB;EAAiB,GAC3B,kBAEO,CACK,CACD,CACV,CAAC;AAAA,CACV;AAEDV,iBAAiB,CAACP,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"UserDetailsDialog.js","names":["React","styled","RoundAvatar","Badge","Button","Chip","Dialog","IconButton","CancelCrossIcon","Body2","Caption1","Header2","USER_DETAILS_AVATAR_SIZE","StyledHeader","div","withConfig","displayName","componentId","StyledAvatar","props","$size","StyledInfo","StyledActions","UserDetailsDialog","_ref","open","avatar","name","hoursLabel","email","extraContactsCount","joinedDate","team","_ref$online","online","_ref$avatarSize","avatarSize","onSendMessage","onSeeFullProfile","onClose","createElement","enableBackgroundClick","Content","$bg","color","$bordered","className","imageUrl","undefined","style","backgroundImage","initials","dimension","position","backgroundColor","size","label","variant","onClick","ContentDivider","Actions"],"sources":["../../../../src/presentation/shared/UserDetailsDialog.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { RoundAvatar } from \"./RoundAvatar\";\nimport { Badge } from \"../../components/Badge\";\nimport { Button } from \"../../components/Button\";\nimport { Chip } from \"../../components/Chip\";\nimport { Dialog } from \"../../components/Dialog\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { CancelCrossIcon } from \"../../components/Icons\";\nimport { Body2, Caption1, Header2 } from \"../../components/Typography\";\n\n/* ------------------------------------------------------------------ */\n/* UserDetailsDialog — a reusable person \"quick look\" dialog */\n/* ------------------------------------------------------------------ */\n\n/**\n * A small, props-driven person card shown in a centred DS `Dialog`. It is built\n * only from design-system primitives (Dialog, RoundAvatar, Chip, Button,\n * Typography, Icons) so any story can drop it in with its own data — nothing\n * about a specific person is baked in.\n *\n * The face mirrors the product's person quick-look:\n * - a large circular avatar;\n * - the name in bold, immediately followed by a small grey working-hours pill;\n * - the primary email, with a trailing \"+ N more\" overflow for extra contacts;\n * - the joined date, in secondary text;\n * - a close (X) in the top-right corner;\n * - a left-aligned footer: a filled \"Send message\" and a text \"See full\n * profile\" link.\n */\n\n/* Diameter of the header avatar. ~96px per the spec, large enough to carry an\n image or two-letter initials comfortably. */\nexport const USER_DETAILS_AVATAR_SIZE = 96;\n\nexport interface UserDetailsAvatar {\n /** Background colour behind the initials (data, stands in for a real avatar). */\n color: string;\n /** Two-letter initials, shown when there is no image. */\n initials: string;\n /** Optional avatar image; when set it replaces the initials. */\n imageUrl?: string;\n}\n\nexport interface UserDetailsDialogProps {\n open: boolean;\n avatar: UserDetailsAvatar;\n name: string;\n /** A short working-hours pill next to the name, e.g. \"40 h/w\". Omit to hide. */\n hoursLabel?: string;\n email: string;\n /** Count of extra contacts, rendered as \"+ N more\". Omit / 0 to hide. */\n extraContactsCount?: number;\n /** Free-form joined line, e.g. \"Joined: Feb 7. 2009\". */\n joinedDate: string;\n team?: string;\n online?: boolean;\n avatarSize?: number;\n onSendMessage?: () => void;\n onSeeFullProfile?: () => void;\n onClose?: () => void;\n}\n\nconst StyledHeader = styled.div`\n position: relative;\n display: flex;\n align-items: flex-start;\n gap: 16px;\n\n .udd-close {\n position: absolute;\n top: -8px;\n right: -12px;\n }\n`;\n\n/* The avatar. A plain circle — a fixed box so it never shrinks beside the info. */\nconst StyledAvatar = styled.div<{ $size: number }>`\n position: relative;\n flex-shrink: 0;\n\n .udd-online {\n border: 2px solid var(--page-paper-main);\n box-sizing: border-box;\n }\n\n width: ${(props) => props.$size}px;\n height: ${(props) => props.$size}px;\n\n .udd-avatar-image {\n background-size: cover;\n background-position: center;\n color: transparent;\n }\n`;\n\nconst StyledInfo = styled.div`\n min-width: 0;\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding-top: 4px;\n\n .udd-name-row {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n }\n\n .udd-name-row > .typography {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .udd-hours {\n flex-shrink: 0;\n }\n\n .udd-contact-row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n }\n\n .udd-email {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .udd-more {\n flex-shrink: 0;\n }\n`;\n\n/* Dialog.Actions is only padding, so the footer lays itself out: left-aligned,\n the filled action first and the text link beside it. The link is underlined to\n match the reference. */\nconst StyledActions = styled.div`\n display: flex;\n align-items: center;\n gap: 12px;\n\n .udd-profile-link {\n text-decoration: underline;\n }\n`;\n\nexport const UserDetailsDialog = ({\n open,\n avatar,\n name,\n hoursLabel,\n email,\n extraContactsCount,\n joinedDate,\n team,\n online = false,\n avatarSize = USER_DETAILS_AVATAR_SIZE,\n onSendMessage,\n onSeeFullProfile,\n onClose,\n}: UserDetailsDialogProps): ReactElement => (\n <Dialog open={open} onClose={onClose} enableBackgroundClick>\n <Dialog.Content>\n <StyledHeader>\n <StyledAvatar $size={avatarSize}>\n <RoundAvatar\n $size={avatarSize}\n $bg={avatar.color}\n $bordered={false}\n className={avatar.imageUrl ? \"udd-avatar-image\" : undefined}\n style={\n avatar.imageUrl\n ? { backgroundImage: `url(${avatar.imageUrl})` }\n : undefined\n }\n >\n {avatar.imageUrl ? \"\" : avatar.initials}\n </RoundAvatar>\n {online ? (\n <Badge\n dimension={20}\n position=\"bottom-right\"\n backgroundColor=\"var(--color-sucess-green)\"\n className=\"udd-online\"\n />\n ) : null}\n </StyledAvatar>\n\n <StyledInfo>\n <div className=\"udd-name-row\">\n <Header2>{name}</Header2>\n {hoursLabel ? (\n <span className=\"udd-hours\">\n <Chip\n size=\"small\"\n label={hoursLabel}\n backgroundColor=\"var(--color-theme-300)\"\n color=\"var(--color-theme-900)\"\n />\n </span>\n ) : null}\n </div>\n\n <div className=\"udd-contact-row\">\n <Body2 color=\"secondary\" className=\"udd-email\">\n {email}\n </Body2>\n {extraContactsCount ? (\n <Body2 color=\"secondary\" className=\"udd-more\">\n + {extraContactsCount} more\n </Body2>\n ) : null}\n </div>\n\n <Caption1 color=\"secondary\">{joinedDate}</Caption1>\n {team ? <Caption1 color=\"secondary\">Team: {team}</Caption1> : null}\n </StyledInfo>\n\n <IconButton\n className=\"udd-close\"\n variant=\"text gray\"\n onClick={onClose}\n aria-label=\"Close\"\n >\n <CancelCrossIcon />\n </IconButton>\n </StyledHeader>\n </Dialog.Content>\n\n <Dialog.ContentDivider />\n\n <Dialog.Actions>\n <StyledActions>\n <Button variant=\"primary\" onClick={onSendMessage}>\n Send message\n </Button>\n <Button\n variant=\"text colored\"\n className=\"udd-profile-link\"\n onClick={onSeeFullProfile}\n >\n See full profile\n </Button>\n </StyledActions>\n </Dialog.Actions>\n </Dialog>\n);\n\nUserDetailsDialog.displayName = \"UserDetailsDialog\";\n"],"mappings":"AAAA,OAAOA,KAAK,MAAwB,OAAO;AAE3C,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,6BAA6B;;AAEtE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAG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iBAAiB,CAACP,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -46,6 +46,18 @@ export declare const PeriodPicker: {
|
|
|
46
46
|
({ selected, onChange, }: PeriodPickerProps): ReactElement;
|
|
47
47
|
displayName: string;
|
|
48
48
|
};
|
|
49
|
+
export interface CurrencyPickerProps {
|
|
50
|
+
options: {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
}[];
|
|
54
|
+
selected: string;
|
|
55
|
+
onChange: (id: string) => void;
|
|
56
|
+
}
|
|
57
|
+
export declare const CurrencyPicker: {
|
|
58
|
+
({ options, selected, onChange, }: CurrencyPickerProps): ReactElement;
|
|
59
|
+
displayName: string;
|
|
60
|
+
};
|
|
49
61
|
export interface StatWidgetProps {
|
|
50
62
|
/** Preformatted total ("135", "1.4K"). */
|
|
51
63
|
value: string;
|
|
@@ -136,6 +148,7 @@ export interface DailyDeltaPoint {
|
|
|
136
148
|
export interface DailyDeltaChartWidgetProps {
|
|
137
149
|
title: string;
|
|
138
150
|
linkText?: string;
|
|
151
|
+
links?: string[];
|
|
139
152
|
data: DailyDeltaPoint[];
|
|
140
153
|
/** X labels, spread evenly under the plot (pass a subset). */
|
|
141
154
|
xLabels: string[];
|
|
@@ -150,7 +163,7 @@ export interface DailyDeltaChartWidgetProps {
|
|
|
150
163
|
}
|
|
151
164
|
/** Thin daily bars above/below a zero line, like "New vs Completed Tasks". */
|
|
152
165
|
export declare const DailyDeltaChartWidget: {
|
|
153
|
-
({ title, linkText, data, xLabels, upMax, downMax, yTicksUp, yTicksDown, }: DailyDeltaChartWidgetProps): ReactElement;
|
|
166
|
+
({ title, linkText, links, data, xLabels, upMax, downMax, yTicksUp, yTicksDown, }: DailyDeltaChartWidgetProps): ReactElement;
|
|
154
167
|
displayName: string;
|
|
155
168
|
};
|
|
156
169
|
export interface LeaderboardRowData {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboardWidgets.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/dashboardWidgets.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboardWidgets.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/dashboardWidgets.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAwCjE,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,EAAE,MAAM,EAOvC,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;CAInC,CAAC;AAcF,eAAO,MAAM,UAAU,oEAuDtB,CAAC;AAQF,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,wEAAwE;AACxE,eAAO,MAAM,aAAa;sCAIvB,kBAAkB,GAAG,YAAY;;CAyBnC,CAAC;AAQF,6EAA6E;AAC7E,eAAO,MAAM,cAAc;;;GAS1B,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED;kDACkD;AAClD,eAAO,MAAM,YAAY;8BAGtB,iBAAiB,GAAG,YAAY;;CAmBlC,CAAC;AAeF,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,EAAE,EAAE,MA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A0B,GAAG,YAAY;;CA2E3C,CAAC;AAQF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,YAAY,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAoED;4EAC4E;AAC5E,eAAO,MAAM,iBAAiB;6CAK3B,sBAAsB,GAAG,YAAY;;CAmCvC,CAAC;AAQF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACzB,4DAA4D;IAC5D,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gDAAgD;IAChD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AA2FD;8DAC8D;AAC9D,eAAO,MAAM,qBAAqB;+EAS/B,0BAA0B,GAAG,YAAY;;CAqE3C,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { InfoSmallIcon, SortListIcon } from "../../components/Icons";
|
|
|
6
6
|
import { ProgressBar } from "../../components/ProgressBar";
|
|
7
7
|
import { ProgressRing } from "../../components/ProgressRing";
|
|
8
8
|
import { Select } from "../../components/Select";
|
|
9
|
+
import { SelectTrigger } from "../../components/SelectTrigger";
|
|
9
10
|
import { Tooltip } from "../../components/Tooltip";
|
|
10
11
|
import { Body1, Body2, Header2, Title2 } from "../../components/Typography";
|
|
11
12
|
import { ValueButton } from "../../components/ValueButton";
|
|
@@ -172,25 +173,55 @@ export const PeriodPicker = _ref2 => {
|
|
|
172
173
|
};
|
|
173
174
|
PeriodPicker.displayName = "PeriodPicker";
|
|
174
175
|
|
|
176
|
+
/* ------------------------------------------------------------------ */
|
|
177
|
+
/* Currency picker (mirrors Reports/CurrencyPicker.js) */
|
|
178
|
+
/* ------------------------------------------------------------------ */
|
|
179
|
+
|
|
180
|
+
const StyledCurrencyPicker = styled.div.withConfig({
|
|
181
|
+
displayName: "dashboardWidgets__StyledCurrencyPicker",
|
|
182
|
+
componentId: "sc-lm5ek4-1"
|
|
183
|
+
})([".currency-trigger.currency-trigger{width:80px;min-width:80px;}"]);
|
|
184
|
+
export const CurrencyPicker = _ref3 => {
|
|
185
|
+
var _options$find;
|
|
186
|
+
let options = _ref3.options,
|
|
187
|
+
selected = _ref3.selected,
|
|
188
|
+
onChange = _ref3.onChange;
|
|
189
|
+
return /*#__PURE__*/React.createElement(StyledCurrencyPicker, null, /*#__PURE__*/React.createElement(Select, {
|
|
190
|
+
options: options,
|
|
191
|
+
selected: selected,
|
|
192
|
+
onChange: value => onChange(String(value)),
|
|
193
|
+
position: "bottom-end",
|
|
194
|
+
forceCloseMenu: true,
|
|
195
|
+
disableSearch: true,
|
|
196
|
+
keepSameOptionsOrder: true,
|
|
197
|
+
disabledInternalSort: true,
|
|
198
|
+
target: /*#__PURE__*/React.createElement(SelectTrigger, {
|
|
199
|
+
size: "small",
|
|
200
|
+
className: "currency-trigger"
|
|
201
|
+
}, (_options$find = options.find(option => option.id === selected)) == null ? void 0 : _options$find.name)
|
|
202
|
+
}));
|
|
203
|
+
};
|
|
204
|
+
CurrencyPicker.displayName = "CurrencyPicker";
|
|
205
|
+
|
|
175
206
|
/* ------------------------------------------------------------------ */
|
|
176
207
|
/* Stat widget (mirrors Widget.js) */
|
|
177
208
|
/* ------------------------------------------------------------------ */
|
|
178
209
|
|
|
179
210
|
const StyledWidget = styled.div.withConfig({
|
|
180
211
|
displayName: "dashboardWidgets__StyledWidget",
|
|
181
|
-
componentId: "sc-lm5ek4-
|
|
212
|
+
componentId: "sc-lm5ek4-2"
|
|
182
213
|
})(["position:relative;height:100%;padding:16px 20px;box-sizing:border-box;overflow:hidden;.widget-top{display:flex;justify-content:space-between;gap:8px;}.widget-corner{display:flex;align-items:flex-start;gap:4px;flex-shrink:0;}.widget-total{display:flex;width:100%;height:56px;margin-bottom:8px;font-family:", ";font-size:52px;font-weight:700;line-height:1;color:var(--color-theme-900);}.widget-total.alert{color:var(--red-alert);}.widget-total.success{color:", ";}.widget-title.alert{color:var(--red-alert);}.widget-title.success{color:", ";}.widget-total .widget-unit{align-self:center;margin-left:10px;font-size:20px;font-weight:600;line-height:1;color:var(--color-theme-600);}.widget-title{margin-bottom:8px;}.widget-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;height:40px;margin-bottom:8px;}.widget-link{display:inline-flex;cursor:pointer;text-decoration:none;}"], FONT_STACK, colors.greenSuccess.color, colors.greenSuccess.color);
|
|
183
|
-
export const StatWidget =
|
|
184
|
-
let value =
|
|
185
|
-
unit =
|
|
186
|
-
title =
|
|
187
|
-
description =
|
|
188
|
-
linkText =
|
|
189
|
-
alert =
|
|
190
|
-
success =
|
|
191
|
-
groupBy =
|
|
192
|
-
cornerControl =
|
|
193
|
-
children =
|
|
214
|
+
export const StatWidget = _ref4 => {
|
|
215
|
+
let value = _ref4.value,
|
|
216
|
+
unit = _ref4.unit,
|
|
217
|
+
title = _ref4.title,
|
|
218
|
+
description = _ref4.description,
|
|
219
|
+
linkText = _ref4.linkText,
|
|
220
|
+
alert = _ref4.alert,
|
|
221
|
+
success = _ref4.success,
|
|
222
|
+
groupBy = _ref4.groupBy,
|
|
223
|
+
cornerControl = _ref4.cornerControl,
|
|
224
|
+
children = _ref4.children;
|
|
194
225
|
return /*#__PURE__*/React.createElement(StyledWidget, null, /*#__PURE__*/React.createElement("div", {
|
|
195
226
|
className: "widget-top"
|
|
196
227
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -223,12 +254,12 @@ StatWidget.displayName = "StatWidget";
|
|
|
223
254
|
|
|
224
255
|
const StyledRankedList = styled.div.withConfig({
|
|
225
256
|
displayName: "dashboardWidgets__StyledRankedList",
|
|
226
|
-
componentId: "sc-lm5ek4-
|
|
257
|
+
componentId: "sc-lm5ek4-3"
|
|
227
258
|
})(["height:216px;overflow-y:auto;padding:4px 0;.ranked-row{display:flex;align-items:center;justify-content:space-between;gap:4px;height:24px;padding:0 6px;margin-bottom:4px;border-radius:2px;box-sizing:border-box;}.ranked-row:nth-child(odd){background-color:var(--color-theme-200);}.ranked-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.ranked-value{flex-shrink:0;}"]);
|
|
228
259
|
|
|
229
260
|
/** The striped name/count rows inside a tall stat widget. */
|
|
230
|
-
export const WidgetRankedList =
|
|
231
|
-
let items =
|
|
261
|
+
export const WidgetRankedList = _ref5 => {
|
|
262
|
+
let items = _ref5.items;
|
|
232
263
|
return /*#__PURE__*/React.createElement(StyledRankedList, null, items.map(item => /*#__PURE__*/React.createElement("div", {
|
|
233
264
|
className: "ranked-row",
|
|
234
265
|
key: item.name
|
|
@@ -250,7 +281,7 @@ const RING_RADII = [121, 93, 63];
|
|
|
250
281
|
const RING_STROKE = 20;
|
|
251
282
|
const StyledOverview = styled.div.withConfig({
|
|
252
283
|
displayName: "dashboardWidgets__StyledOverview",
|
|
253
|
-
componentId: "sc-lm5ek4-
|
|
284
|
+
componentId: "sc-lm5ek4-4"
|
|
254
285
|
})(["position:relative;display:flex;flex-direction:column;height:100%;padding:16px 20px;box-sizing:border-box;overflow:hidden;.overview-head{display:flex;justify-content:space-between;gap:8px;}.overview-body{display:flex;flex-direction:column-reverse;justify-content:space-between;gap:4px;height:100%;@media (min-width:", "){flex-direction:row;margin-top:48px;}}.overview-sections{display:flex;flex-direction:column;gap:24px;width:100%;height:fit-content;@media (min-width:", "){height:100%;}}.overview-section{display:flex;width:fit-content;height:fit-content;}.overview-line{width:2px;margin-right:12px;align-self:stretch;flex-shrink:0;}.overview-value{height:28px;margin-bottom:2px;}.overview-value-row{display:flex;align-items:flex-end;gap:4px;}.overview-desc{display:flex;align-items:center;gap:8px;}.overview-desc svg{cursor:help;flex-shrink:0;}.overview-link{display:inline-flex;margin-top:4px;cursor:pointer;text-decoration:none;}.overview-rings{display:flex;align-self:center;@media (min-width:", "){align-self:flex-end;}}@media (max-width:639px){.overview-rings{transform:scale(0.6);transform-origin:center;margin:-48px 0;}}"], SM, SM, SM);
|
|
255
286
|
const ringColor = (section, hovered) => {
|
|
256
287
|
const active = !hovered || hovered === section.id;
|
|
@@ -263,9 +294,9 @@ const ringTrack = (section, hovered) => {
|
|
|
263
294
|
const active = !hovered || hovered === section.id;
|
|
264
295
|
return active ? section.trackColor : "var(--color-theme-200)";
|
|
265
296
|
};
|
|
266
|
-
const OverviewSection =
|
|
267
|
-
let section =
|
|
268
|
-
onHover =
|
|
297
|
+
const OverviewSection = _ref6 => {
|
|
298
|
+
let section = _ref6.section,
|
|
299
|
+
onHover = _ref6.onHover;
|
|
269
300
|
const alert = section.progress > 100;
|
|
270
301
|
return /*#__PURE__*/React.createElement("div", {
|
|
271
302
|
className: "overview-section",
|
|
@@ -303,11 +334,11 @@ const OverviewSection = _ref5 => {
|
|
|
303
334
|
/** The big overview card: accent-line metric sections + nested rings.
|
|
304
335
|
* Hovering a section highlights its ring and mutes the other rings,
|
|
305
336
|
* exactly like the app's Projects Overview. */
|
|
306
|
-
export const OverviewWidget =
|
|
307
|
-
let title =
|
|
308
|
-
subtitle =
|
|
309
|
-
sections =
|
|
310
|
-
headerRight =
|
|
337
|
+
export const OverviewWidget = _ref7 => {
|
|
338
|
+
let title = _ref7.title,
|
|
339
|
+
subtitle = _ref7.subtitle,
|
|
340
|
+
sections = _ref7.sections,
|
|
341
|
+
headerRight = _ref7.headerRight;
|
|
311
342
|
const _useState4 = useState(null),
|
|
312
343
|
hovered = _useState4[0],
|
|
313
344
|
setHovered = _useState4[1];
|
|
@@ -352,23 +383,29 @@ OverviewWidget.displayName = "OverviewWidget";
|
|
|
352
383
|
const PLOT_HEIGHT = 116;
|
|
353
384
|
const StyledChartWidget = styled.div.withConfig({
|
|
354
385
|
displayName: "dashboardWidgets__StyledChartWidget",
|
|
355
|
-
componentId: "sc-lm5ek4-
|
|
356
|
-
})(["position:relative;height:100%;padding:16px 20px 0;box-sizing:border-box;overflow:hidden;.chart-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;}.chart-link{display:inline-flex;cursor:pointer;text-decoration:none;flex-shrink:0;}.chart-row{display:flex;gap:10px;}.chart-y-axis{position:relative;width:30px;height:", "px;flex-shrink:0;}.chart-y-tick{position:absolute;right:0;transform:translateY(-50%);font-family:", ";font-size:11px;color:", ";white-space:nowrap;}.chart-plot{position:relative;flex:1;min-width:0;height:", "px;}.chart-x-axis{display:flex;justify-content:space-between;margin-top:6px;padding-left:40px;font-family:", ";font-size:11px;color:", ";}.chart-x-axis span{white-space:nowrap;}"], PLOT_HEIGHT, FONT_STACK, TICK_COLOR, PLOT_HEIGHT, FONT_STACK, TICK_COLOR);
|
|
357
|
-
const ChartHead =
|
|
358
|
-
let title =
|
|
359
|
-
linkText =
|
|
386
|
+
componentId: "sc-lm5ek4-5"
|
|
387
|
+
})(["position:relative;height:100%;padding:16px 20px 0;box-sizing:border-box;overflow:hidden;.chart-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;}.chart-link{display:inline-flex;cursor:pointer;text-decoration:none;flex-shrink:0;}.chart-links{display:flex;gap:12px;flex-shrink:0;}.chart-row{display:flex;gap:10px;}.chart-y-axis{position:relative;width:30px;height:", "px;flex-shrink:0;}.chart-y-tick{position:absolute;right:0;transform:translateY(-50%);font-family:", ";font-size:11px;color:", ";white-space:nowrap;}.chart-plot{position:relative;flex:1;min-width:0;height:", "px;}.chart-x-axis{display:flex;justify-content:space-between;margin-top:6px;padding-left:40px;font-family:", ";font-size:11px;color:", ";}.chart-x-axis span{white-space:nowrap;}"], PLOT_HEIGHT, FONT_STACK, TICK_COLOR, PLOT_HEIGHT, FONT_STACK, TICK_COLOR);
|
|
388
|
+
const ChartHead = _ref8 => {
|
|
389
|
+
let title = _ref8.title,
|
|
390
|
+
linkText = _ref8.linkText,
|
|
391
|
+
links = _ref8.links;
|
|
392
|
+
const texts = links != null ? links : linkText ? [linkText] : [];
|
|
360
393
|
return /*#__PURE__*/React.createElement("div", {
|
|
361
394
|
className: "chart-head"
|
|
362
395
|
}, /*#__PURE__*/React.createElement(Body1, {
|
|
363
396
|
weight: "bold",
|
|
364
397
|
overflow: "truncate",
|
|
365
398
|
whitespace: "no-wrap"
|
|
366
|
-
}, title),
|
|
367
|
-
className: "chart-
|
|
399
|
+
}, title), texts.length ? /*#__PURE__*/React.createElement("span", {
|
|
400
|
+
className: "chart-links"
|
|
401
|
+
}, texts.map(text => /*#__PURE__*/React.createElement("a", {
|
|
402
|
+
className: "chart-link",
|
|
403
|
+
key: text
|
|
368
404
|
}, /*#__PURE__*/React.createElement(Body2, {
|
|
369
405
|
color: "theme-primary",
|
|
370
|
-
weight: "medium"
|
|
371
|
-
|
|
406
|
+
weight: "medium",
|
|
407
|
+
whitespace: "no-wrap"
|
|
408
|
+
}, text)))) : null);
|
|
372
409
|
};
|
|
373
410
|
|
|
374
411
|
/* ------------------------------------------------------------------ */
|
|
@@ -378,12 +415,12 @@ const ChartHead = _ref7 => {
|
|
|
378
415
|
/** Line + gradient fill colours from the real widget. */
|
|
379
416
|
const AREA_LINE = "#A3CDFF";
|
|
380
417
|
/** Sharp-edged line with a soft gradient below, like "Number of Open Tasks". */
|
|
381
|
-
export const AreaChartWidget =
|
|
382
|
-
let title =
|
|
383
|
-
linkText =
|
|
384
|
-
points =
|
|
385
|
-
xLabels =
|
|
386
|
-
yTicks =
|
|
418
|
+
export const AreaChartWidget = _ref9 => {
|
|
419
|
+
let title = _ref9.title,
|
|
420
|
+
linkText = _ref9.linkText,
|
|
421
|
+
points = _ref9.points,
|
|
422
|
+
xLabels = _ref9.xLabels,
|
|
423
|
+
yTicks = _ref9.yTicks;
|
|
387
424
|
const min = Math.min(...yTicks);
|
|
388
425
|
const max = Math.max(...yTicks);
|
|
389
426
|
const range = max - min || 1;
|
|
@@ -456,25 +493,27 @@ const DELTA_UP = "#A3CDFF";
|
|
|
456
493
|
const DELTA_DOWN = "#FF9C9C";
|
|
457
494
|
const StyledDeltaBars = styled.div.withConfig({
|
|
458
495
|
displayName: "dashboardWidgets__StyledDeltaBars",
|
|
459
|
-
componentId: "sc-lm5ek4-
|
|
496
|
+
componentId: "sc-lm5ek4-6"
|
|
460
497
|
})(["display:flex;height:100%;.delta-col{position:relative;flex:1;min-width:0;}.delta-bar{position:absolute;left:50%;width:4px;max-width:80%;transform:translateX(-50%);}.delta-zero{position:absolute;left:0;right:0;height:1px;background-color:", ";}"], TICK_COLOR);
|
|
461
498
|
|
|
462
499
|
/** Thin daily bars above/below a zero line, like "New vs Completed Tasks". */
|
|
463
|
-
export const DailyDeltaChartWidget =
|
|
464
|
-
let title =
|
|
465
|
-
linkText =
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
500
|
+
export const DailyDeltaChartWidget = _ref0 => {
|
|
501
|
+
let title = _ref0.title,
|
|
502
|
+
linkText = _ref0.linkText,
|
|
503
|
+
links = _ref0.links,
|
|
504
|
+
data = _ref0.data,
|
|
505
|
+
xLabels = _ref0.xLabels,
|
|
506
|
+
upMax = _ref0.upMax,
|
|
507
|
+
downMax = _ref0.downMax,
|
|
508
|
+
yTicksUp = _ref0.yTicksUp,
|
|
509
|
+
yTicksDown = _ref0.yTicksDown;
|
|
472
510
|
const upFrac = upMax / (upMax + downMax);
|
|
473
511
|
const zeroTop = upFrac * PLOT_HEIGHT;
|
|
474
512
|
const tickTop = (value, below) => below ? zeroTop + value / downMax * (PLOT_HEIGHT - zeroTop) : zeroTop - value / upMax * zeroTop;
|
|
475
513
|
return /*#__PURE__*/React.createElement(StyledChartWidget, null, /*#__PURE__*/React.createElement(ChartHead, {
|
|
476
514
|
title: title,
|
|
477
|
-
linkText: linkText
|
|
515
|
+
linkText: linkText,
|
|
516
|
+
links: links
|
|
478
517
|
}), /*#__PURE__*/React.createElement("div", {
|
|
479
518
|
className: "chart-row"
|
|
480
519
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -534,16 +573,16 @@ DailyDeltaChartWidget.displayName = "DailyDeltaChartWidget";
|
|
|
534
573
|
|
|
535
574
|
const StyledLeaderboard = styled.div.withConfig({
|
|
536
575
|
displayName: "dashboardWidgets__StyledLeaderboard",
|
|
537
|
-
componentId: "sc-lm5ek4-
|
|
576
|
+
componentId: "sc-lm5ek4-7"
|
|
538
577
|
})(["position:relative;height:100%;padding:16px 20px;box-sizing:border-box;overflow:hidden;.lb-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}.lb-desc{margin-bottom:12px;}.lb-sep{border-bottom:1px solid var(--border-primary);margin-bottom:12px;}.lb-rows{max-height:288px;overflow-y:auto;}.lb-row{display:flex;align-items:center;gap:16px;height:32px;margin-bottom:4px;}.lb-label{width:208px;max-width:40%;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;}.lb-bar{flex:1;min-width:0;height:8px;}.lb-bar-inner{min-width:8px;height:100%;border-radius:4px;overflow:hidden;}.lb-value{width:80px;flex-shrink:0;text-align:right;}"]);
|
|
539
578
|
|
|
540
579
|
/** Ranked bars: label, billable/non-billable bar, value — like Time's
|
|
541
580
|
* Leaderboard. Bar length = share of the leader; green = billable part. */
|
|
542
|
-
export const LeaderboardWidget =
|
|
543
|
-
let title =
|
|
544
|
-
description =
|
|
545
|
-
rows =
|
|
546
|
-
groupBy =
|
|
581
|
+
export const LeaderboardWidget = _ref1 => {
|
|
582
|
+
let title = _ref1.title,
|
|
583
|
+
description = _ref1.description,
|
|
584
|
+
rows = _ref1.rows,
|
|
585
|
+
groupBy = _ref1.groupBy;
|
|
547
586
|
return /*#__PURE__*/React.createElement(StyledLeaderboard, null, /*#__PURE__*/React.createElement("div", {
|
|
548
587
|
className: "lb-head"
|
|
549
588
|
}, /*#__PURE__*/React.createElement(Header2, null, title), groupBy ? /*#__PURE__*/React.createElement(WidgetGroupBy, groupBy) : null), /*#__PURE__*/React.createElement(Body2, {
|
|
@@ -586,22 +625,22 @@ LeaderboardWidget.displayName = "LeaderboardWidget";
|
|
|
586
625
|
|
|
587
626
|
const StyledStackedChart = styled.div.withConfig({
|
|
588
627
|
displayName: "dashboardWidgets__StyledStackedChart",
|
|
589
|
-
componentId: "sc-lm5ek4-
|
|
628
|
+
componentId: "sc-lm5ek4-8"
|
|
590
629
|
})(["position:relative;height:100%;padding:16px 20px;box-sizing:border-box;overflow:hidden;.sb-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:8px;}.sb-total-wrap{display:flex;align-items:flex-start;gap:8px;margin-left:auto;}.sb-total{font-family:", ";font-size:52px;font-weight:700;line-height:1;color:var(--color-theme-900);}.sb-row{display:flex;gap:10px;}.sb-y-axis{position:relative;width:30px;flex-shrink:0;}.sb-y-tick{position:absolute;right:0;transform:translateY(-50%);font-family:", ";font-size:11px;color:", ";}.sb-plot{position:relative;flex:1;min-width:0;}.sb-grid-line{position:absolute;left:0;right:0;height:1px;background-color:var(--color-theme-300);}.sb-cols{position:relative;display:flex;justify-content:space-around;align-items:flex-end;height:100%;}.sb-slot{display:flex;flex-direction:column-reverse;flex-shrink:0;}.sb-labels{display:flex;justify-content:space-around;margin-top:8px;padding-left:40px;font-family:", ";font-size:11px;color:", ";}"], FONT_STACK, FONT_STACK, TICK_COLOR, FONT_STACK, TICK_COLOR);
|
|
591
630
|
|
|
592
631
|
/** Narrow stacked time columns, like the Time dashboard's tracked-hours
|
|
593
632
|
* chart. Segment order and palette follow the real chart. */
|
|
594
|
-
export const StackedBarChartWidget =
|
|
595
|
-
let title =
|
|
596
|
-
total =
|
|
597
|
-
data =
|
|
598
|
-
seriesLabels =
|
|
599
|
-
yTicks =
|
|
600
|
-
|
|
601
|
-
barWidth =
|
|
602
|
-
|
|
603
|
-
height =
|
|
604
|
-
groupBy =
|
|
633
|
+
export const StackedBarChartWidget = _ref10 => {
|
|
634
|
+
let title = _ref10.title,
|
|
635
|
+
total = _ref10.total,
|
|
636
|
+
data = _ref10.data,
|
|
637
|
+
seriesLabels = _ref10.seriesLabels,
|
|
638
|
+
yTicks = _ref10.yTicks,
|
|
639
|
+
_ref10$barWidth = _ref10.barWidth,
|
|
640
|
+
barWidth = _ref10$barWidth === void 0 ? 28 : _ref10$barWidth,
|
|
641
|
+
_ref10$height = _ref10.height,
|
|
642
|
+
height = _ref10$height === void 0 ? 220 : _ref10$height,
|
|
643
|
+
groupBy = _ref10.groupBy;
|
|
605
644
|
const max = Math.max(...yTicks) || 1;
|
|
606
645
|
return /*#__PURE__*/React.createElement(StyledStackedChart, null, /*#__PURE__*/React.createElement("div", {
|
|
607
646
|
className: "sb-head"
|