@bahmni/widgets 0.0.1-dev.278 → 0.0.1-dev.281

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as T, Fragment as X } from "react/jsx-runtime";
2
- import { u as Y, a as W, m as J, X as Z, R as x, b as ee, I as te } from "./index-BG3ERdjQ.js";
2
+ import { u as Y, a as W, y as J, X as Z, O as x, b as ee, I as te } from "./index-DCPifDyd.js";
3
3
  import { useQuery as ne } from "@tanstack/react-query";
4
4
  import { useState as m, useCallback as _, useEffect as g, useMemo as p } from "react";
5
5
  import { useTranslation as ae } from "react-i18next";
@@ -1,52 +1,52 @@
1
1
  import { jsx as n, jsxs as Z, Fragment as ee } from "react/jsx-runtime";
2
- import { Y as re, u as te, C as oe, W as ae, G as se, K as ne, D as de, c as ie, M as U, R as me, X as le, b as x, J as ce, d as ue, I as fe, O as ye } from "./index-BG3ERdjQ.js";
2
+ import { K as re, u as te, x as oe, Q as ae, W as se, J as ne, L as de, d as ie, M as U, O as me, X as le, b as x, c as ce, e as ue, I as fe, f as ye } from "./index-DCPifDyd.js";
3
3
  import { useQueryClient as be, useQuery as y } from "@tanstack/react-query";
4
4
  import { useState as k, useMemo as d, useCallback as b } from "react";
5
5
  import { useTranslation as pe } from "react-i18next";
6
- const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_customAccordianItem__isszs", O = {
6
+ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_customAccordianItem__isszs", E = {
7
7
  formsTableBody: ge,
8
8
  customAccordianItem: Fe
9
9
  }, he = (m) => m ? m.extension?.find(
10
10
  (p) => p.url === re
11
- )?.valueString : void 0, Me = ({
11
+ )?.valueString : void 0, Ae = ({
12
12
  episodeOfCareUuids: m,
13
13
  encounterUuids: i,
14
14
  config: p
15
15
  }) => {
16
- const { t: s } = pe(), l = te(), [c, D] = k(!1), [o, I] = k(null), {
16
+ const { t: s } = pe(), l = te(), [c, I] = k(!1), [o, M] = k(null), {
17
17
  numberOfVisits: K,
18
18
  hideThumbnail: P = !1,
19
19
  forms: u
20
- } = p ?? {}, M = oe(
20
+ } = p ?? {}, A = oe(
21
21
  m,
22
22
  i
23
23
  ), w = be(), {
24
- data: A = [],
24
+ data: D = [],
25
25
  isLoading: v,
26
- isError: B,
27
- error: G,
28
- refetch: H
26
+ isError: L,
27
+ error: H,
28
+ refetch: Q
29
29
  } = y({
30
30
  queryKey: ["forms", l, m],
31
31
  queryFn: () => ae(l, void 0, K),
32
- enabled: !!l && !M
33
- }), R = d(() => {
34
- let e = A;
32
+ enabled: !!l && !A
33
+ }), B = d(() => {
34
+ let e = D;
35
35
  return i && i.length > 0 && (e = e.filter(
36
36
  (t) => i.includes(t.encounterUuid)
37
37
  )), Array.isArray(u) && u.length > 0 && (e = e.filter(
38
38
  (t) => u.some((r) => r.toLowerCase() === t.formName.toLowerCase())
39
39
  )), e;
40
- }, [A, i, u]), { data: T = [] } = y({
40
+ }, [D, i, u]), { data: T = [] } = y({
41
41
  queryKey: ["observationForms"],
42
42
  queryFn: () => se()
43
- }), L = b(
43
+ }), R = b(
44
44
  (e) => T.find((r) => r.name === e)?.uuid,
45
45
  [T]
46
46
  ), g = d(() => {
47
47
  if (o)
48
- return L(o.formName);
49
- }, [o, L]), {
48
+ return R(o.formName);
49
+ }, [o, R]), {
50
50
  isLoading: j,
51
51
  isError: V,
52
52
  error: F
@@ -66,14 +66,14 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
66
66
  });
67
67
  ie(
68
68
  (e) => {
69
- e.patientUUID === l && e.updatedConcepts.size > 0 && (H(), w.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
69
+ e.patientUUID === l && e.updatedConcepts.size > 0 && (Q(), w.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
70
70
  },
71
71
  [l]
72
72
  );
73
- const Q = d(() => !h?.entry || !o?.formName ? [] : h.entry.filter((t) => t.resource?.resourceType === "Observation").map((t) => t.resource).filter((t) => {
73
+ const G = d(() => !h?.entry || !o?.formName ? [] : h.entry.filter((t) => t.resource?.resourceType === "Observation").map((t) => t.resource).filter((t) => {
74
74
  const r = he(t);
75
75
  return !r || r.includes(o.formName);
76
- }), [h, o?.formName]), X = d(() => {
76
+ }), [h, o?.formName]), J = d(() => {
77
77
  if (F)
78
78
  return U(F).message;
79
79
  if (N)
@@ -84,23 +84,23 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
84
84
  { key: "recordedBy", header: s("RECORDED_BY") }
85
85
  ],
86
86
  [s]
87
- ), Y = d(
87
+ ), X = d(
88
88
  () => [
89
89
  { key: "recordedOn", sortable: !0 },
90
90
  { key: "recordedBy", sortable: !0 }
91
91
  ],
92
92
  []
93
93
  ), C = d(() => {
94
- const e = R.reduce(
94
+ const e = B.reduce(
95
95
  (r, a) => {
96
96
  const f = a.formName;
97
97
  r[f] ??= [];
98
- const E = a.providers.map((W) => W.providerName).filter(Boolean).join(", ");
98
+ const O = a.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
99
99
  return r[f].push({
100
100
  id: a.encounterUuid,
101
101
  formName: a.formName,
102
102
  recordedOn: me(a.encounterDateTime, s, !0).formattedResult,
103
- recordedBy: E ?? "--",
103
+ recordedBy: O ?? "--",
104
104
  encounterDateTime: a.encounterDateTime,
105
105
  encounterUuid: a.encounterUuid
106
106
  }), r;
@@ -111,14 +111,14 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
111
111
  ([r, a]) => ({
112
112
  formName: r,
113
113
  records: a.sort(
114
- (f, E) => E.encounterDateTime - f.encounterDateTime
114
+ (f, O) => O.encounterDateTime - f.encounterDateTime
115
115
  )
116
116
  })
117
117
  ).sort((r, a) => r.formName.localeCompare(a.formName));
118
- }, [R, s]), S = b((e) => {
119
- I(e), D(!0);
120
- }, []), J = b(() => {
121
- D(!1), I(null);
118
+ }, [B, s]), S = b((e) => {
119
+ M(e), I(!0);
120
+ }, []), W = b(() => {
121
+ I(!1), M(null);
122
122
  }, []), q = b(
123
123
  (e, t) => {
124
124
  switch (t) {
@@ -133,17 +133,17 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
133
133
  [S]
134
134
  );
135
135
  return /* @__PURE__ */ Z(ee, { children: [
136
- /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: v || B || C.length === 0 || M ? /* @__PURE__ */ n(
136
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: v || L || C.length === 0 || A ? /* @__PURE__ */ n(
137
137
  x,
138
138
  {
139
139
  headers: _,
140
140
  ariaLabel: s("FORMS_HEADING"),
141
141
  rows: [],
142
142
  loading: v,
143
- errorStateMessage: B ? G?.message : void 0,
143
+ errorStateMessage: L ? H?.message : void 0,
144
144
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
145
145
  renderCell: q,
146
- className: O.formsTableBody,
146
+ className: E.formsTableBody,
147
147
  dataTestId: "forms-table"
148
148
  }
149
149
  ) : /* @__PURE__ */ n(ce, { align: "start", children: C.map((e, t) => {
@@ -152,7 +152,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
152
152
  ue,
153
153
  {
154
154
  title: r,
155
- className: O.customAccordianItem,
155
+ className: E.customAccordianItem,
156
156
  testId: `accordian-title-${r}`,
157
157
  open: t === 0,
158
158
  children: /* @__PURE__ */ n(
@@ -163,10 +163,10 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
163
163
  rows: a,
164
164
  loading: !1,
165
165
  errorStateMessage: "",
166
- sortable: Y,
166
+ sortable: X,
167
167
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
168
168
  renderCell: q,
169
- className: O.formsTableBody,
169
+ className: E.formsTableBody,
170
170
  dataTestId: `forms-table-${r}`
171
171
  }
172
172
  )
@@ -180,7 +180,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
180
180
  id: "modalIdForActionAreaLayout",
181
181
  portalId: "main-display-area",
182
182
  open: c,
183
- onRequestClose: J,
183
+ onRequestClose: W,
184
184
  modalHeading: o.formName,
185
185
  modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
186
186
  passiveModal: !0,
@@ -189,10 +189,10 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
189
189
  children: /* @__PURE__ */ n(
190
190
  ye,
191
191
  {
192
- observations: Q,
192
+ observations: G,
193
193
  isLoading: j || $,
194
194
  isError: V || z,
195
- errorMessage: X,
195
+ errorMessage: J,
196
196
  emptyStateMessage: s("NO_FORM_DATA_AVAILABLE"),
197
197
  testIdPrefix: o.formName,
198
198
  hideThumbnail: P
@@ -203,5 +203,5 @@ const ge = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_cu
203
203
  ] });
204
204
  };
205
205
  export {
206
- Me as default
206
+ Ae as default
207
207
  };
@@ -1,12 +1,12 @@
1
- import { jsx as d, jsxs as C } from "react/jsx-runtime";
2
- import { f as K, e as D, t as V, g as k, h as Q, p as q, i as G, j as P, u as j, a as H, k as z, A as J, c as Y, l as W, n as X, s as Z, o as x, b as ee } from "./index-BG3ERdjQ.js";
1
+ import { jsx as l, jsxs as U } from "react/jsx-runtime";
2
+ import { g as K, h as C, t as V, i as Q, j as k, p as q, k as G, l as P, u as j, a as H, U as z, N as J, d as Y, m as W, n as X, s as Z, o as x, b as ee } from "./index-DCPifDyd.js";
3
3
  import { useQueries as te, useQuery as se } from "@tanstack/react-query";
4
- import { useRef as oe, useEffect as S, useMemo as g } from "react";
5
- import { useTranslation as U } from "react-i18next";
6
- const A = (t, i, c, l, u, r) => {
7
- const s = V(t, i, u), o = s.value, a = k(o);
4
+ import { useRef as oe, useEffect as N, useMemo as g } from "react";
5
+ import { useTranslation as D } from "react-i18next";
6
+ const B = (t, i, c, d, u, r) => {
7
+ const s = V(t, i, u), o = s.value, a = Q(o);
8
8
  let n = o;
9
- a === "Image" && (n = /* @__PURE__ */ d(
9
+ a === "Image" && (n = /* @__PURE__ */ l(
10
10
  q,
11
11
  {
12
12
  imageSrc: o,
@@ -14,19 +14,19 @@ const A = (t, i, c, l, u, r) => {
14
14
  id: `${o}-img`,
15
15
  hideThumbnail: r
16
16
  }
17
- )), a === "Video" && (n = /* @__PURE__ */ d(
17
+ )), a === "Video" && (n = /* @__PURE__ */ l(
18
18
  G,
19
19
  {
20
20
  id: `${o}-video`,
21
21
  videoSrc: o,
22
22
  hideThumbnail: r
23
23
  }
24
- )), a === "PDF" && (n = /* @__PURE__ */ d(P, { id: `${o}-pdf`, src: o }));
24
+ )), a === "PDF" && (n = /* @__PURE__ */ l(P, { id: `${o}-pdf`, src: o }));
25
25
  const b = u("OBSERVATIONS_RECORDED_BY", {
26
26
  provider: s.provider
27
- }), p = t.display, m = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y = l ? `${l}-${m}-${p}-${c}-${i}` : `${m}-${p}-${c}-${i}`;
28
- return /* @__PURE__ */ d(
29
- Q,
27
+ }), p = t.display, m = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y = d ? `${d}-${m}-${p}-${c}-${i}` : `${m}-${p}-${c}-${i}`;
28
+ return /* @__PURE__ */ l(
29
+ k,
30
30
  {
31
31
  header: s.header,
32
32
  value: n,
@@ -37,14 +37,14 @@ const A = (t, i, c, l, u, r) => {
37
37
  },
38
38
  `obs-${t.id}`
39
39
  );
40
- }, re = (t, i, c, l, u, r, s) => /* @__PURE__ */ d(
41
- D,
40
+ }, re = (t, i, c, d, u, r, s) => /* @__PURE__ */ l(
41
+ C,
42
42
  {
43
43
  title: t.display,
44
- id: `grouped-obs-${t.display}-${l}`,
44
+ id: `grouped-obs-${t.display}-${d}`,
45
45
  open: c,
46
46
  children: t.members?.map(
47
- (o, a) => A(
47
+ (o, a) => B(
48
48
  o,
49
49
  a,
50
50
  u,
@@ -60,29 +60,29 @@ const A = (t, i, c, l, u, r) => {
60
60
  title: i = "",
61
61
  hideThumbnail: c
62
62
  }) => {
63
- const { t: l } = U(), u = (r, s, o) => {
64
- const a = K(r.encounterDetails, l);
65
- return /* @__PURE__ */ C(
66
- D,
63
+ const { t: d } = D(), u = (r, s, o) => {
64
+ const a = K(r.encounterDetails, d);
65
+ return /* @__PURE__ */ U(
66
+ C,
67
67
  {
68
68
  title: a,
69
69
  id: `encounter-${r.encounterId}`,
70
70
  open: s,
71
71
  children: [
72
72
  r.observations.map(
73
- (n, b) => A(
73
+ (n, b) => B(
74
74
  n,
75
75
  b,
76
76
  o,
77
77
  i,
78
- l,
78
+ d,
79
79
  c
80
80
  )
81
81
  ),
82
82
  r.groupedObservations.map(
83
83
  (n, b) => re(
84
84
  n,
85
- l,
85
+ d,
86
86
  s,
87
87
  b,
88
88
  o,
@@ -95,7 +95,7 @@ const A = (t, i, c, l, u, r) => {
95
95
  `encounter-${r.encounterId}`
96
96
  );
97
97
  };
98
- return /* @__PURE__ */ d(
98
+ return /* @__PURE__ */ l(
99
99
  "div",
100
100
  {
101
101
  id: "obs-by-encounter",
@@ -106,22 +106,22 @@ const A = (t, i, c, l, u, r) => {
106
106
  )
107
107
  }
108
108
  );
109
- }, ne = "Observations-module_observations__RKSyo", ie = "Observations-module_title__TJL3z", N = {
109
+ }, ne = "Observations-module_observations__RKSyo", ie = "Observations-module_title__TJL3z", S = {
110
110
  observations: ne,
111
111
  title: ie
112
- }, ce = (t) => ["conceptUuid", t], le = (t, i) => ["observations", t, ...i], ve = ({ config: t }) => {
112
+ }, ce = (t) => ["conceptUuid", t], de = (t, i) => ["observations", t, ...i], ve = ({ config: t }) => {
113
113
  const i = t, {
114
114
  conceptNames: c = [],
115
- conceptUuid: l = [],
115
+ conceptUuid: d = [],
116
116
  hideThumbnail: u = !1
117
- } = i, r = oe(/* @__PURE__ */ new Set()), s = j(), { addNotification: o } = H(), { t: a } = U(), n = te({
117
+ } = i, r = oe(/* @__PURE__ */ new Set()), s = j(), { addNotification: o } = H(), { t: a } = D(), n = te({
118
118
  queries: c.map((e) => ({
119
119
  queryKey: ce(e),
120
120
  queryFn: () => z(e),
121
121
  enabled: !!e
122
122
  }))
123
123
  });
124
- S(() => {
124
+ N(() => {
125
125
  n.forEach((e, v) => {
126
126
  if (e.isError && !r.current.has(v)) {
127
127
  const R = c[v];
@@ -133,13 +133,13 @@ const A = (t, i, c, l, u, r) => {
133
133
  } else e.isError || r.current.delete(v);
134
134
  });
135
135
  }, [n, c]);
136
- const b = g(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = g(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), f = g(() => c.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, c.length]), {
136
+ const b = g(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = g(() => [.../* @__PURE__ */ new Set([...b, ...d])], [b, d]), f = g(() => c.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, c.length]), {
137
137
  data: m,
138
138
  isLoading: y,
139
139
  isError: h,
140
140
  refetch: T
141
141
  } = se({
142
- queryKey: le(s, p),
142
+ queryKey: de(s, p),
143
143
  queryFn: () => J(s, p),
144
144
  enabled: !!s && p.length > 0 && f
145
145
  });
@@ -150,7 +150,7 @@ const A = (t, i, c, l, u, r) => {
150
150
  ) && T();
151
151
  },
152
152
  [s, T]
153
- ), S(() => {
153
+ ), N(() => {
154
154
  h && o({
155
155
  title: a("ERROR_DEFAULT_TITLE"),
156
156
  message: a("ERROR_FETCHING_OBSERVATIONS"),
@@ -161,40 +161,40 @@ const A = (t, i, c, l, u, r) => {
161
161
  if (!m) return [];
162
162
  const e = W(m), v = X(e);
163
163
  return Z(v);
164
- }, [m]), B = [
164
+ }, [m]), w = [
165
165
  { key: "name", header: "name" },
166
166
  { key: "value", header: "value" },
167
167
  { key: "form", header: "form" }
168
- ], I = y || !f, $ = h && f, w = (!m || m.entry?.length === 0 || p.length === 0) && f, F = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, L = w ? a("NO_OBSERVATIONS_FOUND") : void 0, M = _.length > 0 && !I && !$, O = i.titleTranslationKey, E = O ? a(O) : "";
169
- return /* @__PURE__ */ C(
168
+ ], I = y || !f, $ = h && f, A = (!m || m.entry?.length === 0 || p.length === 0) && f, F = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? a("NO_OBSERVATIONS_FOUND") : void 0, M = _.length > 0 && !I && !$, O = i.titleTranslationKey, E = O ? a(O) : "";
169
+ return /* @__PURE__ */ U(
170
170
  "div",
171
171
  {
172
172
  id: "observations",
173
173
  "data-testid": O ? `observations-${E}` : "observations",
174
174
  "aria-label": "observations-aria-label",
175
- className: N.observations,
175
+ className: S.observations,
176
176
  children: [
177
- /* @__PURE__ */ d(
177
+ /* @__PURE__ */ l(
178
178
  x,
179
179
  {
180
180
  id: "observations-title",
181
181
  testId: O ? `observations-title-${E}` : "observations-title",
182
182
  title: E,
183
- className: N.title,
184
- children: /* @__PURE__ */ d("p", { children: E })
183
+ className: S.title,
184
+ children: /* @__PURE__ */ l("p", { children: E })
185
185
  }
186
186
  ),
187
- M ? /* @__PURE__ */ d(
187
+ M ? /* @__PURE__ */ l(
188
188
  ae,
189
189
  {
190
190
  groupedData: _,
191
191
  title: E,
192
192
  hideThumbnail: u
193
193
  }
194
- ) : /* @__PURE__ */ d(
194
+ ) : /* @__PURE__ */ l(
195
195
  ee,
196
196
  {
197
- headers: B,
197
+ headers: w,
198
198
  rows: [],
199
199
  ariaLabel: a("OBSERVATIONS"),
200
200
  loading: I,
@@ -210,5 +210,5 @@ const A = (t, i, c, l, u, r) => {
210
210
  export {
211
211
  ce as conceptUuidQueryKeys,
212
212
  ve as default,
213
- le as observationsQueryKeys
213
+ de as observationsQueryKeys
214
214
  };
@@ -0,0 +1,17 @@
1
+ export interface PrintOption {
2
+ translationKey: string;
3
+ templateId: string;
4
+ shortcutKey?: string;
5
+ privileges?: string[];
6
+ }
7
+ interface DocumentPrintButtonProps {
8
+ printOptions?: PrintOption[];
9
+ renderContext: Record<string, string>;
10
+ renderData?: Record<string, unknown>;
11
+ size?: 'sm' | 'md' | 'lg';
12
+ disabled?: boolean;
13
+ 'data-testid'?: string;
14
+ }
15
+ export declare const DocumentPrintButton: ({ printOptions, renderContext, renderData, size, disabled, "data-testid": dataTestId, }: DocumentPrintButtonProps) => import("react/jsx-runtime").JSX.Element | null;
16
+ export {};
17
+ //# sourceMappingURL=DocumentPrintButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentPrintButton.d.ts","sourceRoot":"","sources":["../../src/documentPrintButton/DocumentPrintButton.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,UAAU,wBAAwB;IAChC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,GAAI,yFAOjC,wBAAwB,mDA6D1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { DocumentPrintButton } from './DocumentPrintButton';
2
+ export type { PrintOption } from './DocumentPrintButton';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/documentPrintButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,12 @@
1
+ interface UsePrintDocumentOptions {
2
+ context: Record<string, string>;
3
+ data?: Record<string, unknown>;
4
+ }
5
+ interface UsePrintDocumentResult {
6
+ isPrinting: boolean;
7
+ triggerPrint: (templateId: string) => void;
8
+ }
9
+ export declare const renderTemplateQueryKey: (templateId: string, context: Record<string, string>, locale: string, data?: Record<string, unknown>) => readonly ["renderTemplate", string, "html", Record<string, string>, string, Record<string, unknown> | undefined];
10
+ export declare function usePrintDocument({ context, data, }: UsePrintDocumentOptions): UsePrintDocumentResult;
11
+ export {};
12
+ //# sourceMappingURL=usePrintDocument.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePrintDocument.d.ts","sourceRoot":"","sources":["../../src/documentPrintButton/usePrintDocument.ts"],"names":[],"mappings":"AAUA,UAAU,uBAAuB;IAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,UAAU,sBAAsB;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,sBAAsB,GACjC,YAAY,MAAM,EAClB,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,QAAQ,MAAM,EACd,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,qHAC2C,CAAC;AAE5E,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,IAAI,GACL,EAAE,uBAAuB,GAAG,sBAAsB,CAsHlD"}