@nxgt/material 3.5.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +92 -0
- package/README.md +46 -1
- package/dist/components/components.css +2 -0
- package/dist/components/theme-tokens.css +84 -72
- package/dist/components/tones/tokens.css +5 -5
- package/dist/components/ui/display/chip/chip-hairline.css +1 -1
- package/dist/components/ui/layout/sidebar/sidebar-tokens.css +1 -1
- package/dist/components/ui/overlays/dialog/dialog.css +2 -2
- package/dist/components/ui/primitives/field-box/field-box-tokens.css +1 -1
- package/dist/components/ui/primitives/toggle-group/toggle-group-segmented.css +2 -2
- package/dist/components/ui/primitives/toggle-group/toggle-group-separate.css +1 -1
- package/dist/components/ui/widgets/drawing/drawing-animate.css +123 -0
- package/dist/components/ui/widgets/drawing/drawing.css +459 -0
- package/dist/{components-CXpL1zEs.js → components-BX4icy-g.js} +734 -734
- package/dist/components.js +16 -16
- package/dist/{dialog-JQT6iETD.js → dialog-DdJ1C4BR.js} +168 -168
- package/dist/dnd.js +1 -1
- package/dist/draw-animate.js +106 -0
- package/dist/draw-png.js +2 -0
- package/dist/draw-sketch.js +38 -0
- package/dist/draw.js +65 -0
- package/dist/drawing-B8VuG7nx.js +390 -0
- package/dist/drawing-context-CeKeZE6b.js +10 -0
- package/dist/editor.js +110 -110
- package/dist/{icon-badge-C30yKsAM.js → icon-badge-Bb5-73XP.js} +18 -18
- package/dist/{icon-button-BXlI3DJ_.js → icon-button-5A6Mrj6w.js} +60 -90
- package/dist/lib/components/ui/display/shape/use-shape-morph.d.ts +1 -0
- package/dist/lib/components/ui/widgets/drawing/drawing-a11y.d.ts +20 -0
- package/dist/lib/components/ui/widgets/drawing/drawing-context.d.ts +23 -0
- package/dist/lib/components/ui/widgets/drawing/drawing-types.d.ts +63 -0
- package/dist/lib/components/ui/widgets/drawing/drawing.d.ts +17 -0
- package/dist/lib/components/ui/widgets/drawing/index.d.ts +5 -0
- package/dist/lib/components/ui/widgets/drawing/partials/drawing-root.d.ts +17 -0
- package/dist/lib/components/ui/widgets/drawing/partials/interactive-node.d.ts +22 -0
- package/dist/lib/components/ui/widgets/drawing/partials/primitives/content.d.ts +20 -0
- package/dist/lib/components/ui/widgets/drawing/partials/primitives/path.d.ts +29 -0
- package/dist/lib/components/ui/widgets/drawing/partials/primitives/primitive.d.ts +19 -0
- package/dist/lib/components/ui/widgets/drawing/partials/primitives/shapes.d.ts +18 -0
- package/dist/lib/components/ui/widgets/drawing/partials/react-attrs.d.ts +5 -0
- package/dist/lib/components/ui/widgets/drawing/partials/ring.d.ts +9 -0
- package/dist/lib/components/ui/widgets/drawing/partials/svg-tree.d.ts +29 -0
- package/dist/lib/components/ui/widgets/drawing/use-exact-text.d.ts +16 -0
- package/dist/lib/draw/index.d.ts +32 -0
- package/dist/lib/draw-animate/index.d.ts +19 -0
- package/dist/lib/draw-animate/morph-drawing.d.ts +32 -0
- package/dist/lib/draw-animate/reduced-motion.d.ts +2 -0
- package/dist/lib/draw-animate/use-drawing-controls.d.ts +27 -0
- package/dist/lib/draw-animate/use-scene-morph.d.ts +15 -0
- package/dist/lib/draw-png/index.d.ts +11 -0
- package/dist/lib/draw-sketch/index.d.ts +17 -0
- package/dist/lib/draw-sketch/sketch.d.ts +19 -0
- package/dist/lib/print/components/print-drawing.d.ts +16 -0
- package/dist/lib/print/index.d.ts +2 -1
- package/dist/main.js +21 -21
- package/dist/map.js +63 -63
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +123 -115
- package/dist/{public-Cde8_SN8.js → public-CBlV2XuA.js} +742 -742
- package/dist/{sortable-provider-DYlpq8lP.js → sortable-provider-BvD98s8Y.js} +19 -19
- package/dist/{use-chat-composer-BwpSgP_D.js → use-chat-composer-BhdPNmYm.js} +912 -911
- package/dist/use-shape-morph-BKA_R5P5.js +35 -0
- package/docs/README.md +1 -0
- package/docs/components/data-display.md +2 -2
- package/docs/components/rich-widgets.md +196 -0
- package/docs/guides/drawing.md +499 -0
- package/docs/guides/printing.md +47 -0
- package/docs/guides/theming.md +86 -43
- package/docs/previews/rich-widgets-drawing.webp +0 -0
- package/docs/roadmap.md +17 -0
- package/docs/troubleshooting.md +166 -2
- package/lib/components/components.css +2 -0
- package/lib/components/theme-tokens.css +84 -72
- package/lib/components/tones/tokens.css +5 -5
- package/lib/components/ui/display/chip/chip-hairline.css +1 -1
- package/lib/components/ui/layout/sidebar/sidebar-tokens.css +1 -1
- package/lib/components/ui/overlays/dialog/dialog.css +2 -2
- package/lib/components/ui/primitives/field-box/field-box-tokens.css +1 -1
- package/lib/components/ui/primitives/toggle-group/toggle-group-segmented.css +2 -2
- package/lib/components/ui/primitives/toggle-group/toggle-group-separate.css +1 -1
- package/lib/components/ui/widgets/drawing/drawing-animate.css +123 -0
- package/lib/components/ui/widgets/drawing/drawing.css +459 -0
- package/package.json +22 -2
package/dist/pdf-reader.js
CHANGED
package/dist/print.js
CHANGED
|
@@ -5,16 +5,16 @@ import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
|
5
5
|
import { resolvePdfFileName as f } from "@nxgt/material-core/pdf-file-name";
|
|
6
6
|
import { OBJECT_URL_TTL_MS as p, downloadPdfFile as m } from "@nxgt/material-core/pdf-download";
|
|
7
7
|
import { createFormatters as h, formatAmount as g, formatDate as _ } from "@nxgt/material-core/print-format";
|
|
8
|
-
import { badge as v, dataTable as y, defaultPdfTheme as b, definePdfDocument as x, divider as S,
|
|
9
|
-
import { definePrintColumns as
|
|
10
|
-
import { formatPrintValue as
|
|
11
|
-
import { Text as
|
|
12
|
-
import { createTw as
|
|
13
|
-
import { DEFAULT_PDF_LANGUAGE as
|
|
14
|
-
import { contentDisposition as
|
|
15
|
-
import { IDLE_PDF_FILE as
|
|
8
|
+
import { badge as v, dataTable as y, defaultPdfTheme as b, definePdfDocument as x, divider as S, drawing as C, header as w, heading as T, image as ee, keyValue as te, keyValueOf as ne, link as re, metric as ie, page as ae, pageBreak as oe, pageNumber as se, pdfDocument as ce, resolvePdfColor as le, resolvePdfTheme as ue, row as de, section as fe, spacer as pe, stack as me, table as he, text as ge, totals as E } from "@nxgt/material-core/pdf/model";
|
|
9
|
+
import { definePrintColumns as D, resolvePrintFields as O, resolvePrintFields as k, resolvePrintTable as A, resolvePrintTable as j, toPrintValue as M, toPrintValue as N } from "@nxgt/material-core/print-table";
|
|
10
|
+
import { formatPrintValue as P, isEmptyPrintValue as F } from "@nxgt/material-core/print-value";
|
|
11
|
+
import { Text as I, View as L, pdf as _e, renderToBuffer as ve, renderToStream as ye } from "@react-pdf/renderer";
|
|
12
|
+
import { createTw as be } from "react-pdf-tailwind";
|
|
13
|
+
import { DEFAULT_PDF_LANGUAGE as xe, createPdfContext as R, renderDrawing as Se, renderHeader as Ce, renderKeyValue as we, renderMetric as Te, renderPdfDocumentShell as Ee, renderPdfElement as De, renderPdfPage as Oe, renderTable as ke, toPdfText as z } from "@nxgt/material-core/pdf/render";
|
|
14
|
+
import { contentDisposition as Ae, pdfBytesResponse as je, toWebStream as Me } from "@nxgt/material-core/pdf/http";
|
|
15
|
+
import { IDLE_PDF_FILE as B, createPdfFileLoader as Ne } from "@nxgt/material-core/pdf/file-loader";
|
|
16
16
|
//#region lib/print/styles.ts
|
|
17
|
-
var
|
|
17
|
+
var V = {
|
|
18
18
|
page: "font-sans text-[9pt] text-slate-900 px-8 py-7 flex-col gap-0",
|
|
19
19
|
header: "flex-row items-center mb-4",
|
|
20
20
|
headerTitle: "text-[18pt] font-bold text-slate-900 tracking-tight",
|
|
@@ -44,7 +44,7 @@ var H = {
|
|
|
44
44
|
notesText: "text-[8pt] text-secondary leading-normal",
|
|
45
45
|
badge: "rounded-xl px-4 py-1.5 self-start",
|
|
46
46
|
badgeText: "text-[8pt] font-bold text-white"
|
|
47
|
-
},
|
|
47
|
+
}, H = be({
|
|
48
48
|
colors: {
|
|
49
49
|
primary: "#485096",
|
|
50
50
|
secondary: "#347cb5",
|
|
@@ -66,57 +66,57 @@ var H = {
|
|
|
66
66
|
});
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region lib/print/components/pdf-text.ts
|
|
69
|
-
function
|
|
69
|
+
function U(e) {
|
|
70
70
|
return typeof e == "string" ? z(e) : Array.isArray(e) ? n.map(e, (e) => typeof e == "string" ? z(e) : e) : e;
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region lib/print/components/print-badge.tsx
|
|
74
|
-
function
|
|
75
|
-
return /* @__PURE__ */ u(
|
|
76
|
-
style: [
|
|
77
|
-
children: /* @__PURE__ */ u(
|
|
78
|
-
style:
|
|
79
|
-
children:
|
|
74
|
+
function Pe({ color: e, className: t, children: n }) {
|
|
75
|
+
return /* @__PURE__ */ u(L, {
|
|
76
|
+
style: [H(`${V.badge} ${t ?? ""}`), e ? { backgroundColor: e } : {}],
|
|
77
|
+
children: /* @__PURE__ */ u(I, {
|
|
78
|
+
style: H(V.badgeText),
|
|
79
|
+
children: U(n)
|
|
80
80
|
})
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region lib/print/components/print-card.tsx
|
|
85
|
-
function
|
|
86
|
-
return /* @__PURE__ */ u(
|
|
87
|
-
style:
|
|
85
|
+
function Fe({ children: e, className: t }) {
|
|
86
|
+
return /* @__PURE__ */ u(L, {
|
|
87
|
+
style: H(`border border-border rounded-xs p-2.5 flex-row gap-[24pt] ${t || ""}`),
|
|
88
88
|
children: e
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return t ? /* @__PURE__ */ d(
|
|
93
|
-
style:
|
|
94
|
-
children: [/* @__PURE__ */ u(
|
|
95
|
-
style:
|
|
96
|
-
children:
|
|
97
|
-
}), /* @__PURE__ */ u(
|
|
98
|
-
style:
|
|
99
|
-
children:
|
|
91
|
+
function Ie({ label: e, value: t }) {
|
|
92
|
+
return t ? /* @__PURE__ */ d(L, {
|
|
93
|
+
style: H("flex-col gap-0.5"),
|
|
94
|
+
children: [/* @__PURE__ */ u(I, {
|
|
95
|
+
style: H("text-[7pt] text-muted font-bold uppercase"),
|
|
96
|
+
children: U(e)
|
|
97
|
+
}), /* @__PURE__ */ u(I, {
|
|
98
|
+
style: H("text-[9pt] text-primary"),
|
|
99
|
+
children: U(t)
|
|
100
100
|
})]
|
|
101
101
|
}) : null;
|
|
102
102
|
}
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region lib/print/components/print-document/print-render-context.ts
|
|
105
|
-
var
|
|
106
|
-
function
|
|
107
|
-
return
|
|
105
|
+
var W = r(null), G;
|
|
106
|
+
function K() {
|
|
107
|
+
return G ??= R(), G;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
return o(
|
|
109
|
+
function q() {
|
|
110
|
+
return o(W) ?? K();
|
|
111
111
|
}
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region lib/print/components/print-data-table/print-data-table.tsx
|
|
114
|
-
function
|
|
115
|
-
let a =
|
|
114
|
+
function Le({ columns: e, rows: t, currency: n, totalLabel: r, ...i }) {
|
|
115
|
+
let a = q(), o = j(e, t, {
|
|
116
116
|
currency: n,
|
|
117
117
|
totalLabel: r ?? a.t("material.print.table.total", "Total")
|
|
118
118
|
});
|
|
119
|
-
return
|
|
119
|
+
return ke({
|
|
120
120
|
type: "table",
|
|
121
121
|
columns: o.columns,
|
|
122
122
|
rows: o.rows,
|
|
@@ -126,23 +126,23 @@ function Pe({ columns: e, rows: t, currency: n, totalLabel: r, ...i }) {
|
|
|
126
126
|
}
|
|
127
127
|
//#endregion
|
|
128
128
|
//#region lib/print/components/print-data-table/print-key-value.tsx
|
|
129
|
-
function
|
|
130
|
-
let t =
|
|
131
|
-
return
|
|
129
|
+
function Re(e) {
|
|
130
|
+
let t = q();
|
|
131
|
+
return we({
|
|
132
132
|
type: "keyValue",
|
|
133
|
-
items: "items" in e ? e.items :
|
|
133
|
+
items: "items" in e ? e.items : k(e.fields, e.data, { currency: e.currency }),
|
|
134
134
|
columns: e.columns,
|
|
135
135
|
keepEmpty: e.keepEmpty
|
|
136
136
|
}, t);
|
|
137
137
|
}
|
|
138
138
|
//#endregion
|
|
139
139
|
//#region lib/print/components/print-data-table/print-metric.tsx
|
|
140
|
-
function
|
|
141
|
-
let o =
|
|
142
|
-
return
|
|
140
|
+
function ze({ label: e, value: t, format: n, currency: r, hint: i, delta: a }) {
|
|
141
|
+
let o = q();
|
|
142
|
+
return Te({
|
|
143
143
|
type: "metric",
|
|
144
144
|
label: e,
|
|
145
|
-
value: n && (typeof t == "number" || n === "date" && typeof t == "string") ?
|
|
145
|
+
value: n && (typeof t == "number" || n === "date" && typeof t == "string") ? N({
|
|
146
146
|
id: "value",
|
|
147
147
|
accessor: () => t,
|
|
148
148
|
label: e,
|
|
@@ -153,8 +153,8 @@ function Ie({ label: e, value: t, format: n, currency: r, hint: i, delta: a }) {
|
|
|
153
153
|
delta: a
|
|
154
154
|
}, o);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
return /* @__PURE__ */ u(
|
|
156
|
+
function Be({ children: e }) {
|
|
157
|
+
return /* @__PURE__ */ u(L, {
|
|
158
158
|
style: {
|
|
159
159
|
flexDirection: "row",
|
|
160
160
|
gap: 12,
|
|
@@ -165,8 +165,8 @@ function Le({ children: e }) {
|
|
|
165
165
|
}
|
|
166
166
|
//#endregion
|
|
167
167
|
//#region lib/print/components/print-document/print-document.tsx
|
|
168
|
-
function
|
|
169
|
-
let v = e(), y = r || v?.language ||
|
|
168
|
+
function Ve({ language: r, locale: i, timeZone: a, header: o, footer: s, children: l, title: d, author: f, subject: p, keywords: m, creator: h, producer: g, ..._ }) {
|
|
169
|
+
let v = e(), y = r || v?.language || xe, b = c(() => R({
|
|
170
170
|
language: y,
|
|
171
171
|
locale: i,
|
|
172
172
|
timeZone: a,
|
|
@@ -175,16 +175,16 @@ function Re({ language: r, locale: i, timeZone: a, header: o, footer: s, childre
|
|
|
175
175
|
y,
|
|
176
176
|
i,
|
|
177
177
|
a
|
|
178
|
-
]), x = (e, t) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ u(
|
|
178
|
+
]), x = (e, t) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ u(I, {
|
|
179
179
|
style: t,
|
|
180
180
|
children: z(String(e))
|
|
181
|
-
}) : e, S = typeof s == "function" ? /* @__PURE__ */ u(
|
|
181
|
+
}) : e, S = typeof s == "function" ? /* @__PURE__ */ u(I, {
|
|
182
182
|
style: b.styles.textCaption,
|
|
183
183
|
render: (e) => z(s(e))
|
|
184
184
|
}) : x(s, b.styles.textCaption), C = x(o, b.styles.textBody);
|
|
185
|
-
return /* @__PURE__ */ u(
|
|
185
|
+
return /* @__PURE__ */ u(W.Provider, {
|
|
186
186
|
value: b,
|
|
187
|
-
children:
|
|
187
|
+
children: Ee({
|
|
188
188
|
title: d,
|
|
189
189
|
author: f,
|
|
190
190
|
subject: p,
|
|
@@ -192,7 +192,7 @@ function Re({ language: r, locale: i, timeZone: a, header: o, footer: s, childre
|
|
|
192
192
|
creator: h ?? "@nxgt/material",
|
|
193
193
|
producer: g,
|
|
194
194
|
language: y
|
|
195
|
-
}, [
|
|
195
|
+
}, [Oe(_, {
|
|
196
196
|
header: C,
|
|
197
197
|
footer: S,
|
|
198
198
|
body: n.toArray(l)
|
|
@@ -200,86 +200,94 @@ function Re({ language: r, locale: i, timeZone: a, header: o, footer: s, childre
|
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
202
|
//#endregion
|
|
203
|
+
//#region lib/print/components/print-drawing.tsx
|
|
204
|
+
function He(e) {
|
|
205
|
+
return Se({
|
|
206
|
+
type: "drawing",
|
|
207
|
+
...e
|
|
208
|
+
}, q());
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
203
211
|
//#region lib/print/components/print-header.tsx
|
|
204
|
-
function
|
|
205
|
-
return
|
|
212
|
+
function Ue(e) {
|
|
213
|
+
return Ce({
|
|
206
214
|
type: "header",
|
|
207
215
|
...e
|
|
208
|
-
},
|
|
216
|
+
}, K());
|
|
209
217
|
}
|
|
210
218
|
//#endregion
|
|
211
219
|
//#region lib/print/components/print-section.tsx
|
|
212
|
-
function
|
|
213
|
-
return /* @__PURE__ */ d(
|
|
214
|
-
style:
|
|
215
|
-
children: [/* @__PURE__ */ u(
|
|
216
|
-
style:
|
|
217
|
-
children:
|
|
220
|
+
function We({ title: e, children: t, className: n }) {
|
|
221
|
+
return /* @__PURE__ */ d(L, {
|
|
222
|
+
style: H(n || "mb-3.5"),
|
|
223
|
+
children: [/* @__PURE__ */ u(I, {
|
|
224
|
+
style: H(V.sectionTitle),
|
|
225
|
+
children: U(e)
|
|
218
226
|
}), t]
|
|
219
227
|
});
|
|
220
228
|
}
|
|
221
|
-
function
|
|
222
|
-
return /* @__PURE__ */ d(
|
|
223
|
-
style:
|
|
224
|
-
children: [/* @__PURE__ */ u(
|
|
225
|
-
style:
|
|
226
|
-
children:
|
|
227
|
-
}), typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ u(
|
|
228
|
-
style:
|
|
229
|
-
children:
|
|
229
|
+
function Ge({ label: e, value: t }) {
|
|
230
|
+
return /* @__PURE__ */ d(L, {
|
|
231
|
+
style: H(V.infoRow),
|
|
232
|
+
children: [/* @__PURE__ */ u(I, {
|
|
233
|
+
style: H(V.infoLabel),
|
|
234
|
+
children: U(e)
|
|
235
|
+
}), typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ u(I, {
|
|
236
|
+
style: H(V.infoValue),
|
|
237
|
+
children: U(t)
|
|
230
238
|
}) : t]
|
|
231
239
|
});
|
|
232
240
|
}
|
|
233
241
|
//#endregion
|
|
234
242
|
//#region lib/print/components/print-table.tsx
|
|
235
|
-
function
|
|
236
|
-
return /* @__PURE__ */ u(
|
|
237
|
-
style:
|
|
243
|
+
function Ke({ children: e }) {
|
|
244
|
+
return /* @__PURE__ */ u(L, {
|
|
245
|
+
style: H(V.tableSection),
|
|
238
246
|
children: e
|
|
239
247
|
});
|
|
240
248
|
}
|
|
241
|
-
function
|
|
242
|
-
return /* @__PURE__ */ u(
|
|
243
|
-
style:
|
|
249
|
+
function J({ children: e }) {
|
|
250
|
+
return /* @__PURE__ */ u(L, {
|
|
251
|
+
style: H(V.tableHeader),
|
|
244
252
|
children: e
|
|
245
253
|
});
|
|
246
254
|
}
|
|
247
|
-
function
|
|
248
|
-
return /* @__PURE__ */ u(
|
|
249
|
-
style: [
|
|
255
|
+
function qe({ isAlt: e, children: t }) {
|
|
256
|
+
return /* @__PURE__ */ u(L, {
|
|
257
|
+
style: [H(V.tableRow), e ? H(V.tableRowAlt) : {}],
|
|
250
258
|
children: t
|
|
251
259
|
});
|
|
252
260
|
}
|
|
253
|
-
function
|
|
254
|
-
return /* @__PURE__ */ u(
|
|
255
|
-
style: [
|
|
261
|
+
function Je({ isHeader: e, flex: t = 1, textAlign: n = "left", children: r }) {
|
|
262
|
+
return /* @__PURE__ */ u(I, {
|
|
263
|
+
style: [H(e ? V.tableHeaderCell : V.tableCell), {
|
|
256
264
|
flex: t,
|
|
257
265
|
textAlign: n
|
|
258
266
|
}],
|
|
259
|
-
children:
|
|
267
|
+
children: U(r) ?? "—"
|
|
260
268
|
});
|
|
261
269
|
}
|
|
262
270
|
//#endregion
|
|
263
271
|
//#region lib/print/components/print-totals.tsx
|
|
264
|
-
function
|
|
265
|
-
return /* @__PURE__ */ u(
|
|
266
|
-
style:
|
|
267
|
-
children: /* @__PURE__ */ u(
|
|
268
|
-
style:
|
|
272
|
+
function Ye({ children: e }) {
|
|
273
|
+
return /* @__PURE__ */ u(L, {
|
|
274
|
+
style: H(V.totalsSection),
|
|
275
|
+
children: /* @__PURE__ */ u(L, {
|
|
276
|
+
style: H(V.totalsTable),
|
|
269
277
|
children: e
|
|
270
278
|
})
|
|
271
279
|
});
|
|
272
280
|
}
|
|
273
|
-
function
|
|
274
|
-
let r = n ?
|
|
275
|
-
return /* @__PURE__ */ d(
|
|
276
|
-
style:
|
|
277
|
-
children: [/* @__PURE__ */ u(
|
|
278
|
-
style:
|
|
279
|
-
children:
|
|
280
|
-
}), /* @__PURE__ */ u(
|
|
281
|
-
style:
|
|
282
|
-
children:
|
|
281
|
+
function Xe({ label: e, value: t, last: n }) {
|
|
282
|
+
let r = n ? V.totalsRowLast : V.totalsRow, i = n ? V.totalsLabelBold : V.totalsLabel, a = n ? V.totalsValueBold : V.totalsValue;
|
|
283
|
+
return /* @__PURE__ */ d(L, {
|
|
284
|
+
style: H(r),
|
|
285
|
+
children: [/* @__PURE__ */ u(I, {
|
|
286
|
+
style: H(i),
|
|
287
|
+
children: U(e)
|
|
288
|
+
}), /* @__PURE__ */ u(I, {
|
|
289
|
+
style: H(a),
|
|
290
|
+
children: U(t)
|
|
283
291
|
})]
|
|
284
292
|
});
|
|
285
293
|
}
|
|
@@ -288,7 +296,7 @@ function qe({ label: e, value: t, last: n }) {
|
|
|
288
296
|
function Y(e, n = {}) {
|
|
289
297
|
if (i(e)) return e;
|
|
290
298
|
let r = e, a = r.language;
|
|
291
|
-
return
|
|
299
|
+
return De(r, {
|
|
292
300
|
custom: n.custom,
|
|
293
301
|
defaultCreator: "@nxgt/material",
|
|
294
302
|
translate: (e, n, r) => t(a, e, n, r)
|
|
@@ -296,20 +304,20 @@ function Y(e, n = {}) {
|
|
|
296
304
|
}
|
|
297
305
|
//#endregion
|
|
298
306
|
//#region lib/print/output/render-pdf.ts
|
|
299
|
-
var
|
|
307
|
+
var Ze = () => typeof process < "u" && !!process.versions?.node;
|
|
300
308
|
async function X(e, t) {
|
|
301
|
-
return
|
|
309
|
+
return _e(Y(e, t)).toBlob();
|
|
302
310
|
}
|
|
303
311
|
async function Z(e, t) {
|
|
304
|
-
if (!
|
|
312
|
+
if (!Ze()) {
|
|
305
313
|
let n = await X(e, t);
|
|
306
314
|
return new Uint8Array(await n.arrayBuffer());
|
|
307
315
|
}
|
|
308
|
-
let n = await
|
|
316
|
+
let n = await ve(Y(e, t));
|
|
309
317
|
return new Uint8Array(n);
|
|
310
318
|
}
|
|
311
|
-
async function
|
|
312
|
-
return
|
|
319
|
+
async function Qe(e, t) {
|
|
320
|
+
return Me(await ye(Y(e, t)));
|
|
313
321
|
}
|
|
314
322
|
//#endregion
|
|
315
323
|
//#region lib/print/output/download-pdf.ts
|
|
@@ -317,7 +325,7 @@ var Q = (e, t) => e instanceof Blob ? e : X(e, t);
|
|
|
317
325
|
async function $(e, t = {}) {
|
|
318
326
|
await m(await Q(e, t), { fileName: t.fileName });
|
|
319
327
|
}
|
|
320
|
-
async function
|
|
328
|
+
async function $e(e, t = {}) {
|
|
321
329
|
let n = window.open("", "_blank"), r;
|
|
322
330
|
try {
|
|
323
331
|
r = await Q(e, t);
|
|
@@ -334,16 +342,16 @@ async function Xe(e, t = {}) {
|
|
|
334
342
|
}
|
|
335
343
|
//#endregion
|
|
336
344
|
//#region lib/print/output/pdf-response.ts
|
|
337
|
-
async function
|
|
338
|
-
return
|
|
345
|
+
async function et(e, t = {}) {
|
|
346
|
+
return je(await Z(e, t), t);
|
|
339
347
|
}
|
|
340
348
|
//#endregion
|
|
341
349
|
//#region lib/print/output/use-pdf-file.ts
|
|
342
|
-
function
|
|
343
|
-
let [n, r] = l(() => e === null ?
|
|
344
|
-
...
|
|
350
|
+
function tt(e, t) {
|
|
351
|
+
let [n, r] = l(() => e === null ? B : {
|
|
352
|
+
...B,
|
|
345
353
|
loading: !0
|
|
346
|
-
}), [i, o] = l(0), c = a(() => o((e) => e + 1), []), u = t?.custom, [d] = l(() =>
|
|
354
|
+
}), [i, o] = l(0), c = a(() => o((e) => e + 1), []), u = t?.custom, [d] = l(() => Ne(r, X));
|
|
347
355
|
return s(() => () => d.dispose(), [d]), s(() => {
|
|
348
356
|
d.load(e, { custom: u });
|
|
349
357
|
}, [
|
|
@@ -357,4 +365,4 @@ function Qe(e, t) {
|
|
|
357
365
|
};
|
|
358
366
|
}
|
|
359
367
|
//#endregion
|
|
360
|
-
export {
|
|
368
|
+
export { Pe as PrintBadge, Fe as PrintCard, Ie as PrintCardField, Le as PrintDataTable, Ve as PrintDocument, He as PrintDrawing, Ue as PrintHeader, Ge as PrintInfoRow, Re as PrintKeyValue, ze as PrintMetric, Be as PrintMetrics, We as PrintSection, Ke as PrintTable, Je as PrintTableCell, J as PrintTableHeader, qe as PrintTableRow, Xe as PrintTotalRow, Ye as PrintTotals, v as badge, V as commonPrintStyles, Ae as contentDisposition, h as createFormatters, y as dataTable, b as defaultPdfTheme, x as definePdfDocument, D as definePrintColumns, S as divider, $ as downloadPdf, C as drawing, g as formatAmount, _ as formatDate, P as formatPrintValue, w as header, T as heading, ee as image, F as isEmptyPrintValue, te as keyValue, ne as keyValueOf, re as link, ie as metric, $e as openPdf, ae as page, oe as pageBreak, se as pageNumber, ce as pdfDocument, et as pdfResponse, X as renderPdfBlob, Z as renderPdfBuffer, Qe as renderPdfStream, le as resolvePdfColor, ue as resolvePdfTheme, O as resolvePrintFields, A as resolvePrintTable, de as row, fe as section, pe as spacer, me as stack, he as table, ge as text, M as toPrintValue, E as totals, H as tw, tt as usePdfFile };
|