@feedmepos/mf-inventory-portal 0.0.23-dev.30 → 0.0.23-dev.4

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 (100) hide show
  1. package/dist/{App-Brc7GX7l.js → App-DReDvY0M.js} +73 -85
  2. package/dist/{ApprovalView-CMRd7pcC.js → ApprovalView-BMZlYmRk.js} +27 -24
  3. package/dist/{BindingsDialog-DoakDtFI.js → BindingsDialog-Y2K4I7H7.js} +4 -4
  4. package/dist/{BindingsPicker-BC3rjqKw.js → BindingsPicker-DKBq9c37.js} +9 -8
  5. package/dist/{BindingsTable-xKRvhEV5.js → BindingsTable-45v4SDfp.js} +22 -18
  6. package/dist/{ClosingTemplateView-DFxLuV8k.js → ClosingTemplateView-CKJVYSbj.js} +286 -272
  7. package/dist/FmDroppableField-8RzKjEdL.js +154 -0
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DjGGEGQ9.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CMEOp-0r.js} +23 -22
  9. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js +436 -0
  10. package/dist/FmMultiselectDialog-D7YtdoyJ.js +415 -0
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DNEwc797.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js} +49 -48
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DlM-xGKh.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js} +5 -5
  13. package/dist/{IngredientGroupView-C4bL0O5L.js → IngredientGroupView-BuP-HGeg.js} +69 -63
  14. package/dist/IngredientsView-DMRN-odY.js +1613 -0
  15. package/dist/{IntegrationView-aSAeFNtp.js → IntegrationView-kYCaKG0o.js} +95 -92
  16. package/dist/{InventoryBindingForm-C7rIUyV1.js → InventoryBindingForm-BXHq4h-n.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ba6WLcom.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js} +27 -25
  18. package/dist/{InventoryBindingSummary-Ix92wSE6.js → InventoryBindingSummary-Bjasfc_v.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-6BUIvm7C.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Cd6LQ6Yz.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C3O3JebE.js} +24 -23
  21. package/dist/{PurchaseOrderPrintPreview-DJSF8YaR.js → PurchaseOrderPrintPreview-CmjkfTTS.js} +14 -13
  22. package/dist/{ReceiveRequestView-BUyShiP2.js → ReceiveRequestView-aQZJO8sq.js} +1302 -1325
  23. package/dist/{RecipeView-c0XB2_P8.js → RecipeView-DXO43tFi.js} +85 -79
  24. package/dist/{StockView-DNPNymCW.js → StockView-D9no-mrA.js} +1446 -1338
  25. package/dist/{SupplierView-Cz0hgito.js → SupplierView-DAx7E7sR.js} +787 -2325
  26. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCA0RUfu.js +1209 -0
  28. package/dist/TransferTemplateView-CfxdQF1t.js +1261 -0
  29. package/dist/{UnitView-BKWbaZfc.js → UnitView-CQPGZ8-r.js} +44 -40
  30. package/dist/{WarehouseView-BgE3teyT.js → WarehouseView-jy-RNCgy.js} +100 -94
  31. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  32. package/dist/api/closing.d.ts +0 -1
  33. package/dist/api/netsuite.d.ts +1 -1
  34. package/dist/app-KnSMkJBV.js +33496 -0
  35. package/dist/app.d.ts +0 -56
  36. package/dist/app.js +2 -2
  37. package/dist/components/FmMultiselectDialogProps.d.ts +0 -1
  38. package/dist/components/row-action.enum.d.ts +0 -1
  39. package/dist/composable/defineDeepModel.d.ts +1 -1
  40. package/dist/date2-CIeUqUIc.js +117 -0
  41. package/dist/dayjs.min-Df5jSnDJ.js +282 -0
  42. package/dist/{decimal-CZ3lFF__.js → decimal-BAc9M88Q.js} +1 -1
  43. package/dist/defineDeepModel-BfuQAIoM.js +13 -0
  44. package/dist/{feature-By_PNrnn.js → feature-dwB4OxRQ.js} +6 -12
  45. package/dist/format-time-from-id-BbvzyIN6.js +15 -0
  46. package/dist/{format-unit-display-ZlJT10zr.js → format-unit-display-BBWblJEt.js} +171 -162
  47. package/dist/fuzzy-B9ryZ9VZ.js +41 -0
  48. package/dist/index-BN0CY3sZ.js +22277 -0
  49. package/dist/index-Bj1fJum-.js +45 -0
  50. package/dist/index-C4yL_7rR.js +10545 -0
  51. package/dist/netsuite-ByWOS6tI.js +194 -0
  52. package/dist/normalizeArguments-DP7Hrren.js +1552 -0
  53. package/dist/router/name.d.ts +0 -2
  54. package/dist/row-action.enum-PMKMRrZR.js +50 -0
  55. package/dist/rules-C12nWDD1.js +198 -0
  56. package/dist/stores/feature.d.ts +0 -1
  57. package/dist/stores/integration/netsuite.d.ts +1 -69
  58. package/dist/stores/inventory.d.ts +4 -1
  59. package/dist/style.css +1 -1
  60. package/dist/{supplier-eaFF1izE.js → supplier-DJC0UZWv.js} +15 -15
  61. package/dist/tsconfig.app.tsbuildinfo +1 -1
  62. package/dist/{use-inventory-binding-dialog-14JW4t6q.js → use-inventory-binding-dialog-PEQbFRvO.js} +11 -10
  63. package/dist/use-template-enabled-locations-2-k9g5t8tt.js +86 -0
  64. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +192 -24
  65. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +193 -25
  66. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  67. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  68. package/dist/xlsx-B4XHad7S.js +24004 -0
  69. package/dist/xlsx.util-BSO4SHJi.js +78 -0
  70. package/package.json +3 -3
  71. package/dist/ClosingDraftView-DlaVbAHy.js +0 -1190
  72. package/dist/IngredientsView-CfS8FgxA.js +0 -1657
  73. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-ySR4KngR.js +0 -1227
  74. package/dist/TransferTemplateView-B7kzPdfT.js +0 -1264
  75. package/dist/api/adjustment-template.d.ts +0 -23
  76. package/dist/api/closing-draft.d.ts +0 -6
  77. package/dist/app-Bkg0JUKr.js +0 -84182
  78. package/dist/index-B4nO9Djl.js +0 -12087
  79. package/dist/stock-DNajb8lV.js +0 -125
  80. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +0 -2
  81. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +0 -18
  82. package/dist/views/adjustment-template/import/export.d.ts +0 -60
  83. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +0 -2
  84. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +0 -22
  85. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +0 -6
  86. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +0 -2
  87. package/dist/views/adjustment-template/wastage-template/actions.d.ts +0 -1295
  88. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +0 -16
  89. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +0 -35
  90. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +0 -20
  91. package/dist/views/adjustment-template/wastage-template/props.d.ts +0 -29
  92. package/dist/views/adjustment-template/wastage-template/table.d.ts +0 -1273
  93. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +0 -2
  94. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +0 -22
  95. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +0 -621
  96. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +0 -25
  97. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +0 -3621
  98. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +0 -1
  99. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +0 -19
  100. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +0 -4
@@ -0,0 +1,436 @@
1
+ import { reactive as W, onUnmounted as q, defineComponent as T, ref as H, computed as _, resolveComponent as k, openBlock as o, createElementBlock as w, Fragment as V, createElementVNode as f, normalizeClass as D, unref as g, toDisplayString as R, createCommentVNode as b, createBlock as d, withCtx as I, createVNode as M, renderList as S, renderSlot as G, Teleport as z, watch as J, mergeModels as K, useModel as P } from "vue";
2
+ import { useBreakpoints as Y } from "@feedmepos/ui-library";
3
+ import { u as j } from "./app-KnSMkJBV.js";
4
+ import { useCoreStore as X, useI18n as Q } from "@feedmepos/mf-common";
5
+ import { c as O } from "./date2-CIeUqUIc.js";
6
+ const N = W({});
7
+ function E() {
8
+ const v = `${Math.random()}`, l = new ResizeObserver((s) => {
9
+ const t = s.map((e) => e.target.scrollHeight).reduce((e, c) => e + c);
10
+ N[v] = t;
11
+ }), m = (s) => {
12
+ const t = s.el;
13
+ t && l.observe(t);
14
+ }, a = (s) => {
15
+ const t = s.el;
16
+ t && l.unobserve(t);
17
+ };
18
+ return q(() => {
19
+ l.disconnect(), delete N[v];
20
+ }), {
21
+ get tableHeight() {
22
+ return {
23
+ height: `calc(100dvh - ${Object.values(N).reduce((e, c) => e + c, 0) + 80}px)`
24
+ };
25
+ },
26
+ onMounted: m,
27
+ onUnmounted: a
28
+ };
29
+ }
30
+ const Z = {
31
+ key: 0,
32
+ class: /* @__PURE__ */ D(["text-fm-color-typo-secondary fm-typo-en-body-sm-400"])
33
+ }, ee = { class: "bg-white flex-1" }, ne = { class: "fixed bottom-96 right-16" }, ke = /* @__PURE__ */ T({
34
+ __name: "SingleColumnLayout",
35
+ props: {
36
+ actions: { default: () => [] },
37
+ title: { default: "Title" },
38
+ description: {},
39
+ showBackButton: { type: Boolean },
40
+ defaultPadding: { type: Boolean },
41
+ breadcrumbs: { default: () => [] },
42
+ usingBusinessHelperText: {}
43
+ },
44
+ emits: ["click:action"],
45
+ setup(v, { emit: l }) {
46
+ const m = v, a = l, s = H(!1), t = _(() => m.actions.find((y) => y.isPrimary)), e = _(() => m.actions.filter((y) => !y.isPrimary)), c = _(
47
+ () => e.value.map(
48
+ (y) => ({
49
+ label: y.label,
50
+ value: y.value
51
+ })
52
+ )
53
+ ), { breakpoints: p } = Y(), h = _(() => p.value.xs || p.value.sm), L = j(), n = _(() => L.businessLevel), B = E();
54
+ return (y, u) => {
55
+ const x = k("FmButton"), U = k("FmMenuItem"), i = k("FmMenu"), F = k("FmCollapsibleTabs"), C = k("FmBottomSheet");
56
+ return o(), w(V, null, [
57
+ f("div", {
58
+ class: D([
59
+ "flex flex-col w-full bg-white h-full",
60
+ {
61
+ "gap-12": h.value
62
+ }
63
+ ])
64
+ }, [
65
+ f("div", {
66
+ onVnodeMounted: u[5] || (u[5] = //@ts-ignore
67
+ (...r) => g(B).onMounted && g(B).onMounted(...r)),
68
+ class: D([
69
+ "flex gap-8 items-center",
70
+ {
71
+ "p-12 border-b-[1px] border-b-fm-color-neutral-gray-100": h.value,
72
+ "px-24 py-16": !h.value
73
+ }
74
+ ])
75
+ }, [
76
+ f("div", {
77
+ class: D([
78
+ "flex-1 flex flex-col gap-4 fm-typo-en-title-md-600 bg-white",
79
+ {
80
+ "py-12": h.value
81
+ }
82
+ ])
83
+ }, [
84
+ f("div", null, R(y.title), 1),
85
+ y.usingBusinessHelperText && n.value ? (o(), w("div", Z, R(y.usingBusinessHelperText), 1)) : b("", !0)
86
+ ], 2),
87
+ h.value ? (o(), w(V, { key: 0 }, [
88
+ e.value.length ? (o(), d(x, {
89
+ key: 0,
90
+ variant: "tertiary",
91
+ "prepend-icon": "more_vert",
92
+ onClick: u[0] || (u[0] = (r) => s.value = !0)
93
+ })) : b("", !0)
94
+ ], 64)) : (o(), w(V, { key: 1 }, [
95
+ e.value[0] ? (o(), d(x, {
96
+ key: e.value[0].value,
97
+ label: e.value[0].label,
98
+ "prepend-icon": e.value[0].prependIcon,
99
+ variant: e.value[0].variant,
100
+ "bg-color": e.value[0].variant ? void 0 : "neutral-gray-100",
101
+ "text-color": e.value[0].variant ? void 0 : "neutral-gray-400",
102
+ onClick: u[1] || (u[1] = (r) => a("click:action", e.value[0].value))
103
+ }, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
104
+ e.value[1] ? (o(), d(x, {
105
+ key: e.value[1].value,
106
+ label: e.value[1].label,
107
+ "prepend-icon": e.value[1].prependIcon,
108
+ variant: e.value[1].variant,
109
+ "bg-color": e.value[1].variant ? void 0 : "neutral-gray-100",
110
+ "text-color": e.value[1].variant ? void 0 : "neutral-gray-400",
111
+ onClick: u[2] || (u[2] = (r) => a("click:action", e.value[1].value))
112
+ }, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
113
+ e.value.length === 3 ? (o(), d(x, {
114
+ key: e.value[2].value,
115
+ label: e.value[2].label,
116
+ "prepend-icon": e.value[2].prependIcon,
117
+ variant: e.value[2].variant,
118
+ "bg-color": e.value[2].variant ? void 0 : "neutral-gray-100",
119
+ "text-color": e.value[2].variant ? void 0 : "neutral-gray-400",
120
+ onClick: u[3] || (u[3] = (r) => a("click:action", e.value[2].value))
121
+ }, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
122
+ e.value.length > 3 ? (o(), d(i, { key: 3 }, {
123
+ "menu-button": I(() => [
124
+ M(x, {
125
+ label: "More",
126
+ "append-icon": "expand_more",
127
+ "bg-color": "neutral-gray-100",
128
+ "text-color": "neutral-gray-400"
129
+ })
130
+ ]),
131
+ default: I(() => [
132
+ (o(!0), w(V, null, S(e.value.slice(2), (r, $) => (o(), d(U, {
133
+ key: $,
134
+ label: r.label,
135
+ onClick: (pe) => a("click:action", r.value)
136
+ }, null, 8, ["label", "onClick"]))), 128))
137
+ ]),
138
+ _: 1
139
+ })) : b("", !0),
140
+ t.value ? (o(), d(x, {
141
+ key: 4,
142
+ label: t.value.label,
143
+ "prepend-icon": t.value.prependIcon,
144
+ onClick: u[4] || (u[4] = (r) => a("click:action", t.value.value))
145
+ }, null, 8, ["label", "prepend-icon"])) : b("", !0)
146
+ ], 64))
147
+ ], 2),
148
+ f("div", ee, [
149
+ G(y.$slots, "default")
150
+ ])
151
+ ], 2),
152
+ t.value && h.value ? (o(), d(z, {
153
+ key: 0,
154
+ to: "body"
155
+ }, [
156
+ f("div", ne, [
157
+ M(x, {
158
+ label: t.value.label,
159
+ "prepend-icon": t.value.prependIcon,
160
+ onClick: u[6] || (u[6] = (r) => a("click:action", t.value.value)),
161
+ variant: "fab"
162
+ }, null, 8, ["label", "prepend-icon"])
163
+ ])
164
+ ])) : b("", !0),
165
+ e.value.length ? (o(), d(z, {
166
+ key: 1,
167
+ to: "body"
168
+ }, [
169
+ M(C, {
170
+ "dismiss-away": "",
171
+ "no-header": "",
172
+ modelValue: s.value,
173
+ "onUpdate:modelValue": u[8] || (u[8] = (r) => s.value = r)
174
+ }, {
175
+ default: I(() => [
176
+ M(F, {
177
+ class: "pb-8",
178
+ items: c.value,
179
+ "onUpdate:modelValue": u[7] || (u[7] = (r) => (a("click:action", r), s.value = !1))
180
+ }, null, 8, ["items"])
181
+ ]),
182
+ _: 1
183
+ }, 8, ["modelValue"])
184
+ ])) : b("", !0)
185
+ ], 64);
186
+ };
187
+ }
188
+ }), te = { class: "inline-flex" }, oe = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, le = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ae = { class: "relative" }, se = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, ue = /* @__PURE__ */ T({
189
+ __name: "ChangeLocationComponent",
190
+ props: {
191
+ showBusiness: { type: Boolean }
192
+ },
193
+ setup(v) {
194
+ const l = j(), m = X(), a = _(() => {
195
+ var n;
196
+ return (n = m.currentBusiness.value) == null ? void 0 : n.name;
197
+ }), { t: s } = Q(), t = H(""), e = _({
198
+ get() {
199
+ return l.businessLevel;
200
+ },
201
+ set(n) {
202
+ l.businessLevel = n;
203
+ }
204
+ }), c = _(
205
+ () => l.locations.map((n) => ({ label: n.name, value: n.dbName, type: n.type })).filter(
206
+ (n) => t.value ? n.label.toLocaleLowerCase().includes(t.value.toLocaleLowerCase()) : !0
207
+ )
208
+ ), p = _(
209
+ () => c.value.filter((n) => n.type === "restaurant")
210
+ ), h = _(
211
+ () => c.value.filter((n) => n.type === "warehouse")
212
+ );
213
+ function L({ value: n }) {
214
+ e.value = !1, l.selectLocation(l.locations.find((B) => B.dbName === n));
215
+ }
216
+ return (n, B) => {
217
+ const y = k("FmIcon"), u = k("FmSearch"), x = k("FmMenuItem"), U = k("FmMenu");
218
+ return o(), w("div", te, [
219
+ M(U, { "close-on-click": !0 }, {
220
+ "menu-button": I(() => {
221
+ var i;
222
+ return [
223
+ f("div", oe, [
224
+ M(y, {
225
+ name: n.showBusiness && e.value ? "store" : "storefront",
226
+ size: "sm"
227
+ }, null, 8, ["name"]),
228
+ f("div", le, R(n.showBusiness && e.value ? a.value : ((i = g(l)._currentLocation) == null ? void 0 : i.name) ?? g(s)("inventory.common.noLocationSelected")), 1),
229
+ M(y, {
230
+ name: "expand_more",
231
+ size: "sm"
232
+ })
233
+ ])
234
+ ];
235
+ }),
236
+ default: I(() => [
237
+ f("div", ae, [
238
+ f("div", se, [
239
+ M(u, {
240
+ "model-value": t.value,
241
+ "onUpdate:modelValue": B[0] || (B[0] = (i) => t.value = i),
242
+ placeholder: g(s)("inventory.common.table.toolbar.filterItems")
243
+ }, null, 8, ["model-value", "placeholder"])
244
+ ]),
245
+ f("div", null, [
246
+ n.showBusiness ? (o(), d(x, {
247
+ key: 0,
248
+ "model-value": e.value,
249
+ label: a.value,
250
+ sublabel: "Business",
251
+ onClick: B[1] || (B[1] = (i) => e.value = !0)
252
+ }, null, 8, ["model-value", "label"])) : b("", !0),
253
+ (o(!0), w(V, null, S(p.value, (i) => {
254
+ var F;
255
+ return o(), d(x, {
256
+ key: i.value,
257
+ "model-value": !e.value && ((F = g(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
258
+ label: i.label,
259
+ sublabel: "Restaurant",
260
+ onClick: (C) => L(i),
261
+ onVnodeMounted: (C) => {
262
+ var r, $;
263
+ return !e.value && ((r = g(l)._currentLocation) == null ? void 0 : r.dbName) === i.value && (($ = C.el) == null || $.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
264
+ }
265
+ }, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
266
+ }), 128)),
267
+ (o(!0), w(V, null, S(h.value, (i) => {
268
+ var F;
269
+ return o(), d(x, {
270
+ key: i.value,
271
+ "model-value": !e.value && ((F = g(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
272
+ label: i.label,
273
+ sublabel: "Warehouse",
274
+ onClick: (C) => L(i),
275
+ onVnodeMounted: (C) => {
276
+ var r, $;
277
+ return !e.value && ((r = g(l)._currentLocation) == null ? void 0 : r.dbName) === i.value && (($ = C.el) == null || $.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
278
+ }
279
+ }, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
280
+ }), 128)),
281
+ !n.showBusiness && !p.value.length && !h.value.length ? (o(), d(x, {
282
+ key: 1,
283
+ disabled: "",
284
+ label: g(s)("inventory.common.noResultFound")
285
+ }, null, 8, ["label"])) : b("", !0)
286
+ ])
287
+ ])
288
+ ]),
289
+ _: 1
290
+ })
291
+ ]);
292
+ };
293
+ }
294
+ });
295
+ function xe() {
296
+ const v = /* @__PURE__ */ new Date();
297
+ return v.setDate(v.getDate() - 15), {
298
+ start: v,
299
+ end: /* @__PURE__ */ new Date()
300
+ };
301
+ }
302
+ function A(v = 15) {
303
+ const l = /* @__PURE__ */ new Date();
304
+ l.setDate(l.getDate() - v);
305
+ const m = l, a = /* @__PURE__ */ new Date();
306
+ return {
307
+ startDate: `${O(m)}`,
308
+ endDate: `${O(a)}`
309
+ };
310
+ }
311
+ const re = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, ie = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ce = /* @__PURE__ */ T({
312
+ __name: "FmDateRangePickerChip",
313
+ props: {
314
+ modelValue: { default: (v) => v.modelValue ?? A() }
315
+ },
316
+ emits: ["update:modelValue"],
317
+ setup(v, { emit: l }) {
318
+ const m = l, a = H(A());
319
+ J(a, (t) => {
320
+ m("update:modelValue", t);
321
+ });
322
+ const s = _(() => {
323
+ const { startDate: t, endDate: e } = a.value;
324
+ return !t && !e ? "" : `${t} - ${e}`;
325
+ });
326
+ return (t, e) => {
327
+ const c = k("FmIcon"), p = k("FmDateRangePicker");
328
+ return o(), d(p, {
329
+ "show-predefined-range": "",
330
+ modelValue: a.value,
331
+ "onUpdate:modelValue": e[0] || (e[0] = (h) => a.value = h),
332
+ "start-label": "",
333
+ "end-label": ""
334
+ }, {
335
+ "trigger-button": I(() => [
336
+ f("div", re, [
337
+ M(c, {
338
+ name: "calendar_month",
339
+ size: "sm"
340
+ }),
341
+ f("div", ie, R(s.value), 1)
342
+ ])
343
+ ]),
344
+ _: 1
345
+ }, 8, ["modelValue"]);
346
+ };
347
+ }
348
+ }), de = { class: "flex-1 w-full flex items-center gap-4" }, ve = {
349
+ key: 0,
350
+ class: "flex-1"
351
+ }, me = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, _e = /* @__PURE__ */ T({
352
+ __name: "FmInventoryTableToolbar",
353
+ props: /* @__PURE__ */ K({
354
+ dateRangeQuery: { type: Boolean },
355
+ changeLocation: { type: Boolean },
356
+ searchable: { type: Boolean },
357
+ actions: {},
358
+ usingBusinessHelperText: {},
359
+ showBusiness: { type: Boolean }
360
+ }, {
361
+ search: {},
362
+ searchModifiers: {},
363
+ dateRange: {},
364
+ dateRangeModifiers: {}
365
+ }),
366
+ emits: ["update:search", "update:dateRange"],
367
+ setup(v) {
368
+ const { breakpoints: l } = Y(), m = _(() => l.value.xs || l.value.sm), a = P(v, "search"), s = P(v, "dateRange"), { t } = Q(), e = E();
369
+ return (c, p) => {
370
+ const h = k("FmTextField"), L = k("FmButton");
371
+ return o(), w("div", {
372
+ class: "flex flex-col gap-8",
373
+ onVnodeMounted: p[2] || (p[2] = //@ts-ignore
374
+ (...n) => g(e).onMounted && g(e).onMounted(...n)),
375
+ onVnodeUnmounted: p[3] || (p[3] = //@ts-ignore
376
+ (...n) => g(e).onUnmounted && g(e).onUnmounted(...n))
377
+ }, [
378
+ f("div", {
379
+ class: D([
380
+ "flex gap-8 items-center",
381
+ {
382
+ "px-8 flex-col-reverse h-[unset]": m.value,
383
+ "h-48": !m.value
384
+ }
385
+ ])
386
+ }, [
387
+ c.changeLocation || c.dateRangeQuery ? (o(), w("div", {
388
+ key: 0,
389
+ class: D([
390
+ "flex gap-8 items-center",
391
+ {
392
+ "w-full overflow-x-auto": m.value
393
+ }
394
+ ])
395
+ }, [
396
+ c.changeLocation ? (o(), d(ue, {
397
+ key: 0,
398
+ "show-business": c.showBusiness
399
+ }, null, 8, ["show-business"])) : b("", !0),
400
+ c.dateRangeQuery ? (o(), d(ce, {
401
+ key: 1,
402
+ "model-value": s.value,
403
+ "onUpdate:modelValue": p[0] || (p[0] = (n) => s.value = n)
404
+ }, null, 8, ["model-value"])) : b("", !0)
405
+ ], 2)) : b("", !0),
406
+ f("div", de, [
407
+ m.value ? b("", !0) : (o(), w("div", ve)),
408
+ f("div", me, [
409
+ c.searchable ? (o(), d(h, {
410
+ key: 0,
411
+ "model-value": a.value,
412
+ "onUpdate:modelValue": p[1] || (p[1] = (n) => a.value = n),
413
+ "prepend-icon": "search",
414
+ placeholder: g(t)("inventory.common.table.toolbar.filterItems"),
415
+ class: "w-full"
416
+ }, null, 8, ["model-value", "placeholder"])) : b("", !0)
417
+ ]),
418
+ (o(!0), w(V, null, S(c.actions, (n, B) => (o(), d(L, {
419
+ key: B,
420
+ variant: "tertiary",
421
+ "prepend-icon": n.icon,
422
+ onClick: n.onClick
423
+ }, null, 8, ["prepend-icon", "onClick"]))), 128))
424
+ ])
425
+ ], 2)
426
+ ], 512);
427
+ };
428
+ }
429
+ });
430
+ export {
431
+ ke as _,
432
+ _e as a,
433
+ xe as b,
434
+ A as i,
435
+ E as u
436
+ };