@nice2dev/ui-erp 1.3.7 → 1.3.8

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 (3) hide show
  1. package/dist/index.cjs +147 -114
  2. package/dist/index.mjs +147 -114
  3. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -3063,7 +3063,9 @@ const NiceInvoiceView = /* @__PURE__ */ De$1.forwardRef(
3063
3063
  density = "comfortable",
3064
3064
  className,
3065
3065
  style,
3066
- id
3066
+ id,
3067
+ testId,
3068
+ "data-testid": dataTestId
3067
3069
  }, ref) {
3068
3070
  var _a;
3069
3071
  const { t } = v();
@@ -3113,6 +3115,7 @@ const NiceInvoiceView = /* @__PURE__ */ De$1.forwardRef(
3113
3115
  className: `nice-invoice-view nice-invoice-view--${density} ${className ?? ""}`,
3114
3116
  style,
3115
3117
  "aria-label": `${L.invoiceNumber} ${invoice.invoiceNumber}`,
3118
+ "data-testid": dataTestId ?? testId,
3116
3119
  children: [
3117
3120
  !(hideSections == null ? void 0 : hideSections.header) && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "nice-invoice-view__header", children: [
3118
3121
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -3316,7 +3319,9 @@ const NiceWarehouseView = /* @__PURE__ */ De$1.forwardRef(
3316
3319
  aisleEvery = 4,
3317
3320
  className,
3318
3321
  style,
3319
- id
3322
+ id,
3323
+ testId,
3324
+ "data-testid": dataTestId
3320
3325
  }, ref) {
3321
3326
  const { t } = v();
3322
3327
  const [hovered, setHovered] = De$1.useState(null);
@@ -3335,86 +3340,96 @@ const NiceWarehouseView = /* @__PURE__ */ De$1.forwardRef(
3335
3340
  }, [cells]);
3336
3341
  const gridRef = De$1.useRef(null);
3337
3342
  Xa(gridRef);
3338
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, id, className: `nice-warehouse-view ${className ?? ""}`, style, children: [
3339
- /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "nice-warehouse-view__header", children: [
3340
- /* @__PURE__ */ jsxRuntime.jsx("h3", { children: warehouseName }),
3341
- showLegend && /* @__PURE__ */ jsxRuntime.jsxs(
3342
- "div",
3343
- {
3344
- className: "nice-warehouse-view__legend",
3345
- "aria-label": t("warehouseView.occupancyLegend", "Occupancy legend"),
3346
- children: [
3347
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { background: colors.low } }),
3348
- " ",
3349
- t("warehouseView.low", "low"),
3350
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { background: colors.mid } }),
3351
- " ",
3352
- t("warehouseView.mid", "mid"),
3353
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { background: colors.high } }),
3354
- " ",
3355
- t("warehouseView.high", "high")
3356
- ]
3357
- }
3358
- )
3359
- ] }),
3360
- /* @__PURE__ */ jsxRuntime.jsx(
3361
- "div",
3362
- {
3363
- ref: gridRef,
3364
- className: "nice-warehouse-view__grid",
3365
- role: "grid",
3366
- "aria-label": warehouseName,
3367
- children: grid.map(({ rowKey, cells: row }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-warehouse-view__row", role: "row", children: row.map((c2, idx) => {
3368
- const key = [c2.location.rack, c2.location.aisle, c2.location.shelf, c2.location.bin].filter(Boolean).join("-") || String(idx);
3369
- const aisleBreak = aisleEvery > 0 && idx > 0 && idx % aisleEvery === 0;
3370
- return /* @__PURE__ */ jsxRuntime.jsxs(De$1.Fragment, { children: [
3371
- aisleBreak && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-warehouse-view__aisle", "aria-hidden": true }),
3372
- /* @__PURE__ */ jsxRuntime.jsx(
3373
- "button",
3374
- {
3375
- type: "button",
3376
- role: "gridcell",
3377
- className: "nice-warehouse-view__cell",
3378
- style: {
3379
- width: cellSize,
3380
- height: cellSize,
3381
- background: colorFor(c2.occupancy, colors)
3382
- },
3383
- title: t("warehouseView.items", "{key} — {occupancy}% ({items} items)").replace("{key}", String(key)).replace("{occupancy}", String((c2.occupancy * 100).toFixed(0))).replace("{items}", String(c2.items.length)),
3384
- onClick: () => onCellClick == null ? void 0 : onCellClick(c2),
3385
- onMouseEnter: () => setHovered(c2),
3386
- onMouseLeave: () => setHovered(null),
3387
- onFocus: () => setHovered(c2),
3388
- onBlur: () => setHovered(null),
3389
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-warehouse-view__bin", children: c2.location.bin ?? c2.location.shelf ?? "" })
3390
- }
3391
- )
3392
- ] }, key);
3393
- }) }, rowKey))
3394
- }
3395
- ),
3396
- hovered && /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "nice-warehouse-view__details", "aria-live": "polite", children: [
3397
- /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
3398
- hovered.location.rack,
3399
- "/",
3400
- hovered.location.shelf,
3401
- "/",
3402
- hovered.location.bin
3403
- ] }),
3404
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: t("warehouseView.itemsFull", "{items} items · {occupancy}% full").replace("{items}", String(hovered.items.length)).replace("{occupancy}", String((hovered.occupancy * 100).toFixed(0))) }),
3405
- /* @__PURE__ */ jsxRuntime.jsxs("ul", { children: [
3406
- hovered.items.slice(0, 5).map((it) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
3407
- it.sku,
3408
- " — ",
3409
- it.name
3410
- ] }, it.id)),
3411
- hovered.items.length > 5 && /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
3412
- "…+",
3413
- hovered.items.length - 5
3343
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3344
+ "div",
3345
+ {
3346
+ ref,
3347
+ id,
3348
+ className: `nice-warehouse-view ${className ?? ""}`,
3349
+ style,
3350
+ "data-testid": dataTestId ?? testId,
3351
+ children: [
3352
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "nice-warehouse-view__header", children: [
3353
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { children: warehouseName }),
3354
+ showLegend && /* @__PURE__ */ jsxRuntime.jsxs(
3355
+ "div",
3356
+ {
3357
+ className: "nice-warehouse-view__legend",
3358
+ "aria-label": t("warehouseView.occupancyLegend", "Occupancy legend"),
3359
+ children: [
3360
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { background: colors.low } }),
3361
+ " ",
3362
+ t("warehouseView.low", "low"),
3363
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { background: colors.mid } }),
3364
+ " ",
3365
+ t("warehouseView.mid", "mid"),
3366
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { background: colors.high } }),
3367
+ " ",
3368
+ t("warehouseView.high", "high")
3369
+ ]
3370
+ }
3371
+ )
3372
+ ] }),
3373
+ /* @__PURE__ */ jsxRuntime.jsx(
3374
+ "div",
3375
+ {
3376
+ ref: gridRef,
3377
+ className: "nice-warehouse-view__grid",
3378
+ role: "grid",
3379
+ "aria-label": warehouseName,
3380
+ children: grid.map(({ rowKey, cells: row }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-warehouse-view__row", role: "row", children: row.map((c2, idx) => {
3381
+ const key = [c2.location.rack, c2.location.aisle, c2.location.shelf, c2.location.bin].filter(Boolean).join("-") || String(idx);
3382
+ const aisleBreak = aisleEvery > 0 && idx > 0 && idx % aisleEvery === 0;
3383
+ return /* @__PURE__ */ jsxRuntime.jsxs(De$1.Fragment, { children: [
3384
+ aisleBreak && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-warehouse-view__aisle", "aria-hidden": true }),
3385
+ /* @__PURE__ */ jsxRuntime.jsx(
3386
+ "button",
3387
+ {
3388
+ type: "button",
3389
+ role: "gridcell",
3390
+ className: "nice-warehouse-view__cell",
3391
+ style: {
3392
+ width: cellSize,
3393
+ height: cellSize,
3394
+ background: colorFor(c2.occupancy, colors)
3395
+ },
3396
+ title: t("warehouseView.items", "{key} — {occupancy}% ({items} items)").replace("{key}", String(key)).replace("{occupancy}", String((c2.occupancy * 100).toFixed(0))).replace("{items}", String(c2.items.length)),
3397
+ onClick: () => onCellClick == null ? void 0 : onCellClick(c2),
3398
+ onMouseEnter: () => setHovered(c2),
3399
+ onMouseLeave: () => setHovered(null),
3400
+ onFocus: () => setHovered(c2),
3401
+ onBlur: () => setHovered(null),
3402
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-warehouse-view__bin", children: c2.location.bin ?? c2.location.shelf ?? "" })
3403
+ }
3404
+ )
3405
+ ] }, key);
3406
+ }) }, rowKey))
3407
+ }
3408
+ ),
3409
+ hovered && /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "nice-warehouse-view__details", "aria-live": "polite", children: [
3410
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
3411
+ hovered.location.rack,
3412
+ "/",
3413
+ hovered.location.shelf,
3414
+ "/",
3415
+ hovered.location.bin
3416
+ ] }),
3417
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: t("warehouseView.itemsFull", "{items} items · {occupancy}% full").replace("{items}", String(hovered.items.length)).replace("{occupancy}", String((hovered.occupancy * 100).toFixed(0))) }),
3418
+ /* @__PURE__ */ jsxRuntime.jsxs("ul", { children: [
3419
+ hovered.items.slice(0, 5).map((it) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
3420
+ it.sku,
3421
+ " — ",
3422
+ it.name
3423
+ ] }, it.id)),
3424
+ hovered.items.length > 5 && /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
3425
+ "…+",
3426
+ hovered.items.length - 5
3427
+ ] })
3428
+ ] })
3414
3429
  ] })
3415
- ] })
3416
- ] })
3417
- ] });
3430
+ ]
3431
+ }
3432
+ );
3418
3433
  }
3419
3434
  );
3420
3435
  const EMPTY_ORDERS = [];
@@ -3598,7 +3613,9 @@ const NiceHRDashboard = /* @__PURE__ */ De$1.forwardRef(
3598
3613
  onWidgetClick,
3599
3614
  className,
3600
3615
  style,
3601
- id
3616
+ id,
3617
+ testId,
3618
+ "data-testid": dataTestId
3602
3619
  }, ref) {
3603
3620
  const { t } = v();
3604
3621
  const L = {
@@ -3652,6 +3669,7 @@ const NiceHRDashboard = /* @__PURE__ */ De$1.forwardRef(
3652
3669
  style,
3653
3670
  role: "group",
3654
3671
  "aria-label": t("hrDashboard.hrDashboard", "HR dashboard"),
3672
+ "data-testid": dataTestId ?? testId,
3655
3673
  children: [
3656
3674
  !(hideWidgets == null ? void 0 : hideWidgets.headcount) && /* @__PURE__ */ jsxRuntime.jsx(
3657
3675
  Widget,
@@ -3795,7 +3813,9 @@ const NiceVatTable = /* @__PURE__ */ De$1.forwardRef(
3795
3813
  density = "comfortable",
3796
3814
  className,
3797
3815
  style,
3798
- id
3816
+ id,
3817
+ testId,
3818
+ "data-testid": dataTestId
3799
3819
  }, ref) {
3800
3820
  const { t } = v();
3801
3821
  const [internal, setInternal] = De$1.useState(rates ?? NICE_VAT_PRESETS[country]);
@@ -3846,6 +3866,7 @@ const NiceVatTable = /* @__PURE__ */ De$1.forwardRef(
3846
3866
  id,
3847
3867
  className: `nice-vat-table nice-vat-table--${density} ${className ?? ""}`,
3848
3868
  style,
3869
+ "data-testid": dataTestId ?? testId,
3849
3870
  children: [
3850
3871
  /* @__PURE__ */ jsxRuntime.jsxs("table", { children: [
3851
3872
  /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
@@ -3962,7 +3983,9 @@ const NiceJpkExporter = /* @__PURE__ */ De$1.forwardRef(
3962
3983
  labels,
3963
3984
  className,
3964
3985
  style,
3965
- id
3986
+ id,
3987
+ testId,
3988
+ "data-testid": dataTestId
3966
3989
  }, ref) {
3967
3990
  const { t } = v();
3968
3991
  const today = /* @__PURE__ */ new Date();
@@ -4002,36 +4025,46 @@ const NiceJpkExporter = /* @__PURE__ */ De$1.forwardRef(
4002
4025
  URL.revokeObjectURL(url);
4003
4026
  }
4004
4027
  }, [format, from, to, taxpayer, invoices, buildXml, onExport, filenameFor]);
4005
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, id, className: `nice-jpk-exporter ${className ?? ""}`, style, children: [
4006
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
4007
- L.format,
4008
- /* @__PURE__ */ jsxRuntime.jsxs(
4009
- "select",
4010
- {
4011
- value: format,
4012
- onChange: (e) => setFormat(e.target.value),
4013
- children: [
4014
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "JPK_V7M", children: "JPK_V7M" }),
4015
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "JPK_V7K", children: "JPK_V7K" }),
4016
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "JPK_FA", children: "JPK_FA" })
4017
- ]
4018
- }
4019
- )
4020
- ] }),
4021
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
4022
- L.from,
4023
- /* @__PURE__ */ jsxRuntime.jsx("input", { type: "date", value: from, onChange: (e) => setFrom(e.target.value) })
4024
- ] }),
4025
- /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
4026
- L.to,
4027
- /* @__PURE__ */ jsxRuntime.jsx("input", { type: "date", value: to, onChange: (e) => setTo(e.target.value) })
4028
- ] }),
4029
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: exportNow, children: L.export }),
4030
- /* @__PURE__ */ jsxRuntime.jsx("small", { children: t("jpkExporter.invoicesReady", "{invoices} invoices ready").replace(
4031
- "{invoices}",
4032
- String(invoices.length)
4033
- ) })
4034
- ] });
4028
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4029
+ "div",
4030
+ {
4031
+ ref,
4032
+ id,
4033
+ className: `nice-jpk-exporter ${className ?? ""}`,
4034
+ style,
4035
+ "data-testid": dataTestId ?? testId,
4036
+ children: [
4037
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
4038
+ L.format,
4039
+ /* @__PURE__ */ jsxRuntime.jsxs(
4040
+ "select",
4041
+ {
4042
+ value: format,
4043
+ onChange: (e) => setFormat(e.target.value),
4044
+ children: [
4045
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "JPK_V7M", children: "JPK_V7M" }),
4046
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "JPK_V7K", children: "JPK_V7K" }),
4047
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "JPK_FA", children: "JPK_FA" })
4048
+ ]
4049
+ }
4050
+ )
4051
+ ] }),
4052
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
4053
+ L.from,
4054
+ /* @__PURE__ */ jsxRuntime.jsx("input", { type: "date", value: from, onChange: (e) => setFrom(e.target.value) })
4055
+ ] }),
4056
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
4057
+ L.to,
4058
+ /* @__PURE__ */ jsxRuntime.jsx("input", { type: "date", value: to, onChange: (e) => setTo(e.target.value) })
4059
+ ] }),
4060
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: exportNow, children: L.export }),
4061
+ /* @__PURE__ */ jsxRuntime.jsx("small", { children: t("jpkExporter.invoicesReady", "{invoices} invoices ready").replace(
4062
+ "{invoices}",
4063
+ String(invoices.length)
4064
+ ) })
4065
+ ]
4066
+ }
4067
+ );
4035
4068
  }
4036
4069
  );
4037
4070
  exports.NICE_VAT_PRESETS = NICE_VAT_PRESETS;
package/dist/index.mjs CHANGED
@@ -3061,7 +3061,9 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
3061
3061
  density = "comfortable",
3062
3062
  className,
3063
3063
  style,
3064
- id
3064
+ id,
3065
+ testId,
3066
+ "data-testid": dataTestId
3065
3067
  }, ref) {
3066
3068
  var _a;
3067
3069
  const { t } = v();
@@ -3111,6 +3113,7 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
3111
3113
  className: `nice-invoice-view nice-invoice-view--${density} ${className ?? ""}`,
3112
3114
  style,
3113
3115
  "aria-label": `${L.invoiceNumber} ${invoice.invoiceNumber}`,
3116
+ "data-testid": dataTestId ?? testId,
3114
3117
  children: [
3115
3118
  !(hideSections == null ? void 0 : hideSections.header) && /* @__PURE__ */ jsxs("header", { className: "nice-invoice-view__header", children: [
3116
3119
  /* @__PURE__ */ jsxs("div", { children: [
@@ -3314,7 +3317,9 @@ const NiceWarehouseView = /* @__PURE__ */ forwardRef(
3314
3317
  aisleEvery = 4,
3315
3318
  className,
3316
3319
  style,
3317
- id
3320
+ id,
3321
+ testId,
3322
+ "data-testid": dataTestId
3318
3323
  }, ref) {
3319
3324
  const { t } = v();
3320
3325
  const [hovered, setHovered] = useState(null);
@@ -3333,86 +3338,96 @@ const NiceWarehouseView = /* @__PURE__ */ forwardRef(
3333
3338
  }, [cells]);
3334
3339
  const gridRef = useRef(null);
3335
3340
  Xa(gridRef);
3336
- return /* @__PURE__ */ jsxs("div", { ref, id, className: `nice-warehouse-view ${className ?? ""}`, style, children: [
3337
- /* @__PURE__ */ jsxs("header", { className: "nice-warehouse-view__header", children: [
3338
- /* @__PURE__ */ jsx("h3", { children: warehouseName }),
3339
- showLegend && /* @__PURE__ */ jsxs(
3340
- "div",
3341
- {
3342
- className: "nice-warehouse-view__legend",
3343
- "aria-label": t("warehouseView.occupancyLegend", "Occupancy legend"),
3344
- children: [
3345
- /* @__PURE__ */ jsx("span", { style: { background: colors.low } }),
3346
- " ",
3347
- t("warehouseView.low", "low"),
3348
- /* @__PURE__ */ jsx("span", { style: { background: colors.mid } }),
3349
- " ",
3350
- t("warehouseView.mid", "mid"),
3351
- /* @__PURE__ */ jsx("span", { style: { background: colors.high } }),
3352
- " ",
3353
- t("warehouseView.high", "high")
3354
- ]
3355
- }
3356
- )
3357
- ] }),
3358
- /* @__PURE__ */ jsx(
3359
- "div",
3360
- {
3361
- ref: gridRef,
3362
- className: "nice-warehouse-view__grid",
3363
- role: "grid",
3364
- "aria-label": warehouseName,
3365
- children: grid.map(({ rowKey, cells: row }) => /* @__PURE__ */ jsx("div", { className: "nice-warehouse-view__row", role: "row", children: row.map((c2, idx) => {
3366
- const key = [c2.location.rack, c2.location.aisle, c2.location.shelf, c2.location.bin].filter(Boolean).join("-") || String(idx);
3367
- const aisleBreak = aisleEvery > 0 && idx > 0 && idx % aisleEvery === 0;
3368
- return /* @__PURE__ */ jsxs(De$1.Fragment, { children: [
3369
- aisleBreak && /* @__PURE__ */ jsx("div", { className: "nice-warehouse-view__aisle", "aria-hidden": true }),
3370
- /* @__PURE__ */ jsx(
3371
- "button",
3372
- {
3373
- type: "button",
3374
- role: "gridcell",
3375
- className: "nice-warehouse-view__cell",
3376
- style: {
3377
- width: cellSize,
3378
- height: cellSize,
3379
- background: colorFor(c2.occupancy, colors)
3380
- },
3381
- title: t("warehouseView.items", "{key} — {occupancy}% ({items} items)").replace("{key}", String(key)).replace("{occupancy}", String((c2.occupancy * 100).toFixed(0))).replace("{items}", String(c2.items.length)),
3382
- onClick: () => onCellClick == null ? void 0 : onCellClick(c2),
3383
- onMouseEnter: () => setHovered(c2),
3384
- onMouseLeave: () => setHovered(null),
3385
- onFocus: () => setHovered(c2),
3386
- onBlur: () => setHovered(null),
3387
- children: /* @__PURE__ */ jsx("span", { className: "nice-warehouse-view__bin", children: c2.location.bin ?? c2.location.shelf ?? "" })
3388
- }
3389
- )
3390
- ] }, key);
3391
- }) }, rowKey))
3392
- }
3393
- ),
3394
- hovered && /* @__PURE__ */ jsxs("aside", { className: "nice-warehouse-view__details", "aria-live": "polite", children: [
3395
- /* @__PURE__ */ jsxs("strong", { children: [
3396
- hovered.location.rack,
3397
- "/",
3398
- hovered.location.shelf,
3399
- "/",
3400
- hovered.location.bin
3401
- ] }),
3402
- /* @__PURE__ */ jsx("div", { children: t("warehouseView.itemsFull", "{items} items · {occupancy}% full").replace("{items}", String(hovered.items.length)).replace("{occupancy}", String((hovered.occupancy * 100).toFixed(0))) }),
3403
- /* @__PURE__ */ jsxs("ul", { children: [
3404
- hovered.items.slice(0, 5).map((it) => /* @__PURE__ */ jsxs("li", { children: [
3405
- it.sku,
3406
- " — ",
3407
- it.name
3408
- ] }, it.id)),
3409
- hovered.items.length > 5 && /* @__PURE__ */ jsxs("li", { children: [
3410
- "…+",
3411
- hovered.items.length - 5
3341
+ return /* @__PURE__ */ jsxs(
3342
+ "div",
3343
+ {
3344
+ ref,
3345
+ id,
3346
+ className: `nice-warehouse-view ${className ?? ""}`,
3347
+ style,
3348
+ "data-testid": dataTestId ?? testId,
3349
+ children: [
3350
+ /* @__PURE__ */ jsxs("header", { className: "nice-warehouse-view__header", children: [
3351
+ /* @__PURE__ */ jsx("h3", { children: warehouseName }),
3352
+ showLegend && /* @__PURE__ */ jsxs(
3353
+ "div",
3354
+ {
3355
+ className: "nice-warehouse-view__legend",
3356
+ "aria-label": t("warehouseView.occupancyLegend", "Occupancy legend"),
3357
+ children: [
3358
+ /* @__PURE__ */ jsx("span", { style: { background: colors.low } }),
3359
+ " ",
3360
+ t("warehouseView.low", "low"),
3361
+ /* @__PURE__ */ jsx("span", { style: { background: colors.mid } }),
3362
+ " ",
3363
+ t("warehouseView.mid", "mid"),
3364
+ /* @__PURE__ */ jsx("span", { style: { background: colors.high } }),
3365
+ " ",
3366
+ t("warehouseView.high", "high")
3367
+ ]
3368
+ }
3369
+ )
3370
+ ] }),
3371
+ /* @__PURE__ */ jsx(
3372
+ "div",
3373
+ {
3374
+ ref: gridRef,
3375
+ className: "nice-warehouse-view__grid",
3376
+ role: "grid",
3377
+ "aria-label": warehouseName,
3378
+ children: grid.map(({ rowKey, cells: row }) => /* @__PURE__ */ jsx("div", { className: "nice-warehouse-view__row", role: "row", children: row.map((c2, idx) => {
3379
+ const key = [c2.location.rack, c2.location.aisle, c2.location.shelf, c2.location.bin].filter(Boolean).join("-") || String(idx);
3380
+ const aisleBreak = aisleEvery > 0 && idx > 0 && idx % aisleEvery === 0;
3381
+ return /* @__PURE__ */ jsxs(De$1.Fragment, { children: [
3382
+ aisleBreak && /* @__PURE__ */ jsx("div", { className: "nice-warehouse-view__aisle", "aria-hidden": true }),
3383
+ /* @__PURE__ */ jsx(
3384
+ "button",
3385
+ {
3386
+ type: "button",
3387
+ role: "gridcell",
3388
+ className: "nice-warehouse-view__cell",
3389
+ style: {
3390
+ width: cellSize,
3391
+ height: cellSize,
3392
+ background: colorFor(c2.occupancy, colors)
3393
+ },
3394
+ title: t("warehouseView.items", "{key} — {occupancy}% ({items} items)").replace("{key}", String(key)).replace("{occupancy}", String((c2.occupancy * 100).toFixed(0))).replace("{items}", String(c2.items.length)),
3395
+ onClick: () => onCellClick == null ? void 0 : onCellClick(c2),
3396
+ onMouseEnter: () => setHovered(c2),
3397
+ onMouseLeave: () => setHovered(null),
3398
+ onFocus: () => setHovered(c2),
3399
+ onBlur: () => setHovered(null),
3400
+ children: /* @__PURE__ */ jsx("span", { className: "nice-warehouse-view__bin", children: c2.location.bin ?? c2.location.shelf ?? "" })
3401
+ }
3402
+ )
3403
+ ] }, key);
3404
+ }) }, rowKey))
3405
+ }
3406
+ ),
3407
+ hovered && /* @__PURE__ */ jsxs("aside", { className: "nice-warehouse-view__details", "aria-live": "polite", children: [
3408
+ /* @__PURE__ */ jsxs("strong", { children: [
3409
+ hovered.location.rack,
3410
+ "/",
3411
+ hovered.location.shelf,
3412
+ "/",
3413
+ hovered.location.bin
3414
+ ] }),
3415
+ /* @__PURE__ */ jsx("div", { children: t("warehouseView.itemsFull", "{items} items · {occupancy}% full").replace("{items}", String(hovered.items.length)).replace("{occupancy}", String((hovered.occupancy * 100).toFixed(0))) }),
3416
+ /* @__PURE__ */ jsxs("ul", { children: [
3417
+ hovered.items.slice(0, 5).map((it) => /* @__PURE__ */ jsxs("li", { children: [
3418
+ it.sku,
3419
+ " — ",
3420
+ it.name
3421
+ ] }, it.id)),
3422
+ hovered.items.length > 5 && /* @__PURE__ */ jsxs("li", { children: [
3423
+ "…+",
3424
+ hovered.items.length - 5
3425
+ ] })
3426
+ ] })
3412
3427
  ] })
3413
- ] })
3414
- ] })
3415
- ] });
3428
+ ]
3429
+ }
3430
+ );
3416
3431
  }
3417
3432
  );
3418
3433
  const EMPTY_ORDERS = [];
@@ -3596,7 +3611,9 @@ const NiceHRDashboard = /* @__PURE__ */ forwardRef(
3596
3611
  onWidgetClick,
3597
3612
  className,
3598
3613
  style,
3599
- id
3614
+ id,
3615
+ testId,
3616
+ "data-testid": dataTestId
3600
3617
  }, ref) {
3601
3618
  const { t } = v();
3602
3619
  const L = {
@@ -3650,6 +3667,7 @@ const NiceHRDashboard = /* @__PURE__ */ forwardRef(
3650
3667
  style,
3651
3668
  role: "group",
3652
3669
  "aria-label": t("hrDashboard.hrDashboard", "HR dashboard"),
3670
+ "data-testid": dataTestId ?? testId,
3653
3671
  children: [
3654
3672
  !(hideWidgets == null ? void 0 : hideWidgets.headcount) && /* @__PURE__ */ jsx(
3655
3673
  Widget,
@@ -3793,7 +3811,9 @@ const NiceVatTable = /* @__PURE__ */ forwardRef(
3793
3811
  density = "comfortable",
3794
3812
  className,
3795
3813
  style,
3796
- id
3814
+ id,
3815
+ testId,
3816
+ "data-testid": dataTestId
3797
3817
  }, ref) {
3798
3818
  const { t } = v();
3799
3819
  const [internal, setInternal] = useState(rates ?? NICE_VAT_PRESETS[country]);
@@ -3844,6 +3864,7 @@ const NiceVatTable = /* @__PURE__ */ forwardRef(
3844
3864
  id,
3845
3865
  className: `nice-vat-table nice-vat-table--${density} ${className ?? ""}`,
3846
3866
  style,
3867
+ "data-testid": dataTestId ?? testId,
3847
3868
  children: [
3848
3869
  /* @__PURE__ */ jsxs("table", { children: [
3849
3870
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
@@ -3960,7 +3981,9 @@ const NiceJpkExporter = /* @__PURE__ */ forwardRef(
3960
3981
  labels,
3961
3982
  className,
3962
3983
  style,
3963
- id
3984
+ id,
3985
+ testId,
3986
+ "data-testid": dataTestId
3964
3987
  }, ref) {
3965
3988
  const { t } = v();
3966
3989
  const today = /* @__PURE__ */ new Date();
@@ -4000,36 +4023,46 @@ const NiceJpkExporter = /* @__PURE__ */ forwardRef(
4000
4023
  URL.revokeObjectURL(url);
4001
4024
  }
4002
4025
  }, [format, from, to, taxpayer, invoices, buildXml, onExport, filenameFor]);
4003
- return /* @__PURE__ */ jsxs("div", { ref, id, className: `nice-jpk-exporter ${className ?? ""}`, style, children: [
4004
- /* @__PURE__ */ jsxs("label", { children: [
4005
- L.format,
4006
- /* @__PURE__ */ jsxs(
4007
- "select",
4008
- {
4009
- value: format,
4010
- onChange: (e) => setFormat(e.target.value),
4011
- children: [
4012
- /* @__PURE__ */ jsx("option", { value: "JPK_V7M", children: "JPK_V7M" }),
4013
- /* @__PURE__ */ jsx("option", { value: "JPK_V7K", children: "JPK_V7K" }),
4014
- /* @__PURE__ */ jsx("option", { value: "JPK_FA", children: "JPK_FA" })
4015
- ]
4016
- }
4017
- )
4018
- ] }),
4019
- /* @__PURE__ */ jsxs("label", { children: [
4020
- L.from,
4021
- /* @__PURE__ */ jsx("input", { type: "date", value: from, onChange: (e) => setFrom(e.target.value) })
4022
- ] }),
4023
- /* @__PURE__ */ jsxs("label", { children: [
4024
- L.to,
4025
- /* @__PURE__ */ jsx("input", { type: "date", value: to, onChange: (e) => setTo(e.target.value) })
4026
- ] }),
4027
- /* @__PURE__ */ jsx("button", { type: "button", onClick: exportNow, children: L.export }),
4028
- /* @__PURE__ */ jsx("small", { children: t("jpkExporter.invoicesReady", "{invoices} invoices ready").replace(
4029
- "{invoices}",
4030
- String(invoices.length)
4031
- ) })
4032
- ] });
4026
+ return /* @__PURE__ */ jsxs(
4027
+ "div",
4028
+ {
4029
+ ref,
4030
+ id,
4031
+ className: `nice-jpk-exporter ${className ?? ""}`,
4032
+ style,
4033
+ "data-testid": dataTestId ?? testId,
4034
+ children: [
4035
+ /* @__PURE__ */ jsxs("label", { children: [
4036
+ L.format,
4037
+ /* @__PURE__ */ jsxs(
4038
+ "select",
4039
+ {
4040
+ value: format,
4041
+ onChange: (e) => setFormat(e.target.value),
4042
+ children: [
4043
+ /* @__PURE__ */ jsx("option", { value: "JPK_V7M", children: "JPK_V7M" }),
4044
+ /* @__PURE__ */ jsx("option", { value: "JPK_V7K", children: "JPK_V7K" }),
4045
+ /* @__PURE__ */ jsx("option", { value: "JPK_FA", children: "JPK_FA" })
4046
+ ]
4047
+ }
4048
+ )
4049
+ ] }),
4050
+ /* @__PURE__ */ jsxs("label", { children: [
4051
+ L.from,
4052
+ /* @__PURE__ */ jsx("input", { type: "date", value: from, onChange: (e) => setFrom(e.target.value) })
4053
+ ] }),
4054
+ /* @__PURE__ */ jsxs("label", { children: [
4055
+ L.to,
4056
+ /* @__PURE__ */ jsx("input", { type: "date", value: to, onChange: (e) => setTo(e.target.value) })
4057
+ ] }),
4058
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: exportNow, children: L.export }),
4059
+ /* @__PURE__ */ jsx("small", { children: t("jpkExporter.invoicesReady", "{invoices} invoices ready").replace(
4060
+ "{invoices}",
4061
+ String(invoices.length)
4062
+ ) })
4063
+ ]
4064
+ }
4065
+ );
4033
4066
  }
4034
4067
  );
4035
4068
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice2dev/ui-erp",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "Enterprise Resource Planning components for Nice2Dev",
5
5
  "author": "Nice2Dev Team",
6
6
  "license": "MIT",
@@ -50,7 +50,7 @@
50
50
  "react-dom": ">=17.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@nice2dev/ui-core": "^1.3.7",
53
+ "@nice2dev/ui-core": "^1.3.8",
54
54
  "@testing-library/react": "^16.3.3",
55
55
  "@types/react": "^19.2.18",
56
56
  "@types/react-dom": "^19.2.7",