@fayz-ai/plugin-inventory 0.16.0 → 0.16.1

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.
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
- export declare function ProductCrudForm({ editId, onSaved }: {
2
+ export declare function ProductCrudForm({ editId, onSaved, onOpenTab }: {
3
3
  editId?: string;
4
4
  onSaved?: () => void;
5
+ /** Edit mode shows the product's tab strip; called for a tab the form does not hold. */
6
+ onOpenTab?: (tabId: string) => void;
5
7
  }): React.JSX.Element;
6
8
  //# sourceMappingURL=ProductCrudForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductCrudForm.d.ts","sourceRoot":"","sources":["../../src/views/ProductCrudForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAmBzB,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,qBA8J7F"}
1
+ {"version":3,"file":"ProductCrudForm.d.ts","sourceRoot":"","sources":["../../src/views/ProductCrudForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAoBzB,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,wFAAwF;IACxF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC,qBA6KA"}
@@ -1,4 +1,24 @@
1
1
  import React from 'react';
2
+ import type { DetailTab, EntityDef } from '@fayz-ai/core';
3
+ /**
4
+ * The product's tabs, in order. One answer for the page and for the edit form,
5
+ * which draws the same strip.
6
+ *
7
+ * Each tab opens with its switch, as in V1: Complementos with «Venda», Ficha
8
+ * Técnica with «Produto produzido». The sheet also opens when asked for by
9
+ * route — «Nova Ficha Técnica» may pick a product not yet produced.
10
+ */
11
+ export declare function productRecordTabs({ entity, flat, hasMenu, hasRecipes, withComplements, initialTab, contributedTabs, t, reload }: {
12
+ entity: EntityDef;
13
+ flat: Record<string, any> | null;
14
+ hasMenu: boolean;
15
+ hasRecipes: boolean;
16
+ withComplements: boolean;
17
+ initialTab?: string;
18
+ contributedTabs: DetailTab[];
19
+ t: (key: string) => string;
20
+ reload?: () => void;
21
+ }): DetailTab[];
2
22
  /** The product's own page — overview plus the tabs the entity declares. */
3
23
  export declare function ProductDetailView({ productId, initialTab, onBack, onEdit }: {
4
24
  productId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDetailView.d.ts","sourceRoot":"","sources":["../../src/views/ProductDetailView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AA+BxE,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;IAC3E,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,qBA0HA"}
1
+ {"version":3,"file":"ProductDetailView.d.ts","sourceRoot":"","sources":["../../src/views/ProductDetailView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAMxE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AA0BzD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;IAChI,MAAM,EAAE,SAAS,CAAA;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAA;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,OAAO,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,SAAS,EAAE,CAAA;IAC5B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,GAAG,SAAS,EAAE,CAYd;AAED,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;IAC3E,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,qBAgHA"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "status": "beta",
5
5
  "dependencies": []
6
6
  },
7
- "version": "0.16.0",
7
+ "version": "0.16.1",
8
8
  "description": "Fayz SDK — plugin-inventory plugin",
9
9
  "type": "module",
10
10
  "sideEffects": false,
@@ -29,8 +29,8 @@
29
29
  "dependencies": {
30
30
  "@tanstack/react-table": "^8.20.0",
31
31
  "@fayz-ai/core": "^0.44.0",
32
- "@fayz-ai/ui": "^0.44.0",
33
- "@fayz-ai/admin": "^0.44.0"
32
+ "@fayz-ai/ui": "^0.45.0",
33
+ "@fayz-ai/admin": "^0.45.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/react": "^18.3.0",