@phystack/products-react 4.4.29

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,3 @@
1
+ export * from './use-grid-products';
2
+ export * from '@phystack/products';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './use-grid-products';
2
+ export * from '@phystack/products';
@@ -0,0 +1,10 @@
1
+ import { GridProductServiceClient, IsoLanguageIds, DataResidencyEnum } from "@phystack/products";
2
+ interface GridProductsClientProps {
3
+ tenantId?: string;
4
+ dataResidency?: DataResidencyEnum | string;
5
+ environment?: string;
6
+ locale: IsoLanguageIds;
7
+ }
8
+ export declare function useGridProductsClient({ tenantId, dataResidency, environment, locale, }: GridProductsClientProps): GridProductServiceClient;
9
+ export {};
10
+ //# sourceMappingURL=use-grid-products.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-grid-products.d.ts","sourceRoot":"","sources":["../src/use-grid-products.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAG5B,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAa,EACb,aAAa,EACb,WAAgB,EAChB,MAAM,GACP,EAAE,uBAAuB,4BAkBzB"}
@@ -0,0 +1,20 @@
1
+ import { GridProductServiceClient, } from "@phystack/products";
2
+ import { useMemo } from "react";
3
+ export function useGridProductsClient(_a) {
4
+ var _b = _a.tenantId, tenantId = _b === void 0 ? "" : _b, dataResidency = _a.dataResidency, _c = _a.environment, environment = _c === void 0 ? "" : _c, locale = _a.locale;
5
+ var gridProductsClient = useMemo(function () {
6
+ console.info("GridProductsClient initialized with:", {
7
+ tenantId: tenantId,
8
+ dataResidency: dataResidency,
9
+ environment: environment,
10
+ locale: locale,
11
+ });
12
+ return new GridProductServiceClient({
13
+ tenantId: tenantId,
14
+ dataResidency: dataResidency,
15
+ environment: environment,
16
+ locale: locale,
17
+ });
18
+ }, [tenantId, dataResidency, environment, locale]);
19
+ return gridProductsClient;
20
+ }
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@phystack/products-react",
3
+ "version": "4.4.29",
4
+ "main": "dist/index.js",
5
+ "license": "UNLICENSED",
6
+ "scripts": {
7
+ "build": "rimraf ./dist && tsc",
8
+ "build:watch": "tsc -w"
9
+ },
10
+ "peerDependencies": {
11
+ "react": ">=16.13.1"
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "devDependencies": {
17
+ "@types/ramda": "^0.30.2",
18
+ "typescript": "^5.4.5"
19
+ },
20
+ "dependencies": {
21
+ "@phystack/products": "4.4.29",
22
+ "ramda": "^0.27.1"
23
+ },
24
+ "gitHead": "7dba834ca1f446f669992ff14352862d2fbcfe22"
25
+ }
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './use-grid-products';
2
+ export * from '@phystack/products';
@@ -0,0 +1,38 @@
1
+ import {
2
+ GridProductServiceClient,
3
+ IsoLanguageIds,
4
+ DataResidencyEnum,
5
+ } from "@phystack/products";
6
+ import { useMemo } from "react";
7
+
8
+ interface GridProductsClientProps {
9
+ tenantId?: string;
10
+ dataResidency?: DataResidencyEnum | string;
11
+ environment?: string;
12
+ locale: IsoLanguageIds;
13
+ }
14
+
15
+ export function useGridProductsClient({
16
+ tenantId = "",
17
+ dataResidency,
18
+ environment = "",
19
+ locale,
20
+ }: GridProductsClientProps) {
21
+ const gridProductsClient = useMemo(() => {
22
+ console.info("GridProductsClient initialized with:", {
23
+ tenantId,
24
+ dataResidency,
25
+ environment,
26
+ locale,
27
+ });
28
+
29
+ return new GridProductServiceClient({
30
+ tenantId,
31
+ dataResidency: dataResidency as DataResidencyEnum,
32
+ environment,
33
+ locale,
34
+ });
35
+ }, [tenantId, dataResidency, environment, locale]);
36
+
37
+ return gridProductsClient;
38
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": [
5
+ "dom",
6
+ "dom.iterable",
7
+ "esnext"
8
+ ],
9
+ "allowJs": true,
10
+ "skipLibCheck": true,
11
+ "esModuleInterop": true,
12
+ "allowSyntheticDefaultImports": true,
13
+ "strict": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "module": "esnext",
16
+ "moduleResolution": "node",
17
+ "resolveJsonModule": true,
18
+ "isolatedModules": true,
19
+ "jsx": "react",
20
+ "outDir": "dist",
21
+ "rootDir": "src",
22
+ "declarationDir": "dist",
23
+ "declarationMap": true,
24
+ "declaration": true,
25
+ "alwaysStrict": true
26
+ },
27
+ "include": [
28
+ "src"
29
+ ]
30
+ }