@feedmepos/mf-inventory-portal 1.8.0-dev.2 → 1.8.0-dev.21

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 (248) hide show
  1. package/dist/App-BxpqrT2x.js +1445 -0
  2. package/dist/{ApprovalView-RaXuWWSu.js → ApprovalView-DZBM9n1Y.js} +26 -25
  3. package/dist/{BindingsDialog-DomvXijP.js → BindingsDialog-jjHrmqY_.js} +2 -2
  4. package/dist/{BindingsPicker-DGnzxEs7.js → BindingsPicker-Dv1KwHIQ.js} +2 -2
  5. package/dist/{BindingsTable-DfG9kWrv.js → BindingsTable-Ch_TlrZu.js} +10 -10
  6. package/dist/BulkReceiveRequestPage-BVB3PNxF.js +2839 -0
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CVekIoiN.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DpHYhOmI.js} +1 -1
  8. package/dist/{ClosingDraftView-C3n66bbh.js → ClosingDraftView-DQQkWYOh.js} +748 -746
  9. package/dist/ClosingHistoryView-CXXd0Csp.js +769 -0
  10. package/dist/{ClosingTemplateView-DwGloYxn.js → ClosingTemplateView-Bf5Ivxjw.js} +22 -21
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-9eY_r8LF.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-C3Y_rwNE.js} +1 -1
  12. package/dist/{DefaultView-JC_e4xgC.js → DefaultView-Bt8ZFV10.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-BBCvI67S.js → DeliveryOrderPrintPreview-BS5ZKe1f.js} +15 -15
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-H4FWc9ga.js → EmailDialog.vue_vue_type_script_setup_true_lang-BvDFKrFF.js} +10077 -9950
  15. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-B389iY-f.js +48 -0
  16. package/dist/FeatureCapabilityGate-BAOroN-j.js +82 -0
  17. package/dist/FeaturePageGate.vue_vue_type_script_setup_true_lang-Xapa8xyy.js +189 -0
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Q8Mptiv3.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CgbvPK8u.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CE1_yyHe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DnCj1qv6.js} +2 -2
  20. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CGJi3f86.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CUb4VGOc.js} +2 -2
  21. package/dist/{FmMultiselectDialog-DCaRlBIy.js → FmMultiselectDialog-Bz8bNuK2.js} +2 -2
  22. package/dist/FmMultiselectDialog-CosTDuNE.js +123 -0
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-ClaLVtpK.js → FmUnitInput.vue_vue_type_script_setup_true_lang-3OrHiybe.js} +105 -99
  24. package/dist/ImportView-BoTmcCyn.js +1540 -0
  25. package/dist/{IngredientsView-DPj9lBTK.js → IngredientsView-VED94pGW.js} +691 -689
  26. package/dist/{IntegrationExplorerView-CO2wpUR_.js → IntegrationExplorerView-B9ZY9hG1.js} +1537 -1620
  27. package/dist/IntegrationPlatformView-Bar1zj3R.js +13385 -0
  28. package/dist/{IntegrationView-DIeZoey0.js → IntegrationView-BvzBDBGp.js} +2604 -2565
  29. package/dist/{InventoryBindingForm-Cj4_Chue.js → InventoryBindingForm-DWhXHIaL.js} +1 -1
  30. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-mZRrPywY.js +472 -0
  31. package/dist/{InventoryBindingSummary-yzGzd7jJ.js → InventoryBindingSummary-Imo2J8O2.js} +1 -1
  32. package/dist/JsonViewer.vue_vue_type_script_setup_true_lang-C_hg75l0.js +25 -0
  33. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CChCnKxa.js +79 -0
  34. package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js +19 -0
  35. package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-0F-yOcPC.js +79 -0
  36. package/dist/PremiumUpgradePage.vue_vue_type_script_setup_true_lang-DGAxPOEh.js +58 -0
  37. package/dist/ProductionRunDetailPage-KFKeWhhY.js +2317 -0
  38. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BYyiiAWb.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CobaPkUr.js} +3053 -3163
  39. package/dist/ProductionRunPage-BrXsPo-A.js +954 -0
  40. package/dist/{PublishView-CPK9NeVF.js → PublishView-_k3N44Pl.js} +3 -3
  41. package/dist/{PurchaseOrderPrintPreview-DosqWQeN.js → PurchaseOrderPrintPreview-DXVEhy-G.js} +17 -17
  42. package/dist/{ReceiveRequestView-BxSkpK2t.js → ReceiveRequestView-ByWddqiL.js} +17 -16
  43. package/dist/RecipeView-C29uNZxj.js +3272 -0
  44. package/dist/SettingsView-CyE6ZM8x.js +1005 -0
  45. package/dist/StockView-BBR404Ie.js +3003 -0
  46. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-GdGJCuc0.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Cmnk66T9.js} +1 -1
  47. package/dist/{SupplierView-BKxKoi_0.js → SupplierView-CIB5GCwp.js} +304 -301
  48. package/dist/{SurchargeView-Db4cwhZv.js → SurchargeView-DNtEbO7I.js} +7 -7
  49. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CpkF77Ow.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-ClCi5rLI.js} +2 -2
  50. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js +71 -0
  51. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C19KOLrQ.js +332 -0
  52. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DD5nMsrn.js +4953 -0
  53. package/dist/TransferTemplateView-BftwH1_W.js +2347 -0
  54. package/dist/{UnitCostHistoryView-CqcyjCCd.js → UnitCostHistoryView-CE-1joTV.js} +4 -4
  55. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DO80_8SZ.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-reJFavQF.js} +4 -4
  56. package/dist/{UnitView-BqdK1AM_.js → UnitView-T-Vo8IpV.js} +111 -106
  57. package/dist/{WarehouseView-COJM9IXM.js → WarehouseView-CzQcj5VY.js} +12 -11
  58. package/dist/{WastageTemplateView-DW3viTHN.js → WastageTemplateView-Cm5_V2zN.js} +19 -18
  59. package/dist/api/bill.d.ts +4 -2
  60. package/dist/api/bill.spec.d.ts +1 -0
  61. package/dist/api/closing.d.ts +1 -0
  62. package/dist/api/feature-flags.d.ts +4 -0
  63. package/dist/api/integration-sync-log.d.ts +0 -13
  64. package/dist/api/license.d.ts +0 -2
  65. package/dist/api/netsuite-explorer.d.ts +1 -0
  66. package/dist/api/stock.d.ts +1 -1
  67. package/dist/{app-yvK__CBL.js → app-DnOtng5V.js} +10177 -10126
  68. package/dist/app.d.ts +151 -164
  69. package/dist/app.js +1 -1
  70. package/dist/bulk-edit-simulation.helper-BZRyNbpM.js +178 -0
  71. package/dist/{closing-template-DezidSM0.js → closing-template-BiJRchG9.js} +4 -4
  72. package/dist/components/FeatureCapabilityBadge.vue.d.ts +4 -0
  73. package/dist/components/FeatureCapabilityGate.spec.d.ts +1 -0
  74. package/dist/components/FeatureCapabilityGate.vue.d.ts +5 -0
  75. package/dist/components/FeatureGateLayout.vue.d.ts +11 -0
  76. package/dist/components/FeaturePageGate.spec.d.ts +1 -0
  77. package/dist/components/FeaturePageGate.vue.d.ts +34 -0
  78. package/dist/components/FmAdminCollapsiblePanel.vue.d.ts +1 -1
  79. package/dist/components/FmDroppableField.vue.d.ts +1 -1
  80. package/dist/components/FmInventoryTableToolbar.vue.d.ts +2 -2
  81. package/dist/components/FmUnitInputProps.d.ts +1 -0
  82. package/dist/components/FmUnitInputRules.d.ts +1 -1
  83. package/dist/components/HrmPermissionGuard.vue.d.ts +1 -1
  84. package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
  85. package/dist/{views/ingredient-group/IngredientGroupView.vue.d.ts → components/PremiumUpgradePage.vue.d.ts} +0 -1
  86. package/dist/components/TemplatePublishDialog.d.ts +2 -0
  87. package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
  88. package/dist/composable/defineApi.d.ts +1 -1
  89. package/dist/{date2-2XjepIqc.js → date2-Bzlk0lSj.js} +1 -1
  90. package/dist/{dayjs.min-CNp5DLBB.js → dayjs.min-B8gqMYa7.js} +1 -1
  91. package/dist/{decimal-Z7oJdGk8.js → decimal-utE08Cjv.js} +2 -2
  92. package/dist/{defineDeepModel-CMxJn_H2.js → defineDeepModel-D_tKNP-n.js} +5 -5
  93. package/dist/{duplicate-template-BetV5oy_.js → duplicate-template-lCi99jVD.js} +1 -1
  94. package/dist/{feature-CkWaZ-5K.js → feature-Zeyz4pJe.js} +2089 -2854
  95. package/dist/feature-flags/core.d.ts +4 -2
  96. package/dist/feature-flags/portal-feature-catalog.d.ts +1 -6
  97. package/dist/feature-flags/portal-feature-catalog.spec.d.ts +1 -0
  98. package/dist/feature-flags/vue.d.ts +24 -1
  99. package/dist/feature-flags/vue.spec.d.ts +1 -0
  100. package/dist/{format-time-from-id-DatSI9uD.js → format-time-from-id-v_KvI4jM.js} +1 -1
  101. package/dist/{format-unit-display-DM5We5cx.js → format-unit-display-C8oexlpM.js} +209 -208
  102. package/dist/helper/country.spec.d.ts +1 -0
  103. package/dist/helper/menu-usage-module.d.ts +2 -1
  104. package/dist/helper/number.d.ts +5 -1
  105. package/dist/helper/rules.d.ts +1 -1
  106. package/dist/{id-to-date-Dxw2jKhy.js → id-to-date-Doi1vn9Q.js} +1 -1
  107. package/dist/{import-export.helper-BOmADwUw.js → import-export.helper-DyRPa4wa.js} +17 -17
  108. package/dist/{index-CIH9NCvs.js → index-B-SVjo8N.js} +1 -1
  109. package/dist/{index-ClYgfwW7.js → index-Bl8qrC1m.js} +2234 -2163
  110. package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
  111. package/dist/{index-7fz5sGDO.js → index-DZ9i-1uy.js} +3 -3
  112. package/dist/index-eGvSlWMU.js +1892 -0
  113. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
  114. package/dist/{lz-string-CCsc2X7t.js → lz-string-pPNhTzCj.js} +1 -1
  115. package/dist/menu-usage-module-Bq_KLsO4.js +74 -0
  116. package/dist/{netsuite-COumFXC2.js → netsuite-C5s0JXRA.js} +254 -263
  117. package/dist/netsuite-explorer-BF-bujxD.js +79 -0
  118. package/dist/{predefined-templates-Bw9A9LNA.js → predefined-templates-C6hmqqhm.js} +1 -1
  119. package/dist/production-run-list-DR1WsaBR.js +61 -0
  120. package/dist/{purchase-order-template-BaZjdGq8.js → purchase-order-template-C0XlITpK.js} +1 -1
  121. package/dist/{recalculationUtils-t32wAurN.js → recalculationUtils-CnzCEyIJ.js} +1 -1
  122. package/dist/router/name.d.ts +2 -2
  123. package/dist/{row-action.enum-BDeudY4d.js → row-action.enum-Ci5mHFdS.js} +1 -1
  124. package/dist/rules-rAD4INHX.js +243 -0
  125. package/dist/{stock-B59sfN28.js → stock-CukGlv0u.js} +1 -1
  126. package/dist/stock-DUQYl3xe.js +78 -0
  127. package/dist/stores/feature.d.ts +41 -11
  128. package/dist/stores/feature.load-state.spec.d.ts +1 -0
  129. package/dist/stores/inventory.d.ts +0 -47
  130. package/dist/stores/inventory.no-location.spec.d.ts +1 -0
  131. package/dist/stores/supplier.d.ts +1 -1
  132. package/dist/stores/warehouse.d.ts +1 -1
  133. package/dist/style.css +1 -1
  134. package/dist/{supplier-DnbLJ_cS.js → supplier-CDPdi2B5.js} +2 -2
  135. package/dist/{surcharge-C1uE3uQa.js → surcharge-XABFccMt.js} +1 -1
  136. package/dist/tsconfig.app.tsbuildinfo +1 -1
  137. package/dist/{uom-rules-DjfyrFHJ.js → uom-rules-BbNTM-Xw.js} +1 -1
  138. package/dist/{use-ingredient-select-dialog-7A7fWyEH.js → use-ingredient-select-dialog-CxrFXfoM.js} +2 -2
  139. package/dist/use-inventory-binding-dialog-BZpguHE1.js +113 -0
  140. package/dist/{use-template-enabled-locations-C-Hqqgzt.js → use-template-enabled-locations-B9n-uc36.js} +2 -2
  141. package/dist/{use-transfer-locations-CqsXvOI2.js → use-transfer-locations-z78M6XgR.js} +14 -14
  142. package/dist/{useHrmPermission-BzwD3Ctc.js → useHrmPermission-CfMWeFGZ.js} +1 -1
  143. package/dist/{useNavigationMenu-PrZg9HS7.js → useNavigationMenu-B6dCSflb.js} +111 -117
  144. package/dist/{useSseClient-FCyLWq8k.js → useSseClient-ICUObHUB.js} +1 -1
  145. package/dist/views/changelog/composables/use-snapshot-diff.d.ts +2 -2
  146. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1 -1
  147. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
  148. package/dist/views/import/helper/submit-rows.d.ts +1 -1
  149. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
  150. package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
  151. package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
  152. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
  153. package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
  154. package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +3 -1
  155. package/dist/views/{ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts → integration/IntegrationPlatformView.vue.d.ts} +11 -24
  156. package/dist/views/integration/components/Synergy/importFn.spec.d.ts +1 -0
  157. package/dist/views/integration/components/Xilnex/importFn.spec.d.ts +1 -0
  158. package/dist/views/integration/helper/opening-balance.d.ts +22 -0
  159. package/dist/views/integration/helper/opening-balance.spec.d.ts +1 -0
  160. package/dist/views/production-run/ProductionRunDetailPage.spec.d.ts +1 -0
  161. package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → production-run/ProductionRunDetailPage.vue.d.ts} +2 -2
  162. package/dist/views/production-run/ProductionRunPage.vue.d.ts +2 -0
  163. package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +2 -2
  164. package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +4 -4
  165. package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +19 -9
  166. package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +4 -4
  167. package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +4 -4
  168. package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +14 -14
  169. package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +4 -4
  170. package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +4 -4
  171. package/dist/views/production-run/features/planning/ProductionRunPlanner.vue.d.ts +1 -1
  172. package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +6 -6
  173. package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -1
  174. package/dist/views/production-run/shared/model/production-run-list.d.ts +1 -1
  175. package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +1 -1
  176. package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +1 -1
  177. package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +2 -2
  178. package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +3 -3
  179. package/dist/views/receive-request/composables/netsuite-order-label.d.ts +11 -0
  180. package/dist/views/receive-request/composables/netsuite-order-label.spec.d.ts +1 -0
  181. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
  182. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +9 -9
  183. package/dist/views/receive-request/composables/use-receive-request-form.spec.d.ts +1 -0
  184. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
  185. package/dist/views/receive-request/import/export.spec.d.ts +1 -0
  186. package/dist/views/receive-request-bulk/BulkReceiveRequestPage.vue.d.ts +2 -0
  187. package/dist/views/receive-request-bulk/components/CreateTransferWizard.spec.d.ts +1 -0
  188. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +20 -20
  189. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.readiness.spec.d.ts +1 -0
  190. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +2 -2
  191. package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
  192. package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
  193. package/dist/views/recipe/helper/import-recipe.d.ts +32 -2
  194. package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
  195. package/dist/views/settings/PlanLicenseDisplay.spec.d.ts +1 -0
  196. package/dist/views/settings/PlanLicenseDisplay.vue.d.ts +2 -0
  197. package/dist/views/stock/components/StockRecordCard.spec.d.ts +1 -0
  198. package/dist/views/stock/components/StockRecordCard.vue.d.ts +19 -865
  199. package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
  200. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.spec.d.ts +1 -0
  201. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.vue.d.ts +36 -0
  202. package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
  203. package/dist/views/stock/composables/use-last-closing-summary.d.ts +4 -0
  204. package/dist/views/stock/composables/use-last-closing-summary.spec.d.ts +1 -0
  205. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
  206. package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
  207. package/dist/views/unit/composables/use-unit-form.spec.d.ts +1 -0
  208. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
  209. package/dist/vue-DBxqzbt5.js +295 -0
  210. package/dist/{vue-i18n-C34f-Tph.js → vue-i18n-CdbY8MsR.js} +539 -539
  211. package/dist/{xlsx.util-X4amwe_k.js → xlsx.util-CD5NablT.js} +2 -2
  212. package/package.json +71 -66
  213. package/dist/App-DVHgBTHP.js +0 -1499
  214. package/dist/BulkReceiveRequestView-DxHWrfbi.js +0 -2656
  215. package/dist/ClosingHistoryView-kdpYGy1Y.js +0 -761
  216. package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-5Cc08Svt.js +0 -58
  217. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js +0 -61
  218. package/dist/FmMultiselectDialog-yVPY5aBV.js +0 -77
  219. package/dist/ImportView-DQrVMzxN.js +0 -1302
  220. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-7lT5UZc8.js +0 -51
  221. package/dist/IngredientGroupView-BMUnEaY7.js +0 -1000
  222. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CaBOK7NC.js +0 -563
  223. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DzzTPdyF.js +0 -72
  224. package/dist/ProductionRunDetailView-Cw-ecaey.js +0 -2312
  225. package/dist/ProductionRunView-C11eseXQ.js +0 -930
  226. package/dist/RecipeView-oHDWsT0P.js +0 -3624
  227. package/dist/SettingsView-QlUNwFhM.js +0 -983
  228. package/dist/StockView-a8LbVZ_7.js +0 -2614
  229. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
  230. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CCCj4WVF.js +0 -299
  231. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CFNPXqt5.js +0 -4796
  232. package/dist/TransferTemplateView-CzwxOBMQ.js +0 -2326
  233. package/dist/menu-usage-module-BdjYEk3s.js +0 -57
  234. package/dist/number-gSLvxNqA.js +0 -138
  235. package/dist/portal-feature-catalog-yGIESKTc.js +0 -246
  236. package/dist/random-CSbEbElR.js +0 -10
  237. package/dist/rules-C1btu0Md.js +0 -98
  238. package/dist/stock-BF86TMW0.js +0 -75
  239. package/dist/use-inventory-binding-dialog-Cc1tjTfV.js +0 -152
  240. package/dist/usePromise-CbVUCxhj.js +0 -29
  241. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
  242. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
  243. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
  244. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
  245. package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
  246. package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
  247. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
  248. package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
@@ -0,0 +1,1005 @@
1
+ import { defineComponent as ee, ref as k, computed as A, watch as J, resolveComponent as L, createElementBlock as r, openBlock as o, createElementVNode as l, toDisplayString as C, Fragment as E, renderList as Y, createBlock as z, createCommentVNode as Z, createVNode as p, nextTick as xe, createSlots as he, withCtx as P, normalizeClass as ue, unref as w, withModifiers as ke, h as B, Teleport as we } from "vue";
2
+ import { _ as Fe } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
3
+ import { B as G, g as Te, r as Se, s as $e, u as Ce, a as ae, b as De, c as Be, d as be, e as Ve, f as Ie } from "./predefined-templates-C6hmqqhm.js";
4
+ import { useSnackbar as Pe, components as X } from "@feedmepos/ui-library";
5
+ import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import { H as se, J as Oe, u as Le } from "./app-DnOtng5V.js";
7
+ import { useCoreStore as ye, useI18n as Ee } from "@feedmepos/mf-common";
8
+ import "./dayjs.min-B8gqMYa7.js";
9
+ import { u as _e, a as Ue, I as Ae } from "./feature-Zeyz4pJe.js";
10
+ import { _ as He, D as Ne } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-B389iY-f.js";
11
+ import { _ as Me } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DpHYhOmI.js";
12
+ import { _ as Re } from "./PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js";
13
+ import { a as je } from "./vue-DBxqzbt5.js";
14
+ const Ke = { class: "p-3" }, qe = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ge = { class: "flex flex-col gap-3" }, Ye = {
15
+ key: 0,
16
+ class: "flex items-center justify-between py-1"
17
+ }, Je = { class: "text-[13px] text-gray-600" }, We = { class: "text-[13px] text-gray-600" }, Qe = ["value", "rows", "placeholder", "onInput"], Xe = {
18
+ key: 5,
19
+ class: "flex items-center justify-between py-1"
20
+ }, Ze = { class: "text-[13px] text-gray-600" }, et = ["value", "onInput"], tt = /* @__PURE__ */ ee({
21
+ __name: "BlockConfigPanel",
22
+ props: {
23
+ block: {}
24
+ },
25
+ emits: ["update"],
26
+ setup(H, { emit: v }) {
27
+ const T = H, x = v;
28
+ function S(c) {
29
+ var b;
30
+ if ((b = c.config) != null && b.configFields && Array.isArray(c.config.configFields)) {
31
+ const _ = c.config.configFields.map((d) => ({ ...d })), h = new Set(_.map((d) => d.key)), a = G[c.tag], $ = a ? a.initialConfigFields().filter((d) => !h.has(d.key)) : [];
32
+ return [..._, ...$];
33
+ }
34
+ const u = G[c.tag];
35
+ return u ? u.initialConfigFields() : [];
36
+ }
37
+ const m = k(S(T.block)), O = A(() => {
38
+ const c = G[T.block.tag];
39
+ return (c == null ? void 0 : c.label) ?? T.block.tag;
40
+ });
41
+ J(
42
+ () => T.block,
43
+ (c) => {
44
+ m.value = S(c);
45
+ },
46
+ { deep: !0 }
47
+ );
48
+ function f(c, u) {
49
+ const b = m.value[c];
50
+ b && (b.value = u, g());
51
+ }
52
+ function g() {
53
+ x("update", {
54
+ ...T.block.config || {},
55
+ configFields: m.value.map((c) => ({ ...c }))
56
+ });
57
+ }
58
+ return (c, u) => {
59
+ const b = L("FmSwitch"), _ = L("FmTextField"), h = L("FmSelect");
60
+ return o(), r("div", Ke, [
61
+ l("div", qe, C(O.value) + " Settings ", 1),
62
+ l("div", Ge, [
63
+ (o(!0), r(E, null, Y(m.value, (a, $) => (o(), r("div", {
64
+ key: a.key
65
+ }, [
66
+ a.type === "toggle" ? (o(), r("div", Ye, [
67
+ l("label", Je, C(a.label), 1),
68
+ p(b, {
69
+ "model-value": a.value,
70
+ "onUpdate:modelValue": (d) => f($, d)
71
+ }, null, 8, ["model-value", "onUpdate:modelValue"])
72
+ ])) : a.type === "text" ? (o(), z(_, {
73
+ key: 1,
74
+ label: a.label,
75
+ "model-value": a.value,
76
+ placeholder: a.placeholder,
77
+ "onUpdate:modelValue": (d) => f($, d)
78
+ }, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : a.type === "textarea" ? (o(), r(E, { key: 2 }, [
79
+ l("div", We, C(a.label), 1),
80
+ l("textarea", {
81
+ class: "w-full font-mono text-[13px] p-2 border border-gray-300 rounded resize-y box-border focus:outline-none focus:border-blue-600",
82
+ value: a.value,
83
+ rows: a.rows ?? 8,
84
+ placeholder: a.placeholder,
85
+ onInput: (d) => f($, d.target.value)
86
+ }, null, 40, Qe)
87
+ ], 64)) : a.type === "select" ? (o(), z(h, {
88
+ key: 3,
89
+ label: a.label,
90
+ "model-value": a.value,
91
+ items: a.options || [],
92
+ "item-label": "label",
93
+ "item-value": "value",
94
+ "onUpdate:modelValue": (d) => f($, d)
95
+ }, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : a.type === "number" ? (o(), z(_, {
96
+ key: 4,
97
+ label: a.label,
98
+ type: "number",
99
+ "model-value": String(a.value),
100
+ "onUpdate:modelValue": (d) => f($, Number(d))
101
+ }, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : a.type === "color" ? (o(), r("div", Xe, [
102
+ l("label", Ze, C(a.label), 1),
103
+ l("input", {
104
+ type: "color",
105
+ value: a.value,
106
+ class: "color-input w-9 h-7 p-0 border border-gray-300 rounded cursor-pointer bg-transparent",
107
+ onInput: (d) => f($, d.target.value)
108
+ }, null, 40, et)
109
+ ])) : Z("", !0)
110
+ ]))), 128))
111
+ ])
112
+ ]);
113
+ };
114
+ }
115
+ }), lt = /* @__PURE__ */ ze(tt, [["__scopeId", "data-v-840687bf"]]), ot = { class: "h-full flex flex-col" }, at = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, st = /* @__PURE__ */ ee({
116
+ __name: "TemplatePreview",
117
+ props: {
118
+ blocks: {},
119
+ previewData: {},
120
+ selectedBlockId: {},
121
+ templateType: {}
122
+ },
123
+ setup(H) {
124
+ const v = H, T = k(null);
125
+ let x = null;
126
+ function S() {
127
+ return !x && T.value && (x = T.value.attachShadow({ mode: "open" })), x;
128
+ }
129
+ const m = A(() => v.previewData ?? Te(v.templateType));
130
+ J(
131
+ () => [v.blocks, m.value, T.value],
132
+ () => {
133
+ const f = S();
134
+ if (f) {
135
+ try {
136
+ const g = Se(v.blocks, m.value), c = $e(g);
137
+ f.innerHTML = `
138
+ <style>
139
+ :host { display: block; }
140
+ .preview-scale-wrapper {
141
+ transform-origin: top left;
142
+ transform: scale(0.75);
143
+ width: 133.33%;
144
+ }
145
+ .preview-content {
146
+ max-width: 800px;
147
+ margin: auto;
148
+ padding: 30px;
149
+ border: 1px solid #eee;
150
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
151
+ background: white;
152
+ font-size: 16px;
153
+ line-height: 1.5;
154
+ font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
155
+ color: #555;
156
+ }
157
+ </style>
158
+ <div class="preview-scale-wrapper">
159
+ <div class="preview-content">${c}</div>
160
+ </div>
161
+ `;
162
+ } catch (g) {
163
+ f.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${g}</div>`;
164
+ }
165
+ xe(() => O(v.selectedBlockId));
166
+ }
167
+ },
168
+ { deep: !0, immediate: !0 }
169
+ ), J(
170
+ () => v.selectedBlockId,
171
+ (f) => O(f)
172
+ );
173
+ function O(f) {
174
+ if (!x || (x.querySelectorAll("[data-block-id].highlight").forEach((c) => {
175
+ c.classList.remove("highlight");
176
+ }), !f)) return;
177
+ const g = x.querySelector(`[data-block-id="${f}"]`);
178
+ g && (g.classList.add("highlight"), g.scrollIntoView({ behavior: "smooth", block: "nearest" }));
179
+ }
180
+ return (f, g) => (o(), r("div", ot, [
181
+ g[0] || (g[0] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
182
+ l("div", at, [
183
+ l("div", {
184
+ ref_key: "shadowHost",
185
+ ref: T
186
+ }, null, 512)
187
+ ])
188
+ ]));
189
+ }
190
+ }), nt = { class: "flex items-center gap-2 text-base font-semibold" }, rt = { key: 1 }, it = { key: 2 }, ut = {
191
+ key: 0,
192
+ class: "p-6"
193
+ }, ct = {
194
+ key: 0,
195
+ class: "flex justify-center items-center h-40 text-gray-400"
196
+ }, dt = {
197
+ key: 1,
198
+ class: "grid grid-cols-2 gap-8"
199
+ }, pt = ["onClick"], mt = { class: "flex items-center justify-center w-12 h-12 rounded-xl bg-gray-100 text-gray-500 group-hover:bg-blue-100 group-hover:text-blue-600 transition-colors" }, vt = { class: "text-center" }, ft = { class: "text-sm font-semibold text-gray-700 group-hover:text-blue-700" }, yt = { class: "text-xs text-gray-400 mt-1" }, gt = {
200
+ key: 0,
201
+ class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-green-600 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full"
202
+ }, bt = {
203
+ key: 1,
204
+ class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-gray-400 bg-gray-100 px-2 py-0.5 rounded-full"
205
+ }, _t = {
206
+ key: 1,
207
+ class: "flex justify-center items-center h-[400px] text-gray-400"
208
+ }, xt = {
209
+ key: 2,
210
+ class: "flex h-[calc(100vh-120px)] border-t border-gray-200"
211
+ }, ht = { class: "w-[280px] border-r border-gray-200 overflow-y-auto shrink-0" }, kt = { class: "px-3 pt-3 pb-2" }, wt = { class: "flex flex-col" }, Ft = ["onClick"], Tt = { class: "border-y border-gray-100" }, St = ["onDragstart", "onDragover", "onDrop", "onClick"], $t = { class: "flex-1" }, Ct = { class: "flex gap-1 opacity-50 hover:opacity-100" }, Dt = {
212
+ key: 0,
213
+ class: "py-6 px-4 text-center text-gray-400 text-[13px]"
214
+ }, Bt = {
215
+ key: 0,
216
+ class: "border-t border-gray-200"
217
+ }, Vt = {
218
+ key: 1,
219
+ class: "flex items-center justify-center text-gray-400 text-[13px] py-8"
220
+ }, It = { class: "p-3 border-t border-gray-200" }, Pt = { class: "flex-1 overflow-hidden" }, zt = { class: "ml-auto flex gap-2" }, Ot = { class: "p-4" }, Lt = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Et = { class: "p-4" }, Ut = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, At = /* @__PURE__ */ ee({
221
+ __name: "PrintTemplateEditorDialog",
222
+ props: {
223
+ modelValue: { type: Boolean }
224
+ },
225
+ emits: ["update:modelValue", "saved"],
226
+ setup(H, { emit: v }) {
227
+ const T = H, x = v, S = Ce(), m = Pe(), O = ye(), f = A({
228
+ get: () => T.modelValue,
229
+ set: (n) => x("update:modelValue", n)
230
+ }), g = k(!1), c = k(!1), u = k(ae()), b = k(null), _ = k(se.Enum.purchaseOrder), h = k("Purchase Order Template"), a = k(null), $ = k(!1), d = k(!1), V = k("select-type"), W = [
231
+ {
232
+ label: "Purchase Order",
233
+ value: se.Enum.purchaseOrder,
234
+ icon: "receipt_long",
235
+ description: "Customize the layout for purchase order printouts"
236
+ },
237
+ {
238
+ label: "Transfer Order",
239
+ value: se.Enum.transferOrder,
240
+ icon: "swap_horiz",
241
+ description: "Customize the layout for transfer order printouts"
242
+ },
243
+ {
244
+ label: "Goods Received Note",
245
+ value: se.Enum.goodsReceivedNote,
246
+ icon: "fact_check",
247
+ description: "Customize the layout for GRN printouts"
248
+ },
249
+ {
250
+ label: "Delivery Order",
251
+ value: se.Enum.deliveryOrder,
252
+ icon: "local_shipping",
253
+ description: "Customize the layout for delivery order printouts"
254
+ }
255
+ ], j = k(/* @__PURE__ */ new Set()), Q = A(
256
+ () => u.value.find((n) => n.id === b.value) ?? null
257
+ ), U = k(null), N = k(null);
258
+ J(f, async (n) => {
259
+ if (n) {
260
+ V.value = "select-type", g.value = !0;
261
+ try {
262
+ const e = await S.browse();
263
+ j.value = new Set(e.map((y) => y.type));
264
+ } catch {
265
+ } finally {
266
+ g.value = !1;
267
+ }
268
+ }
269
+ }), J(_, async () => {
270
+ b.value = null, await le();
271
+ });
272
+ async function ne(n) {
273
+ _.value = n, await le(), V.value = "editor";
274
+ }
275
+ function te() {
276
+ return {
277
+ purchaseOrder: "Purchase Order Template",
278
+ transferOrder: "Transfer Order Template",
279
+ goodsReceivedNote: "Goods Received Note Template",
280
+ deliveryOrder: "Delivery Order Template"
281
+ }[_.value] ?? "Purchase Order Template";
282
+ }
283
+ async function le() {
284
+ g.value = !0;
285
+ try {
286
+ const n = await S.browse();
287
+ j.value = new Set(n.map((y) => y.type));
288
+ const e = n.find((y) => y.type === _.value);
289
+ e ? (a.value = e._id, h.value = e.name, u.value = e.blocks.map((y) => ({ ...y }))) : (a.value = null, u.value = ae(), h.value = te());
290
+ } catch {
291
+ u.value = ae(), h.value = te();
292
+ } finally {
293
+ g.value = !1;
294
+ }
295
+ }
296
+ function ce(n) {
297
+ const e = {
298
+ id: Be(),
299
+ tag: n,
300
+ config: De(n)
301
+ };
302
+ u.value.push(e), b.value = e.id;
303
+ }
304
+ function de(n) {
305
+ const e = u.value.findIndex((y) => y.id === n);
306
+ e >= 0 && (u.value.splice(e, 1), b.value === n && (b.value = null));
307
+ }
308
+ function re(n) {
309
+ const e = u.value.find((y) => y.id === b.value);
310
+ if (e) {
311
+ const y = n.configFields || [], oe = be(e.tag);
312
+ e.config = { configFields: y, templateHtml: oe };
313
+ }
314
+ }
315
+ function pe(n) {
316
+ U.value = n;
317
+ }
318
+ function me(n, e) {
319
+ n.preventDefault(), N.value = e;
320
+ }
321
+ function ve() {
322
+ N.value = null;
323
+ }
324
+ function fe(n) {
325
+ if (U.value === null || U.value === n) {
326
+ U.value = null, N.value = null;
327
+ return;
328
+ }
329
+ const e = u.value.splice(U.value, 1)[0];
330
+ u.value.splice(n, 0, e), U.value = null, N.value = null;
331
+ }
332
+ function t() {
333
+ U.value = null, N.value = null;
334
+ }
335
+ async function s() {
336
+ var n;
337
+ c.value = !0;
338
+ try {
339
+ const e = (n = O.currentBusiness.value) == null ? void 0 : n._id;
340
+ if (!e)
341
+ throw new Error("Business ID is missing. Please select a business first.");
342
+ const y = u.value.map((i) => {
343
+ var ge;
344
+ const I = ((ge = i.config) == null ? void 0 : ge.configFields) || [], q = be(i.tag, I);
345
+ return {
346
+ ...i,
347
+ config: { configFields: I, templateHtml: q }
348
+ };
349
+ }), oe = Ve(y), M = {
350
+ name: h.value,
351
+ type: _.value,
352
+ blocks: oe,
353
+ businessId: e,
354
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
355
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
356
+ };
357
+ let R;
358
+ a.value ? R = await S.update(a.value, {
359
+ _id: a.value,
360
+ ...M
361
+ }) : (R = await S.create(M), a.value = R._id), j.value.add(_.value), d.value = !1, m == null || m.open({
362
+ title: "Success",
363
+ message: "Print template saved",
364
+ type: "success"
365
+ }), x("saved", R), f.value = !1;
366
+ } catch (e) {
367
+ m == null || m.open({
368
+ title: "Error",
369
+ message: (e == null ? void 0 : e.message) || "Failed to save template",
370
+ type: "error"
371
+ });
372
+ } finally {
373
+ c.value = !1;
374
+ }
375
+ }
376
+ async function D() {
377
+ if (a.value) {
378
+ c.value = !0;
379
+ try {
380
+ await S.delete(a.value), a.value = null, u.value = ae(), h.value = te(), j.value.delete(_.value), $.value = !1, m == null || m.open({
381
+ title: "Deleted",
382
+ message: "Print template deleted. Default layout will be used.",
383
+ type: "success"
384
+ }), x("saved", null), f.value = !1;
385
+ } catch (n) {
386
+ m == null || m.open({
387
+ title: "Error",
388
+ message: (n == null ? void 0 : n.message) || "Failed to delete template",
389
+ type: "error"
390
+ });
391
+ } finally {
392
+ c.value = !1;
393
+ }
394
+ }
395
+ }
396
+ function K() {
397
+ u.value = ae(), b.value = null;
398
+ }
399
+ function F(n) {
400
+ var e;
401
+ return ((e = G[n]) == null ? void 0 : e.label) ?? n;
402
+ }
403
+ function ie(n) {
404
+ var e;
405
+ return ((e = G[n]) == null ? void 0 : e.icon) ?? "widgets";
406
+ }
407
+ return (n, e) => {
408
+ const y = L("FmIcon"), oe = L("FmTextField"), M = L("FmButton"), R = L("FmDialog");
409
+ return o(), r(E, null, [
410
+ p(R, {
411
+ modelValue: f.value,
412
+ "onUpdate:modelValue": e[4] || (e[4] = (i) => f.value = i),
413
+ overlay: !0,
414
+ "close-button": "",
415
+ "max-width": "98vw",
416
+ "max-height": "98vh"
417
+ }, he({
418
+ "dialog-header": P(() => {
419
+ var i;
420
+ return [
421
+ l("div", nt, [
422
+ V.value === "editor" ? (o(), r("button", {
423
+ key: 0,
424
+ class: "flex items-center justify-center w-7 h-7 rounded hover:bg-gray-100 transition-colors text-gray-500",
425
+ onClick: e[0] || (e[0] = (I) => V.value = "select-type")
426
+ }, [
427
+ p(y, {
428
+ name: "arrow_back",
429
+ size: "sm"
430
+ })
431
+ ])) : Z("", !0),
432
+ V.value === "select-type" ? (o(), r("span", rt, "Print Template Editor")) : (o(), r("span", it, C((i = W.find((I) => I.value === _.value)) == null ? void 0 : i.label) + " Template", 1))
433
+ ])
434
+ ];
435
+ }),
436
+ default: P(() => [
437
+ V.value === "select-type" ? (o(), r("div", ut, [
438
+ e[7] || (e[7] = l("p", { class: "text-sm text-gray-500 mb-5" }, " Select a template type to customize its print layout. ", -1)),
439
+ g.value ? (o(), r("div", ct, " Loading... ")) : (o(), r("div", dt, [
440
+ (o(), r(E, null, Y(W, (i) => l("div", {
441
+ key: i.value,
442
+ class: ue(["group relative flex flex-col items-center gap-3 p-6 rounded-xl border-2 border-gray-200 cursor-pointer transition-all hover:border-blue-400 hover:shadow-md", {
443
+ "border-blue-500 bg-blue-50/50 shadow-md": _.value === i.value && V.value === "select-type"
444
+ }]),
445
+ onClick: (I) => ne(i.value)
446
+ }, [
447
+ l("div", mt, [
448
+ p(y, {
449
+ name: i.icon,
450
+ size: "sm"
451
+ }, null, 8, ["name"])
452
+ ]),
453
+ l("div", vt, [
454
+ l("div", ft, C(i.label), 1),
455
+ l("div", yt, C(i.description), 1)
456
+ ]),
457
+ j.value.has(i.value) ? (o(), r("span", gt, "Customized")) : (o(), r("span", bt, "Default"))
458
+ ], 10, pt)), 64))
459
+ ]))
460
+ ])) : g.value ? (o(), r("div", _t, e[8] || (e[8] = [
461
+ l("div", null, "Loading template...", -1)
462
+ ]))) : (o(), r("div", xt, [
463
+ l("div", ht, [
464
+ l("div", kt, [
465
+ p(oe, {
466
+ modelValue: h.value,
467
+ "onUpdate:modelValue": e[1] || (e[1] = (i) => h.value = i),
468
+ placeholder: "Template name",
469
+ label: "Template Name"
470
+ }, null, 8, ["modelValue"])
471
+ ]),
472
+ e[9] || (e[9] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2" }, " Add Blocks ", -1)),
473
+ l("div", wt, [
474
+ (o(!0), r(E, null, Y(w(Oe).Values, (i) => (o(), r("div", {
475
+ key: i,
476
+ class: "group flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 transition-colors hover:bg-gray-100",
477
+ onClick: (I) => ce(i)
478
+ }, [
479
+ p(y, {
480
+ name: w(G)[i].icon,
481
+ size: "sm"
482
+ }, null, 8, ["name"]),
483
+ l("span", null, C(w(G)[i].label), 1),
484
+ p(y, {
485
+ name: "add",
486
+ size: "sm",
487
+ class: "ml-auto opacity-0 text-blue-600 group-hover:opacity-100"
488
+ })
489
+ ], 8, Ft))), 128))
490
+ ]),
491
+ e[10] || (e[10] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 mt-2" }, " Block Order ", -1)),
492
+ l("div", Tt, [
493
+ (o(!0), r(E, null, Y(u.value, (i, I) => (o(), r("div", {
494
+ key: i.id,
495
+ class: ue(["flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 border-b border-gray-100 transition-colors hover:bg-gray-100", {
496
+ "bg-blue-50 border-l-[3px] border-l-blue-600": i.id === b.value,
497
+ "border-t-2 border-t-blue-600": N.value === I
498
+ }]),
499
+ draggable: "true",
500
+ onDragstart: (q) => pe(I),
501
+ onDragover: (q) => me(q, I),
502
+ onDragleave: ve,
503
+ onDrop: (q) => fe(I),
504
+ onDragend: t,
505
+ onClick: (q) => b.value = i.id
506
+ }, [
507
+ p(y, {
508
+ name: "drag_indicator",
509
+ size: "sm",
510
+ class: "cursor-grab text-gray-300"
511
+ }),
512
+ p(y, {
513
+ name: ie(i.tag),
514
+ size: "sm"
515
+ }, null, 8, ["name"]),
516
+ l("span", $t, C(F(i.tag)), 1),
517
+ l("div", Ct, [
518
+ p(y, {
519
+ name: "delete",
520
+ size: "sm",
521
+ class: "cursor-pointer text-gray-400 hover:text-red-500",
522
+ onClick: ke((q) => de(i.id), ["stop"])
523
+ }, null, 8, ["onClick"])
524
+ ])
525
+ ], 42, St))), 128)),
526
+ u.value.length === 0 ? (o(), r("div", Dt, " Click a block above to add it ")) : Z("", !0)
527
+ ]),
528
+ Q.value ? (o(), r("div", Bt, [
529
+ (o(), z(lt, {
530
+ key: Q.value.id,
531
+ block: Q.value,
532
+ onUpdate: re
533
+ }, null, 8, ["block"]))
534
+ ])) : (o(), r("div", Vt, " Select a block to configure it ")),
535
+ l("div", It, [
536
+ p(M, {
537
+ label: "Reset to Default",
538
+ variant: "plain",
539
+ size: "md",
540
+ onClick: K
541
+ })
542
+ ])
543
+ ]),
544
+ l("div", Pt, [
545
+ p(st, {
546
+ blocks: u.value,
547
+ "selected-block-id": b.value,
548
+ "template-type": _.value
549
+ }, null, 8, ["blocks", "selected-block-id", "template-type"])
550
+ ])
551
+ ]))
552
+ ]),
553
+ _: 2
554
+ }, [
555
+ V.value === "editor" ? {
556
+ name: "dialog-footer",
557
+ fn: P(() => [
558
+ l("div", zt, [
559
+ a.value ? (o(), z(M, {
560
+ key: 0,
561
+ label: "Delete Template",
562
+ variant: "destructive",
563
+ size: "md",
564
+ onClick: e[2] || (e[2] = (i) => $.value = !0)
565
+ })) : Z("", !0),
566
+ p(M, {
567
+ label: "Save Template",
568
+ variant: "primary",
569
+ size: "md",
570
+ onClick: e[3] || (e[3] = (i) => d.value = !0)
571
+ })
572
+ ])
573
+ ]),
574
+ key: "0"
575
+ } : void 0
576
+ ]), 1032, ["modelValue"]),
577
+ p(R, {
578
+ modelValue: d.value,
579
+ "onUpdate:modelValue": e[5] || (e[5] = (i) => d.value = i),
580
+ overlay: !0,
581
+ dismissAway: !0,
582
+ "close-button": "",
583
+ "max-width": "400px"
584
+ }, {
585
+ "dialog-header": P(() => e[11] || (e[11] = [
586
+ l("span", null, "Save Print Template?", -1)
587
+ ])),
588
+ "dialog-footer": P(() => [
589
+ p(M, {
590
+ class: "ml-auto",
591
+ label: "Save",
592
+ variant: "primary",
593
+ size: "md",
594
+ loading: c.value,
595
+ onClick: s
596
+ }, null, 8, ["loading"])
597
+ ]),
598
+ default: P(() => [
599
+ l("div", Ot, [
600
+ e[13] || (e[13] = l("p", null, "Are you sure you want to save this print template?", -1)),
601
+ e[14] || (e[14] = l("p", { class: "text-gray-500 text-sm mt-2" }, " This template will be used for all future prints of this type. ", -1)),
602
+ l("div", Lt, [
603
+ p(y, {
604
+ name: "warning",
605
+ size: "sm"
606
+ }),
607
+ e[12] || (e[12] = l("span", null, "This will affect all locations under this business.", -1))
608
+ ])
609
+ ])
610
+ ]),
611
+ _: 1
612
+ }, 8, ["modelValue"]),
613
+ p(R, {
614
+ modelValue: $.value,
615
+ "onUpdate:modelValue": e[6] || (e[6] = (i) => $.value = i),
616
+ overlay: !0,
617
+ dismissAway: !0,
618
+ "close-button": "",
619
+ "max-width": "400px"
620
+ }, {
621
+ "dialog-header": P(() => e[15] || (e[15] = [
622
+ l("span", null, "Delete Print Template?", -1)
623
+ ])),
624
+ "dialog-footer": P(() => [
625
+ p(M, {
626
+ class: "ml-auto",
627
+ label: "Delete",
628
+ variant: "destructive",
629
+ size: "md",
630
+ loading: c.value,
631
+ onClick: D
632
+ }, null, 8, ["loading"])
633
+ ]),
634
+ default: P(() => [
635
+ l("div", Et, [
636
+ e[17] || (e[17] = l("p", null, "Are you sure you want to delete this print template?", -1)),
637
+ e[18] || (e[18] = l("p", { class: "text-gray-500 text-sm mt-2" }, " The default print layout will be used for all future prints. ", -1)),
638
+ l("div", Ut, [
639
+ p(y, {
640
+ name: "warning",
641
+ size: "sm"
642
+ }),
643
+ e[16] || (e[16] = l("span", null, "This will affect all locations under this business.", -1))
644
+ ])
645
+ ])
646
+ ]),
647
+ _: 1
648
+ }, 8, ["modelValue"])
649
+ ], 64);
650
+ };
651
+ }
652
+ }), Ht = { class: "flex flex-wrap items-center gap-8 border-b border-fm-color-neutral-gray-200 pb-16" }, Nt = {
653
+ key: 0,
654
+ class: "text-fm-color-typo-error"
655
+ }, Mt = {
656
+ key: 1,
657
+ class: "text-fm-color-typo-secondary"
658
+ }, Rt = {
659
+ key: 3,
660
+ class: "fm-typo-en-body-md-600"
661
+ }, jt = /* @__PURE__ */ ee({
662
+ __name: "PlanLicenseDisplay",
663
+ setup(H) {
664
+ const v = _e();
665
+ return (T, x) => (o(), r("div", Ht, [
666
+ x[0] || (x[0] = l("span", { class: "fm-typo-en-body-md-600" }, "Inventory plan", -1)),
667
+ w(v).loadState.status === "error" ? (o(), r("span", Nt, "Could not load plan")) : w(v).isLoaded ? w(v).premium ? (o(), z(Re, {
668
+ key: 2,
669
+ tier: "premium"
670
+ })) : (o(), r("span", Rt, "Standard")) : (o(), r("span", Mt, "Loading…"))
671
+ ]));
672
+ }
673
+ }), Kt = { class: "flex min-h-0 w-full flex-col gap-12" }, qt = { class: "flex w-full flex-wrap items-center gap-8" }, Gt = /* @__PURE__ */ ee({
674
+ __name: "FeatureFlagView",
675
+ setup(H) {
676
+ const v = _e(), T = Le(), x = ye(), S = Ue(), m = X.FmSwitch, O = X.FmTable, f = X.FmMenu, g = X.FmMenuDivider, c = X.FmMenuHeader, u = X.FmMenuItem, b = /* @__PURE__ */ new Set(), _ = {
677
+ inventory_pos_closing_v1: "Use v2: Closing Draft and Closing Template.",
678
+ inventory_pos_convert_v1: "Use Production Item instead."
679
+ }, h = k([]), a = k(null), $ = ["In use", "Deprecate Soon", "Deprecated"], d = k(null), V = k({}), W = k(!1), j = {
680
+ inventory_netsuite_inventory_transfer_out: ["netsuite"],
681
+ inventory_portal_accept_require_fulfillment: ["mobile"],
682
+ inventory_portal_must_use_transfer_template: ["mobile"],
683
+ inventory_portal_po_operate_v2: ["mobile"],
684
+ inventory_portal_xilnex_transfer_note: ["mobile"],
685
+ inventory_pos_adjust_v1: ["mobile", "pos-v7", "pos-7.8"],
686
+ inventory_pos_adjust_v2_wastage: ["mobile", "pos-v7", "pos-7.8"],
687
+ inventory_pos_allow_receive_order: ["mobile", "pos-v7", "pos-7.8"],
688
+ inventory_pos_closing_v1: ["mobile", "pos-v7", "pos-7.8"],
689
+ inventory_pos_closing_v2: ["mobile", "pos-v7", "pos-7.8"],
690
+ inventory_pos_convert_v1: ["mobile", "pos-v7", "pos-7.8"],
691
+ inventory_pos_costing: ["mobile"],
692
+ inventory_pos_stock_return: ["mobile"],
693
+ inventory_pos_transfer_require_fulfillment: ["mobile", "pos-v7", "pos-7.8"],
694
+ inventory_purchase_order_approval: ["mobile"]
695
+ }, Q = A(
696
+ () => Object.values(Ae).map((t) => {
697
+ const s = v.flags.find((D) => D.name === t);
698
+ return {
699
+ name: t,
700
+ enabled: (s == null ? void 0 : s.enabled) ?? null,
701
+ domains: ["portal", ...j[t] ?? []],
702
+ features: je(t)
703
+ };
704
+ })
705
+ ), U = A(
706
+ () => [...new Set(Q.value.flatMap((t) => t.domains))].sort()
707
+ ), N = A(
708
+ () => Q.value.filter(
709
+ (t) => (h.value.length === 0 || h.value.some((s) => t.domains.includes(s))) && (!a.value || re(t) === a.value)
710
+ )
711
+ );
712
+ function ne(t) {
713
+ h.value = h.value.includes(t) ? h.value.filter((s) => s !== t) : [...h.value, t];
714
+ }
715
+ function te() {
716
+ h.value = [], a.value = null;
717
+ }
718
+ function le(t) {
719
+ return t.domains.includes("mobile") || t.domains.some((s) => s.startsWith("pos-"));
720
+ }
721
+ function ce(t) {
722
+ return d.value && le(t) ? V.value[t.name] === !0 : t.enabled === !0;
723
+ }
724
+ async function de(t) {
725
+ if (!t) {
726
+ V.value = {};
727
+ return;
728
+ }
729
+ const s = t;
730
+ W.value = !0;
731
+ try {
732
+ const [{ flags: D }] = await Promise.all([
733
+ S.listForScope(s),
734
+ v.retryLoad()
735
+ ]);
736
+ d.value === s && (V.value = Object.fromEntries(D.map((K) => [K.name, K.enabled])));
737
+ } catch (D) {
738
+ console.error("Unable to load feature flags for the selected scope", D), d.value === s && (V.value = {});
739
+ } finally {
740
+ d.value === s && (W.value = !1);
741
+ }
742
+ }
743
+ J(
744
+ () => {
745
+ var t;
746
+ return (t = x.currentBusiness.value) != null && t._id ? `business_${x.currentBusiness.value._id}` : null;
747
+ },
748
+ (t) => {
749
+ var s;
750
+ d.value || (d.value = ((s = T._currentLocation) == null ? void 0 : s.dbName) ?? t);
751
+ },
752
+ { immediate: !0 }
753
+ ), J(d, de, { immediate: !0 });
754
+ function re(t) {
755
+ return b.has(t.name) ? "Deprecated" : _[t.name] ? "Deprecate Soon" : "In use";
756
+ }
757
+ function pe(t) {
758
+ return t === "Deprecated" ? "bg-red-50 text-red-700" : t === "Deprecate Soon" ? "bg-fm-color-state-warning-subtle text-fm-color-state-warning-base" : "bg-green-50 text-green-700";
759
+ }
760
+ function me(t) {
761
+ return t.features.length === 0 ? ["Controls the availability of this inventory feature."] : t.features.length === 1 ? [t.features[0].controls] : t.features.map((s) => `${s.label}: ${s.controls}`);
762
+ }
763
+ function ve(t) {
764
+ return b.has(t.name) ? "This flag is deprecated. Use its supported replacement for new work." : _[t.name];
765
+ }
766
+ const fe = A(() => [
767
+ {
768
+ accessorKey: "name",
769
+ header: "Feature flag",
770
+ meta: { width: "27%" },
771
+ cell: ({ row: t }) => B("div", { class: "flex flex-wrap items-center gap-2" }, [
772
+ B("span", { class: "break-all font-mono text-xs text-gray-700" }, t.original.name),
773
+ ...t.original.features.slice(0, 1).map(
774
+ (s) => B(He, {
775
+ tier: s.category === "premium" ? "premium" : "standard",
776
+ category: s.category,
777
+ deprecateSoon: s.deprecateSoon,
778
+ informative: !0
779
+ })
780
+ )
781
+ ])
782
+ },
783
+ {
784
+ id: "domains",
785
+ header: "Domains",
786
+ meta: { width: "19%" },
787
+ cell: ({ row: t }) => B(
788
+ "div",
789
+ { class: "flex flex-wrap gap-2" },
790
+ t.original.domains.map(
791
+ (s) => B(
792
+ "span",
793
+ {
794
+ class: "rounded-full bg-fm-color-neutral-gray-100 px-2 py-0.5 text-xs font-medium text-fm-color-typo-secondary"
795
+ },
796
+ s
797
+ )
798
+ )
799
+ )
800
+ },
801
+ {
802
+ id: "description",
803
+ header: "Description",
804
+ meta: { width: "29%" },
805
+ cell: ({ row: t }) => {
806
+ const s = ve(t.original);
807
+ return B("div", { class: "flex flex-col gap-2 text-xs" }, [
808
+ ...me(t.original).map(
809
+ (D) => B("span", { class: "text-fm-color-typo-secondary" }, D)
810
+ ),
811
+ ...s ? [B("span", { class: "text-fm-color-state-warning-base" }, s)] : []
812
+ ]);
813
+ }
814
+ },
815
+ {
816
+ id: "status",
817
+ header: "Status",
818
+ meta: { width: "13%" },
819
+ cell: ({ row: t }) => {
820
+ const s = re(t.original);
821
+ return s === "Deprecate Soon" ? B(Ne) : B(
822
+ "span",
823
+ {
824
+ class: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${pe(s)}`
825
+ },
826
+ s
827
+ );
828
+ }
829
+ },
830
+ {
831
+ id: "availability",
832
+ header: "Availability",
833
+ meta: { width: "12%" },
834
+ cell: ({ row: t }) => {
835
+ const s = !!d.value && le(t.original);
836
+ return B("div", { class: "flex flex-col items-end gap-2" }, [
837
+ B(m, { modelValue: ce(t.original), disabled: !0, showIcon: !0 }),
838
+ ...s && W.value ? [B("span", { class: "text-xs text-gray-500" }, "Loading location value…")] : [],
839
+ ...t.original.features.some((D) => D.category === "premium") && t.original.enabled !== !0 && !s ? [B("span", { class: "text-xs text-gray-500" }, "Controlled by the Premium plan")] : []
840
+ ]);
841
+ }
842
+ }
843
+ ]);
844
+ return (t, s) => {
845
+ const D = L("FmChip"), K = L("FmButton");
846
+ return o(), r("div", Kt, [
847
+ p(jt),
848
+ l("div", qt, [
849
+ p(Me, {
850
+ "model-value": d.value,
851
+ "onUpdate:modelValue": s[0] || (s[0] = (F) => d.value = F),
852
+ "selection-only": "",
853
+ "show-business": ""
854
+ }, null, 8, ["model-value"]),
855
+ (o(!0), r(E, null, Y(h.value, (F) => (o(), z(D, {
856
+ key: F,
857
+ label: `domain in ${F}`,
858
+ removable: "",
859
+ onChipClosed: (ie) => ne(F)
860
+ }, null, 8, ["label", "onChipClosed"]))), 128)),
861
+ a.value ? (o(), z(D, {
862
+ key: 0,
863
+ label: `status in ${a.value}`,
864
+ removable: "",
865
+ onChipClosed: s[1] || (s[1] = (F) => a.value = null)
866
+ }, null, 8, ["label"])) : Z("", !0),
867
+ p(w(f), {
868
+ "close-on-click": !1,
869
+ width: 288,
870
+ "max-height": 420,
871
+ placement: "bottom-start"
872
+ }, {
873
+ "menu-button": P(() => [
874
+ p(K, {
875
+ label: "Filter",
876
+ "prepend-icon": "add",
877
+ variant: "secondary"
878
+ })
879
+ ]),
880
+ default: P(() => [
881
+ p(w(c), { label: "Domains" }),
882
+ (o(!0), r(E, null, Y(U.value, (F) => (o(), z(w(u), {
883
+ key: F,
884
+ label: F,
885
+ selectable: "",
886
+ "has-checkbox": "",
887
+ "model-value": h.value.includes(F),
888
+ onClick: (ie) => ne(F)
889
+ }, null, 8, ["label", "model-value", "onClick"]))), 128)),
890
+ p(w(g)),
891
+ p(w(c), { label: "Status" }),
892
+ (o(), r(E, null, Y($, (F) => p(w(u), {
893
+ key: F,
894
+ label: F,
895
+ selectable: "",
896
+ "has-checkbox": "",
897
+ "model-value": a.value === F,
898
+ onClick: (ie) => a.value = a.value === F ? null : F
899
+ }, null, 8, ["label", "model-value", "onClick"])), 64))
900
+ ]),
901
+ _: 1
902
+ }),
903
+ h.value.length || a.value ? (o(), z(K, {
904
+ key: 1,
905
+ label: "Clear all",
906
+ variant: "tertiary",
907
+ onClick: te
908
+ })) : Z("", !0)
909
+ ]),
910
+ p(w(O), {
911
+ "column-defs": fe.value,
912
+ "row-data": N.value,
913
+ "page-size": 50,
914
+ "hide-footer": "",
915
+ "shrink-at": !1
916
+ }, null, 8, ["column-defs", "row-data"])
917
+ ]);
918
+ };
919
+ }
920
+ }), Yt = { class: "flex w-full flex-col gap-16 p-16" }, Jt = {
921
+ key: 0,
922
+ class: "py-32 text-center"
923
+ }, Wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qt = {
924
+ class: "flex gap-2 border-b border-gray-200",
925
+ role: "tablist"
926
+ }, Xt = ["aria-selected"], Zt = ["aria-selected"], el = { key: 0 }, tl = { class: "flex items-center justify-between gap-12" }, ll = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary" }, ol = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, al = {
927
+ key: 1,
928
+ class: "w-full"
929
+ }, sl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _l = /* @__PURE__ */ ee({
930
+ __name: "SettingsView",
931
+ setup(H) {
932
+ const { t: v } = Ee(), T = ye(), x = Ie(), S = k(!1), m = k("order"), O = A(() => {
933
+ var c, u;
934
+ return ((u = (c = T.sessionUser.value) == null ? void 0 : c.role) == null ? void 0 : u.isAdmin) === !0;
935
+ });
936
+ function f() {
937
+ x.invalidate(), x.fetchTemplates();
938
+ }
939
+ function g() {
940
+ x.fetchTemplates(), S.value = !0;
941
+ }
942
+ return (c, u) => {
943
+ const b = L("FmButton");
944
+ return o(), z(Fe, {
945
+ title: w(v)("inventory.settings.title")
946
+ }, {
947
+ default: P(() => [
948
+ l("div", Yt, [
949
+ O.value ? (o(), r(E, { key: 1 }, [
950
+ l("div", Qt, [
951
+ l("button", {
952
+ type: "button",
953
+ role: "tab",
954
+ "aria-selected": m.value === "order",
955
+ class: ue([
956
+ "border-b-2 px-3 py-2 text-sm font-medium",
957
+ m.value === "order" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
958
+ ]),
959
+ onClick: u[0] || (u[0] = (_) => m.value = "order")
960
+ }, C(w(v)("inventory.settings.order.title")), 11, Xt),
961
+ l("button", {
962
+ type: "button",
963
+ role: "tab",
964
+ "aria-selected": m.value === "features",
965
+ class: ue([
966
+ "border-b-2 px-3 py-2 text-sm font-medium",
967
+ m.value === "features" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
968
+ ]),
969
+ onClick: u[1] || (u[1] = (_) => m.value = "features")
970
+ }, C(w(v)("inventory.settings.features.title")), 11, Zt)
971
+ ]),
972
+ m.value === "order" ? (o(), r("div", el, [
973
+ l("div", tl, [
974
+ l("h2", ll, C(w(v)("inventory.settings.order.printTemplates")), 1),
975
+ p(b, {
976
+ onClick: g,
977
+ variant: "secondary",
978
+ label: w(v)("inventory.settings.printTemplate.edit")
979
+ }, null, 8, ["label"])
980
+ ]),
981
+ l("p", ol, C(w(v)("inventory.settings.printTemplate.description")), 1)
982
+ ])) : (o(), r("div", al, [
983
+ l("p", sl, C(w(v)("inventory.settings.features.description")), 1),
984
+ p(Gt)
985
+ ]))
986
+ ], 64)) : (o(), r("div", Jt, [
987
+ l("p", Wt, C(w(v)("inventory.settings.adminOnly")), 1)
988
+ ]))
989
+ ]),
990
+ (o(), z(we, { to: "body" }, [
991
+ p(At, {
992
+ modelValue: S.value,
993
+ "onUpdate:modelValue": u[2] || (u[2] = (_) => S.value = _),
994
+ onSaved: f
995
+ }, null, 8, ["modelValue"])
996
+ ]))
997
+ ]),
998
+ _: 1
999
+ }, 8, ["title"]);
1000
+ };
1001
+ }
1002
+ });
1003
+ export {
1004
+ _l as default
1005
+ };