@feedmepos/mf-menu-portal 0.0.0-stage → 1.0.1-dev.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.
Files changed (263) hide show
  1. package/README.md +30 -2
  2. package/dist/AddPriceGroupDialog.vue_vue_type_script_setup_true_lang-DhKyG3gY.js +20 -0
  3. package/dist/App-C6k--u1c.js +8316 -0
  4. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js +98 -0
  5. package/dist/BindingLinkDialog.vue_vue_type_script_setup_true_lang-BZVQRyRI.js +180 -0
  6. package/dist/BindingTable.vue_vue_type_script_setup_true_lang-DBzjWI_6.js +179 -0
  7. package/dist/Catalog-DEYN4dMN.js +374 -0
  8. package/dist/CatalogBinding-NnPKdPvx.js +315 -0
  9. package/dist/CatalogEditTabs.vue_vue_type_script_setup_true_lang-OshqaPTE.js +97 -0
  10. package/dist/CatalogEditor.vue_vue_type_script_setup_true_lang-poznuDXu.js +447 -0
  11. package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-BSMAIkQ2.js +117 -0
  12. package/dist/Category-BdUP0o34.js +13 -0
  13. package/dist/Category-CkQiwP9e.js +52 -0
  14. package/dist/CategoryList.vue_vue_type_script_setup_true_lang-UgNVpYgp.js +797 -0
  15. package/dist/CookingGuide-CtDkm74r.js +842 -0
  16. package/dist/FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js +26 -0
  17. package/dist/FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js +1774 -0
  18. package/dist/Group-D2HngOjr.js +52 -0
  19. package/dist/Group-DSj7_16V.js +13 -0
  20. package/dist/GroupList.vue_vue_type_script_setup_true_lang-BmmsSKTt.js +2183 -0
  21. package/dist/Ingredient-BHqz7kjQ.js +463 -0
  22. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-D9jK-Fhn.js +709 -0
  23. package/dist/ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js +15 -0
  24. package/dist/MenuSetting-DF-cJH7N.js +1228 -0
  25. package/dist/OrderPacing-CejS9dEI.js +698 -0
  26. package/dist/OrderPacingFields.vue_vue_type_script_setup_true_lang-C2mixGUk.js +55 -0
  27. package/dist/PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js +41 -0
  28. package/dist/Preview-1C7jGJuY.js +327 -0
  29. package/dist/PriceTierNotice.vue_vue_type_script_setup_true_lang-CxKHCptJ.js +26 -0
  30. package/dist/PrintRoute-BNnMcgTf.js +473 -0
  31. package/dist/Product-BoUKxogB.js +44 -0
  32. package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +110 -0
  33. package/dist/ProductEditorHost.vue_vue_type_script_setup_true_lang-Bm8_FTvr.js +83 -0
  34. package/dist/ProductFilterMenu.vue_vue_type_script_setup_true_lang-Cgc0Ms_n.js +101 -0
  35. package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-Cx_mW05R.js +1246 -0
  36. package/dist/ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CUeYaXYg.js +1955 -0
  37. package/dist/ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-CeYyZX7g.js +5401 -0
  38. package/dist/ProductInternalTools-b3sy8bWy.js +2147 -0
  39. package/dist/ProductInventoryDialog-DO0D8e3Z.js +4 -0
  40. package/dist/ProductInventoryDialog.vue_vue_type_script_setup_true_lang-y9Mz__o9.js +187 -0
  41. package/dist/ProductList.vue_vue_type_script_setup_true_lang-n_UYIwwt.js +10353 -0
  42. package/dist/ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-ClG3Prfm.js +218 -0
  43. package/dist/Products-7vlFJB0P.js +155 -0
  44. package/dist/Publish-DTP-CgV-.js +1261 -0
  45. package/dist/Recipe-C1W8_15H.js +350 -0
  46. package/dist/Scheduler-JRjozwP_.js +637 -0
  47. package/dist/ServingSequence-BGT5m7JB.js +336 -0
  48. package/dist/Setting-CS_M1gMN.js +173 -0
  49. package/dist/Subcategory-Cgy9CQCz.js +412 -0
  50. package/dist/Takeaway-Bpo9XA-j.js +48 -0
  51. package/dist/Takeaway-DO2dmFGP.js +13 -0
  52. package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-C7KexF7H.js +554 -0
  53. package/dist/TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js +161 -0
  54. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js +158 -0
  55. package/dist/TranslationViewChip.vue_vue_type_script_setup_true_lang-CAkLEmSA.js +69 -0
  56. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BHxmPO7F.js +1213 -0
  57. package/dist/Unit-Bn5UzMp1.js +385 -0
  58. package/dist/Variant-DmeGEEkw.js +538 -0
  59. package/dist/_id_-DC1dJIaj.js +28 -0
  60. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  61. package/dist/app-Bd7W2PYm.js +2008 -0
  62. package/dist/app.js +8 -0
  63. package/dist/apps/mf-menu/src/App.vue.d.ts +2 -0
  64. package/dist/apps/mf-menu/src/Entry.vue.d.ts +4 -0
  65. package/dist/apps/mf-menu/src/app.d.ts +16771 -0
  66. package/dist/apps/mf-menu/src/assets/icons/index.d.ts +4 -0
  67. package/dist/apps/mf-menu/src/components/CatalogBindingList.vue.d.ts +9 -0
  68. package/dist/apps/mf-menu/src/components/CatalogList.vue.d.ts +6 -0
  69. package/dist/apps/mf-menu/src/components/CategoryImageField.vue.d.ts +17 -0
  70. package/dist/apps/mf-menu/src/components/CategoryList.vue.d.ts +28 -0
  71. package/dist/apps/mf-menu/src/components/Fields/RangeSlider.vue.d.ts +23 -0
  72. package/dist/apps/mf-menu/src/components/GroupList.vue.d.ts +28 -0
  73. package/dist/apps/mf-menu/src/components/GroupTranslationSideSheet.vue.d.ts +14 -0
  74. package/dist/apps/mf-menu/src/components/IngredientList.vue.d.ts +15 -0
  75. package/dist/apps/mf-menu/src/components/MenuHeaderContext.vue.d.ts +2 -0
  76. package/dist/apps/mf-menu/src/components/MenuRestaurantSelector.vue.d.ts +7 -0
  77. package/dist/apps/mf-menu/src/components/MenuSetting/AddMemberTierDialog.vue.d.ts +2 -0
  78. package/dist/apps/mf-menu/src/components/MenuSetting/AddPriceGroupDialog.vue.d.ts +2 -0
  79. package/dist/apps/mf-menu/src/components/MenuSetting/ConfigurationTab.vue.d.ts +6 -0
  80. package/dist/apps/mf-menu/src/components/MenuSetting/MemberPricingTab.vue.d.ts +6 -0
  81. package/dist/apps/mf-menu/src/components/MenuSetting/PriceGroupTab.vue.d.ts +6 -0
  82. package/dist/apps/mf-menu/src/components/MenuSetting/RuleGroupsTab.vue.d.ts +6 -0
  83. package/dist/apps/mf-menu/src/components/Navigator.vue.d.ts +2 -0
  84. package/dist/apps/mf-menu/src/components/OrderPacingList.vue.d.ts +6 -0
  85. package/dist/apps/mf-menu/src/components/PriceTier/PriceTierNotice.vue.d.ts +6 -0
  86. package/dist/apps/mf-menu/src/components/PrintRouteList.vue.d.ts +6 -0
  87. package/dist/apps/mf-menu/src/components/Product/LocalizedCurrencySymbol.vue.d.ts +5 -0
  88. package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +13 -0
  89. package/dist/apps/mf-menu/src/components/Product/ProductCategorySelector.vue.d.ts +11 -0
  90. package/dist/apps/mf-menu/src/components/Product/ProductChipSummary.vue.d.ts +9 -0
  91. package/dist/apps/mf-menu/src/components/Product/ProductChoicePicker.vue.d.ts +15 -0
  92. package/dist/apps/mf-menu/src/components/Product/ProductEditorHost.vue.d.ts +26 -0
  93. package/dist/apps/mf-menu/src/components/Product/ProductFilterMenu.vue.d.ts +26 -0
  94. package/dist/apps/mf-menu/src/components/Product/ProductForm.vue.d.ts +42 -0
  95. package/dist/apps/mf-menu/src/components/Product/ProductFormSection.vue.d.ts +41 -0
  96. package/dist/apps/mf-menu/src/components/Product/ProductGroupCreateSheet.vue.d.ts +19 -0
  97. package/dist/apps/mf-menu/src/components/Product/ProductGroupSheet.vue.d.ts +56 -0
  98. package/dist/apps/mf-menu/src/components/Product/ProductInlineCategoryCreateField.vue.d.ts +10 -0
  99. package/dist/apps/mf-menu/src/components/Product/ProductInlineCreateHost.vue.d.ts +38 -0
  100. package/dist/apps/mf-menu/src/components/Product/ProductInlineSubcategoryCreateField.vue.d.ts +10 -0
  101. package/dist/apps/mf-menu/src/components/Product/ProductInventoryDialog.vue.d.ts +12 -0
  102. package/dist/apps/mf-menu/src/components/Product/ProductLocaleBadge.vue.d.ts +6 -0
  103. package/dist/apps/mf-menu/src/components/Product/ProductMemberPriceTooltip.vue.d.ts +6 -0
  104. package/dist/apps/mf-menu/src/components/Product/ProductMoneyField.vue.d.ts +25 -0
  105. package/dist/apps/mf-menu/src/components/Product/ProductOverviewSheet.vue.d.ts +11 -0
  106. package/dist/apps/mf-menu/src/components/Product/ProductPacingSheet.vue.d.ts +13 -0
  107. package/dist/apps/mf-menu/src/components/Product/ProductPriceTierButton.vue.d.ts +11 -0
  108. package/dist/apps/mf-menu/src/components/Product/ProductPricingSheet.vue.d.ts +26 -0
  109. package/dist/apps/mf-menu/src/components/Product/ProductPrintRouteSheet.vue.d.ts +12 -0
  110. package/dist/apps/mf-menu/src/components/Product/ProductQuantityField.vue.d.ts +16 -0
  111. package/dist/apps/mf-menu/src/components/Product/ProductSummaryCard.vue.d.ts +9 -0
  112. package/dist/apps/mf-menu/src/components/Product/ProductTakeawaySheet.vue.d.ts +12 -0
  113. package/dist/apps/mf-menu/src/components/Product/ProductTranslationDialog.vue.d.ts +16 -0
  114. package/dist/apps/mf-menu/src/components/Product/ProductVariantCreateSheet.vue.d.ts +12 -0
  115. package/dist/apps/mf-menu/src/components/Product/ProductVariantTranslationSheet.vue.d.ts +13 -0
  116. package/dist/apps/mf-menu/src/components/Product/inlineCreate.d.ts +23 -0
  117. package/dist/apps/mf-menu/src/components/Product/labels.d.ts +15 -0
  118. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageBadge.vue.d.ts +7 -0
  119. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageDownloadDialog.vue.d.ts +15 -0
  120. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageFormatChips.vue.d.ts +13 -0
  121. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageLegacyChip.vue.d.ts +2 -0
  122. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageProgressDialog.vue.d.ts +11 -0
  123. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageResult.vue.d.ts +14 -0
  124. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageReview.vue.d.ts +21 -0
  125. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageThumb.vue.d.ts +15 -0
  126. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageUpdateFlow.vue.d.ts +6 -0
  127. package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageUpdateSheet.vue.d.ts +34 -0
  128. package/dist/apps/mf-menu/src/components/ProductBatchImage/batchImageFiles.d.ts +53 -0
  129. package/dist/apps/mf-menu/src/components/ProductImage/ProductImageCustomFormatDialog.vue.d.ts +40 -0
  130. package/dist/apps/mf-menu/src/components/ProductImage/ProductImageEditorDialog.vue.d.ts +82 -0
  131. package/dist/apps/mf-menu/src/components/ProductImage/ProductImageField.vue.d.ts +42 -0
  132. package/dist/apps/mf-menu/src/components/ProductImage/ProductImageManageSheet.vue.d.ts +47 -0
  133. package/dist/apps/mf-menu/src/components/ProductImage/ProductImageRegenerateDialog.vue.d.ts +44 -0
  134. package/dist/apps/mf-menu/src/components/ProductImage/imageBrowser.d.ts +18 -0
  135. package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +18 -0
  136. package/dist/apps/mf-menu/src/components/PublishList.vue.d.ts +14 -0
  137. package/dist/apps/mf-menu/src/components/RecipeList.vue.d.ts +11 -0
  138. package/dist/apps/mf-menu/src/components/SchedulerList.vue.d.ts +6 -0
  139. package/dist/apps/mf-menu/src/components/ServingSequenceList.vue.d.ts +6 -0
  140. package/dist/apps/mf-menu/src/components/SubcategoryList.vue.d.ts +6 -0
  141. package/dist/apps/mf-menu/src/components/TakeawayList.vue.d.ts +26 -0
  142. package/dist/apps/mf-menu/src/components/TranslationSideSheet.vue.d.ts +36 -0
  143. package/dist/apps/mf-menu/src/components/UnitList.vue.d.ts +6 -0
  144. package/dist/apps/mf-menu/src/components/V3ToV4MigrationBanner.vue.d.ts +6 -0
  145. package/dist/apps/mf-menu/src/components/V3ToV4MigrationConfirmDialog.vue.d.ts +12 -0
  146. package/dist/apps/mf-menu/src/components/VariantList.vue.d.ts +6 -0
  147. package/dist/apps/mf-menu/src/components/catalog/CatalogEditor.vue.d.ts +14 -0
  148. package/dist/apps/mf-menu/src/components/catalog/CatalogLinkProductAction.vue.d.ts +7 -0
  149. package/dist/apps/mf-menu/src/components/catalog/CatalogUsage.vue.d.ts +6 -0
  150. package/dist/apps/mf-menu/src/components/catalog/tableSemantics.d.ts +7 -0
  151. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +33 -0
  152. package/dist/apps/mf-menu/src/components/feature/CookingGuide/RemoveCookingGuideConfirmation.vue.d.ts +6 -0
  153. package/dist/apps/mf-menu/src/components/feature/EmptyDataTemplate/Icon.vue.d.ts +2 -0
  154. package/dist/apps/mf-menu/src/components/feature/EmptyDataTemplate/index.d.ts +1 -0
  155. package/dist/apps/mf-menu/src/components/feature/EmptyDataTemplate/index.vue.d.ts +18 -0
  156. package/dist/apps/mf-menu/src/components/feature/InventoryBinding/BindingLinkDialog.vue.d.ts +49 -0
  157. package/dist/apps/mf-menu/src/components/feature/InventoryBinding/BindingTable.vue.d.ts +38 -0
  158. package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +65 -0
  159. package/dist/apps/mf-menu/src/components/feature/OrderPacing/DeleteOrderPacingConfirmation.vue.d.ts +6 -0
  160. package/dist/apps/mf-menu/src/components/feature/OrderPacing/OrderPacingFields.vue.d.ts +17 -0
  161. package/dist/apps/mf-menu/src/components/feature/PrintRoute/RemoveRouteConfirmation.vue.d.ts +6 -0
  162. package/dist/apps/mf-menu/src/components/feature/TreeEditor/TreeEditorOpenner.vue.d.ts +18 -0
  163. package/dist/apps/mf-menu/src/components/feature/TreeEditor/openner.d.ts +7 -0
  164. package/dist/apps/mf-menu/src/components/info/TextChip.vue.d.ts +13 -0
  165. package/dist/apps/mf-menu/src/components/layout/FlatInlineSort.vue.d.ts +25 -0
  166. package/dist/apps/mf-menu/src/components/layout/FormColumn.vue.d.ts +12 -0
  167. package/dist/apps/mf-menu/src/components/layout/FormItem.vue.d.ts +17 -0
  168. package/dist/apps/mf-menu/src/components/layout/FormRow.vue.d.ts +9 -0
  169. package/dist/apps/mf-menu/src/components/layout/FormSection.vue.d.ts +18 -0
  170. package/dist/apps/mf-menu/src/components/layout/FullScreenForm.vue.d.ts +31 -0
  171. package/dist/apps/mf-menu/src/components/layout/FullWrapper.vue.d.ts +9 -0
  172. package/dist/apps/mf-menu/src/components/layout/LabeledTextField.vue.d.ts +16 -0
  173. package/dist/apps/mf-menu/src/components/layout/ListCountTag.vue.d.ts +5 -0
  174. package/dist/apps/mf-menu/src/components/layout/LottieAnimation.vue.d.ts +39 -0
  175. package/dist/apps/mf-menu/src/components/layout/PageLayout.vue.d.ts +19 -0
  176. package/dist/apps/mf-menu/src/components/layout/ProgressBar.vue.d.ts +9 -0
  177. package/dist/apps/mf-menu/src/components/loading/AppLoading.vue.d.ts +20 -0
  178. package/dist/apps/mf-menu/src/components/loading/PageLoading.vue.d.ts +2 -0
  179. package/dist/apps/mf-menu/src/components/loading/index.d.ts +1 -0
  180. package/dist/apps/mf-menu/src/components/placeholder/PlaceholderView.vue.d.ts +5 -0
  181. package/dist/apps/mf-menu/src/components/preview/MenuPreview.vue.d.ts +13 -0
  182. package/dist/apps/mf-menu/src/components/preview/simulatorPort.d.ts +23 -0
  183. package/dist/apps/mf-menu/src/components/publish/PublishRevertPreview.vue.d.ts +6 -0
  184. package/dist/apps/mf-menu/src/components/publish/PublishScheduleDetails.vue.d.ts +6 -0
  185. package/dist/apps/mf-menu/src/components/publish/publishStatus.d.ts +15 -0
  186. package/dist/apps/mf-menu/src/components/translation/TranslationLanguageSelector.vue.d.ts +21 -0
  187. package/dist/apps/mf-menu/src/components/translation/TranslationViewChip.vue.d.ts +12 -0
  188. package/dist/apps/mf-menu/src/components/translation/localeName.d.ts +11 -0
  189. package/dist/apps/mf-menu/src/components/translation/localeSymbol.d.ts +15 -0
  190. package/dist/apps/mf-menu/src/composable/elementPosition.d.ts +17 -0
  191. package/dist/apps/mf-menu/src/composable/menuNotifier.d.ts +14 -0
  192. package/dist/apps/mf-menu/src/composable/navigator.d.ts +16 -0
  193. package/dist/apps/mf-menu/src/composable/useActionFeedback.d.ts +81 -0
  194. package/dist/apps/mf-menu/src/composable/useEditorValidation.d.ts +21 -0
  195. package/dist/apps/mf-menu/src/init.d.ts +1 -0
  196. package/dist/apps/mf-menu/src/main.d.ts +2 -0
  197. package/dist/apps/mf-menu/src/plugins.d.ts +4 -0
  198. package/dist/apps/mf-menu/src/router/index.d.ts +2 -0
  199. package/dist/apps/mf-menu/src/router/shared.d.ts +65 -0
  200. package/dist/apps/mf-menu/src/sdk/host.d.ts +9 -0
  201. package/dist/apps/mf-menu/src/sdk/import-export.d.ts +9 -0
  202. package/dist/apps/mf-menu/src/sdk/provide.d.ts +33 -0
  203. package/dist/apps/mf-menu/src/sdk/useReadModel.d.ts +16 -0
  204. package/dist/apps/mf-menu/src/sdk/useSdkMessage.d.ts +11 -0
  205. package/dist/apps/mf-menu/src/stores/app.d.ts +17 -0
  206. package/dist/apps/mf-menu/src/utils/ruleValueKey.d.ts +12 -0
  207. package/dist/apps/mf-menu/src/utils/worker-loader.d.ts +12 -0
  208. package/dist/apps/mf-menu/src/utils/worker.d.ts +4 -0
  209. package/dist/apps/mf-menu/src/views/Catalog/Catalog.vue.d.ts +2 -0
  210. package/dist/apps/mf-menu/src/views/Catalog/Edit/CatalogEditTabs.vue.d.ts +2 -0
  211. package/dist/apps/mf-menu/src/views/Catalog/Edit/Category.vue.d.ts +2 -0
  212. package/dist/apps/mf-menu/src/views/Catalog/Edit/Group.vue.d.ts +2 -0
  213. package/dist/apps/mf-menu/src/views/Catalog/Edit/MainSetting.vue.d.ts +2 -0
  214. package/dist/apps/mf-menu/src/views/Catalog/Edit/NamedSetting.vue.d.ts +5 -0
  215. package/dist/apps/mf-menu/src/views/Catalog/Edit/Product.vue.d.ts +2 -0
  216. package/dist/apps/mf-menu/src/views/Catalog/Edit/Setting.vue.d.ts +2 -0
  217. package/dist/apps/mf-menu/src/views/Catalog/Edit/Takeaway.vue.d.ts +2 -0
  218. package/dist/apps/mf-menu/src/views/Catalog/Edit/[id].vue.d.ts +2 -0
  219. package/dist/apps/mf-menu/src/views/CatalogBinding/CatalogBinding.vue.d.ts +2 -0
  220. package/dist/apps/mf-menu/src/views/Category/Category.vue.d.ts +2 -0
  221. package/dist/apps/mf-menu/src/views/CookingGuide/CookingGuide.vue.d.ts +2 -0
  222. package/dist/apps/mf-menu/src/views/Group/Group.vue.d.ts +2 -0
  223. package/dist/apps/mf-menu/src/views/ImportExport/ImportDiffPreview.vue.d.ts +25 -0
  224. package/dist/apps/mf-menu/src/views/ImportExport/ImportExport.vue.d.ts +9 -0
  225. package/dist/apps/mf-menu/src/views/ImportExport/ImportV3DiffPreview.vue.d.ts +26 -0
  226. package/dist/apps/mf-menu/src/views/ImportExport/PreviewImportTable.vue.d.ts +30 -0
  227. package/dist/apps/mf-menu/src/views/Ingredient/Ingredient.vue.d.ts +2 -0
  228. package/dist/apps/mf-menu/src/views/MenuManagementEditor/CategoryRenameDialog.vue.d.ts +26 -0
  229. package/dist/apps/mf-menu/src/views/MenuManagementEditor/DetailPane.vue.d.ts +23 -0
  230. package/dist/apps/mf-menu/src/views/MenuManagementEditor/EditorHistoryControls.vue.d.ts +22 -0
  231. package/dist/apps/mf-menu/src/views/MenuManagementEditor/MenuManagementEditor.vue.d.ts +10 -0
  232. package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +2 -0
  233. package/dist/apps/mf-menu/src/views/MenuManagementEditor/ScopeSwitcher.vue.d.ts +2 -0
  234. package/dist/apps/mf-menu/src/views/MenuManagementEditor/TreeFilter.vue.d.ts +2 -0
  235. package/dist/apps/mf-menu/src/views/MenuManagementEditor/TreePanel.vue.d.ts +9 -0
  236. package/dist/apps/mf-menu/src/views/MenuManagementEditor/TreeRow.vue.d.ts +25 -0
  237. package/dist/apps/mf-menu/src/views/MenuSetting/MenuSetting.vue.d.ts +2 -0
  238. package/dist/apps/mf-menu/src/views/OrderPacing/OrderPacing.vue.d.ts +2 -0
  239. package/dist/apps/mf-menu/src/views/Preview/Preview.vue.d.ts +2 -0
  240. package/dist/apps/mf-menu/src/views/PrintRoute/PrintRoute.vue.d.ts +2 -0
  241. package/dist/apps/mf-menu/src/views/Product/ProductInternalTools.vue.d.ts +2 -0
  242. package/dist/apps/mf-menu/src/views/Product/Products.vue.d.ts +2 -0
  243. package/dist/apps/mf-menu/src/views/Publish/Publish.vue.d.ts +2 -0
  244. package/dist/apps/mf-menu/src/views/Recipe/Recipe.vue.d.ts +2 -0
  245. package/dist/apps/mf-menu/src/views/Scheduler/Scheduler.vue.d.ts +2 -0
  246. package/dist/apps/mf-menu/src/views/ServingSequence/ServingSequence.vue.d.ts +2 -0
  247. package/dist/apps/mf-menu/src/views/Subcategory/Subcategory.vue.d.ts +2 -0
  248. package/dist/apps/mf-menu/src/views/Takeaway/Takeaway.vue.d.ts +2 -0
  249. package/dist/apps/mf-menu/src/views/Unit/Unit.vue.d.ts +2 -0
  250. package/dist/apps/mf-menu/src/views/Variant/Variant.vue.d.ts +2 -0
  251. package/dist/apps/mf-menu/src/workers/menu-compute.d.ts +1 -0
  252. package/dist/apps/mf-menu/src/workers/validate-menu.d.ts +1 -0
  253. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -0
  254. package/dist/assets/menu-compute-okel5FLc.js +260 -0
  255. package/dist/assets/validate-menu-DEFGpnQh.js +130 -0
  256. package/dist/index.vue_vue_type_script_setup_true_lang-CGPDazqs.js +57 -0
  257. package/dist/mf-menu-portal.css +1 -0
  258. package/dist/provide-Tmjfji09.js +190840 -0
  259. package/dist/ruleValueKey-BF52PuHb.js +10 -0
  260. package/dist/tableSemantics-C9WFO_I_.js +22 -0
  261. package/dist/useActionFeedback-DoFeBFpl.js +95 -0
  262. package/dist/useEditorValidation-Ctef5Bxt.js +63 -0
  263. package/package.json +79 -3
@@ -0,0 +1,797 @@
1
+ import { defineComponent as Re, computed as F, ref as Y, watch as ae, onMounted as qe, onUnmounted as Pe, openBlock as b, createElementBlock as te, createElementVNode as h, createTextVNode as Se, toDisplayString as A, unref as o, isRef as ye, createVNode as C, createBlock as I, createCommentVNode as H, withCtx as R, shallowRef as q, h as ge, withModifiers as Le, resolveComponent as se, renderSlot as pe, Fragment as He, normalizeClass as Je, withDirectives as Qe, mergeProps as Xe } from "vue";
2
+ import { useI18n as Ee } from "@feedmepos/mf-common";
3
+ import { components as oe, useDialog as Ye, FmButtonVariant as be } from "@feedmepos/ui-library";
4
+ import { _ as Ze } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
5
+ import { f as ea } from "./ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CUeYaXYg.js";
6
+ import { useAppStore as aa } from "@feedmepos/mf-remy-panel";
7
+ import { _ as ta } from "./ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js";
8
+ import { _ as oa } from "./TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js";
9
+ import { _ as Ue } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
10
+ import { _ as la } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
11
+ import { _ as na } from "./ProductEditorHost.vue_vue_type_script_setup_true_lang-Bm8_FTvr.js";
12
+ import { _ as sa } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
13
+ import { u as ra } from "./useActionFeedback-DoFeBFpl.js";
14
+ import { u as Fe } from "./useEditorValidation-Ctef5Bxt.js";
15
+ import { b as ia, u as ua } from "./provide-Tmjfji09.js";
16
+ import { v as ca } from "./tableSemantics-C9WFO_I_.js";
17
+ const da = {
18
+ key: 0,
19
+ class: "space-y-4"
20
+ }, ma = { class: "fm-typo-en-body-lg-600" }, va = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ga = { class: "fm-typo-en-body-lg-600 pb-4" }, pa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, fa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ya = /* @__PURE__ */ Re({
21
+ __name: "CategoryImageField",
22
+ props: {
23
+ thumbnailUrl: {},
24
+ change: {},
25
+ disabled: { type: Boolean }
26
+ },
27
+ emits: ["select", "clear", "encoding"],
28
+ setup(fe, { emit: k }) {
29
+ const t = fe, D = k, { t: L } = Ee(), B = aa(), M = F(() => !!B.showRemy), u = Y(t.thumbnailUrl);
30
+ let $ = null, g = 0, N = !1, d = !1, V = !1, f = !1;
31
+ function y(s) {
32
+ f !== s && (f = s, D("encoding", s));
33
+ }
34
+ function z() {
35
+ $ && URL.revokeObjectURL($), $ = null;
36
+ }
37
+ ae(
38
+ () => [t.thumbnailUrl, t.change],
39
+ () => {
40
+ t.change !== "selected" && (g++, y(!1), N = !1, d = !1, z(), u.value = t.change === "cleared" ? null : t.thumbnailUrl);
41
+ }
42
+ );
43
+ function l(s) {
44
+ return new Promise((i, r) => {
45
+ const U = URL.createObjectURL(s), m = new Image();
46
+ m.onload = () => {
47
+ URL.revokeObjectURL(U);
48
+ const p = m.naturalWidth, w = m.naturalHeight;
49
+ if (!p || !w) {
50
+ r(new Error("Empty category image"));
51
+ return;
52
+ }
53
+ const P = Math.max(p, w * 16 / 9), Q = Math.max(w, p * 9 / 16), j = 2e3 / P, G = document.createElement("canvas");
54
+ G.width = 2e3, G.height = Math.round(Q * j);
55
+ const X = G.getContext("2d");
56
+ if (!X) {
57
+ r(new Error("Category image canvas unavailable"));
58
+ return;
59
+ }
60
+ const ie = getComputedStyle(document.documentElement).getPropertyValue("--fm-color-neutral-white").trim();
61
+ if (!ie) {
62
+ r(new Error("Category image theme unavailable"));
63
+ return;
64
+ }
65
+ X.fillStyle = ie, X.fillRect(0, 0, G.width, G.height), X.drawImage(
66
+ m,
67
+ (P - p) / 2 * j,
68
+ (Q - w) / 2 * j,
69
+ p * j,
70
+ w * j
71
+ ), G.toBlob(
72
+ (ue) => ue ? i(ue) : r(new Error("Category image encoding failed")),
73
+ "image/png"
74
+ );
75
+ }, m.onerror = () => {
76
+ URL.revokeObjectURL(U), r(new Error("Category image could not be read"));
77
+ }, m.src = U;
78
+ });
79
+ }
80
+ async function le(s) {
81
+ const i = Array.isArray(s) ? s[0] : s;
82
+ if (!i || t.disabled) return;
83
+ const r = ++g;
84
+ y(!0);
85
+ try {
86
+ const U = await l(i);
87
+ if (r !== g) return;
88
+ z(), $ = URL.createObjectURL(U), N = !0, d = !1, u.value = $;
89
+ } catch {
90
+ r === g && y(!1);
91
+ }
92
+ }
93
+ function re(s) {
94
+ if (!N && !d || t.disabled || !s.canvas) return;
95
+ const i = ++g, { width: r, height: U } = s.canvas;
96
+ y(!0), s.canvas.toBlob(
97
+ (m) => {
98
+ i === g && (m && D("select", {
99
+ bytes: m,
100
+ contentType: m.type || "image/jpeg",
101
+ width: r,
102
+ height: U
103
+ }), y(!1));
104
+ },
105
+ "image/jpeg",
106
+ 0.75
107
+ );
108
+ }
109
+ function Z() {
110
+ g++, y(!1);
111
+ }
112
+ function T() {
113
+ t.disabled || (g++, y(!1), N = !1, d = !1, V = !1, z(), u.value = null, D("clear"));
114
+ }
115
+ async function J() {
116
+ if (t.disabled || !u.value) return;
117
+ let s;
118
+ try {
119
+ const i = await fetch(u.value);
120
+ if (i.ok) {
121
+ const r = await i.blob();
122
+ s = await new Promise((U, m) => {
123
+ const p = new FileReader();
124
+ p.onload = () => U(String(p.result)), p.onerror = () => m(p.error), p.readAsDataURL(r);
125
+ });
126
+ }
127
+ } catch {
128
+ }
129
+ V = !0, B.activate({ imageData: s, command: "modifyImage" });
130
+ }
131
+ function K(s) {
132
+ var r;
133
+ if (!V || t.disabled) return;
134
+ const i = (r = s.detail) == null ? void 0 : r.imageData;
135
+ typeof i != "string" || !i || (V = !1, g++, y(!0), N = !0, d = !1, z(), u.value = i);
136
+ }
137
+ return qe(() => window.addEventListener("apply-image", K)), Pe(() => {
138
+ window.removeEventListener("apply-image", K), g++, y(!1), z();
139
+ }), (s, i) => u.value ? (b(), te("div", da, [
140
+ h("p", ma, [
141
+ Se(A(o(L)("menu.common.labels.category_image")) + " ", 1),
142
+ h("span", va, A(o(L)("menu.common.labels.optional")), 1)
143
+ ]),
144
+ h("div", {
145
+ class: "relative h-[150px] w-[200px] overflow-hidden rounded-md border-2 border-dashed border-fm-color-neutral-gray-300",
146
+ onPointerdown: i[0] || (i[0] = (r) => ye(d) ? d.value = !0 : d = !0),
147
+ onWheel: i[1] || (i[1] = (r) => ye(d) ? d.value = !0 : d = !0),
148
+ onKeydown: i[2] || (i[2] = (r) => ye(d) ? d.value = !0 : d = !0)
149
+ }, [
150
+ C(o(ea), {
151
+ class: "h-[150px] w-[200px]",
152
+ src: u.value,
153
+ "stencil-props": { handlers: {}, movable: !1, scalable: !1 },
154
+ "stencil-size": { width: 200, height: 150 },
155
+ "image-restriction": "stencil",
156
+ onChange: re,
157
+ onError: Z
158
+ }, null, 8, ["src"]),
159
+ C(o(oe).FmButton, {
160
+ "aria-label": o(L)("menu.category.image.remove"),
161
+ disabled: s.disabled,
162
+ label: o(L)("menu.category.image.remove"),
163
+ class: "!absolute right-12 top-12 z-10 !h-24 !w-24 !rounded-full !p-0",
164
+ "bg-color": "neutral-white",
165
+ icon: "close",
166
+ variant: "tertiary",
167
+ onClick: T
168
+ }, null, 8, ["aria-label", "disabled", "label"]),
169
+ M.value ? (b(), I(o(oe).FmButton, {
170
+ key: 0,
171
+ "aria-label": o(L)("menu.remy.title"),
172
+ disabled: s.disabled,
173
+ label: o(L)("menu.remy.title"),
174
+ class: "!absolute right-12 top-[44px] z-10 !h-24 !w-24 !rounded-full !p-0",
175
+ "bg-color": "neutral-white",
176
+ icon: "auto_awesome",
177
+ variant: "tertiary",
178
+ onClick: J
179
+ }, null, 8, ["aria-label", "disabled", "label"])) : H("", !0)
180
+ ], 32)
181
+ ])) : (b(), I(o(oe).FmDropField, {
182
+ key: 1,
183
+ accept: ".jpg, .jpeg, .png, .gif, .JPG, .JPEG, .PNG, .GIF",
184
+ "content-class": "h-[150px] w-[200px]",
185
+ disabled: s.disabled,
186
+ onFileUpload: le
187
+ }, {
188
+ label: R(() => [
189
+ h("p", ga, [
190
+ Se(A(o(L)("menu.common.labels.category_image")) + " ", 1),
191
+ h("span", pa, A(o(L)("menu.common.labels.optional")), 1)
192
+ ])
193
+ ]),
194
+ "accept-text": R(() => [
195
+ h("p", fa, A(o(L)("menu.common.file.accepts")), 1)
196
+ ]),
197
+ _: 1
198
+ }, 8, ["disabled"]));
199
+ }
200
+ }), ba = {
201
+ key: 0,
202
+ class: "flex-1 flex justify-between gap-8 pl-8"
203
+ }, ha = { class: "flex items-center" }, wa = {
204
+ key: 1,
205
+ class: "flex items-center gap-8 ml-auto"
206
+ }, ka = {
207
+ key: 0,
208
+ class: "text-fm-color-typo-secondary",
209
+ role: "alert"
210
+ }, _a = {
211
+ key: 1,
212
+ class: "text-fm-color-typo-secondary"
213
+ }, Ca = { class: "w-[320px]" }, xa = { class: "fm-typo-en-title-md-600" }, Sa = { class: "flex flex-col gap-32 h-full min-h-0 py-16" }, La = { class: "flex gap-24 items-center" }, Ua = { class: "text-fm-color-typo-secondary" }, Fa = { class: "flex-1" }, Ra = { class: "flex-1 overflow-hidden min-h-[300px]" }, Pa = { class: "flex gap-8 items-center justify-start" }, qa = /* @__PURE__ */ Re({
214
+ __name: "CategoryList",
215
+ props: {
216
+ sdk: {},
217
+ catalogPage: { type: Boolean, default: !1 },
218
+ heading: { default: "" }
219
+ },
220
+ setup(fe) {
221
+ const k = fe, { t } = Ee(), D = ia(), L = Ye(), { run: B } = ra(), M = ua(k.sdk.category.list), u = F(
222
+ () => M.value.status === "ready" ? M.value.value : null
223
+ ), $ = F(() => {
224
+ var e;
225
+ return ((e = u.value) == null ? void 0 : e.query) ?? "";
226
+ }), g = Y(!1), N = Y(0), d = Y(!1), V = Y(""), f = q(
227
+ k.sdk.category.editor()
228
+ ), y = q(
229
+ f.value.get()
230
+ );
231
+ let z = f.value.subscribe((e) => {
232
+ y.value = e;
233
+ });
234
+ const l = F(
235
+ () => y.value.status === "ready" ? y.value.value : null
236
+ ), le = Fe(() => f.value), re = F(
237
+ () => l.value ? le.issue(l.value.fieldIssues, "name") ?? l.value.nameIssue : null
238
+ ), Z = Y(!1), T = q(null), J = q({ status: "loading" });
239
+ let K = null;
240
+ const s = F(
241
+ () => J.value.status === "ready" ? J.value.value : null
242
+ ), i = Y(!1), r = q(null), U = Fe(() => r.value), m = q({
243
+ status: "loading"
244
+ }), p = F(
245
+ () => m.value.status === "ready" ? m.value.value : null
246
+ );
247
+ let w = null, P = null;
248
+ function Q() {
249
+ var e;
250
+ P == null || P(), P = null, (e = r.value) == null || e.dispose(), r.value = null, w == null || w.dispose(), w = null, m.value = { status: "loading" };
251
+ }
252
+ function j(e, a) {
253
+ var n;
254
+ P == null || P(), (n = r.value) == null || n.dispose(), r.value = k.sdk.item.editor(e, {
255
+ initialCategoryId: a
256
+ }), m.value = r.value.get(), P = r.value.subscribe((_) => {
257
+ m.value = _;
258
+ });
259
+ }
260
+ function G() {
261
+ var a, n;
262
+ const e = (a = l.value) == null ? void 0 : a.categoryId;
263
+ !e || ((n = l.value) == null ? void 0 : n.products.state) !== "allowed" || (Q(), w = k.sdk.item.editorScope(), j(void 0, e), i.value = !0);
264
+ }
265
+ function X(e) {
266
+ var a;
267
+ ((a = l.value) == null ? void 0 : a.products.state) === "allowed" && (Q(), w = k.sdk.item.editorScope(), j(e.id), i.value = !0);
268
+ }
269
+ function ie(e) {
270
+ var n;
271
+ const a = ((n = p.value) == null ? void 0 : n.itemId) ?? void 0;
272
+ w == null || w.select(e), j(a);
273
+ }
274
+ async function ue() {
275
+ const e = r.value;
276
+ if (!e) return;
277
+ (await B(
278
+ () => U.submit(() => e.submit()),
279
+ {
280
+ showLoading: () => {
281
+ var n;
282
+ return ((n = p.value) == null ? void 0 : n.status) === "submitting";
283
+ },
284
+ successMessage: p.value ? D(p.value.saveMessage) : ""
285
+ }
286
+ )).kind === "success" && r.value === e && (i.value = !1);
287
+ }
288
+ function W(e) {
289
+ var a;
290
+ K == null || K(), K = null, e && ((a = T.value) == null || a.dispose()), T.value = null, J.value = { status: "loading" }, Z.value = !1;
291
+ }
292
+ function $e() {
293
+ var a;
294
+ if (((a = l.value) == null ? void 0 : a.translation.state) !== "allowed") return;
295
+ W(!0);
296
+ const e = f.value.translationEditor();
297
+ T.value = e, J.value = e.get(), K = e.subscribe((n) => {
298
+ J.value = n;
299
+ }), Z.value = !0;
300
+ }
301
+ function Ve(e) {
302
+ var _;
303
+ const a = T.value, n = (_ = s.value) == null ? void 0 : _.nameLocale;
304
+ if (!(!a || !n)) {
305
+ for (const v of Object.keys(n))
306
+ v in e || a.removeLocale(v);
307
+ for (const [v, x] of Object.entries(e))
308
+ v in n || a.addLocale(v), a.setNameLocale(v, x);
309
+ }
310
+ }
311
+ async function Ie() {
312
+ const e = T.value;
313
+ if (!e) return;
314
+ (await B(async () => e.apply(), {
315
+ showLoading: !1
316
+ })).kind === "success" && W(!1);
317
+ }
318
+ function he() {
319
+ W(!0);
320
+ }
321
+ function De(e) {
322
+ e ? Z.value = !0 : he();
323
+ }
324
+ function we(e) {
325
+ W(!0), z(), f.value.dispose(), f.value = k.sdk.category.editor(e), N.value++, d.value = !1, y.value = f.value.get(), z = f.value.subscribe((a) => {
326
+ y.value = a;
327
+ });
328
+ }
329
+ function ke() {
330
+ we(), g.value = !0;
331
+ }
332
+ function Be(e) {
333
+ !e.id && !e.isSynthetic || (we(e.isSynthetic ? null : e.id), g.value = !0);
334
+ }
335
+ function ce() {
336
+ W(!0), g.value = !1;
337
+ }
338
+ function _e() {
339
+ var e;
340
+ if (!((e = l.value) != null && e.dirty)) {
341
+ ce();
342
+ return;
343
+ }
344
+ L.open({
345
+ zIndex: 101,
346
+ title: t("menu.common.dialog.dismiss.title"),
347
+ message: t("menu.common.dialog.dismiss.message"),
348
+ primaryActions: {
349
+ text: t("menu.common.dialog.dismiss.discard"),
350
+ close: !0,
351
+ variant: be.Destructive
352
+ },
353
+ secondaryActions: {
354
+ text: t("menu.common.actions.cancel"),
355
+ close: !0
356
+ }
357
+ }).onPrimary(ce);
358
+ }
359
+ function Me(e) {
360
+ e ? g.value = !0 : _e();
361
+ }
362
+ ae(g, (e) => {
363
+ e || W(!0);
364
+ }), ae(i, (e) => {
365
+ e || Q();
366
+ }), ae(y, (e) => {
367
+ T.value && (e.status !== "ready" || e.value.translation.state !== "allowed") && W(!0);
368
+ });
369
+ async function ze() {
370
+ var _, v, x;
371
+ if (d.value) return;
372
+ const e = (_ = l.value) == null ? void 0 : _.mode, a = ((x = (v = l.value) == null ? void 0 : v.name) == null ? void 0 : x.trim()) ?? "";
373
+ (await B(
374
+ () => le.submit(() => f.value.submit()),
375
+ {
376
+ successMessage: e === "update" ? t("menu.category.manager.dialog.update.success", { name: a }) : t("menu.category.manager.dialog.add.success", { name: a }),
377
+ showLoading: () => {
378
+ var O;
379
+ return ((O = l.value) == null ? void 0 : O.status) === "submitting";
380
+ },
381
+ // The approved Storage 403 baseline closes Loading but leaves the image
382
+ // preview and sheet open without a settled snackbar.
383
+ silentFailureCodes: ["menu.category.image.upload_failed"]
384
+ }
385
+ )).kind === "success" && ce();
386
+ }
387
+ function Te(e) {
388
+ e.remove.state !== "allowed" || !e.id || L.open({
389
+ title: t("menu.category.dialog.remove.title"),
390
+ message: t("menu.common.dialog.remove_confirmation", {
391
+ name: e.name
392
+ }),
393
+ primaryActions: {
394
+ text: t("menu.common.actions.remove"),
395
+ close: !0,
396
+ variant: be.Destructive
397
+ },
398
+ secondaryActions: {
399
+ text: t("menu.common.actions.cancel"),
400
+ close: !0
401
+ }
402
+ }).onPrimary(async () => {
403
+ await B(() => k.sdk.category.remove(e.id), {
404
+ successMessage: t("menu.category.dialog.remove.success", {
405
+ name: e.name
406
+ })
407
+ });
408
+ });
409
+ }
410
+ const je = F(() => {
411
+ var e;
412
+ return $.value || ((e = u.value) == null ? void 0 : e.reorder.state) !== "allowed" ? () => !1 : (a) => !a.isSynthetic;
413
+ }), de = q([]);
414
+ ae(
415
+ () => {
416
+ var e;
417
+ return (e = u.value) == null ? void 0 : e.rows;
418
+ },
419
+ (e) => {
420
+ e && (de.value = [...e]);
421
+ },
422
+ { immediate: !0 }
423
+ );
424
+ async function Oe(e) {
425
+ var v, x, O;
426
+ if ($.value || ((v = u.value) == null ? void 0 : v.reorder.state) !== "allowed") return;
427
+ const a = e.map((c) => c.id).filter((c) => !!c);
428
+ if (a.length === 0) return;
429
+ const n = de.value;
430
+ (await B(() => k.sdk.category.reorder(a), {
431
+ successMessage: ((x = u.value) == null ? void 0 : x.reorderScope) === "catalog" ? t("menu.catalog.saved", { name: t("menu.category.entity") }) : t("menu.category.reorder.success")
432
+ })).kind !== "success" && (de.value = [...((O = u.value) == null ? void 0 : O.rows) ?? n]);
433
+ }
434
+ function Ae(e) {
435
+ k.sdk.category.search(e);
436
+ }
437
+ const Ne = F(() => [
438
+ {
439
+ accessorKey: "name",
440
+ header: () => t("menu.category.columns.title"),
441
+ enableSorting: !1,
442
+ meta: { width: "auto" },
443
+ cell: (e) => e.row.original.nameMessage ? D(e.row.original.nameMessage) : e.row.original.name
444
+ },
445
+ {
446
+ accessorKey: "linkedProductCount",
447
+ header: () => t("menu.category.columns.products"),
448
+ enableSorting: !1,
449
+ size: 200,
450
+ // Plural selection is an i18n concern, never a template expression
451
+ // (ADR-0003 §3). The legacy table treats zero and one alike.
452
+ cell: (e) => t("menu.common.labels.product_linked", {
453
+ count: e.row.original.linkedProductCount
454
+ })
455
+ },
456
+ // Catalog scope only changes membership/order. Categories remain master
457
+ // entities, so the scoped table deliberately has no destructive action
458
+ // column — the legacy editor renders just its two data columns there.
459
+ ...k.catalogPage ? [] : [
460
+ {
461
+ id: "actions",
462
+ size: 52,
463
+ meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
464
+ header: "",
465
+ cell: (e) => {
466
+ const a = e.row.original;
467
+ return ge("div", { class: "flex justify-end" }, [
468
+ ge(oe.FmButton, {
469
+ icon: "delete",
470
+ disabled: a.remove.state !== "allowed",
471
+ variant: "tertiary",
472
+ textColor: "neutral-gray-400",
473
+ "aria-label": t("menu.category.dialog.remove.title"),
474
+ onClick: Le(
475
+ () => Te(a),
476
+ ["stop", "prevent"]
477
+ )
478
+ })
479
+ ]);
480
+ }
481
+ }
482
+ ]
483
+ ]), me = F(() => {
484
+ var n;
485
+ const e = ((n = l.value) == null ? void 0 : n.productRows) ?? [], a = V.value.trim().toLocaleLowerCase();
486
+ return a ? e.filter(
487
+ (_) => _.name.toLocaleLowerCase().includes(a) || (_.code ?? "").toLocaleLowerCase().includes(a)
488
+ ) : e;
489
+ }), ve = q([]);
490
+ ae(
491
+ me,
492
+ (e) => {
493
+ ve.value = [...e];
494
+ },
495
+ { immediate: !0 }
496
+ );
497
+ const Ke = F(() => {
498
+ var e, a;
499
+ return me.value.length === 0 ? !1 : V.value || ((e = l.value) == null ? void 0 : e.products.state) !== "allowed" || me.value.length < 2 ? () => !1 : (a = l.value) != null && a.synthetic ? () => !1 : () => !0;
500
+ });
501
+ async function Ge(e) {
502
+ var v, x;
503
+ const a = (v = l.value) == null ? void 0 : v.categoryId;
504
+ if (!a || V.value || ((x = l.value) == null ? void 0 : x.products.state) !== "allowed")
505
+ return;
506
+ const n = ve.value;
507
+ (await B(
508
+ () => k.sdk.item.reorderForCategory(
509
+ a,
510
+ e.map((O) => O.id)
511
+ ),
512
+ {
513
+ successMessage: t("menu.product.table.bulk_edit.saved", {
514
+ count: e.length
515
+ })
516
+ }
517
+ )).kind !== "success" && (ve.value = [...me.value ?? n]);
518
+ }
519
+ const We = F(() => [
520
+ {
521
+ accessorKey: "name",
522
+ header: () => t("menu.category.products.columns.name"),
523
+ enableSorting: !1
524
+ },
525
+ {
526
+ accessorKey: "code",
527
+ header: () => t("menu.category.products.columns.code"),
528
+ enableSorting: !1
529
+ },
530
+ {
531
+ id: "actions",
532
+ size: 52,
533
+ meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
534
+ header: "",
535
+ cell: (e) => ge("div", { class: "flex justify-end" }, [
536
+ ge(oe.FmButton, {
537
+ icon: "edit",
538
+ variant: be.Tertiary,
539
+ textColor: "neutral-gray-400",
540
+ "aria-label": t("menu.common.labels.a11y_labelled_name", {
541
+ label: t("menu.common.actions.edit"),
542
+ name: e.row.original.name
543
+ }),
544
+ onClick: Le(
545
+ () => X(e.row.original),
546
+ ["stop", "prevent"]
547
+ )
548
+ })
549
+ ])
550
+ }
551
+ ]);
552
+ return Pe(() => {
553
+ k.sdk.category.search(""), W(!0), Q(), z(), f.value.dispose();
554
+ }), (e, a) => {
555
+ const n = se("FmButton"), _ = se("FmCircularProgress"), v = se("FmSearch"), x = se("FmTable"), O = se("FmSideSheet");
556
+ return b(), I(la, {
557
+ heading: e.catalogPage ? e.heading : o(t)("menu.category.title")
558
+ }, {
559
+ "prepend-heading": R(() => [
560
+ pe(e.$slots, "prepend-heading")
561
+ ]),
562
+ "append-heading": R(() => {
563
+ var c;
564
+ return [
565
+ e.catalogPage ? H("", !0) : (b(), te("div", ba, [
566
+ h("div", ha, [
567
+ C(ta, {
568
+ value: ((c = u.value) == null ? void 0 : c.totalCount) ?? 0
569
+ }, null, 8, ["value"])
570
+ ]),
571
+ u.value && u.value.totalCount > 0 ? (b(), I(n, {
572
+ key: 0,
573
+ disabled: u.value.create.state !== "allowed",
574
+ label: o(t)("menu.category.add"),
575
+ "prepend-icon": "add",
576
+ onClick: ke
577
+ }, null, 8, ["disabled", "label"])) : H("", !0)
578
+ ])),
579
+ e.catalogPage ? (b(), te("div", wa, [
580
+ pe(e.$slots, "append-heading")
581
+ ])) : pe(e.$slots, "append-heading", { key: 2 })
582
+ ];
583
+ }),
584
+ default: R(() => [
585
+ pe(e.$slots, "navigation"),
586
+ o(M).status === "error" ? (b(), te("p", ka, A(o(D)(o(M).error.message)), 1)) : o(M).status === "unavailable" ? (b(), te("p", _a, A(o(D)(o(M).reason)), 1)) : o(M).status === "loading" ? (b(), I(_, { key: 2 })) : u.value && u.value.rows.length === 0 && !$.value ? (b(), I(o(Ze), {
587
+ key: 3,
588
+ action: e.catalogPage ? void 0 : { text: o(t)("menu.category.add"), callback: ke },
589
+ subtitle: o(t)("menu.category.empty.subtitle"),
590
+ title: o(t)("menu.category.empty.title")
591
+ }, null, 8, ["action", "subtitle", "title"])) : u.value ? (b(), te(He, { key: 4 }, [
592
+ h("div", {
593
+ class: Je(["flex justify-end items-center", { "pt-16": e.catalogPage }])
594
+ }, [
595
+ h("div", Ca, [
596
+ C(v, {
597
+ class: "mb-8",
598
+ "model-value": $.value,
599
+ placeholder: o(t)("menu.common.labels.search_placeholder", {
600
+ type: o(t)("menu.category.title")
601
+ }),
602
+ "onUpdate:modelValue": Ae
603
+ }, null, 8, ["model-value", "placeholder"])
604
+ ])
605
+ ], 2),
606
+ Qe(C(x, {
607
+ "column-defs": Ne.value,
608
+ draggable: je.value,
609
+ "page-size": u.value.rows.length,
610
+ "row-data": de.value,
611
+ "shrink-at": !1,
612
+ "hide-footer": "",
613
+ "pin-header-row": "",
614
+ onDndChanged: Oe,
615
+ onRowClick: a[0] || (a[0] = (c) => Be(c.original))
616
+ }, null, 8, ["column-defs", "draggable", "page-size", "row-data"]), [
617
+ [o(ca), o(t)("menu.category.columns.title")]
618
+ ])
619
+ ], 64)) : H("", !0),
620
+ C(O, {
621
+ "model-value": g.value && !i.value,
622
+ "is-container": o(oe).FmForm,
623
+ "is-container-props": { onValidationSuccess: ze },
624
+ "max-width": 560,
625
+ "z-index": 100,
626
+ "onOn:clickedAway": _e,
627
+ "onUpdate:modelValue": Me
628
+ }, {
629
+ "side-sheet-header": R(() => {
630
+ var c, E;
631
+ return [
632
+ h("p", xa, A((c = l.value) != null && c.synthetic ? o(t)("menu.category.entity") : ((E = l.value) == null ? void 0 : E.mode) === "update" ? o(t)("menu.category.manager.dialog.update.title") : o(t)("menu.category.manager.dialog.add.title")), 1)
633
+ ];
634
+ }),
635
+ "side-sheet-footer": R(() => {
636
+ var c, E, ne;
637
+ return [
638
+ h("div", Pa, [
639
+ ((c = l.value) == null ? void 0 : c.submit.state) !== "hidden" ? (b(), I(n, {
640
+ key: 0,
641
+ disabled: ((E = l.value) == null ? void 0 : E.submit.state) !== "allowed" || d.value,
642
+ label: ((ne = l.value) == null ? void 0 : ne.mode) === "update" ? o(t)("menu.common.actions.update") : o(t)("menu.category.manager.dialog.add.action"),
643
+ size: "lg",
644
+ type: "submit",
645
+ variant: "primary"
646
+ }, null, 8, ["disabled", "label"])) : H("", !0),
647
+ C(n, {
648
+ label: o(t)("menu.common.actions.cancel"),
649
+ size: "lg",
650
+ variant: "tertiary",
651
+ onClick: ce
652
+ }, null, 8, ["label"])
653
+ ])
654
+ ];
655
+ }),
656
+ default: R(() => {
657
+ var c, E, ne;
658
+ return [
659
+ h("div", Sa, [
660
+ C(Ue, {
661
+ title: o(t)("menu.category.detail")
662
+ }, {
663
+ default: R(() => {
664
+ var S, ee;
665
+ return [
666
+ C(oa, Xe({
667
+ "error-messages": re.value ? [o(D)(re.value)] : [],
668
+ label: o(t)("menu.category.name"),
669
+ readonly: (S = l.value) == null ? void 0 : S.synthetic,
670
+ "model-value": ((ee = l.value) == null ? void 0 : ee.name) ?? ""
671
+ }, o(le).field("name", f.value.setName)), {
672
+ append: R(() => {
673
+ var Ce, xe;
674
+ return [
675
+ ((Ce = l.value) == null ? void 0 : Ce.translation.state) !== "hidden" ? (b(), I(n, {
676
+ key: 0,
677
+ "aria-label": o(t)("menu.common.translation.translation_label"),
678
+ disabled: ((xe = l.value) == null ? void 0 : xe.translation.state) !== "allowed",
679
+ class: "!p-0",
680
+ icon: "g_translate",
681
+ variant: "tertiary",
682
+ onClick: $e
683
+ }, null, 8, ["aria-label", "disabled"])) : H("", !0)
684
+ ];
685
+ }),
686
+ _: 1
687
+ }, 16, ["error-messages", "label", "readonly", "model-value"])
688
+ ];
689
+ }),
690
+ _: 1
691
+ }, 8, ["title"]),
692
+ l.value && l.value.image.capability.state !== "hidden" ? (b(), I(ya, {
693
+ key: N.value,
694
+ "thumbnail-url": ((c = l.value) == null ? void 0 : c.image.thumbnailUrl) ?? null,
695
+ change: ((E = l.value) == null ? void 0 : E.image.change) ?? "unchanged",
696
+ disabled: ((ne = l.value) == null ? void 0 : ne.image.capability.state) !== "allowed",
697
+ onSelect: a[1] || (a[1] = (S) => f.value.setImage(S)),
698
+ onClear: a[2] || (a[2] = (S) => f.value.clearImage()),
699
+ onEncoding: a[3] || (a[3] = (S) => d.value = S)
700
+ }, null, 8, ["thumbnail-url", "change", "disabled"])) : H("", !0),
701
+ C(Ue, {
702
+ class: "flex-1 min-h-0",
703
+ shrinkable: !0,
704
+ title: o(t)("menu.category.products.title")
705
+ }, {
706
+ "append-title": R(() => {
707
+ var S;
708
+ return [
709
+ C(n, {
710
+ "border-color": "primary",
711
+ disabled: ((S = l.value) == null ? void 0 : S.products.state) !== "allowed",
712
+ label: o(t)("menu.category.products.add"),
713
+ "prepend-icon": "add",
714
+ "text-color": "primary",
715
+ variant: "secondary",
716
+ onClick: G
717
+ }, null, 8, ["disabled", "label"])
718
+ ];
719
+ }),
720
+ default: R(() => {
721
+ var S;
722
+ return [
723
+ h("div", La, [
724
+ h("div", Ua, A(o(t)("menu.category.products.linked_count", {
725
+ count: ((S = l.value) == null ? void 0 : S.productRows.length) ?? 0
726
+ })), 1),
727
+ h("div", Fa, [
728
+ C(v, {
729
+ modelValue: V.value,
730
+ "onUpdate:modelValue": a[4] || (a[4] = (ee) => V.value = ee),
731
+ placeholder: o(t)("menu.common.actions.search")
732
+ }, null, 8, ["modelValue", "placeholder"])
733
+ ])
734
+ ]),
735
+ h("div", Ra, [
736
+ C(x, {
737
+ "column-defs": We.value,
738
+ draggable: Ke.value,
739
+ "hide-footer": "",
740
+ "pin-header-row": "",
741
+ "row-data": ve.value,
742
+ "shrink-at": !1,
743
+ onDndChanged: Ge,
744
+ onRowClick: a[5] || (a[5] = (ee) => X(ee.original))
745
+ }, null, 8, ["column-defs", "draggable", "row-data"])
746
+ ])
747
+ ];
748
+ }),
749
+ _: 1
750
+ }, 8, ["title"])
751
+ ])
752
+ ];
753
+ }),
754
+ _: 1
755
+ }, 8, ["model-value", "is-container", "is-container-props"]),
756
+ C(na, {
757
+ open: i.value,
758
+ "onUpdate:open": a[6] || (a[6] = (c) => i.value = c),
759
+ sdk: e.sdk,
760
+ session: r.value,
761
+ validation: o(U),
762
+ view: p.value,
763
+ onSelectScope: ie,
764
+ onSubmit: ue
765
+ }, null, 8, ["open", "sdk", "session", "validation", "view"]),
766
+ s.value ? (b(), I(sa, {
767
+ key: 5,
768
+ "model-value": Z.value,
769
+ dirty: s.value.dirty,
770
+ name: s.value.name,
771
+ "name-locale": s.value.nameLocale,
772
+ "supported-locales": s.value.supportedLocales,
773
+ title: o(t)("menu.common.translation.sheet_title", {
774
+ entity: o(t)("menu.category.entity")
775
+ }),
776
+ "name-section-label": o(t)("menu.common.translation.name_section", {
777
+ entity: o(t)("menu.category.entity")
778
+ }),
779
+ "z-index": 200,
780
+ onDiscard: he,
781
+ onSave: Ie,
782
+ "onUpdate:modelValue": De,
783
+ "onUpdate:name": a[7] || (a[7] = (c) => {
784
+ var E;
785
+ return (E = T.value) == null ? void 0 : E.setName(c);
786
+ }),
787
+ "onUpdate:nameLocale": Ve
788
+ }, null, 8, ["model-value", "dirty", "name", "name-locale", "supported-locales", "title", "name-section-label"])) : H("", !0)
789
+ ]),
790
+ _: 3
791
+ }, 8, ["heading"]);
792
+ };
793
+ }
794
+ });
795
+ export {
796
+ qa as _
797
+ };