@addsign/moje-agenda-shared-lib 0.0.99 → 1.0.0

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.
@@ -668,6 +668,9 @@ video {
668
668
  .float-left {
669
669
  float: left;
670
670
  }
671
+ .m-0 {
672
+ margin: 0px;
673
+ }
671
674
  .m-1 {
672
675
  margin: 0.25rem;
673
676
  }
@@ -931,8 +934,8 @@ video {
931
934
  .min-w-\[100px\] {
932
935
  min-width: 100px;
933
936
  }
934
- .max-w-\[300px\] {
935
- max-width: 300px;
937
+ .min-w-\[180px\] {
938
+ min-width: 180px;
936
939
  }
937
940
  .max-w-full {
938
941
  max-width: 100%;
@@ -1014,6 +1017,12 @@ video {
1014
1017
  .flex-wrap {
1015
1018
  flex-wrap: wrap;
1016
1019
  }
1020
+ .content-center {
1021
+ align-content: center;
1022
+ }
1023
+ .content-start {
1024
+ align-content: flex-start;
1025
+ }
1017
1026
  .items-start {
1018
1027
  align-items: flex-start;
1019
1028
  }
@@ -1113,9 +1122,6 @@ video {
1113
1122
  .overflow-y-auto {
1114
1123
  overflow-y: auto;
1115
1124
  }
1116
- .overflow-ellipsis {
1117
- text-overflow: ellipsis;
1118
- }
1119
1125
  .text-ellipsis {
1120
1126
  text-overflow: ellipsis;
1121
1127
  }
@@ -1125,6 +1131,9 @@ video {
1125
1131
  .\!rounded-full {
1126
1132
  border-radius: 9999px !important;
1127
1133
  }
1134
+ .\!rounded-none {
1135
+ border-radius: 0px !important;
1136
+ }
1128
1137
  .rounded {
1129
1138
  border-radius: 0.25rem;
1130
1139
  }
@@ -1137,6 +1146,9 @@ video {
1137
1146
  .rounded-md {
1138
1147
  border-radius: 0.375rem;
1139
1148
  }
1149
+ .rounded-none {
1150
+ border-radius: 0px;
1151
+ }
1140
1152
  .rounded-xl {
1141
1153
  border-radius: 0.75rem;
1142
1154
  }
@@ -1655,6 +1667,12 @@ video {
1655
1667
  padding-top: 1px;
1656
1668
  padding-bottom: 1px;
1657
1669
  }
1670
+ .\!pl-\[8px\] {
1671
+ padding-left: 8px !important;
1672
+ }
1673
+ .\!pr-8 {
1674
+ padding-right: 2rem !important;
1675
+ }
1658
1676
  .pb-0 {
1659
1677
  padding-bottom: 0px;
1660
1678
  }
@@ -2452,6 +2470,13 @@ video {
2452
2470
 
2453
2471
 
2454
2472
 
2473
+ .focus\:\!border-indigo-300:focus {
2474
+ --tw-border-opacity: 1 !important;
2475
+ border-color: rgb(165 180 252 / var(--tw-border-opacity)) !important;
2476
+ }
2477
+
2478
+
2479
+
2455
2480
  .focus\:border-amber-500:focus {
2456
2481
  --tw-border-opacity: 1;
2457
2482
  border-color: rgb(245 158 11 / var(--tw-border-opacity));
@@ -2712,6 +2737,13 @@ video {
2712
2737
 
2713
2738
 
2714
2739
 
2740
+ .focus\:\!ring-indigo-200:focus {
2741
+ --tw-ring-opacity: 1 !important;
2742
+ --tw-ring-color: rgb(199 210 254 / var(--tw-ring-opacity)) !important;
2743
+ }
2744
+
2745
+
2746
+
2715
2747
  .focus\:ring-amber-500:focus {
2716
2748
  --tw-ring-opacity: 1;
2717
2749
  --tw-ring-color: rgb(245 158 11 / var(--tw-ring-opacity));
@@ -7,6 +7,7 @@ import FormField from "../form/FormField.js";
7
7
  import InputField from "../form/InputField.js";
8
8
  import SelectField from "../form/SelectField.js";
9
9
  import Spinner from "../Spinner.js";
10
+ import DateRangeField from "../form/DateRangeField.js";
10
11
  import "../../index.esm-DjnEVdAW.js";
11
12
  import "../../contexts/FederationContext.js";
12
13
  import { useFederationContext } from "../../contexts/useFederationContext.js";
@@ -21976,8 +21977,8 @@ function DataTableServer({
21976
21977
  className: "shadow-lg border border-gray-200 rounded-xl",
21977
21978
  style: { overflowY: "visible" },
21978
21979
  children: [
21979
- showHeader && /* @__PURE__ */ jsxs("div", { className: "p-5 leading-9 flex", children: [
21980
- /* @__PURE__ */ jsxs("div", { className: "flex-grow", children: [
21980
+ showHeader && /* @__PURE__ */ jsxs("div", { className: "p-4 leading-9 flex ", children: [
21981
+ /* @__PURE__ */ jsxs("div", { className: "flex-grow content-center", children: [
21981
21982
  title && /* @__PURE__ */ jsx("h1", { className: "font-semibold text-xl leading-[42px]", children: title }),
21982
21983
  subtitle && /* @__PURE__ */ jsx("p", { className: "font-normal text-gray-600", children: subtitle }),
21983
21984
  " ",
@@ -22003,7 +22004,7 @@ function DataTableServer({
22003
22004
  ]
22004
22005
  }
22005
22006
  ),
22006
- allowSearch && /* @__PURE__ */ jsx("div", { className: "ml-5", children: /* @__PURE__ */ jsxs(
22007
+ allowSearch && /* @__PURE__ */ jsx("div", { className: "ml-5", children: /* @__PURE__ */ jsx(
22007
22008
  FormField,
22008
22009
  {
22009
22010
  placeholder: "Vyhledávání",
@@ -22011,111 +22012,129 @@ function DataTableServer({
22011
22012
  onInputChange: handleSearchChanged,
22012
22013
  type: "text",
22013
22014
  value: fulltextSearch,
22014
- children: [
22015
- " ",
22016
- /* @__PURE__ */ jsxs("div", { className: " text-gray-500 leading-5 flex items-center h-full", children: [
22017
- !fulltextSearch && /* @__PURE__ */ jsx(MdSearch, {}),
22018
- fulltextSearch && /* @__PURE__ */ jsx(MdClose, { onClick: () => setFulltextSearch("") })
22019
- ] })
22020
- ]
22015
+ children: /* @__PURE__ */ jsxs("div", { className: " text-gray-500 leading-5 flex items-center h-full", children: [
22016
+ !fulltextSearch && /* @__PURE__ */ jsx(MdSearch, {}),
22017
+ fulltextSearch && /* @__PURE__ */ jsx(MdClose, { onClick: () => setFulltextSearch("") })
22018
+ ] })
22021
22019
  }
22022
22020
  ) })
22023
22021
  ] }),
22024
22022
  /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsxs("table", { className: "w-full leading-normal ", children: [
22025
- /* @__PURE__ */ jsxs("thead", { children: [
22026
- showColFilters && columns.findIndex((it) => it.filterType) > -1 && /* @__PURE__ */ jsxs("tr", { children: [
22027
- data && bulkAction && /* @__PURE__ */ jsx("td", { children: " " }),
22028
- columns.map(
22029
- ({ key, header, filterType, filterParam, width }) => /* @__PURE__ */ jsxs(
22030
- "th",
22031
- {
22032
- id: String(key) + "_filter",
22033
- className: `font-medium leading-9 text-xs text-left p-0 pb-1 text-gray-600 overflow-ellipsis whitespace-nowrap ${!title && !subtitle ? "border-t-0" : ""}`,
22034
- style: { width },
22035
- children: [
22036
- filterType && filterType === "select" && /* @__PURE__ */ jsx(
22037
- SelectField,
22038
- {
22039
- label: header,
22040
- name: String(key) + "_filter",
22041
- onInputChange: (e) => filterHandler(
22042
- filterParam,
22043
- e.target.value
22044
- ),
22045
- type: filterType,
22046
- options: filterOptions[String(filterParam)] || [],
22047
- value: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22048
- clearable: true,
22049
- className: "px-1"
22050
- }
22051
- ),
22052
- filterType && filterType !== "select" && /* @__PURE__ */ jsx(
22053
- InputField,
22054
- {
22055
- label: header,
22056
- name: String(key) + "_filter",
22057
- onInputChange: (e) => filterHandler(
22058
- filterParam,
22059
- e.target.value
22060
- ),
22061
- type: filterType,
22062
- value: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22063
- clearable: true,
22064
- className: "max-w-[300px] min-w-[100px] px-1"
22065
- }
22066
- )
22067
- ]
22068
- },
22069
- String(key) + "_filter"
22070
- )
22071
- )
22072
- ] }),
22073
- /* @__PURE__ */ jsxs("tr", { children: [
22074
- data && bulkAction && /* @__PURE__ */ jsx("th", { className: "w-[20px] h-10 hover:bg-gray-200 bg-gray-50 font-medium text-xs text-center text-gray-600 cursor-pointer border-t border-b border-gray-200", children: /* @__PURE__ */ jsx("label", { className: "w-full h-full flex items-center justify-center cursor-pointer px-2", children: /* @__PURE__ */ jsx(
22075
- "input",
22023
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
22024
+ data && bulkAction && /* @__PURE__ */ jsx("th", { className: "w-[20px] h-10 hover:bg-gray-200 bg-gray-50 font-medium text-xs text-center text-gray-600 cursor-pointer border-t border-b border-gray-200", children: /* @__PURE__ */ jsx("label", { className: "w-full h-full flex items-center justify-center cursor-pointer px-2", children: /* @__PURE__ */ jsx(
22025
+ "input",
22026
+ {
22027
+ id: "selectAll",
22028
+ type: "checkbox",
22029
+ className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded !focus:ring-indigo-200 focus:ring-4",
22030
+ onChange: handleSelectAll,
22031
+ checked: data && selectedItems.length === data.content.length && data.content.length > 0
22032
+ }
22033
+ ) }) }),
22034
+ columns.map(
22035
+ ({
22036
+ key,
22037
+ header,
22038
+ actions,
22039
+ sortParam,
22040
+ width,
22041
+ filterType,
22042
+ filterParam,
22043
+ filterParam2
22044
+ }, index) => /* @__PURE__ */ jsx(
22045
+ Resizable,
22076
22046
  {
22077
- id: "selectAll",
22078
- type: "checkbox",
22079
- className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-indigo-200 focus:ring-4",
22080
- onChange: handleSelectAll,
22081
- checked: data && selectedItems.length === data.content.length && data.content.length > 0
22082
- }
22083
- ) }) }),
22084
- columns.map(
22085
- ({ key, header, actions, sortParam, width }, index) => /* @__PURE__ */ jsx(
22086
- Resizable,
22087
- {
22088
- tableId: id,
22089
- colKey: String(key),
22090
- defaultWidth: width || "auto",
22091
- children: ({ ref }) => /* @__PURE__ */ jsxs(
22092
- "th",
22093
- {
22094
- className: `tableHeader relative font-medium leading-9 text-xs text-left px-3 text-gray-600 bg-gray-50 border-t border-b border-gray-200 ${!title && !subtitle ? "border-t-0" : ""} ${sortParam ? " cursor-pointer " : ""}`,
22095
- onClick: () => sortParam ? requestSort(sortParam) : void 0,
22096
- children: [
22097
- /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 group select-none w-full", children: [
22098
- header,
22099
- " ",
22100
- !actions && sortParam ? getSortIcon(sortParam) : ""
22101
- ] }),
22102
- /* @__PURE__ */ jsx(
22103
- "div",
22104
- {
22105
- className: `resizer absolute top-0 right-0 h-full w-2 bg-transparent ${index < columns.length - 1 ? "cursor-col-resize hover:border-x border-gray-300 border-r w-1" : "w-0"}`,
22106
- ref,
22107
- onClick: (e) => e.stopPropagation()
22108
- }
22109
- )
22110
- ]
22111
- }
22112
- )
22113
- },
22114
- String(key) + currentPage
22115
- )
22047
+ tableId: id,
22048
+ colKey: String(key),
22049
+ defaultWidth: width || "auto",
22050
+ children: ({ ref }) => /* @__PURE__ */ jsxs(
22051
+ "th",
22052
+ {
22053
+ className: `tableHeader relative font-medium leading-9 text-xs text-left px-3 text-gray-600
22054
+ bg-gray-50 border-t border-b border-gray-200 content-start ${!title && !subtitle ? "border-t-0" : ""} ${sortParam ? " cursor-pointer " : ""}`,
22055
+ onClick: () => sortParam ? requestSort(sortParam) : void 0,
22056
+ children: [
22057
+ /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 group select-none w-full", children: [
22058
+ header,
22059
+ " ",
22060
+ !actions && sortParam ? getSortIcon(sortParam) : ""
22061
+ ] }),
22062
+ /* @__PURE__ */ jsx(
22063
+ "div",
22064
+ {
22065
+ className: `resizer absolute top-0 right-0 h-full w-2 bg-transparent ${index < columns.length - 1 ? "cursor-col-resize hover:border-x border-gray-300 border-r w-1" : "w-0"}`,
22066
+ ref,
22067
+ onClick: (e) => e.stopPropagation()
22068
+ }
22069
+ ),
22070
+ showColFilters && /* @__PURE__ */ jsx(
22071
+ "div",
22072
+ {
22073
+ className: "p-0 m-0 pb-2",
22074
+ onClick: (e) => e.stopPropagation(),
22075
+ children: filterType === "select" ? /* @__PURE__ */ jsx(
22076
+ SelectField,
22077
+ {
22078
+ name: String(key) + "_filter",
22079
+ onInputChange: (e) => filterHandler(
22080
+ filterParam,
22081
+ e.target.value
22082
+ ),
22083
+ type: filterType,
22084
+ options: filterOptions[String(filterParam)] || [],
22085
+ value: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22086
+ clearable: true,
22087
+ className: " px-0",
22088
+ placeholder: "Filtr",
22089
+ rounded: true
22090
+ }
22091
+ ) : filterType === "dateRange" ? /* @__PURE__ */ jsx(
22092
+ DateRangeField,
22093
+ {
22094
+ name: String(filterParam),
22095
+ nameEnd: String(filterParam2),
22096
+ onInputChange: (e) => filterHandler(
22097
+ e.target.name,
22098
+ e.target.value
22099
+ ),
22100
+ type: filterType,
22101
+ options: filterOptions[String(filterParam)] || [],
22102
+ value: {
22103
+ startDate: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22104
+ endDate: (columnFilters == null ? void 0 : columnFilters[String(filterParam2)]) || ""
22105
+ },
22106
+ clearable: true,
22107
+ className: " px-0 py-0 ",
22108
+ placeholder: "Filtr",
22109
+ rounded: true
22110
+ }
22111
+ ) : /* @__PURE__ */ jsx(
22112
+ InputField,
22113
+ {
22114
+ name: String(key) + "_filter",
22115
+ onInputChange: (e) => filterHandler(
22116
+ filterParam,
22117
+ e.target.value
22118
+ ),
22119
+ type: filterType,
22120
+ value: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22121
+ clearable: true,
22122
+ className: " min-w-[100px] px-0 ",
22123
+ rounded: true,
22124
+ placeholder: "Filtr",
22125
+ debounceTimeout: 1e3
22126
+ }
22127
+ )
22128
+ }
22129
+ )
22130
+ ]
22131
+ }
22132
+ )
22133
+ },
22134
+ String(key) + currentPage
22116
22135
  )
22117
- ] })
22118
- ] }),
22136
+ )
22137
+ ] }) }),
22119
22138
  data && (data == null ? void 0 : data.content) && (data == null ? void 0 : data.content.length) > 0 && /* @__PURE__ */ jsxs("tbody", { className: "relative", children: [
22120
22139
  isLoading && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gray-300 opacity-50 z-50", children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx(Spinner, {}) }) }) }) }),
22121
22140
  data.content.map((item, rowIndex) => /* @__PURE__ */ jsxs(
@@ -22127,7 +22146,7 @@ function DataTableServer({
22127
22146
  "input",
22128
22147
  {
22129
22148
  type: "checkbox",
22130
- className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-indigo-200 focus:ring-4",
22149
+ className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded !focus:ring-indigo-200 focus:ring-4",
22131
22150
  checked: isSelected(item) || false,
22132
22151
  onChange: () => handleSelectItem(item)
22133
22152
  }