@addsign/moje-agenda-shared-lib 2.0.34 → 2.0.35
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/components/Attachments.d.ts +6 -0
- package/dist/components/Attachments.js +48 -0
- package/dist/components/Attachments.js.map +1 -0
- package/dist/components/datatable/DataTableServer.js +29 -3
- package/dist/components/datatable/DataTableServer.js.map +1 -1
- package/dist/components/datatable/types.d.ts +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.js.map +1 -1
- package/lib/components/Attachments.tsx +28 -0
- package/lib/components/datatable/DataTableServer.tsx +40 -4
- package/lib/components/datatable/types.ts +1 -1
- package/lib/types.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "../tailwind-l0sNRNKZ.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "../index.esm-ifS8v9eQ.js";
|
|
5
|
+
import "../jspdf.plugin.autotable-7hp3hM-a.js";
|
|
6
|
+
import "../contexts/FederationContext.js";
|
|
7
|
+
import { getFullNameList } from "../utils/getFullName.js";
|
|
8
|
+
import "../Dialog-BmQoVu5C.js";
|
|
9
|
+
import "./ui/ScrollArea.js";
|
|
10
|
+
import "./ui/input.js";
|
|
11
|
+
import "./ui/form.js";
|
|
12
|
+
import "./ui/radioGroup.js";
|
|
13
|
+
import "./ui/command.js";
|
|
14
|
+
import "./ui/Combobox.js";
|
|
15
|
+
import "./ui/select.js";
|
|
16
|
+
import "./ui/tooltip.js";
|
|
17
|
+
import "./ui/separator.js";
|
|
18
|
+
import "./ui/textarea.js";
|
|
19
|
+
import "./ui/checkbox.js";
|
|
20
|
+
import "./ui/button.js";
|
|
21
|
+
import "../Calendar-DWT4e7Th.js";
|
|
22
|
+
import "./ui/DateTimePicker.js";
|
|
23
|
+
import "./ui/DatePicker.js";
|
|
24
|
+
function Attachments({ attachmentList }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("div", { children: attachmentList.map((attachment) => /* @__PURE__ */ jsxs("div", { children: [
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
"a",
|
|
28
|
+
{
|
|
29
|
+
href: `/api/files/download/${attachment == null ? void 0 : attachment.id}`,
|
|
30
|
+
className: "flex flex-grow text-left underline text-primary",
|
|
31
|
+
target: "_blank",
|
|
32
|
+
rel: "noopener noreferrer",
|
|
33
|
+
children: attachment == null ? void 0 : attachment.filename
|
|
34
|
+
},
|
|
35
|
+
attachment == null ? void 0 : attachment.id
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs text-gray-500", children: [
|
|
38
|
+
"Vložil/a: ",
|
|
39
|
+
getFullNameList(attachment == null ? void 0 : attachment.createdByEmp, true, false),
|
|
40
|
+
", ",
|
|
41
|
+
new Date(attachment.created).toLocaleString()
|
|
42
|
+
] })
|
|
43
|
+
] })) });
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
Attachments
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=Attachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Attachments.js","sources":["../../lib/components/Attachments.tsx"],"sourcesContent":["import { getFullNameList, IAttachment } from \"../main\"\r\n\r\nexport interface IAttachmentsProps {\r\n attachmentList: IAttachment[]\r\n}\r\n\r\nexport function Attachments({ attachmentList }: IAttachmentsProps) {\r\n return (\r\n <div>\r\n {attachmentList.map((attachment: IAttachment) => (\r\n <div>\r\n <a\r\n key={attachment?.id}\r\n href={`/api/files/download/${attachment?.id}`}\r\n className=\"flex flex-grow text-left underline text-primary\"\r\n target=\"_blank\"\r\n rel=\"noopener noreferrer\"\r\n >\r\n {attachment?.filename}\r\n </a>\r\n <div className=\"text-xs text-gray-500\">\r\n Vložil/a: {getFullNameList(attachment?.createdByEmp, true, false)}, {new Date(attachment.created).toLocaleString()}\r\n </div>\r\n </div>\r\n ))}\r\n </div>\r\n )\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAMgB,SAAA,YAAY,EAAE,kBAAqC;AACjE,6BACG,OACE,EAAA,UAAA,eAAe,IAAI,CAAC,oCAClB,OACC,EAAA,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,MAAM,uBAAuB,yCAAY,EAAE;AAAA,QAC3C,WAAU;AAAA,QACV,QAAO;AAAA,QACP,KAAI;AAAA,QAEH,UAAY,yCAAA;AAAA,MAAA;AAAA,MANR,yCAAY;AAAA,IAOnB;AAAA,IACA,qBAAC,OAAI,EAAA,WAAU,yBAAwB,UAAA;AAAA,MAAA;AAAA,MAC1B,gBAAgB,yCAAY,cAAc,MAAM,KAAK;AAAA,MAAE;AAAA,MAAG,IAAI,KAAK,WAAW,OAAO,EAAE,eAAe;AAAA,IAAA,GACnH;AAAA,EAAA,EACF,CAAA,CACD,EACH,CAAA;AAEJ;"}
|
|
@@ -22038,16 +22038,42 @@ function DataTableServer({
|
|
|
22038
22038
|
dataPageable.content.map((item) => {
|
|
22039
22039
|
const row = {};
|
|
22040
22040
|
columns.forEach((column) => {
|
|
22041
|
-
var _a2
|
|
22041
|
+
var _a2;
|
|
22042
|
+
let value;
|
|
22042
22043
|
if (column.renderXls) {
|
|
22043
|
-
|
|
22044
|
+
value = column.renderXls(item);
|
|
22044
22045
|
} else if (column.render) {
|
|
22045
|
-
|
|
22046
|
+
value = (_a2 = column.render(item)) == null ? void 0 : _a2.toString();
|
|
22047
|
+
}
|
|
22048
|
+
if (typeof value === "number" || typeof value === "string" && !isNaN(Number(value))) {
|
|
22049
|
+
row[column.header] = Number(value);
|
|
22050
|
+
} else {
|
|
22051
|
+
row[column.header] = value == null ? void 0 : value.toString();
|
|
22046
22052
|
}
|
|
22047
22053
|
});
|
|
22048
22054
|
return row;
|
|
22049
22055
|
})
|
|
22050
22056
|
);
|
|
22057
|
+
const range = utils.decode_range(worksheet["!ref"] || "A1");
|
|
22058
|
+
for (let C = range.s.c; C <= range.e.c; ++C) {
|
|
22059
|
+
const col = utils.encode_col(C);
|
|
22060
|
+
let hasNumbers = false;
|
|
22061
|
+
for (let R = range.s.r; R <= range.e.r; ++R) {
|
|
22062
|
+
const cell = worksheet[col + (R + 1)];
|
|
22063
|
+
if (cell && typeof cell.v === "number") {
|
|
22064
|
+
hasNumbers = true;
|
|
22065
|
+
break;
|
|
22066
|
+
}
|
|
22067
|
+
}
|
|
22068
|
+
if (hasNumbers) {
|
|
22069
|
+
for (let R = range.s.r; R <= range.e.r; ++R) {
|
|
22070
|
+
const cell = worksheet[col + (R + 1)];
|
|
22071
|
+
if (cell && typeof cell.v === "number") {
|
|
22072
|
+
cell.z = "#,##0";
|
|
22073
|
+
}
|
|
22074
|
+
}
|
|
22075
|
+
}
|
|
22076
|
+
}
|
|
22051
22077
|
const workbook = utils.book_new();
|
|
22052
22078
|
utils.book_append_sheet(workbook, worksheet, "Sheet1");
|
|
22053
22079
|
writeFileSync(workbook, "export.xlsx");
|