@addsign/moje-agenda-shared-lib 0.0.53 → 0.0.55
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/assets/tailwind.css +23 -0
- package/dist/components/Calendar.js +9 -4
- package/dist/components/Calendar.js.map +1 -1
- package/dist/components/ConfirmationModalDialog.js +2 -2
- package/dist/components/datatable/DataTable.js +1 -1
- package/dist/components/datatable/DataTableServer.js +1 -1
- package/dist/components/form/AutocompleteSearchBar.js +3 -46
- package/dist/components/form/AutocompleteSearchBar.js.map +1 -1
- package/dist/components/form/FileInput.js +3 -3
- package/dist/components/form/FileInput.js.map +1 -1
- package/dist/components/form/FormField.js +1 -1
- package/dist/components/form/PositionsSelectorSingle.js +15 -9
- package/dist/components/form/PositionsSelectorSingle.js.map +1 -1
- package/dist/components/form/SelectField.d.ts +24 -0
- package/dist/components/form/SelectField.js +128 -0
- package/dist/components/form/SelectField.js.map +1 -0
- package/dist/{iconBase-BY_L6Cb_.js → iconBase-B8_TsgYI.js} +8 -8
- package/dist/{iconBase-BY_L6Cb_.js.map → iconBase-B8_TsgYI.js.map} +1 -1
- package/dist/{index-DPrqKh-7.js → index-DUTU8Jwr.js} +2 -2
- package/dist/{index-DPrqKh-7.js.map → index-DUTU8Jwr.js.map} +1 -1
- package/dist/{index-ZA1ctELQ.js → index-qxZYrVct.js} +13 -13
- package/dist/{index-ZA1ctELQ.js.map → index-qxZYrVct.js.map} +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/useClickAway-CH9ykBsx.js +49 -0
- package/dist/useClickAway-CH9ykBsx.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef, useEffect } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { M as MdClose } from "../../index-qxZYrVct.js";
|
|
4
4
|
import '../../assets/tailwind.css';/* empty css */
|
|
5
5
|
import "../../contexts/FederationContext.js";
|
|
6
6
|
import { useFederationContext } from "../../contexts/useFederationContext.js";
|
|
@@ -4,13 +4,12 @@ import '../../assets/tailwind.css';/* empty css */
|
|
|
4
4
|
import Button from "../Button.js";
|
|
5
5
|
import AutocompleteSearchBar from "./AutocompleteSearchBar.js";
|
|
6
6
|
import FormField from "./FormField.js";
|
|
7
|
-
import {
|
|
7
|
+
import { c as MdCheck } from "../../index-qxZYrVct.js";
|
|
8
8
|
import SectionTitle from "../layout/SectionTitle.js";
|
|
9
9
|
import "../../contexts/FederationContext.js";
|
|
10
10
|
import { useFederationContext } from "../../contexts/useFederationContext.js";
|
|
11
11
|
import { getFullName } from "../../utils/getFullName.js";
|
|
12
|
-
import {
|
|
13
|
-
import { G as GenIcon } from "../../iconBase-BY_L6Cb_.js";
|
|
12
|
+
import { G as GenIcon } from "../../iconBase-B8_TsgYI.js";
|
|
14
13
|
function CiEdit(props) {
|
|
15
14
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "g", "attr": { "id": "Edit" }, "child": [{ "tag": "g", "attr": {}, "child": [{ "tag": "path", "attr": { "d": "M3.548,20.938h16.9a.5.5,0,0,0,0-1H3.548a.5.5,0,0,0,0,1Z" }, "child": [] }, { "tag": "path", "attr": { "d": "M9.71,17.18a2.587,2.587,0,0,0,1.12-.65l9.54-9.54a1.75,1.75,0,0,0,0-2.47l-.94-.93a1.788,1.788,0,0,0-2.47,0L7.42,13.12a2.473,2.473,0,0,0-.64,1.12L6.04,17a.737.737,0,0,0,.19.72.767.767,0,0,0,.53.22Zm.41-1.36a1.468,1.468,0,0,1-.67.39l-.97.26-1-1,.26-.97a1.521,1.521,0,0,1,.39-.67l.38-.37,1.99,1.99Zm1.09-1.08L9.22,12.75l6.73-6.73,1.99,1.99Zm8.45-8.45L18.65,7.3,16.66,5.31l1.01-1.02a.748.748,0,0,1,1.06,0l.93.94A.754.754,0,0,1,19.66,6.29Z" }, "child": [] }] }] }] })(props);
|
|
16
15
|
}
|
|
@@ -22,13 +21,13 @@ function PositionsSelectorSingle({
|
|
|
22
21
|
disabled,
|
|
23
22
|
initDepartmentId
|
|
24
23
|
}) {
|
|
24
|
+
var _a;
|
|
25
25
|
const [isModalOpen, setModalOpen] = useState(false);
|
|
26
26
|
const [department, setDepartment] = useState("");
|
|
27
27
|
const [positions, setPositions] = useState([]);
|
|
28
28
|
const [selectedPositionEmployee, setSelectedPositionEmployee] = useState();
|
|
29
29
|
const [storedPositionEmployee, setStoredPositionEmployee] = useState();
|
|
30
|
-
const
|
|
31
|
-
const apiClient = federationContext == null ? void 0 : federationContext.apiClient;
|
|
30
|
+
const apiClient = (_a = useFederationContext()) == null ? void 0 : _a.apiClient;
|
|
32
31
|
useEffect(() => {
|
|
33
32
|
const handleKeyDown = (event) => {
|
|
34
33
|
if (event.key === "Escape") {
|
|
@@ -58,6 +57,13 @@ function PositionsSelectorSingle({
|
|
|
58
57
|
setModalOpen(false);
|
|
59
58
|
};
|
|
60
59
|
const handleSelectedPositionEmployee = (position) => {
|
|
60
|
+
console.log(
|
|
61
|
+
"%csrcsharedPositionsSelectorSingle.tsx:54 position",
|
|
62
|
+
"color: #007acc;",
|
|
63
|
+
position,
|
|
64
|
+
selectedPositionEmployee,
|
|
65
|
+
position.id == (selectedPositionEmployee == null ? void 0 : selectedPositionEmployee.id)
|
|
66
|
+
);
|
|
61
67
|
if (!selectedPositionEmployee || position.id !== (selectedPositionEmployee == null ? void 0 : selectedPositionEmployee.id)) {
|
|
62
68
|
setSelectedPositionEmployee(position);
|
|
63
69
|
} else {
|
|
@@ -65,6 +71,7 @@ function PositionsSelectorSingle({
|
|
|
65
71
|
}
|
|
66
72
|
};
|
|
67
73
|
const handleDepartmentChange = (e) => {
|
|
74
|
+
console.log("%csrcsharedTransferListModal.tsx:109 e", "color: #007acc;", e);
|
|
68
75
|
setDepartment(e);
|
|
69
76
|
};
|
|
70
77
|
useEffect(() => {
|
|
@@ -72,14 +79,13 @@ function PositionsSelectorSingle({
|
|
|
72
79
|
apiClient.get(
|
|
73
80
|
"os/positions/employees?maxResults=1000&departmentId=" + department
|
|
74
81
|
).then((response) => {
|
|
75
|
-
var
|
|
76
|
-
setPositions((
|
|
82
|
+
var _a2;
|
|
83
|
+
setPositions((_a2 = response.data) == null ? void 0 : _a2.content);
|
|
77
84
|
}).catch((error) => {
|
|
78
85
|
console.error(
|
|
79
86
|
"There was an error fetching positions/employees",
|
|
80
87
|
error
|
|
81
88
|
);
|
|
82
|
-
handleErrors(error, federationContext.emitter);
|
|
83
89
|
});
|
|
84
90
|
}
|
|
85
91
|
}, [apiClient, department, isModalOpen]);
|
|
@@ -150,7 +156,7 @@ function PositionsSelectorSingle({
|
|
|
150
156
|
showId: true
|
|
151
157
|
}
|
|
152
158
|
) }),
|
|
153
|
-
/* @__PURE__ */ jsx("div", { className: "col-span-12 h-[400px]
|
|
159
|
+
/* @__PURE__ */ jsx("div", { className: "col-span-12 h-[400px]", children: /* @__PURE__ */ jsxs("div", { className: "pt-4 w-full ", children: [
|
|
154
160
|
/* @__PURE__ */ jsx("div", { className: "text-slate-700 text-sm leading-tight font-medium my-4", children: "Nalezené pozice:" }),
|
|
155
161
|
positions.map((position) => /* @__PURE__ */ jsx(
|
|
156
162
|
"div",
|