@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.
- package/README.md +30 -2
- package/dist/AddPriceGroupDialog.vue_vue_type_script_setup_true_lang-DhKyG3gY.js +20 -0
- package/dist/App-C6k--u1c.js +8316 -0
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js +98 -0
- package/dist/BindingLinkDialog.vue_vue_type_script_setup_true_lang-BZVQRyRI.js +180 -0
- package/dist/BindingTable.vue_vue_type_script_setup_true_lang-DBzjWI_6.js +179 -0
- package/dist/Catalog-DEYN4dMN.js +374 -0
- package/dist/CatalogBinding-NnPKdPvx.js +315 -0
- package/dist/CatalogEditTabs.vue_vue_type_script_setup_true_lang-OshqaPTE.js +97 -0
- package/dist/CatalogEditor.vue_vue_type_script_setup_true_lang-poznuDXu.js +447 -0
- package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-BSMAIkQ2.js +117 -0
- package/dist/Category-BdUP0o34.js +13 -0
- package/dist/Category-CkQiwP9e.js +52 -0
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-UgNVpYgp.js +797 -0
- package/dist/CookingGuide-CtDkm74r.js +842 -0
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js +26 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js +1774 -0
- package/dist/Group-D2HngOjr.js +52 -0
- package/dist/Group-DSj7_16V.js +13 -0
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-BmmsSKTt.js +2183 -0
- package/dist/Ingredient-BHqz7kjQ.js +463 -0
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-D9jK-Fhn.js +709 -0
- package/dist/ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js +15 -0
- package/dist/MenuSetting-DF-cJH7N.js +1228 -0
- package/dist/OrderPacing-CejS9dEI.js +698 -0
- package/dist/OrderPacingFields.vue_vue_type_script_setup_true_lang-C2mixGUk.js +55 -0
- package/dist/PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js +41 -0
- package/dist/Preview-1C7jGJuY.js +327 -0
- package/dist/PriceTierNotice.vue_vue_type_script_setup_true_lang-CxKHCptJ.js +26 -0
- package/dist/PrintRoute-BNnMcgTf.js +473 -0
- package/dist/Product-BoUKxogB.js +44 -0
- package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +110 -0
- package/dist/ProductEditorHost.vue_vue_type_script_setup_true_lang-Bm8_FTvr.js +83 -0
- package/dist/ProductFilterMenu.vue_vue_type_script_setup_true_lang-Cgc0Ms_n.js +101 -0
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-Cx_mW05R.js +1246 -0
- package/dist/ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CUeYaXYg.js +1955 -0
- package/dist/ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-CeYyZX7g.js +5401 -0
- package/dist/ProductInternalTools-b3sy8bWy.js +2147 -0
- package/dist/ProductInventoryDialog-DO0D8e3Z.js +4 -0
- package/dist/ProductInventoryDialog.vue_vue_type_script_setup_true_lang-y9Mz__o9.js +187 -0
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-n_UYIwwt.js +10353 -0
- package/dist/ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-ClG3Prfm.js +218 -0
- package/dist/Products-7vlFJB0P.js +155 -0
- package/dist/Publish-DTP-CgV-.js +1261 -0
- package/dist/Recipe-C1W8_15H.js +350 -0
- package/dist/Scheduler-JRjozwP_.js +637 -0
- package/dist/ServingSequence-BGT5m7JB.js +336 -0
- package/dist/Setting-CS_M1gMN.js +173 -0
- package/dist/Subcategory-Cgy9CQCz.js +412 -0
- package/dist/Takeaway-Bpo9XA-j.js +48 -0
- package/dist/Takeaway-DO2dmFGP.js +13 -0
- package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-C7KexF7H.js +554 -0
- package/dist/TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js +161 -0
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js +158 -0
- package/dist/TranslationViewChip.vue_vue_type_script_setup_true_lang-CAkLEmSA.js +69 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BHxmPO7F.js +1213 -0
- package/dist/Unit-Bn5UzMp1.js +385 -0
- package/dist/Variant-DmeGEEkw.js +538 -0
- package/dist/_id_-DC1dJIaj.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-Bd7W2PYm.js +2008 -0
- package/dist/app.js +8 -0
- package/dist/apps/mf-menu/src/App.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/Entry.vue.d.ts +4 -0
- package/dist/apps/mf-menu/src/app.d.ts +16771 -0
- package/dist/apps/mf-menu/src/assets/icons/index.d.ts +4 -0
- package/dist/apps/mf-menu/src/components/CatalogBindingList.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/CatalogList.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/CategoryImageField.vue.d.ts +17 -0
- package/dist/apps/mf-menu/src/components/CategoryList.vue.d.ts +28 -0
- package/dist/apps/mf-menu/src/components/Fields/RangeSlider.vue.d.ts +23 -0
- package/dist/apps/mf-menu/src/components/GroupList.vue.d.ts +28 -0
- package/dist/apps/mf-menu/src/components/GroupTranslationSideSheet.vue.d.ts +14 -0
- package/dist/apps/mf-menu/src/components/IngredientList.vue.d.ts +15 -0
- package/dist/apps/mf-menu/src/components/MenuHeaderContext.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/MenuRestaurantSelector.vue.d.ts +7 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/AddMemberTierDialog.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/AddPriceGroupDialog.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/ConfigurationTab.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/MemberPricingTab.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/PriceGroupTab.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/RuleGroupsTab.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/Navigator.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/OrderPacingList.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/PriceTier/PriceTierNotice.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/PrintRouteList.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/Product/LocalizedCurrencySymbol.vue.d.ts +5 -0
- package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +13 -0
- package/dist/apps/mf-menu/src/components/Product/ProductCategorySelector.vue.d.ts +11 -0
- package/dist/apps/mf-menu/src/components/Product/ProductChipSummary.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/Product/ProductChoicePicker.vue.d.ts +15 -0
- package/dist/apps/mf-menu/src/components/Product/ProductEditorHost.vue.d.ts +26 -0
- package/dist/apps/mf-menu/src/components/Product/ProductFilterMenu.vue.d.ts +26 -0
- package/dist/apps/mf-menu/src/components/Product/ProductForm.vue.d.ts +42 -0
- package/dist/apps/mf-menu/src/components/Product/ProductFormSection.vue.d.ts +41 -0
- package/dist/apps/mf-menu/src/components/Product/ProductGroupCreateSheet.vue.d.ts +19 -0
- package/dist/apps/mf-menu/src/components/Product/ProductGroupSheet.vue.d.ts +56 -0
- package/dist/apps/mf-menu/src/components/Product/ProductInlineCategoryCreateField.vue.d.ts +10 -0
- package/dist/apps/mf-menu/src/components/Product/ProductInlineCreateHost.vue.d.ts +38 -0
- package/dist/apps/mf-menu/src/components/Product/ProductInlineSubcategoryCreateField.vue.d.ts +10 -0
- package/dist/apps/mf-menu/src/components/Product/ProductInventoryDialog.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/Product/ProductLocaleBadge.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/Product/ProductMemberPriceTooltip.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/Product/ProductMoneyField.vue.d.ts +25 -0
- package/dist/apps/mf-menu/src/components/Product/ProductOverviewSheet.vue.d.ts +11 -0
- package/dist/apps/mf-menu/src/components/Product/ProductPacingSheet.vue.d.ts +13 -0
- package/dist/apps/mf-menu/src/components/Product/ProductPriceTierButton.vue.d.ts +11 -0
- package/dist/apps/mf-menu/src/components/Product/ProductPricingSheet.vue.d.ts +26 -0
- package/dist/apps/mf-menu/src/components/Product/ProductPrintRouteSheet.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/Product/ProductQuantityField.vue.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/Product/ProductSummaryCard.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/Product/ProductTakeawaySheet.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/Product/ProductTranslationDialog.vue.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/Product/ProductVariantCreateSheet.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/Product/ProductVariantTranslationSheet.vue.d.ts +13 -0
- package/dist/apps/mf-menu/src/components/Product/inlineCreate.d.ts +23 -0
- package/dist/apps/mf-menu/src/components/Product/labels.d.ts +15 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageBadge.vue.d.ts +7 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageDownloadDialog.vue.d.ts +15 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageFormatChips.vue.d.ts +13 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageLegacyChip.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageProgressDialog.vue.d.ts +11 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageResult.vue.d.ts +14 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageReview.vue.d.ts +21 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageThumb.vue.d.ts +15 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageUpdateFlow.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/BatchImageUpdateSheet.vue.d.ts +34 -0
- package/dist/apps/mf-menu/src/components/ProductBatchImage/batchImageFiles.d.ts +53 -0
- package/dist/apps/mf-menu/src/components/ProductImage/ProductImageCustomFormatDialog.vue.d.ts +40 -0
- package/dist/apps/mf-menu/src/components/ProductImage/ProductImageEditorDialog.vue.d.ts +82 -0
- package/dist/apps/mf-menu/src/components/ProductImage/ProductImageField.vue.d.ts +42 -0
- package/dist/apps/mf-menu/src/components/ProductImage/ProductImageManageSheet.vue.d.ts +47 -0
- package/dist/apps/mf-menu/src/components/ProductImage/ProductImageRegenerateDialog.vue.d.ts +44 -0
- package/dist/apps/mf-menu/src/components/ProductImage/imageBrowser.d.ts +18 -0
- package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +18 -0
- package/dist/apps/mf-menu/src/components/PublishList.vue.d.ts +14 -0
- package/dist/apps/mf-menu/src/components/RecipeList.vue.d.ts +11 -0
- package/dist/apps/mf-menu/src/components/SchedulerList.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/ServingSequenceList.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/SubcategoryList.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/TakeawayList.vue.d.ts +26 -0
- package/dist/apps/mf-menu/src/components/TranslationSideSheet.vue.d.ts +36 -0
- package/dist/apps/mf-menu/src/components/UnitList.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/V3ToV4MigrationBanner.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/V3ToV4MigrationConfirmDialog.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/VariantList.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/catalog/CatalogEditor.vue.d.ts +14 -0
- package/dist/apps/mf-menu/src/components/catalog/CatalogLinkProductAction.vue.d.ts +7 -0
- package/dist/apps/mf-menu/src/components/catalog/CatalogUsage.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/catalog/tableSemantics.d.ts +7 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/feature/CookingGuide/RemoveCookingGuideConfirmation.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/EmptyDataTemplate/Icon.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/EmptyDataTemplate/index.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/feature/EmptyDataTemplate/index.vue.d.ts +18 -0
- package/dist/apps/mf-menu/src/components/feature/InventoryBinding/BindingLinkDialog.vue.d.ts +49 -0
- package/dist/apps/mf-menu/src/components/feature/InventoryBinding/BindingTable.vue.d.ts +38 -0
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +65 -0
- package/dist/apps/mf-menu/src/components/feature/OrderPacing/DeleteOrderPacingConfirmation.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/OrderPacing/OrderPacingFields.vue.d.ts +17 -0
- package/dist/apps/mf-menu/src/components/feature/PrintRoute/RemoveRouteConfirmation.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/TreeEditorOpenner.vue.d.ts +18 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/openner.d.ts +7 -0
- package/dist/apps/mf-menu/src/components/info/TextChip.vue.d.ts +13 -0
- package/dist/apps/mf-menu/src/components/layout/FlatInlineSort.vue.d.ts +25 -0
- package/dist/apps/mf-menu/src/components/layout/FormColumn.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/layout/FormItem.vue.d.ts +17 -0
- package/dist/apps/mf-menu/src/components/layout/FormRow.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/layout/FormSection.vue.d.ts +18 -0
- package/dist/apps/mf-menu/src/components/layout/FullScreenForm.vue.d.ts +31 -0
- package/dist/apps/mf-menu/src/components/layout/FullWrapper.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/layout/LabeledTextField.vue.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/layout/ListCountTag.vue.d.ts +5 -0
- package/dist/apps/mf-menu/src/components/layout/LottieAnimation.vue.d.ts +39 -0
- package/dist/apps/mf-menu/src/components/layout/PageLayout.vue.d.ts +19 -0
- package/dist/apps/mf-menu/src/components/layout/ProgressBar.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/loading/AppLoading.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/loading/PageLoading.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/loading/index.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/placeholder/PlaceholderView.vue.d.ts +5 -0
- package/dist/apps/mf-menu/src/components/preview/MenuPreview.vue.d.ts +13 -0
- package/dist/apps/mf-menu/src/components/preview/simulatorPort.d.ts +23 -0
- package/dist/apps/mf-menu/src/components/publish/PublishRevertPreview.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/publish/PublishScheduleDetails.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/publish/publishStatus.d.ts +15 -0
- package/dist/apps/mf-menu/src/components/translation/TranslationLanguageSelector.vue.d.ts +21 -0
- package/dist/apps/mf-menu/src/components/translation/TranslationViewChip.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/translation/localeName.d.ts +11 -0
- package/dist/apps/mf-menu/src/components/translation/localeSymbol.d.ts +15 -0
- package/dist/apps/mf-menu/src/composable/elementPosition.d.ts +17 -0
- package/dist/apps/mf-menu/src/composable/menuNotifier.d.ts +14 -0
- package/dist/apps/mf-menu/src/composable/navigator.d.ts +16 -0
- package/dist/apps/mf-menu/src/composable/useActionFeedback.d.ts +81 -0
- package/dist/apps/mf-menu/src/composable/useEditorValidation.d.ts +21 -0
- package/dist/apps/mf-menu/src/init.d.ts +1 -0
- package/dist/apps/mf-menu/src/main.d.ts +2 -0
- package/dist/apps/mf-menu/src/plugins.d.ts +4 -0
- package/dist/apps/mf-menu/src/router/index.d.ts +2 -0
- package/dist/apps/mf-menu/src/router/shared.d.ts +65 -0
- package/dist/apps/mf-menu/src/sdk/host.d.ts +9 -0
- package/dist/apps/mf-menu/src/sdk/import-export.d.ts +9 -0
- package/dist/apps/mf-menu/src/sdk/provide.d.ts +33 -0
- package/dist/apps/mf-menu/src/sdk/useReadModel.d.ts +16 -0
- package/dist/apps/mf-menu/src/sdk/useSdkMessage.d.ts +11 -0
- package/dist/apps/mf-menu/src/stores/app.d.ts +17 -0
- package/dist/apps/mf-menu/src/utils/ruleValueKey.d.ts +12 -0
- package/dist/apps/mf-menu/src/utils/worker-loader.d.ts +12 -0
- package/dist/apps/mf-menu/src/utils/worker.d.ts +4 -0
- package/dist/apps/mf-menu/src/views/Catalog/Catalog.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/CatalogEditTabs.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/Category.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/Group.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/MainSetting.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/NamedSetting.vue.d.ts +5 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/Product.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/Setting.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/Takeaway.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/[id].vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/CatalogBinding/CatalogBinding.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Category/Category.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/CookingGuide/CookingGuide.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Group/Group.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/ImportExport/ImportDiffPreview.vue.d.ts +25 -0
- package/dist/apps/mf-menu/src/views/ImportExport/ImportExport.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/views/ImportExport/ImportV3DiffPreview.vue.d.ts +26 -0
- package/dist/apps/mf-menu/src/views/ImportExport/PreviewImportTable.vue.d.ts +30 -0
- package/dist/apps/mf-menu/src/views/Ingredient/Ingredient.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/CategoryRenameDialog.vue.d.ts +26 -0
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/DetailPane.vue.d.ts +23 -0
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/EditorHistoryControls.vue.d.ts +22 -0
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/MenuManagementEditor.vue.d.ts +10 -0
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/ScopeSwitcher.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/TreeFilter.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/TreePanel.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/TreeRow.vue.d.ts +25 -0
- package/dist/apps/mf-menu/src/views/MenuSetting/MenuSetting.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/OrderPacing/OrderPacing.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Preview/Preview.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/PrintRoute/PrintRoute.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Product/ProductInternalTools.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Product/Products.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Publish/Publish.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Recipe/Recipe.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Scheduler/Scheduler.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/ServingSequence/ServingSequence.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Subcategory/Subcategory.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Takeaway/Takeaway.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Unit/Unit.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Variant/Variant.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/workers/menu-compute.d.ts +1 -0
- package/dist/apps/mf-menu/src/workers/validate-menu.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -0
- package/dist/assets/menu-compute-okel5FLc.js +260 -0
- package/dist/assets/validate-menu-DEFGpnQh.js +130 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-CGPDazqs.js +57 -0
- package/dist/mf-menu-portal.css +1 -0
- package/dist/provide-Tmjfji09.js +190840 -0
- package/dist/ruleValueKey-BF52PuHb.js +10 -0
- package/dist/tableSemantics-C9WFO_I_.js +22 -0
- package/dist/useActionFeedback-DoFeBFpl.js +95 -0
- package/dist/useEditorValidation-Ctef5Bxt.js +63 -0
- package/package.json +79 -3
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { defineComponent as P, computed as h, h as s, resolveComponent as b, openBlock as r, createBlock as v, ref as q, shallowRef as te, withModifiers as U, onUnmounted as oe, unref as l, withCtx as y, createElementBlock as C, toDisplayString as G, createVNode as g, Fragment as I, createElementVNode as V, withDirectives as K, createCommentVNode as A, renderList as le } from "vue";
|
|
2
|
+
import { useRouter as se } from "vue-router";
|
|
3
|
+
import { useI18n as W } from "@feedmepos/mf-common";
|
|
4
|
+
import { components as E, useDialog as ne, FmButtonVariant as $ } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as re } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
6
|
+
import { R as B, _ as ue } from "./app-Bd7W2PYm.js";
|
|
7
|
+
import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
8
|
+
import { _ as ie } from "./CatalogEditor.vue_vue_type_script_setup_true_lang-poznuDXu.js";
|
|
9
|
+
import { b as H, u as de, a as me } from "./provide-Tmjfji09.js";
|
|
10
|
+
import { u as pe } from "./useActionFeedback-DoFeBFpl.js";
|
|
11
|
+
const ge = /* @__PURE__ */ P({
|
|
12
|
+
__name: "CatalogUsage",
|
|
13
|
+
props: {
|
|
14
|
+
catalog: {}
|
|
15
|
+
},
|
|
16
|
+
setup(x) {
|
|
17
|
+
const n = x, { t: u } = W(), m = H(), S = h(
|
|
18
|
+
() => n.catalog.restaurants.length ? n.catalog.restaurants : [{ id: "", name: u("menu.catalog.empty_value"), methods: [] }]
|
|
19
|
+
), k = h(() => [...S.value]), L = h(() => [
|
|
20
|
+
{
|
|
21
|
+
accessorKey: "name",
|
|
22
|
+
enableSorting: !1,
|
|
23
|
+
meta: { headerClass: "px-16 py-4" },
|
|
24
|
+
header: () => s("div", { class: "flex flex-col" }, [
|
|
25
|
+
s(
|
|
26
|
+
"p",
|
|
27
|
+
n.catalog.nameMessage ? m(n.catalog.nameMessage) : n.catalog.name
|
|
28
|
+
),
|
|
29
|
+
s(
|
|
30
|
+
"p",
|
|
31
|
+
{ class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" },
|
|
32
|
+
u("menu.catalog.usage.tax_label", {
|
|
33
|
+
mode: m(n.catalog.taxMode)
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
]),
|
|
37
|
+
cell: (i) => s("div", { class: "space-y-4" }, [
|
|
38
|
+
s("p", i.row.original.name),
|
|
39
|
+
s(
|
|
40
|
+
"p",
|
|
41
|
+
{ class: "text-fm-color-typo-secondary" },
|
|
42
|
+
i.row.original.id
|
|
43
|
+
)
|
|
44
|
+
])
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "usage",
|
|
48
|
+
enableSorting: !1,
|
|
49
|
+
meta: { headerClass: "px-16 py-4" },
|
|
50
|
+
header: () => s("div", { class: "w-full flex justify-between" }, [
|
|
51
|
+
s("p", u("menu.catalog.usage.usage")),
|
|
52
|
+
s(
|
|
53
|
+
E.FmChip,
|
|
54
|
+
{
|
|
55
|
+
class: "px-8 py-4 text-fm-color-typo-info bg-fm-color-system-info-100"
|
|
56
|
+
},
|
|
57
|
+
() => u("menu.catalog.usage.products", {
|
|
58
|
+
count: n.catalog.totalProducts
|
|
59
|
+
})
|
|
60
|
+
)
|
|
61
|
+
]),
|
|
62
|
+
cell: (i) => s(
|
|
63
|
+
"p",
|
|
64
|
+
{ class: "flex py-8" },
|
|
65
|
+
i.row.original.methods.map(m).join(u("menu.catalog.list_separator")) || u("menu.catalog.empty_value")
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
]);
|
|
69
|
+
return (i, f) => {
|
|
70
|
+
const t = b("FmTable");
|
|
71
|
+
return r(), v(t, {
|
|
72
|
+
"column-defs": L.value,
|
|
73
|
+
"row-data": k.value,
|
|
74
|
+
"page-size": S.value.length,
|
|
75
|
+
virtual: !0,
|
|
76
|
+
"hide-footer": !0,
|
|
77
|
+
"shrink-at": !1
|
|
78
|
+
}, null, 8, ["column-defs", "row-data", "page-size"]);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}), ve = {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: "ml-auto flex gap-8"
|
|
84
|
+
}, fe = {
|
|
85
|
+
key: 0,
|
|
86
|
+
role: "status"
|
|
87
|
+
}, _e = { class: "flex justify-end items-center" }, ye = { class: "w-[320px]" }, be = { class: "fm-typo-en-title-md-600" }, he = {
|
|
88
|
+
key: 0,
|
|
89
|
+
class: "space-y-24"
|
|
90
|
+
}, ke = /* @__PURE__ */ P({
|
|
91
|
+
__name: "CatalogList",
|
|
92
|
+
props: {
|
|
93
|
+
sdk: {}
|
|
94
|
+
},
|
|
95
|
+
setup(x) {
|
|
96
|
+
const n = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), S = {
|
|
97
|
+
mounted: (e, a) => {
|
|
98
|
+
u.set(e, a.value);
|
|
99
|
+
const c = new MutationObserver(
|
|
100
|
+
() => k(e, u.get(e) ?? a.value)
|
|
101
|
+
);
|
|
102
|
+
c.observe(e, {
|
|
103
|
+
attributes: !0,
|
|
104
|
+
attributeFilter: ["aria-label"]
|
|
105
|
+
}), n.set(e, c), k(e, a.value);
|
|
106
|
+
},
|
|
107
|
+
updated: (e, a) => {
|
|
108
|
+
u.set(e, a.value), k(e, a.value);
|
|
109
|
+
},
|
|
110
|
+
beforeUnmount: (e) => {
|
|
111
|
+
var a;
|
|
112
|
+
return (a = n.get(e)) == null ? void 0 : a.disconnect();
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
function k(e, a) {
|
|
116
|
+
(() => {
|
|
117
|
+
var d;
|
|
118
|
+
e.removeAttribute("aria-label"), (d = e.querySelector("input")) == null || d.setAttribute("aria-label", a);
|
|
119
|
+
})();
|
|
120
|
+
}
|
|
121
|
+
const L = {
|
|
122
|
+
mounted: (e) => {
|
|
123
|
+
const a = new MutationObserver(
|
|
124
|
+
() => i(e)
|
|
125
|
+
);
|
|
126
|
+
a.observe(e, { childList: !0, subtree: !0 }), m.set(e, a), i(e);
|
|
127
|
+
},
|
|
128
|
+
updated: (e) => i(e),
|
|
129
|
+
beforeUnmount: (e) => {
|
|
130
|
+
var a;
|
|
131
|
+
return (a = m.get(e)) == null ? void 0 : a.disconnect();
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
function i(e) {
|
|
135
|
+
e.querySelectorAll(".virtual-list > div").forEach((a) => {
|
|
136
|
+
a.setAttribute("role", "row");
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
const f = x, { t } = W(), T = H(), R = se(), J = ne(), { run: D } = pe(), _ = de(f.sdk.catalog.list), o = h(
|
|
140
|
+
() => _.value.status === "ready" ? _.value.value : null
|
|
141
|
+
), Q = h(() => {
|
|
142
|
+
var e;
|
|
143
|
+
return [...((e = o.value) == null ? void 0 : e.rows) ?? []];
|
|
144
|
+
}), F = q(!1), z = q(0), w = te(null);
|
|
145
|
+
function N() {
|
|
146
|
+
var e;
|
|
147
|
+
(e = w.value) == null || e.dispose(), w.value = null;
|
|
148
|
+
}
|
|
149
|
+
function O(e) {
|
|
150
|
+
N(), z.value++, w.value = f.sdk.catalog.editor(e);
|
|
151
|
+
}
|
|
152
|
+
async function j(e) {
|
|
153
|
+
const a = await D(async () => f.sdk.catalog.open(e.id), {
|
|
154
|
+
showLoading: !1
|
|
155
|
+
});
|
|
156
|
+
a.kind === "success" && await R.push({
|
|
157
|
+
name: B.EDIT_CATALOG_PRODUCT,
|
|
158
|
+
params: { id: a.value.id }
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
async function X(e) {
|
|
162
|
+
const a = await D(
|
|
163
|
+
async () => f.sdk.catalog.prepareRemove(e.id),
|
|
164
|
+
{ showLoading: !1 }
|
|
165
|
+
);
|
|
166
|
+
a.kind === "success" && J.open({
|
|
167
|
+
title: t("menu.catalog.dialogs.remove.title"),
|
|
168
|
+
message: t("menu.catalog.dialogs.remove.message", {
|
|
169
|
+
name: a.value.name
|
|
170
|
+
}),
|
|
171
|
+
primaryActions: {
|
|
172
|
+
text: t("menu.common.actions.remove"),
|
|
173
|
+
close: !0,
|
|
174
|
+
variant: $.Destructive
|
|
175
|
+
},
|
|
176
|
+
secondaryActions: {
|
|
177
|
+
text: t("menu.common.actions.cancel"),
|
|
178
|
+
close: !0
|
|
179
|
+
}
|
|
180
|
+
}).onPrimary(async () => {
|
|
181
|
+
(await D(() => f.sdk.catalog.remove(e.id), {
|
|
182
|
+
showLoading: () => {
|
|
183
|
+
var d;
|
|
184
|
+
return ((d = o.value) == null ? void 0 : d.busy) === !0;
|
|
185
|
+
},
|
|
186
|
+
successMessage: (d) => t("menu.catalog.removed", { name: d.name })
|
|
187
|
+
})).kind === "success" && await R.push({ name: B.CATALOG });
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
const Y = h(() => [
|
|
191
|
+
{
|
|
192
|
+
accessorKey: "name",
|
|
193
|
+
header: () => t("menu.catalog.table.columns.title"),
|
|
194
|
+
cell: (e) => s(
|
|
195
|
+
"a",
|
|
196
|
+
{
|
|
197
|
+
href: R.resolve({
|
|
198
|
+
name: B.EDIT_CATALOG_PRODUCT,
|
|
199
|
+
params: { id: e.row.original.id }
|
|
200
|
+
}).href,
|
|
201
|
+
class: "text-inherit no-underline",
|
|
202
|
+
onClick: U(
|
|
203
|
+
() => j(e.row.original),
|
|
204
|
+
["prevent", "stop"]
|
|
205
|
+
)
|
|
206
|
+
},
|
|
207
|
+
e.row.original.name
|
|
208
|
+
),
|
|
209
|
+
enableSorting: !1
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: "taxMode",
|
|
213
|
+
header: () => t("menu.catalog.table.columns.tax_calculation"),
|
|
214
|
+
cell: (e) => T(e.row.original.taxMode),
|
|
215
|
+
enableSorting: !1
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: "autoLink",
|
|
219
|
+
header: () => t("menu.catalog.table.columns.auto_link"),
|
|
220
|
+
cell: (e) => T(e.row.original.autoLink),
|
|
221
|
+
enableSorting: !1
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: "actions",
|
|
225
|
+
header: "",
|
|
226
|
+
size: 52,
|
|
227
|
+
meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
|
|
228
|
+
cell: (e) => {
|
|
229
|
+
var a, c;
|
|
230
|
+
return s("div", { class: "flex justify-end" }, [
|
|
231
|
+
s(E.FmButton, {
|
|
232
|
+
icon: "file_copy",
|
|
233
|
+
variant: $.Tertiary,
|
|
234
|
+
textColor: "neutral-gray-400",
|
|
235
|
+
disabled: (a = o.value) == null ? void 0 : a.busy,
|
|
236
|
+
"aria-label": t("menu.catalog.actions.duplicate"),
|
|
237
|
+
onClick: U(
|
|
238
|
+
() => O(e.row.original.id),
|
|
239
|
+
["stop", "prevent"]
|
|
240
|
+
)
|
|
241
|
+
}),
|
|
242
|
+
s(E.FmButton, {
|
|
243
|
+
icon: "delete",
|
|
244
|
+
variant: $.Tertiary,
|
|
245
|
+
textColor: "neutral-gray-400",
|
|
246
|
+
disabled: (c = o.value) == null ? void 0 : c.busy,
|
|
247
|
+
"aria-label": t("menu.catalog.dialogs.remove.title"),
|
|
248
|
+
onClick: U(
|
|
249
|
+
() => X(e.row.original),
|
|
250
|
+
["stop", "prevent"]
|
|
251
|
+
)
|
|
252
|
+
})
|
|
253
|
+
]);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
]);
|
|
257
|
+
return oe(N), (e, a) => {
|
|
258
|
+
const c = b("FmButton"), d = b("FmLinearProgress"), Z = b("FmSearch"), ee = b("FmTable"), ae = b("FmSideSheet");
|
|
259
|
+
return r(), v(re, {
|
|
260
|
+
heading: l(t)("menu.catalog.title")
|
|
261
|
+
}, {
|
|
262
|
+
"append-heading": y(() => [
|
|
263
|
+
o.value && o.value.totalCount > 0 ? (r(), C("div", ve, [
|
|
264
|
+
g(c, {
|
|
265
|
+
label: l(t)("menu.catalog.actions.view_usage"),
|
|
266
|
+
variant: "secondary",
|
|
267
|
+
onClick: a[0] || (a[0] = (M) => F.value = !0)
|
|
268
|
+
}, null, 8, ["label"]),
|
|
269
|
+
g(c, {
|
|
270
|
+
label: l(t)("menu.catalog.actions.add"),
|
|
271
|
+
"prepend-icon": "add",
|
|
272
|
+
disabled: o.value ? o.value.create.state !== "allowed" : !1,
|
|
273
|
+
onClick: a[1] || (a[1] = (M) => O())
|
|
274
|
+
}, null, 8, ["label", "disabled"])
|
|
275
|
+
])) : A("", !0)
|
|
276
|
+
]),
|
|
277
|
+
default: y(() => {
|
|
278
|
+
var M;
|
|
279
|
+
return [
|
|
280
|
+
l(_).status === "unavailable" ? (r(), C("p", fe, G(l(T)(l(_).reason)), 1)) : !o.value && l(_).status !== "error" ? (r(), v(d, { key: 1 })) : l(_).status === "error" || ((M = o.value) == null ? void 0 : M.totalCount) === 0 ? (r(), v(l(ce), {
|
|
281
|
+
key: 2,
|
|
282
|
+
title: l(t)("menu.catalog.empty.title"),
|
|
283
|
+
subtitle: l(t)("menu.catalog.empty.subtitle")
|
|
284
|
+
}, {
|
|
285
|
+
action: y(() => [
|
|
286
|
+
g(c, {
|
|
287
|
+
label: l(t)("menu.catalog.actions.add"),
|
|
288
|
+
"prepend-icon": "add",
|
|
289
|
+
disabled: o.value ? o.value.create.state !== "allowed" : !1,
|
|
290
|
+
onClick: a[2] || (a[2] = (p) => O())
|
|
291
|
+
}, null, 8, ["label", "disabled"])
|
|
292
|
+
]),
|
|
293
|
+
_: 1
|
|
294
|
+
}, 8, ["title", "subtitle"])) : o.value ? (r(), C(I, { key: 3 }, [
|
|
295
|
+
V("div", _e, [
|
|
296
|
+
V("div", ye, [
|
|
297
|
+
K(g(Z, {
|
|
298
|
+
autofocus: "",
|
|
299
|
+
class: "mb-8",
|
|
300
|
+
"model-value": o.value.query,
|
|
301
|
+
placeholder: l(t)("menu.common.labels.search_placeholder", {
|
|
302
|
+
type: l(t)("menu.catalog.title")
|
|
303
|
+
}),
|
|
304
|
+
"onUpdate:modelValue": e.sdk.catalog.search
|
|
305
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]), [
|
|
306
|
+
[
|
|
307
|
+
S,
|
|
308
|
+
l(t)("menu.common.labels.search_placeholder", {
|
|
309
|
+
type: l(t)("menu.catalog.title")
|
|
310
|
+
})
|
|
311
|
+
]
|
|
312
|
+
])
|
|
313
|
+
])
|
|
314
|
+
]),
|
|
315
|
+
g(ue, null, {
|
|
316
|
+
default: y(() => [
|
|
317
|
+
K(g(ee, {
|
|
318
|
+
"column-defs": Y.value,
|
|
319
|
+
"row-data": Q.value,
|
|
320
|
+
"page-size": o.value.rows.length,
|
|
321
|
+
"hide-footer": !0,
|
|
322
|
+
"shrink-at": !1,
|
|
323
|
+
virtual: !0,
|
|
324
|
+
"search-value": o.value.query,
|
|
325
|
+
onRowClick: a[3] || (a[3] = (p) => j(p.original))
|
|
326
|
+
}, null, 8, ["column-defs", "row-data", "page-size", "search-value"]), [
|
|
327
|
+
[L]
|
|
328
|
+
])
|
|
329
|
+
]),
|
|
330
|
+
_: 1
|
|
331
|
+
})
|
|
332
|
+
], 64)) : A("", !0),
|
|
333
|
+
g(ae, {
|
|
334
|
+
modelValue: F.value,
|
|
335
|
+
"onUpdate:modelValue": a[4] || (a[4] = (p) => F.value = p),
|
|
336
|
+
"max-width": 1e3,
|
|
337
|
+
"dismiss-away": ""
|
|
338
|
+
}, {
|
|
339
|
+
"side-sheet-header": y(() => [
|
|
340
|
+
V("p", be, G(l(t)("menu.catalog.usage.title")), 1)
|
|
341
|
+
]),
|
|
342
|
+
default: y(() => [
|
|
343
|
+
F.value && o.value ? (r(), C("div", he, [
|
|
344
|
+
(r(!0), C(I, null, le(o.value.usage, (p) => (r(), v(ge, {
|
|
345
|
+
key: p.id,
|
|
346
|
+
catalog: p
|
|
347
|
+
}, null, 8, ["catalog"]))), 128))
|
|
348
|
+
])) : A("", !0)
|
|
349
|
+
]),
|
|
350
|
+
_: 1
|
|
351
|
+
}, 8, ["modelValue"]),
|
|
352
|
+
w.value ? (r(), v(ie, {
|
|
353
|
+
key: z.value,
|
|
354
|
+
sdk: e.sdk,
|
|
355
|
+
editor: w.value,
|
|
356
|
+
picker: e.sdk.linkProduct.catalogue,
|
|
357
|
+
onClose: N
|
|
358
|
+
}, null, 8, ["sdk", "editor", "picker"])) : A("", !0)
|
|
359
|
+
];
|
|
360
|
+
}),
|
|
361
|
+
_: 1
|
|
362
|
+
}, 8, ["heading"]);
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}), De = /* @__PURE__ */ P({
|
|
366
|
+
__name: "Catalog",
|
|
367
|
+
setup(x) {
|
|
368
|
+
const n = me();
|
|
369
|
+
return (u, m) => (r(), v(ke, { sdk: l(n) }, null, 8, ["sdk"]));
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
export {
|
|
373
|
+
De as default
|
|
374
|
+
};
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { defineComponent as N, computed as p, h as P, withModifiers as R, watch as T, shallowRef as M, onUnmounted as ee, resolveComponent as v, openBlock as i, createBlock as y, unref as t, withCtx as _, createElementVNode as d, toDisplayString as o, createElementBlock as x, Fragment as U, createVNode as s, renderList as ae, createCommentVNode as le, createSlots as te } from "vue";
|
|
2
|
+
import { useI18n as ne } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as oe, useDialog as se, components as ie } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
|
+
import { _ as ue } from "./app-Bd7W2PYm.js";
|
|
6
|
+
import { _ as de } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
7
|
+
import { u as ce } from "./useActionFeedback-DoFeBFpl.js";
|
|
8
|
+
import { b as me, u as re, a as ge } from "./provide-Tmjfji09.js";
|
|
9
|
+
const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary" }, fe = { class: "flex grow flex-col gap-4" }, pe = { class: "fm-typo-en-body-lg-600" }, ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _e = { class: "fm-typo-en-title-md-600" }, ye = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "text-fm-color-typo-secondary",
|
|
12
|
+
role: "status"
|
|
13
|
+
}, ke = { class: "flex items-center justify-start gap-8" }, Ce = /* @__PURE__ */ N({
|
|
14
|
+
__name: "CatalogBindingList",
|
|
15
|
+
props: {
|
|
16
|
+
sdk: {}
|
|
17
|
+
},
|
|
18
|
+
setup(K) {
|
|
19
|
+
const k = K, { t: a } = ne(), h = me(), O = oe(), j = se(), { run: E } = ce(), f = re(
|
|
20
|
+
k.sdk.catalogBinding.binding
|
|
21
|
+
), $ = p(
|
|
22
|
+
() => f.value.status === "ready" ? f.value.value : null
|
|
23
|
+
), z = p(() => f.value.status === "loading"), F = p(() => {
|
|
24
|
+
var e;
|
|
25
|
+
return ((e = $.value) == null ? void 0 : e.edit.state) === "allowed";
|
|
26
|
+
});
|
|
27
|
+
function S(e) {
|
|
28
|
+
return e.kind === "main" ? a("menu.catalog_binding.catalog.main") : e.kind === "missing" ? a("menu.catalog_binding.catalog.invalid") : e.name;
|
|
29
|
+
}
|
|
30
|
+
const B = p(
|
|
31
|
+
() => {
|
|
32
|
+
var e;
|
|
33
|
+
return (((e = $.value) == null ? void 0 : e.rows) ?? []).map((l) => ({
|
|
34
|
+
id: l.restaurantId,
|
|
35
|
+
restaurant: l.restaurantLabel,
|
|
36
|
+
defaultCatalog: S(l.defaultCatalog),
|
|
37
|
+
takeawayCatalog: S(l.takeawayCatalog),
|
|
38
|
+
pickupCatalog: S(l.pickupCatalog)
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
), q = p(() => [
|
|
42
|
+
{
|
|
43
|
+
accessorKey: "restaurant",
|
|
44
|
+
header: () => a("menu.catalog_binding.table.columns.restaurant"),
|
|
45
|
+
enableSorting: !1
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
accessorKey: "defaultCatalog",
|
|
49
|
+
header: () => a("menu.catalog_binding.table.columns.default"),
|
|
50
|
+
enableSorting: !1
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
accessorKey: "takeawayCatalog",
|
|
54
|
+
header: () => a("menu.catalog_binding.table.columns.pos_takeaway"),
|
|
55
|
+
enableSorting: !1
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
accessorKey: "pickupCatalog",
|
|
59
|
+
header: () => a("menu.catalog_binding.table.columns.pickup"),
|
|
60
|
+
enableSorting: !1
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
accessorKey: "id",
|
|
64
|
+
header: "",
|
|
65
|
+
size: 52,
|
|
66
|
+
enableSorting: !1,
|
|
67
|
+
meta: { width: "52px" },
|
|
68
|
+
cell: () => P("div", { class: "flex justify-end" }, [
|
|
69
|
+
P(ie.FmButton, {
|
|
70
|
+
icon: "edit",
|
|
71
|
+
variant: "tertiary",
|
|
72
|
+
textColor: "neutral-gray-400",
|
|
73
|
+
disabled: !F.value,
|
|
74
|
+
"aria-label": a("menu.common.actions.edit"),
|
|
75
|
+
onClick: R(() => w(), ["stop", "prevent"])
|
|
76
|
+
})
|
|
77
|
+
])
|
|
78
|
+
}
|
|
79
|
+
]);
|
|
80
|
+
T(
|
|
81
|
+
() => f.value,
|
|
82
|
+
(e, l) => {
|
|
83
|
+
e.status === "error" && (l == null ? void 0 : l.status) !== "error" && O.open({
|
|
84
|
+
type: "error",
|
|
85
|
+
message: h(e.error.message)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
async function G() {
|
|
90
|
+
await k.sdk.catalogBinding.retry();
|
|
91
|
+
}
|
|
92
|
+
const c = M(!1), m = M(null), r = M(
|
|
93
|
+
null
|
|
94
|
+
);
|
|
95
|
+
let u = null;
|
|
96
|
+
function w() {
|
|
97
|
+
if (!F.value) return;
|
|
98
|
+
V();
|
|
99
|
+
const e = k.sdk.catalogBinding.edit();
|
|
100
|
+
m.value = e, r.value = e.state.get(), u = e.state.subscribe((l) => {
|
|
101
|
+
r.value = l;
|
|
102
|
+
}), c.value = !0;
|
|
103
|
+
}
|
|
104
|
+
function V() {
|
|
105
|
+
var e;
|
|
106
|
+
u == null || u(), u = null, (e = m.value) == null || e.dispose(), m.value = null, r.value = null;
|
|
107
|
+
}
|
|
108
|
+
T(c, (e) => {
|
|
109
|
+
e || V();
|
|
110
|
+
}), ee(V);
|
|
111
|
+
const g = p(
|
|
112
|
+
() => {
|
|
113
|
+
var e;
|
|
114
|
+
return ((e = r.value) == null ? void 0 : e.status) === "ready" ? r.value.value : null;
|
|
115
|
+
}
|
|
116
|
+
), I = p(
|
|
117
|
+
() => {
|
|
118
|
+
var e;
|
|
119
|
+
return (((e = g.value) == null ? void 0 : e.options) ?? []).map((l) => ({
|
|
120
|
+
label: l.label.kind === "main" ? a("menu.catalog_binding.dialog.use_main") : l.label.name,
|
|
121
|
+
value: l.catalogId
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
function H() {
|
|
126
|
+
var e;
|
|
127
|
+
if (!((e = g.value) != null && e.hasChanges)) {
|
|
128
|
+
c.value = !1;
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
j.open({
|
|
132
|
+
title: a("menu.common.dialog.dismiss.title"),
|
|
133
|
+
message: a("menu.common.dialog.dismiss.message"),
|
|
134
|
+
primaryActions: {
|
|
135
|
+
text: a("menu.common.dialog.dismiss.discard"),
|
|
136
|
+
close: !0
|
|
137
|
+
},
|
|
138
|
+
secondaryActions: {
|
|
139
|
+
text: a("menu.common.actions.cancel"),
|
|
140
|
+
close: !0
|
|
141
|
+
}
|
|
142
|
+
}).onPrimary(() => {
|
|
143
|
+
c.value = !1;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
async function J() {
|
|
147
|
+
const e = m.value;
|
|
148
|
+
if (e) {
|
|
149
|
+
u == null || u(), u = null, m.value = null, r.value = null, c.value = !1;
|
|
150
|
+
try {
|
|
151
|
+
await E(() => e.submit(), {
|
|
152
|
+
loadingTitle: a("menu.catalog_binding.status.saving"),
|
|
153
|
+
loadingMessage: a("menu.common.loading"),
|
|
154
|
+
successMessage: a("menu.catalog_binding.status.saved")
|
|
155
|
+
});
|
|
156
|
+
} finally {
|
|
157
|
+
e.dispose();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return (e, l) => {
|
|
162
|
+
const Q = v("FmTable"), L = v("FmButton"), W = v("FmListItem"), X = v("FmList"), A = v("FmSelect"), Y = v("FmCircularProgress"), Z = v("FmSideSheet");
|
|
163
|
+
return i(), y(de, {
|
|
164
|
+
heading: t(a)("menu.catalog_binding.title")
|
|
165
|
+
}, {
|
|
166
|
+
default: _(() => [
|
|
167
|
+
d("p", be, o(t(a)("menu.catalog_binding.subtitle")), 1),
|
|
168
|
+
B.value.length > 0 || z.value ? (i(), x(U, { key: 0 }, [
|
|
169
|
+
s(ue, { class: "block xs:hidden" }, {
|
|
170
|
+
default: _(() => [
|
|
171
|
+
s(Q, {
|
|
172
|
+
"get-row-id": (n) => n.id,
|
|
173
|
+
"column-defs": q.value,
|
|
174
|
+
loading: z.value,
|
|
175
|
+
"page-size": 1,
|
|
176
|
+
"row-data": B.value,
|
|
177
|
+
"shrink-at": !1,
|
|
178
|
+
"hide-footer": "",
|
|
179
|
+
"pin-header-row": "",
|
|
180
|
+
onRowClick: w
|
|
181
|
+
}, null, 8, ["get-row-id", "column-defs", "loading", "row-data"])
|
|
182
|
+
]),
|
|
183
|
+
_: 1
|
|
184
|
+
}),
|
|
185
|
+
s(X, {
|
|
186
|
+
class: "hidden min-h-0 w-full flex-1 flex-col overflow-auto pb-64 xs:flex",
|
|
187
|
+
separator: ""
|
|
188
|
+
}, {
|
|
189
|
+
default: _(() => [
|
|
190
|
+
(i(!0), x(U, null, ae(B.value, (n) => (i(), y(W, {
|
|
191
|
+
key: n.id,
|
|
192
|
+
label: n.restaurant,
|
|
193
|
+
class: "py-12",
|
|
194
|
+
onClick: w
|
|
195
|
+
}, {
|
|
196
|
+
default: _(() => [
|
|
197
|
+
d("div", fe, [
|
|
198
|
+
d("div", pe, o(n.restaurant), 1),
|
|
199
|
+
d("div", ve, [
|
|
200
|
+
d("div", null, o(t(a)("menu.catalog_binding.table.columns.default")) + ": " + o(n.defaultCatalog), 1),
|
|
201
|
+
d("div", null, o(t(a)("menu.catalog_binding.table.columns.pos_takeaway")) + ": " + o(n.takeawayCatalog), 1),
|
|
202
|
+
d("div", null, o(t(a)("menu.catalog_binding.table.columns.pickup")) + ": " + o(n.pickupCatalog), 1)
|
|
203
|
+
])
|
|
204
|
+
]),
|
|
205
|
+
s(L, {
|
|
206
|
+
"aria-label": t(a)("menu.common.actions.edit"),
|
|
207
|
+
disabled: !F.value,
|
|
208
|
+
icon: "edit",
|
|
209
|
+
variant: "tertiary",
|
|
210
|
+
onClick: R(w, ["stop"])
|
|
211
|
+
}, null, 8, ["aria-label", "disabled"])
|
|
212
|
+
]),
|
|
213
|
+
_: 2
|
|
214
|
+
}, 1032, ["label"]))), 128))
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
})
|
|
218
|
+
], 64)) : t(f).status === "error" ? (i(), y(t(D), {
|
|
219
|
+
key: 1,
|
|
220
|
+
title: t(a)("menu.catalog_binding.load_failed.title"),
|
|
221
|
+
subtitle: t(a)("menu.catalog_binding.load_failed.subtitle"),
|
|
222
|
+
action: {
|
|
223
|
+
text: t(a)("menu.catalog_binding.load_failed.action"),
|
|
224
|
+
icon: "refresh",
|
|
225
|
+
callback: G
|
|
226
|
+
}
|
|
227
|
+
}, null, 8, ["title", "subtitle", "action"])) : t(f).status === "unavailable" ? (i(), y(t(D), {
|
|
228
|
+
key: 2,
|
|
229
|
+
title: t(a)("menu.catalog_binding.empty.title"),
|
|
230
|
+
subtitle: t(h)(t(f).reason)
|
|
231
|
+
}, null, 8, ["title", "subtitle"])) : le("", !0),
|
|
232
|
+
s(Z, {
|
|
233
|
+
modelValue: c.value,
|
|
234
|
+
"onUpdate:modelValue": l[4] || (l[4] = (n) => c.value = n),
|
|
235
|
+
"max-width": 560,
|
|
236
|
+
"onOn:clickedAway": H
|
|
237
|
+
}, te({
|
|
238
|
+
"side-sheet-header": _(() => [
|
|
239
|
+
d("span", _e, o(t(a)("menu.catalog_binding.dialog.title")), 1)
|
|
240
|
+
]),
|
|
241
|
+
default: _(() => {
|
|
242
|
+
var n;
|
|
243
|
+
return [
|
|
244
|
+
g.value ? (i(), x(U, { key: 0 }, [
|
|
245
|
+
s(A, {
|
|
246
|
+
class: "mb-24",
|
|
247
|
+
items: I.value,
|
|
248
|
+
label: t(a)("menu.catalog_binding.dialog.default"),
|
|
249
|
+
"model-value": g.value.defaultCatalogId,
|
|
250
|
+
"onUpdate:modelValue": l[0] || (l[0] = (C) => {
|
|
251
|
+
var b;
|
|
252
|
+
return (b = m.value) == null ? void 0 : b.setDefaultCatalog(C ?? null);
|
|
253
|
+
})
|
|
254
|
+
}, null, 8, ["items", "label", "model-value"]),
|
|
255
|
+
s(A, {
|
|
256
|
+
class: "mb-24",
|
|
257
|
+
items: I.value,
|
|
258
|
+
label: t(a)("menu.catalog_binding.dialog.pos_takeaway"),
|
|
259
|
+
"model-value": g.value.takeawayCatalogId,
|
|
260
|
+
"onUpdate:modelValue": l[1] || (l[1] = (C) => {
|
|
261
|
+
var b;
|
|
262
|
+
return (b = m.value) == null ? void 0 : b.setTakeawayCatalog(C ?? null);
|
|
263
|
+
})
|
|
264
|
+
}, null, 8, ["items", "label", "model-value"]),
|
|
265
|
+
s(A, {
|
|
266
|
+
items: I.value,
|
|
267
|
+
label: t(a)("menu.catalog_binding.dialog.pickup"),
|
|
268
|
+
"model-value": g.value.pickupCatalogId,
|
|
269
|
+
"onUpdate:modelValue": l[2] || (l[2] = (C) => {
|
|
270
|
+
var b;
|
|
271
|
+
return (b = m.value) == null ? void 0 : b.setPickupCatalog(C ?? null);
|
|
272
|
+
})
|
|
273
|
+
}, null, 8, ["items", "label", "model-value"])
|
|
274
|
+
], 64)) : ((n = r.value) == null ? void 0 : n.status) === "unavailable" ? (i(), x("p", ye, o(t(h)(r.value.reason)), 1)) : (i(), y(Y, { key: 2 }))
|
|
275
|
+
];
|
|
276
|
+
}),
|
|
277
|
+
_: 2
|
|
278
|
+
}, [
|
|
279
|
+
g.value ? {
|
|
280
|
+
name: "side-sheet-footer",
|
|
281
|
+
fn: _(() => [
|
|
282
|
+
d("div", ke, [
|
|
283
|
+
s(L, {
|
|
284
|
+
label: t(a)("menu.catalog_binding.dialog.actions.update"),
|
|
285
|
+
size: "lg",
|
|
286
|
+
variant: "primary",
|
|
287
|
+
disabled: g.value.submit.state !== "allowed",
|
|
288
|
+
onClick: J
|
|
289
|
+
}, null, 8, ["label", "disabled"]),
|
|
290
|
+
s(L, {
|
|
291
|
+
label: t(a)("menu.catalog_binding.dialog.actions.cancel"),
|
|
292
|
+
size: "lg",
|
|
293
|
+
variant: "tertiary",
|
|
294
|
+
onClick: l[3] || (l[3] = (n) => c.value = !1)
|
|
295
|
+
}, null, 8, ["label"])
|
|
296
|
+
])
|
|
297
|
+
]),
|
|
298
|
+
key: "0"
|
|
299
|
+
} : void 0
|
|
300
|
+
]), 1032, ["modelValue"])
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
}, 8, ["heading"]);
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}), Le = /* @__PURE__ */ N({
|
|
307
|
+
__name: "CatalogBinding",
|
|
308
|
+
setup(K) {
|
|
309
|
+
const k = ge();
|
|
310
|
+
return (a, h) => (i(), y(Ce, { sdk: t(k) }, null, 8, ["sdk"]));
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
export {
|
|
314
|
+
Le as default
|
|
315
|
+
};
|