@feedmepos/mf-inventory-portal 1.2.50 → 1.2.51-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.
Files changed (96) hide show
  1. package/dist/{App-DssF0b6P.js → App-bY_YcLwH.js} +75 -70
  2. package/dist/{ApprovalView-DTCayLqE.js → ApprovalView-vzIiBqt2.js} +34 -34
  3. package/dist/{BindingsDialog-C2-THIG0.js → BindingsDialog-DCh2ORem.js} +2 -2
  4. package/dist/{BindingsPicker-Q9W92GzO.js → BindingsPicker-DcNG03p-.js} +2 -2
  5. package/dist/{BindingsTable-BQo8HpbF.js → BindingsTable-B_Yaq-z3.js} +4 -4
  6. package/dist/{ClosingDraftView-B0spMbZd.js → ClosingDraftView-C0T8cWEB.js} +19 -18
  7. package/dist/{ClosingHistoryView-DDVibMzL.js → ClosingHistoryView-DkKAjh7T.js} +27 -27
  8. package/dist/{ClosingTemplateView-BSiNTpkH.js → ClosingTemplateView-DpH1EyW5.js} +18 -17
  9. package/dist/{DeliveryOrderPrintPreview-P9JASYcM.js → DeliveryOrderPrintPreview-B2ecLaLu.js} +1 -1
  10. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CI4z5XYQ.js +188 -0
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CaQq9jpc.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-kVpsL4cx.js} +12 -12
  12. package/dist/FmMultiselectDialog-BviFuAM5.js +618 -0
  13. package/dist/{FmMultiselectDialog-DKEGwdyz.js → FmMultiselectDialog-DGUwruxs.js} +1 -1
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-H5xYFc6B.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CRTG3VFo.js} +3 -3
  15. package/dist/{ImportView-CKg0Z3Bz.js → ImportView-Bk4Z7nGh.js} +7 -7
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-y1qeqeUV.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BEJ19Uej.js} +1 -1
  17. package/dist/{IngredientGroupView-DntDNlVX.js → IngredientGroupView-8GHMMOux.js} +108 -107
  18. package/dist/{IngredientsView-B93tavZW.js → IngredientsView-DbmODx-v.js} +126 -125
  19. package/dist/{IntegrationView-CqEe7SWR.js → IntegrationView-DC0O_Lk4.js} +80 -80
  20. package/dist/{InventoryBindingForm-9E3VsD4v.js → InventoryBindingForm-ln0q25n_.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dgy_eFxJ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CFgk9rSe.js} +21 -21
  22. package/dist/{InventoryBindingSummary-DTcoWk_n.js → InventoryBindingSummary-BlNXhS4v.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CIDw4WOz.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BY_mXqPr.js} +1 -1
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Dao7XifY.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BhNjwE3X.js} +2 -2
  25. package/dist/{PublishView-GDJsOfeY.js → PublishView-5GkTzxbi.js} +3 -3
  26. package/dist/{PurchaseOrderPrintPreview-DFeZT5Zi.js → PurchaseOrderPrintPreview-Dj5lJ5Ou.js} +1 -1
  27. package/dist/ReceiveRequestView-BAYczSpW.js +2913 -0
  28. package/dist/{RecipeView-DyJs2lsk.js → RecipeView-OLPRwnVx.js} +83 -82
  29. package/dist/{StockView-Cvwfcsf7.js → StockView-TcA5zJqr.js} +113 -112
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CMFiW6FL.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DZ6TDkKR.js} +1 -1
  31. package/dist/{SupplierView-C6rIxQOg.js → SupplierView-77qI9YCg.js} +28 -27
  32. package/dist/SurchargeView-CxW2ZZ8a.js +460 -0
  33. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-6C5vAumx.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-_8YeihNH.js} +2 -2
  34. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js +84 -0
  35. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bc0MVyK_.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-ByPIjcED.js} +13 -13
  36. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BSNIRZx3.js → TransferDetails.vue_vue_type_script_setup_true_lang-7BoFD5wV.js} +129 -129
  37. package/dist/{TransferTemplateView-BVRXLZGK.js → TransferTemplateView-CI0U36Tr.js} +82 -81
  38. package/dist/{UnitView-B9n1vDtN.js → UnitView-fNFFUNlb.js} +20 -19
  39. package/dist/{WarehouseView-oyEVpI9M.js → WarehouseView-BAXgnZnO.js} +21 -20
  40. package/dist/{WastageTemplateView-DCdR4fhu.js → WastageTemplateView-C5qCXWqZ.js} +165 -164
  41. package/dist/api/netsuite.d.ts +8 -0
  42. package/dist/api/surcharge.d.ts +31 -0
  43. package/dist/{app-_hCz0958.js → app-CddcvygU.js} +4513 -4410
  44. package/dist/app-DiX-EfV6.js +8167 -0
  45. package/dist/app.d.ts +52 -0
  46. package/dist/app.js +1 -1
  47. package/dist/{closing-template-y0kvKjaN.js → closing-template-DxdLqlb1.js} +1 -1
  48. package/dist/component-DpCUABT3.js +82 -0
  49. package/dist/components/FmInventoryTableToolbar.vue.d.ts +8 -0
  50. package/dist/components/FmMultiselectDialogProps.d.ts +5 -0
  51. package/dist/{date2-Ct3mwV73.js → date2-CVZy20Q_.js} +1 -1
  52. package/dist/{dayjs.min-iDh15Qvq.js → dayjs.min-NrRtjg32.js} +26 -26
  53. package/dist/{decimal-DliTT0vp.js → decimal-Du3Grkk9.js} +2 -2
  54. package/dist/{defineDeepModel-DmVg-VGa.js → defineDeepModel-DgRoiQBp.js} +1 -1
  55. package/dist/{duplicate-template-BO8LvPWq.js → duplicate-template-DvnZ4BW6.js} +1 -1
  56. package/dist/{feature-Dk3_0hiC.js → feature-CTA18HlL.js} +8947 -6212
  57. package/dist/{format-time-from-id-DOmxxVYQ.js → format-time-from-id-6kt1RMWs.js} +1 -1
  58. package/dist/{format-unit-display-BuliV6Fn.js → format-unit-display-mVJ-nuJe.js} +11 -11
  59. package/dist/{import-export.helper-DpWf4zh7.js → import-export.helper-DWwlJy7N.js} +5 -5
  60. package/dist/{index-CY6-px7W.js → index-BEcj1jGd.js} +3 -3
  61. package/dist/{index-C6nEuFpg.js → index-BfcdagSF.js} +1 -1
  62. package/dist/{index-BZ9fyZbO.js → index-By-jyWOP.js} +1 -1
  63. package/dist/{lodash-DDMf37Aw.js → lodash-D0COOw3m.js} +1 -1
  64. package/dist/netsuite-3LgQ5ztL.js +5402 -0
  65. package/dist/{purchase-order-template-C9GqlQL3.js → purchase-order-template-CJCmABzP.js} +1 -1
  66. package/dist/router/name.d.ts +1 -0
  67. package/dist/{rules-9-OxHCjJ.js → rules-hQBVd1Mn.js} +9 -9
  68. package/dist/{stock-CjJKvKsB.js → stock-4xGaezEy.js} +3 -3
  69. package/dist/{stock-D7gYQHth.js → stock-B6QW-S14.js} +1 -1
  70. package/dist/stores/feature.d.ts +4 -0
  71. package/dist/stores/integration/netsuite.d.ts +5 -0
  72. package/dist/stores/surcharge.d.ts +18 -0
  73. package/dist/style.css +1 -1
  74. package/dist/{supplier-z1X1B4yZ.js → supplier-C-dmFnqw.js} +2 -2
  75. package/dist/surcharge-Db4IiSEQ.js +71 -0
  76. package/dist/tsconfig.app.tsbuildinfo +1 -1
  77. package/dist/{use-ingredient-select-dialog-B4u8ttOK.js → use-ingredient-select-dialog-DgYSZDN8.js} +2 -2
  78. package/dist/{use-inventory-binding-dialog-CaFu9DlH.js → use-inventory-binding-dialog-CnYcA_Fo.js} +2 -2
  79. package/dist/{use-template-enabled-locations-2-KQU0hLX3.js → use-template-enabled-locations-2-B_aZrMUU.js} +2 -2
  80. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +714 -0
  81. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +8 -1
  82. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  83. package/dist/views/surcharge/SurchargeView.vue.d.ts +2 -0
  84. package/dist/{vue-i18n-UG5lCeUG.js → vue-i18n-BCEDBY4T.js} +563 -563
  85. package/dist/{xlsx-INrtkMe5.js → xlsx-CJsXiiEq.js} +398 -398
  86. package/dist/{xlsx.util-OqI8IJfw.js → xlsx.util-CSudzOii.js} +1 -1
  87. package/package.json +5 -5
  88. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DkvLYf5A.js +0 -231
  89. package/dist/FmMultiselectDialog-BgLyRNeD.js +0 -598
  90. package/dist/ReceiveRequestView-BvYpGKEB.js +0 -2913
  91. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js +0 -162
  92. package/dist/app-uBuHtW8m.js +0 -8127
  93. package/dist/cypress/component/receive-request/KDI-15-total-price-currency.cy.d.ts +0 -2
  94. package/dist/netsuite-CVg13Lx5.js +0 -5131
  95. package/dist/views/ingredients/helper/calculate-default-cost.d.ts +0 -9
  96. package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +0 -22
@@ -0,0 +1,618 @@
1
+ var He = Object.defineProperty;
2
+ var Pe = (F, i, l) => i in F ? He(F, i, { enumerable: !0, configurable: !0, writable: !0, value: l }) : F[i] = l;
3
+ var ve = (F, i, l) => Pe(F, typeof i != "symbol" ? i + "" : i, l);
4
+ import { defineComponent as be, computed as x, ref as $, watch as ge, openBlock as d, createElementBlock as f, normalizeStyle as z, Fragment as V, renderList as O, renderSlot as ke, createCommentVNode as D, useSlots as Oe, onMounted as Ue, onUnmounted as Ee, reactive as ee, resolveComponent as T, createElementVNode as B, createVNode as k, createTextVNode as Ke, toDisplayString as P, unref as L, createSlots as je, withCtx as w, createBlock as I, resolveDynamicComponent as pe, normalizeClass as fe, withModifiers as Ne, Transition as ze } from "vue";
5
+ import { useDialogChild as Ge } from "@feedmepos/ui-library";
6
+ import { z as he } from "./app-CddcvygU.js";
7
+ import { d as Je } from "./index-By-jyWOP.js";
8
+ /* empty css */
9
+ import { useI18n as Re } from "@feedmepos/mf-common";
10
+ import { P as We, J as ye, D as Qe } from "./app-DiX-EfV6.js";
11
+ import { _ as Xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const Ye = /* @__PURE__ */ be({
13
+ __name: "VirtualScroll",
14
+ props: {
15
+ itemHeight: {},
16
+ length: {},
17
+ scrollTop: {},
18
+ prerender: {}
19
+ },
20
+ emits: ["changed:minHeight"],
21
+ setup(F, { emit: i }) {
22
+ const l = F, u = i, a = x(() => {
23
+ const S = l.itemHeight * l.length;
24
+ return u("changed:minHeight", S), `${S}px`;
25
+ }), v = $(0), m = x(
26
+ () => Array.from({ length: l.prerender }).map((S, p) => p + v.value)
27
+ );
28
+ function c() {
29
+ v.value = Math.floor(l.scrollTop / l.itemHeight) - Math.floor(l.prerender / 2);
30
+ }
31
+ const o = $(Je(c, 10));
32
+ ge([() => l.scrollTop], () => {
33
+ o.value();
34
+ });
35
+ function g(S) {
36
+ const p = S.el;
37
+ p && (p.style.opacity = "0", setTimeout(() => {
38
+ p.style.opacity = "1";
39
+ }, 0));
40
+ }
41
+ return (S, p) => (d(), f("div", {
42
+ class: "relative",
43
+ style: z({ minHeight: a.value })
44
+ }, [
45
+ (d(!0), f(V, null, O(m.value, (C) => (d(), f(V, { key: C }, [
46
+ C >= 0 && C < S.length ? (d(), f("div", {
47
+ key: 0,
48
+ class: "absolute w-full left-0 bg-white",
49
+ style: z({
50
+ top: `${S.itemHeight * C}px`,
51
+ height: `${S.itemHeight}px`,
52
+ transition: "opacity 0.5s ease"
53
+ }),
54
+ onVnodeMounted: g
55
+ }, [
56
+ ke(S.$slots, "default", {
57
+ key: C,
58
+ index: C,
59
+ getItem: (A) => A[C]
60
+ })
61
+ ], 4)) : D("", !0)
62
+ ], 64))), 128))
63
+ ], 4));
64
+ }
65
+ });
66
+ class W {
67
+ static getDescendantProperty(i, l, u = []) {
68
+ let a, v, m, c, o, g;
69
+ if (l) {
70
+ if (m = l.indexOf("."), m === -1 ? a = l : (a = l.slice(0, m), v = l.slice(m + 1)), c = i[a], c !== null && typeof c < "u")
71
+ if (!v && (typeof c == "string" || typeof c == "number"))
72
+ u.push(c);
73
+ else if (Object.prototype.toString.call(c) === "[object Array]")
74
+ for (o = 0, g = c.length; o < g; o++)
75
+ W.getDescendantProperty(c[o], v, u);
76
+ else v && W.getDescendantProperty(c, v, u);
77
+ } else
78
+ u.push(i);
79
+ return u;
80
+ }
81
+ }
82
+ class U {
83
+ constructor(i = [], l = [], u = {}) {
84
+ Array.isArray(l) || (u = l, l = []), this.haystack = i, this.keys = l, this.options = Object.assign({
85
+ caseSensitive: !1,
86
+ sort: !1
87
+ }, u);
88
+ }
89
+ search(i = "") {
90
+ if (i === "")
91
+ return this.haystack;
92
+ const l = [];
93
+ for (let u = 0; u < this.haystack.length; u++) {
94
+ const a = this.haystack[u];
95
+ if (this.keys.length === 0) {
96
+ const v = U.isMatch(a, i, this.options.caseSensitive);
97
+ v && l.push({ item: a, score: v });
98
+ } else
99
+ for (let v = 0; v < this.keys.length; v++) {
100
+ const m = W.getDescendantProperty(a, this.keys[v]);
101
+ let c = !1;
102
+ for (let o = 0; o < m.length; o++) {
103
+ const g = U.isMatch(m[o], i, this.options.caseSensitive);
104
+ if (g) {
105
+ c = !0, l.push({ item: a, score: g });
106
+ break;
107
+ }
108
+ }
109
+ if (c)
110
+ break;
111
+ }
112
+ }
113
+ return this.options.sort && l.sort((u, a) => u.score - a.score), l.map((u) => u.item);
114
+ }
115
+ static isMatch(i, l, u) {
116
+ i = String(i), l = String(l), u || (i = i.toLocaleLowerCase(), l = l.toLocaleLowerCase());
117
+ const a = U.nearestIndexesFor(i, l);
118
+ return a ? i === l ? 1 : a.length > 1 ? 2 + (a[a.length - 1] - a[0]) : 2 + a[0] : !1;
119
+ }
120
+ static nearestIndexesFor(i, l) {
121
+ const u = l.split("");
122
+ let a = [];
123
+ return U.indexesOfFirstLetter(i, l).forEach((m, c) => {
124
+ let o = m + 1;
125
+ a[c] = [m];
126
+ for (let g = 1; g < u.length; g++) {
127
+ const S = u[g];
128
+ if (o = i.indexOf(S, o), o === -1) {
129
+ a[c] = !1;
130
+ break;
131
+ }
132
+ a[c].push(o), o++;
133
+ }
134
+ }), a = a.filter((m) => m !== !1), a.length ? a.sort((m, c) => m.length === 1 ? m[0] - c[0] : (m = m[m.length - 1] - m[0], c = c[c.length - 1] - c[0], m - c))[0] : !1;
135
+ }
136
+ static indexesOfFirstLetter(i, l) {
137
+ const u = l[0];
138
+ return i.split("").map((a, v) => a !== u ? !1 : v).filter((a) => a !== !1);
139
+ }
140
+ }
141
+ class Ze {
142
+ constructor(i, l) {
143
+ ve(this, "searcher");
144
+ this.candidates = i, l ?? (l = (u) => [String(u)]), this.searcher = new U(
145
+ i.flatMap(
146
+ (u, a) => (l == null ? void 0 : l(u).map((v) => ({ key: v, index: a }))) ?? []
147
+ ),
148
+ ["key"],
149
+ { caseSensitive: !1, sort: !0 }
150
+ );
151
+ }
152
+ search(i) {
153
+ return [...new Set(this.searcher.search(i).map((l) => l.index))].map(
154
+ (l) => this.candidates[l]
155
+ );
156
+ }
157
+ }
158
+ const qe = { class: "sticky top-0 bg-white z-50" }, et = {
159
+ key: 0,
160
+ class: "h-12 bg-white absolute top-[-12px] left-[-24px] w-lvw z-50",
161
+ style: { "max-width": "min(100vw - 48px, 560px)" }
162
+ }, tt = { class: "flex justify-between items-center" }, lt = { class: "flex gap-16 basis-1/2" }, at = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, st = {
163
+ key: 0,
164
+ class: "ml-4"
165
+ }, nt = {
166
+ key: 1,
167
+ class: "pt-8 pb-8"
168
+ }, ot = {
169
+ key: 2,
170
+ class: "mt-8 p-12 bg-fm-color-state-warning-subtle border border-fm-color-state-warning-base rounded-4 flex items-center gap-8"
171
+ }, it = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, rt = {
172
+ key: 0,
173
+ class: "flex items-center gap-8 justify-center py-32"
174
+ }, ut = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, dt = {
175
+ key: 0,
176
+ class: "flex gap-4 items-center"
177
+ }, ct = {
178
+ key: 2,
179
+ class: "p-16 text-fm-color-typo-disabled fm-typo-en-body-lg-400 text-center"
180
+ }, mt = /* @__PURE__ */ be({
181
+ __name: "FmMultiselectDialog",
182
+ props: {
183
+ modelValue: {},
184
+ items: {},
185
+ groups: {},
186
+ singleSelect: { type: Boolean },
187
+ placeholder: {},
188
+ showValidBorder: { type: Boolean },
189
+ maxHeight: {},
190
+ width: {},
191
+ noShadow: { type: Boolean },
192
+ loading: { type: Boolean },
193
+ virtualScroll: { type: Boolean },
194
+ filterAttributes: {},
195
+ attributeKey: {},
196
+ maxSelections: {}
197
+ },
198
+ emits: ["update:modelValue", "close"],
199
+ setup(F, { emit: i }) {
200
+ var oe, ie, re;
201
+ const { t: l } = Re(), u = Ge(), a = F, v = Oe(), m = x(() => {
202
+ var t;
203
+ const e = (t = v.appendList) == null ? void 0 : t.call(v);
204
+ return Array.isArray(e) ? e : e ? [e] : [];
205
+ }), c = i, o = $(a.modelValue ?? []);
206
+ Ue(() => {
207
+ var t, n, r, h;
208
+ u.emitData(o.value);
209
+ const e = (t = a.modelValue) != null && t.length ? a.items.findIndex((_) => {
210
+ var M;
211
+ return he(_.value, (M = a.modelValue) == null ? void 0 : M[0]);
212
+ }) : 0;
213
+ (n = R.value) == null || n.scrollTo({ top: e * 64 - 64, behavior: "smooth" }), (h = (r = ne.value) == null ? void 0 : r.inputEl) == null || h.focus();
214
+ }), Ee(() => {
215
+ c("close");
216
+ }), ge([() => o.value], ([e]) => {
217
+ u.emitData(e), c("update:modelValue", e);
218
+ });
219
+ function g(e) {
220
+ return A.value.has(p(e));
221
+ }
222
+ const S = /* @__PURE__ */ new WeakMap();
223
+ function p(e) {
224
+ if (e && typeof e == "object") {
225
+ if ("_id" in e && e._id) return String(e._id);
226
+ const t = S.get(e);
227
+ if (t) return t;
228
+ const n = JSON.stringify(e);
229
+ return S.set(e, n), n;
230
+ }
231
+ return String(e);
232
+ }
233
+ const C = x(() => {
234
+ const e = /* @__PURE__ */ new Map();
235
+ for (const t of a.items) e.set(p(t.value), t);
236
+ return e;
237
+ }), A = x(() => new Set(o.value.map((e) => p(e)))), Q = x(
238
+ () => new Set(b.value.map((e) => p(e.value)))
239
+ );
240
+ function H(e, t) {
241
+ if (a.singleSelect) {
242
+ o.value = t ? [e] : [];
243
+ return;
244
+ }
245
+ const n = p(e), r = A.value.has(n);
246
+ if (!(t && r || !t && !r))
247
+ if (t) {
248
+ if (a.maxSelections && o.value.length >= a.maxSelections)
249
+ return;
250
+ o.value = [...o.value, e];
251
+ } else
252
+ o.value = o.value.filter((h) => p(h) !== n);
253
+ }
254
+ const xe = x(
255
+ () => new Ze(
256
+ a.items,
257
+ (e) => [e.label ?? "", e.sublabel ?? "", ...e.searchKeys ?? []].filter((t) => t)
258
+ )
259
+ ), E = $(""), G = $(null), b = x(() => {
260
+ let e = xe.value.search(E.value);
261
+ if (G.value && a.filterAttributes) {
262
+ const t = We.build(G.value);
263
+ e = a.attributeKey ? e.filter((n) => ye(n[a.attributeKey] ?? {}, t)) : e.filter((n) => ye(n, t));
264
+ }
265
+ return e;
266
+ }), te = x(() => {
267
+ const e = [], t = C.value, n = Q.value;
268
+ for (const r of o.value) {
269
+ const h = p(r), _ = t.get(h);
270
+ _ && !_.disabled && n.has(h) && e.push(r);
271
+ }
272
+ return e;
273
+ }), K = x(() => {
274
+ const e = b.value.filter((t) => !t.disabled);
275
+ return te.value.length === e.length;
276
+ }), le = x(() => te.value.length > 0 && !K.value);
277
+ function Se() {
278
+ if (K.value) {
279
+ const e = Q.value;
280
+ o.value = o.value.filter((t) => {
281
+ const n = p(t), r = C.value.get(n);
282
+ return (r == null ? void 0 : r.disabled) && !e.has(n);
283
+ });
284
+ } else {
285
+ const e = A.value, t = Q.value;
286
+ o.value = a.items.filter(
287
+ (n) => !n.disabled && (e.has(p(n.value)) || t.has(p(n.value)))
288
+ ).map((n) => n.value);
289
+ }
290
+ }
291
+ const _e = ee(
292
+ ((oe = a.items) == null ? void 0 : oe.map((e) => ({ value: e.value, disabled: e.disabled ?? !1 }))) ?? []
293
+ );
294
+ function we(e, t) {
295
+ return e.reduce(
296
+ (n, r) => {
297
+ const h = t(r);
298
+ return n[h] || (n[h] = []), n[h].push(r), n;
299
+ },
300
+ {}
301
+ );
302
+ }
303
+ const Fe = x(() => we(_e, (e) => p(e.value))), Ce = ee(
304
+ ((ie = a.items) == null ? void 0 : ie.map((e) => ({ value: e.value, collapsed: e.collapsed ?? !1 }))) ?? []
305
+ ), X = ee(
306
+ ((re = a.groups) == null ? void 0 : re.reduce(
307
+ (e, t) => (e[t.id] = t.collapse ?? !1, e),
308
+ {}
309
+ )) ?? {}
310
+ );
311
+ function Y({ groupId: e, value: t }) {
312
+ var n;
313
+ return e && X[e] || ((n = Ce.find((r) => he(r.value, t))) == null ? void 0 : n.collapsed);
314
+ }
315
+ function Ve(e) {
316
+ X[e] = !X[e];
317
+ }
318
+ const Z = x(() => {
319
+ const e = /* @__PURE__ */ new Map();
320
+ for (const t of a.items)
321
+ if (t.groupId) {
322
+ const n = p(t.value), r = e.get(t.groupId) ?? [];
323
+ r.push(n), e.set(t.groupId, r);
324
+ }
325
+ return e;
326
+ });
327
+ function q(e) {
328
+ const t = Z.value.get(e) || [], n = A.value;
329
+ return t.length > 0 && t.every((r) => n.has(r));
330
+ }
331
+ function ae(e) {
332
+ const t = Z.value.get(e) || [], n = A.value;
333
+ return t.some((r) => n.has(r)) && !q(e);
334
+ }
335
+ function Ae(e) {
336
+ const t = Z.value.get(e) || [];
337
+ if (!t.length) return;
338
+ const n = A.value;
339
+ if (q(e))
340
+ o.value = o.value.filter((r) => !t.includes(p(r)));
341
+ else if (ae(e)) {
342
+ const r = [];
343
+ for (const h of a.items)
344
+ if (h.groupId === e) {
345
+ const _ = p(h.value);
346
+ n.has(_) || r.push(h.value);
347
+ }
348
+ r.length && (o.value = [...o.value, ...r]);
349
+ } else {
350
+ const r = a.items.filter((h) => h.groupId === e).map((h) => h.value);
351
+ o.value = [...o.value, ...r];
352
+ }
353
+ }
354
+ const J = $(0);
355
+ function se(e) {
356
+ var t;
357
+ J.value = ((t = e.target) == null ? void 0 : t.scrollTop) ?? J;
358
+ }
359
+ const Me = x(() => J.value > 100), R = $(), ne = $(), Te = x(() => a.maxSelections ? Math.max(0, a.maxSelections - o.value.length) : null), Be = x(() => a.maxSelections && o.value.length >= a.maxSelections);
360
+ return (e, t) => {
361
+ var de, ce;
362
+ const n = T("FmIcon"), r = T("FmTextField"), h = T("FmCircularProgress"), _ = T("FmCheckbox"), M = T("FmListItem"), Le = T("FmChip"), ue = T("FmButton"), Ie = T("FmList");
363
+ return d(), f("div", {
364
+ class: "relative max-h-[380px] overflow-y-auto overflow-x-hidden",
365
+ onScroll: se,
366
+ onScrollend: se,
367
+ ref_key: "scrollable",
368
+ ref: R
369
+ }, [
370
+ B("div", qe, [
371
+ e.noShadow ? D("", !0) : (d(), f("div", et)),
372
+ B("div", tt, [
373
+ B("div", lt, [
374
+ k(n, { name: "autorenew" }),
375
+ B("span", at, [
376
+ Ke(P(L(l)("inventory.formField.itemsSelected", { count: ((de = o.value) == null ? void 0 : de.length) ?? 0 })) + " ", 1),
377
+ e.maxSelections ? (d(), f("span", st, " (" + P(L(l)("inventory.formField.maximum")) + " " + P(Te.value) + ") ", 1)) : D("", !0)
378
+ ])
379
+ ]),
380
+ k(r, {
381
+ class: "basis-1/2",
382
+ modelValue: E.value,
383
+ "onUpdate:modelValue": t[1] || (t[1] = (s) => E.value = s),
384
+ "prepend-icon": "search",
385
+ placeholder: e.placeholder,
386
+ ref_key: "searchTextField",
387
+ ref: ne
388
+ }, je({ _: 2 }, [
389
+ E.value.length ? {
390
+ name: "append",
391
+ fn: w(() => [
392
+ k(n, {
393
+ class: "cursor-pointer",
394
+ name: "close",
395
+ onClick: t[0] || (t[0] = (s) => E.value = "")
396
+ })
397
+ ]),
398
+ key: "0"
399
+ } : void 0
400
+ ]), 1032, ["modelValue", "placeholder"])
401
+ ]),
402
+ e.filterAttributes && e.filterAttributes.length > 0 ? (d(), f("div", nt, [
403
+ k(L(Qe), {
404
+ modelValue: G.value,
405
+ "onUpdate:modelValue": t[2] || (t[2] = (s) => G.value = s),
406
+ attributes: e.filterAttributes
407
+ }, null, 8, ["modelValue", "attributes"])
408
+ ])) : D("", !0),
409
+ Be.value ? (d(), f("div", ot, [
410
+ k(n, {
411
+ name: "warning",
412
+ class: "text-fm-color-state-warning-base"
413
+ }),
414
+ B("span", it, P(L(l)("inventory.formField.maxSelectionsReached", { count: e.maxSelections })), 1)
415
+ ])) : D("", !0)
416
+ ]),
417
+ B("div", null, [
418
+ e.loading ? (d(), f("div", rt, [
419
+ k(h, {
420
+ size: "md",
421
+ color: "neutral-gray-400"
422
+ }),
423
+ B("div", ut, P(L(l)("inventory.formField.loading")), 1)
424
+ ])) : b.value.length ? (d(), I(Ie, { key: 1 }, {
425
+ default: w(() => [
426
+ e.singleSelect ? D("", !0) : (d(), I(M, {
427
+ key: 0,
428
+ "model-value": K.value,
429
+ indeterminate: le.value,
430
+ value: "",
431
+ onClick: t[3] || (t[3] = (s) => Se())
432
+ }, {
433
+ prepend: w(() => [
434
+ k(_, {
435
+ "model-value": K.value,
436
+ indeterminate: le.value,
437
+ label: K.value ? L(l)("inventory.formField.select.removeAll") : L(l)("inventory.formField.select.selectAll"),
438
+ value: ""
439
+ }, null, 8, ["model-value", "indeterminate", "label"])
440
+ ]),
441
+ _: 1
442
+ }, 8, ["model-value", "indeterminate"])),
443
+ e.groups ? (d(!0), f(V, { key: 2 }, O(e.groups, (s) => (d(), f(V, {
444
+ key: s.id
445
+ }, [
446
+ k(M, {
447
+ label: s.label,
448
+ sublabel: s.sublabel,
449
+ style: { "padding-top": "4px", "padding-bottom": "4px", "padding-left": "32px" },
450
+ disabled: s.disabled
451
+ }, {
452
+ prepend: w(() => [
453
+ k(_, {
454
+ "model-value": q(s.id),
455
+ indeterminate: ae(s.id),
456
+ onClick: () => Ae(s.id),
457
+ value: s.id,
458
+ disabled: s.disabled
459
+ }, null, 8, ["model-value", "indeterminate", "onClick", "value", "disabled"])
460
+ ]),
461
+ append: w(() => [
462
+ k(ue, {
463
+ "prepend-icon": Y({ groupId: s.id }) ? "expand_less" : "expand_more",
464
+ size: "md",
465
+ variant: "tertiary",
466
+ onClick: Ne(() => Ve(s.id), ["stop"])
467
+ }, null, 8, ["prepend-icon", "onClick"])
468
+ ]),
469
+ _: 2
470
+ }, 1032, ["label", "sublabel", "disabled"]),
471
+ (d(!0), f(V, null, O(b.value.filter((y) => y.groupId === s.id), (y) => (d(), f("div", {
472
+ key: p(y.value),
473
+ class: fe([
474
+ "transition-all overflow-y-clip",
475
+ Y({ groupId: s.id, value: y.value }) ? "max-h-0 opacity-0" : "max-h-[64px] opacity-100"
476
+ ])
477
+ }, [
478
+ k(M, {
479
+ label: y.label,
480
+ sublabel: y.sublabel,
481
+ disabled: y.disabled,
482
+ onClick: (j) => H(y.value, !g(y.value)),
483
+ style: { "padding-top": "4px", "padding-bottom": "4px", "padding-left": "64px" }
484
+ }, {
485
+ prepend: w(() => [
486
+ k(_, {
487
+ "model-value": g(y.value),
488
+ "onUpdate:modelValue": (j) => H(y.value, j),
489
+ value: y.value,
490
+ disabled: y.disabled
491
+ }, null, 8, ["model-value", "onUpdate:modelValue", "value", "disabled"])
492
+ ]),
493
+ _: 2
494
+ }, 1032, ["label", "sublabel", "disabled", "onClick"])
495
+ ], 2))), 128))
496
+ ], 64))), 128)) : (d(), f(V, { key: 1 }, [
497
+ e.virtualScroll ? (d(), I(Ye, {
498
+ key: 0,
499
+ length: b.value.length + m.value.length,
500
+ "item-height": 64,
501
+ scrollTop: J.value,
502
+ prerender: 100
503
+ }, {
504
+ default: w(({ getItem: s, index: y }) => {
505
+ var j, me;
506
+ return [
507
+ y < b.value.length ? (d(), I(M, {
508
+ key: 0,
509
+ label: s(b.value).label,
510
+ sublabel: s(b.value).sublabel,
511
+ onClick: (N) => H(
512
+ s(b.value).value,
513
+ !g(s(b.value).value)
514
+ ),
515
+ disabled: (me = (j = Fe.value[p(s(b.value).value)]) == null ? void 0 : j[0]) == null ? void 0 : me.disabled,
516
+ style: z({
517
+ paddingTop: 4,
518
+ paddingBottom: 4,
519
+ paddingLeft: e.singleSelect === !0 ? 12 : 32
520
+ })
521
+ }, {
522
+ prepend: w(() => [
523
+ k(_, {
524
+ "model-value": g(s(b.value).value),
525
+ "onUpdate:modelValue": (N) => H(s(b.value).value, N),
526
+ value: s(b.value).value,
527
+ disabled: s(b.value).disabled
528
+ }, null, 8, ["model-value", "onUpdate:modelValue", "value", "disabled"])
529
+ ]),
530
+ append: w(() => {
531
+ var N;
532
+ return [
533
+ (N = s(b.value)) != null && N.tags ? (d(), f("div", dt, [
534
+ (d(!0), f(V, null, O(s(b.value).tags, (De, $e) => (d(), I(Le, {
535
+ key: $e,
536
+ label: De,
537
+ compact: ""
538
+ }, null, 8, ["label"]))), 128))
539
+ ])) : D("", !0),
540
+ ke(e.$slots, "appendListItem", {
541
+ item: s(b.value)
542
+ }, void 0, !0)
543
+ ];
544
+ }),
545
+ _: 2
546
+ }, 1032, ["label", "sublabel", "onClick", "disabled", "style"])) : (d(), I(pe(m.value[y - b.value.length]), { key: 1 }))
547
+ ];
548
+ }),
549
+ _: 3
550
+ }, 8, ["length", "scrollTop"])) : (d(), f(V, { key: 1 }, [
551
+ (d(!0), f(V, null, O(b.value, (s) => (d(), f("div", {
552
+ key: p(s.value),
553
+ class: fe([
554
+ "transition-all overflow-y-clip",
555
+ Y({ value: s.value }) ? "max-h-0 opacity-0" : "max-h-[64px] opacity-100"
556
+ ])
557
+ }, [
558
+ k(M, {
559
+ label: s.label,
560
+ sublabel: s.sublabel,
561
+ onClick: (y) => H(s.value, !g(s.value)),
562
+ disabled: s.disabled,
563
+ style: z({
564
+ paddingTop: 4,
565
+ paddingBottom: 4,
566
+ paddingLeft: e.singleSelect === !0 ? 12 : 32
567
+ })
568
+ }, {
569
+ prepend: w(() => [
570
+ k(_, {
571
+ "model-value": g(s.value),
572
+ "onUpdate:modelValue": (y) => H(s.value, y),
573
+ value: s.value,
574
+ disabled: s.disabled
575
+ }, null, 8, ["model-value", "onUpdate:modelValue", "value", "disabled"])
576
+ ]),
577
+ _: 2
578
+ }, 1032, ["label", "sublabel", "onClick", "disabled", "style"])
579
+ ], 2))), 128)),
580
+ (d(!0), f(V, null, O(m.value, (s, y) => (d(), f("div", { key: y }, [
581
+ (d(), I(pe(s)))
582
+ ]))), 128))
583
+ ], 64))
584
+ ], 64))
585
+ ]),
586
+ _: 3
587
+ })) : (d(), f("div", ct, P(L(l)("inventory.formField.noItemsFound")), 1))
588
+ ]),
589
+ B("div", {
590
+ class: "sticky bottom-24",
591
+ style: z({ transform: `translateX(${(((ce = R.value) == null ? void 0 : ce.clientWidth) ?? 0) - 80}px)` })
592
+ }, [
593
+ k(ze, { name: "fade" }, {
594
+ default: w(() => [
595
+ Me.value ? (d(), I(ue, {
596
+ key: 0,
597
+ variant: "fab",
598
+ class: "bg-white",
599
+ "text-color": "neutral-gray-400",
600
+ "prepend-icon": "keyboard_arrow_up",
601
+ onClick: t[4] || (t[4] = () => {
602
+ var s;
603
+ return (s = R.value) == null ? void 0 : s.scrollTo({ top: 0, behavior: "smooth" });
604
+ })
605
+ })) : D("", !0)
606
+ ]),
607
+ _: 1
608
+ })
609
+ ], 4)
610
+ ], 544);
611
+ };
612
+ }
613
+ }), St = /* @__PURE__ */ Xe(mt, [["__scopeId", "data-v-3d54ea9a"]]);
614
+ export {
615
+ U as F,
616
+ St as a,
617
+ Ze as b
618
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineStore as p } from "pinia";
2
2
  import { useDialog as y } from "@feedmepos/ui-library";
3
3
  import { useI18n as v } from "@feedmepos/mf-common";
4
- import { a } from "./FmMultiselectDialog-BgLyRNeD.js";
4
+ import { a } from "./FmMultiselectDialog-BviFuAM5.js";
5
5
  import { h as S } from "vue";
6
6
  const w = p("inventoryMultiSelectDialog", () => {
7
7
  const l = y(), { t: n } = v();
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as ie, mergeModels as W, useModel as le, computed as v, ref as B, watch as E, onBeforeUnmount as ae, inject as ue, resolveComponent as b, openBlock as d, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as F, renderSlot as G, normalizeClass as j, toDisplayString as _, withDirectives as re, vModelText as me, createCommentVNode as I, createTextVNode as ce, createBlock as U, Fragment as de, renderList as pe } from "vue";
2
- import { l as fe } from "./lodash-DDMf37Aw.js";
3
- import { s as D } from "./app-_hCz0958.js";
4
- import { I as R, g as O, d as ve, a as M, c as be, t as ye, f as he, p as Me, b as ge, u as xe } from "./rules-9-OxHCjJ.js";
2
+ import { l as fe } from "./lodash-D0COOw3m.js";
3
+ import { w as D } from "./app-CddcvygU.js";
4
+ import { I as R, g as O, d as ve, a as M, c as be, t as ye, f as he, p as Me, b as ge, u as xe } from "./rules-hQBVd1Mn.js";
5
5
  import "@feedmepos/ui-library";
6
6
  function H() {
7
7
  return {
@@ -2,14 +2,14 @@ import { defineComponent as De, ref as F, computed as J, watch as ze, resolveCom
2
2
  import { u as Ve, _ as ke } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
3
3
  import { useCoreStore as Re, useI18n as je } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as We, useSnackbar as Oe, useDialog as Le, useBreakpoints as Je } from "@feedmepos/ui-library";
5
- import { u as Xe } from "./feature-Dk3_0hiC.js";
6
- import { a as ie } from "./app-_hCz0958.js";
7
- import "./dayjs.min-iDh15Qvq.js";
8
- import "./app-uBuHtW8m.js";
9
- import { s as He, a as qe, d as Qe, t as Ce, r as Ye } from "./xlsx.util-OqI8IJfw.js";
10
- import { s as Ze, g as et, b as tt, d as Fe } from "./import-export.helper-DpWf4zh7.js";
5
+ import { u as Xe } from "./feature-CTA18HlL.js";
6
+ import { a as ie } from "./app-CddcvygU.js";
7
+ import "./dayjs.min-NrRtjg32.js";
8
+ import "./app-DiX-EfV6.js";
9
+ import { s as He, a as qe, d as Qe, t as Ce, r as Ye } from "./xlsx.util-CSudzOii.js";
10
+ import { s as Ze, g as et, b as tt, d as Fe } from "./import-export.helper-DWwlJy7N.js";
11
11
  import { r as nt } from "./random-CSbEbElR.js";
12
- import { d as Ae, a as pe } from "./rules-9-OxHCjJ.js";
12
+ import { d as Ae, a as pe } from "./rules-hQBVd1Mn.js";
13
13
  import { F as ot } from "./FmDroppableField-J0xUsOTV.js";
14
14
  function Ee() {
15
15
  return `measurement_${(/* @__PURE__ */ new Date()).toISOString()}_${nt()}`;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
2
- import { a, f as y } from "./rules-9-OxHCjJ.js";
2
+ import { a, f as y } from "./rules-hQBVd1Mn.js";
3
3
  import { useI18n as _ } from "@feedmepos/mf-common";
4
4
  const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, h = { class: "flex-1 py-8 px-16" }, b = {
5
5
  class: "flex-0 py-8 px-16",