@feedmepos/mf-media 1.0.1 → 1.0.2-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isRef as We, ref as K, shallowRef as ze, watchEffect as ke, computed as Ne, h as J, defineComponent as k, unref as h, openBlock as N, createBlock as re, renderSlot as Ue, createCommentVNode as Te, createElementBlock as Re, createElementVNode as H, toDisplayString as L, defineAsyncComponent as S } from "vue";
1
+ import { isRef as We, ref as K, shallowRef as ze, watchEffect as ke, computed as Ne, h as J, defineComponent as k, unref as h, openBlock as N, createBlock as re, renderSlot as Re, createCommentVNode as Te, createElementBlock as Ue, createElementVNode as H, toDisplayString as L, defineAsyncComponent as S } from "vue";
2
2
  import { useRoute as Ke, RouterView as Je } from "vue-router";
3
3
  import { useCoreStore as Le, useI18n as Se } from "@feedmepos/mf-common";
4
4
  const _e = {
@@ -93,6 +93,8 @@ const _e = {
93
93
  uploadButton: "Upload Media",
94
94
  testPickerButton: "Test Picker Dialog",
95
95
  searchPlaceholder: "Search file name…",
96
+ allRestaurantsOption: "All restaurants",
97
+ allRefTypesOption: "All types",
96
98
  selectAllButton: "Select All",
97
99
  selectedCount: "{count} selected",
98
100
  totalSummary: "{count} items",
@@ -201,6 +203,8 @@ const _e = {
201
203
  uploadButton: "Importer des médias",
202
204
  testPickerButton: "Tester la fenêtre de sélection",
203
205
  searchPlaceholder: "Rechercher un nom de fichier…",
206
+ allRestaurantsOption: "Tous les restaurants",
207
+ allRefTypesOption: "Tous les types",
204
208
  selectAllButton: "Tout sélectionner",
205
209
  selectedCount: "{count} sélectionné(s)",
206
210
  totalSummary: "{count} éléments",
@@ -309,6 +313,8 @@ const _e = {
309
313
  uploadButton: "Unggah Media",
310
314
  testPickerButton: "Uji Dialog Pemilih",
311
315
  searchPlaceholder: "Cari nama file…",
316
+ allRestaurantsOption: "Semua restoran",
317
+ allRefTypesOption: "Semua jenis",
312
318
  selectAllButton: "Pilih Semua",
313
319
  selectedCount: "{count} item dipilih",
314
320
  totalSummary: "{count} item",
@@ -417,6 +423,8 @@ const _e = {
417
423
  uploadButton: "メディアをアップロード",
418
424
  testPickerButton: "画像選択ダイアログのテスト",
419
425
  searchPlaceholder: "ファイル名で検索…",
426
+ allRestaurantsOption: "すべての店舗",
427
+ allRefTypesOption: "すべての種類",
420
428
  selectAllButton: "すべて選択",
421
429
  selectedCount: "{count} 件選択中",
422
430
  totalSummary: "合計 {count} 件",
@@ -525,6 +533,8 @@ const _e = {
525
533
  uploadButton: "อัปโหลดสื่อ",
526
534
  testPickerButton: "ทดสอบหน้าต่างเลือกรูป",
527
535
  searchPlaceholder: "ค้นหาชื่อไฟล์…",
536
+ allRestaurantsOption: "ทุกร้าน",
537
+ allRefTypesOption: "ทุกประเภท",
528
538
  selectAllButton: "เลือกทั้งหมด",
529
539
  selectedCount: "เลือกแล้ว {count} รายการ",
530
540
  totalSummary: "ทั้งหมด {count} รายการ",
@@ -633,6 +643,8 @@ const _e = {
633
643
  uploadButton: "上传素材",
634
644
  testPickerButton: "测试选图弹窗",
635
645
  searchPlaceholder: "搜索文件名…",
646
+ allRestaurantsOption: "全部门店",
647
+ allRefTypesOption: "全部类型",
636
648
  selectAllButton: "全选",
637
649
  selectedCount: "已选 {count} 项",
638
650
  totalSummary: "共 {count} 项",
@@ -741,6 +753,8 @@ const _e = {
741
753
  uploadButton: "上傳素材",
742
754
  testPickerButton: "測試選圖彈窗",
743
755
  searchPlaceholder: "搜尋檔案名稱…",
756
+ allRestaurantsOption: "全部門店",
757
+ allRefTypesOption: "全部類型",
744
758
  selectAllButton: "全選",
745
759
  selectedCount: "已選 {count} 項",
746
760
  totalSummary: "共 {count} 項",
@@ -1284,7 +1298,7 @@ const f = [
1284
1298
  subject: l.inventory,
1285
1299
  actions: [t.read]
1286
1300
  }
1287
- ], U = [
1301
+ ], R = [
1288
1302
  ...f,
1289
1303
  {
1290
1304
  label: "Stock",
@@ -1334,7 +1348,7 @@ const f = [
1334
1348
  }
1335
1349
  ];
1336
1350
  [
1337
- ...U,
1351
+ ...R,
1338
1352
  ...je,
1339
1353
  ...Ve
1340
1354
  ];
@@ -1432,13 +1446,13 @@ const qt = [
1432
1446
  subject: l.inventory,
1433
1447
  actions: [t.read, t.update]
1434
1448
  }
1435
- ], It = [
1449
+ ], Ot = [
1436
1450
  {
1437
1451
  label: "Inventory",
1438
1452
  subject: l.inventory,
1439
1453
  actions: [t.read, t.update]
1440
1454
  }
1441
- ], Ot = [
1455
+ ], It = [
1442
1456
  {
1443
1457
  label: "Inventory",
1444
1458
  subject: l.inventory,
@@ -1594,7 +1608,7 @@ const zt = [
1594
1608
  subject: l.inventory,
1595
1609
  actions: [t.read, t.update]
1596
1610
  }
1597
- ], Ut = [
1611
+ ], Rt = [
1598
1612
  ...f,
1599
1613
  {
1600
1614
  label: "Inventory",
@@ -1611,14 +1625,14 @@ const zt = [
1611
1625
  ];
1612
1626
  [
1613
1627
  ...f,
1614
- ...U,
1628
+ ...R,
1615
1629
  ...T
1616
1630
  ];
1617
- const Rt = {
1631
+ const Ut = {
1618
1632
  [`set_${s.inventory_stockBalance}`]: {
1619
1633
  key: "sys:inventory:stock_balance",
1620
1634
  name: "Stock Balance",
1621
- permissions: U
1635
+ permissions: R
1622
1636
  },
1623
1637
  [`set_${s.inventory_stockAdjustment}`]: {
1624
1638
  key: "sys:inventory:stock_adjustment",
@@ -1663,12 +1677,12 @@ const Rt = {
1663
1677
  [`set_${s.inventory_recipe}`]: {
1664
1678
  key: "sys:inventory:recipe",
1665
1679
  name: "Recipe",
1666
- permissions: It
1680
+ permissions: Ot
1667
1681
  },
1668
1682
  [`set_${s.inventory_unit}`]: {
1669
1683
  key: "sys:inventory:unit",
1670
1684
  name: "Unit",
1671
- permissions: Ot
1685
+ permissions: It
1672
1686
  },
1673
1687
  [`set_${s.inventory_purchaseTransfer}`]: {
1674
1688
  key: "sys:inventory:purchase_transfer",
@@ -1713,7 +1727,7 @@ const Rt = {
1713
1727
  [`set_${s.inventory_import}`]: {
1714
1728
  key: "sys:inventory:import",
1715
1729
  name: "Import",
1716
- permissions: Ut
1730
+ permissions: Rt
1717
1731
  },
1718
1732
  [`set_${s.inventory_integration}`]: {
1719
1733
  key: "sys:inventory:integration",
@@ -1822,7 +1836,7 @@ const $ = [
1822
1836
  }
1823
1837
  }, Lt = {
1824
1838
  ...Xt,
1825
- ...Rt,
1839
+ ...Ut,
1826
1840
  ...Kt,
1827
1841
  ...Jt
1828
1842
  };
@@ -2076,7 +2090,7 @@ function ee(e, a) {
2076
2090
  }
2077
2091
  function $t(e, a) {
2078
2092
  var A = [];
2079
- if (O(a, e.k, 0, a, A), A.length === 1) {
2093
+ if (I(a, e.k, 0, a, A), A.length === 1) {
2080
2094
  var r = A[0];
2081
2095
  return v(e.nv, r[0], r[1], r[2]);
2082
2096
  }
@@ -2086,7 +2100,7 @@ function $t(e, a) {
2086
2100
  }
2087
2101
  return i;
2088
2102
  }
2089
- function O(e, a, A, r, o) {
2103
+ function I(e, a, A, r, o) {
2090
2104
  if (A === a.length || e == null) {
2091
2105
  o.push([e, a[A - 1], r]);
2092
2106
  return;
@@ -2094,9 +2108,9 @@ function O(e, a, A, r, o) {
2094
2108
  var i = C(a, A);
2095
2109
  if (E(e) && isNaN(Number(i)))
2096
2110
  for (var c = 0, g = e.length; c < g; c++)
2097
- O(C(e, c), a, A, e, o);
2111
+ I(C(e, c), a, A, e, o);
2098
2112
  else
2099
- O(C(e, i), a, A + 1, e, o);
2113
+ I(C(e, i), a, A + 1, e, o);
2100
2114
  }
2101
2115
  function ea(e, a, A) {
2102
2116
  return { a: { k: e, nv: a, q: A }, v: $t };
@@ -2156,10 +2170,10 @@ function te(e, a) {
2156
2170
  function sa(e, a, A) {
2157
2171
  return a && te(e.prototype, a), A && te(e, A), e;
2158
2172
  }
2159
- function R(e, a) {
2160
- a === void 0 && (a = {}), Error.call(this), this.constructor = R, this.subject = a.subject, this.subjectName = a.subjectName, this.action = a.action, this.field = a.field, this.message = e || 'Cannot execute "' + this.action + '" on "' + this.subjectName + '"', typeof Error.captureStackTrace == "function" ? (this.name = this.constructor.name, Error.captureStackTrace(this, this.constructor)) : this.stack = new Error(this.message).stack;
2173
+ function U(e, a) {
2174
+ a === void 0 && (a = {}), Error.call(this), this.constructor = U, this.subject = a.subject, this.subjectName = a.subjectName, this.action = a.action, this.field = a.field, this.message = e || 'Cannot execute "' + this.action + '" on "' + this.subjectName + '"', typeof Error.captureStackTrace == "function" ? (this.name = this.constructor.name, Error.captureStackTrace(this, this.constructor)) : this.stack = new Error(this.message).stack;
2161
2175
  }
2162
- R.prototype = Object.create(Error.prototype);
2176
+ U.prototype = Object.create(Error.prototype);
2163
2177
  function W(e) {
2164
2178
  return Array.isArray(e) ? e : [e];
2165
2179
  }
@@ -2209,7 +2223,7 @@ var ma = /* @__PURE__ */ function() {
2209
2223
  function se(e, a) {
2210
2224
  return e === a || Array.isArray(a) && a.indexOf(e) !== -1;
2211
2225
  }
2212
- var Ie = /* @__PURE__ */ function() {
2226
+ var Oe = /* @__PURE__ */ function() {
2213
2227
  e.addAlias = function(r, o) {
2214
2228
  if (r === "manage" || se("manage", o))
2215
2229
  throw new Error('Cannot add alias for "manage" action because it represents any action');
@@ -2249,8 +2263,8 @@ var Ie = /* @__PURE__ */ function() {
2249
2263
  var Y = P[F];
2250
2264
  o[Y] = o[Y] || /* @__PURE__ */ Object.create(null);
2251
2265
  for (var Q = 0; Q < d.length; Q++) {
2252
- var I = d[Q];
2253
- o[Y][I] = o[Y][I] || /* @__PURE__ */ Object.create(null), o[Y][I][q] = p;
2266
+ var O = d[Q];
2267
+ o[Y][O] = o[Y][O] || /* @__PURE__ */ Object.create(null), o[Y][O][q] = p;
2254
2268
  }
2255
2269
  }
2256
2270
  }
@@ -2297,7 +2311,7 @@ var Ie = /* @__PURE__ */ function() {
2297
2311
  var c = this.relevantRuleFor.apply(this, o);
2298
2312
  if (!c || c.inverted) {
2299
2313
  var g = o[0], B = o[1], p = o[2], d = this[w].subjectName(B);
2300
- throw new R(c ? c.reason : null, {
2314
+ throw new U(c ? c.reason : null, {
2301
2315
  action: g,
2302
2316
  subjectName: d,
2303
2317
  subject: B,
@@ -2327,7 +2341,7 @@ var Ie = /* @__PURE__ */ function() {
2327
2341
  function da(e) {
2328
2342
  return mt[e] ?? e;
2329
2343
  }
2330
- function Oe(e) {
2344
+ function Ie(e) {
2331
2345
  return e.map((a) => ({
2332
2346
  ...a,
2333
2347
  subject: da(a.subject),
@@ -2335,10 +2349,10 @@ function Oe(e) {
2335
2349
  }));
2336
2350
  }
2337
2351
  function Ba(e) {
2338
- return new Ie(Oe(e));
2352
+ return new Oe(Ie(e));
2339
2353
  }
2340
2354
  function ba(e) {
2341
- return new Ie(Oe(e), {
2355
+ return new Oe(Ie(e), {
2342
2356
  subjectName(a) {
2343
2357
  return typeof a != "string" && a.subjectType ? a.subjectType : a;
2344
2358
  }
@@ -2493,7 +2507,7 @@ const Ca = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
2493
2507
  "th-TH": Fa
2494
2508
  }
2495
2509
  });
2496
- return (A, r) => (N(), Re("div", Ha, [
2510
+ return (A, r) => (N(), Ue("div", Ha, [
2497
2511
  H("div", xa, [
2498
2512
  H("div", Qa, [
2499
2513
  H("img", {
@@ -2508,18 +2522,18 @@ const Ca = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
2508
2522
  ])
2509
2523
  ]));
2510
2524
  }
2511
- }), Ia = /* @__PURE__ */ k({
2525
+ }), Oa = /* @__PURE__ */ k({
2512
2526
  __name: "PermissionWrapper",
2513
2527
  setup(e) {
2514
2528
  const a = Ma();
2515
- return (A, r) => h(a) === h(z).Denied ? (N(), re(Za, { key: 0 })) : h(a) === h(z).Allowed ? Ue(A.$slots, "default", { key: 1 }) : Te("", !0);
2529
+ return (A, r) => h(a) === h(z).Denied ? (N(), re(Za, { key: 0 })) : h(a) === h(z).Allowed ? Re(A.$slots, "default", { key: 1 }) : Te("", !0);
2516
2530
  }
2517
2531
  });
2518
2532
  function Ae(e) {
2519
2533
  return {
2520
2534
  inheritAttrs: !1,
2521
2535
  setup(a, { attrs: A }) {
2522
- return () => J(Ia, {}, { default: () => J(e, A) });
2536
+ return () => J(Oa, {}, { default: () => J(e, A) });
2523
2537
  }
2524
2538
  };
2525
2539
  }
@@ -2531,7 +2545,7 @@ const ka = [
2531
2545
  {
2532
2546
  path: "/library",
2533
2547
  name: "$media-library",
2534
- component: Ae(S(() => import("./AssetLibrary-2444af84.js"))),
2548
+ component: Ae(S(() => import("./AssetLibrary-34e89cba.js"))),
2535
2549
  meta: {
2536
2550
  validationManifest: {
2537
2551
  requiredCaslPermissions: [
@@ -2546,7 +2560,7 @@ const ka = [
2546
2560
  {
2547
2561
  path: "/studio",
2548
2562
  name: "$media-studio",
2549
- component: Ae(S(() => import("./AiStudio-866a5c97.js"))),
2563
+ component: Ae(S(() => import("./AiStudio-2cced8ce.js"))),
2550
2564
  meta: {
2551
2565
  validationManifest: {
2552
2566
  requiredCaslPermissions: [
@@ -2565,7 +2579,7 @@ const ka = [
2565
2579
  setup(e) {
2566
2580
  return (a, A) => (N(), re(h(Je)));
2567
2581
  }
2568
- }), Ua = {
2582
+ }), Ra = {
2569
2583
  "en-US": $e,
2570
2584
  "zh-CN": ct,
2571
2585
  "zh-Hant": gt,
@@ -2576,6 +2590,6 @@ const ka = [
2576
2590
  };
2577
2591
  export {
2578
2592
  Na as FmApp,
2579
- Ua as i18nMessages,
2593
+ Ra as i18nMessages,
2580
2594
  ka as routers
2581
2595
  };