@configura/web-ui 2.0.0-alpha.2 → 2.0.0-alpha.3
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/useCatParams.d.ts +18 -0
- package/dist/useCatParams.js +29 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from "./components/productConfiguration/CfgProductConfigurationView.js"
|
|
|
17
17
|
export * from "./components/ProductInformation.js";
|
|
18
18
|
export * from "./components/TaskListView.js";
|
|
19
19
|
export * from "./components/TaskStartView.js";
|
|
20
|
+
export * from "./useCatParams.js";
|
|
20
21
|
export * from "./useObservable.js";
|
|
21
22
|
export * from "./useRerender.js";
|
|
22
23
|
export * from "./useResize.js";
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export * from "./components/productConfiguration/CfgProductConfigurationView.js"
|
|
|
17
17
|
export * from "./components/ProductInformation.js";
|
|
18
18
|
export * from "./components/TaskListView.js";
|
|
19
19
|
export * from "./components/TaskStartView.js";
|
|
20
|
+
export * from "./useCatParams.js";
|
|
20
21
|
export * from "./useObservable.js";
|
|
21
22
|
export * from "./useRerender.js";
|
|
22
23
|
export * from "./useResize.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DtoCatalogueParams, DtoCatalogueParamsWithLang, DtoProductParams, DtoProductParamsWithLang } from "@configura/web-api";
|
|
2
|
+
/**
|
|
3
|
+
* Returns a memozied version of the catParams
|
|
4
|
+
*/
|
|
5
|
+
export declare function useMemoCatalogueParams(catParams: DtoCatalogueParams): DtoCatalogueParams;
|
|
6
|
+
/**
|
|
7
|
+
* Returns a memozied version of the catParams
|
|
8
|
+
*/
|
|
9
|
+
export declare function useMemoCatalogueParamsWithLang(catParams: DtoCatalogueParamsWithLang): DtoCatalogueParamsWithLang;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a memozied version of the prodParams
|
|
12
|
+
*/
|
|
13
|
+
export declare function useMemoProductParams(prodParams: DtoProductParams): DtoProductParams;
|
|
14
|
+
/**
|
|
15
|
+
* Returns a memozied version of the prodParams
|
|
16
|
+
*/
|
|
17
|
+
export declare function useMemoProductParamsWithLang(prodParams: DtoProductParamsWithLang): DtoProductParamsWithLang;
|
|
18
|
+
//# sourceMappingURL=useCatParams.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Returns a memozied version of the catParams
|
|
4
|
+
*/
|
|
5
|
+
export function useMemoCatalogueParams(catParams) {
|
|
6
|
+
const { cid, enterprise, prdCat, prdCatVersion, vendor, priceList } = catParams;
|
|
7
|
+
return useMemo(() => ({ cid, enterprise, prdCat, prdCatVersion, vendor, priceList }), [cid, enterprise, prdCat, prdCatVersion, priceList, vendor]);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns a memozied version of the catParams
|
|
11
|
+
*/
|
|
12
|
+
export function useMemoCatalogueParamsWithLang(catParams) {
|
|
13
|
+
const { lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList } = catParams;
|
|
14
|
+
return useMemo(() => ({ lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList }), [lang, cid, enterprise, prdCat, prdCatVersion, priceList, vendor]);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns a memozied version of the prodParams
|
|
18
|
+
*/
|
|
19
|
+
export function useMemoProductParams(prodParams) {
|
|
20
|
+
const { cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber } = prodParams;
|
|
21
|
+
return useMemo(() => ({ cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber }), [cid, enterprise, prdCat, prdCatVersion, priceList, vendor, partNumber]);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns a memozied version of the prodParams
|
|
25
|
+
*/
|
|
26
|
+
export function useMemoProductParamsWithLang(prodParams) {
|
|
27
|
+
const { lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber } = prodParams;
|
|
28
|
+
return useMemo(() => ({ lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber }), [lang, cid, enterprise, prdCat, prdCatVersion, priceList, vendor, partNumber]);
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/web-ui",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@configura/web-api": "2.0.0-alpha.
|
|
35
|
+
"@configura/web-api": "2.0.0-alpha.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@babel/preset-env": "^7.14.4",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "293660b8d8663638e531c2c44274ffffb1465e04"
|
|
68
68
|
}
|