@feedmepos/mf-menu 0.32.17 → 0.32.18-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-Cfl37TTw.js +152661 -0
- package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
- package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
- package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
- package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
- package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
- package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
- package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
- package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
- package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
- package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
- package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
- package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
- package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
- package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
- package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
- package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
- package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
- package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
- package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
- package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
- package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
- package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
- package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
- package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
- package/dist/app.js +4 -5
- package/dist/apps/mf-menu/src/app.d.ts +1 -2
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
- package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
- package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
- package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
- package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
- package/dist/dayjs.min-DNPTnUFp.js +6 -0
- package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
- package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
- package/dist/mf-menu.css +1 -1
- package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
- package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
- package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
- package/package.json +1 -1
- package/dist/App-BiSEuDkd.js +0 -13484
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
- package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
- package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-5fxKLAzS.js +0 -8163
- package/dist/app-nTzkERJW.js +0 -68
- package/dist/catalog-BO2nXwe5.js +0 -199
- package/dist/category-CuG3DsGL.js +0 -156
- package/dist/check-C9mY6LiX.js +0 -9
- package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
- package/dist/currency-DxC5zyZB.js +0 -7
- package/dist/dayjs.min-BvFUSPWD.js +0 -6
- package/dist/discardConfirm-BHni0LNu.js +0 -28
- package/dist/index-B0nhvuxR.js +0 -273
- package/dist/index-C2zPvt64.js +0 -239
- package/dist/index-C36JQix-.js +0 -246
- package/dist/index-CisutoS9.js +0 -156
- package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
- package/dist/item-K01xd1Z0.js +0 -6868
- package/dist/menuV2-DKE-xanq.js +0 -1052
- package/dist/object-DVUNCr7w.js +0 -16
- package/dist/priceTier-Beavb91W.js +0 -87
- package/dist/search-BAPEUu1R.js +0 -15
- package/dist/string-DpfFixWH.js +0 -4
- package/dist/subcategory-DnslmmRD.js +0 -148
- package/dist/tooltip-B5BiPMx9.js +0 -32
- package/dist/vuedraggable-CK8z7qA8.js +0 -1728
package/dist/app-nTzkERJW.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { defineStore as r } from "pinia";
|
|
2
|
-
import { a9 as a, aa as s, ab as l } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
|
|
3
|
-
const u = {
|
|
4
|
-
async read() {
|
|
5
|
-
return a(await s().get("/public-setting"));
|
|
6
|
-
},
|
|
7
|
-
async update(e) {
|
|
8
|
-
return a(await s().put("/public-setting", e));
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
function c() {
|
|
12
|
-
return {
|
|
13
|
-
loadingQueue: [],
|
|
14
|
-
publicSetting: {
|
|
15
|
-
delivery: {
|
|
16
|
-
feedMe: {
|
|
17
|
-
areas: [],
|
|
18
|
-
enable: !1,
|
|
19
|
-
maxDistance: 0
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
sms: {
|
|
23
|
-
firebase: !1
|
|
24
|
-
},
|
|
25
|
-
assets: {
|
|
26
|
-
groups: []
|
|
27
|
-
},
|
|
28
|
-
aiSettings: {
|
|
29
|
-
remy: { enable: !1 }
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
const d = r("menu-app", {
|
|
35
|
-
state: () => c(),
|
|
36
|
-
actions: {
|
|
37
|
-
addLoadingQueues(e) {
|
|
38
|
-
this.loadingQueue = [...this.loadingQueue, ...e];
|
|
39
|
-
},
|
|
40
|
-
clearLoadingQueue() {
|
|
41
|
-
this.loadingQueue = [];
|
|
42
|
-
},
|
|
43
|
-
resolveQueues(e) {
|
|
44
|
-
this.loadingQueue = this.loadingQueue.filter((t) => !e.includes(t.id));
|
|
45
|
-
},
|
|
46
|
-
async promise(e, t = !0) {
|
|
47
|
-
const i = l();
|
|
48
|
-
try {
|
|
49
|
-
const n = [{ id: i, isGlobal: t }];
|
|
50
|
-
return this.addLoadingQueues(n), await e();
|
|
51
|
-
} finally {
|
|
52
|
-
this.resolveQueues([i]);
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
async getPublicSetting() {
|
|
56
|
-
return this.publicSetting = await u.read(), this.publicSetting;
|
|
57
|
-
},
|
|
58
|
-
async updatePublicSetting(e) {
|
|
59
|
-
return this.publicSetting = await u.update({
|
|
60
|
-
...this.publicSetting,
|
|
61
|
-
...e
|
|
62
|
-
}), this.publicSetting;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
export {
|
|
67
|
-
d as u
|
|
68
|
-
};
|
package/dist/catalog-BO2nXwe5.js
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { u as h, A as n, M as d, al as _ } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
|
|
2
|
-
import "@feedmepos/ui-library";
|
|
3
|
-
class u {
|
|
4
|
-
constructor(t, e, r, a) {
|
|
5
|
-
this.catalog = t, this.menuStore = e, this.updateMenu = r, this.dialog = a;
|
|
6
|
-
}
|
|
7
|
-
static getItemAvailable(t) {
|
|
8
|
-
return Object.entries(t.override.items).filter(([, e]) => {
|
|
9
|
-
const r = e.find(
|
|
10
|
-
(o) => !o.combinationKey
|
|
11
|
-
), a = h().version === n.F_MENU_VERSION.enum.v4;
|
|
12
|
-
return (r == null ? void 0 : r.orderFrom) !== n.F_ORDER_FROM.enum.NONE && (a || (r == null ? void 0 : r.category) !== "");
|
|
13
|
-
}).map(([e]) => e);
|
|
14
|
-
}
|
|
15
|
-
static getSellingItem(t, e) {
|
|
16
|
-
return u.getItemAvailable(t).filter(
|
|
17
|
-
(r) => {
|
|
18
|
-
var a;
|
|
19
|
-
return !!((a = e.get(r)) != null && a.category);
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
// createCatalog() {
|
|
24
|
-
// this.promptCatalogDialog(undefined, this.create.bind(this));
|
|
25
|
-
// }
|
|
26
|
-
//
|
|
27
|
-
// duplicateCatalog() {
|
|
28
|
-
// if (!this.catalog) return;
|
|
29
|
-
// this.promptCatalogDialog(
|
|
30
|
-
// {
|
|
31
|
-
// ...this.catalog,
|
|
32
|
-
// name: `${this.catalog.name} clone`,
|
|
33
|
-
// },
|
|
34
|
-
// this.create.bind(this),
|
|
35
|
-
// );
|
|
36
|
-
// }
|
|
37
|
-
getCatalog() {
|
|
38
|
-
return this.catalog;
|
|
39
|
-
}
|
|
40
|
-
async update() {
|
|
41
|
-
this.catalog && await this.updateMenu(
|
|
42
|
-
{
|
|
43
|
-
module: n.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
44
|
-
operation: d.F_OPERATION_TYPE.update,
|
|
45
|
-
data: this.catalog
|
|
46
|
-
},
|
|
47
|
-
this.catalog.name
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
getCatalogGroup(t) {
|
|
51
|
-
var e;
|
|
52
|
-
return this.catalog ? ((e = this.catalog) == null ? void 0 : e.override.groups[t]) ?? { _id: t, groupKey: "" } : null;
|
|
53
|
-
}
|
|
54
|
-
getCatalogSchedulerGroup(t, e) {
|
|
55
|
-
var r, a, o;
|
|
56
|
-
return this.catalog ? ((o = (a = (r = this.catalog) == null ? void 0 : r.override.scheduler[e]) == null ? void 0 : a.groups) == null ? void 0 : o.find((i) => i._id === t)) ?? {
|
|
57
|
-
_id: t,
|
|
58
|
-
groupKey: ""
|
|
59
|
-
} : null;
|
|
60
|
-
}
|
|
61
|
-
overrideCatalogGroups(t) {
|
|
62
|
-
if (!this.catalog) return null;
|
|
63
|
-
const e = {
|
|
64
|
-
...this.catalog.override.groups,
|
|
65
|
-
...t.reduce((r, a) => (r[a._id] = {
|
|
66
|
-
_id: a._id,
|
|
67
|
-
groupKey: "",
|
|
68
|
-
items: a.items
|
|
69
|
-
}, r), {})
|
|
70
|
-
};
|
|
71
|
-
this.catalog = {
|
|
72
|
-
...this.catalog,
|
|
73
|
-
override: { ...this.catalog.override, groups: e }
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
overrideCatalogSchedulerGroups(t, e) {
|
|
77
|
-
var i;
|
|
78
|
-
if (!this.catalog) return null;
|
|
79
|
-
const r = ((i = this.catalog.override.scheduler[e]) == null ? void 0 : i.groups) ?? [], a = t.map((l) => l._id), o = [
|
|
80
|
-
...r.filter((l) => !a.includes(l._id)),
|
|
81
|
-
...t.map((l) => ({
|
|
82
|
-
_id: l._id,
|
|
83
|
-
groupKey: "",
|
|
84
|
-
items: l.items
|
|
85
|
-
}))
|
|
86
|
-
];
|
|
87
|
-
this.catalog = {
|
|
88
|
-
...this.catalog,
|
|
89
|
-
override: {
|
|
90
|
-
...this.catalog.override,
|
|
91
|
-
scheduler: {
|
|
92
|
-
...this.catalog.override.scheduler,
|
|
93
|
-
[e]: {
|
|
94
|
-
...this.catalog.override.scheduler[e],
|
|
95
|
-
_id: e,
|
|
96
|
-
groups: o
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
getCatalogScheduler(t) {
|
|
103
|
-
return this.catalog ? this.catalog.override.scheduler[t] ?? { _id: t } : null;
|
|
104
|
-
}
|
|
105
|
-
overrideCatalogScheduler(t) {
|
|
106
|
-
if (!this.catalog) return null;
|
|
107
|
-
this.catalog = {
|
|
108
|
-
...this.catalog,
|
|
109
|
-
override: {
|
|
110
|
-
...this.catalog.override,
|
|
111
|
-
scheduler: {
|
|
112
|
-
...this.catalog.override.scheduler,
|
|
113
|
-
[t._id]: t
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
overrideCatalogSchedulerItems(t, e) {
|
|
119
|
-
if (!this.catalog) return null;
|
|
120
|
-
const r = this.getCatalogScheduler(e);
|
|
121
|
-
if (!r) return;
|
|
122
|
-
const a = t.reduce((i, l) => {
|
|
123
|
-
var c;
|
|
124
|
-
const m = ((c = r.items) == null ? void 0 : c.filter((s) => s._id == l)) ?? [];
|
|
125
|
-
return i = i.concat(
|
|
126
|
-
_(l, m, (s) => ({
|
|
127
|
-
...s,
|
|
128
|
-
orderFrom: null
|
|
129
|
-
}))
|
|
130
|
-
), i;
|
|
131
|
-
}, []), o = {
|
|
132
|
-
...r,
|
|
133
|
-
items: a
|
|
134
|
-
};
|
|
135
|
-
this.overrideCatalogScheduler(o);
|
|
136
|
-
}
|
|
137
|
-
injectCatalogToMenu() {
|
|
138
|
-
const t = this.catalog;
|
|
139
|
-
if (!t) return null;
|
|
140
|
-
const e = this.menuStore.state.menu, r = e.modules.catalog.map((a) => a._id === t._id ? t : a);
|
|
141
|
-
return {
|
|
142
|
-
...e,
|
|
143
|
-
modules: {
|
|
144
|
-
...e.modules,
|
|
145
|
-
catalog: r
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
async unlinkProduct(t) {
|
|
150
|
-
this.catalog && (this.updateItemAvailable(
|
|
151
|
-
u.getItemAvailable(this.catalog).filter((e) => !t.includes(e))
|
|
152
|
-
), await this.update());
|
|
153
|
-
}
|
|
154
|
-
async create(t) {
|
|
155
|
-
await this.updateMenu(
|
|
156
|
-
{
|
|
157
|
-
module: n.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
158
|
-
operation: d.F_OPERATION_TYPE.create,
|
|
159
|
-
data: t
|
|
160
|
-
},
|
|
161
|
-
t.name
|
|
162
|
-
);
|
|
163
|
-
const e = this.menuStore.state.menu.modules.catalog, r = e[e.length - 1]._id;
|
|
164
|
-
this.menuStore.selectCatalog(r);
|
|
165
|
-
}
|
|
166
|
-
updateItemAvailable(t) {
|
|
167
|
-
const e = this.catalog;
|
|
168
|
-
if (!e) return null;
|
|
169
|
-
const a = this.menuStore.state.menu.modules.item.map((o) => o._id).reduce((o, i) => {
|
|
170
|
-
const l = e.override.items[i];
|
|
171
|
-
return o[i] = p(
|
|
172
|
-
i,
|
|
173
|
-
l,
|
|
174
|
-
t.includes(i),
|
|
175
|
-
this.menuStore.version === n.F_MENU_VERSION.enum.v3
|
|
176
|
-
), o;
|
|
177
|
-
}, {});
|
|
178
|
-
this.catalog = {
|
|
179
|
-
...e,
|
|
180
|
-
override: { ...e.override, items: a }
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
function p(g, t, e, r) {
|
|
185
|
-
const a = t == null ? void 0 : t.find((l) => !l.combinationKey), o = e ? (a == null ? void 0 : a.orderFrom) !== n.F_ORDER_FROM.enum.NONE ? a == null ? void 0 : a.orderFrom : null : n.F_ORDER_FROM.enum.NONE, i = r ? e ? null : "" : a == null ? void 0 : a.category;
|
|
186
|
-
return [
|
|
187
|
-
{
|
|
188
|
-
...a ?? {},
|
|
189
|
-
orderFrom: o,
|
|
190
|
-
category: i,
|
|
191
|
-
_id: g
|
|
192
|
-
},
|
|
193
|
-
...(t == null ? void 0 : t.filter((l) => !!l.combinationKey)) ?? []
|
|
194
|
-
];
|
|
195
|
-
}
|
|
196
|
-
export {
|
|
197
|
-
u as C,
|
|
198
|
-
p as h
|
|
199
|
-
};
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, watch as _, ref as f, resolveComponent as g, createBlock as x, openBlock as A, unref as l, withCtx as C, createVNode as V } from "vue";
|
|
2
|
-
import { M as s, A as u, u as F } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
|
|
3
|
-
import { useI18n as E } from "@feedmepos/mf-common";
|
|
4
|
-
import { useDialogChild as O } from "@feedmepos/ui-library";
|
|
5
|
-
const y = /* @__PURE__ */ M({
|
|
6
|
-
__name: "AddCategoryDialogContentComponent",
|
|
7
|
-
props: {
|
|
8
|
-
initialValue: {}
|
|
9
|
-
},
|
|
10
|
-
setup(n) {
|
|
11
|
-
const r = n, { t } = E();
|
|
12
|
-
_(
|
|
13
|
-
() => r.initialValue,
|
|
14
|
-
(m) => {
|
|
15
|
-
i.value = m ?? "";
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
const i = f(r.initialValue), { emitData: d, emitAction: p } = O();
|
|
19
|
-
return _(
|
|
20
|
-
i,
|
|
21
|
-
(m) => {
|
|
22
|
-
d(m);
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
immediate: !0
|
|
26
|
-
}
|
|
27
|
-
), (m, e) => {
|
|
28
|
-
const o = g("fm-text-field"), a = g("FmForm");
|
|
29
|
-
return A(), x(a, {
|
|
30
|
-
onValidationSuccess: e[1] || (e[1] = (c) => l(p)("primary"))
|
|
31
|
-
}, {
|
|
32
|
-
default: C(() => [
|
|
33
|
-
V(o, {
|
|
34
|
-
modelValue: i.value,
|
|
35
|
-
"onUpdate:modelValue": e[0] || (e[0] = (c) => i.value = c),
|
|
36
|
-
rules: [(c) => !!c || l(t)("menu.category.dialog.add.name.required")],
|
|
37
|
-
autofocus: "",
|
|
38
|
-
label: l(t)("menu.category.dialog.add.name.label"),
|
|
39
|
-
placeholder: l(t)("menu.category.dialog.add.name.placeholder")
|
|
40
|
-
}, null, 8, ["modelValue", "rules", "label", "placeholder"])
|
|
41
|
-
]),
|
|
42
|
-
_: 1
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}), T = ({
|
|
47
|
-
dialog: n,
|
|
48
|
-
menuLoader: r
|
|
49
|
-
}) => {
|
|
50
|
-
const { t } = E();
|
|
51
|
-
function i() {
|
|
52
|
-
const { updateMenu: e } = r, o = f(!1);
|
|
53
|
-
n.open({
|
|
54
|
-
title: t("menu.category.manager.dialog.add.title"),
|
|
55
|
-
contentComponent: y,
|
|
56
|
-
primaryActions: {
|
|
57
|
-
text: t("menu.category.manager.dialog.add.action"),
|
|
58
|
-
close: !1,
|
|
59
|
-
isLoading: o
|
|
60
|
-
},
|
|
61
|
-
secondaryActions: {
|
|
62
|
-
text: t("menu.common.actions.cancel"),
|
|
63
|
-
close: !0
|
|
64
|
-
}
|
|
65
|
-
}).onPrimary(async (a) => {
|
|
66
|
-
if (a)
|
|
67
|
-
try {
|
|
68
|
-
o.value = !0, await e(
|
|
69
|
-
{
|
|
70
|
-
module: u.F_MENU_MODULE_V4_KEY.enum.category,
|
|
71
|
-
operation: s.F_OPERATION_TYPE.create,
|
|
72
|
-
data: {
|
|
73
|
-
name: a,
|
|
74
|
-
position: F().categories.length
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
a
|
|
78
|
-
), n.close();
|
|
79
|
-
} finally {
|
|
80
|
-
o.value = !1;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function d(e) {
|
|
85
|
-
const { updateMenu: o } = r;
|
|
86
|
-
n.open({
|
|
87
|
-
title: t("menu.category.manager.dialog.update.title"),
|
|
88
|
-
contentComponent: y,
|
|
89
|
-
contentComponentProps: {
|
|
90
|
-
initialValue: e.name
|
|
91
|
-
},
|
|
92
|
-
primaryActions: {
|
|
93
|
-
text: t("menu.category.manager.dialog.update.action"),
|
|
94
|
-
close: !1
|
|
95
|
-
},
|
|
96
|
-
secondaryActions: {
|
|
97
|
-
text: t("menu.common.actions.cancel"),
|
|
98
|
-
close: !0
|
|
99
|
-
}
|
|
100
|
-
}).onPrimary(async (a) => {
|
|
101
|
-
a && (await o(
|
|
102
|
-
{
|
|
103
|
-
module: u.F_MENU_MODULE_V4_KEY.enum.category,
|
|
104
|
-
operation: s.F_OPERATION_TYPE.update,
|
|
105
|
-
data: { ...e, name: a ?? e.name }
|
|
106
|
-
},
|
|
107
|
-
a
|
|
108
|
-
), n.close());
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function p(e) {
|
|
112
|
-
const { updateMenu: o } = r;
|
|
113
|
-
n.open({
|
|
114
|
-
title: t("menu.common.dialog.remove.category.title"),
|
|
115
|
-
message: t("menu.common.dialog.remove.category.message", { name: e.name }),
|
|
116
|
-
primaryActions: {
|
|
117
|
-
text: t("menu.common.actions.remove"),
|
|
118
|
-
close: !1
|
|
119
|
-
},
|
|
120
|
-
secondaryActions: {
|
|
121
|
-
text: t("menu.common.actions.cancel"),
|
|
122
|
-
close: !0
|
|
123
|
-
}
|
|
124
|
-
}).onPrimary(async () => {
|
|
125
|
-
await o(
|
|
126
|
-
{
|
|
127
|
-
module: u.F_MENU_MODULE_V4_KEY.enum.category,
|
|
128
|
-
operation: s.F_OPERATION_TYPE.delete,
|
|
129
|
-
data: e._id
|
|
130
|
-
},
|
|
131
|
-
e.name,
|
|
132
|
-
!0
|
|
133
|
-
), n.close();
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
async function m(e) {
|
|
137
|
-
await r.updateMenu(
|
|
138
|
-
{
|
|
139
|
-
module: u.F_MENU_MODULE_V4_KEY.enum.category,
|
|
140
|
-
operation: s.F_OPERATION_TYPE.rearrange,
|
|
141
|
-
data: e
|
|
142
|
-
},
|
|
143
|
-
"Categories"
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
return {
|
|
147
|
-
create: i,
|
|
148
|
-
update: d,
|
|
149
|
-
deleteCategory: p,
|
|
150
|
-
rearrange: m
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
export {
|
|
154
|
-
y as _,
|
|
155
|
-
T as u
|
|
156
|
-
};
|
package/dist/check-C9mY6LiX.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { markRaw as c, createVNode as d, render as m } from "vue";
|
|
2
|
-
const i = (n, t, r) => {
|
|
3
|
-
if (!t) throw new Error("No current instance found");
|
|
4
|
-
const o = document.createElement("div");
|
|
5
|
-
document.body.appendChild(o);
|
|
6
|
-
const a = c(n), e = d(a, r);
|
|
7
|
-
return e.appContext = t.appContext, m(e, o), { container: o, vNode: e };
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
i as c
|
|
11
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { useI18n as e } from "@feedmepos/mf-common";
|
|
2
|
-
import { useDialog as m } from "@feedmepos/ui-library";
|
|
3
|
-
function c(i, t) {
|
|
4
|
-
const r = m(), { t: o } = e();
|
|
5
|
-
function s() {
|
|
6
|
-
i() ? r.open({
|
|
7
|
-
title: o("portalCommon.dismiss.title"),
|
|
8
|
-
message: o("portalCommon.dismiss.message"),
|
|
9
|
-
zIndex: 200,
|
|
10
|
-
primaryActions: {
|
|
11
|
-
text: o("portalCommon.dismiss.primaryActions"),
|
|
12
|
-
variant: "primary",
|
|
13
|
-
close: !0
|
|
14
|
-
},
|
|
15
|
-
secondaryActions: {
|
|
16
|
-
text: o("common.cancel"),
|
|
17
|
-
variant: "tertiary",
|
|
18
|
-
close: !0
|
|
19
|
-
}
|
|
20
|
-
}).onPrimary(() => {
|
|
21
|
-
t();
|
|
22
|
-
}) : t();
|
|
23
|
-
}
|
|
24
|
-
return s;
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
c as u
|
|
28
|
-
};
|