@feedmepos/mf-menu 0.32.71 → 0.32.72
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-Bay6p3xd.js → App-BqlWMfMd.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Je_NoQ3y.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CGm_HCN-.js} +12 -12
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-DBjYkJhB.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-DKwW-KuQ.js} +3 -3
- package/dist/{Catalog-DfWHNm4n.js → Catalog-DmSqkb83.js} +20 -20
- package/dist/{Category-51BrJsdv.js → Category-BViqkFeL.js} +4 -4
- package/dist/{Category-m45WrP7O.js → Category-Dlj54Cvf.js} +4 -4
- package/dist/{CookingGuide-Dk-ibGYd.js → CookingGuide-CTy27R3R.js} +46 -46
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CzpScELw.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DnkFD9Qo.js} +1 -1
- package/dist/{Group-NUWfR17j.js → Group-B_XL8419.js} +1 -1
- package/dist/{Group-CZDoqPK7.js → Group-CCHCA3-l.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-h8zygLBJ.js → Group.vue_vue_type_script_setup_true_lang-D4UZ_9r_.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Dq5jMv3_.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Hq-gI8hs.js} +24 -24
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-EsQKUSJa.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CMNiLTsy.js} +7 -7
- package/dist/{Ingredient-CcnUyiM5.js → Ingredient-BKMpffiK.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BwxZEDVT.js → InventoryBinding.vue_vue_type_script_setup_true_lang-B-A8Yae3.js} +2 -2
- package/dist/{LinkProductSideSheet-ClMiajzX.js → LinkProductSideSheet-C0OwARv3.js} +4 -4
- package/dist/{MenuSetting-Dw3lVHtp.js → MenuSetting-t2SC98j8.js} +7 -7
- package/dist/{OrderPacing-Dh8T7OKW.js → OrderPacing-BeOxlK5N.js} +5 -5
- package/dist/{PrintRoute-BrSaSZI3.js → PrintRoute-BehVCEKW.js} +10 -10
- package/dist/{Product-CQ7AuhbY.js → Product-JhmPZPy5.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Bw6l2IEC.js → Product.vue_vue_type_script_setup_true_lang-CaIdoW_3.js} +14 -14
- package/dist/ProductInternalTools-BaOhffU-.js +439 -0
- package/dist/{Products-CoL7S7-1.js → Products-BEL7jDXA.js} +78 -78
- package/dist/{Publish-C_lOqrSX.js → Publish-0paPWlI9.js} +4 -4
- package/dist/{Recipe-Ce8qXnG5.js → Recipe-C2EDxRF-.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DMB9bFg9.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BpGAz8tp.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-D9i9tMAj.js → RuleView.vue_vue_type_script_setup_true_lang-DP2Sx5Ik.js} +514 -514
- package/dist/{Scheduler-B2ZtWIPp.js → Scheduler-Q5uM5gxh.js} +17 -17
- package/dist/{ServingSequence-BWZ1YpzI.js → ServingSequence-T4C9GPzV.js} +3 -3
- package/dist/{Setting-CdxNVi7G.js → Setting-Ck9fOSnA.js} +5 -5
- package/dist/{Subcategory-Bn0O6i5t.js → Subcategory-DA9P_jgR.js} +6 -6
- package/dist/{Takeaway-luRkknPl.js → Takeaway-BWHTHlyY.js} +1 -1
- package/dist/{Takeaway-yE0GhL5I.js → Takeaway-BhBwxuQ1.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CnZTbF3e.js → Takeaway.vue_vue_type_script_setup_true_lang-CoW3ltrF.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-B3N7_zfR.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-B_NVIotA.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-BLzzBcqV.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-DKAvaKvf.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BvnoCeCw.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-KLajCLq6.js} +15 -15
- package/dist/{Unit-JPFtrbuS.js → Unit-Cn8MfZ3t.js} +2 -2
- package/dist/{Variant-BGJ-aKF1.js → Variant-D8YObOjv.js} +3 -3
- package/dist/{_id_-BUlkRwgU.js → _id_-D3xdoF7g.js} +10 -10
- package/dist/{app-CMjz-bvL.js → app-CytlajzP.js} +1 -1
- package/dist/{app-2VeaJE9t.js → app-DW6oW0Ma.js} +37 -37
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +65 -16
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-B9caUckb.js → linked-status-6NCMYr9j.js} +4 -4
- package/dist/assets/{menu-export-DYfPYpgS.js → menu-export-B0G2UoQu.js} +34 -34
- package/dist/assets/{override-menu-uNjUqcak.js → override-menu-BLTWWMwC.js} +4 -4
- package/dist/assets/{validate-menu-BiXMOXpN.js → validate-menu-Bw1SjjTD.js} +3 -3
- package/dist/{catalog--64fgdzd.js → catalog-D-eYUu3U.js} +1 -1
- package/dist/{catalogSetting-CplTgRmk.js → catalogSetting-DTuat7sH.js} +1 -1
- package/dist/{currency-CjYkQ4FL.js → currency-Dj_Wt0Hv.js} +1 -1
- package/dist/dayjs.min-DEj15U1R.js +7 -0
- package/dist/{discardConfirm-DOc0ieeO.js → discardConfirm-D8fV6Aag.js} +1 -1
- package/dist/{index-Dw_Fw5ni.js → index--oIuzXeT.js} +5 -5
- package/dist/{index-CTA48kW2.js → index-DM0Bzsz_.js} +1 -1
- package/dist/{index-BrtZ42qx.js → index-Kuoa82jl.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-BCZZq6zJ.js → index.vue_vue_type_script_setup_true_lang-COHdIM2S.js} +3988 -3982
- package/dist/{item-DL0lbXPC.js → item-DY5crb6D.js} +1159 -1164
- package/dist/{jszip.min-CTn9qnAT.js → jszip.min-BZ1Z78MP.js} +167 -167
- package/dist/{linkProducts-DNPyRjOC.js → linkProducts-96XgmBUL.js} +4 -4
- package/dist/{memberPricing-ByMD7Sun.js → memberPricing-WDnr_fBu.js} +1 -1
- package/dist/{menu-C77otNXH.js → menu-xKq7gpBv.js} +1 -1
- package/dist/{menuV2-Bi_EMfOM.js → menuV2-y6RgekH4.js} +49 -49
- package/dist/{order_pacing-29v64nh0.js → order_pacing-5FfwO1W8.js} +5 -5
- package/dist/{priceTier-BscL3YjX.js → priceTier-C-qqjKEP.js} +1 -1
- package/dist/{rules-BYL-otiB.js → rules-BUN28pvZ.js} +3 -3
- package/dist/{scheduler-Cqvnr0u1.js → scheduler-CHwF5zGU.js} +5 -5
- package/dist/{toExcel-421pbm-Z.js → toExcel-Doi2nxOH.js} +2 -2
- package/dist/{unit-DDtyAbV0.js → unit-BnAly_uA.js} +17 -17
- package/package.json +1 -1
- package/dist/ProductInternalTools-2rYX2GR0.js +0 -416
- package/dist/dayjs.min-DCMtwvjf.js +0 -7
package/dist/app.js
CHANGED
|
@@ -1601,6 +1601,10 @@ export declare const i18nMessages: {
|
|
|
1601
1601
|
};
|
|
1602
1602
|
productInternalTools: {
|
|
1603
1603
|
title: string;
|
|
1604
|
+
unreadable_images: {
|
|
1605
|
+
title: string;
|
|
1606
|
+
message: string;
|
|
1607
|
+
};
|
|
1604
1608
|
};
|
|
1605
1609
|
publish: {
|
|
1606
1610
|
title: string;
|
|
@@ -3661,6 +3665,10 @@ export declare const i18nMessages: {
|
|
|
3661
3665
|
};
|
|
3662
3666
|
productInternalTools: {
|
|
3663
3667
|
title: string;
|
|
3668
|
+
unreadable_images: {
|
|
3669
|
+
title: string;
|
|
3670
|
+
message: string;
|
|
3671
|
+
};
|
|
3664
3672
|
};
|
|
3665
3673
|
publish: {
|
|
3666
3674
|
title: string;
|
|
@@ -5719,6 +5727,10 @@ export declare const i18nMessages: {
|
|
|
5719
5727
|
};
|
|
5720
5728
|
productInternalTools: {
|
|
5721
5729
|
title: string;
|
|
5730
|
+
unreadable_images: {
|
|
5731
|
+
title: string;
|
|
5732
|
+
message: string;
|
|
5733
|
+
};
|
|
5722
5734
|
};
|
|
5723
5735
|
publish: {
|
|
5724
5736
|
title: string;
|
|
@@ -7778,6 +7790,10 @@ export declare const i18nMessages: {
|
|
|
7778
7790
|
};
|
|
7779
7791
|
productInternalTools: {
|
|
7780
7792
|
title: string;
|
|
7793
|
+
unreadable_images: {
|
|
7794
|
+
title: string;
|
|
7795
|
+
message: string;
|
|
7796
|
+
};
|
|
7781
7797
|
};
|
|
7782
7798
|
publish: {
|
|
7783
7799
|
title: string;
|
|
@@ -9825,6 +9841,10 @@ export declare const i18nMessages: {
|
|
|
9825
9841
|
};
|
|
9826
9842
|
productInternalTools: {
|
|
9827
9843
|
title: string;
|
|
9844
|
+
unreadable_images: {
|
|
9845
|
+
title: string;
|
|
9846
|
+
message: string;
|
|
9847
|
+
};
|
|
9828
9848
|
};
|
|
9829
9849
|
publish: {
|
|
9830
9850
|
title: string;
|
|
@@ -63,6 +63,22 @@ export declare function validateImageType(file: File): string | null;
|
|
|
63
63
|
* the images already in the wild.
|
|
64
64
|
*/
|
|
65
65
|
export declare const MAX_IMAGE_EDGE = 2000;
|
|
66
|
+
/**
|
|
67
|
+
* What an upload is aimed at, as opposed to what the service will still accept.
|
|
68
|
+
*
|
|
69
|
+
* Exported because it is a contract, not a tuning knob: POS cannot render a large image —
|
|
70
|
+
* it crashes — so "did these bytes go through compression" is a question callers have to be
|
|
71
|
+
* able to ask (`meetsUploadBudget`), not just something this module does on the way past.
|
|
72
|
+
*
|
|
73
|
+
* `MAX_IMAGE_BYTES` is a 413 boundary, not a target, and using it as one is what merchants
|
|
74
|
+
* saw as "compression that does nothing": a heavy original re-encoded at `OUTPUT_QUALITY`
|
|
75
|
+
* landed at 8 MB, sat under the limit, and no further round ran. A 2000px JPEG of a real
|
|
76
|
+
* photo is a few hundred KB, so this sits just above where photography lands and below
|
|
77
|
+
* anything that would be heavy on a POS tile or a QR menu card. Enforced by the loop in
|
|
78
|
+
* `canvasToFile`, which spends quality to get here — a full-frame 2000x2000 photo does
|
|
79
|
+
* cross it and comes back one quality step down, which is the intended trade.
|
|
80
|
+
*/
|
|
81
|
+
export declare const TARGET_UPLOAD_BYTES: number;
|
|
66
82
|
/**
|
|
67
83
|
* Encodes an edited canvas as a file guaranteed to be uploadable.
|
|
68
84
|
*
|
|
@@ -72,8 +88,10 @@ export declare const MAX_IMAGE_EDGE = 2000;
|
|
|
72
88
|
* the dead end this feature exists to remove. Quality is spent first and pixels second,
|
|
73
89
|
* because a slightly softer photo beats a smaller one.
|
|
74
90
|
*
|
|
75
|
-
*
|
|
76
|
-
* quality lever
|
|
91
|
+
* Callers ask for JPEG (see `compressImageForUpload`); `mime` still honours a deliberate
|
|
92
|
+
* PNG, which has no quality lever and is shrunk by size alone. Lossy output is flattened
|
|
93
|
+
* onto white first, in place — every canvas reaching here is minted for this encode (a
|
|
94
|
+
* cropper result or `fileToCanvas` output), never one a caller keeps using.
|
|
77
95
|
*/
|
|
78
96
|
export declare function canvasToFile(canvas: HTMLCanvasElement, options: {
|
|
79
97
|
fileName: string;
|
|
@@ -82,20 +100,51 @@ export declare function canvasToFile(canvas: HTMLCanvasElement, options: {
|
|
|
82
100
|
maxBytes?: number;
|
|
83
101
|
}): Promise<File>;
|
|
84
102
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
|
|
98
|
-
|
|
103
|
+
* Whether a file already satisfies everything an upload guarantees, so re-encoding it would
|
|
104
|
+
* only cost a generation of JPEG loss.
|
|
105
|
+
*
|
|
106
|
+
* Deliberately strict on all three axes, because the consumer is unforgiving: POS crashes on
|
|
107
|
+
* a large image, so anything that cannot be proven compressed has to be compressed. JPEG is
|
|
108
|
+
* required rather than preferred — a PNG in budget today is still a format whose weight does
|
|
109
|
+
* not track its pixel count, and it is the format that produced the 8 MB "compressed" upload
|
|
110
|
+
* in the first place.
|
|
111
|
+
*
|
|
112
|
+
* `dimensions` is optional only because a caller that has not decoded the image yet cannot
|
|
113
|
+
* supply it; omitting it makes this answer the question for bytes and format alone, so a
|
|
114
|
+
* caller that can decode should pass it.
|
|
115
|
+
*/
|
|
116
|
+
export declare function meetsUploadBudget(file: File, dimensions?: {
|
|
117
|
+
width: number;
|
|
118
|
+
height: number;
|
|
119
|
+
} | null): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Re-encodes a picked file as a `MAX_IMAGE_EDGE` / `OUTPUT_QUALITY` JPEG before upload.
|
|
122
|
+
*
|
|
123
|
+
* Unconditional, and unconditionally JPEG — both learned the hard way. The multi-image
|
|
124
|
+
* rewrite replaced the single-thumbnail flow's always-compress (4:3, 2000px, JPEG q0.75)
|
|
125
|
+
* with a plain size check, so a full-resolution phone photo reached media-service verbatim
|
|
126
|
+
* whenever it sat under `MAX_IMAGE_BYTES`; putting the edge cap back still kept a PNG
|
|
127
|
+
* source as PNG, and canvas PNG is lossless, so a 10 MB photo saved as PNG came back ~8 MB
|
|
128
|
+
* and counted as compressed. Product photos gain nothing from an alpha channel, so
|
|
129
|
+
* transparency is flattened onto white and everything leaves as JPEG. (The backfill script
|
|
130
|
+
* still keeps a genuinely transparent PNG as PNG: it rewrites production originals
|
|
131
|
+
* irreversibly, so changing what an already-approved image shows is a line it does not
|
|
132
|
+
* cross. A new upload is previewed in the editor before the merchant confirms it.)
|
|
133
|
+
*
|
|
134
|
+
* The only file handed back untouched is a JPEG that is already leaner than the encode —
|
|
135
|
+
* one saved below `OUTPUT_QUALITY` grows if re-encoded, and skipping that spares it a
|
|
136
|
+
* second generation of loss for nothing. Restricted to JPEG sources on purpose, rather
|
|
137
|
+
* than "whatever is smaller": product images have no use for an alpha channel, so no
|
|
138
|
+
* upload path may leave a PNG or WebP in storage, and a JPEG source cannot carry
|
|
139
|
+
* transparency in the first place. The trade is known and accepted — a lean PNG of flat
|
|
140
|
+
* colour (a logo, a screenshot of a menu) re-encodes bigger, because JPEG spends bits on
|
|
141
|
+
* exactly the hard edges PNG stores for free. Every stored original being one format is
|
|
142
|
+
* worth that.
|
|
143
|
+
*
|
|
144
|
+
* Note what the passthrough cannot wave through: the encode it is compared against is
|
|
145
|
+
* bounded by `TARGET_UPLOAD_BYTES`, so a heavy original has nothing lean to tie with. The
|
|
146
|
+
* comparison used to be against a same-format encode, which is how a 10 MB PNG kept its
|
|
147
|
+
* own bytes.
|
|
99
148
|
*/
|
|
100
149
|
export declare function compressImageForUpload(file: File, unreadableMessage?: string): Promise<File>;
|
|
101
150
|
/**
|