@haus-storefront-react/vendure-plugin-configs 1.0.4-next.3 → 1.0.4-next.5
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/CHANGELOG.md +18 -0
- package/lib/configs/vendure-product-variant-specifications-plugin.d.ts +55 -0
- package/lib/configs/vendure-product-variant-specifications-plugin.types.d.ts +8 -0
- package/lib/exports/product-variant-specifications.d.ts +2 -0
- package/lib/types.d.ts +1 -0
- package/package.json +11 -5
- package/product-variant-specifications.d.ts +2 -0
- package/product-variant-specifications.js +1 -0
- package/product-variant-specifications.mjs +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 1.0.4-next.4 (2026-03-09)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated core to 1.0.4-next.4
|
|
6
|
+
- Updated common/utils to 1.0.4-next.4
|
|
7
|
+
- Updated shared/types to 1.0.4-next.4
|
|
8
|
+
- Updated providers to 1.0.4-next.4
|
|
9
|
+
|
|
10
|
+
## 1.0.4-next.3 (2026-03-06)
|
|
11
|
+
|
|
12
|
+
### 🧱 Updated Dependencies
|
|
13
|
+
|
|
14
|
+
- Updated core to 1.0.4-next.3
|
|
15
|
+
- Updated common/utils to 1.0.4-next.3
|
|
16
|
+
- Updated shared/types to 1.0.4-next.3
|
|
17
|
+
- Updated providers to 1.0.4-next.3
|
|
18
|
+
|
|
1
19
|
## 1.0.4-next.2 (2026-03-04)
|
|
2
20
|
|
|
3
21
|
### 🧱 Updated Dependencies
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { VendurePluginConfig } from '../plugin-config';
|
|
2
|
+
import { ProductVariantSpecification } from './vendure-product-variant-specifications-plugin.types';
|
|
3
|
+
/**
|
|
4
|
+
* Extends ProductVariant.customFields (ProductVariantCustomFields) with specifications.
|
|
5
|
+
* Use with ProductVariantSpecificationsPlugin on the Vendure server.
|
|
6
|
+
* Access via productVariant.customFields.specifications
|
|
7
|
+
*/
|
|
8
|
+
declare module '@haus-storefront-react/shared-types' {
|
|
9
|
+
interface ProductVariant {
|
|
10
|
+
customFields?: {
|
|
11
|
+
specifications?: ProductVariantSpecification[];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Storefront plugin config for ProductVariantSpecificationsPlugin.
|
|
17
|
+
* Adds `specifications` (key-value pairs) to product variant queries.
|
|
18
|
+
*/
|
|
19
|
+
export declare const VendureProductVariantSpecificationsPlugin: VendurePluginConfig<Partial<{
|
|
20
|
+
showBadges: (props: {
|
|
21
|
+
product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
|
|
22
|
+
variant?: import('@haus-storefront-react/shared-types').ProductVariant;
|
|
23
|
+
parentComponent?: keyof import('./vendure-badge-plugin.types').BadgePluginSettings["availablePositions"];
|
|
24
|
+
badges: import('@haus-storefront-react/shared-types').Maybe<import('@haus-storefront-react/shared-types').Badge[]>;
|
|
25
|
+
}) => {
|
|
26
|
+
badges: import('@haus-storefront-react/shared-types').Badge[];
|
|
27
|
+
availablePositions?: string[];
|
|
28
|
+
};
|
|
29
|
+
showCampaignPrices: boolean;
|
|
30
|
+
ordinaryPrice: (props: {
|
|
31
|
+
product?: import('@haus-storefront-react/shared-types').Product;
|
|
32
|
+
searchResult?: import('@haus-storefront-react/shared-types').SearchResult;
|
|
33
|
+
variant?: import('@haus-storefront-react/shared-types').ProductVariant;
|
|
34
|
+
orderLine?: import('@haus-storefront-react/shared-types').OrderLine;
|
|
35
|
+
identifier?: string;
|
|
36
|
+
}) => import('@haus-storefront-react/shared-types').Price;
|
|
37
|
+
changeQuantityByPackageSize: (props: {
|
|
38
|
+
product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
|
|
39
|
+
variant?: import('@haus-storefront-react/shared-types').ProductVariant;
|
|
40
|
+
identifier: string;
|
|
41
|
+
}) => boolean;
|
|
42
|
+
showPackageSize: (props: {
|
|
43
|
+
product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
|
|
44
|
+
variant?: import('@haus-storefront-react/shared-types').ProductVariant;
|
|
45
|
+
identifier: string;
|
|
46
|
+
}) => boolean;
|
|
47
|
+
showCostPerPackage: (props: {
|
|
48
|
+
product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
|
|
49
|
+
variant?: import('@haus-storefront-react/shared-types').ProductVariant;
|
|
50
|
+
identifier: string;
|
|
51
|
+
}) => boolean;
|
|
52
|
+
sortByPopularity: boolean;
|
|
53
|
+
}>, Record<string, (...args: any[]) => any>, {
|
|
54
|
+
[x: string]: any;
|
|
55
|
+
}, import('@haus-storefront-react/shared-types').IGraphQLSDK>;
|
package/lib/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './configs/vendure-badge-plugin.types';
|
|
2
2
|
export * from './configs/vendure-product-popularity-plugin.types';
|
|
3
|
+
export * from './configs/vendure-product-variant-specifications-plugin.types';
|
|
3
4
|
export * from './configs/vendure-purchase-order-payment-plugin.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haus-storefront-react/vendure-plugin-configs",
|
|
3
|
-
"version": "1.0.4-next.
|
|
3
|
+
"version": "1.0.4-next.5",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -44,13 +44,19 @@
|
|
|
44
44
|
"import": "./product-popularity.mjs",
|
|
45
45
|
"require": "./product-popularity.js",
|
|
46
46
|
"default": "./product-popularity"
|
|
47
|
+
},
|
|
48
|
+
"./product-variant-specifications": {
|
|
49
|
+
"types": "./lib/exports/product-variant-specifications.d.ts",
|
|
50
|
+
"import": "./product-variant-specifications.mjs",
|
|
51
|
+
"require": "./product-variant-specifications.js",
|
|
52
|
+
"default": "./product-variant-specifications"
|
|
47
53
|
}
|
|
48
54
|
},
|
|
49
55
|
"dependencies": {
|
|
50
|
-
"@haus-storefront-react/common-utils": "1.0.4-next.
|
|
51
|
-
"@haus-storefront-react/core": "1.0.4-next.
|
|
52
|
-
"@haus-storefront-react/providers": "1.0.4-next.
|
|
53
|
-
"@haus-storefront-react/shared-types": "1.0.4-next.
|
|
56
|
+
"@haus-storefront-react/common-utils": "1.0.4-next.5",
|
|
57
|
+
"@haus-storefront-react/core": "1.0.4-next.5",
|
|
58
|
+
"@haus-storefront-react/providers": "1.0.4-next.5",
|
|
59
|
+
"@haus-storefront-react/shared-types": "1.0.4-next.5"
|
|
54
60
|
},
|
|
55
61
|
"publishConfig": {
|
|
56
62
|
"access": "restricted"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CgxqXyHf.js"),e=new i.VendurePluginConfig({name:"productVariantSpecifications",queryUpdates:{}});e.setQueryUpdates({product:{fields:[{variants:[{customFields:[{specifications:["key","value"]}]}]}]}});exports.VendureProductVariantSpecificationsPlugin=e;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { V as e } from "./index-BRlTlK6a.mjs";
|
|
2
|
+
const i = new e({
|
|
3
|
+
name: "productVariantSpecifications",
|
|
4
|
+
queryUpdates: {}
|
|
5
|
+
});
|
|
6
|
+
i.setQueryUpdates({
|
|
7
|
+
product: {
|
|
8
|
+
fields: [{
|
|
9
|
+
variants: [{
|
|
10
|
+
customFields: [{
|
|
11
|
+
specifications: ["key", "value"]
|
|
12
|
+
}]
|
|
13
|
+
}]
|
|
14
|
+
}]
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
i as VendureProductVariantSpecificationsPlugin
|
|
19
|
+
};
|