@teambit/compositions 0.0.1022 → 0.0.1024
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/compositions.tsx +11 -3
- package/dist/compositions.d.ts +3 -2
- package/dist/compositions.js +24 -8
- package/dist/compositions.js.map +1 -1
- package/dist/{preview-1679607263760.js → preview-1679974224627.js} +2 -2
- package/package-tar/teambit-compositions-0.0.1024.tgz +0 -0
- package/package.json +16 -16
- package/package-tar/teambit-compositions-0.0.1022.tgz +0 -0
package/compositions.tsx
CHANGED
|
@@ -28,6 +28,7 @@ import styles from './compositions.module.scss';
|
|
|
28
28
|
import { ComponentComposition } from './ui';
|
|
29
29
|
import { CompositionsPanel } from './ui/compositions-panel/compositions-panel';
|
|
30
30
|
import type { CompositionsMenuSlot } from './compositions.ui.runtime';
|
|
31
|
+
import { ComponentCompositionProps } from './ui/composition-preview';
|
|
31
32
|
|
|
32
33
|
export type MenuBarWidget = {
|
|
33
34
|
location: 'start' | 'end';
|
|
@@ -156,9 +157,15 @@ export type CompositionContentProps = {
|
|
|
156
157
|
selected?: Composition;
|
|
157
158
|
queryParams?: string | string[];
|
|
158
159
|
emptyState?: EmptyStateSlot;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
export function CompositionContent({
|
|
160
|
+
} & ComponentCompositionProps;
|
|
161
|
+
|
|
162
|
+
export function CompositionContent({
|
|
163
|
+
component,
|
|
164
|
+
selected,
|
|
165
|
+
queryParams,
|
|
166
|
+
emptyState,
|
|
167
|
+
...componentCompositionProps
|
|
168
|
+
}: CompositionContentProps) {
|
|
162
169
|
const env = component.environment?.id;
|
|
163
170
|
const EmptyStateTemplate = emptyState?.get(env || ''); // || defaultTemplate;
|
|
164
171
|
|
|
@@ -219,6 +226,7 @@ export function CompositionContent({ component, selected, queryParams, emptyStat
|
|
|
219
226
|
fullContentHeight
|
|
220
227
|
pubsub={true}
|
|
221
228
|
queryParams={queryParams}
|
|
229
|
+
{...componentCompositionProps}
|
|
222
230
|
/>
|
|
223
231
|
);
|
|
224
232
|
}
|
package/dist/compositions.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ComponentModel } from '@teambit/component';
|
|
|
3
3
|
import { EmptyStateSlot } from './compositions.ui.runtime';
|
|
4
4
|
import { Composition } from './composition';
|
|
5
5
|
import type { CompositionsMenuSlot } from './compositions.ui.runtime';
|
|
6
|
+
import { ComponentCompositionProps } from './ui/composition-preview';
|
|
6
7
|
export declare type MenuBarWidget = {
|
|
7
8
|
location: 'start' | 'end';
|
|
8
9
|
content: ReactNode;
|
|
@@ -17,5 +18,5 @@ export declare type CompositionContentProps = {
|
|
|
17
18
|
selected?: Composition;
|
|
18
19
|
queryParams?: string | string[];
|
|
19
20
|
emptyState?: EmptyStateSlot;
|
|
20
|
-
};
|
|
21
|
-
export declare function CompositionContent({ component, selected, queryParams, emptyState }: CompositionContentProps): JSX.Element;
|
|
21
|
+
} & ComponentCompositionProps;
|
|
22
|
+
export declare function CompositionContent({ component, selected, queryParams, emptyState, ...componentCompositionProps }: CompositionContentProps): JSX.Element;
|
package/dist/compositions.js
CHANGED
|
@@ -9,6 +9,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.CompositionContent = CompositionContent;
|
|
11
11
|
exports.Compositions = Compositions;
|
|
12
|
+
function _extends2() {
|
|
13
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
+
_extends2 = function () {
|
|
15
|
+
return data;
|
|
16
|
+
};
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
function _objectWithoutProperties2() {
|
|
20
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
21
|
+
_objectWithoutProperties2 = function () {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
12
26
|
function _react() {
|
|
13
27
|
const data = _interopRequireWildcard(require("react"));
|
|
14
28
|
_react = function () {
|
|
@@ -308,13 +322,15 @@ function Compositions({
|
|
|
308
322
|
showListView: true
|
|
309
323
|
}) : /*#__PURE__*/_react().default.createElement("div", null)))))));
|
|
310
324
|
}
|
|
311
|
-
function CompositionContent({
|
|
312
|
-
component,
|
|
313
|
-
selected,
|
|
314
|
-
queryParams,
|
|
315
|
-
emptyState
|
|
316
|
-
}) {
|
|
325
|
+
function CompositionContent(_ref) {
|
|
317
326
|
var _component$environmen;
|
|
327
|
+
let {
|
|
328
|
+
component,
|
|
329
|
+
selected,
|
|
330
|
+
queryParams,
|
|
331
|
+
emptyState
|
|
332
|
+
} = _ref,
|
|
333
|
+
componentCompositionProps = (0, _objectWithoutProperties2().default)(_ref, ["component", "selected", "queryParams", "emptyState"]);
|
|
318
334
|
const env = (_component$environmen = component.environment) === null || _component$environmen === void 0 ? void 0 : _component$environmen.id;
|
|
319
335
|
const EmptyStateTemplate = emptyState === null || emptyState === void 0 ? void 0 : emptyState.get(env || ''); // || defaultTemplate;
|
|
320
336
|
|
|
@@ -350,7 +366,7 @@ function CompositionContent({
|
|
|
350
366
|
link: `https://bit.dev/docs/dev-services-overview/compositions/compositions-overview`
|
|
351
367
|
});
|
|
352
368
|
}
|
|
353
|
-
return /*#__PURE__*/_react().default.createElement(_ui().ComponentComposition, {
|
|
369
|
+
return /*#__PURE__*/_react().default.createElement(_ui().ComponentComposition, (0, _extends2().default)({
|
|
354
370
|
className: _compositionsModule().default.compositionsIframe
|
|
355
371
|
// TODO: Oded to add control for viewport.
|
|
356
372
|
,
|
|
@@ -361,7 +377,7 @@ function CompositionContent({
|
|
|
361
377
|
fullContentHeight: true,
|
|
362
378
|
pubsub: true,
|
|
363
379
|
queryParams: queryParams
|
|
364
|
-
});
|
|
380
|
+
}, componentCompositionProps));
|
|
365
381
|
}
|
|
366
382
|
|
|
367
383
|
//# sourceMappingURL=compositions.js.map
|
package/dist/compositions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Compositions","menuBarWidgets","emptyState","component","useContext","ComponentContext","params","useParams","navigate","useNavigate","location","useLocation","currentCompositionName","currentComposition","compositions","find","composition","identifier","toLowerCase","head","selectedRef","useRef","current","properties","useDocs","id","isMobile","useIsMobile","showSidebar","length","isSidebarOpen","setSidebarOpenness","useState","sidebarOpenness","Layout","row","left","compositionUrl","toPreviewUrl","isScaling","preview","compositionIdentifierParam","currentCompositionFullUrl","compositionParams","setCompositionParams","queryParams","useMemo","queryString","stringify","useEffect","styles","compositionsPage","menuBar","openInNewTab","splitter","e","stopPropagation","x","collapser","right","tabsContainer","tabs","tabContent","pathname","includes","path","replace","nextPath","concat","compost","CompositionContent","selected","env","environment","EmptyStateTemplate","get","host","noCompositionsPage","title","separator","buildStatus","buildStatusMessage","compositionsIframe"],"sources":["compositions.tsx"],"sourcesContent":["import React, { useContext, useEffect, useState, useMemo, useRef, ReactNode } from 'react';\nimport { useParams } from 'react-router-dom';\nimport head from 'lodash.head';\nimport queryString from 'query-string';\nimport { ThemeContext } from '@teambit/documenter.theme.theme-context';\nimport { SplitPane, Pane, Layout } from '@teambit/base-ui.surfaces.split-pane.split-pane';\nimport { HoverSplitter } from '@teambit/base-ui.surfaces.split-pane.hover-splitter';\nimport { ComponentContext, ComponentModel } from '@teambit/component';\nimport { PropTable } from '@teambit/documenter.ui.property-table';\nimport { Tab, TabContainer, TabList, TabPanel } from '@teambit/panels';\nimport { useDocs } from '@teambit/docs.ui.queries.get-docs';\nimport { Collapser } from '@teambit/ui-foundation.ui.buttons.collapser';\nimport { EmptyBox } from '@teambit/design.ui.empty-box';\nimport { toPreviewUrl } from '@teambit/preview.ui.component-preview';\nimport { useIsMobile } from '@teambit/ui-foundation.ui.hooks.use-is-mobile';\nimport { CompositionsMenuBar } from '@teambit/compositions.ui.compositions-menu-bar';\nimport { CompositionContextProvider } from '@teambit/compositions.ui.hooks.use-composition';\nimport { MDXLayout } from '@teambit/mdx.ui.mdx-layout';\nimport { Separator } from '@teambit/design.ui.separator';\nimport { H1 } from '@teambit/documenter.ui.heading';\nimport { AlertCard } from '@teambit/design.ui.alert-card';\nimport { Link, useNavigate, useLocation } from '@teambit/base-react.navigation.link';\nimport { OptionButton } from '@teambit/design.ui.input.option-button';\nimport { StatusMessageCard } from '@teambit/design.ui.surfaces.status-message-card';\nimport { EmptyStateSlot } from './compositions.ui.runtime';\nimport { Composition } from './composition';\nimport styles from './compositions.module.scss';\nimport { ComponentComposition } from './ui';\nimport { CompositionsPanel } from './ui/compositions-panel/compositions-panel';\nimport type { CompositionsMenuSlot } from './compositions.ui.runtime';\n\nexport type MenuBarWidget = {\n location: 'start' | 'end';\n content: ReactNode;\n};\nexport type CompositionsProp = { menuBarWidgets?: CompositionsMenuSlot; emptyState?: EmptyStateSlot };\n\nexport function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {\n const component = useContext(ComponentContext);\n // const [searchParams, setSearchParams] = useSearchParams();\n const params = useParams();\n const navigate = useNavigate();\n const location = useLocation();\n const currentCompositionName = params['*'];\n // console.log(routes);\n const currentComposition =\n component.compositions.find((composition) => composition.identifier.toLowerCase() === currentCompositionName) ||\n head(component.compositions);\n // const [selected, selectComposition] = useState(head(component.compositions));\n const selectedRef = useRef(currentComposition);\n selectedRef.current = currentComposition;\n\n const properties = useDocs(component.id);\n\n // reset selected composition when component changes.\n // this does trigger renderer, but perf seems to be ok\n // useEffect(() => {\n // const prevId = selectedRef.current?.identifier;\n // const next = component.compositions.find((c) => c.identifier === prevId) || component.compositions[0];\n\n // navigate(next.displayName.toLowerCase().replaceAll(' ', '-'));\n // }, [component]);\n const isMobile = useIsMobile();\n const showSidebar = !isMobile && component.compositions.length > 0;\n const [isSidebarOpen, setSidebarOpenness] = useState(showSidebar);\n\n const sidebarOpenness = isSidebarOpen ? Layout.row : Layout.left;\n\n const compositionUrl = toPreviewUrl(component, 'compositions');\n const isScaling = component?.preview?.isScaling;\n const compositionIdentifierParam = isScaling\n ? `name=${currentComposition?.identifier}`\n : currentComposition?.identifier;\n const currentCompositionFullUrl = toPreviewUrl(component, 'compositions', compositionIdentifierParam);\n\n const [compositionParams, setCompositionParams] = useState<Record<string, any>>({});\n const queryParams = useMemo(() => queryString.stringify(compositionParams), [compositionParams]);\n\n // collapse sidebar when empty, reopen when not\n useEffect(() => setSidebarOpenness(showSidebar), [showSidebar]);\n return (\n <CompositionContextProvider queryParams={compositionParams} setQueryParams={setCompositionParams}>\n <SplitPane layout={sidebarOpenness} size=\"85%\" className={styles.compositionsPage}>\n <Pane className={styles.left}>\n <CompositionsMenuBar menuBarWidgets={menuBarWidgets} className={styles.menuBar}>\n <Link external href={currentCompositionFullUrl} className={styles.openInNewTab}>\n <OptionButton icon=\"open-tab\" />\n </Link>\n </CompositionsMenuBar>\n <CompositionContent\n emptyState={emptyState}\n component={component}\n selected={currentComposition}\n queryParams={queryParams}\n />\n </Pane>\n <HoverSplitter className={styles.splitter}>\n <Collapser\n placement=\"left\"\n isOpen={isSidebarOpen}\n onMouseDown={(e) => e.stopPropagation()} // avoid split-pane drag\n onClick={() => setSidebarOpenness((x) => !x)}\n tooltipContent={`${isSidebarOpen ? 'Hide' : 'Show'} side compositions`}\n className={styles.collapser}\n />\n </HoverSplitter>\n <Pane className={styles.right}>\n <ThemeContext>\n <TabContainer className={styles.tabsContainer}>\n <TabList className={styles.tabs}>\n <Tab>compositions</Tab>\n <Tab>properties</Tab>\n </TabList>\n <TabPanel className={styles.tabContent}>\n <CompositionsPanel\n isScaling={isScaling}\n onSelectComposition={(composition) => {\n if (!currentComposition || !location) return;\n if (location.pathname.includes(currentComposition.identifier.toLowerCase())) {\n navigate(composition.identifier.toLowerCase());\n return;\n }\n\n const path = location.pathname.replace(\n currentComposition.identifier.toLowerCase(),\n composition.identifier.toLowerCase()\n );\n\n if (!path) return;\n if (!path.includes(composition.identifier.toLowerCase())) {\n const nextPath = location.pathname.concat(`/${composition.identifier.toLowerCase()}`);\n navigate(nextPath);\n return;\n }\n navigate(path);\n }}\n url={compositionUrl}\n compositions={component.compositions}\n active={currentComposition}\n className={styles.compost}\n />\n </TabPanel>\n <TabPanel className={styles.tabContent}>\n {properties && properties.length > 0 ? <PropTable rows={properties} showListView /> : <div />}\n </TabPanel>\n </TabContainer>\n </ThemeContext>\n </Pane>\n </SplitPane>\n </CompositionContextProvider>\n );\n}\n\nexport type CompositionContentProps = {\n component: ComponentModel;\n selected?: Composition;\n queryParams?: string | string[];\n emptyState?: EmptyStateSlot;\n};\n\nexport function CompositionContent({ component, selected, queryParams, emptyState }: CompositionContentProps) {\n const env = component.environment?.id;\n const EmptyStateTemplate = emptyState?.get(env || ''); // || defaultTemplate;\n\n if (component.compositions.length === 0 && component.host === 'teambit.workspace/workspace' && EmptyStateTemplate) {\n return (\n <div className={styles.noCompositionsPage}>\n <div>\n <H1 className={styles.title}>Compositions</H1>\n <Separator isPresentational className={styles.separator} />\n <AlertCard\n level=\"info\"\n title=\"There are no\n compositions for this Component. Learn how to add compositions:\"\n >\n <MDXLayout>\n <EmptyStateTemplate />\n </MDXLayout>\n </AlertCard>\n </div>\n </div>\n );\n }\n\n if (component?.buildStatus === 'pending' && component?.host === 'teambit.scope/scope')\n return (\n <StatusMessageCard className={styles.buildStatusMessage} status=\"PROCESSING\" title=\"component preview pending\">\n this might take some time\n </StatusMessageCard>\n );\n if (component?.buildStatus === 'failed' && component?.host === 'teambit.scope/scope')\n return (\n <StatusMessageCard\n className={styles.buildStatusMessage}\n status=\"FAILURE\"\n title=\"failed to get component preview \"\n ></StatusMessageCard>\n );\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n if (component.compositions.length === 0) {\n return (\n <EmptyBox\n title=\"There are no compositions for this component.\"\n linkText=\"Learn how to create compositions\"\n link={`https://bit.dev/docs/dev-services-overview/compositions/compositions-overview`}\n />\n );\n }\n\n return (\n <ComponentComposition\n className={styles.compositionsIframe}\n // TODO: Oded to add control for viewport.\n viewport={null}\n component={component}\n forceHeight=\"100%\"\n composition={selected}\n fullContentHeight\n pubsub={true}\n queryPar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Context","ComponentContext","params","useParams","navigate","useNavigate","location","useLocation","currentCompositionName","currentComposition","compositions","find","composition","identifier","toLowerCase","head","selectedRef","useRef","current","properties","useDocs","id","isMobile","useIsMobile","showSidebar","length","isSidebarOpen","setSidebarOpenness","useState","sidebarOpenness","Layout","row","left","compositionUrl","toPreviewUrl","isScaling","preview","compositionIdentifierParam","currentCompositionFullUrl","compositionParams","setCompositionParams","queryParams","useMemo","queryString","stringify","useEffect","styles","compositionsPage","menuBar","openInNewTab","splitter","e","stopPropagation","x","collapser","right","tabsContainer","tabs","tabContent","pathname","includes","path","replace","nextPath","concat","compost","CompositionContent","selected","componentCompositionProps","env","environment","EmptyStateTemplate","get","host","noCompositionsPage","title","separator","buildStatus","buildStatusMessage","compositionsIframe"],"sources":["compositions.tsx"],"sourcesContent":["import React, { useContext, useEffect, useState, useMemo, useRef, ReactNode } from 'react';\nimport { useParams } from 'react-router-dom';\nimport head from 'lodash.head';\nimport queryString from 'query-string';\nimport { ThemeContext } from '@teambit/documenter.theme.theme-context';\nimport { SplitPane, Pane, Layout } from '@teambit/base-ui.surfaces.split-pane.split-pane';\nimport { HoverSplitter } from '@teambit/base-ui.surfaces.split-pane.hover-splitter';\nimport { ComponentContext, ComponentModel } from '@teambit/component';\nimport { PropTable } from '@teambit/documenter.ui.property-table';\nimport { Tab, TabContainer, TabList, TabPanel } from '@teambit/panels';\nimport { useDocs } from '@teambit/docs.ui.queries.get-docs';\nimport { Collapser } from '@teambit/ui-foundation.ui.buttons.collapser';\nimport { EmptyBox } from '@teambit/design.ui.empty-box';\nimport { toPreviewUrl } from '@teambit/preview.ui.component-preview';\nimport { useIsMobile } from '@teambit/ui-foundation.ui.hooks.use-is-mobile';\nimport { CompositionsMenuBar } from '@teambit/compositions.ui.compositions-menu-bar';\nimport { CompositionContextProvider } from '@teambit/compositions.ui.hooks.use-composition';\nimport { MDXLayout } from '@teambit/mdx.ui.mdx-layout';\nimport { Separator } from '@teambit/design.ui.separator';\nimport { H1 } from '@teambit/documenter.ui.heading';\nimport { AlertCard } from '@teambit/design.ui.alert-card';\nimport { Link, useNavigate, useLocation } from '@teambit/base-react.navigation.link';\nimport { OptionButton } from '@teambit/design.ui.input.option-button';\nimport { StatusMessageCard } from '@teambit/design.ui.surfaces.status-message-card';\nimport { EmptyStateSlot } from './compositions.ui.runtime';\nimport { Composition } from './composition';\nimport styles from './compositions.module.scss';\nimport { ComponentComposition } from './ui';\nimport { CompositionsPanel } from './ui/compositions-panel/compositions-panel';\nimport type { CompositionsMenuSlot } from './compositions.ui.runtime';\nimport { ComponentCompositionProps } from './ui/composition-preview';\n\nexport type MenuBarWidget = {\n location: 'start' | 'end';\n content: ReactNode;\n};\nexport type CompositionsProp = { menuBarWidgets?: CompositionsMenuSlot; emptyState?: EmptyStateSlot };\n\nexport function Compositions({ menuBarWidgets, emptyState }: CompositionsProp) {\n const component = useContext(ComponentContext);\n // const [searchParams, setSearchParams] = useSearchParams();\n const params = useParams();\n const navigate = useNavigate();\n const location = useLocation();\n const currentCompositionName = params['*'];\n // console.log(routes);\n const currentComposition =\n component.compositions.find((composition) => composition.identifier.toLowerCase() === currentCompositionName) ||\n head(component.compositions);\n // const [selected, selectComposition] = useState(head(component.compositions));\n const selectedRef = useRef(currentComposition);\n selectedRef.current = currentComposition;\n\n const properties = useDocs(component.id);\n\n // reset selected composition when component changes.\n // this does trigger renderer, but perf seems to be ok\n // useEffect(() => {\n // const prevId = selectedRef.current?.identifier;\n // const next = component.compositions.find((c) => c.identifier === prevId) || component.compositions[0];\n\n // navigate(next.displayName.toLowerCase().replaceAll(' ', '-'));\n // }, [component]);\n const isMobile = useIsMobile();\n const showSidebar = !isMobile && component.compositions.length > 0;\n const [isSidebarOpen, setSidebarOpenness] = useState(showSidebar);\n\n const sidebarOpenness = isSidebarOpen ? Layout.row : Layout.left;\n\n const compositionUrl = toPreviewUrl(component, 'compositions');\n const isScaling = component?.preview?.isScaling;\n const compositionIdentifierParam = isScaling\n ? `name=${currentComposition?.identifier}`\n : currentComposition?.identifier;\n const currentCompositionFullUrl = toPreviewUrl(component, 'compositions', compositionIdentifierParam);\n\n const [compositionParams, setCompositionParams] = useState<Record<string, any>>({});\n const queryParams = useMemo(() => queryString.stringify(compositionParams), [compositionParams]);\n\n // collapse sidebar when empty, reopen when not\n useEffect(() => setSidebarOpenness(showSidebar), [showSidebar]);\n return (\n <CompositionContextProvider queryParams={compositionParams} setQueryParams={setCompositionParams}>\n <SplitPane layout={sidebarOpenness} size=\"85%\" className={styles.compositionsPage}>\n <Pane className={styles.left}>\n <CompositionsMenuBar menuBarWidgets={menuBarWidgets} className={styles.menuBar}>\n <Link external href={currentCompositionFullUrl} className={styles.openInNewTab}>\n <OptionButton icon=\"open-tab\" />\n </Link>\n </CompositionsMenuBar>\n <CompositionContent\n emptyState={emptyState}\n component={component}\n selected={currentComposition}\n queryParams={queryParams}\n />\n </Pane>\n <HoverSplitter className={styles.splitter}>\n <Collapser\n placement=\"left\"\n isOpen={isSidebarOpen}\n onMouseDown={(e) => e.stopPropagation()} // avoid split-pane drag\n onClick={() => setSidebarOpenness((x) => !x)}\n tooltipContent={`${isSidebarOpen ? 'Hide' : 'Show'} side compositions`}\n className={styles.collapser}\n />\n </HoverSplitter>\n <Pane className={styles.right}>\n <ThemeContext>\n <TabContainer className={styles.tabsContainer}>\n <TabList className={styles.tabs}>\n <Tab>compositions</Tab>\n <Tab>properties</Tab>\n </TabList>\n <TabPanel className={styles.tabContent}>\n <CompositionsPanel\n isScaling={isScaling}\n onSelectComposition={(composition) => {\n if (!currentComposition || !location) return;\n if (location.pathname.includes(currentComposition.identifier.toLowerCase())) {\n navigate(composition.identifier.toLowerCase());\n return;\n }\n\n const path = location.pathname.replace(\n currentComposition.identifier.toLowerCase(),\n composition.identifier.toLowerCase()\n );\n\n if (!path) return;\n if (!path.includes(composition.identifier.toLowerCase())) {\n const nextPath = location.pathname.concat(`/${composition.identifier.toLowerCase()}`);\n navigate(nextPath);\n return;\n }\n navigate(path);\n }}\n url={compositionUrl}\n compositions={component.compositions}\n active={currentComposition}\n className={styles.compost}\n />\n </TabPanel>\n <TabPanel className={styles.tabContent}>\n {properties && properties.length > 0 ? <PropTable rows={properties} showListView /> : <div />}\n </TabPanel>\n </TabContainer>\n </ThemeContext>\n </Pane>\n </SplitPane>\n </CompositionContextProvider>\n );\n}\n\nexport type CompositionContentProps = {\n component: ComponentModel;\n selected?: Composition;\n queryParams?: string | string[];\n emptyState?: EmptyStateSlot;\n} & ComponentCompositionProps;\n\nexport function CompositionContent({\n component,\n selected,\n queryParams,\n emptyState,\n ...componentCompositionProps\n}: CompositionContentProps) {\n const env = component.environment?.id;\n const EmptyStateTemplate = emptyState?.get(env || ''); // || defaultTemplate;\n\n if (component.compositions.length === 0 && component.host === 'teambit.workspace/workspace' && EmptyStateTemplate) {\n return (\n <div className={styles.noCompositionsPage}>\n <div>\n <H1 className={styles.title}>Compositions</H1>\n <Separator isPresentational className={styles.separator} />\n <AlertCard\n level=\"info\"\n title=\"There are no\n compositions for this Component. Learn how to add compositions:\"\n >\n <MDXLayout>\n <EmptyStateTemplate />\n </MDXLayout>\n </AlertCard>\n </div>\n </div>\n );\n }\n\n if (component?.buildStatus === 'pending' && component?.host === 'teambit.scope/scope')\n return (\n <StatusMessageCard className={styles.buildStatusMessage} status=\"PROCESSING\" title=\"component preview pending\">\n this might take some time\n </StatusMessageCard>\n );\n if (component?.buildStatus === 'failed' && component?.host === 'teambit.scope/scope')\n return (\n <StatusMessageCard\n className={styles.buildStatusMessage}\n status=\"FAILURE\"\n title=\"failed to get component preview \"\n ></StatusMessageCard>\n );\n\n // TODO: get the docs domain from the community aspect and pass it here as a prop\n if (component.compositions.length === 0) {\n return (\n <EmptyBox\n title=\"There are no compositions for this component.\"\n linkText=\"Learn how to create compositions\"\n link={`https://bit.dev/docs/dev-services-overview/compositions/compositions-overview`}\n />\n );\n }\n\n return (\n <ComponentComposition\n className={styles.compositionsIframe}\n // TODO: Oded to add control for viewport.\n viewport={null}\n component={component}\n forceHeight=\"100%\"\n composition={selected}\n fullContentHeight\n pubsub={true}\n queryParams={queryParams}\n {...componentCompositionProps}\n />\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;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;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;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;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;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;A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EAAE,IAAK;IACb,WAAW,EAAE1B;EAAY,GACrB2B,yBAAyB,EAC7B;AAEN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.1024/dist/compositions.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compositions_compositions@0.0.1024/dist/compositions.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/compositions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1024",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/compositions/compositions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.compositions",
|
|
8
8
|
"name": "compositions",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1024"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graphql-tag": "2.12.1",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"@teambit/documenter.ui.heading": "4.1.1",
|
|
27
27
|
"@teambit/documenter.ui.property-table": "4.1.3",
|
|
28
28
|
"@teambit/evangelist.elements.icon": "1.0.2",
|
|
29
|
-
"@teambit/component": "0.0.
|
|
29
|
+
"@teambit/component": "0.0.1024",
|
|
30
30
|
"@teambit/compositions.model.composition-id": "0.0.496",
|
|
31
|
-
"@teambit/graphql": "0.0.
|
|
32
|
-
"@teambit/cli": "0.0.
|
|
33
|
-
"@teambit/dev-files": "0.0.
|
|
34
|
-
"@teambit/envs": "0.0.
|
|
35
|
-
"@teambit/preview": "0.0.
|
|
36
|
-
"@teambit/schema": "0.0.
|
|
31
|
+
"@teambit/graphql": "0.0.1024",
|
|
32
|
+
"@teambit/cli": "0.0.687",
|
|
33
|
+
"@teambit/dev-files": "0.0.1024",
|
|
34
|
+
"@teambit/envs": "0.0.1024",
|
|
35
|
+
"@teambit/preview": "0.0.1024",
|
|
36
|
+
"@teambit/schema": "0.0.1024",
|
|
37
37
|
"@teambit/toolbox.path.match-patterns": "0.0.9",
|
|
38
|
-
"@teambit/workspace": "0.0.
|
|
38
|
+
"@teambit/workspace": "0.0.1024",
|
|
39
39
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.498",
|
|
40
40
|
"@teambit/component-id": "0.0.427",
|
|
41
41
|
"@teambit/compositions.ui.compositions-menu-bar": "0.0.172",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"@teambit/design.ui.surfaces.status-message-card": "0.0.18",
|
|
46
46
|
"@teambit/docs.ui.queries.get-docs": "0.0.498",
|
|
47
47
|
"@teambit/mdx.ui.mdx-layout": "0.0.513",
|
|
48
|
-
"@teambit/panels": "0.0.
|
|
49
|
-
"@teambit/preview.ui.component-preview": "0.0.
|
|
48
|
+
"@teambit/panels": "0.0.688",
|
|
49
|
+
"@teambit/preview.ui.component-preview": "0.0.517",
|
|
50
50
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.206",
|
|
51
51
|
"@teambit/ui-foundation.ui.hooks.use-is-mobile": "0.0.188",
|
|
52
|
-
"@teambit/component-compare": "0.0.
|
|
52
|
+
"@teambit/component-compare": "0.0.272",
|
|
53
53
|
"@teambit/compositions.ui.composition-compare-section": "0.0.5",
|
|
54
|
-
"@teambit/compositions.ui.composition-compare": "0.0.
|
|
55
|
-
"@teambit/ui": "0.0.
|
|
54
|
+
"@teambit/compositions.ui.composition-compare": "0.0.159",
|
|
55
|
+
"@teambit/ui": "0.0.1024"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/react": "^17.0.8",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react-router-dom": "^6.0.0",
|
|
71
|
-
"@teambit/legacy": "1.0.
|
|
71
|
+
"@teambit/legacy": "1.0.467",
|
|
72
72
|
"react": "^16.8.0 || ^17.0.0",
|
|
73
73
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
74
74
|
},
|
|
Binary file
|