@teambit/component 1.0.226 → 1.0.228

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.
Files changed (88) hide show
  1. package/artifacts/__bit_junit.xml +1 -1
  2. package/artifacts/preview/teambit_component_component-preview.js +1 -1
  3. package/artifacts/schema.json +821 -1517
  4. package/dist/component-factory.js.map +1 -1
  5. package/dist/component.js +3 -0
  6. package/dist/component.js.map +1 -1
  7. package/dist/{preview-1712632644937.js → preview-1712805335812.js} +2 -2
  8. package/package.json +22 -22
  9. package/tsconfig.json +46 -1
  10. package/dist/aspect-entry.d.ts +0 -39
  11. package/dist/aspect-list.d.ts +0 -43
  12. package/dist/aspect.section.d.ts +0 -13
  13. package/dist/component-factory.d.ts +0 -149
  14. package/dist/component-fs.d.ts +0 -34
  15. package/dist/component-interface.d.ts +0 -22
  16. package/dist/component-map/component-map.d.ts +0 -63
  17. package/dist/component-map/index.d.ts +0 -1
  18. package/dist/component-meta.d.ts +0 -22
  19. package/dist/component.aspect.d.ts +0 -3
  20. package/dist/component.composition.d.ts +0 -1
  21. package/dist/component.d.ts +0 -182
  22. package/dist/component.graphql.d.ts +0 -83
  23. package/dist/component.main.runtime.d.ts +0 -75
  24. package/dist/component.route.d.ts +0 -18
  25. package/dist/component.ui.runtime.d.ts +0 -104
  26. package/dist/config.d.ts +0 -18
  27. package/dist/dependencies/dependencies.d.ts +0 -43
  28. package/dist/dependencies/index.d.ts +0 -1
  29. package/dist/exceptions/could-not-find-latest.d.ts +0 -4
  30. package/dist/exceptions/host-not-found.d.ts +0 -12
  31. package/dist/exceptions/index.d.ts +0 -4
  32. package/dist/exceptions/main-file-not-found.d.ts +0 -14
  33. package/dist/exceptions/nothing-to-snap.d.ts +0 -2
  34. package/dist/get-component-opts.d.ts +0 -13
  35. package/dist/hash.d.ts +0 -4
  36. package/dist/head.d.ts +0 -0
  37. package/dist/history-graph.d.ts +0 -2
  38. package/dist/host/component-host-model.d.ts +0 -7
  39. package/dist/host/index.d.ts +0 -2
  40. package/dist/host/use-component-host.d.ts +0 -6
  41. package/dist/index.d.ts +0 -37
  42. package/dist/on-load.d.ts +0 -0
  43. package/dist/section/index.d.ts +0 -1
  44. package/dist/section/section.d.ts +0 -11
  45. package/dist/show/extensions.fragment.d.ts +0 -13
  46. package/dist/show/files.fragment.d.ts +0 -14
  47. package/dist/show/id.fragment.d.ts +0 -13
  48. package/dist/show/index.d.ts +0 -8
  49. package/dist/show/main-file.fragment.d.ts +0 -9
  50. package/dist/show/name.fragment.d.ts +0 -9
  51. package/dist/show/scope.fragment.d.ts +0 -10
  52. package/dist/show/show-fragment.d.ts +0 -37
  53. package/dist/show/show.cmd.d.ts +0 -26
  54. package/dist/snap/author.d.ts +0 -17
  55. package/dist/snap/index.d.ts +0 -2
  56. package/dist/snap/snap.d.ts +0 -56
  57. package/dist/state.d.ts +0 -65
  58. package/dist/store.d.ts +0 -3
  59. package/dist/tag/index.d.ts +0 -1
  60. package/dist/tag/tag.d.ts +0 -32
  61. package/dist/tag-map.d.ts +0 -35
  62. package/dist/ui/aspect-page/aspect-page.d.ts +0 -1
  63. package/dist/ui/aspect-page/index.d.ts +0 -1
  64. package/dist/ui/component-error/component-error.d.ts +0 -20
  65. package/dist/ui/component-error/index.d.ts +0 -1
  66. package/dist/ui/component-model/component-model.d.ts +0 -186
  67. package/dist/ui/component-model/index.d.ts +0 -1
  68. package/dist/ui/component-searcher/component-result.d.ts +0 -16
  69. package/dist/ui/component-searcher/component-searcher.d.ts +0 -22
  70. package/dist/ui/component-searcher/index.d.ts +0 -2
  71. package/dist/ui/component.d.ts +0 -26
  72. package/dist/ui/context/component-context.d.ts +0 -6
  73. package/dist/ui/context/component-provider.d.ts +0 -25
  74. package/dist/ui/context/index.d.ts +0 -3
  75. package/dist/ui/index.d.ts +0 -12
  76. package/dist/ui/menu/index.d.ts +0 -3
  77. package/dist/ui/menu/menu-nav.d.ts +0 -23
  78. package/dist/ui/menu/menu.d.ts +0 -97
  79. package/dist/ui/menu/nav-plugin.d.ts +0 -28
  80. package/dist/ui/top-bar-nav/index.d.ts +0 -1
  81. package/dist/ui/top-bar-nav/top-bar-nav.d.ts +0 -2
  82. package/dist/ui/use-component-from-location.d.ts +0 -1
  83. package/dist/ui/use-component-logs.d.ts +0 -16
  84. package/dist/ui/use-component-query.d.ts +0 -3
  85. package/dist/ui/use-component.d.ts +0 -3
  86. package/dist/ui/use-component.fragments.d.ts +0 -10
  87. package/dist/ui/use-component.model.d.ts +0 -44
  88. package/dist/ui/use-component.utils.d.ts +0 -1
@@ -1,186 +0,0 @@
1
- import { Composition, CompositionProps } from '@teambit/compositions';
2
- import { DeprecationInfo } from '@teambit/deprecation';
3
- import { Descriptor } from '@teambit/envs';
4
- import { ComponentID, ComponentIdObj } from '@teambit/component-id';
5
- import { LegacyComponentLog } from '@teambit/legacy-component-log';
6
- import { ComponentPreviewSize } from '@teambit/preview';
7
- import { TagMap } from '../../tag-map';
8
- import { TagProps } from '../../tag/tag';
9
- export type ComponentModelProps = {
10
- id: ComponentIdObj;
11
- description: string;
12
- buildStatus?: string;
13
- server?: ComponentServer;
14
- displayName: string;
15
- packageName: string;
16
- compositions?: CompositionProps[];
17
- tags?: TagProps[];
18
- issuesCount?: number;
19
- status?: any;
20
- deprecation?: DeprecationInfo;
21
- env?: Descriptor;
22
- labels?: string[];
23
- host?: string;
24
- latest?: string;
25
- preview?: ComponentPreview;
26
- logs?: LegacyComponentLog[];
27
- size?: ComponentPreviewSize;
28
- };
29
- export type ComponentPreview = {
30
- includesEnvTemplate?: boolean;
31
- isScaling?: boolean;
32
- onlyOverview?: boolean;
33
- legacyHeader?: boolean;
34
- useNameParam?: boolean;
35
- skipIncludes?: boolean;
36
- };
37
- export type ComponentServer = {
38
- env: string;
39
- /**
40
- * Full dev server url.
41
- */
42
- url?: string;
43
- /**
44
- * host of the component server (used mostly by cloud providers for remote scopes)
45
- */
46
- host?: string;
47
- /**
48
- * This is used mostly by cloud to proxy requests to the correct scope.
49
- */
50
- basePath?: string;
51
- };
52
- export declare class ComponentModel {
53
- /**
54
- * id of the component
55
- */
56
- readonly id: ComponentID;
57
- /**
58
- * display name of the component.
59
- */
60
- readonly displayName: string;
61
- /**
62
- * package name of the component.
63
- */
64
- readonly packageName: string;
65
- /**
66
- * the component server.
67
- */
68
- readonly server: ComponentServer | undefined;
69
- /**
70
- * array of compositions
71
- */
72
- readonly compositions: Composition[];
73
- /**
74
- * tags of the component.
75
- */
76
- readonly tags: TagMap;
77
- /**
78
- * component build status
79
- */
80
- readonly buildStatus?: string | undefined;
81
- /**
82
- * issues of component.
83
- */
84
- readonly issuesCount?: number | undefined;
85
- /**
86
- * status of component.
87
- */
88
- readonly status?: any;
89
- /**
90
- * deprecation info of the component.
91
- */
92
- readonly deprecation?: DeprecationInfo | undefined;
93
- /**
94
- * env descriptor.
95
- */
96
- readonly environment?: Descriptor | undefined;
97
- /**
98
- * description of the component.
99
- */
100
- readonly description: string;
101
- readonly labels: string[];
102
- /**
103
- * host of the component
104
- */
105
- readonly host?: string | undefined;
106
- /**
107
- *
108
- * size preview
109
- */
110
- readonly size?: ComponentPreviewSize | undefined;
111
- /**
112
- * latest version of component
113
- */
114
- readonly latest?: string | undefined;
115
- readonly preview?: ComponentPreview | undefined;
116
- readonly logs?: LegacyComponentLog[] | undefined;
117
- constructor(
118
- /**
119
- * id of the component
120
- */
121
- id: ComponentID,
122
- /**
123
- * display name of the component.
124
- */
125
- displayName: string,
126
- /**
127
- * package name of the component.
128
- */
129
- packageName: string,
130
- /**
131
- * the component server.
132
- */
133
- server: ComponentServer | undefined,
134
- /**
135
- * array of compositions
136
- */
137
- compositions: Composition[],
138
- /**
139
- * tags of the component.
140
- */
141
- tags: TagMap,
142
- /**
143
- * component build status
144
- */
145
- buildStatus?: string | undefined,
146
- /**
147
- * issues of component.
148
- */
149
- issuesCount?: number | undefined,
150
- /**
151
- * status of component.
152
- */
153
- status?: any,
154
- /**
155
- * deprecation info of the component.
156
- */
157
- deprecation?: DeprecationInfo | undefined,
158
- /**
159
- * env descriptor.
160
- */
161
- environment?: Descriptor | undefined,
162
- /**
163
- * description of the component.
164
- */
165
- description?: string, labels?: string[],
166
- /**
167
- * host of the component
168
- */
169
- host?: string | undefined,
170
- /**
171
- *
172
- * size preview
173
- */
174
- size?: ComponentPreviewSize | undefined,
175
- /**
176
- * latest version of component
177
- */
178
- latest?: string | undefined, preview?: ComponentPreview | undefined, logs?: LegacyComponentLog[] | undefined);
179
- get version(): string;
180
- /**
181
- * create an instance of a component from a plain object.
182
- */
183
- static from({ id, server, displayName, compositions, packageName, tags, deprecation, buildStatus, env, status, issuesCount, description, labels, host, latest, preview, size, logs, }: ComponentModelProps): ComponentModel;
184
- static fromArray(componentsProps: ComponentModelProps[]): ComponentModel[];
185
- static empty(): ComponentModel;
186
- }
@@ -1 +0,0 @@
1
- export { ComponentModel, ComponentModelProps } from './component-model';
@@ -1,16 +0,0 @@
1
- import React, { ComponentType } from 'react';
2
- import { ComponentModel } from '../component-model';
3
- export type ComponentPluginProps = React.HTMLAttributes<HTMLDivElement> & {
4
- component: ComponentModel;
5
- };
6
- export type ComponentResultPlugin = {
7
- key: string;
8
- start?: ComponentType<ComponentPluginProps>;
9
- end?: ComponentType<ComponentPluginProps>;
10
- };
11
- type ComponentResultProps = {
12
- component: ComponentModel;
13
- plugins?: ComponentResultPlugin[];
14
- };
15
- export declare function ComponentResult({ component, plugins }: ComponentResultProps): import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,22 +0,0 @@
1
- import { SearchResult, FuzzySearchItem, FuzzySearcher } from '@teambit/explorer.ui.command-bar';
2
- import type { SearchProvider } from '@teambit/command-bar';
3
- import { ComponentResultPlugin } from './component-result';
4
- import { ComponentModel } from '../component-model';
5
- export type { ComponentResultPlugin };
6
- type ComponentSearchIdx = {
7
- name: string;
8
- displayName: string;
9
- component: ComponentModel;
10
- };
11
- type ComponentSearcherOptions = {
12
- navigate: (path: string) => void;
13
- resultPlugins?: ComponentResultPlugin[];
14
- };
15
- export declare class ComponentSearcher extends FuzzySearcher<ComponentModel, ComponentSearchIdx> implements SearchProvider {
16
- options: ComponentSearcherOptions;
17
- constructor(options: ComponentSearcherOptions);
18
- updatePlugins(plugins: ComponentResultPlugin[]): void;
19
- test(term: string): boolean;
20
- protected toSearchableItem(item: ComponentModel): ComponentSearchIdx;
21
- protected toSearchResult: ({ item }: FuzzySearchItem<ComponentSearchIdx>) => SearchResult;
22
- }
@@ -1,2 +0,0 @@
1
- export { ComponentSearcher } from './component-searcher';
2
- export type { ComponentResultPlugin } from './component-searcher';
@@ -1,26 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { RouteProps } from 'react-router-dom';
3
- import type { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';
4
- import { SlotRegistry } from '@teambit/harmony';
5
- import { UseComponentType, Filters } from './use-component';
6
- import { ComponentModel } from './component-model';
7
- export type ComponentPageSlot = SlotRegistry<ComponentPageElement[]>;
8
- export type ComponentPageElement = {
9
- type: 'before' | 'after';
10
- content: ReactNode;
11
- };
12
- export type ComponentProps = {
13
- containerSlot?: ComponentPageSlot;
14
- routeSlot: RouteSlot;
15
- overriddenRoutes?: RouteProps[];
16
- host: string;
17
- onComponentChange?: (activeComponent?: ComponentModel) => void;
18
- useComponent?: UseComponentType;
19
- useComponentFilters?: () => Filters;
20
- path?: string;
21
- componentIdStr?: string | (() => string | undefined);
22
- };
23
- /**
24
- * main UI component of the Component extension.
25
- */
26
- export declare function Component({ routeSlot, overriddenRoutes, containerSlot, host, onComponentChange, componentIdStr, useComponent, path, useComponentFilters, }: ComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ComponentDescriptor } from '@teambit/component-descriptor';
3
- import { ComponentModel } from '../component-model';
4
- export declare const ComponentContext: React.Context<ComponentModel>;
5
- export declare const ComponentDescriptorContext: React.Context<ComponentDescriptor | undefined>;
6
- export declare const useComponentDescriptor: () => ComponentDescriptor | undefined;
@@ -1,25 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import type { ComponentDescriptor } from '@teambit/component-descriptor';
3
- import { ComponentModel } from '../component-model';
4
- export type ComponentProviderProps = {
5
- /**
6
- * component model.
7
- */
8
- component: ComponentModel;
9
- /**
10
- * component children.
11
- */
12
- children: ReactNode;
13
- };
14
- export declare function ComponentProvider({ component, children }: ComponentProviderProps): import("react/jsx-runtime").JSX.Element;
15
- export type ComponentDescriptorProviderProps = {
16
- /**
17
- * component model.
18
- */
19
- componentDescriptor?: ComponentDescriptor;
20
- /**
21
- * component children.
22
- */
23
- children: ReactNode;
24
- };
25
- export declare function ComponentDescriptorProvider({ componentDescriptor, children }: ComponentDescriptorProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- export { ComponentContext, ComponentDescriptorContext, useComponentDescriptor } from './component-context';
2
- export { ComponentProvider, ComponentDescriptorProvider } from './component-provider';
3
- export type { ComponentProviderProps, ComponentDescriptorProviderProps } from './component-provider';
@@ -1,12 +0,0 @@
1
- export { CollapsibleMenuNav, MenuNavProps } from './menu';
2
- export { Component } from './component';
3
- export { ConsumeMethodSlot, ComponentMenu, VersionRelatedDropdowns } from './menu';
4
- export { ComponentModel, ComponentModelProps } from './component-model';
5
- export { ComponentContext, ComponentProvider } from './context';
6
- export { TopBarNav } from './top-bar-nav';
7
- export { useComponent } from './use-component';
8
- export { componentIdFields, componentOverviewFields, componentFields, componentFieldsWithLogs, COMPONENT_QUERY_LOG_FIELDS, GET_COMPONENT, GET_COMPONENT_WITH_LOGS, } from './use-component.fragments';
9
- export { useIdFromLocation } from './use-component-from-location';
10
- export type { LogFilter, Filters, UseComponentOptions, ComponentQueryResult, UseComponentType, ComponentLogs, ComponentLogsResult, } from './use-component.model';
11
- export { useComponentQuery } from './use-component-query';
12
- export { useComponentLogs } from './use-component-logs';
@@ -1,3 +0,0 @@
1
- export { CollapsibleMenuNav, MenuNavProps } from './menu-nav';
2
- export { ComponentMenu, VersionRelatedDropdowns, RightSideMenuItem, RightSideMenuSlot } from './menu';
3
- export type { NavPlugin, OrderedNavigationSlot, ConsumePlugin, ConsumeMethodSlot, ConsumePluginProps, } from './nav-plugin';
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { NavPlugin, OrderedNavigationSlot } from './nav-plugin';
3
- export type MenuNavProps = {
4
- /**
5
- * @deprecated
6
- * use @property navPlugins
7
- */
8
- navigationSlot?: OrderedNavigationSlot;
9
- /**
10
- * @deprecated
11
- * use @property widgetPlugins
12
- */
13
- widgetSlot?: OrderedNavigationSlot;
14
- navPlugins?: [string, NavPlugin][];
15
- widgetPlugins?: [string, NavPlugin][];
16
- /**
17
- * A className to pass to the secondary nav, i.e dropdown
18
- */
19
- secondaryNavClassName?: string;
20
- activeTabIndex?: number;
21
- alwaysShowActiveTab?: boolean;
22
- } & React.HTMLAttributes<HTMLElement>;
23
- export declare function CollapsibleMenuNav({ navigationSlot, widgetSlot, navPlugins, widgetPlugins, className, secondaryNavClassName, activeTabIndex, alwaysShowActiveTab, children, }: MenuNavProps): import("react/jsx-runtime").JSX.Element;
@@ -1,97 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { SlotRegistry } from '@teambit/harmony';
3
- import { DropdownComponentVersion, GetActiveTabIndex } from '@teambit/component.ui.version-dropdown';
4
- import { MenuItemSlot } from '@teambit/ui-foundation.ui.main-dropdown';
5
- import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
6
- import { UseComponentType, Filters } from '../use-component';
7
- import { OrderedNavigationSlot, ConsumeMethodSlot } from './nav-plugin';
8
- import { ComponentID } from '../..';
9
- export type RightSideMenuItem = {
10
- item: ReactNode;
11
- order: number;
12
- };
13
- export type RightSideMenuSlot = SlotRegistry<RightSideMenuItem[]>;
14
- export type MenuProps = {
15
- className?: string;
16
- /**
17
- * skip the right side.
18
- */
19
- skipRightSide?: boolean;
20
- /**
21
- * custom render the right side
22
- */
23
- RightNode?: React.ReactNode;
24
- /**
25
- * slot for top bar menu nav items
26
- */
27
- navigationSlot: OrderedNavigationSlot;
28
- /**
29
- * right side navigation menu item slot
30
- */
31
- widgetSlot: OrderedNavigationSlot;
32
- /**
33
- * right side menu item slot
34
- */
35
- rightSideMenuSlot: RightSideMenuSlot;
36
- /**
37
- * workspace or scope
38
- */
39
- host: string;
40
- /**
41
- * main dropdown item slot
42
- */
43
- menuItemSlot: MenuItemSlot;
44
- consumeMethodSlot: ConsumeMethodSlot;
45
- componentIdStr?: string | (() => string | undefined);
46
- useComponent?: UseComponentType;
47
- useComponentFilters?: () => Filters;
48
- useLanes?: () => {
49
- loading?: boolean;
50
- lanesModel?: LanesModel;
51
- };
52
- path?: string;
53
- };
54
- /**
55
- * top bar menu.
56
- */
57
- export declare function ComponentMenu({ navigationSlot, widgetSlot, className, host, menuItemSlot, consumeMethodSlot, rightSideMenuSlot, componentIdStr, skipRightSide, RightNode, useComponent, path, useComponentFilters, }: MenuProps): import("react/jsx-runtime").JSX.Element;
58
- export type VersionRelatedDropdownsProps = {
59
- componentId?: string;
60
- consumeMethods?: ConsumeMethodSlot;
61
- componentFilters?: Filters;
62
- useComponent?: UseComponentVersions;
63
- className?: string;
64
- loading?: boolean;
65
- host: string;
66
- useLanes?: () => {
67
- loading?: boolean;
68
- lanesModel?: LanesModel;
69
- };
70
- dropdownOptions?: {
71
- showVersionDetails?: boolean;
72
- getActiveTabIndex?: GetActiveTabIndex;
73
- };
74
- };
75
- export type UseComponentVersionsProps = {
76
- skip?: boolean;
77
- id?: string;
78
- initialLoad?: boolean;
79
- };
80
- export type UseComponentVersionProps = {
81
- skip?: boolean;
82
- version?: string;
83
- };
84
- export type UseComponentVersions = (props?: UseComponentVersionsProps) => UseComponentVersionsResult;
85
- export type UseComponentVersion = (props?: UseComponentVersionProps) => DropdownComponentVersion | undefined;
86
- export type UseComponentVersionsResult = {
87
- tags?: DropdownComponentVersion[];
88
- snaps?: DropdownComponentVersion[];
89
- id?: ComponentID;
90
- packageName?: string;
91
- latest?: string;
92
- currentVersion?: string;
93
- loading?: boolean;
94
- };
95
- export declare function defaultLoadVersions(host: string, componentId?: string, componentFilters?: Filters, useComponent?: UseComponentType, loadingFromProps?: boolean): UseComponentVersions;
96
- export declare const defaultLoadCurrentVersion: (props: VersionRelatedDropdownsProps) => UseComponentVersion;
97
- export declare function VersionRelatedDropdowns(props: VersionRelatedDropdownsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,28 +0,0 @@
1
- import { SlotRegistry } from '@teambit/harmony';
2
- import type { LinkProps } from '@teambit/base-react.navigation.link';
3
- import type { ConsumeMethod } from '@teambit/ui-foundation.ui.use-box.menu';
4
- import { LaneModel } from '@teambit/lanes.ui.models.lanes-model';
5
- import { ComponentID, ComponentModel } from '../..';
6
- export type NavPluginProps = {
7
- displayName?: string;
8
- ignoreQueryParams?: boolean;
9
- } & LinkProps;
10
- export type NavPlugin = {
11
- props: NavPluginProps;
12
- order?: number;
13
- };
14
- export type OrderedNavigationSlot = SlotRegistry<NavPlugin>;
15
- export type ConsumePluginOptions = {
16
- viewedLane?: LaneModel;
17
- hide?: boolean;
18
- disableInstall?: boolean;
19
- };
20
- export type ConsumePluginProps = {
21
- id: ComponentID;
22
- packageName: string;
23
- latest?: string;
24
- componentModel?: ComponentModel;
25
- options?: ConsumePluginOptions;
26
- };
27
- export type ConsumePlugin = (props: ConsumePluginProps) => ConsumeMethod | undefined;
28
- export type ConsumeMethodSlot = SlotRegistry<ConsumePlugin[]>;
@@ -1 +0,0 @@
1
- export * from './top-bar-nav';
@@ -1,2 +0,0 @@
1
- import { NavPluginProps } from '../menu/nav-plugin';
2
- export declare function TopBarNav({ href, className, activeClassName, children, displayName, ignoreQueryParams, ...rest }: NavPluginProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function useIdFromLocation(url?: string, deriveScopeFromSearchParams?: boolean): string | undefined;
@@ -1,16 +0,0 @@
1
- import { ComponentLogsResult, Filters } from './use-component.model';
2
- export declare function useComponentLogs(componentId: string, host: string, filters?: Filters, skipFromProps?: boolean): ComponentLogsResult;
3
- export declare function useComponentLogsInit(componentId: string, host: string, filters?: Filters, skip?: boolean): {
4
- logOffset: number | undefined;
5
- variables: {
6
- id: string;
7
- extensionId: string;
8
- logOffset: any;
9
- logLimit: number | undefined;
10
- logType: string | undefined;
11
- logHead: string | undefined;
12
- logSort: string | undefined;
13
- logTakeHeadFromComponent: boolean | undefined;
14
- };
15
- skip: boolean | undefined;
16
- };
@@ -1,3 +0,0 @@
1
- import { ComponentQueryResult, Filters } from './use-component.model';
2
- /** provides data to component ui page, making sure both variables and return value are safely typed and memoized */
3
- export declare function useComponentQuery(componentId: string, host: string, filters?: Filters, skip?: boolean): ComponentQueryResult;
@@ -1,3 +0,0 @@
1
- import { ComponentQueryResult, UseComponentOptions, UseComponentType, Filters } from './use-component.model';
2
- export { UseComponentType, Filters };
3
- export declare function useComponent(host: string, id?: string, options?: UseComponentOptions): ComponentQueryResult;
@@ -1,10 +0,0 @@
1
- export declare const componentIdFields: import("@apollo/client").DocumentNode;
2
- export declare const componentOverviewFields: import("@apollo/client").DocumentNode;
3
- export declare const componentFields: import("@apollo/client").DocumentNode;
4
- export declare const componentFieldsWithLogs: import("@apollo/client").DocumentNode;
5
- export declare const COMPONENT_QUERY_LOG_FIELDS = "\n $logOffset: Int\n $logLimit: Int\n $logType: String\n $logHead: String\n $logSort: String\n $logTakeHeadFromComponent: Boolean\n";
6
- export declare const GET_COMPONENT: import("@apollo/client").DocumentNode;
7
- export declare const GET_COMPONENT_WITH_LOGS: import("@apollo/client").DocumentNode;
8
- export declare const SUB_SUBSCRIPTION_ADDED: import("@apollo/client").DocumentNode;
9
- export declare const SUB_COMPONENT_CHANGED: import("@apollo/client").DocumentNode;
10
- export declare const SUB_COMPONENT_REMOVED: import("@apollo/client").DocumentNode;
@@ -1,44 +0,0 @@
1
- import { ComponentDescriptor } from '@teambit/component-descriptor';
2
- import { LegacyComponentLog } from '@teambit/legacy-component-log';
3
- import { ComponentID } from '../';
4
- import { ComponentError } from './component-error';
5
- import { ComponentModel } from './component-model';
6
- export type LogFilter = {
7
- offset?: number;
8
- limit?: number;
9
- head?: string;
10
- sort?: string;
11
- takeHeadFromComponent?: boolean;
12
- };
13
- export type Filters = {
14
- log?: LogFilter & {
15
- type?: string;
16
- };
17
- loading?: boolean;
18
- };
19
- export type UseComponentOptions = {
20
- version?: string;
21
- logFilters?: Filters;
22
- customUseComponent?: UseComponentType;
23
- skip?: boolean;
24
- };
25
- export type ComponentQueryResult = {
26
- component?: ComponentModel;
27
- componentDescriptor?: ComponentDescriptor;
28
- componentLogs?: ComponentLogs;
29
- loading?: boolean;
30
- error?: ComponentError;
31
- };
32
- export type ComponentLogsResult = {
33
- id?: ComponentID;
34
- componentLogs?: ComponentLogs;
35
- latest?: string;
36
- packageName?: string;
37
- error?: ComponentError;
38
- loading?: boolean;
39
- };
40
- export type ComponentLogs = {
41
- logs?: LegacyComponentLog[];
42
- loading?: boolean;
43
- };
44
- export type UseComponentType = (id: string, host: string, filters?: Filters, skip?: boolean) => ComponentQueryResult;
@@ -1 +0,0 @@
1
- export declare function getOffsetValue(offset: any, limit: any, backwards?: boolean): any;