@feedmepos/mf-inventory-portal 1.2.0 → 1.2.2-5.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-DMkUg806.js +297 -0
- package/dist/{ApprovalView-Dr-qd_Ai.js → ApprovalView-DWJh2K6W.js} +65 -64
- package/dist/{BindingsDialog-Chh00-83.js → BindingsDialog-EmHCvqJI.js} +2 -2
- package/dist/{BindingsPicker-DCTGJ8eM.js → BindingsPicker-h_9jm1s0.js} +3 -3
- package/dist/{BindingsTable-BsDs5d0V.js → BindingsTable-BAVWGUoa.js} +1 -1
- package/dist/ClosingDraftView-Du4kOwIg.js +1899 -0
- package/dist/ClosingHistoryView-DuW2Vtrs.js +355 -0
- package/dist/ClosingTemplateView-CfPY8R5M.js +2001 -0
- package/dist/{DeliveryOrderPrintPreview-CrH9UVdW.js → DeliveryOrderPrintPreview-C6Cj8mOp.js} +9 -9
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-WWIrybw_.js +230 -0
- package/dist/{FmMultiselectDialog-ypgaHejh.js → FmMultiselectDialog-BzWrQOS4.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DJctVhvZ.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DwqVRUFz.js} +36 -36
- package/dist/ImportView-lKlYeLay.js +1291 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D59M4Bl1.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-_2WZMZU2.js} +5 -5
- package/dist/{IngredientGroupView-Cf9ePE7_.js → IngredientGroupView-CrmwR2Xt.js} +34 -35
- package/dist/IngredientsView-1bAsyz-b.js +2254 -0
- package/dist/{IntegrationView-DEDn2mc5.js → IntegrationView-D16qeEc_.js} +1773 -1635
- package/dist/{InventoryBindingForm-AB8rum4-.js → InventoryBindingForm-BRwOXV_P.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BgZt_9h1.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-NDbtbtqK.js} +28 -28
- package/dist/{InventoryBindingSummary-CWOG5DIz.js → InventoryBindingSummary-DKM2gX8_.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CmN30iEZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdaiYTdf.js} +4 -4
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C1cUDp0u.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B0OKeK5O.js} +7 -7
- package/dist/{PublishView-FHyjjevA.js → PublishView-D0NnU22l.js} +73 -63
- package/dist/{PurchaseOrderPrintPreview-BPvvkjkR.js → PurchaseOrderPrintPreview-BmuwNbeL.js} +4 -4
- package/dist/{ReceiveRequestView-CoWU2g0R.js → ReceiveRequestView-j79m7TKk.js} +343 -333
- package/dist/RecipeView-D_fNQQ-C.js +636 -0
- package/dist/StockView-DX_xeFBT.js +2385 -0
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bg49isUy.js +172 -0
- package/dist/{SupplierView-CJG2Idbl.js → SupplierView-DuFTqbOg.js} +1193 -1073
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-c428GXwc.js +3233 -0
- package/dist/{TransferTemplateView-DZnPt5b5.js → TransferTemplateView-Ccsfcetz.js} +104 -103
- package/dist/UnitView-BklpNsFN.js +674 -0
- package/dist/WarehouseView-BrURbU67.js +1066 -0
- package/dist/api/adjustment-template.d.ts +1 -0
- package/dist/api/bill.d.ts +140 -2
- package/dist/api/closing-template.d.ts +1 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/inventory.d.ts +405 -0
- package/dist/api/netsuite.d.ts +5 -1
- package/dist/api/purchase-order-template.d.ts +1 -0
- package/dist/api/purchase-order.d.ts +3 -0
- package/dist/api/shipment.d.ts +11 -0
- package/dist/api/stock.d.ts +2 -44
- package/dist/api/warehouse.d.ts +3 -1
- package/dist/{app-B6mXF-3v.js → app-a9r50k3U.js} +68557 -67576
- package/dist/app.d.ts +646 -15
- package/dist/app.js +6 -6
- package/dist/components/FmAdminBadge.vue.d.ts +1 -4
- package/dist/components/FmEnhancedSelect.vue.d.ts +30 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +16 -2
- package/dist/components/FmLockableField.vue.d.ts +3 -0
- package/dist/components/netsuite/ItemSubsidiaryTreeDialog.vue.d.ts +16 -0
- package/dist/components/netsuite/SubsidiaryTreeDialog.vue.d.ts +2 -0
- package/dist/composable/defineApi.d.ts +1 -1
- package/dist/composable/useIframe.d.ts +2 -2
- package/dist/{decimal-DErYDfEJ.js → decimal-AusUnA1W.js} +1 -1
- package/dist/{format-unit-display-BtjJtmQp.js → format-unit-display-BqkHL-ph.js} +397 -429
- package/dist/helper/array.d.ts +1 -0
- package/dist/helper/core/country/utils.d.ts +3 -4
- package/dist/helper/country.d.ts +6 -255
- package/dist/helper/number.d.ts +1 -0
- package/dist/import-export.helper-PIyNeHfa.js +238 -0
- package/dist/{index-lj4ClRIU.js → index-CjxirPvn.js} +283 -268
- package/dist/{index-CvfUsVdt.js → index-Dj9-pdT9.js} +1 -1
- package/dist/layout/SingleColumnLayout.vue.d.ts +6 -3
- package/dist/purchase-order-template-CQikvY1p.js +41 -0
- package/dist/router/name.d.ts +2 -0
- package/dist/stock-CDZ2uWSF.js +83 -0
- package/dist/stock-Dw908dIC.js +74 -0
- package/dist/stores/feature.d.ts +12 -0
- package/dist/stores/integration/netsuite.d.ts +42 -0
- package/dist/stores/inventory.d.ts +28 -199
- package/dist/stores/location.d.ts +331 -1
- package/dist/stores/supplier.d.ts +96 -0
- package/dist/stores/warehouse.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-D_2yzArc.js → supplier-BPPBUudN.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-C9iEMCVA.js → use-ingredient-select-dialog-C_fSKN3_.js} +5 -5
- package/dist/{use-inventory-binding-dialog-CavX3SFd.js → use-inventory-binding-dialog-ClAkJ864.js} +8 -8
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +60 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +60 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +56 -0
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +3 -3
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +468 -0
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +9 -2
- package/dist/views/closing-history/ClosingHistoryView.vue.d.ts +2 -0
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +4 -1
- package/dist/views/closing-template/helpers/import-export.helper.d.ts +5 -0
- package/dist/views/import/ImportView.vue.d.ts +3 -0
- package/dist/views/import/components/ImportDialog.vue.d.ts +2 -0
- package/dist/views/import/helper/import-export.helper.d.ts +4 -0
- package/dist/views/ingredients/components/ingredient-dialog/IngredientDialogProps.d.ts +1 -1
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +181 -12
- package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +6 -0
- package/dist/views/ingredients/helper/import-export.helper.d.ts +4 -1
- package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +2 -0
- package/dist/views/receive-request/components/delivery-order-form/CreateForm.vue.d.ts +16 -0
- package/dist/views/receive-request/components/delivery-order-form/CreateFormProps.d.ts +4 -0
- package/dist/views/receive-request/components/delivery-order-form/EditForm.vue.d.ts +16 -0
- package/dist/views/receive-request/components/delivery-order-form/EditFormProps.d.ts +4 -0
- package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +21 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteTransactionChangeLog.vue.d.ts +15 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +420 -2
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +99 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +644 -13
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +711 -14
- package/dist/views/recipe/RecipeView.vue.d.ts +1 -0
- package/dist/views/recipe/components/import-recipes/ImportRecipeItem.vue.d.ts +16 -0
- package/dist/views/recipe/components/import-recipes/ImportRecipes.vue.d.ts +2 -0
- package/dist/views/recipe/helper/import-recipe.d.ts +48 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +70 -1
- package/dist/views/stock/components/dialog/RecalculationDialog.vue.d.ts +11 -0
- package/dist/views/stock/components/dialog/RecalculationDialogProps.d.ts +3 -0
- package/dist/views/stock/components/dialog/StockAdjustmentSideSheet.vue.d.ts +20 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +8 -0
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -0
- package/dist/views/supplier/composables/use-supplier-table.d.ts +4 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -0
- package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +16 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
- package/dist/views/unit/UnitView.vue.d.ts +1 -0
- package/dist/views/unit/components/import-units/ImportUnitItem.vue.d.ts +12 -0
- package/dist/views/unit/components/import-units/ImportUnitItemProps.d.ts +6 -0
- package/dist/views/unit/components/import-units/ImportUnits.vue.d.ts +9 -0
- package/dist/views/unit/components/import-units/ImportUnitsProps.d.ts +5 -0
- package/dist/views/unit/helper/import-export.helper.d.ts +40 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -0
- package/package.json +3 -3
- package/dist/App-Bs0pR0sL.js +0 -276
- package/dist/ClosingDraftView-Dyr4hrHk.js +0 -1687
- package/dist/ClosingTemplateView-Dw0Lld6E.js +0 -1908
- package/dist/FmAdminBadge-BUJh40aj.js +0 -34
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B-p9ffPK.js +0 -224
- package/dist/IngredientsView-61WfWyGy.js +0 -1858
- package/dist/RecipeView-CznjQMrS.js +0 -621
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +0 -59
- package/dist/StockView-N-84Q5Ih.js +0 -2086
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BmU-VLNN.js +0 -2336
- package/dist/UnitView-BrLjAWNq.js +0 -667
- package/dist/WarehouseView-CI-RuaPq.js +0 -1034
- package/dist/array-Ca8T3f_G.js +0 -44
- package/dist/helper/core/country/codes.d.ts +0 -255
- package/dist/stock-CIpuon0m.js +0 -146
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { defineComponent as n, computed as i, openBlock as t, createElementBlock as a, renderSlot as r, createElementVNode as d, normalizeClass as c, toDisplayString as p, createCommentVNode as m } from "vue";
|
|
2
|
-
import { ao as u } from "./app-B6mXF-3v.js";
|
|
3
|
-
const f = { class: "gap-8 inline-flex items-center relative select-none" }, v = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "fm-typo-en-body-sm-400 justify-center flex items-center w-full"
|
|
6
|
-
}, _ = /* @__PURE__ */ n({
|
|
7
|
-
__name: "FmAdminBadge",
|
|
8
|
-
props: {
|
|
9
|
-
value: { default: "Admin" },
|
|
10
|
-
class: { default: void 0 }
|
|
11
|
-
},
|
|
12
|
-
setup(o) {
|
|
13
|
-
const e = o, s = i(() => e.value !== null && e.value !== void 0);
|
|
14
|
-
return (l, x) => (t(), a("div", f, [
|
|
15
|
-
r(l.$slots, "default", {}, void 0, !0),
|
|
16
|
-
d("div", {
|
|
17
|
-
class: c([
|
|
18
|
-
"fm-admin-badge",
|
|
19
|
-
e.class,
|
|
20
|
-
{
|
|
21
|
-
absolute: !0,
|
|
22
|
-
"top-0 right-0 w-[6px] h-[8px]": !s.value,
|
|
23
|
-
"top-[-10px] right-[-16px] px-4 h-[20px] min-w-[28px]": !0
|
|
24
|
-
}
|
|
25
|
-
])
|
|
26
|
-
}, [
|
|
27
|
-
e.value !== null ? (t(), a("span", v, p(e.value), 1)) : m("", !0)
|
|
28
|
-
], 2)
|
|
29
|
-
]));
|
|
30
|
-
}
|
|
31
|
-
}), y = /* @__PURE__ */ u(_, [["__scopeId", "data-v-a87b0da7"]]);
|
|
32
|
-
export {
|
|
33
|
-
y as F
|
|
34
|
-
};
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import { j as C, t as R, ay as O, u as B, aC as E, aO as D, aP as H, aQ as U } from "./app-B6mXF-3v.js";
|
|
2
|
-
import { u as z } from "./supplier-D_2yzArc.js";
|
|
3
|
-
import { P as L } from "./format-unit-display-BtjJtmQp.js";
|
|
4
|
-
import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as V, openBlock as T, createElementBlock as w, normalizeStyle as $, createElementVNode as N, createVNode as Q, withCtx as J, createBlock as g, createCommentVNode as A, Fragment as K, renderList as X, unref as M } from "vue";
|
|
5
|
-
function Y(t, a, l) {
|
|
6
|
-
var s;
|
|
7
|
-
if (!!a.measurement === !!l && ((s = a.measurement) == null ? void 0 : s.id) === l)
|
|
8
|
-
return a;
|
|
9
|
-
if (!l)
|
|
10
|
-
return {
|
|
11
|
-
costPerUnit: a.costPerUnit
|
|
12
|
-
};
|
|
13
|
-
const n = t.measurements.find((p) => p.id === l);
|
|
14
|
-
return n ? {
|
|
15
|
-
costPerUnit: a.costPerUnit,
|
|
16
|
-
measurement: n
|
|
17
|
-
} : {
|
|
18
|
-
costPerUnit: a.costPerUnit
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function se(t, a, l, u) {
|
|
22
|
-
var P, _, o;
|
|
23
|
-
const i = (o = (_ = (P = u == null ? void 0 : u.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
|
|
24
|
-
(e) => e.skuId === t._id
|
|
25
|
-
)) == null ? void 0 : o.defaultCost;
|
|
26
|
-
if (u != null && u.manualTotalCost)
|
|
27
|
-
return {
|
|
28
|
-
cost: u.manualTotalCost,
|
|
29
|
-
skuDefaultCost: t.defaultCost ?? void 0,
|
|
30
|
-
supplierOverrideCost: i ?? void 0
|
|
31
|
-
};
|
|
32
|
-
const n = t.defaultCost ? Y(t.unit, t.defaultCost, t.trackingMeasurement) : void 0, s = i ?? n, p = s == null ? void 0 : s.costPerUnit, v = p ? s != null && s.measurement ? +C(p) / +C(s == null ? void 0 : s.measurement.conversion) : +C(p) : void 0, b = v ? l ? v * +C(l.conversion) : v : void 0, h = b ? +C(a) * b : void 0;
|
|
33
|
-
return {
|
|
34
|
-
cost: h ? {
|
|
35
|
-
...R(h ?? 0, 2),
|
|
36
|
-
currency: O()
|
|
37
|
-
} : {
|
|
38
|
-
amount: 0,
|
|
39
|
-
precision: 0,
|
|
40
|
-
currency: O()
|
|
41
|
-
},
|
|
42
|
-
skuDefaultCost: t.defaultCost ?? void 0,
|
|
43
|
-
supplierOverrideCost: i ?? void 0
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function k(t) {
|
|
47
|
-
return D.parse(t);
|
|
48
|
-
}
|
|
49
|
-
function S(t) {
|
|
50
|
-
return {
|
|
51
|
-
_id: t.doc._id,
|
|
52
|
-
internal: t.type,
|
|
53
|
-
contactName: t.doc.profile.name,
|
|
54
|
-
name: t.doc.profile.name ?? "",
|
|
55
|
-
email: t.doc.profile.email,
|
|
56
|
-
phoneNumber: t.doc.profile.phoneNo,
|
|
57
|
-
registrationNumber: t.doc.profile.regNo,
|
|
58
|
-
address: t.doc.profile.address ?? {
|
|
59
|
-
line1: "",
|
|
60
|
-
state: "",
|
|
61
|
-
city: "",
|
|
62
|
-
postcode: "",
|
|
63
|
-
country: ""
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function ne(t, a, l = !1, u = !1) {
|
|
68
|
-
const i = z(), n = B();
|
|
69
|
-
n.watchLocation(async () => {
|
|
70
|
-
var y;
|
|
71
|
-
await i.readSuppliers();
|
|
72
|
-
const o = t();
|
|
73
|
-
if ((y = o.supplier) != null && y._id) return;
|
|
74
|
-
const e = u ? i.suppliers[0] : i.businessSuppliers[0], r = (l ? n.locations.filter((d) => d.doc._id !== n.currentLocation.doc._id) : n.locations)[0];
|
|
75
|
-
a({
|
|
76
|
-
...o,
|
|
77
|
-
supplier: e ? k(e) : r ? S(r) : o.supplier
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
const s = f(
|
|
81
|
-
() => {
|
|
82
|
-
var o, e;
|
|
83
|
-
return typeof ((e = (o = t()) == null ? void 0 : o.supplier) == null ? void 0 : e.internal) == "string" ? L.TRANSFER : L.PURCHASE;
|
|
84
|
-
}
|
|
85
|
-
), p = f({
|
|
86
|
-
get() {
|
|
87
|
-
var o, e;
|
|
88
|
-
return (e = (o = t()) == null ? void 0 : o.supplier) == null ? void 0 : e._id;
|
|
89
|
-
},
|
|
90
|
-
set(o) {
|
|
91
|
-
const e = t() ?? {};
|
|
92
|
-
if (s.value === L.PURCHASE) {
|
|
93
|
-
const F = (u ? i.suppliers : i.businessSuppliers).find((I) => I._id === o);
|
|
94
|
-
a({
|
|
95
|
-
...e,
|
|
96
|
-
supplier: F ? k(F) : e.supplier
|
|
97
|
-
});
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
const y = (l ? n.allLocations.filter(
|
|
101
|
-
(d) => d.doc._id !== n.currentLocation.doc._id
|
|
102
|
-
) : n.allLocations).find((d) => d.doc._id === o);
|
|
103
|
-
a({
|
|
104
|
-
...e,
|
|
105
|
-
supplier: y ? S(y) : e.supplier
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}), v = f(() => i.locationSuppliers.map(k)), b = f(() => i.businessSuppliers.map(k)), h = f(() => {
|
|
109
|
-
const o = [...v.value], e = [...b.value];
|
|
110
|
-
return u ? [...e, ...o] : e;
|
|
111
|
-
}), c = f(() => {
|
|
112
|
-
var m;
|
|
113
|
-
const o = ((m = n._currentLocation) == null ? void 0 : m.type) === E.warehouse;
|
|
114
|
-
return (l ? n.allLocations.filter(
|
|
115
|
-
(r) => r.doc._id !== n.currentLocation.doc._id
|
|
116
|
-
) : n.allLocations).filter((r) => o || r.acceptRequest).map(S);
|
|
117
|
-
}), P = f(() => {
|
|
118
|
-
if (s.value === L.PURCHASE) {
|
|
119
|
-
const e = v.value.map((r) => ({
|
|
120
|
-
label: r.name,
|
|
121
|
-
value: r._id
|
|
122
|
-
})), m = b.value.map((r) => ({
|
|
123
|
-
label: r.name,
|
|
124
|
-
sublabel: "Business supplier",
|
|
125
|
-
value: r._id
|
|
126
|
-
}));
|
|
127
|
-
return u ? [...e, ...m] : m;
|
|
128
|
-
}
|
|
129
|
-
return c.value.map((e) => ({
|
|
130
|
-
label: e.name,
|
|
131
|
-
sublabel: e.internal ? `${e.internal}` : void 0,
|
|
132
|
-
value: e._id
|
|
133
|
-
}));
|
|
134
|
-
}), _ = f(() => {
|
|
135
|
-
var r, y;
|
|
136
|
-
const o = (y = (r = t()) == null ? void 0 : r.supplier) == null ? void 0 : y._id;
|
|
137
|
-
if (s.value === L.PURCHASE) {
|
|
138
|
-
const d = i.suppliers.find((F) => F._id === o);
|
|
139
|
-
return d ? k(d) : null;
|
|
140
|
-
}
|
|
141
|
-
const m = n.allLocations.find((d) => d.doc._id);
|
|
142
|
-
return m ? S(m) : null;
|
|
143
|
-
});
|
|
144
|
-
return {
|
|
145
|
-
transferLocationModel: p,
|
|
146
|
-
transferLocationOptions: P,
|
|
147
|
-
locationOptionsTypePurchase: h,
|
|
148
|
-
locationOptionsTypePurchaseLocationLevel: v,
|
|
149
|
-
locationOptionsTypeTransfer: c,
|
|
150
|
-
selectedLocation: _
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
const Z = { class: "overflow-y-auto h-full pb-8" }, le = /* @__PURE__ */ j({
|
|
154
|
-
__name: "FmFilterableMenuOptions",
|
|
155
|
-
props: /* @__PURE__ */ q({
|
|
156
|
-
modelValue: {},
|
|
157
|
-
maxHeight: {},
|
|
158
|
-
width: {},
|
|
159
|
-
handleItemChange: { type: Function },
|
|
160
|
-
items: {},
|
|
161
|
-
options: {}
|
|
162
|
-
}, {
|
|
163
|
-
search: {},
|
|
164
|
-
searchModifiers: {}
|
|
165
|
-
}),
|
|
166
|
-
emits: ["update:search"],
|
|
167
|
-
setup(t) {
|
|
168
|
-
const a = t, l = x(t, "search"), u = f(
|
|
169
|
-
() => new H(a.items, ["label", "sublabel"], a.options)
|
|
170
|
-
), i = f(() => u.value.search(l.value)), n = W();
|
|
171
|
-
return console.log({ stickyRef: n }), (s, p) => {
|
|
172
|
-
const v = V("FmButton"), b = V("FmTextField"), h = V("FmMenuItem");
|
|
173
|
-
return T(), w("div", {
|
|
174
|
-
class: "relative",
|
|
175
|
-
style: $({ width: s.width })
|
|
176
|
-
}, [
|
|
177
|
-
N("div", {
|
|
178
|
-
class: "sticky top-0 bg-white mb-8",
|
|
179
|
-
ref_key: "stickyRef",
|
|
180
|
-
ref: n
|
|
181
|
-
}, [
|
|
182
|
-
Q(b, {
|
|
183
|
-
modelValue: l.value,
|
|
184
|
-
"onUpdate:modelValue": p[1] || (p[1] = (c) => l.value = c),
|
|
185
|
-
placeholder: "Filter options"
|
|
186
|
-
}, {
|
|
187
|
-
append: J(() => [
|
|
188
|
-
l.value ? (T(), g(v, {
|
|
189
|
-
key: 0,
|
|
190
|
-
variant: "tertiary",
|
|
191
|
-
"prepend-icon": "close",
|
|
192
|
-
onClick: p[0] || (p[0] = (c) => l.value = "")
|
|
193
|
-
})) : A("", !0)
|
|
194
|
-
]),
|
|
195
|
-
_: 1
|
|
196
|
-
}, 8, ["modelValue"])
|
|
197
|
-
], 512),
|
|
198
|
-
N("div", Z, [
|
|
199
|
-
(T(!0), w(K, null, X(i.value, (c, P) => (T(), g(h, {
|
|
200
|
-
key: P,
|
|
201
|
-
label: c.label,
|
|
202
|
-
sublabel: c.sublabel,
|
|
203
|
-
"model-value": M(U)(s.modelValue, c.value),
|
|
204
|
-
onClick: () => s.handleItemChange(M(U)(s.modelValue, c.value), c),
|
|
205
|
-
onVnodeMounted: (_) => {
|
|
206
|
-
var o, e;
|
|
207
|
-
return M(U)(s.modelValue, c.value) && ((o = _.el) == null || o.scrollIntoView({ behavior: "instant", block: "end" }), (e = _.el) == null || e.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
208
|
-
}
|
|
209
|
-
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
210
|
-
i.value.length ? A("", !0) : (T(), g(h, {
|
|
211
|
-
key: 0,
|
|
212
|
-
disabled: "",
|
|
213
|
-
label: "No options available"
|
|
214
|
-
}))
|
|
215
|
-
])
|
|
216
|
-
], 4);
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
export {
|
|
221
|
-
le as _,
|
|
222
|
-
se as c,
|
|
223
|
-
ne as u
|
|
224
|
-
};
|