@feedmepos/mf-inventory-portal 1.2.51-dev.1 → 1.2.51

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