@feedmepos/mf-hrm-portal 2.1.0-dev → 2.1.0-dev.3

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 (54) hide show
  1. package/dist/AuditLogList-C8VefmfL.js +1608 -0
  2. package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-tiuei7CA.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-B25U2YoL.js} +2 -2
  3. package/dist/EmployeeList-DDY8DxQr.js +884 -0
  4. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js → FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js} +1 -1
  5. package/dist/{Main-BgOhmojO.js → Main-BQ36wEVl.js} +188 -185
  6. package/dist/Main-D7xrzW8p.js +94 -0
  7. package/dist/{Main-D2Wf__wM.js → Main-D8zj09ZS.js} +1987 -1979
  8. package/dist/PermissionSetList-zdFnxyCb.js +392 -0
  9. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DOgOa3cu.js +4042 -0
  10. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-D-14ca2J.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-DqY-OTuj.js} +1 -1
  11. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +42 -0
  12. package/dist/{RoleList-tSC8RJHe.js → RoleList-CRYU_eRb.js} +231 -221
  13. package/dist/SelectFilter-ATOm0hdn.js +269 -0
  14. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
  15. package/dist/{index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js → TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js} +54 -20
  16. package/dist/{TeamMemberList-Bz-kDJ0e.js → TeamMemberList-CMK7Yfn6.js} +137 -131
  17. package/dist/{TimesheetList-BFVhmcRt.js → TimesheetList-C00-tU7K.js} +140 -134
  18. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-CtHuL5tW.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-dT_CJJDV.js} +2 -2
  19. package/dist/{app-DRnSocX8.js → app-C-wWQrRY.js} +792 -475
  20. package/dist/app.js +1 -1
  21. package/dist/{dayjs.min-B8xOAypU.js → dayjs.min-Bk9YhjTx.js} +1 -1
  22. package/dist/{employee-UrXqUaik.js → employee-DzKKMXNo.js} +3 -3
  23. package/dist/{iteration-LEYoQKiI.js → iteration-BV93u72h.js} +1 -1
  24. package/dist/{lodash-Bq6_eZZ0.js → lodash-psyQLJ6h.js} +1 -1
  25. package/dist/{rule-CJC6Cq6S.js → rule-mNiIG4E8.js} +116 -110
  26. package/dist/src/api/audit-log/index.d.ts +23 -0
  27. package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +7 -1
  28. package/dist/src/components/form/SelectFilter.vue.d.ts +3 -0
  29. package/dist/src/components/table/EmptyDataTemplate/index.vue.d.ts +4 -1
  30. package/dist/src/components/table/TableEmptyState.vue.d.ts +31 -0
  31. package/dist/src/stores/permission-set.d.ts +12 -3
  32. package/dist/src/stores/team.d.ts +4 -1
  33. package/dist/src/types/audit-log.d.ts +1 -1
  34. package/dist/src/views/audit-log/event-line.d.ts +13 -0
  35. package/dist/src/views/audit-log/locales/index.d.ts +320 -16
  36. package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
  37. package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +1 -0
  38. package/dist/src/views/hr/locales/index.d.ts +4 -0
  39. package/dist/src/views/team/locales/index.d.ts +4 -0
  40. package/dist/style.css +1 -1
  41. package/dist/tsconfig.app.tsbuildinfo +1 -1
  42. package/dist/{useAppStore-BGsfYWAR.js → useAppStore-CEgLVGO6.js} +1 -1
  43. package/dist/useDebounce-B8ZPVS5C.js +15 -0
  44. package/dist/{useLoading-BUM5R2qV.js → useLoading-CJtXNU4d.js} +1 -1
  45. package/dist/{useReportPermissions-nlQ_BBL2.js → useReportPermissions-DoQyFUKj.js} +3 -3
  46. package/package.json +1 -1
  47. package/dist/AuditLogList-C1bGND8z.js +0 -1037
  48. package/dist/EmployeeList-DqQF9xEx.js +0 -851
  49. package/dist/Main-DcKVuIjB.js +0 -90
  50. package/dist/PermissionSetList-CQpTa0eY.js +0 -384
  51. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CCKVpAwv.js +0 -4030
  52. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
  53. package/dist/SelectFilter-DUj7GBtT.js +0 -251
  54. package/dist/useDebounce-CWb5QR9G.js +0 -28
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as e, i as r, r as o } from "./app-DRnSocX8.js";
1
+ import { j as e, i as r, r as o } from "./app-C-wWQrRY.js";
2
2
  export {
3
3
  e as FmApp,
4
4
  r as i18nMessages,
@@ -1,4 +1,4 @@
1
- import { g as Q, c as K } from "./app-DRnSocX8.js";
1
+ import { g as Q, c as K } from "./app-C-wWQrRY.js";
2
2
  var E = { exports: {} };
3
3
  (function(V, X) {
4
4
  (function(W, k) {
@@ -1,9 +1,9 @@
1
- import { d as g } from "./dayjs.min-B8xOAypU.js";
1
+ import { d as g } from "./dayjs.min-Bk9YhjTx.js";
2
2
  import { defineStore as $, storeToRefs as T } from "pinia";
3
3
  import { ref as m } from "vue";
4
- import { b as l, g as f, u as w, s as E } from "./iteration-LEYoQKiI.js";
4
+ import { b as l, g as f, u as w, s as E } from "./iteration-BV93u72h.js";
5
5
  import { i as v } from "./utils-BZkjJbju.js";
6
- import { u as _ } from "./useAppStore-BGsfYWAR.js";
6
+ import { u as _ } from "./useAppStore-CEgLVGO6.js";
7
7
  const o = {
8
8
  async readEmployees() {
9
9
  return f(await l().get("/pos-users"));
@@ -1,7 +1,7 @@
1
1
  import { defineStore as Gs, storeToRefs as Hs } from "pinia";
2
2
  import { ref as eo } from "vue";
3
3
  import { useCoreStore as ui, baseClientInstance as Dr, FeedMeAuth as qs } from "@feedmepos/mf-common";
4
- import { c as U } from "./app-DRnSocX8.js";
4
+ import { c as U } from "./app-C-wWQrRY.js";
5
5
  function Ur(e, n) {
6
6
  return function() {
7
7
  return e.apply(n, arguments);
@@ -1,4 +1,4 @@
1
- import { c as jt } from "./app-DRnSocX8.js";
1
+ import { c as jt } from "./app-C-wWQrRY.js";
2
2
  var Jr = { exports: {} };
3
3
  /**
4
4
  * @license
@@ -1,10 +1,10 @@
1
- import { g as b, b as v, q as F, u as Z, s as W, d as q, e as y } from "./iteration-LEYoQKiI.js";
2
- import { h as A, P as V, d as _, v as k, n as j, b as ee } from "./app-DRnSocX8.js";
1
+ import { g as b, b as v, q as F, u as Z, s as W, d as q, e as y } from "./iteration-BV93u72h.js";
2
+ import { h as A, P as V, d as _, v as k, n as j, b as ee } from "./app-C-wWQrRY.js";
3
3
  import { s as ne } from "./utils-BZkjJbju.js";
4
4
  import { defineStore as z, storeToRefs as K } from "pinia";
5
5
  import { ref as S, computed as U } from "vue";
6
6
  import { useCoreStore as X } from "@feedmepos/mf-common";
7
- const M = [
7
+ const L = [
8
8
  {
9
9
  label: "",
10
10
  subject: "order",
@@ -352,34 +352,40 @@ const M = [
352
352
  return b(await v().delete(`${E}/${e}`));
353
353
  }
354
354
  }, se = z("permissionSet", () => {
355
- const { currentBusiness: e } = X(), n = S([]), t = S(null);
356
- async function o() {
355
+ const { currentBusiness: e } = X(), n = S([]), t = S(!1), o = S(null);
356
+ async function i() {
357
357
  var l;
358
- const c = ((l = e.value) == null ? void 0 : l._id) ?? null;
359
- if (t.value === c) return;
360
- const a = await N.read();
361
- n.value = r(a), t.value = c;
358
+ const a = ((l = e.value) == null ? void 0 : l._id) ?? null;
359
+ if (o.value !== a)
360
+ try {
361
+ t.value = !0;
362
+ const d = await N.read();
363
+ n.value = u(d), o.value = a;
364
+ } finally {
365
+ t.value = !1;
366
+ }
362
367
  }
363
- async function i(c) {
364
- const a = await N.create(c);
365
- n.value = r([...n.value, a]);
368
+ async function s(a) {
369
+ const l = await N.create(a);
370
+ n.value = u([...n.value, l]);
366
371
  }
367
- async function s(c, a) {
368
- const l = await N.update(c, a);
369
- n.value = r(n.value.map((d) => d.id === c ? l : d));
372
+ async function c(a, l) {
373
+ const d = await N.update(a, l);
374
+ n.value = u(n.value.map((m) => m.id === a ? d : m));
370
375
  }
371
- async function u(c) {
372
- await N.delete(c), n.value = r(n.value.filter((a) => a.id !== c));
376
+ async function r(a) {
377
+ await N.delete(a), n.value = u(n.value.filter((l) => l.id !== a));
373
378
  }
374
- function r(c) {
375
- return c.sort((a, l) => a.name.localeCompare(l.name));
379
+ function u(a) {
380
+ return a.sort((l, d) => l.name.localeCompare(d.name));
376
381
  }
377
382
  return {
378
383
  permissionSets: n,
379
- readPermissionSets: o,
380
- createPermissionSet: i,
381
- updatePermissionSet: s,
382
- deletePermissionSet: u
384
+ isLoading: t,
385
+ readPermissionSets: i,
386
+ createPermissionSet: s,
387
+ updatePermissionSet: c,
388
+ deletePermissionSet: r
383
389
  };
384
390
  }), te = () => {
385
391
  const e = se();
@@ -408,21 +414,21 @@ function h(e) {
408
414
  ) : !0;
409
415
  }
410
416
  function Q(e) {
411
- const n = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), o = (i, s, u) => {
412
- var r, c;
417
+ const n = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), o = (i, s, c) => {
418
+ var r, u;
413
419
  const a = D(s.conditions);
414
420
  let l = `${s.subject}::${JSON.stringify([...s.actions].sort())}`;
415
421
  h(a) || (l += `::${JSON.stringify(a)}`);
416
422
  const d = i.get(l);
417
423
  if (!d) {
418
- i.set(l, { ...s, setNames: [u.name], setId: u._id });
424
+ i.set(l, { ...s, setNames: [c.name], setId: c._id });
419
425
  return;
420
426
  }
421
- d.setNames.push(u.name);
427
+ d.setNames.push(c.name);
422
428
  const m = D(d.conditions);
423
429
  if (m && a) {
424
430
  for (const f in a)
425
- (r = m[f]) != null && r.$in && (c = a[f]) != null && c.$in ? m[f].$in = Array.from(
431
+ (r = m[f]) != null && r.$in && (u = a[f]) != null && u.$in ? m[f].$in = Array.from(
426
432
  /* @__PURE__ */ new Set([...m[f].$in, ...a[f].$in])
427
433
  ) : m[f] || (m[f] = a[f]);
428
434
  d.conditions = JSON.stringify(m);
@@ -439,14 +445,14 @@ function B(e, n) {
439
445
  function G(e, n) {
440
446
  const t = [...e], o = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
441
447
  for (const r of e) {
442
- const c = A(r.subject);
443
- o.add(B(c, r.actions)), r.inverted && r.actions.includes("manage") && i.add(`set_${c}`), !r.inverted && r.actions.includes("manage") && s.add(c);
448
+ const u = A(r.subject);
449
+ o.add(B(u, r.actions)), r.inverted && r.actions.includes("manage") && i.add(`set_${u}`), !r.inverted && r.actions.includes("manage") && s.add(u);
444
450
  }
445
- const u = [...e];
446
- for (; u.length > 0; ) {
447
- const r = u.shift(), c = `set_${A(r.subject)}`, a = n[c];
448
- if (!a || i.has(c) || !r.actions.includes("manage") || r.inverted) continue;
449
- i.add(c);
451
+ const c = [...e];
452
+ for (; c.length > 0; ) {
453
+ const r = c.shift(), u = `set_${A(r.subject)}`, a = n[u];
454
+ if (!a || i.has(u) || !r.actions.includes("manage") || r.inverted) continue;
455
+ i.add(u);
450
456
  const l = oe(r);
451
457
  r.source && !r.source.trace && (r.source = { ...r.source, trace: l });
452
458
  const d = [...l, `${a.name} (system)`];
@@ -475,7 +481,7 @@ function G(e, n) {
475
481
  trace: d
476
482
  }
477
483
  };
478
- o.has(p) || (o.add(p), t.push(g)), u.push(g);
484
+ o.has(p) || (o.add(p), t.push(g)), c.push(g);
479
485
  }
480
486
  }
481
487
  return [...t.filter((r) => !r.inverted), ...t.filter((r) => r.inverted)];
@@ -499,24 +505,24 @@ function H(e, n, t = /* @__PURE__ */ new Set()) {
499
505
  for (const s of e) {
500
506
  if (t.has(s)) continue;
501
507
  t.add(s);
502
- const u = n.find((r) => r.id === s);
503
- u && (o.push(u), (i = u.permissionSetIds) != null && i.length && o.push(...H(u.permissionSetIds, n, t)));
508
+ const c = n.find((r) => r.id === s);
509
+ c && (o.push(c), (i = c.permissionSetIds) != null && i.length && o.push(...H(c.permissionSetIds, n, t)));
504
510
  }
505
511
  return o;
506
512
  }
507
513
  function $e(e) {
508
514
  const n = Q(e).map(
509
- ({ setNames: i, setId: s, ...u }) => u
515
+ ({ setNames: i, setId: s, ...c }) => c
510
516
  ), t = n.filter((i) => !i.inverted), o = n.filter((i) => i.inverted);
511
- return L(t, o);
517
+ return M(t, o);
512
518
  }
513
519
  function Ie(e, n, t) {
514
520
  const o = /* @__PURE__ */ new Map();
515
521
  return e.forEach(
516
- ({ name: i, permissions: s }) => s.forEach(({ conditions: u, actions: r }) => {
522
+ ({ name: i, permissions: s }) => s.forEach(({ conditions: c, actions: r }) => {
517
523
  var a, l;
518
- const c = JSON.parse(u || "{}");
519
- (a = c[n]) != null && a.$in ? (l = c[n]) == null || l.$in.forEach(
524
+ const u = JSON.parse(c || "{}");
525
+ (a = u[n]) != null && a.$in ? (l = u[n]) == null || l.$in.forEach(
520
526
  (d) => (o.get(d) ?? o.set(d, /* @__PURE__ */ new Set()).get(d)).add(i)
521
527
  ) : r[0] === "manage" && t.forEach((d) => {
522
528
  (o.get(d) ?? o.set(d, /* @__PURE__ */ new Set()).get(d)).add(i);
@@ -528,12 +534,12 @@ function Ie(e, n, t) {
528
534
  }));
529
535
  }
530
536
  function Ae(e, n) {
531
- const t = (r, c) => {
537
+ const t = (r, u) => {
532
538
  const a = { ...r }, l = JSON.parse(a.conditions || "{}");
533
- if (c)
534
- if (c.length > 0) {
539
+ if (u)
540
+ if (u.length > 0) {
535
541
  const d = Object.keys(l)[0];
536
- l[d].$in = c;
542
+ l[d].$in = u;
537
543
  } else
538
544
  delete a.conditions;
539
545
  return {
@@ -541,12 +547,12 @@ function Ae(e, n) {
541
547
  inverted: !0,
542
548
  ...a.conditions && { conditions: JSON.stringify(l) }
543
549
  };
544
- }, o = new Map(e.map((r) => [r.subject, r])), i = new Map(n.map((r) => [r.subject, r])), s = [], u = /* @__PURE__ */ new Set([...o.keys(), ...i.keys()]);
545
- for (const r of u) {
546
- const c = o.get(r), a = i.get(r);
547
- if (c && a) {
548
- if (c.conditions && a.conditions) {
549
- const l = JSON.parse(c.conditions), d = JSON.parse(a.conditions);
550
+ }, o = new Map(e.map((r) => [r.subject, r])), i = new Map(n.map((r) => [r.subject, r])), s = [], c = /* @__PURE__ */ new Set([...o.keys(), ...i.keys()]);
551
+ for (const r of c) {
552
+ const u = o.get(r), a = i.get(r);
553
+ if (u && a) {
554
+ if (u.conditions && a.conditions) {
555
+ const l = JSON.parse(u.conditions), d = JSON.parse(a.conditions);
550
556
  if (!h(l) || !h(d)) {
551
557
  JSON.stringify(l) !== JSON.stringify(d) && s.push(a);
552
558
  continue;
@@ -554,15 +560,15 @@ function Ae(e, n) {
554
560
  const m = Object.keys(l)[0], f = l[m].$in.filter(
555
561
  (g) => !d[m].$in.includes(g)
556
562
  );
557
- f.length > 0 && s.push(t(c, f)), d[m].$in.filter(
563
+ f.length > 0 && s.push(t(u, f)), d[m].$in.filter(
558
564
  (g) => !l[m].$in.includes(g)
559
565
  ).length > 0 && s.push(a);
560
- } else if (!c.conditions && a.conditions)
566
+ } else if (!u.conditions && a.conditions)
561
567
  s.push(a);
562
- else if (c.conditions && !a.conditions)
563
- h(JSON.parse(c.conditions)) || s.push(a);
564
- else if (!c.conditions && !a.conditions) {
565
- const l = new Set(c.actions), d = new Set(a.actions), m = a.actions.some((p) => !l.has(p)), f = c.actions.filter((p) => !d.has(p));
568
+ else if (u.conditions && !a.conditions)
569
+ h(JSON.parse(u.conditions)) || s.push(a);
570
+ else if (!u.conditions && !a.conditions) {
571
+ const l = new Set(u.actions), d = new Set(a.actions), m = a.actions.some((p) => !l.has(p)), f = u.actions.filter((p) => !d.has(p));
566
572
  if (m) {
567
573
  const p = a.actions.filter((g) => !l.has(g));
568
574
  s.push({
@@ -571,20 +577,20 @@ function Ae(e, n) {
571
577
  });
572
578
  }
573
579
  f.length > 0 && s.push({
574
- ...c,
580
+ ...u,
575
581
  actions: f,
576
582
  inverted: !0
577
583
  });
578
584
  }
579
585
  continue;
580
586
  }
581
- if (c) {
587
+ if (u) {
582
588
  s.push(
583
589
  t(
584
- c,
590
+ u,
585
591
  // If base has conditions, set diffIds to empty array, disallow all access to collection
586
592
  // otherwise, invert directly
587
- c.conditions && []
593
+ u.conditions && []
588
594
  )
589
595
  );
590
596
  continue;
@@ -626,30 +632,30 @@ function ue(e, n) {
626
632
  }
627
633
  function Ee(e, n) {
628
634
  const t = e.find(
629
- (u) => !u.inverted && u.subject === ae
635
+ (c) => !c.inverted && c.subject === ae
630
636
  ), o = e.find(
631
- (u) => !u.inverted && u.subject === ce
637
+ (c) => !c.inverted && c.subject === ce
632
638
  );
633
639
  if (!t && !o) return e;
634
640
  const i = t ? new Set(t.actions) : null, s = o ? new Set(o.actions) : null;
635
- return e.reduce((u, r) => {
641
+ return e.reduce((c, r) => {
636
642
  if (r.inverted)
637
- return u.push(r), u;
638
- const c = r.subject;
639
- if (!c.startsWith(re))
640
- return u.push(r), u;
641
- const a = n.has(c), l = a ? i : s, d = a ? t : o;
643
+ return c.push(r), c;
644
+ const u = r.subject;
645
+ if (!u.startsWith(re))
646
+ return c.push(r), c;
647
+ const a = n.has(u), l = a ? i : s, d = a ? t : o;
642
648
  if (!l || !d || !ue(d, r))
643
- return u.push(r), u;
644
- if (l.has("manage")) return u;
649
+ return c.push(r), c;
650
+ if (l.has("manage")) return c;
645
651
  const m = new Set(r.actions), f = m.has("manage");
646
652
  let p = !1;
647
653
  for (const g of l)
648
654
  g !== "manage" && m.delete(g) && (p = !0);
649
- return f && p && m.delete("manage"), m.size === 0 || u.push({ ...r, actions: Array.from(m) }), u;
655
+ return f && p && m.delete("manage"), m.size === 0 || c.push({ ...r, actions: Array.from(m) }), c;
650
656
  }, []);
651
657
  }
652
- function L(e, n) {
658
+ function M(e, n) {
653
659
  var o, i;
654
660
  const t = new Map(e.map((s) => [s.subject, s]));
655
661
  for (const s of n) {
@@ -657,12 +663,12 @@ function L(e, n) {
657
663
  const r = t.get(s.subject);
658
664
  if (s.conditions) {
659
665
  if (r != null && r.conditions) {
660
- const c = JSON.parse(r.conditions), a = JSON.parse(s.conditions);
661
- if (!h(c) || !h(a)) {
666
+ const u = JSON.parse(r.conditions), a = JSON.parse(s.conditions);
667
+ if (!h(u) || !h(a)) {
662
668
  t.delete(s.subject);
663
669
  continue;
664
670
  }
665
- const l = Object.keys(a)[0], d = ((o = a[l]) == null ? void 0 : o.$in) ?? [], f = (((i = c[l]) == null ? void 0 : i.$in) ?? []).filter((p) => !d.includes(p));
671
+ const l = Object.keys(a)[0], d = ((o = a[l]) == null ? void 0 : o.$in) ?? [], f = (((i = u[l]) == null ? void 0 : i.$in) ?? []).filter((p) => !d.includes(p));
666
672
  f.length > 0 ? t.set(s.subject, {
667
673
  ...r,
668
674
  conditions: JSON.stringify({ [l]: { $in: f } })
@@ -672,7 +678,7 @@ function L(e, n) {
672
678
  continue;
673
679
  }
674
680
  if (r) {
675
- const c = new Set(s.actions), a = r.actions.filter((l) => !c.has(l));
681
+ const u = new Set(s.actions), a = r.actions.filter((l) => !u.has(l));
676
682
  a.length > 0 ? t.set(s.subject, { ...r, actions: a }) : t.delete(s.subject);
677
683
  continue;
678
684
  }
@@ -682,26 +688,26 @@ function L(e, n) {
682
688
  t.set(s.subject, s);
683
689
  continue;
684
690
  }
685
- const u = t.get(s.subject);
686
- if (u != null && u.conditions && !h(JSON.parse(u.conditions))) {
691
+ const c = t.get(s.subject);
692
+ if (c != null && c.conditions && !h(JSON.parse(c.conditions))) {
687
693
  t.set(s.subject, s);
688
694
  continue;
689
695
  }
690
- if (u) {
696
+ if (c) {
691
697
  const r = [
692
698
  .../* @__PURE__ */ new Set([
693
- ...u.actions,
699
+ ...c.actions,
694
700
  ...s.actions
695
701
  ])
696
702
  ];
697
- t.set(s.subject, { ...u, actions: r });
703
+ t.set(s.subject, { ...c, actions: r });
698
704
  } else
699
705
  t.set(s.subject, s);
700
706
  }
701
707
  return Array.from(t.values());
702
708
  }
703
709
  function le(e, n) {
704
- const t = L(e, n), o = new Set(e.map((s) => s.subject)), i = n.filter(
710
+ const t = M(e, n), o = new Set(e.map((s) => s.subject)), i = n.filter(
705
711
  (s) => s.inverted && !o.has(s.subject)
706
712
  );
707
713
  return [...t, ...i];
@@ -740,18 +746,18 @@ const P = "/permission-assignments", w = {
740
746
  return await w.readByUserId(r);
741
747
  }
742
748
  async function o(r) {
743
- const c = await w.create(r);
744
- e.value = [...e.value, c];
749
+ const u = await w.create(r);
750
+ e.value = [...e.value, u];
745
751
  }
746
- async function i(r, c) {
747
- const a = await w.update(r, c);
752
+ async function i(r, u) {
753
+ const a = await w.update(r, u);
748
754
  e.value = e.value.map((l) => l.id === r ? a : l);
749
755
  }
750
756
  async function s(r) {
751
- await w.delete(r), e.value = e.value.filter((c) => c.id !== r);
757
+ await w.delete(r), e.value = e.value.filter((u) => u.id !== r);
752
758
  }
753
- function u(r) {
754
- return e.value.find((c) => c.userId === r);
759
+ function c(r) {
760
+ return e.value.find((u) => u.userId === r);
755
761
  }
756
762
  return {
757
763
  permissionAssignments: e,
@@ -760,7 +766,7 @@ const P = "/permission-assignments", w = {
760
766
  createPermissionAssignment: o,
761
767
  updatePermissionAssignment: i,
762
768
  deletePermissionAssignment: s,
763
- getPermissionAssignmentByUserId: u
769
+ getPermissionAssignmentByUserId: c
764
770
  };
765
771
  }), me = () => {
766
772
  const e = de();
@@ -796,12 +802,12 @@ function pe() {
796
802
  }
797
803
  R.value = !0;
798
804
  try {
799
- const u = await fe.fetchReportPermissionsForPortal(o, i);
805
+ const c = await fe.fetchReportPermissionsForPortal(o, i);
800
806
  if ($.value !== o) return;
801
- T.value = u, C.value = !0, x.value = i;
802
- } catch (u) {
807
+ T.value = c, C.value = !0, x.value = i;
808
+ } catch (c) {
803
809
  if ($.value !== o) return;
804
- console.warn("Failed to fetch custom report permissions:", u), T.value = [];
810
+ console.warn("Failed to fetch custom report permissions:", c), T.value = [];
805
811
  } finally {
806
812
  $.value === o && (R.value = !1, J.value && (J.value = !1, await n()));
807
813
  }
@@ -834,15 +840,15 @@ function pe() {
834
840
  };
835
841
  }
836
842
  function I(e) {
837
- const n = te(), t = me(), o = Z().restaurants, { customReportPermissions: i } = pe(), s = t.getPermissionAssignmentByUserId(e.id), u = H(
843
+ const n = te(), t = me(), o = Z().restaurants, { customReportPermissions: i } = pe(), s = t.getPermissionAssignmentByUserId(e.id), c = H(
838
844
  (s == null ? void 0 : s.permissionSetIds) ?? [],
839
845
  n.permissionSets.value
840
- ), r = Q(u).map(
846
+ ), r = Q(c).map(
841
847
  ({ setNames: p, ...g }) => g
842
- ), c = s == null ? void 0 : s.customPermissions, a = c ?? e.permissions.map((p) => ({
848
+ ), u = s == null ? void 0 : s.customPermissions, a = u ?? e.permissions.map((p) => ({
843
849
  ...p,
844
850
  subject: A(p.subject)
845
- })), l = L(r, a), d = G(
851
+ })), l = M(r, a), d = G(
846
852
  le(r, a),
847
853
  V
848
854
  ).filter((p) => !p.inverted), m = ve(d), f = m ?? o.value.map((p) => p._id);
@@ -913,10 +919,10 @@ const be = Object.freeze(
913
919
  }
914
920
  };
915
921
  function Te(e, n, t) {
916
- if (e.some((u) => u.subject === "all")) return "All";
917
- const o = (t ?? M).filter(
918
- (u) => u.subject === n
919
- ), i = new Set(o.map((u) => O(u).value)), s = e.filter((u) => u.subject === n).filter((u) => i.has(O(u).value));
922
+ if (e.some((c) => c.subject === "all")) return "All";
923
+ const o = (t ?? L).filter(
924
+ (c) => c.subject === n
925
+ ), i = new Set(o.map((c) => O(c).value)), s = e.filter((c) => c.subject === n).filter((c) => i.has(O(c).value));
920
926
  return s.length === o.length ? "All" : s.length === 0 ? "-" : `${s.length} permission allow`;
921
927
  }
922
928
  function O(e) {
@@ -971,7 +977,7 @@ function Be(e) {
971
977
  const { name: t, ...o } = n.conditions ?? {};
972
978
  return Object.keys(o).length > 0 ? o : void 0;
973
979
  }
974
- function Me(e, n, t) {
980
+ function Le(e, n, t) {
975
981
  return e.map((o) => {
976
982
  const i = ge(o), s = i.isReportPermission ? t == null ? void 0 : t.get(o) : void 0;
977
983
  return {
@@ -988,7 +994,7 @@ function Me(e, n, t) {
988
994
  function ge(e) {
989
995
  const [n, t] = e.split(":");
990
996
  let o;
991
- return t ? (o = M.find(
997
+ return t ? (o = L.find(
992
998
  (i) => i.subject === n && [
993
999
  (typeof i.conditions == "object" ? i.conditions : JSON.parse(i.conditions)).operation,
994
1000
  i.conditions.name
@@ -1000,7 +1006,7 @@ function ge(e) {
1000
1006
  conditions: { name: t },
1001
1007
  inverted: !1,
1002
1008
  reason: ""
1003
- })) : o = M.find((i) => i.subject === n), O(o || { subject: y.F_RULE_SUBJECT.enum.order, actions: [], label: "" });
1009
+ })) : o = L.find((i) => i.subject === n), O(o || { subject: y.F_RULE_SUBJECT.enum.order, actions: [], label: "" });
1004
1010
  }
1005
1011
  function Se(e, n = []) {
1006
1012
  return W(
@@ -1024,8 +1030,8 @@ export {
1024
1030
  Te as b,
1025
1031
  H as c,
1026
1032
  le as d,
1027
- M as e,
1028
- Me as f,
1033
+ L as e,
1034
+ Le as f,
1029
1035
  Ce as g,
1030
1036
  Je as h,
1031
1037
  pe as i,
@@ -8,6 +8,10 @@ declare const AuditLogAPI: {
8
8
  subjectPrefixes?: string[];
9
9
  actions?: string[];
10
10
  outcomes?: string[];
11
+ feedmeAdminActors?: boolean;
12
+ search?: string;
13
+ searchUserIds?: string[];
14
+ searchSubjects?: string[];
11
15
  }): Promise<number>;
12
16
  read(params?: {
13
17
  limit?: number;
@@ -19,6 +23,25 @@ declare const AuditLogAPI: {
19
23
  subjectPrefixes?: string[];
20
24
  actions?: string[];
21
25
  outcomes?: string[];
26
+ feedmeAdminActors?: boolean;
27
+ search?: string;
28
+ searchUserIds?: string[];
29
+ searchSubjects?: string[];
22
30
  }): Promise<AuditLogEntry[]>;
31
+ /**
32
+ * FeedMe-admin options for the User filter. `actors` is the named admin list (internal
33
+ * viewers only; empty for merchants). `showFeedmeAdminFilter` indicates whether to offer
34
+ * the "FeedMe Admin" catch-all (only when the business has relevant admin activity).
35
+ */
36
+ getFeedmeAdminFilter(params?: {
37
+ from?: string;
38
+ to?: string;
39
+ }): Promise<{
40
+ actors: {
41
+ userId: string;
42
+ name: string;
43
+ }[];
44
+ showFeedmeAdminFilter: boolean;
45
+ }>;
23
46
  };
24
47
  export default AuditLogAPI;
@@ -1,3 +1,9 @@
1
1
  import { type FmButtonProps } from '@feedmepos/ui-library';
2
- declare const _default: import("vue").DefineComponent<FmButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FmButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
+ interface Props extends FmButtonProps {
3
+ /** Whether the page has a fixed bottom footer (e.g. a pagination bar) the mobile FAB should raise above. */
4
+ hasFooterBelow?: boolean;
5
+ }
6
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
7
+ hasFooterBelow: boolean;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
9
  export default _default;
@@ -4,6 +4,9 @@ export interface BaseOption {
4
4
  export interface SelectFilterOption {
5
5
  label: string;
6
6
  value: any;
7
+ /** Optional group/section label. When any option has a `group`, the menu renders
8
+ * section headers with per-group counts. Order groups by ordering `items`. */
9
+ group?: string;
7
10
  [key: string]: any;
8
11
  }
9
12
  export interface Props {
@@ -1,6 +1,7 @@
1
1
  interface Props {
2
2
  title: string;
3
3
  subtitle: string;
4
+ isOutlined?: boolean;
4
5
  action?: {
5
6
  text: string;
6
7
  icon?: string;
@@ -11,7 +12,9 @@ declare var __VLS_8: {};
11
12
  type __VLS_Slots = {} & {
12
13
  action?: (props: typeof __VLS_8) => any;
13
14
  };
14
- declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
16
+ isOutlined: boolean;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
18
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
16
19
  export default _default;
17
20
  type __VLS_WithSlots<T, S> = T & {
@@ -0,0 +1,31 @@
1
+ import { type Breakpoints } from '@feedmepos/ui-library';
2
+ interface Props {
3
+ title: string;
4
+ subtitle: string;
5
+ isEmpty: boolean;
6
+ isLoading?: boolean;
7
+ /**
8
+ * At what width do the column titles disappear? Below/at this breakpoint the message is
9
+ * styled as a standalone bordered card instead of blending flat under the table header. Must
10
+ * mirror the wrapped FmTable's own `shrink-at` prop (both default to "sm"); pass `false` if
11
+ * the table never collapses.
12
+ */
13
+ collapseAt?: Breakpoints | false;
14
+ }
15
+ declare var __VLS_1: {
16
+ isEmpty: boolean;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ default?: (props: typeof __VLS_1) => any;
20
+ };
21
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
22
+ isLoading: boolean;
23
+ collapseAt: Breakpoints | false;
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };