@feedmepos/mf-inventory-portal 1.8.0-dev.19 → 1.8.0-dev.20

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 (120) hide show
  1. package/dist/{App-BXDscpMf.js → App-5GYyCfFq.js} +9 -9
  2. package/dist/{ApprovalView-CbP2H_8q.js → ApprovalView-DY1ayl1W.js} +9 -9
  3. package/dist/{BindingsDialog-C7OFDUAr.js → BindingsDialog-Dm7uKMfV.js} +2 -2
  4. package/dist/{BindingsPicker-BQjHQWPl.js → BindingsPicker-DhnMlj4x.js} +2 -2
  5. package/dist/{BindingsTable-grJZdI5F.js → BindingsTable-Cxibcjka.js} +4 -4
  6. package/dist/{BulkReceiveRequestPage-jZtPq5XF.js → BulkReceiveRequestPage-w4AA6BxB.js} +21 -21
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DOgwkHnO.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B3ESPbQp.js} +1 -1
  8. package/dist/{ClosingDraftView-UmNAyX_s.js → ClosingDraftView-DMaONEZ7.js} +19 -19
  9. package/dist/{ClosingHistoryView-CZcOYK98.js → ClosingHistoryView-BBYruOux.js} +7 -7
  10. package/dist/{ClosingTemplateView-CP2-ib2S.js → ClosingTemplateView-DcwgokRl.js} +18 -18
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DYZjiuAH.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-a72IldDO.js} +1 -1
  12. package/dist/{DefaultView-DOa4PWSU.js → DefaultView-BVr_7JDn.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-DtFuSUby.js → DeliveryOrderPrintPreview-BXZFD3D5.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-CxsxIwZm.js → EmailDialog.vue_vue_type_script_setup_true_lang-Dne_9P3j.js} +25 -25
  15. package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-B3mPB7-O.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CYkPbFSA.js} +1 -1
  16. package/dist/FeatureCapabilityGate-DK_rTVyJ.js +82 -0
  17. package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-O58GGptu.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-DIhV51l7.js} +1 -1
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CCrEBis5.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B80EHMBT.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-YGOFZ7uY.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C94IFGoH.js} +2 -2
  20. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-F36jHbKZ.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-COZPDuAM.js} +2 -2
  21. package/dist/{FmMultiselectDialog-BDCQmCSh.js → FmMultiselectDialog-C1P22sj2.js} +2 -2
  22. package/dist/{FmMultiselectDialog-Dd9oKz5m.js → FmMultiselectDialog-Kb3IftHf.js} +2 -2
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CUmlLKDV.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BqB71yfu.js} +5 -5
  24. package/dist/ImportView-EJ4u8NHM.js +1540 -0
  25. package/dist/{IngredientsView-Bcxo5AlS.js → IngredientsView-Bxsgm4E7.js} +15 -15
  26. package/dist/{IntegrationExplorerView-C2jsPi_3.js → IntegrationExplorerView-owEaOVeG.js} +6 -6
  27. package/dist/{IntegrationPlatformView-Cr7Fyt4p.js → IntegrationPlatformView-BuptPyjg.js} +2 -2
  28. package/dist/{IntegrationView-BTcnK-_q.js → IntegrationView-DAcdY_d_.js} +14 -14
  29. package/dist/{InventoryBindingForm-e1rSW4FA.js → InventoryBindingForm-BvjY4zrn.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BjDz4LFE.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhbF-jgN.js} +4 -4
  31. package/dist/{InventoryBindingSummary-CAGMRuy4.js → InventoryBindingSummary-DPqm94GX.js} +1 -1
  32. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-eygCK9vN.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DDsigNJ4.js} +2 -2
  33. package/dist/{ProductionRunDetailPage-CQz-U7Sw.js → ProductionRunDetailPage-BaPCJUqT.js} +4 -4
  34. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BtnKFZy2.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CNRX3MYt.js} +8 -8
  35. package/dist/{ProductionRunPage-BZnmoyLo.js → ProductionRunPage-B6Jsv9Hh.js} +4 -4
  36. package/dist/{PublishView-BJFoRmsD.js → PublishView-DonUv6nP.js} +3 -3
  37. package/dist/{PurchaseOrderPrintPreview-BQExGk_A.js → PurchaseOrderPrintPreview-CK3Cqdwp.js} +2 -2
  38. package/dist/{ReceiveRequestView-C4XUYhl5.js → ReceiveRequestView-CMAnKxzm.js} +13 -13
  39. package/dist/RecipeView-Bx13Bckq.js +3272 -0
  40. package/dist/{SettingsView-BDogzqxV.js → SettingsView-D1MiAkD8.js} +397 -425
  41. package/dist/StockView-CsxTjVEd.js +3003 -0
  42. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Ce82k1-V.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BT73j9SA.js} +1 -1
  43. package/dist/{SupplierView-DRSh4m07.js → SupplierView-CFACoZya.js} +13 -13
  44. package/dist/{SurchargeView-gNIDCY22.js → SurchargeView-CShhZa3x.js} +7 -7
  45. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DrP1vAZX.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-B2OdmdI_.js} +2 -2
  46. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Cxpc2Wtp.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-x3N2Oypo.js} +1 -1
  47. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D4kpyIAQ.js → TransferDetails.vue_vue_type_script_setup_true_lang-BISmGBJE.js} +517 -517
  48. package/dist/{TransferTemplateView-adEB_aZg.js → TransferTemplateView-kx2IPqEv.js} +19 -19
  49. package/dist/{UnitCostHistoryView-ClgafUAg.js → UnitCostHistoryView-DgPWsXaB.js} +4 -4
  50. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DpN-7H9P.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BtfJJgIP.js} +4 -4
  51. package/dist/{UnitView-DU-Kim1r.js → UnitView-aupXLRMk.js} +7 -7
  52. package/dist/{WarehouseView-Dw1xkcrx.js → WarehouseView-MTvbY4n4.js} +8 -8
  53. package/dist/{WastageTemplateView-CQj821yg.js → WastageTemplateView-Bs9HL-LK.js} +15 -15
  54. package/dist/api/bill.d.ts +4 -2
  55. package/dist/api/bill.spec.d.ts +1 -0
  56. package/dist/api/closing.d.ts +1 -0
  57. package/dist/api/feature-flags.d.ts +2 -0
  58. package/dist/api/license.d.ts +0 -1
  59. package/dist/api/stock.d.ts +1 -1
  60. package/dist/{app--e70sT_h.js → app-D38sV2ls.js} +2286 -2147
  61. package/dist/app.d.ts +92 -8
  62. package/dist/app.js +1 -1
  63. package/dist/bulk-edit-simulation.helper-DgniL8FN.js +178 -0
  64. package/dist/{closing-template-i0bDCk-x.js → closing-template-D_NAj_mU.js} +1 -1
  65. package/dist/{date2-CXI-d_rQ.js → date2-CvgxwuM1.js} +1 -1
  66. package/dist/{dayjs.min-Ivf4HAC3.js → dayjs.min-BOKV8T5Q.js} +1 -1
  67. package/dist/{decimal-d3XWw4d_.js → decimal-5xyg1WLu.js} +2 -2
  68. package/dist/{defineDeepModel-DrQmqGvi.js → defineDeepModel-BwB9XcMu.js} +1 -1
  69. package/dist/{duplicate-template-yVd6JWGz.js → duplicate-template-DvIgjm4K.js} +1 -1
  70. package/dist/{feature-CBrHj9bO.js → feature-CsPbMoeJ.js} +231 -221
  71. package/dist/{format-time-from-id-DpFUCBGw.js → format-time-from-id-DD6Ik9EK.js} +1 -1
  72. package/dist/{format-unit-display-CICNepRU.js → format-unit-display-DG564AN3.js} +12 -12
  73. package/dist/helper/country.spec.d.ts +1 -0
  74. package/dist/{id-to-date-BicEvFx1.js → id-to-date-DoN7OM21.js} +1 -1
  75. package/dist/{import-export.helper-Cy-nm8Ao.js → import-export.helper-CevBRFTZ.js} +6 -5
  76. package/dist/{index-CiWNQMAX.js → index-BIh1oTQH.js} +3 -3
  77. package/dist/{index-BfY6L-3r.js → index-BP3Avix6.js} +1 -1
  78. package/dist/{index-W7Q7cZGV.js → index-mzXhLwrZ.js} +1 -1
  79. package/dist/{lz-string-ClJ0qg4U.js → lz-string-DMjWYCk6.js} +1 -1
  80. package/dist/{netsuite-jSt2nlwO.js → netsuite-ZtoZBFBX.js} +2 -2
  81. package/dist/{netsuite-explorer-BWrO3KfB.js → netsuite-explorer-h_vID_ao.js} +1 -1
  82. package/dist/{predefined-templates-DKiqLY6F.js → predefined-templates-CdurFRJ4.js} +1 -1
  83. package/dist/{purchase-order-template-D-NkhbNh.js → purchase-order-template-BVdCftEo.js} +1 -1
  84. package/dist/{recalculationUtils-Bbe1w-wj.js → recalculationUtils-DBG8HGiJ.js} +1 -1
  85. package/dist/{row-action.enum-C8JhgYiR.js → row-action.enum-CGyAg4dC.js} +1 -1
  86. package/dist/{rules-CrAeAKSS.js → rules-DbFiOzUd.js} +3 -3
  87. package/dist/{stock-x072pQVW.js → stock-BATH4SoA.js} +1 -1
  88. package/dist/{stock-B27nWQ5z.js → stock-DXxsDPEO.js} +2 -2
  89. package/dist/stores/feature.d.ts +4 -0
  90. package/dist/style.css +1 -1
  91. package/dist/{supplier-sh98cdAW.js → supplier-CKXQmBZn.js} +2 -2
  92. package/dist/{surcharge-DsF53Jiz.js → surcharge-qupRJjjO.js} +1 -1
  93. package/dist/tsconfig.app.tsbuildinfo +1 -1
  94. package/dist/{uom-rules-DuYrxEZK.js → uom-rules-ALtgjANX.js} +1 -1
  95. package/dist/{use-ingredient-select-dialog-DZJPaYJX.js → use-ingredient-select-dialog-C1sJpjfV.js} +2 -2
  96. package/dist/{use-inventory-binding-dialog-CEr-Nctj.js → use-inventory-binding-dialog-tl7-epun.js} +2 -2
  97. package/dist/{use-template-enabled-locations-h-1Om4op.js → use-template-enabled-locations-DWk2ndDC.js} +2 -2
  98. package/dist/{use-transfer-locations-CuCYcO6G.js → use-transfer-locations-CsdYY996.js} +2 -2
  99. package/dist/{useHrmPermission-Db-rrPU-.js → useHrmPermission-BtuqUrwj.js} +1 -1
  100. package/dist/{useNavigationMenu-DJCT15IW.js → useNavigationMenu-DKxKXykI.js} +4 -4
  101. package/dist/{useSseClient-B2_SvHJ2.js → useSseClient-CRfpltKK.js} +1 -1
  102. package/dist/views/import/helper/submit-rows.d.ts +1 -1
  103. package/dist/views/integration/components/IntegrationCard.vue.d.ts +3 -3
  104. package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +2 -2
  105. package/dist/views/recipe/helper/import-recipe.d.ts +30 -0
  106. package/dist/views/settings/PlanLicenseDisplay.vue.d.ts +1 -14
  107. package/dist/views/stock/components/StockRecordCard.spec.d.ts +1 -0
  108. package/dist/views/stock/components/StockRecordCard.vue.d.ts +3 -863
  109. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.spec.d.ts +1 -0
  110. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.vue.d.ts +36 -0
  111. package/dist/views/stock/composables/use-last-closing-summary.d.ts +4 -0
  112. package/dist/views/stock/composables/use-last-closing-summary.spec.d.ts +1 -0
  113. package/dist/{vue-Co39mHJn.js → vue-CVco8McV.js} +2 -2
  114. package/dist/{vue-i18n-C2pkD_vQ.js → vue-i18n-C443zpcA.js} +280 -280
  115. package/dist/{xlsx.util-CLUjDX2E.js → xlsx.util-5_47Kslf.js} +2 -2
  116. package/package.json +2 -2
  117. package/dist/FeatureCapabilityGate-Dp_SfIlO.js +0 -77
  118. package/dist/ImportView-CbRrxlrW.js +0 -1290
  119. package/dist/RecipeView-Bd5--ENI.js +0 -3440
  120. package/dist/StockView-BCWwamwk.js +0 -2756
@@ -1,118 +1,118 @@
1
- import { defineComponent as ee, ref as _, computed as E, watch as j, resolveComponent as L, createElementBlock as i, openBlock as o, createElementVNode as l, toDisplayString as C, Fragment as A, renderList as J, createBlock as O, createCommentVNode as Z, createVNode as m, nextTick as xe, createSlots as he, withCtx as z, normalizeClass as ue, unref as S, withModifiers as ke, h as V, Teleport as we } from "vue";
1
+ import { defineComponent as ee, ref as k, computed as A, watch as J, resolveComponent as L, createElementBlock as r, openBlock as o, createElementVNode as l, toDisplayString as C, Fragment as E, renderList as Y, createBlock as z, createCommentVNode as Z, createVNode as p, nextTick as xe, createSlots as he, withCtx as P, normalizeClass as ue, unref as w, withModifiers as ke, h as B, Teleport as we } from "vue";
2
2
  import { _ as Fe } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
3
- import { B as Y, g as Te, r as Se, s as $e, u as De, a as ae, b as Ce, c as Be, d as be, e as Ve, f as Ie } from "./predefined-templates-DKiqLY6F.js";
3
+ import { B as G, g as Te, r as Se, s as $e, u as Ce, a as ae, b as De, c as Be, d as be, e as Ve, f as Ie } from "./predefined-templates-CdurFRJ4.js";
4
4
  import { useSnackbar as Pe, components as X } from "@feedmepos/ui-library";
5
5
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import { H as se, J as Oe, u as _e } from "./app--e70sT_h.js";
6
+ import { H as se, J as Oe, u as Le } from "./app-D38sV2ls.js";
7
7
  import { useCoreStore as ye, useI18n as Ee } from "@feedmepos/mf-common";
8
- import "./dayjs.min-Ivf4HAC3.js";
9
- import { a as Le, b as Ae, I as Ne, u as Ue } from "./feature-CBrHj9bO.js";
10
- import { _ as He, D as Me } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-B3mPB7-O.js";
11
- import { _ as Re } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DOgwkHnO.js";
12
- import { _ as je } from "./PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js";
13
- import { a as Ke } from "./vue-Co39mHJn.js";
14
- const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ye = { class: "flex flex-col gap-3" }, Je = {
8
+ import "./dayjs.min-BOKV8T5Q.js";
9
+ import { u as _e, a as Ue, I as Ae } from "./feature-CsPbMoeJ.js";
10
+ import { _ as He, D as Ne } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CYkPbFSA.js";
11
+ import { _ as Me } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B3ESPbQp.js";
12
+ import { _ as Re } from "./PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js";
13
+ import { a as je } from "./vue-CVco8McV.js";
14
+ const Ke = { class: "p-3" }, qe = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ge = { class: "flex flex-col gap-3" }, Ye = {
15
15
  key: 0,
16
16
  class: "flex items-center justify-between py-1"
17
- }, We = { class: "text-[13px] text-gray-600" }, Qe = { class: "text-[13px] text-gray-600" }, Xe = ["value", "rows", "placeholder", "onInput"], Ze = {
17
+ }, Je = { class: "text-[13px] text-gray-600" }, We = { class: "text-[13px] text-gray-600" }, Qe = ["value", "rows", "placeholder", "onInput"], Xe = {
18
18
  key: 5,
19
19
  class: "flex items-center justify-between py-1"
20
- }, et = { class: "text-[13px] text-gray-600" }, tt = ["value", "onInput"], lt = /* @__PURE__ */ ee({
20
+ }, Ze = { class: "text-[13px] text-gray-600" }, et = ["value", "onInput"], tt = /* @__PURE__ */ ee({
21
21
  __name: "BlockConfigPanel",
22
22
  props: {
23
23
  block: {}
24
24
  },
25
25
  emits: ["update"],
26
- setup(N, { emit: h }) {
27
- const T = N, k = h;
28
- function w(n) {
29
- var g;
30
- if ((g = n.config) != null && g.configFields && Array.isArray(n.config.configFields)) {
31
- const f = n.config.configFields.map((d) => ({ ...d })), x = new Set(f.map((d) => d.key)), a = Y[n.tag], D = a ? a.initialConfigFields().filter((d) => !x.has(d.key)) : [];
32
- return [...f, ...D];
26
+ setup(H, { emit: v }) {
27
+ const T = H, x = v;
28
+ function S(c) {
29
+ var b;
30
+ if ((b = c.config) != null && b.configFields && Array.isArray(c.config.configFields)) {
31
+ const _ = c.config.configFields.map((d) => ({ ...d })), h = new Set(_.map((d) => d.key)), a = G[c.tag], $ = a ? a.initialConfigFields().filter((d) => !h.has(d.key)) : [];
32
+ return [..._, ...$];
33
33
  }
34
- const r = Y[n.tag];
35
- return r ? r.initialConfigFields() : [];
34
+ const u = G[c.tag];
35
+ return u ? u.initialConfigFields() : [];
36
36
  }
37
- const p = _(w(T.block)), $ = E(() => {
38
- const n = Y[T.block.tag];
39
- return (n == null ? void 0 : n.label) ?? T.block.tag;
37
+ const m = k(S(T.block)), O = A(() => {
38
+ const c = G[T.block.tag];
39
+ return (c == null ? void 0 : c.label) ?? T.block.tag;
40
40
  });
41
- j(
41
+ J(
42
42
  () => T.block,
43
- (n) => {
44
- p.value = w(n);
43
+ (c) => {
44
+ m.value = S(c);
45
45
  },
46
46
  { deep: !0 }
47
47
  );
48
- function v(n, r) {
49
- const g = p.value[n];
50
- g && (g.value = r, y());
48
+ function f(c, u) {
49
+ const b = m.value[c];
50
+ b && (b.value = u, g());
51
51
  }
52
- function y() {
53
- k("update", {
52
+ function g() {
53
+ x("update", {
54
54
  ...T.block.config || {},
55
- configFields: p.value.map((n) => ({ ...n }))
55
+ configFields: m.value.map((c) => ({ ...c }))
56
56
  });
57
57
  }
58
- return (n, r) => {
59
- const g = L("FmSwitch"), f = L("FmTextField"), x = L("FmSelect");
60
- return o(), i("div", qe, [
61
- l("div", Ge, C($.value) + " Settings ", 1),
62
- l("div", Ye, [
63
- (o(!0), i(A, null, J(p.value, (a, D) => (o(), i("div", {
58
+ return (c, u) => {
59
+ const b = L("FmSwitch"), _ = L("FmTextField"), h = L("FmSelect");
60
+ return o(), r("div", Ke, [
61
+ l("div", qe, C(O.value) + " Settings ", 1),
62
+ l("div", Ge, [
63
+ (o(!0), r(E, null, Y(m.value, (a, $) => (o(), r("div", {
64
64
  key: a.key
65
65
  }, [
66
- a.type === "toggle" ? (o(), i("div", Je, [
67
- l("label", We, C(a.label), 1),
68
- m(g, {
66
+ a.type === "toggle" ? (o(), r("div", Ye, [
67
+ l("label", Je, C(a.label), 1),
68
+ p(b, {
69
69
  "model-value": a.value,
70
- "onUpdate:modelValue": (d) => v(D, d)
70
+ "onUpdate:modelValue": (d) => f($, d)
71
71
  }, null, 8, ["model-value", "onUpdate:modelValue"])
72
- ])) : a.type === "text" ? (o(), O(f, {
72
+ ])) : a.type === "text" ? (o(), z(_, {
73
73
  key: 1,
74
74
  label: a.label,
75
75
  "model-value": a.value,
76
76
  placeholder: a.placeholder,
77
- "onUpdate:modelValue": (d) => v(D, d)
78
- }, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : a.type === "textarea" ? (o(), i(A, { key: 2 }, [
79
- l("div", Qe, C(a.label), 1),
77
+ "onUpdate:modelValue": (d) => f($, d)
78
+ }, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : a.type === "textarea" ? (o(), r(E, { key: 2 }, [
79
+ l("div", We, C(a.label), 1),
80
80
  l("textarea", {
81
81
  class: "w-full font-mono text-[13px] p-2 border border-gray-300 rounded resize-y box-border focus:outline-none focus:border-blue-600",
82
82
  value: a.value,
83
83
  rows: a.rows ?? 8,
84
84
  placeholder: a.placeholder,
85
- onInput: (d) => v(D, d.target.value)
86
- }, null, 40, Xe)
87
- ], 64)) : a.type === "select" ? (o(), O(x, {
85
+ onInput: (d) => f($, d.target.value)
86
+ }, null, 40, Qe)
87
+ ], 64)) : a.type === "select" ? (o(), z(h, {
88
88
  key: 3,
89
89
  label: a.label,
90
90
  "model-value": a.value,
91
91
  items: a.options || [],
92
92
  "item-label": "label",
93
93
  "item-value": "value",
94
- "onUpdate:modelValue": (d) => v(D, d)
95
- }, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : a.type === "number" ? (o(), O(f, {
94
+ "onUpdate:modelValue": (d) => f($, d)
95
+ }, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : a.type === "number" ? (o(), z(_, {
96
96
  key: 4,
97
97
  label: a.label,
98
98
  type: "number",
99
99
  "model-value": String(a.value),
100
- "onUpdate:modelValue": (d) => v(D, Number(d))
101
- }, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : a.type === "color" ? (o(), i("div", Ze, [
102
- l("label", et, C(a.label), 1),
100
+ "onUpdate:modelValue": (d) => f($, Number(d))
101
+ }, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : a.type === "color" ? (o(), r("div", Xe, [
102
+ l("label", Ze, C(a.label), 1),
103
103
  l("input", {
104
104
  type: "color",
105
105
  value: a.value,
106
106
  class: "color-input w-9 h-7 p-0 border border-gray-300 rounded cursor-pointer bg-transparent",
107
- onInput: (d) => v(D, d.target.value)
108
- }, null, 40, tt)
107
+ onInput: (d) => f($, d.target.value)
108
+ }, null, 40, et)
109
109
  ])) : Z("", !0)
110
110
  ]))), 128))
111
111
  ])
112
112
  ]);
113
113
  };
114
114
  }
115
- }), ot = /* @__PURE__ */ ze(lt, [["__scopeId", "data-v-840687bf"]]), at = { class: "h-full flex flex-col" }, st = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, nt = /* @__PURE__ */ ee({
115
+ }), lt = /* @__PURE__ */ ze(tt, [["__scopeId", "data-v-840687bf"]]), ot = { class: "h-full flex flex-col" }, at = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, st = /* @__PURE__ */ ee({
116
116
  __name: "TemplatePreview",
117
117
  props: {
118
118
  blocks: {},
@@ -120,21 +120,21 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
120
120
  selectedBlockId: {},
121
121
  templateType: {}
122
122
  },
123
- setup(N) {
124
- const h = N, T = _(null);
125
- let k = null;
126
- function w() {
127
- return !k && T.value && (k = T.value.attachShadow({ mode: "open" })), k;
128
- }
129
- const p = E(() => h.previewData ?? Te(h.templateType));
130
- j(
131
- () => [h.blocks, p.value, T.value],
123
+ setup(H) {
124
+ const v = H, T = k(null);
125
+ let x = null;
126
+ function S() {
127
+ return !x && T.value && (x = T.value.attachShadow({ mode: "open" })), x;
128
+ }
129
+ const m = A(() => v.previewData ?? Te(v.templateType));
130
+ J(
131
+ () => [v.blocks, m.value, T.value],
132
132
  () => {
133
- const v = w();
134
- if (v) {
133
+ const f = S();
134
+ if (f) {
135
135
  try {
136
- const y = Se(h.blocks, p.value), n = $e(y);
137
- v.innerHTML = `
136
+ const g = Se(v.blocks, m.value), c = $e(g);
137
+ f.innerHTML = `
138
138
  <style>
139
139
  :host { display: block; }
140
140
  .preview-scale-wrapper {
@@ -156,30 +156,30 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
156
156
  }
157
157
  </style>
158
158
  <div class="preview-scale-wrapper">
159
- <div class="preview-content">${n}</div>
159
+ <div class="preview-content">${c}</div>
160
160
  </div>
161
161
  `;
162
- } catch (y) {
163
- v.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${y}</div>`;
162
+ } catch (g) {
163
+ f.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${g}</div>`;
164
164
  }
165
- xe(() => $(h.selectedBlockId));
165
+ xe(() => O(v.selectedBlockId));
166
166
  }
167
167
  },
168
168
  { deep: !0, immediate: !0 }
169
- ), j(
170
- () => h.selectedBlockId,
171
- (v) => $(v)
169
+ ), J(
170
+ () => v.selectedBlockId,
171
+ (f) => O(f)
172
172
  );
173
- function $(v) {
174
- if (!k || (k.querySelectorAll("[data-block-id].highlight").forEach((n) => {
175
- n.classList.remove("highlight");
176
- }), !v)) return;
177
- const y = k.querySelector(`[data-block-id="${v}"]`);
178
- y && (y.classList.add("highlight"), y.scrollIntoView({ behavior: "smooth", block: "nearest" }));
179
- }
180
- return (v, y) => (o(), i("div", at, [
181
- y[0] || (y[0] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
182
- l("div", st, [
173
+ function O(f) {
174
+ if (!x || (x.querySelectorAll("[data-block-id].highlight").forEach((c) => {
175
+ c.classList.remove("highlight");
176
+ }), !f)) return;
177
+ const g = x.querySelector(`[data-block-id="${f}"]`);
178
+ g && (g.classList.add("highlight"), g.scrollIntoView({ behavior: "smooth", block: "nearest" }));
179
+ }
180
+ return (f, g) => (o(), r("div", ot, [
181
+ g[0] || (g[0] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
182
+ l("div", at, [
183
183
  l("div", {
184
184
  ref_key: "shadowHost",
185
185
  ref: T
@@ -187,47 +187,47 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
187
187
  ])
188
188
  ]));
189
189
  }
190
- }), rt = { class: "flex items-center gap-2 text-base font-semibold" }, it = { key: 1 }, ut = { key: 2 }, ct = {
190
+ }), nt = { class: "flex items-center gap-2 text-base font-semibold" }, rt = { key: 1 }, it = { key: 2 }, ut = {
191
191
  key: 0,
192
192
  class: "p-6"
193
- }, dt = {
193
+ }, ct = {
194
194
  key: 0,
195
195
  class: "flex justify-center items-center h-40 text-gray-400"
196
- }, pt = {
196
+ }, dt = {
197
197
  key: 1,
198
198
  class: "grid grid-cols-2 gap-8"
199
- }, mt = ["onClick"], vt = { class: "flex items-center justify-center w-12 h-12 rounded-xl bg-gray-100 text-gray-500 group-hover:bg-blue-100 group-hover:text-blue-600 transition-colors" }, ft = { class: "text-center" }, yt = { class: "text-sm font-semibold text-gray-700 group-hover:text-blue-700" }, gt = { class: "text-xs text-gray-400 mt-1" }, bt = {
199
+ }, pt = ["onClick"], mt = { class: "flex items-center justify-center w-12 h-12 rounded-xl bg-gray-100 text-gray-500 group-hover:bg-blue-100 group-hover:text-blue-600 transition-colors" }, vt = { class: "text-center" }, ft = { class: "text-sm font-semibold text-gray-700 group-hover:text-blue-700" }, yt = { class: "text-xs text-gray-400 mt-1" }, gt = {
200
200
  key: 0,
201
201
  class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-green-600 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full"
202
- }, _t = {
202
+ }, bt = {
203
203
  key: 1,
204
204
  class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-gray-400 bg-gray-100 px-2 py-0.5 rounded-full"
205
- }, xt = {
205
+ }, _t = {
206
206
  key: 1,
207
207
  class: "flex justify-center items-center h-[400px] text-gray-400"
208
- }, ht = {
208
+ }, xt = {
209
209
  key: 2,
210
210
  class: "flex h-[calc(100vh-120px)] border-t border-gray-200"
211
- }, kt = { class: "w-[280px] border-r border-gray-200 overflow-y-auto shrink-0" }, wt = { class: "px-3 pt-3 pb-2" }, Ft = { class: "flex flex-col" }, Tt = ["onClick"], St = { class: "border-y border-gray-100" }, $t = ["onDragstart", "onDragover", "onDrop", "onClick"], Dt = { class: "flex-1" }, Ct = { class: "flex gap-1 opacity-50 hover:opacity-100" }, Bt = {
211
+ }, ht = { class: "w-[280px] border-r border-gray-200 overflow-y-auto shrink-0" }, kt = { class: "px-3 pt-3 pb-2" }, wt = { class: "flex flex-col" }, Ft = ["onClick"], Tt = { class: "border-y border-gray-100" }, St = ["onDragstart", "onDragover", "onDrop", "onClick"], $t = { class: "flex-1" }, Ct = { class: "flex gap-1 opacity-50 hover:opacity-100" }, Dt = {
212
212
  key: 0,
213
213
  class: "py-6 px-4 text-center text-gray-400 text-[13px]"
214
- }, Vt = {
214
+ }, Bt = {
215
215
  key: 0,
216
216
  class: "border-t border-gray-200"
217
- }, It = {
217
+ }, Vt = {
218
218
  key: 1,
219
219
  class: "flex items-center justify-center text-gray-400 text-[13px] py-8"
220
- }, Pt = { class: "p-3 border-t border-gray-200" }, zt = { class: "flex-1 overflow-hidden" }, Ot = { class: "ml-auto flex gap-2" }, Et = { class: "p-4" }, Lt = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, At = { class: "p-4" }, Nt = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Ut = /* @__PURE__ */ ee({
220
+ }, It = { class: "p-3 border-t border-gray-200" }, Pt = { class: "flex-1 overflow-hidden" }, zt = { class: "ml-auto flex gap-2" }, Ot = { class: "p-4" }, Lt = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Et = { class: "p-4" }, Ut = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, At = /* @__PURE__ */ ee({
221
221
  __name: "PrintTemplateEditorDialog",
222
222
  props: {
223
223
  modelValue: { type: Boolean }
224
224
  },
225
225
  emits: ["update:modelValue", "saved"],
226
- setup(N, { emit: h }) {
227
- const T = N, k = h, w = De(), p = Pe(), $ = ye(), v = E({
226
+ setup(H, { emit: v }) {
227
+ const T = H, x = v, S = Ce(), m = Pe(), O = ye(), f = A({
228
228
  get: () => T.modelValue,
229
- set: (u) => k("update:modelValue", u)
230
- }), y = _(!1), n = _(!1), r = _(ae()), g = _(null), f = _(se.Enum.purchaseOrder), x = _("Purchase Order Template"), a = _(null), D = _(!1), d = _(!1), I = _("select-type"), W = [
229
+ set: (n) => x("update:modelValue", n)
230
+ }), g = k(!1), c = k(!1), u = k(ae()), b = k(null), _ = k(se.Enum.purchaseOrder), h = k("Purchase Order Template"), a = k(null), $ = k(!1), d = k(!1), V = k("select-type"), W = [
231
231
  {
232
232
  label: "Purchase Order",
233
233
  value: se.Enum.purchaseOrder,
@@ -252,25 +252,25 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
252
252
  icon: "local_shipping",
253
253
  description: "Customize the layout for delivery order printouts"
254
254
  }
255
- ], K = _(/* @__PURE__ */ new Set()), Q = E(
256
- () => r.value.find((u) => u.id === g.value) ?? null
257
- ), U = _(null), H = _(null);
258
- j(v, async (u) => {
259
- if (u) {
260
- I.value = "select-type", y.value = !0;
255
+ ], j = k(/* @__PURE__ */ new Set()), Q = A(
256
+ () => u.value.find((n) => n.id === b.value) ?? null
257
+ ), U = k(null), N = k(null);
258
+ J(f, async (n) => {
259
+ if (n) {
260
+ V.value = "select-type", g.value = !0;
261
261
  try {
262
- const e = await w.browse();
263
- K.value = new Set(e.map((b) => b.type));
262
+ const e = await S.browse();
263
+ j.value = new Set(e.map((y) => y.type));
264
264
  } catch {
265
265
  } finally {
266
- y.value = !1;
266
+ g.value = !1;
267
267
  }
268
268
  }
269
- }), j(f, async () => {
270
- g.value = null, await le();
269
+ }), J(_, async () => {
270
+ b.value = null, await le();
271
271
  });
272
- async function ne(u) {
273
- f.value = u, await le(), I.value = "editor";
272
+ async function ne(n) {
273
+ _.value = n, await le(), V.value = "editor";
274
274
  }
275
275
  function te() {
276
276
  return {
@@ -278,329 +278,329 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
278
278
  transferOrder: "Transfer Order Template",
279
279
  goodsReceivedNote: "Goods Received Note Template",
280
280
  deliveryOrder: "Delivery Order Template"
281
- }[f.value] ?? "Purchase Order Template";
281
+ }[_.value] ?? "Purchase Order Template";
282
282
  }
283
283
  async function le() {
284
- y.value = !0;
284
+ g.value = !0;
285
285
  try {
286
- const u = await w.browse();
287
- K.value = new Set(u.map((b) => b.type));
288
- const e = u.find((b) => b.type === f.value);
289
- e ? (a.value = e._id, x.value = e.name, r.value = e.blocks.map((b) => ({ ...b }))) : (a.value = null, r.value = ae(), x.value = te());
286
+ const n = await S.browse();
287
+ j.value = new Set(n.map((y) => y.type));
288
+ const e = n.find((y) => y.type === _.value);
289
+ e ? (a.value = e._id, h.value = e.name, u.value = e.blocks.map((y) => ({ ...y }))) : (a.value = null, u.value = ae(), h.value = te());
290
290
  } catch {
291
- r.value = ae(), x.value = te();
291
+ u.value = ae(), h.value = te();
292
292
  } finally {
293
- y.value = !1;
293
+ g.value = !1;
294
294
  }
295
295
  }
296
- function ce(u) {
296
+ function ce(n) {
297
297
  const e = {
298
298
  id: Be(),
299
- tag: u,
300
- config: Ce(u)
299
+ tag: n,
300
+ config: De(n)
301
301
  };
302
- r.value.push(e), g.value = e.id;
302
+ u.value.push(e), b.value = e.id;
303
303
  }
304
- function de(u) {
305
- const e = r.value.findIndex((b) => b.id === u);
306
- e >= 0 && (r.value.splice(e, 1), g.value === u && (g.value = null));
304
+ function de(n) {
305
+ const e = u.value.findIndex((y) => y.id === n);
306
+ e >= 0 && (u.value.splice(e, 1), b.value === n && (b.value = null));
307
307
  }
308
- function re(u) {
309
- const e = r.value.find((b) => b.id === g.value);
308
+ function re(n) {
309
+ const e = u.value.find((y) => y.id === b.value);
310
310
  if (e) {
311
- const b = u.configFields || [], oe = be(e.tag);
312
- e.config = { configFields: b, templateHtml: oe };
311
+ const y = n.configFields || [], oe = be(e.tag);
312
+ e.config = { configFields: y, templateHtml: oe };
313
313
  }
314
314
  }
315
- function pe(u) {
316
- U.value = u;
315
+ function pe(n) {
316
+ U.value = n;
317
317
  }
318
- function me(u, e) {
319
- u.preventDefault(), H.value = e;
318
+ function me(n, e) {
319
+ n.preventDefault(), N.value = e;
320
320
  }
321
321
  function ve() {
322
- H.value = null;
322
+ N.value = null;
323
323
  }
324
- function fe(u) {
325
- if (U.value === null || U.value === u) {
326
- U.value = null, H.value = null;
324
+ function fe(n) {
325
+ if (U.value === null || U.value === n) {
326
+ U.value = null, N.value = null;
327
327
  return;
328
328
  }
329
- const e = r.value.splice(U.value, 1)[0];
330
- r.value.splice(u, 0, e), U.value = null, H.value = null;
329
+ const e = u.value.splice(U.value, 1)[0];
330
+ u.value.splice(n, 0, e), U.value = null, N.value = null;
331
331
  }
332
332
  function t() {
333
- U.value = null, H.value = null;
333
+ U.value = null, N.value = null;
334
334
  }
335
335
  async function s() {
336
- var u;
337
- n.value = !0;
336
+ var n;
337
+ c.value = !0;
338
338
  try {
339
- const e = (u = $.currentBusiness.value) == null ? void 0 : u._id;
339
+ const e = (n = O.currentBusiness.value) == null ? void 0 : n._id;
340
340
  if (!e)
341
341
  throw new Error("Business ID is missing. Please select a business first.");
342
- const b = r.value.map((c) => {
342
+ const y = u.value.map((i) => {
343
343
  var ge;
344
- const P = ((ge = c.config) == null ? void 0 : ge.configFields) || [], G = be(c.tag, P);
344
+ const I = ((ge = i.config) == null ? void 0 : ge.configFields) || [], q = be(i.tag, I);
345
345
  return {
346
- ...c,
347
- config: { configFields: P, templateHtml: G }
346
+ ...i,
347
+ config: { configFields: I, templateHtml: q }
348
348
  };
349
- }), oe = Ve(b), M = {
350
- name: x.value,
351
- type: f.value,
349
+ }), oe = Ve(y), M = {
350
+ name: h.value,
351
+ type: _.value,
352
352
  blocks: oe,
353
353
  businessId: e,
354
354
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
355
355
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
356
356
  };
357
357
  let R;
358
- a.value ? R = await w.update(a.value, {
358
+ a.value ? R = await S.update(a.value, {
359
359
  _id: a.value,
360
360
  ...M
361
- }) : (R = await w.create(M), a.value = R._id), K.value.add(f.value), d.value = !1, p == null || p.open({
361
+ }) : (R = await S.create(M), a.value = R._id), j.value.add(_.value), d.value = !1, m == null || m.open({
362
362
  title: "Success",
363
363
  message: "Print template saved",
364
364
  type: "success"
365
- }), k("saved", R), v.value = !1;
365
+ }), x("saved", R), f.value = !1;
366
366
  } catch (e) {
367
- p == null || p.open({
367
+ m == null || m.open({
368
368
  title: "Error",
369
369
  message: (e == null ? void 0 : e.message) || "Failed to save template",
370
370
  type: "error"
371
371
  });
372
372
  } finally {
373
- n.value = !1;
373
+ c.value = !1;
374
374
  }
375
375
  }
376
- async function B() {
376
+ async function D() {
377
377
  if (a.value) {
378
- n.value = !0;
378
+ c.value = !0;
379
379
  try {
380
- await w.delete(a.value), a.value = null, r.value = ae(), x.value = te(), K.value.delete(f.value), D.value = !1, p == null || p.open({
380
+ await S.delete(a.value), a.value = null, u.value = ae(), h.value = te(), j.value.delete(_.value), $.value = !1, m == null || m.open({
381
381
  title: "Deleted",
382
382
  message: "Print template deleted. Default layout will be used.",
383
383
  type: "success"
384
- }), k("saved", null), v.value = !1;
385
- } catch (u) {
386
- p == null || p.open({
384
+ }), x("saved", null), f.value = !1;
385
+ } catch (n) {
386
+ m == null || m.open({
387
387
  title: "Error",
388
- message: (u == null ? void 0 : u.message) || "Failed to delete template",
388
+ message: (n == null ? void 0 : n.message) || "Failed to delete template",
389
389
  type: "error"
390
390
  });
391
391
  } finally {
392
- n.value = !1;
392
+ c.value = !1;
393
393
  }
394
394
  }
395
395
  }
396
- function q() {
397
- r.value = ae(), g.value = null;
396
+ function K() {
397
+ u.value = ae(), b.value = null;
398
398
  }
399
- function F(u) {
399
+ function F(n) {
400
400
  var e;
401
- return ((e = Y[u]) == null ? void 0 : e.label) ?? u;
401
+ return ((e = G[n]) == null ? void 0 : e.label) ?? n;
402
402
  }
403
- function ie(u) {
403
+ function ie(n) {
404
404
  var e;
405
- return ((e = Y[u]) == null ? void 0 : e.icon) ?? "widgets";
406
- }
407
- return (u, e) => {
408
- const b = L("FmIcon"), oe = L("FmTextField"), M = L("FmButton"), R = L("FmDialog");
409
- return o(), i(A, null, [
410
- m(R, {
411
- modelValue: v.value,
412
- "onUpdate:modelValue": e[4] || (e[4] = (c) => v.value = c),
405
+ return ((e = G[n]) == null ? void 0 : e.icon) ?? "widgets";
406
+ }
407
+ return (n, e) => {
408
+ const y = L("FmIcon"), oe = L("FmTextField"), M = L("FmButton"), R = L("FmDialog");
409
+ return o(), r(E, null, [
410
+ p(R, {
411
+ modelValue: f.value,
412
+ "onUpdate:modelValue": e[4] || (e[4] = (i) => f.value = i),
413
413
  overlay: !0,
414
414
  "close-button": "",
415
415
  "max-width": "98vw",
416
416
  "max-height": "98vh"
417
417
  }, he({
418
- "dialog-header": z(() => {
419
- var c;
418
+ "dialog-header": P(() => {
419
+ var i;
420
420
  return [
421
- l("div", rt, [
422
- I.value === "editor" ? (o(), i("button", {
421
+ l("div", nt, [
422
+ V.value === "editor" ? (o(), r("button", {
423
423
  key: 0,
424
424
  class: "flex items-center justify-center w-7 h-7 rounded hover:bg-gray-100 transition-colors text-gray-500",
425
- onClick: e[0] || (e[0] = (P) => I.value = "select-type")
425
+ onClick: e[0] || (e[0] = (I) => V.value = "select-type")
426
426
  }, [
427
- m(b, {
427
+ p(y, {
428
428
  name: "arrow_back",
429
429
  size: "sm"
430
430
  })
431
431
  ])) : Z("", !0),
432
- I.value === "select-type" ? (o(), i("span", it, "Print Template Editor")) : (o(), i("span", ut, C((c = W.find((P) => P.value === f.value)) == null ? void 0 : c.label) + " Template", 1))
432
+ V.value === "select-type" ? (o(), r("span", rt, "Print Template Editor")) : (o(), r("span", it, C((i = W.find((I) => I.value === _.value)) == null ? void 0 : i.label) + " Template", 1))
433
433
  ])
434
434
  ];
435
435
  }),
436
- default: z(() => [
437
- I.value === "select-type" ? (o(), i("div", ct, [
436
+ default: P(() => [
437
+ V.value === "select-type" ? (o(), r("div", ut, [
438
438
  e[7] || (e[7] = l("p", { class: "text-sm text-gray-500 mb-5" }, " Select a template type to customize its print layout. ", -1)),
439
- y.value ? (o(), i("div", dt, " Loading... ")) : (o(), i("div", pt, [
440
- (o(), i(A, null, J(W, (c) => l("div", {
441
- key: c.value,
439
+ g.value ? (o(), r("div", ct, " Loading... ")) : (o(), r("div", dt, [
440
+ (o(), r(E, null, Y(W, (i) => l("div", {
441
+ key: i.value,
442
442
  class: ue(["group relative flex flex-col items-center gap-3 p-6 rounded-xl border-2 border-gray-200 cursor-pointer transition-all hover:border-blue-400 hover:shadow-md", {
443
- "border-blue-500 bg-blue-50/50 shadow-md": f.value === c.value && I.value === "select-type"
443
+ "border-blue-500 bg-blue-50/50 shadow-md": _.value === i.value && V.value === "select-type"
444
444
  }]),
445
- onClick: (P) => ne(c.value)
445
+ onClick: (I) => ne(i.value)
446
446
  }, [
447
- l("div", vt, [
448
- m(b, {
449
- name: c.icon,
447
+ l("div", mt, [
448
+ p(y, {
449
+ name: i.icon,
450
450
  size: "sm"
451
451
  }, null, 8, ["name"])
452
452
  ]),
453
- l("div", ft, [
454
- l("div", yt, C(c.label), 1),
455
- l("div", gt, C(c.description), 1)
453
+ l("div", vt, [
454
+ l("div", ft, C(i.label), 1),
455
+ l("div", yt, C(i.description), 1)
456
456
  ]),
457
- K.value.has(c.value) ? (o(), i("span", bt, "Customized")) : (o(), i("span", _t, "Default"))
458
- ], 10, mt)), 64))
457
+ j.value.has(i.value) ? (o(), r("span", gt, "Customized")) : (o(), r("span", bt, "Default"))
458
+ ], 10, pt)), 64))
459
459
  ]))
460
- ])) : y.value ? (o(), i("div", xt, e[8] || (e[8] = [
460
+ ])) : g.value ? (o(), r("div", _t, e[8] || (e[8] = [
461
461
  l("div", null, "Loading template...", -1)
462
- ]))) : (o(), i("div", ht, [
463
- l("div", kt, [
464
- l("div", wt, [
465
- m(oe, {
466
- modelValue: x.value,
467
- "onUpdate:modelValue": e[1] || (e[1] = (c) => x.value = c),
462
+ ]))) : (o(), r("div", xt, [
463
+ l("div", ht, [
464
+ l("div", kt, [
465
+ p(oe, {
466
+ modelValue: h.value,
467
+ "onUpdate:modelValue": e[1] || (e[1] = (i) => h.value = i),
468
468
  placeholder: "Template name",
469
469
  label: "Template Name"
470
470
  }, null, 8, ["modelValue"])
471
471
  ]),
472
472
  e[9] || (e[9] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2" }, " Add Blocks ", -1)),
473
- l("div", Ft, [
474
- (o(!0), i(A, null, J(S(Oe).Values, (c) => (o(), i("div", {
475
- key: c,
473
+ l("div", wt, [
474
+ (o(!0), r(E, null, Y(w(Oe).Values, (i) => (o(), r("div", {
475
+ key: i,
476
476
  class: "group flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 transition-colors hover:bg-gray-100",
477
- onClick: (P) => ce(c)
477
+ onClick: (I) => ce(i)
478
478
  }, [
479
- m(b, {
480
- name: S(Y)[c].icon,
479
+ p(y, {
480
+ name: w(G)[i].icon,
481
481
  size: "sm"
482
482
  }, null, 8, ["name"]),
483
- l("span", null, C(S(Y)[c].label), 1),
484
- m(b, {
483
+ l("span", null, C(w(G)[i].label), 1),
484
+ p(y, {
485
485
  name: "add",
486
486
  size: "sm",
487
487
  class: "ml-auto opacity-0 text-blue-600 group-hover:opacity-100"
488
488
  })
489
- ], 8, Tt))), 128))
489
+ ], 8, Ft))), 128))
490
490
  ]),
491
491
  e[10] || (e[10] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 mt-2" }, " Block Order ", -1)),
492
- l("div", St, [
493
- (o(!0), i(A, null, J(r.value, (c, P) => (o(), i("div", {
494
- key: c.id,
492
+ l("div", Tt, [
493
+ (o(!0), r(E, null, Y(u.value, (i, I) => (o(), r("div", {
494
+ key: i.id,
495
495
  class: ue(["flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 border-b border-gray-100 transition-colors hover:bg-gray-100", {
496
- "bg-blue-50 border-l-[3px] border-l-blue-600": c.id === g.value,
497
- "border-t-2 border-t-blue-600": H.value === P
496
+ "bg-blue-50 border-l-[3px] border-l-blue-600": i.id === b.value,
497
+ "border-t-2 border-t-blue-600": N.value === I
498
498
  }]),
499
499
  draggable: "true",
500
- onDragstart: (G) => pe(P),
501
- onDragover: (G) => me(G, P),
500
+ onDragstart: (q) => pe(I),
501
+ onDragover: (q) => me(q, I),
502
502
  onDragleave: ve,
503
- onDrop: (G) => fe(P),
503
+ onDrop: (q) => fe(I),
504
504
  onDragend: t,
505
- onClick: (G) => g.value = c.id
505
+ onClick: (q) => b.value = i.id
506
506
  }, [
507
- m(b, {
507
+ p(y, {
508
508
  name: "drag_indicator",
509
509
  size: "sm",
510
510
  class: "cursor-grab text-gray-300"
511
511
  }),
512
- m(b, {
513
- name: ie(c.tag),
512
+ p(y, {
513
+ name: ie(i.tag),
514
514
  size: "sm"
515
515
  }, null, 8, ["name"]),
516
- l("span", Dt, C(F(c.tag)), 1),
516
+ l("span", $t, C(F(i.tag)), 1),
517
517
  l("div", Ct, [
518
- m(b, {
518
+ p(y, {
519
519
  name: "delete",
520
520
  size: "sm",
521
521
  class: "cursor-pointer text-gray-400 hover:text-red-500",
522
- onClick: ke((G) => de(c.id), ["stop"])
522
+ onClick: ke((q) => de(i.id), ["stop"])
523
523
  }, null, 8, ["onClick"])
524
524
  ])
525
- ], 42, $t))), 128)),
526
- r.value.length === 0 ? (o(), i("div", Bt, " Click a block above to add it ")) : Z("", !0)
525
+ ], 42, St))), 128)),
526
+ u.value.length === 0 ? (o(), r("div", Dt, " Click a block above to add it ")) : Z("", !0)
527
527
  ]),
528
- Q.value ? (o(), i("div", Vt, [
529
- (o(), O(ot, {
528
+ Q.value ? (o(), r("div", Bt, [
529
+ (o(), z(lt, {
530
530
  key: Q.value.id,
531
531
  block: Q.value,
532
532
  onUpdate: re
533
533
  }, null, 8, ["block"]))
534
- ])) : (o(), i("div", It, " Select a block to configure it ")),
535
- l("div", Pt, [
536
- m(M, {
534
+ ])) : (o(), r("div", Vt, " Select a block to configure it ")),
535
+ l("div", It, [
536
+ p(M, {
537
537
  label: "Reset to Default",
538
538
  variant: "plain",
539
539
  size: "md",
540
- onClick: q
540
+ onClick: K
541
541
  })
542
542
  ])
543
543
  ]),
544
- l("div", zt, [
545
- m(nt, {
546
- blocks: r.value,
547
- "selected-block-id": g.value,
548
- "template-type": f.value
544
+ l("div", Pt, [
545
+ p(st, {
546
+ blocks: u.value,
547
+ "selected-block-id": b.value,
548
+ "template-type": _.value
549
549
  }, null, 8, ["blocks", "selected-block-id", "template-type"])
550
550
  ])
551
551
  ]))
552
552
  ]),
553
553
  _: 2
554
554
  }, [
555
- I.value === "editor" ? {
555
+ V.value === "editor" ? {
556
556
  name: "dialog-footer",
557
- fn: z(() => [
558
- l("div", Ot, [
559
- a.value ? (o(), O(M, {
557
+ fn: P(() => [
558
+ l("div", zt, [
559
+ a.value ? (o(), z(M, {
560
560
  key: 0,
561
561
  label: "Delete Template",
562
562
  variant: "destructive",
563
563
  size: "md",
564
- onClick: e[2] || (e[2] = (c) => D.value = !0)
564
+ onClick: e[2] || (e[2] = (i) => $.value = !0)
565
565
  })) : Z("", !0),
566
- m(M, {
566
+ p(M, {
567
567
  label: "Save Template",
568
568
  variant: "primary",
569
569
  size: "md",
570
- onClick: e[3] || (e[3] = (c) => d.value = !0)
570
+ onClick: e[3] || (e[3] = (i) => d.value = !0)
571
571
  })
572
572
  ])
573
573
  ]),
574
574
  key: "0"
575
575
  } : void 0
576
576
  ]), 1032, ["modelValue"]),
577
- m(R, {
577
+ p(R, {
578
578
  modelValue: d.value,
579
- "onUpdate:modelValue": e[5] || (e[5] = (c) => d.value = c),
579
+ "onUpdate:modelValue": e[5] || (e[5] = (i) => d.value = i),
580
580
  overlay: !0,
581
581
  dismissAway: !0,
582
582
  "close-button": "",
583
583
  "max-width": "400px"
584
584
  }, {
585
- "dialog-header": z(() => e[11] || (e[11] = [
585
+ "dialog-header": P(() => e[11] || (e[11] = [
586
586
  l("span", null, "Save Print Template?", -1)
587
587
  ])),
588
- "dialog-footer": z(() => [
589
- m(M, {
588
+ "dialog-footer": P(() => [
589
+ p(M, {
590
590
  class: "ml-auto",
591
591
  label: "Save",
592
592
  variant: "primary",
593
593
  size: "md",
594
- loading: n.value,
594
+ loading: c.value,
595
595
  onClick: s
596
596
  }, null, 8, ["loading"])
597
597
  ]),
598
- default: z(() => [
599
- l("div", Et, [
598
+ default: P(() => [
599
+ l("div", Ot, [
600
600
  e[13] || (e[13] = l("p", null, "Are you sure you want to save this print template?", -1)),
601
601
  e[14] || (e[14] = l("p", { class: "text-gray-500 text-sm mt-2" }, " This template will be used for all future prints of this type. ", -1)),
602
602
  l("div", Lt, [
603
- m(b, {
603
+ p(y, {
604
604
  name: "warning",
605
605
  size: "sm"
606
606
  }),
@@ -610,33 +610,33 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
610
610
  ]),
611
611
  _: 1
612
612
  }, 8, ["modelValue"]),
613
- m(R, {
614
- modelValue: D.value,
615
- "onUpdate:modelValue": e[6] || (e[6] = (c) => D.value = c),
613
+ p(R, {
614
+ modelValue: $.value,
615
+ "onUpdate:modelValue": e[6] || (e[6] = (i) => $.value = i),
616
616
  overlay: !0,
617
617
  dismissAway: !0,
618
618
  "close-button": "",
619
619
  "max-width": "400px"
620
620
  }, {
621
- "dialog-header": z(() => e[15] || (e[15] = [
621
+ "dialog-header": P(() => e[15] || (e[15] = [
622
622
  l("span", null, "Delete Print Template?", -1)
623
623
  ])),
624
- "dialog-footer": z(() => [
625
- m(M, {
624
+ "dialog-footer": P(() => [
625
+ p(M, {
626
626
  class: "ml-auto",
627
627
  label: "Delete",
628
628
  variant: "destructive",
629
629
  size: "md",
630
- loading: n.value,
631
- onClick: B
630
+ loading: c.value,
631
+ onClick: D
632
632
  }, null, 8, ["loading"])
633
633
  ]),
634
- default: z(() => [
635
- l("div", At, [
634
+ default: P(() => [
635
+ l("div", Et, [
636
636
  e[17] || (e[17] = l("p", null, "Are you sure you want to delete this print template?", -1)),
637
637
  e[18] || (e[18] = l("p", { class: "text-gray-500 text-sm mt-2" }, " The default print layout will be used for all future prints. ", -1)),
638
- l("div", Nt, [
639
- m(b, {
638
+ l("div", Ut, [
639
+ p(y, {
640
640
  name: "warning",
641
641
  size: "sm"
642
642
  }),
@@ -649,65 +649,34 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
649
649
  ], 64);
650
650
  };
651
651
  }
652
- }), Ht = { class: "flex flex-wrap items-center gap-8 border-b border-fm-color-neutral-gray-200 pb-16" }, Mt = {
652
+ }), Ht = { class: "flex flex-wrap items-center gap-8 border-b border-fm-color-neutral-gray-200 pb-16" }, Nt = {
653
653
  key: 0,
654
- class: "text-fm-color-typo-secondary"
655
- }, Rt = {
654
+ class: "text-fm-color-typo-error"
655
+ }, Mt = {
656
656
  key: 1,
657
657
  class: "text-fm-color-typo-secondary"
658
- }, jt = {
659
- key: 2,
660
- class: "text-fm-color-typo-error"
661
- }, Kt = {
662
- key: 4,
658
+ }, Rt = {
659
+ key: 3,
663
660
  class: "fm-typo-en-body-md-600"
664
- }, qt = {
665
- key: 5,
666
- class: "text-fm-color-typo-secondary"
667
- }, Gt = /* @__PURE__ */ ee({
661
+ }, jt = /* @__PURE__ */ ee({
668
662
  __name: "PlanLicenseDisplay",
669
- props: {
670
- scopeDbName: {}
671
- },
672
- setup(N) {
673
- const h = N, T = _e(), k = Le(), w = E(() => T.locationByDbName[h.scopeDbName ?? ""]), p = E(() => {
674
- var r;
675
- const n = (r = w.value) == null ? void 0 : r.doc;
676
- return n ? n.id || n._id : void 0;
677
- }), $ = _(null), v = _(!1), y = _(!1);
678
- return j(
679
- p,
680
- async (n, r, g) => {
681
- if ($.value = null, y.value = !1, !n) return;
682
- let f = !1;
683
- g(() => {
684
- f = !0;
685
- }), v.value = !0;
686
- try {
687
- const x = await k.getInventoryPlan(n);
688
- f || ($.value = x);
689
- } catch {
690
- f || (y.value = !0);
691
- } finally {
692
- f || (v.value = !1);
693
- }
694
- },
695
- { immediate: !0 }
696
- ), (n, r) => (o(), i("div", Ht, [
697
- r[0] || (r[0] = l("span", { class: "fm-typo-en-body-md-600" }, "Inventory plan", -1)),
698
- w.value ? v.value ? (o(), i("span", Rt, "Loading…")) : y.value ? (o(), i("span", jt, "Could not load plan")) : $.value === "Premium" ? (o(), O(je, {
699
- key: 3,
663
+ setup(H) {
664
+ const v = _e();
665
+ return (T, x) => (o(), r("div", Ht, [
666
+ x[0] || (x[0] = l("span", { class: "fm-typo-en-body-md-600" }, "Inventory plan", -1)),
667
+ w(v).loadState.status === "error" ? (o(), r("span", Nt, "Could not load plan")) : w(v).isLoaded ? w(v).premium ? (o(), z(Re, {
668
+ key: 2,
700
669
  tier: "premium"
701
- })) : $.value === "Standard" ? (o(), i("span", Kt, "Standard")) : (o(), i("span", qt, "No plan assigned")) : (o(), i("span", Mt, "Select a location to view its plan"))
670
+ })) : (o(), r("span", Rt, "Standard")) : (o(), r("span", Mt, "Loading…"))
702
671
  ]));
703
672
  }
704
- }), Yt = { class: "flex min-h-0 w-full flex-col gap-12" }, Jt = { class: "flex w-full flex-wrap items-center gap-8" }, Wt = /* @__PURE__ */ ee({
673
+ }), Kt = { class: "flex min-h-0 w-full flex-col gap-12" }, qt = { class: "flex w-full flex-wrap items-center gap-8" }, Gt = /* @__PURE__ */ ee({
705
674
  __name: "FeatureFlagView",
706
- setup(N) {
707
- const h = Ue(), T = _e(), k = ye(), w = Ae(), p = X.FmSwitch, $ = X.FmTable, v = X.FmMenu, y = X.FmMenuDivider, n = X.FmMenuHeader, r = X.FmMenuItem, g = /* @__PURE__ */ new Set(), f = {
675
+ setup(H) {
676
+ const v = _e(), T = Le(), x = ye(), S = Ue(), m = X.FmSwitch, O = X.FmTable, f = X.FmMenu, g = X.FmMenuDivider, c = X.FmMenuHeader, u = X.FmMenuItem, b = /* @__PURE__ */ new Set(), _ = {
708
677
  inventory_pos_closing_v1: "Use v2: Closing Draft and Closing Template.",
709
678
  inventory_pos_convert_v1: "Use Production Item instead."
710
- }, x = _([]), a = _(null), D = ["In use", "Deprecate Soon", "Deprecated"], d = _(null), I = _({}), W = _(!1), K = {
679
+ }, h = k([]), a = k(null), $ = ["In use", "Deprecate Soon", "Deprecated"], d = k(null), V = k({}), W = k(!1), j = {
711
680
  inventory_netsuite_inventory_transfer_out: ["netsuite"],
712
681
  inventory_portal_accept_require_fulfillment: ["mobile"],
713
682
  inventory_portal_must_use_transfer_template: ["mobile"],
@@ -723,64 +692,67 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
723
692
  inventory_pos_stock_return: ["mobile"],
724
693
  inventory_pos_transfer_require_fulfillment: ["mobile", "pos-v7", "pos-7.8"],
725
694
  inventory_purchase_order_approval: ["mobile"]
726
- }, Q = E(
727
- () => Object.values(Ne).map((t) => {
728
- const s = h.flags.find((B) => B.name === t);
695
+ }, Q = A(
696
+ () => Object.values(Ae).map((t) => {
697
+ const s = v.flags.find((D) => D.name === t);
729
698
  return {
730
699
  name: t,
731
700
  enabled: (s == null ? void 0 : s.enabled) ?? null,
732
- domains: ["portal", ...K[t] ?? []],
733
- features: Ke(t)
701
+ domains: ["portal", ...j[t] ?? []],
702
+ features: je(t)
734
703
  };
735
704
  })
736
- ), U = E(
705
+ ), U = A(
737
706
  () => [...new Set(Q.value.flatMap((t) => t.domains))].sort()
738
- ), H = E(
707
+ ), N = A(
739
708
  () => Q.value.filter(
740
- (t) => (x.value.length === 0 || x.value.some((s) => t.domains.includes(s))) && (!a.value || re(t) === a.value)
709
+ (t) => (h.value.length === 0 || h.value.some((s) => t.domains.includes(s))) && (!a.value || re(t) === a.value)
741
710
  )
742
711
  );
743
712
  function ne(t) {
744
- x.value = x.value.includes(t) ? x.value.filter((s) => s !== t) : [...x.value, t];
713
+ h.value = h.value.includes(t) ? h.value.filter((s) => s !== t) : [...h.value, t];
745
714
  }
746
715
  function te() {
747
- x.value = [], a.value = null;
716
+ h.value = [], a.value = null;
748
717
  }
749
718
  function le(t) {
750
719
  return t.domains.includes("mobile") || t.domains.some((s) => s.startsWith("pos-"));
751
720
  }
752
721
  function ce(t) {
753
- return d.value && le(t) ? I.value[t.name] === !0 : t.enabled === !0;
722
+ return d.value && le(t) ? V.value[t.name] === !0 : t.enabled === !0;
754
723
  }
755
724
  async function de(t) {
756
725
  if (!t) {
757
- I.value = {};
726
+ V.value = {};
758
727
  return;
759
728
  }
760
729
  const s = t;
761
730
  W.value = !0;
762
731
  try {
763
- const { flags: B } = await w.listForScope(s);
764
- d.value === s && (I.value = Object.fromEntries(B.map((q) => [q.name, q.enabled])));
765
- } catch (B) {
766
- console.error("Unable to load feature flags for the selected scope", B), d.value === s && (I.value = {});
732
+ const [{ flags: D }] = await Promise.all([
733
+ S.listForScope(s),
734
+ v.retryLoad()
735
+ ]);
736
+ d.value === s && (V.value = Object.fromEntries(D.map((K) => [K.name, K.enabled])));
737
+ } catch (D) {
738
+ console.error("Unable to load feature flags for the selected scope", D), d.value === s && (V.value = {});
767
739
  } finally {
768
740
  d.value === s && (W.value = !1);
769
741
  }
770
742
  }
771
- j(
743
+ J(
772
744
  () => {
773
745
  var t;
774
- return (t = k.currentBusiness.value) != null && t._id ? `business_${k.currentBusiness.value._id}` : null;
746
+ return (t = x.currentBusiness.value) != null && t._id ? `business_${x.currentBusiness.value._id}` : null;
775
747
  },
776
748
  (t) => {
777
749
  var s;
778
750
  d.value || (d.value = ((s = T._currentLocation) == null ? void 0 : s.dbName) ?? t);
779
751
  },
780
752
  { immediate: !0 }
781
- ), j(d, de, { immediate: !0 });
753
+ ), J(d, de, { immediate: !0 });
782
754
  function re(t) {
783
- return g.has(t.name) ? "Deprecated" : f[t.name] ? "Deprecate Soon" : "In use";
755
+ return b.has(t.name) ? "Deprecated" : _[t.name] ? "Deprecate Soon" : "In use";
784
756
  }
785
757
  function pe(t) {
786
758
  return t === "Deprecated" ? "bg-red-50 text-red-700" : t === "Deprecate Soon" ? "bg-fm-color-state-warning-subtle text-fm-color-state-warning-base" : "bg-green-50 text-green-700";
@@ -789,17 +761,17 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
789
761
  return t.features.length === 0 ? ["Controls the availability of this inventory feature."] : t.features.length === 1 ? [t.features[0].controls] : t.features.map((s) => `${s.label}: ${s.controls}`);
790
762
  }
791
763
  function ve(t) {
792
- return g.has(t.name) ? "This flag is deprecated. Use its supported replacement for new work." : f[t.name];
764
+ return b.has(t.name) ? "This flag is deprecated. Use its supported replacement for new work." : _[t.name];
793
765
  }
794
- const fe = E(() => [
766
+ const fe = A(() => [
795
767
  {
796
768
  accessorKey: "name",
797
769
  header: "Feature flag",
798
770
  meta: { width: "27%" },
799
- cell: ({ row: t }) => V("div", { class: "flex flex-wrap items-center gap-2" }, [
800
- V("span", { class: "break-all font-mono text-xs text-gray-700" }, t.original.name),
771
+ cell: ({ row: t }) => B("div", { class: "flex flex-wrap items-center gap-2" }, [
772
+ B("span", { class: "break-all font-mono text-xs text-gray-700" }, t.original.name),
801
773
  ...t.original.features.slice(0, 1).map(
802
- (s) => V(He, {
774
+ (s) => B(He, {
803
775
  tier: s.category === "premium" ? "premium" : "standard",
804
776
  category: s.category,
805
777
  deprecateSoon: s.deprecateSoon,
@@ -812,11 +784,11 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
812
784
  id: "domains",
813
785
  header: "Domains",
814
786
  meta: { width: "19%" },
815
- cell: ({ row: t }) => V(
787
+ cell: ({ row: t }) => B(
816
788
  "div",
817
789
  { class: "flex flex-wrap gap-2" },
818
790
  t.original.domains.map(
819
- (s) => V(
791
+ (s) => B(
820
792
  "span",
821
793
  {
822
794
  class: "rounded-full bg-fm-color-neutral-gray-100 px-2 py-0.5 text-xs font-medium text-fm-color-typo-secondary"
@@ -832,11 +804,11 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
832
804
  meta: { width: "29%" },
833
805
  cell: ({ row: t }) => {
834
806
  const s = ve(t.original);
835
- return V("div", { class: "flex flex-col gap-2 text-xs" }, [
807
+ return B("div", { class: "flex flex-col gap-2 text-xs" }, [
836
808
  ...me(t.original).map(
837
- (B) => V("span", { class: "text-fm-color-typo-secondary" }, B)
809
+ (D) => B("span", { class: "text-fm-color-typo-secondary" }, D)
838
810
  ),
839
- ...s ? [V("span", { class: "text-fm-color-state-warning-base" }, s)] : []
811
+ ...s ? [B("span", { class: "text-fm-color-state-warning-base" }, s)] : []
840
812
  ]);
841
813
  }
842
814
  },
@@ -846,7 +818,7 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
846
818
  meta: { width: "13%" },
847
819
  cell: ({ row: t }) => {
848
820
  const s = re(t.original);
849
- return s === "Deprecate Soon" ? V(Me) : V(
821
+ return s === "Deprecate Soon" ? B(Ne) : B(
850
822
  "span",
851
823
  {
852
824
  class: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${pe(s)}`
@@ -861,63 +833,63 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
861
833
  meta: { width: "12%" },
862
834
  cell: ({ row: t }) => {
863
835
  const s = !!d.value && le(t.original);
864
- return V("div", { class: "flex flex-col items-end gap-2" }, [
865
- V(p, { modelValue: ce(t.original), disabled: !0, showIcon: !0 }),
866
- ...s && W.value ? [V("span", { class: "text-xs text-gray-500" }, "Loading location value…")] : [],
867
- ...t.original.features.some((B) => B.category === "premium") && t.original.enabled !== !0 && !s ? [V("span", { class: "text-xs text-gray-500" }, "Controlled by the Premium plan")] : []
836
+ return B("div", { class: "flex flex-col items-end gap-2" }, [
837
+ B(m, { modelValue: ce(t.original), disabled: !0, showIcon: !0 }),
838
+ ...s && W.value ? [B("span", { class: "text-xs text-gray-500" }, "Loading location value…")] : [],
839
+ ...t.original.features.some((D) => D.category === "premium") && t.original.enabled !== !0 && !s ? [B("span", { class: "text-xs text-gray-500" }, "Controlled by the Premium plan")] : []
868
840
  ]);
869
841
  }
870
842
  }
871
843
  ]);
872
844
  return (t, s) => {
873
- const B = L("FmChip"), q = L("FmButton");
874
- return o(), i("div", Yt, [
875
- m(Gt, { "scope-db-name": d.value }, null, 8, ["scope-db-name"]),
876
- l("div", Jt, [
877
- m(Re, {
845
+ const D = L("FmChip"), K = L("FmButton");
846
+ return o(), r("div", Kt, [
847
+ p(jt),
848
+ l("div", qt, [
849
+ p(Me, {
878
850
  "model-value": d.value,
879
851
  "onUpdate:modelValue": s[0] || (s[0] = (F) => d.value = F),
880
852
  "selection-only": "",
881
853
  "show-business": ""
882
854
  }, null, 8, ["model-value"]),
883
- (o(!0), i(A, null, J(x.value, (F) => (o(), O(B, {
855
+ (o(!0), r(E, null, Y(h.value, (F) => (o(), z(D, {
884
856
  key: F,
885
857
  label: `domain in ${F}`,
886
858
  removable: "",
887
859
  onChipClosed: (ie) => ne(F)
888
860
  }, null, 8, ["label", "onChipClosed"]))), 128)),
889
- a.value ? (o(), O(B, {
861
+ a.value ? (o(), z(D, {
890
862
  key: 0,
891
863
  label: `status in ${a.value}`,
892
864
  removable: "",
893
865
  onChipClosed: s[1] || (s[1] = (F) => a.value = null)
894
866
  }, null, 8, ["label"])) : Z("", !0),
895
- m(S(v), {
867
+ p(w(f), {
896
868
  "close-on-click": !1,
897
869
  width: 288,
898
870
  "max-height": 420,
899
871
  placement: "bottom-start"
900
872
  }, {
901
- "menu-button": z(() => [
902
- m(q, {
873
+ "menu-button": P(() => [
874
+ p(K, {
903
875
  label: "Filter",
904
876
  "prepend-icon": "add",
905
877
  variant: "secondary"
906
878
  })
907
879
  ]),
908
- default: z(() => [
909
- m(S(n), { label: "Domains" }),
910
- (o(!0), i(A, null, J(U.value, (F) => (o(), O(S(r), {
880
+ default: P(() => [
881
+ p(w(c), { label: "Domains" }),
882
+ (o(!0), r(E, null, Y(U.value, (F) => (o(), z(w(u), {
911
883
  key: F,
912
884
  label: F,
913
885
  selectable: "",
914
886
  "has-checkbox": "",
915
- "model-value": x.value.includes(F),
887
+ "model-value": h.value.includes(F),
916
888
  onClick: (ie) => ne(F)
917
889
  }, null, 8, ["label", "model-value", "onClick"]))), 128)),
918
- m(S(y)),
919
- m(S(n), { label: "Status" }),
920
- (o(), i(A, null, J(D, (F) => m(S(r), {
890
+ p(w(g)),
891
+ p(w(c), { label: "Status" }),
892
+ (o(), r(E, null, Y($, (F) => p(w(u), {
921
893
  key: F,
922
894
  label: F,
923
895
  selectable: "",
@@ -928,16 +900,16 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
928
900
  ]),
929
901
  _: 1
930
902
  }),
931
- x.value.length || a.value ? (o(), O(q, {
903
+ h.value.length || a.value ? (o(), z(K, {
932
904
  key: 1,
933
905
  label: "Clear all",
934
906
  variant: "tertiary",
935
907
  onClick: te
936
908
  })) : Z("", !0)
937
909
  ]),
938
- m(S($), {
910
+ p(w(O), {
939
911
  "column-defs": fe.value,
940
- "row-data": H.value,
912
+ "row-data": N.value,
941
913
  "page-size": 50,
942
914
  "hide-footer": "",
943
915
  "shrink-at": !1
@@ -945,81 +917,81 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
945
917
  ]);
946
918
  };
947
919
  }
948
- }), Qt = { class: "flex w-full flex-col gap-16 p-16" }, Xt = {
920
+ }), Yt = { class: "flex w-full flex-col gap-16 p-16" }, Jt = {
949
921
  key: 0,
950
922
  class: "py-32 text-center"
951
- }, Zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, el = {
923
+ }, Wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qt = {
952
924
  class: "flex gap-2 border-b border-gray-200",
953
925
  role: "tablist"
954
- }, tl = ["aria-selected"], ll = ["aria-selected"], ol = { key: 0 }, al = { class: "flex items-center justify-between gap-12" }, sl = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary" }, nl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rl = {
926
+ }, Xt = ["aria-selected"], Zt = ["aria-selected"], el = { key: 0 }, tl = { class: "flex items-center justify-between gap-12" }, ll = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary" }, ol = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, al = {
955
927
  key: 1,
956
928
  class: "w-full"
957
- }, il = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, kl = /* @__PURE__ */ ee({
929
+ }, sl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _l = /* @__PURE__ */ ee({
958
930
  __name: "SettingsView",
959
- setup(N) {
960
- const { t: h } = Ee(), T = ye(), k = Ie(), w = _(!1), p = _("order"), $ = E(() => {
961
- var n, r;
962
- return ((r = (n = T.sessionUser.value) == null ? void 0 : n.role) == null ? void 0 : r.isAdmin) === !0;
931
+ setup(H) {
932
+ const { t: v } = Ee(), T = ye(), x = Ie(), S = k(!1), m = k("order"), O = A(() => {
933
+ var c, u;
934
+ return ((u = (c = T.sessionUser.value) == null ? void 0 : c.role) == null ? void 0 : u.isAdmin) === !0;
963
935
  });
964
- function v() {
965
- k.invalidate(), k.fetchTemplates();
936
+ function f() {
937
+ x.invalidate(), x.fetchTemplates();
966
938
  }
967
- function y() {
968
- k.fetchTemplates(), w.value = !0;
939
+ function g() {
940
+ x.fetchTemplates(), S.value = !0;
969
941
  }
970
- return (n, r) => {
971
- const g = L("FmButton");
972
- return o(), O(Fe, {
973
- title: S(h)("inventory.settings.title")
942
+ return (c, u) => {
943
+ const b = L("FmButton");
944
+ return o(), z(Fe, {
945
+ title: w(v)("inventory.settings.title")
974
946
  }, {
975
- default: z(() => [
976
- l("div", Qt, [
977
- $.value ? (o(), i(A, { key: 1 }, [
978
- l("div", el, [
947
+ default: P(() => [
948
+ l("div", Yt, [
949
+ O.value ? (o(), r(E, { key: 1 }, [
950
+ l("div", Qt, [
979
951
  l("button", {
980
952
  type: "button",
981
953
  role: "tab",
982
- "aria-selected": p.value === "order",
954
+ "aria-selected": m.value === "order",
983
955
  class: ue([
984
956
  "border-b-2 px-3 py-2 text-sm font-medium",
985
- p.value === "order" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
957
+ m.value === "order" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
986
958
  ]),
987
- onClick: r[0] || (r[0] = (f) => p.value = "order")
988
- }, C(S(h)("inventory.settings.order.title")), 11, tl),
959
+ onClick: u[0] || (u[0] = (_) => m.value = "order")
960
+ }, C(w(v)("inventory.settings.order.title")), 11, Xt),
989
961
  l("button", {
990
962
  type: "button",
991
963
  role: "tab",
992
- "aria-selected": p.value === "features",
964
+ "aria-selected": m.value === "features",
993
965
  class: ue([
994
966
  "border-b-2 px-3 py-2 text-sm font-medium",
995
- p.value === "features" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
967
+ m.value === "features" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
996
968
  ]),
997
- onClick: r[1] || (r[1] = (f) => p.value = "features")
998
- }, C(S(h)("inventory.settings.features.title")), 11, ll)
969
+ onClick: u[1] || (u[1] = (_) => m.value = "features")
970
+ }, C(w(v)("inventory.settings.features.title")), 11, Zt)
999
971
  ]),
1000
- p.value === "order" ? (o(), i("div", ol, [
1001
- l("div", al, [
1002
- l("h2", sl, C(S(h)("inventory.settings.order.printTemplates")), 1),
1003
- m(g, {
1004
- onClick: y,
972
+ m.value === "order" ? (o(), r("div", el, [
973
+ l("div", tl, [
974
+ l("h2", ll, C(w(v)("inventory.settings.order.printTemplates")), 1),
975
+ p(b, {
976
+ onClick: g,
1005
977
  variant: "secondary",
1006
- label: S(h)("inventory.settings.printTemplate.edit")
978
+ label: w(v)("inventory.settings.printTemplate.edit")
1007
979
  }, null, 8, ["label"])
1008
980
  ]),
1009
- l("p", nl, C(S(h)("inventory.settings.printTemplate.description")), 1)
1010
- ])) : (o(), i("div", rl, [
1011
- l("p", il, C(S(h)("inventory.settings.features.description")), 1),
1012
- m(Wt)
981
+ l("p", ol, C(w(v)("inventory.settings.printTemplate.description")), 1)
982
+ ])) : (o(), r("div", al, [
983
+ l("p", sl, C(w(v)("inventory.settings.features.description")), 1),
984
+ p(Gt)
1013
985
  ]))
1014
- ], 64)) : (o(), i("div", Xt, [
1015
- l("p", Zt, C(S(h)("inventory.settings.adminOnly")), 1)
986
+ ], 64)) : (o(), r("div", Jt, [
987
+ l("p", Wt, C(w(v)("inventory.settings.adminOnly")), 1)
1016
988
  ]))
1017
989
  ]),
1018
- (o(), O(we, { to: "body" }, [
1019
- m(Ut, {
1020
- modelValue: w.value,
1021
- "onUpdate:modelValue": r[2] || (r[2] = (f) => w.value = f),
1022
- onSaved: v
990
+ (o(), z(we, { to: "body" }, [
991
+ p(At, {
992
+ modelValue: S.value,
993
+ "onUpdate:modelValue": u[2] || (u[2] = (_) => S.value = _),
994
+ onSaved: f
1023
995
  }, null, 8, ["modelValue"])
1024
996
  ]))
1025
997
  ]),
@@ -1029,5 +1001,5 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
1029
1001
  }
1030
1002
  });
1031
1003
  export {
1032
- kl as default
1004
+ _l as default
1033
1005
  };