@feedmepos/mf-inventory-portal 1.2.49 → 1.2.50-dev.2

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 (91) hide show
  1. package/dist/{App-w_Dbl-jn.js → App-DAO7XF9h.js} +72 -68
  2. package/dist/{ApprovalView-CuOM9Ych.js → ApprovalView-BUHefc15.js} +34 -34
  3. package/dist/{BindingsDialog-DkMSnr51.js → BindingsDialog-Cx9ngX7X.js} +2 -2
  4. package/dist/{BindingsPicker-DrXdWUTh.js → BindingsPicker-CIZ9FVgv.js} +2 -2
  5. package/dist/{BindingsTable-Bj0eBYdU.js → BindingsTable-CMyZkvyn.js} +4 -4
  6. package/dist/{ClosingDraftView-D1oohB8Y.js → ClosingDraftView-D4CMfSvf.js} +19 -18
  7. package/dist/{ClosingHistoryView-BCYNhLDg.js → ClosingHistoryView-J_2EA-F4.js} +3 -3
  8. package/dist/{ClosingTemplateView-DIvZkCgT.js → ClosingTemplateView-Bz21bJLn.js} +18 -17
  9. package/dist/{DeliveryOrderPrintPreview-C83_a-LI.js → DeliveryOrderPrintPreview-D9xRJSBT.js} +1 -1
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bmas1qkC.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ifkxhq6-.js} +4 -4
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CQ_Er40u.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BcJ1ydJ1.js} +12 -12
  12. package/dist/FmMultiselectDialog-B5F93-xV.js +621 -0
  13. package/dist/{FmMultiselectDialog-BtvZkE6p.js → FmMultiselectDialog-Cxj6_Bbq.js} +1 -1
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BN9OeQF3.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CJsg-6qm.js} +3 -3
  15. package/dist/{ImportView-CRdvYxW3.js → ImportView-mq9p_YKN.js} +7 -7
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D6J1wcU6.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CvdNblLJ.js} +1 -1
  17. package/dist/{IngredientGroupView-DCdnjh-f.js → IngredientGroupView-1YQdweWW.js} +108 -107
  18. package/dist/{IngredientsView-DhZadYV8.js → IngredientsView-rZZDO37M.js} +126 -125
  19. package/dist/{IntegrationView-B_D6Sgj-.js → IntegrationView-0KCNTL9w.js} +80 -80
  20. package/dist/{InventoryBindingForm-CM47I9t9.js → InventoryBindingForm-Cz6tMVlQ.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BYKUWI9e.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-9jHxMOEn.js} +4 -4
  22. package/dist/{InventoryBindingSummary-BSuJMrFU.js → InventoryBindingSummary-DarjH7Dn.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9TTwcC8s.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BR6U0SpT.js} +1 -1
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D2vWMBZF.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C9ffyR0d.js} +2 -2
  25. package/dist/{PublishView-DxhE5g9_.js → PublishView-Bam4W7ko.js} +3 -3
  26. package/dist/{PurchaseOrderPrintPreview-BzIwRI7z.js → PurchaseOrderPrintPreview-DEKkUMB6.js} +1 -1
  27. package/dist/ReceiveRequestView-DDfHVcG2.js +3028 -0
  28. package/dist/{RecipeView-Azx2MoPR.js → RecipeView-CwwKtDRg.js} +83 -82
  29. package/dist/{StockView-D51RBHWQ.js → StockView-CVN5MKbj.js} +113 -112
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-R0yauCbz.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bm1MxmBR.js} +1 -1
  31. package/dist/{SupplierView-BeHjJ0xJ.js → SupplierView-BhnmPv7N.js} +28 -27
  32. package/dist/SurchargeView-nlkL3YIK.js +460 -0
  33. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DG1p3Rim.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DdPVsOZY.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-cPIomfPb.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bp49G_dV.js} +13 -13
  36. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BZR_EozX.js → TransferDetails.vue_vue_type_script_setup_true_lang-BQFBZ0CH.js} +15 -15
  37. package/dist/{TransferTemplateView-BwdhVKO4.js → TransferTemplateView-7AJGTAAy.js} +16 -16
  38. package/dist/{UnitView-BT23dBtV.js → UnitView-Dz4bgzmW.js} +20 -19
  39. package/dist/{WarehouseView-PWigQlHk.js → WarehouseView-DEYOa_Ol.js} +21 -20
  40. package/dist/{WastageTemplateView-BGO19Pux.js → WastageTemplateView-DdPkFfyQ.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-DiX-EfV6.js +8167 -0
  44. package/dist/{app-C0a15lwm.js → app-kim0oKgm.js} +4511 -4408
  45. package/dist/app.d.ts +52 -0
  46. package/dist/app.js +1 -1
  47. package/dist/{closing-template-C9jSN68K.js → closing-template-MLHUWgwA.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-DND2dkpu.js → date2-Ck1fxOS1.js} +1 -1
  52. package/dist/{dayjs.min-CvewwBuM.js → dayjs.min-CgHxLw1P.js} +1 -1
  53. package/dist/{decimal-C11049RC.js → decimal-DVjzMCmx.js} +2 -2
  54. package/dist/{defineDeepModel-BYmk9G2K.js → defineDeepModel-CLo1ie3w.js} +1 -1
  55. package/dist/{duplicate-template-CJLrmGdo.js → duplicate-template-B_f_fYhs.js} +1 -1
  56. package/dist/{feature-D2GGGVQh.js → feature-D4HcMaGK.js} +3442 -2812
  57. package/dist/{format-time-from-id-DuUqVP8F.js → format-time-from-id-CwtHJpC0.js} +1 -1
  58. package/dist/{format-unit-display-BwBGMuCk.js → format-unit-display-DRIOlVir.js} +11 -11
  59. package/dist/{import-export.helper-ejk_vT2V.js → import-export.helper-BrcydEPI.js} +5 -5
  60. package/dist/{index-D65a-5cn.js → index-ChruXaud.js} +1 -1
  61. package/dist/{index-Cy-YW3O0.js → index-D9dtwK1d.js} +1 -1
  62. package/dist/{index-C9F5LU0v.js → index-Wd74fJNj.js} +3 -3
  63. package/dist/{lodash-DNLSknxF.js → lodash-MkfFbMhZ.js} +1 -1
  64. package/dist/netsuite-D4cXyIr7.js +5402 -0
  65. package/dist/{purchase-order-template-C7J9I7o4.js → purchase-order-template-BdKUiSPI.js} +1 -1
  66. package/dist/router/name.d.ts +1 -0
  67. package/dist/{rules-DQNuaKK6.js → rules-KSzt3qOJ.js} +3 -3
  68. package/dist/{stock-bYU0NTHD.js → stock-BHWNLsBc.js} +1 -1
  69. package/dist/{stock-1aynIWpi.js → stock-DZliLQNR.js} +3 -3
  70. package/dist/stores/integration/netsuite.d.ts +5 -0
  71. package/dist/stores/surcharge.d.ts +18 -0
  72. package/dist/style.css +1 -1
  73. package/dist/{supplier-B72SAF3j.js → supplier-CiMOpHKx.js} +2 -2
  74. package/dist/surcharge-CjdNdcm1.js +71 -0
  75. package/dist/tsconfig.app.tsbuildinfo +1 -1
  76. package/dist/{use-ingredient-select-dialog-DO20RWUv.js → use-ingredient-select-dialog-CK_Ldhwm.js} +2 -2
  77. package/dist/{use-inventory-binding-dialog-R2VQakMR.js → use-inventory-binding-dialog-jfME3m3c.js} +2 -2
  78. package/dist/{use-template-enabled-locations-2-C7L_vyIF.js → use-template-enabled-locations-2-Dbk_RoRj.js} +2 -2
  79. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +714 -0
  80. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +5 -0
  81. package/dist/views/surcharge/SurchargeView.vue.d.ts +2 -0
  82. package/dist/vue-i18n-DUlOMRWF.js +2365 -0
  83. package/dist/{xlsx-DZcSBj-s.js → xlsx-CiNXr9Ie.js} +1 -1
  84. package/dist/{xlsx.util-DMCjqrHn.js → xlsx.util-D81JjCsx.js} +1 -1
  85. package/package.json +2 -2
  86. package/dist/FmMultiselectDialog-IU5C9o_F.js +0 -598
  87. package/dist/ReceiveRequestView-C5wqi0jE.js +0 -2913
  88. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js +0 -162
  89. package/dist/app-uBuHtW8m.js +0 -8127
  90. package/dist/netsuite-TqUeqkqw.js +0 -5131
  91. package/dist/vue-i18n-BLzLoy1U.js +0 -2365
@@ -1,598 +0,0 @@
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-C0a15lwm.js";
7
- import { d as Ne } from "./index-Cy-YW3O0.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
- };