@feedmepos/mf-menu 0.31.16-beta.1 → 0.31.17-beta.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-Bsppf5CN.js → App-BUjwToat.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DTuPAGEJ.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CBPOCkmg.js} +2 -2
- package/dist/{Catalog-Bj3MNcLG.js → Catalog-BkfsckOV.js} +18 -18
- package/dist/{Category-CHvG2e6b.js → Category-C7EPAK0G.js} +36 -36
- package/dist/{Category-WLIH1Zyc.js → Category-DTKlxBpE.js} +24 -24
- package/dist/{CookingGuide-C8N45xnL.js → CookingGuide-DCazfCuz.js} +56 -56
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-GriZxAIw.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-2hApsFMq.js} +1 -1
- package/dist/{Group-CR3LWKXE.js → Group-DLjkPLk9.js} +1 -1
- package/dist/{Group-Byj3qEBv.js → Group-DNBFvwk-.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-tecpeqJT.js → Group.vue_vue_type_script_setup_true_lang-8Upt5al2.js} +54 -54
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BkLHDcZV.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIWySrgb.js} +6 -6
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-YOzhk0a0.js +96257 -0
- package/dist/{Ingredient-BCfCDCFS.js → Ingredient-BUIIhzYV.js} +52 -52
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CpXnjduY.js → InventoryBinding.vue_vue_type_script_setup_true_lang-nqY-pxrW.js} +1052 -1052
- package/dist/{LinkProductSideSheet-BGlLnnm9.js → LinkProductSideSheet-xIuPAwp7.js} +14 -14
- package/dist/{MenuSetting-CdKhTxyc.js → MenuSetting-C3J66nHM.js} +11 -11
- package/dist/{PrintRoute-B-UlUlSD.js → PrintRoute-DnZrJ9IW.js} +26 -26
- package/dist/{Product-BggNPOwm.js → Product-jBcyCvO7.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DPOaafZ-.js → Product.vue_vue_type_script_setup_true_lang-CsaY9Kve.js} +113 -113
- package/dist/ProductInternalTools-CUZSrxvR.js +415 -0
- package/dist/Products-CRFXG-Du.js +270 -0
- package/dist/{Publish-BTPdN1Ub.js → Publish-Ch5QlJ9v.js} +37 -37
- package/dist/{Recipe-CibJRxHH.js → Recipe-BZJUndG3.js} +25 -25
- package/dist/{Scheduler-DAShXnol.js → Scheduler-BgMTPzhG.js} +13 -13
- package/dist/{ServingSequence-DFs7VR5V.js → ServingSequence-BISPWfTD.js} +36 -36
- package/dist/{Setting-aApApOKZ.js → Setting-4L-p0np0.js} +24 -24
- package/dist/{Subcategory-CGnGq5Kd.js → Subcategory-CptCl4cb.js} +39 -39
- package/dist/{Takeaway-rJDqoozq.js → Takeaway-BAM3XfIf.js} +1 -1
- package/dist/{Takeaway-C8M-Z4eK.js → Takeaway-DqiGDTfg.js} +12 -12
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CrFeCwvr.js → Takeaway.vue_vue_type_script_setup_true_lang-oZo0esEd.js} +25 -25
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CCVSPoDB.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C7QOuqzZ.js} +115 -115
- package/dist/{Unit-CcWjE73k.js → Unit-BYAvg037.js} +8 -8
- package/dist/{Variant-BDPjFaAa.js → Variant-uGUG4vH2.js} +18 -18
- package/dist/{_id_-mUBoDBKS.js → _id_-Uf140OcM.js} +19 -19
- package/dist/{app-BBoQR7rs.js → app-50bXo6rU.js} +262 -247
- package/dist/{app-sdhJyRKX.js → app-CUuWtEOn.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +1618 -0
- package/dist/apps/mf-menu/src/components/productInternalTools/ImageUpdatePreview.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/productInternalTools/ImageUploadDialog.vue.d.ts +28 -0
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +15 -19
- package/dist/apps/mf-menu/src/utils/batchProcessor.d.ts +33 -0
- package/dist/apps/mf-menu/src/utils/images.d.ts +44 -0
- package/dist/apps/mf-menu/src/views/Product/ProductInternalTools.vue.d.ts +2 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BkX3Y-ws.js → linked-status-Dsak7omL.js} +2 -2
- package/dist/assets/{override-menu-Bo0ZNZ-U.js → override-menu-COqLF5sS.js} +2 -2
- package/dist/assets/{validate-menu-CIWz9YXT.js → validate-menu-DkLBw23v.js} +2 -2
- package/dist/{catalog-BbukcamZ.js → catalog-x_NpHc5w.js} +1 -1
- package/dist/{catalogSetting-7ZMZjqGs.js → catalogSetting-DU_dUoSh.js} +1 -1
- package/dist/{category-Cq2MmCBq.js → category-DJRGfRhf.js} +1 -1
- package/dist/{currency-OQd6moI9.js → currency-ljvNxerM.js} +1 -1
- package/dist/{dayjs.min-m51FMJgI.js → dayjs.min-DsjutQjn.js} +1 -1
- package/dist/{index-b9FcXU4s.js → index-Bb7-YO3o.js} +23 -23
- package/dist/{index-DlTid7hh.js → index-C58VTE70.js} +14 -14
- package/dist/{index-B5uSVMTf.js → index-CBnsZeF8.js} +1 -1
- package/dist/{item-96CGb3Kx.js → item-Cerfyitf.js} +1521 -1485
- package/dist/jszip.min-Co4cqzOU.js +2393 -0
- package/dist/{menu-Bqiz6B2P.js → menu-B7KFi80A.js} +154 -154
- package/dist/{menu-BmBsIlGC.js → menu-Bpul41jT.js} +1 -1
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-Ck8MqQWD.js → priceTier-CfW69h1F.js} +1 -1
- package/dist/{scheduler-DeOCwKnf.js → scheduler-DsO3qpTw.js} +3 -3
- package/dist/{subcategory-DbiQCCF5.js → subcategory-Cb_rqtHz.js} +84 -84
- package/dist/{toExcel-BsguLQA5.js → toExcel-P9X-WSN5.js} +15 -15
- package/dist/{unit-CnM6N-39.js → unit-Dej_sihQ.js} +24 -24
- package/package.json +3 -2
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-BRlU0arf.js +0 -73010
- package/dist/Products-DZFgAKxB.js +0 -2660
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
interface MatchedImage {
|
|
2
|
+
productId: string;
|
|
3
|
+
productName: string;
|
|
4
|
+
originalThumbnail?: string | null;
|
|
5
|
+
newImage: File;
|
|
6
|
+
newImageUrl: string;
|
|
7
|
+
}
|
|
8
|
+
interface UnmatchedImage {
|
|
9
|
+
filename: string;
|
|
10
|
+
file: File;
|
|
11
|
+
imageUrl: string;
|
|
12
|
+
}
|
|
13
|
+
interface Props {
|
|
14
|
+
matchedImages: MatchedImage[];
|
|
15
|
+
unmatchedImages: UnmatchedImage[];
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
cancel: () => void;
|
|
19
|
+
update: (images: MatchedImage[]) => void;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
21
|
+
onCancel?: (() => any) | undefined;
|
|
22
|
+
onUpdate?: ((images: MatchedImage[]) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
26
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
27
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
28
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
29
|
+
} : {
|
|
30
|
+
type: import('vue').PropType<T[K]>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title?: string;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
5
|
+
title: string;
|
|
6
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
7
|
+
title: string;
|
|
8
|
+
}>>> & Readonly<{}>, {
|
|
9
|
+
title: string;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
type __VLS_WithDefaults<P, D> = {
|
|
22
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
23
|
+
default: D[K];
|
|
24
|
+
}> : P[K];
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Prettify<T> = {
|
|
27
|
+
[K in keyof T]: T[K];
|
|
28
|
+
} & {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as ExcelJS from "exceljs";
|
|
2
|
+
import { type WorkBook } from "xlsx";
|
|
2
3
|
import { FdoDinero } from "@feedmepos/core/entity";
|
|
3
|
-
import { FdoMenuV4, FdoMenuV4Category, FdoMenuV4Item, FdoMenuV4VariantGroup, FdoMenuV4Takeaway, FdoItemOverriderV4, FdoItemVariant, F_ORDER_FROM } from "@feedmepos/menu/entity";
|
|
4
|
+
import { FdoMenuV4, FdoMenuV4Category, FdoMenuV4Item, FdoMenuV4VariantGroup, FdoMenuV4Takeaway, FdoItemOverriderV4, FdoMenuV4Catalog, FdoItemVariant, F_ORDER_FROM } from "@feedmepos/menu/entity";
|
|
4
5
|
import type { FdoGroupOverriderV4 } from "@feedmepos/menu/entity";
|
|
5
6
|
interface ExportMenuDataRow {
|
|
6
7
|
_id: string;
|
|
@@ -31,6 +32,7 @@ interface ExportAddonGroupRow {
|
|
|
31
32
|
itemId: string;
|
|
32
33
|
itemCode: string;
|
|
33
34
|
itemName: string;
|
|
35
|
+
itemNameOverrider: string;
|
|
34
36
|
combinationKey: string;
|
|
35
37
|
combinationName: string;
|
|
36
38
|
price: number;
|
|
@@ -113,25 +115,19 @@ export declare class MenuExport {
|
|
|
113
115
|
transformOverrideAddonGroup(data: FdoGroupOverriderV4[]): ExportAddonGroupRow[];
|
|
114
116
|
private mapAddonGroup;
|
|
115
117
|
transformItemsLinkWithGroup(): {};
|
|
116
|
-
exportToExcel():
|
|
117
|
-
private
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
};
|
|
122
|
-
exportCatalogAddonToExcel(): {
|
|
123
|
-
workSheets: WorkSheet[];
|
|
124
|
-
workSheetNames: string[];
|
|
125
|
-
};
|
|
126
|
-
private generateWorkSheets;
|
|
118
|
+
exportToExcel(): any[];
|
|
119
|
+
private createWorkbookExcelJS;
|
|
120
|
+
private formatWorkbookCell;
|
|
121
|
+
exportCatalogToExcelExcelJS(): ExcelJS.Workbook;
|
|
122
|
+
exportCatalogAddonToExcelExcelJS(): ExcelJS.Workbook;
|
|
127
123
|
}
|
|
128
124
|
export declare class MenuImport {
|
|
129
125
|
menu: FdoMenuV4;
|
|
130
|
-
|
|
131
|
-
[
|
|
126
|
+
variantGroups2: {
|
|
127
|
+
[variantGroupId: string]: FdoMenuV4VariantGroup;
|
|
132
128
|
};
|
|
133
|
-
|
|
134
|
-
[
|
|
129
|
+
variantOptionMap: {
|
|
130
|
+
[optionNames: string]: string[];
|
|
135
131
|
};
|
|
136
132
|
takeaways: {
|
|
137
133
|
[key: string]: string;
|
|
@@ -150,7 +146,7 @@ export declare class MenuImport {
|
|
|
150
146
|
mapVariant(variantGroupIds?: string[]): {
|
|
151
147
|
[key: string]: string;
|
|
152
148
|
};
|
|
153
|
-
processCatalog(catalogs: ExportMenuDataRow[][]):
|
|
149
|
+
processCatalog(catalogs: ExportMenuDataRow[][], sheetNames: string[]): FdoMenuV4Catalog[];
|
|
154
150
|
groupVariant(rows: ExportMenuDataRow[]): {
|
|
155
151
|
[key: string]: string[];
|
|
156
152
|
};
|
|
@@ -173,7 +169,7 @@ export declare class MenuImport {
|
|
|
173
169
|
deleteAddon(groupedAddons: {
|
|
174
170
|
[groupId: string]: GroupedAddon[];
|
|
175
171
|
}): void;
|
|
176
|
-
processItemsGroup(itemGroupsData: itemsLinkWithGroup[][]
|
|
172
|
+
processItemsGroup(itemGroupsData: itemsLinkWithGroup[][]): void;
|
|
177
173
|
importToMenu(workbook?: WorkBook, addonWorkbook?: WorkBook, itemLinkedAddonWorkbook?: WorkBook): z.infer<z.ZodObject<{
|
|
178
174
|
_id: z.ZodString;
|
|
179
175
|
modules: z.ZodObject<{
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for batch processing operations
|
|
3
|
+
*/
|
|
4
|
+
import type { Ref } from "vue";
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for batch processing
|
|
7
|
+
*/
|
|
8
|
+
export interface BatchProcessorConfig<T, R> {
|
|
9
|
+
/** Array of items to process */
|
|
10
|
+
items: T[];
|
|
11
|
+
/** Function to process a single item */
|
|
12
|
+
processor: (item: T) => Promise<R>;
|
|
13
|
+
/** Number of items to process concurrently (default: 5) */
|
|
14
|
+
batchSize?: number;
|
|
15
|
+
/** Delay between batches in milliseconds (default: 200) */
|
|
16
|
+
batchDelay?: number;
|
|
17
|
+
/** Optional progress callback */
|
|
18
|
+
onProgress?: (progress: {
|
|
19
|
+
current: number;
|
|
20
|
+
total: number;
|
|
21
|
+
batchStart: number;
|
|
22
|
+
batchEnd: number;
|
|
23
|
+
message: string;
|
|
24
|
+
}) => void;
|
|
25
|
+
/** Optional progress message ref to update */
|
|
26
|
+
progressMessage?: Ref<string>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Process items in batches with concurrency control
|
|
30
|
+
* @param config - Batch processing configuration
|
|
31
|
+
* @returns Promise that resolves to array of results (null for failed items)
|
|
32
|
+
*/
|
|
33
|
+
export declare function processBatch<T, R>(config: BatchProcessorConfig<T, R>): Promise<Array<R | null>>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for handling images, including cross-origin image fetching
|
|
3
|
+
*/
|
|
4
|
+
import { type BatchProcessorConfig } from "./batchProcessor";
|
|
5
|
+
/**
|
|
6
|
+
* Batch download tasks configuration
|
|
7
|
+
*/
|
|
8
|
+
export interface DownloadTask {
|
|
9
|
+
/** URL to download */
|
|
10
|
+
url: string;
|
|
11
|
+
/** Filename for the downloaded file */
|
|
12
|
+
filename: string;
|
|
13
|
+
/** Optional index for tracking */
|
|
14
|
+
index?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Converts an image URL to a blob with cross-origin support
|
|
18
|
+
* @param imageUrl - The image URL to fetch
|
|
19
|
+
* @param options - Additional options for fetching
|
|
20
|
+
* @returns Promise that resolves to a blob or null if failed
|
|
21
|
+
*/
|
|
22
|
+
export declare function fetchImageAsBlob(imageUrl: string, options?: {
|
|
23
|
+
withTimestamp?: boolean;
|
|
24
|
+
filename?: string;
|
|
25
|
+
}): Promise<{
|
|
26
|
+
blob: Blob;
|
|
27
|
+
filename: string;
|
|
28
|
+
} | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Converts an image URL to a File object with cross-origin support
|
|
31
|
+
* @param imageUrl - The image URL to fetch
|
|
32
|
+
* @param filename - The filename for the resulting File object. Defaults to 'image.jpg'.
|
|
33
|
+
* @param mimeType - The MIME type for the File object. Defaults to 'image/jpeg'.
|
|
34
|
+
* @returns Promise that resolves to a File object or null if failed
|
|
35
|
+
*/
|
|
36
|
+
export declare function fetchImageAsFile(imageUrl: string, filename?: string, mimeType?: string): Promise<File | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Download multiple images in batches
|
|
39
|
+
* @param tasks - Array of download tasks
|
|
40
|
+
* @param imageDownloader - Function to download a single image
|
|
41
|
+
* @param options - Batch processing options
|
|
42
|
+
* @returns Promise that resolves to array of download results
|
|
43
|
+
*/
|
|
44
|
+
export declare function batchDownloadImages<T>(tasks: DownloadTask[], imageDownloader: (url: string, filename: string) => Promise<T | null>, options?: Omit<BatchProcessorConfig<DownloadTask, T>, "items" | "processor">): Promise<Array<T | null>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|