@addsign/moje-agenda-shared-lib 2.0.41 → 2.0.43
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/Combination-D2GKeTwa.js +1162 -0
- package/dist/Combination-D2GKeTwa.js.map +1 -0
- package/dist/Dialog-CCrUyF91.js +424 -0
- package/dist/Dialog-CCrUyF91.js.map +1 -0
- package/dist/assets/style.css +61 -8
- package/dist/chevron-down-CfJmko7t.js +14 -0
- package/dist/chevron-down-CfJmko7t.js.map +1 -0
- package/dist/components/Attachments.js +2 -1
- package/dist/components/Attachments.js.map +1 -1
- package/dist/components/ConfirmationModalDialog.js +1 -1
- package/dist/components/ConfirmationModalDialog.js.map +1 -1
- package/dist/components/Modal.js +1 -1
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/datatable/DataTable.js +3 -2
- package/dist/components/datatable/DataTable.js.map +1 -1
- package/dist/components/datatable/DataTableServer.js +42 -13
- package/dist/components/datatable/DataTableServer.js.map +1 -1
- package/dist/components/form/AutocompleteSearchBar.js +5 -4
- 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/DateRangeField.js +2 -2
- package/dist/components/form/DateRangeField.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 +3 -2
- package/dist/components/form/FileInputMultiple.js.map +1 -1
- package/dist/components/form/FormField.js +8 -7
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/InputField.js +3 -2
- package/dist/components/form/InputField.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/RadioGroup.js +1 -1
- package/dist/components/form/RadioGroup.js.map +1 -1
- package/dist/components/form/SelectField.js +5 -4
- package/dist/components/form/SelectField.js.map +1 -1
- package/dist/components/layout/Neoptimizovano.js +2 -1
- package/dist/components/layout/Neoptimizovano.js.map +1 -1
- package/dist/components/layout/PageTitle.js +1 -1
- package/dist/components/layout/PageTitle.js.map +1 -1
- package/dist/components/layout/SectionTitle.js +1 -1
- package/dist/components/layout/SectionTitle.js.map +1 -1
- package/dist/components/profiles/ProfileOverview.js +2 -1
- package/dist/components/profiles/ProfileOverview.js.map +1 -1
- package/dist/components/ui/Combobox.js +1 -1
- package/dist/components/ui/DatePicker.js +1 -1
- package/dist/components/ui/DateTimePicker.js +1 -1
- package/dist/components/ui/Dialog.js +1 -1
- package/dist/components/ui/ScrollArea.js +2 -2
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +27 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/checkbox.js +4 -4
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/multi-select.d.ts +67 -0
- package/dist/components/ui/multi-select.js +295 -0
- package/dist/components/ui/multi-select.js.map +1 -0
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/radioGroup.js +5 -5
- package/dist/components/ui/select.js +8 -16
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/toast.js +5 -5
- package/dist/components/ui/tooltip.js +6 -6
- package/dist/index-B0wyIFEr.js +47 -0
- package/dist/index-B0wyIFEr.js.map +1 -0
- package/dist/index-BcR8DnnV.js +234 -0
- package/dist/index-BcR8DnnV.js.map +1 -0
- package/dist/index-CK9QfV6i.js +40 -0
- package/dist/index-CK9QfV6i.js.map +1 -0
- package/dist/index-CcNKXchf.js +2203 -0
- package/dist/index-CcNKXchf.js.map +1 -0
- package/dist/index-D75exu1X.js +18 -0
- package/dist/index-D75exu1X.js.map +1 -0
- package/dist/index-DzfDO78K.js +15 -0
- package/dist/index-DzfDO78K.js.map +1 -0
- package/dist/index-NZPkObcw.js +110 -0
- package/dist/index-NZPkObcw.js.map +1 -0
- package/dist/index-qqHvAsVd.js +2266 -0
- package/dist/index-qqHvAsVd.js.map +1 -0
- package/dist/index-wO-IHm1z.js +131 -0
- package/dist/index-wO-IHm1z.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +3 -1
- package/dist/main.js.map +1 -1
- package/dist/popover-CcrzvSk7.js +319 -0
- package/dist/popover-CcrzvSk7.js.map +1 -0
- package/lib/components/ConfirmationModalDialog.tsx +1 -1
- package/lib/components/Modal.tsx +1 -1
- package/lib/components/datatable/DataTable.tsx +1 -1
- package/lib/components/datatable/DataTableServer.tsx +51 -17
- package/lib/components/form/AutocompleteSearchBar.tsx +3 -3
- package/lib/components/form/DateRangeField.tsx +2 -2
- package/lib/components/form/FormField.tsx +6 -6
- package/lib/components/form/InputField.tsx +3 -2
- package/lib/components/form/RadioGroup.tsx +1 -1
- package/lib/components/form/SelectField.tsx +3 -3
- package/lib/components/layout/PageTitle.tsx +19 -19
- package/lib/components/layout/SectionTitle.tsx +1 -1
- package/lib/components/ui/badge.tsx +36 -0
- package/lib/components/ui/multi-select.tsx +365 -0
- package/lib/main.ts +4 -0
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ import "../../jspdf.plugin.autotable-7hp3hM-a.js";
|
|
|
13
13
|
import "../../contexts/FederationContext.js";
|
|
14
14
|
import { useFederationContext } from "../../contexts/useFederationContext.js";
|
|
15
15
|
import { handleErrors } from "../../utils/handleErrors.js";
|
|
16
|
-
import "../../Dialog-
|
|
16
|
+
import "../../Dialog-CCrUyF91.js";
|
|
17
17
|
import "../ui/ScrollArea.js";
|
|
18
18
|
import "../ui/input.js";
|
|
19
19
|
import "../ui/form.js";
|
|
@@ -25,6 +25,7 @@ import "../ui/tooltip.js";
|
|
|
25
25
|
import "../ui/separator.js";
|
|
26
26
|
import "../ui/textarea.js";
|
|
27
27
|
import "../ui/checkbox.js";
|
|
28
|
+
import { MultiSelect } from "../ui/multi-select.js";
|
|
28
29
|
import "../ui/button.js";
|
|
29
30
|
import "../../Calendar-DWT4e7Th.js";
|
|
30
31
|
import "../ui/DateTimePicker.js";
|
|
@@ -21792,16 +21793,22 @@ function DataTableServer({
|
|
|
21792
21793
|
setIsLoading(true);
|
|
21793
21794
|
const filteredMergedFilters = Object.entries(mergedFilters).reduce(
|
|
21794
21795
|
(acc, [key, value]) => {
|
|
21795
|
-
if (value
|
|
21796
|
-
acc
|
|
21796
|
+
if (value === null || value === "") {
|
|
21797
|
+
return acc;
|
|
21797
21798
|
}
|
|
21799
|
+
if (Array.isArray(value)) {
|
|
21800
|
+
if (value.length > 0) {
|
|
21801
|
+
acc[key] = value.join(",");
|
|
21802
|
+
}
|
|
21803
|
+
return acc;
|
|
21804
|
+
}
|
|
21805
|
+
acc[key] = value;
|
|
21798
21806
|
return acc;
|
|
21799
21807
|
},
|
|
21800
21808
|
{}
|
|
21801
21809
|
);
|
|
21802
21810
|
federationContext.apiClient.get(url, {
|
|
21803
21811
|
signal: currentAbortController.signal,
|
|
21804
|
-
// Pass the AbortController signal to the request
|
|
21805
21812
|
params: {
|
|
21806
21813
|
...filteredMergedFilters,
|
|
21807
21814
|
pageSize: itemsPerPageLocal,
|
|
@@ -21875,10 +21882,13 @@ function DataTableServer({
|
|
|
21875
21882
|
const response = await federationContext.apiClient.get(
|
|
21876
21883
|
column.filterSource
|
|
21877
21884
|
);
|
|
21878
|
-
const options = response.data.map((item) =>
|
|
21879
|
-
|
|
21880
|
-
|
|
21881
|
-
|
|
21885
|
+
const options = response.data.map((item) => {
|
|
21886
|
+
var _a2, _b2;
|
|
21887
|
+
return {
|
|
21888
|
+
value: (_a2 = item[column.filterValueKey]) == null ? void 0 : _a2.toString(),
|
|
21889
|
+
label: (_b2 = item[column.filterLabelKey]) == null ? void 0 : _b2.toString()
|
|
21890
|
+
};
|
|
21891
|
+
});
|
|
21882
21892
|
return options;
|
|
21883
21893
|
} catch (error) {
|
|
21884
21894
|
console.error("Error fetching filter options:", error);
|
|
@@ -21891,13 +21901,15 @@ function DataTableServer({
|
|
|
21891
21901
|
const updateFilterOptions = async () => {
|
|
21892
21902
|
const newFilterOptions = {};
|
|
21893
21903
|
for (const column of columns) {
|
|
21894
|
-
if (column.filterType === "select" && (column.filterSource || column.filterOptions) && column.filterValueKey && column.filterLabelKey && column.filterParam) {
|
|
21904
|
+
if ((column.filterType === "select" || column.filterType === "multi-select") && (column.filterSource || column.filterOptions) && column.filterValueKey && column.filterLabelKey && column.filterParam) {
|
|
21895
21905
|
const options = await fetchFilterOptions(column);
|
|
21896
|
-
if (options) {
|
|
21906
|
+
if (options && column.filterType === "select") {
|
|
21897
21907
|
newFilterOptions[column.filterParam] = [
|
|
21898
21908
|
{ value: "", label: "" },
|
|
21899
21909
|
...options
|
|
21900
21910
|
];
|
|
21911
|
+
} else if (options && column.filterType === "multi-select") {
|
|
21912
|
+
newFilterOptions[column.filterParam] = options;
|
|
21901
21913
|
}
|
|
21902
21914
|
}
|
|
21903
21915
|
}
|
|
@@ -22221,7 +22233,7 @@ function DataTableServer({
|
|
|
22221
22233
|
options: filterOptions[String(filterParam)] || [],
|
|
22222
22234
|
value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) ?? "",
|
|
22223
22235
|
clearable: true,
|
|
22224
|
-
className: "
|
|
22236
|
+
className: "px-0",
|
|
22225
22237
|
placeholder: "Zadejte filtr",
|
|
22226
22238
|
rounded: true,
|
|
22227
22239
|
disabled: Object.keys(
|
|
@@ -22229,6 +22241,23 @@ function DataTableServer({
|
|
|
22229
22241
|
).includes(String(filterParam))
|
|
22230
22242
|
},
|
|
22231
22243
|
JSON.stringify(mergedFilters)
|
|
22244
|
+
) : filterType === "multi-select" ? /* @__PURE__ */ jsx(
|
|
22245
|
+
MultiSelect,
|
|
22246
|
+
{
|
|
22247
|
+
options: filterOptions[String(filterParam)] || [],
|
|
22248
|
+
onChange: (values) => filterHandler(
|
|
22249
|
+
filterParam,
|
|
22250
|
+
values
|
|
22251
|
+
),
|
|
22252
|
+
value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || [],
|
|
22253
|
+
placeholder: "Zadejte filtr",
|
|
22254
|
+
className: "px-0",
|
|
22255
|
+
disabled: Object.keys(
|
|
22256
|
+
filters || {}
|
|
22257
|
+
).includes(String(filterParam)),
|
|
22258
|
+
variant: "secondary"
|
|
22259
|
+
},
|
|
22260
|
+
JSON.stringify(mergedFilters)
|
|
22232
22261
|
) : filterType === "dateRange" ? /* @__PURE__ */ jsx(
|
|
22233
22262
|
DateRangeField,
|
|
22234
22263
|
{
|
|
@@ -22321,7 +22350,7 @@ function DataTableServer({
|
|
|
22321
22350
|
"td",
|
|
22322
22351
|
{
|
|
22323
22352
|
onClick: rowAction ? () => rowAction(item) : void 0,
|
|
22324
|
-
className: `px-3 py-2 ${rowAction ? "cursor-pointer" : ""} ${colIndex === 0 ? "font-medium text-
|
|
22353
|
+
className: `px-3 py-2 ${rowAction ? "cursor-pointer" : ""} ${colIndex === 0 ? "font-medium text-muted-foreground" : "text-gray-700"} ${classes || ""}`,
|
|
22325
22354
|
children: [
|
|
22326
22355
|
render ? render(item) : "",
|
|
22327
22356
|
actions && actions.filter((it) => {
|
|
@@ -22334,7 +22363,7 @@ function DataTableServer({
|
|
|
22334
22363
|
}).map((action, actionIndex) => /* @__PURE__ */ jsxs(
|
|
22335
22364
|
"div",
|
|
22336
22365
|
{
|
|
22337
|
-
className: "
|
|
22366
|
+
className: "inline-flex align-middle",
|
|
22338
22367
|
children: [
|
|
22339
22368
|
action.icon && /* @__PURE__ */ jsx(
|
|
22340
22369
|
Button,
|