@addsign/moje-agenda-shared-lib 2.0.11 → 2.0.12
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/Dialog-4hkwYHTJ.js +424 -0
- package/dist/Dialog-4hkwYHTJ.js.map +1 -0
- package/dist/Dialog-CrRXl-G2.js +424 -0
- package/dist/Dialog-CrRXl-G2.js.map +1 -0
- package/dist/Dialog-D9rsAQnn.js +424 -0
- package/dist/Dialog-D9rsAQnn.js.map +1 -0
- package/dist/Dialog-v5zgZE_G.js +424 -0
- package/dist/Dialog-v5zgZE_G.js.map +1 -0
- package/dist/assets/style.css +192 -0
- package/dist/components/datatable/DataTable.js +2 -1
- package/dist/components/datatable/DataTable.js.map +1 -1
- package/dist/components/datatable/DataTableServer.js +2 -1
- package/dist/components/datatable/DataTableServer.js.map +1 -1
- package/dist/components/form/AutocompleteSearchBar.js +2 -1
- package/dist/components/form/AutocompleteSearchBar.js.map +1 -1
- package/dist/components/form/AutocompleteSearchBarServer.js +2 -1
- package/dist/components/form/AutocompleteSearchBarServer.js.map +1 -1
- package/dist/components/form/FileInput.js +3 -2
- package/dist/components/form/FileInput.js.map +1 -1
- package/dist/components/form/FileInputMultiple.js +5 -3
- package/dist/components/form/FileInputMultiple.js.map +1 -1
- package/dist/components/form/FormField.js +2 -1
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/PositionsSelectorSingle.js +2 -1
- package/dist/components/form/PositionsSelectorSingle.js.map +1 -1
- package/dist/components/form/SelectField.js +2 -1
- package/dist/components/form/SelectField.js.map +1 -1
- package/dist/components/layout/CollapsibleSection.d.ts +11 -0
- package/dist/components/layout/CollapsibleSection.js +35 -0
- package/dist/components/layout/CollapsibleSection.js.map +1 -0
- package/dist/components/profiles/ProfileOverview.js +2 -1
- package/dist/components/profiles/ProfileOverview.js.map +1 -1
- package/dist/components/ui/Dialog.js +1 -1
- package/dist/components/ui/ScrollArea.js +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/popover.js +5 -4
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/radioGroup.js +1 -1
- package/dist/components/ui/select.js +7 -5
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/sonner.js +27 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/toast.d.ts +15 -0
- package/dist/components/ui/toast.js +742 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/tooltip.js +4 -4
- package/dist/index-B4D9tlF2.js +37 -0
- package/dist/index-B4D9tlF2.js.map +1 -0
- package/dist/index-BIGXjoju.js +1162 -0
- package/dist/index-BIGXjoju.js.map +1 -0
- package/dist/index-BM2wqH4l.js +270 -0
- package/dist/index-BM2wqH4l.js.map +1 -0
- package/dist/index-BkUJPEGE.js +43 -0
- package/dist/index-BkUJPEGE.js.map +1 -0
- package/dist/index-BqfaqJMm.js +43 -0
- package/dist/index-BqfaqJMm.js.map +1 -0
- package/dist/index-BvG0B6Se.js +43 -0
- package/dist/index-BvG0B6Se.js.map +1 -0
- package/dist/index-ByYhNx4V.js +2204 -0
- package/dist/index-ByYhNx4V.js.map +1 -0
- package/dist/index-C1NhngpB.js +2212 -0
- package/dist/index-C1NhngpB.js.map +1 -0
- package/dist/index-C5uX_8yI.js +36 -0
- package/dist/index-C5uX_8yI.js.map +1 -0
- package/dist/index-CEVipgcd.js +234 -0
- package/dist/index-CEVipgcd.js.map +1 -0
- package/dist/index-CFdw_5ue.js +2204 -0
- package/dist/index-CFdw_5ue.js.map +1 -0
- package/dist/index-CQ3u2ZB9.js +28845 -0
- package/dist/index-CQ3u2ZB9.js.map +1 -0
- package/dist/index-CcUZ0rsE.js +2397 -0
- package/dist/index-CcUZ0rsE.js.map +1 -0
- package/dist/index-CmEWEow1.js +304 -0
- package/dist/index-CmEWEow1.js.map +1 -0
- package/dist/index-CwJgIvMz.js +43 -0
- package/dist/index-CwJgIvMz.js.map +1 -0
- package/dist/index-CxRvlMsQ.js +1162 -0
- package/dist/index-CxRvlMsQ.js.map +1 -0
- package/dist/index-Cxv2lY-3.js +234 -0
- package/dist/index-Cxv2lY-3.js.map +1 -0
- package/dist/index-CzU-7Pp-.js +1162 -0
- package/dist/index-CzU-7Pp-.js.map +1 -0
- package/dist/index-D2vw2lEy.js +2266 -0
- package/dist/index-D2vw2lEy.js.map +1 -0
- package/dist/index-D71KqwUL.js +28839 -0
- package/dist/index-D71KqwUL.js.map +1 -0
- package/dist/index-DVCdWg5e.js +36 -0
- package/dist/index-DVCdWg5e.js.map +1 -0
- package/dist/index-DWPKrsrN.js +234 -0
- package/dist/index-DWPKrsrN.js.map +1 -0
- package/dist/index-DiJxz9_S.js +36 -0
- package/dist/index-DiJxz9_S.js.map +1 -0
- package/dist/index-DjS0QG2f.js +28845 -0
- package/dist/index-DjS0QG2f.js.map +1 -0
- package/dist/index-FMLr5tN7.js +19 -0
- package/dist/index-FMLr5tN7.js.map +1 -0
- package/dist/index-GT3w9A2i.js +19 -0
- package/dist/index-GT3w9A2i.js.map +1 -0
- package/dist/index-Gbap2fMl.js +304 -0
- package/dist/index-Gbap2fMl.js.map +1 -0
- package/dist/index-R1AkuSsS.js +2204 -0
- package/dist/index-R1AkuSsS.js.map +1 -0
- package/dist/index-VCw-BbEd.js +36 -0
- package/dist/index-VCw-BbEd.js.map +1 -0
- package/dist/index-WjZKx4Rq.js +2266 -0
- package/dist/index-WjZKx4Rq.js.map +1 -0
- package/dist/index-XoubH6QK.js +19 -0
- package/dist/index-XoubH6QK.js.map +1 -0
- package/dist/index-cAAySw6z.js +19 -0
- package/dist/index-cAAySw6z.js.map +1 -0
- package/dist/index-eb1oES0O.js +234 -0
- package/dist/index-eb1oES0O.js.map +1 -0
- package/dist/index-efRbPAF9.js +304 -0
- package/dist/index-efRbPAF9.js.map +1 -0
- package/dist/index-g4PMBWfd.js +1162 -0
- package/dist/index-g4PMBWfd.js.map +1 -0
- package/dist/index-kx4d2yA2.js +2204 -0
- package/dist/index-kx4d2yA2.js.map +1 -0
- package/dist/index-tDQ16jIS.js +304 -0
- package/dist/index-tDQ16jIS.js.map +1 -0
- package/dist/index-u7IL3f7h.js +28811 -0
- package/dist/index-u7IL3f7h.js.map +1 -0
- package/dist/index.es-CORXX5Cy.js +9594 -0
- package/dist/index.es-CORXX5Cy.js.map +1 -0
- package/dist/jspdf.plugin.autotable-f-NQ-KEg.js +11475 -0
- package/dist/jspdf.plugin.autotable-f-NQ-KEg.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +21 -15
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/handleErrors.js +2 -1
- package/dist/utils/handleErrors.js.map +1 -1
- package/lib/components/form/FileInputMultiple.tsx +1 -0
- package/lib/components/layout/CollapsibleSection.tsx +48 -0
- package/lib/components/ui/sonner.tsx +31 -0
- package/lib/components/ui/toast.tsx +129 -0
- package/lib/main.ts +5 -0
- package/lib/types.ts +1 -0
- package/lib/utils/handleErrors.ts +2 -1
- package/package.json +4 -1
package/dist/main.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { default as Modal } from './components/Modal.tsx';
|
|
|
17
17
|
export { default as PositionsSelectorSingle } from './components/form/PositionsSelectorSingle.tsx';
|
|
18
18
|
export { default as Calendar } from './components/Calendar.tsx';
|
|
19
19
|
export { default as DataTable } from './components/datatable/DataTable.tsx';
|
|
20
|
+
export { default as CollapsibleSection } from './components/layout/CollapsibleSection.tsx';
|
|
20
21
|
export { default as DataTableServer, resetAllDataTablePaging, } from './components/datatable/DataTableServer.tsx';
|
|
21
22
|
export { default as DateRangeField } from './components/form/DateRangeField.tsx';
|
|
22
23
|
export { default as DateField } from './components/form/DateField.tsx';
|
|
@@ -43,6 +44,7 @@ export * from './components/ui/tooltip.tsx';
|
|
|
43
44
|
export * from './components/ui/separator.tsx';
|
|
44
45
|
export * from './components/ui/textarea.tsx';
|
|
45
46
|
export * from './components/ui/checkbox.tsx';
|
|
47
|
+
export * from './components/ui/sonner.tsx';
|
|
46
48
|
export { Button as ButtonCN, buttonVariants } from './components/ui/button.tsx';
|
|
47
49
|
export { Calendar as CalendarCn } from './components/ui/Calendar.tsx';
|
|
48
50
|
export { default as DateTimePicker } from './components/ui/DateTimePicker.tsx';
|
package/dist/main.js
CHANGED
|
@@ -17,11 +17,12 @@ import { Modal } from "./components/Modal.js";
|
|
|
17
17
|
import { default as default14 } from "./components/form/PositionsSelectorSingle.js";
|
|
18
18
|
import { default as default15 } from "./components/Calendar.js";
|
|
19
19
|
import { default as default16 } from "./components/datatable/DataTable.js";
|
|
20
|
-
import { default as default17
|
|
21
|
-
import { default as default18 } from "./components/
|
|
22
|
-
import { default as default19 } from "./components/form/
|
|
23
|
-
import { default as default20 } from "./components/
|
|
24
|
-
import { default as default21 } from "./
|
|
20
|
+
import { default as default17 } from "./components/layout/CollapsibleSection.js";
|
|
21
|
+
import { default as default18, resetAllDataTablePaging } from "./components/datatable/DataTableServer.js";
|
|
22
|
+
import { default as default19 } from "./components/form/DateRangeField.js";
|
|
23
|
+
import { default as default20 } from "./components/form/DateField.js";
|
|
24
|
+
import { default as default21 } from "./components/SpinnerIcon.js";
|
|
25
|
+
import { default as default22 } from "./utils/PdfManager.js";
|
|
25
26
|
import { FederationContext, FederationContextProvider } from "./contexts/FederationContext.js";
|
|
26
27
|
import { useFederationContext } from "./contexts/useFederationContext.js";
|
|
27
28
|
import { getFullName, getFullNameList, getFullNameListPositionWithEmployee, getFullNamePositionWithEmployee } from "./utils/getFullName.js";
|
|
@@ -30,7 +31,7 @@ import { handleErrors } from "./utils/handleErrors.js";
|
|
|
30
31
|
import { hasRightInModule } from "./utils/hasRightInModule.js";
|
|
31
32
|
import { hasRole } from "./utils/hasRole.js";
|
|
32
33
|
import { EApproverRoles, EApproverTypes, EDecisionsTranslations, EEntity, Eagendy, Eassignments, Estavy } from "./types.js";
|
|
33
|
-
import { D, c, e, i, g, f, b, a, h, d } from "./Dialog-
|
|
34
|
+
import { D, c, e, i, g, f, b, a, h, d } from "./Dialog-D9rsAQnn.js";
|
|
34
35
|
import { ScrollArea, ScrollBar } from "./components/ui/ScrollArea.js";
|
|
35
36
|
import { Input } from "./components/ui/input.js";
|
|
36
37
|
import { Form, FormControl, FormDescription, FormFieldCN, FormItem, FormLabel, FormMessage, useFormField } from "./components/ui/form.js";
|
|
@@ -42,10 +43,12 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./comp
|
|
|
42
43
|
import { Separator } from "./components/ui/separator.js";
|
|
43
44
|
import { Textarea } from "./components/ui/textarea.js";
|
|
44
45
|
import { Checkbox } from "./components/ui/checkbox.js";
|
|
46
|
+
import { Toaster } from "./components/ui/sonner.js";
|
|
45
47
|
import { Button, buttonVariants } from "./components/ui/button.js";
|
|
46
48
|
import { C } from "./Calendar-DWT4e7Th.js";
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
+
import { default as default23 } from "./components/ui/DateTimePicker.js";
|
|
50
|
+
import { default as default24 } from "./components/ui/DatePicker.js";
|
|
51
|
+
import { t } from "./index-CmEWEow1.js";
|
|
49
52
|
export {
|
|
50
53
|
default3 as AutocompleteSearchBar,
|
|
51
54
|
default4 as AutocompleteSearchBarServer,
|
|
@@ -54,6 +57,7 @@ export {
|
|
|
54
57
|
default15 as Calendar,
|
|
55
58
|
C as CalendarCn,
|
|
56
59
|
Checkbox,
|
|
60
|
+
default17 as CollapsibleSection,
|
|
57
61
|
Command,
|
|
58
62
|
CommandDialog,
|
|
59
63
|
CommandEmpty,
|
|
@@ -65,11 +69,11 @@ export {
|
|
|
65
69
|
CommandShortcut,
|
|
66
70
|
ConfirmationModalDialog,
|
|
67
71
|
default16 as DataTable,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
default18 as DataTableServer,
|
|
73
|
+
default20 as DateField,
|
|
74
|
+
default24 as DatePicker,
|
|
75
|
+
default19 as DateRangeField,
|
|
76
|
+
default23 as DateTimePicker,
|
|
73
77
|
D as Dialog,
|
|
74
78
|
c as DialogClose,
|
|
75
79
|
e as DialogContent,
|
|
@@ -104,7 +108,7 @@ export {
|
|
|
104
108
|
Modal,
|
|
105
109
|
ModalDialog,
|
|
106
110
|
default12 as PageTitle,
|
|
107
|
-
|
|
111
|
+
default22 as PdfManager,
|
|
108
112
|
default14 as PositionsSelectorSingle,
|
|
109
113
|
default8 as RadioGroup,
|
|
110
114
|
RadioGroupCN,
|
|
@@ -125,8 +129,9 @@ export {
|
|
|
125
129
|
SelectValue,
|
|
126
130
|
Separator,
|
|
127
131
|
default13 as Spinner,
|
|
128
|
-
|
|
132
|
+
default21 as SpinnerIcon,
|
|
129
133
|
Textarea,
|
|
134
|
+
Toaster,
|
|
130
135
|
Tooltip,
|
|
131
136
|
TooltipContent,
|
|
132
137
|
TooltipProvider,
|
|
@@ -141,6 +146,7 @@ export {
|
|
|
141
146
|
hasRightInModule,
|
|
142
147
|
hasRole,
|
|
143
148
|
resetAllDataTablePaging,
|
|
149
|
+
t as toast,
|
|
144
150
|
useFederationContext,
|
|
145
151
|
useFormField
|
|
146
152
|
};
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/types.d.ts
CHANGED
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../lib/types.ts"],"sourcesContent":["import { AxiosInstance } from \"axios\";\r\nimport { Emitter } from \"mitt\";\r\n\r\n\r\nimport { UseFormReturn } from \"react-hook-form\";\r\n\r\nexport interface IUserInfo {\r\n contractGroup: number;\r\n degreeAfter: string;\r\n degreeBefore: string;\r\n departmentId: string;\r\n departmentName: string;\r\n departmentNameLong: string;\r\n email: string;\r\n employeeId: number;\r\n firstName: string;\r\n lastName: string;\r\n positionName: string;\r\n positionNumber: string;\r\n userId: string;\r\n mobile: string;\r\n phone: string;\r\n contractTitle: string;\r\n managerTitle: string;\r\n manager: string;\r\n functionTitle: string;\r\n officeAddress: string;\r\n\r\n}\r\nexport interface IBuilding {\r\n buildingId: string;\r\n nameFull: string;\r\n\r\n}export interface IBuildingLOV {\r\n buildingId: string;\r\n name: string;\r\n ofsId?: number;\r\n\r\n}\r\nexport interface IEmployee extends IUserInfo {\r\n\r\n deleted: boolean\r\n hasComputer: string\r\n language: string\r\n manager: string\r\n parentFrId: number\r\n positionId: number\r\n validFrom: string\r\n validTo: string\r\n contractType: number\r\n exemption: number\r\n activatedOn: string\r\n building?: IBuilding | null\r\n}\r\n\r\nexport interface IAuthApp {\r\n name: string;\r\n label: string;\r\n roles: string[];\r\n}\r\n\r\nexport type IAuthApps = IAuthApp[];\r\n\r\nexport interface IEventMessage {\r\n title?: string;\r\n message?: string;\r\n timeout?: number;\r\n classes?: string;\r\n}\r\n\r\nexport type Events = {\r\n message?: IEventMessage;\r\n loading?: boolean;\r\n};\r\n\r\nexport interface IContextValue {\r\n userInfo: IUserInfo;\r\n apiClient: AxiosInstance;\r\n authApps: IAuthApps;\r\n emitter: Emitter<Events>;\r\n isAdminApp?: boolean;\r\n}\r\nexport interface IOptionItem {\r\n value: string | number | null;\r\n label: string;\r\n description?: string;\r\n}\r\n\r\nexport type IFormProps = {\r\n formName: string;\r\n entityId: string;\r\n entityName: string;\r\n context: IContextValue;\r\n onSuccess: (path: string, message?: string) => void;\r\n};\r\nexport type IListProps = {\r\n id?: string;\r\n listName: string;\r\n filters: object; //{ [key: string]: any };\r\n context: IContextValue;\r\n title?: string;\r\n};\r\nexport type IPageProps = {\r\n pageName: string;\r\n context: IContextValue;\r\n};\r\n\r\nexport type IStartProcessProps = {\r\n context: IContextValue;\r\n\r\n onNavigate: (path: string) => void;\r\n};\r\n\r\nexport interface IModuleProcess {\r\n\r\n key: string;\r\n name: string;\r\n description: string;\r\n disabled?: boolean;\r\n\r\n}\r\nexport interface IModulePage {\r\n\r\n pageName: string;\r\n name: string;\r\n description: string;\r\n disabled?: boolean;\r\n roles?: string[];\r\n admin?: boolean;\r\n}\r\nexport interface IModuleSettings {\r\n\r\n key: string;\r\n name: string;\r\n description: string;\r\n disabled?: boolean;\r\n roles?: string[];\r\n admin?: boolean;\r\n\r\n}\r\n\r\nexport interface IModuleConstants {\r\n\r\n key: string\r\n name: string\r\n processes: IModuleProcess[],\r\n reports?: IModulePage[],\r\n pages?: IModulePage[],\r\n\r\n}\r\n\r\n\r\nexport interface IPosition {\r\n id: number;\r\n departmentId: string;\r\n positionName: string;\r\n positionNumber: string;\r\n manager: string;\r\n virtual: boolean;\r\n title: string;\r\n}\r\nexport interface IPositionEmployee extends IPosition {\r\n employee: IEmployee;\r\n}\r\nexport interface IEmployeePosition extends IEmployee {\r\n position: IPosition;\r\n}\r\nexport type { ICalendarItem } from \"./components/Calendar\";\r\n\r\n\r\nexport interface ITimeOffCategoryDto {\r\n id?: number;\r\n name?: string;\r\n}\r\nexport interface ITimeOffData {\r\n id: number;\r\n startDate: string;\r\n endDate: string;\r\n days?: number;\r\n year?: number;\r\n comment?: string;\r\n applicant?: IEmployee;\r\n place?: string;\r\n leaveType?: string;\r\n initiator?: string;\r\n dateFromEvidence?: string;\r\n dateToEvidence?: string;\r\n status?: number;\r\n statusText?: string;\r\n timeOffCategoryDto: ITimeOffCategoryDto;\r\n applicantContractGroup?: number;\r\n name?: string;\r\n daysOfEvidence?: number;\r\n daysInStartMonth?: number;\r\n daysInEndMonth?: number;\r\n lastChange?: string;\r\n created?: string;\r\n updated?: string;\r\n attachment?: IAttachment;\r\n steps?: IStep[];\r\n}\r\n\r\nexport interface IDepartment {\r\n departmentId: string;\r\n nameLong: string;\r\n parentDepartmentId: string;\r\n parentLocationId: number;\r\n nameShort: string;\r\n}\r\n\r\nexport interface IPageable<T> {\r\n content: T[];\r\n empty: boolean;\r\n first: boolean;\r\n last: boolean;\r\n number: number;\r\n numberOfElements: number;\r\n size: number;\r\n totalElements: number;\r\n totalPages: number;\r\n}\r\n\r\n\r\nexport interface IFormFieldGlobalProps {\r\n label?: string;\r\n description?: string;\r\n name: string;\r\n type?: string;\r\n value?: any;\r\n\r\n methods?: UseFormReturn<any>;\r\n\r\n errors?: any;\r\n register?: any;\r\n disabled?: boolean;\r\n required?: boolean;\r\n clearable?: boolean;\r\n placeholder?: string;\r\n children?: React.ReactNode;\r\n className?: string;\r\n rounded?: boolean;\r\n onInputChange: (\r\n e: React.ChangeEvent<\r\n HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | any\r\n >\r\n ) => void;\r\n\r\n onFocus?: () => void;\r\n onBlur?: () => void;\r\n inline?: boolean,\r\n ref?: any;\r\n}\r\n\r\n\r\nexport interface SysConfigHolidayEntityResponse {\r\n \"id\": number,\r\n \"date\": string,\r\n \"day\": number,\r\n \"month\": number,\r\n \"year\": number,\r\n \"dayOfWeek\": number\r\n}\r\n\r\n\r\nexport interface IProfileApprover {\r\n id: number;\r\n role: number;\r\n roleTxt: string;\r\n approverOrder: number;\r\n approver: IEmployee;\r\n position: IPositionEmployee;\r\n isEmployee: boolean;\r\n ignore: boolean;\r\n makePreapprover: boolean;\r\n}\r\n\r\n\r\nexport enum EApproverRoles {\r\n predschvalovatel = 10,\r\n zastupce = 20,\r\n zastupce9 = 30,\r\n vedouci = 40,\r\n vyssiSchvalovatel = 60,\r\n vyssiSchvalovatelZastupce = 61,\r\n vyssiSchvalovatelZastupce9 = 62,\r\n dochazkovyVedouci = 90,\r\n}\r\nexport enum EApproverTypes {\r\n vyssiSchvalovatel = \"vyssiSchvalovatel\",\r\n vyssiSchvalovatelZastupce = \"vyssiSchvalovatelZastupce\",\r\n vyssiSchvalovatelZastupce9 = \"vyssiSchvalovatelZastupce9\",\r\n vedouci = \"vedouci\",\r\n zastupce9 = \"zastupce9\",\r\n zastupce = \"zastupce\",\r\n predschvalovatel1 = \"predschvalovatel1\",\r\n predschvalovatel2 = \"predschvalovatel2\",\r\n predschvalovatel3 = \"predschvalovatel3\",\r\n dochazkovyVedouci = \"dochazkovyVedouci\",\r\n}\r\n\r\nexport interface IAttachment {\r\n\r\n\r\n id: number;\r\n created: string;\r\n createdByEmpId: string;\r\n updated: string;\r\n updatedByEmpId: string;\r\n mimeType: string;\r\n size: number;\r\n filename: string;\r\n\r\n}\r\n\r\n\r\n\r\nexport interface IStep {\r\n\r\n\r\n date: string;\r\n type: number;\r\n comment: string;\r\n decision: string;\r\n employee: IEmployee;\r\n\r\n}\r\n\r\n\r\nexport enum EDecisionsTranslations {\r\n approved = 'Schváleno',\r\n rejected = 'Zamítnuto',\r\n cancelled = 'Stornováno',\r\n evided = 'Zaevidováno',\r\n}\r\n\r\n\r\nexport interface ProcessDefinitionDto {\r\n /**\r\n * The id of the process definition\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n id?: string | null;\r\n\r\n /**\r\n * The key of the process definition, i.e., the id of the BPMN 2.0 XML process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n key?: string | null;\r\n\r\n /**\r\n * The category of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n category?: string | null;\r\n\r\n /**\r\n * The description of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n description?: string | null;\r\n\r\n /**\r\n * The name of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n name?: string | null;\r\n\r\n /**\r\n * The version of the process definition that the engine assigned to it.\r\n *\r\n * @type {number}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n version?: number | null;\r\n\r\n /**\r\n * The file name of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n resource?: string | null;\r\n\r\n /**\r\n * The deployment id of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n deploymentId?: string | null;\r\n\r\n /**\r\n * The file name of the process definition diagram, if it exists.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n diagram?: string | null;\r\n\r\n /**\r\n * A flag indicating whether the definition is suspended or not.\r\n *\r\n * @type {boolean}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n suspended?: boolean | null;\r\n\r\n /**\r\n * The tenant id of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n tenantId?: string | null;\r\n\r\n /**\r\n * The version tag of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n versionTag?: string | null;\r\n\r\n /**\r\n * History time to live value of the process definition. Is used within [History cleanup](https://docs.camunda.org/manual/7.20/user-guide/process-engine/history/#history-cleanup).\r\n *\r\n * @type {number}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n historyTimeToLive?: number | null;\r\n\r\n /**\r\n * A flag indicating whether the process definition is startable in Tasklist or not.\r\n *\r\n * @type {boolean}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n startableInTasklist?: boolean | null;\r\n}\r\n\r\nexport interface VariableValueDto {\r\n /**\r\n * @type {AnyValue}\r\n * @memberof VariableValueDto\r\n */\r\n value?: unknown;\r\n\r\n /**\r\n * The value type of the variable.\r\n *\r\n * @type {string}\r\n * @memberof VariableValueDto\r\n */\r\n type?: string | null;\r\n\r\n /**\r\n * A JSON object containing additional, value-type-dependent properties. For serialized variables of type Object, the following properties can be provided: * `objectTypeName`: A string representation of the object's type name. * `serializationDataFormat`: The serialization format used to store the variable. For serialized variables of type File, the following properties can be provided: * `filename`: The name of the file. This is not the variable name but the name that will be used when downloading the file again. * `mimetype`: The MIME type of the file that is being uploaded. * `encoding`: The encoding of the file that is being uploaded. The following property can be provided for all value types: * `transient`: Indicates whether the variable should be transient or not. See [documentation](https://docs.camunda.org/manual/7.20/user-guide/process-engine/variables#transient-variables) for more informations. (Not applicable for `decision-definition`, ` /process-instance/variables-async`, and `/migration/executeAsync` endpoints)\r\n *\r\n * @type {{ [key: string]: any; }}\r\n * @memberof VariableValueDto\r\n */\r\n valueInfo?: { [key: string]: unknown };\r\n}\r\n\r\n\r\n\r\nexport interface FormValues {\r\n [key: string]: VariableValueDto;\r\n}\r\n\r\n\r\nexport enum Eagendy {\r\n all = \"Všechny\",\r\n timeoff = \"Nepřítomnost\",\r\n vacatransfer = \"Převod dovolené\",\r\n}\r\nexport enum Estavy {\r\n active = \"Ke zpracování\",\r\n done = \"Hotové\",\r\n all = 'Všechny',\r\n}\r\nexport enum Eassignments {\r\n my = \"Moje\",\r\n sub = \"Podřízených\",\r\n all = 'Všechny',\r\n}\r\nexport enum EEntity {\r\n task = \"Úkoly\",\r\n application = \"Žádosti\",\r\n}\r\n"],"names":["EApproverRoles","EApproverTypes","EDecisionsTranslations","Eagendy","Estavy","Eassignments","EEntity"],"mappings":"AAqRY,IAAA,mCAAAA,oBAAL;AACLA,kBAAAA,gBAAA,sBAAmB,EAAnB,IAAA;AACAA,kBAAAA,gBAAA,cAAW,EAAX,IAAA;AACAA,kBAAAA,gBAAA,eAAY,EAAZ,IAAA;AACAA,kBAAAA,gBAAA,aAAU,EAAV,IAAA;AACAA,kBAAAA,gBAAA,uBAAoB,EAApB,IAAA;AACAA,kBAAAA,gBAAA,+BAA4B,EAA5B,IAAA;AACAA,kBAAAA,gBAAA,gCAA6B,EAA7B,IAAA;AACAA,kBAAAA,gBAAA,uBAAoB,EAApB,IAAA;AARUA,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AAUA,IAAA,mCAAAC,oBAAL;AACLA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,2BAA4B,IAAA;AAC5BA,kBAAA,4BAA6B,IAAA;AAC7BA,kBAAA,SAAU,IAAA;AACVA,kBAAA,WAAY,IAAA;AACZA,kBAAA,UAAW,IAAA;AACXA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,mBAAoB,IAAA;AAVVA,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AAyCA,IAAA,2CAAAC,4BAAL;AACLA,0BAAA,UAAW,IAAA;AACXA,0BAAA,UAAW,IAAA;AACXA,0BAAA,WAAY,IAAA;AACZA,0BAAA,QAAS,IAAA;AAJCA,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAyJA,IAAA,4BAAAC,aAAL;AACLA,WAAA,KAAM,IAAA;AACNA,WAAA,SAAU,IAAA;AACVA,WAAA,cAAe,IAAA;AAHLA,SAAAA;AAAA,GAAA,WAAA,CAAA,CAAA;AAKA,IAAA,2BAAAC,YAAL;AACLA,UAAA,QAAS,IAAA;AACTA,UAAA,MAAO,IAAA;AACPA,UAAA,KAAM,IAAA;AAHIA,SAAAA;AAAA,GAAA,UAAA,CAAA,CAAA;AAKA,IAAA,iCAAAC,kBAAL;AACLA,gBAAA,IAAK,IAAA;AACLA,gBAAA,KAAM,IAAA;AACNA,gBAAA,KAAM,IAAA;AAHIA,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAKA,IAAA,4BAAAC,aAAL;AACLA,WAAA,MAAO,IAAA;AACPA,WAAA,aAAc,IAAA;AAFJA,SAAAA;AAAA,GAAA,WAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../lib/types.ts"],"sourcesContent":["import { AxiosInstance } from \"axios\";\r\nimport { Emitter } from \"mitt\";\r\n\r\n\r\nimport { UseFormReturn } from \"react-hook-form\";\r\n\r\nexport interface IUserInfo {\r\n contractGroup: number;\r\n degreeAfter: string;\r\n degreeBefore: string;\r\n departmentId: string;\r\n departmentName: string;\r\n departmentNameLong: string;\r\n email: string;\r\n employeeId: number;\r\n firstName: string;\r\n lastName: string;\r\n positionName: string;\r\n positionNumber: string;\r\n userId: string;\r\n mobile: string;\r\n phone: string;\r\n contractTitle: string;\r\n managerTitle: string;\r\n manager: string;\r\n functionTitle: string;\r\n officeAddress: string;\r\n\r\n}\r\nexport interface IBuilding {\r\n buildingId: string;\r\n nameFull: string;\r\n\r\n}export interface IBuildingLOV {\r\n buildingId: string;\r\n name: string;\r\n ofsId?: number;\r\n\r\n}\r\nexport interface IEmployee extends IUserInfo {\r\n\r\n deleted: boolean\r\n hasComputer: string\r\n language: string\r\n manager: string\r\n parentFrId: number\r\n positionId: number\r\n validFrom: string\r\n validTo: string\r\n contractType: number\r\n exemption: number\r\n activatedOn: string\r\n building?: IBuilding | null\r\n}\r\n\r\nexport interface IAuthApp {\r\n name: string;\r\n label: string;\r\n roles: string[];\r\n}\r\n\r\nexport type IAuthApps = IAuthApp[];\r\n\r\nexport interface IEventMessage {\r\n title?: string;\r\n message?: string;\r\n timeout?: number;\r\n classes?: string;\r\n type?: \"success\" | \"info\" | \"warning\" | \"error\";\r\n}\r\n\r\nexport type Events = {\r\n message?: IEventMessage;\r\n loading?: boolean;\r\n};\r\n\r\nexport interface IContextValue {\r\n userInfo: IUserInfo;\r\n apiClient: AxiosInstance;\r\n authApps: IAuthApps;\r\n emitter: Emitter<Events>;\r\n isAdminApp?: boolean;\r\n}\r\nexport interface IOptionItem {\r\n value: string | number | null;\r\n label: string;\r\n description?: string;\r\n}\r\n\r\nexport type IFormProps = {\r\n formName: string;\r\n entityId: string;\r\n entityName: string;\r\n context: IContextValue;\r\n onSuccess: (path: string, message?: string) => void;\r\n};\r\nexport type IListProps = {\r\n id?: string;\r\n listName: string;\r\n filters: object; //{ [key: string]: any };\r\n context: IContextValue;\r\n title?: string;\r\n};\r\nexport type IPageProps = {\r\n pageName: string;\r\n context: IContextValue;\r\n};\r\n\r\nexport type IStartProcessProps = {\r\n context: IContextValue;\r\n\r\n onNavigate: (path: string) => void;\r\n};\r\n\r\nexport interface IModuleProcess {\r\n\r\n key: string;\r\n name: string;\r\n description: string;\r\n disabled?: boolean;\r\n\r\n}\r\nexport interface IModulePage {\r\n\r\n pageName: string;\r\n name: string;\r\n description: string;\r\n disabled?: boolean;\r\n roles?: string[];\r\n admin?: boolean;\r\n}\r\nexport interface IModuleSettings {\r\n\r\n key: string;\r\n name: string;\r\n description: string;\r\n disabled?: boolean;\r\n roles?: string[];\r\n admin?: boolean;\r\n\r\n}\r\n\r\nexport interface IModuleConstants {\r\n\r\n key: string\r\n name: string\r\n processes: IModuleProcess[],\r\n reports?: IModulePage[],\r\n pages?: IModulePage[],\r\n\r\n}\r\n\r\n\r\nexport interface IPosition {\r\n id: number;\r\n departmentId: string;\r\n positionName: string;\r\n positionNumber: string;\r\n manager: string;\r\n virtual: boolean;\r\n title: string;\r\n}\r\nexport interface IPositionEmployee extends IPosition {\r\n employee: IEmployee;\r\n}\r\nexport interface IEmployeePosition extends IEmployee {\r\n position: IPosition;\r\n}\r\nexport type { ICalendarItem } from \"./components/Calendar\";\r\n\r\n\r\nexport interface ITimeOffCategoryDto {\r\n id?: number;\r\n name?: string;\r\n}\r\nexport interface ITimeOffData {\r\n id: number;\r\n startDate: string;\r\n endDate: string;\r\n days?: number;\r\n year?: number;\r\n comment?: string;\r\n applicant?: IEmployee;\r\n place?: string;\r\n leaveType?: string;\r\n initiator?: string;\r\n dateFromEvidence?: string;\r\n dateToEvidence?: string;\r\n status?: number;\r\n statusText?: string;\r\n timeOffCategoryDto: ITimeOffCategoryDto;\r\n applicantContractGroup?: number;\r\n name?: string;\r\n daysOfEvidence?: number;\r\n daysInStartMonth?: number;\r\n daysInEndMonth?: number;\r\n lastChange?: string;\r\n created?: string;\r\n updated?: string;\r\n attachment?: IAttachment;\r\n steps?: IStep[];\r\n}\r\n\r\nexport interface IDepartment {\r\n departmentId: string;\r\n nameLong: string;\r\n parentDepartmentId: string;\r\n parentLocationId: number;\r\n nameShort: string;\r\n}\r\n\r\nexport interface IPageable<T> {\r\n content: T[];\r\n empty: boolean;\r\n first: boolean;\r\n last: boolean;\r\n number: number;\r\n numberOfElements: number;\r\n size: number;\r\n totalElements: number;\r\n totalPages: number;\r\n}\r\n\r\n\r\nexport interface IFormFieldGlobalProps {\r\n label?: string;\r\n description?: string;\r\n name: string;\r\n type?: string;\r\n value?: any;\r\n\r\n methods?: UseFormReturn<any>;\r\n\r\n errors?: any;\r\n register?: any;\r\n disabled?: boolean;\r\n required?: boolean;\r\n clearable?: boolean;\r\n placeholder?: string;\r\n children?: React.ReactNode;\r\n className?: string;\r\n rounded?: boolean;\r\n onInputChange: (\r\n e: React.ChangeEvent<\r\n HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | any\r\n >\r\n ) => void;\r\n\r\n onFocus?: () => void;\r\n onBlur?: () => void;\r\n inline?: boolean,\r\n ref?: any;\r\n}\r\n\r\n\r\nexport interface SysConfigHolidayEntityResponse {\r\n \"id\": number,\r\n \"date\": string,\r\n \"day\": number,\r\n \"month\": number,\r\n \"year\": number,\r\n \"dayOfWeek\": number\r\n}\r\n\r\n\r\nexport interface IProfileApprover {\r\n id: number;\r\n role: number;\r\n roleTxt: string;\r\n approverOrder: number;\r\n approver: IEmployee;\r\n position: IPositionEmployee;\r\n isEmployee: boolean;\r\n ignore: boolean;\r\n makePreapprover: boolean;\r\n}\r\n\r\n\r\nexport enum EApproverRoles {\r\n predschvalovatel = 10,\r\n zastupce = 20,\r\n zastupce9 = 30,\r\n vedouci = 40,\r\n vyssiSchvalovatel = 60,\r\n vyssiSchvalovatelZastupce = 61,\r\n vyssiSchvalovatelZastupce9 = 62,\r\n dochazkovyVedouci = 90,\r\n}\r\nexport enum EApproverTypes {\r\n vyssiSchvalovatel = \"vyssiSchvalovatel\",\r\n vyssiSchvalovatelZastupce = \"vyssiSchvalovatelZastupce\",\r\n vyssiSchvalovatelZastupce9 = \"vyssiSchvalovatelZastupce9\",\r\n vedouci = \"vedouci\",\r\n zastupce9 = \"zastupce9\",\r\n zastupce = \"zastupce\",\r\n predschvalovatel1 = \"predschvalovatel1\",\r\n predschvalovatel2 = \"predschvalovatel2\",\r\n predschvalovatel3 = \"predschvalovatel3\",\r\n dochazkovyVedouci = \"dochazkovyVedouci\",\r\n}\r\n\r\nexport interface IAttachment {\r\n\r\n\r\n id: number;\r\n created: string;\r\n createdByEmpId: string;\r\n updated: string;\r\n updatedByEmpId: string;\r\n mimeType: string;\r\n size: number;\r\n filename: string;\r\n\r\n}\r\n\r\n\r\n\r\nexport interface IStep {\r\n\r\n\r\n date: string;\r\n type: number;\r\n comment: string;\r\n decision: string;\r\n employee: IEmployee;\r\n\r\n}\r\n\r\n\r\nexport enum EDecisionsTranslations {\r\n approved = 'Schváleno',\r\n rejected = 'Zamítnuto',\r\n cancelled = 'Stornováno',\r\n evided = 'Zaevidováno',\r\n}\r\n\r\n\r\nexport interface ProcessDefinitionDto {\r\n /**\r\n * The id of the process definition\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n id?: string | null;\r\n\r\n /**\r\n * The key of the process definition, i.e., the id of the BPMN 2.0 XML process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n key?: string | null;\r\n\r\n /**\r\n * The category of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n category?: string | null;\r\n\r\n /**\r\n * The description of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n description?: string | null;\r\n\r\n /**\r\n * The name of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n name?: string | null;\r\n\r\n /**\r\n * The version of the process definition that the engine assigned to it.\r\n *\r\n * @type {number}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n version?: number | null;\r\n\r\n /**\r\n * The file name of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n resource?: string | null;\r\n\r\n /**\r\n * The deployment id of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n deploymentId?: string | null;\r\n\r\n /**\r\n * The file name of the process definition diagram, if it exists.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n diagram?: string | null;\r\n\r\n /**\r\n * A flag indicating whether the definition is suspended or not.\r\n *\r\n * @type {boolean}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n suspended?: boolean | null;\r\n\r\n /**\r\n * The tenant id of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n tenantId?: string | null;\r\n\r\n /**\r\n * The version tag of the process definition.\r\n *\r\n * @type {string}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n versionTag?: string | null;\r\n\r\n /**\r\n * History time to live value of the process definition. Is used within [History cleanup](https://docs.camunda.org/manual/7.20/user-guide/process-engine/history/#history-cleanup).\r\n *\r\n * @type {number}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n historyTimeToLive?: number | null;\r\n\r\n /**\r\n * A flag indicating whether the process definition is startable in Tasklist or not.\r\n *\r\n * @type {boolean}\r\n * @memberof ProcessDefinitionDto\r\n */\r\n startableInTasklist?: boolean | null;\r\n}\r\n\r\nexport interface VariableValueDto {\r\n /**\r\n * @type {AnyValue}\r\n * @memberof VariableValueDto\r\n */\r\n value?: unknown;\r\n\r\n /**\r\n * The value type of the variable.\r\n *\r\n * @type {string}\r\n * @memberof VariableValueDto\r\n */\r\n type?: string | null;\r\n\r\n /**\r\n * A JSON object containing additional, value-type-dependent properties. For serialized variables of type Object, the following properties can be provided: * `objectTypeName`: A string representation of the object's type name. * `serializationDataFormat`: The serialization format used to store the variable. For serialized variables of type File, the following properties can be provided: * `filename`: The name of the file. This is not the variable name but the name that will be used when downloading the file again. * `mimetype`: The MIME type of the file that is being uploaded. * `encoding`: The encoding of the file that is being uploaded. The following property can be provided for all value types: * `transient`: Indicates whether the variable should be transient or not. See [documentation](https://docs.camunda.org/manual/7.20/user-guide/process-engine/variables#transient-variables) for more informations. (Not applicable for `decision-definition`, ` /process-instance/variables-async`, and `/migration/executeAsync` endpoints)\r\n *\r\n * @type {{ [key: string]: any; }}\r\n * @memberof VariableValueDto\r\n */\r\n valueInfo?: { [key: string]: unknown };\r\n}\r\n\r\n\r\n\r\nexport interface FormValues {\r\n [key: string]: VariableValueDto;\r\n}\r\n\r\n\r\nexport enum Eagendy {\r\n all = \"Všechny\",\r\n timeoff = \"Nepřítomnost\",\r\n vacatransfer = \"Převod dovolené\",\r\n}\r\nexport enum Estavy {\r\n active = \"Ke zpracování\",\r\n done = \"Hotové\",\r\n all = 'Všechny',\r\n}\r\nexport enum Eassignments {\r\n my = \"Moje\",\r\n sub = \"Podřízených\",\r\n all = 'Všechny',\r\n}\r\nexport enum EEntity {\r\n task = \"Úkoly\",\r\n application = \"Žádosti\",\r\n}\r\n"],"names":["EApproverRoles","EApproverTypes","EDecisionsTranslations","Eagendy","Estavy","Eassignments","EEntity"],"mappings":"AAsRY,IAAA,mCAAAA,oBAAL;AACLA,kBAAAA,gBAAA,sBAAmB,EAAnB,IAAA;AACAA,kBAAAA,gBAAA,cAAW,EAAX,IAAA;AACAA,kBAAAA,gBAAA,eAAY,EAAZ,IAAA;AACAA,kBAAAA,gBAAA,aAAU,EAAV,IAAA;AACAA,kBAAAA,gBAAA,uBAAoB,EAApB,IAAA;AACAA,kBAAAA,gBAAA,+BAA4B,EAA5B,IAAA;AACAA,kBAAAA,gBAAA,gCAA6B,EAA7B,IAAA;AACAA,kBAAAA,gBAAA,uBAAoB,EAApB,IAAA;AARUA,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AAUA,IAAA,mCAAAC,oBAAL;AACLA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,2BAA4B,IAAA;AAC5BA,kBAAA,4BAA6B,IAAA;AAC7BA,kBAAA,SAAU,IAAA;AACVA,kBAAA,WAAY,IAAA;AACZA,kBAAA,UAAW,IAAA;AACXA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,mBAAoB,IAAA;AACpBA,kBAAA,mBAAoB,IAAA;AAVVA,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AAyCA,IAAA,2CAAAC,4BAAL;AACLA,0BAAA,UAAW,IAAA;AACXA,0BAAA,UAAW,IAAA;AACXA,0BAAA,WAAY,IAAA;AACZA,0BAAA,QAAS,IAAA;AAJCA,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAyJA,IAAA,4BAAAC,aAAL;AACLA,WAAA,KAAM,IAAA;AACNA,WAAA,SAAU,IAAA;AACVA,WAAA,cAAe,IAAA;AAHLA,SAAAA;AAAA,GAAA,WAAA,CAAA,CAAA;AAKA,IAAA,2BAAAC,YAAL;AACLA,UAAA,QAAS,IAAA;AACTA,UAAA,MAAO,IAAA;AACPA,UAAA,KAAM,IAAA;AAHIA,SAAAA;AAAA,GAAA,UAAA,CAAA,CAAA;AAKA,IAAA,iCAAAC,kBAAL;AACLA,gBAAA,IAAK,IAAA;AACLA,gBAAA,KAAM,IAAA;AACNA,gBAAA,KAAM,IAAA;AAHIA,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAKA,IAAA,4BAAAC,aAAL;AACLA,WAAA,MAAO,IAAA;AACPA,WAAA,aAAc,IAAA;AAFJA,SAAAA;AAAA,GAAA,WAAA,CAAA,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleErrors.js","sources":["../../lib/utils/handleErrors.ts"],"sourcesContent":["import { AxiosError } from \"axios\";\r\nimport { Emitter } from \"mitt\";\r\nimport { Events } from \"../types\";\r\n\r\nconst handleErrors = (error: AxiosError, emitter: Emitter<Events>, customMessage?: string) => {\r\n let errmsgToDisplay = (customMessage || \"\") + \" \" + ((error.response?.data as any)?.error?.message || error.message || \"\")\r\n\r\n let errorTitle = \"\"\r\n if (error.code == 'ERR_NETWORK') {\r\n errorTitle = \"Síťová chyba\"\r\n errmsgToDisplay = errmsgToDisplay + \" \" + new Date().toLocaleString();\r\n } else if (error.code == 'ERR_BAD_REQUEST') {\r\n if (error.response?.status == 403) {\r\n errorTitle = \"Přístup zamítnut\"\r\n } else {\r\n errorTitle = \"Interní chyba aplikace\"\r\n }\r\n errmsgToDisplay = new Date().toLocaleString() + \" (\" + error.response?.status + \") \\n\" + errmsgToDisplay;\r\n }\r\n console.error(error);\r\n emitter.emit(\"message\", {\r\n title: errorTitle,\r\n message: errmsgToDisplay,\r\n classes: \"bg-danger \",\r\n timeout: 0\r\n });\r\n}\r\nexport { handleErrors }"],"names":[],"mappings":"AAIA,MAAM,eAAe,CAAC,OAAmB,SAA0B,kBAA2B;AAA9F;AACQ,MAAA,mBAAmB,iBAAiB,MAAM,SAAQ,uBAAM,aAAN,mBAAgB,SAAhB,mBAA8B,UAA9B,mBAAqC,YAAW,MAAM,WAAW;AAEvH,MAAI,aAAa;AACb,MAAA,MAAM,QAAQ,eAAe;AAChB,iBAAA;AACb,sBAAkB,kBAAkB,OAAU,oBAAA,KAAA,GAAO;EAAe,WAC7D,MAAM,QAAQ,mBAAmB;AACpC,UAAA,WAAM,aAAN,mBAAgB,WAAU,KAAK;AAClB,mBAAA;AAAA,IAAA,OACV;AACU,mBAAA;AAAA,IACjB;AACkB,uBAAA,oBAAI,KAAO,GAAA,mBAAmB,SAAO,WAAM,aAAN,mBAAgB,UAAS,SAAS;AAAA,EAC7F;AACA,UAAQ,MAAM,KAAK;AACnB,UAAQ,KAAK,WAAW;AAAA,IACpB,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"handleErrors.js","sources":["../../lib/utils/handleErrors.ts"],"sourcesContent":["import { AxiosError } from \"axios\";\r\nimport { Emitter } from \"mitt\";\r\nimport { Events } from \"../types\";\r\n\r\nconst handleErrors = (error: AxiosError, emitter: Emitter<Events>, customMessage?: string) => {\r\n let errmsgToDisplay = (customMessage || \"\") + \" \" + ((error.response?.data as any)?.error?.message || error.message || \"\")\r\n\r\n let errorTitle = \"\"\r\n if (error.code == 'ERR_NETWORK') {\r\n errorTitle = \"Síťová chyba\"\r\n errmsgToDisplay = errmsgToDisplay + \" \" + new Date().toLocaleString();\r\n } else if (error.code == 'ERR_BAD_REQUEST') {\r\n if (error.response?.status == 403) {\r\n errorTitle = \"Přístup zamítnut\"\r\n } else {\r\n errorTitle = \"Interní chyba aplikace\"\r\n }\r\n errmsgToDisplay = new Date().toLocaleString() + \" (\" + error.response?.status + \") \\n\" + errmsgToDisplay;\r\n }\r\n console.error(error);\r\n emitter.emit(\"message\", {\r\n title: errorTitle,\r\n message: errmsgToDisplay,\r\n classes: \"bg-danger \",\r\n timeout: 0,\r\n type: \"error\"\r\n });\r\n}\r\nexport { handleErrors }"],"names":[],"mappings":"AAIA,MAAM,eAAe,CAAC,OAAmB,SAA0B,kBAA2B;AAA9F;AACQ,MAAA,mBAAmB,iBAAiB,MAAM,SAAQ,uBAAM,aAAN,mBAAgB,SAAhB,mBAA8B,UAA9B,mBAAqC,YAAW,MAAM,WAAW;AAEvH,MAAI,aAAa;AACb,MAAA,MAAM,QAAQ,eAAe;AAChB,iBAAA;AACb,sBAAkB,kBAAkB,OAAU,oBAAA,KAAA,GAAO;EAAe,WAC7D,MAAM,QAAQ,mBAAmB;AACpC,UAAA,WAAM,aAAN,mBAAgB,WAAU,KAAK;AAClB,mBAAA;AAAA,IAAA,OACV;AACU,mBAAA;AAAA,IACjB;AACkB,uBAAA,oBAAI,KAAO,GAAA,mBAAmB,SAAO,WAAM,aAAN,mBAAgB,UAAS,SAAS;AAAA,EAC7F;AACA,UAAQ,MAAM,KAAK;AACnB,UAAQ,KAAK,WAAW;AAAA,IACpB,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,EAAA,CACT;AACL;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { MdExpandLess, MdExpandMore } from "react-icons/md";
|
|
3
|
+
import { cn } from "../../utils/utils";
|
|
4
|
+
|
|
5
|
+
interface CollapsibleSectionProps {
|
|
6
|
+
title: string;
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
|
|
10
|
+
className?: string;
|
|
11
|
+
classNameEnvelope?: string;
|
|
12
|
+
classNameTitle?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const CollapsibleSection = ({
|
|
16
|
+
title,
|
|
17
|
+
expanded = true,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
classNameEnvelope,
|
|
21
|
+
classNameTitle,
|
|
22
|
+
}: CollapsibleSectionProps) => {
|
|
23
|
+
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div className={cn("rounded-md shadow-lg border", classNameEnvelope)}>
|
|
27
|
+
<div
|
|
28
|
+
className={cn(
|
|
29
|
+
"w-full justify-between border-b hover:bg-muted flex py-4 px-5 items-center cursor-pointer",
|
|
30
|
+
classNameTitle
|
|
31
|
+
)}
|
|
32
|
+
onClick={() => setIsExpanded((prev) => !prev)}
|
|
33
|
+
>
|
|
34
|
+
<div className="font-medium text-lg">{title}</div>
|
|
35
|
+
<div>
|
|
36
|
+
{isExpanded ? (
|
|
37
|
+
<MdExpandLess size={"24px"} className="text-gray-600" />
|
|
38
|
+
) : (
|
|
39
|
+
<MdExpandMore size={"24px"} className="text-gray-600" />
|
|
40
|
+
)}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
{isExpanded && <div className={cn("p-5", className)}>{children}</div>}
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default CollapsibleSection;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useTheme } from "next-themes";
|
|
4
|
+
import { Toaster as Sonner, toast } from "sonner";
|
|
5
|
+
|
|
6
|
+
type ToasterProps = React.ComponentProps<typeof Sonner>;
|
|
7
|
+
|
|
8
|
+
const Toaster = ({ ...props }: ToasterProps) => {
|
|
9
|
+
const { theme = "system" } = useTheme();
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Sonner
|
|
13
|
+
theme={theme as ToasterProps["theme"]}
|
|
14
|
+
className="toaster group"
|
|
15
|
+
toastOptions={{
|
|
16
|
+
classNames: {
|
|
17
|
+
toast:
|
|
18
|
+
"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
19
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
20
|
+
actionButton:
|
|
21
|
+
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
22
|
+
cancelButton:
|
|
23
|
+
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
24
|
+
},
|
|
25
|
+
}}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { Toaster, toast };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
5
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
|
+
import { X } from "lucide-react";
|
|
7
|
+
|
|
8
|
+
import { cn } from "../../utils/utils";
|
|
9
|
+
|
|
10
|
+
const ToastProvider = ToastPrimitives.Provider;
|
|
11
|
+
|
|
12
|
+
const ToastViewport = React.forwardRef<
|
|
13
|
+
React.ElementRef<typeof ToastPrimitives.Viewport>,
|
|
14
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
|
|
15
|
+
>(({ className, ...props }, ref) => (
|
|
16
|
+
<ToastPrimitives.Viewport
|
|
17
|
+
ref={ref}
|
|
18
|
+
className={cn(
|
|
19
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
));
|
|
25
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
26
|
+
|
|
27
|
+
const toastVariants = cva(
|
|
28
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
29
|
+
{
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
default: "border bg-background text-foreground",
|
|
33
|
+
destructive:
|
|
34
|
+
"destructive group border-destructive bg-destructive text-destructive-foreground",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: "default",
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const Toast = React.forwardRef<
|
|
44
|
+
React.ElementRef<typeof ToastPrimitives.Root>,
|
|
45
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
|
|
46
|
+
VariantProps<typeof toastVariants>
|
|
47
|
+
>(({ className, variant, ...props }, ref) => {
|
|
48
|
+
return (
|
|
49
|
+
<ToastPrimitives.Root
|
|
50
|
+
ref={ref}
|
|
51
|
+
className={cn(toastVariants({ variant }), className)}
|
|
52
|
+
{...props}
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
57
|
+
|
|
58
|
+
const ToastAction = React.forwardRef<
|
|
59
|
+
React.ElementRef<typeof ToastPrimitives.Action>,
|
|
60
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
|
|
61
|
+
>(({ className, ...props }, ref) => (
|
|
62
|
+
<ToastPrimitives.Action
|
|
63
|
+
ref={ref}
|
|
64
|
+
className={cn(
|
|
65
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
66
|
+
className
|
|
67
|
+
)}
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
));
|
|
71
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
72
|
+
|
|
73
|
+
const ToastClose = React.forwardRef<
|
|
74
|
+
React.ElementRef<typeof ToastPrimitives.Close>,
|
|
75
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
|
|
76
|
+
>(({ className, ...props }, ref) => (
|
|
77
|
+
<ToastPrimitives.Close
|
|
78
|
+
ref={ref}
|
|
79
|
+
className={cn(
|
|
80
|
+
"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
81
|
+
className
|
|
82
|
+
)}
|
|
83
|
+
toast-close=""
|
|
84
|
+
{...props}
|
|
85
|
+
>
|
|
86
|
+
<X className="h-4 w-4" />
|
|
87
|
+
</ToastPrimitives.Close>
|
|
88
|
+
));
|
|
89
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
90
|
+
|
|
91
|
+
const ToastTitle = React.forwardRef<
|
|
92
|
+
React.ElementRef<typeof ToastPrimitives.Title>,
|
|
93
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
|
|
94
|
+
>(({ className, ...props }, ref) => (
|
|
95
|
+
<ToastPrimitives.Title
|
|
96
|
+
ref={ref}
|
|
97
|
+
className={cn("text-sm font-semibold", className)}
|
|
98
|
+
{...props}
|
|
99
|
+
/>
|
|
100
|
+
));
|
|
101
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
102
|
+
|
|
103
|
+
const ToastDescription = React.forwardRef<
|
|
104
|
+
React.ElementRef<typeof ToastPrimitives.Description>,
|
|
105
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
|
|
106
|
+
>(({ className, ...props }, ref) => (
|
|
107
|
+
<ToastPrimitives.Description
|
|
108
|
+
ref={ref}
|
|
109
|
+
className={cn("text-sm opacity-90", className)}
|
|
110
|
+
{...props}
|
|
111
|
+
/>
|
|
112
|
+
));
|
|
113
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
114
|
+
|
|
115
|
+
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
116
|
+
|
|
117
|
+
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
118
|
+
|
|
119
|
+
export {
|
|
120
|
+
type ToastProps,
|
|
121
|
+
type ToastActionElement,
|
|
122
|
+
ToastProvider,
|
|
123
|
+
ToastViewport,
|
|
124
|
+
Toast,
|
|
125
|
+
ToastTitle,
|
|
126
|
+
ToastDescription,
|
|
127
|
+
ToastClose,
|
|
128
|
+
ToastAction,
|
|
129
|
+
};
|
package/lib/main.ts
CHANGED
|
@@ -23,6 +23,10 @@ export { default as Modal } from "./components/Modal.tsx";
|
|
|
23
23
|
export { default as PositionsSelectorSingle } from "./components/form/PositionsSelectorSingle.tsx";
|
|
24
24
|
export { default as Calendar } from "./components/Calendar.tsx";
|
|
25
25
|
export { default as DataTable } from "./components/datatable/DataTable.tsx";
|
|
26
|
+
export { default as CollapsibleSection } from "./components/layout/CollapsibleSection.tsx";
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
26
30
|
export {
|
|
27
31
|
default as DataTableServer,
|
|
28
32
|
resetAllDataTablePaging,
|
|
@@ -61,6 +65,7 @@ export * from "./components/ui/tooltip.tsx";
|
|
|
61
65
|
export * from "./components/ui/separator.tsx";
|
|
62
66
|
export * from "./components/ui/textarea.tsx";
|
|
63
67
|
export * from "./components/ui/checkbox.tsx";
|
|
68
|
+
export * from "./components/ui/sonner.tsx";
|
|
64
69
|
export { Button as ButtonCN, buttonVariants } from "./components/ui/button.tsx";
|
|
65
70
|
|
|
66
71
|
|
package/lib/types.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@addsign/moje-agenda-shared-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.12",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"@radix-ui/react-select": "^2.1.2",
|
|
74
74
|
"@radix-ui/react-separator": "^1.1.0",
|
|
75
75
|
"@radix-ui/react-slot": "^1.1.0",
|
|
76
|
+
"@radix-ui/react-toast": "^1.2.2",
|
|
76
77
|
"@radix-ui/react-tooltip": "^1.1.4",
|
|
77
78
|
"@types/date-fns": "^2.6.3",
|
|
78
79
|
"axios": "^1.7.2",
|
|
@@ -85,6 +86,7 @@
|
|
|
85
86
|
"jspdf-autotable": "^3.8.3",
|
|
86
87
|
"lucide-react": "^0.456.0",
|
|
87
88
|
"mitt": "^3.0.1",
|
|
89
|
+
"next-themes": "^0.4.4",
|
|
88
90
|
"react-datepicker": "^7.5.0",
|
|
89
91
|
"react-day-picker": "^8.10.1",
|
|
90
92
|
"react-dropzone": "^14.2.3",
|
|
@@ -92,6 +94,7 @@
|
|
|
92
94
|
"react-icons": "^5.2.1",
|
|
93
95
|
"react-tailwindcss-datepicker": "^1.6.6",
|
|
94
96
|
"react-use": "^17.5.0",
|
|
97
|
+
"sonner": "^1.7.1",
|
|
95
98
|
"tailwind-merge": "^2.5.4",
|
|
96
99
|
"tailwindcss-animate": "^1.0.7",
|
|
97
100
|
"xlsx": "^0.18.5",
|