@feedmepos/mf-brand-app-builder 0.5.28-prod → 0.5.30-dev.0

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 (28) hide show
  1. package/dist/{App-BjzhfhpF.js → App-a34dXdKR.js} +7 -7
  2. package/dist/{AssetsSettings-DJOCXmyp.js → AssetsSettings-DhprCc4v.js} +18 -18
  3. package/dist/BrandkitView-DyMY_wX_.js +10773 -0
  4. package/dist/{BuilderView-CeBhUmEZ.js → BuilderView-ByQ3ibzf.js} +8 -8
  5. package/dist/{ImageUpload-odamvjyc.js → ImageUpload-C1GXh8yx.js} +8 -8
  6. package/dist/{LinkButton-DNXBKGCn.js → LinkButton-De-YNclu.js} +1 -1
  7. package/dist/{ListRepeater-Cwbdyrr4.js → ListRepeater-DN84BgE2.js} +1 -1
  8. package/dist/{ManagementSettings-DHh2g_XJ.js → ManagementSettings-CueLn4v_.js} +6 -6
  9. package/dist/{ProjectView-DKXRpIC6.js → ProjectView-ByxaVBFb.js} +1 -1
  10. package/dist/{app-Bh_S4QSD.js → app-Box0RGix.js} +19 -25
  11. package/dist/app.js +1 -1
  12. package/dist/brand-core/src/brandkit.d.ts +2 -2
  13. package/dist/brand-core/src/entity.d.ts +50 -0
  14. package/dist/brandkit-CyhkM7H0.js +127 -0
  15. package/dist/client/merchant/src/app.d.ts +10 -16
  16. package/dist/client/merchant/src/stores/business/index.d.ts +318 -0
  17. package/dist/{image-S7-2rbQS.js → image-D_Djf1PS.js} +7 -7
  18. package/dist/{index-CPs0rWCO.js → index-Bk6TOZrx.js} +15 -15
  19. package/dist/{index-CawZ03Z8.js → index-C1rSMuKA.js} +1 -1
  20. package/dist/index-C4vwWvn_.js +112 -0
  21. package/dist/{index-C6_vWPi0.js → index-D0LOMBBD.js} +27 -27
  22. package/dist/{main-TiuQoOa_.js → main-LSAkXdRX.js} +218 -226
  23. package/dist/package.json +3 -3
  24. package/dist/style.css +1 -1
  25. package/package.json +2 -2
  26. package/dist/BrandkitView-DoW1oGaQ.js +0 -9996
  27. package/dist/brandkit-OeLZ05mv.js +0 -101
  28. package/dist/index-BUEKCOG0.js +0 -112
@@ -1,19 +1,19 @@
1
1
  import { resolveComponent as V, TransitionGroup as qn, defineComponent as se, nextTick as rn, h as ma, isRef as Qn, isReactive as eo, isProxy as to, toRaw as ao, ref as q, computed as ie, createElementBlock as Z, openBlock as N, Fragment as Le, renderList as vt, createElementVNode as I, createVNode as w, createBlock as ae, createCommentVNode as Q, toDisplayString as j, unref as v, withCtx as M, normalizeClass as ye, watch as tt, withDirectives as Gt, withModifiers as ba, vShow as Xt, createTextVNode as no, onMounted as ln, resolveDynamicComponent as Ma, mergeProps as oo, normalizeProps as ro, guardReactiveProps as io, normalizeStyle as lo, renderSlot as wa, provide as so, inject as co, markRaw as uo } from "vue";
2
- import { T as po, u as Ge } from "./index-CPs0rWCO.js";
2
+ import { T as po, u as Ge } from "./index-Bk6TOZrx.js";
3
3
  import { defineStore as mo, storeToRefs as bo } from "pinia";
4
4
  import { p as fo } from "./views-BDWw3w14.js";
5
- import { A as go } from "./index-C6_vWPi0.js";
5
+ import { A as go } from "./index-D0LOMBBD.js";
6
6
  import { v as Ra } from "./v4-CKwdnpQf.js";
7
7
  import { _ as ho } from "./Icon.vue_vue_type_style_index_0_lang-BcRjQndc.js";
8
8
  import { B as sn } from "./BaDivider-Cp9gfB4r.js";
9
9
  import { useI18n as Ze, useCoreStore as We } from "@feedmepos/mf-common";
10
- import { C as $a, _ as yo, a as vo } from "./main-TiuQoOa_.js";
10
+ import { C as $a, _ as yo, a as vo } from "./main-LSAkXdRX.js";
11
11
  import { useDialog as To, components as xo, useSnackbar as Co } from "@feedmepos/ui-library";
12
12
  import { useRouter as dn } from "vue-router";
13
- import { u as Ia, a as _o, b as wo } from "./brandkit-OeLZ05mv.js";
14
- import { u as Ea } from "./index-CawZ03Z8.js";
13
+ import { u as Ia, a as _o, b as wo } from "./brandkit-CyhkM7H0.js";
14
+ import { u as Ea } from "./index-C1rSMuKA.js";
15
15
  import { K as Io, V as Eo } from "./vue-sonner-CBFYmm8_.js";
16
- import { F as So, a as Ao } from "./app-Bh_S4QSD.js";
16
+ import { F as So, a as Ao } from "./app-Box0RGix.js";
17
17
  /**!
18
18
  * Sortable 1.14.0
19
19
  * @author RubaXa <trash@rubaxa.org>
@@ -6605,7 +6605,7 @@ const ai = { class: "mb-24" }, ni = { class: "fm-typo-en-title-lg-700 text-fm-co
6605
6605
  }
6606
6606
  async function g() {
6607
6607
  var y;
6608
- const f = `${"https://{slug}.feedme.vip".replace("{slug}", `${r.currentBusiness.value.url ?? ((y = r.currentBusiness.value) == null ? void 0 : y.id)}`)}`;
6608
+ const f = `${"https://{slug}.feedmedev.vip".replace("{slug}", `${r.currentBusiness.value.url ?? ((y = r.currentBusiness.value) == null ? void 0 : y.id)}`)}`;
6609
6609
  l.promise(
6610
6610
  async () => {
6611
6611
  var x;
@@ -8171,7 +8171,7 @@ _t.toString = Oa.bind(null, function(t, e, a) {
8171
8171
  const xl = { class: "flex items-center justify-center" }, Cl = { class: "w-full flex gap-8 justify-end items-center" }, _l = /* @__PURE__ */ se({
8172
8172
  __name: "PreviewQrCode",
8173
8173
  setup(t) {
8174
- const e = q(), a = We(), n = Ge(), { t: o } = Ze(), r = q(!1), l = ie(() => `${`${"https://{slug}.feedme.vip".replace("{slug}", `${a.currentBusiness.value.url ?? a.currentBusiness.value._id}`)}`}/preview/${n.state.selectedTemplate.templateId}`);
8174
+ const e = q(), a = We(), n = Ge(), { t: o } = Ze(), r = q(!1), l = ie(() => `${`${"https://{slug}.feedmedev.vip".replace("{slug}", `${a.currentBusiness.value.url ?? a.currentBusiness.value._id}`)}`}/preview/${n.state.selectedTemplate.templateId}`);
8175
8175
  function i() {
8176
8176
  Io.promise(navigator.clipboard.writeText(l.value), {
8177
8177
  loading: o("brand.template.shareMenu.copying"),
@@ -1,7 +1,7 @@
1
- import { defineComponent as y, ref as b, resolveComponent as w, createElementBlock as r, openBlock as s, createVNode as c, createCommentVNode as d, Fragment as C, createElementVNode as i, unref as u } from "vue";
2
- import { r as g, I as h } from "./image-S7-2rbQS.js";
1
+ import { defineComponent as y, ref as b, resolveComponent as w, createElementBlock as r, openBlock as s, createVNode as c, createCommentVNode as f, Fragment as C, createElementVNode as i, unref as u } from "vue";
2
+ import { r as g, I as h } from "./image-D_Djf1PS.js";
3
3
  import { useCoreStore as I } from "@feedmepos/mf-common";
4
- import "./main-TiuQoOa_.js";
4
+ import "./main-LSAkXdRX.js";
5
5
  import { _ as $ } from "./Icon.vue_vue_type_style_index_0_lang-BcRjQndc.js";
6
6
  import { C as k } from "./CircularProgress-DdblYCtV.js";
7
7
  import { v as F } from "./v4-CKwdnpQf.js";
@@ -22,12 +22,12 @@ const B = { class: "w-full h-[210px] relative" }, P = { class: "absolute z-[1] t
22
22
  o
23
23
  ).then((m) => {
24
24
  var p;
25
- const l = `https://image.feedme.cc/business/${a.currentBusiness.value._id}/${m.imagePath}`;
25
+ const l = `https://image.feedmedev.cc/business/${a.currentBusiness.value._id}/${m.imagePath}`;
26
26
  e.context.node.input(l);
27
27
  const n = new Image();
28
28
  (p = e.context) != null && p.ignoreUpdate || (n.onload = () => {
29
- var f;
30
- ((f = e.context.node.at("$root")) == null ? void 0 : f._value).containerStyles.height = `${Math.min(n.height, 400)}px`;
29
+ var d;
30
+ ((d = e.context.node.at("$root")) == null ? void 0 : d._value).containerStyles.height = `${Math.min(n.height, 400)}px`;
31
31
  }), n.src = g(l);
32
32
  }).finally(() => t.value = !1);
33
33
  }
@@ -60,10 +60,10 @@ const B = { class: "w-full h-[210px] relative" }, P = { class: "absolute z-[1] t
60
60
  class: "!text-[16px] text-fm-color-typo-white"
61
61
  })
62
62
  ])
63
- ], 64)) : d("", !0),
63
+ ], 64)) : f("", !0),
64
64
  t.value ? (s(), r("div", z, [
65
65
  c(u(k))
66
- ])) : d("", !0)
66
+ ])) : f("", !0)
67
67
  ]);
68
68
  };
69
69
  }
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as I, ref as f, computed as k, onBeforeMount as L, resolveComponent as c, createBlock as v, openBlock as u, withCtx as m, createElementVNode as a, createVNode as r, createElementBlock as x, Fragment as M, renderList as F, toDisplayString as P, withModifiers as R } from "vue";
2
2
  import { B as y } from "./BaDivider-Cp9gfB4r.js";
3
3
  import { _ as W } from "./Icon.vue_vue_type_style_index_0_lang-BcRjQndc.js";
4
- import { u as $ } from "./index-CPs0rWCO.js";
4
+ import { u as $ } from "./index-Bk6TOZrx.js";
5
5
  import "@feedmepos/mf-common";
6
6
  const j = {
7
7
  key: 1,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as b, resolveComponent as y, createBlock as s, openBlock as c, unref as u, withCtx as i, createElementBlock as m, Fragment as x, renderList as g, createElementVNode as p, createVNode as n, resolveDynamicComponent as F } from "vue";
2
- import { F as f } from "./app-Bh_S4QSD.js";
2
+ import { F as f } from "./app-Box0RGix.js";
3
3
  const h = { class: "flex justify-end gap-4 items-center w-full py-16 px-12 border-b" }, z = { class: "flex flex-col gap-4 w-full p-12" }, I = /* @__PURE__ */ b({
4
4
  __name: "ListRepeater",
5
5
  props: {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as C, ref as y, computed as S, watch as $, resolveComponent as d, createElementBlock as k, openBlock as g, createElementVNode as o, createVNode as u, toDisplayString as _, unref as i, createBlock as F, withCtx as U } from "vue";
2
2
  import { useCoreStore as P, useI18n as V } from "@feedmepos/mf-common";
3
- import { B as h } from "./index-BUEKCOG0.js";
3
+ import { B as h } from "./index-C4vwWvn_.js";
4
4
  import { K as q } from "./vue-sonner-CBFYmm8_.js";
5
- import { r as I, I as T } from "./image-S7-2rbQS.js";
5
+ import { r as I, I as T } from "./image-D_Djf1PS.js";
6
6
  import { useSnackbar as A } from "@feedmepos/ui-library";
7
7
  const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
8
8
  "brand",
@@ -510,12 +510,12 @@ const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
510
510
  url: "",
511
511
  thumbnail: ""
512
512
  }), x = S(
513
- () => "https://{slug}.feedme.vip".replace("https://{slug}", "")
513
+ () => "https://{slug}.feedmedev.vip".replace("https://{slug}", "")
514
514
  );
515
515
  function B() {
516
516
  var t, e;
517
517
  navigator.clipboard.writeText(
518
- "https://{slug}.feedme.vip".replace(
518
+ "https://{slug}.feedmedev.vip".replace(
519
519
  "{slug}",
520
520
  ((t = s.currentBusiness.value) == null ? void 0 : t.url) ?? ((e = s.currentBusiness.value) == null ? void 0 : e._id)
521
521
  )
@@ -574,9 +574,9 @@ const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
574
574
  await h.updateBusinessProfile(s.currentBusiness.value._id, {
575
575
  name: a.value.name,
576
576
  url: a.value.url,
577
- thumbnail: `https://image.feedme.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`,
577
+ thumbnail: `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`,
578
578
  coverPhoto: s.currentBusiness.value.coverPhoto
579
- }), a.value.thumbnail = `https://image.feedme.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`;
579
+ }), a.value.thumbnail = `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`;
580
580
  });
581
581
  }
582
582
  return $(
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as S, createElementBlock as D, openBlock as I, normalizeClass as m, createElementVNode as E, toDisplayString as C, ref as x, computed as J, watch as K, resolveComponent as l, unref as h, Fragment as v, renderList as W, createVNode as B, createCommentVNode as s, createBlock as r, withCtx as P, h as L } from "vue";
2
- import { u as Z } from "./index-CPs0rWCO.js";
2
+ import { u as Z } from "./index-Bk6TOZrx.js";
3
3
  import { useCoreStore as q, useI18n as X } from "@feedmepos/mf-common";
4
4
  import { p as y } from "./views-BDWw3w14.js";
5
5
  import { useRouter as b } from "vue-router";
@@ -4418,7 +4418,6 @@ const wn = {
4418
4418
  titles: "{count} titles: {names}",
4419
4419
  pointsPrice: "{points} points",
4420
4420
  or: "or",
4421
- discount: "Save {discount}",
4422
4421
  redeemSuccess: "{name} successfully redeemed",
4423
4422
  purchaseCompleted: "Purchase Completed",
4424
4423
  purchaseSuccessful: "Your purchase was successful!",
@@ -4892,9 +4891,6 @@ const wn = {
4892
4891
  emptyTitle: "商店套餐将显示在这里!",
4893
4892
  emptySubtitle: "目前没有可兑换的套餐。请稍后查看!",
4894
4893
  bundle: {
4895
- pointsPrice: "{points}点数",
4896
- or: "或",
4897
- discount: "节省 {discount}",
4898
4894
  stripeLabel: "使用Stripe订阅",
4899
4895
  pointsLabel: "点数",
4900
4896
  redeemTitle: "兑换",
@@ -4923,6 +4919,8 @@ const wn = {
4923
4919
  credit: "积分:{count}积分",
4924
4920
  vouchers: "{count}张优惠券:{names}",
4925
4921
  titles: "{count}个称号:{names}",
4922
+ pointsPrice: "{points}点数",
4923
+ or: "或",
4926
4924
  redeemSuccess: "{name}兑换成功",
4927
4925
  purchaseCompleted: "购买完成",
4928
4926
  purchaseSuccessful: "您的购买已成功!",
@@ -5425,9 +5423,6 @@ const wn = {
5425
5423
  emptyTitle: "商店套餐將顯示在這裡!",
5426
5424
  emptySubtitle: "目前沒有可兌換的套餐。請稍後查看!",
5427
5425
  bundle: {
5428
- pointsPrice: "{points}點數",
5429
- or: "或",
5430
- discount: "節省 {discount}",
5431
5426
  stripeLabel: "使用Stripe訂閱",
5432
5427
  pointsLabel: "點數",
5433
5428
  redeemTitle: "兌換",
@@ -5456,6 +5451,8 @@ const wn = {
5456
5451
  credit: "積分:{count}積分",
5457
5452
  vouchers: "{count}張優惠券:{names}",
5458
5453
  titles: "{count}個稱號:{names}",
5454
+ pointsPrice: "{points}點數",
5455
+ or: "或",
5459
5456
  redeemSuccess: "{name}兌換成功",
5460
5457
  purchaseCompleted: "購買完成",
5461
5458
  purchaseSuccessful: "您的購買已成功!",
@@ -5935,9 +5932,6 @@ const wn = {
5935
5932
  emptyTitle: "แพ็คเกจร้านค้าจะปรากฏที่นี่!",
5936
5933
  emptySubtitle: "ไม่มีแพ็คเกจที่สามารถแลกได้ในขณะนี้ กลับมาดูใหม่ภายหลัง!",
5937
5934
  bundle: {
5938
- pointsPrice: "{points} คะแนน",
5939
- or: "หรือ",
5940
- discount: "ประหยัด {discount}",
5941
5935
  stripeLabel: "สมัครด้วย Stripe",
5942
5936
  pointsLabel: "คะแนน",
5943
5937
  redeemTitle: "แลก",
@@ -5966,6 +5960,8 @@ const wn = {
5966
5960
  credit: "เครดิต: {count} เครดิต",
5967
5961
  vouchers: "{count} คูปอง: {names}",
5968
5962
  titles: "{count} ตำแหน่ง: {names}",
5963
+ pointsPrice: "{points} คะแนน",
5964
+ or: "หรือ",
5969
5965
  redeemSuccess: "แลก {name} สำเร็จ",
5970
5966
  purchaseCompleted: "การซื้อเสร็จสิ้น",
5971
5967
  purchaseSuccessful: "การซื้อของคุณสำเร็จแล้ว!",
@@ -6485,9 +6481,6 @@ const wn = {
6485
6481
  emptyTitle: "스토어 번들이 여기에 표시됩니다!",
6486
6482
  emptySubtitle: "현재 교환 가능한 번들이 없습니다. 나중에 다시 확인해주세요!",
6487
6483
  bundle: {
6488
- pointsPrice: "{points} 포인트",
6489
- or: "또는",
6490
- discount: "{discount} 할인",
6491
6484
  stripeLabel: "Stripe로 구독",
6492
6485
  pointsLabel: "포인트",
6493
6486
  redeemTitle: "교환",
@@ -6516,6 +6509,8 @@ const wn = {
6516
6509
  credit: "크레딧: {count} 크레딧",
6517
6510
  vouchers: "{count} 쿠폰: {names}",
6518
6511
  titles: "{count} 칭호: {names}",
6512
+ pointsPrice: "{points} 포인트",
6513
+ or: "또는",
6519
6514
  redeemSuccess: "{name} 교환 성공",
6520
6515
  purchaseCompleted: "구매 완료",
6521
6516
  purchaseSuccessful: "구매가 성공적으로 완료되었습니다!",
@@ -7027,9 +7022,6 @@ const wn = {
7027
7022
  emptyTitle: "Các gói cửa hàng sẽ xuất hiện ở đây!",
7028
7023
  emptySubtitle: "Hiện không có gói nào có thể đổi. Hãy kiểm tra lại sau!",
7029
7024
  bundle: {
7030
- pointsPrice: "{points} điểm",
7031
- or: "hoặc",
7032
- discount: "Tiết kiệm {discount}",
7033
7025
  stripeLabel: "Đăng ký với Stripe",
7034
7026
  pointsLabel: "Điểm",
7035
7027
  redeemTitle: "Đổi",
@@ -7058,6 +7050,8 @@ const wn = {
7058
7050
  credit: "Tín dụng: {count} tín dụng",
7059
7051
  vouchers: "{count} phiếu giảm giá: {names}",
7060
7052
  titles: "{count} danh hiệu: {names}",
7053
+ pointsPrice: "{points} điểm",
7054
+ or: "hoặc",
7061
7055
  redeemSuccess: "Đổi {name} thành công",
7062
7056
  purchaseCompleted: "Giao dịch hoàn tất",
7063
7057
  purchaseSuccessful: "Giao dịch của bạn đã thành công!",
@@ -7115,12 +7109,12 @@ const wn = {
7115
7109
  {
7116
7110
  path: "/",
7117
7111
  name: "brandkit",
7118
- component: H(() => import("./BrandkitView-DoW1oGaQ.js"))
7112
+ component: H(() => import("./BrandkitView-DyMY_wX_.js"))
7119
7113
  },
7120
7114
  {
7121
7115
  path: "/projects",
7122
7116
  name: "projects",
7123
- component: H(() => import("./ProjectView-DKXRpIC6.js"))
7117
+ component: H(() => import("./ProjectView-ByxaVBFb.js"))
7124
7118
  },
7125
7119
  {
7126
7120
  path: "/builder",
@@ -7130,7 +7124,7 @@ const wn = {
7130
7124
  path: ":templateId(.*)*",
7131
7125
  name: "builder",
7132
7126
  component: H(
7133
- () => import("./BuilderView-CeBhUmEZ.js")
7127
+ () => import("./BuilderView-ByQ3ibzf.js")
7134
7128
  )
7135
7129
  }
7136
7130
  ]
@@ -7145,14 +7139,14 @@ const wn = {
7145
7139
  path: "assets",
7146
7140
  name: "settings-assets",
7147
7141
  component: H(
7148
- () => import("./AssetsSettings-DJOCXmyp.js")
7142
+ () => import("./AssetsSettings-DhprCc4v.js")
7149
7143
  )
7150
7144
  },
7151
7145
  {
7152
7146
  path: "management",
7153
7147
  name: "settings-management",
7154
7148
  component: H(
7155
- () => import("./ManagementSettings-DHh2g_XJ.js")
7149
+ () => import("./ManagementSettings-CueLn4v_.js")
7156
7150
  )
7157
7151
  }
7158
7152
  ]
@@ -11831,7 +11825,7 @@ const Ac = (e) => {
11831
11825
  ),
11832
11826
  BaListRepeater: K(
11833
11827
  H(
11834
- () => import("./ListRepeater-Cwbdyrr4.js")
11828
+ () => import("./ListRepeater-DN84BgE2.js")
11835
11829
  )
11836
11830
  ),
11837
11831
  BaTextStyleList: K(
@@ -11851,13 +11845,13 @@ const Ac = (e) => {
11851
11845
  ),
11852
11846
  BaImageUpload: K(
11853
11847
  H(
11854
- () => import("./ImageUpload-odamvjyc.js")
11848
+ () => import("./ImageUpload-C1GXh8yx.js")
11855
11849
  ),
11856
11850
  { props: ["ignoreUpdate"] }
11857
11851
  ),
11858
11852
  BaLinkButton: K(
11859
11853
  H(
11860
- () => import("./LinkButton-DNXBKGCn.js")
11854
+ () => import("./LinkButton-De-YNclu.js")
11861
11855
  )
11862
11856
  ),
11863
11857
  BaSwitch: K(
@@ -11879,7 +11873,7 @@ const Ac = (e) => {
11879
11873
  "th-TH": { ...Dn, ...yr },
11880
11874
  "ko-KR": { ...Bn, ...wr },
11881
11875
  "vi-VN": { ...zn, ...Mr }
11882
- }, Pc = H(() => import("./App-BjzhfhpF.js"));
11876
+ }, Pc = H(() => import("./App-a34dXdKR.js"));
11883
11877
  export {
11884
11878
  hn as F,
11885
11879
  pn as a,
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { c as i, d as o, i as e, r as m } from "./app-Bh_S4QSD.js";
2
+ import { c as i, d as o, i as e, r as m } from "./app-Box0RGix.js";
3
3
  export {
4
4
  i as FmApp,
5
5
  o as FormKitPlugin,
@@ -1,4 +1,4 @@
1
- import type { BrandKit } from './entity';
1
+ import type { ApplyBrandKitOptions, BrandKit } from './entity';
2
2
  export declare const brandkit: {
3
3
  colors: {
4
4
  primary: string;
@@ -45,5 +45,5 @@ export declare const brandkit: {
45
45
  fontFamilies: never[];
46
46
  };
47
47
  export declare function applyBrandKitFromAPI(url: string): Promise<void>;
48
- export declare function applyBrandKit(kit?: BrandKit, target?: HTMLElement): void;
48
+ export declare function applyBrandKit(kit?: BrandKit, targetOrOptions?: HTMLElement | ApplyBrandKitOptions, maybeOptions?: ApplyBrandKitOptions): void;
49
49
  export declare function applyBrandkitFeedmeUI(kit?: BrandKit, target?: HTMLElement): void;
@@ -87,8 +87,58 @@ export type BrandKit = BaseBrandKit & {
87
87
  app?: LayoutConfig;
88
88
  kiosk?: LayoutConfig;
89
89
  };
90
+ ods?: {
91
+ brandkitOverride?: RecursivePartial<BaseBrandKit>;
92
+ layout?: OdsLayoutConfig;
93
+ display?: OdsDisplayConfig;
94
+ };
90
95
  };
91
96
  export type BrandkitOverrideBy = 'app' | 'kiosk';
97
+ export type OrderGroupingMode = 'type' | 'status';
98
+ export type OrderStatusBoardLayout = 'horizontal' | 'vertical';
99
+ export type OdsLayoutConfig = {
100
+ /** Background image covering the full screen, behind everything. */
101
+ background?: {
102
+ url: string;
103
+ /** CSS background-size. default: 'cover' */
104
+ size?: string;
105
+ /** CSS background-position. default: 'center' */
106
+ position?: string;
107
+ } | null;
108
+ /**
109
+ * Decorative image panel beside the board.
110
+ * Reduces available board space by its width.
111
+ */
112
+ sidePanel?: {
113
+ url: string;
114
+ /** Which side the panel sits on. default: 'left' */
115
+ position: 'left' | 'right';
116
+ /** Width as % of full screen. default: 30 */
117
+ widthPercent: number;
118
+ /** CSS object-fit for the image. default: 'cover' */
119
+ objectFit?: string;
120
+ } | null;
121
+ /**
122
+ * Board width as % of available space (full screen minus side panel).
123
+ * default: 100
124
+ */
125
+ boardWidthPercent?: number;
126
+ /**
127
+ * Board alignment when boardWidthPercent < 100.
128
+ * default: 'left'
129
+ */
130
+ boardAlign?: 'left' | 'right' | 'center';
131
+ };
132
+ export type OdsDisplayConfig = {
133
+ groupBy: OrderGroupingMode;
134
+ statusLayout: OrderStatusBoardLayout;
135
+ statusSlidingPeriod: number;
136
+ showProgressBar: boolean;
137
+ /** Number of order-code columns within each status section (preparing / ready). 1, 2, or 3. */
138
+ statusColumnCount: number;
139
+ /** Show delivery platform icon next to order numbers in status board. */
140
+ showDeliveryIcons: boolean;
141
+ };
92
142
  export type ApplyBrandKitOptions = {
93
143
  overrideBy?: BrandkitOverrideBy;
94
144
  };
@@ -0,0 +1,127 @@
1
+ import { useSnackbar as O } from "@feedmepos/ui-library";
2
+ function R() {
3
+ const a = O();
4
+ function f(u, y) {
5
+ const { loading: o, success: n, error: e, duration: t } = y, s = a.open(
6
+ {
7
+ message: typeof o == "function" ? o() : o,
8
+ type: "info",
9
+ spinner: !0,
10
+ dismissable: !1
11
+ },
12
+ null
13
+ );
14
+ return (typeof u == "function" ? u() : u).then((c) => (a.close(s), n && a.open(
15
+ {
16
+ message: typeof n == "function" ? n() : n,
17
+ type: "success",
18
+ spinner: !1,
19
+ dismissable: !0
20
+ },
21
+ t ?? 2e3
22
+ ), c)).catch((c) => {
23
+ throw e && (a.close(s), a.open(
24
+ {
25
+ message: typeof e == "function" ? e(c) : e,
26
+ type: "error",
27
+ spinner: !1,
28
+ dismissable: !0
29
+ },
30
+ t ?? 2e3
31
+ )), c;
32
+ });
33
+ }
34
+ return {
35
+ promise: f
36
+ };
37
+ }
38
+ const S = /* @__PURE__ */ new Set(), T = {
39
+ colors: {
40
+ primary: "#ff7823",
41
+ secondary: "#fff3e6",
42
+ accent: "#fff3e6",
43
+ background: {
44
+ base: "#F8F8F8",
45
+ elevated: "#FFFFFF"
46
+ },
47
+ neutral: {
48
+ light: "#ECF0F0",
49
+ mid: "#555555",
50
+ dark: "#1C1C1E"
51
+ },
52
+ text: {
53
+ onPrimary: "#FFFFFF",
54
+ primary: "#1C1C1E",
55
+ secondary: "#555555",
56
+ tertiary: "#A2A09E"
57
+ },
58
+ status: {
59
+ success: "#10B981",
60
+ warning: "#F59E0B",
61
+ error: "#EF4444",
62
+ info: "#3B82F6"
63
+ // Add info if missing previously
64
+ }
65
+ },
66
+ fonts: {
67
+ brand: "'Inter', sans-serif",
68
+ heading: "'Inter', sans-serif",
69
+ body: "'Roboto', sans-serif"
70
+ },
71
+ ordering: {
72
+ app: {
73
+ category: "VERTICAL",
74
+ items: "LIST",
75
+ singleCategory: !1
76
+ },
77
+ kiosk: {
78
+ category: "VERTICAL",
79
+ singleCategory: !1
80
+ }
81
+ },
82
+ fontFamilies: []
83
+ };
84
+ function V(a = T, f, u) {
85
+ var c, d, m, p, g, b, F, h, x, E, w, k, B, I, P, A;
86
+ const y = {}, o = document.documentElement, n = (i, r) => {
87
+ r && o.style.setProperty(`--brand-${i}`, r);
88
+ }, { fonts: e } = a, t = y.overrideBy ? (m = (d = (c = a.ordering) == null ? void 0 : c[y.overrideBy]) == null ? void 0 : d.brandkitOverride) == null ? void 0 : m.colors : void 0, s = {
89
+ primary: (t == null ? void 0 : t.primary) ?? a.colors.primary,
90
+ secondary: (t == null ? void 0 : t.secondary) ?? a.colors.secondary,
91
+ accent: (t == null ? void 0 : t.accent) ?? a.colors.accent,
92
+ background: {
93
+ base: ((p = t == null ? void 0 : t.background) == null ? void 0 : p.base) ?? a.colors.background.base,
94
+ elevated: ((g = t == null ? void 0 : t.background) == null ? void 0 : g.elevated) ?? a.colors.background.elevated
95
+ },
96
+ neutral: {
97
+ light: ((b = t == null ? void 0 : t.neutral) == null ? void 0 : b.light) ?? a.colors.neutral.light,
98
+ mid: ((F = t == null ? void 0 : t.neutral) == null ? void 0 : F.mid) ?? a.colors.neutral.mid,
99
+ dark: ((h = t == null ? void 0 : t.neutral) == null ? void 0 : h.dark) ?? a.colors.neutral.dark
100
+ },
101
+ status: {
102
+ success: ((x = t == null ? void 0 : t.status) == null ? void 0 : x.success) ?? a.colors.status.success,
103
+ warning: ((E = t == null ? void 0 : t.status) == null ? void 0 : E.warning) ?? a.colors.status.warning,
104
+ error: ((w = t == null ? void 0 : t.status) == null ? void 0 : w.error) ?? a.colors.status.error,
105
+ info: ((k = t == null ? void 0 : t.status) == null ? void 0 : k.info) ?? a.colors.status.info
106
+ },
107
+ text: {
108
+ onPrimary: ((B = t == null ? void 0 : t.text) == null ? void 0 : B.onPrimary) ?? a.colors.text.onPrimary,
109
+ primary: ((I = t == null ? void 0 : t.text) == null ? void 0 : I.primary) ?? a.colors.text.primary,
110
+ secondary: ((P = t == null ? void 0 : t.text) == null ? void 0 : P.secondary) ?? a.colors.text.secondary,
111
+ tertiary: ((A = t == null ? void 0 : t.text) == null ? void 0 : A.tertiary) ?? a.colors.text.tertiary
112
+ }
113
+ };
114
+ n("color-primary", s.primary), n("color-secondary", s.secondary), n("color-accent", s.accent), n("color-background-base", s.background.base), n("color-background-elevated", s.background.elevated), n("color-neutral-light", s.neutral.light), n("color-neutral-mid", s.neutral.mid), n("color-neutral-dark", s.neutral.dark), n("color-typo-on-primary", s.text.onPrimary), n("color-typo-primary", s.text.primary), n("color-typo-secondary", s.text.secondary), n("color-typo-tertiary", s.text.tertiary), n("color-status-success", s.status.success), n("color-status-warning", s.status.warning), n("color-status-error", s.status.error), n("color-status-info", s.status.info), n("font-family-brand", e.brand), n("font-family-heading", e.heading ?? e.brand), n("font-family-body", e.body ?? e.brand);
115
+ for (const i of a.fontFamilies ?? []) {
116
+ const r = i.stylesheet;
117
+ if (!r || S.has(r) || document.querySelector(`link[href="${r}"]`))
118
+ continue;
119
+ const l = document.createElement("link");
120
+ l.rel = "stylesheet", l.href = r, l.setAttribute("data-brand-font", r), document.head.appendChild(l), S.add(r);
121
+ }
122
+ }
123
+ export {
124
+ V as a,
125
+ T as b,
126
+ R as u
127
+ };
@@ -462,7 +462,6 @@ export declare const i18nMessages: {
462
462
  titles: string;
463
463
  pointsPrice: string;
464
464
  or: string;
465
- discount: string;
466
465
  redeemSuccess: string;
467
466
  purchaseCompleted: string;
468
467
  purchaseSuccessful: string;
@@ -1540,9 +1539,6 @@ export declare const i18nMessages: {
1540
1539
  emptyTitle: string;
1541
1540
  emptySubtitle: string;
1542
1541
  bundle: {
1543
- pointsPrice: string;
1544
- or: string;
1545
- discount: string;
1546
1542
  stripeLabel: string;
1547
1543
  pointsLabel: string;
1548
1544
  redeemTitle: string;
@@ -1571,6 +1567,8 @@ export declare const i18nMessages: {
1571
1567
  credit: string;
1572
1568
  vouchers: string;
1573
1569
  titles: string;
1570
+ pointsPrice: string;
1571
+ or: string;
1574
1572
  redeemSuccess: string;
1575
1573
  purchaseCompleted: string;
1576
1574
  purchaseSuccessful: string;
@@ -2678,9 +2676,6 @@ export declare const i18nMessages: {
2678
2676
  emptyTitle: string;
2679
2677
  emptySubtitle: string;
2680
2678
  bundle: {
2681
- pointsPrice: string;
2682
- or: string;
2683
- discount: string;
2684
2679
  stripeLabel: string;
2685
2680
  pointsLabel: string;
2686
2681
  redeemTitle: string;
@@ -2709,6 +2704,8 @@ export declare const i18nMessages: {
2709
2704
  credit: string;
2710
2705
  vouchers: string;
2711
2706
  titles: string;
2707
+ pointsPrice: string;
2708
+ or: string;
2712
2709
  redeemSuccess: string;
2713
2710
  purchaseCompleted: string;
2714
2711
  purchaseSuccessful: string;
@@ -3793,9 +3790,6 @@ export declare const i18nMessages: {
3793
3790
  emptyTitle: string;
3794
3791
  emptySubtitle: string;
3795
3792
  bundle: {
3796
- pointsPrice: string;
3797
- or: string;
3798
- discount: string;
3799
3793
  stripeLabel: string;
3800
3794
  pointsLabel: string;
3801
3795
  redeemTitle: string;
@@ -3824,6 +3818,8 @@ export declare const i18nMessages: {
3824
3818
  credit: string;
3825
3819
  vouchers: string;
3826
3820
  titles: string;
3821
+ pointsPrice: string;
3822
+ or: string;
3827
3823
  redeemSuccess: string;
3828
3824
  purchaseCompleted: string;
3829
3825
  purchaseSuccessful: string;
@@ -4948,9 +4944,6 @@ export declare const i18nMessages: {
4948
4944
  emptyTitle: string;
4949
4945
  emptySubtitle: string;
4950
4946
  bundle: {
4951
- pointsPrice: string;
4952
- or: string;
4953
- discount: string;
4954
4947
  stripeLabel: string;
4955
4948
  pointsLabel: string;
4956
4949
  redeemTitle: string;
@@ -4979,6 +4972,8 @@ export declare const i18nMessages: {
4979
4972
  credit: string;
4980
4973
  vouchers: string;
4981
4974
  titles: string;
4975
+ pointsPrice: string;
4976
+ or: string;
4982
4977
  redeemSuccess: string;
4983
4978
  purchaseCompleted: string;
4984
4979
  purchaseSuccessful: string;
@@ -6257,9 +6252,6 @@ export declare const i18nMessages: {
6257
6252
  emptyTitle: string;
6258
6253
  emptySubtitle: string;
6259
6254
  bundle: {
6260
- pointsPrice: string;
6261
- or: string;
6262
- discount: string;
6263
6255
  stripeLabel: string;
6264
6256
  pointsLabel: string;
6265
6257
  redeemTitle: string;
@@ -6288,6 +6280,8 @@ export declare const i18nMessages: {
6288
6280
  credit: string;
6289
6281
  vouchers: string;
6290
6282
  titles: string;
6283
+ pointsPrice: string;
6284
+ or: string;
6291
6285
  redeemSuccess: string;
6292
6286
  purchaseCompleted: string;
6293
6287
  purchaseSuccessful: string;