flowrix 1.0.1-beta.124 → 1.0.1-beta.126

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "flowrix",
3
3
  "configKey": "flowrix",
4
- "version": "1.0.1-beta.124",
4
+ "version": "1.0.1-beta.126",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,6 +1,6 @@
1
1
  export declare function useBrand(template: {
2
2
  template: string;
3
- }): {
3
+ }, ProductTypes?: never[]): {
4
4
  Brandtemplate: any;
5
5
  brandData: any;
6
6
  pending: any;
@@ -1,6 +1,6 @@
1
1
  import { defineAsyncComponent, watch } from "vue";
2
2
  import { useRoute, useFetch } from "#imports";
3
- export function useBrand(template) {
3
+ export function useBrand(template, ProductTypes = []) {
4
4
  const route = useRoute();
5
5
  const components = import.meta.glob(
6
6
  "~/components/Brand/Template*/**/index.vue"
@@ -19,7 +19,28 @@ export function useBrand(template) {
19
19
  }
20
20
  });
21
21
  const slug = route.params.slug;
22
- const query = route.query;
22
+ let query = {
23
+ ...route.query
24
+ };
25
+ if (ProductTypes.includes("parentsonly")) {
26
+ query.parentsonly = "true";
27
+ }
28
+ if (ProductTypes.includes("directproducts")) {
29
+ query.directproducts = "true";
30
+ }
31
+ if (ProductTypes.includes("custom")) {
32
+ query.custom = "true";
33
+ }
34
+ if (ProductTypes.includes("simple")) {
35
+ query.simple = "true";
36
+ }
37
+ if (ProductTypes.includes("bundle")) {
38
+ query.bundle = "true";
39
+ }
40
+ if (ProductTypes.includes("sample")) {
41
+ query.sample = "true";
42
+ }
43
+ query.ProductTypes = ["custom", "simple", "bundle", "sample"];
23
44
  const { data: brandData, error, pending, refresh } = useFetch(`/api/brand/${slug}`, {
24
45
  method: "post",
25
46
  query
@@ -6,6 +6,12 @@ export const useCategoryIndex = (props, ProductTypes = []) => {
6
6
  let query = {
7
7
  ...route.query
8
8
  };
9
+ if (ProductTypes.includes("parentsonly")) {
10
+ query.parentsonly = "true";
11
+ }
12
+ if (ProductTypes.includes("directproducts")) {
13
+ query.directproducts = "true";
14
+ }
9
15
  if (ProductTypes.includes("custom")) {
10
16
  query.custom = "true";
11
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowrix",
3
- "version": "1.0.1-beta.124",
3
+ "version": "1.0.1-beta.126",
4
4
  "description": "Plug-and-play Nuxt eCommerce cart powered by FLOWRiX. Subscription required.",
5
5
  "license": "MIT",
6
6
  "type": "module",