@feedmepos/mf-inventory-portal 0.0.22-dev.9 → 0.0.23-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 (163) hide show
  1. package/dist/App-Y3Ez8Rjf.js +255 -0
  2. package/dist/ApprovalView-BUU1G4Q2.js +141 -0
  3. package/dist/{BindingsDialog-GzX9Bo2g.js → BindingsDialog-8wc4Q0JQ.js} +13 -12
  4. package/dist/{BindingsPicker-SbOetc0-.js → BindingsPicker-DGWN1LQc.js} +19 -18
  5. package/dist/{BindingsTable-CAcE5y8U.js → BindingsTable-7NJP2jT6.js} +20 -16
  6. package/dist/ClosingTemplateView-9s7vmwaT.js +1833 -0
  7. package/dist/FmDroppableField-8RzKjEdL.js +154 -0
  8. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B4DDh9-a.js +267 -0
  9. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-5DINn0ZB.js +436 -0
  10. package/dist/FmMultiselectDialog-7hok9sJP.js +411 -0
  11. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-CxR1FCft.js +326 -0
  12. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-FQ0HjuL3.js +51 -0
  13. package/dist/IngredientGroupView-C3maHTCg.js +610 -0
  14. package/dist/IngredientsView-DCR3IBkR.js +1613 -0
  15. package/dist/IntegrationView-gO4h89Wj.js +1227 -0
  16. package/dist/InventoryBindingForm-dh3GeyG-.js +4 -0
  17. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CJuo3i7W.js +278 -0
  18. package/dist/InventoryBindingSummary-BPoPcEoe.js +75 -0
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1FCwvO8A.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-olm8sZKt.js} +1 -1
  20. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BezTV43V.js +116 -0
  21. package/dist/{PurchaseOrderPrintPreview-5HIWHR_f.js → PurchaseOrderPrintPreview-Dix_fIoo.js} +14 -13
  22. package/dist/ReceiveRequestView-DdPiYb2P.js +4082 -0
  23. package/dist/RecipeView-C4-a4IEW.js +597 -0
  24. package/dist/Standalone.vue.d.ts +2 -0
  25. package/dist/StockView-Du2txrIP.js +7778 -0
  26. package/dist/SupplierView-D_09FbQh.js +1474 -0
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C9MOos--.js +1144 -0
  28. package/dist/TransferTemplateView-j3CRy6Lc.js +1262 -0
  29. package/dist/{UnitView-BpU0Yk7X.js → UnitView-BXw2Vwq1.js} +30 -29
  30. package/dist/{WarehouseView-DqxWgogc.js → WarehouseView-CKamiETC.js} +205 -202
  31. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  32. package/dist/api/bill.d.ts +86 -240
  33. package/dist/api/closing-template.d.ts +6 -4
  34. package/dist/api/inventory.d.ts +281 -88
  35. package/dist/api/netsuite.d.ts +32 -1
  36. package/dist/api/purchase-order-template.d.ts +4 -2
  37. package/dist/api/supplier.d.ts +1 -0
  38. package/dist/app-GUbzqEtW.js +33456 -0
  39. package/dist/app.d.ts +259 -6
  40. package/dist/app.js +8 -7
  41. package/dist/array-hChJVZLE.js +43 -0
  42. package/dist/components/FmFilterableMenuOptions.vue.d.ts +54 -0
  43. package/dist/components/FmMinMaxInputRules.d.ts +2 -0
  44. package/dist/components/FmMultiselectDialog.vue.d.ts +3 -9
  45. package/dist/components/FmMultiselectDialogProps.d.ts +0 -2
  46. package/dist/components/FmUnitInputRules.d.ts +2 -0
  47. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
  48. package/dist/components/map/GoogleMap.vue.d.ts +4 -4
  49. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
  50. package/dist/components/shell/inventory/binding-ui.vue.d.ts +2 -2
  51. package/dist/date2-CLE9fB2R.js +117 -0
  52. package/dist/dayjs.min-CY1d38w7.js +282 -0
  53. package/dist/{decimal-DWbwRn_v.js → decimal-SIjO6Mjw.js} +1 -1
  54. package/dist/defineDeepModel-l40rX7kr.js +13 -0
  55. package/dist/extensions/array.d.ts +1 -0
  56. package/dist/feature-BXruKUhX.js +78 -0
  57. package/dist/{format-time-from-id-BnmaRuab.js → format-time-from-id-CcFsBXmk.js} +1 -1
  58. package/dist/format-unit-display-DEKg8cJm.js +1198 -0
  59. package/dist/fuzzy-CVOV9zJc.js +41 -0
  60. package/dist/googlemap-Dm8ERVai.js +97 -0
  61. package/dist/helper/rules.d.ts +7 -0
  62. package/dist/helper/rules.spec.d.ts +1 -0
  63. package/dist/helper/xlsx.util.d.ts +7 -0
  64. package/dist/index-BX5KZXhI.js +22279 -0
  65. package/dist/index-CVsyOEb1.js +10545 -0
  66. package/dist/index-m9e9nYfl.js +45 -0
  67. package/dist/netsuite-DAKRv7zr.js +146 -0
  68. package/dist/normalizeArguments-DP7Hrren.js +1552 -0
  69. package/dist/router/name.d.ts +1 -0
  70. package/dist/rules-DlnN8IP3.js +198 -0
  71. package/dist/stores/integration/foodmarkethub.d.ts +391 -0
  72. package/dist/stores/integration/index.d.ts +7 -0
  73. package/dist/stores/integration/netsuite.d.ts +102 -0
  74. package/dist/stores/inventory.d.ts +295 -9
  75. package/dist/stores/location.d.ts +508 -485
  76. package/dist/stores/supplier.d.ts +124 -4
  77. package/dist/stores/warehouse.d.ts +7 -4
  78. package/dist/style.css +1 -1
  79. package/dist/supplier-B21WlSAM.js +77 -0
  80. package/dist/tsconfig.app.tsbuildinfo +1 -1
  81. package/dist/use-inventory-binding-dialog-D3x6xj2O.js +95 -0
  82. package/dist/{use-template-enabled-locations-2-ClBq9FjN.js → use-template-enabled-locations-2-z-b-UXef.js} +9 -8
  83. package/dist/useTabStorage-BkIVScW_.js +25 -0
  84. package/dist/views/closing-template/closing-template-import/ClosingTemplateImport.vue.d.ts +2 -0
  85. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItem.vue.d.ts +12 -0
  86. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItemProps.d.ts +7 -0
  87. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
  88. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +877 -1002
  89. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +882 -1013
  90. package/dist/views/closing-template/helpers/import-export.helper.d.ts +58 -0
  91. package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +3 -0
  92. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +31 -0
  93. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +12 -0
  94. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +20 -0
  95. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +12 -0
  96. package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +24 -0
  97. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +215 -0
  98. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
  99. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
  100. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
  101. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
  102. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
  103. package/dist/views/integration/FoodMarketHub.vue.d.ts +2 -0
  104. package/dist/views/integration/NetSuite.vue.d.ts +2 -0
  105. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +7 -7
  106. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +7 -7
  107. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
  108. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +49 -0
  109. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +1913 -53
  110. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
  111. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -2
  112. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -1
  113. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +2370 -327
  114. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +2304 -261
  115. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -2
  116. package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
  117. package/dist/views/stock/components/StockRecordCard.vue.d.ts +43 -120
  118. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +34 -4
  119. package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
  120. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  121. package/dist/views/supplier/components/supplier-import/SupplierImport.vue.d.ts +2 -0
  122. package/dist/views/supplier/components/supplier-import/SupplierImportItem.vue.d.ts +12 -0
  123. package/dist/views/supplier/components/supplier-import/SupplierImportItemProps.d.ts +6 -0
  124. package/dist/views/supplier/composables/use-supplier-actions.d.ts +10 -0
  125. package/dist/views/supplier/helpers/import-export.helper.d.ts +50 -0
  126. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +0 -2
  127. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +0 -1
  128. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +71 -82
  129. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +38 -1
  130. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -1
  131. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
  132. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
  133. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
  134. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1279 -1528
  135. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +2207 -446
  136. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
  137. package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -251
  138. package/dist/views/transfer-template/helpers/template-item.error.helper.d.ts +1 -0
  139. package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
  140. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
  141. package/dist/{xlsx-DiOKvJ6l.js → xlsx-6mM1eNiL.js} +1525 -1525
  142. package/dist/xlsx.util-BLftcF4q.js +78 -0
  143. package/package.json +7 -4
  144. package/dist/ApprovalView-BPsScR5_.js +0 -129
  145. package/dist/ClosingTemplateView-DECwEnlK.js +0 -1066
  146. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnogYrRE.js +0 -372
  147. package/dist/IngredientsView-8fT1Ljd5.js +0 -1758
  148. package/dist/IntegrationView-CjGLRM78.js +0 -1141
  149. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-DlhNc8Vk.js +0 -88
  150. package/dist/ReceiveRequestView-CXZv8g5U.js +0 -215
  151. package/dist/RecipeView-sB0Lgmob.js +0 -581
  152. package/dist/StockView-CY2kNohB.js +0 -1892
  153. package/dist/SupplierView-DTqeZPts.js +0 -827
  154. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BBby29tW.js +0 -762
  155. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-ByNQap9n.js +0 -1498
  156. package/dist/TransferTemplateView-DkRVfAox.js +0 -1277
  157. package/dist/app-BuyAj4kw.js +0 -69068
  158. package/dist/defineDeepModel-DuVmbMwq.js +0 -13
  159. package/dist/id-to-date-CI5Vv0Ji.js +0 -30
  160. package/dist/purchase-order-transaction-type-DrFJFvtK.js +0 -676
  161. package/dist/stores/netsuite.d.ts +0 -49
  162. package/dist/supplier-BQyK2eSZ.js +0 -69
  163. package/dist/xlsx.util-CZ7zYxdP.js +0 -109
@@ -0,0 +1,411 @@
1
+ import { defineComponent as oe, computed as _, ref as C, watch as ne, openBlock as u, createElementBlock as v, normalizeStyle as A, Fragment as S, renderList as D, renderSlot as fe, createCommentVNode as M, onMounted as be, reactive as q, resolveComponent as w, createElementVNode as V, createVNode as c, toDisplayString as K, unref as B, createSlots as ye, withCtx as y, createBlock as L, normalizeClass as te, withModifiers as he, Transition as ge } from "vue";
2
+ import { useDialogChild as ke, useSnackbar as _e } from "@feedmepos/ui-library";
3
+ import { z as p } from "./app-GUbzqEtW.js";
4
+ import { f as xe } from "./fuzzy-CVOV9zJc.js";
5
+ import { d as Fe } from "./index-m9e9nYfl.js";
6
+ /* empty css */
7
+ import { useI18n as we } from "@feedmepos/mf-common";
8
+ import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ const Se = /* @__PURE__ */ oe({
10
+ __name: "VirtualScroll",
11
+ props: {
12
+ itemHeight: {},
13
+ length: {},
14
+ scrollTop: {},
15
+ prerender: {}
16
+ },
17
+ emits: ["changed:minHeight"],
18
+ setup(U, { emit: E }) {
19
+ const m = U, I = E, r = _(() => {
20
+ const d = m.itemHeight * m.length;
21
+ return I("changed:minHeight", d), `${d}px`;
22
+ }), $ = C(0), n = _(
23
+ () => Array.from({ length: m.prerender }).map((d, s) => s + $.value)
24
+ );
25
+ function P() {
26
+ $.value = Math.floor(m.scrollTop / m.itemHeight) - Math.floor(m.prerender / 2);
27
+ }
28
+ const h = C(Fe(P, 10));
29
+ ne([() => m.scrollTop], () => {
30
+ h.value();
31
+ });
32
+ function g(d) {
33
+ const s = d.el;
34
+ s && (s.style.opacity = "0", setTimeout(() => {
35
+ s.style.opacity = "1";
36
+ }, 0));
37
+ }
38
+ return (d, s) => (u(), v("div", {
39
+ class: "relative",
40
+ style: A({ minHeight: r.value })
41
+ }, [
42
+ (u(!0), v(S, null, D(n.value, (f) => (u(), v(S, { key: f }, [
43
+ f >= 0 && f < d.length ? (u(), v("div", {
44
+ key: 0,
45
+ class: "absolute w-full left-0 bg-white",
46
+ style: A({
47
+ top: `${d.itemHeight * f}px`,
48
+ height: `${d.itemHeight}px`,
49
+ transition: "opacity 0.5s ease"
50
+ }),
51
+ onVnodeMounted: g
52
+ }, [
53
+ fe(d.$slots, "default", {
54
+ key: f,
55
+ index: f,
56
+ getItem: (x) => x[f]
57
+ })
58
+ ], 4)) : M("", !0)
59
+ ], 64))), 128))
60
+ ], 4));
61
+ }
62
+ }), Ve = { class: "flex justify-between items-center sticky top-0 bg-white z-50" }, Te = {
63
+ key: 0,
64
+ class: "h-12 bg-white absolute top-[-12px] left-[-24px] w-lvw z-50",
65
+ style: { "max-width": "min(100vw - 48px, 560px)" }
66
+ }, Be = { class: "flex gap-16 basis-1/2" }, Ae = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ie = {
67
+ key: 0,
68
+ class: "flex items-center gap-8 justify-center py-32"
69
+ }, $e = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, He = {
70
+ key: 2,
71
+ class: "p-16 text-fm-color-typo-disabled fm-typo-en-body-lg-400 text-center"
72
+ }, ze = /* @__PURE__ */ oe({
73
+ __name: "FmMultiselectDialog",
74
+ props: {
75
+ modelValue: {},
76
+ items: {},
77
+ groups: {},
78
+ singleSelect: { type: Boolean },
79
+ placeholder: {},
80
+ showValidBorder: { type: Boolean },
81
+ maxHeight: {},
82
+ width: {},
83
+ noShadow: { type: Boolean },
84
+ loading: { type: Boolean },
85
+ virtualScroll: { type: Boolean }
86
+ },
87
+ emits: ["update:modelValue"],
88
+ setup(U, { emit: E }) {
89
+ var Q, R, Y;
90
+ const { t: m } = we(), I = ke(), r = U, $ = E, n = C(r.modelValue ?? []), P = _e();
91
+ be(() => {
92
+ var l, t, o, b;
93
+ I.emitData(n.value);
94
+ const e = (l = r.modelValue) != null && l.length ? r.items.findIndex((F) => {
95
+ var k;
96
+ return p(F.value, (k = r.modelValue) == null ? void 0 : k[0]);
97
+ }) : 0;
98
+ (t = z.value) == null || t.scrollTo({ top: e * 64 - 64, behavior: "smooth" }), (b = (o = O.value) == null ? void 0 : o.inputEl) == null || b.focus();
99
+ }), ne([() => n.value], ([e]) => {
100
+ I.emitData(e), $("update:modelValue", e);
101
+ });
102
+ function h(e) {
103
+ return !!n.value.find((l) => p(l, e));
104
+ }
105
+ function g(e, l) {
106
+ r.singleSelect && (n.value = l ? [] : [e]);
107
+ const t = h(e);
108
+ if (!(l && t || !l && !t))
109
+ if (l) {
110
+ const o = [...n.value, e];
111
+ n.value = o;
112
+ } else {
113
+ const o = n.value.filter((b) => !p(b, e));
114
+ n.value = o;
115
+ }
116
+ }
117
+ const d = C(""), s = _(() => {
118
+ const e = d.value.toLocaleLowerCase(), l = r.items;
119
+ return d.value ? xe.filter(e, l, {
120
+ pre: "|",
121
+ post: "|",
122
+ extract(o) {
123
+ return o.sublabel ? `${o.label}${o.sublabel}` : o.label;
124
+ }
125
+ }).map((o) => o.original) : l;
126
+ }), f = _(
127
+ () => n.value.filter((e) => s.value.find((l) => p(l.value, e)))
128
+ ), x = _(() => f.value.length === s.value.length), W = _(() => f.value.length > 0 && !x.value);
129
+ function se() {
130
+ if (s.value.length > 100) {
131
+ P.open({
132
+ title: "Too many items to select",
133
+ message: "Please use the filter to narrow down your search options."
134
+ });
135
+ return;
136
+ }
137
+ x.value ? n.value = n.value.filter(
138
+ (e) => !s.value.find((l) => p(l.value, e))
139
+ ) : n.value = r.items.filter(
140
+ (e) => n.value.find((l) => p(l, e.value)) || s.value.find((l) => p(l.value, e.value))
141
+ ).map((e) => e.value);
142
+ }
143
+ const ie = q(
144
+ ((Q = r.items) == null ? void 0 : Q.map((e) => ({ value: e.value, disabled: e.disabled ?? !1 }))) ?? []
145
+ );
146
+ function ue(e, l) {
147
+ return e.reduce(
148
+ (t, o) => {
149
+ const b = l(o);
150
+ return t[b] || (t[b] = []), t[b].push(o), t;
151
+ },
152
+ {}
153
+ );
154
+ }
155
+ const de = _(() => ue(ie, (e) => {
156
+ var l;
157
+ return (l = e.value) == null ? void 0 : l._id;
158
+ })), re = q(
159
+ ((R = r.items) == null ? void 0 : R.map((e) => ({ value: e.value, collapsed: e.collapsed ?? !1 }))) ?? []
160
+ ), G = q(
161
+ ((Y = r.groups) == null ? void 0 : Y.reduce(
162
+ (e, l) => (e[l.id] = l.collapse ?? !1, e),
163
+ {}
164
+ )) ?? {}
165
+ );
166
+ function N({ groupId: e, value: l }) {
167
+ var t;
168
+ return e && G[e] || ((t = re.find((o) => p(o.value, l))) == null ? void 0 : t.collapsed);
169
+ }
170
+ function ce(e) {
171
+ G[e] = !G[e];
172
+ }
173
+ function j(e) {
174
+ return r.items.filter((l) => l.groupId === e).map((l) => l.value).every((l) => n.value.find((t) => p(t, l)));
175
+ }
176
+ function X(e) {
177
+ return !j(e) && r.items.filter((t) => t.groupId === e).map((t) => t.value).some((t) => n.value.find((o) => p(o, t)));
178
+ }
179
+ function ve(e) {
180
+ const l = r.items.filter((t) => t.groupId === e).map((t) => t.value);
181
+ if (j(e))
182
+ n.value = n.value.filter((t) => !l.find((o) => p(t, o)));
183
+ else if (X(e))
184
+ for (const t of l)
185
+ n.value.find((o) => p(o, t)) || (n.value = [...n.value, t]);
186
+ else
187
+ n.value = [...n.value, ...l];
188
+ }
189
+ const H = C(0);
190
+ function J(e) {
191
+ var l;
192
+ H.value = ((l = e.target) == null ? void 0 : l.scrollTop) ?? H;
193
+ }
194
+ const me = _(() => H.value > 100), z = C(), O = C();
195
+ return (e, l) => {
196
+ var ee, le;
197
+ const t = w("FmIcon"), o = w("FmTextField"), b = w("FmCircularProgress"), F = w("FmCheckbox"), k = w("FmListItem"), Z = w("FmButton"), pe = w("FmList");
198
+ return u(), v("div", {
199
+ class: "relative max-h-[380px] overflow-y-auto overflow-x-hidden",
200
+ onScroll: J,
201
+ onScrollend: J,
202
+ ref_key: "scrollable",
203
+ ref: z
204
+ }, [
205
+ V("div", Ve, [
206
+ e.noShadow ? M("", !0) : (u(), v("div", Te)),
207
+ V("div", Be, [
208
+ c(t, { name: "autorenew" }),
209
+ V("span", Ae, K(B(m)("inventory.formField.itemsSelected", { count: ((ee = n.value) == null ? void 0 : ee.length) ?? 0 })), 1)
210
+ ]),
211
+ c(o, {
212
+ class: "basis-1/2",
213
+ modelValue: d.value,
214
+ "onUpdate:modelValue": l[1] || (l[1] = (a) => d.value = a),
215
+ "prepend-icon": "search",
216
+ placeholder: e.placeholder,
217
+ ref_key: "searchTextField",
218
+ ref: O
219
+ }, ye({ _: 2 }, [
220
+ d.value.length ? {
221
+ name: "append",
222
+ fn: y(() => [
223
+ c(t, {
224
+ class: "cursor-pointer",
225
+ name: "close",
226
+ onClick: l[0] || (l[0] = (a) => d.value = "")
227
+ })
228
+ ]),
229
+ key: "0"
230
+ } : void 0
231
+ ]), 1032, ["modelValue", "placeholder"])
232
+ ]),
233
+ V("div", null, [
234
+ e.loading ? (u(), v("div", Ie, [
235
+ c(b, {
236
+ size: "md",
237
+ color: "neutral-gray-400"
238
+ }),
239
+ V("div", $e, K(B(m)("inventory.formField.loading")), 1)
240
+ ])) : s.value.length ? (u(), L(pe, { key: 1 }, {
241
+ default: y(() => [
242
+ e.singleSelect ? M("", !0) : (u(), L(k, {
243
+ key: 0,
244
+ "model-value": x.value,
245
+ indeterminate: W.value,
246
+ value: "",
247
+ onClick: l[2] || (l[2] = (a) => se())
248
+ }, {
249
+ prepend: y(() => [
250
+ c(F, {
251
+ "model-value": x.value,
252
+ indeterminate: W.value,
253
+ label: x.value ? B(m)("inventory.formField.select.removeAll") : B(m)("inventory.formField.select.selectAll"),
254
+ value: ""
255
+ }, null, 8, ["model-value", "indeterminate", "label"])
256
+ ]),
257
+ _: 1
258
+ }, 8, ["model-value", "indeterminate"])),
259
+ e.groups ? (u(!0), v(S, { key: 2 }, D(e.groups, (a) => (u(), v(S, {
260
+ key: a.id
261
+ }, [
262
+ c(k, {
263
+ label: a.label,
264
+ sublabel: a.sublabel,
265
+ style: { "padding-top": "4px", "padding-bottom": "4px", "padding-left": "32px" },
266
+ disabled: a.disabled
267
+ }, {
268
+ prepend: y(() => [
269
+ c(F, {
270
+ "model-value": j(a.id),
271
+ indeterminate: X(a.id),
272
+ onClick: () => ve(a.id),
273
+ value: a.id,
274
+ disabled: a.disabled
275
+ }, null, 8, ["model-value", "indeterminate", "onClick", "value", "disabled"])
276
+ ]),
277
+ append: y(() => [
278
+ c(Z, {
279
+ "prepend-icon": N({ groupId: a.id }) ? "expand_less" : "expand_more",
280
+ size: "md",
281
+ variant: "tertiary",
282
+ onClick: he(() => ce(a.id), ["stop"])
283
+ }, null, 8, ["prepend-icon", "onClick"])
284
+ ]),
285
+ _: 2
286
+ }, 1032, ["label", "sublabel", "disabled"]),
287
+ (u(!0), v(S, null, D(s.value.filter((i) => i.groupId === a.id), (i) => (u(), v("div", {
288
+ key: i.value,
289
+ class: te([
290
+ "transition-all overflow-y-clip",
291
+ N({ groupId: a.id, value: i.value }) ? "max-h-0 opacity-0" : "max-h-[64px] opacity-100"
292
+ ])
293
+ }, [
294
+ c(k, {
295
+ label: i.label,
296
+ sublabel: i.sublabel,
297
+ disabled: i.disabled,
298
+ onClick: (T) => g(i.value, !h(i.value)),
299
+ style: { "padding-top": "4px", "padding-bottom": "4px", "padding-left": "64px" }
300
+ }, {
301
+ prepend: y(() => [
302
+ c(F, {
303
+ "model-value": h(i.value),
304
+ "onUpdate:modelValue": (T) => g(i.value, T),
305
+ value: i.value,
306
+ disabled: i.disabled
307
+ }, null, 8, ["model-value", "onUpdate:modelValue", "value", "disabled"])
308
+ ]),
309
+ _: 2
310
+ }, 1032, ["label", "sublabel", "disabled", "onClick"])
311
+ ], 2))), 128))
312
+ ], 64))), 128)) : (u(), v(S, { key: 1 }, [
313
+ e.virtualScroll ? (u(), L(Se, {
314
+ key: 0,
315
+ length: s.value.length,
316
+ "item-height": 64,
317
+ scrollTop: H.value,
318
+ prerender: 100
319
+ }, {
320
+ default: y(({ getItem: a }) => {
321
+ var i, T;
322
+ return [
323
+ c(k, {
324
+ label: a(s.value).label,
325
+ sublabel: a(s.value).sublabel,
326
+ onClick: (ae) => g(
327
+ a(s.value).value,
328
+ !h(a(s.value).value)
329
+ ),
330
+ disabled: (T = de.value[(i = a(s.value).value) == null ? void 0 : i._id][0]) == null ? void 0 : T.disabled,
331
+ style: A({
332
+ paddingTop: 4,
333
+ paddingBottom: 4,
334
+ paddingLeft: e.singleSelect === !0 ? 12 : 32
335
+ })
336
+ }, {
337
+ prepend: y(() => [
338
+ c(F, {
339
+ "model-value": h(a(s.value).value),
340
+ "onUpdate:modelValue": (ae) => g(a(s.value).value, ae),
341
+ value: a(s.value).value,
342
+ disabled: a(s.value).disabled
343
+ }, null, 8, ["model-value", "onUpdate:modelValue", "value", "disabled"])
344
+ ]),
345
+ _: 2
346
+ }, 1032, ["label", "sublabel", "onClick", "disabled", "style"])
347
+ ];
348
+ }),
349
+ _: 1
350
+ }, 8, ["length", "scrollTop"])) : (u(!0), v(S, { key: 1 }, D(s.value, (a) => (u(), v("div", {
351
+ key: a.value,
352
+ class: te([
353
+ "transition-all overflow-y-clip",
354
+ N({ value: a.value }) ? "max-h-0 opacity-0" : "max-h-[64px] opacity-100"
355
+ ])
356
+ }, [
357
+ c(k, {
358
+ label: a.label,
359
+ sublabel: a.sublabel,
360
+ onClick: (i) => g(a.value, !h(a.value)),
361
+ disabled: a.disabled,
362
+ style: A({
363
+ paddingTop: 4,
364
+ paddingBottom: 4,
365
+ paddingLeft: e.singleSelect === !0 ? 12 : 32
366
+ })
367
+ }, {
368
+ prepend: y(() => [
369
+ c(F, {
370
+ "model-value": h(a.value),
371
+ "onUpdate:modelValue": (i) => g(a.value, i),
372
+ value: a.value,
373
+ disabled: a.disabled
374
+ }, null, 8, ["model-value", "onUpdate:modelValue", "value", "disabled"])
375
+ ]),
376
+ _: 2
377
+ }, 1032, ["label", "sublabel", "onClick", "disabled", "style"])
378
+ ], 2))), 128))
379
+ ], 64))
380
+ ]),
381
+ _: 1
382
+ })) : (u(), v("div", He, K(B(m)("inventory.formField.noItemsFound")), 1))
383
+ ]),
384
+ V("div", {
385
+ class: "sticky bottom-24",
386
+ style: A({ transform: `translateX(${(((le = z.value) == null ? void 0 : le.clientWidth) ?? 0) - 80}px)` })
387
+ }, [
388
+ c(ge, { name: "fade" }, {
389
+ default: y(() => [
390
+ me.value ? (u(), L(Z, {
391
+ key: 0,
392
+ variant: "fab",
393
+ class: "bg-white",
394
+ "text-color": "neutral-gray-400",
395
+ "prepend-icon": "keyboard_arrow_up",
396
+ onClick: l[3] || (l[3] = () => {
397
+ var a;
398
+ return (a = z.value) == null ? void 0 : a.scrollTo({ top: 0, behavior: "smooth" });
399
+ })
400
+ })) : M("", !0)
401
+ ]),
402
+ _: 1
403
+ })
404
+ ], 4)
405
+ ], 544);
406
+ };
407
+ }
408
+ }), je = /* @__PURE__ */ Ce(ze, [["__scopeId", "data-v-1605e495"]]);
409
+ export {
410
+ je as F
411
+ };