@tallyui/connector-woocommerce 3.4.0 → 3.5.0

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.js CHANGED
@@ -450,7 +450,8 @@ var wooProductTraits = {
450
450
  getVariantCount: (doc) => doc.type === "variable" ? doc.variations?.length ?? 0 : 1,
451
451
  getType: (doc) => doc.type ?? "simple",
452
452
  getBarcode: (doc) => wooProductBarcode(doc),
453
- getCategoryNames: (doc) => (doc.categories ?? []).map((cat) => cat.name).filter(Boolean)
453
+ getCategoryNames: (doc) => (doc.categories ?? []).map((cat) => cat.name).filter(Boolean),
454
+ getCategories: (doc) => (doc.categories ?? []).filter((cat) => cat.name).map((cat) => ({ id: cat.id != null ? String(cat.id) : cat.name, name: cat.name }))
454
455
  };
455
456
 
456
457
  // src/sync/products.ts
@@ -841,7 +842,7 @@ async function readWooCapabilities(context) {
841
842
  }
842
843
 
843
844
  // package.json
844
- var version = "3.4.0";
845
+ var version = "3.5.0";
845
846
 
846
847
  // src/commands/transport.ts
847
848
  import { minorUnitDigits as minorUnitDigits2, moneyFromDecimalString, moneyFromMajor as moneyFromMajor2 } from "@tallyui/core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tallyui/connector-woocommerce",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "type": "module",
5
5
  "description": "WooCommerce connector for Tally UI",
6
6
  "main": "./dist/index.js",
@@ -26,10 +26,10 @@
26
26
  "directory": "connectors/woocommerce"
27
27
  },
28
28
  "peerDependencies": {
29
- "@tallyui/core": "^3.4.0"
29
+ "@tallyui/core": "^3.5.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@tallyui/database": "3.4.0",
32
+ "@tallyui/database": "3.5.0",
33
33
  "rxdb": "17.5.0"
34
34
  },
35
35
  "scripts": {
@@ -107,4 +107,8 @@ export const wooProductTraits: ProductTraits = {
107
107
 
108
108
  getCategoryNames: (doc) =>
109
109
  (doc.categories ?? []).map((cat: any) => cat.name).filter(Boolean),
110
+
111
+ getCategories: (doc) =>
112
+ (doc.categories ?? []).filter((cat: any) => cat.name)
113
+ .map((cat: any) => ({ id: cat.id != null ? String(cat.id) : cat.name, name: cat.name })),
110
114
  };