@teambit/lanes.ui.lane-overview 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { EmptyComponentGalleryProps } from '@teambit/ui-foundation.ui.empty-component-gallery';
3
+ export declare type EmptyLaneOverviewProps = {} & EmptyComponentGalleryProps;
4
+ /**
5
+ * A component to show when the scope is empty
6
+ */
7
+ export declare function EmptyLaneOverview(props: EmptyLaneOverviewProps): JSX.Element;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EmptyLaneOverview = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const ui_foundation_ui_empty_component_gallery_1 = require("@teambit/ui-foundation.ui.empty-component-gallery");
9
+ const empty_lane_overview_module_scss_1 = __importDefault(require("./empty-lane-overview.module.scss"));
10
+ /**
11
+ * A component to show when the scope is empty
12
+ */
13
+ function EmptyLaneOverview(props) {
14
+ return (react_1.default.createElement(ui_foundation_ui_empty_component_gallery_1.EmptyComponentGallery, Object.assign({}, props),
15
+ react_1.default.createElement("div", { className: empty_lane_overview_module_scss_1.default.text }, "Start by snapping components to this Lane.")));
16
+ }
17
+ exports.EmptyLaneOverview = EmptyLaneOverview;
18
+ //# sourceMappingURL=empty-lane-overview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-lane-overview.js","sourceRoot":"","sources":["../empty-lane-overview.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gHAAsH;AACtH,wGAAuD;AAIvD;;GAEG;AACH,SAAgB,iBAAiB,CAAC,KAA6B;IAC7D,OAAO,CACL,8BAAC,gEAAqB,oBAAK,KAAK;QAC9B,uCAAK,SAAS,EAAE,yCAAM,CAAC,IAAI,iDAAkD,CACvD,CACzB,CAAC;AACJ,CAAC;AAND,8CAMC"}
@@ -0,0 +1,3 @@
1
+ .text {
2
+ margin-bottom: 30px;
3
+ }
@@ -0,0 +1,2 @@
1
+ export { LaneOverviewProps, LaneOverview, LaneOverviewLine, LaneOverviewLineSlot } from './lane-overview';
2
+ export { EmptyLaneOverview, EmptyLaneOverviewProps } from './empty-lane-overview';
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmptyLaneOverview = exports.LaneOverview = void 0;
4
+ var lane_overview_1 = require("./lane-overview");
5
+ Object.defineProperty(exports, "LaneOverview", { enumerable: true, get: function () { return lane_overview_1.LaneOverview; } });
6
+ var empty_lane_overview_1 = require("./empty-lane-overview");
7
+ Object.defineProperty(exports, "EmptyLaneOverview", { enumerable: true, get: function () { return empty_lane_overview_1.EmptyLaneOverview; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,iDAA0G;AAA9E,6GAAA,YAAY,OAAA;AACxC,6DAAkF;AAAzE,wHAAA,iBAAiB,OAAA"}
@@ -0,0 +1,12 @@
1
+ import { ComponentType } from 'react';
2
+ import { LanesHost } from '@teambit/lanes.ui.models.lanes-model';
3
+ import { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';
4
+ import { SlotRegistry } from '@teambit/harmony';
5
+ export declare type LaneOverviewLine = ComponentType;
6
+ export declare type LaneOverviewLineSlot = SlotRegistry<LaneOverviewLine[]>;
7
+ export declare type LaneOverviewProps = {
8
+ routeSlot: RouteSlot;
9
+ overviewSlot?: LaneOverviewLineSlot;
10
+ host: LanesHost;
11
+ };
12
+ export declare function LaneOverview({ routeSlot, overviewSlot, host }: LaneOverviewProps): JSX.Element;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.LaneOverview = void 0;
26
+ const react_1 = __importStar(require("react"));
27
+ const lanes_ui_models_lanes_model_1 = require("@teambit/lanes.ui.models.lanes-model");
28
+ const explorer_ui_gallery_component_grid_1 = require("@teambit/explorer.ui.gallery.component-grid");
29
+ const ui_foundation_ui_react_router_slot_router_1 = require("@teambit/ui-foundation.ui.react-router.slot-router");
30
+ const workspace_ui_workspace_component_card_1 = require("@teambit/workspace.ui.workspace-component-card");
31
+ const lanes_hooks_use_lanes_1 = require("@teambit/lanes.hooks.use-lanes");
32
+ const lanes_hooks_use_lane_components_1 = require("@teambit/lanes.hooks.use-lane-components");
33
+ const lodash_flatten_1 = __importDefault(require("lodash.flatten"));
34
+ const scope_1 = require("@teambit/scope");
35
+ const lanes_ui_lane_details_1 = require("@teambit/lanes.ui.lane-details");
36
+ const empty_lane_overview_1 = require("./empty-lane-overview");
37
+ const lane_overview_module_scss_1 = __importDefault(require("./lane-overview.module.scss"));
38
+ function LaneOverview({ routeSlot, overviewSlot, host }) {
39
+ const { lanesModel } = (0, lanes_hooks_use_lanes_1.useLanes)();
40
+ const overviewItems = (0, react_1.useMemo)(() => (0, lodash_flatten_1.default)(overviewSlot === null || overviewSlot === void 0 ? void 0 : overviewSlot.values()), [overviewSlot]);
41
+ const currentLane = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.viewedLane;
42
+ if (!currentLane || !currentLane.id)
43
+ return null;
44
+ if (currentLane.components.length === 0)
45
+ return react_1.default.createElement(empty_lane_overview_1.EmptyLaneOverview, { name: currentLane.id.name });
46
+ return (react_1.default.createElement(LaneOverviewWithPreview, { host: host, currentLane: currentLane, overviewItems: overviewItems, routeSlot: routeSlot }));
47
+ }
48
+ exports.LaneOverview = LaneOverview;
49
+ function LaneOverviewWithPreview({ currentLane, overviewItems, routeSlot, host }) {
50
+ const { loading, components } = (0, lanes_hooks_use_lane_components_1.useLaneComponents)(currentLane.id);
51
+ if (loading)
52
+ return null;
53
+ const ComponentCard = host === 'workspace'
54
+ ? ({ component }) => (react_1.default.createElement(workspace_ui_workspace_component_card_1.WorkspaceComponentCard, { component: component, componentUrl: lanes_ui_models_lanes_model_1.LanesModel.getLaneComponentUrl(component.id, currentLane.id) }))
55
+ : ({ component }) => (react_1.default.createElement(scope_1.ScopeComponentCard, { component: component, componentUrl: lanes_ui_models_lanes_model_1.LanesModel.getLaneComponentUrl(component.id, currentLane.id) }));
56
+ return (react_1.default.createElement("div", { className: lane_overview_module_scss_1.default.container },
57
+ react_1.default.createElement(lanes_ui_lane_details_1.LaneDetails, { className: lane_overview_module_scss_1.default.laneDetails, laneId: currentLane.id, description: '', componentCount: currentLane.components.length }),
58
+ react_1.default.createElement(explorer_ui_gallery_component_grid_1.ComponentGrid, null, components === null || components === void 0 ? void 0 : components.map((component, index) => (react_1.default.createElement(ComponentCard, { component: component, key: index })))),
59
+ routeSlot && react_1.default.createElement(ui_foundation_ui_react_router_slot_router_1.SlotRouter, { slot: routeSlot }),
60
+ overviewItems.length > 0 && overviewItems.map((Item, index) => react_1.default.createElement(Item, { key: index }))));
61
+ }
62
+ //# sourceMappingURL=lane-overview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lane-overview.js","sourceRoot":"","sources":["../lane-overview.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ .container {
2
+ padding: 50px 5% 150px 5%;
3
+ overflow-y: auto;
4
+ height: 100%;
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ .laneDetails {
9
+ padding-bottom: 32px;
10
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": [
4
+ "es2019",
5
+ "DOM",
6
+ "ES6",
7
+ "DOM.Iterable"
8
+ ],
9
+ "target": "es2015",
10
+ "module": "CommonJS",
11
+ "jsx": "react",
12
+ "allowJs": true,
13
+ "composite": true,
14
+ "declaration": true,
15
+ "sourceMap": true,
16
+ "skipLibCheck": true,
17
+ "experimentalDecorators": true,
18
+ "outDir": "dist",
19
+ "moduleResolution": "node",
20
+ "esModuleInterop": true,
21
+ "rootDir": ".",
22
+ "resolveJsonModule": true
23
+ },
24
+ "exclude": [
25
+ "dist",
26
+ "package.json"
27
+ ],
28
+ "include": [
29
+ "**/*",
30
+ "**/*.json"
31
+ ]
32
+ }
@@ -0,0 +1,3 @@
1
+ .text {
2
+ margin-bottom: 30px;
3
+ }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { EmptyComponentGallery, EmptyComponentGalleryProps } from '@teambit/ui-foundation.ui.empty-component-gallery';
3
+ import styles from './empty-lane-overview.module.scss';
4
+
5
+ export type EmptyLaneOverviewProps = {} & EmptyComponentGalleryProps;
6
+
7
+ /**
8
+ * A component to show when the scope is empty
9
+ */
10
+ export function EmptyLaneOverview(props: EmptyLaneOverviewProps) {
11
+ return (
12
+ <EmptyComponentGallery {...props}>
13
+ <div className={styles.text}>Start by snapping components to this Lane.</div>
14
+ </EmptyComponentGallery>
15
+ );
16
+ }
package/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { LaneOverviewProps, LaneOverview, LaneOverviewLine, LaneOverviewLineSlot } from './lane-overview';
2
+ export { EmptyLaneOverview, EmptyLaneOverviewProps } from './empty-lane-overview';
@@ -0,0 +1,10 @@
1
+ .container {
2
+ padding: 50px 5% 150px 5%;
3
+ overflow-y: auto;
4
+ height: 100%;
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ .laneDetails {
9
+ padding-bottom: 32px;
10
+ }
@@ -0,0 +1,87 @@
1
+ import React, { useMemo, ComponentType } from 'react';
2
+ import { LaneModel, LanesModel, LanesHost } from '@teambit/lanes.ui.models.lanes-model';
3
+ import { ComponentGrid } from '@teambit/explorer.ui.gallery.component-grid';
4
+ import { RouteSlot, SlotRouter } from '@teambit/ui-foundation.ui.react-router.slot-router';
5
+ import { WorkspaceComponentCard } from '@teambit/workspace.ui.workspace-component-card';
6
+ import { useLanes } from '@teambit/lanes.hooks.use-lanes';
7
+ import { useLaneComponents } from '@teambit/lanes.hooks.use-lane-components';
8
+ import flatten from 'lodash.flatten';
9
+ import { SlotRegistry } from '@teambit/harmony';
10
+ import { ScopeComponentCard } from '@teambit/scope';
11
+ import { LaneDetails } from '@teambit/lanes.ui.lane-details';
12
+ import { EmptyLaneOverview } from './empty-lane-overview';
13
+
14
+ import styles from './lane-overview.module.scss';
15
+
16
+ export type LaneOverviewLine = ComponentType;
17
+ export type LaneOverviewLineSlot = SlotRegistry<LaneOverviewLine[]>;
18
+
19
+ export type LaneOverviewProps = {
20
+ routeSlot: RouteSlot;
21
+ overviewSlot?: LaneOverviewLineSlot;
22
+ host: LanesHost;
23
+ };
24
+ export function LaneOverview({ routeSlot, overviewSlot, host }: LaneOverviewProps) {
25
+ const { lanesModel } = useLanes();
26
+ const overviewItems = useMemo(() => flatten(overviewSlot?.values()), [overviewSlot]);
27
+
28
+ const currentLane = lanesModel?.viewedLane;
29
+
30
+ if (!currentLane || !currentLane.id) return null;
31
+ if (currentLane.components.length === 0) return <EmptyLaneOverview name={currentLane.id.name} />;
32
+
33
+ return (
34
+ <LaneOverviewWithPreview
35
+ host={host}
36
+ currentLane={currentLane}
37
+ overviewItems={overviewItems}
38
+ routeSlot={routeSlot}
39
+ />
40
+ );
41
+ }
42
+
43
+ type LaneOverviewWithPreviewProps = {
44
+ currentLane: LaneModel;
45
+ overviewItems: LaneOverviewLine[];
46
+ routeSlot: RouteSlot;
47
+ host: LanesHost;
48
+ };
49
+
50
+ function LaneOverviewWithPreview({ currentLane, overviewItems, routeSlot, host }: LaneOverviewWithPreviewProps) {
51
+ const { loading, components } = useLaneComponents(currentLane.id);
52
+
53
+ if (loading) return null;
54
+
55
+ const ComponentCard =
56
+ host === 'workspace'
57
+ ? ({ component }) => (
58
+ <WorkspaceComponentCard
59
+ component={component}
60
+ componentUrl={LanesModel.getLaneComponentUrl(component.id, currentLane.id)}
61
+ />
62
+ )
63
+ : ({ component }) => (
64
+ <ScopeComponentCard
65
+ component={component}
66
+ componentUrl={LanesModel.getLaneComponentUrl(component.id, currentLane.id)}
67
+ />
68
+ );
69
+
70
+ return (
71
+ <div className={styles.container}>
72
+ <LaneDetails
73
+ className={styles.laneDetails}
74
+ laneId={currentLane.id}
75
+ description={''}
76
+ componentCount={currentLane.components.length}
77
+ ></LaneDetails>
78
+ <ComponentGrid>
79
+ {components?.map((component, index) => (
80
+ <ComponentCard component={component} key={index} />
81
+ ))}
82
+ </ComponentGrid>
83
+ {routeSlot && <SlotRouter slot={routeSlot} />}
84
+ {overviewItems.length > 0 && overviewItems.map((Item, index) => <Item key={index} />)}
85
+ </div>
86
+ );
87
+ }
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@teambit/lanes.ui.lane-overview",
3
+ "version": "0.0.1",
4
+ "main": "dist/index.js",
5
+ "componentId": {
6
+ "scope": "teambit.lanes",
7
+ "name": "ui/lane-overview",
8
+ "version": "0.0.1"
9
+ },
10
+ "dependencies": {
11
+ "lodash.flatten": "4.4.0",
12
+ "core-js": "^3.0.0",
13
+ "@teambit/harmony": "0.3.3",
14
+ "@teambit/ui-foundation.ui.empty-component-gallery": "0.0.499",
15
+ "@teambit/explorer.ui.gallery.component-grid": "0.0.492",
16
+ "@teambit/lanes.hooks.use-lane-components": "0.0.38",
17
+ "@teambit/lanes.hooks.use-lanes": "0.0.39",
18
+ "@teambit/lanes.ui.lane-details": "0.0.1",
19
+ "@teambit/lanes.ui.models.lanes-model": "0.0.1",
20
+ "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.496",
21
+ "@teambit/workspace.ui.workspace-component-card": "0.0.505"
22
+ },
23
+ "devDependencies": {
24
+ "@types/react": "^17.0.8",
25
+ "@types/lodash.flatten": "4.4.6",
26
+ "@types/mocha": "9.1.0",
27
+ "@types/testing-library__jest-dom": "5.9.5",
28
+ "@babel/runtime": "7.12.18",
29
+ "@types/jest": "^26.0.0",
30
+ "@types/react-dom": "^17.0.5",
31
+ "@types/node": "12.20.4"
32
+ },
33
+ "peerDependencies": {
34
+ "react-dom": "^16.8.0 || ^17.0.0",
35
+ "react": "^16.8.0 || ^17.0.0"
36
+ },
37
+ "license": "Apache-2.0",
38
+ "private": false,
39
+ "engines": {
40
+ "node": ">=12.22.0"
41
+ },
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/teambit/bit"
45
+ },
46
+ "keywords": [
47
+ "bit",
48
+ "components",
49
+ "collaboration",
50
+ "web",
51
+ "react",
52
+ "react-components",
53
+ "angular",
54
+ "angular-components"
55
+ ]
56
+ }
@@ -0,0 +1,7 @@
1
+ ;
2
+ ;
3
+
4
+ export const compositions = [];
5
+ export const overview = [];
6
+
7
+ export const compositions_metadata = {"compositions":[]};
package/tsconfig.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": [
4
+ "es2019",
5
+ "DOM",
6
+ "ES6",
7
+ "DOM.Iterable"
8
+ ],
9
+ "target": "es2015",
10
+ "module": "CommonJS",
11
+ "jsx": "react",
12
+ "allowJs": true,
13
+ "composite": true,
14
+ "declaration": true,
15
+ "sourceMap": true,
16
+ "skipLibCheck": true,
17
+ "experimentalDecorators": true,
18
+ "outDir": "dist",
19
+ "moduleResolution": "node",
20
+ "esModuleInterop": true,
21
+ "rootDir": ".",
22
+ "resolveJsonModule": true
23
+ },
24
+ "exclude": [
25
+ "dist",
26
+ "package.json"
27
+ ],
28
+ "include": [
29
+ "**/*",
30
+ "**/*.json"
31
+ ]
32
+ }
@@ -0,0 +1,29 @@
1
+ declare module '*.png' {
2
+ const value: any;
3
+ export = value;
4
+ }
5
+ declare module '*.svg' {
6
+ import type { FunctionComponent, SVGProps } from 'react';
7
+
8
+ export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
9
+ const src: string;
10
+ export default src;
11
+ }
12
+
13
+ // @TODO Gilad
14
+ declare module '*.jpg' {
15
+ const value: any;
16
+ export = value;
17
+ }
18
+ declare module '*.jpeg' {
19
+ const value: any;
20
+ export = value;
21
+ }
22
+ declare module '*.gif' {
23
+ const value: any;
24
+ export = value;
25
+ }
26
+ declare module '*.bmp' {
27
+ const value: any;
28
+ export = value;
29
+ }
@@ -0,0 +1,42 @@
1
+ declare module '*.module.css' {
2
+ const classes: { readonly [key: string]: string };
3
+ export default classes;
4
+ }
5
+ declare module '*.module.scss' {
6
+ const classes: { readonly [key: string]: string };
7
+ export default classes;
8
+ }
9
+ declare module '*.module.sass' {
10
+ const classes: { readonly [key: string]: string };
11
+ export default classes;
12
+ }
13
+
14
+ declare module '*.module.less' {
15
+ const classes: { readonly [key: string]: string };
16
+ export default classes;
17
+ }
18
+
19
+ declare module '*.less' {
20
+ const classes: { readonly [key: string]: string };
21
+ export default classes;
22
+ }
23
+
24
+ declare module '*.css' {
25
+ const classes: { readonly [key: string]: string };
26
+ export default classes;
27
+ }
28
+
29
+ declare module '*.sass' {
30
+ const classes: { readonly [key: string]: string };
31
+ export default classes;
32
+ }
33
+
34
+ declare module '*.scss' {
35
+ const classes: { readonly [key: string]: string };
36
+ export default classes;
37
+ }
38
+
39
+ declare module '*.mdx' {
40
+ const component: any;
41
+ export default component;
42
+ }