@feedmepos/mf-inventory-portal 1.7.9-dev.0 → 1.7.9-dev.2

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.
Files changed (111) hide show
  1. package/dist/App-BYCW0L94.js +1403 -0
  2. package/dist/{ApprovalView-Bc6xo-gg.js → ApprovalView-pmI_SFo7.js} +9 -9
  3. package/dist/{BindingsDialog-BbTkoM05.js → BindingsDialog-D902flPr.js} +2 -2
  4. package/dist/{BindingsPicker-CkK79U9V.js → BindingsPicker-JEKsY59b.js} +2 -2
  5. package/dist/{BindingsTable-CmdCc1mG.js → BindingsTable-DqlzOIxF.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-BOt07CYr.js → BulkReceiveRequestView-Chw7ma2k.js} +19 -19
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-YMRGpkS4.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Cct8Ko19.js} +1 -1
  8. package/dist/{ClosingDraftView-Dec1xuFQ.js → ClosingDraftView-D1ymRsd2.js} +19 -19
  9. package/dist/{ClosingHistoryView-DuX0UpLC.js → ClosingHistoryView-5yr_itIV.js} +5 -5
  10. package/dist/{ClosingTemplateView-DBPGxWt2.js → ClosingTemplateView-MDl5Zq-g.js} +16 -16
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DWfblvtV.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BcG0gWV4.js} +1 -1
  12. package/dist/{DefaultView-D_XfvHrs.js → DefaultView-dOfbL3iF.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-DfAAAfCJ.js → DeliveryOrderPrintPreview-BfVgQOx8.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-CdcBrUHW.js → EmailDialog.vue_vue_type_script_setup_true_lang-DHspOJQW.js} +2250 -2250
  15. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-lge1DZ4v.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B7NLu0us.js} +1 -1
  16. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DjYAwlg9.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C0nunKjx.js} +2 -2
  17. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-vwp2n9KL.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CMst9tkA.js} +2 -2
  18. package/dist/{FmMultiselectDialog-BTVaIESZ.js → FmMultiselectDialog-BjBx94pY.js} +1 -1
  19. package/dist/{FmMultiselectDialog-C-kDJtv_.js → FmMultiselectDialog-Dt54hvqw.js} +2 -2
  20. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Mo-hF_cA.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DtG9Ieo_.js} +6 -6
  21. package/dist/{ImportView-CRAFZVSk.js → ImportView-CdZN8k_Y.js} +6 -6
  22. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CuEDzJ0s.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-iCpYEneM.js} +1 -1
  23. package/dist/{IngredientGroupView-OeeBfJau.js → IngredientGroupView-BBVS1mKn.js} +5 -5
  24. package/dist/{IngredientsView-BHX3xUDm.js → IngredientsView-BGOaAUzR.js} +17 -16
  25. package/dist/{IntegrationExplorerView-BwxSGD2N.js → IntegrationExplorerView-UUBCmqdR.js} +4 -4
  26. package/dist/{IntegrationView-CevJNVqG.js → IntegrationView-B2YowH-i.js} +14 -14
  27. package/dist/{InventoryBindingForm-wE--IP2D.js → InventoryBindingForm-kDx6Mvhn.js} +1 -1
  28. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-C8bktmYH.js +563 -0
  29. package/dist/{InventoryBindingSummary-BQ-U7tHs.js → InventoryBindingSummary-DJrBTa8_.js} +1 -1
  30. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-jnXbX2lS.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DHk9uEAP.js} +1 -1
  31. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BNMCbrIo.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Dx1VktdW.js} +1 -1
  32. package/dist/{ProductionView-CvU9N_mb.js → ProductionView-CxUcsRBP.js} +7 -7
  33. package/dist/{PublishView-BNnxGtEQ.js → PublishView-DtP-Ms7q.js} +3 -3
  34. package/dist/{PurchaseOrderPrintPreview-Bq9kMWdx.js → PurchaseOrderPrintPreview-C_qC2KF5.js} +2 -2
  35. package/dist/{ReceiveRequestView-zUSU0Uvq.js → ReceiveRequestView-Dy3BpqsP.js} +14 -14
  36. package/dist/RecipeView-DeR7pqj8.js +3625 -0
  37. package/dist/{SettingsView-CPgsU8Kr.js → SettingsView-C7ZXmatO.js} +4 -4
  38. package/dist/{StockView-D-TJzHhP.js → StockView-wFLnNSRr.js} +21 -21
  39. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B6ez4H3Z.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Fxh3-Nqi.js} +1 -1
  40. package/dist/{SupplierView-D-rODe-B.js → SupplierView-CeTDNDDK.js} +12 -12
  41. package/dist/{SurchargeView-C88KTCML.js → SurchargeView-BQJnCdPA.js} +6 -6
  42. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CFIK8eEl.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-D1zxuH66.js} +2 -2
  43. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BNjjTYtk.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BFkh3Ubb.js} +1 -1
  44. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-E0FeDPFB.js → TransferDetails.vue_vue_type_script_setup_true_lang-CZVDhXNz.js} +20 -20
  45. package/dist/{TransferTemplateView-f9A4-wEL.js → TransferTemplateView-XaI2T5fa.js} +20 -20
  46. package/dist/{UnitCostHistoryView-D26St5yl.js → UnitCostHistoryView-DTNW7-mk.js} +4 -4
  47. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-D2z5vabu.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-vRsEjVJc.js} +4 -4
  48. package/dist/{UnitView-algS_4rD.js → UnitView-DXnyzkj3.js} +7 -7
  49. package/dist/{WarehouseView-BRM-euG4.js → WarehouseView-iEHFgIqh.js} +5 -5
  50. package/dist/{WastageTemplateView-BWPYvTMC.js → WastageTemplateView-CGDUCPbr.js} +14 -14
  51. package/dist/api/changelog.d.ts +69 -1
  52. package/dist/{app-BI1fLJ8H.js → app-BIXJtvvD.js} +35 -23
  53. package/dist/app.d.ts +26 -8
  54. package/dist/app.js +1 -1
  55. package/dist/{closing-template-DRQ-A04S.js → closing-template-CLY-r6Cf.js} +1 -1
  56. package/dist/{date2-paxg81i_.js → date2-DbYQycSa.js} +1 -1
  57. package/dist/{dayjs.min-CqWwbKI1.js → dayjs.min-Dv7-fEed.js} +1 -1
  58. package/dist/{decimal-tY0JrFld.js → decimal-B8YR17QC.js} +2 -2
  59. package/dist/{defineDeepModel-CaP78Goh.js → defineDeepModel-C5ncgNxj.js} +1 -1
  60. package/dist/{duplicate-template-pTXXQ0VS.js → duplicate-template-CAlG1nzV.js} +1 -1
  61. package/dist/{feature-B2r32qOO.js → feature-BLSNLI5y.js} +2 -2
  62. package/dist/{format-time-from-id-DXMYus4N.js → format-time-from-id-D5DcWpHS.js} +1 -1
  63. package/dist/{format-unit-display-5hlsZBY2.js → format-unit-display-Ch97dVXx.js} +12 -12
  64. package/dist/{import-export.helper-BiC2Ghbl.js → import-export.helper-CvUFSOa1.js} +6 -6
  65. package/dist/{index-rqdAWR69.js → index-Bk8DOv4n.js} +3306 -3232
  66. package/dist/{index-KP2-U9x_.js → index-CXzVUrJS.js} +3 -3
  67. package/dist/{index-B7eouqPa.js → index-rRPErzP4.js} +1 -1
  68. package/dist/{inventory-core-dart.default-ClRRaGtG.js → inventory-core-dart.default-Cj7CxnpK.js} +1 -1
  69. package/dist/{lz-string-CAl-OrXa.js → lz-string-DWkGPESZ.js} +1 -1
  70. package/dist/{netsuite-cH4OybGV.js → netsuite-Cn0y1rH3.js} +2 -2
  71. package/dist/{number-BzmDQm_s.js → number-CxbQxQwj.js} +3 -3
  72. package/dist/{predefined-templates-Baz8GEGx.js → predefined-templates-CrSoG3R9.js} +1 -1
  73. package/dist/{purchase-order-template-0So3c2iS.js → purchase-order-template-BmQQnrEl.js} +1 -1
  74. package/dist/{recalculationUtils-DJlz5mJL.js → recalculationUtils-CSnowXma.js} +1 -1
  75. package/dist/{rules-BKdtla9-.js → rules-CurdOAcA.js} +2 -2
  76. package/dist/{stock-D8M5e53w.js → stock-BdDR_L8p.js} +1 -1
  77. package/dist/{stock-HCSCwSH0.js → stock-BiqEgcgU.js} +3 -3
  78. package/dist/style.css +1 -1
  79. package/dist/{supplier-1mbcQSiQ.js → supplier-CsjbmP_P.js} +2 -2
  80. package/dist/{surcharge-DuxYBaWV.js → surcharge--kBjIIst.js} +1 -1
  81. package/dist/tsconfig.app.tsbuildinfo +1 -1
  82. package/dist/{uom-rules-Dkbgtow8.js → uom-rules-D8UPS06O.js} +1 -1
  83. package/dist/{use-ingredient-select-dialog-BXvBvELI.js → use-ingredient-select-dialog-BZdrpLOE.js} +2 -2
  84. package/dist/{use-inventory-binding-dialog-2lrzHWdQ.js → use-inventory-binding-dialog-CkNxixT2.js} +2 -2
  85. package/dist/{use-template-enabled-locations-CrDuAaCj.js → use-template-enabled-locations-Dkl1_1F-.js} +2 -2
  86. package/dist/{use-transfer-locations-C4oTuW_f.js → use-transfer-locations-Bmj4zTJj.js} +2 -2
  87. package/dist/{useHrmPermission-CxeYlUgA.js → useHrmPermission-DcBe_-Q6.js} +1 -1
  88. package/dist/{useNavigationMenu-BWgwgA4U.js → useNavigationMenu-CsRbtAc7.js} +2 -2
  89. package/dist/{useSseClient-DPA1zg96.js → useSseClient-hl2SQF5b.js} +1 -1
  90. package/dist/views/changelog/components/ChangelogPanel.spec.d.ts +1 -0
  91. package/dist/views/changelog/components/ChangelogPanel.vue.d.ts +2 -0
  92. package/dist/views/changelog/composables/use-changelog.d.ts +54 -2
  93. package/dist/views/changelog/composables/use-inventory-record-commits.d.ts +97 -0
  94. package/dist/views/changelog/composables/use-inventory-record-commits.spec.d.ts +1 -0
  95. package/dist/views/changelog/composables/use-snapshot-diff.d.ts +29 -0
  96. package/dist/views/changelog/composables/use-snapshot-diff.spec.d.ts +1 -0
  97. package/dist/views/changelog/composables/value-tree.d.ts +14 -0
  98. package/dist/views/changelog/composables/value-tree.spec.d.ts +1 -0
  99. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +2 -0
  100. package/dist/views/ingredients/components/inventory-binding/RecipeBindingBreakdown.vue.d.ts +25 -0
  101. package/dist/views/ingredients/components/inventory-binding/composables/recipe-breakdown.d.ts +34 -0
  102. package/dist/views/ingredients/components/inventory-binding/composables/recipe-breakdown.spec.d.ts +1 -0
  103. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +2 -0
  104. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +4 -0
  105. package/dist/views/recipe/composables/use-recipe-table.d.ts +11 -0
  106. package/dist/{vue-i18n-BSfpVmaF.js → vue-i18n-yL99yI4f.js} +169 -169
  107. package/dist/{xlsx.util-DSA9o0Zu.js → xlsx.util-B8azJxkS.js} +2 -2
  108. package/package.json +2 -2
  109. package/dist/App-DvBMEcuJ.js +0 -1155
  110. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-O5IbSGWu.js +0 -441
  111. package/dist/RecipeView-DkXOK1Iy.js +0 -3584
@@ -1,5 +1,5 @@
1
1
  import { computed as o } from "vue";
2
- import { u } from "./netsuite-cH4OybGV.js";
2
+ import { u } from "./netsuite-Cn0y1rH3.js";
3
3
  function i(e) {
4
4
  const t = (n) => !!n && n.toLocaleLowerCase().includes("inactive");
5
5
  return t(e.name) || t(e.abbrev);
@@ -1,6 +1,6 @@
1
1
  import { defineStore as S } from "pinia";
2
- import { a as b } from "./app-BI1fLJ8H.js";
3
- import { a as A } from "./FmMultiselectDialog-C-kDJtv_.js";
2
+ import { a as b } from "./app-BIXJtvvD.js";
3
+ import { a as A } from "./FmMultiselectDialog-Dt54hvqw.js";
4
4
  import { useDialog as I } from "@feedmepos/ui-library";
5
5
  import { useI18n as D } from "@feedmepos/mf-common";
6
6
  const w = S(
@@ -1,5 +1,5 @@
1
- import { a as g } from "./FmMultiselectDialog-C-kDJtv_.js";
2
- import { a as P } from "./app-BI1fLJ8H.js";
1
+ import { a as g } from "./FmMultiselectDialog-Dt54hvqw.js";
2
+ import { a as P } from "./app-BIXJtvvD.js";
3
3
  import { useDialog as E } from "@feedmepos/ui-library";
4
4
  function A() {
5
5
  const u = P(), _ = E();
@@ -1,5 +1,5 @@
1
- import { a as A } from "./FmMultiselectDialog-C-kDJtv_.js";
2
- import { u as S } from "./app-BI1fLJ8H.js";
1
+ import { a as A } from "./FmMultiselectDialog-Dt54hvqw.js";
2
+ import { u as S } from "./app-BIXJtvvD.js";
3
3
  import { useI18n as w, useCoreStore as i, useCustomAttributes as _ } from "@feedmepos/mf-common";
4
4
  import { useDialog as C, components as p } from "@feedmepos/ui-library";
5
5
  import { computed as r, h as c } from "vue";
@@ -1,5 +1,5 @@
1
- import { u as g, r as l, V as w, Y as R } from "./app-BI1fLJ8H.js";
2
- import { u as E } from "./supplier-1mbcQSiQ.js";
1
+ import { u as g, r as l, V as w, Y as R } from "./app-BIXJtvvD.js";
2
+ import { u as E } from "./supplier-CsjbmP_P.js";
3
3
  import { computed as u } from "vue";
4
4
  function d(n) {
5
5
  const c = R.safeParse(n);
@@ -1,5 +1,5 @@
1
1
  import { computed as p, toValue as o } from "vue";
2
- import { a5 as n } from "./app-BI1fLJ8H.js";
2
+ import { a5 as n } from "./app-BIXJtvvD.js";
3
3
  import { useCoreStore as c } from "@feedmepos/mf-common";
4
4
  function g(t, i = "all") {
5
5
  const m = c();
@@ -1,7 +1,7 @@
1
1
  import { computed as T } from "vue";
2
- import { b as v, R as e, a6 as b, a7 as O, a5 as A } from "./app-BI1fLJ8H.js";
2
+ import { b as v, R as e, a6 as b, a7 as O, a5 as A } from "./app-BIXJtvvD.js";
3
3
  import { useCoreStore as C, useI18n as U } from "@feedmepos/mf-common";
4
- import { u as _ } from "./feature-B2r32qOO.js";
4
+ import { u as _ } from "./feature-BLSNLI5y.js";
5
5
  const L = O.reduce(
6
6
  (o, r) => {
7
7
  var i;
@@ -1,4 +1,4 @@
1
- import { d as se } from "./app-BI1fLJ8H.js";
1
+ import { d as se } from "./app-BIXJtvvD.js";
2
2
  import { useCoreStore as ne } from "@feedmepos/mf-common";
3
3
  const re = se((e, t) => ({
4
4
  getSubscribeUrl(s, r, a) {
@@ -2,9 +2,11 @@ import type { ChangelogCommit } from '@/api/changelog';
2
2
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
3
  commits: ChangelogCommit[];
4
4
  isLoading: boolean;
5
+ resolveName?: ((id: string) => string | undefined) | undefined;
5
6
  }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
7
  commits: ChangelogCommit[];
7
8
  isLoading: boolean;
9
+ resolveName?: ((id: string) => string | undefined) | undefined;
8
10
  }>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
11
  export default _default;
10
12
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,4 +1,4 @@
1
- import { type ChangelogCommit } from '@/api/changelog';
1
+ import { type ChangelogCommit, type ExplainSchema } from '@/api/changelog';
2
2
  export declare function useChangelog(): {
3
3
  commits: import("vue").Ref<{
4
4
  doc_id: string;
@@ -14,6 +14,32 @@ export declare function useChangelog(): {
14
14
  kind: string;
15
15
  from?: string | undefined;
16
16
  to?: string | undefined;
17
+ from_value?: {
18
+ label?: string | undefined;
19
+ value?: string | undefined;
20
+ display?: string | undefined;
21
+ list?: boolean | undefined;
22
+ bookkeeping?: boolean | undefined;
23
+ kids?: any[] | undefined;
24
+ } | undefined;
25
+ to_value?: {
26
+ label?: string | undefined;
27
+ value?: string | undefined;
28
+ display?: string | undefined;
29
+ list?: boolean | undefined;
30
+ bookkeeping?: boolean | undefined;
31
+ kids?: any[] | undefined;
32
+ } | undefined;
33
+ field?: string[] | undefined;
34
+ element?: {
35
+ trail?: string[] | undefined;
36
+ name?: string | undefined;
37
+ id?: string | undefined;
38
+ } | undefined;
39
+ display?: {
40
+ from?: string | undefined;
41
+ to?: string | undefined;
42
+ } | undefined;
17
43
  }[];
18
44
  }[], ChangelogCommit[] | {
19
45
  doc_id: string;
@@ -29,8 +55,34 @@ export declare function useChangelog(): {
29
55
  kind: string;
30
56
  from?: string | undefined;
31
57
  to?: string | undefined;
58
+ from_value?: {
59
+ label?: string | undefined;
60
+ value?: string | undefined;
61
+ display?: string | undefined;
62
+ list?: boolean | undefined;
63
+ bookkeeping?: boolean | undefined;
64
+ kids?: any[] | undefined;
65
+ } | undefined;
66
+ to_value?: {
67
+ label?: string | undefined;
68
+ value?: string | undefined;
69
+ display?: string | undefined;
70
+ list?: boolean | undefined;
71
+ bookkeeping?: boolean | undefined;
72
+ kids?: any[] | undefined;
73
+ } | undefined;
74
+ field?: string[] | undefined;
75
+ element?: {
76
+ trail?: string[] | undefined;
77
+ name?: string | undefined;
78
+ id?: string | undefined;
79
+ } | undefined;
80
+ display?: {
81
+ from?: string | undefined;
82
+ to?: string | undefined;
83
+ } | undefined;
32
84
  }[];
33
85
  }[]>;
34
86
  isLoading: import("vue").Ref<boolean, boolean>;
35
- load: (recordId: string, limit?: number) => Promise<void>;
87
+ load: (recordId: string, limit?: number, explain?: ExplainSchema) => Promise<void>;
36
88
  };
@@ -0,0 +1,97 @@
1
+ import { type ChangelogCommit } from '@/api/changelog';
2
+ export declare const INVENTORY_COMMIT_LIMIT = 1000;
3
+ /** Newest-first merge of two commit lists — ISO-8601 `at` compares lexicographically in chronological order. */
4
+ export declare function mergeCommitsNewestFirst(a: ChangelogCommit[], b: ChangelogCommit[]): ChangelogCommit[];
5
+ /**
6
+ * A record's per-entity changelog doc (Phase D-inventory:
7
+ * `${sharedDocId}/${module}/${entityId}`), to merge alongside its legacy
8
+ * shared-doc history. Most records predate the migration and have no
9
+ * per-entity doc yet, so an empty or failed fetch here is expected, not an
10
+ * error — the caller's legacy list is unaffected either way.
11
+ */
12
+ export declare function usePerEntityCommits(): {
13
+ commits: import("vue").Ref<{
14
+ doc_id: string;
15
+ id: string;
16
+ parent: string;
17
+ at: string;
18
+ authors: string[];
19
+ message?: string | undefined;
20
+ changes: {
21
+ at?: string | undefined;
22
+ actor?: string | undefined;
23
+ path: string;
24
+ kind: string;
25
+ from?: string | undefined;
26
+ to?: string | undefined;
27
+ from_value?: {
28
+ label?: string | undefined;
29
+ value?: string | undefined;
30
+ display?: string | undefined;
31
+ list?: boolean | undefined;
32
+ bookkeeping?: boolean | undefined;
33
+ kids?: any[] | undefined;
34
+ } | undefined;
35
+ to_value?: {
36
+ label?: string | undefined;
37
+ value?: string | undefined;
38
+ display?: string | undefined;
39
+ list?: boolean | undefined;
40
+ bookkeeping?: boolean | undefined;
41
+ kids?: any[] | undefined;
42
+ } | undefined;
43
+ field?: string[] | undefined;
44
+ element?: {
45
+ trail?: string[] | undefined;
46
+ name?: string | undefined;
47
+ id?: string | undefined;
48
+ } | undefined;
49
+ display?: {
50
+ from?: string | undefined;
51
+ to?: string | undefined;
52
+ } | undefined;
53
+ }[];
54
+ }[], ChangelogCommit[] | {
55
+ doc_id: string;
56
+ id: string;
57
+ parent: string;
58
+ at: string;
59
+ authors: string[];
60
+ message?: string | undefined;
61
+ changes: {
62
+ at?: string | undefined;
63
+ actor?: string | undefined;
64
+ path: string;
65
+ kind: string;
66
+ from?: string | undefined;
67
+ to?: string | undefined;
68
+ from_value?: {
69
+ label?: string | undefined;
70
+ value?: string | undefined;
71
+ display?: string | undefined;
72
+ list?: boolean | undefined;
73
+ bookkeeping?: boolean | undefined;
74
+ kids?: any[] | undefined;
75
+ } | undefined;
76
+ to_value?: {
77
+ label?: string | undefined;
78
+ value?: string | undefined;
79
+ display?: string | undefined;
80
+ list?: boolean | undefined;
81
+ bookkeeping?: boolean | undefined;
82
+ kids?: any[] | undefined;
83
+ } | undefined;
84
+ field?: string[] | undefined;
85
+ element?: {
86
+ trail?: string[] | undefined;
87
+ name?: string | undefined;
88
+ id?: string | undefined;
89
+ } | undefined;
90
+ display?: {
91
+ from?: string | undefined;
92
+ to?: string | undefined;
93
+ } | undefined;
94
+ }[];
95
+ }[]>;
96
+ load: (recordId: string) => Promise<void>;
97
+ };
@@ -0,0 +1,29 @@
1
+ import { type ChangelogCommit } from '@/api/changelog';
2
+ import { type DiffLine } from './json-line-diff';
3
+ export interface SnapshotResult {
4
+ diff: DiffLine[] | null;
5
+ conflict: boolean;
6
+ }
7
+ /**
8
+ * Per-commit whole-document diff (kit-dialect records only): state at the
9
+ * commit vs state at its parent, over the backend's changelog/state
10
+ * passthrough. Cached per commit id so re-toggling the view is free; a 409
11
+ * (pre-kit history) is cached too, so it doesn't re-fetch on every toggle.
12
+ */
13
+ export declare function useSnapshotDiff(): {
14
+ isLoading: import("vue").Ref<boolean, boolean>;
15
+ result: import("vue").Ref<{
16
+ diff: {
17
+ type: "add" | "del" | "same" | "skip";
18
+ text: string;
19
+ }[] | null;
20
+ conflict: boolean;
21
+ } | null, SnapshotResult | {
22
+ diff: {
23
+ type: "add" | "del" | "same" | "skip";
24
+ text: string;
25
+ }[] | null;
26
+ conflict: boolean;
27
+ } | null>;
28
+ load: (commit: ChangelogCommit) => Promise<void>;
29
+ };
@@ -0,0 +1,14 @@
1
+ import type { ValueNode } from '@/api/changelog';
2
+ export interface ValueTreeLine {
3
+ depth: number;
4
+ label?: string;
5
+ text?: string;
6
+ bookkeeping: boolean;
7
+ }
8
+ /**
9
+ * Flattens one ValueNode tree; i18n-key labels are translated via `t`, literals
10
+ * pass through. `resolveName` fills in a display name for id-valued leaves the
11
+ * server couldn't resolve — ids referencing entities outside the explained
12
+ * value (kit's document walk only sees the value itself).
13
+ */
14
+ export declare function flattenValueTree(node: ValueNode, t: (key: string) => string, depth?: number, resolveName?: (id: string) => string | undefined): ValueTreeLine[];
@@ -8,6 +8,8 @@ export interface InventoryBindingFormProps {
8
8
  disabled?: boolean;
9
9
  readonly?: boolean;
10
10
  enableIngredientGroup?: boolean;
11
+ /** recipe amounts may be keyed in with decimals — off keeps them whole numbers */
12
+ allowRecipeDecimal?: boolean;
11
13
  }
12
14
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InventoryBindingFormProps>, {
13
15
  modelValue: () => never[];
@@ -0,0 +1,25 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ recipeId: string;
3
+ /**
4
+ * The amount keyed in on the row, as typed — every contained amount previews as
5
+ * configured × this. Raw text rather than a number so a cleared field is not read as 0.
6
+ */
7
+ multiplier: string;
8
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ recipeId: string;
10
+ /**
11
+ * The amount keyed in on the row, as typed — every contained amount previews as
12
+ * configured × this. Raw text rather than a number so a cleared field is not read as 0.
13
+ */
14
+ multiplier: string;
15
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
16
+ export default _default;
17
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
18
+ type __VLS_TypePropsToRuntimeProps<T> = {
19
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
20
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
21
+ } : {
22
+ type: import('vue').PropType<T[K]>;
23
+ required: true;
24
+ };
25
+ };
@@ -0,0 +1,34 @@
1
+ import type { FdoDecimal } from '@feedmepos/core/entity';
2
+ export interface RecipeBreakdownNode {
3
+ key: string;
4
+ name: string;
5
+ /** configured amount, already compounded through the parent recipes above it */
6
+ amount: FdoDecimal;
7
+ /** unit the amount is keyed in, empty for a recipe or an unresolved binding */
8
+ unit: string;
9
+ depth: number;
10
+ isRecipe: boolean;
11
+ }
12
+ /** what a recipe contains, and how to label a binding — supplied by the store in the composable */
13
+ export interface RecipeBreakdownSource {
14
+ contentsOf: (recipeId: string) => FdoInventoryBinding[];
15
+ bindingName: (binding: FdoInventoryBinding) => string;
16
+ bindingUnit: (binding: FdoInventoryBinding) => string;
17
+ }
18
+ /** exact decimal multiply: integer amounts multiply, precisions add — no float drift */
19
+ export declare function multiplyDecimal(a: FdoDecimal, b: FdoDecimal): FdoDecimal;
20
+ /**
21
+ * What a contained amount works out to for the amount keyed in on the row:
22
+ * configured × input. Takes the raw text, so a row cleared mid-typing previews
23
+ * unscaled rather than flashing zeros — `+''` would read as 0.
24
+ */
25
+ export declare function previewAmount(amount: FdoDecimal, multiplier: string): string;
26
+ /** the keyed-in text as a decimal; unscaled while it is blank or not yet a number */
27
+ export declare function parseMultiplier(multiplier: string): FdoDecimal;
28
+ /**
29
+ * Flattens a recipe's binding tree depth-first, descending into nested recipes and
30
+ * multiplying each amount by the chain of recipe amounts above it.
31
+ * `visited` keeps a recipe that (transitively) contains itself from recursing forever —
32
+ * the form reports that separately as a circular-dependency error.
33
+ */
34
+ export declare function flattenRecipeTree(recipeId: string, source: RecipeBreakdownSource, depth?: number, visited?: Set<string>, factor?: FdoDecimal): RecipeBreakdownNode[];
@@ -19,6 +19,8 @@ export interface InventoryBindingFormProps {
19
19
  recipeBindingConfig?: InventoryRecipeBindingFormConfig;
20
20
  skuBindingConfig?: InventorySkuBindingFormConfig;
21
21
  enableIngredientGroup?: boolean;
22
+ /** recipe amounts may be keyed in with decimals — off keeps them whole numbers */
23
+ allowRecipeDecimal?: boolean;
22
24
  }
23
25
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InventoryBindingFormProps>, {
24
26
  modelValue: () => never[];
@@ -27,6 +27,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
27
27
  } | undefined;
28
28
  displayName: string;
29
29
  showError: boolean;
30
+ /** recipe amount may be keyed in with decimals — off keeps it a whole number */
31
+ allowRecipeDecimal?: boolean | undefined;
30
32
  }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
33
  delete: (id: string) => void;
32
34
  "update:modelValue": (value: {
@@ -83,6 +85,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
83
85
  } | undefined;
84
86
  displayName: string;
85
87
  showError: boolean;
88
+ /** recipe amount may be keyed in with decimals — off keeps it a whole number */
89
+ allowRecipeDecimal?: boolean | undefined;
86
90
  }>>> & Readonly<{
87
91
  onDelete?: ((id: string) => any) | undefined;
88
92
  "onUpdate:modelValue"?: ((value: {
@@ -1,7 +1,18 @@
1
1
  import type { ColumnDef } from '@tanstack/vue-table';
2
+ /** one resolved binding of a recipe: which nested recipe it came from, and the amount keyed in */
3
+ export type RecipeBindingCell = {
4
+ parentRecipe: string | null;
5
+ label: string;
6
+ };
7
+ /** the bindings of one nested recipe, or the recipe's own when `parentRecipe` is null */
8
+ export type RecipeBindingGroup = {
9
+ parentRecipe: string | null;
10
+ labels: string[];
11
+ };
2
12
  export type FormattedRecipe = {
3
13
  recipe: string;
4
14
  readonly ingredients: string;
15
+ readonly bindings: RecipeBindingGroup[];
5
16
  original: FdoInventoryRecipe;
6
17
  };
7
18
  export declare function useRecipeTable(): {