@addsign/moje-agenda-shared-lib 0.0.100 → 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
  }
@@ -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
  }
@@ -2458,6 +2470,13 @@ video {
2458
2470
 
2459
2471
 
2460
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
+
2461
2480
  .focus\:border-amber-500:focus {
2462
2481
  --tw-border-opacity: 1;
2463
2482
  border-color: rgb(245 158 11 / var(--tw-border-opacity));
@@ -2718,6 +2737,13 @@ video {
2718
2737
 
2719
2738
 
2720
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
+
2721
2747
  .focus\:ring-amber-500:focus {
2722
2748
  --tw-ring-opacity: 1;
2723
2749
  --tw-ring-color: rgb(245 158 11 / var(--tw-ring-opacity));
@@ -21977,8 +21977,8 @@ function DataTableServer({
21977
21977
  className: "shadow-lg border border-gray-200 rounded-xl",
21978
21978
  style: { overflowY: "visible" },
21979
21979
  children: [
21980
- showHeader && /* @__PURE__ */ jsxs("div", { className: "p-5 leading-9 flex", children: [
21981
- /* @__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: [
21982
21982
  title && /* @__PURE__ */ jsx("h1", { className: "font-semibold text-xl leading-[42px]", children: title }),
21983
21983
  subtitle && /* @__PURE__ */ jsx("p", { className: "font-normal text-gray-600", children: subtitle }),
21984
21984
  " ",
@@ -22004,7 +22004,7 @@ function DataTableServer({
22004
22004
  ]
22005
22005
  }
22006
22006
  ),
22007
- allowSearch && /* @__PURE__ */ jsx("div", { className: "ml-5", children: /* @__PURE__ */ jsxs(
22007
+ allowSearch && /* @__PURE__ */ jsx("div", { className: "ml-5", children: /* @__PURE__ */ jsx(
22008
22008
  FormField,
22009
22009
  {
22010
22010
  placeholder: "Vyhledávání",
@@ -22012,135 +22012,129 @@ function DataTableServer({
22012
22012
  onInputChange: handleSearchChanged,
22013
22013
  type: "text",
22014
22014
  value: fulltextSearch,
22015
- children: [
22016
- " ",
22017
- /* @__PURE__ */ jsxs("div", { className: " text-gray-500 leading-5 flex items-center h-full", children: [
22018
- !fulltextSearch && /* @__PURE__ */ jsx(MdSearch, {}),
22019
- fulltextSearch && /* @__PURE__ */ jsx(MdClose, { onClick: () => setFulltextSearch("") })
22020
- ] })
22021
- ]
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
+ ] })
22022
22019
  }
22023
22020
  ) })
22024
22021
  ] }),
22025
22022
  /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsxs("table", { className: "w-full leading-normal ", children: [
22026
- /* @__PURE__ */ jsxs("thead", { children: [
22027
- showColFilters && columns.findIndex((it) => it.filterType) > -1 && /* @__PURE__ */ jsxs("tr", { children: [
22028
- data && bulkAction && /* @__PURE__ */ jsx("td", { children: " " }),
22029
- columns.map(
22030
- ({
22031
- key,
22032
- header,
22033
- filterType,
22034
- filterParam,
22035
- filterParam2,
22036
- width
22037
- }) => /* @__PURE__ */ jsx(
22038
- "th",
22039
- {
22040
- id: String(key) + "_filter",
22041
- 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" : ""}`,
22042
- style: { width },
22043
- children: filterType === "select" ? /* @__PURE__ */ jsx(
22044
- SelectField,
22045
- {
22046
- label: header,
22047
- name: String(key) + "_filter",
22048
- onInputChange: (e) => filterHandler(
22049
- filterParam,
22050
- e.target.value
22051
- ),
22052
- type: filterType,
22053
- options: filterOptions[String(filterParam)] || [],
22054
- value: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22055
- clearable: true,
22056
- className: "px-1"
22057
- }
22058
- ) : filterType === "dateRange" ? /* @__PURE__ */ jsx(
22059
- DateRangeField,
22060
- {
22061
- label: header,
22062
- name: String(filterParam),
22063
- nameEnd: String(filterParam2),
22064
- onInputChange: (e) => filterHandler(
22065
- e.target.name,
22066
- e.target.value
22067
- ),
22068
- type: filterType,
22069
- options: filterOptions[String(filterParam)] || [],
22070
- value: {
22071
- startDate: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22072
- endDate: (columnFilters == null ? void 0 : columnFilters[String(filterParam2)]) || ""
22073
- },
22074
- clearable: true,
22075
- className: "px-1",
22076
- placeholder: "Zvolte období"
22077
- }
22078
- ) : /* @__PURE__ */ jsx(
22079
- InputField,
22080
- {
22081
- label: header,
22082
- name: String(key) + "_filter",
22083
- onInputChange: (e) => filterHandler(
22084
- filterParam,
22085
- e.target.value
22086
- ),
22087
- type: filterType,
22088
- value: (columnFilters == null ? void 0 : columnFilters[String(filterParam)]) || "",
22089
- clearable: true,
22090
- className: " min-w-[100px] px-1"
22091
- }
22092
- )
22093
- },
22094
- String(key) + "_filter"
22095
- )
22096
- )
22097
- ] }),
22098
- /* @__PURE__ */ jsxs("tr", { children: [
22099
- 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(
22100
- "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,
22101
22046
  {
22102
- id: "selectAll",
22103
- type: "checkbox",
22104
- className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-indigo-200 focus:ring-4",
22105
- onChange: handleSelectAll,
22106
- checked: data && selectedItems.length === data.content.length && data.content.length > 0
22107
- }
22108
- ) }) }),
22109
- columns.map(
22110
- ({ key, header, actions, sortParam, width }, index) => /* @__PURE__ */ jsx(
22111
- Resizable,
22112
- {
22113
- tableId: id,
22114
- colKey: String(key),
22115
- defaultWidth: width || "auto",
22116
- children: ({ ref }) => /* @__PURE__ */ jsxs(
22117
- "th",
22118
- {
22119
- 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 " : ""}`,
22120
- onClick: () => sortParam ? requestSort(sortParam) : void 0,
22121
- children: [
22122
- /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 group select-none w-full", children: [
22123
- header,
22124
- " ",
22125
- !actions && sortParam ? getSortIcon(sortParam) : ""
22126
- ] }),
22127
- /* @__PURE__ */ jsx(
22128
- "div",
22129
- {
22130
- 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"}`,
22131
- ref,
22132
- onClick: (e) => e.stopPropagation()
22133
- }
22134
- )
22135
- ]
22136
- }
22137
- )
22138
- },
22139
- String(key) + currentPage
22140
- )
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
22141
22135
  )
22142
- ] })
22143
- ] }),
22136
+ )
22137
+ ] }) }),
22144
22138
  data && (data == null ? void 0 : data.content) && (data == null ? void 0 : data.content.length) > 0 && /* @__PURE__ */ jsxs("tbody", { className: "relative", children: [
22145
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, {}) }) }) }) }),
22146
22140
  data.content.map((item, rowIndex) => /* @__PURE__ */ jsxs(
@@ -22152,7 +22146,7 @@ function DataTableServer({
22152
22146
  "input",
22153
22147
  {
22154
22148
  type: "checkbox",
22155
- 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",
22156
22150
  checked: isSelected(item) || false,
22157
22151
  onChange: () => handleSelectItem(item)
22158
22152
  }