@addsign/moje-agenda-shared-lib 2.0.66 → 2.0.67

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.
Files changed (56) hide show
  1. package/dist/Calendar-DWT4e7Th.js.map +1 -1
  2. package/dist/Combination-DmhTQmbL.js +996 -0
  3. package/dist/Combination-DmhTQmbL.js.map +1 -0
  4. package/dist/Dialog-3u5-ws89.js +424 -0
  5. package/dist/Dialog-3u5-ws89.js.map +1 -0
  6. package/dist/Dialog-CCrUyF91.js.map +1 -1
  7. package/dist/assets/style.css +0 -3
  8. package/dist/components/datatable/DataTableServer.js +254 -245
  9. package/dist/components/datatable/DataTableServer.js.map +1 -1
  10. package/dist/components/form/FileInputForm.d.ts +14 -0
  11. package/dist/components/form/FileInputForm.js +173 -0
  12. package/dist/components/form/FileInputForm.js.map +1 -0
  13. package/dist/components/form/FileInputFormMultiple.d.ts +16 -0
  14. package/dist/components/form/FileInputFormMultiple.js +240 -0
  15. package/dist/components/form/FileInputFormMultiple.js.map +1 -0
  16. package/dist/components/form/FileInputFull.d.ts +17 -0
  17. package/dist/components/form/FileInputFull.js +188 -0
  18. package/dist/components/form/FileInputFull.js.map +1 -0
  19. package/dist/components/form/FileInputFullMultiple.d.ts +19 -0
  20. package/dist/components/form/FileInputFullMultiple.js +226 -0
  21. package/dist/components/form/FileInputFullMultiple.js.map +1 -0
  22. package/dist/components/ui/Combobox.js.map +1 -1
  23. package/dist/components/ui/checkbox.js.map +1 -1
  24. package/dist/components/ui/command.js.map +1 -1
  25. package/dist/components/ui/radioGroup.js.map +1 -1
  26. package/dist/components/ui/toast.js.map +1 -1
  27. package/dist/handleErrors-B2be_Hgy.js +31615 -0
  28. package/dist/handleErrors-B2be_Hgy.js.map +1 -0
  29. package/dist/handleErrors-P52guX3U.js +32 -0
  30. package/dist/handleErrors-P52guX3U.js.map +1 -0
  31. package/dist/index-BikTN7j8.js +2266 -0
  32. package/dist/index-BikTN7j8.js.map +1 -0
  33. package/dist/main.d.ts +2 -0
  34. package/dist/main.js +34 -30
  35. package/dist/main.js.map +1 -1
  36. package/dist/popover-BLI2Jq-c.js +319 -0
  37. package/dist/popover-BLI2Jq-c.js.map +1 -0
  38. package/dist/popover-CcrzvSk7.js.map +1 -1
  39. package/dist/tslib.es6-e8r3nMQ9.js +172 -0
  40. package/dist/tslib.es6-e8r3nMQ9.js.map +1 -0
  41. package/dist/types.d.ts +1 -0
  42. package/dist/types.js.map +1 -1
  43. package/lib/components/datatable/DataTableServer.tsx +14 -23
  44. package/lib/components/form/FileInputForm.tsx +184 -0
  45. package/lib/components/form/FileInputFormMultiple.tsx +220 -0
  46. package/lib/components/ui/Calendar.tsx +0 -2
  47. package/lib/components/ui/Combobox.tsx +0 -2
  48. package/lib/components/ui/Dialog.tsx +0 -2
  49. package/lib/components/ui/checkbox.tsx +0 -2
  50. package/lib/components/ui/command.tsx +0 -2
  51. package/lib/components/ui/popover.tsx +0 -2
  52. package/lib/components/ui/radioGroup.tsx +0 -2
  53. package/lib/components/ui/toast.tsx +0 -1
  54. package/lib/main.ts +2 -0
  55. package/lib/types.ts +1 -0
  56. package/package.json +1 -2
@@ -0,0 +1,32 @@
1
+ const handleErrors = (error, emitter, customMessage) => {
2
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
3
+ let errmsgToDisplay = " " + (((_c = (_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.error) == null ? void 0 : _c.message) || error.message || "");
4
+ let errorTitle = "";
5
+ if (error.code == "ERR_NETWORK") {
6
+ errorTitle = "Síťová chyba";
7
+ errmsgToDisplay = errmsgToDisplay + " " + (/* @__PURE__ */ new Date()).toLocaleString();
8
+ } else if (error.code == "ERR_BAD_REQUEST") {
9
+ if (((_d = error.response) == null ? void 0 : _d.status) == 403) {
10
+ errorTitle = "Přístup zamítnut";
11
+ } else if (((_e = error.response) == null ? void 0 : _e.status) == 409) {
12
+ errorTitle = "Konflikt";
13
+ } else {
14
+ errorTitle = "Interní chyba aplikace";
15
+ }
16
+ errmsgToDisplay = (/* @__PURE__ */ new Date()).toLocaleString() + " (" + ((_f = error.response) == null ? void 0 : _f.status) + ") \n" + errmsgToDisplay;
17
+ }
18
+ console.error(error);
19
+ const bgColor = ((_g = error.response) == null ? void 0 : _g.status) && ((_h = error.response) == null ? void 0 : _h.status) >= 400 ? " bg-danger " : " bg-warning ";
20
+ const type = ((_i = error.response) == null ? void 0 : _i.status) && ((_j = error.response) == null ? void 0 : _j.status) >= 400 ? "error" : "warning";
21
+ emitter.emit("message", {
22
+ title: errorTitle,
23
+ message: errmsgToDisplay,
24
+ classes: bgColor || " bg-danger ",
25
+ timeout: 0,
26
+ type
27
+ });
28
+ };
29
+ export {
30
+ handleErrors as h
31
+ };
32
+ //# sourceMappingURL=handleErrors-P52guX3U.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleErrors-P52guX3U.js","sources":["utils/handleErrors.js"],"sourcesContent":["const handleErrors = (error, emitter, customMessage) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;\n let errmsgToDisplay = (customMessage || \"\") + \" \" + (((_c = (_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.error) == null ? void 0 : _c.message) || error.message || \"\");\n let errorTitle = \"\";\n if (error.code == \"ERR_NETWORK\") {\n errorTitle = \"Síťová chyba\";\n errmsgToDisplay = errmsgToDisplay + \" \" + (/* @__PURE__ */ new Date()).toLocaleString();\n } else if (error.code == \"ERR_BAD_REQUEST\") {\n if (((_d = error.response) == null ? void 0 : _d.status) == 403) {\n errorTitle = \"Přístup zamítnut\";\n } else if (((_e = error.response) == null ? void 0 : _e.status) == 409) {\n errorTitle = \"Konflikt\";\n } else {\n errorTitle = \"Interní chyba aplikace\";\n }\n errmsgToDisplay = (/* @__PURE__ */ new Date()).toLocaleString() + \" (\" + ((_f = error.response) == null ? void 0 : _f.status) + \") \\n\" + errmsgToDisplay;\n }\n console.error(error);\n const bgColor = ((_g = error.response) == null ? void 0 : _g.status) && ((_h = error.response) == null ? void 0 : _h.status) >= 400 ? \" bg-danger \" : \" bg-warning \";\n const type = ((_i = error.response) == null ? void 0 : _i.status) && ((_j = error.response) == null ? void 0 : _j.status) >= 400 ? \"error\" : \"warning\";\n emitter.emit(\"message\", {\n title: errorTitle,\n message: errmsgToDisplay,\n classes: bgColor || \" bg-danger \",\n timeout: 0,\n type\n });\n};\nexport {\n handleErrors\n};\n//# sourceMappingURL=handleErrors.js.map\n"],"names":[],"mappings":"AAAK,MAAC,eAAe,CAAC,OAAO,SAAS,kBAAkB;AACtD,MAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI;AACxC,MAAI,kBAAoC,SAAe,MAAM,MAAM,KAAK,MAAM,aAAa,OAAO,SAAS,GAAG,SAAS,OAAO,SAAS,GAAG,UAAU,OAAO,SAAS,GAAG,YAAY,MAAM,WAAW;AACpM,MAAI,aAAa;AACjB,MAAI,MAAM,QAAQ,eAAe;AAC/B,iBAAa;AACb,sBAAkB,kBAAkB,OAAuB,oBAAI,KAAI,GAAI;EAC3E,WAAa,MAAM,QAAQ,mBAAmB;AAC1C,UAAM,KAAK,MAAM,aAAa,OAAO,SAAS,GAAG,WAAW,KAAK;AAC/D,mBAAa;AAAA,IACd,aAAY,KAAK,MAAM,aAAa,OAAO,SAAS,GAAG,WAAW,KAAK;AACtE,mBAAa;AAAA,IACnB,OAAW;AACL,mBAAa;AAAA,IACd;AACD,uBAAmC,oBAAI,KAAM,GAAE,eAAc,IAAK,SAAS,KAAK,MAAM,aAAa,OAAO,SAAS,GAAG,UAAU,SAAS;AAAA,EAC1I;AACD,UAAQ,MAAM,KAAK;AACnB,QAAM,YAAY,KAAK,MAAM,aAAa,OAAO,SAAS,GAAG,aAAa,KAAK,MAAM,aAAa,OAAO,SAAS,GAAG,WAAW,MAAM,gBAAgB;AACtJ,QAAM,SAAS,KAAK,MAAM,aAAa,OAAO,SAAS,GAAG,aAAa,KAAK,MAAM,aAAa,OAAO,SAAS,GAAG,WAAW,MAAM,UAAU;AAC7I,UAAQ,KAAK,WAAW;AAAA,IACtB,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS,WAAW;AAAA,IACpB,SAAS;AAAA,IACT;AAAA,EACJ,CAAG;AACH;"}