@feedmepos/mf-menu 0.32.62 → 0.32.63-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/dist/{App-CE4fZP2_.js → App-DhfTGlgM.js} +467 -462
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-PpYjjdOP.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C5-8qdJK.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-C_JKiJRD.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-CXm-0H18.js} +8 -8
- package/dist/{Catalog-C2MyXkps.js → Catalog-WuZJfM6l.js} +78 -78
- package/dist/{Category-B7Uxbyug.js → Category-BeIo7XWY.js} +20 -20
- package/dist/{Category-BoV0MYQp.js → Category-D-cQQCPS.js} +19 -19
- package/dist/{CookingGuide-Bdyj8XMv.js → CookingGuide-B-yvD9ZA.js} +88 -88
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-EDbgLHTU.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-2_yzXoa4.js} +1 -1
- package/dist/{Group-BuFbi0Z-.js → Group-13i5igrS.js} +5 -5
- package/dist/{Group-DYpxc5ui.js → Group-CY8lUzQG.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-B5Uw2Rzm.js → Group.vue_vue_type_script_setup_true_lang-DZhxy0tb.js} +95 -94
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-COYg8e7h.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CWqv-oUd.js} +13 -13
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-YY25YW4B.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DTs4Vpdi.js} +219 -220
- package/dist/{Ingredient-Ddw06I0B.js → Ingredient-vrUOW6gk.js} +49 -49
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CsWdL5Lz.js → InventoryBinding.vue_vue_type_script_setup_true_lang-xcVjRjqD.js} +2 -2
- package/dist/{LinkProductSideSheet-COAMZqOM.js → LinkProductSideSheet-DMbJG6wf.js} +8 -8
- package/dist/{MenuSetting--G1_lGoV.js → MenuSetting-Di2xwm00.js} +10 -10
- package/dist/{OrderPacing-DnvLJh5M.js → OrderPacing-CCe-IcGO.js} +28 -28
- package/dist/{PrintRoute-CP-3JGP3.js → PrintRoute-CcfObcHY.js} +27 -27
- package/dist/{Product-D-q15-Qw.js → Product-ChUVnMgG.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BaOg60Q6.js → Product.vue_vue_type_script_setup_true_lang-C9Qp50hL.js} +153 -152
- package/dist/{ProductInternalTools-wYn0bzml.js → ProductInternalTools-D9HXhgo5.js} +80 -79
- package/dist/{Products-CxEsB-7l.js → Products-Bly2ktEC.js} +75 -74
- package/dist/{Publish-BCljLztW.js → Publish-C8ubb8Qf.js} +113 -113
- package/dist/{Recipe-DgfobgnQ.js → Recipe-BpMRLsyO.js} +32 -32
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BgDVFKRI.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BD5OCDRn.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DCbrAMxd.js → RuleView.vue_vue_type_script_setup_true_lang-Ba3djmX1.js} +474 -473
- package/dist/{Scheduler-C-LJs7Gl.js → Scheduler-CiB4b2Fn.js} +9 -9
- package/dist/{ServingSequence-BoaDRfsc.js → ServingSequence-BlcyW-dv.js} +18 -18
- package/dist/{Setting-BfFqBD9u.js → Setting-DqkL6YYU.js} +31 -31
- package/dist/{Subcategory-BsnC9ZSS.js → Subcategory-B4Jg_wtT.js} +43 -43
- package/dist/{Takeaway-PilRifJP.js → Takeaway-5G3f7jWT.js} +1 -1
- package/dist/{Takeaway-dSEAc70g.js → Takeaway-5rFPYYNA.js} +16 -16
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CgioM0sV.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsOhg_E.js} +23 -23
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-CHf3g1ia.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-CPqxA6JD.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-A43XxqyC.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-yrNuTD-3.js} +8 -9
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-T71R68sq.js +5836 -0
- package/dist/{Unit-DW1dFJas.js → Unit-CAkdmQLg.js} +2 -2
- package/dist/{Variant-CzLzrt2N.js → Variant-BbLQqbAK.js} +13 -13
- package/dist/{_id_-qfASfKMD.js → _id_-Dzacr40I.js} +13 -13
- package/dist/{app-BB33yKM6.js → app-4yWs09Fr.js} +495 -495
- package/dist/{app-CJnEQz-U.js → app-Deov1985.js} +3 -3
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/media.d.ts +161 -0
- package/dist/apps/mf-menu/src/app.d.ts +340 -0
- package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +150 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/CustomDimensionDialog.vue.d.ts +17 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadDialog.vue.d.ts +16 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ManageImageDrawer.vue.d.ts +42 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ProductImageField.vue.d.ts +75 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/RegenerateImageDialog.vue.d.ts +17 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ProductDetail.vue.d.ts +3 -6
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1 -1
- package/dist/apps/mf-menu/src/composable/remyImageTarget.d.ts +5 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +14 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/src/types/rule.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +3 -2
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/ProductDetail.vue.d.ts +8 -8
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-VaVE9Pyh.js → linked-status-B2WLhKkV.js} +3 -3
- package/dist/assets/{menu-export-DD9Zt6XH.js → menu-export-Dcw5a_dN.js} +3 -3
- package/dist/assets/{override-menu-DZCgrhuF.js → override-menu-cBe2aMY6.js} +3 -3
- package/dist/assets/{validate-menu-BFsQlikL.js → validate-menu-BM-5GK85.js} +2 -2
- package/dist/{catalog-Cvn1ZMGp.js → catalog-DKygS2Cs.js} +6 -6
- package/dist/{catalogSetting-D2bOCGW7.js → catalogSetting-Bn2TplvM.js} +1 -1
- package/dist/currency-DXgNHtK8.js +7 -0
- package/dist/dayjs.min-DpX65tgj.js +7 -0
- package/dist/discardConfirm-DZwzKO-Q.js +3704 -0
- package/dist/{index-B2fxLO4K.js → index-B48KLyqg.js} +61 -61
- package/dist/{index-CizrxT_e.js → index-BEocaqRK.js} +30 -30
- package/dist/index-K-MBqJJo.js +222 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-gaRM4vfS.js → index.vue_vue_type_script_setup_true_lang-Nl505vPi.js} +44918 -51563
- package/dist/item-Da3ArD-G.js +13213 -0
- package/dist/{jszip.min-BXLegUsz.js → jszip.min-Cc2eR4Cq.js} +119 -119
- package/dist/linkProducts-GNuUxFEE.js +331 -0
- package/dist/{memberPricing-CizI1rUM.js → memberPricing-T-jr7tn1.js} +1 -1
- package/dist/{menu-BCed1YCE.js → menu-DSDRAil-.js} +1 -1
- package/dist/{menuV2-Bo9AHrdr.js → menuV2-fTlJdjxi.js} +162 -160
- package/dist/mf-menu.css +1 -1
- package/dist/{order_pacing-BkfQeNeC.js → order_pacing-Dgo1fySS.js} +17 -17
- package/dist/packages/shared/src/helpers/agentCode.d.ts +9 -0
- package/dist/{priceTier-rjuK-b6U.js → priceTier-aT_gIfrN.js} +3 -3
- package/dist/{rules-DHX_hK6G.js → rules-Cx2hkV20.js} +8 -8
- package/dist/{scheduler-BsfPbtM2.js → scheduler-Bd-q7yF8.js} +62 -62
- package/dist/{toExcel-DJHljg_L.js → toExcel-qfjR83qT.js} +2 -2
- package/dist/{unit-BxTWR1dZ.js → unit-n1T9grbM.js} +64 -64
- package/package.json +3 -3
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DGqao47l.js +0 -399
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DY1umres.js +0 -6058
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/thumbnailUpload.d.ts +0 -6
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadForm.vue.d.ts +0 -38
- package/dist/currency-DQDsuXB5.js +0 -7
- package/dist/dayjs.min-CzUkrXIR.js +0 -7
- package/dist/discardConfirm-BHni0LNu.js +0 -28
- package/dist/index-CisutoS9.js +0 -156
- package/dist/item-DOHVD6CN.js +0 -9098
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { FdoMenuV4Item, FdoMenuV4ItemImage } from "@feedmepos/entity";
|
|
2
|
+
import { type AspectRatio } from "@/api/media";
|
|
3
|
+
/**
|
|
4
|
+
* Product image lifecycle on top of media-service.
|
|
5
|
+
*
|
|
6
|
+
* One entry of `FdoMenuV4Item.images` maps to one media-service image, keyed by
|
|
7
|
+
* `FdoMenuV4ItemImage._id` (used verbatim as the media `imageId`, so the object key
|
|
8
|
+
* is `{businessId}/product/{itemId}/{_id}`).
|
|
9
|
+
*/
|
|
10
|
+
export declare const MAX_IMAGE_BYTES: number;
|
|
11
|
+
/**
|
|
12
|
+
* Sentinel id for a synthetic `FdoMenuV4ItemImage` seeded from the legacy `thumbnail`
|
|
13
|
+
* field. It never reaches media-service — delete and manage are no-ops for it — so it
|
|
14
|
+
* only appears on the frontend while the item still has no real `images` array. Once the
|
|
15
|
+
* first real image is uploaded the legacy entry is purged from the emitted array.
|
|
16
|
+
*/
|
|
17
|
+
export declare const LEGACY_IMAGE_ID = "__legacy__";
|
|
18
|
+
/** media-service reads dimensions off the bytes, which it cannot do for gif. */
|
|
19
|
+
export declare const ACCEPTED_IMAGE_TYPES: string[];
|
|
20
|
+
/**
|
|
21
|
+
* `{timestamp}_{4 random chars}`, e.g. `2026_07_27T06_54_00_000Z_argb`.
|
|
22
|
+
*
|
|
23
|
+
* The entity documents this as a raw ISO datetime, but the separators are flattened to
|
|
24
|
+
* underscores the same way menu doc ids are (`item_2026_05_12T07_11_30_037Z_1c4gzj…`).
|
|
25
|
+
* This id is used verbatim as the media object key segment and shows up in the image
|
|
26
|
+
* URL path, and `:` there has to be percent-encoded to be safe — every id that already
|
|
27
|
+
* travels in a path in this system avoids it. Only the image id is built this way; the
|
|
28
|
+
* item id it is nested under is whatever the menu service issued.
|
|
29
|
+
*/
|
|
30
|
+
export declare function generateImageId(): string;
|
|
31
|
+
/**
|
|
32
|
+
* The ratios to queue for a newly uploaded image.
|
|
33
|
+
*
|
|
34
|
+
* With the `autoGenerateImageAspectRatio` flag off, media-service is asked for the
|
|
35
|
+
* original and nothing else: no variant is generated, so `imageSet` stays empty and the
|
|
36
|
+
* Manage panel drops its ratio section. The flag is passed in rather than read here, so
|
|
37
|
+
* this module keeps out of the `stores/menu` <-> `helper/menu` import cycle.
|
|
38
|
+
*/
|
|
39
|
+
export declare function autoAspectRatios(autoGenerate: boolean): AspectRatio[];
|
|
40
|
+
export declare function validateImageFile(file: File): string | null;
|
|
41
|
+
/** Converts Remy's base64 result into an uploadable file without re-encoding it. */
|
|
42
|
+
export declare function dataUrlToFile(dataUrl: string, fileName?: string): Promise<File>;
|
|
43
|
+
/** `confirm` needs the real pixel size, and only the browser has it before upload. */
|
|
44
|
+
export declare function readImageDimensions(file: File): Promise<{
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
}>;
|
|
48
|
+
/** Lets the form wait for in-flight uploads before it saves. */
|
|
49
|
+
export declare function waitForPendingThumbnailUploads(): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Uploads one file and returns the entity value to append to `item.images`.
|
|
52
|
+
*
|
|
53
|
+
* Bytes go browser -> object storage directly (`upload-intent` + PUT + `confirm`);
|
|
54
|
+
* the base64 `.create` route would push a 10 MiB upload through the service pods.
|
|
55
|
+
*
|
|
56
|
+
* `imageSet` values are left null on purpose: the ratio images media-service
|
|
57
|
+
* generates are reachable at `{url}?aspect_ratio={ratio}`, so there is nothing to
|
|
58
|
+
* store. A value is only ever written when a merchant substitutes a different photo
|
|
59
|
+
* for one ratio — the "replace image" flow, which is not built yet.
|
|
60
|
+
*
|
|
61
|
+
* `aspectRatios` has no default: it is always derived from the
|
|
62
|
+
* `autoGenerateImageAspectRatio` flag via `autoAspectRatios`, and a default here would
|
|
63
|
+
* be a silent way to generate ratios for a business that turned them off.
|
|
64
|
+
*/
|
|
65
|
+
export declare function uploadProductImage(itemId: string, file: File, options: {
|
|
66
|
+
aspectRatios: AspectRatio[];
|
|
67
|
+
imageId?: string;
|
|
68
|
+
}): Promise<FdoMenuV4ItemImage>;
|
|
69
|
+
/**
|
|
70
|
+
* A file the merchant picked before the item it belongs to exists.
|
|
71
|
+
*
|
|
72
|
+
* media-service keys an object by its owner (`{businessId}/product/{itemId}/{imageId}`),
|
|
73
|
+
* so on create there is nowhere to put the bytes until the menu update comes back with
|
|
74
|
+
* an id. The file waits here, previewed from an object URL, and `flushStagedImages`
|
|
75
|
+
* uploads the batch once that id is known.
|
|
76
|
+
*
|
|
77
|
+
* Staging is also what makes Cancel honest: nothing reaches storage, so an abandoned
|
|
78
|
+
* form leaves no orphaned objects behind.
|
|
79
|
+
*/
|
|
80
|
+
export interface StagedProductImage {
|
|
81
|
+
/** Generated up front so the tile has a stable key; reused as the media `imageId`. */
|
|
82
|
+
_id: string;
|
|
83
|
+
file: File;
|
|
84
|
+
/** Object URL for the local preview — release it with `releaseStagedImages`. */
|
|
85
|
+
previewUrl: string;
|
|
86
|
+
isDefault: boolean;
|
|
87
|
+
}
|
|
88
|
+
export declare function stageProductImage(file: File, isDefault: boolean): StagedProductImage;
|
|
89
|
+
/** Revokes the preview object URLs; call it once the staged entries are discarded. */
|
|
90
|
+
export declare function releaseStagedImages(staged: StagedProductImage[]): void;
|
|
91
|
+
/**
|
|
92
|
+
* Uploads every staged file against the now-known item id, in the order they were
|
|
93
|
+
* picked so the gallery matches what the merchant saw while filling the form.
|
|
94
|
+
*/
|
|
95
|
+
export declare function flushStagedImages(itemId: string, staged: StagedProductImage[], aspectRatios: AspectRatio[]): Promise<FdoMenuV4ItemImage[]>;
|
|
96
|
+
/**
|
|
97
|
+
* Queues generation for ratios the image does not have yet.
|
|
98
|
+
*
|
|
99
|
+
* Add-format on an existing image is `.create` with `mode: "append"` and no bytes —
|
|
100
|
+
* the service reuses the stored original's metadata and queues only the listed
|
|
101
|
+
* ratios. `confirm` cannot do this: it rejects `width`/`height` <= 0, which is all a
|
|
102
|
+
* re-confirm would have to offer.
|
|
103
|
+
*
|
|
104
|
+
* Note the failure shape differs from `confirm`: a single ratio that fails to queue
|
|
105
|
+
* (e.g. `409 TASK_IN_PROGRESS` for a ratio already generating) fails the whole call.
|
|
106
|
+
*/
|
|
107
|
+
export declare function generateAspectRatios(itemId: string, image: FdoMenuV4ItemImage, aspectRatios: AspectRatio[]): Promise<FdoMenuV4ItemImage>;
|
|
108
|
+
/** `/images/update` carries its bytes inline, so the file has to become a data URL. */
|
|
109
|
+
export declare function readFileAsDataUrl(file: File): Promise<string>;
|
|
110
|
+
/**
|
|
111
|
+
* Substitutes the merchant's own photo for one generated ratio.
|
|
112
|
+
*
|
|
113
|
+
* Nothing about the entity changes: the variant keeps its URL and only the bytes
|
|
114
|
+
* behind it are rewritten, so `imageSet` is untouched and the caller has nothing new
|
|
115
|
+
* to save. What the caller does have to do is bust its own image cache — the URL is
|
|
116
|
+
* "always latest" at the edge, but a browser that already fetched it will not know.
|
|
117
|
+
*
|
|
118
|
+
* The file is expected to be cropped to `ratio` and re-encoded by the dialog: these
|
|
119
|
+
* bytes travel through the service pod (no variant-level upload-intent exists), and a
|
|
120
|
+
* variant is supposed to be exactly its ratio.
|
|
121
|
+
*/
|
|
122
|
+
export declare function replaceAspectRatioImage(itemId: string, image: FdoMenuV4ItemImage, ratio: AspectRatio, file: File): Promise<void>;
|
|
123
|
+
/**
|
|
124
|
+
* Asks for one ratio to be generated again, saying what to change.
|
|
125
|
+
*
|
|
126
|
+
* The instruction is required, not a nicety: `/images/update` takes exactly one of
|
|
127
|
+
* `base64` or `instruction`, and sending neither is rejected with 400 INVALID_PARAM —
|
|
128
|
+
* there is no "just roll the dice again" mode to fall back to.
|
|
129
|
+
*
|
|
130
|
+
* Queued, not immediate: the ratio goes back to `pending` for ~40s and its URL keeps
|
|
131
|
+
* serving the old image until the new one lands, so there is nothing to roll back.
|
|
132
|
+
*/
|
|
133
|
+
export declare function regenerateAspectRatio(itemId: string, image: FdoMenuV4ItemImage, ratio: AspectRatio, instruction: string): Promise<void>;
|
|
134
|
+
export declare function deleteAspectRatio(itemId: string, image: FdoMenuV4ItemImage, ratio: AspectRatio): Promise<FdoMenuV4ItemImage>;
|
|
135
|
+
/** Deletes the whole image, original included (`aspectRatios: null`). */
|
|
136
|
+
export declare function deleteProductImage(itemId: string, imageId: string): Promise<void>;
|
|
137
|
+
/** Deletes every image an item owns; used when the product itself is removed. */
|
|
138
|
+
export declare function deleteAllProductImages(itemIds: string[]): Promise<void>;
|
|
139
|
+
/** Enforces the single-cover rule: setting one clears the flag on every other image. */
|
|
140
|
+
export declare function setCoverImage(images: FdoMenuV4ItemImage[], imageId: string, isCover: boolean): FdoMenuV4ItemImage[];
|
|
141
|
+
/**
|
|
142
|
+
* Mirrors the backend `resolveItemThumbnail` so the raw menu document stays usable
|
|
143
|
+
* for anything reading it directly (portal's own lists, v3 clients) — overrideMenu
|
|
144
|
+
* derives the same value, but only on its way out.
|
|
145
|
+
*
|
|
146
|
+
* The null vs `[]` distinction is load-bearing: `[]` means the merchant cleared every
|
|
147
|
+
* image and the thumbnail must go with it, while null means the item predates the
|
|
148
|
+
* multi-image model and its legacy thumbnail must be left alone.
|
|
149
|
+
*/
|
|
150
|
+
export declare function resolveCoverThumbnail(item: Pick<FdoMenuV4Item, "images" | "thumbnail">): string | null;
|
package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/CustomDimensionDialog.vue.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
/** Ratios already on the image, so we can reject a duplicate before confirming. */
|
|
3
|
+
existingRatios: string[];
|
|
4
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
/** Ratios already on the image, so we can reject a duplicate before confirming. */
|
|
6
|
+
existingRatios: string[];
|
|
7
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadDialog.vue.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
import "vue-advanced-cropper/dist/style.css";
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
/** Ratio key the crop must produce, e.g. `16x9`. */
|
|
4
|
+
ratio: string;
|
|
5
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
/** Ratio key the crop must produce, e.g. `16x9`. */
|
|
7
|
+
ratio: string;
|
|
8
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
9
|
export default _default;
|
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
12
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
13
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
14
|
+
} : {
|
|
15
|
+
type: import('vue').PropType<T[K]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { FdoMenuV4ItemImage } from "@feedmepos/entity";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
modelValue: boolean;
|
|
4
|
+
itemId: string;
|
|
5
|
+
image: FdoMenuV4ItemImage | null;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Whether turning the cover off is allowed. False when this is the only image, so the
|
|
9
|
+
* gallery can never be left without a cover to resolve a thumbnail from. The parent
|
|
10
|
+
* also promotes a survivor when a multi-image cover is cleared, so this only guards
|
|
11
|
+
* the no-candidate case.
|
|
12
|
+
*/
|
|
13
|
+
canClearCover?: boolean | undefined;
|
|
14
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (open: boolean) => void;
|
|
16
|
+
"update:image": (image: FdoMenuV4ItemImage) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
18
|
+
modelValue: boolean;
|
|
19
|
+
itemId: string;
|
|
20
|
+
image: FdoMenuV4ItemImage | null;
|
|
21
|
+
disabled?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Whether turning the cover off is allowed. False when this is the only image, so the
|
|
24
|
+
* gallery can never be left without a cover to resolve a thumbnail from. The parent
|
|
25
|
+
* also promotes a survivor when a multi-image cover is cleared, so this only guards
|
|
26
|
+
* the no-candidate case.
|
|
27
|
+
*/
|
|
28
|
+
canClearCover?: boolean | undefined;
|
|
29
|
+
}>>> & Readonly<{
|
|
30
|
+
"onUpdate:modelValue"?: ((open: boolean) => any) | undefined;
|
|
31
|
+
"onUpdate:image"?: ((image: FdoMenuV4ItemImage) => any) | undefined;
|
|
32
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
35
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
36
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
37
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
38
|
+
} : {
|
|
39
|
+
type: import('vue').PropType<T[K]>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { FdoMenuV4ItemImage } from "@feedmepos/entity";
|
|
2
|
+
import { type StagedProductImage } from "@/components/feature/TreeEditor/composable/productImages";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
itemId: string;
|
|
5
|
+
/** null means the item predates multi-image; [] means every image was removed. */
|
|
6
|
+
modelValue: FdoMenuV4ItemImage[] | null | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Files held back until the item exists. Passing an array (even an empty one) is
|
|
9
|
+
* what opts a form into staging; leaving it null means the parent cannot flush, so
|
|
10
|
+
* an itemless upload is refused rather than silently dropped.
|
|
11
|
+
*/
|
|
12
|
+
staged?: StagedProductImage[] | null | undefined;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Legacy single-image URL from the `thumbnail` field. When set and modelValue is
|
|
16
|
+
* null (the item predates multi-image), a synthetic read-only tile is shown so the
|
|
17
|
+
* merchant can see — and replace — the existing photo. The tile never reaches
|
|
18
|
+
* media-service and is dropped from the emitted array the moment a real image lands.
|
|
19
|
+
*/
|
|
20
|
+
legacyThumbnail?: string | null | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
staged: null;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
legacyThumbnail: null;
|
|
25
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (images: FdoMenuV4ItemImage[]) => void;
|
|
27
|
+
"update:staged": (staged: StagedProductImage[]) => void;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
29
|
+
itemId: string;
|
|
30
|
+
/** null means the item predates multi-image; [] means every image was removed. */
|
|
31
|
+
modelValue: FdoMenuV4ItemImage[] | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Files held back until the item exists. Passing an array (even an empty one) is
|
|
34
|
+
* what opts a form into staging; leaving it null means the parent cannot flush, so
|
|
35
|
+
* an itemless upload is refused rather than silently dropped.
|
|
36
|
+
*/
|
|
37
|
+
staged?: StagedProductImage[] | null | undefined;
|
|
38
|
+
disabled?: boolean | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Legacy single-image URL from the `thumbnail` field. When set and modelValue is
|
|
41
|
+
* null (the item predates multi-image), a synthetic read-only tile is shown so the
|
|
42
|
+
* merchant can see — and replace — the existing photo. The tile never reaches
|
|
43
|
+
* media-service and is dropped from the emitted array the moment a real image lands.
|
|
44
|
+
*/
|
|
45
|
+
legacyThumbnail?: string | null | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
staged: null;
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
legacyThumbnail: null;
|
|
50
|
+
}>>> & Readonly<{
|
|
51
|
+
"onUpdate:modelValue"?: ((images: FdoMenuV4ItemImage[]) => any) | undefined;
|
|
52
|
+
"onUpdate:staged"?: ((staged: StagedProductImage[]) => any) | undefined;
|
|
53
|
+
}>, {
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
staged: StagedProductImage[] | null;
|
|
56
|
+
legacyThumbnail: string | null;
|
|
57
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
60
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
61
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
62
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
63
|
+
} : {
|
|
64
|
+
type: import('vue').PropType<T[K]>;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
type __VLS_WithDefaults<P, D> = {
|
|
69
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
70
|
+
default: D[K];
|
|
71
|
+
}> : P[K];
|
|
72
|
+
};
|
|
73
|
+
type __VLS_Prettify<T> = {
|
|
74
|
+
[K in keyof T]: T[K];
|
|
75
|
+
} & {};
|
package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/RegenerateImageDialog.vue.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
/** Display label of the ratio being regenerated, e.g. `16:9`. */
|
|
3
|
+
ratioLabel: string;
|
|
4
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
/** Display label of the ratio being regenerated, e.g. `16:9`. */
|
|
6
|
+
ratioLabel: string;
|
|
7
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { FdoMenuV4Item } from "@feedmepos/entity";
|
|
2
|
-
import type { ThumbnailUploadResult } from "../composable/thumbnailUpload";
|
|
1
|
+
import type { FdoMenuV4Item, FdoMenuV4ItemImage } from "@feedmepos/entity";
|
|
3
2
|
import type { IFdtoMenuV4ItemTracking } from "@/components/feature/TreeEditor/item/ItemForm.vue";
|
|
4
3
|
interface Props {
|
|
5
4
|
isOverride: boolean;
|
|
@@ -9,11 +8,9 @@ interface Props {
|
|
|
9
8
|
fallback: FdoMenuV4Item | undefined;
|
|
10
9
|
}
|
|
11
10
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
-
"update:form": (key: keyof FdoMenuV4Item | keyof IFdtoMenuV4ItemTracking, value: string | number | boolean | Record<string, any> | string[] | Record<string, string> | import("@feedmepos/entity").FdoDinero | Record<string, import("@feedmepos/entity").FdoDinero> | Record<string, Record<string, import("@feedmepos/entity").FdoDinero>> | import("@feedmepos/entity").FdoItemVariant | import("@feedmepos/entity").FdoMenuItemAdditionalCategory[] | import("@feedmepos/entity").FdtoV4Tax[] | import("@feedmepos/entity").FdoItemPrintSetting | import("@feedmepos/entity").FdoInventoryBinding[] | import("@feedmepos/entity").FdoMenuItemTakeawayConfig | import("@feedmepos/entity").FdoMenuItemServeDelayConfig |
|
|
13
|
-
"thumbnail-uploaded": (result: ThumbnailUploadResult) => void;
|
|
11
|
+
"update:form": (key: keyof FdoMenuV4Item | keyof IFdtoMenuV4ItemTracking, value: string | number | boolean | Record<string, any> | string[] | Record<string, string> | import("@feedmepos/entity").FdoDinero | Record<string, import("@feedmepos/entity").FdoDinero> | Record<string, Record<string, import("@feedmepos/entity").FdoDinero>> | import("@feedmepos/entity").FdoItemVariant | import("@feedmepos/entity").FdoMenuItemAdditionalCategory[] | import("@feedmepos/entity").FdtoV4Tax[] | import("@feedmepos/entity").FdoItemPrintSetting | import("@feedmepos/entity").FdoInventoryBinding[] | import("@feedmepos/entity").FdoMenuItemTakeawayConfig | import("@feedmepos/entity").FdoMenuItemServeDelayConfig | FdoMenuV4ItemImage[] | import("@feedmepos/entity").FdoMenuItemOrderQuantity | import("@feedmepos/entity").FdoGroupOverriderV4[] | null | undefined) => void;
|
|
14
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
15
|
-
"
|
|
16
|
-
"onUpdate:form"?: ((key: keyof FdoMenuV4Item | keyof IFdtoMenuV4ItemTracking, value: string | number | boolean | Record<string, any> | string[] | Record<string, string> | import("@feedmepos/entity").FdoDinero | Record<string, import("@feedmepos/entity").FdoDinero> | Record<string, Record<string, import("@feedmepos/entity").FdoDinero>> | import("@feedmepos/entity").FdoItemVariant | import("@feedmepos/entity").FdoMenuItemAdditionalCategory[] | import("@feedmepos/entity").FdtoV4Tax[] | import("@feedmepos/entity").FdoItemPrintSetting | import("@feedmepos/entity").FdoInventoryBinding[] | import("@feedmepos/entity").FdoMenuItemTakeawayConfig | import("@feedmepos/entity").FdoMenuItemServeDelayConfig | import("@feedmepos/entity").FdoMenuV4ItemImage[] | import("@feedmepos/entity").FdoMenuItemOrderQuantity | import("@feedmepos/entity").FdoGroupOverriderV4[] | null | undefined) => any) | undefined;
|
|
13
|
+
"onUpdate:form"?: ((key: keyof FdoMenuV4Item | keyof IFdtoMenuV4ItemTracking, value: string | number | boolean | Record<string, any> | string[] | Record<string, string> | import("@feedmepos/entity").FdoDinero | Record<string, import("@feedmepos/entity").FdoDinero> | Record<string, Record<string, import("@feedmepos/entity").FdoDinero>> | import("@feedmepos/entity").FdoItemVariant | import("@feedmepos/entity").FdoMenuItemAdditionalCategory[] | import("@feedmepos/entity").FdtoV4Tax[] | import("@feedmepos/entity").FdoItemPrintSetting | import("@feedmepos/entity").FdoInventoryBinding[] | import("@feedmepos/entity").FdoMenuItemTakeawayConfig | import("@feedmepos/entity").FdoMenuItemServeDelayConfig | FdoMenuV4ItemImage[] | import("@feedmepos/entity").FdoMenuItemOrderQuantity | import("@feedmepos/entity").FdoGroupOverriderV4[] | null | undefined) => any) | undefined;
|
|
17
14
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
15
|
export default _default;
|
|
19
16
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -96,5 +96,5 @@ interface MenuStoreType {
|
|
|
96
96
|
$dispose: () => void;
|
|
97
97
|
$reinitialize: () => void;
|
|
98
98
|
}
|
|
99
|
-
export declare const useMenuStore: import("pinia").StoreDefinition<"mf-menu-store-v2", Pick<MenuStoreType, "state" | "mergedMenu" | "workerIsComputing" | "mergedMenuChangeId">, Pick<MenuStoreType, "groups" | "
|
|
99
|
+
export declare const useMenuStore: import("pinia").StoreDefinition<"mf-menu-store-v2", Pick<MenuStoreType, "state" | "mergedMenu" | "workerIsComputing" | "mergedMenuChangeId">, Pick<MenuStoreType, "groups" | "cookingGuide" | "serveSequence" | "items" | "rules" | "version" | "isV4" | "catalogs" | "currentCatalog" | "schedulers" | "currentScheduler" | "catalogOptions" | "categories" | "subcategories" | "sortedItems" | "itemCodeMap" | "categorizedItems" | "categorizedRawMenuItems" | "variants" | "takeaways" | "printDepartments" | "units" | "recipes" | "skus" | "taxSetting" | "canUndoHistory" | "canRedoHistory">, Pick<MenuStoreType, "readMenu" | "readRestaurants" | "selectCatalog" | "selectScheduler" | "selectCategory" | "setRestaurantAttrParams" | "updateMenu" | "updateMenuSetting" | "encodeTax" | "decodeTax" | "getSelectedTax" | "mapVariant" | "$dispose" | "setMenu" | "computeMergedMenu" | "undoHistory" | "redoHistory" | "$reinitialize">>;
|
|
100
100
|
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function createRemyImageTargetId(scope: string): string;
|
|
2
|
+
export declare function activateRemyImageTarget(targetId: string): void;
|
|
3
|
+
/** Returns true exactly once for the field that initiated the current edit. */
|
|
4
|
+
export declare function consumeRemyImageTarget(targetId: string): boolean;
|
|
5
|
+
export declare function clearRemyImageTarget(targetId: string): void;
|
|
@@ -3,6 +3,7 @@ import { type FdoItemOverriderV4, type FdoItemVariant, FdoMenuV4Category, FdoMen
|
|
|
3
3
|
import { F_OPERATION_TYPE, type UpdateMenuModuleRequest } from "@feedmepos/menu/manager";
|
|
4
4
|
import { useCoreStore } from "@feedmepos/mf-common";
|
|
5
5
|
import { type UseLoadingReturn } from "~shared/composable/loading";
|
|
6
|
+
import { type StagedProductImage } from "@/components/feature/TreeEditor/composable/productImages";
|
|
6
7
|
import type { CheckboxOption } from "@/types/global";
|
|
7
8
|
export interface PickerOption {
|
|
8
9
|
label: string;
|
|
@@ -15,7 +16,19 @@ export interface PickerGroup {
|
|
|
15
16
|
}
|
|
16
17
|
export declare const useMenuLoader: (useLoading: UseLoadingReturn) => {
|
|
17
18
|
updateMenu: (req: UpdateMenuModuleRequest | UpdateMenuModuleRequest[], name: string, isDelete?: boolean, performValidate?: boolean) => Promise<void>;
|
|
18
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Saves the item, then attaches the images that were staged while filling the form.
|
|
21
|
+
*
|
|
22
|
+
* The upload has to come second: media-service keys an image by the item it belongs
|
|
23
|
+
* to (`{businessId}/product/{itemId}/{imageId}`), and on create that id only exists
|
|
24
|
+
* once the menu update has been applied. An item edited in place already has one, so
|
|
25
|
+
* its field uploads as it goes and nothing is left staged by the time we get here.
|
|
26
|
+
*
|
|
27
|
+
* Note what happens when nothing was staged: the second update is skipped entirely.
|
|
28
|
+
* Writing `images: []` would tell the backend the merchant cleared the gallery, and
|
|
29
|
+
* cost every legacy item its thumbnail.
|
|
30
|
+
*/
|
|
31
|
+
saveMenuWithImages: (data: FdoMenuV4Item, operation: typeof F_OPERATION_TYPE.update | typeof F_OPERATION_TYPE.create, staged?: StagedProductImage[] | null, performValidate?: boolean) => Promise<void>;
|
|
19
32
|
checkMenuIsLoading: () => boolean;
|
|
20
33
|
};
|
|
21
34
|
export declare function generateItemThumbnailUrl(path: string): string;
|
|
@@ -11,6 +11,8 @@ export type ItemRules = BaseRules & {
|
|
|
11
11
|
category: boolean;
|
|
12
12
|
description: boolean;
|
|
13
13
|
thumbnail: boolean;
|
|
14
|
+
/** Whether the multi-image product gallery can be edited in the current scope. */
|
|
15
|
+
images: boolean;
|
|
14
16
|
orderFrom: boolean;
|
|
15
17
|
orderFromNone: boolean;
|
|
16
18
|
orderFromActiveOnly: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FdoMenuV4Item } from "@feedmepos/entity";
|
|
2
|
+
import { type StagedProductImage } from "@/components/feature/TreeEditor/composable/productImages";
|
|
2
3
|
interface Props {
|
|
3
4
|
initialForm?: Partial<FdoMenuV4Item>;
|
|
4
5
|
categoryId?: string | null;
|
|
@@ -7,10 +8,10 @@ interface Props {
|
|
|
7
8
|
}
|
|
8
9
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
10
|
"update:show": (value: boolean) => void;
|
|
10
|
-
"submit:form": (form: FdoMenuV4Item,
|
|
11
|
+
"submit:form": (form: FdoMenuV4Item, staged?: StagedProductImage[] | null | undefined) => void;
|
|
11
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
12
13
|
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
13
|
-
"onSubmit:form"?: ((form: FdoMenuV4Item,
|
|
14
|
+
"onSubmit:form"?: ((form: FdoMenuV4Item, staged?: StagedProductImage[] | null | undefined) => any) | undefined;
|
|
14
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
15
16
|
trigger?(_: {
|
|
16
17
|
trigger: () => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { FdoMenuV4Item } from "@feedmepos/entity";
|
|
1
|
+
import type { FdoMenuV4Item, FdoMenuV4ItemImage } from "@feedmepos/entity";
|
|
2
|
+
import { type StagedProductImage } from "@/components/feature/TreeEditor/composable/productImages";
|
|
2
3
|
import type { IFdtoMenuV4ItemTracking } from "@/components/feature/TreeEditor/item/ItemForm.vue";
|
|
3
4
|
interface Props {
|
|
4
5
|
isOverride: boolean;
|
|
@@ -6,16 +7,15 @@ interface Props {
|
|
|
6
7
|
isCreate: boolean;
|
|
7
8
|
form: Partial<FdoMenuV4Item>;
|
|
8
9
|
fallback: FdoMenuV4Item | undefined;
|
|
9
|
-
|
|
10
|
+
/** Files picked before the item exists; the parent uploads them after save. */
|
|
11
|
+
staged: StagedProductImage[];
|
|
10
12
|
}
|
|
11
13
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
-
"update:form": (key: keyof FdoMenuV4Item | keyof IFdtoMenuV4ItemTracking, value: string | number | boolean | Record<string, any> | string[] | Record<string, string> | import("@feedmepos/entity").FdoDinero | Record<string, import("@feedmepos/entity").FdoDinero> | Record<string, Record<string, import("@feedmepos/entity").FdoDinero>> | import("@feedmepos/entity").FdoItemVariant | import("@feedmepos/entity").FdoMenuItemAdditionalCategory[] | import("@feedmepos/entity").FdtoV4Tax[] | import("@feedmepos/entity").FdoItemPrintSetting | import("@feedmepos/entity").FdoInventoryBinding[] | import("@feedmepos/entity").FdoMenuItemTakeawayConfig | import("@feedmepos/entity").FdoMenuItemServeDelayConfig |
|
|
13
|
-
"update:
|
|
14
|
-
"reset:thumbnail": () => void;
|
|
14
|
+
"update:form": (key: keyof FdoMenuV4Item | keyof IFdtoMenuV4ItemTracking, value: string | number | boolean | Record<string, any> | string[] | Record<string, string> | import("@feedmepos/entity").FdoDinero | Record<string, import("@feedmepos/entity").FdoDinero> | Record<string, Record<string, import("@feedmepos/entity").FdoDinero>> | import("@feedmepos/entity").FdoItemVariant | import("@feedmepos/entity").FdoMenuItemAdditionalCategory[] | import("@feedmepos/entity").FdtoV4Tax[] | import("@feedmepos/entity").FdoItemPrintSetting | import("@feedmepos/entity").FdoInventoryBinding[] | import("@feedmepos/entity").FdoMenuItemTakeawayConfig | import("@feedmepos/entity").FdoMenuItemServeDelayConfig | FdoMenuV4ItemImage[] | import("@feedmepos/entity").FdoMenuItemOrderQuantity | import("@feedmepos/entity").FdoGroupOverriderV4[] | null | undefined) => void;
|
|
15
|
+
"update:staged": (staged: StagedProductImage[]) => void;
|
|
15
16
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
16
|
-
"onUpdate:
|
|
17
|
-
"onUpdate:
|
|
18
|
-
"onReset:thumbnail"?: (() => any) | undefined;
|
|
17
|
+
"onUpdate:staged"?: ((staged: StagedProductImage[]) => any) | undefined;
|
|
18
|
+
"onUpdate:form"?: ((key: keyof FdoMenuV4Item | keyof IFdtoMenuV4ItemTracking, value: string | number | boolean | Record<string, any> | string[] | Record<string, string> | import("@feedmepos/entity").FdoDinero | Record<string, import("@feedmepos/entity").FdoDinero> | Record<string, Record<string, import("@feedmepos/entity").FdoDinero>> | import("@feedmepos/entity").FdoItemVariant | import("@feedmepos/entity").FdoMenuItemAdditionalCategory[] | import("@feedmepos/entity").FdtoV4Tax[] | import("@feedmepos/entity").FdoItemPrintSetting | import("@feedmepos/entity").FdoInventoryBinding[] | import("@feedmepos/entity").FdoMenuItemTakeawayConfig | import("@feedmepos/entity").FdoMenuItemServeDelayConfig | FdoMenuV4ItemImage[] | import("@feedmepos/entity").FdoMenuItemOrderQuantity | import("@feedmepos/entity").FdoGroupOverriderV4[] | null | undefined) => any) | undefined;
|
|
19
19
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
20
|
export default _default;
|
|
21
21
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|