@teambit/lanes.hooks.use-lane-components 0.0.314 → 0.0.315
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/.npmignore
CHANGED
|
@@ -41,22 +41,25 @@ const GET_LANE_COMPONENTS = (0, client_1.gql) `
|
|
|
41
41
|
${component_1.componentOverviewFields}
|
|
42
42
|
`;
|
|
43
43
|
function useLaneComponents(laneId) {
|
|
44
|
-
var _a, _b;
|
|
45
44
|
// @ts-ignore - remove once graphql versions are aligned (see #8753)
|
|
46
45
|
const { data, loading } = (0, ui_foundation_ui_hooks_use_data_query_1.useDataQuery)(GET_LANE_COMPONENTS, {
|
|
47
|
-
variables: { ids: [laneId
|
|
46
|
+
variables: { ids: [laneId?.toString()], skipList: laneId?.isDefault() },
|
|
48
47
|
skip: !laneId,
|
|
49
48
|
});
|
|
50
|
-
const rawComps =
|
|
51
|
-
const components =
|
|
52
|
-
const componentModel = component_1.ComponentModel.from(
|
|
49
|
+
const rawComps = data?.lanes.list && data?.lanes.list.length > 0 ? data?.lanes.list[0] : data?.lanes.default;
|
|
50
|
+
const components = rawComps?.components?.map((component) => {
|
|
51
|
+
const componentModel = component_1.ComponentModel.from({ ...component, host: data.getHost.id });
|
|
53
52
|
return componentModel;
|
|
54
53
|
});
|
|
55
|
-
const componentDescriptors = (0, lodash_1.compact)(
|
|
54
|
+
const componentDescriptors = (0, lodash_1.compact)(rawComps?.components?.map((rawComponent) => {
|
|
56
55
|
const id = rawComponent ? component_1.ComponentID.fromObject(rawComponent.id) : undefined;
|
|
57
56
|
const aspectList = {
|
|
58
|
-
entries: rawComponent
|
|
59
|
-
return
|
|
57
|
+
entries: rawComponent?.aspects.map((aspectObject) => {
|
|
58
|
+
return {
|
|
59
|
+
...aspectObject,
|
|
60
|
+
aspectId: aspectObject.id,
|
|
61
|
+
aspectData: aspectObject.data,
|
|
62
|
+
};
|
|
60
63
|
}),
|
|
61
64
|
};
|
|
62
65
|
return id ? component_descriptor_1.ComponentDescriptor.fromObject({ id: id.toString(), aspectList }) : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-lane-components.js","sourceRoot":"","sources":["../use-lane-components.tsx"],"names":[],"mappings":";;AAgDA,8CAmCC;AAnFD,0GAA8E;AAC9E,2CAAqC;AACrC,kDAA0F;AAE1F,wEAAoE;AACpE,mCAAiC;AAEjC,MAAM,mBAAmB,GAAG,IAAA,YAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgC3B,mCAAuB;CAC1B,CAAC;AAQF,SAAgB,iBAAiB,CAAC,MAAe
|
|
1
|
+
{"version":3,"file":"use-lane-components.js","sourceRoot":"","sources":["../use-lane-components.tsx"],"names":[],"mappings":";;AAgDA,8CAmCC;AAnFD,0GAA8E;AAC9E,2CAAqC;AACrC,kDAA0F;AAE1F,wEAAoE;AACpE,mCAAiC;AAEjC,MAAM,mBAAmB,GAAG,IAAA,YAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgC3B,mCAAuB;CAC1B,CAAC;AAQF,SAAgB,iBAAiB,CAAC,MAAe;IAC/C,oEAAoE;IACpE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAA,oDAAY,EAAC,mBAAmB,EAAE;QAC1D,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;QACvE,IAAI,EAAE,CAAC,MAAM;KACd,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;IAE7G,MAAM,UAAU,GAAG,QAAQ,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;QACzD,MAAM,cAAc,GAAG,0BAAc,CAAC,IAAI,CAAC,EAAE,GAAG,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACpF,OAAO,cAAc,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,MAAM,oBAAoB,GAA0B,IAAA,gBAAO,EACzD,QAAQ,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE;QACzC,MAAM,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,uBAAW,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC9E,MAAM,UAAU,GAAG;YACjB,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE;gBAClD,OAAO;oBACL,GAAG,YAAY;oBACf,QAAQ,EAAE,YAAY,CAAC,EAAE;oBACzB,UAAU,EAAE,YAAY,CAAC,IAAI;iBAC9B,CAAC;YACJ,CAAC,CAAC;SACH,CAAC;QACF,OAAO,EAAE,CAAC,CAAC,CAAC,0CAAmB,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5F,CAAC,CAAC,CACH,CAAC;IAEF,OAAO;QACL,OAAO;QACP,UAAU;QACV,oBAAoB;KACrB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,34 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/lanes.hooks.use-lane-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.315",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/lanes/hooks/use-lane-components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.lanes",
|
|
8
8
|
"name": "hooks/use-lane-components",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.315"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
13
|
-
"
|
|
13
|
+
"@teambit/component-descriptor": "0.0.463",
|
|
14
14
|
"@teambit/lane-id": "0.0.312",
|
|
15
|
-
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.
|
|
16
|
-
"@teambit/component-descriptor": "0.0.463"
|
|
15
|
+
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.508"
|
|
17
16
|
},
|
|
18
17
|
"devDependencies": {
|
|
19
18
|
"@types/lodash": "4.14.165",
|
|
20
19
|
"@types/mocha": "9.1.0",
|
|
21
|
-
"@
|
|
22
|
-
"@types/react": "^19.0.0",
|
|
23
|
-
"@types/react-dom": "^19.0.0",
|
|
24
|
-
"@types/jest": "^26.0.0",
|
|
25
|
-
"@babel/runtime": "7.20.0",
|
|
26
|
-
"@types/testing-library__jest-dom": "5.9.5"
|
|
20
|
+
"@teambit/harmony.envs.core-react-env": "0.0.1"
|
|
27
21
|
},
|
|
28
22
|
"peerDependencies": {
|
|
29
|
-
"@apollo/client": "^3.12.0"
|
|
30
|
-
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
31
|
-
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
23
|
+
"@apollo/client": "^3.12.0"
|
|
32
24
|
},
|
|
33
25
|
"license": "Apache-2.0",
|
|
34
26
|
"optionalDependencies": {},
|
package/types/asset.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ declare module '*.png' {
|
|
|
5
5
|
declare module '*.svg' {
|
|
6
6
|
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
7
|
|
|
8
|
-
export const ReactComponent: FunctionComponent<
|
|
8
|
+
export const ReactComponent: FunctionComponent<
|
|
9
|
+
SVGProps<SVGSVGElement> & { title?: string }
|
|
10
|
+
>;
|
|
9
11
|
const src: string;
|
|
10
12
|
export default src;
|
|
11
13
|
}
|
|
@@ -27,3 +29,15 @@ declare module '*.bmp' {
|
|
|
27
29
|
const value: any;
|
|
28
30
|
export = value;
|
|
29
31
|
}
|
|
32
|
+
declare module '*.otf' {
|
|
33
|
+
const value: any;
|
|
34
|
+
export = value;
|
|
35
|
+
}
|
|
36
|
+
declare module '*.woff' {
|
|
37
|
+
const value: any;
|
|
38
|
+
export = value;
|
|
39
|
+
}
|
|
40
|
+
declare module '*.woff2' {
|
|
41
|
+
const value: any;
|
|
42
|
+
export = value;
|
|
43
|
+
}
|
|
File without changes
|