@stsdti/approvable-vue 0.1.0 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -94,13 +94,27 @@ The renderer receives `button`, `step`, `approvable`, `resource` and a
94
94
 
95
95
  ## Configuration
96
96
 
97
+ The HTTP client is optional: with no configuration the components use `fetch`
98
+ and echo the `XSRF-TOKEN` cookie back as `X-XSRF-TOKEN`, so Laravel's CSRF check
99
+ passes. Configure it when you want your own axios instance — its `baseURL`,
100
+ interceptors and auth:
101
+
102
+ ```js
103
+ import { configureApprovableClient } from '@stsdti/approvable-vue'
104
+
105
+ configureApprovableClient({ axios }) // your axios instance
106
+ configureApprovableClient({ fetch: myFetch }) // a custom fetch
107
+ configureApprovableClient({ baseURL: '/admin-api' }) // default transport, other prefix
108
+ configureApprovableClient({ adapter: myAdapter }) // anything else
109
+ ```
110
+
97
111
  Notifications and date formatting are configured on the core package:
98
112
 
99
113
  ```js
100
- import { setApprovableNotifier, setApprovableClient, ApprovableClient, axiosAdapter } from '@stsdti/approvable-core'
114
+ import { setApprovableNotifier, setApprovableDateFormatter } from '@stsdti/approvable-core'
101
115
 
102
116
  setApprovableNotifier({ success: toast.success, error: toast.error })
103
- setApprovableClient(new ApprovableClient({ adapter: axiosAdapter(axios) }))
117
+ setApprovableDateFormatter((value) => dayjs(value).format('LLL'))
104
118
  ```
105
119
 
106
120
  ## License
@@ -1,6 +1,6 @@
1
- import { inject as J, ref as T, computed as C, watch as se, openBlock as e, createElementBlock as a, normalizeClass as N, createElementVNode as t, toDisplayString as c, unref as w, createCommentVNode as y, createTextVNode as z, Fragment as D, renderList as q, useTemplateRef as oe, onMounted as re, onBeforeUnmount as ke, withDirectives as ge, vModelText as Se, nextTick as we, markRaw as Ae, renderSlot as H, createBlock as K, resolveDynamicComponent as W, mergeProps as X, withCtx as ie, createVNode as pe, normalizeStyle as Q, createSlots as $e, Teleport as Ce, withModifiers as Ee, withKeys as Re, useModel as De, mergeModels as le } from "vue";
1
+ import { inject as J, ref as T, computed as C, watch as se, openBlock as e, createElementBlock as a, normalizeClass as N, createElementVNode as t, toDisplayString as c, unref as A, createCommentVNode as y, createTextVNode as z, Fragment as D, renderList as q, useTemplateRef as oe, onMounted as re, onBeforeUnmount as ke, withDirectives as ge, vModelText as Se, nextTick as Ae, markRaw as we, renderSlot as H, createBlock as K, resolveDynamicComponent as W, mergeProps as X, withCtx as ie, createVNode as pe, normalizeStyle as Q, createSlots as $e, Teleport as Ce, withModifiers as Ee, withKeys as Re, useModel as De, mergeModels as le } from "vue";
2
2
  import { mergeMessages as Le, ApprovableAuditRepository as xe, formatMessage as G, get as V, notifyError as ne, ApprovableStepRepository as ue, isSuccessResponse as de, notifySuccess as ce, registerActionRenderer as Oe, createStepViewModel as Me, approvableStatusTone as Ie, approvableStepGlyph as Te, isClassIcon as Y, actionRenderer as Ne, performStepAction as Ve, ApprovableStatus as B, createApprovableViewModel as je, isRegisteredIcon as Pe, isUrlIcon as qe, ApprovableStatusRepository as Be } from "@stsdti/approvable-core";
3
- import { actionRenderer as fa, actionSlotName as ha, isClassIcon as ya, isRegisteredIcon as _a, isUrlIcon as ka, unregisterActionRenderer as ga } from "@stsdti/approvable-core";
3
+ import { ApprovableClient as fa, actionRenderer as ha, actionSlotName as ya, axiosAdapter as _a, configureApprovableClient as ka, fetchAdapter as ga, getApprovableClient as Sa, isClassIcon as Aa, isRegisteredIcon as wa, isUrlIcon as $a, setApprovableClient as Ca, unregisterActionRenderer as Ea } from "@stsdti/approvable-core";
4
4
  const ve = Symbol("approvable.messages");
5
5
  function U() {
6
6
  return Le(J(ve, null));
@@ -33,7 +33,7 @@ const Ke = {
33
33
  },
34
34
  emits: ["loaded"],
35
35
  setup(r, { expose: _, emit: b }) {
36
- const f = r, h = b, S = U(), k = new xe(), o = T([]), m = T(!1), L = T(""), A = {
36
+ const f = r, h = b, S = U(), k = new xe(), o = T([]), m = T(!1), L = T(""), w = {
37
37
  approvable_status_name: "Status",
38
38
  comment: "Comment",
39
39
  responsible: "Assigned to",
@@ -98,7 +98,7 @@ const Ke = {
98
98
  }
99
99
  function u(s) {
100
100
  const n = s.old_values || {}, l = s.new_values || {};
101
- return Object.keys(A).filter((i) => i in n || i in l).map((i) => ({ key: i, label: A[i], oldValue: n[i], newValue: l[i] })).filter((i) => i.oldValue !== i.newValue);
101
+ return Object.keys(w).filter((i) => i in n || i in l).map((i) => ({ key: i, label: w[i], oldValue: n[i], newValue: l[i] })).filter((i) => i.oldValue !== i.newValue);
102
102
  }
103
103
  function E(s) {
104
104
  return s.oldValue !== void 0 && s.oldValue !== null && s.oldValue !== "";
@@ -142,7 +142,7 @@ const Ke = {
142
142
  class: N(["approvable-timeline", r.showHeader && "approvable-timeline--panel"])
143
143
  }, [
144
144
  r.showHeader ? (e(), a("div", Ke, [
145
- t("p", Ue, c(w(S).history), 1),
145
+ t("p", Ue, c(A(S).history), 1),
146
146
  t("h3", Fe, c(g.value), 1),
147
147
  t("button", {
148
148
  type: "button",
@@ -209,7 +209,7 @@ const Ke = {
209
209
  ])
210
210
  ], 2))), 128))
211
211
  ]),
212
- t("p", it, c(w(S).allEventsShown), 1)
212
+ t("p", it, c(A(S).allEventsShown), 1)
213
213
  ], 64)) : (e(), a("p", Qe, "No approval activity yet."))
214
214
  ], 2));
215
215
  }
@@ -236,11 +236,11 @@ const Ke = {
236
236
  emits: ["isLoading", "refresh"],
237
237
  setup(r, { emit: _ }) {
238
238
  const b = r, f = _, h = oe("rootRef"), S = oe("textareaRef"), k = T(!1), o = T(!1), m = T(null), L = C(() => V(b.approvableStep, "commented_by"));
239
- function A() {
239
+ function w() {
240
240
  k.value ? v() : O();
241
241
  }
242
242
  function O() {
243
- m.value = V(b.approvableStep, "comment"), k.value = !0, we(d);
243
+ m.value = V(b.approvableStep, "comment"), k.value = !0, Ae(d);
244
244
  }
245
245
  function v() {
246
246
  k.value = !1;
@@ -279,9 +279,9 @@ const Ke = {
279
279
  }, [
280
280
  t("button", {
281
281
  class: "approvable-btn",
282
- title: w(R).comments,
282
+ title: A(R).comments,
283
283
  type: "button",
284
- onClick: A
284
+ onClick: w
285
285
  }, [...E[1] || (E[1] = [
286
286
  t("svg", {
287
287
  xmlns: "http://www.w3.org/2000/svg",
@@ -304,9 +304,9 @@ const Ke = {
304
304
  o.value ? (e(), a("div", dt, [...E[2] || (E[2] = [
305
305
  t("span", { class: "approvable-spinner" }, null, -1)
306
306
  ])])) : y("", !0),
307
- t("div", ct, c(w(R).comments), 1),
307
+ t("div", ct, c(A(R).comments), 1),
308
308
  L.value ? (e(), a("div", vt, [
309
- t("div", null, c(w(R).commentAuthor) + ":", 1),
309
+ t("div", null, c(A(R).commentAuthor) + ":", 1),
310
310
  t("div", mt, c(L.value), 1)
311
311
  ])) : y("", !0),
312
312
  r.disabled ? y("", !0) : (e(), a(D, { key: 2 }, [
@@ -325,7 +325,7 @@ const Ke = {
325
325
  class: "approvable-btn approvable-btn--primary",
326
326
  type: "button",
327
327
  onClick: p
328
- }, c(w(R).save), 1)
328
+ }, c(A(R).save), 1)
329
329
  ])
330
330
  ], 64))
331
331
  ])) : y("", !0)
@@ -333,7 +333,7 @@ const Ke = {
333
333
  }
334
334
  };
335
335
  function ca(r, _) {
336
- return Oe(r, Ae(_));
336
+ return Oe(r, we(_));
337
337
  }
338
338
  const fe = Symbol("approvable.linkComponent");
339
339
  function ft() {
@@ -354,7 +354,7 @@ const _t = {
354
354
  "stroke-linecap": "round",
355
355
  "stroke-linejoin": "round",
356
356
  viewBox: "0 0 16 16"
357
- }, kt = ["d", "stroke-width"], gt = { class: "approvable-step-body" }, St = { class: "approvable-step-line" }, wt = { class: "approvable-step-name" }, At = ["title"], $t = {
357
+ }, kt = ["d", "stroke-width"], gt = { class: "approvable-step-body" }, St = { class: "approvable-step-line" }, At = { class: "approvable-step-name" }, wt = ["title"], $t = {
358
358
  key: 1,
359
359
  class: "approvable-step-spacer"
360
360
  }, Ct = {
@@ -390,7 +390,7 @@ const _t = {
390
390
  },
391
391
  emits: ["isLoading", "refresh"],
392
392
  setup(r, { emit: _ }) {
393
- const b = _, f = r, h = ft(), S = U(), k = T(!1), o = C(() => Me(f.value)), m = C(() => Ie(o.value.status)), L = C(() => o.value.buttons.length > 0 || !!f.value.can_comment), A = C(() => (!o.value.isActive || !L.value) && !!(o.value.statusName || o.value.performedAt)), O = C(() => ({
393
+ const b = _, f = r, h = ft(), S = U(), k = T(!1), o = C(() => Me(f.value)), m = C(() => Ie(o.value.status)), L = C(() => o.value.buttons.length > 0 || !!f.value.can_comment), w = C(() => (!o.value.isActive || !L.value) && !!(o.value.statusName || o.value.performedAt)), O = C(() => ({
394
394
  "approvable-step": !0,
395
395
  "approvable-step--active": o.value.isActive,
396
396
  // A step nobody has reached yet is dimmed; one with an outcome is not.
@@ -443,7 +443,7 @@ const _t = {
443
443
  t("div", gt, [
444
444
  t("div", St, [
445
445
  H(I.$slots, "approvableStepInfo", { step: r.value }, () => [
446
- t("span", wt, c(o.value.approverName), 1)
446
+ t("span", At, c(o.value.approverName), 1)
447
447
  ]),
448
448
  H(I.$slots, "approvableStepRole", {
449
449
  step: r.value,
@@ -453,9 +453,9 @@ const _t = {
453
453
  key: 0,
454
454
  title: o.value.approverRole,
455
455
  class: "approvable-step-role"
456
- }, c(o.value.approverRole), 9, At)) : (e(), a("span", $t))
456
+ }, c(o.value.approverRole), 9, wt)) : (e(), a("span", $t))
457
457
  ]),
458
- A.value ? (e(), a("span", Ct, [
458
+ w.value ? (e(), a("span", Ct, [
459
459
  o.value.statusName ? (e(), a("span", Et, c(o.value.statusName), 1)) : y("", !0),
460
460
  o.value.performedAt ? (e(), a("time", Rt, c(o.value.performedAt), 1)) : y("", !0)
461
461
  ])) : y("", !0),
@@ -475,10 +475,10 @@ const _t = {
475
475
  step: r.value,
476
476
  onIsLoading: M[0] || (M[0] = (n) => b("isLoading", n)),
477
477
  onRefresh: M[1] || (M[1] = (n) => b("refresh"))
478
- }, null, 40, ["action-ui", "approvable", "button", "buttons", "resource", "step"])) : g.link ? (e(), K(W(w(h)), X({
478
+ }, null, 40, ["action-ui", "approvable", "button", "buttons", "resource", "step"])) : g.link ? (e(), K(W(A(h)), X({
479
479
  key: 1,
480
480
  ref_for: !0
481
- }, w(ht)(w(h), g.link)), {
481
+ }, A(ht)(A(h), g.link)), {
482
482
  default: ie(() => [
483
483
  t("button", {
484
484
  title: g.tooltip,
@@ -486,7 +486,7 @@ const _t = {
486
486
  type: "button",
487
487
  onClick: (n) => P(g)
488
488
  }, [
489
- w(Y)(g.icon) ? (e(), a("i", {
489
+ A(Y)(g.icon) ? (e(), a("i", {
490
490
  key: 0,
491
491
  class: N(g.icon)
492
492
  }, null, 2)) : y("", !0)
@@ -500,7 +500,7 @@ const _t = {
500
500
  type: "button",
501
501
  onClick: (n) => P(g)
502
502
  }, [
503
- w(Y)(g.icon) ? (e(), a("i", {
503
+ A(Y)(g.icon) ? (e(), a("i", {
504
504
  key: 0,
505
505
  class: N(g.icon)
506
506
  }, null, 2)) : y("", !0),
@@ -528,7 +528,7 @@ const _t = {
528
528
  class: "approvable-step-comment-more",
529
529
  "aria-expanded": k.value,
530
530
  onClick: M[4] || (M[4] = (g) => k.value = !k.value)
531
- }, c(k.value ? w(S).showLess : w(S).showMore), 9, Nt)) : y("", !0)
531
+ }, c(k.value ? A(S).showLess : A(S).showMore), 9, Nt)) : y("", !0)
532
532
  ])) : y("", !0)
533
533
  ])
534
534
  ], 2)) : y("", !0);
@@ -589,11 +589,11 @@ const _t = {
589
589
  { name: "118px", meta: "56px", delay: "0s", metaDelay: "0.15s" },
590
590
  { name: "96px", meta: "72px", delay: "0.1s", metaDelay: "0.25s" },
591
591
  { name: "78px", meta: "48px", delay: "0.2s", metaDelay: "0.35s" }
592
- ], A = C(() => je(b.value)), O = C(() => o.value === null ? m.historyTitle : G(m.eventCount, { count: o.value })), v = C(() => h.value && !A.value.steps.length), d = C(() => ({
592
+ ], w = C(() => je(b.value)), O = C(() => o.value === null ? m.historyTitle : G(m.eventCount, { count: o.value })), v = C(() => h.value && !w.value.steps.length), d = C(() => ({
593
593
  "approvable-steps": !0,
594
594
  "approvable-steps--row": b.isDirectionRow
595
595
  })), x = C(() => {
596
- const { activeStepNumber: R, visibleStepCount: p, activeApproverName: u } = A.value;
596
+ const { activeStepNumber: R, visibleStepCount: p, activeApproverName: u } = w.value;
597
597
  if (!R || !p)
598
598
  return null;
599
599
  const E = G(m.stepProgress, {
@@ -605,8 +605,8 @@ const _t = {
605
605
  var R;
606
606
  (R = S.value) == null || R.refresh(), f("refresh");
607
607
  };
608
- return (R, p) => A.value.hasApprovable ? (e(), a("div", Vt, [
609
- h.value && A.value.steps.length ? (e(), a("div", jt, [...p[6] || (p[6] = [
608
+ return (R, p) => w.value.hasApprovable ? (e(), a("div", Vt, [
609
+ h.value && w.value.steps.length ? (e(), a("div", jt, [...p[6] || (p[6] = [
610
610
  t("span", { class: "approvable-spinner" }, null, -1)
611
611
  ])])) : y("", !0),
612
612
  t("div", Pt, [
@@ -625,22 +625,22 @@ const _t = {
625
625
  ], 64)) : (e(), a(D, { key: 1 }, [
626
626
  r.showApprovableStatus ? (e(), K(_e, {
627
627
  key: 0,
628
- label: A.value.statusName,
629
- value: A.value.status
628
+ label: w.value.statusName,
629
+ value: w.value.status
630
630
  }, null, 8, ["label", "value"])) : y("", !0),
631
- t("span", Bt, c(A.value.updatedAt), 1),
632
- A.value.id ? (e(), a("button", {
631
+ t("span", Bt, c(w.value.updatedAt), 1),
632
+ w.value.id ? (e(), a("button", {
633
633
  key: 1,
634
634
  type: "button",
635
635
  class: "approvable-history-btn",
636
- title: w(m).historyTitle,
637
- "aria-label": w(m).historyTitle,
636
+ title: A(m).historyTitle,
637
+ "aria-label": A(m).historyTitle,
638
638
  onClick: p[0] || (p[0] = (u) => k.value = !0)
639
- }, c(w(m).history), 9, Kt)) : y("", !0)
639
+ }, c(A(m).history), 9, Kt)) : y("", !0)
640
640
  ], 64))
641
641
  ]),
642
642
  v.value ? (e(), a(D, { key: 1 }, [
643
- t("span", Ut, c(w(m).loadingStatus), 1),
643
+ t("span", Ut, c(A(m).loadingStatus), 1),
644
644
  (e(), a(D, null, q(L, (u) => t("div", {
645
645
  key: u.delay,
646
646
  "aria-hidden": "true",
@@ -670,13 +670,13 @@ const _t = {
670
670
  })
671
671
  ], -1))
672
672
  ], 64)) : (e(), a(D, { key: 2 }, [
673
- A.value.steps.length ? (e(), a("ol", {
673
+ w.value.steps.length ? (e(), a("ol", {
674
674
  key: 0,
675
675
  class: N(d.value)
676
676
  }, [
677
- (e(!0), a(D, null, q(A.value.steps, (u) => (e(), K(ye, {
677
+ (e(!0), a(D, null, q(w.value.steps, (u) => (e(), K(ye, {
678
678
  key: u.id,
679
- approvable: A.value.approvable,
679
+ approvable: w.value.approvable,
680
680
  resource: r.value,
681
681
  value: u,
682
682
  onIsLoading: p[1] || (p[1] = (E) => h.value = E),
@@ -718,13 +718,13 @@ const _t = {
718
718
  }, [
719
719
  t("path", { d: "M9.6 4.5 6 8l3.6 3.5" })
720
720
  ], -1)),
721
- z(" " + c(w(m).history), 1)
721
+ z(" " + c(A(m).history), 1)
722
722
  ]),
723
723
  t("h2", zt, c(O.value), 1),
724
724
  t("button", {
725
725
  type: "button",
726
726
  class: "approvable-dialog-close",
727
- "aria-label": w(m).historyClose,
727
+ "aria-label": A(m).historyClose,
728
728
  onClick: p[2] || (p[2] = (u) => k.value = !1)
729
729
  }, [...p[13] || (p[13] = [
730
730
  t("svg", {
@@ -744,7 +744,7 @@ const _t = {
744
744
  pe(me, {
745
745
  ref_key: "auditTimeline",
746
746
  ref: S,
747
- "approvable-id": A.value.id,
747
+ "approvable-id": w.value.id,
748
748
  "show-header": !1,
749
749
  onLoaded: p[3] || (p[3] = (u) => o.value = u)
750
750
  }, null, 8, ["approvable-id"])
@@ -768,8 +768,8 @@ const _t = {
768
768
  setup(r, { emit: _ }) {
769
769
  const b = r, f = _, h = T(!1), S = C(() => V(b.value, "buttons", [])), k = C(() => S.value ? S.value.length > 0 : !1), o = yt(), m = U(), L = (O) => {
770
770
  let v = V(b.value, "id");
771
- v && A(v, O);
772
- }, A = async (O, v) => {
771
+ v && w(v, O);
772
+ }, w = async (O, v) => {
773
773
  f("isLoading", !0), h.value = !0;
774
774
  const d = await new ue().updateApproveStatus(O, v);
775
775
  de(d) && ce(m.actionSucceeded), f("isLoading", !1), f("refresh");
@@ -785,15 +785,15 @@ const _t = {
785
785
  onClick: (x) => L(d)
786
786
  }, [
787
787
  H(O.$slots, "icon", { button: d }, () => [
788
- w(Pe)(w(o), d.icon) ? (e(), K(W(w(o)[d.icon]), {
788
+ A(Pe)(A(o), d.icon) ? (e(), K(W(A(o)[d.icon]), {
789
789
  key: 0,
790
790
  class: "approvable-btn-icon"
791
- })) : w(qe)(d.icon) ? (e(), a("img", {
791
+ })) : A(qe)(d.icon) ? (e(), a("img", {
792
792
  key: 1,
793
793
  src: d.icon,
794
794
  alt: "",
795
795
  class: "approvable-btn-icon"
796
- }, null, 8, ea)) : w(Y)(d.icon) ? (e(), a("i", {
796
+ }, null, 8, ea)) : A(Y)(d.icon) ? (e(), a("i", {
797
797
  key: 2,
798
798
  class: N(d.icon)
799
799
  }, null, 2)) : y("", !0)
@@ -824,7 +824,7 @@ const _t = {
824
824
  const b = _, f = De(r, "modelValue"), h = r, S = T([]), k = async (v) => {
825
825
  let d = [{ field: "search", value: v }];
826
826
  return await new Be().fetchAll({ filters: d });
827
- }, o = (v) => String(V(v, "id") ?? V(v, "code", "")), m = (v) => V(v, "name") ?? V(v, "text", ""), L = C(() => f.value ? o(f.value) : ""), A = (v) => {
827
+ }, o = (v) => String(V(v, "id") ?? V(v, "code", "")), m = (v) => V(v, "name") ?? V(v, "text", ""), L = C(() => f.value ? o(f.value) : ""), w = (v) => {
828
828
  const d = v.target.value;
829
829
  f.value = S.value.find((x) => o(x) === d) ?? null;
830
830
  }, O = async (v = null) => {
@@ -838,7 +838,7 @@ const _t = {
838
838
  t("select", X({
839
839
  value: L.value,
840
840
  class: "approvable-select-input"
841
- }, v.$attrs, { onChange: A }), [
841
+ }, v.$attrs, { onChange: w }), [
842
842
  d[0] || (d[0] = t("option", { value: "" }, "-", -1)),
843
843
  (e(!0), a(D, null, q(S.value, (x) => (e(), a("option", {
844
844
  key: o(x),
@@ -881,20 +881,26 @@ export {
881
881
  Yt as Approvable,
882
882
  me as ApprovableAuditTimeline,
883
883
  ta as ApprovableButtons,
884
+ fa as ApprovableClient,
884
885
  na as ApprovableStatusSelect,
885
886
  ia as ApprovableStatusSelectOption,
886
887
  ye as ApprovableStep,
887
888
  be as ApprovableStepComment,
888
889
  _e as ApproveStatusInfo,
889
- fa as approvableActionRenderer,
890
- ha as approvableActionSlotName,
890
+ ha as approvableActionRenderer,
891
+ ya as approvableActionSlotName,
892
+ _a as axiosAdapter,
893
+ ka as configureApprovableClient,
891
894
  va as default,
892
- ya as isClassIcon,
893
- _a as isRegisteredIcon,
894
- ka as isUrlIcon,
895
+ ga as fetchAdapter,
896
+ Sa as getApprovableClient,
897
+ Aa as isClassIcon,
898
+ wa as isRegisteredIcon,
899
+ $a as isUrlIcon,
895
900
  ht as linkProps,
896
901
  ca as registerApprovableActionRenderer,
897
- ga as unregisterApprovableActionRenderer,
902
+ Ca as setApprovableClient,
903
+ Ea as unregisterApprovableActionRenderer,
898
904
  yt as useIconRegistry,
899
905
  ft as useLinkComponent,
900
906
  U as useMessages
@@ -1 +1 @@
1
- {"version":3,"file":"approvable-vue.mjs","sources":["../src/messages.js","../src/components/approvable/ApprovableAuditTimeline.vue","../src/components/approvable/ApprovableStepComment.vue","../src/components/approvable/action-renderers.js","../src/config.js","../src/icons.js","../src/components/approvable/ApprovableStep.vue","../src/components/approvable/ApproveStatusInfo.vue","../src/components/approvable/Approvable.vue","../src/components/approvable/ApprovableButtons.vue","../src/components/select/approvable-status-select/ApprovableStatusSelect.vue","../src/components/select/approvable-status-select/ApprovableStatusSelectOption.vue","../src/index.js"],"sourcesContent":["import { inject } from 'vue'\nimport { DEFAULT_MESSAGES, mergeMessages } from '@stsdti/approvable-core'\n\nexport const APPROVABLE_MESSAGES = Symbol('approvable.messages')\n\n/**\n * The user-facing strings, in English.\n *\n * Defined in core so that every binding ships the same wording and the same\n * override surface — a string added for the React components is available\n * here too. Any of it can be replaced:\n *\n * app.use(Approvable, { messages: { comments: 'Comentarii' } })\n */\nexport function useMessages () {\n return mergeMessages(inject(APPROVABLE_MESSAGES, null))\n}\n\nexport { DEFAULT_MESSAGES, mergeMessages }\n","<script setup>\nimport { computed, ref, watch } from 'vue'\nimport { ApprovableAuditRepository, formatMessage } from '@stsdti/approvable-core'\nimport { useMessages } from '../../messages.js'\n\nconst props = defineProps({\n approvableId: { type: [Number, String], required: true },\n limit: { type: Number, default: 100 },\n showHeader: { type: Boolean, default: true }\n})\n\nconst emits = defineEmits(['loaded'])\n\nconst messages = useMessages()\nconst repository = new ApprovableAuditRepository()\nconst audits = ref([])\nconst loading = ref(false)\nconst error = ref('')\n\n// Only the fields a reader actually cares about. Everything else (ids,\n// timestamps we already show, internal bookkeeping) is intentionally hidden.\nconst FIELD_LABELS = {\n approvable_status_name: 'Status',\n comment: 'Comment',\n responsible: 'Assigned to',\n is_active: 'Active step'\n}\n\n// One glyph per kind of event, keyed by the `kind` we resolve below. Drawn on\n// the same 16-unit grid and at the same weight as the discs on the approval\n// trail, so a history row and a step row read as the same object.\nconst ICONS = {\n approve: { paths: ['M4 8.4l2.8 2.8 5.4-6'], width: 2.8 },\n reject: { paths: ['M5.2 5.2l5.6 5.6M10.8 5.2l-5.6 5.6'], width: 2.4 },\n comment: { paths: ['M8 4.6v3.6l2.6 1.6'], width: 2.2 },\n status: { paths: ['M4 8h8M9.2 5.4L11.8 8l-2.6 2.6'], width: 2.2 },\n undo: { paths: ['M4.4 6.6h3.4M4.4 6.6v-3M4.6 9.4a3.6 3.6 0 1 0 1-3.2'], width: 2 },\n signal: { paths: ['M8 3.4v3.2M5.2 5.2l2.2 2.2M8 11.6a1.4 1.4 0 1 0 0-2.8 1.4 1.4 0 0 0 0 2.8'], width: 1.8 },\n created: { paths: ['M4.4 8h7.2'], width: 2.2 },\n update: { paths: ['M4.4 8h7.2'], width: 2.2 }\n}\n\n/** Bookkeeping, not news: these rows are dimmed the way the design dims them. */\nconst QUIET_KINDS = new Set(['created', 'update'])\n\nconst groups = computed(() => {\n // The workflow-level rows are noise for a reader, so keep only step changes.\n const stepAudits = audits.value.filter(audit => audit.approvable_step_id)\n const grouped = new Map()\n for (const audit of stepAudits) {\n const key = audit.request_id || `audit-${audit.id}`\n if (!grouped.has(key)) grouped.set(key, [])\n grouped.get(key).push(audit)\n }\n return [...grouped.values()].map(entries => {\n const audit = entries[0]\n // Resolved here rather than in the template, where it was called twice per\n // row on every render — once for the marker class and once for its icon.\n const kind = auditKind(audit)\n // A row only needs a second line when there is something to put on it.\n const details = entries.flatMap(changeRows)\n\n return {\n id: audit.request_id || `audit-${audit.id}`,\n entries,\n audit,\n kind,\n // A modifier class rather than utilities: the accent for each kind of\n // event is a theme decision, so it belongs in the stylesheets alongside\n // every other colour, not baked into the component.\n kindClass: `approvable-timeline-marker--${kind}`,\n icon: ICONS[kind],\n isQuiet: QUIET_KINDS.has(kind),\n isSingleLine: details.length === 0\n }\n })\n // Newest first: the last thing that happened is the thing a reader opened\n // the history for.\n .sort((a, b) => new Date(b.audit.created_at) - new Date(a.audit.created_at))\n})\n\nfunction auditKind (audit) {\n const button = audit.metadata?.button\n if (button?.is_undo) return 'undo'\n if (button?.result === 'rejected') return 'reject'\n if (button?.result === 'approved') return 'approve'\n if (audit.metadata?.operation === 'comment') return 'comment'\n if (audit.metadata?.operation === 'signal') return 'signal'\n if (audit.event === 'created') return 'created'\n if (statusChanged(audit)) return 'status'\n return 'update'\n}\n\nfunction statusChanged (audit) {\n const before = audit.old_values?.approvable_status_name\n const after = audit.new_values?.approvable_status_name\n return after !== undefined && before !== after\n}\n\nfunction operationTitle (audit) {\n const button = audit.metadata?.button\n if (button) {\n const label = button.text || button.label || button.id || 'action'\n if (button.is_undo) return 'Reverted the decision'\n if (button.is_revision) return `Changed decision to ${label}`\n return label\n }\n if (audit.metadata?.operation === 'comment') return 'Comment added'\n if (audit.metadata?.operation === 'signal') return `Signal received: ${audit.metadata?.signal?.name || ''}`.trim()\n if (audit.event === 'created') return 'Step started'\n const after = audit.new_values?.approvable_status_name\n if (statusChanged(audit) && after) return `Status set to ${after}`\n return 'Step updated'\n}\n\nfunction actorLabel (actor = {}) {\n if (actor.type === 'system') return 'System'\n if (actor.name) return actor.name\n if (actor.email) return actor.email\n if (actor.id) return actor.type === 'fake' ? `Test user ${actor.id}` : `User ${actor.id}`\n if (actor.type === 'fake') return 'Test identity'\n return 'Automated'\n}\n\n// Changed fields worth surfacing, with the status change collapsed into a\n// single \"before → after\" row (never the raw id).\nfunction changeRows (entry) {\n const oldValues = entry.old_values || {}\n const newValues = entry.new_values || {}\n return Object.keys(FIELD_LABELS)\n .filter(key => key in oldValues || key in newValues)\n .map(key => ({ key, label: FIELD_LABELS[key], oldValue: oldValues[key], newValue: newValues[key] }))\n .filter(row => row.oldValue !== row.newValue)\n}\n\n/** A change only reads as \"before → after\" when there was a before. */\nfunction hasPreviousValue (change) {\n return change.oldValue !== undefined && change.oldValue !== null && change.oldValue !== ''\n}\n\nfunction displayValue (value) {\n if (value === null || value === undefined || value === '') return '—'\n if (typeof value === 'boolean') return value ? 'Yes' : 'No'\n if (Array.isArray(value)) return value.length ? value.join(', ') : '—'\n const text = typeof value === 'object' ? JSON.stringify(value) : String(value)\n return text.length > 180 ? `${text.slice(0, 177)}…` : text\n}\n\nfunction formatDate (value) {\n if (!value) return ''\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? value : new Intl.DateTimeFormat(undefined, {\n dateStyle: 'medium',\n timeStyle: 'short'\n }).format(date)\n}\n\nasync function refresh () {\n if (!props.approvableId) {\n audits.value = []\n loading.value = false\n error.value = 'The approval history is unavailable because the approvable has no id.'\n return\n }\n\n loading.value = true\n error.value = ''\n try {\n const response = await repository.fetchTimeline(props.approvableId, props.limit)\n if (!response || response.status < 200 || response.status >= 300) {\n throw new Error(response?.data?.message || 'The audit timeline could not be loaded.')\n }\n const data = Array.isArray(response.data) ? response.data : response.data?.data\n audits.value = Array.isArray(data) ? data : []\n } catch (exception) {\n error.value = exception?.message || 'The audit timeline could not be loaded.'\n } finally {\n loading.value = false\n }\n}\n\nconst eventSummary = computed(() => formatMessage(messages.eventCount, { count: groups.value.length }))\n\n// The dialog titles itself with the count, and only this component knows it.\nwatch(groups, (value) => emits('loaded', value.length))\n\nwatch(() => props.approvableId, refresh, { immediate: true })\ndefineExpose({ refresh })\n</script>\n\n<template>\n <section :class=\"['approvable-timeline', showHeader && 'approvable-timeline--panel']\">\n <div v-if=\"showHeader\" class=\"approvable-timeline-header\">\n <p class=\"approvable-timeline-eyebrow\">{{ messages.history }}</p>\n <h3 class=\"approvable-timeline-title\">{{ eventSummary }}</h3>\n <button type=\"button\" class=\"approvable-timeline-refresh\" :disabled=\"loading\" @click=\"refresh\">\n {{ loading ? 'Loading…' : 'Refresh' }}\n </button>\n </div>\n\n <div v-if=\"loading\" class=\"approvable-timeline-state\" role=\"status\">\n <span class=\"approvable-spinner\" aria-hidden=\"true\" />\n Loading approval history…\n </div>\n <p v-else-if=\"error\" class=\"approvable-timeline-error\">{{ error }}</p>\n <p v-else-if=\"!groups.length\" class=\"approvable-timeline-state\">No approval activity yet.</p>\n\n <template v-else>\n <ol class=\"approvable-timeline-list\">\n <li\n v-for=\"group in groups\"\n :key=\"group.id\"\n :class=\"['approvable-timeline-item', {\n 'approvable-timeline-item--single-line': group.isSingleLine,\n 'approvable-timeline-item--quiet': group.isQuiet\n }]\"\n >\n <span :class=\"['approvable-timeline-marker', group.kindClass]\">\n <svg fill=\"none\" stroke=\"currentColor\" :stroke-width=\"group.icon.width\" stroke-linecap=\"round\" stroke-linejoin=\"round\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path v-for=\"(d, i) in group.icon.paths\" :key=\"i\" :d=\"d\" />\n </svg>\n </span>\n\n <div class=\"approvable-timeline-content\">\n <div class=\"approvable-timeline-line\">\n <p class=\"approvable-timeline-actor\">{{ actorLabel(group.audit.actor) }}</p>\n <p class=\"approvable-timeline-operation\">{{ operationTitle(group.audit) }}</p>\n <time class=\"approvable-timeline-time\">{{ formatDate(group.audit.created_at) }}</time>\n </div>\n\n <template v-for=\"entry in group.entries\" :key=\"entry.id\">\n <template v-for=\"change in changeRows(entry)\" :key=\"`${entry.id}-${change.key}`\">\n <p v-if=\"change.key === 'comment'\" class=\"approvable-timeline-comment\">\n {{ displayValue(change.newValue) }}\n </p>\n <p v-else class=\"approvable-timeline-change\">\n <span class=\"approvable-timeline-change-label\">{{ change.label }}</span>\n <template v-if=\"hasPreviousValue(change)\">\n <span class=\"approvable-timeline-value approvable-timeline-value--old\">{{ displayValue(change.oldValue) }}</span>\n <span class=\"approvable-timeline-arrow\">→</span>\n </template>\n <span class=\"approvable-timeline-value approvable-timeline-value--new\">{{ displayValue(change.newValue) }}</span>\n </p>\n </template>\n </template>\n </div>\n </li>\n </ol>\n\n <p class=\"approvable-timeline-footer\">{{ messages.allEventsShown }}</p>\n </template>\n </section>\n</template>\n","<template>\n <div ref=\"rootRef\" class=\"approvable-popover\">\n <button class=\"approvable-btn\" :title=\"messages.comments\" type=\"button\" @click=\"onToggle\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M8 9h8\" />\n <path d=\"M8 13h6\" />\n <path d=\"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z\" />\n </svg>\n </button>\n\n <div v-if=\"isOpen\" class=\"approvable-popover-panel\">\n <div v-if=\"isLoading\" class=\"approvable-loading\">\n <span class=\"approvable-spinner\" />\n </div>\n\n <div class=\"approvable-popover-title\">{{ messages.comments }}</div>\n\n <div v-if=\"commentedBy\" class=\"approvable-popover-meta\">\n <div>{{ messages.commentAuthor }}:</div>\n <div class=\"approvable-popover-author\">{{ commentedBy }}</div>\n </div>\n\n <template v-if=\"!disabled\">\n <textarea\n ref=\"textareaRef\"\n v-model=\"comment\"\n class=\"approvable-textarea\"\n rows=\"1\"\n @input=\"resizeTextarea\"\n />\n\n <div class=\"approvable-popover-actions\">\n <button class=\"approvable-btn approvable-btn--primary\" type=\"button\" @click=\"onComment\">\n {{ messages.save }}\n </button>\n </div>\n </template>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, useTemplateRef } from 'vue'\n\nimport { ApprovableStepRepository, get, isSuccessResponse, notifyError, notifySuccess } from '@stsdti/approvable-core'\nimport { useMessages } from '../../messages.js'\n\nconst props = defineProps({\n approvableStep: {\n required: true,\n },\n disabled: {\n required: true,\n type: Boolean,\n },\n})\n\nconst emits = defineEmits(['isLoading', 'refresh'])\n\nconst rootRef = useTemplateRef('rootRef')\nconst textareaRef = useTemplateRef('textareaRef')\n\nconst isOpen = ref(false)\nconst isLoading = ref(false)\nconst comment = ref(null)\n\nconst commentedBy = computed(() => {\n return get(props.approvableStep, 'commented_by')\n})\n\nfunction onToggle () {\n isOpen.value ? hide() : show()\n}\n\nfunction show () {\n comment.value = get(props.approvableStep, 'comment')\n isOpen.value = true\n nextTick(resizeTextarea)\n}\n\nfunction hide () {\n isOpen.value = false\n}\n\nfunction resizeTextarea () {\n const textarea = textareaRef.value\n if (!textarea) {\n return\n }\n textarea.style.height = 'auto'\n textarea.style.height = `${textarea.scrollHeight}px`\n}\n\nfunction onDocumentClick (event) {\n if (isOpen.value && rootRef.value && !rootRef.value.contains(event.target)) {\n hide()\n }\n}\n\nfunction onDocumentKeydown (event) {\n if (event.key === 'Escape') {\n hide()\n }\n}\n\nonMounted(() => {\n document.addEventListener('click', onDocumentClick)\n document.addEventListener('keydown', onDocumentKeydown)\n})\n\nonBeforeUnmount(() => {\n document.removeEventListener('click', onDocumentClick)\n document.removeEventListener('keydown', onDocumentKeydown)\n})\n\nconst messages = useMessages()\n\nasync function onComment () {\n if (!get(props.approvableStep, 'comment') && !comment.value) {\n notifyError(messages.commentRequired)\n return\n }\n\n isLoading.value = true\n emits('isLoading', true)\n\n const data = {\n comment: comment.value,\n }\n\n const response = await new ApprovableStepRepository().comment(props.approvableStep.id, data)\n\n if (isSuccessResponse(response)) {\n notifySuccess(messages.commentSaved)\n hide()\n emits('refresh')\n } else {\n notifyError(messages.commentFailed)\n }\n\n isLoading.value = false\n emits('isLoading', false)\n}\n</script>\n","import { markRaw } from 'vue'\nimport {\n registerActionRenderer,\n unregisterActionRenderer,\n actionRenderer,\n actionSlotName\n} from '@stsdti/approvable-core'\n\n/**\n * Vue binding over the core action registry.\n *\n * The only thing Vue-specific about registering a renderer is that a component\n * must be marked raw before it goes into reactive state, so that is all this\n * layer adds. The registry itself is framework-free, which is what allows a\n * React binding to reuse it without inheriting Vue's reactivity rules.\n */\nexport function registerApprovableActionRenderer (name, component) {\n return registerActionRenderer(name, markRaw(component))\n}\n\nexport { unregisterActionRenderer as unregisterApprovableActionRenderer }\nexport { actionRenderer as approvableActionRenderer }\nexport { actionSlotName as approvableActionSlotName }\n","import { inject } from 'vue'\n\nexport const APPROVABLE_LINK_COMPONENT = Symbol('approvable.linkComponent')\n\n/**\n * Which component renders a button that navigates.\n *\n * Defaults to a plain anchor so the package works with no router installed.\n * Hardcoding <router-link> instead would silently fail to resolve — and log a\n * Vue warning — in any application without vue-router.\n *\n * Applications using a router opt in once, at install:\n *\n * app.use(Approvable, { linkComponent: RouterLink })\n */\nexport function useLinkComponent () {\n return inject(APPROVABLE_LINK_COMPONENT, 'a')\n}\n\n/**\n * Anchors take `href`; RouterLink and NuxtLink take `to`. Binding the right one\n * keeps the call sites free of that distinction.\n */\nexport function linkProps (component, target) {\n return component === 'a' ? { href: target } : { to: target }\n}\n","import { inject } from 'vue'\nimport { isClassIcon, isRegisteredIcon, isUrlIcon } from '@stsdti/approvable-core'\n\nexport const APPROVABLE_ICON_REGISTRY = Symbol('approvable.iconRegistry')\n\n/**\n * How a button's `icon` is rendered.\n *\n * An icon is a *name*, resolved against a registry the application supplies —\n * never raw markup rendered with v-html. A button's icon comes from the\n * workflow definition — authored in the editor, stored, and then displayed in\n * the browser of every person who can see the approval — so v-html here would\n * let whoever can edit a workflow run script in every approver's session.\n * `<svg onload=\"...\">` is enough; it would be a stored XSS with an unusually\n * good distribution list.\n *\n * app.use(Approvable, {\n * icons: { approve: CheckIcon, reject: XIcon }\n * })\n *\n * Anything not in the registry falls back to the two safe forms: an `http(s)`\n * URL rendered as <img>, or a CSS class rendered on an <i>.\n * A `#icon` slot is available for full control.\n *\n * Applications that genuinely need bespoke SVG register a component for it,\n * which puts the markup in application code — where it is reviewed — rather\n * than in a database row.\n */\nexport function useIconRegistry () {\n return inject(APPROVABLE_ICON_REGISTRY, {})\n}\n\n// The three predicates come from core rather than being defined here: the\n// React binding applies the same rules, and a rule about what is safe to render\n// is only worth trusting while there is one copy of it.\nexport { isRegisteredIcon, isUrlIcon, isClassIcon }\n","<template>\n <li v-if=\"step.isVisible\" :class=\"rowClass\">\n <span :class=\"discClass\">\n <svg\n v-if=\"discGlyph\"\n aria-hidden=\"true\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n viewBox=\"0 0 16 16\"\n >\n <path :d=\"discGlyph.d\" :stroke-width=\"discGlyph.width\" />\n </svg>\n </span>\n\n <div class=\"approvable-step-body\">\n <div class=\"approvable-step-line\">\n <slot :step=\"value\" name=\"approvableStepInfo\">\n <span class=\"approvable-step-name\">{{ step.approverName }}</span>\n </slot>\n\n <slot :step=\"value\" :role=\"step.approverRole\" name=\"approvableStepRole\">\n <!-- The title is the whole role, so a clipped one is still readable\n on hover; without a role the spacer keeps the row's geometry. -->\n <span v-if=\"step.approverRole\" :title=\"step.approverRole\" class=\"approvable-step-role\">\n {{ step.approverRole }}\n </span>\n <span v-else class=\"approvable-step-spacer\" />\n </slot>\n\n <!-- On the step being waited on the buttons carry the meaning, so the\n status word is redundant; everywhere else it is the outcome. -->\n <span v-if=\"showStatus\" class=\"approvable-step-status\">\n <span v-if=\"step.statusName\">{{ step.statusName }}</span>\n <time v-if=\"step.performedAt\" class=\"approvable-step-date\">{{ step.performedAt }}</time>\n </span>\n\n <div v-if=\"hasActions\" class=\"approvable-step-actions\">\n <div class=\"approvable-btn-group\">\n <!-- APPROVABLE BUTTONS (custom renderer per button, else basic) -->\n <template v-for=\"(button, index) in step.buttons\" :key=\"button.id ?? index\">\n <component\n :is=\"buttonRenderer(button)\"\n v-if=\"buttonRenderer(button)\"\n :action-ui=\"button.action_ui\"\n :approvable=\"approvable\"\n :button=\"button\"\n :buttons=\"[button]\"\n :complete=\"onApproveStatusChange\"\n :resource=\"resource\"\n :step=\"value\"\n @is-loading=\"(isLoading) => emits('isLoading', isLoading)\"\n @refresh=\"emits('refresh')\"\n />\n <component\n :is=\"linkComponent\"\n v-else-if=\"button.link\"\n v-bind=\"linkProps(linkComponent, button.link)\"\n >\n <button\n :title=\"button.tooltip\"\n :class=\"buttonClass(button)\"\n type=\"button\"\n @click=\"onApproveStatusChange(button)\"\n >\n <i v-if=\"isClassIcon(button.icon)\" :class=\"button.icon\"></i>\n </button>\n </component>\n <button\n v-else\n :title=\"button.tooltip\"\n :class=\"buttonClass(button)\"\n type=\"button\"\n @click=\"onApproveStatusChange(button)\"\n >\n <i v-if=\"isClassIcon(button.icon)\" :class=\"button.icon\"></i>\n {{ button.text }}\n </button>\n </template>\n </div>\n\n <div v-if=\"value.can_comment\" class=\"approvable-btn-group\">\n <approvable-step-comment\n :approvable-step=\"value\"\n :disabled=\"!value.can_comment\"\n @refresh=\"emits('refresh')\"\n @is-loading=\"(isLoading) => emits('isLoading', isLoading)\"\n />\n </div>\n </div>\n </div>\n\n <p v-if=\"step.comment.text\" class=\"approvable-step-comment\">\n <span :title=\"step.comment.title\">{{ commentText }}</span>\n <button\n v-if=\"step.comment.isTrimmed\"\n type=\"button\"\n class=\"approvable-step-comment-more\"\n :aria-expanded=\"isCommentExpanded\"\n @click=\"isCommentExpanded = !isCommentExpanded\"\n >\n {{ isCommentExpanded ? messages.showLess : messages.showMore }}\n </button>\n </p>\n </div>\n </li>\n</template>\n\n<script setup>\nimport { computed, ref } from 'vue'\nimport {\n approvableStatusTone,\n approvableStepGlyph,\n createStepViewModel,\n performStepAction\n} from '@stsdti/approvable-core'\nimport ApprovableStepComment from './ApprovableStepComment.vue'\nimport { approvableActionRenderer } from './action-renderers.js'\nimport { linkProps, useLinkComponent } from '../../config.js'\nimport { isClassIcon } from '../../icons.js'\nimport { useMessages } from '../../messages.js'\n\nconst emits = defineEmits(['isLoading', 'refresh'])\n\nconst props = defineProps({\n value: {\n type: Object,\n required: true\n },\n approvable: {\n type: Object,\n required: true\n },\n resource: {\n type: Object,\n required: true\n }\n})\n\nconst linkComponent = useLinkComponent()\nconst messages = useMessages()\n\nconst isCommentExpanded = ref(false)\n\n// Every derivation lives in core, so this component is left with rendering and\n// event plumbing only — and a React binding computes exactly the same values.\nconst step = computed(() => createStepViewModel(props.value))\n\nconst tone = computed(() => approvableStatusTone(step.value.status))\n\n/**\n * A row shows controls when it has any — a finished step usually has none, and\n * shows when it was decided instead.\n */\nconst hasActions = computed(() => step.value.buttons.length > 0 || !!props.value.can_comment)\n\nconst showStatus = computed(() => (\n (!step.value.isActive || !hasActions.value) && !!(step.value.statusName || step.value.performedAt)\n))\n\nconst rowClass = computed(() => ({\n 'approvable-step': true,\n 'approvable-step--active': step.value.isActive,\n // A step nobody has reached yet is dimmed; one with an outcome is not.\n 'approvable-step--pending': !step.value.isActive && !tone.value,\n [`approvable-step--${tone.value}`]: !!tone.value,\n // Nothing wraps below the name, so the row can hold to a single line.\n 'approvable-step--single-line': !hasActions.value && !step.value.comment.text\n}))\n\n/** `ring` and `pending` are drawn by the disc's border alone — no path. */\nconst GLYPHS = {\n check: { d: 'M4 8.4l2.8 2.8 5.4-6', width: 2.8 },\n cross: { d: 'M5.2 5.2l5.6 5.6M10.8 5.2l-5.6 5.6', width: 2.4 },\n dash: { d: 'M4.4 8h7.2', width: 2.2 }\n}\n\n/** The disc's own modifier: the glyph names the shape, the tone names the colour. */\nconst DISC_MODIFIERS = {\n check: 'success',\n cross: 'danger',\n dash: 'muted',\n ring: 'ring',\n pending: 'pending'\n}\n\nconst glyph = computed(() => approvableStepGlyph(tone.value, step.value.isActive))\n\nconst discGlyph = computed(() => GLYPHS[glyph.value] ?? null)\n\nconst discClass = computed(() => ({\n 'approvable-step-disc': true,\n [`approvable-step-disc--${DISC_MODIFIERS[glyph.value]}`]: true\n}))\n\nconst commentText = computed(() => (\n isCommentExpanded.value ? step.value.comment.text : step.value.comment.preview\n))\n\nconst buttonClass = (button) => ({\n 'approvable-btn': true,\n // A button carrying only an icon collapses to a circle, so the row keeps its\n // rhythm instead of stretching around an empty label.\n 'approvable-btn--icon': !button.text,\n 'approvable-btn--primary': button.result === 'approved'\n})\n\nconst buttonRenderer = (button) => {\n if (!step.value.isActive) {\n return null\n }\n\n return approvableActionRenderer(button?.action_ui)\n}\n\nconst onApproveStatusChange = async (buttonOrId) => {\n emits('isLoading', true)\n\n const result = await performStepAction({\n stepId: step.value.id,\n button: buttonOrId,\n buttons: step.value.buttons\n })\n\n emits('isLoading', false)\n\n // Refresh after any attempted request, success or failure — a failed action\n // still means the local state may be stale. Only a skipped one (no id, no\n // button, or a presentational button) reloads nothing, since it sent nothing.\n if (!result.skipped) {\n emits('refresh')\n }\n}\n</script>\n","<template>\n <span :class=\"badgeClass\">{{ badgeName }}</span>\n</template>\n\n<script setup>\nimport { computed } from 'vue'\nimport { ApprovableStatus, get } from '@stsdti/approvable-core'\n\nconst props = defineProps({\n value: {\n required: true\n },\n label: {\n default: null\n }\n})\nconst badgeClass = computed(() => {\n const approvableStatusCode = get(props.value, 'code', ' - ')\n return {\n 'approvable-badge': true,\n 'approvable-badge--draft': [ApprovableStatus.CODES.CODE_DRAFT].includes(approvableStatusCode),\n 'approvable-badge--waiting': [ApprovableStatus.CODES.CODE_WAITING].includes(approvableStatusCode),\n 'approvable-badge--success': [ApprovableStatus.CODES.CODE_APPROVED, ApprovableStatus.CODES.CODE_VIEWED, ApprovableStatus.CODES.CODE_NOTICED].includes(approvableStatusCode),\n 'approvable-badge--danger': [ApprovableStatus.CODES.CODE_REJECTED].includes(approvableStatusCode),\n 'approvable-badge--muted': [ApprovableStatus.CODES.CODE_EXPIRED, ApprovableStatus.CODES.CODE_SOLVED].includes(approvableStatusCode),\n 'approvable-badge--empty': approvableStatusCode === ' - '\n }\n})\n\nconst badgeName = computed(() => {\n return props.label ? props.label : get(props.value, 'name', ' - ')\n})\n</script>\n","<template>\n <div v-if=\"approval.hasApprovable\" class=\"approvable\">\n <!-- A refresh has content to veil; an initial load has none, and gets the\n skeleton below instead. -->\n <div v-if=\"isLoading && approval.steps.length\" class=\"approvable-loading\">\n <span class=\"approvable-spinner\" />\n </div>\n\n <div class=\"approvable-header\">\n <h2 class=\"approvable-sr-only\">{{ title }}</h2>\n\n <template v-if=\"isInitialLoad\">\n <span aria-hidden=\"true\" class=\"approvable-skeleton-bar approvable-skeleton-bar--pill\" />\n <span class=\"approvable-skeleton-spacer\" />\n <span\n aria-hidden=\"true\"\n class=\"approvable-skeleton-bar approvable-skeleton-bar--soft\"\n style=\"width:104px;animation-delay:0.2s\"\n />\n </template>\n\n <template v-else>\n <approve-status-info\n v-if=\"showApprovableStatus\"\n :label=\"approval.statusName\"\n :value=\"approval.status\"\n />\n\n <span class=\"approvable-updated-at\">\n {{ approval.updatedAt }}\n </span>\n <button\n v-if=\"approval.id\"\n type=\"button\"\n class=\"approvable-history-btn\"\n :title=\"messages.historyTitle\"\n :aria-label=\"messages.historyTitle\"\n @click=\"historyOpen = true\"\n >\n {{ messages.history }}\n </button>\n </template>\n </div>\n\n <template v-if=\"isInitialLoad\">\n <span class=\"approvable-sr-only\" aria-live=\"polite\">{{ messages.loadingStatus }}</span>\n <div v-for=\"row in SKELETON_ROWS\" :key=\"row.delay\" aria-hidden=\"true\" class=\"approvable-skeleton-row\">\n <span class=\"approvable-skeleton-disc\" :style=\"{ animationDelay: row.delay }\" />\n <span class=\"approvable-skeleton-bar\" :style=\"{ width: row.name, animationDelay: row.delay }\" />\n <span class=\"approvable-skeleton-spacer\" />\n <span\n class=\"approvable-skeleton-bar approvable-skeleton-bar--soft\"\n :style=\"{ width: row.meta, animationDelay: row.metaDelay }\"\n />\n </div>\n <div class=\"approvable-footer\" aria-hidden=\"true\">\n <span class=\"approvable-skeleton-bar approvable-skeleton-bar--soft\" style=\"display:block;width:132px\" />\n </div>\n </template>\n\n <template v-else>\n <ol v-if=\"approval.steps.length\" :class=\"approvableStepsClass\">\n <approvable-step\n v-for=\"approvableStep of approval.steps\"\n :key=\"approvableStep.id\"\n :approvable=\"approval.approvable\"\n :resource=\"value\"\n :value=\"approvableStep\"\n @isLoading=\"(value) => (isLoading = value)\"\n @refresh=\"onRefresh\"\n >\n <template v-for=\"slot in Object.keys($slots)\" v-slot:[slot]=\"scoped\">\n <slot v-bind=\"scoped ?? {}\" :name=\"slot\" />\n </template>\n </approvable-step>\n </ol>\n\n <p v-if=\"progressLabel\" class=\"approvable-footer\">{{ progressLabel }}</p>\n </template>\n\n <Teleport to=\"body\">\n <div v-if=\"historyOpen\" class=\"approvable-dialog-backdrop\" @click.self=\"historyOpen = false\">\n <section\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"approvable-history-title\"\n class=\"approvable-dialog\"\n @keydown.esc=\"historyOpen = false\"\n >\n <header class=\"approvable-dialog-header\">\n <p class=\"approvable-dialog-eyebrow\">\n <svg aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 16 16\">\n <path d=\"M9.6 4.5 6 8l3.6 3.5\" />\n </svg>\n {{ messages.history }}\n </p>\n <h2 id=\"approvable-history-title\" class=\"approvable-dialog-title\">{{ historyTitle }}</h2>\n <button\n type=\"button\"\n class=\"approvable-dialog-close\"\n :aria-label=\"messages.historyClose\"\n @click=\"historyOpen = false\"\n >\n <svg aria-hidden=\"true\" class=\"approvable-icon\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"2\" viewBox=\"0 0 16 16\">\n <path d=\"m5.2 5.2 5.6 5.6M10.8 5.2l-5.6 5.6\" />\n </svg>\n </button>\n </header>\n <div class=\"approvable-dialog-body\">\n <approvable-audit-timeline\n ref=\"auditTimeline\"\n :approvable-id=\"approval.id\"\n :show-header=\"false\"\n @loaded=\"(count) => (historyCount = count)\"\n />\n </div>\n </section>\n </div>\n </Teleport>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue'\nimport { createApprovableViewModel, formatMessage } from '@stsdti/approvable-core'\nimport ApprovableAuditTimeline from './ApprovableAuditTimeline.vue'\nimport ApprovableStep from './ApprovableStep.vue'\nimport ApproveStatusInfo from './ApproveStatusInfo.vue'\nimport { useMessages } from '../../messages.js'\n\nconst props = defineProps({\n value: {},\n showApprovableStatus: { type: Boolean, default: true },\n title: { default: 'Approval' },\n isDirectionRow: { default: false }\n})\n\nconst emits = defineEmits(['refresh', 'isLoading'])\n\nconst isLoading = ref(false)\nconst auditTimeline = ref(null)\nconst historyOpen = ref(false)\nconst historyCount = ref(null)\n\nconst messages = useMessages()\n\n// Widths and stagger for the placeholder rows. Kept as data so the skeleton is\n// three rows of varied length rather than three identical ones, which reads as\n// a frozen list instead of a loading one.\nconst SKELETON_ROWS = [\n { name: '118px', meta: '56px', delay: '0s', metaDelay: '0.15s' },\n { name: '96px', meta: '72px', delay: '0.1s', metaDelay: '0.25s' },\n { name: '78px', meta: '48px', delay: '0.2s', metaDelay: '0.35s' }\n]\n\nconst approval = computed(() => createApprovableViewModel(props.value))\n\n/** Names the dialog, and once the history has loaded, counts it. */\nconst historyTitle = computed(() => (\n historyCount.value === null\n ? messages.historyTitle\n : formatMessage(messages.eventCount, { count: historyCount.value })\n))\n\n/** Nothing to veil yet, so the panel shows its own shape instead. */\nconst isInitialLoad = computed(() => isLoading.value && !approval.value.steps.length)\n\nconst approvableStepsClass = computed(() => ({\n 'approvable-steps': true,\n 'approvable-steps--row': props.isDirectionRow\n}))\n\n/** \"Step 2 of 3 — awaiting Priya Raman\", with the tail dropped when nothing is pending. */\nconst progressLabel = computed(() => {\n const { activeStepNumber, visibleStepCount, activeApproverName } = approval.value\n\n if (!activeStepNumber || !visibleStepCount) {\n return null\n }\n\n const progress = formatMessage(messages.stepProgress, {\n current: activeStepNumber,\n total: visibleStepCount\n })\n\n if (!activeApproverName) {\n return progress\n }\n\n return `${progress} — ${formatMessage(messages.awaitingApprover, { name: activeApproverName })}`\n})\n\nconst onRefresh = () => {\n auditTimeline.value?.refresh()\n emits('refresh')\n}\n</script>\n","<template>\n <div v-if=\"hasApprovableButtons\" class=\"approvable-actions\">\n <hr class=\"approvable-divider\" />\n <div class=\"approvable-actions-list\">\n <button\n v-for=\"approvableButton in approvableButtons\"\n :key=\"approvableButton.code\"\n :title=\"approvableButton.tooltip\"\n class=\"approvable-btn\"\n type=\"button\"\n @click=\"onApproveStatusChange(approvableButton)\"\n >\n <slot name=\"icon\" :button=\"approvableButton\">\n <component\n :is=\"icons[approvableButton.icon]\"\n v-if=\"isRegisteredIcon(icons, approvableButton.icon)\"\n class=\"approvable-btn-icon\"\n />\n <img\n v-else-if=\"isUrlIcon(approvableButton.icon)\"\n :src=\"approvableButton.icon\"\n alt=\"\"\n class=\"approvable-btn-icon\"\n />\n <i v-else-if=\"isClassIcon(approvableButton.icon)\" :class=\"approvableButton.icon\"></i>\n </slot>\n {{ approvableButton.text }}\n </button>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue'\nimport { ApprovableStepRepository, get, isSuccessResponse, notifySuccess } from '@stsdti/approvable-core'\nimport { isClassIcon, isRegisteredIcon, isUrlIcon, useIconRegistry } from '../../icons.js'\nimport { useMessages } from '../../messages.js'\n\nconst props = defineProps({\n value: {\n required: true\n }\n})\nconst emits = defineEmits(['isLoading', 'refresh'])\n\nconst isLoading = ref(false)\n\nconst approvableButtons = computed(() => {\n return get(props.value, 'buttons', [])\n})\nconst hasApprovableButtons = computed(() => {\n if (!approvableButtons.value) {\n return false\n }\n return approvableButtons.value.length > 0\n})\n\nconst icons = useIconRegistry()\nconst messages = useMessages()\n\nconst onApproveStatusChange = (button) => {\n let approvableId = get(props.value, 'id')\n\n if (!approvableId) {\n return\n }\n onUpdateStatus(approvableId, button)\n}\nconst onUpdateStatus = async (id, button) => {\n emits('isLoading', true)\n isLoading.value = true\n const response = await new ApprovableStepRepository().updateApproveStatus(id, button)\n\n if (isSuccessResponse(response)) {\n notifySuccess(messages.actionSucceeded)\n }\n emits('isLoading', false)\n emits('refresh')\n}\n</script>\n","<template>\n <label class=\"approvable-select\">\n <span v-if=\"label\" class=\"approvable-select-label\">{{ label }}</span>\n <select\n :value=\"selectedKey\"\n class=\"approvable-select-input\"\n v-bind=\"$attrs\"\n @change=\"onChange\"\n >\n <option value=\"\">-</option>\n <option v-for=\"option in options\" :key=\"optionKey(option)\" :value=\"optionKey(option)\">\n {{ optionName(option) }}\n </option>\n </select>\n </label>\n</template>\n\n<script setup>\nimport { computed, onMounted, ref } from 'vue'\nimport { ApprovableStatusRepository, get } from '@stsdti/approvable-core'\n\ndefineOptions({\n inheritAttrs: false\n})\n\nconst emit = defineEmits(['mounted'])\nconst modelValue = defineModel()\n\nconst props = defineProps({\n getList: {},\n label: {\n default: 'Status'\n }\n})\n\nconst options = ref([])\n\nconst getListDefault = async (search) => {\n let filters = [{ field: 'search', value: search }]\n return await new ApprovableStatusRepository().fetchAll({ filters })\n}\n\nconst optionKey = (option) => String(get(option, 'id') ?? get(option, 'code', ''))\nconst optionName = (option) => get(option, 'name') ?? get(option, 'text', '')\n\nconst selectedKey = computed(() => {\n return modelValue.value ? optionKey(modelValue.value) : ''\n})\n\nconst onChange = (event) => {\n const key = event.target.value\n modelValue.value = options.value.find((option) => optionKey(option) === key) ?? null\n}\n\nconst refresh = async (search = null) => {\n const list = await (props.getList ?? getListDefault)(search)\n options.value = Array.isArray(list) ? list : []\n}\n\nonMounted(async () => {\n await refresh()\n emit('mounted', { refresh, options })\n})\n</script>\n","<template>\n <div class=\"approvable-select-option\">\n <span>{{ displayName }}</span>\n </div>\n</template>\n\n\n<script setup>\nimport { computed } from 'vue'\nimport { get } from '@stsdti/approvable-core'\n\nconst props = defineProps({\n value: {}\n})\nconst displayName = computed(() => get(props.value, 'name'))\n</script>\n","/**\n * @stsdti/approvable-vue\n *\n * Vue 3 components for laravel-approvable. All behaviour lives in\n * @stsdti/approvable-core; this package renders it.\n *\n * Components ship unstyled and emit `.approvable-*` class names. Import the\n * theme to give them a look — one stylesheet, light and dark:\n *\n * import '@stsdti/approvable-vue/themes/approvable.css'\n */\n\nimport Approvable from './components/approvable/Approvable.vue'\nimport ApprovableStep from './components/approvable/ApprovableStep.vue'\nimport ApprovableButtons from './components/approvable/ApprovableButtons.vue'\nimport ApprovableStepComment from './components/approvable/ApprovableStepComment.vue'\nimport ApprovableAuditTimeline from './components/approvable/ApprovableAuditTimeline.vue'\nimport ApproveStatusInfo from './components/approvable/ApproveStatusInfo.vue'\nimport ApprovableStatusSelect from './components/select/approvable-status-select/ApprovableStatusSelect.vue'\nimport ApprovableStatusSelectOption from './components/select/approvable-status-select/ApprovableStatusSelectOption.vue'\n\nimport { APPROVABLE_LINK_COMPONENT } from './config.js'\nimport { APPROVABLE_ICON_REGISTRY } from './icons.js'\nimport { APPROVABLE_MESSAGES } from './messages.js'\nimport {\n registerApprovableActionRenderer,\n unregisterApprovableActionRenderer,\n approvableActionRenderer,\n approvableActionSlotName\n} from './components/approvable/action-renderers.js'\n\nexport {\n Approvable,\n ApprovableStep,\n ApprovableButtons,\n ApprovableStepComment,\n ApprovableAuditTimeline,\n ApproveStatusInfo,\n ApprovableStatusSelect,\n ApprovableStatusSelectOption\n}\n\nexport {\n registerApprovableActionRenderer,\n unregisterApprovableActionRenderer,\n approvableActionRenderer,\n approvableActionSlotName\n}\n\nexport { APPROVABLE_LINK_COMPONENT, useLinkComponent, linkProps } from './config.js'\nexport {\n APPROVABLE_ICON_REGISTRY,\n useIconRegistry,\n isRegisteredIcon,\n isUrlIcon,\n isClassIcon\n} from './icons.js'\nexport { APPROVABLE_MESSAGES, useMessages } from './messages.js'\n\nconst components = {\n Approvable,\n ApprovableStep,\n ApprovableButtons,\n ApprovableStepComment,\n ApprovableAuditTimeline,\n ApproveStatusInfo,\n ApprovableStatusSelect,\n ApprovableStatusSelectOption\n}\n\n/**\n * Vue plugin, for applications that prefer global registration.\n *\n * app.use(ApprovableVue, {\n * linkComponent: RouterLink,\n * icons: { approve: CheckIcon },\n * messages: { commentSaved: 'Comentariul a fost adăugat.' }\n * })\n *\n * `linkComponent` is what a navigating button renders as. It defaults to a\n * plain anchor so the package works without a router installed.\n *\n * `icons` maps a button's `icon` name to a component. Icons are names, never\n * raw SVG rendered with v-html — that would let anyone who can edit a workflow\n * run script in every approver's browser.\n *\n * `messages` overrides the user-facing strings, which are English by default.\n */\nexport default {\n install (app, { linkComponent = null, icons = null, messages = null, register = true } = {}) {\n if (linkComponent) {\n app.provide(APPROVABLE_LINK_COMPONENT, linkComponent)\n }\n\n if (icons) {\n app.provide(APPROVABLE_ICON_REGISTRY, icons)\n }\n\n if (messages) {\n app.provide(APPROVABLE_MESSAGES, messages)\n }\n\n if (register) {\n for (const [name, component] of Object.entries(components)) {\n app.component(name, component)\n }\n }\n }\n}\n"],"names":["APPROVABLE_MESSAGES","useMessages","mergeMessages","inject","props","__props","emits","__emit","messages","repository","ApprovableAuditRepository","audits","ref","loading","error","FIELD_LABELS","ICONS","QUIET_KINDS","groups","computed","stepAudits","audit","grouped","key","entries","kind","auditKind","details","changeRows","a","b","button","_a","_b","_c","statusChanged","before","after","operationTitle","label","_e","_d","_f","actorLabel","actor","entry","oldValues","newValues","row","hasPreviousValue","change","displayValue","value","text","formatDate","date","refresh","response","data","exception","eventSummary","formatMessage","watch","__expose","_createElementBlock","_openBlock","_hoisted_1","_createElementVNode","_hoisted_2","_toDisplayString","_unref","_hoisted_3","_hoisted_4","_hoisted_5","_cache","_hoisted_6","_Fragment","_hoisted_8","_renderList","group","_normalizeClass","d","i","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_7","rootRef","useTemplateRef","textareaRef","isOpen","isLoading","comment","commentedBy","get","onToggle","hide","show","nextTick","resizeTextarea","textarea","onDocumentClick","event","onDocumentKeydown","onMounted","onBeforeUnmount","onComment","notifyError","ApprovableStepRepository","isSuccessResponse","notifySuccess","$event","registerApprovableActionRenderer","name","component","registerActionRenderer","markRaw","APPROVABLE_LINK_COMPONENT","useLinkComponent","linkProps","target","APPROVABLE_ICON_REGISTRY","useIconRegistry","linkComponent","isCommentExpanded","step","createStepViewModel","tone","approvableStatusTone","hasActions","showStatus","rowClass","GLYPHS","DISC_MODIFIERS","glyph","approvableStepGlyph","discGlyph","discClass","commentText","buttonClass","buttonRenderer","approvableActionRenderer","onApproveStatusChange","buttonOrId","result","performStepAction","_renderSlot","_ctx","_hoisted_9","_hoisted_10","index","_createBlock","_resolveDynamicComponent","_mergeProps","isClassIcon","_createVNode","ApprovableStepComment","badgeClass","approvableStatusCode","ApprovableStatus","badgeName","auditTimeline","historyOpen","historyCount","SKELETON_ROWS","approval","createApprovableViewModel","historyTitle","isInitialLoad","approvableStepsClass","progressLabel","activeStepNumber","visibleStepCount","activeApproverName","progress","onRefresh","ApproveStatusInfo","_normalizeStyle","approvableStep","ApprovableStep","$slots","slot","_withCtx","scoped","_Teleport","ApprovableAuditTimeline","count","approvableButtons","hasApprovableButtons","icons","approvableId","onUpdateStatus","id","approvableButton","isRegisteredIcon","isUrlIcon","emit","modelValue","_useModel","options","getListDefault","search","filters","ApprovableStatusRepository","optionKey","option","optionName","selectedKey","onChange","list","$attrs","displayName","components","Approvable","ApprovableButtons","ApprovableStatusSelect","ApprovableStatusSelectOption","app","register"],"mappings":";;;AAGY,MAACA,KAAsB,OAAO,qBAAqB;AAWxD,SAASC,IAAe;AAC7B,SAAOC,GAAcC,EAAOH,IAAqB,IAAI,CAAC;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXA,UAAMI,IAAQC,GAMRC,IAAQC,GAERC,IAAWP,EAAW,GACtBQ,IAAa,IAAIC,GAAyB,GAC1CC,IAASC,EAAI,CAAA,CAAE,GACfC,IAAUD,EAAI,EAAK,GACnBE,IAAQF,EAAI,EAAE,GAIdG,IAAe;AAAA,MACnB,wBAAwB;AAAA,MACxB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,WAAW;AAAA,IACb,GAKMC,IAAQ;AAAA,MACZ,SAAS,EAAE,OAAO,CAAC,sBAAsB,GAAG,OAAO,IAAG;AAAA,MACtD,QAAQ,EAAE,OAAO,CAAC,oCAAoC,GAAG,OAAO,IAAG;AAAA,MACnE,SAAS,EAAE,OAAO,CAAC,oBAAoB,GAAG,OAAO,IAAG;AAAA,MACpD,QAAQ,EAAE,OAAO,CAAC,gCAAgC,GAAG,OAAO,IAAG;AAAA,MAC/D,MAAM,EAAE,OAAO,CAAC,qDAAqD,GAAG,OAAO,EAAC;AAAA,MAChF,QAAQ,EAAE,OAAO,CAAC,2EAA2E,GAAG,OAAO,IAAG;AAAA,MAC1G,SAAS,EAAE,OAAO,CAAC,YAAY,GAAG,OAAO,IAAG;AAAA,MAC5C,QAAQ,EAAE,OAAO,CAAC,YAAY,GAAG,OAAO,IAAG;AAAA,IAC7C,GAGMC,IAAc,oBAAI,IAAI,CAAC,WAAW,QAAQ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sN,IAAcxM,EAAS,MAAMmF,EAAIlG,EAAM,OAAO,MAAM,CAAC;sBAbzD6D,EAAA,GAAAD,EAEM,OAFNE,IAEM;AAAA,MADJC,EAA8B,gBAArBwJ,EAAA,KAAW,GAAA,CAAA;AAAA;;GCyDlBC,KAAa;AAAA,EACnB,YAAEC;AAAAA,EACF,gBAAElC;AAAAA,EACF,mBAAEmC;AAAAA,EACF,uBAAE1D;AAAAA,EACF,yBAAE6B;AAAAA,EACF,mBAAET;AAAAA,EACF,wBAAEuC;AAAAA,EACF,8BAAEC;AACF,GAoBAlE,KAAe;AAAA,EACb,QAASmE,GAAK,EAAE,eAAA9F,IAAgB,MAAM,OAAAkE,IAAQ,MAAM,UAAA7L,IAAW,MAAM,UAAA0N,IAAW,GAAI,IAAK,CAAA,GAAI;AAa3F,QAZI/F,KACF8F,EAAI,QAAQpG,IAA2BM,CAAa,GAGlDkE,KACF4B,EAAI,QAAQhG,IAA0BoE,CAAK,GAGzC7L,KACFyN,EAAI,QAAQjO,IAAqBQ,CAAQ,GAGvC0N;AACF,iBAAW,CAACzG,GAAMC,CAAS,KAAK,OAAO,QAAQkG,EAAU;AACvD,QAAAK,EAAI,UAAUxG,GAAMC,CAAS;AAAA,EAGnC;AACF;"}
1
+ {"version":3,"file":"approvable-vue.mjs","sources":["../src/messages.js","../src/components/approvable/ApprovableAuditTimeline.vue","../src/components/approvable/ApprovableStepComment.vue","../src/components/approvable/action-renderers.js","../src/config.js","../src/icons.js","../src/components/approvable/ApprovableStep.vue","../src/components/approvable/ApproveStatusInfo.vue","../src/components/approvable/Approvable.vue","../src/components/approvable/ApprovableButtons.vue","../src/components/select/approvable-status-select/ApprovableStatusSelect.vue","../src/components/select/approvable-status-select/ApprovableStatusSelectOption.vue","../src/index.js"],"sourcesContent":["import { inject } from 'vue'\nimport { DEFAULT_MESSAGES, mergeMessages } from '@stsdti/approvable-core'\n\nexport const APPROVABLE_MESSAGES = Symbol('approvable.messages')\n\n/**\n * The user-facing strings, in English.\n *\n * Defined in core so that every binding ships the same wording and the same\n * override surface — a string added for the React components is available\n * here too. Any of it can be replaced:\n *\n * app.use(Approvable, { messages: { comments: 'Comentarii' } })\n */\nexport function useMessages () {\n return mergeMessages(inject(APPROVABLE_MESSAGES, null))\n}\n\nexport { DEFAULT_MESSAGES, mergeMessages }\n","<script setup>\nimport { computed, ref, watch } from 'vue'\nimport { ApprovableAuditRepository, formatMessage } from '@stsdti/approvable-core'\nimport { useMessages } from '../../messages.js'\n\nconst props = defineProps({\n approvableId: { type: [Number, String], required: true },\n limit: { type: Number, default: 100 },\n showHeader: { type: Boolean, default: true }\n})\n\nconst emits = defineEmits(['loaded'])\n\nconst messages = useMessages()\nconst repository = new ApprovableAuditRepository()\nconst audits = ref([])\nconst loading = ref(false)\nconst error = ref('')\n\n// Only the fields a reader actually cares about. Everything else (ids,\n// timestamps we already show, internal bookkeeping) is intentionally hidden.\nconst FIELD_LABELS = {\n approvable_status_name: 'Status',\n comment: 'Comment',\n responsible: 'Assigned to',\n is_active: 'Active step'\n}\n\n// One glyph per kind of event, keyed by the `kind` we resolve below. Drawn on\n// the same 16-unit grid and at the same weight as the discs on the approval\n// trail, so a history row and a step row read as the same object.\nconst ICONS = {\n approve: { paths: ['M4 8.4l2.8 2.8 5.4-6'], width: 2.8 },\n reject: { paths: ['M5.2 5.2l5.6 5.6M10.8 5.2l-5.6 5.6'], width: 2.4 },\n comment: { paths: ['M8 4.6v3.6l2.6 1.6'], width: 2.2 },\n status: { paths: ['M4 8h8M9.2 5.4L11.8 8l-2.6 2.6'], width: 2.2 },\n undo: { paths: ['M4.4 6.6h3.4M4.4 6.6v-3M4.6 9.4a3.6 3.6 0 1 0 1-3.2'], width: 2 },\n signal: { paths: ['M8 3.4v3.2M5.2 5.2l2.2 2.2M8 11.6a1.4 1.4 0 1 0 0-2.8 1.4 1.4 0 0 0 0 2.8'], width: 1.8 },\n created: { paths: ['M4.4 8h7.2'], width: 2.2 },\n update: { paths: ['M4.4 8h7.2'], width: 2.2 }\n}\n\n/** Bookkeeping, not news: these rows are dimmed the way the design dims them. */\nconst QUIET_KINDS = new Set(['created', 'update'])\n\nconst groups = computed(() => {\n // The workflow-level rows are noise for a reader, so keep only step changes.\n const stepAudits = audits.value.filter(audit => audit.approvable_step_id)\n const grouped = new Map()\n for (const audit of stepAudits) {\n const key = audit.request_id || `audit-${audit.id}`\n if (!grouped.has(key)) grouped.set(key, [])\n grouped.get(key).push(audit)\n }\n return [...grouped.values()].map(entries => {\n const audit = entries[0]\n // Resolved here rather than in the template, where it was called twice per\n // row on every render — once for the marker class and once for its icon.\n const kind = auditKind(audit)\n // A row only needs a second line when there is something to put on it.\n const details = entries.flatMap(changeRows)\n\n return {\n id: audit.request_id || `audit-${audit.id}`,\n entries,\n audit,\n kind,\n // A modifier class rather than utilities: the accent for each kind of\n // event is a theme decision, so it belongs in the stylesheets alongside\n // every other colour, not baked into the component.\n kindClass: `approvable-timeline-marker--${kind}`,\n icon: ICONS[kind],\n isQuiet: QUIET_KINDS.has(kind),\n isSingleLine: details.length === 0\n }\n })\n // Newest first: the last thing that happened is the thing a reader opened\n // the history for.\n .sort((a, b) => new Date(b.audit.created_at) - new Date(a.audit.created_at))\n})\n\nfunction auditKind (audit) {\n const button = audit.metadata?.button\n if (button?.is_undo) return 'undo'\n if (button?.result === 'rejected') return 'reject'\n if (button?.result === 'approved') return 'approve'\n if (audit.metadata?.operation === 'comment') return 'comment'\n if (audit.metadata?.operation === 'signal') return 'signal'\n if (audit.event === 'created') return 'created'\n if (statusChanged(audit)) return 'status'\n return 'update'\n}\n\nfunction statusChanged (audit) {\n const before = audit.old_values?.approvable_status_name\n const after = audit.new_values?.approvable_status_name\n return after !== undefined && before !== after\n}\n\nfunction operationTitle (audit) {\n const button = audit.metadata?.button\n if (button) {\n const label = button.text || button.label || button.id || 'action'\n if (button.is_undo) return 'Reverted the decision'\n if (button.is_revision) return `Changed decision to ${label}`\n return label\n }\n if (audit.metadata?.operation === 'comment') return 'Comment added'\n if (audit.metadata?.operation === 'signal') return `Signal received: ${audit.metadata?.signal?.name || ''}`.trim()\n if (audit.event === 'created') return 'Step started'\n const after = audit.new_values?.approvable_status_name\n if (statusChanged(audit) && after) return `Status set to ${after}`\n return 'Step updated'\n}\n\nfunction actorLabel (actor = {}) {\n if (actor.type === 'system') return 'System'\n if (actor.name) return actor.name\n if (actor.email) return actor.email\n if (actor.id) return actor.type === 'fake' ? `Test user ${actor.id}` : `User ${actor.id}`\n if (actor.type === 'fake') return 'Test identity'\n return 'Automated'\n}\n\n// Changed fields worth surfacing, with the status change collapsed into a\n// single \"before → after\" row (never the raw id).\nfunction changeRows (entry) {\n const oldValues = entry.old_values || {}\n const newValues = entry.new_values || {}\n return Object.keys(FIELD_LABELS)\n .filter(key => key in oldValues || key in newValues)\n .map(key => ({ key, label: FIELD_LABELS[key], oldValue: oldValues[key], newValue: newValues[key] }))\n .filter(row => row.oldValue !== row.newValue)\n}\n\n/** A change only reads as \"before → after\" when there was a before. */\nfunction hasPreviousValue (change) {\n return change.oldValue !== undefined && change.oldValue !== null && change.oldValue !== ''\n}\n\nfunction displayValue (value) {\n if (value === null || value === undefined || value === '') return '—'\n if (typeof value === 'boolean') return value ? 'Yes' : 'No'\n if (Array.isArray(value)) return value.length ? value.join(', ') : '—'\n const text = typeof value === 'object' ? JSON.stringify(value) : String(value)\n return text.length > 180 ? `${text.slice(0, 177)}…` : text\n}\n\nfunction formatDate (value) {\n if (!value) return ''\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? value : new Intl.DateTimeFormat(undefined, {\n dateStyle: 'medium',\n timeStyle: 'short'\n }).format(date)\n}\n\nasync function refresh () {\n if (!props.approvableId) {\n audits.value = []\n loading.value = false\n error.value = 'The approval history is unavailable because the approvable has no id.'\n return\n }\n\n loading.value = true\n error.value = ''\n try {\n const response = await repository.fetchTimeline(props.approvableId, props.limit)\n if (!response || response.status < 200 || response.status >= 300) {\n throw new Error(response?.data?.message || 'The audit timeline could not be loaded.')\n }\n const data = Array.isArray(response.data) ? response.data : response.data?.data\n audits.value = Array.isArray(data) ? data : []\n } catch (exception) {\n error.value = exception?.message || 'The audit timeline could not be loaded.'\n } finally {\n loading.value = false\n }\n}\n\nconst eventSummary = computed(() => formatMessage(messages.eventCount, { count: groups.value.length }))\n\n// The dialog titles itself with the count, and only this component knows it.\nwatch(groups, (value) => emits('loaded', value.length))\n\nwatch(() => props.approvableId, refresh, { immediate: true })\ndefineExpose({ refresh })\n</script>\n\n<template>\n <section :class=\"['approvable-timeline', showHeader && 'approvable-timeline--panel']\">\n <div v-if=\"showHeader\" class=\"approvable-timeline-header\">\n <p class=\"approvable-timeline-eyebrow\">{{ messages.history }}</p>\n <h3 class=\"approvable-timeline-title\">{{ eventSummary }}</h3>\n <button type=\"button\" class=\"approvable-timeline-refresh\" :disabled=\"loading\" @click=\"refresh\">\n {{ loading ? 'Loading…' : 'Refresh' }}\n </button>\n </div>\n\n <div v-if=\"loading\" class=\"approvable-timeline-state\" role=\"status\">\n <span class=\"approvable-spinner\" aria-hidden=\"true\" />\n Loading approval history…\n </div>\n <p v-else-if=\"error\" class=\"approvable-timeline-error\">{{ error }}</p>\n <p v-else-if=\"!groups.length\" class=\"approvable-timeline-state\">No approval activity yet.</p>\n\n <template v-else>\n <ol class=\"approvable-timeline-list\">\n <li\n v-for=\"group in groups\"\n :key=\"group.id\"\n :class=\"['approvable-timeline-item', {\n 'approvable-timeline-item--single-line': group.isSingleLine,\n 'approvable-timeline-item--quiet': group.isQuiet\n }]\"\n >\n <span :class=\"['approvable-timeline-marker', group.kindClass]\">\n <svg fill=\"none\" stroke=\"currentColor\" :stroke-width=\"group.icon.width\" stroke-linecap=\"round\" stroke-linejoin=\"round\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path v-for=\"(d, i) in group.icon.paths\" :key=\"i\" :d=\"d\" />\n </svg>\n </span>\n\n <div class=\"approvable-timeline-content\">\n <div class=\"approvable-timeline-line\">\n <p class=\"approvable-timeline-actor\">{{ actorLabel(group.audit.actor) }}</p>\n <p class=\"approvable-timeline-operation\">{{ operationTitle(group.audit) }}</p>\n <time class=\"approvable-timeline-time\">{{ formatDate(group.audit.created_at) }}</time>\n </div>\n\n <template v-for=\"entry in group.entries\" :key=\"entry.id\">\n <template v-for=\"change in changeRows(entry)\" :key=\"`${entry.id}-${change.key}`\">\n <p v-if=\"change.key === 'comment'\" class=\"approvable-timeline-comment\">\n {{ displayValue(change.newValue) }}\n </p>\n <p v-else class=\"approvable-timeline-change\">\n <span class=\"approvable-timeline-change-label\">{{ change.label }}</span>\n <template v-if=\"hasPreviousValue(change)\">\n <span class=\"approvable-timeline-value approvable-timeline-value--old\">{{ displayValue(change.oldValue) }}</span>\n <span class=\"approvable-timeline-arrow\">→</span>\n </template>\n <span class=\"approvable-timeline-value approvable-timeline-value--new\">{{ displayValue(change.newValue) }}</span>\n </p>\n </template>\n </template>\n </div>\n </li>\n </ol>\n\n <p class=\"approvable-timeline-footer\">{{ messages.allEventsShown }}</p>\n </template>\n </section>\n</template>\n","<template>\n <div ref=\"rootRef\" class=\"approvable-popover\">\n <button class=\"approvable-btn\" :title=\"messages.comments\" type=\"button\" @click=\"onToggle\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M8 9h8\" />\n <path d=\"M8 13h6\" />\n <path d=\"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z\" />\n </svg>\n </button>\n\n <div v-if=\"isOpen\" class=\"approvable-popover-panel\">\n <div v-if=\"isLoading\" class=\"approvable-loading\">\n <span class=\"approvable-spinner\" />\n </div>\n\n <div class=\"approvable-popover-title\">{{ messages.comments }}</div>\n\n <div v-if=\"commentedBy\" class=\"approvable-popover-meta\">\n <div>{{ messages.commentAuthor }}:</div>\n <div class=\"approvable-popover-author\">{{ commentedBy }}</div>\n </div>\n\n <template v-if=\"!disabled\">\n <textarea\n ref=\"textareaRef\"\n v-model=\"comment\"\n class=\"approvable-textarea\"\n rows=\"1\"\n @input=\"resizeTextarea\"\n />\n\n <div class=\"approvable-popover-actions\">\n <button class=\"approvable-btn approvable-btn--primary\" type=\"button\" @click=\"onComment\">\n {{ messages.save }}\n </button>\n </div>\n </template>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, useTemplateRef } from 'vue'\n\nimport { ApprovableStepRepository, get, isSuccessResponse, notifyError, notifySuccess } from '@stsdti/approvable-core'\nimport { useMessages } from '../../messages.js'\n\nconst props = defineProps({\n approvableStep: {\n required: true,\n },\n disabled: {\n required: true,\n type: Boolean,\n },\n})\n\nconst emits = defineEmits(['isLoading', 'refresh'])\n\nconst rootRef = useTemplateRef('rootRef')\nconst textareaRef = useTemplateRef('textareaRef')\n\nconst isOpen = ref(false)\nconst isLoading = ref(false)\nconst comment = ref(null)\n\nconst commentedBy = computed(() => {\n return get(props.approvableStep, 'commented_by')\n})\n\nfunction onToggle () {\n isOpen.value ? hide() : show()\n}\n\nfunction show () {\n comment.value = get(props.approvableStep, 'comment')\n isOpen.value = true\n nextTick(resizeTextarea)\n}\n\nfunction hide () {\n isOpen.value = false\n}\n\nfunction resizeTextarea () {\n const textarea = textareaRef.value\n if (!textarea) {\n return\n }\n textarea.style.height = 'auto'\n textarea.style.height = `${textarea.scrollHeight}px`\n}\n\nfunction onDocumentClick (event) {\n if (isOpen.value && rootRef.value && !rootRef.value.contains(event.target)) {\n hide()\n }\n}\n\nfunction onDocumentKeydown (event) {\n if (event.key === 'Escape') {\n hide()\n }\n}\n\nonMounted(() => {\n document.addEventListener('click', onDocumentClick)\n document.addEventListener('keydown', onDocumentKeydown)\n})\n\nonBeforeUnmount(() => {\n document.removeEventListener('click', onDocumentClick)\n document.removeEventListener('keydown', onDocumentKeydown)\n})\n\nconst messages = useMessages()\n\nasync function onComment () {\n if (!get(props.approvableStep, 'comment') && !comment.value) {\n notifyError(messages.commentRequired)\n return\n }\n\n isLoading.value = true\n emits('isLoading', true)\n\n const data = {\n comment: comment.value,\n }\n\n const response = await new ApprovableStepRepository().comment(props.approvableStep.id, data)\n\n if (isSuccessResponse(response)) {\n notifySuccess(messages.commentSaved)\n hide()\n emits('refresh')\n } else {\n notifyError(messages.commentFailed)\n }\n\n isLoading.value = false\n emits('isLoading', false)\n}\n</script>\n","import { markRaw } from 'vue'\nimport {\n registerActionRenderer,\n unregisterActionRenderer,\n actionRenderer,\n actionSlotName\n} from '@stsdti/approvable-core'\n\n/**\n * Vue binding over the core action registry.\n *\n * The only thing Vue-specific about registering a renderer is that a component\n * must be marked raw before it goes into reactive state, so that is all this\n * layer adds. The registry itself is framework-free, which is what allows a\n * React binding to reuse it without inheriting Vue's reactivity rules.\n */\nexport function registerApprovableActionRenderer (name, component) {\n return registerActionRenderer(name, markRaw(component))\n}\n\nexport { unregisterActionRenderer as unregisterApprovableActionRenderer }\nexport { actionRenderer as approvableActionRenderer }\nexport { actionSlotName as approvableActionSlotName }\n","import { inject } from 'vue'\n\nexport const APPROVABLE_LINK_COMPONENT = Symbol('approvable.linkComponent')\n\n/**\n * Which component renders a button that navigates.\n *\n * Defaults to a plain anchor so the package works with no router installed.\n * Hardcoding <router-link> instead would silently fail to resolve — and log a\n * Vue warning — in any application without vue-router.\n *\n * Applications using a router opt in once, at install:\n *\n * app.use(Approvable, { linkComponent: RouterLink })\n */\nexport function useLinkComponent () {\n return inject(APPROVABLE_LINK_COMPONENT, 'a')\n}\n\n/**\n * Anchors take `href`; RouterLink and NuxtLink take `to`. Binding the right one\n * keeps the call sites free of that distinction.\n */\nexport function linkProps (component, target) {\n return component === 'a' ? { href: target } : { to: target }\n}\n","import { inject } from 'vue'\nimport { isClassIcon, isRegisteredIcon, isUrlIcon } from '@stsdti/approvable-core'\n\nexport const APPROVABLE_ICON_REGISTRY = Symbol('approvable.iconRegistry')\n\n/**\n * How a button's `icon` is rendered.\n *\n * An icon is a *name*, resolved against a registry the application supplies —\n * never raw markup rendered with v-html. A button's icon comes from the\n * workflow definition — authored in the editor, stored, and then displayed in\n * the browser of every person who can see the approval — so v-html here would\n * let whoever can edit a workflow run script in every approver's session.\n * `<svg onload=\"...\">` is enough; it would be a stored XSS with an unusually\n * good distribution list.\n *\n * app.use(Approvable, {\n * icons: { approve: CheckIcon, reject: XIcon }\n * })\n *\n * Anything not in the registry falls back to the two safe forms: an `http(s)`\n * URL rendered as <img>, or a CSS class rendered on an <i>.\n * A `#icon` slot is available for full control.\n *\n * Applications that genuinely need bespoke SVG register a component for it,\n * which puts the markup in application code — where it is reviewed — rather\n * than in a database row.\n */\nexport function useIconRegistry () {\n return inject(APPROVABLE_ICON_REGISTRY, {})\n}\n\n// The three predicates come from core rather than being defined here: the\n// React binding applies the same rules, and a rule about what is safe to render\n// is only worth trusting while there is one copy of it.\nexport { isRegisteredIcon, isUrlIcon, isClassIcon }\n","<template>\n <li v-if=\"step.isVisible\" :class=\"rowClass\">\n <span :class=\"discClass\">\n <svg\n v-if=\"discGlyph\"\n aria-hidden=\"true\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n viewBox=\"0 0 16 16\"\n >\n <path :d=\"discGlyph.d\" :stroke-width=\"discGlyph.width\" />\n </svg>\n </span>\n\n <div class=\"approvable-step-body\">\n <div class=\"approvable-step-line\">\n <slot :step=\"value\" name=\"approvableStepInfo\">\n <span class=\"approvable-step-name\">{{ step.approverName }}</span>\n </slot>\n\n <slot :step=\"value\" :role=\"step.approverRole\" name=\"approvableStepRole\">\n <!-- The title is the whole role, so a clipped one is still readable\n on hover; without a role the spacer keeps the row's geometry. -->\n <span v-if=\"step.approverRole\" :title=\"step.approverRole\" class=\"approvable-step-role\">\n {{ step.approverRole }}\n </span>\n <span v-else class=\"approvable-step-spacer\" />\n </slot>\n\n <!-- On the step being waited on the buttons carry the meaning, so the\n status word is redundant; everywhere else it is the outcome. -->\n <span v-if=\"showStatus\" class=\"approvable-step-status\">\n <span v-if=\"step.statusName\">{{ step.statusName }}</span>\n <time v-if=\"step.performedAt\" class=\"approvable-step-date\">{{ step.performedAt }}</time>\n </span>\n\n <div v-if=\"hasActions\" class=\"approvable-step-actions\">\n <div class=\"approvable-btn-group\">\n <!-- APPROVABLE BUTTONS (custom renderer per button, else basic) -->\n <template v-for=\"(button, index) in step.buttons\" :key=\"button.id ?? index\">\n <component\n :is=\"buttonRenderer(button)\"\n v-if=\"buttonRenderer(button)\"\n :action-ui=\"button.action_ui\"\n :approvable=\"approvable\"\n :button=\"button\"\n :buttons=\"[button]\"\n :complete=\"onApproveStatusChange\"\n :resource=\"resource\"\n :step=\"value\"\n @is-loading=\"(isLoading) => emits('isLoading', isLoading)\"\n @refresh=\"emits('refresh')\"\n />\n <component\n :is=\"linkComponent\"\n v-else-if=\"button.link\"\n v-bind=\"linkProps(linkComponent, button.link)\"\n >\n <button\n :title=\"button.tooltip\"\n :class=\"buttonClass(button)\"\n type=\"button\"\n @click=\"onApproveStatusChange(button)\"\n >\n <i v-if=\"isClassIcon(button.icon)\" :class=\"button.icon\"></i>\n </button>\n </component>\n <button\n v-else\n :title=\"button.tooltip\"\n :class=\"buttonClass(button)\"\n type=\"button\"\n @click=\"onApproveStatusChange(button)\"\n >\n <i v-if=\"isClassIcon(button.icon)\" :class=\"button.icon\"></i>\n {{ button.text }}\n </button>\n </template>\n </div>\n\n <div v-if=\"value.can_comment\" class=\"approvable-btn-group\">\n <approvable-step-comment\n :approvable-step=\"value\"\n :disabled=\"!value.can_comment\"\n @refresh=\"emits('refresh')\"\n @is-loading=\"(isLoading) => emits('isLoading', isLoading)\"\n />\n </div>\n </div>\n </div>\n\n <p v-if=\"step.comment.text\" class=\"approvable-step-comment\">\n <span :title=\"step.comment.title\">{{ commentText }}</span>\n <button\n v-if=\"step.comment.isTrimmed\"\n type=\"button\"\n class=\"approvable-step-comment-more\"\n :aria-expanded=\"isCommentExpanded\"\n @click=\"isCommentExpanded = !isCommentExpanded\"\n >\n {{ isCommentExpanded ? messages.showLess : messages.showMore }}\n </button>\n </p>\n </div>\n </li>\n</template>\n\n<script setup>\nimport { computed, ref } from 'vue'\nimport {\n approvableStatusTone,\n approvableStepGlyph,\n createStepViewModel,\n performStepAction\n} from '@stsdti/approvable-core'\nimport ApprovableStepComment from './ApprovableStepComment.vue'\nimport { approvableActionRenderer } from './action-renderers.js'\nimport { linkProps, useLinkComponent } from '../../config.js'\nimport { isClassIcon } from '../../icons.js'\nimport { useMessages } from '../../messages.js'\n\nconst emits = defineEmits(['isLoading', 'refresh'])\n\nconst props = defineProps({\n value: {\n type: Object,\n required: true\n },\n approvable: {\n type: Object,\n required: true\n },\n resource: {\n type: Object,\n required: true\n }\n})\n\nconst linkComponent = useLinkComponent()\nconst messages = useMessages()\n\nconst isCommentExpanded = ref(false)\n\n// Every derivation lives in core, so this component is left with rendering and\n// event plumbing only — and a React binding computes exactly the same values.\nconst step = computed(() => createStepViewModel(props.value))\n\nconst tone = computed(() => approvableStatusTone(step.value.status))\n\n/**\n * A row shows controls when it has any — a finished step usually has none, and\n * shows when it was decided instead.\n */\nconst hasActions = computed(() => step.value.buttons.length > 0 || !!props.value.can_comment)\n\nconst showStatus = computed(() => (\n (!step.value.isActive || !hasActions.value) && !!(step.value.statusName || step.value.performedAt)\n))\n\nconst rowClass = computed(() => ({\n 'approvable-step': true,\n 'approvable-step--active': step.value.isActive,\n // A step nobody has reached yet is dimmed; one with an outcome is not.\n 'approvable-step--pending': !step.value.isActive && !tone.value,\n [`approvable-step--${tone.value}`]: !!tone.value,\n // Nothing wraps below the name, so the row can hold to a single line.\n 'approvable-step--single-line': !hasActions.value && !step.value.comment.text\n}))\n\n/** `ring` and `pending` are drawn by the disc's border alone — no path. */\nconst GLYPHS = {\n check: { d: 'M4 8.4l2.8 2.8 5.4-6', width: 2.8 },\n cross: { d: 'M5.2 5.2l5.6 5.6M10.8 5.2l-5.6 5.6', width: 2.4 },\n dash: { d: 'M4.4 8h7.2', width: 2.2 }\n}\n\n/** The disc's own modifier: the glyph names the shape, the tone names the colour. */\nconst DISC_MODIFIERS = {\n check: 'success',\n cross: 'danger',\n dash: 'muted',\n ring: 'ring',\n pending: 'pending'\n}\n\nconst glyph = computed(() => approvableStepGlyph(tone.value, step.value.isActive))\n\nconst discGlyph = computed(() => GLYPHS[glyph.value] ?? null)\n\nconst discClass = computed(() => ({\n 'approvable-step-disc': true,\n [`approvable-step-disc--${DISC_MODIFIERS[glyph.value]}`]: true\n}))\n\nconst commentText = computed(() => (\n isCommentExpanded.value ? step.value.comment.text : step.value.comment.preview\n))\n\nconst buttonClass = (button) => ({\n 'approvable-btn': true,\n // A button carrying only an icon collapses to a circle, so the row keeps its\n // rhythm instead of stretching around an empty label.\n 'approvable-btn--icon': !button.text,\n 'approvable-btn--primary': button.result === 'approved'\n})\n\nconst buttonRenderer = (button) => {\n if (!step.value.isActive) {\n return null\n }\n\n return approvableActionRenderer(button?.action_ui)\n}\n\nconst onApproveStatusChange = async (buttonOrId) => {\n emits('isLoading', true)\n\n const result = await performStepAction({\n stepId: step.value.id,\n button: buttonOrId,\n buttons: step.value.buttons\n })\n\n emits('isLoading', false)\n\n // Refresh after any attempted request, success or failure — a failed action\n // still means the local state may be stale. Only a skipped one (no id, no\n // button, or a presentational button) reloads nothing, since it sent nothing.\n if (!result.skipped) {\n emits('refresh')\n }\n}\n</script>\n","<template>\n <span :class=\"badgeClass\">{{ badgeName }}</span>\n</template>\n\n<script setup>\nimport { computed } from 'vue'\nimport { ApprovableStatus, get } from '@stsdti/approvable-core'\n\nconst props = defineProps({\n value: {\n required: true\n },\n label: {\n default: null\n }\n})\nconst badgeClass = computed(() => {\n const approvableStatusCode = get(props.value, 'code', ' - ')\n return {\n 'approvable-badge': true,\n 'approvable-badge--draft': [ApprovableStatus.CODES.CODE_DRAFT].includes(approvableStatusCode),\n 'approvable-badge--waiting': [ApprovableStatus.CODES.CODE_WAITING].includes(approvableStatusCode),\n 'approvable-badge--success': [ApprovableStatus.CODES.CODE_APPROVED, ApprovableStatus.CODES.CODE_VIEWED, ApprovableStatus.CODES.CODE_NOTICED].includes(approvableStatusCode),\n 'approvable-badge--danger': [ApprovableStatus.CODES.CODE_REJECTED].includes(approvableStatusCode),\n 'approvable-badge--muted': [ApprovableStatus.CODES.CODE_EXPIRED, ApprovableStatus.CODES.CODE_SOLVED].includes(approvableStatusCode),\n 'approvable-badge--empty': approvableStatusCode === ' - '\n }\n})\n\nconst badgeName = computed(() => {\n return props.label ? props.label : get(props.value, 'name', ' - ')\n})\n</script>\n","<template>\n <div v-if=\"approval.hasApprovable\" class=\"approvable\">\n <!-- A refresh has content to veil; an initial load has none, and gets the\n skeleton below instead. -->\n <div v-if=\"isLoading && approval.steps.length\" class=\"approvable-loading\">\n <span class=\"approvable-spinner\" />\n </div>\n\n <div class=\"approvable-header\">\n <h2 class=\"approvable-sr-only\">{{ title }}</h2>\n\n <template v-if=\"isInitialLoad\">\n <span aria-hidden=\"true\" class=\"approvable-skeleton-bar approvable-skeleton-bar--pill\" />\n <span class=\"approvable-skeleton-spacer\" />\n <span\n aria-hidden=\"true\"\n class=\"approvable-skeleton-bar approvable-skeleton-bar--soft\"\n style=\"width:104px;animation-delay:0.2s\"\n />\n </template>\n\n <template v-else>\n <approve-status-info\n v-if=\"showApprovableStatus\"\n :label=\"approval.statusName\"\n :value=\"approval.status\"\n />\n\n <span class=\"approvable-updated-at\">\n {{ approval.updatedAt }}\n </span>\n <button\n v-if=\"approval.id\"\n type=\"button\"\n class=\"approvable-history-btn\"\n :title=\"messages.historyTitle\"\n :aria-label=\"messages.historyTitle\"\n @click=\"historyOpen = true\"\n >\n {{ messages.history }}\n </button>\n </template>\n </div>\n\n <template v-if=\"isInitialLoad\">\n <span class=\"approvable-sr-only\" aria-live=\"polite\">{{ messages.loadingStatus }}</span>\n <div v-for=\"row in SKELETON_ROWS\" :key=\"row.delay\" aria-hidden=\"true\" class=\"approvable-skeleton-row\">\n <span class=\"approvable-skeleton-disc\" :style=\"{ animationDelay: row.delay }\" />\n <span class=\"approvable-skeleton-bar\" :style=\"{ width: row.name, animationDelay: row.delay }\" />\n <span class=\"approvable-skeleton-spacer\" />\n <span\n class=\"approvable-skeleton-bar approvable-skeleton-bar--soft\"\n :style=\"{ width: row.meta, animationDelay: row.metaDelay }\"\n />\n </div>\n <div class=\"approvable-footer\" aria-hidden=\"true\">\n <span class=\"approvable-skeleton-bar approvable-skeleton-bar--soft\" style=\"display:block;width:132px\" />\n </div>\n </template>\n\n <template v-else>\n <ol v-if=\"approval.steps.length\" :class=\"approvableStepsClass\">\n <approvable-step\n v-for=\"approvableStep of approval.steps\"\n :key=\"approvableStep.id\"\n :approvable=\"approval.approvable\"\n :resource=\"value\"\n :value=\"approvableStep\"\n @isLoading=\"(value) => (isLoading = value)\"\n @refresh=\"onRefresh\"\n >\n <template v-for=\"slot in Object.keys($slots)\" v-slot:[slot]=\"scoped\">\n <slot v-bind=\"scoped ?? {}\" :name=\"slot\" />\n </template>\n </approvable-step>\n </ol>\n\n <p v-if=\"progressLabel\" class=\"approvable-footer\">{{ progressLabel }}</p>\n </template>\n\n <Teleport to=\"body\">\n <div v-if=\"historyOpen\" class=\"approvable-dialog-backdrop\" @click.self=\"historyOpen = false\">\n <section\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"approvable-history-title\"\n class=\"approvable-dialog\"\n @keydown.esc=\"historyOpen = false\"\n >\n <header class=\"approvable-dialog-header\">\n <p class=\"approvable-dialog-eyebrow\">\n <svg aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 16 16\">\n <path d=\"M9.6 4.5 6 8l3.6 3.5\" />\n </svg>\n {{ messages.history }}\n </p>\n <h2 id=\"approvable-history-title\" class=\"approvable-dialog-title\">{{ historyTitle }}</h2>\n <button\n type=\"button\"\n class=\"approvable-dialog-close\"\n :aria-label=\"messages.historyClose\"\n @click=\"historyOpen = false\"\n >\n <svg aria-hidden=\"true\" class=\"approvable-icon\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"2\" viewBox=\"0 0 16 16\">\n <path d=\"m5.2 5.2 5.6 5.6M10.8 5.2l-5.6 5.6\" />\n </svg>\n </button>\n </header>\n <div class=\"approvable-dialog-body\">\n <approvable-audit-timeline\n ref=\"auditTimeline\"\n :approvable-id=\"approval.id\"\n :show-header=\"false\"\n @loaded=\"(count) => (historyCount = count)\"\n />\n </div>\n </section>\n </div>\n </Teleport>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue'\nimport { createApprovableViewModel, formatMessage } from '@stsdti/approvable-core'\nimport ApprovableAuditTimeline from './ApprovableAuditTimeline.vue'\nimport ApprovableStep from './ApprovableStep.vue'\nimport ApproveStatusInfo from './ApproveStatusInfo.vue'\nimport { useMessages } from '../../messages.js'\n\nconst props = defineProps({\n value: {},\n showApprovableStatus: { type: Boolean, default: true },\n title: { default: 'Approval' },\n isDirectionRow: { default: false }\n})\n\nconst emits = defineEmits(['refresh', 'isLoading'])\n\nconst isLoading = ref(false)\nconst auditTimeline = ref(null)\nconst historyOpen = ref(false)\nconst historyCount = ref(null)\n\nconst messages = useMessages()\n\n// Widths and stagger for the placeholder rows. Kept as data so the skeleton is\n// three rows of varied length rather than three identical ones, which reads as\n// a frozen list instead of a loading one.\nconst SKELETON_ROWS = [\n { name: '118px', meta: '56px', delay: '0s', metaDelay: '0.15s' },\n { name: '96px', meta: '72px', delay: '0.1s', metaDelay: '0.25s' },\n { name: '78px', meta: '48px', delay: '0.2s', metaDelay: '0.35s' }\n]\n\nconst approval = computed(() => createApprovableViewModel(props.value))\n\n/** Names the dialog, and once the history has loaded, counts it. */\nconst historyTitle = computed(() => (\n historyCount.value === null\n ? messages.historyTitle\n : formatMessage(messages.eventCount, { count: historyCount.value })\n))\n\n/** Nothing to veil yet, so the panel shows its own shape instead. */\nconst isInitialLoad = computed(() => isLoading.value && !approval.value.steps.length)\n\nconst approvableStepsClass = computed(() => ({\n 'approvable-steps': true,\n 'approvable-steps--row': props.isDirectionRow\n}))\n\n/** \"Step 2 of 3 — awaiting Priya Raman\", with the tail dropped when nothing is pending. */\nconst progressLabel = computed(() => {\n const { activeStepNumber, visibleStepCount, activeApproverName } = approval.value\n\n if (!activeStepNumber || !visibleStepCount) {\n return null\n }\n\n const progress = formatMessage(messages.stepProgress, {\n current: activeStepNumber,\n total: visibleStepCount\n })\n\n if (!activeApproverName) {\n return progress\n }\n\n return `${progress} — ${formatMessage(messages.awaitingApprover, { name: activeApproverName })}`\n})\n\nconst onRefresh = () => {\n auditTimeline.value?.refresh()\n emits('refresh')\n}\n</script>\n","<template>\n <div v-if=\"hasApprovableButtons\" class=\"approvable-actions\">\n <hr class=\"approvable-divider\" />\n <div class=\"approvable-actions-list\">\n <button\n v-for=\"approvableButton in approvableButtons\"\n :key=\"approvableButton.code\"\n :title=\"approvableButton.tooltip\"\n class=\"approvable-btn\"\n type=\"button\"\n @click=\"onApproveStatusChange(approvableButton)\"\n >\n <slot name=\"icon\" :button=\"approvableButton\">\n <component\n :is=\"icons[approvableButton.icon]\"\n v-if=\"isRegisteredIcon(icons, approvableButton.icon)\"\n class=\"approvable-btn-icon\"\n />\n <img\n v-else-if=\"isUrlIcon(approvableButton.icon)\"\n :src=\"approvableButton.icon\"\n alt=\"\"\n class=\"approvable-btn-icon\"\n />\n <i v-else-if=\"isClassIcon(approvableButton.icon)\" :class=\"approvableButton.icon\"></i>\n </slot>\n {{ approvableButton.text }}\n </button>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue'\nimport { ApprovableStepRepository, get, isSuccessResponse, notifySuccess } from '@stsdti/approvable-core'\nimport { isClassIcon, isRegisteredIcon, isUrlIcon, useIconRegistry } from '../../icons.js'\nimport { useMessages } from '../../messages.js'\n\nconst props = defineProps({\n value: {\n required: true\n }\n})\nconst emits = defineEmits(['isLoading', 'refresh'])\n\nconst isLoading = ref(false)\n\nconst approvableButtons = computed(() => {\n return get(props.value, 'buttons', [])\n})\nconst hasApprovableButtons = computed(() => {\n if (!approvableButtons.value) {\n return false\n }\n return approvableButtons.value.length > 0\n})\n\nconst icons = useIconRegistry()\nconst messages = useMessages()\n\nconst onApproveStatusChange = (button) => {\n let approvableId = get(props.value, 'id')\n\n if (!approvableId) {\n return\n }\n onUpdateStatus(approvableId, button)\n}\nconst onUpdateStatus = async (id, button) => {\n emits('isLoading', true)\n isLoading.value = true\n const response = await new ApprovableStepRepository().updateApproveStatus(id, button)\n\n if (isSuccessResponse(response)) {\n notifySuccess(messages.actionSucceeded)\n }\n emits('isLoading', false)\n emits('refresh')\n}\n</script>\n","<template>\n <label class=\"approvable-select\">\n <span v-if=\"label\" class=\"approvable-select-label\">{{ label }}</span>\n <select\n :value=\"selectedKey\"\n class=\"approvable-select-input\"\n v-bind=\"$attrs\"\n @change=\"onChange\"\n >\n <option value=\"\">-</option>\n <option v-for=\"option in options\" :key=\"optionKey(option)\" :value=\"optionKey(option)\">\n {{ optionName(option) }}\n </option>\n </select>\n </label>\n</template>\n\n<script setup>\nimport { computed, onMounted, ref } from 'vue'\nimport { ApprovableStatusRepository, get } from '@stsdti/approvable-core'\n\ndefineOptions({\n inheritAttrs: false\n})\n\nconst emit = defineEmits(['mounted'])\nconst modelValue = defineModel()\n\nconst props = defineProps({\n getList: {},\n label: {\n default: 'Status'\n }\n})\n\nconst options = ref([])\n\nconst getListDefault = async (search) => {\n let filters = [{ field: 'search', value: search }]\n return await new ApprovableStatusRepository().fetchAll({ filters })\n}\n\nconst optionKey = (option) => String(get(option, 'id') ?? get(option, 'code', ''))\nconst optionName = (option) => get(option, 'name') ?? get(option, 'text', '')\n\nconst selectedKey = computed(() => {\n return modelValue.value ? optionKey(modelValue.value) : ''\n})\n\nconst onChange = (event) => {\n const key = event.target.value\n modelValue.value = options.value.find((option) => optionKey(option) === key) ?? null\n}\n\nconst refresh = async (search = null) => {\n const list = await (props.getList ?? getListDefault)(search)\n options.value = Array.isArray(list) ? list : []\n}\n\nonMounted(async () => {\n await refresh()\n emit('mounted', { refresh, options })\n})\n</script>\n","<template>\n <div class=\"approvable-select-option\">\n <span>{{ displayName }}</span>\n </div>\n</template>\n\n\n<script setup>\nimport { computed } from 'vue'\nimport { get } from '@stsdti/approvable-core'\n\nconst props = defineProps({\n value: {}\n})\nconst displayName = computed(() => get(props.value, 'name'))\n</script>\n","/**\n * @stsdti/approvable-vue\n *\n * Vue 3 components for laravel-approvable. All behaviour lives in\n * @stsdti/approvable-core; this package renders it.\n *\n * Components ship unstyled and emit `.approvable-*` class names. Import the\n * theme to give them a look — one stylesheet, light and dark:\n *\n * import '@stsdti/approvable-vue/themes/approvable.css'\n */\n\nimport Approvable from './components/approvable/Approvable.vue'\nimport ApprovableStep from './components/approvable/ApprovableStep.vue'\nimport ApprovableButtons from './components/approvable/ApprovableButtons.vue'\nimport ApprovableStepComment from './components/approvable/ApprovableStepComment.vue'\nimport ApprovableAuditTimeline from './components/approvable/ApprovableAuditTimeline.vue'\nimport ApproveStatusInfo from './components/approvable/ApproveStatusInfo.vue'\nimport ApprovableStatusSelect from './components/select/approvable-status-select/ApprovableStatusSelect.vue'\nimport ApprovableStatusSelectOption from './components/select/approvable-status-select/ApprovableStatusSelectOption.vue'\n\nimport { APPROVABLE_LINK_COMPONENT } from './config.js'\nimport { APPROVABLE_ICON_REGISTRY } from './icons.js'\nimport { APPROVABLE_MESSAGES } from './messages.js'\nimport {\n registerApprovableActionRenderer,\n unregisterApprovableActionRenderer,\n approvableActionRenderer,\n approvableActionSlotName\n} from './components/approvable/action-renderers.js'\n\nexport {\n Approvable,\n ApprovableStep,\n ApprovableButtons,\n ApprovableStepComment,\n ApprovableAuditTimeline,\n ApproveStatusInfo,\n ApprovableStatusSelect,\n ApprovableStatusSelectOption\n}\n\nexport {\n registerApprovableActionRenderer,\n unregisterApprovableActionRenderer,\n approvableActionRenderer,\n approvableActionSlotName\n}\n\nexport { APPROVABLE_LINK_COMPONENT, useLinkComponent, linkProps } from './config.js'\nexport {\n APPROVABLE_ICON_REGISTRY,\n useIconRegistry,\n isRegisteredIcon,\n isUrlIcon,\n isClassIcon\n} from './icons.js'\nexport { APPROVABLE_MESSAGES, useMessages } from './messages.js'\n\n/**\n * Transport, re-exported from @stsdti/approvable-core so a Vue-only consumer\n * never has to install a second package to point the components at its own\n * HTTP stack. Same module instance either way — core is a dependency here and\n * external to the build, so the configured client is shared, not duplicated.\n *\n * import { configureApprovableClient } from '@stsdti/approvable-vue'\n * configureApprovableClient({ axios })\n *\n * Entirely optional: with no configuration the components use fetch, which\n * already sends the XSRF-TOKEN cookie Laravel expects.\n */\nexport {\n configureApprovableClient,\n setApprovableClient,\n getApprovableClient,\n ApprovableClient,\n axiosAdapter,\n fetchAdapter\n} from '@stsdti/approvable-core'\n\nconst components = {\n Approvable,\n ApprovableStep,\n ApprovableButtons,\n ApprovableStepComment,\n ApprovableAuditTimeline,\n ApproveStatusInfo,\n ApprovableStatusSelect,\n ApprovableStatusSelectOption\n}\n\n/**\n * Vue plugin, for applications that prefer global registration.\n *\n * app.use(ApprovableVue, {\n * linkComponent: RouterLink,\n * icons: { approve: CheckIcon },\n * messages: { commentSaved: 'Comentariul a fost adăugat.' }\n * })\n *\n * `linkComponent` is what a navigating button renders as. It defaults to a\n * plain anchor so the package works without a router installed.\n *\n * `icons` maps a button's `icon` name to a component. Icons are names, never\n * raw SVG rendered with v-html — that would let anyone who can edit a workflow\n * run script in every approver's browser.\n *\n * `messages` overrides the user-facing strings, which are English by default.\n */\nexport default {\n install (app, { linkComponent = null, icons = null, messages = null, register = true } = {}) {\n if (linkComponent) {\n app.provide(APPROVABLE_LINK_COMPONENT, linkComponent)\n }\n\n if (icons) {\n app.provide(APPROVABLE_ICON_REGISTRY, icons)\n }\n\n if (messages) {\n app.provide(APPROVABLE_MESSAGES, messages)\n }\n\n if (register) {\n for (const [name, component] of Object.entries(components)) {\n app.component(name, component)\n }\n }\n }\n}\n"],"names":["APPROVABLE_MESSAGES","useMessages","mergeMessages","inject","props","__props","emits","__emit","messages","repository","ApprovableAuditRepository","audits","ref","loading","error","FIELD_LABELS","ICONS","QUIET_KINDS","groups","computed","stepAudits","audit","grouped","key","entries","kind","auditKind","details","changeRows","a","b","button","_a","_b","_c","statusChanged","before","after","operationTitle","label","_e","_d","_f","actorLabel","actor","entry","oldValues","newValues","row","hasPreviousValue","change","displayValue","value","text","formatDate","date","refresh","response","data","exception","eventSummary","formatMessage","watch","__expose","_createElementBlock","_openBlock","_hoisted_1","_createElementVNode","_hoisted_2","_toDisplayString","_unref","_hoisted_3","_hoisted_4","_hoisted_5","_cache","_hoisted_6","_Fragment","_hoisted_8","_renderList","group","_normalizeClass","d","i","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_7","rootRef","useTemplateRef","textareaRef","isOpen","isLoading","comment","commentedBy","get","onToggle","hide","show","nextTick","resizeTextarea","textarea","onDocumentClick","event","onDocumentKeydown","onMounted","onBeforeUnmount","onComment","notifyError","ApprovableStepRepository","isSuccessResponse","notifySuccess","$event","registerApprovableActionRenderer","name","component","registerActionRenderer","markRaw","APPROVABLE_LINK_COMPONENT","useLinkComponent","linkProps","target","APPROVABLE_ICON_REGISTRY","useIconRegistry","linkComponent","isCommentExpanded","step","createStepViewModel","tone","approvableStatusTone","hasActions","showStatus","rowClass","GLYPHS","DISC_MODIFIERS","glyph","approvableStepGlyph","discGlyph","discClass","commentText","buttonClass","buttonRenderer","approvableActionRenderer","onApproveStatusChange","buttonOrId","result","performStepAction","_renderSlot","_ctx","_hoisted_9","_hoisted_10","index","_createBlock","_resolveDynamicComponent","_mergeProps","isClassIcon","_createVNode","ApprovableStepComment","badgeClass","approvableStatusCode","ApprovableStatus","badgeName","auditTimeline","historyOpen","historyCount","SKELETON_ROWS","approval","createApprovableViewModel","historyTitle","isInitialLoad","approvableStepsClass","progressLabel","activeStepNumber","visibleStepCount","activeApproverName","progress","onRefresh","ApproveStatusInfo","_normalizeStyle","approvableStep","ApprovableStep","$slots","slot","_withCtx","scoped","_Teleport","ApprovableAuditTimeline","count","approvableButtons","hasApprovableButtons","icons","approvableId","onUpdateStatus","id","approvableButton","isRegisteredIcon","isUrlIcon","emit","modelValue","_useModel","options","getListDefault","search","filters","ApprovableStatusRepository","optionKey","option","optionName","selectedKey","onChange","list","$attrs","displayName","components","Approvable","ApprovableButtons","ApprovableStatusSelect","ApprovableStatusSelectOption","app","register"],"mappings":";;;AAGY,MAACA,KAAsB,OAAO,qBAAqB;AAWxD,SAASC,IAAe;AAC7B,SAAOC,GAAcC,EAAOH,IAAqB,IAAI,CAAC;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXA,UAAMI,IAAQC,GAMRC,IAAQC,GAERC,IAAWP,EAAW,GACtBQ,IAAa,IAAIC,GAAyB,GAC1CC,IAASC,EAAI,CAAA,CAAE,GACfC,IAAUD,EAAI,EAAK,GACnBE,IAAQF,EAAI,EAAE,GAIdG,IAAe;AAAA,MACnB,wBAAwB;AAAA,MACxB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,WAAW;AAAA,IACb,GAKMC,IAAQ;AAAA,MACZ,SAAS,EAAE,OAAO,CAAC,sBAAsB,GAAG,OAAO,IAAG;AAAA,MACtD,QAAQ,EAAE,OAAO,CAAC,oCAAoC,GAAG,OAAO,IAAG;AAAA,MACnE,SAAS,EAAE,OAAO,CAAC,oBAAoB,GAAG,OAAO,IAAG;AAAA,MACpD,QAAQ,EAAE,OAAO,CAAC,gCAAgC,GAAG,OAAO,IAAG;AAAA,MAC/D,MAAM,EAAE,OAAO,CAAC,qDAAqD,GAAG,OAAO,EAAC;AAAA,MA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MAAAE,EAFgBiI,EAAA,OAAO,CAAjBM,YAAfrJ,EAES,UAAA;AAAA,UAF0B,KAAKoJ,EAAUC,CAAM;AAAA,UAAI,OAAOD,EAAUC,CAAM;AAAA,QAC9E,GAAAhJ,EAAAiJ,EAAWD,CAAM,CAAA,GAAA,GAAA7I,EAAA;;;;;;;;;;ACA5B,UAAMpE,IAAQC,GAGRsN,IAAcxM,EAAS,MAAMmF,EAAIlG,EAAM,OAAO,MAAM,CAAC;sBAbzD6D,EAAA,GAAAD,EAEM,OAFNE,IAEM;AAAA,MADJC,EAA8B,gBAArBwJ,EAAA,KAAW,GAAA,CAAA;AAAA;;GC8ElBC,KAAa;AAAA,EACnB,YAAEC;AAAAA,EACF,gBAAElC;AAAAA,EACF,mBAAEmC;AAAAA,EACF,uBAAE1D;AAAAA,EACF,yBAAE6B;AAAAA,EACF,mBAAET;AAAAA,EACF,wBAAEuC;AAAAA,EACF,8BAAEC;AACF,GAoBAlE,KAAe;AAAA,EACb,QAASmE,GAAK,EAAE,eAAA9F,IAAgB,MAAM,OAAAkE,IAAQ,MAAM,UAAA7L,IAAW,MAAM,UAAA0N,IAAW,GAAI,IAAK,CAAA,GAAI;AAa3F,QAZI/F,KACF8F,EAAI,QAAQpG,IAA2BM,CAAa,GAGlDkE,KACF4B,EAAI,QAAQhG,IAA0BoE,CAAK,GAGzC7L,KACFyN,EAAI,QAAQjO,IAAqBQ,CAAQ,GAGvC0N;AACF,iBAAW,CAACzG,GAAMC,CAAS,KAAK,OAAO,QAAQkG,EAAU;AACvD,QAAAK,EAAI,UAAUxG,GAAMC,CAAS;AAAA,EAGnC;AACF;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stsdti/approvable-vue",
3
- "version": "0.1.0",
3
+ "version": "0.1.4",
4
4
  "description": "Vue 3 components for laravel-approvable: approval trails, step actions, comments and the audit timeline.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -34,7 +34,7 @@
34
34
  "approvable"
35
35
  ],
36
36
  "dependencies": {
37
- "@stsdti/approvable-core": "^0.1.0"
37
+ "@stsdti/approvable-core": "^0.1.4"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "vue": "^3.3.0"
package/src/index.js CHANGED
@@ -57,6 +57,27 @@ export {
57
57
  } from './icons.js'
58
58
  export { APPROVABLE_MESSAGES, useMessages } from './messages.js'
59
59
 
60
+ /**
61
+ * Transport, re-exported from @stsdti/approvable-core so a Vue-only consumer
62
+ * never has to install a second package to point the components at its own
63
+ * HTTP stack. Same module instance either way — core is a dependency here and
64
+ * external to the build, so the configured client is shared, not duplicated.
65
+ *
66
+ * import { configureApprovableClient } from '@stsdti/approvable-vue'
67
+ * configureApprovableClient({ axios })
68
+ *
69
+ * Entirely optional: with no configuration the components use fetch, which
70
+ * already sends the XSRF-TOKEN cookie Laravel expects.
71
+ */
72
+ export {
73
+ configureApprovableClient,
74
+ setApprovableClient,
75
+ getApprovableClient,
76
+ ApprovableClient,
77
+ axiosAdapter,
78
+ fetchAdapter
79
+ } from '@stsdti/approvable-core'
80
+
60
81
  const components = {
61
82
  Approvable,
62
83
  ApprovableStep,