@dmsi/wedgekit-react 0.0.188 → 0.0.190
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.
- package/dist/{chunk-SDQPZQTI.js → chunk-GKYKZGS7.js} +5 -5
- package/dist/{chunk-PMBEIP24.js → chunk-IDSFWKOR.js} +1 -1
- package/dist/{chunk-XH65MD2C.js → chunk-KADNOKNW.js} +1 -1
- package/dist/components/DataGridCell.js +8 -8
- package/dist/components/DateInput.js +9 -9
- package/dist/components/DateRangeInput.js +10 -10
- package/dist/components/FilterGroup.js +7 -7
- package/dist/components/Input.js +2 -2
- package/dist/components/Menu.js +2 -2
- package/dist/components/MenuOption.js +2 -2
- package/dist/components/MobileDataGrid.js +3 -3
- package/dist/components/Modal.js +2 -2
- package/dist/components/NestedMenu.js +2 -2
- package/dist/components/Notification.js +3 -3
- package/dist/components/PDFViewer.cjs +71 -42
- package/dist/components/PDFViewer.js +76 -47
- package/dist/components/Password.js +2 -2
- package/dist/components/Search.js +3 -3
- package/dist/components/Select.js +3 -3
- package/dist/components/Stepper.js +2 -2
- package/dist/components/Time.js +2 -2
- package/dist/components/Toast.js +3 -3
- package/dist/components/Upload.js +3 -3
- package/dist/components/index.cjs +15 -2
- package/dist/components/index.css +4844 -0
- package/dist/components/index.js +32 -19
- package/dist/index.css +9 -3
- package/package.json +6 -1
- package/src/components/DataGrid/index.tsx +12 -2
- package/src/components/PDFViewer.tsx +78 -54
- package/src/index.tsx +3 -0
- package/dist/{chunk-OZKCUKBS.js → chunk-4BGVBVKV.js} +3 -3
- package/dist/{chunk-ESTHTAR5.js → chunk-M4LOHASV.js} +3 -3
- package/dist/{chunk-4T3DRGLF.js → chunk-MVGOAMTP.js} +3 -3
- package/dist/{chunk-F6YFWBVV.js → chunk-RYBHJC4G.js} +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Menu
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M4LOHASV.js";
|
|
4
4
|
import {
|
|
5
5
|
useSubMenuSystem
|
|
6
6
|
} from "./chunk-AEDQLVKH.js";
|
|
7
7
|
import {
|
|
8
8
|
MenuOption
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
Search
|
|
12
|
-
} from "./chunk-PMBEIP24.js";
|
|
9
|
+
} from "./chunk-4BGVBVKV.js";
|
|
13
10
|
import {
|
|
14
11
|
CSS
|
|
15
12
|
} from "./chunk-WVUIIBRR.js";
|
|
13
|
+
import {
|
|
14
|
+
Search
|
|
15
|
+
} from "./chunk-IDSFWKOR.js";
|
|
16
16
|
import {
|
|
17
17
|
Icon
|
|
18
18
|
} from "./chunk-NKUETCDA.js";
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
DataGridCell,
|
|
5
5
|
DragAlongCell,
|
|
6
6
|
DraggableCellHeader
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-GKYKZGS7.js";
|
|
8
|
+
import "../chunk-M4LOHASV.js";
|
|
9
9
|
import "../chunk-AEDQLVKH.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-4BGVBVKV.js";
|
|
11
|
+
import "../chunk-WVUIIBRR.js";
|
|
12
12
|
import "../chunk-6LN6QT6M.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-5UH6QUFB.js";
|
|
13
|
+
import "../chunk-IDSFWKOR.js";
|
|
14
|
+
import "../chunk-MVGOAMTP.js";
|
|
16
15
|
import "../chunk-JWCT72WR.js";
|
|
17
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-WNQ53SVY.js";
|
|
17
|
+
import "../chunk-5UH6QUFB.js";
|
|
18
18
|
import "../chunk-HVI3CL7Y.js";
|
|
19
19
|
import "../chunk-NKUETCDA.js";
|
|
20
20
|
import "../chunk-RDLEIAQU.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
calculateCursorPosition,
|
|
3
|
-
formatDate,
|
|
4
|
-
formatInputValue,
|
|
5
|
-
isValidDate,
|
|
6
|
-
parseInputDate
|
|
7
|
-
} from "../chunk-M3433XEJ.js";
|
|
8
1
|
import {
|
|
9
2
|
findDocumentRoot
|
|
10
3
|
} from "../chunk-6LN6QT6M.js";
|
|
11
4
|
import {
|
|
12
5
|
InputBase
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-5UH6QUFB.js";
|
|
6
|
+
} from "../chunk-MVGOAMTP.js";
|
|
15
7
|
import "../chunk-JWCT72WR.js";
|
|
16
8
|
import {
|
|
17
9
|
CalendarRange
|
|
18
10
|
} from "../chunk-4XA32LKR.js";
|
|
11
|
+
import {
|
|
12
|
+
calculateCursorPosition,
|
|
13
|
+
formatDate,
|
|
14
|
+
formatInputValue,
|
|
15
|
+
isValidDate,
|
|
16
|
+
parseInputDate
|
|
17
|
+
} from "../chunk-M3433XEJ.js";
|
|
18
|
+
import "../chunk-5UH6QUFB.js";
|
|
19
19
|
import {
|
|
20
20
|
Icon
|
|
21
21
|
} from "../chunk-NKUETCDA.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
calculateCursorPosition,
|
|
3
|
-
formatDate,
|
|
4
|
-
formatInputValue,
|
|
5
|
-
isValidDate,
|
|
6
|
-
isValidDateRangeOrder,
|
|
7
|
-
parseInputDate
|
|
8
|
-
} from "../chunk-M3433XEJ.js";
|
|
9
1
|
import {
|
|
10
2
|
findDocumentRoot
|
|
11
3
|
} from "../chunk-6LN6QT6M.js";
|
|
12
4
|
import {
|
|
13
5
|
InputBase
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-5UH6QUFB.js";
|
|
6
|
+
} from "../chunk-MVGOAMTP.js";
|
|
16
7
|
import "../chunk-JWCT72WR.js";
|
|
17
8
|
import {
|
|
18
9
|
CalendarRange
|
|
19
10
|
} from "../chunk-4XA32LKR.js";
|
|
11
|
+
import {
|
|
12
|
+
calculateCursorPosition,
|
|
13
|
+
formatDate,
|
|
14
|
+
formatInputValue,
|
|
15
|
+
isValidDate,
|
|
16
|
+
isValidDateRangeOrder,
|
|
17
|
+
parseInputDate
|
|
18
|
+
} from "../chunk-M3433XEJ.js";
|
|
19
|
+
import "../chunk-5UH6QUFB.js";
|
|
20
20
|
import {
|
|
21
21
|
Icon
|
|
22
22
|
} from "../chunk-NKUETCDA.js";
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
import {
|
|
3
3
|
OptionPill
|
|
4
4
|
} from "../chunk-LM5MKBPM.js";
|
|
5
|
-
import {
|
|
6
|
-
Checkbox
|
|
7
|
-
} from "../chunk-WFQEE2OO.js";
|
|
8
5
|
import {
|
|
9
6
|
Search
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-5UH6QUFB.js";
|
|
7
|
+
} from "../chunk-IDSFWKOR.js";
|
|
8
|
+
import "../chunk-MVGOAMTP.js";
|
|
13
9
|
import {
|
|
14
10
|
Label
|
|
15
11
|
} from "../chunk-JWCT72WR.js";
|
|
12
|
+
import {
|
|
13
|
+
Checkbox
|
|
14
|
+
} from "../chunk-WFQEE2OO.js";
|
|
15
|
+
import "../chunk-FKMKHLQH.js";
|
|
16
|
+
import "../chunk-5UH6QUFB.js";
|
|
16
17
|
import "../chunk-HVI3CL7Y.js";
|
|
17
18
|
import {
|
|
18
19
|
Link
|
|
19
20
|
} from "../chunk-I6GEUF6Y.js";
|
|
20
|
-
import "../chunk-FKMKHLQH.js";
|
|
21
21
|
import {
|
|
22
22
|
Icon
|
|
23
23
|
} from "../chunk-NKUETCDA.js";
|
package/dist/components/Input.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
InputBase,
|
|
7
7
|
Percentage,
|
|
8
8
|
UOM
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-5UH6QUFB.js";
|
|
9
|
+
} from "../chunk-MVGOAMTP.js";
|
|
11
10
|
import "../chunk-JWCT72WR.js";
|
|
11
|
+
import "../chunk-5UH6QUFB.js";
|
|
12
12
|
import "../chunk-NKUETCDA.js";
|
|
13
13
|
import "../chunk-RDLEIAQU.js";
|
|
14
14
|
import "../chunk-ORMEWXMH.js";
|
package/dist/components/Menu.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Menu
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-M4LOHASV.js";
|
|
5
5
|
import "../chunk-AEDQLVKH.js";
|
|
6
|
-
import "../chunk-WNQ53SVY.js";
|
|
7
6
|
import "../chunk-6LN6QT6M.js";
|
|
7
|
+
import "../chunk-WNQ53SVY.js";
|
|
8
8
|
import "../chunk-ORMEWXMH.js";
|
|
9
9
|
export {
|
|
10
10
|
Menu
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
MenuOption
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-WNQ53SVY.js";
|
|
4
|
+
} from "../chunk-4BGVBVKV.js";
|
|
6
5
|
import "../chunk-JWCT72WR.js";
|
|
6
|
+
import "../chunk-WNQ53SVY.js";
|
|
7
7
|
import "../chunk-HVI3CL7Y.js";
|
|
8
8
|
import "../chunk-NKUETCDA.js";
|
|
9
9
|
import "../chunk-RDLEIAQU.js";
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
Heading3
|
|
6
6
|
} from "../chunk-AZ7LVLOK.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "../chunk-FKMKHLQH.js";
|
|
7
10
|
import {
|
|
8
11
|
Stack
|
|
9
12
|
} from "../chunk-N6JVLYEE.js";
|
|
10
13
|
import {
|
|
11
14
|
Paragraph
|
|
12
15
|
} from "../chunk-HVI3CL7Y.js";
|
|
13
|
-
import {
|
|
14
|
-
Button
|
|
15
|
-
} from "../chunk-FKMKHLQH.js";
|
|
16
16
|
import {
|
|
17
17
|
Icon
|
|
18
18
|
} from "../chunk-NKUETCDA.js";
|
package/dist/components/Modal.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Modal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-RYBHJC4G.js";
|
|
5
5
|
import "../chunk-4RJKB7LC.js";
|
|
6
6
|
import "../chunk-C4JGTH6G.js";
|
|
7
7
|
import "../chunk-SYEJVSE4.js";
|
|
8
8
|
import "../chunk-MJKBQSNI.js";
|
|
9
9
|
import "../chunk-ZFOANBWG.js";
|
|
10
10
|
import "../chunk-AZ7LVLOK.js";
|
|
11
|
-
import "../chunk-WNQ53SVY.js";
|
|
12
11
|
import "../chunk-6LN6QT6M.js";
|
|
13
12
|
import "../chunk-FKMKHLQH.js";
|
|
13
|
+
import "../chunk-WNQ53SVY.js";
|
|
14
14
|
import "../chunk-NKUETCDA.js";
|
|
15
15
|
import "../chunk-RDLEIAQU.js";
|
|
16
16
|
import "../chunk-ORMEWXMH.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
MenuOption
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4BGVBVKV.js";
|
|
5
|
+
import "../chunk-JWCT72WR.js";
|
|
5
6
|
import {
|
|
6
7
|
useKeydown
|
|
7
8
|
} from "../chunk-WNQ53SVY.js";
|
|
8
|
-
import "../chunk-JWCT72WR.js";
|
|
9
9
|
import "../chunk-HVI3CL7Y.js";
|
|
10
10
|
import {
|
|
11
11
|
Icon
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Heading3
|
|
4
4
|
} from "../chunk-AZ7LVLOK.js";
|
|
5
|
+
import {
|
|
6
|
+
Button
|
|
7
|
+
} from "../chunk-FKMKHLQH.js";
|
|
5
8
|
import {
|
|
6
9
|
Stack
|
|
7
10
|
} from "../chunk-N6JVLYEE.js";
|
|
8
11
|
import {
|
|
9
12
|
Paragraph
|
|
10
13
|
} from "../chunk-HVI3CL7Y.js";
|
|
11
|
-
import {
|
|
12
|
-
Button
|
|
13
|
-
} from "../chunk-FKMKHLQH.js";
|
|
14
14
|
import {
|
|
15
15
|
Icon
|
|
16
16
|
} from "../chunk-NKUETCDA.js";
|
|
@@ -1374,8 +1374,21 @@ function PDFViewer(props) {
|
|
|
1374
1374
|
testid,
|
|
1375
1375
|
open: isOpen,
|
|
1376
1376
|
onClose: handleClose,
|
|
1377
|
-
showButtons: !!
|
|
1378
|
-
customActions,
|
|
1377
|
+
showButtons: !!encodedPdfs.length,
|
|
1378
|
+
customActions: !!encodedPdfs.length && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1379
|
+
PdfNavigation,
|
|
1380
|
+
{
|
|
1381
|
+
testid,
|
|
1382
|
+
currentIndex,
|
|
1383
|
+
total: encodedPdfs.length,
|
|
1384
|
+
onPrev: handlePreviousFile,
|
|
1385
|
+
onNext: handleNextFile,
|
|
1386
|
+
disablePrev: currentIndex === 0,
|
|
1387
|
+
disableNext: currentIndex === encodedPdfs.length - 1,
|
|
1388
|
+
extraActions: customActions,
|
|
1389
|
+
fileName: encodedPdfs[currentIndex].fileName
|
|
1390
|
+
}
|
|
1391
|
+
),
|
|
1379
1392
|
size: "large",
|
|
1380
1393
|
fixedHeightScrolling: true,
|
|
1381
1394
|
headerIconAlign: "right",
|
|
@@ -1390,46 +1403,7 @@ function PDFViewer(props) {
|
|
|
1390
1403
|
className: "!max-w-fit",
|
|
1391
1404
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Stack, { sizing: "layout", items: "center", children: [
|
|
1392
1405
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PDFElement, { testid, b64: encodedPdfs[currentIndex].base64 }),
|
|
1393
|
-
!!encodedPdfs[currentIndex].fileName && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Paragraph, { children: encodedPdfs[currentIndex].fileName.endsWith(".pdf") ? encodedPdfs[currentIndex].fileName : `${encodedPdfs[currentIndex].fileName}.pdf` })
|
|
1394
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1395
|
-
Stack,
|
|
1396
|
-
{
|
|
1397
|
-
horizontal: true,
|
|
1398
|
-
overflowX: "auto",
|
|
1399
|
-
justify: "center",
|
|
1400
|
-
items: "center",
|
|
1401
|
-
sizing: "layout-group",
|
|
1402
|
-
children: [
|
|
1403
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1404
|
-
Button,
|
|
1405
|
-
{
|
|
1406
|
-
iconOnly: true,
|
|
1407
|
-
variant: "tertiary",
|
|
1408
|
-
onClick: handlePreviousFile,
|
|
1409
|
-
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "chevron_backward" }),
|
|
1410
|
-
disabled: currentIndex === 0,
|
|
1411
|
-
testid: testid ? `${testid}-pdf-file-previous-button` : void 0
|
|
1412
|
-
}
|
|
1413
|
-
),
|
|
1414
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Heading3, { className: "text-text-primary-normal", children: [
|
|
1415
|
-
currentIndex + 1,
|
|
1416
|
-
" / ",
|
|
1417
|
-
encodedPdfs.length
|
|
1418
|
-
] }),
|
|
1419
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1420
|
-
Button,
|
|
1421
|
-
{
|
|
1422
|
-
iconOnly: true,
|
|
1423
|
-
variant: "tertiary",
|
|
1424
|
-
onClick: handleNextFile,
|
|
1425
|
-
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "chevron_forward" }),
|
|
1426
|
-
disabled: currentIndex === encodedPdfs.length - 1,
|
|
1427
|
-
testid: testid ? `${testid}-pdf-file-next-button` : void 0
|
|
1428
|
-
}
|
|
1429
|
-
)
|
|
1430
|
-
]
|
|
1431
|
-
}
|
|
1432
|
-
)
|
|
1406
|
+
!!encodedPdfs[currentIndex].fileName && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Paragraph, { children: encodedPdfs[currentIndex].fileName.endsWith(".pdf") ? encodedPdfs[currentIndex].fileName : `${encodedPdfs[currentIndex].fileName}.pdf` })
|
|
1433
1407
|
] })
|
|
1434
1408
|
}
|
|
1435
1409
|
);
|
|
@@ -1546,6 +1520,61 @@ function PDFElement({ b64, testid }) {
|
|
|
1546
1520
|
}
|
|
1547
1521
|
);
|
|
1548
1522
|
}
|
|
1523
|
+
function PdfNavigation({
|
|
1524
|
+
currentIndex,
|
|
1525
|
+
total,
|
|
1526
|
+
onPrev,
|
|
1527
|
+
onNext,
|
|
1528
|
+
disablePrev,
|
|
1529
|
+
disableNext,
|
|
1530
|
+
extraActions,
|
|
1531
|
+
testid,
|
|
1532
|
+
fileName
|
|
1533
|
+
}) {
|
|
1534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1535
|
+
Stack,
|
|
1536
|
+
{
|
|
1537
|
+
horizontal: true,
|
|
1538
|
+
items: "center",
|
|
1539
|
+
justify: "between",
|
|
1540
|
+
sizing: "layout-group",
|
|
1541
|
+
testid: testid ? `${testid}-pdf-navigation` : void 0,
|
|
1542
|
+
children: [
|
|
1543
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Stack, { horizontal: true, items: "center", children: [
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1545
|
+
Button,
|
|
1546
|
+
{
|
|
1547
|
+
iconOnly: true,
|
|
1548
|
+
variant: "tertiary",
|
|
1549
|
+
onClick: onPrev,
|
|
1550
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "chevron_backward" }),
|
|
1551
|
+
disabled: disablePrev,
|
|
1552
|
+
testid: testid ? `${testid}-pdf-file-previous-button` : void 0
|
|
1553
|
+
}
|
|
1554
|
+
),
|
|
1555
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Heading3, { className: "text-text-primary-normal whitespace-nowrap", children: [
|
|
1556
|
+
currentIndex + 1,
|
|
1557
|
+
" / ",
|
|
1558
|
+
total
|
|
1559
|
+
] }),
|
|
1560
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1561
|
+
Button,
|
|
1562
|
+
{
|
|
1563
|
+
iconOnly: true,
|
|
1564
|
+
variant: "tertiary",
|
|
1565
|
+
onClick: onNext,
|
|
1566
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "chevron_forward" }),
|
|
1567
|
+
disabled: disableNext,
|
|
1568
|
+
testid: testid ? `${testid}-pdf-file-next-button` : void 0
|
|
1569
|
+
}
|
|
1570
|
+
),
|
|
1571
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Paragraph, { children: (fileName == null ? void 0 : fileName.endsWith(".pdf")) ? fileName : `${fileName}.pdf` })
|
|
1572
|
+
] }),
|
|
1573
|
+
extraActions && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex items-center gap-2", children: extraActions })
|
|
1574
|
+
]
|
|
1575
|
+
}
|
|
1576
|
+
) });
|
|
1577
|
+
}
|
|
1549
1578
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1550
1579
|
0 && (module.exports = {
|
|
1551
1580
|
PDFViewer
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Modal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-RYBHJC4G.js";
|
|
5
5
|
import "../chunk-4RJKB7LC.js";
|
|
6
6
|
import "../chunk-C4JGTH6G.js";
|
|
7
7
|
import "../chunk-SYEJVSE4.js";
|
|
@@ -13,20 +13,20 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
Heading3
|
|
15
15
|
} from "../chunk-AZ7LVLOK.js";
|
|
16
|
+
import "../chunk-6LN6QT6M.js";
|
|
16
17
|
import {
|
|
17
18
|
Caption
|
|
18
19
|
} from "../chunk-E7D24OHM.js";
|
|
20
|
+
import {
|
|
21
|
+
Button
|
|
22
|
+
} from "../chunk-FKMKHLQH.js";
|
|
19
23
|
import "../chunk-WNQ53SVY.js";
|
|
20
|
-
import "../chunk-6LN6QT6M.js";
|
|
21
24
|
import {
|
|
22
25
|
Stack
|
|
23
26
|
} from "../chunk-N6JVLYEE.js";
|
|
24
27
|
import {
|
|
25
28
|
Paragraph
|
|
26
29
|
} from "../chunk-HVI3CL7Y.js";
|
|
27
|
-
import {
|
|
28
|
-
Button
|
|
29
|
-
} from "../chunk-FKMKHLQH.js";
|
|
30
30
|
import {
|
|
31
31
|
Icon
|
|
32
32
|
} from "../chunk-NKUETCDA.js";
|
|
@@ -78,8 +78,21 @@ function PDFViewer(props) {
|
|
|
78
78
|
testid,
|
|
79
79
|
open: isOpen,
|
|
80
80
|
onClose: handleClose,
|
|
81
|
-
showButtons: !!
|
|
82
|
-
customActions
|
|
81
|
+
showButtons: !!encodedPdfs.length,
|
|
82
|
+
customActions: !!encodedPdfs.length && /* @__PURE__ */ jsx(
|
|
83
|
+
PdfNavigation,
|
|
84
|
+
{
|
|
85
|
+
testid,
|
|
86
|
+
currentIndex,
|
|
87
|
+
total: encodedPdfs.length,
|
|
88
|
+
onPrev: handlePreviousFile,
|
|
89
|
+
onNext: handleNextFile,
|
|
90
|
+
disablePrev: currentIndex === 0,
|
|
91
|
+
disableNext: currentIndex === encodedPdfs.length - 1,
|
|
92
|
+
extraActions: customActions,
|
|
93
|
+
fileName: encodedPdfs[currentIndex].fileName
|
|
94
|
+
}
|
|
95
|
+
),
|
|
83
96
|
size: "large",
|
|
84
97
|
fixedHeightScrolling: true,
|
|
85
98
|
headerIconAlign: "right",
|
|
@@ -94,46 +107,7 @@ function PDFViewer(props) {
|
|
|
94
107
|
className: "!max-w-fit",
|
|
95
108
|
children: /* @__PURE__ */ jsxs(Stack, { sizing: "layout", items: "center", children: [
|
|
96
109
|
/* @__PURE__ */ jsx(PDFElement, { testid, b64: encodedPdfs[currentIndex].base64 }),
|
|
97
|
-
!!encodedPdfs[currentIndex].fileName && /* @__PURE__ */ jsx(Paragraph, { children: encodedPdfs[currentIndex].fileName.endsWith(".pdf") ? encodedPdfs[currentIndex].fileName : `${encodedPdfs[currentIndex].fileName}.pdf` })
|
|
98
|
-
/* @__PURE__ */ jsxs(
|
|
99
|
-
Stack,
|
|
100
|
-
{
|
|
101
|
-
horizontal: true,
|
|
102
|
-
overflowX: "auto",
|
|
103
|
-
justify: "center",
|
|
104
|
-
items: "center",
|
|
105
|
-
sizing: "layout-group",
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ jsx(
|
|
108
|
-
Button,
|
|
109
|
-
{
|
|
110
|
-
iconOnly: true,
|
|
111
|
-
variant: "tertiary",
|
|
112
|
-
onClick: handlePreviousFile,
|
|
113
|
-
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "chevron_backward" }),
|
|
114
|
-
disabled: currentIndex === 0,
|
|
115
|
-
testid: testid ? `${testid}-pdf-file-previous-button` : void 0
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
/* @__PURE__ */ jsxs(Heading3, { className: "text-text-primary-normal", children: [
|
|
119
|
-
currentIndex + 1,
|
|
120
|
-
" / ",
|
|
121
|
-
encodedPdfs.length
|
|
122
|
-
] }),
|
|
123
|
-
/* @__PURE__ */ jsx(
|
|
124
|
-
Button,
|
|
125
|
-
{
|
|
126
|
-
iconOnly: true,
|
|
127
|
-
variant: "tertiary",
|
|
128
|
-
onClick: handleNextFile,
|
|
129
|
-
rightIcon: /* @__PURE__ */ jsx(Icon, { name: "chevron_forward" }),
|
|
130
|
-
disabled: currentIndex === encodedPdfs.length - 1,
|
|
131
|
-
testid: testid ? `${testid}-pdf-file-next-button` : void 0
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
)
|
|
110
|
+
!!encodedPdfs[currentIndex].fileName && /* @__PURE__ */ jsx(Paragraph, { children: encodedPdfs[currentIndex].fileName.endsWith(".pdf") ? encodedPdfs[currentIndex].fileName : `${encodedPdfs[currentIndex].fileName}.pdf` })
|
|
137
111
|
] })
|
|
138
112
|
}
|
|
139
113
|
);
|
|
@@ -250,6 +224,61 @@ function PDFElement({ b64, testid }) {
|
|
|
250
224
|
}
|
|
251
225
|
);
|
|
252
226
|
}
|
|
227
|
+
function PdfNavigation({
|
|
228
|
+
currentIndex,
|
|
229
|
+
total,
|
|
230
|
+
onPrev,
|
|
231
|
+
onNext,
|
|
232
|
+
disablePrev,
|
|
233
|
+
disableNext,
|
|
234
|
+
extraActions,
|
|
235
|
+
testid,
|
|
236
|
+
fileName
|
|
237
|
+
}) {
|
|
238
|
+
return /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxs(
|
|
239
|
+
Stack,
|
|
240
|
+
{
|
|
241
|
+
horizontal: true,
|
|
242
|
+
items: "center",
|
|
243
|
+
justify: "between",
|
|
244
|
+
sizing: "layout-group",
|
|
245
|
+
testid: testid ? `${testid}-pdf-navigation` : void 0,
|
|
246
|
+
children: [
|
|
247
|
+
/* @__PURE__ */ jsxs(Stack, { horizontal: true, items: "center", children: [
|
|
248
|
+
/* @__PURE__ */ jsx(
|
|
249
|
+
Button,
|
|
250
|
+
{
|
|
251
|
+
iconOnly: true,
|
|
252
|
+
variant: "tertiary",
|
|
253
|
+
onClick: onPrev,
|
|
254
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "chevron_backward" }),
|
|
255
|
+
disabled: disablePrev,
|
|
256
|
+
testid: testid ? `${testid}-pdf-file-previous-button` : void 0
|
|
257
|
+
}
|
|
258
|
+
),
|
|
259
|
+
/* @__PURE__ */ jsxs(Heading3, { className: "text-text-primary-normal whitespace-nowrap", children: [
|
|
260
|
+
currentIndex + 1,
|
|
261
|
+
" / ",
|
|
262
|
+
total
|
|
263
|
+
] }),
|
|
264
|
+
/* @__PURE__ */ jsx(
|
|
265
|
+
Button,
|
|
266
|
+
{
|
|
267
|
+
iconOnly: true,
|
|
268
|
+
variant: "tertiary",
|
|
269
|
+
onClick: onNext,
|
|
270
|
+
rightIcon: /* @__PURE__ */ jsx(Icon, { name: "chevron_forward" }),
|
|
271
|
+
disabled: disableNext,
|
|
272
|
+
testid: testid ? `${testid}-pdf-file-next-button` : void 0
|
|
273
|
+
}
|
|
274
|
+
),
|
|
275
|
+
/* @__PURE__ */ jsx(Paragraph, { children: (fileName == null ? void 0 : fileName.endsWith(".pdf")) ? fileName : `${fileName}.pdf` })
|
|
276
|
+
] }),
|
|
277
|
+
extraActions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: extraActions })
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
) });
|
|
281
|
+
}
|
|
253
282
|
export {
|
|
254
283
|
PDFViewer
|
|
255
284
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Search
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-5UH6QUFB.js";
|
|
4
|
+
} from "../chunk-IDSFWKOR.js";
|
|
5
|
+
import "../chunk-MVGOAMTP.js";
|
|
7
6
|
import "../chunk-JWCT72WR.js";
|
|
7
|
+
import "../chunk-5UH6QUFB.js";
|
|
8
8
|
import "../chunk-NKUETCDA.js";
|
|
9
9
|
import "../chunk-RDLEIAQU.js";
|
|
10
10
|
import "../chunk-ORMEWXMH.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Select
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-5UH6QUFB.js";
|
|
4
|
+
} from "../chunk-KADNOKNW.js";
|
|
5
|
+
import "../chunk-MVGOAMTP.js";
|
|
7
6
|
import "../chunk-JWCT72WR.js";
|
|
7
|
+
import "../chunk-5UH6QUFB.js";
|
|
8
8
|
import "../chunk-NKUETCDA.js";
|
|
9
9
|
import "../chunk-RDLEIAQU.js";
|
|
10
10
|
import "../chunk-ORMEWXMH.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
InputBase
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-5UH6QUFB.js";
|
|
4
|
+
} from "../chunk-MVGOAMTP.js";
|
|
6
5
|
import "../chunk-JWCT72WR.js";
|
|
7
6
|
import {
|
|
8
7
|
Button
|
|
9
8
|
} from "../chunk-FKMKHLQH.js";
|
|
9
|
+
import "../chunk-5UH6QUFB.js";
|
|
10
10
|
import {
|
|
11
11
|
Icon
|
|
12
12
|
} from "../chunk-NKUETCDA.js";
|
package/dist/components/Time.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
} from "../chunk-6LN6QT6M.js";
|
|
4
4
|
import {
|
|
5
5
|
InputBase
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-5UH6QUFB.js";
|
|
6
|
+
} from "../chunk-MVGOAMTP.js";
|
|
8
7
|
import "../chunk-JWCT72WR.js";
|
|
8
|
+
import "../chunk-5UH6QUFB.js";
|
|
9
9
|
import {
|
|
10
10
|
Stack
|
|
11
11
|
} from "../chunk-N6JVLYEE.js";
|
package/dist/components/Toast.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Heading3
|
|
4
4
|
} from "../chunk-AZ7LVLOK.js";
|
|
5
|
-
import {
|
|
6
|
-
Paragraph
|
|
7
|
-
} from "../chunk-HVI3CL7Y.js";
|
|
8
5
|
import {
|
|
9
6
|
Button
|
|
10
7
|
} from "../chunk-FKMKHLQH.js";
|
|
8
|
+
import {
|
|
9
|
+
Paragraph
|
|
10
|
+
} from "../chunk-HVI3CL7Y.js";
|
|
11
11
|
import {
|
|
12
12
|
Icon
|
|
13
13
|
} from "../chunk-NKUETCDA.js";
|