@addsign/moje-agenda-shared-lib 2.0.45 → 2.0.46

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.
@@ -22125,6 +22125,7 @@ function DataTableServer({
22125
22125
  {
22126
22126
  className: "shadow-lg border border-gray-200 rounded-xl",
22127
22127
  style: { overflowY: "visible" },
22128
+ "data-cy": "datatable-container-" + id,
22128
22129
  children: [
22129
22130
  showHeader && /* @__PURE__ */ jsxs("div", { className: "p-4 leading-9 flex ", children: [
22130
22131
  /* @__PURE__ */ jsxs("div", { className: "flex-grow content-center", children: [
@@ -22147,6 +22148,7 @@ function DataTableServer({
22147
22148
  className: "flex items-center text-xl h-full p-3 cursor-pointer text-gray-500 hover:text-black",
22148
22149
  title: showColFilters ? "Zrušit filtr podle sloupců" : "Filtrovat podle sloupců",
22149
22150
  onClick: handleToggleShowColFilters,
22151
+ "data-cy": "datatable-filter-toggle",
22150
22152
  children: [
22151
22153
  !showColFilters && /* @__PURE__ */ jsx(MdOutlineFilterAlt, {}),
22152
22154
  showColFilters && /* @__PURE__ */ jsx(MdOutlineFilterAltOff, { className: "text-danger" })
@@ -22168,242 +22170,251 @@ function DataTableServer({
22168
22170
  }
22169
22171
  ) })
22170
22172
  ] }),
22171
- /* @__PURE__ */ jsx("div", { className: "overflow-auto min-h-[500px]", children: /* @__PURE__ */ jsxs("table", { className: "w-full leading-normal", children: [
22172
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
22173
- 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(
22174
- "input",
22175
- {
22176
- id: "selectAll",
22177
- type: "checkbox",
22178
- className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded !focus:ring-indigo-200 focus:ring-4",
22179
- onChange: handleSelectAll,
22180
- checked: data && selectedItems.length === data.content.length && data.content.length > 0
22181
- }
22182
- ) }) }),
22183
- columns.map(
22184
- ({
22185
- key,
22186
- header,
22187
- actions,
22188
- sortParam,
22189
- width,
22190
- filterType,
22191
- filterParam,
22192
- filterParam2
22193
- }, index) => /* @__PURE__ */ jsx(
22194
- Resizable,
22195
- {
22196
- tableId: id,
22197
- colKey: String(key),
22198
- defaultWidth: width || "auto",
22199
- children: ({ ref }) => /* @__PURE__ */ jsxs(
22200
- "th",
22173
+ /* @__PURE__ */ jsx("div", { className: "overflow-auto min-h-[500px]", children: /* @__PURE__ */ jsxs(
22174
+ "table",
22175
+ {
22176
+ className: "w-full leading-normal",
22177
+ "data-cy": "datatable-table-" + id,
22178
+ children: [
22179
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
22180
+ 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(
22181
+ "input",
22182
+ {
22183
+ id: "selectAll",
22184
+ type: "checkbox",
22185
+ className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded !focus:ring-indigo-200 focus:ring-4",
22186
+ onChange: handleSelectAll,
22187
+ checked: data && selectedItems.length === data.content.length && data.content.length > 0
22188
+ }
22189
+ ) }) }),
22190
+ columns.map(
22191
+ ({
22192
+ key,
22193
+ header,
22194
+ actions,
22195
+ sortParam,
22196
+ width,
22197
+ filterType,
22198
+ filterParam,
22199
+ filterParam2
22200
+ }, index) => /* @__PURE__ */ jsx(
22201
+ Resizable,
22201
22202
  {
22202
- className: `tableHeader relative font-medium text-xs !leading-9 text-left px-3 text-gray-600
22203
+ tableId: id,
22204
+ colKey: String(key),
22205
+ defaultWidth: width || "auto",
22206
+ children: ({ ref }) => /* @__PURE__ */ jsxs(
22207
+ "th",
22208
+ {
22209
+ className: `tableHeader relative font-medium text-xs !leading-9 text-left px-3 text-gray-600
22203
22210
  bg-gray-50 border-t border-b border-gray-200 content-start ${!title && !subtitle ? "border-t-0" : ""} ${sortParam ? " cursor-pointer " : ""}`,
22204
- onClick: () => sortParam ? requestSort(sortParam) : void 0,
22205
- children: [
22206
- /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 group select-none w-full", children: [
22207
- header,
22208
- " ",
22209
- !actions && sortParam ? getSortIcon(sortParam) : ""
22210
- ] }),
22211
- /* @__PURE__ */ jsx(
22212
- "div",
22213
- {
22214
- 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"}`,
22215
- ref,
22216
- onClick: (e) => e.stopPropagation()
22217
- }
22218
- ),
22219
- showColFilters && /* @__PURE__ */ jsx(
22220
- "div",
22221
- {
22222
- className: "p-0 m-0 pb-2",
22223
- onClick: (e) => e.stopPropagation(),
22224
- children: filterType === "select" ? /* @__PURE__ */ jsx(
22225
- SelectField,
22226
- {
22227
- name: String(key) + "_filter",
22228
- onInputChange: (e) => filterHandler(
22229
- filterParam,
22230
- e.target.value
22231
- ),
22232
- type: filterType,
22233
- options: filterOptions[String(filterParam)] || [],
22234
- value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) ?? "",
22235
- clearable: true,
22236
- className: "px-0",
22237
- placeholder: "Zadejte filtr",
22238
- rounded: true,
22239
- disabled: Object.keys(
22240
- filters || {}
22241
- ).includes(String(filterParam))
22242
- }
22243
- ) : filterType === "multi-select" ? /* @__PURE__ */ jsx(
22244
- MultiSelect,
22211
+ onClick: () => sortParam ? requestSort(sortParam) : void 0,
22212
+ "data-cy": "datatable-header-" + id + "-" + String(key),
22213
+ children: [
22214
+ /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 group select-none w-full", children: [
22215
+ header,
22216
+ " ",
22217
+ !actions && sortParam ? getSortIcon(sortParam) : ""
22218
+ ] }),
22219
+ /* @__PURE__ */ jsx(
22220
+ "div",
22245
22221
  {
22246
- options: filterOptions[String(filterParam)] || [],
22247
- onChange: (values) => filterHandler(
22248
- filterParam,
22249
- values
22250
- ),
22251
- value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || [],
22252
- placeholder: "Zadejte filtr",
22253
- className: "px-0",
22254
- disabled: Object.keys(
22255
- filters || {}
22256
- ).includes(String(filterParam)),
22257
- variant: "secondary"
22222
+ 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"}`,
22223
+ ref,
22224
+ onClick: (e) => e.stopPropagation()
22258
22225
  }
22259
- ) : filterType === "dateRange" ? /* @__PURE__ */ jsx(
22260
- DateRangeField,
22226
+ ),
22227
+ showColFilters && /* @__PURE__ */ jsx(
22228
+ "div",
22261
22229
  {
22262
- name: String(filterParam),
22263
- nameEnd: String(filterParam2),
22264
- onInputChange: (e) => filterHandler(
22265
- e.target.name,
22266
- e.target.value
22267
- ),
22268
- type: filterType,
22269
- value: {
22270
- startDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22271
- endDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam2)]) || ""
22272
- },
22273
- clearable: true,
22274
- className: " px-0 py-0 ",
22275
- placeholder: "Zadejte filtr",
22276
- rounded: true,
22277
- disabled: Object.keys(
22278
- filters || {}
22279
- ).includes(String(filterParam))
22230
+ className: "p-0 m-0 pb-2",
22231
+ onClick: (e) => e.stopPropagation(),
22232
+ children: filterType === "select" ? /* @__PURE__ */ jsx(
22233
+ SelectField,
22234
+ {
22235
+ name: String(key) + "_filter",
22236
+ onInputChange: (e) => filterHandler(
22237
+ filterParam,
22238
+ e.target.value
22239
+ ),
22240
+ type: filterType,
22241
+ options: filterOptions[String(filterParam)] || [],
22242
+ value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) ?? "",
22243
+ clearable: true,
22244
+ className: "px-0",
22245
+ placeholder: "Zadejte filtr",
22246
+ rounded: true,
22247
+ disabled: Object.keys(
22248
+ filters || {}
22249
+ ).includes(String(filterParam))
22250
+ }
22251
+ ) : filterType === "multi-select" ? /* @__PURE__ */ jsx(
22252
+ MultiSelect,
22253
+ {
22254
+ options: filterOptions[String(filterParam)] || [],
22255
+ onChange: (values) => filterHandler(
22256
+ filterParam,
22257
+ values
22258
+ ),
22259
+ value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || [],
22260
+ placeholder: "Zadejte filtr",
22261
+ className: "px-0",
22262
+ disabled: Object.keys(
22263
+ filters || {}
22264
+ ).includes(String(filterParam)),
22265
+ variant: "secondary"
22266
+ }
22267
+ ) : filterType === "dateRange" ? /* @__PURE__ */ jsx(
22268
+ DateRangeField,
22269
+ {
22270
+ name: String(filterParam),
22271
+ nameEnd: String(filterParam2),
22272
+ onInputChange: (e) => filterHandler(
22273
+ e.target.name,
22274
+ e.target.value
22275
+ ),
22276
+ type: filterType,
22277
+ value: {
22278
+ startDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22279
+ endDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam2)]) || ""
22280
+ },
22281
+ clearable: true,
22282
+ className: " px-0 py-0 ",
22283
+ placeholder: "Zadejte filtr",
22284
+ rounded: true,
22285
+ disabled: Object.keys(
22286
+ filters || {}
22287
+ ).includes(String(filterParam))
22288
+ }
22289
+ ) : filterType === "date" ? /* @__PURE__ */ jsx(
22290
+ DateField,
22291
+ {
22292
+ name: String(filterParam),
22293
+ onInputChange: (e) => filterHandler(
22294
+ e.target.name,
22295
+ e.target.value
22296
+ ),
22297
+ type: filterType,
22298
+ value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22299
+ clearable: true,
22300
+ className: " px-0 py-0 ",
22301
+ placeholder: "Zadejte filtr",
22302
+ rounded: true,
22303
+ disabled: Object.keys(
22304
+ filters || {}
22305
+ ).includes(String(filterParam))
22306
+ }
22307
+ ) : filterType === "text" ? /* @__PURE__ */ jsx(
22308
+ InputField,
22309
+ {
22310
+ name: String(key) + "_filter",
22311
+ onInputChange: (e) => filterHandler(
22312
+ filterParam,
22313
+ e.target.value
22314
+ ),
22315
+ type: filterType,
22316
+ value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22317
+ disabled: Object.keys(
22318
+ filters || {}
22319
+ ).includes(String(filterParam)),
22320
+ clearable: true,
22321
+ className: " min-w-[100px] px-0 ",
22322
+ rounded: true,
22323
+ placeholder: "Zadejte filtr",
22324
+ debounceTimeout: 1e3
22325
+ }
22326
+ ) : null
22280
22327
  }
22281
- ) : filterType === "date" ? /* @__PURE__ */ jsx(
22282
- DateField,
22283
- {
22284
- name: String(filterParam),
22285
- onInputChange: (e) => filterHandler(
22286
- e.target.name,
22287
- e.target.value
22288
- ),
22289
- type: filterType,
22290
- value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22291
- clearable: true,
22292
- className: " px-0 py-0 ",
22293
- placeholder: "Zadejte filtr",
22294
- rounded: true,
22295
- disabled: Object.keys(
22296
- filters || {}
22297
- ).includes(String(filterParam))
22298
- }
22299
- ) : filterType === "text" ? /* @__PURE__ */ jsx(
22300
- InputField,
22301
- {
22302
- name: String(key) + "_filter",
22303
- onInputChange: (e) => filterHandler(
22304
- filterParam,
22305
- e.target.value
22306
- ),
22307
- type: filterType,
22308
- value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22309
- disabled: Object.keys(
22310
- filters || {}
22311
- ).includes(String(filterParam)),
22312
- clearable: true,
22313
- className: " min-w-[100px] px-0 ",
22314
- rounded: true,
22315
- placeholder: "Zadejte filtr",
22316
- debounceTimeout: 1e3
22317
- }
22318
- ) : null
22319
- }
22320
- )
22321
- ]
22322
- }
22323
- )
22324
- },
22325
- String(key)
22326
- )
22327
- )
22328
- ] }) }),
22329
- !isLoading && data && (data == null ? void 0 : data.content) && (data == null ? void 0 : data.content.length) > 0 && /* @__PURE__ */ jsxs("tbody", { className: "relative", children: [
22330
- data.content.map((item, rowIndex) => /* @__PURE__ */ jsxs(
22331
- "tr",
22332
- {
22333
- className: `${item._isHighlighted || isSelected(item) ? "bg-gray-50" : ""} hover:bg-gray-100 border-gray-200 border-b text-sm`,
22334
- children: [
22335
- bulkAction && /* @__PURE__ */ jsx("td", { className: "w-[20px] h-[52px] hover:bg-gray-200 font-medium text-xs text-center text-gray-600 cursor-pointer", children: /* @__PURE__ */ jsx("label", { className: "w-full h-full flex items-center justify-center cursor-pointer px-2", children: /* @__PURE__ */ jsx(
22336
- "input",
22337
- {
22338
- type: "checkbox",
22339
- className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded !focus:ring-indigo-200 focus:ring-4",
22340
- checked: isSelected(item) || false,
22341
- onChange: () => handleSelectItem(item)
22342
- }
22343
- ) }) }),
22344
- columns.map(({ render, actions, classes }, colIndex) => /* @__PURE__ */ jsxs(
22345
- "td",
22346
- {
22347
- onClick: rowAction ? () => rowAction(item) : void 0,
22348
- className: `px-3 py-2 text-gray-700 ${rowAction ? "cursor-pointer" : ""} ${colIndex === 0 ? "font-medium " : ""} ${classes || ""}`,
22349
- children: [
22350
- render ? render(item) : "",
22351
- actions && actions.filter((it) => {
22352
- if (it.rowAction)
22353
- return false;
22354
- if (it.visible) {
22355
- return it.visible(item);
22356
- } else
22357
- return true;
22358
- }).map((action, actionIndex) => /* @__PURE__ */ jsxs(
22359
- "div",
22360
- {
22361
- className: "inline-flex align-middle",
22362
- children: [
22363
- action.icon && /* @__PURE__ */ jsx(
22364
- Button,
22365
- {
22366
- variant: "icon",
22367
- onClick: () => action.onClick(item),
22368
- children: action.icon
22369
- }
22370
- ),
22371
- !action.icon && /* @__PURE__ */ jsx(
22372
- Button,
22373
- {
22374
- variant: "primary",
22375
- onClick: (e) => {
22376
- e.stopPropagation();
22377
- action.onClick(item);
22378
- },
22379
- children: action.label
22380
- }
22381
- )
22382
- ]
22383
- },
22384
- `${rowIndex}-${colIndex}-${actionIndex}`
22385
- ))
22386
- ]
22328
+ )
22329
+ ]
22330
+ }
22331
+ )
22387
22332
  },
22388
- `${rowIndex}-${colIndex}`
22389
- ))
22390
- ]
22391
- },
22392
- rowIndex
22393
- )),
22394
- ((_a = data == null ? void 0 : data.content) == null ? void 0 : _a.length) === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
22395
- "td",
22396
- {
22397
- className: "px-5 py-3 border-b border-gray-200 bg-white text-sm items-center justify-center align-middle",
22398
- colSpan: columns.length,
22399
- children: "No data"
22400
- },
22401
- "td-nodata"
22402
- ) }, "tr-nodata")
22403
- ] }),
22404
- isLoading && /* @__PURE__ */ jsx("tbody", { className: "relative", children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 100, children: /* @__PURE__ */ jsx("div", { className: "w-full flex items-center justify-center h-[500px] py-2", children: /* @__PURE__ */ jsx(Spinner, {}) }) }) }) }),
22405
- !isLoading && (!data || ((_b = data == null ? void 0 : data.content) == null ? void 0 : _b.length) === 0) && /* @__PURE__ */ jsx("tbody", { className: "relative h-[440px]", children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 100, children: /* @__PURE__ */ jsx("div", { className: "w-full flex items-center justify-center h-full py-2 text-gray-600 font-medium text-xs ", children: "Žádná data" }) }) }) })
22406
- ] }, tableKey) }),
22333
+ String(key)
22334
+ )
22335
+ )
22336
+ ] }) }),
22337
+ !isLoading && data && (data == null ? void 0 : data.content) && (data == null ? void 0 : data.content.length) > 0 && /* @__PURE__ */ jsxs("tbody", { className: "relative", children: [
22338
+ data.content.map((item, rowIndex) => /* @__PURE__ */ jsxs(
22339
+ "tr",
22340
+ {
22341
+ className: `${item._isHighlighted || isSelected(item) ? "bg-gray-50" : ""} hover:bg-gray-100 border-gray-200 border-b text-sm`,
22342
+ children: [
22343
+ bulkAction && /* @__PURE__ */ jsx("td", { className: "w-[20px] h-[52px] hover:bg-gray-200 font-medium text-xs text-center text-gray-600 cursor-pointer", children: /* @__PURE__ */ jsx("label", { className: "w-full h-full flex items-center justify-center cursor-pointer px-2", children: /* @__PURE__ */ jsx(
22344
+ "input",
22345
+ {
22346
+ type: "checkbox",
22347
+ className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded !focus:ring-indigo-200 focus:ring-4",
22348
+ checked: isSelected(item) || false,
22349
+ onChange: () => handleSelectItem(item)
22350
+ }
22351
+ ) }) }),
22352
+ columns.map(({ render, actions, classes }, colIndex) => /* @__PURE__ */ jsxs(
22353
+ "td",
22354
+ {
22355
+ onClick: rowAction ? () => rowAction(item) : void 0,
22356
+ className: `px-3 py-2 text-gray-700 ${rowAction ? "cursor-pointer" : ""} ${colIndex === 0 ? "font-medium " : ""} ${classes || ""}`,
22357
+ children: [
22358
+ render ? render(item) : "",
22359
+ actions && actions.filter((it) => {
22360
+ if (it.rowAction)
22361
+ return false;
22362
+ if (it.visible) {
22363
+ return it.visible(item);
22364
+ } else
22365
+ return true;
22366
+ }).map((action, actionIndex) => /* @__PURE__ */ jsxs(
22367
+ "div",
22368
+ {
22369
+ className: "inline-flex align-middle",
22370
+ children: [
22371
+ action.icon && /* @__PURE__ */ jsx(
22372
+ Button,
22373
+ {
22374
+ variant: "icon",
22375
+ onClick: () => action.onClick(item),
22376
+ children: action.icon
22377
+ }
22378
+ ),
22379
+ !action.icon && /* @__PURE__ */ jsx(
22380
+ Button,
22381
+ {
22382
+ variant: "primary",
22383
+ onClick: (e) => {
22384
+ e.stopPropagation();
22385
+ action.onClick(item);
22386
+ },
22387
+ children: action.label
22388
+ }
22389
+ )
22390
+ ]
22391
+ },
22392
+ `${rowIndex}-${colIndex}-${actionIndex}`
22393
+ ))
22394
+ ]
22395
+ },
22396
+ `${rowIndex}-${colIndex}`
22397
+ ))
22398
+ ]
22399
+ },
22400
+ rowIndex
22401
+ )),
22402
+ ((_a = data == null ? void 0 : data.content) == null ? void 0 : _a.length) === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
22403
+ "td",
22404
+ {
22405
+ className: "px-5 py-3 border-b border-gray-200 bg-white text-sm items-center justify-center align-middle",
22406
+ colSpan: columns.length,
22407
+ children: "No data"
22408
+ },
22409
+ "td-nodata"
22410
+ ) }, "tr-nodata")
22411
+ ] }),
22412
+ isLoading && /* @__PURE__ */ jsx("tbody", { className: "relative", children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 100, children: /* @__PURE__ */ jsx("div", { className: "w-full flex items-center justify-center h-[500px] py-2", children: /* @__PURE__ */ jsx(Spinner, {}) }) }) }) }),
22413
+ !isLoading && (!data || ((_b = data == null ? void 0 : data.content) == null ? void 0 : _b.length) === 0) && /* @__PURE__ */ jsx("tbody", { className: "relative h-[440px]", children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 100, children: /* @__PURE__ */ jsx("div", { className: "w-full flex items-center justify-center h-full py-2 text-gray-600 font-medium text-xs ", children: "Žádná data" }) }) }) })
22414
+ ]
22415
+ },
22416
+ tableKey
22417
+ ) }),
22407
22418
  (data == null ? void 0 : data.isPageable) && /* @__PURE__ */ jsxs(
22408
22419
  "div",
22409
22420
  {
@@ -22418,6 +22429,7 @@ function DataTableServer({
22418
22429
  onClick: prevPage,
22419
22430
  className: "flex items-center",
22420
22431
  disabled: data.first || isLoading,
22432
+ "data-cy": "prev-page",
22421
22433
  children: [
22422
22434
  /* @__PURE__ */ jsx(MdArrowBack, { className: "mr-1.5" }),
22423
22435
  " Předchozí"
@@ -22431,6 +22443,7 @@ function DataTableServer({
22431
22443
  onClick: nextPage,
22432
22444
  className: "flex items-center",
22433
22445
  disabled: data.last || isLoading,
22446
+ "data-cy": "next-page",
22434
22447
  children: [
22435
22448
  "Následující ",
22436
22449
  /* @__PURE__ */ jsx(MdArrowForward, { className: "ml-2", size: 20 })
@@ -22439,19 +22452,26 @@ function DataTableServer({
22439
22452
  )
22440
22453
  ] }),
22441
22454
  /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center text-gray-800", children: paginationDisplay }),
22442
- /* @__PURE__ */ jsxs("div", { className: "content-center w-auto items-center justify-end flex-row gap-5 flex md:mt-0 mt-5", children: [
22443
- /* @__PURE__ */ jsx("span", { className: " whitespace-nowrap flex-grow", children: "Počet řádků na stránku:" }),
22444
- /* @__PURE__ */ jsx(
22445
- SelectField,
22446
- {
22447
- name: "itemsPerPage",
22448
- onInputChange: handleItemsPerPageChange,
22449
- className: "!w-[100px]",
22450
- options: itemsPerPageOptions || defaultItemsPerPageOptions,
22451
- value: itemsPerPageLocal
22452
- }
22453
- )
22454
- ] })
22455
+ /* @__PURE__ */ jsxs(
22456
+ "div",
22457
+ {
22458
+ className: "content-center w-auto items-center justify-end flex-row gap-5 flex md:mt-0 mt-5",
22459
+ "data-cy": "items-per-page",
22460
+ children: [
22461
+ /* @__PURE__ */ jsx("span", { className: " whitespace-nowrap flex-grow", children: "Počet řádků na stránku:" }),
22462
+ /* @__PURE__ */ jsx(
22463
+ SelectField,
22464
+ {
22465
+ name: "itemsPerPage",
22466
+ onInputChange: handleItemsPerPageChange,
22467
+ className: "!w-[100px]",
22468
+ options: itemsPerPageOptions || defaultItemsPerPageOptions,
22469
+ value: itemsPerPageLocal
22470
+ }
22471
+ )
22472
+ ]
22473
+ }
22474
+ )
22455
22475
  ]
22456
22476
  }
22457
22477
  )