@teambit/lanes.hooks.use-lanes 0.0.257 → 0.0.259
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/lanes-context.d.ts +1 -0
- package/dist/lanes-provider.d.ts +1 -1
- package/dist/lanes-provider.js +2 -2
- package/dist/lanes-provider.js.map +1 -1
- package/dist/preview-1706194779559.js +7 -0
- package/lanes-provider.tsx +1 -1
- package/package.json +12 -10
- package/tsconfig.json +32 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
- package/.bit-capsule-ready +0 -0
- package/package-tar/teambit-lanes.hooks.use-lanes-0.0.257.tgz +0 -0
- package/schema.json +0 -3693
- package/static/css/teambit.lanes/hooks/use-lanes.8cdc08c2.css +0 -1
- package/teambit_lanes_hooks_use_lanes-component.js +0 -956
- package/teambit_lanes_hooks_use_lanes-preview.js +0 -1
package/dist/lanes-context.d.ts
CHANGED
package/dist/lanes-provider.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { UseLaneOptions } from '@teambit/lanes.hooks.use-lanes';
|
|
3
2
|
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
4
3
|
import { Location } from '@teambit/base-react.navigation.link';
|
|
5
4
|
import { LaneId } from '@teambit/lane-id';
|
|
5
|
+
import { UseLanesOptions as UseLaneOptions } from './use-lanes';
|
|
6
6
|
export declare type IgnoreDerivingFromUrl = (location?: Location) => boolean;
|
|
7
7
|
export declare type LanesProviderProps = {
|
|
8
8
|
children: ReactNode;
|
package/dist/lanes-provider.js
CHANGED
|
@@ -25,11 +25,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.LanesProvider = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
|
-
const lanes_hooks_use_lanes_1 = require("@teambit/lanes.hooks.use-lanes");
|
|
29
28
|
const lanes_ui_models_lanes_model_1 = require("@teambit/lanes.ui.models.lanes-model");
|
|
30
29
|
const ui_foundation_ui_react_router_use_query_1 = require("@teambit/ui-foundation.ui.react-router.use-query");
|
|
31
30
|
const base_react_navigation_link_1 = require("@teambit/base-react.navigation.link");
|
|
32
31
|
const lanes_context_1 = require("./lanes-context");
|
|
32
|
+
const use_lanes_1 = require("./use-lanes");
|
|
33
33
|
function LanesProvider({ children, viewedLaneId: viewedIdFromProps, targetLanes, ignoreDerivingFromUrl: ignoreDerivingFromUrlFromProps, skipNetworkCall, options: optionsFromProps = {}, useScope, }) {
|
|
34
34
|
var _a;
|
|
35
35
|
const [lanesState, setLanesState] = (0, react_1.useState)();
|
|
@@ -40,7 +40,7 @@ function LanesProvider({ children, viewedLaneId: viewedIdFromProps, targetLanes,
|
|
|
40
40
|
var _a, _b, _c;
|
|
41
41
|
return (Object.assign({ skip, ids: (_a = optionsFromProps.ids) !== null && _a !== void 0 ? _a : (viewedLaneId ? [viewedLaneId.toString()] : undefined), offset: (_b = optionsFromProps.offset) !== null && _b !== void 0 ? _b : 0, limit: (_c = optionsFromProps.limit) !== null && _c !== void 0 ? _c : 10 }, optionsFromProps));
|
|
42
42
|
}, [skip, optionsFromProps.ids, (_a = optionsFromProps.ids) === null || _a === void 0 ? void 0 : _a.length, viewedLaneId === null || viewedLaneId === void 0 ? void 0 : viewedLaneId.toString()]);
|
|
43
|
-
const { lanesModel, loading, hasMore, fetchMoreLanes, offset, limit } = (0,
|
|
43
|
+
const { lanesModel, loading, hasMore, fetchMoreLanes, offset, limit } = (0, use_lanes_1.useLanes)(targetLanes, skipNetworkCall, options, undefined, scope);
|
|
44
44
|
(0, react_1.useEffect)(() => {
|
|
45
45
|
if (!loading && lanesModel)
|
|
46
46
|
setLanesState(lanesModel);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lanes-provider.js","sourceRoot":"","sources":["../lanes-provider.tsx"],"names":[],"mappings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AE,EAAE,CAAC,CAAC;iBAC3D;qBAAM;oBACL,KAAK,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;iBAC5C;gBACD,OAAO,KAAK,CAAC;aACd;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAEtD,MAAM,iBAAiB,GAAsB;QAC3C,UAAU,EAAE,UAAU;QACtB,gBAAgB;QAChB,OAAO;QACP,OAAO;QACP,cAAc;QACd,OAAO;QACP,MAAM;QACN,KAAK;KACN,CAAC;IAEF,OAAO,8BAAC,4BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,iBAAiB,IAAG,QAAQ,CAAyB,CAAC;AAC7F,CAAC;AAvGD,sCAuGC"}
|
package/lanes-provider.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { ReactNode, useState, useEffect, useCallback, useMemo } from 'react';
|
|
2
|
-
import { UseLaneOptions, useLanes } from '@teambit/lanes.hooks.use-lanes';
|
|
3
2
|
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
4
3
|
import { useQuery } from '@teambit/ui-foundation.ui.react-router.use-query';
|
|
5
4
|
import { useLocation, Location } from '@teambit/base-react.navigation.link';
|
|
6
5
|
import { LaneId } from '@teambit/lane-id';
|
|
7
6
|
import { LanesContext, LanesContextModel } from './lanes-context';
|
|
7
|
+
import { useLanes, UseLanesOptions as UseLaneOptions } from './use-lanes';
|
|
8
8
|
|
|
9
9
|
export type IgnoreDerivingFromUrl = (location?: Location) => boolean;
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/lanes.hooks.use-lanes",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.259",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/lanes/hooks/use-lanes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.lanes",
|
|
8
8
|
"name": "hooks/use-lanes",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.259"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"core-js": "^3.0.0",
|
|
13
12
|
"lodash": "4.17.21",
|
|
13
|
+
"core-js": "^3.0.0",
|
|
14
|
+
"@teambit/lane-id": "0.0.311",
|
|
14
15
|
"@teambit/base-react.navigation.link": "2.0.27",
|
|
15
|
-
"@teambit/
|
|
16
|
-
"@teambit/lanes.ui.models.lanes-model": "0.0.210",
|
|
16
|
+
"@teambit/ui-foundation.ui.react-router.use-query": "0.0.501",
|
|
17
17
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.505",
|
|
18
|
-
"@teambit/
|
|
18
|
+
"@teambit/lanes.ui.models.lanes-model": "0.0.212"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@
|
|
22
|
-
"@types/jest": "^26.0.0",
|
|
21
|
+
"@types/react": "^17.0.8",
|
|
23
22
|
"@types/lodash": "4.14.165",
|
|
24
23
|
"@types/mocha": "9.1.0",
|
|
25
24
|
"@types/node": "12.20.4",
|
|
26
|
-
"@types/react": "^17.0.8",
|
|
27
25
|
"@types/react-dom": "^17.0.5",
|
|
26
|
+
"@types/jest": "^26.0.0",
|
|
27
|
+
"@babel/runtime": "7.20.0",
|
|
28
28
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
34
34
|
},
|
|
35
35
|
"license": "Apache-2.0",
|
|
36
|
+
"optionalDependencies": {},
|
|
37
|
+
"peerDependenciesMeta": {},
|
|
36
38
|
"private": false,
|
|
37
39
|
"engines": {
|
|
38
40
|
"node": ">=12.22.0"
|
|
@@ -51,4 +53,4 @@
|
|
|
51
53
|
"angular",
|
|
52
54
|
"angular-components"
|
|
53
55
|
]
|
|
54
|
-
}
|
|
56
|
+
}
|
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
|
+
}
|
package/types/asset.d.ts
ADDED
|
@@ -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
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -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
|
+
}
|
package/.bit-capsule-ready
DELETED
|
File without changes
|
|
Binary file
|