@activecollab/components 2.0.484 → 2.0.485
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/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/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/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationShell.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_MainLogo","_tokens","_IconButton","_Icons","_Modal","_Paper","_Tooltip","_Typography","_utils","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","MENU_ITEMS","icon","RocketIcon","text","ProjectsIcon","active","MyWorkIcon","ActivityIcon","CalendarIcon","PeopleIcon","ReportTimeIcon","ReportsIcon","InvoicesIcon","EstimatesIcon","StyledLayout","styled","div","withConfig","displayName","componentId","StyledContentRow","StyledRightWindow","SM","StyledMainMenu","TRANSITION","StyledMenuHeader","XL","StyledMenuScroll","StyledMenuSection","StyledMenuItem","StyledMobileMenuClose","IconButton","StyledMobileMenuHeader","StyledIconRow","StyledTopRightControls","StyledHeaderAvatar","DARK_THEME_SELECTOR","StyledPage","StyledPageBody","StyledPagePaper","exports","Paper","MenuItemsMock","_ref","_ref$mobile","mobile","createElement","className","Caption1","weight","color","map","_ref2","Icon","Tooltip","key","title","placement","disable","undefined","Body2","whitespace","MainMenuMock","_ref3","collapsed","onToggleCollapsed","footer","MainLogo","variant","size","onClick","CollapsIcon","MainMenuMobileMock","_ref4","open","close","Modal","onClose","CloseIcon","MobileMenuHeaderMock","_ref5","onOpenMobileMenu","MobileMenuIcon","SearchIcon","NotificationBellIcon","TopRightControlsMock","ClockStopwatchIndicatorIcon","PresentationShell","_ref6","header","children","floating","menuFooter","_useState","useState","_useState2","mobileMenuOpen","setMobileMenuOpen","_useState3","_useState4","setCollapsed","_useState5","_useState6","isMobileView","setIsMobileView","ref","useRef","dimensions","useResizeObserver","width","useEffect","BREAKPOINT","handleOpenMobileMenu","useCallback","handleCloseMobileMenu","handleToggleCollapsed","prev","id"],"sources":["../../../../src/presentation/shared/PresentationShell.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { MainLogo } from \"./MainLogo\";\nimport { BREAKPOINT, SM, TRANSITION, XL } from \"./tokens\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ActivityIcon,\n CalendarIcon,\n ClockStopwatchIndicatorIcon,\n CloseIcon,\n CollapsIcon,\n EstimatesIcon,\n InvoicesIcon,\n MobileMenuIcon,\n MyWorkIcon,\n NotificationBellIcon,\n PeopleIcon,\n ProjectsIcon,\n ReportTimeIcon,\n ReportsIcon,\n RocketIcon,\n SearchIcon,\n} from \"../../components/Icons\";\nimport { Modal } from \"../../components/Modal\";\nimport { Paper } from \"../../components/Paper\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2, Caption1 } from \"../../components/Typography\";\nimport { DARK_THEME_SELECTOR, useResizeObserver } from \"../../utils\";\n\nconst MENU_ITEMS: {\n icon: React.FC<React.SVGProps<SVGSVGElement>>;\n text: string;\n active?: boolean;\n}[] = [\n { icon: RocketIcon, text: \"Getting Started\" },\n { icon: ProjectsIcon, text: \"Projects\", active: true },\n { icon: MyWorkIcon, text: \"My Work\" },\n { icon: ActivityIcon, text: \"Activity\" },\n { icon: CalendarIcon, text: \"Calendar\" },\n { icon: PeopleIcon, text: \"People\" },\n { icon: ReportTimeIcon, text: \"Time\" },\n { icon: ReportsIcon, text: \"Reports\" },\n { icon: InvoicesIcon, text: \"Invoices\" },\n { icon: EstimatesIcon, text: \"Estimates\" },\n];\n\n/* ------------------------------------------------------------------ */\n/* Layout shell (mirrors Layout.js) */\n/* ------------------------------------------------------------------ */\n\nconst StyledLayout = styled.div`\n height: 100vh;\n display: flex;\n flex-direction: column;\n background-color: var(--body-bg-main);\n`;\n\nconst StyledContentRow = styled.div`\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 0%;\n flex-grow: 1;\n overflow-y: auto;\n`;\n\nconst StyledRightWindow = styled.div`\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 0%;\n flex-grow: 1;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n padding: 0 16px;\n\n @media (min-width: ${SM}) {\n padding-right: 32px;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Main menu (mirrors MainMenu.js + MainMenu.less) */\n/* ------------------------------------------------------------------ */\n\nconst StyledMainMenu = styled.div`\n position: relative;\n z-index: 1;\n display: none;\n flex-direction: column;\n height: 100%;\n margin-right: 4px;\n flex-shrink: 0;\n width: 240px;\n transition: width ${TRANSITION};\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n\n &.collapsed {\n width: 72px;\n }\n\n .menu-item-text,\n .menu-section,\n #logotype {\n transition: all ${TRANSITION};\n }\n\n &.collapsed .menu-item-text {\n opacity: 0;\n visibility: hidden;\n width: 0;\n margin-left: 0;\n }\n\n &.collapsed .menu-section {\n transform: scaleY(0);\n opacity: 0;\n max-height: 0;\n margin-bottom: 0;\n }\n\n &.collapsed #logotype {\n transform: translateX(-5%);\n opacity: 0;\n }\n\n &.collapsed .collapse-expand-menu svg {\n transform: rotate(180deg);\n }\n\n &:not(.mobile) {\n @media (max-width: 1279.98px) {\n width: 72px;\n\n .menu-item-text {\n opacity: 0;\n visibility: hidden;\n width: 0;\n margin-left: 0;\n }\n\n .menu-section {\n transform: scaleY(0);\n opacity: 0;\n max-height: 0;\n margin-bottom: 0;\n }\n\n #logotype {\n transform: translateX(-5%);\n opacity: 0;\n }\n }\n }\n\n &.mobile {\n display: flex;\n position: absolute;\n left: 0;\n top: 0;\n width: 240px;\n background-color: var(--page-paper-main);\n }\n`;\n\nconst StyledMenuHeader = styled.div`\n position: relative;\n height: 68px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n overflow: hidden;\n\n .main-logo {\n position: absolute;\n left: 20px;\n color: var(--color-secondary);\n\n path {\n fill: var(--color-secondary);\n }\n }\n\n .collapse-expand-menu {\n position: absolute;\n right: 4px;\n display: none;\n\n @media (min-width: ${XL}) {\n display: flex;\n }\n }\n`;\n\nconst StyledMenuScroll = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n min-height: 0;\n margin: 12px 0;\n overflow-y: auto;\n overflow-x: hidden;\n`;\n\nconst StyledMenuSection = styled.div`\n display: flex;\n align-items: center;\n margin: 0 12px 8px;\n padding: 0 4px 0 12px;\n`;\n\nconst StyledMenuItem = styled.a`\n display: flex;\n align-items: center;\n height: 40px;\n padding: 0 4px 0 12px;\n margin: 0 12px 2px;\n border-radius: 8px;\n cursor: pointer;\n text-decoration: none;\n\n svg {\n flex-shrink: 0;\n fill: var(--color-theme-700);\n opacity: 0.7;\n }\n\n .menu-item-text {\n margin-left: 12px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &:hover {\n transition: all ${TRANSITION};\n background-color: var(--color-theme-300);\n\n svg {\n fill: var(--color-theme-900);\n opacity: 1;\n }\n\n .menu-item-text {\n color: var(--color-theme-900);\n }\n }\n\n &.active {\n background-color: var(--color-secondary-200);\n\n svg {\n fill: var(--color-secondary);\n opacity: 1;\n }\n\n .menu-item-text {\n color: var(--color-secondary);\n }\n }\n`;\n\nconst StyledMobileMenuClose = styled(IconButton)`\n position: absolute;\n right: 16px;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Top bars */\n/* ------------------------------------------------------------------ */\n\nconst StyledMobileMenuHeader = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n background-color: var(--color-primary);\n z-index: 50;\n\n @media (min-width: ${SM}) {\n display: none;\n }\n\n .mobile-menu-icon {\n fill: var(--color-theme-300);\n }\n`;\n\nconst StyledIconRow = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst StyledTopRightControls = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n display: none;\n align-items: center;\n justify-content: flex-end;\n padding: 12px 32px 12px 0;\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n`;\n\nconst StyledHeaderAvatar = styled.div`\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background-color: var(--color-secondary);\n color: var(--only-white);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 600;\n margin: 0 8px;\n flex-shrink: 0;\n cursor: pointer;\n\n /* dark themes: use paper colour for the initials */\n ${DARK_THEME_SELECTOR} & {\n color: var(--page-paper-main);\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Page region (mirrors Page.jsx / PageBody.jsx) */\n/* ------------------------------------------------------------------ */\n\nconst StyledPage = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n`;\n\nconst StyledPageBody = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin-bottom: 32px;\n min-height: 0;\n`;\n\n/** The paper card that holds page content (used by list view & empty pages). */\nexport const StyledPagePaper = styled(Paper)`\n flex-grow: 1;\n width: 100%;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Mocked layout building blocks */\n/* ------------------------------------------------------------------ */\n\ninterface MenuItemsProps {\n mobile?: boolean;\n}\n\nconst MenuItemsMock = ({ mobile = false }: MenuItemsProps): ReactElement => (\n <StyledMenuScroll>\n <StyledMenuSection className=\"menu-section\">\n <Caption1 weight=\"bold\" color=\"tertiary\">\n MENU\n </Caption1>\n </StyledMenuSection>\n {MENU_ITEMS.map(({ icon: Icon, text, active }) => (\n <Tooltip key={text} title={text} placement=\"right\" disable={mobile}>\n <StyledMenuItem className={active ? \"active\" : undefined}>\n <Icon />\n <Body2\n weight=\"medium\"\n color=\"secondary\"\n whitespace=\"no-wrap\"\n className=\"menu-item-text\"\n >\n {text}\n </Body2>\n </StyledMenuItem>\n </Tooltip>\n ))}\n </StyledMenuScroll>\n);\n\ninterface MainMenuMockProps {\n collapsed: boolean;\n onToggleCollapsed: () => void;\n footer?: ReactNode;\n}\n\nconst MainMenuMock = ({\n collapsed,\n onToggleCollapsed,\n footer,\n}: MainMenuMockProps): ReactElement => (\n <StyledMainMenu\n className={collapsed ? \"collapsed\" : undefined}\n data-testid=\"main-menu\"\n >\n <StyledMenuHeader>\n <a className=\"main-logo\">\n <MainLogo />\n </a>\n <div className=\"collapse-expand-menu\">\n <IconButton\n variant=\"text gray\"\n size=\"small\"\n onClick={onToggleCollapsed}\n >\n <CollapsIcon />\n </IconButton>\n </div>\n </StyledMenuHeader>\n <MenuItemsMock />\n {footer}\n </StyledMainMenu>\n);\n\ninterface MainMenuMobileMockProps {\n open: boolean;\n close: () => void;\n footer?: ReactNode;\n}\n\nconst MainMenuMobileMock = ({\n open,\n close,\n footer,\n}: MainMenuMobileMockProps): ReactElement | null =>\n open ? (\n <Modal open={open} onClose={close}>\n <StyledMainMenu className=\"mobile\" data-testid=\"main-menu-mobile\">\n <StyledMenuHeader>\n <a className=\"main-logo\">\n <MainLogo />\n </a>\n <StyledMobileMenuClose onClick={close} variant=\"text gray\">\n <CloseIcon />\n </StyledMobileMenuClose>\n </StyledMenuHeader>\n <MenuItemsMock mobile />\n {footer}\n </StyledMainMenu>\n </Modal>\n ) : null;\n\ninterface MobileMenuHeaderMockProps {\n onOpenMobileMenu: () => void;\n}\n\nconst MobileMenuHeaderMock = ({\n onOpenMobileMenu,\n}: MobileMenuHeaderMockProps): ReactElement => (\n <StyledMobileMenuHeader>\n <IconButton size=\"big\" variant=\"circle raised\" onClick={onOpenMobileMenu}>\n <MobileMenuIcon className=\"mobile-menu-icon\" />\n </IconButton>\n <StyledIconRow>\n <IconButton variant=\"text gray\">\n <SearchIcon />\n </IconButton>\n <StyledHeaderAvatar>JS</StyledHeaderAvatar>\n <IconButton variant=\"text gray\">\n <NotificationBellIcon />\n </IconButton>\n </StyledIconRow>\n </StyledMobileMenuHeader>\n);\n\nconst TopRightControlsMock = (): ReactElement => (\n <StyledTopRightControls>\n <IconButton variant=\"text gray\">\n <ClockStopwatchIndicatorIcon />\n </IconButton>\n <IconButton variant=\"text gray\">\n <SearchIcon />\n </IconButton>\n <StyledHeaderAvatar>JS</StyledHeaderAvatar>\n <IconButton variant=\"text gray\">\n <NotificationBellIcon />\n </IconButton>\n </StyledTopRightControls>\n);\n\n/* ------------------------------------------------------------------ */\n/* PresentationShell */\n/* ------------------------------------------------------------------ */\n\nexport interface PresentationShellProps {\n /** Page header row (e.g. <ProjectPageHeader /> or <PageHeader title=\"…\" />). */\n header: ReactNode;\n /** Page body content rendered inside the scrollable page area. */\n children: ReactNode;\n /** Optional fixed controls (e.g. <FloatingControls />). */\n floating?: ReactNode;\n /** Optional content pinned to the bottom of the main menu (e.g. <HelpAndSupportMenu />). */\n menuFooter?: ReactNode;\n}\n\n/**\n * The full application shell shared by every presentation mock-up: the main\n * menu on the left (auto-collapsing below 1280px, modal below 640px), the\n * top-right controls and the scrollable page area. Pass the page header via\n * `header` and the body via `children`.\n */\nexport const PresentationShell = ({\n header,\n children,\n floating,\n menuFooter,\n}: PresentationShellProps): ReactElement => {\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false);\n const [collapsed, setCollapsed] = useState(false);\n const [isMobileView, setIsMobileView] = useState<boolean>();\n\n const ref = useRef<HTMLDivElement>(null);\n const dimensions = useResizeObserver(ref);\n const width = dimensions?.width;\n\n useEffect(() => {\n if (width) {\n if (width < BREAKPOINT) {\n setIsMobileView(true);\n } else {\n setIsMobileView(false);\n setMobileMenuOpen(false);\n }\n }\n }, [width]);\n\n const handleOpenMobileMenu = useCallback(() => setMobileMenuOpen(true), []);\n const handleCloseMobileMenu = useCallback(() => setMobileMenuOpen(false), []);\n const handleToggleCollapsed = useCallback(\n () => setCollapsed((prev) => !prev),\n []\n );\n\n return (\n <StyledLayout ref={ref}>\n {isMobileView ? (\n <MobileMenuHeaderMock onOpenMobileMenu={handleOpenMobileMenu} />\n ) : null}\n <StyledContentRow>\n <StyledRightWindow id=\"right-window\">\n <StyledPage>\n {header}\n <StyledPageBody>{children}</StyledPageBody>\n </StyledPage>\n {isMobileView === false ? <TopRightControlsMock /> : null}\n </StyledRightWindow>\n {isMobileView ? (\n <MainMenuMobileMock\n open={mobileMenuOpen}\n close={handleCloseMobileMenu}\n footer={menuFooter}\n />\n ) : (\n <MainMenuMock\n collapsed={collapsed}\n onToggleCollapsed={handleToggleCollapsed}\n footer={menuFooter}\n />\n )}\n </StyledContentRow>\n {floating}\n </StyledLayout>\n );\n};\n\nPresentationShell.displayName = \"PresentationShell\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AASA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAA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AY;IAAC2F,GAAG,EAAEA;EAAI,GACpBF,YAAY,gBACXnK,MAAA,CAAAgB,OAAA,CAAA0F,aAAA,CAACiC,oBAAoB;IAACE,gBAAgB,EAAE+B;EAAqB,CAAE,CAAC,GAC9D,IAAI,eACR5K,MAAA,CAAAgB,OAAA,CAAA0F,aAAA,CAAC1B,gBAAgB,qBACfhF,MAAA,CAAAgB,OAAA,CAAA0F,aAAA,CAACzB,iBAAiB;IAACgG,EAAE,EAAC;EAAc,gBAClCjL,MAAA,CAAAgB,OAAA,CAAA0F,aAAA,CAACT,UAAU,QACRoD,MAAM,eACPrJ,MAAA,CAAAgB,OAAA,CAAA0F,aAAA,CAACR,cAAc,QAAEoD,QAAyB,CAChC,CAAC,EACZa,YAAY,KAAK,KAAK,gBAAGnK,MAAA,CAAAgB,OAAA,CAAA0F,aAAA,CAACuC,oBAAoB,MAAE,CAAC,GAAG,IACpC,CAAC,EACnBkB,YAAY,gBACXnK,MAAA,CAAAgB,OAAA,CAAA0F,aAAA,CAAC0B,kBAAkB;IACjBE,IAAI,EAAEsB,cAAe;IACrBrB,KAAK,EAAEuC,qBAAsB;IAC7BhD,MAAM,EAAE0B;EAAW,CACpB,CAAC,gBAEFxJ,MAAA,CAAAgB,OAAA,CAAA0F,aAAA,CAACgB,YAAY;IACXE,SAAS,EAAEA,SAAU;IACrBC,iBAAiB,EAAEkD,qBAAsB;IACzCjD,MAAM,EAAE0B;EAAW,CACpB,CAEa,CAAC,EAClBD,QACW,CAAC;AAEnB,CAAC;AAEDJ,iBAAiB,CAACrE,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"PresentationShell.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_MainLogo","_tokens","_IconButton","_Icons","_Modal","_Paper","_Tooltip","_Typography","_utils","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","MENU_ITEMS","icon","RocketIcon","text","ProjectsIcon","MyWorkIcon","ActivityIcon","CalendarIcon","PeopleIcon","ReportTimeIcon","ReportsIcon","InvoicesIcon","EstimatesIcon","StyledLayout","styled","div","withConfig","displayName","componentId","StyledContentRow","StyledRightWindow","SM","StyledMainMenu","TRANSITION","StyledMenuHeader","XL","StyledMenuScroll","StyledMenuSection","StyledMenuItem","StyledMobileMenuClose","IconButton","StyledMobileMenuHeader","StyledIconRow","StyledTopRightControls","StyledHeaderAvatar","DARK_THEME_SELECTOR","StyledPage","StyledPageBody","StyledPagePaper","exports","Paper","MenuItemsMock","_ref","_ref$mobile","mobile","activeItem","createElement","className","Caption1","weight","color","map","_ref2","Icon","Tooltip","key","title","placement","disable","undefined","Body2","whitespace","MainMenuMock","_ref3","collapsed","onToggleCollapsed","footer","MainLogo","variant","size","onClick","CollapsIcon","MainMenuMobileMock","_ref4","open","close","Modal","onClose","CloseIcon","MobileMenuHeaderMock","_ref5","onOpenMobileMenu","MobileMenuIcon","SearchIcon","NotificationBellIcon","TopRightControlsMock","ClockStopwatchIndicatorIcon","PresentationShell","_ref6","header","children","floating","menuFooter","_ref6$activeMenuItem","activeMenuItem","_useState","useState","_useState2","mobileMenuOpen","setMobileMenuOpen","_useState3","_useState4","setCollapsed","_useState5","_useState6","isMobileView","setIsMobileView","ref","useRef","dimensions","useResizeObserver","width","useEffect","BREAKPOINT","handleOpenMobileMenu","useCallback","handleCloseMobileMenu","handleToggleCollapsed","prev","id"],"sources":["../../../../src/presentation/shared/PresentationShell.tsx"],"sourcesContent":["import React, {\n ReactElement,\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { MainLogo } from \"./MainLogo\";\nimport { BREAKPOINT, SM, TRANSITION, XL } from \"./tokens\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ActivityIcon,\n CalendarIcon,\n ClockStopwatchIndicatorIcon,\n CloseIcon,\n CollapsIcon,\n EstimatesIcon,\n InvoicesIcon,\n MobileMenuIcon,\n MyWorkIcon,\n NotificationBellIcon,\n PeopleIcon,\n ProjectsIcon,\n ReportTimeIcon,\n ReportsIcon,\n RocketIcon,\n SearchIcon,\n} from \"../../components/Icons\";\nimport { Modal } from \"../../components/Modal\";\nimport { Paper } from \"../../components/Paper\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Body2, Caption1 } from \"../../components/Typography\";\nimport { DARK_THEME_SELECTOR, useResizeObserver } from \"../../utils\";\n\nconst MENU_ITEMS: {\n icon: React.FC<React.SVGProps<SVGSVGElement>>;\n text: string;\n}[] = [\n { icon: RocketIcon, text: \"Getting Started\" },\n { icon: ProjectsIcon, text: \"Projects\" },\n { icon: MyWorkIcon, text: \"My Work\" },\n { icon: ActivityIcon, text: \"Activity\" },\n { icon: CalendarIcon, text: \"Calendar\" },\n { icon: PeopleIcon, text: \"People\" },\n { icon: ReportTimeIcon, text: \"Time\" },\n { icon: ReportsIcon, text: \"Reports\" },\n { icon: InvoicesIcon, text: \"Invoices\" },\n { icon: EstimatesIcon, text: \"Estimates\" },\n];\n\n/* ------------------------------------------------------------------ */\n/* Layout shell (mirrors Layout.js) */\n/* ------------------------------------------------------------------ */\n\nconst StyledLayout = styled.div`\n height: 100vh;\n display: flex;\n flex-direction: column;\n background-color: var(--body-bg-main);\n`;\n\nconst StyledContentRow = styled.div`\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 0%;\n flex-grow: 1;\n overflow-y: auto;\n`;\n\nconst StyledRightWindow = styled.div`\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 0%;\n flex-grow: 1;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n padding: 0 16px;\n\n @media (min-width: ${SM}) {\n padding-right: 32px;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Main menu (mirrors MainMenu.js + MainMenu.less) */\n/* ------------------------------------------------------------------ */\n\nconst StyledMainMenu = styled.div`\n position: relative;\n z-index: 1;\n display: none;\n flex-direction: column;\n height: 100%;\n margin-right: 4px;\n flex-shrink: 0;\n width: 240px;\n transition: width ${TRANSITION};\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n\n &.collapsed {\n width: 72px;\n }\n\n .menu-item-text,\n .menu-section,\n #logotype {\n transition: all ${TRANSITION};\n }\n\n &.collapsed .menu-item-text {\n opacity: 0;\n visibility: hidden;\n width: 0;\n margin-left: 0;\n }\n\n &.collapsed .menu-section {\n transform: scaleY(0);\n opacity: 0;\n max-height: 0;\n margin-bottom: 0;\n }\n\n &.collapsed #logotype {\n transform: translateX(-5%);\n opacity: 0;\n }\n\n &.collapsed .collapse-expand-menu svg {\n transform: rotate(180deg);\n }\n\n &:not(.mobile) {\n @media (max-width: 1279.98px) {\n width: 72px;\n\n .menu-item-text {\n opacity: 0;\n visibility: hidden;\n width: 0;\n margin-left: 0;\n }\n\n .menu-section {\n transform: scaleY(0);\n opacity: 0;\n max-height: 0;\n margin-bottom: 0;\n }\n\n #logotype {\n transform: translateX(-5%);\n opacity: 0;\n }\n }\n }\n\n &.mobile {\n display: flex;\n position: absolute;\n left: 0;\n top: 0;\n width: 240px;\n background-color: var(--page-paper-main);\n }\n`;\n\nconst StyledMenuHeader = styled.div`\n position: relative;\n height: 68px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n overflow: hidden;\n\n .main-logo {\n position: absolute;\n left: 20px;\n color: var(--color-secondary);\n\n path {\n fill: var(--color-secondary);\n }\n }\n\n .collapse-expand-menu {\n position: absolute;\n right: 4px;\n display: none;\n\n @media (min-width: ${XL}) {\n display: flex;\n }\n }\n`;\n\nconst StyledMenuScroll = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n min-height: 0;\n margin: 12px 0;\n overflow-y: auto;\n overflow-x: hidden;\n`;\n\nconst StyledMenuSection = styled.div`\n display: flex;\n align-items: center;\n margin: 0 12px 8px;\n padding: 0 4px 0 12px;\n`;\n\nconst StyledMenuItem = styled.a`\n display: flex;\n align-items: center;\n height: 40px;\n padding: 0 4px 0 12px;\n margin: 0 12px 2px;\n border-radius: 8px;\n cursor: pointer;\n text-decoration: none;\n\n svg {\n flex-shrink: 0;\n fill: var(--color-theme-700);\n opacity: 0.7;\n }\n\n .menu-item-text {\n margin-left: 12px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &:hover {\n transition: all ${TRANSITION};\n background-color: var(--color-theme-300);\n\n svg {\n fill: var(--color-theme-900);\n opacity: 1;\n }\n\n .menu-item-text {\n color: var(--color-theme-900);\n }\n }\n\n &.active {\n background-color: var(--color-secondary-200);\n\n svg {\n fill: var(--color-secondary);\n opacity: 1;\n }\n\n .menu-item-text {\n color: var(--color-secondary);\n }\n }\n`;\n\nconst StyledMobileMenuClose = styled(IconButton)`\n position: absolute;\n right: 16px;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Top bars */\n/* ------------------------------------------------------------------ */\n\nconst StyledMobileMenuHeader = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 16px;\n background-color: var(--color-primary);\n z-index: 50;\n\n @media (min-width: ${SM}) {\n display: none;\n }\n\n .mobile-menu-icon {\n fill: var(--color-theme-300);\n }\n`;\n\nconst StyledIconRow = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst StyledTopRightControls = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n z-index: 11;\n display: none;\n align-items: center;\n justify-content: flex-end;\n padding: 12px 32px 12px 0;\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n`;\n\nconst StyledHeaderAvatar = styled.div`\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background-color: var(--color-secondary);\n color: var(--only-white);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 600;\n margin: 0 8px;\n flex-shrink: 0;\n cursor: pointer;\n\n /* dark themes: use paper colour for the initials */\n ${DARK_THEME_SELECTOR} & {\n color: var(--page-paper-main);\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Page region (mirrors Page.jsx / PageBody.jsx) */\n/* ------------------------------------------------------------------ */\n\nconst StyledPage = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n`;\n\nconst StyledPageBody = styled.div`\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin-bottom: 32px;\n min-height: 0;\n`;\n\n/** The paper card that holds page content (used by list view & empty pages). */\nexport const StyledPagePaper = styled(Paper)`\n flex-grow: 1;\n width: 100%;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Mocked layout building blocks */\n/* ------------------------------------------------------------------ */\n\ninterface MenuItemsProps {\n mobile?: boolean;\n activeItem: string;\n}\n\nconst MenuItemsMock = ({\n mobile = false,\n activeItem,\n}: MenuItemsProps): ReactElement => (\n <StyledMenuScroll>\n <StyledMenuSection className=\"menu-section\">\n <Caption1 weight=\"bold\" color=\"tertiary\">\n MENU\n </Caption1>\n </StyledMenuSection>\n {MENU_ITEMS.map(({ icon: Icon, text }) => (\n <Tooltip key={text} title={text} placement=\"right\" disable={mobile}>\n <StyledMenuItem className={text === activeItem ? \"active\" : undefined}>\n <Icon />\n <Body2\n weight=\"medium\"\n color=\"secondary\"\n whitespace=\"no-wrap\"\n className=\"menu-item-text\"\n >\n {text}\n </Body2>\n </StyledMenuItem>\n </Tooltip>\n ))}\n </StyledMenuScroll>\n);\n\ninterface MainMenuMockProps {\n collapsed: boolean;\n onToggleCollapsed: () => void;\n footer?: ReactNode;\n activeItem: string;\n}\n\nconst MainMenuMock = ({\n collapsed,\n onToggleCollapsed,\n footer,\n activeItem,\n}: MainMenuMockProps): ReactElement => (\n <StyledMainMenu\n className={collapsed ? \"collapsed\" : undefined}\n data-testid=\"main-menu\"\n >\n <StyledMenuHeader>\n <a className=\"main-logo\">\n <MainLogo />\n </a>\n <div className=\"collapse-expand-menu\">\n <IconButton\n variant=\"text gray\"\n size=\"small\"\n onClick={onToggleCollapsed}\n >\n <CollapsIcon />\n </IconButton>\n </div>\n </StyledMenuHeader>\n <MenuItemsMock activeItem={activeItem} />\n {footer}\n </StyledMainMenu>\n);\n\ninterface MainMenuMobileMockProps {\n open: boolean;\n close: () => void;\n footer?: ReactNode;\n activeItem: string;\n}\n\nconst MainMenuMobileMock = ({\n open,\n close,\n footer,\n activeItem,\n}: MainMenuMobileMockProps): ReactElement | null =>\n open ? (\n <Modal open={open} onClose={close}>\n <StyledMainMenu className=\"mobile\" data-testid=\"main-menu-mobile\">\n <StyledMenuHeader>\n <a className=\"main-logo\">\n <MainLogo />\n </a>\n <StyledMobileMenuClose onClick={close} variant=\"text gray\">\n <CloseIcon />\n </StyledMobileMenuClose>\n </StyledMenuHeader>\n <MenuItemsMock mobile activeItem={activeItem} />\n {footer}\n </StyledMainMenu>\n </Modal>\n ) : null;\n\ninterface MobileMenuHeaderMockProps {\n onOpenMobileMenu: () => void;\n}\n\nconst MobileMenuHeaderMock = ({\n onOpenMobileMenu,\n}: MobileMenuHeaderMockProps): ReactElement => (\n <StyledMobileMenuHeader>\n <IconButton size=\"big\" variant=\"circle raised\" onClick={onOpenMobileMenu}>\n <MobileMenuIcon className=\"mobile-menu-icon\" />\n </IconButton>\n <StyledIconRow>\n <IconButton variant=\"text gray\">\n <SearchIcon />\n </IconButton>\n <StyledHeaderAvatar>JS</StyledHeaderAvatar>\n <IconButton variant=\"text gray\">\n <NotificationBellIcon />\n </IconButton>\n </StyledIconRow>\n </StyledMobileMenuHeader>\n);\n\nconst TopRightControlsMock = (): ReactElement => (\n <StyledTopRightControls>\n <IconButton variant=\"text gray\">\n <ClockStopwatchIndicatorIcon />\n </IconButton>\n <IconButton variant=\"text gray\">\n <SearchIcon />\n </IconButton>\n <StyledHeaderAvatar>JS</StyledHeaderAvatar>\n <IconButton variant=\"text gray\">\n <NotificationBellIcon />\n </IconButton>\n </StyledTopRightControls>\n);\n\n/* ------------------------------------------------------------------ */\n/* PresentationShell */\n/* ------------------------------------------------------------------ */\n\nexport interface PresentationShellProps {\n /** Page header row (e.g. <ProjectPageHeader /> or <PageHeader title=\"…\" />). */\n header: ReactNode;\n /** Page body content rendered inside the scrollable page area. */\n children: ReactNode;\n /** Optional fixed controls (e.g. <FloatingControls />). */\n floating?: ReactNode;\n /** Optional content pinned to the bottom of the main menu (e.g. <HelpAndSupportMenu />). */\n menuFooter?: ReactNode;\n activeMenuItem?: string;\n}\n\n/**\n * The full application shell shared by every presentation mock-up: the main\n * menu on the left (auto-collapsing below 1280px, modal below 640px), the\n * top-right controls and the scrollable page area. Pass the page header via\n * `header` and the body via `children`.\n */\nexport const PresentationShell = ({\n header,\n children,\n floating,\n menuFooter,\n activeMenuItem = \"Projects\",\n}: PresentationShellProps): ReactElement => {\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false);\n const [collapsed, setCollapsed] = useState(false);\n const [isMobileView, setIsMobileView] = useState<boolean>();\n\n const ref = useRef<HTMLDivElement>(null);\n const dimensions = useResizeObserver(ref);\n const width = dimensions?.width;\n\n useEffect(() => {\n if (width) {\n if (width < BREAKPOINT) {\n setIsMobileView(true);\n } else {\n setIsMobileView(false);\n setMobileMenuOpen(false);\n }\n }\n }, [width]);\n\n const handleOpenMobileMenu = useCallback(() => setMobileMenuOpen(true), []);\n const handleCloseMobileMenu = useCallback(() => setMobileMenuOpen(false), []);\n const handleToggleCollapsed = useCallback(\n () => setCollapsed((prev) => !prev),\n []\n );\n\n return (\n <StyledLayout ref={ref}>\n {isMobileView ? (\n <MobileMenuHeaderMock onOpenMobileMenu={handleOpenMobileMenu} />\n ) : null}\n <StyledContentRow>\n <StyledRightWindow id=\"right-window\">\n <StyledPage>\n {header}\n <StyledPageBody>{children}</StyledPageBody>\n </StyledPage>\n {isMobileView === false ? <TopRightControlsMock /> : null}\n </StyledRightWindow>\n {isMobileView ? (\n <MainMenuMobileMock\n open={mobileMenuOpen}\n close={handleCloseMobileMenu}\n footer={menuFooter}\n activeItem={activeMenuItem}\n />\n ) : (\n <MainMenuMock\n collapsed={collapsed}\n onToggleCollapsed={handleToggleCollapsed}\n footer={menuFooter}\n activeItem={activeMenuItem}\n />\n )}\n </StyledContentRow>\n {floating}\n </StyledLayout>\n );\n};\n\nPresentationShell.displayName = \"PresentationShell\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AASA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAkBA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAAqE,SAAAE,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAb,wBAAAa,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAjB,uBAAA,YAAAA,wBAAAa,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,C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,aAAA,CAAC0B,kBAAkB;IACjBE,IAAI,EAAEwB,cAAe;IACrBvB,KAAK,EAAEyC,qBAAsB;IAC7BlD,MAAM,EAAE0B,UAAW;IACnB/C,UAAU,EAAEiD;EAAe,CAC5B,CAAC,gBAEF1J,MAAA,CAAAgB,OAAA,CAAA0F,aAAA,CAACgB,YAAY;IACXE,SAAS,EAAEA,SAAU;IACrBC,iBAAiB,EAAEoD,qBAAsB;IACzCnD,MAAM,EAAE0B,UAAW;IACnB/C,UAAU,EAAEiD;EAAe,CAC5B,CAEa,CAAC,EAClBH,QACW,CAAC;AAEnB,CAAC;AAEDJ,iBAAiB,CAACtE,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ exports.UserDetailsDialog = exports.USER_DETAILS_AVATAR_SIZE = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
var _RoundAvatar = require("./RoundAvatar");
|
|
10
|
+
var _Badge = require("../../components/Badge");
|
|
10
11
|
var _Button = require("../../components/Button");
|
|
11
12
|
var _Chip = require("../../components/Chip");
|
|
12
13
|
var _Dialog = require("../../components/Dialog");
|
|
@@ -46,7 +47,7 @@ var StyledHeader = _styledComponents.default.div.withConfig({
|
|
|
46
47
|
var StyledAvatar = _styledComponents.default.div.withConfig({
|
|
47
48
|
displayName: "UserDetailsDialog__StyledAvatar",
|
|
48
49
|
componentId: "sc-4r9p4-1"
|
|
49
|
-
})(["flex-shrink:0;width:", "px;height:", "px;.udd-avatar-image{background-size:cover;background-position:center;color:transparent;}"], function (props) {
|
|
50
|
+
})(["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;}"], function (props) {
|
|
50
51
|
return props.$size;
|
|
51
52
|
}, function (props) {
|
|
52
53
|
return props.$size;
|
|
@@ -71,6 +72,11 @@ var UserDetailsDialog = exports.UserDetailsDialog = function UserDetailsDialog(_
|
|
|
71
72
|
email = _ref.email,
|
|
72
73
|
extraContactsCount = _ref.extraContactsCount,
|
|
73
74
|
joinedDate = _ref.joinedDate,
|
|
75
|
+
team = _ref.team,
|
|
76
|
+
_ref$online = _ref.online,
|
|
77
|
+
online = _ref$online === void 0 ? false : _ref$online,
|
|
78
|
+
_ref$avatarSize = _ref.avatarSize,
|
|
79
|
+
avatarSize = _ref$avatarSize === void 0 ? USER_DETAILS_AVATAR_SIZE : _ref$avatarSize,
|
|
74
80
|
onSendMessage = _ref.onSendMessage,
|
|
75
81
|
onSeeFullProfile = _ref.onSeeFullProfile,
|
|
76
82
|
onClose = _ref.onClose;
|
|
@@ -79,16 +85,21 @@ var UserDetailsDialog = exports.UserDetailsDialog = function UserDetailsDialog(_
|
|
|
79
85
|
onClose: onClose,
|
|
80
86
|
enableBackgroundClick: true
|
|
81
87
|
}, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Content, null, /*#__PURE__*/_react.default.createElement(StyledHeader, null, /*#__PURE__*/_react.default.createElement(StyledAvatar, {
|
|
82
|
-
$size:
|
|
88
|
+
$size: avatarSize
|
|
83
89
|
}, /*#__PURE__*/_react.default.createElement(_RoundAvatar.RoundAvatar, {
|
|
84
|
-
$size:
|
|
90
|
+
$size: avatarSize,
|
|
85
91
|
$bg: avatar.color,
|
|
86
92
|
$bordered: false,
|
|
87
93
|
className: avatar.imageUrl ? "udd-avatar-image" : undefined,
|
|
88
94
|
style: avatar.imageUrl ? {
|
|
89
95
|
backgroundImage: "url(".concat(avatar.imageUrl, ")")
|
|
90
96
|
} : undefined
|
|
91
|
-
}, avatar.imageUrl ? "" : avatar.initials)
|
|
97
|
+
}, avatar.imageUrl ? "" : avatar.initials), online ? /*#__PURE__*/_react.default.createElement(_Badge.Badge, {
|
|
98
|
+
dimension: 20,
|
|
99
|
+
position: "bottom-right",
|
|
100
|
+
backgroundColor: "var(--color-sucess-green)",
|
|
101
|
+
className: "udd-online"
|
|
102
|
+
}) : null), /*#__PURE__*/_react.default.createElement(StyledInfo, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
92
103
|
className: "udd-name-row"
|
|
93
104
|
}, /*#__PURE__*/_react.default.createElement(_Typography.Header2, null, name), hoursLabel ? /*#__PURE__*/_react.default.createElement("span", {
|
|
94
105
|
className: "udd-hours"
|
|
@@ -107,7 +118,9 @@ var UserDetailsDialog = exports.UserDetailsDialog = function UserDetailsDialog(_
|
|
|
107
118
|
className: "udd-more"
|
|
108
119
|
}, "+ ", extraContactsCount, " more") : null), /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
109
120
|
color: "secondary"
|
|
110
|
-
}, joinedDate)
|
|
121
|
+
}, joinedDate), team ? /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
122
|
+
color: "secondary"
|
|
123
|
+
}, "Team: ", team) : null), /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
|
|
111
124
|
className: "udd-close",
|
|
112
125
|
variant: "text gray",
|
|
113
126
|
onClick: onClose,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserDetailsDialog.js","names":["_react","_interopRequireDefault","require","_styledComponents","_RoundAvatar","_Button","_Chip","_Dialog","_IconButton","_Icons","_Typography","e","__esModule","default","USER_DETAILS_AVATAR_SIZE","exports","StyledHeader","styled","div","withConfig","displayName","componentId","StyledAvatar","props","$size","StyledInfo","StyledActions","UserDetailsDialog","_ref","open","avatar","name","hoursLabel","email","extraContactsCount","joinedDate","onSendMessage","onSeeFullProfile","onClose","createElement","Dialog","enableBackgroundClick","Content","RoundAvatar","$bg","color","$bordered","className","imageUrl","undefined","style","backgroundImage","concat","initials","Header2","Chip","size","label","backgroundColor","Body2","Caption1","IconButton","variant","onClick","CancelCrossIcon","ContentDivider","Actions","Button"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAAuE,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvE;AACA;A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AA0B,aAAA,CAAClC,OAAA,CAAA8D,MAAM;IACLL,OAAO,EAAC,cAAc;IACtBf,SAAS,EAAC,kBAAkB;IAC5BgB,OAAO,EAAE1B;EAAiB,GAC3B,kBAEO,CACK,CACD,CACV,CAAC;AAAA,CACV;AAEDV,iBAAiB,CAACP,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"UserDetailsDialog.js","names":["_react","_interopRequireDefault","require","_styledComponents","_RoundAvatar","_Badge","_Button","_Chip","_Dialog","_IconButton","_Icons","_Typography","e","__esModule","default","USER_DETAILS_AVATAR_SIZE","exports","StyledHeader","styled","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","Dialog","enableBackgroundClick","Content","RoundAvatar","$bg","color","$bordered","className","imageUrl","undefined","style","backgroundImage","concat","initials","Badge","dimension","position","backgroundColor","Header2","Chip","size","label","Body2","Caption1","IconButton","variant","onClick","CancelCrossIcon","ContentDivider","Actions","Button"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAAuE,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACO,IAAMG,wBAAwB,GAAAC,OA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AAA+B,aAAA,CAACnC,MAAA,CAAA+D,eAAe,MAAE,CACR,CACA,CACA,CAAC,eAEjBzE,MAAA,CAAAc,OAAA,CAAA+B,aAAA,CAACrC,OAAA,CAAAsC,MAAM,CAAC4B,cAAc,MAAE,CAAC,eAEzB1E,MAAA,CAAAc,OAAA,CAAA+B,aAAA,CAACrC,OAAA,CAAAsC,MAAM,CAAC6B,OAAO,qBACb3E,MAAA,CAAAc,OAAA,CAAA+B,aAAA,CAAClB,aAAa,qBACZ3B,MAAA,CAAAc,OAAA,CAAA+B,aAAA,CAACvC,OAAA,CAAAsE,MAAM;IAACL,OAAO,EAAC,SAAS;IAACC,OAAO,EAAE9B;EAAc,GAAC,cAE1C,CAAC,eACT1C,MAAA,CAAAc,OAAA,CAAA+B,aAAA,CAACvC,OAAA,CAAAsE,MAAM;IACLL,OAAO,EAAC,cAAc;IACtBlB,SAAS,EAAC,kBAAkB;IAC5BmB,OAAO,EAAE7B;EAAiB,GAC3B,kBAEO,CACK,CACD,CACV,CAAC;AAAA,CACV;AAEDf,iBAAiB,CAACP,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.WidgetRankedList = exports.WidgetGroupBy = exports.WidgetGrid = exports.StatWidget = exports.StackedBarChartWidget = exports.PeriodPicker = exports.PERIOD_OPTIONS = exports.OverviewWidget = exports.OVERVIEW_SECTION_COLORS = exports.LeaderboardWidget = exports.DailyDeltaChartWidget = exports.CHART_SERIES_COLORS = exports.AreaChartWidget = void 0;
|
|
6
|
+
exports.WidgetRankedList = exports.WidgetGroupBy = exports.WidgetGrid = exports.StatWidget = exports.StackedBarChartWidget = exports.PeriodPicker = exports.PERIOD_OPTIONS = exports.OverviewWidget = exports.OVERVIEW_SECTION_COLORS = exports.LeaderboardWidget = exports.DailyDeltaChartWidget = exports.CurrencyPicker = exports.CHART_SERIES_COLORS = exports.AreaChartWidget = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
var _tokens = require("./tokens");
|
|
@@ -12,6 +12,7 @@ var _Icons = require("../../components/Icons");
|
|
|
12
12
|
var _ProgressBar = require("../../components/ProgressBar");
|
|
13
13
|
var _ProgressRing = require("../../components/ProgressRing");
|
|
14
14
|
var _Select = require("../../components/Select");
|
|
15
|
+
var _SelectTrigger = require("../../components/SelectTrigger");
|
|
15
16
|
var _Tooltip = require("../../components/Tooltip");
|
|
16
17
|
var _Typography = require("../../components/Typography");
|
|
17
18
|
var _ValueButton = require("../../components/ValueButton");
|
|
@@ -200,25 +201,59 @@ var PeriodPicker = exports.PeriodPicker = function PeriodPicker(_ref2) {
|
|
|
200
201
|
};
|
|
201
202
|
PeriodPicker.displayName = "PeriodPicker";
|
|
202
203
|
|
|
204
|
+
/* ------------------------------------------------------------------ */
|
|
205
|
+
/* Currency picker (mirrors Reports/CurrencyPicker.js) */
|
|
206
|
+
/* ------------------------------------------------------------------ */
|
|
207
|
+
|
|
208
|
+
var StyledCurrencyPicker = _styledComponents.default.div.withConfig({
|
|
209
|
+
displayName: "dashboardWidgets__StyledCurrencyPicker",
|
|
210
|
+
componentId: "sc-lm5ek4-1"
|
|
211
|
+
})([".currency-trigger.currency-trigger{width:80px;min-width:80px;}"]);
|
|
212
|
+
var CurrencyPicker = exports.CurrencyPicker = function CurrencyPicker(_ref3) {
|
|
213
|
+
var _options$find;
|
|
214
|
+
var options = _ref3.options,
|
|
215
|
+
selected = _ref3.selected,
|
|
216
|
+
_onChange3 = _ref3.onChange;
|
|
217
|
+
return /*#__PURE__*/_react.default.createElement(StyledCurrencyPicker, null, /*#__PURE__*/_react.default.createElement(_Select.Select, {
|
|
218
|
+
options: options,
|
|
219
|
+
selected: selected,
|
|
220
|
+
onChange: function onChange(value) {
|
|
221
|
+
return _onChange3(String(value));
|
|
222
|
+
},
|
|
223
|
+
position: "bottom-end",
|
|
224
|
+
forceCloseMenu: true,
|
|
225
|
+
disableSearch: true,
|
|
226
|
+
keepSameOptionsOrder: true,
|
|
227
|
+
disabledInternalSort: true,
|
|
228
|
+
target: /*#__PURE__*/_react.default.createElement(_SelectTrigger.SelectTrigger, {
|
|
229
|
+
size: "small",
|
|
230
|
+
className: "currency-trigger"
|
|
231
|
+
}, (_options$find = options.find(function (option) {
|
|
232
|
+
return option.id === selected;
|
|
233
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.name)
|
|
234
|
+
}));
|
|
235
|
+
};
|
|
236
|
+
CurrencyPicker.displayName = "CurrencyPicker";
|
|
237
|
+
|
|
203
238
|
/* ------------------------------------------------------------------ */
|
|
204
239
|
/* Stat widget (mirrors Widget.js) */
|
|
205
240
|
/* ------------------------------------------------------------------ */
|
|
206
241
|
|
|
207
242
|
var StyledWidget = _styledComponents.default.div.withConfig({
|
|
208
243
|
displayName: "dashboardWidgets__StyledWidget",
|
|
209
|
-
componentId: "sc-lm5ek4-
|
|
244
|
+
componentId: "sc-lm5ek4-2"
|
|
210
245
|
})(["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.colors.greenSuccess.color, _colors.colors.greenSuccess.color);
|
|
211
|
-
var StatWidget = exports.StatWidget = function StatWidget(
|
|
212
|
-
var value =
|
|
213
|
-
unit =
|
|
214
|
-
title =
|
|
215
|
-
description =
|
|
216
|
-
linkText =
|
|
217
|
-
alert =
|
|
218
|
-
success =
|
|
219
|
-
groupBy =
|
|
220
|
-
cornerControl =
|
|
221
|
-
children =
|
|
246
|
+
var StatWidget = exports.StatWidget = function StatWidget(_ref4) {
|
|
247
|
+
var value = _ref4.value,
|
|
248
|
+
unit = _ref4.unit,
|
|
249
|
+
title = _ref4.title,
|
|
250
|
+
description = _ref4.description,
|
|
251
|
+
linkText = _ref4.linkText,
|
|
252
|
+
alert = _ref4.alert,
|
|
253
|
+
success = _ref4.success,
|
|
254
|
+
groupBy = _ref4.groupBy,
|
|
255
|
+
cornerControl = _ref4.cornerControl,
|
|
256
|
+
children = _ref4.children;
|
|
222
257
|
return /*#__PURE__*/_react.default.createElement(StyledWidget, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
223
258
|
className: "widget-top"
|
|
224
259
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -251,12 +286,12 @@ StatWidget.displayName = "StatWidget";
|
|
|
251
286
|
|
|
252
287
|
var StyledRankedList = _styledComponents.default.div.withConfig({
|
|
253
288
|
displayName: "dashboardWidgets__StyledRankedList",
|
|
254
|
-
componentId: "sc-lm5ek4-
|
|
289
|
+
componentId: "sc-lm5ek4-3"
|
|
255
290
|
})(["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;}"]);
|
|
256
291
|
|
|
257
292
|
/** The striped name/count rows inside a tall stat widget. */
|
|
258
|
-
var WidgetRankedList = exports.WidgetRankedList = function WidgetRankedList(
|
|
259
|
-
var items =
|
|
293
|
+
var WidgetRankedList = exports.WidgetRankedList = function WidgetRankedList(_ref5) {
|
|
294
|
+
var items = _ref5.items;
|
|
260
295
|
return /*#__PURE__*/_react.default.createElement(StyledRankedList, null, items.map(function (item) {
|
|
261
296
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
262
297
|
className: "ranked-row",
|
|
@@ -280,7 +315,7 @@ var RING_RADII = [121, 93, 63];
|
|
|
280
315
|
var RING_STROKE = 20;
|
|
281
316
|
var StyledOverview = _styledComponents.default.div.withConfig({
|
|
282
317
|
displayName: "dashboardWidgets__StyledOverview",
|
|
283
|
-
componentId: "sc-lm5ek4-
|
|
318
|
+
componentId: "sc-lm5ek4-4"
|
|
284
319
|
})(["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;}}"], _tokens.SM, _tokens.SM, _tokens.SM);
|
|
285
320
|
var ringColor = function ringColor(section, hovered) {
|
|
286
321
|
var active = !hovered || hovered === section.id;
|
|
@@ -293,9 +328,9 @@ var ringTrack = function ringTrack(section, hovered) {
|
|
|
293
328
|
var active = !hovered || hovered === section.id;
|
|
294
329
|
return active ? section.trackColor : "var(--color-theme-200)";
|
|
295
330
|
};
|
|
296
|
-
var OverviewSection = function OverviewSection(
|
|
297
|
-
var section =
|
|
298
|
-
onHover =
|
|
331
|
+
var OverviewSection = function OverviewSection(_ref6) {
|
|
332
|
+
var section = _ref6.section,
|
|
333
|
+
onHover = _ref6.onHover;
|
|
299
334
|
var alert = section.progress > 100;
|
|
300
335
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
301
336
|
className: "overview-section",
|
|
@@ -337,11 +372,11 @@ var OverviewSection = function OverviewSection(_ref5) {
|
|
|
337
372
|
/** The big overview card: accent-line metric sections + nested rings.
|
|
338
373
|
* Hovering a section highlights its ring and mutes the other rings,
|
|
339
374
|
* exactly like the app's Projects Overview. */
|
|
340
|
-
var OverviewWidget = exports.OverviewWidget = function OverviewWidget(
|
|
341
|
-
var title =
|
|
342
|
-
subtitle =
|
|
343
|
-
sections =
|
|
344
|
-
headerRight =
|
|
375
|
+
var OverviewWidget = exports.OverviewWidget = function OverviewWidget(_ref7) {
|
|
376
|
+
var title = _ref7.title,
|
|
377
|
+
subtitle = _ref7.subtitle,
|
|
378
|
+
sections = _ref7.sections,
|
|
379
|
+
headerRight = _ref7.headerRight;
|
|
345
380
|
var _useState7 = (0, _react.useState)(null),
|
|
346
381
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
347
382
|
hovered = _useState8[0],
|
|
@@ -389,23 +424,31 @@ OverviewWidget.displayName = "OverviewWidget";
|
|
|
389
424
|
var PLOT_HEIGHT = 116;
|
|
390
425
|
var StyledChartWidget = _styledComponents.default.div.withConfig({
|
|
391
426
|
displayName: "dashboardWidgets__StyledChartWidget",
|
|
392
|
-
componentId: "sc-lm5ek4-
|
|
393
|
-
})(["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);
|
|
394
|
-
var ChartHead = function ChartHead(
|
|
395
|
-
var title =
|
|
396
|
-
linkText =
|
|
427
|
+
componentId: "sc-lm5ek4-5"
|
|
428
|
+
})(["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);
|
|
429
|
+
var ChartHead = function ChartHead(_ref8) {
|
|
430
|
+
var title = _ref8.title,
|
|
431
|
+
linkText = _ref8.linkText,
|
|
432
|
+
links = _ref8.links;
|
|
433
|
+
var texts = links !== null && links !== void 0 ? links : linkText ? [linkText] : [];
|
|
397
434
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
398
435
|
className: "chart-head"
|
|
399
436
|
}, /*#__PURE__*/_react.default.createElement(_Typography.Body1, {
|
|
400
437
|
weight: "bold",
|
|
401
438
|
overflow: "truncate",
|
|
402
439
|
whitespace: "no-wrap"
|
|
403
|
-
}, title),
|
|
404
|
-
className: "chart-
|
|
405
|
-
},
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
440
|
+
}, title), texts.length ? /*#__PURE__*/_react.default.createElement("span", {
|
|
441
|
+
className: "chart-links"
|
|
442
|
+
}, texts.map(function (text) {
|
|
443
|
+
return /*#__PURE__*/_react.default.createElement("a", {
|
|
444
|
+
className: "chart-link",
|
|
445
|
+
key: text
|
|
446
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
447
|
+
color: "theme-primary",
|
|
448
|
+
weight: "medium",
|
|
449
|
+
whitespace: "no-wrap"
|
|
450
|
+
}, text));
|
|
451
|
+
})) : null);
|
|
409
452
|
};
|
|
410
453
|
|
|
411
454
|
/* ------------------------------------------------------------------ */
|
|
@@ -415,12 +458,12 @@ var ChartHead = function ChartHead(_ref7) {
|
|
|
415
458
|
/** Line + gradient fill colours from the real widget. */
|
|
416
459
|
var AREA_LINE = "#A3CDFF";
|
|
417
460
|
/** Sharp-edged line with a soft gradient below, like "Number of Open Tasks". */
|
|
418
|
-
var AreaChartWidget = exports.AreaChartWidget = function AreaChartWidget(
|
|
419
|
-
var title =
|
|
420
|
-
linkText =
|
|
421
|
-
points =
|
|
422
|
-
xLabels =
|
|
423
|
-
yTicks =
|
|
461
|
+
var AreaChartWidget = exports.AreaChartWidget = function AreaChartWidget(_ref9) {
|
|
462
|
+
var title = _ref9.title,
|
|
463
|
+
linkText = _ref9.linkText,
|
|
464
|
+
points = _ref9.points,
|
|
465
|
+
xLabels = _ref9.xLabels,
|
|
466
|
+
yTicks = _ref9.yTicks;
|
|
424
467
|
var min = Math.min(...yTicks);
|
|
425
468
|
var max = Math.max(...yTicks);
|
|
426
469
|
var range = max - min || 1;
|
|
@@ -497,19 +540,20 @@ var DELTA_UP = "#A3CDFF";
|
|
|
497
540
|
var DELTA_DOWN = "#FF9C9C";
|
|
498
541
|
var StyledDeltaBars = _styledComponents.default.div.withConfig({
|
|
499
542
|
displayName: "dashboardWidgets__StyledDeltaBars",
|
|
500
|
-
componentId: "sc-lm5ek4-
|
|
543
|
+
componentId: "sc-lm5ek4-6"
|
|
501
544
|
})(["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);
|
|
502
545
|
|
|
503
546
|
/** Thin daily bars above/below a zero line, like "New vs Completed Tasks". */
|
|
504
|
-
var DailyDeltaChartWidget = exports.DailyDeltaChartWidget = function DailyDeltaChartWidget(
|
|
505
|
-
var title =
|
|
506
|
-
linkText =
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
547
|
+
var DailyDeltaChartWidget = exports.DailyDeltaChartWidget = function DailyDeltaChartWidget(_ref0) {
|
|
548
|
+
var title = _ref0.title,
|
|
549
|
+
linkText = _ref0.linkText,
|
|
550
|
+
links = _ref0.links,
|
|
551
|
+
data = _ref0.data,
|
|
552
|
+
xLabels = _ref0.xLabels,
|
|
553
|
+
upMax = _ref0.upMax,
|
|
554
|
+
downMax = _ref0.downMax,
|
|
555
|
+
yTicksUp = _ref0.yTicksUp,
|
|
556
|
+
yTicksDown = _ref0.yTicksDown;
|
|
513
557
|
var upFrac = upMax / (upMax + downMax);
|
|
514
558
|
var zeroTop = upFrac * PLOT_HEIGHT;
|
|
515
559
|
var tickTop = function tickTop(value, below) {
|
|
@@ -517,7 +561,8 @@ var DailyDeltaChartWidget = exports.DailyDeltaChartWidget = function DailyDeltaC
|
|
|
517
561
|
};
|
|
518
562
|
return /*#__PURE__*/_react.default.createElement(StyledChartWidget, null, /*#__PURE__*/_react.default.createElement(ChartHead, {
|
|
519
563
|
title: title,
|
|
520
|
-
linkText: linkText
|
|
564
|
+
linkText: linkText,
|
|
565
|
+
links: links
|
|
521
566
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
522
567
|
className: "chart-row"
|
|
523
568
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -585,16 +630,16 @@ DailyDeltaChartWidget.displayName = "DailyDeltaChartWidget";
|
|
|
585
630
|
|
|
586
631
|
var StyledLeaderboard = _styledComponents.default.div.withConfig({
|
|
587
632
|
displayName: "dashboardWidgets__StyledLeaderboard",
|
|
588
|
-
componentId: "sc-lm5ek4-
|
|
633
|
+
componentId: "sc-lm5ek4-7"
|
|
589
634
|
})(["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;}"]);
|
|
590
635
|
|
|
591
636
|
/** Ranked bars: label, billable/non-billable bar, value — like Time's
|
|
592
637
|
* Leaderboard. Bar length = share of the leader; green = billable part. */
|
|
593
|
-
var LeaderboardWidget = exports.LeaderboardWidget = function LeaderboardWidget(
|
|
594
|
-
var title =
|
|
595
|
-
description =
|
|
596
|
-
rows =
|
|
597
|
-
groupBy =
|
|
638
|
+
var LeaderboardWidget = exports.LeaderboardWidget = function LeaderboardWidget(_ref1) {
|
|
639
|
+
var title = _ref1.title,
|
|
640
|
+
description = _ref1.description,
|
|
641
|
+
rows = _ref1.rows,
|
|
642
|
+
groupBy = _ref1.groupBy;
|
|
598
643
|
return /*#__PURE__*/_react.default.createElement(StyledLeaderboard, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
599
644
|
className: "lb-head"
|
|
600
645
|
}, /*#__PURE__*/_react.default.createElement(_Typography.Header2, null, title), groupBy ? /*#__PURE__*/_react.default.createElement(WidgetGroupBy, groupBy) : null), /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
@@ -639,22 +684,22 @@ LeaderboardWidget.displayName = "LeaderboardWidget";
|
|
|
639
684
|
|
|
640
685
|
var StyledStackedChart = _styledComponents.default.div.withConfig({
|
|
641
686
|
displayName: "dashboardWidgets__StyledStackedChart",
|
|
642
|
-
componentId: "sc-lm5ek4-
|
|
687
|
+
componentId: "sc-lm5ek4-8"
|
|
643
688
|
})(["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);
|
|
644
689
|
|
|
645
690
|
/** Narrow stacked time columns, like the Time dashboard's tracked-hours
|
|
646
691
|
* chart. Segment order and palette follow the real chart. */
|
|
647
|
-
var StackedBarChartWidget = exports.StackedBarChartWidget = function StackedBarChartWidget(
|
|
648
|
-
var title =
|
|
649
|
-
total =
|
|
650
|
-
data =
|
|
651
|
-
seriesLabels =
|
|
652
|
-
yTicks =
|
|
653
|
-
|
|
654
|
-
barWidth =
|
|
655
|
-
|
|
656
|
-
height =
|
|
657
|
-
groupBy =
|
|
692
|
+
var StackedBarChartWidget = exports.StackedBarChartWidget = function StackedBarChartWidget(_ref10) {
|
|
693
|
+
var title = _ref10.title,
|
|
694
|
+
total = _ref10.total,
|
|
695
|
+
data = _ref10.data,
|
|
696
|
+
seriesLabels = _ref10.seriesLabels,
|
|
697
|
+
yTicks = _ref10.yTicks,
|
|
698
|
+
_ref10$barWidth = _ref10.barWidth,
|
|
699
|
+
barWidth = _ref10$barWidth === void 0 ? 28 : _ref10$barWidth,
|
|
700
|
+
_ref10$height = _ref10.height,
|
|
701
|
+
height = _ref10$height === void 0 ? 220 : _ref10$height,
|
|
702
|
+
groupBy = _ref10.groupBy;
|
|
658
703
|
var max = Math.max(...yTicks) || 1;
|
|
659
704
|
return /*#__PURE__*/_react.default.createElement(StyledStackedChart, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
660
705
|
className: "sb-head"
|