@feedmepos/mf-menu 0.32.75 → 0.32.77
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-YaDbyXlx.js → App-BHaFFKgj.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-wWqpjocP.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DVEtgCqE.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-DSXpJSSx.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-3uCD_k5b.js} +3 -3
- package/dist/{Catalog-Coh7Tx2f.js → Catalog-DdV0gF_5.js} +6 -6
- package/dist/{Category-Csd5cNhi.js → Category-B4u7nW_n.js} +4 -4
- package/dist/{Category-wd16ogWA.js → Category-fkh6uy_X.js} +4 -4
- package/dist/{CookingGuide-Cwm624Vt.js → CookingGuide-1BHECj2Q.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-3X1Uy3Nq.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-MYd4Yzd0.js} +1 -1
- package/dist/{Group-CW7TqMHX.js → Group-D8C1gd_3.js} +1 -1
- package/dist/{Group-CpN83xB6.js → Group-DEIB_rHc.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CkDQXjok.js → Group.vue_vue_type_script_setup_true_lang-DfTwCDNq.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bes_ab12.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CLrQ5top.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DN2IlJSu.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BHudLX0K.js} +2672 -2665
- package/dist/{Ingredient-CCB1CXn0.js → Ingredient-CnKzPizo.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-ClIUh76b.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DuKTQfLa.js} +2 -2
- package/dist/{LinkProductSideSheet-ByEP31am.js → LinkProductSideSheet-B0PciGSP.js} +4 -4
- package/dist/{MenuSetting-DnUpiccU.js → MenuSetting-D4lyi3VS.js} +7 -7
- package/dist/{OrderPacing-CsjUHHTE.js → OrderPacing-BchmVvhQ.js} +5 -5
- package/dist/{PrintRoute-BulkJjHF.js → PrintRoute-ltS-wCjr.js} +5 -5
- package/dist/{Product-DiZ3Ivxr.js → Product-WZdmdoQr.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CSDIqhhW.js → Product.vue_vue_type_script_setup_true_lang-BFqhhLvN.js} +14 -14
- package/dist/{ProductInternalTools-BYlVetAt.js → ProductInternalTools-CeDden2S.js} +6 -6
- package/dist/{Products-DPAYyrk_.js → Products-DcLtwbRO.js} +58 -58
- package/dist/{Publish-CvKptEmK.js → Publish-H3Liavuu.js} +4 -4
- package/dist/{Recipe-CmKXW4lc.js → Recipe-PL1QHaYe.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-PfEb-ZpI.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Czp_55oY.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-BUeA0jiF.js → RuleView.vue_vue_type_script_setup_true_lang-P6DLshs1.js} +3 -3
- package/dist/{Scheduler-DsXMul0L.js → Scheduler-CXoxVRBZ.js} +3 -3
- package/dist/{ServingSequence-NxLGJERU.js → ServingSequence-YhME6BpW.js} +3 -3
- package/dist/{Setting-Cvhgv8cY.js → Setting-CI0xqqtI.js} +5 -5
- package/dist/{Subcategory-B3zwNI1N.js → Subcategory-BHPtwuUq.js} +6 -6
- package/dist/{Takeaway-DBZsorSb.js → Takeaway-BzT_Th8V.js} +4 -4
- package/dist/{Takeaway-DksB3yNY.js → Takeaway-xwwcISfI.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DBEqnwFT.js → Takeaway.vue_vue_type_script_setup_true_lang-Be9HV6dK.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-VgKm5LXU.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-C1eTBdUl.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-5b9JTlqf.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CjlsCXDm.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BgtA41z-.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Cb-21rZW.js} +16 -16
- package/dist/{Unit-gBTrgDix.js → Unit-ByhOcOYA.js} +2 -2
- package/dist/{Variant-NTNd7lHW.js → Variant-DHTF9Khv.js} +3 -3
- package/dist/{_id_-COkNC1uU.js → _id_-Baab0DQO.js} +10 -10
- package/dist/{app-DI-lXR40.js → app-Cs8Id8Xm.js} +1 -1
- package/dist/{app-DE92r95F.js → app-jJLYblaN.js} +32 -32
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +47 -13
- package/dist/assets/{override-menu-CsIMTk8M.js → linked-status-BSOqiFHd.js} +4 -4
- package/dist/assets/{menu-export-0Ai3sc0K.js → menu-export-DYwNTsVD.js} +3 -3
- package/dist/assets/{linked-status-Pgn_yaVE.js → override-menu-hOWb-U8t.js} +4 -4
- package/dist/assets/{validate-menu-Dtba61qB.js → validate-menu-DWZ_nQ9A.js} +3 -3
- package/dist/{catalog-CNIYguO2.js → catalog-AhHjSmxz.js} +1 -1
- package/dist/{catalogSetting-Cl-SOFcR.js → catalogSetting-D1rTJ0IV.js} +1 -1
- package/dist/{currency-BKguk5Ng.js → currency-CfklxgOo.js} +1 -1
- package/dist/{dayjs.min-BBajhvYZ.js → dayjs.min-s8Pn5XhH.js} +2 -2
- package/dist/{discardConfirm-BS9HO265.js → discardConfirm-X1bjXonQ.js} +1 -1
- package/dist/{index-BPgTIvxD.js → index-BFLrHA28.js} +5 -5
- package/dist/{index-CfDpRDeF.js → index-CSBbHVWU.js} +71 -57
- package/dist/{index-CoLyTKBO.js → index-DF1e-d79.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dx_siIYV.js → index.vue_vue_type_script_setup_true_lang-DKMwA-UJ.js} +6 -6
- package/dist/{item-BuSRhXS8.js → item-D0GMSEFc.js} +20 -20
- package/dist/{jszip.min-C11vGH5X.js → jszip.min-CrG2EhWe.js} +384 -384
- package/dist/{linkProducts-CF5SrJOW.js → linkProducts-DOtgB1M6.js} +4 -4
- package/dist/{memberPricing-CDdwfWJ1.js → memberPricing-DINEsVxj.js} +1 -1
- package/dist/{menu-Dkjz_SHU.js → menu-DobV0-S0.js} +1 -1
- package/dist/{menuV2-BSjbQBsw.js → menuV2-CzU77NoT.js} +83 -83
- package/dist/{order_pacing-BcRXH_I-.js → order_pacing-Cg41OjXP.js} +5 -5
- package/dist/{priceTier-C-FRMh_E.js → priceTier-ByJqyA8e.js} +1 -1
- package/dist/{rules-Ctdz5qdf.js → rules-DbQdfkh_.js} +3 -3
- package/dist/{scheduler-Dwvr3-qt.js → scheduler-B-GZ_cxC.js} +5 -5
- package/dist/{toExcel-CcqHERvj.js → toExcel-Bq4sIMSZ.js} +2 -2
- package/dist/{unit-LMuidJGG.js → unit-BBPddYB3.js} +3 -3
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -20,23 +20,57 @@ export declare function getItemCategoryNames(categories: CategorizedItem[], item
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function getItemPositionFnByCurrentCategory(currentCategoryId: string | null): (item: FdoMenuV4Item) => number | null;
|
|
22
22
|
/**
|
|
23
|
-
* Position for a newly created item:
|
|
24
|
-
*
|
|
23
|
+
* Position for a newly created item: its slot within the category it lands in, one past the
|
|
24
|
+
* highest already taken there, so items keep the order they were keyed in.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* items in a real menu carry no position at all. Sorting first IS reachable, so that is the
|
|
30
|
-
* guarantee we make instead.
|
|
26
|
+
* The incremental counterpart of `withSheetOrderPosition`, which applies the same rule to a whole
|
|
27
|
+
* imported sheet. Both mean "the item's slot in this category", and a drag normalising a category
|
|
28
|
+
* to 1..n means the same thing, so all three paths write the same kind of number.
|
|
31
29
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
30
|
+
* `max + 1`, not `items.length + 1`. Length breaks as soon as anything is deleted — positions
|
|
31
|
+
* 1,2,3 minus the middle one leaves 1,3 with a length of 2, and the next item would be handed 3
|
|
32
|
+
* and tie with the survivor. Tied positions have no defined order (the Dart sort behind the POS
|
|
33
|
+
* is not stable), so the new item could appear either side of it. Taking the max cannot collide.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
35
|
+
* Scoped to one category, because an item holds a separate position per category it belongs to —
|
|
36
|
+
* `item.position` for its main one, an `additionalCategories` entry for each of the rest. A max
|
|
37
|
+
* taken across the whole menu would still sort correctly but would drift away from the 1..n a
|
|
38
|
+
* drag writes.
|
|
39
|
+
*
|
|
40
|
+
* A null position means "never placed", so it does not contribute to the max. Those items sort
|
|
41
|
+
* AFTER every positioned one — `sortPosition` here, Dart `sortByPositionCodeName` inside
|
|
42
|
+
* `overrideMenu`, and its Go port all agree — so no number can rank a new item below them. New
|
|
43
|
+
* items therefore group above the never-placed ones, in the order they were entered. Landing
|
|
44
|
+
* them at the true end of a legacy category would mean renumbering it first; that is what a drag
|
|
45
|
+
* is for, and doing it on every add was rejected on ITS-000651 because a single addition to a
|
|
46
|
+
* long menu would then vanish off the bottom of the screen.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getNewItemPosition(items: FdoMenuV4Item[], categoryId: string | null): number;
|
|
49
|
+
/**
|
|
50
|
+
* Positions for an imported row: one slot in every category the item belongs to.
|
|
51
|
+
*
|
|
52
|
+
* The batch counterpart of `getNewItemPosition` — same rule, applied to a whole sheet at once
|
|
53
|
+
* instead of one item at a time, so the two agree on what a position means and manual additions
|
|
54
|
+
* carry straight on from where an import left off.
|
|
55
|
+
*
|
|
56
|
+
* Import is a full replace of the item module, not a merge: `MenuImport.deleteItem` drops every
|
|
57
|
+
* existing item whose `_id` is absent from the sheet. So the sheet row order is the intended
|
|
58
|
+
* order for rows that update an existing item just as much as for rows that create one, and a
|
|
59
|
+
* dense 1..n per category is safe — there is no unlisted item left behind to collide with.
|
|
60
|
+
*
|
|
61
|
+
* Every membership draws its own number, main and secondary alike. Stamping the main category's
|
|
62
|
+
* number onto each `additionalCategories` entry would tie with whichever item actually holds that
|
|
63
|
+
* number in the secondary category, and tied positions have no defined order (the Dart sort
|
|
64
|
+
* behind the POS is not stable). The sheet carries no column saying where an item should sit in a
|
|
65
|
+
* secondary category, so those memberships fall in the row order of the items that hold them.
|
|
66
|
+
*
|
|
67
|
+
* `takeNextPosition` hands out the next free slot in a category and is expected to have side
|
|
68
|
+
* effects — it is called once per membership, and the call order fixes the numbering.
|
|
69
|
+
*
|
|
70
|
+
* A useful side effect of all this: after any import every item in the sheet carries a position,
|
|
71
|
+
* so `getNewItemPosition` has a real max to build on rather than a category full of nulls.
|
|
38
72
|
*/
|
|
39
|
-
export declare function
|
|
73
|
+
export declare function withSheetOrderPositions<T extends Pick<FdoMenuV4Item, "category" | "position" | "additionalCategories">>(item: T, takeNextPosition: (categoryId: string | null) => number): T;
|
|
40
74
|
export declare function getUpdatedItemsWithNewPositions(items: FdoMenuV4Item[], currentCategoryId: string | null): ({
|
|
41
75
|
position: number;
|
|
42
76
|
_id: string;
|