@lokalise/harmony 1.40.3-exp-epic2x.6 → 1.40.3-exp-epic2x.7
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/harmony100.cjs +10 -9
- package/dist/harmony100.cjs.map +1 -1
- package/dist/harmony100.mjs +12 -11
- package/dist/harmony100.mjs.map +1 -1
- package/dist/harmony101.cjs +11 -20
- package/dist/harmony101.cjs.map +1 -1
- package/dist/harmony101.mjs +11 -20
- package/dist/harmony101.mjs.map +1 -1
- package/dist/harmony105.cjs +87 -9
- package/dist/harmony105.cjs.map +1 -1
- package/dist/harmony105.mjs +86 -8
- package/dist/harmony105.mjs.map +1 -1
- package/dist/harmony106.cjs +29 -11
- package/dist/harmony106.cjs.map +1 -1
- package/dist/harmony106.mjs +29 -11
- package/dist/harmony106.mjs.map +1 -1
- package/dist/harmony107.cjs +9 -15
- package/dist/harmony107.cjs.map +1 -1
- package/dist/harmony107.mjs +8 -14
- package/dist/harmony107.mjs.map +1 -1
- package/dist/harmony108.cjs +6 -13
- package/dist/harmony108.cjs.map +1 -1
- package/dist/harmony108.mjs +8 -15
- package/dist/harmony108.mjs.map +1 -1
- package/dist/harmony109.cjs +12 -7
- package/dist/harmony109.cjs.map +1 -1
- package/dist/harmony109.mjs +14 -9
- package/dist/harmony109.mjs.map +1 -1
- package/dist/harmony110.cjs +13 -20
- package/dist/harmony110.cjs.map +1 -1
- package/dist/harmony110.mjs +15 -22
- package/dist/harmony110.mjs.map +1 -1
- package/dist/harmony111.cjs +7 -9
- package/dist/harmony111.cjs.map +1 -1
- package/dist/harmony111.mjs +9 -11
- package/dist/harmony111.mjs.map +1 -1
- package/dist/harmony112.cjs +18 -29
- package/dist/harmony112.cjs.map +1 -1
- package/dist/harmony112.mjs +20 -31
- package/dist/harmony112.mjs.map +1 -1
- package/dist/harmony113.cjs +6 -6
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +6 -6
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +28 -13
- package/dist/harmony114.cjs.map +1 -1
- package/dist/harmony114.mjs +29 -14
- package/dist/harmony114.mjs.map +1 -1
- package/dist/harmony115.cjs +7 -31
- package/dist/harmony115.cjs.map +1 -1
- package/dist/harmony115.mjs +8 -32
- package/dist/harmony115.mjs.map +1 -1
- package/dist/harmony116.cjs +22 -21
- package/dist/harmony116.cjs.map +1 -1
- package/dist/harmony116.mjs +21 -20
- package/dist/harmony116.mjs.map +1 -1
- package/dist/harmony117.cjs +30 -15
- package/dist/harmony117.cjs.map +1 -1
- package/dist/harmony117.mjs +32 -17
- package/dist/harmony117.mjs.map +1 -1
- package/dist/harmony118.cjs +18 -3
- package/dist/harmony118.cjs.map +1 -1
- package/dist/harmony118.mjs +18 -3
- package/dist/harmony118.mjs.map +1 -1
- package/dist/harmony119.cjs +21 -15
- package/dist/harmony119.cjs.map +1 -1
- package/dist/harmony119.mjs +20 -14
- package/dist/harmony119.mjs.map +1 -1
- package/dist/harmony120.cjs +6 -87
- package/dist/harmony120.cjs.map +1 -1
- package/dist/harmony120.mjs +5 -86
- package/dist/harmony120.mjs.map +1 -1
- package/dist/harmony121.cjs +16 -31
- package/dist/harmony121.cjs.map +1 -1
- package/dist/harmony121.mjs +15 -30
- package/dist/harmony121.mjs.map +1 -1
- package/dist/harmony77.cjs +2 -2
- package/dist/harmony77.mjs +2 -2
- package/dist/harmony80.cjs +2 -2
- package/dist/harmony80.mjs +2 -2
- package/dist/harmony84.cjs +1 -1
- package/dist/harmony84.mjs +1 -1
- package/dist/harmony85.cjs +7 -7
- package/dist/harmony85.mjs +7 -7
- package/dist/harmony87.cjs +2 -2
- package/dist/harmony87.mjs +2 -2
- package/dist/harmony88.cjs +165 -2
- package/dist/harmony88.cjs.map +1 -1
- package/dist/harmony88.mjs +166 -3
- package/dist/harmony88.mjs.map +1 -1
- package/dist/harmony89.cjs +42 -16
- package/dist/harmony89.cjs.map +1 -1
- package/dist/harmony89.mjs +42 -16
- package/dist/harmony89.mjs.map +1 -1
- package/dist/harmony90.cjs +3 -76
- package/dist/harmony90.cjs.map +1 -1
- package/dist/harmony90.mjs +3 -76
- package/dist/harmony90.mjs.map +1 -1
- package/dist/harmony91.cjs +17 -11
- package/dist/harmony91.cjs.map +1 -1
- package/dist/harmony91.mjs +17 -11
- package/dist/harmony91.mjs.map +1 -1
- package/dist/harmony92.cjs +76 -30
- package/dist/harmony92.cjs.map +1 -1
- package/dist/harmony92.mjs +76 -30
- package/dist/harmony92.mjs.map +1 -1
- package/dist/harmony93.cjs +12 -9
- package/dist/harmony93.cjs.map +1 -1
- package/dist/harmony93.mjs +12 -9
- package/dist/harmony93.mjs.map +1 -1
- package/dist/harmony94.cjs +30 -47
- package/dist/harmony94.cjs.map +1 -1
- package/dist/harmony94.mjs +30 -47
- package/dist/harmony94.mjs.map +1 -1
- package/dist/harmony95.cjs +10 -10
- package/dist/harmony95.cjs.map +1 -1
- package/dist/harmony95.mjs +9 -9
- package/dist/harmony95.mjs.map +1 -1
- package/dist/harmony96.cjs +44 -163
- package/dist/harmony96.cjs.map +1 -1
- package/dist/harmony96.mjs +44 -163
- package/dist/harmony96.mjs.map +1 -1
- package/dist/harmony97.cjs +9 -44
- package/dist/harmony97.cjs.map +1 -1
- package/dist/harmony97.mjs +8 -43
- package/dist/harmony97.mjs.map +1 -1
- package/dist/harmony98.cjs +9 -10
- package/dist/harmony98.cjs.map +1 -1
- package/dist/harmony98.mjs +11 -12
- package/dist/harmony98.mjs.map +1 -1
- package/dist/harmony99.cjs +20 -11
- package/dist/harmony99.cjs.map +1 -1
- package/dist/harmony99.mjs +20 -11
- package/dist/harmony99.mjs.map +1 -1
- package/dist/types/src/components/Sidebar/types.d.ts +1 -1
- package/dist/types/src/node.d.ts +1 -1
- package/package.json +1 -1
package/dist/harmony96.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony96.cjs","sources":["../src/features/navigation/hooks/useExpertNavigation.ts"],"sourcesContent":["import type { Contributor, Project } from '@features/node'\nimport { useMemo } from 'react'\nimport { useNavigationClient } from '../providers/NavigationClientProvider'\nimport type { NavigationTabsItem } from '../types/navigation'\nimport { getProjectNavigationVisibilityMap } from '../utils/toolbarVisibility'\n\n// TODO: Validate features types\nexport const getIsFeatureEnabled = (features: Record<string, boolean>, name: string) => {\n\tconst featureState = features[name]\n\n\treturn (\n\t\tfeatureState !== null &&\n\t\tfeatureState !== undefined &&\n\t\t[true, 'on', 'true'].includes(featureState)\n\t)\n}\n\n/**\n * Hook to generate legacy navigation items using the existing structure\n * but with context API instead of Redux\n */\nexport const useExpertNavigation = (\n\tenabled: boolean,\n\tproject?: Project,\n\tcontributor?: Contributor,\n) => {\n\t// Use contributor data if provided, otherwise use defaults\n\tconst adminRights = contributor?.admin_rights || []\n\t// TODO: Implement selected app slug, small investigation is needed\n\tconst marketingSupportProjectSelectedAppSlug = 'selected-app-slug'\n\tconst navigationClient = useNavigationClient()\n\tconst expertUrl = navigationClient.getExpertUrl()\n\n\treturn useMemo(() => {\n\t\t// Get data from contexts instead of Redux, or use provided data\n\t\tif (!project || !enabled) {\n\t\t\treturn []\n\t\t}\n\t\t/* TODO: We're missing badges API. We need to get it from the backend or find alternative way to get task count\n\t\t * Fetch tasks and calculate count is not a good idea, because it can have pagination, therefore we can\n\t\t * ask for an additional prop in tasks response: task_count based on branch_id + project_id + task_status\n\t\t */\n\t\t// const taskCount = getTaskCount(project, branch, badges.tasks)\n\n\t\t// TODO: Implement feature flags functionality, most likely separate package\n\t\t// const isFeatureEnabled = (feature: string) => getIsFeatureEnabled(features, feature)\n\n\t\tconst navigationVisibility = getProjectNavigationVisibilityMap(\n\t\t\tproject,\n\t\t\tadminRights,\n\t\t\t() => true /*isFeatureEnabled*/,\n\t\t)\n\n\t\tconst appsNavigationItem: NavigationTabsItem = {\n\t\t\tkey: 'apps',\n\t\t\tlabel: 'Apps',\n\t\t\tisActive: (input: string) => input === 'apps',\n\t\t\tlink: `${expertUrl}/apps/${project.project_id}/`,\n\t\t\t...navigationVisibility.apps,\n\t\t}\n\n\t\tconst appsNavigationItemArrInMainMenu: NavigationTabsItem[] = []\n\t\tconst appsNavigationItemArrInMoreMenu: NavigationTabsItem[] = []\n\n\t\tif (project.project_type === 'content_integration') {\n\t\t\tappsNavigationItemArrInMoreMenu.push(appsNavigationItem)\n\t\t} else {\n\t\t\tappsNavigationItemArrInMainMenu.push(appsNavigationItem)\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tkey: 'edit',\n\t\t\t\tlabel: 'Editor',\n\t\t\t\tlink: `${expertUrl}/project/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'edit',\n\t\t\t\t...navigationVisibility.editor,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'files',\n\t\t\t\tlabel: 'Files',\n\t\t\t\tlink: `${expertUrl}/files/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'files',\n\t\t\t\t...navigationVisibility.files,\n\t\t\t},\n\t\t\t...(project.project_type === 'content_integration'\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: 'contentManagement',\n\t\t\t\t\t\t\tlabel: 'Content management',\n\t\t\t\t\t\t\tisActive: (input: string) => input === 'apps',\n\t\t\t\t\t\t\tlink: `${expertUrl}/apps/${project.project_id}/${marketingSupportProjectSelectedAppSlug}`,\n\t\t\t\t\t\t\t...navigationVisibility.contentManagement,\n\t\t\t\t\t\t},\n\t\t\t\t\t]\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: 'upload',\n\t\t\t\t\t\t\tlabel: 'Upload',\n\t\t\t\t\t\t\tlink: `${expertUrl}/upload/${project.project_id}/`,\n\t\t\t\t\t\t\tisActive: (input: string) => input === 'upload',\n\t\t\t\t\t\t\t...navigationVisibility.upload,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: 'download',\n\t\t\t\t\t\t\tlabel: 'Download',\n\t\t\t\t\t\t\tlink: `${expertUrl}/download/${project.project_id}/`,\n\t\t\t\t\t\t\tisActive: (input: string) => input === 'download',\n\t\t\t\t\t\t\t...navigationVisibility.download,\n\t\t\t\t\t\t},\n\t\t\t\t\t]),\n\t\t\t{\n\t\t\t\tkey: 'tasks',\n\t\t\t\tlabel: 'Tasks',\n\t\t\t\tlink: `${expertUrl}/tasks/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'tasks',\n\t\t\t\t// TODO: Add task count\n\t\t\t\t// badge: taskCount,\n\t\t\t\t...navigationVisibility.tasks,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'workflows',\n\t\t\t\tlabel: 'Workflows',\n\t\t\t\tlink: `${expertUrl}/workflows/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'workflows',\n\t\t\t\tnovel: 'New',\n\t\t\t\tonClick: () => {\n\t\t\t\t\t// TODO: Resolve analytics globally, most likely separate package\n\t\t\t\t\t// track(AnalyticsEventName.EDITOR_WORKFLOWS_TAB_CLICKED);\n\t\t\t\t\twindow.location.assign(`${expertUrl}/workflows/${project.project_id}/`)\n\t\t\t\t},\n\t\t\t\t...navigationVisibility.workflows,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'contributors',\n\t\t\t\tlabel: 'Contributors',\n\t\t\t\tlink: `${expertUrl}/contributors/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'contributors',\n\t\t\t\t...navigationVisibility.contributors,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'screenshots',\n\t\t\t\tlabel: 'Screenshots',\n\t\t\t\tlink: `${expertUrl}/screenshots/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'screenshots',\n\t\t\t\t...navigationVisibility.screenshots,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'glossary',\n\t\t\t\tlabel: 'Glossary',\n\t\t\t\tlink: `${expertUrl}/glossary/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'glossary',\n\t\t\t\t...navigationVisibility.glossary,\n\t\t\t},\n\t\t\t...appsNavigationItemArrInMainMenu,\n\t\t\t{\n\t\t\t\tkey: 'more',\n\t\t\t\tlabel: 'More...',\n\t\t\t\tisActive: (input: string) =>\n\t\t\t\t\t['settings', 'statistics', 'duplicates', 'live edit'].includes(input),\n\t\t\t\t...navigationVisibility.more,\n\t\t\t\tdropdown: [\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/`,\n\t\t\t\t\t\t\tlabel: 'Settings',\n\t\t\t\t\t\t\t...navigationVisibility.settings,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/#branches`,\n\t\t\t\t\t\t\tlabel: 'Branches',\n\t\t\t\t\t\t\t...navigationVisibility.branches,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/#ota-bundles`,\n\t\t\t\t\t\t\tlabel: 'OTA Bundles',\n\t\t\t\t\t\t\t...navigationVisibility.otaBundles,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/#project-automations`,\n\t\t\t\t\t\t\tlabel: 'Automations',\n\t\t\t\t\t\t\t...navigationVisibility.automations,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/dupes/${project.project_id}/`,\n\t\t\t\t\t\t\tlabel: 'Duplicate finder',\n\t\t\t\t\t\t\t...navigationVisibility.duplicateFinder,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t...appsNavigationItemArrInMoreMenu,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// TODO: This could be problematic tab, because it is not a link and we can't just redirect. We need to find a workaround for that.\n\t\t\t\t\t\t\tlabel: 'Activity',\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t// const showActivityEvent = new CustomEvent(\"show-activity\", {\n\t\t\t\t\t\t\t\t// \tdetail: {\n\t\t\t\t\t\t\t\t// \t\tprojectId: project.id,\n\t\t\t\t\t\t\t\t// \t\tbranchId: branch.branchId,\n\t\t\t\t\t\t\t\t// \t\tbranchName: branch.branchName,\n\t\t\t\t\t\t\t\t// \t},\n\t\t\t\t\t\t\t\t// });\n\t\t\t\t\t\t\t\t// document.dispatchEvent(showActivityEvent);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t...navigationVisibility.activity,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/statistics/${project.project_id}/`,\n\t\t\t\t\t\t\tlabel: 'Statistics',\n\t\t\t\t\t\t\t...navigationVisibility.statistics,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t},\n\t\t]\n\t}, [project, adminRights, enabled, expertUrl])\n}\n\n// TODO: Helper function for getting task count from badge data\n// const _getTaskCount = (project: any, branch: any, taskBadges: any) => {\n// \tif (!taskBadges) return 0\n\n// \t// Implementation would depend on your getTaskCountFromTasks utility\n// \t// Simplified version:\n// \tconst projectTasks = taskBadges[project.id] || {}\n// \treturn projectTasks[branch.branchId || 'master'] || 0\n// }\n"],"names":["useNavigationClient","useMemo","getProjectNavigationVisibilityMap"],"mappings":";;;;;AAqBO,MAAM,sBAAsB,CAClC,SACA,SACA,gBACI;AAEE,QAAA,eAAc,2CAAa,iBAAgB,CAAC;AAElD,QAAM,yCAAyC;AAC/C,QAAM,mBAAmBA,yBAAAA,oBAAoB;AACvC,QAAA,YAAY,iBAAiB,aAAa;AAEhD,SAAOC,cAAQ,MAAM;AAEhB,QAAA,CAAC,WAAW,CAAC,SAAS;AACzB,aAAO,CAAC;AAAA,IAAA;AAWT,UAAM,uBAAuBC,kBA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S,KAAK;AAAA,QACrE,GAAG,qBAAqB;AAAA,QACxB,UAAU;AAAA,UACT;AAAA,YACC;AAAA,cACC,MAAM,GAAG,SAAS,aAAa,QAAQ,UAAU;AAAA,cACjD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,aAAa,QAAQ,UAAU;AAAA,cACjD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,aAAa,QAAQ,UAAU;AAAA,cACjD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,aAAa,QAAQ,UAAU;AAAA,cACjD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,UAAU,QAAQ,UAAU;AAAA,cAC9C,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YAAA;AAAA,UAE1B;AAAA,UACA;AAAA,YACC,GAAG;AAAA,YACH;AAAA;AAAA,cAEC,OAAO;AAAA,cACP,SAAS,MAAM;AAAA,cASf;AAAA,cACA,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,eAAe,QAAQ,UAAU;AAAA,cACnD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YAAA;AAAA,UACzB;AAAA,QACD;AAAA,MACD;AAAA,IAEF;AAAA,KACE,CAAC,SAAS,aAAa,SAAS,SAAS,CAAC;AAC9C;;"}
|
1
|
+
{"version":3,"file":"harmony96.cjs","sources":["../src/components/Sidebar/Widgets/HelpMenu/HelpMenu.tsx"],"sourcesContent":["import type { HelpMenuConfig } from '@components/Sidebar/types'\nimport { HelpCenterIcon, Menu, MenuDivider, MenuItem, MenuList, Tooltip } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport styles from './HelpMenu.module.css'\n\n/**\n * Help menu component that provides links to tutorials, documentation, support, and more.\n *\n * @example\n * ```\n * <HelpMenu\n * contactSupport={{ onClick: handleContactSupport }}\n * keyboardShortcuts={{ onClick: handleShowShortcuts, label: '⌘K' }}\n * />\n * ```\n */\n\nexport const HelpMenu = ({ contactSupport, keyboardShortcuts }: HelpMenuConfig) => {\n\treturn (\n\t\t<Menu\n\t\t\tmenuButton={({ opened }) => (\n\t\t\t\t<Tooltip placement=\"right\" tooltip=\"Help\">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={clsx(styles.dropdownButton, {\n\t\t\t\t\t\t\t[styles.dropdownButtonActive]: opened,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tdata-testid=\"sidebar-help-menu-button\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<HelpCenterIcon size=\"25px\" />\n\t\t\t\t\t</button>\n\t\t\t\t</Tooltip>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-start\">\n\t\t\t\t<MenuItem href=\"https://lokalise.com/blog/category/tutorials/\" target=\"_blank\">\n\t\t\t\t\tTutorials\n\t\t\t\t</MenuItem>\n\t\t\t\t{contactSupport && <MenuItem onClick={contactSupport.onClick}>Contact support</MenuItem>}\n\t\t\t\t<MenuItem href=\"https://docs.lokalise.com/en/\" target=\"_blank\">\n\t\t\t\t\tDocumentation\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuDivider />\n\t\t\t\t{keyboardShortcuts && (\n\t\t\t\t\t<MenuItem className={styles.shortcutMenu} onClick={keyboardShortcuts.onClick}>\n\t\t\t\t\t\tKeyboard shortcuts{' '}\n\t\t\t\t\t\t<span className={styles.shortcutLabel}>{keyboardShortcuts.label}</span>\n\t\t\t\t\t</MenuItem>\n\t\t\t\t)}\n\t\t\t\t<MenuItem\n\t\t\t\t\thref=\"https://developers.lokalise.com/reference/lokalise-rest-api\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t>\n\t\t\t\t\tAPI reference\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem href=\"https://github.com/lokalise/lokalise-cli-2-go\" target=\"_blank\">\n\t\t\t\t\tCLI tool\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuDivider />\n\t\t\t\t<MenuItem href=\"https://lokalise.com/blog/category/product-updates/\" target=\"_blank\">\n\t\t\t\t\tWhat’s new\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem href=\"https://lokalise.com/blog/\" target=\"_blank\">\n\t\t\t\t\tBlog\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem href=\"https://lokalise.com/product/apps\" target=\"_blank\">\n\t\t\t\t\tApps\n\t\t\t\t</MenuItem>\n\t\t\t</MenuList>\n\t\t</Menu>\n\t)\n}\n"],"names":["jsx","Menu","Tooltip","clsx","styles","HelpCenterIcon","jsxs","MenuList","MenuItem","MenuDivider"],"mappings":";;;;;;AAiBO,MAAM,WAAW,CAAC,EAAE,gBAAgB,wBAAwC;AAEjF,SAAAA,2BAAA;AAAA,IAACC,MAAA;AAAA,IAAA;AAAA,MACA,YAAY,CAAC,EAAE,OAAO,qCACpBC,MAAQ,SAAA,EAAA,WAAU,SAAQ,SAAQ,QAClC,UAAAF,2BAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,MAAK;AAAA,UACL,WAAWG,KAAAA,KAAKC,gBAAA,QAAO,gBAAgB;AAAA,YACtC,CAACA,gBAAAA,QAAO,oBAAoB,GAAG;AAAA,UAAA,CAC/B;AAAA,UACD,eAAY;AAAA,UAEZ,UAAAJ,2BAAAA,IAACK,MAAAA,gBAAe,EAAA,MAAK,OAAO,CAAA;AAAA,QAAA;AAAA,MAAA,GAE9B;AAAA,MAGD,UAAAC,2BAAA,KAACC,MAAS,UAAA,EAAA,WAAU,eACnB,UAAA;AAAA,QAAAP,+BAACQ,MAAAA,UAAS,EAAA,MAAK,iDAAgD,QAAO,UAAS,UAE/E,aAAA;AAAA,QACC,kBAAmBR,2BAAAA,IAAAQ,MAAAA,UAAA,EAAS,SAAS,eAAe,SAAS,UAAe,mBAAA;AAAA,uCAC5EA,MAAAA,UAAS,EAAA,MAAK,iCAAgC,QAAO,UAAS,UAE/D,iBAAA;AAAA,uCACCC,MAAY,aAAA,EAAA;AAAA,QACZ,qDACCD,gBAAS,EAAA,WAAWJ,gBAAAA,QAAO,cAAc,SAAS,kBAAkB,SAAS,UAAA;AAAA,UAAA;AAAA,UAC1D;AAAA,yCAClB,QAAK,EAAA,WAAWA,gBAAAA,QAAO,eAAgB,4BAAkB,MAAM,CAAA;AAAA,QAAA,GACjE;AAAA,QAEDJ,2BAAA;AAAA,UAACQ,MAAA;AAAA,UAAA;AAAA,YACA,MAAK;AAAA,YACL,QAAO;AAAA,YACP,UAAA;AAAA,UAAA;AAAA,QAED;AAAA,uCACCA,MAAAA,UAAS,EAAA,MAAK,iDAAgD,QAAO,UAAS,UAE/E,YAAA;AAAA,uCACCC,MAAY,aAAA,EAAA;AAAA,uCACZD,MAAAA,UAAS,EAAA,MAAK,uDAAsD,QAAO,UAAS,UAErF,cAAA;AAAA,uCACCA,MAAAA,UAAS,EAAA,MAAK,8BAA6B,QAAO,UAAS,UAE5D,QAAA;AAAA,uCACCA,MAAAA,UAAS,EAAA,MAAK,qCAAoC,QAAO,UAAS,UAEnE,OAAA,CAAA;AAAA,MAAA,EACD,CAAA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
|
package/dist/harmony96.mjs
CHANGED
@@ -1,169 +1,50 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
return [];
|
12
|
-
}
|
13
|
-
const navigationVisibility = getProjectNavigationVisibilityMap(
|
14
|
-
project,
|
15
|
-
adminRights,
|
16
|
-
() => true
|
17
|
-
);
|
18
|
-
const appsNavigationItem = {
|
19
|
-
key: "apps",
|
20
|
-
label: "Apps",
|
21
|
-
isActive: (input) => input === "apps",
|
22
|
-
link: `${expertUrl}/apps/${project.project_id}/`,
|
23
|
-
...navigationVisibility.apps
|
24
|
-
};
|
25
|
-
const appsNavigationItemArrInMainMenu = [];
|
26
|
-
const appsNavigationItemArrInMoreMenu = [];
|
27
|
-
if (project.project_type === "content_integration") {
|
28
|
-
appsNavigationItemArrInMoreMenu.push(appsNavigationItem);
|
29
|
-
} else {
|
30
|
-
appsNavigationItemArrInMainMenu.push(appsNavigationItem);
|
31
|
-
}
|
32
|
-
return [
|
33
|
-
{
|
34
|
-
key: "edit",
|
35
|
-
label: "Editor",
|
36
|
-
link: `${expertUrl}/project/${project.project_id}/`,
|
37
|
-
isActive: (input) => input === "edit",
|
38
|
-
...navigationVisibility.editor
|
39
|
-
},
|
40
|
-
{
|
41
|
-
key: "files",
|
42
|
-
label: "Files",
|
43
|
-
link: `${expertUrl}/files/${project.project_id}/`,
|
44
|
-
isActive: (input) => input === "files",
|
45
|
-
...navigationVisibility.files
|
46
|
-
},
|
47
|
-
...project.project_type === "content_integration" ? [
|
48
|
-
{
|
49
|
-
key: "contentManagement",
|
50
|
-
label: "Content management",
|
51
|
-
isActive: (input) => input === "apps",
|
52
|
-
link: `${expertUrl}/apps/${project.project_id}/${marketingSupportProjectSelectedAppSlug}`,
|
53
|
-
...navigationVisibility.contentManagement
|
54
|
-
}
|
55
|
-
] : [
|
56
|
-
{
|
57
|
-
key: "upload",
|
58
|
-
label: "Upload",
|
59
|
-
link: `${expertUrl}/upload/${project.project_id}/`,
|
60
|
-
isActive: (input) => input === "upload",
|
61
|
-
...navigationVisibility.upload
|
62
|
-
},
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
2
|
+
import { Menu, MenuList, MenuItem, MenuDivider, Tooltip, HelpCenterIcon } from "@lokalise/louis";
|
3
|
+
import { clsx } from "./harmony73.mjs";
|
4
|
+
import styles from "./harmony121.mjs";
|
5
|
+
const HelpMenu = ({ contactSupport, keyboardShortcuts }) => {
|
6
|
+
return /* @__PURE__ */ jsx(
|
7
|
+
Menu,
|
8
|
+
{
|
9
|
+
menuButton: ({ opened }) => /* @__PURE__ */ jsx(Tooltip, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ jsx(
|
10
|
+
"button",
|
63
11
|
{
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
12
|
+
type: "button",
|
13
|
+
className: clsx(styles.dropdownButton, {
|
14
|
+
[styles.dropdownButtonActive]: opened
|
15
|
+
}),
|
16
|
+
"data-testid": "sidebar-help-menu-button",
|
17
|
+
children: /* @__PURE__ */ jsx(HelpCenterIcon, { size: "25px" })
|
69
18
|
}
|
70
|
-
|
71
|
-
{
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
},
|
98
|
-
{
|
99
|
-
key: "screenshots",
|
100
|
-
label: "Screenshots",
|
101
|
-
link: `${expertUrl}/screenshots/${project.project_id}/`,
|
102
|
-
isActive: (input) => input === "screenshots",
|
103
|
-
...navigationVisibility.screenshots
|
104
|
-
},
|
105
|
-
{
|
106
|
-
key: "glossary",
|
107
|
-
label: "Glossary",
|
108
|
-
link: `${expertUrl}/glossary/${project.project_id}/`,
|
109
|
-
isActive: (input) => input === "glossary",
|
110
|
-
...navigationVisibility.glossary
|
111
|
-
},
|
112
|
-
...appsNavigationItemArrInMainMenu,
|
113
|
-
{
|
114
|
-
key: "more",
|
115
|
-
label: "More...",
|
116
|
-
isActive: (input) => ["settings", "statistics", "duplicates", "live edit"].includes(input),
|
117
|
-
...navigationVisibility.more,
|
118
|
-
dropdown: [
|
119
|
-
[
|
120
|
-
{
|
121
|
-
link: `${expertUrl}/settings/${project.project_id}/`,
|
122
|
-
label: "Settings",
|
123
|
-
...navigationVisibility.settings
|
124
|
-
},
|
125
|
-
{
|
126
|
-
link: `${expertUrl}/settings/${project.project_id}/#branches`,
|
127
|
-
label: "Branches",
|
128
|
-
...navigationVisibility.branches
|
129
|
-
},
|
130
|
-
{
|
131
|
-
link: `${expertUrl}/settings/${project.project_id}/#ota-bundles`,
|
132
|
-
label: "OTA Bundles",
|
133
|
-
...navigationVisibility.otaBundles
|
134
|
-
},
|
135
|
-
{
|
136
|
-
link: `${expertUrl}/settings/${project.project_id}/#project-automations`,
|
137
|
-
label: "Automations",
|
138
|
-
...navigationVisibility.automations
|
139
|
-
},
|
140
|
-
{
|
141
|
-
link: `${expertUrl}/dupes/${project.project_id}/`,
|
142
|
-
label: "Duplicate finder",
|
143
|
-
...navigationVisibility.duplicateFinder
|
144
|
-
}
|
145
|
-
],
|
146
|
-
[
|
147
|
-
...appsNavigationItemArrInMoreMenu,
|
148
|
-
{
|
149
|
-
// TODO: This could be problematic tab, because it is not a link and we can't just redirect. We need to find a workaround for that.
|
150
|
-
label: "Activity",
|
151
|
-
onClick: () => {
|
152
|
-
},
|
153
|
-
...navigationVisibility.activity
|
154
|
-
},
|
155
|
-
{
|
156
|
-
link: `${expertUrl}/statistics/${project.project_id}/`,
|
157
|
-
label: "Statistics",
|
158
|
-
...navigationVisibility.statistics
|
159
|
-
}
|
160
|
-
]
|
161
|
-
]
|
162
|
-
}
|
163
|
-
];
|
164
|
-
}, [project, adminRights, enabled, expertUrl]);
|
19
|
+
) }),
|
20
|
+
children: /* @__PURE__ */ jsxs(MenuList, { placement: "right-start", children: [
|
21
|
+
/* @__PURE__ */ jsx(MenuItem, { href: "https://lokalise.com/blog/category/tutorials/", target: "_blank", children: "Tutorials" }),
|
22
|
+
contactSupport && /* @__PURE__ */ jsx(MenuItem, { onClick: contactSupport.onClick, children: "Contact support" }),
|
23
|
+
/* @__PURE__ */ jsx(MenuItem, { href: "https://docs.lokalise.com/en/", target: "_blank", children: "Documentation" }),
|
24
|
+
/* @__PURE__ */ jsx(MenuDivider, {}),
|
25
|
+
keyboardShortcuts && /* @__PURE__ */ jsxs(MenuItem, { className: styles.shortcutMenu, onClick: keyboardShortcuts.onClick, children: [
|
26
|
+
"Keyboard shortcuts",
|
27
|
+
" ",
|
28
|
+
/* @__PURE__ */ jsx("span", { className: styles.shortcutLabel, children: keyboardShortcuts.label })
|
29
|
+
] }),
|
30
|
+
/* @__PURE__ */ jsx(
|
31
|
+
MenuItem,
|
32
|
+
{
|
33
|
+
href: "https://developers.lokalise.com/reference/lokalise-rest-api",
|
34
|
+
target: "_blank",
|
35
|
+
children: "API reference"
|
36
|
+
}
|
37
|
+
),
|
38
|
+
/* @__PURE__ */ jsx(MenuItem, { href: "https://github.com/lokalise/lokalise-cli-2-go", target: "_blank", children: "CLI tool" }),
|
39
|
+
/* @__PURE__ */ jsx(MenuDivider, {}),
|
40
|
+
/* @__PURE__ */ jsx(MenuItem, { href: "https://lokalise.com/blog/category/product-updates/", target: "_blank", children: "What’s new" }),
|
41
|
+
/* @__PURE__ */ jsx(MenuItem, { href: "https://lokalise.com/blog/", target: "_blank", children: "Blog" }),
|
42
|
+
/* @__PURE__ */ jsx(MenuItem, { href: "https://lokalise.com/product/apps", target: "_blank", children: "Apps" })
|
43
|
+
] })
|
44
|
+
}
|
45
|
+
);
|
165
46
|
};
|
166
47
|
export {
|
167
|
-
|
48
|
+
HelpMenu
|
168
49
|
};
|
169
50
|
//# sourceMappingURL=harmony96.mjs.map
|
package/dist/harmony96.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony96.mjs","sources":["../src/features/navigation/hooks/useExpertNavigation.ts"],"sourcesContent":["import type { Contributor, Project } from '@features/node'\nimport { useMemo } from 'react'\nimport { useNavigationClient } from '../providers/NavigationClientProvider'\nimport type { NavigationTabsItem } from '../types/navigation'\nimport { getProjectNavigationVisibilityMap } from '../utils/toolbarVisibility'\n\n// TODO: Validate features types\nexport const getIsFeatureEnabled = (features: Record<string, boolean>, name: string) => {\n\tconst featureState = features[name]\n\n\treturn (\n\t\tfeatureState !== null &&\n\t\tfeatureState !== undefined &&\n\t\t[true, 'on', 'true'].includes(featureState)\n\t)\n}\n\n/**\n * Hook to generate legacy navigation items using the existing structure\n * but with context API instead of Redux\n */\nexport const useExpertNavigation = (\n\tenabled: boolean,\n\tproject?: Project,\n\tcontributor?: Contributor,\n) => {\n\t// Use contributor data if provided, otherwise use defaults\n\tconst adminRights = contributor?.admin_rights || []\n\t// TODO: Implement selected app slug, small investigation is needed\n\tconst marketingSupportProjectSelectedAppSlug = 'selected-app-slug'\n\tconst navigationClient = useNavigationClient()\n\tconst expertUrl = navigationClient.getExpertUrl()\n\n\treturn useMemo(() => {\n\t\t// Get data from contexts instead of Redux, or use provided data\n\t\tif (!project || !enabled) {\n\t\t\treturn []\n\t\t}\n\t\t/* TODO: We're missing badges API. We need to get it from the backend or find alternative way to get task count\n\t\t * Fetch tasks and calculate count is not a good idea, because it can have pagination, therefore we can\n\t\t * ask for an additional prop in tasks response: task_count based on branch_id + project_id + task_status\n\t\t */\n\t\t// const taskCount = getTaskCount(project, branch, badges.tasks)\n\n\t\t// TODO: Implement feature flags functionality, most likely separate package\n\t\t// const isFeatureEnabled = (feature: string) => getIsFeatureEnabled(features, feature)\n\n\t\tconst navigationVisibility = getProjectNavigationVisibilityMap(\n\t\t\tproject,\n\t\t\tadminRights,\n\t\t\t() => true /*isFeatureEnabled*/,\n\t\t)\n\n\t\tconst appsNavigationItem: NavigationTabsItem = {\n\t\t\tkey: 'apps',\n\t\t\tlabel: 'Apps',\n\t\t\tisActive: (input: string) => input === 'apps',\n\t\t\tlink: `${expertUrl}/apps/${project.project_id}/`,\n\t\t\t...navigationVisibility.apps,\n\t\t}\n\n\t\tconst appsNavigationItemArrInMainMenu: NavigationTabsItem[] = []\n\t\tconst appsNavigationItemArrInMoreMenu: NavigationTabsItem[] = []\n\n\t\tif (project.project_type === 'content_integration') {\n\t\t\tappsNavigationItemArrInMoreMenu.push(appsNavigationItem)\n\t\t} else {\n\t\t\tappsNavigationItemArrInMainMenu.push(appsNavigationItem)\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tkey: 'edit',\n\t\t\t\tlabel: 'Editor',\n\t\t\t\tlink: `${expertUrl}/project/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'edit',\n\t\t\t\t...navigationVisibility.editor,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'files',\n\t\t\t\tlabel: 'Files',\n\t\t\t\tlink: `${expertUrl}/files/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'files',\n\t\t\t\t...navigationVisibility.files,\n\t\t\t},\n\t\t\t...(project.project_type === 'content_integration'\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: 'contentManagement',\n\t\t\t\t\t\t\tlabel: 'Content management',\n\t\t\t\t\t\t\tisActive: (input: string) => input === 'apps',\n\t\t\t\t\t\t\tlink: `${expertUrl}/apps/${project.project_id}/${marketingSupportProjectSelectedAppSlug}`,\n\t\t\t\t\t\t\t...navigationVisibility.contentManagement,\n\t\t\t\t\t\t},\n\t\t\t\t\t]\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: 'upload',\n\t\t\t\t\t\t\tlabel: 'Upload',\n\t\t\t\t\t\t\tlink: `${expertUrl}/upload/${project.project_id}/`,\n\t\t\t\t\t\t\tisActive: (input: string) => input === 'upload',\n\t\t\t\t\t\t\t...navigationVisibility.upload,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkey: 'download',\n\t\t\t\t\t\t\tlabel: 'Download',\n\t\t\t\t\t\t\tlink: `${expertUrl}/download/${project.project_id}/`,\n\t\t\t\t\t\t\tisActive: (input: string) => input === 'download',\n\t\t\t\t\t\t\t...navigationVisibility.download,\n\t\t\t\t\t\t},\n\t\t\t\t\t]),\n\t\t\t{\n\t\t\t\tkey: 'tasks',\n\t\t\t\tlabel: 'Tasks',\n\t\t\t\tlink: `${expertUrl}/tasks/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'tasks',\n\t\t\t\t// TODO: Add task count\n\t\t\t\t// badge: taskCount,\n\t\t\t\t...navigationVisibility.tasks,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'workflows',\n\t\t\t\tlabel: 'Workflows',\n\t\t\t\tlink: `${expertUrl}/workflows/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'workflows',\n\t\t\t\tnovel: 'New',\n\t\t\t\tonClick: () => {\n\t\t\t\t\t// TODO: Resolve analytics globally, most likely separate package\n\t\t\t\t\t// track(AnalyticsEventName.EDITOR_WORKFLOWS_TAB_CLICKED);\n\t\t\t\t\twindow.location.assign(`${expertUrl}/workflows/${project.project_id}/`)\n\t\t\t\t},\n\t\t\t\t...navigationVisibility.workflows,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'contributors',\n\t\t\t\tlabel: 'Contributors',\n\t\t\t\tlink: `${expertUrl}/contributors/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'contributors',\n\t\t\t\t...navigationVisibility.contributors,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'screenshots',\n\t\t\t\tlabel: 'Screenshots',\n\t\t\t\tlink: `${expertUrl}/screenshots/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'screenshots',\n\t\t\t\t...navigationVisibility.screenshots,\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: 'glossary',\n\t\t\t\tlabel: 'Glossary',\n\t\t\t\tlink: `${expertUrl}/glossary/${project.project_id}/`,\n\t\t\t\tisActive: (input: string) => input === 'glossary',\n\t\t\t\t...navigationVisibility.glossary,\n\t\t\t},\n\t\t\t...appsNavigationItemArrInMainMenu,\n\t\t\t{\n\t\t\t\tkey: 'more',\n\t\t\t\tlabel: 'More...',\n\t\t\t\tisActive: (input: string) =>\n\t\t\t\t\t['settings', 'statistics', 'duplicates', 'live edit'].includes(input),\n\t\t\t\t...navigationVisibility.more,\n\t\t\t\tdropdown: [\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/`,\n\t\t\t\t\t\t\tlabel: 'Settings',\n\t\t\t\t\t\t\t...navigationVisibility.settings,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/#branches`,\n\t\t\t\t\t\t\tlabel: 'Branches',\n\t\t\t\t\t\t\t...navigationVisibility.branches,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/#ota-bundles`,\n\t\t\t\t\t\t\tlabel: 'OTA Bundles',\n\t\t\t\t\t\t\t...navigationVisibility.otaBundles,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/settings/${project.project_id}/#project-automations`,\n\t\t\t\t\t\t\tlabel: 'Automations',\n\t\t\t\t\t\t\t...navigationVisibility.automations,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/dupes/${project.project_id}/`,\n\t\t\t\t\t\t\tlabel: 'Duplicate finder',\n\t\t\t\t\t\t\t...navigationVisibility.duplicateFinder,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t...appsNavigationItemArrInMoreMenu,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// TODO: This could be problematic tab, because it is not a link and we can't just redirect. We need to find a workaround for that.\n\t\t\t\t\t\t\tlabel: 'Activity',\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t// const showActivityEvent = new CustomEvent(\"show-activity\", {\n\t\t\t\t\t\t\t\t// \tdetail: {\n\t\t\t\t\t\t\t\t// \t\tprojectId: project.id,\n\t\t\t\t\t\t\t\t// \t\tbranchId: branch.branchId,\n\t\t\t\t\t\t\t\t// \t\tbranchName: branch.branchName,\n\t\t\t\t\t\t\t\t// \t},\n\t\t\t\t\t\t\t\t// });\n\t\t\t\t\t\t\t\t// document.dispatchEvent(showActivityEvent);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t...navigationVisibility.activity,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlink: `${expertUrl}/statistics/${project.project_id}/`,\n\t\t\t\t\t\t\tlabel: 'Statistics',\n\t\t\t\t\t\t\t...navigationVisibility.statistics,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t},\n\t\t]\n\t}, [project, adminRights, enabled, expertUrl])\n}\n\n// TODO: Helper function for getting task count from badge data\n// const _getTaskCount = (project: any, branch: any, taskBadges: any) => {\n// \tif (!taskBadges) return 0\n\n// \t// Implementation would depend on your getTaskCountFromTasks utility\n// \t// Simplified version:\n// \tconst projectTasks = taskBadges[project.id] || {}\n// \treturn projectTasks[branch.branchId || 'master'] || 0\n// }\n"],"names":[],"mappings":";;;AAqBO,MAAM,sBAAsB,CAClC,SACA,SACA,gBACI;AAEE,QAAA,eAAc,2CAAa,iBAAgB,CAAC;AAElD,QAAM,yCAAyC;AAC/C,QAAM,mBAAmB,oBAAoB;AACvC,QAAA,YAAY,iBAAiB,aAAa;AAEhD,SAAO,QAAQ,MAAM;AAEhB,QAAA,CAAC,WAAW,CAAC,SAAS;AACzB,aAAO,CAAC;AAAA,IAAA;AAWT,UAAM,uBAAuB;AAAA,MAC5B;AAAA,MACA;AAAA,MACA,MAAM;AAAA,IACP;AAEA,UAAM,qBAAyC;AAAA,MAC9C,KAAK;AAAA,MACL,OAAO;AAAA,MACP,UAAU,CAAC,UAAkB,UAAU;AAAA,MACvC,MAAM,GAAG,SAAS,SAAS,QAAQ,UAAU;AAAA,MAC7C,GAAG,qBAAqB;AAAA,I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AAU;AAAA,cACjD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,aAAa,QAAQ,UAAU;AAAA,cACjD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,aAAa,QAAQ,UAAU;AAAA,cACjD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,UAAU,QAAQ,UAAU;AAAA,cAC9C,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YAAA;AAAA,UAE1B;AAAA,UACA;AAAA,YACC,GAAG;AAAA,YACH;AAAA;AAAA,cAEC,OAAO;AAAA,cACP,SAAS,MAAM;AAAA,cASf;AAAA,cACA,GAAG,qBAAqB;AAAA,YACzB;AAAA,YACA;AAAA,cACC,MAAM,GAAG,SAAS,eAAe,QAAQ,UAAU;AAAA,cACnD,OAAO;AAAA,cACP,GAAG,qBAAqB;AAAA,YAAA;AAAA,UACzB;AAAA,QACD;AAAA,MACD;AAAA,IAEF;AAAA,KACE,CAAC,SAAS,aAAa,SAAS,SAAS,CAAC;AAC9C;"}
|
1
|
+
{"version":3,"file":"harmony96.mjs","sources":["../src/components/Sidebar/Widgets/HelpMenu/HelpMenu.tsx"],"sourcesContent":["import type { HelpMenuConfig } from '@components/Sidebar/types'\nimport { HelpCenterIcon, Menu, MenuDivider, MenuItem, MenuList, Tooltip } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport styles from './HelpMenu.module.css'\n\n/**\n * Help menu component that provides links to tutorials, documentation, support, and more.\n *\n * @example\n * ```\n * <HelpMenu\n * contactSupport={{ onClick: handleContactSupport }}\n * keyboardShortcuts={{ onClick: handleShowShortcuts, label: '⌘K' }}\n * />\n * ```\n */\n\nexport const HelpMenu = ({ contactSupport, keyboardShortcuts }: HelpMenuConfig) => {\n\treturn (\n\t\t<Menu\n\t\t\tmenuButton={({ opened }) => (\n\t\t\t\t<Tooltip placement=\"right\" tooltip=\"Help\">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={clsx(styles.dropdownButton, {\n\t\t\t\t\t\t\t[styles.dropdownButtonActive]: opened,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tdata-testid=\"sidebar-help-menu-button\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<HelpCenterIcon size=\"25px\" />\n\t\t\t\t\t</button>\n\t\t\t\t</Tooltip>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-start\">\n\t\t\t\t<MenuItem href=\"https://lokalise.com/blog/category/tutorials/\" target=\"_blank\">\n\t\t\t\t\tTutorials\n\t\t\t\t</MenuItem>\n\t\t\t\t{contactSupport && <MenuItem onClick={contactSupport.onClick}>Contact support</MenuItem>}\n\t\t\t\t<MenuItem href=\"https://docs.lokalise.com/en/\" target=\"_blank\">\n\t\t\t\t\tDocumentation\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuDivider />\n\t\t\t\t{keyboardShortcuts && (\n\t\t\t\t\t<MenuItem className={styles.shortcutMenu} onClick={keyboardShortcuts.onClick}>\n\t\t\t\t\t\tKeyboard shortcuts{' '}\n\t\t\t\t\t\t<span className={styles.shortcutLabel}>{keyboardShortcuts.label}</span>\n\t\t\t\t\t</MenuItem>\n\t\t\t\t)}\n\t\t\t\t<MenuItem\n\t\t\t\t\thref=\"https://developers.lokalise.com/reference/lokalise-rest-api\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t>\n\t\t\t\t\tAPI reference\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem href=\"https://github.com/lokalise/lokalise-cli-2-go\" target=\"_blank\">\n\t\t\t\t\tCLI tool\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuDivider />\n\t\t\t\t<MenuItem href=\"https://lokalise.com/blog/category/product-updates/\" target=\"_blank\">\n\t\t\t\t\tWhat’s new\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem href=\"https://lokalise.com/blog/\" target=\"_blank\">\n\t\t\t\t\tBlog\n\t\t\t\t</MenuItem>\n\t\t\t\t<MenuItem href=\"https://lokalise.com/product/apps\" target=\"_blank\">\n\t\t\t\t\tApps\n\t\t\t\t</MenuItem>\n\t\t\t</MenuList>\n\t\t</Menu>\n\t)\n}\n"],"names":[],"mappings":";;;;AAiBO,MAAM,WAAW,CAAC,EAAE,gBAAgB,wBAAwC;AAEjF,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,YAAY,CAAC,EAAE,OAAO,0BACpB,SAAQ,EAAA,WAAU,SAAQ,SAAQ,QAClC,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,MAAK;AAAA,UACL,WAAW,KAAK,OAAO,gBAAgB;AAAA,YACtC,CAAC,OAAO,oBAAoB,GAAG;AAAA,UAAA,CAC/B;AAAA,UACD,eAAY;AAAA,UAEZ,UAAA,oBAAC,gBAAe,EAAA,MAAK,OAAO,CAAA;AAAA,QAAA;AAAA,MAAA,GAE9B;AAAA,MAGD,UAAA,qBAAC,UAAS,EAAA,WAAU,eACnB,UAAA;AAAA,QAAA,oBAAC,UAAS,EAAA,MAAK,iDAAgD,QAAO,UAAS,UAE/E,aAAA;AAAA,QACC,kBAAmB,oBAAA,UAAA,EAAS,SAAS,eAAe,SAAS,UAAe,mBAAA;AAAA,4BAC5E,UAAS,EAAA,MAAK,iCAAgC,QAAO,UAAS,UAE/D,iBAAA;AAAA,4BACC,aAAY,EAAA;AAAA,QACZ,0CACC,UAAS,EAAA,WAAW,OAAO,cAAc,SAAS,kBAAkB,SAAS,UAAA;AAAA,UAAA;AAAA,UAC1D;AAAA,8BAClB,QAAK,EAAA,WAAW,OAAO,eAAgB,4BAAkB,MAAM,CAAA;AAAA,QAAA,GACjE;AAAA,QAED;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,MAAK;AAAA,YACL,QAAO;AAAA,YACP,UAAA;AAAA,UAAA;AAAA,QAED;AAAA,4BACC,UAAS,EAAA,MAAK,iDAAgD,QAAO,UAAS,UAE/E,YAAA;AAAA,4BACC,aAAY,EAAA;AAAA,4BACZ,UAAS,EAAA,MAAK,uDAAsD,QAAO,UAAS,UAErF,cAAA;AAAA,4BACC,UAAS,EAAA,MAAK,8BAA6B,QAAO,UAAS,UAE5D,QAAA;AAAA,4BACC,UAAS,EAAA,MAAK,qCAAoC,QAAO,UAAS,UAEnE,OAAA,CAAA;AAAA,MAAA,EACD,CAAA;AAAA,IAAA;AAAA,EACD;AAEF;"}
|
package/dist/harmony97.cjs
CHANGED
@@ -1,47 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
-
Object.
|
3
|
-
const
|
4
|
-
const
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
const nextgenUrl = navigationClient.getNextgenUrl();
|
9
|
-
const navigate = React.useCallback(
|
10
|
-
(path) => {
|
11
|
-
window.location.href = `${nextgenUrl}${path}`;
|
12
|
-
},
|
13
|
-
[nextgenUrl]
|
14
|
-
);
|
15
|
-
return React.useMemo(() => {
|
16
|
-
if (!enabled) {
|
17
|
-
return [];
|
18
|
-
}
|
19
|
-
const projectId = (project == null ? void 0 : project.project_id) || "";
|
20
|
-
const context = {
|
21
|
-
flags: {},
|
22
|
-
// TODO: getFeatureFlags(features),
|
23
|
-
pathname: window.location.pathname,
|
24
|
-
permissions: []
|
25
|
-
};
|
26
|
-
return navigationSchema.navigationItems.filter((item) => item.shouldShow ? item.shouldShow(context) : true).map((item) => {
|
27
|
-
const disabled = typeof item.disabled === "function" ? item.disabled(context) : !!item.disabled;
|
28
|
-
const badge = typeof item.badge === "function" ? item.badge(context) : item.badge;
|
29
|
-
const isActive = (input) => item.isActive ? item.isActive(input) : item.key === activeKey || input === item.key;
|
30
|
-
return {
|
31
|
-
key: item.key,
|
32
|
-
label: item.labelKey,
|
33
|
-
// You can apply translations here if needed
|
34
|
-
icon: item.icon,
|
35
|
-
visible: true,
|
36
|
-
badge,
|
37
|
-
disabled,
|
38
|
-
dropdown: item.dropdown,
|
39
|
-
isActive,
|
40
|
-
link: `${nextgenUrl}${item.path({ projectId })}`,
|
41
|
-
onClick: () => navigate(item.path({ projectId }))
|
42
|
-
};
|
43
|
-
});
|
44
|
-
}, [project, activeKey, enabled, navigate, contributor, nextgenUrl]);
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
+
const sidebarContainer = "_sidebarContainer_1x0gj_1";
|
4
|
+
const sidebarSkeleton = "_sidebarSkeleton_1x0gj_16";
|
5
|
+
const styles = {
|
6
|
+
sidebarContainer,
|
7
|
+
sidebarSkeleton
|
45
8
|
};
|
46
|
-
exports.
|
9
|
+
exports.default = styles;
|
10
|
+
exports.sidebarContainer = sidebarContainer;
|
11
|
+
exports.sidebarSkeleton = sidebarSkeleton;
|
47
12
|
//# sourceMappingURL=harmony97.cjs.map
|
package/dist/harmony97.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony97.cjs","sources":[
|
1
|
+
{"version":3,"file":"harmony97.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/dist/harmony97.mjs
CHANGED
@@ -1,47 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
const nextgenUrl = navigationClient.getNextgenUrl();
|
7
|
-
const navigate = useCallback(
|
8
|
-
(path) => {
|
9
|
-
window.location.href = `${nextgenUrl}${path}`;
|
10
|
-
},
|
11
|
-
[nextgenUrl]
|
12
|
-
);
|
13
|
-
return useMemo(() => {
|
14
|
-
if (!enabled) {
|
15
|
-
return [];
|
16
|
-
}
|
17
|
-
const projectId = (project == null ? void 0 : project.project_id) || "";
|
18
|
-
const context = {
|
19
|
-
flags: {},
|
20
|
-
// TODO: getFeatureFlags(features),
|
21
|
-
pathname: window.location.pathname,
|
22
|
-
permissions: []
|
23
|
-
};
|
24
|
-
return navigationItems.filter((item) => item.shouldShow ? item.shouldShow(context) : true).map((item) => {
|
25
|
-
const disabled = typeof item.disabled === "function" ? item.disabled(context) : !!item.disabled;
|
26
|
-
const badge = typeof item.badge === "function" ? item.badge(context) : item.badge;
|
27
|
-
const isActive = (input) => item.isActive ? item.isActive(input) : item.key === activeKey || input === item.key;
|
28
|
-
return {
|
29
|
-
key: item.key,
|
30
|
-
label: item.labelKey,
|
31
|
-
// You can apply translations here if needed
|
32
|
-
icon: item.icon,
|
33
|
-
visible: true,
|
34
|
-
badge,
|
35
|
-
disabled,
|
36
|
-
dropdown: item.dropdown,
|
37
|
-
isActive,
|
38
|
-
link: `${nextgenUrl}${item.path({ projectId })}`,
|
39
|
-
onClick: () => navigate(item.path({ projectId }))
|
40
|
-
};
|
41
|
-
});
|
42
|
-
}, [project, activeKey, enabled, navigate, contributor, nextgenUrl]);
|
1
|
+
const sidebarContainer = "_sidebarContainer_1x0gj_1";
|
2
|
+
const sidebarSkeleton = "_sidebarSkeleton_1x0gj_16";
|
3
|
+
const styles = {
|
4
|
+
sidebarContainer,
|
5
|
+
sidebarSkeleton
|
43
6
|
};
|
44
7
|
export {
|
45
|
-
|
8
|
+
styles as default,
|
9
|
+
sidebarContainer,
|
10
|
+
sidebarSkeleton
|
46
11
|
};
|
47
12
|
//# sourceMappingURL=harmony97.mjs.map
|
package/dist/harmony97.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony97.mjs","sources":[
|
1
|
+
{"version":3,"file":"harmony97.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/harmony98.cjs
CHANGED
@@ -2,14 +2,13 @@
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
4
4
|
const louis = require("@lokalise/louis");
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
|
14
|
-
exports.SortingIcon = SortingIcon;
|
5
|
+
const styles_module = require("./harmony99.cjs");
|
6
|
+
const NavItemContents = ({ label, badge, novel }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1", children: [
|
7
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
8
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
|
9
|
+
!!badge && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_module.default.badge, "aria-label": `${badge} items requiring attention`, children: badge > 9 ? "9+" : badge })
|
10
|
+
] }),
|
11
|
+
!!novel && /* @__PURE__ */ jsxRuntime.jsx(louis.Tag, { className: styles_module.default.tag, children: novel })
|
12
|
+
] });
|
13
|
+
exports.NavItemContents = NavItemContents;
|
15
14
|
//# sourceMappingURL=harmony98.cjs.map
|
package/dist/harmony98.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony98.cjs","sources":["../src/components/
|
1
|
+
{"version":3,"file":"harmony98.cjs","sources":["../src/components/NavigationPanel/components/NavigationTabs/NavigationTabsItem/NavItemContents.tsx"],"sourcesContent":["import { Tag } from '@lokalise/louis'\n\nimport classes from './styles.module.css'\n\ninterface NavItemContentProps {\n\tlabel: string\n\tbadge?: number\n\tnovel?: string\n}\nexport const NavItemContents = ({ label, badge, novel }: NavItemContentProps) => (\n\t<div className=\"flex gap-1\">\n\t\t<div>\n\t\t\t<span>{label}</span>\n\t\t\t{!!badge && (\n\t\t\t\t<div className={classes.badge} aria-label={`${badge} items requiring attention`}>\n\t\t\t\t\t{badge > 9 ? '9+' : badge}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t\t{!!novel && <Tag className={classes.tag}>{novel}</Tag>}\n\t</div>\n)\n"],"names":["jsxs","jsx","classes","Tag"],"mappings":";;;;;AASa,MAAA,kBAAkB,CAAC,EAAE,OAAO,OAAO,YAC/CA,2BAAA,KAAC,OAAI,EAAA,WAAU,cACd,UAAA;AAAA,EAAAA,gCAAC,OACA,EAAA,UAAA;AAAA,IAAAC,2BAAAA,IAAC,UAAM,UAAM,MAAA,CAAA;AAAA,IACZ,CAAC,CAAC,SACFA,+BAAC,SAAI,WAAWC,cAAA,QAAQ,OAAO,cAAY,GAAG,KAAK,8BACjD,UAAQ,QAAA,IAAI,OAAO,MACrB,CAAA;AAAA,EAAA,GAEF;AAAA,EACC,CAAC,CAAC,SAASD,2BAAA,IAACE,aAAI,WAAWD,sBAAQ,KAAM,UAAM,MAAA,CAAA;AAAA,EACjD,CAAA;;"}
|
package/dist/harmony98.mjs
CHANGED
@@ -1,15 +1,14 @@
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
10
|
-
|
11
|
-
};
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
+
import { Tag } from "@lokalise/louis";
|
3
|
+
import classes from "./harmony99.mjs";
|
4
|
+
const NavItemContents = ({ label, badge, novel }) => /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
5
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
6
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
7
|
+
!!badge && /* @__PURE__ */ jsx("div", { className: classes.badge, "aria-label": `${badge} items requiring attention`, children: badge > 9 ? "9+" : badge })
|
8
|
+
] }),
|
9
|
+
!!novel && /* @__PURE__ */ jsx(Tag, { className: classes.tag, children: novel })
|
10
|
+
] });
|
12
11
|
export {
|
13
|
-
|
12
|
+
NavItemContents
|
14
13
|
};
|
15
14
|
//# sourceMappingURL=harmony98.mjs.map
|
package/dist/harmony98.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony98.mjs","sources":["../src/components/
|
1
|
+
{"version":3,"file":"harmony98.mjs","sources":["../src/components/NavigationPanel/components/NavigationTabs/NavigationTabsItem/NavItemContents.tsx"],"sourcesContent":["import { Tag } from '@lokalise/louis'\n\nimport classes from './styles.module.css'\n\ninterface NavItemContentProps {\n\tlabel: string\n\tbadge?: number\n\tnovel?: string\n}\nexport const NavItemContents = ({ label, badge, novel }: NavItemContentProps) => (\n\t<div className=\"flex gap-1\">\n\t\t<div>\n\t\t\t<span>{label}</span>\n\t\t\t{!!badge && (\n\t\t\t\t<div className={classes.badge} aria-label={`${badge} items requiring attention`}>\n\t\t\t\t\t{badge > 9 ? '9+' : badge}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t\t{!!novel && <Tag className={classes.tag}>{novel}</Tag>}\n\t</div>\n)\n"],"names":[],"mappings":";;;AASa,MAAA,kBAAkB,CAAC,EAAE,OAAO,OAAO,YAC/C,qBAAC,OAAI,EAAA,WAAU,cACd,UAAA;AAAA,EAAA,qBAAC,OACA,EAAA,UAAA;AAAA,IAAA,oBAAC,UAAM,UAAM,MAAA,CAAA;AAAA,IACZ,CAAC,CAAC,SACF,oBAAC,SAAI,WAAW,QAAQ,OAAO,cAAY,GAAG,KAAK,8BACjD,UAAQ,QAAA,IAAI,OAAO,MACrB,CAAA;AAAA,EAAA,GAEF;AAAA,EACC,CAAC,CAAC,SAAS,oBAAC,OAAI,WAAW,QAAQ,KAAM,UAAM,MAAA,CAAA;AAAA,EACjD,CAAA;"}
|
package/dist/harmony99.cjs
CHANGED
@@ -1,15 +1,24 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
-
const
|
4
|
-
const
|
5
|
-
const
|
6
|
-
const
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
const badge = "_badge_1pc1v_1";
|
4
|
+
const tag = "_tag_1pc1v_15";
|
5
|
+
const withNavLinkStyle = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21";
|
6
|
+
const disabled = "_disabled_1pc1v_57";
|
7
|
+
const projectNavigationItem = "_projectNavigationItem_1pc1v_61";
|
8
|
+
const projectNavigationItemDisabled = "_projectNavigationItemDisabled_1pc1v_67";
|
9
|
+
const classes = {
|
10
|
+
badge,
|
11
|
+
tag,
|
12
|
+
withNavLinkStyle,
|
13
|
+
disabled,
|
14
|
+
projectNavigationItem,
|
15
|
+
projectNavigationItemDisabled
|
10
16
|
};
|
11
|
-
exports.
|
12
|
-
exports.default =
|
13
|
-
exports.
|
14
|
-
exports.
|
17
|
+
exports.badge = badge;
|
18
|
+
exports.default = classes;
|
19
|
+
exports.disabled = disabled;
|
20
|
+
exports.projectNavigationItem = projectNavigationItem;
|
21
|
+
exports.projectNavigationItemDisabled = projectNavigationItemDisabled;
|
22
|
+
exports.tag = tag;
|
23
|
+
exports.withNavLinkStyle = withNavLinkStyle;
|
15
24
|
//# sourceMappingURL=harmony99.cjs.map
|
package/dist/harmony99.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony99.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"harmony99.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/harmony99.mjs
CHANGED
@@ -1,15 +1,24 @@
|
|
1
|
-
const
|
2
|
-
const
|
3
|
-
const
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
const badge = "_badge_1pc1v_1";
|
2
|
+
const tag = "_tag_1pc1v_15";
|
3
|
+
const withNavLinkStyle = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21";
|
4
|
+
const disabled = "_disabled_1pc1v_57";
|
5
|
+
const projectNavigationItem = "_projectNavigationItem_1pc1v_61";
|
6
|
+
const projectNavigationItemDisabled = "_projectNavigationItemDisabled_1pc1v_67";
|
7
|
+
const classes = {
|
8
|
+
badge,
|
9
|
+
tag,
|
10
|
+
withNavLinkStyle,
|
11
|
+
disabled,
|
12
|
+
projectNavigationItem,
|
13
|
+
projectNavigationItemDisabled
|
8
14
|
};
|
9
15
|
export {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
16
|
+
badge,
|
17
|
+
classes as default,
|
18
|
+
disabled,
|
19
|
+
projectNavigationItem,
|
20
|
+
projectNavigationItemDisabled,
|
21
|
+
tag,
|
22
|
+
withNavLinkStyle
|
14
23
|
};
|
15
24
|
//# sourceMappingURL=harmony99.mjs.map
|
package/dist/harmony99.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony99.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"harmony99.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
package/dist/types/src/node.d.ts
CHANGED
@@ -7,7 +7,7 @@ export { ProjectNavigationPanel, type ProjectNavigationPanelProps, } from './fea
|
|
7
7
|
export type { NavigationConfig } from './features/navigation/core/NavigationClient';
|
8
8
|
export { Sidebar } from './components/Sidebar/Sidebar';
|
9
9
|
export { listTeamsResponseToSidebarTeams, teamResponseToSidebarTeamExtended, } from './components/Sidebar/utils/content';
|
10
|
-
export type { SidebarConfig, SidebarContextProps, } from './components/Sidebar/types';
|
10
|
+
export type { SidebarConfig, SidebarContextProps, SidebarTeam, SidebarTeamExtended, } from './components/Sidebar/types';
|
11
11
|
export { Breadcrumbs } from './components/NavigationPanel/components/Breadcrumbs/Breadcrumbs';
|
12
12
|
export { Table } from './components/Table/Table';
|
13
13
|
export * from './features/node';
|