@alfadocs/ui-kit 1.125.3 → 1.127.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/dist/_chunks/{balance-badge-cell-DtxbGJcA.js → balance-badge-cell-BtFge7Y6.js} +3 -3
- package/dist/_chunks/{bill-line-table-HrynB7ND.js → bill-line-table-BRxX0Awq.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-CiCmsBCH.js → calendar-appointment-editor-dialog-B-zYgCgH.js} +2 -2
- package/dist/_chunks/{data-grid-C71BhGDw.js → data-grid-bzvkQ3kc.js} +446 -423
- package/dist/_chunks/{data-table-DhYx-hCD.js → data-table-BCfkcPti.js} +2 -2
- package/dist/_chunks/{default-tabs-RvCI5uN0.js → default-tabs-yEfqAPuT.js} +3 -3
- package/dist/_chunks/{file-manager-DNq-sEsy.js → file-manager-Dpwv0qs-.js} +2 -2
- package/dist/_chunks/{heatmap-BurtKmeu.js → heatmap-Ds5DJBUL.js} +2 -2
- package/dist/_chunks/{invoice-upload-list-C95s5Q7m.js → invoice-upload-list-CgS_TBuX.js} +12 -12
- package/dist/_chunks/{link-cell-renderer-BEaLczk2.js → link-cell-renderer-CC9VHU68.js} +2 -2
- package/dist/_chunks/{muscle-scheme-C9dnSxzw.js → muscle-scheme-TgnoZGDA.js} +725 -590
- package/dist/_chunks/{parts-CcyRkB8t.js → parts-tGzYz0uG.js} +42 -36
- package/dist/_chunks/{toolbar-Dznu_Dou.js → toolbar-Co46MEn9.js} +3 -3
- package/dist/_chunks/warehouse-load-summary-DkAKXcw0.js +289 -0
- package/dist/agent-catalog.json +7 -7
- package/dist/browser-support.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/data-grid/data-grid.variants.d.ts +3 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/muscle-scheme/muscle-scheme-data.d.ts +3 -2
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/warehouse-load-summary/index.js +1 -1
- package/dist/components/warehouse-load-summary/types.d.ts +6 -0
- package/dist/components/warehouse-load-summary/warehouse-load-summary.d.ts +1 -1
- package/dist/core.css +1 -1
- package/dist/host-legacy.css +9 -0
- package/dist/i18n/locales/ar.d.ts +32 -0
- package/dist/i18n/locales/ar.js +19 -2
- package/dist/i18n/locales/de.d.ts +32 -0
- package/dist/i18n/locales/de.js +16 -2
- package/dist/i18n/locales/el.d.ts +32 -0
- package/dist/i18n/locales/el.js +18 -1
- package/dist/i18n/locales/en.d.ts +32 -0
- package/dist/i18n/locales/en.js +19 -2
- package/dist/i18n/locales/es.d.ts +32 -0
- package/dist/i18n/locales/es.js +18 -1
- package/dist/i18n/locales/fr.d.ts +32 -0
- package/dist/i18n/locales/fr.js +16 -2
- package/dist/i18n/locales/hi.d.ts +32 -0
- package/dist/i18n/locales/hi.js +19 -2
- package/dist/i18n/locales/it.d.ts +32 -0
- package/dist/i18n/locales/it.js +18 -1
- package/dist/i18n/locales/ja.d.ts +32 -0
- package/dist/i18n/locales/ja.js +16 -2
- package/dist/i18n/locales/nl.d.ts +32 -0
- package/dist/i18n/locales/nl.js +16 -2
- package/dist/i18n/locales/pl.d.ts +32 -0
- package/dist/i18n/locales/pl.js +19 -2
- package/dist/i18n/locales/pt.d.ts +32 -0
- package/dist/i18n/locales/pt.js +18 -1
- package/dist/i18n/locales/ro.d.ts +32 -0
- package/dist/i18n/locales/ro.js +21 -1
- package/dist/i18n/locales/ru.d.ts +32 -0
- package/dist/i18n/locales/ru.js +21 -1
- package/dist/i18n/locales/sq.d.ts +32 -0
- package/dist/i18n/locales/sq.js +18 -1
- package/dist/i18n/locales/sv.d.ts +32 -0
- package/dist/i18n/locales/sv.js +16 -2
- package/dist/i18n/locales/tr.d.ts +32 -0
- package/dist/i18n/locales/tr.js +16 -2
- package/dist/i18n/locales/zh.d.ts +32 -0
- package/dist/i18n/locales/zh.js +16 -2
- package/dist/index.js +13 -13
- package/dist/locales/ar.json +33 -1
- package/dist/locales/de.json +33 -1
- package/dist/locales/el.json +33 -1
- package/dist/locales/en.json +33 -1
- package/dist/locales/es.json +33 -1
- package/dist/locales/fr.json +33 -1
- package/dist/locales/hi.json +33 -1
- package/dist/locales/it.json +33 -1
- package/dist/locales/ja.json +33 -1
- package/dist/locales/nl.json +33 -1
- package/dist/locales/pl.json +33 -1
- package/dist/locales/pt.json +33 -1
- package/dist/locales/ro.json +33 -1
- package/dist/locales/ru.json +33 -1
- package/dist/locales/sq.json +33 -1
- package/dist/locales/sv.json +33 -1
- package/dist/locales/tr.json +33 -1
- package/dist/locales/zh.json +33 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/warehouse-load-summary-D88M4Ii7.js +0 -255
package/package.json
CHANGED
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useId as A, useRef as _, useEffect as F, useMemo as y } from "react";
|
|
3
|
-
import { useTranslation as W } from "react-i18next";
|
|
4
|
-
import { u as C } from "./registry-DvAUVLHh.js";
|
|
5
|
-
import { A as f } from "./alert-C4WKViaS.js";
|
|
6
|
-
import { S as R } from "./stat-WGLdn5Vn.js";
|
|
7
|
-
import { a as j } from "./stat-group-CC4-O-Fj.js";
|
|
8
|
-
import { W as U, w as k } from "./counts-BXtzNv_G.js";
|
|
9
|
-
const H = /* @__PURE__ */ new Set([
|
|
10
|
-
"itemsUpdated",
|
|
11
|
-
"filesWithErrors"
|
|
12
|
-
]), D = /* @__PURE__ */ new Set([
|
|
13
|
-
"invoicesLoaded",
|
|
14
|
-
"filesWithErrors"
|
|
15
|
-
]);
|
|
16
|
-
function p(a) {
|
|
17
|
-
return typeof a == "number" && Number.isFinite(a) && a >= 0;
|
|
18
|
-
}
|
|
19
|
-
function O(a, t) {
|
|
20
|
-
const n = [];
|
|
21
|
-
for (const s of U) {
|
|
22
|
-
if (t === "invoice" && D.has(s)) continue;
|
|
23
|
-
const i = a[s];
|
|
24
|
-
if (!p(i)) continue;
|
|
25
|
-
const r = Math.trunc(i);
|
|
26
|
-
r === 0 && H.has(s) || n.push({ key: s, count: r });
|
|
27
|
-
}
|
|
28
|
-
return n;
|
|
29
|
-
}
|
|
30
|
-
function V(a, t, n) {
|
|
31
|
-
if (a) return a;
|
|
32
|
-
const i = (t.filesWithErrors ?? 0) > 0 || n.length > 0, r = p(t.invoicesLoaded) && t.invoicesLoaded >= 1 || p(t.linesLoaded) && t.linesLoaded >= 1;
|
|
33
|
-
return i ? r ? "partial" : "error" : r ? "success" : "unchanged";
|
|
34
|
-
}
|
|
35
|
-
const $ = {
|
|
36
|
-
id: "warehouse-load-summary",
|
|
37
|
-
capabilities: [],
|
|
38
|
-
state: {
|
|
39
|
-
counts: {
|
|
40
|
-
type: "Record<string, number>",
|
|
41
|
-
description: "The counts shown, by key (invoicesLoaded, itemsCreated, itemsUpdated, linesLoaded, linesAlreadyLoaded, linesSkipped, filesWithErrors). Hidden counts are absent.",
|
|
42
|
-
read: (a) => a.getCounts()
|
|
43
|
-
},
|
|
44
|
-
failedFileIds: {
|
|
45
|
-
type: "string[]",
|
|
46
|
-
description: "Ids of the failed files listed. File names and error texts are not read.",
|
|
47
|
-
read: (a) => a.getFailedFileIds()
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
actions: {},
|
|
51
|
-
domHooks: {
|
|
52
|
-
root: {
|
|
53
|
-
attr: "data-component",
|
|
54
|
-
value: "warehouse-load-summary",
|
|
55
|
-
description: "Marks the summary root."
|
|
56
|
-
},
|
|
57
|
-
instanceId: {
|
|
58
|
-
attr: "data-component-id",
|
|
59
|
-
sourceProp: "id",
|
|
60
|
-
description: "Sourced from the id prop."
|
|
61
|
-
},
|
|
62
|
-
item: {
|
|
63
|
-
attr: "data-file-id",
|
|
64
|
-
description: "Each failed file row emits its id as data-file-id."
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}, B = {
|
|
68
|
-
success: "success",
|
|
69
|
-
partial: "warning",
|
|
70
|
-
error: "error",
|
|
71
|
-
unchanged: "info"
|
|
72
|
-
}, M = [], S = {
|
|
73
|
-
filesWithErrors: "destructive"
|
|
74
|
-
};
|
|
75
|
-
function te({
|
|
76
|
-
counts: a,
|
|
77
|
-
scope: t = "batch",
|
|
78
|
-
outcome: n,
|
|
79
|
-
failedFiles: s = M,
|
|
80
|
-
headingLevel: i = 2,
|
|
81
|
-
focusOnMount: r = !0,
|
|
82
|
-
actions: h,
|
|
83
|
-
id: g,
|
|
84
|
-
className: E
|
|
85
|
-
}) {
|
|
86
|
-
const { t: d, i18n: I } = W("ui"), m = I.language, v = A(), L = _(null);
|
|
87
|
-
F(() => {
|
|
88
|
-
var e;
|
|
89
|
-
r && ((e = L.current) == null || e.focus({ preventScroll: !0 }));
|
|
90
|
-
}, [r]);
|
|
91
|
-
const l = y(() => O(a, t), [a, t]), c = V(n, a, s), x = y(
|
|
92
|
-
() => ({
|
|
93
|
-
getCounts: () => Object.fromEntries(l.map((e) => [e.key, e.count])),
|
|
94
|
-
getFailedFileIds: () => s.map((e) => e.id)
|
|
95
|
-
}),
|
|
96
|
-
[l, s]
|
|
97
|
-
);
|
|
98
|
-
C($, x, g);
|
|
99
|
-
const N = d(`warehouseLoadSummary.title.${t}.${c}`, {
|
|
100
|
-
defaultValue: Y[t][c]
|
|
101
|
-
}), T = l.filter((e) => e.count > 0).map((e) => k(d, m, e.key, e.count)), w = G(T, m);
|
|
102
|
-
return /* @__PURE__ */ u(
|
|
103
|
-
"div",
|
|
104
|
-
{
|
|
105
|
-
"data-component": "warehouse-load-summary",
|
|
106
|
-
"data-component-id": g,
|
|
107
|
-
"data-outcome": c,
|
|
108
|
-
className: ["ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", E].filter(Boolean).join(" "),
|
|
109
|
-
children: [
|
|
110
|
-
/* @__PURE__ */ u(
|
|
111
|
-
f,
|
|
112
|
-
{
|
|
113
|
-
variant: B[c],
|
|
114
|
-
announce: r ? "off" : "polite",
|
|
115
|
-
children: [
|
|
116
|
-
/* @__PURE__ */ o(
|
|
117
|
-
f.Title,
|
|
118
|
-
{
|
|
119
|
-
ref: L,
|
|
120
|
-
tabIndex: -1,
|
|
121
|
-
className: "ds:outline-none",
|
|
122
|
-
as: `h${i}`,
|
|
123
|
-
children: N
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
w ? /* @__PURE__ */ o(f.Description, { children: w }) : null
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
),
|
|
130
|
-
l.length > 0 ? /* @__PURE__ */ o(
|
|
131
|
-
j,
|
|
132
|
-
{
|
|
133
|
-
"aria-label": d("warehouseLoadSummary.counts", {
|
|
134
|
-
defaultValue: "Load counts"
|
|
135
|
-
}),
|
|
136
|
-
maxColumns: 4,
|
|
137
|
-
children: l.map(({ key: e, count: b }) => /* @__PURE__ */ o(
|
|
138
|
-
R,
|
|
139
|
-
{
|
|
140
|
-
variant: "outlined",
|
|
141
|
-
size: "sm",
|
|
142
|
-
label: d(`warehouseLoadSummary.stat.${e}`, {
|
|
143
|
-
defaultValue: z[e]
|
|
144
|
-
}),
|
|
145
|
-
value: b,
|
|
146
|
-
locale: m,
|
|
147
|
-
intent: b > 0 && e in S ? S[e] : "foreground"
|
|
148
|
-
},
|
|
149
|
-
e
|
|
150
|
-
))
|
|
151
|
-
}
|
|
152
|
-
) : null,
|
|
153
|
-
s.length > 0 ? /* @__PURE__ */ u(
|
|
154
|
-
"div",
|
|
155
|
-
{
|
|
156
|
-
role: "group",
|
|
157
|
-
"aria-labelledby": v,
|
|
158
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
159
|
-
children: [
|
|
160
|
-
/* @__PURE__ */ o(
|
|
161
|
-
K,
|
|
162
|
-
{
|
|
163
|
-
as: `h${Math.min(i + 1, 6)}`,
|
|
164
|
-
id: v,
|
|
165
|
-
children: d("warehouseLoadSummary.failedFiles", {
|
|
166
|
-
defaultValue: "Files that could not be loaded"
|
|
167
|
-
})
|
|
168
|
-
}
|
|
169
|
-
),
|
|
170
|
-
/* @__PURE__ */ o(
|
|
171
|
-
"ul",
|
|
172
|
-
{
|
|
173
|
-
role: "list",
|
|
174
|
-
className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-xs)] ds:p-0",
|
|
175
|
-
children: s.map((e) => /* @__PURE__ */ u(
|
|
176
|
-
"li",
|
|
177
|
-
{
|
|
178
|
-
"data-file-id": e.id,
|
|
179
|
-
className: "ds:flex ds:flex-col ds:break-words ds:border-s-[length:var(--border-width-md)] ds:border-s-[color:var(--destructive)] ds:ps-[var(--spacing-sm)]",
|
|
180
|
-
children: [
|
|
181
|
-
/* @__PURE__ */ o(
|
|
182
|
-
"span",
|
|
183
|
-
{
|
|
184
|
-
dir: "auto",
|
|
185
|
-
className: "type-label ds:text-[var(--foreground)]",
|
|
186
|
-
children: e.fileName
|
|
187
|
-
}
|
|
188
|
-
),
|
|
189
|
-
/* @__PURE__ */ o(
|
|
190
|
-
"span",
|
|
191
|
-
{
|
|
192
|
-
dir: "auto",
|
|
193
|
-
className: "type-meta ds:text-[var(--muted-foreground)]",
|
|
194
|
-
children: e.error
|
|
195
|
-
}
|
|
196
|
-
)
|
|
197
|
-
]
|
|
198
|
-
},
|
|
199
|
-
e.id
|
|
200
|
-
))
|
|
201
|
-
}
|
|
202
|
-
)
|
|
203
|
-
]
|
|
204
|
-
}
|
|
205
|
-
) : null,
|
|
206
|
-
h ? /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-wrap ds:justify-end ds:gap-[var(--spacing-sm)]", children: h }) : null
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
const Y = {
|
|
212
|
-
invoice: {
|
|
213
|
-
success: "Invoice loaded",
|
|
214
|
-
partial: "Invoice loaded with warnings",
|
|
215
|
-
error: "The invoice could not be loaded",
|
|
216
|
-
unchanged: "Nothing new to load"
|
|
217
|
-
},
|
|
218
|
-
batch: {
|
|
219
|
-
success: "Invoices loaded",
|
|
220
|
-
partial: "Invoices loaded, some files failed",
|
|
221
|
-
error: "No invoices were loaded",
|
|
222
|
-
unchanged: "Nothing new to load"
|
|
223
|
-
}
|
|
224
|
-
}, z = {
|
|
225
|
-
invoicesLoaded: "Invoices loaded",
|
|
226
|
-
itemsCreated: "Items created",
|
|
227
|
-
itemsUpdated: "Items updated",
|
|
228
|
-
linesLoaded: "Lines loaded",
|
|
229
|
-
linesAlreadyLoaded: "Lines already loaded",
|
|
230
|
-
linesSkipped: "Lines skipped",
|
|
231
|
-
filesWithErrors: "Files with errors"
|
|
232
|
-
};
|
|
233
|
-
function G(a, t) {
|
|
234
|
-
if (a.length === 0) return "";
|
|
235
|
-
try {
|
|
236
|
-
return new Intl.ListFormat(t, {
|
|
237
|
-
style: "long",
|
|
238
|
-
type: "conjunction"
|
|
239
|
-
}).format(a);
|
|
240
|
-
} catch {
|
|
241
|
-
return a.join(", ");
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
function K({
|
|
245
|
-
as: a,
|
|
246
|
-
id: t,
|
|
247
|
-
children: n
|
|
248
|
-
}) {
|
|
249
|
-
return /* @__PURE__ */ o(a, { id: t, className: "type-label ds:m-0 ds:text-[var(--foreground)]", children: n });
|
|
250
|
-
}
|
|
251
|
-
export {
|
|
252
|
-
te as W,
|
|
253
|
-
$ as w
|
|
254
|
-
};
|
|
255
|
-
//# sourceMappingURL=warehouse-load-summary-D88M4Ii7.js.map
|