@addsign/moje-agenda-shared-lib 2.0.66 → 2.0.67

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.
Files changed (56) hide show
  1. package/dist/Calendar-DWT4e7Th.js.map +1 -1
  2. package/dist/Combination-DmhTQmbL.js +996 -0
  3. package/dist/Combination-DmhTQmbL.js.map +1 -0
  4. package/dist/Dialog-3u5-ws89.js +424 -0
  5. package/dist/Dialog-3u5-ws89.js.map +1 -0
  6. package/dist/Dialog-CCrUyF91.js.map +1 -1
  7. package/dist/assets/style.css +0 -3
  8. package/dist/components/datatable/DataTableServer.js +254 -245
  9. package/dist/components/datatable/DataTableServer.js.map +1 -1
  10. package/dist/components/form/FileInputForm.d.ts +14 -0
  11. package/dist/components/form/FileInputForm.js +173 -0
  12. package/dist/components/form/FileInputForm.js.map +1 -0
  13. package/dist/components/form/FileInputFormMultiple.d.ts +16 -0
  14. package/dist/components/form/FileInputFormMultiple.js +240 -0
  15. package/dist/components/form/FileInputFormMultiple.js.map +1 -0
  16. package/dist/components/form/FileInputFull.d.ts +17 -0
  17. package/dist/components/form/FileInputFull.js +188 -0
  18. package/dist/components/form/FileInputFull.js.map +1 -0
  19. package/dist/components/form/FileInputFullMultiple.d.ts +19 -0
  20. package/dist/components/form/FileInputFullMultiple.js +226 -0
  21. package/dist/components/form/FileInputFullMultiple.js.map +1 -0
  22. package/dist/components/ui/Combobox.js.map +1 -1
  23. package/dist/components/ui/checkbox.js.map +1 -1
  24. package/dist/components/ui/command.js.map +1 -1
  25. package/dist/components/ui/radioGroup.js.map +1 -1
  26. package/dist/components/ui/toast.js.map +1 -1
  27. package/dist/handleErrors-B2be_Hgy.js +31615 -0
  28. package/dist/handleErrors-B2be_Hgy.js.map +1 -0
  29. package/dist/handleErrors-P52guX3U.js +32 -0
  30. package/dist/handleErrors-P52guX3U.js.map +1 -0
  31. package/dist/index-BikTN7j8.js +2266 -0
  32. package/dist/index-BikTN7j8.js.map +1 -0
  33. package/dist/main.d.ts +2 -0
  34. package/dist/main.js +34 -30
  35. package/dist/main.js.map +1 -1
  36. package/dist/popover-BLI2Jq-c.js +319 -0
  37. package/dist/popover-BLI2Jq-c.js.map +1 -0
  38. package/dist/popover-CcrzvSk7.js.map +1 -1
  39. package/dist/tslib.es6-e8r3nMQ9.js +172 -0
  40. package/dist/tslib.es6-e8r3nMQ9.js.map +1 -0
  41. package/dist/types.d.ts +1 -0
  42. package/dist/types.js.map +1 -1
  43. package/lib/components/datatable/DataTableServer.tsx +14 -23
  44. package/lib/components/form/FileInputForm.tsx +184 -0
  45. package/lib/components/form/FileInputFormMultiple.tsx +220 -0
  46. package/lib/components/ui/Calendar.tsx +0 -2
  47. package/lib/components/ui/Combobox.tsx +0 -2
  48. package/lib/components/ui/Dialog.tsx +0 -2
  49. package/lib/components/ui/checkbox.tsx +0 -2
  50. package/lib/components/ui/command.tsx +0 -2
  51. package/lib/components/ui/popover.tsx +0 -2
  52. package/lib/components/ui/radioGroup.tsx +0 -2
  53. package/lib/components/ui/toast.tsx +0 -1
  54. package/lib/main.ts +2 -0
  55. package/lib/types.ts +1 -0
  56. package/package.json +1 -2
@@ -22260,270 +22260,279 @@ function DataTableServer({
22260
22260
  ) })
22261
22261
  ] }),
22262
22262
  setMinWidth && /* @__PURE__ */ jsx("div", { ref: topScrollbarRef, className: "overflow-x-auto h-4 mb-1 mmmmm", children: /* @__PURE__ */ jsx("div", { ref: syncWidthRef, className: "h-full" }) }),
22263
- /* @__PURE__ */ jsx("div", { ref: bottomScrollbarRef, className: "overflow-auto min-h-[500px]", children: /* @__PURE__ */ jsxs(
22264
- "table",
22263
+ /* @__PURE__ */ jsxs(
22264
+ "div",
22265
22265
  {
22266
- ref: tableRef,
22267
- className: "w-full leading-normal",
22268
- "data-cy": "datatable-table-" + id,
22266
+ ref: bottomScrollbarRef,
22267
+ className: "overflow-auto min-h-[500px] relative",
22269
22268
  children: [
22270
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
22271
- 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(
22272
- "input",
22273
- {
22274
- id: "selectAll",
22275
- type: "checkbox",
22276
- className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded !focus:ring-indigo-200 focus:ring-4",
22277
- onChange: handleSelectAll,
22278
- checked: data && selectedItems.length === data.content.length && data.content.length > 0
22279
- }
22280
- ) }) }),
22281
- columns.map(
22282
- ({
22283
- key,
22284
- header,
22285
- actions,
22286
- sortParam,
22287
- width,
22288
- filterType,
22289
- filterParam,
22290
- filterParam2
22291
- }, index) => /* @__PURE__ */ jsx(
22292
- Resizable,
22293
- {
22294
- tableId: id,
22295
- colKey: String(key),
22296
- defaultWidth: width || "auto",
22297
- setMinWidth,
22298
- children: ({ ref }) => {
22299
- var _a2, _b2, _c;
22300
- return /* @__PURE__ */ jsxs(
22301
- "th",
22302
- {
22303
- className: `tableHeader relative font-medium text-xs !leading-9 text-left px-3 text-gray-600
22304
- bg-gray-50 border-t border-b border-gray-200 content-start ${!title && !subtitle ? "border-t-0" : ""} ${sortParam ? " cursor-pointer " : ""}`,
22305
- onClick: () => sortParam ? requestSort(sortParam) : void 0,
22306
- "data-cy": "datatable-header-" + id + "-" + String(key),
22307
- children: [
22308
- /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 group select-none w-full", children: [
22309
- header,
22310
- " ",
22311
- !actions && sortParam ? getSortIcon(sortParam) : ""
22312
- ] }),
22313
- /* @__PURE__ */ jsx(
22314
- "div",
22315
- {
22316
- 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"}`,
22317
- ref,
22318
- onClick: (e) => e.stopPropagation()
22319
- }
22320
- ),
22321
- showColFilters && /* @__PURE__ */ jsx(
22322
- "div",
22323
- {
22324
- className: "p-0 m-0 pb-2",
22325
- onClick: (e) => e.stopPropagation(),
22326
- "data-cy": "datatable-filter-container-" + id + "-" + String(key),
22327
- children: filterType === "select" ? /* @__PURE__ */ jsxs(
22328
- Select,
22329
- {
22330
- onValueChange: (value) => {
22331
- if (value === "__clear__") {
22332
- filterHandler(filterParam, "");
22333
- } else {
22334
- filterHandler(
22335
- filterParam,
22336
- value
22337
- );
22338
- }
22339
- },
22340
- value: ((_a2 = mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) == null ? void 0 : _a2.toString()) || "__clear__",
22341
- disabled: Object.keys(
22342
- filters || {}
22343
- ).includes(String(filterParam)),
22344
- children: [
22345
- /* @__PURE__ */ jsx(SelectTrigger, { className: "flex-1 w-full px-2 font-normal placeholder-muted-foreground", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Zadejte filtr" }) }),
22346
- /* @__PURE__ */ jsx(SelectContent, { children: (_c = (_b2 = filterOptions[String(filterParam)]) == null ? void 0 : _b2.filter(
22347
- (option) => option.value !== null && option.value !== void 0 && option.value !== ""
22348
- )) == null ? void 0 : _c.map((option) => {
22349
- var _a3;
22350
- return /* @__PURE__ */ jsx(
22351
- SelectItem,
22352
- {
22353
- value: ((_a3 = option.value) == null ? void 0 : _a3.toString()) || "unknown",
22354
- children: option.label
22355
- },
22356
- option.value
22357
- );
22358
- }) })
22359
- ]
22360
- }
22361
- ) : filterType === "multi-select" ? /* @__PURE__ */ jsx(
22362
- MultiSelect,
22363
- {
22364
- options: filterOptions[String(filterParam)] || [],
22365
- onChange: (values) => filterHandler(
22366
- filterParam,
22367
- values
22368
- ),
22369
- value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || [],
22370
- placeholder: "Zadejte filtr",
22371
- className: "px-0",
22372
- disabled: Object.keys(
22373
- filters || {}
22374
- ).includes(String(filterParam)),
22375
- variant: "secondary",
22376
- maxCount: 0
22377
- }
22378
- ) : filterType === "dateRange" ? /* @__PURE__ */ jsx(
22379
- DateRangeField,
22380
- {
22381
- name: String(filterParam),
22382
- nameEnd: String(filterParam2),
22383
- onInputChange: (e) => filterHandler(
22384
- e.target.name,
22385
- e.target.value
22386
- ),
22387
- type: filterType,
22388
- value: {
22389
- startDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22390
- endDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam2)]) || ""
22391
- },
22392
- clearable: true,
22393
- className: " px-0 py-0 ",
22394
- placeholder: "Zadejte filtr",
22395
- rounded: true,
22396
- disabled: Object.keys(
22397
- filters || {}
22398
- ).includes(String(filterParam))
22399
- }
22400
- ) : filterType === "date" ? /* @__PURE__ */ jsx(
22401
- DateField,
22402
- {
22403
- name: String(filterParam),
22404
- onInputChange: (e) => filterHandler(
22405
- e.target.name,
22406
- e.target.value
22407
- ),
22408
- type: filterType,
22409
- value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22410
- clearable: true,
22411
- className: " px-0 py-0 ",
22412
- placeholder: "Zadejte filtr",
22413
- rounded: true,
22414
- disabled: Object.keys(
22415
- filters || {}
22416
- ).includes(String(filterParam))
22417
- }
22418
- ) : filterType === "text" ? /* @__PURE__ */ jsx(
22419
- Input,
22420
- {
22421
- onChange: (e) => filterHandler(
22422
- filterParam,
22423
- e.target.value
22424
- ),
22425
- value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22426
- disabled: Object.keys(
22427
- filters || {}
22428
- ).includes(String(filterParam)),
22429
- clearable: true,
22430
- className: "min-w-[100px] px-2 font-normal placeholder-muted-foreground\r\n",
22431
- placeholder: "Zadejte filtr",
22432
- debounceTimeout: 1e3
22433
- }
22434
- ) : null
22435
- }
22436
- )
22437
- ]
22438
- }
22439
- );
22440
- }
22441
- },
22442
- String(key)
22443
- )
22444
- )
22445
- ] }) }),
22446
- !isLoading && data && (data == null ? void 0 : data.content) && (data == null ? void 0 : data.content.length) > 0 && /* @__PURE__ */ jsxs("tbody", { className: "relative", children: [
22447
- data.content.map((item, rowIndex) => /* @__PURE__ */ jsxs(
22448
- "tr",
22449
- {
22450
- className: `${item._isHighlighted || isSelected(item) ? "bg-gray-50" : ""} hover:bg-gray-100 border-gray-200 border-b text-sm`,
22451
- children: [
22452
- 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(
22269
+ isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center h-[500px] py-2 z-10", children: /* @__PURE__ */ jsx(Spinner, {}) }),
22270
+ !isLoading && (!data || ((_a = data == null ? void 0 : data.content) == null ? void 0 : _a.length) === 0) && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center h-full py-2 text-gray-600 font-medium text-xs z-10", children: "Žádná data" }),
22271
+ /* @__PURE__ */ jsxs(
22272
+ "table",
22273
+ {
22274
+ ref: tableRef,
22275
+ className: "w-full leading-normal",
22276
+ "data-cy": "datatable-table-" + id,
22277
+ children: [
22278
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
22279
+ 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(
22453
22280
  "input",
22454
22281
  {
22282
+ id: "selectAll",
22455
22283
  type: "checkbox",
22456
22284
  className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded !focus:ring-indigo-200 focus:ring-4",
22457
- checked: isSelected(item) || false,
22458
- onChange: () => handleSelectItem(item)
22285
+ onChange: handleSelectAll,
22286
+ checked: data && selectedItems.length === data.content.length && data.content.length > 0
22459
22287
  }
22460
22288
  ) }) }),
22461
- columns.map(({ render, actions, classes }, colIndex) => /* @__PURE__ */ jsxs(
22462
- "td",
22289
+ columns.map(
22290
+ ({
22291
+ key,
22292
+ header,
22293
+ actions,
22294
+ sortParam,
22295
+ width,
22296
+ filterType,
22297
+ filterParam,
22298
+ filterParam2
22299
+ }, index) => /* @__PURE__ */ jsx(
22300
+ Resizable,
22301
+ {
22302
+ tableId: id,
22303
+ colKey: String(key),
22304
+ defaultWidth: width || "auto",
22305
+ setMinWidth,
22306
+ children: ({ ref }) => {
22307
+ var _a2, _b2, _c;
22308
+ return /* @__PURE__ */ jsxs(
22309
+ "th",
22310
+ {
22311
+ className: `tableHeader relative font-medium text-xs !leading-9 text-left px-3 text-gray-600
22312
+ bg-gray-50 border-t border-b border-gray-200 content-start ${!title && !subtitle ? "border-t-0" : ""} ${sortParam ? " cursor-pointer " : ""}`,
22313
+ onClick: () => sortParam ? requestSort(sortParam) : void 0,
22314
+ "data-cy": "datatable-header-" + id + "-" + String(key),
22315
+ children: [
22316
+ /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 group select-none w-full", children: [
22317
+ header,
22318
+ " ",
22319
+ !actions && sortParam ? getSortIcon(sortParam) : ""
22320
+ ] }),
22321
+ /* @__PURE__ */ jsx(
22322
+ "div",
22323
+ {
22324
+ 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"}`,
22325
+ ref,
22326
+ onClick: (e) => e.stopPropagation()
22327
+ }
22328
+ ),
22329
+ showColFilters && /* @__PURE__ */ jsx(
22330
+ "div",
22331
+ {
22332
+ className: "p-0 m-0 pb-2",
22333
+ onClick: (e) => e.stopPropagation(),
22334
+ "data-cy": "datatable-filter-container-" + id + "-" + String(key),
22335
+ children: filterType === "select" ? /* @__PURE__ */ jsxs(
22336
+ Select,
22337
+ {
22338
+ onValueChange: (value) => {
22339
+ if (value === "__clear__") {
22340
+ filterHandler(filterParam, "");
22341
+ } else {
22342
+ filterHandler(
22343
+ filterParam,
22344
+ value
22345
+ );
22346
+ }
22347
+ },
22348
+ value: ((_a2 = mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) == null ? void 0 : _a2.toString()) || "__clear__",
22349
+ disabled: Object.keys(
22350
+ filters || {}
22351
+ ).includes(String(filterParam)),
22352
+ children: [
22353
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "flex-1 w-full px-2 font-normal placeholder-muted-foreground", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Zadejte filtr" }) }),
22354
+ /* @__PURE__ */ jsx(SelectContent, { children: (_c = (_b2 = filterOptions[String(filterParam)]) == null ? void 0 : _b2.filter(
22355
+ (option) => option.value !== null && option.value !== void 0 && option.value !== ""
22356
+ )) == null ? void 0 : _c.map((option) => {
22357
+ var _a3;
22358
+ return /* @__PURE__ */ jsx(
22359
+ SelectItem,
22360
+ {
22361
+ value: ((_a3 = option.value) == null ? void 0 : _a3.toString()) || "unknown",
22362
+ children: option.label
22363
+ },
22364
+ option.value
22365
+ );
22366
+ }) })
22367
+ ]
22368
+ }
22369
+ ) : filterType === "multi-select" ? /* @__PURE__ */ jsx(
22370
+ MultiSelect,
22371
+ {
22372
+ options: filterOptions[String(filterParam)] || [],
22373
+ onChange: (values) => filterHandler(
22374
+ filterParam,
22375
+ values
22376
+ ),
22377
+ value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || [],
22378
+ placeholder: "Zadejte filtr",
22379
+ className: "px-0",
22380
+ disabled: Object.keys(
22381
+ filters || {}
22382
+ ).includes(String(filterParam)),
22383
+ variant: "secondary",
22384
+ maxCount: 0
22385
+ }
22386
+ ) : filterType === "dateRange" ? /* @__PURE__ */ jsx(
22387
+ DateRangeField,
22388
+ {
22389
+ name: String(filterParam),
22390
+ nameEnd: String(filterParam2),
22391
+ onInputChange: (e) => filterHandler(
22392
+ e.target.name,
22393
+ e.target.value
22394
+ ),
22395
+ type: filterType,
22396
+ value: {
22397
+ startDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22398
+ endDate: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam2)]) || ""
22399
+ },
22400
+ clearable: true,
22401
+ className: " px-0 py-0 ",
22402
+ placeholder: "Zadejte filtr",
22403
+ rounded: true,
22404
+ disabled: Object.keys(
22405
+ filters || {}
22406
+ ).includes(String(filterParam))
22407
+ }
22408
+ ) : filterType === "date" ? /* @__PURE__ */ jsx(
22409
+ DateField,
22410
+ {
22411
+ name: String(filterParam),
22412
+ onInputChange: (e) => filterHandler(
22413
+ e.target.name,
22414
+ e.target.value
22415
+ ),
22416
+ type: filterType,
22417
+ value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22418
+ clearable: true,
22419
+ className: " px-0 py-0 ",
22420
+ placeholder: "Zadejte filtr",
22421
+ rounded: true,
22422
+ disabled: Object.keys(
22423
+ filters || {}
22424
+ ).includes(String(filterParam))
22425
+ }
22426
+ ) : filterType === "text" ? /* @__PURE__ */ jsx(
22427
+ Input,
22428
+ {
22429
+ onChange: (e) => filterHandler(
22430
+ filterParam,
22431
+ e.target.value
22432
+ ),
22433
+ value: (mergedFilters == null ? void 0 : mergedFilters[String(filterParam)]) || "",
22434
+ disabled: Object.keys(
22435
+ filters || {}
22436
+ ).includes(String(filterParam)),
22437
+ clearable: true,
22438
+ className: "min-w-[100px] px-2 font-normal placeholder-muted-foreground\r\n",
22439
+ placeholder: "Zadejte filtr",
22440
+ debounceTimeout: 1e3
22441
+ }
22442
+ ) : null
22443
+ }
22444
+ )
22445
+ ]
22446
+ }
22447
+ );
22448
+ }
22449
+ },
22450
+ String(key)
22451
+ )
22452
+ )
22453
+ ] }) }),
22454
+ !isLoading && data && (data == null ? void 0 : data.content) && (data == null ? void 0 : data.content.length) > 0 && /* @__PURE__ */ jsxs("tbody", { className: "relative", children: [
22455
+ data.content.map((item, rowIndex) => /* @__PURE__ */ jsxs(
22456
+ "tr",
22463
22457
  {
22464
- onClick: rowAction ? () => rowAction(item) : void 0,
22465
- className: `px-3 py-2 text-gray-800 ${rowAction ? "cursor-pointer" : ""} ${colIndex === 0 ? "font-bold " : ""} ${classes || ""}`,
22458
+ className: `${item._isHighlighted || isSelected(item) ? "bg-gray-50" : ""} hover:bg-gray-100 border-gray-200 border-b text-sm`,
22466
22459
  children: [
22467
- render ? render(item) : "",
22468
- actions && actions.filter((it) => {
22469
- if (it.rowAction)
22470
- return false;
22471
- if (it.visible) {
22472
- return it.visible(item);
22473
- } else
22474
- return true;
22475
- }).map((action, actionIndex) => /* @__PURE__ */ jsxs(
22476
- "div",
22460
+ 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(
22461
+ "input",
22462
+ {
22463
+ type: "checkbox",
22464
+ className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded !focus:ring-indigo-200 focus:ring-4",
22465
+ checked: isSelected(item) || false,
22466
+ onChange: () => handleSelectItem(item)
22467
+ }
22468
+ ) }) }),
22469
+ columns.map(({ render, actions, classes }, colIndex) => /* @__PURE__ */ jsxs(
22470
+ "td",
22477
22471
  {
22478
- className: "inline-flex align-middle",
22472
+ onClick: rowAction ? () => rowAction(item) : void 0,
22473
+ className: `px-3 py-2 text-gray-800 ${rowAction ? "cursor-pointer" : ""} ${colIndex === 0 ? "font-bold " : ""} ${classes || ""}`,
22479
22474
  children: [
22480
- action.icon && /* @__PURE__ */ jsx(
22481
- Button,
22475
+ render ? render(item) : "",
22476
+ actions && actions.filter((it) => {
22477
+ if (it.rowAction)
22478
+ return false;
22479
+ if (it.visible) {
22480
+ return it.visible(item);
22481
+ } else
22482
+ return true;
22483
+ }).map((action, actionIndex) => /* @__PURE__ */ jsxs(
22484
+ "div",
22482
22485
  {
22483
- variant: "icon",
22484
- onClick: () => action.onClick(item),
22485
- children: action.icon
22486
- }
22487
- ),
22488
- !action.icon && /* @__PURE__ */ jsx(
22489
- Button,
22490
- {
22491
- variant: "primary",
22492
- onClick: (e) => {
22493
- e.stopPropagation();
22494
- action.onClick(item);
22495
- },
22496
- children: action.label
22497
- }
22498
- )
22486
+ className: "inline-flex align-middle",
22487
+ children: [
22488
+ action.icon && /* @__PURE__ */ jsx(
22489
+ Button,
22490
+ {
22491
+ variant: "icon",
22492
+ onClick: () => action.onClick(item),
22493
+ children: action.icon
22494
+ }
22495
+ ),
22496
+ !action.icon && /* @__PURE__ */ jsx(
22497
+ Button,
22498
+ {
22499
+ variant: "primary",
22500
+ onClick: (e) => {
22501
+ e.stopPropagation();
22502
+ action.onClick(item);
22503
+ },
22504
+ children: action.label
22505
+ }
22506
+ )
22507
+ ]
22508
+ },
22509
+ `${rowIndex}-${colIndex}-${actionIndex}`
22510
+ ))
22499
22511
  ]
22500
22512
  },
22501
- `${rowIndex}-${colIndex}-${actionIndex}`
22513
+ `${rowIndex}-${colIndex}`
22502
22514
  ))
22503
22515
  ]
22504
22516
  },
22505
- `${rowIndex}-${colIndex}`
22506
- ))
22507
- ]
22508
- },
22509
- rowIndex
22510
- )),
22511
- ((_a = data == null ? void 0 : data.content) == null ? void 0 : _a.length) === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
22512
- "td",
22513
- {
22514
- className: "px-5 py-3 border-b border-gray-200 bg-white text-sm items-center justify-center align-middle",
22515
- colSpan: columns.length,
22516
- children: "No data"
22517
- },
22518
- "td-nodata"
22519
- ) }, "tr-nodata")
22520
- ] }),
22521
- 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, {}) }) }) }) }),
22522
- !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" }) }) }) })
22517
+ rowIndex
22518
+ )),
22519
+ ((_b = data == null ? void 0 : data.content) == null ? void 0 : _b.length) === 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
22520
+ "td",
22521
+ {
22522
+ className: "px-5 py-3 border-b border-gray-200 bg-white text-sm items-center justify-center align-middle",
22523
+ colSpan: columns.length,
22524
+ children: "No data"
22525
+ },
22526
+ "td-nodata"
22527
+ ) }, "tr-nodata")
22528
+ ] })
22529
+ ]
22530
+ },
22531
+ tableKey
22532
+ )
22523
22533
  ]
22524
- },
22525
- tableKey
22526
- ) }),
22534
+ }
22535
+ ),
22527
22536
  (data == null ? void 0 : data.isPageable) && /* @__PURE__ */ jsxs(
22528
22537
  "div",
22529
22538
  {