@teambit/component 0.0.988 → 0.0.990
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/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{preview-1676604673087.js → preview-1676811569495.js} +2 -2
- package/dist/ui/menu/index.js.map +1 -1
- package/dist/ui/menu/menu.js.map +1 -1
- package/dist/ui/menu/menu.module.scss +1 -1
- package/package-tar/teambit-component-0.0.990.tgz +0 -0
- package/package.json +28 -28
- package/ui/menu/index.ts +1 -1
- package/ui/menu/menu.module.scss +1 -1
- package/ui/menu/menu.tsx +1 -1
- package/package-tar/teambit-component-0.0.988.tgz +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export { ComponentContext, ComponentDescriptorContext, useComponentDescriptor }
|
|
|
24
24
|
export type { ComponentProviderProps, ComponentDescriptorProviderProps } from './ui/context';
|
|
25
25
|
export { ComponentProvider, ComponentDescriptorProvider } from './ui/context';
|
|
26
26
|
export { componentFields, componentIdFields, componentOverviewFields } from './ui';
|
|
27
|
-
export { NavPlugin, ConsumePlugin, CollapsibleMenuNav, MenuNavProps, ComponentMenu, VersionRelatedDropdowns } from './ui/menu';
|
|
27
|
+
export { NavPlugin, ConsumePlugin, CollapsibleMenuNav, MenuNavProps, ComponentMenu, VersionRelatedDropdowns, } from './ui/menu';
|
|
28
28
|
export { RegisteredComponentRoute, ComponentUrlParams } from './component.route';
|
|
29
29
|
export { ComponentModel, ComponentModelProps } from './ui/component-model';
|
|
30
30
|
export { TopBarNav } from './ui/top-bar-nav';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ComponentAspect"],"sources":["index.ts"],"sourcesContent":["import { ComponentAspect } from './component.aspect';\n\nexport type { GetComponentsOptions } from './get-component-opts';\nexport type { UseComponentType } from './ui/use-component';\nexport { useComponentHost } from './host';\nexport { Component, InvalidComponent } from './component';\nexport { ComponentID } from '@teambit/component-id';\nexport { default as ComponentFS } from './component-fs';\nexport type { default as ComponentConfig } from './config';\nexport type { ComponentFactory, ResolveAspectsOptions } from './component-factory';\nexport type { AspectList } from './aspect-list';\nexport { AspectEntry, AspectData, ResolveComponentIdFunc } from './aspect-entry';\n// TODO: check why it's not working when using the index in snap dir like this:\n// export { Snap, Author } from './snap';\nexport { Snap, SnapProps } from './snap/snap';\nexport type { Author } from './snap/author';\n// TODO: check why it's not working when using the index in tag dir like this:\n// export { Tag } from './tag';\nexport { Tag, TagProps } from './tag/tag';\nexport type { IComponent } from './component-interface';\nexport { State } from './state';\nexport type { Hash } from './hash';\nexport { TagMap } from './tag-map';\nexport { ComponentMap } from './component-map';\nexport type { ComponentMain } from './component.main.runtime';\nexport type { ComponentUI } from './component.ui.runtime';\nexport { Section } from './section';\nexport { ComponentContext, ComponentDescriptorContext, useComponentDescriptor } from './ui/context/component-context';\nexport type { ComponentProviderProps, ComponentDescriptorProviderProps } from './ui/context';\nexport { ComponentProvider, ComponentDescriptorProvider } from './ui/context';\nexport { componentFields, componentIdFields, componentOverviewFields } from './ui';\nexport {
|
|
1
|
+
{"version":3,"names":["ComponentAspect"],"sources":["index.ts"],"sourcesContent":["import { ComponentAspect } from './component.aspect';\n\nexport type { GetComponentsOptions } from './get-component-opts';\nexport type { UseComponentType } from './ui/use-component';\nexport { useComponentHost } from './host';\nexport { Component, InvalidComponent } from './component';\nexport { ComponentID } from '@teambit/component-id';\nexport { default as ComponentFS } from './component-fs';\nexport type { default as ComponentConfig } from './config';\nexport type { ComponentFactory, ResolveAspectsOptions } from './component-factory';\nexport type { AspectList } from './aspect-list';\nexport { AspectEntry, AspectData, ResolveComponentIdFunc } from './aspect-entry';\n// TODO: check why it's not working when using the index in snap dir like this:\n// export { Snap, Author } from './snap';\nexport { Snap, SnapProps } from './snap/snap';\nexport type { Author } from './snap/author';\n// TODO: check why it's not working when using the index in tag dir like this:\n// export { Tag } from './tag';\nexport { Tag, TagProps } from './tag/tag';\nexport type { IComponent } from './component-interface';\nexport { State } from './state';\nexport type { Hash } from './hash';\nexport { TagMap } from './tag-map';\nexport { ComponentMap } from './component-map';\nexport type { ComponentMain } from './component.main.runtime';\nexport type { ComponentUI } from './component.ui.runtime';\nexport { Section } from './section';\nexport { ComponentContext, ComponentDescriptorContext, useComponentDescriptor } from './ui/context/component-context';\nexport type { ComponentProviderProps, ComponentDescriptorProviderProps } from './ui/context';\nexport { ComponentProvider, ComponentDescriptorProvider } from './ui/context';\nexport { componentFields, componentIdFields, componentOverviewFields } from './ui';\nexport {\n NavPlugin,\n ConsumePlugin,\n CollapsibleMenuNav,\n MenuNavProps,\n ComponentMenu,\n VersionRelatedDropdowns,\n} from './ui/menu';\nexport { RegisteredComponentRoute, ComponentUrlParams } from './component.route';\nexport { ComponentModel, ComponentModelProps } from './ui/component-model';\nexport { TopBarNav } from './ui/top-bar-nav';\nexport type { ShowFragment, ShowRow, ShowJSONRow } from './show';\nexport { default as Config } from './config';\nexport { useComponent, useIdFromLocation } from './ui';\n\n// export { AspectList } from './aspect-list';\n// export { AspectEntry } from './aspect-entry';\nexport { ComponentAspect };\nexport default ComponentAspect;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AA/BA;AACA;AAGA;AACA;AA6BA;AACA;AAAA,eAEeA,4BAAe;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.990/dist/component.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.990/dist/component.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { CollapsibleMenuNav, MenuNavProps } from './menu-nav';\nexport { ComponentMenu, VersionRelatedDropdowns } from './menu';\nexport type { NavPlugin, OrderedNavigationSlot, ConsumePlugin, ConsumeMethodSlot } from './nav-plugin'
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { CollapsibleMenuNav, MenuNavProps } from './menu-nav';\nexport { ComponentMenu, VersionRelatedDropdowns } from './menu';\nexport type { NavPlugin, OrderedNavigationSlot, ConsumePlugin, ConsumeMethodSlot } from './nav-plugin';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA"}
|
package/dist/ui/menu/menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getComponentIdStr","componentIdStr","isFunction","ComponentMenu","navigationSlot","widgetSlot","className","host","menuItemSlot","consumeMethodSlot","skipRightSide","useComponent","path","useComponentFilters","idFromLocation","useIdFromLocation","_componentIdStr","componentId","ComponentID","fromString","undefined","resolvedComponentIdStr","useComponentOptions","logFilters","customUseComponent","component","useComponentQuery","toString","mainMenuItems","useMemo","groupBy","flatten","values","classnames","styles","topBar","leftSide","rightSide","hideOnMobile","VersionRelatedDropdowns","consumeMethods","location","useLocation","lanesModel","useLanes","currentLane","viewedLane","id","isDefault","logs","isWorkspace","snaps","filter","log","tag","map","snap","version","hash","tags","tagLookup","Map","forEach","set","compact","toArray","reverse","get","isNew","length","lanes","getLanesByComponentId","lane","localVersion","currentVersion","search","includes","methods","useConsumeMethods","useBox","name","latest","componentVersionMenu","componentModel","method","x","Component","Title"],"sources":["menu.tsx"],"sourcesContent":["import { Routes, Route } from 'react-router-dom';\nimport { MainDropdown, MenuItemSlot } from '@teambit/ui-foundation.ui.main-dropdown';\nimport { VersionDropdown } from '@teambit/component.ui.version-dropdown';\nimport { FullLoader } from '@teambit/ui-foundation.ui.full-loader';\nimport type { ConsumeMethod } from '@teambit/ui-foundation.ui.use-box.menu';\nimport { useLocation } from '@teambit/base-react.navigation.link';\nimport { flatten, groupBy, compact, isFunction } from 'lodash';\nimport classnames from 'classnames';\nimport React, { useMemo } from 'react';\nimport { UseBoxDropdown } from '@teambit/ui-foundation.ui.use-box.dropdown';\nimport { useLanes } from '@teambit/lanes.hooks.use-lanes';\nimport { LaneModel } from '@teambit/lanes.ui.models.lanes-model';\nimport { Menu as ConsumeMethodsMenu } from '@teambit/ui-foundation.ui.use-box.menu';\nimport { LegacyComponentLog } from '@teambit/legacy-component-log';\nimport type { ComponentModel } from '../component-model';\nimport { useComponent as useComponentQuery, UseComponentType } from '../use-component';\nimport { CollapsibleMenuNav } from './menu-nav';\nimport styles from './menu.module.scss';\nimport { OrderedNavigationSlot, ConsumeMethodSlot } from './nav-plugin';\nimport { useIdFromLocation } from '../use-component-from-location';\nimport { ComponentID } from '../..';\nimport { Filters } from '../use-component-query';\n\nexport type MenuProps = {\n className?: string;\n\n /**\n * skip the right side.\n */\n skipRightSide?: boolean;\n\n /**\n * slot for top bar menu nav items\n */\n navigationSlot: OrderedNavigationSlot;\n /**\n * right side menu item slot\n */\n widgetSlot: OrderedNavigationSlot;\n host: string;\n /**\n * main dropdown item slot\n */\n menuItemSlot: MenuItemSlot;\n\n consumeMethodSlot: ConsumeMethodSlot;\n\n componentIdStr?: string | (() => string | undefined);\n\n useComponent?: UseComponentType;\n\n path?: string;\n\n useComponentFilters?: () => Filters;\n};\nfunction getComponentIdStr(componentIdStr?: string | (() => string | undefined)): string | undefined {\n if (isFunction(componentIdStr)) return componentIdStr();\n return componentIdStr;\n}\n/**\n * top bar menu.\n */\nexport function ComponentMenu({\n navigationSlot,\n widgetSlot,\n className,\n host,\n menuItemSlot,\n consumeMethodSlot,\n componentIdStr,\n skipRightSide,\n useComponent,\n path,\n useComponentFilters,\n}: MenuProps) {\n const idFromLocation = useIdFromLocation();\n const _componentIdStr = getComponentIdStr(componentIdStr);\n const componentId = _componentIdStr ? ComponentID.fromString(_componentIdStr) : undefined;\n const resolvedComponentIdStr = path || idFromLocation;\n\n const useComponentOptions = {\n logFilters: useComponentFilters?.(),\n customUseComponent: useComponent,\n };\n\n const { component } = useComponentQuery(host, componentId?.toString() || idFromLocation, useComponentOptions);\n const mainMenuItems = useMemo(() => groupBy(flatten(menuItemSlot.values()), 'category'), [menuItemSlot]);\n if (!component) return <FullLoader />;\n return (\n <Routes>\n <Route\n path={`${resolvedComponentIdStr}/*`}\n element={\n <div className={classnames(styles.topBar, className)}>\n <div className={styles.leftSide}>\n <CollapsibleMenuNav navigationSlot={navigationSlot} widgetSlot={widgetSlot} />\n </div>\n {!skipRightSide && (\n <div className={styles.rightSide}>\n <VersionRelatedDropdowns component={component} consumeMethods={consumeMethodSlot} host={host} />\n <MainDropdown className={styles.hideOnMobile} menuItems={mainMenuItems} />\n </div>\n )}\n </div>\n }\n />\n </Routes>\n );\n}\n\nexport function VersionRelatedDropdowns({\n component,\n consumeMethods,\n className,\n host,\n}: {\n component: ComponentModel;\n consumeMethods?: ConsumeMethodSlot;\n className?: string,\n host: string;\n}) {\n const location = useLocation();\n const { lanesModel } = useLanes();\n const currentLane =\n lanesModel?.viewedLane?.id && !lanesModel?.viewedLane?.id.isDefault() ? lanesModel.viewedLane : undefined;\n\n const { logs } = component;\n const isWorkspace = host === 'teambit.workspace/workspace';\n\n const snaps = useMemo(() => {\n return (logs || []).filter((log) => !log.tag).map((snap) => ({ ...snap, version: snap.hash }));\n }, [logs]);\n\n const tags = useMemo(() => {\n const tagLookup = new Map<string, LegacyComponentLog>();\n (logs || [])\n .filter((log) => log.tag)\n .forEach((tag) => {\n tagLookup.set(tag?.tag as string, tag);\n });\n return compact(\n component.tags\n ?.toArray()\n .reverse()\n .map((tag) => tagLookup.get(tag.version.version))\n ).map((tag) => ({ ...tag, version: tag.tag as string }));\n }, [logs]);\n\n const isNew = snaps.length === 0 && tags.length === 0;\n\n const lanes = lanesModel?.getLanesByComponentId(component.id)?.filter((lane) => !lane.id.isDefault()) || [];\n const localVersion = isWorkspace && !isNew && !currentLane;\n\n const currentVersion =\n isWorkspace && !isNew && !location?.search.includes('version') ? 'workspace' : component.version;\n\n const methods = useConsumeMethods(component, consumeMethods, currentLane);\n return (\n <>\n {consumeMethods && tags.length > 0 && (\n <UseBoxDropdown\n position=\"bottom-end\"\n className={classnames(styles.useBox, styles.hideOnMobile)}\n Menu={<ConsumeMethodsMenu methods={methods} componentName={component.id.name} />}\n />\n )}\n <VersionDropdown\n tags={tags}\n snaps={snaps}\n lanes={lanes}\n localVersion={localVersion}\n currentVersion={currentVersion}\n latestVersion={component.latest}\n currentLane={currentLane}\n className={className}\n menuClassName={styles.componentVersionMenu}\n />\n </>\n );\n}\n\nfunction useConsumeMethods(\n componentModel?: ComponentModel,\n consumeMethods?: ConsumeMethodSlot,\n currentLane?: LaneModel\n): ConsumeMethod[] {\n // if (!consumeMethods || !componentModel) return [];\n return useMemo(\n () =>\n flatten(consumeMethods?.values())\n .map((method) => {\n if (!componentModel) return undefined;\n return method?.(componentModel, { currentLane });\n })\n .filter((x) => !!x && x.Component && x.Title) as ConsumeMethod[],\n [consumeMethods, componentModel, currentLane]\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA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IAAAE,iBAAO,EAACS,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAER,MAAM,EAAE,CAAC,CAC9BuB,GAAG,CAAE6B,MAAM,IAAK;IACf,IAAI,CAACD,cAAc,EAAE,OAAO/D,SAAS;IACrC,OAAOgE,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAGD,cAAc,EAAE;MAAEtC;IAAY,CAAC,CAAC;EAClD,CAAC,CAAC,CACDO,MAAM,CAAEiC,CAAC,IAAK,CAAC,CAACA,CAAC,IAAIA,CAAC,CAACC,SAAS,IAAID,CAAC,CAACE,KAAK,CAAoB,EACpE,CAAC/C,cAAc,EAAE2C,cAAc,EAAEtC,WAAW,CAAC,CAC9C;AACH"}
|
|
1
|
+
{"version":3,"names":["getComponentIdStr","componentIdStr","isFunction","ComponentMenu","navigationSlot","widgetSlot","className","host","menuItemSlot","consumeMethodSlot","skipRightSide","useComponent","path","useComponentFilters","idFromLocation","useIdFromLocation","_componentIdStr","componentId","ComponentID","fromString","undefined","resolvedComponentIdStr","useComponentOptions","logFilters","customUseComponent","component","useComponentQuery","toString","mainMenuItems","useMemo","groupBy","flatten","values","classnames","styles","topBar","leftSide","rightSide","hideOnMobile","VersionRelatedDropdowns","consumeMethods","location","useLocation","lanesModel","useLanes","currentLane","viewedLane","id","isDefault","logs","isWorkspace","snaps","filter","log","tag","map","snap","version","hash","tags","tagLookup","Map","forEach","set","compact","toArray","reverse","get","isNew","length","lanes","getLanesByComponentId","lane","localVersion","currentVersion","search","includes","methods","useConsumeMethods","useBox","name","latest","componentVersionMenu","componentModel","method","x","Component","Title"],"sources":["menu.tsx"],"sourcesContent":["import { Routes, Route } from 'react-router-dom';\nimport { MainDropdown, MenuItemSlot } from '@teambit/ui-foundation.ui.main-dropdown';\nimport { VersionDropdown } from '@teambit/component.ui.version-dropdown';\nimport { FullLoader } from '@teambit/ui-foundation.ui.full-loader';\nimport type { ConsumeMethod } from '@teambit/ui-foundation.ui.use-box.menu';\nimport { useLocation } from '@teambit/base-react.navigation.link';\nimport { flatten, groupBy, compact, isFunction } from 'lodash';\nimport classnames from 'classnames';\nimport React, { useMemo } from 'react';\nimport { UseBoxDropdown } from '@teambit/ui-foundation.ui.use-box.dropdown';\nimport { useLanes } from '@teambit/lanes.hooks.use-lanes';\nimport { LaneModel } from '@teambit/lanes.ui.models.lanes-model';\nimport { Menu as ConsumeMethodsMenu } from '@teambit/ui-foundation.ui.use-box.menu';\nimport { LegacyComponentLog } from '@teambit/legacy-component-log';\nimport type { ComponentModel } from '../component-model';\nimport { useComponent as useComponentQuery, UseComponentType } from '../use-component';\nimport { CollapsibleMenuNav } from './menu-nav';\nimport styles from './menu.module.scss';\nimport { OrderedNavigationSlot, ConsumeMethodSlot } from './nav-plugin';\nimport { useIdFromLocation } from '../use-component-from-location';\nimport { ComponentID } from '../..';\nimport { Filters } from '../use-component-query';\n\nexport type MenuProps = {\n className?: string;\n\n /**\n * skip the right side.\n */\n skipRightSide?: boolean;\n\n /**\n * slot for top bar menu nav items\n */\n navigationSlot: OrderedNavigationSlot;\n /**\n * right side menu item slot\n */\n widgetSlot: OrderedNavigationSlot;\n host: string;\n /**\n * main dropdown item slot\n */\n menuItemSlot: MenuItemSlot;\n\n consumeMethodSlot: ConsumeMethodSlot;\n\n componentIdStr?: string | (() => string | undefined);\n\n useComponent?: UseComponentType;\n\n path?: string;\n\n useComponentFilters?: () => Filters;\n};\nfunction getComponentIdStr(componentIdStr?: string | (() => string | undefined)): string | undefined {\n if (isFunction(componentIdStr)) return componentIdStr();\n return componentIdStr;\n}\n/**\n * top bar menu.\n */\nexport function ComponentMenu({\n navigationSlot,\n widgetSlot,\n className,\n host,\n menuItemSlot,\n consumeMethodSlot,\n componentIdStr,\n skipRightSide,\n useComponent,\n path,\n useComponentFilters,\n}: MenuProps) {\n const idFromLocation = useIdFromLocation();\n const _componentIdStr = getComponentIdStr(componentIdStr);\n const componentId = _componentIdStr ? ComponentID.fromString(_componentIdStr) : undefined;\n const resolvedComponentIdStr = path || idFromLocation;\n\n const useComponentOptions = {\n logFilters: useComponentFilters?.(),\n customUseComponent: useComponent,\n };\n\n const { component } = useComponentQuery(host, componentId?.toString() || idFromLocation, useComponentOptions);\n const mainMenuItems = useMemo(() => groupBy(flatten(menuItemSlot.values()), 'category'), [menuItemSlot]);\n if (!component) return <FullLoader />;\n return (\n <Routes>\n <Route\n path={`${resolvedComponentIdStr}/*`}\n element={\n <div className={classnames(styles.topBar, className)}>\n <div className={styles.leftSide}>\n <CollapsibleMenuNav navigationSlot={navigationSlot} widgetSlot={widgetSlot} />\n </div>\n {!skipRightSide && (\n <div className={styles.rightSide}>\n <VersionRelatedDropdowns component={component} consumeMethods={consumeMethodSlot} host={host} />\n <MainDropdown className={styles.hideOnMobile} menuItems={mainMenuItems} />\n </div>\n )}\n </div>\n }\n />\n </Routes>\n );\n}\n\nexport function VersionRelatedDropdowns({\n component,\n consumeMethods,\n className,\n host,\n}: {\n component: ComponentModel;\n consumeMethods?: ConsumeMethodSlot;\n className?: string;\n host: string;\n}) {\n const location = useLocation();\n const { lanesModel } = useLanes();\n const currentLane =\n lanesModel?.viewedLane?.id && !lanesModel?.viewedLane?.id.isDefault() ? lanesModel.viewedLane : undefined;\n\n const { logs } = component;\n const isWorkspace = host === 'teambit.workspace/workspace';\n\n const snaps = useMemo(() => {\n return (logs || []).filter((log) => !log.tag).map((snap) => ({ ...snap, version: snap.hash }));\n }, [logs]);\n\n const tags = useMemo(() => {\n const tagLookup = new Map<string, LegacyComponentLog>();\n (logs || [])\n .filter((log) => log.tag)\n .forEach((tag) => {\n tagLookup.set(tag?.tag as string, tag);\n });\n return compact(\n component.tags\n ?.toArray()\n .reverse()\n .map((tag) => tagLookup.get(tag.version.version))\n ).map((tag) => ({ ...tag, version: tag.tag as string }));\n }, [logs]);\n\n const isNew = snaps.length === 0 && tags.length === 0;\n\n const lanes = lanesModel?.getLanesByComponentId(component.id)?.filter((lane) => !lane.id.isDefault()) || [];\n const localVersion = isWorkspace && !isNew && !currentLane;\n\n const currentVersion =\n isWorkspace && !isNew && !location?.search.includes('version') ? 'workspace' : component.version;\n\n const methods = useConsumeMethods(component, consumeMethods, currentLane);\n return (\n <>\n {consumeMethods && tags.length > 0 && (\n <UseBoxDropdown\n position=\"bottom-end\"\n className={classnames(styles.useBox, styles.hideOnMobile)}\n Menu={<ConsumeMethodsMenu methods={methods} componentName={component.id.name} />}\n />\n )}\n <VersionDropdown\n tags={tags}\n snaps={snaps}\n lanes={lanes}\n localVersion={localVersion}\n currentVersion={currentVersion}\n latestVersion={component.latest}\n currentLane={currentLane}\n className={className}\n menuClassName={styles.componentVersionMenu}\n />\n </>\n );\n}\n\nfunction useConsumeMethods(\n componentModel?: ComponentModel,\n consumeMethods?: ConsumeMethodSlot,\n currentLane?: LaneModel\n): ConsumeMethod[] {\n // if (!consumeMethods || !componentModel) return [];\n return useMemo(\n () =>\n flatten(consumeMethods?.values())\n .map((method) => {\n if (!componentModel) return undefined;\n return method?.(componentModel, { currentLane });\n })\n .filter((x) => !!x && x.Component && x.Title) as ConsumeMethod[],\n [consumeMethods, componentModel, currentLane]\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;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AACD,cAAc,EAAE,OAAO/D,SAAS;IACrC,OAAOgE,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAGD,cAAc,EAAE;MAAEtC;IAAY,CAAC,CAAC;EAClD,CAAC,CAAC,CACDO,MAAM,CAAEiC,CAAC,IAAK,CAAC,CAACA,CAAC,IAAIA,CAAC,CAACC,SAAS,IAAID,CAAC,CAACE,KAAK,CAAoB,EACpE,CAAC/C,cAAc,EAAE2C,cAAc,EAAEtC,WAAW,CAAC,CAC9C;AACH"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.990",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.990"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/any-fs": "0.0.5",
|
|
@@ -24,52 +24,52 @@
|
|
|
24
24
|
"@teambit/graph.cleargraph": "0.0.1",
|
|
25
25
|
"@teambit/harmony": "0.4.6",
|
|
26
26
|
"@teambit/base-react.navigation.link": "2.0.27",
|
|
27
|
+
"@teambit/explorer.ui.command-bar": "2.0.3",
|
|
27
28
|
"@teambit/documenter.ui.heading": "4.1.1",
|
|
28
29
|
"@teambit/documenter.ui.separator": "4.1.1",
|
|
29
|
-
"@teambit/explorer.ui.command-bar": "2.0.3",
|
|
30
30
|
"@teambit/design.navigation.responsive-navbar": "0.0.5",
|
|
31
31
|
"@teambit/base-ui.layout.breakpoints": "1.0.0",
|
|
32
|
-
"@teambit/component-id": "0.0.
|
|
32
|
+
"@teambit/component-id": "0.0.427",
|
|
33
33
|
"@teambit/ui-foundation.ui.menu-widget-icon": "0.0.497",
|
|
34
|
-
"@teambit/aspect-loader": "0.0.
|
|
35
|
-
"@teambit/graph": "0.0.
|
|
36
|
-
"@teambit/legacy-bit-id": "0.0.
|
|
34
|
+
"@teambit/aspect-loader": "0.0.990",
|
|
35
|
+
"@teambit/graph": "0.0.990",
|
|
36
|
+
"@teambit/legacy-bit-id": "0.0.423",
|
|
37
37
|
"@teambit/toolbox.path.match-patterns": "0.0.9",
|
|
38
38
|
"@teambit/toolbox.string.capitalize": "0.0.490",
|
|
39
|
-
"@teambit/cli": "0.0.
|
|
40
|
-
"@teambit/express": "0.0.
|
|
41
|
-
"@teambit/graphql": "0.0.
|
|
39
|
+
"@teambit/cli": "0.0.664",
|
|
40
|
+
"@teambit/express": "0.0.762",
|
|
41
|
+
"@teambit/graphql": "0.0.990",
|
|
42
42
|
"@teambit/bit-error": "0.0.402",
|
|
43
|
-
"@teambit/command-bar": "0.0.
|
|
43
|
+
"@teambit/command-bar": "0.0.990",
|
|
44
44
|
"@teambit/component.ui.deprecation-icon": "0.0.504",
|
|
45
|
-
"@teambit/preview": "0.0.
|
|
46
|
-
"@teambit/pubsub": "0.0.
|
|
47
|
-
"@teambit/react-router": "0.0.
|
|
45
|
+
"@teambit/preview": "0.0.990",
|
|
46
|
+
"@teambit/pubsub": "0.0.990",
|
|
47
|
+
"@teambit/react-router": "0.0.990",
|
|
48
48
|
"@teambit/ui-foundation.ui.is-browser": "0.0.495",
|
|
49
49
|
"@teambit/ui-foundation.ui.main-dropdown": "0.0.497",
|
|
50
50
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
|
|
51
|
-
"@teambit/ui-foundation.ui.use-box.menu": "0.0.
|
|
52
|
-
"@teambit/ui": "0.0.
|
|
53
|
-
"@teambit/component-issues": "0.0.
|
|
51
|
+
"@teambit/ui-foundation.ui.use-box.menu": "0.0.133",
|
|
52
|
+
"@teambit/ui": "0.0.990",
|
|
53
|
+
"@teambit/component-issues": "0.0.88",
|
|
54
54
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.500",
|
|
55
55
|
"@teambit/cli-table": "0.0.41",
|
|
56
|
-
"@teambit/component-descriptor": "0.0.
|
|
56
|
+
"@teambit/component-descriptor": "0.0.233",
|
|
57
57
|
"@teambit/ui-foundation.ui.react-router.use-query": "0.0.496",
|
|
58
|
-
"@teambit/design.ui.empty-box": "0.0.364",
|
|
59
|
-
"@teambit/harmony.ui.aspect-box": "0.0.497",
|
|
60
58
|
"@teambit/design.ui.pages.not-found": "0.0.366",
|
|
61
59
|
"@teambit/design.ui.pages.server-error": "0.0.366",
|
|
62
|
-
"@teambit/compositions": "0.0.
|
|
63
|
-
"@teambit/deprecation": "0.0.
|
|
64
|
-
"@teambit/envs": "0.0.
|
|
60
|
+
"@teambit/compositions": "0.0.990",
|
|
61
|
+
"@teambit/deprecation": "0.0.990",
|
|
62
|
+
"@teambit/envs": "0.0.990",
|
|
65
63
|
"@teambit/legacy-component-log": "0.0.399",
|
|
66
64
|
"@teambit/design.ui.styles.ellipsis": "0.0.357",
|
|
67
65
|
"@teambit/envs.ui.env-icon": "0.0.495",
|
|
68
|
-
"@teambit/
|
|
69
|
-
"@teambit/
|
|
70
|
-
"@teambit/
|
|
66
|
+
"@teambit/design.ui.empty-box": "0.0.364",
|
|
67
|
+
"@teambit/harmony.ui.aspect-box": "0.0.497",
|
|
68
|
+
"@teambit/component.ui.version-dropdown": "0.0.730",
|
|
69
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.127",
|
|
70
|
+
"@teambit/lanes.ui.models.lanes-model": "0.0.89",
|
|
71
71
|
"@teambit/ui-foundation.ui.full-loader": "0.0.495",
|
|
72
|
-
"@teambit/ui-foundation.ui.use-box.dropdown": "0.0.
|
|
72
|
+
"@teambit/ui-foundation.ui.use-box.dropdown": "0.0.132"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/react": "^17.0.8",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"react-router-dom": "^6.0.0",
|
|
90
90
|
"@apollo/client": "^3.6.0",
|
|
91
|
-
"@teambit/legacy": "1.0.
|
|
91
|
+
"@teambit/legacy": "1.0.445",
|
|
92
92
|
"react": "^16.8.0 || ^17.0.0",
|
|
93
93
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
94
94
|
},
|
package/ui/menu/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { CollapsibleMenuNav, MenuNavProps } from './menu-nav';
|
|
2
2
|
export { ComponentMenu, VersionRelatedDropdowns } from './menu';
|
|
3
|
-
export type { NavPlugin, OrderedNavigationSlot, ConsumePlugin, ConsumeMethodSlot } from './nav-plugin';
|
|
3
|
+
export type { NavPlugin, OrderedNavigationSlot, ConsumePlugin, ConsumeMethodSlot } from './nav-plugin';
|
package/ui/menu/menu.module.scss
CHANGED
package/ui/menu/menu.tsx
CHANGED
|
Binary file
|