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

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 (84) hide show
  1. package/dist/{App-kX4bqoEe.js → App-CZJre5y8.js} +57 -55
  2. package/dist/{ApprovalView-DCNKqVE2.js → ApprovalView-CnxHxojY.js} +34 -28
  3. package/dist/{BindingsDialog-d7f1f8gf.js → BindingsDialog-C6lCOPNs.js} +2 -2
  4. package/dist/{BindingsPicker-2HJOx0QW.js → BindingsPicker-DZtFKLQ5.js} +6 -5
  5. package/dist/{BindingsTable-CPAjxOZG.js → BindingsTable-BmQGLuJ4.js} +28 -24
  6. package/dist/{ClosingDraftView-CUng41eo.js → ClosingDraftView-KLtlh31f.js} +183 -175
  7. package/dist/{ClosingHistoryView-CcGc2NwU.js → ClosingHistoryView-Rf1yMhMj.js} +43 -41
  8. package/dist/ClosingTemplateView-C_IiKnGx.js +2019 -0
  9. package/dist/{DeliveryOrderPrintPreview-BsM-CCc5.js → DeliveryOrderPrintPreview-UF7V005U.js} +15 -14
  10. package/dist/FmDroppableField-J0xUsOTV.js +154 -0
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-cuggJ5Xd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js} +74 -72
  12. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js +279 -0
  13. package/dist/{FmMultiselectDialog-BGbrqXUF.js → FmMultiselectDialog-B0aKuf2o.js} +1 -1
  14. package/dist/FmMultiselectDialog-BasrjBFA.js +597 -0
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-isogcN1O.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js} +51 -49
  16. package/dist/{ImportView-wAVrMEwL.js → ImportView-DRSoz0uM.js} +81 -74
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVUF4I2Q.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DA8SlWPy.js} +5 -5
  18. package/dist/{IngredientGroupView-BZczeXdL.js → IngredientGroupView-D5Laak2-.js} +73 -65
  19. package/dist/{IngredientsView-D5N5Y1ZY.js → IngredientsView-TG3fPQhR.js} +358 -345
  20. package/dist/{IntegrationView-Hrslmuc1.js → IntegrationView-CElpjyo7.js} +219 -209
  21. package/dist/{InventoryBindingForm-DH6wgxOG.js → InventoryBindingForm-CBgxRYBd.js} +1 -1
  22. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drr5vD6f.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ys5GBHoQ.js} +41 -40
  23. package/dist/{InventoryBindingSummary-BU1ehpQZ.js → InventoryBindingSummary-OK3vNWhi.js} +1 -1
  24. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1ueC4GfZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9QRntUlk.js} +5 -5
  25. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-FHcU1zZt.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bc01NoOn.js} +22 -21
  26. package/dist/{PublishView-CQtj0f31.js → PublishView-CLMfiLjP.js} +26 -23
  27. package/dist/{PurchaseOrderPrintPreview-BQyXtHST.js → PurchaseOrderPrintPreview-Dy77yWDC.js} +10 -9
  28. package/dist/{ReceiveRequestView-Dm-h_SrY.js → ReceiveRequestView-BhD-NaHE.js} +478 -462
  29. package/dist/{RecipeView-DNNRvr1w.js → RecipeView-RWaO94w_.js} +73 -64
  30. package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js +251 -0
  31. package/dist/{StockView-CaOm5BCx.js → StockView-D5t8OxaG.js} +292 -282
  32. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Z91XRszD.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-3Asf1TGd.js} +1 -1
  33. package/dist/{SupplierView-JSII9qwL.js → SupplierView-DiospFKq.js} +92 -80
  34. package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-DfCHteOF.js +177 -0
  35. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
  36. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CNtvx-LA.js +123 -0
  37. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Mehd4lGs.js → TransferDetails.vue_vue_type_script_setup_true_lang-p959Op4k.js} +318 -305
  38. package/dist/{TransferTemplateView-DyCpNKJd.js → TransferTemplateView-ePZFdZ0p.js} +228 -216
  39. package/dist/{UnitView-CqN7mlJ2.js → UnitView-Banlxw7y.js} +70 -63
  40. package/dist/{WarehouseView-gFWD-m8e.js → WarehouseView-BL-p5hbi.js} +123 -114
  41. package/dist/WastageTemplateView-B1pmSuW0.js +2288 -0
  42. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  43. package/dist/app-EpEEb8EO.js +64040 -0
  44. package/dist/app-rgirz_52.js +8024 -0
  45. package/dist/app.d.ts +0 -21
  46. package/dist/app.js +6 -6
  47. package/dist/closing-template-zIjwO1_E.js +117 -0
  48. package/dist/date2-Dnc8Y81g.js +116 -0
  49. package/dist/dayjs.min-TdUgzmww.js +282 -0
  50. package/dist/{decimal-DfF_g5rc.js → decimal-C6s3GvGb.js} +4 -3
  51. package/dist/defineDeepModel-BSaaXVBF.js +19 -0
  52. package/dist/duplicate-template-Bw0H416G.js +34 -0
  53. package/dist/feature-C95Hao53.js +20162 -0
  54. package/dist/form-mode.enum-BKiNVH6A.js +4 -0
  55. package/dist/format-time-from-id-DlbHo6kY.js +15 -0
  56. package/dist/{format-unit-display-ivAljvlo.js → format-unit-display-QBS54q0R.js} +308 -297
  57. package/dist/{import-export.helper-B2MWv9v7.js → import-export.helper-CUKCKtP7.js} +56 -52
  58. package/dist/index-CFn_9RMm.js +45 -0
  59. package/dist/{index-DZaT0ZaL.js → index-S9Ak__QC.js} +1 -1
  60. package/dist/{index-BbhuWHyh.js → index-goD-WGVb.js} +16 -14
  61. package/dist/lodash-gq8IrP4j.js +3678 -0
  62. package/dist/netsuite-CnhAKyAO.js +4316 -0
  63. package/dist/{purchase-order-template-DdybMC_P.js → purchase-order-template-CBIpWdEW.js} +1 -1
  64. package/dist/router/shared.spec.d.ts +1 -0
  65. package/dist/row-action.enum-BcW_L_nE.js +67 -0
  66. package/dist/rules-DKklsaS1.js +201 -0
  67. package/dist/{stock-BYagIdsj.js → stock-3K93Mif9.js} +1 -1
  68. package/dist/{stock-V4ciPiBe.js → stock-BW8fen3H.js} +11 -10
  69. package/dist/style.css +1 -1
  70. package/dist/{supplier-CgtB1I9I.js → supplier-CObCSfot.js} +27 -26
  71. package/dist/tsconfig.app.tsbuildinfo +1 -1
  72. package/dist/{use-ingredient-select-dialog-BIQovyZX.js → use-ingredient-select-dialog-DwvQiaVW.js} +4 -3
  73. package/dist/{use-inventory-binding-dialog-DyjicXgc.js → use-inventory-binding-dialog-CuLEHLDM.js} +4 -3
  74. package/dist/use-template-enabled-locations-2-DkUJeppb.js +111 -0
  75. package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
  76. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +0 -1
  77. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -13
  78. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +0 -12
  79. package/dist/vue-i18n-CUznvVzc.js +2365 -0
  80. package/dist/xlsx-bT1p3YVR.js +24004 -0
  81. package/dist/xlsx.util-Cr9DpDFb.js +78 -0
  82. package/package.json +5 -5
  83. package/dist/ClosingTemplateView-D8IAdhDb.js +0 -2041
  84. package/dist/app-CnQ49Lyb.js +0 -131483
@@ -0,0 +1,597 @@
1
+ var Le = Object.defineProperty;
2
+ var Ie = (F, o, t) => o in F ? Le(F, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : F[o] = t;
3
+ var me = (F, o, t) => Ie(F, typeof o != "symbol" ? o + "" : o, t);
4
+ import { defineComponent as ye, computed as S, ref as L, watch as ge, openBlock as c, createElementBlock as h, normalizeStyle as G, Fragment as V, renderList as $, renderSlot as ke, createCommentVNode as O, useSlots as De, onMounted as He, onUnmounted as $e, reactive as q, resolveComponent as B, createElementVNode as I, createVNode as _, toDisplayString as ee, unref as H, createSlots as Oe, withCtx as w, createBlock as M, resolveDynamicComponent as fe, normalizeClass as he, withModifiers as Ue, Transition as Pe } from "vue";
5
+ import { useDialogChild as Ee } from "@feedmepos/ui-library";
6
+ import { x as be } from "./app-EpEEb8EO.js";
7
+ import { d as Ne } from "./index-CFn_9RMm.js";
8
+ /* empty css */
9
+ import { useI18n as je } from "@feedmepos/mf-common";
10
+ import { N as Ge, H as ze, b as Ke } from "./app-rgirz_52.js";
11
+ import { _ as We } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const Je = /* @__PURE__ */ ye({
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
+ ge([() => 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: G({ 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: G({
50
+ top: `${k.itemHeight * C}px`,
51
+ height: `${k.itemHeight}px`,
52
+ transition: "opacity 0.5s ease"
53
+ }),
54
+ onVnodeMounted: g
55
+ }, [
56
+ ke(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__ */ ye({
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
+ },
190
+ emits: ["update:modelValue", "close"],
191
+ setup(F, { emit: o }) {
192
+ var oe, ie, re;
193
+ const { t } = je(), u = Ee(), s = F, p = De(), v = S(() => {
194
+ var l;
195
+ const e = (l = p.appendList) == null ? void 0 : l.call(p);
196
+ return Array.isArray(e) ? e : e ? [e] : [];
197
+ }), d = o, i = L(s.modelValue ?? []);
198
+ He(() => {
199
+ var l, n, r, m;
200
+ u.emitData(i.value);
201
+ const e = (l = s.modelValue) != null && l.length ? s.items.findIndex((x) => {
202
+ var T;
203
+ return be(x.value, (T = s.modelValue) == null ? void 0 : T[0]);
204
+ }) : 0;
205
+ (n = W.value) == null || n.scrollTo({ top: e * 64 - 64, behavior: "smooth" }), (m = (r = ne.value) == null ? void 0 : r.inputEl) == null || m.focus();
206
+ }), $e(() => {
207
+ d("close");
208
+ }), ge([() => i.value], ([e]) => {
209
+ u.emitData(e), d("update:modelValue", e);
210
+ });
211
+ function g(e) {
212
+ return A.value.has(b(e));
213
+ }
214
+ const k = /* @__PURE__ */ new WeakMap();
215
+ function b(e) {
216
+ if (e && typeof e == "object") {
217
+ if ("_id" in e && e._id) return String(e._id);
218
+ const l = k.get(e);
219
+ if (l) return l;
220
+ const n = JSON.stringify(e);
221
+ return k.set(e, n), n;
222
+ }
223
+ return String(e);
224
+ }
225
+ const C = S(() => {
226
+ const e = /* @__PURE__ */ new Map();
227
+ for (const l of s.items) e.set(b(l.value), l);
228
+ return e;
229
+ }), A = S(() => new Set(i.value.map((e) => b(e)))), Q = S(
230
+ () => new Set(y.value.map((e) => b(e.value)))
231
+ );
232
+ function D(e, l) {
233
+ if (s.singleSelect) {
234
+ i.value = l ? [e] : [];
235
+ return;
236
+ }
237
+ const n = b(e), r = A.value.has(n);
238
+ l && r || !l && !r || (l ? i.value = [...i.value, e] : i.value = i.value.filter((m) => b(m) !== n));
239
+ }
240
+ const _e = S(
241
+ () => new Qe(
242
+ s.items,
243
+ (e) => [e.label ?? "", e.sublabel ?? "", ...e.searchKeys ?? []].filter((l) => l)
244
+ )
245
+ ), P = L(""), z = L(null), y = S(() => {
246
+ let e = _e.value.search(P.value);
247
+ if (z.value && s.filterAttributes) {
248
+ const l = Ge.build(z.value);
249
+ e = e.filter((n) => ze(n, l));
250
+ }
251
+ return e;
252
+ }), le = S(() => {
253
+ const e = [], l = C.value, n = Q.value;
254
+ for (const r of i.value) {
255
+ const m = b(r), x = l.get(m);
256
+ x && !x.disabled && n.has(m) && e.push(r);
257
+ }
258
+ return e;
259
+ }), E = S(() => {
260
+ const e = y.value.filter((l) => !l.disabled);
261
+ return le.value.length === e.length;
262
+ }), te = S(() => le.value.length > 0 && !E.value);
263
+ function Se() {
264
+ if (E.value) {
265
+ const e = Q.value;
266
+ i.value = i.value.filter((l) => {
267
+ const n = b(l), r = C.value.get(n);
268
+ return (r == null ? void 0 : r.disabled) && !e.has(n);
269
+ });
270
+ } else {
271
+ const e = A.value, l = Q.value;
272
+ i.value = s.items.filter(
273
+ (n) => !n.disabled && (e.has(b(n.value)) || l.has(b(n.value)))
274
+ ).map((n) => n.value);
275
+ }
276
+ }
277
+ const xe = q(
278
+ ((oe = s.items) == null ? void 0 : oe.map((e) => ({ value: e.value, disabled: e.disabled ?? !1 }))) ?? []
279
+ );
280
+ function we(e, l) {
281
+ return e.reduce(
282
+ (n, r) => {
283
+ const m = l(r);
284
+ return n[m] || (n[m] = []), n[m].push(r), n;
285
+ },
286
+ {}
287
+ );
288
+ }
289
+ const Fe = S(() => we(xe, (e) => {
290
+ var l;
291
+ return (l = e.value) == null ? void 0 : l._id;
292
+ })), Ce = q(
293
+ ((ie = s.items) == null ? void 0 : ie.map((e) => ({ value: e.value, collapsed: e.collapsed ?? !1 }))) ?? []
294
+ ), X = q(
295
+ ((re = s.groups) == null ? void 0 : re.reduce(
296
+ (e, l) => (e[l.id] = l.collapse ?? !1, e),
297
+ {}
298
+ )) ?? {}
299
+ );
300
+ function R({ groupId: e, value: l }) {
301
+ var n;
302
+ return e && X[e] || ((n = Ce.find((r) => be(r.value, l))) == null ? void 0 : n.collapsed);
303
+ }
304
+ function Ve(e) {
305
+ X[e] = !X[e];
306
+ }
307
+ const Y = S(() => {
308
+ const e = /* @__PURE__ */ new Map();
309
+ for (const l of s.items)
310
+ if (l.groupId) {
311
+ const n = b(l.value), r = e.get(l.groupId) ?? [];
312
+ r.push(n), e.set(l.groupId, r);
313
+ }
314
+ return e;
315
+ });
316
+ function Z(e) {
317
+ const l = Y.value.get(e) || [], n = A.value;
318
+ return l.length > 0 && l.every((r) => n.has(r));
319
+ }
320
+ function se(e) {
321
+ const l = Y.value.get(e) || [], n = A.value;
322
+ return l.some((r) => n.has(r)) && !Z(e);
323
+ }
324
+ function Ae(e) {
325
+ const l = Y.value.get(e) || [];
326
+ if (!l.length) return;
327
+ const n = A.value;
328
+ if (Z(e))
329
+ i.value = i.value.filter((r) => !l.includes(b(r)));
330
+ else if (se(e)) {
331
+ const r = [];
332
+ for (const m of s.items)
333
+ if (m.groupId === e) {
334
+ const x = b(m.value);
335
+ n.has(x) || r.push(m.value);
336
+ }
337
+ r.length && (i.value = [...i.value, ...r]);
338
+ } else {
339
+ const r = s.items.filter((m) => m.groupId === e).map((m) => m.value);
340
+ i.value = [...i.value, ...r];
341
+ }
342
+ }
343
+ const K = L(0);
344
+ function ae(e) {
345
+ var l;
346
+ K.value = ((l = e.target) == null ? void 0 : l.scrollTop) ?? K;
347
+ }
348
+ const Te = S(() => K.value > 100), W = L(), ne = L();
349
+ return (e, l) => {
350
+ var de, ce;
351
+ const n = B("FmIcon"), r = B("FmTextField"), m = B("FmCircularProgress"), x = B("FmCheckbox"), T = B("FmListItem"), Be = B("FmChip"), ue = B("FmButton"), Me = B("FmList");
352
+ return c(), h("div", {
353
+ class: "relative max-h-[380px] overflow-y-auto overflow-x-hidden",
354
+ onScroll: ae,
355
+ onScrollend: ae,
356
+ ref_key: "scrollable",
357
+ ref: W
358
+ }, [
359
+ I("div", Xe, [
360
+ e.noShadow ? O("", !0) : (c(), h("div", Re)),
361
+ I("div", Ye, [
362
+ I("div", Ze, [
363
+ _(n, { name: "autorenew" }),
364
+ I("span", qe, ee(H(t)("inventory.formField.itemsSelected", { count: ((de = i.value) == null ? void 0 : de.length) ?? 0 })), 1)
365
+ ]),
366
+ _(r, {
367
+ class: "basis-1/2",
368
+ modelValue: P.value,
369
+ "onUpdate:modelValue": l[1] || (l[1] = (a) => P.value = a),
370
+ "prepend-icon": "search",
371
+ placeholder: e.placeholder,
372
+ ref_key: "searchTextField",
373
+ ref: ne
374
+ }, Oe({ _: 2 }, [
375
+ P.value.length ? {
376
+ name: "append",
377
+ fn: w(() => [
378
+ _(n, {
379
+ class: "cursor-pointer",
380
+ name: "close",
381
+ onClick: l[0] || (l[0] = (a) => P.value = "")
382
+ })
383
+ ]),
384
+ key: "0"
385
+ } : void 0
386
+ ]), 1032, ["modelValue", "placeholder"])
387
+ ]),
388
+ e.filterAttributes && e.filterAttributes.length > 0 ? (c(), h("div", el, [
389
+ _(H(Ke), {
390
+ modelValue: z.value,
391
+ "onUpdate:modelValue": l[2] || (l[2] = (a) => z.value = a),
392
+ attributes: e.filterAttributes
393
+ }, null, 8, ["modelValue", "attributes"])
394
+ ])) : O("", !0)
395
+ ]),
396
+ I("div", null, [
397
+ e.loading ? (c(), h("div", ll, [
398
+ _(m, {
399
+ size: "md",
400
+ color: "neutral-gray-400"
401
+ }),
402
+ I("div", tl, ee(H(t)("inventory.formField.loading")), 1)
403
+ ])) : y.value.length ? (c(), M(Me, { key: 1 }, {
404
+ default: w(() => [
405
+ e.singleSelect ? O("", !0) : (c(), M(T, {
406
+ key: 0,
407
+ "model-value": E.value,
408
+ indeterminate: te.value,
409
+ value: "",
410
+ onClick: l[3] || (l[3] = (a) => Se())
411
+ }, {
412
+ prepend: w(() => [
413
+ _(x, {
414
+ "model-value": E.value,
415
+ indeterminate: te.value,
416
+ label: E.value ? H(t)("inventory.formField.select.removeAll") : H(t)("inventory.formField.select.selectAll"),
417
+ value: ""
418
+ }, null, 8, ["model-value", "indeterminate", "label"])
419
+ ]),
420
+ _: 1
421
+ }, 8, ["model-value", "indeterminate"])),
422
+ e.groups ? (c(!0), h(V, { key: 2 }, $(e.groups, (a) => (c(), h(V, {
423
+ key: a.id
424
+ }, [
425
+ _(T, {
426
+ label: a.label,
427
+ sublabel: a.sublabel,
428
+ style: { "padding-top": "4px", "padding-bottom": "4px", "padding-left": "32px" },
429
+ disabled: a.disabled
430
+ }, {
431
+ prepend: w(() => [
432
+ _(x, {
433
+ "model-value": Z(a.id),
434
+ indeterminate: se(a.id),
435
+ onClick: () => Ae(a.id),
436
+ value: a.id,
437
+ disabled: a.disabled
438
+ }, null, 8, ["model-value", "indeterminate", "onClick", "value", "disabled"])
439
+ ]),
440
+ append: w(() => [
441
+ _(ue, {
442
+ "prepend-icon": R({ groupId: a.id }) ? "expand_less" : "expand_more",
443
+ size: "md",
444
+ variant: "tertiary",
445
+ onClick: Ue(() => Ve(a.id), ["stop"])
446
+ }, null, 8, ["prepend-icon", "onClick"])
447
+ ]),
448
+ _: 2
449
+ }, 1032, ["label", "sublabel", "disabled"]),
450
+ (c(!0), h(V, null, $(y.value.filter((f) => f.groupId === a.id), (f) => (c(), h("div", {
451
+ key: f.value,
452
+ class: he([
453
+ "transition-all overflow-y-clip",
454
+ R({ groupId: a.id, value: f.value }) ? "max-h-0 opacity-0" : "max-h-[64px] opacity-100"
455
+ ])
456
+ }, [
457
+ _(T, {
458
+ label: f.label,
459
+ sublabel: f.sublabel,
460
+ disabled: f.disabled,
461
+ onClick: (N) => D(f.value, !g(f.value)),
462
+ style: { "padding-top": "4px", "padding-bottom": "4px", "padding-left": "64px" }
463
+ }, {
464
+ prepend: w(() => [
465
+ _(x, {
466
+ "model-value": g(f.value),
467
+ "onUpdate:modelValue": (N) => D(f.value, N),
468
+ value: f.value,
469
+ disabled: f.disabled
470
+ }, null, 8, ["model-value", "onUpdate:modelValue", "value", "disabled"])
471
+ ]),
472
+ _: 2
473
+ }, 1032, ["label", "sublabel", "disabled", "onClick"])
474
+ ], 2))), 128))
475
+ ], 64))), 128)) : (c(), h(V, { key: 1 }, [
476
+ e.virtualScroll ? (c(), M(Je, {
477
+ key: 0,
478
+ length: y.value.length + v.value.length,
479
+ "item-height": 64,
480
+ scrollTop: K.value,
481
+ prerender: 100
482
+ }, {
483
+ default: w(({ getItem: a, index: f }) => {
484
+ var N, ve;
485
+ return [
486
+ f < y.value.length ? (c(), M(T, {
487
+ key: 0,
488
+ label: a(y.value).label,
489
+ sublabel: a(y.value).sublabel,
490
+ onClick: (j) => D(
491
+ a(y.value).value,
492
+ !g(a(y.value).value)
493
+ ),
494
+ disabled: (ve = Fe.value[(N = a(y.value).value) == null ? void 0 : N._id][0]) == null ? void 0 : ve.disabled,
495
+ style: G({
496
+ paddingTop: 4,
497
+ paddingBottom: 4,
498
+ paddingLeft: e.singleSelect === !0 ? 12 : 32
499
+ })
500
+ }, {
501
+ prepend: w(() => [
502
+ _(x, {
503
+ "model-value": g(a(y.value).value),
504
+ "onUpdate:modelValue": (j) => D(a(y.value).value, j),
505
+ value: a(y.value).value,
506
+ disabled: a(y.value).disabled
507
+ }, null, 8, ["model-value", "onUpdate:modelValue", "value", "disabled"])
508
+ ]),
509
+ append: w(() => {
510
+ var j;
511
+ return [
512
+ (j = a(y.value)) != null && j.tags ? (c(), h("div", sl, [
513
+ (c(!0), h(V, null, $(a(y.value).tags, (pe) => (c(), M(Be, {
514
+ key: pe.label,
515
+ label: pe,
516
+ compact: ""
517
+ }, null, 8, ["label"]))), 128))
518
+ ])) : O("", !0),
519
+ ke(e.$slots, "appendListItem", {
520
+ item: a(y.value)
521
+ }, void 0, !0)
522
+ ];
523
+ }),
524
+ _: 2
525
+ }, 1032, ["label", "sublabel", "onClick", "disabled", "style"])) : (c(), M(fe(v.value[f - y.value.length]), { key: 1 }))
526
+ ];
527
+ }),
528
+ _: 3
529
+ }, 8, ["length", "scrollTop"])) : (c(), h(V, { key: 1 }, [
530
+ (c(!0), h(V, null, $(y.value, (a) => (c(), h("div", {
531
+ key: a.value,
532
+ class: he([
533
+ "transition-all overflow-y-clip",
534
+ R({ value: a.value }) ? "max-h-0 opacity-0" : "max-h-[64px] opacity-100"
535
+ ])
536
+ }, [
537
+ _(T, {
538
+ label: a.label,
539
+ sublabel: a.sublabel,
540
+ onClick: (f) => D(a.value, !g(a.value)),
541
+ disabled: a.disabled,
542
+ style: G({
543
+ paddingTop: 4,
544
+ paddingBottom: 4,
545
+ paddingLeft: e.singleSelect === !0 ? 12 : 32
546
+ })
547
+ }, {
548
+ prepend: w(() => [
549
+ _(x, {
550
+ "model-value": g(a.value),
551
+ "onUpdate:modelValue": (f) => D(a.value, f),
552
+ value: a.value,
553
+ disabled: a.disabled
554
+ }, null, 8, ["model-value", "onUpdate:modelValue", "value", "disabled"])
555
+ ]),
556
+ _: 2
557
+ }, 1032, ["label", "sublabel", "onClick", "disabled", "style"])
558
+ ], 2))), 128)),
559
+ (c(!0), h(V, null, $(v.value, (a, f) => (c(), h("div", { key: f }, [
560
+ (c(), M(fe(a)))
561
+ ]))), 128))
562
+ ], 64))
563
+ ], 64))
564
+ ]),
565
+ _: 3
566
+ })) : (c(), h("div", al, ee(H(t)("inventory.formField.noItemsFound")), 1))
567
+ ]),
568
+ I("div", {
569
+ class: "sticky bottom-24",
570
+ style: G({ transform: `translateX(${(((ce = W.value) == null ? void 0 : ce.clientWidth) ?? 0) - 80}px)` })
571
+ }, [
572
+ _(Pe, { name: "fade" }, {
573
+ default: w(() => [
574
+ Te.value ? (c(), M(ue, {
575
+ key: 0,
576
+ variant: "fab",
577
+ class: "bg-white",
578
+ "text-color": "neutral-gray-400",
579
+ "prepend-icon": "keyboard_arrow_up",
580
+ onClick: l[4] || (l[4] = () => {
581
+ var a;
582
+ return (a = W.value) == null ? void 0 : a.scrollTo({ top: 0, behavior: "smooth" });
583
+ })
584
+ })) : O("", !0)
585
+ ]),
586
+ _: 1
587
+ })
588
+ ], 4)
589
+ ], 544);
590
+ };
591
+ }
592
+ }), fl = /* @__PURE__ */ We(nl, [["__scopeId", "data-v-6f532501"]]);
593
+ export {
594
+ U as F,
595
+ fl as a,
596
+ Qe as b
597
+ };