@dmsi/wedgekit-react 0.0.249 → 0.0.251
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-2ALRM4YD.js → chunk-2MZ5WKCL.js} +10 -10
- package/dist/{chunk-TJWGFGWX.js → chunk-4LXG6QNT.js} +1 -1
- package/dist/{chunk-3BCGS6VO.js → chunk-4OMINRN5.js} +1 -1
- package/dist/{chunk-NWELJDBW.js → chunk-4VER5OEU.js} +4 -4
- package/dist/{chunk-ESXNSPIG.js → chunk-5NIAGAA7.js} +5 -5
- package/dist/{chunk-VR7X3NMG.js → chunk-6CPGOW6J.js} +3 -3
- package/dist/{chunk-VP7HJX24.js → chunk-7CS736EF.js} +1 -1
- package/dist/{chunk-3S6HGDOB.js → chunk-7PWT532Y.js} +2 -2
- package/dist/{chunk-VP36B2MM.js → chunk-CCOQOO23.js} +2 -2
- package/dist/{chunk-KEDK5EWD.js → chunk-EU73QPW7.js} +1 -1
- package/dist/{chunk-FS2RQE55.js → chunk-FA7IFW66.js} +1 -1
- package/dist/{chunk-3FOAGRIY.js → chunk-FHQL42YP.js} +3 -3
- package/dist/{chunk-6IXVPFYC.js → chunk-FLVYV4T4.js} +7 -7
- package/dist/{chunk-MQXOQL3T.js → chunk-FQRSSPFV.js} +3 -3
- package/dist/{chunk-R2FGTCOY.js → chunk-GICZ5RWY.js} +1 -1
- package/dist/{chunk-ZU2K7BD3.js → chunk-HIVPC3T4.js} +1 -1
- package/dist/{chunk-UWGSOAIN.js → chunk-KIAURU7N.js} +22 -22
- package/dist/{chunk-UVG2TKTG.js → chunk-KKESN5SF.js} +4 -4
- package/dist/{chunk-UAPWR2KE.js → chunk-NKUETCDA.js} +1 -1
- package/dist/{chunk-DXVLA32J.js → chunk-NO5BIKWS.js} +3 -3
- package/dist/{chunk-QA3KMRA6.js → chunk-NQXZBWDZ.js} +1 -1
- package/dist/{chunk-7KLALK3J.js → chunk-OGIFIPKH.js} +1 -1
- package/dist/{chunk-BBZEL7EG.js → chunk-ORMEWXMH.js} +1 -22
- package/dist/{chunk-JXZGLPQW.js → chunk-PEB3BNN6.js} +6 -6
- package/dist/{chunk-NA3ODQCN.js → chunk-PGSDEGBP.js} +3 -3
- package/dist/{chunk-WKWNBR53.js → chunk-QBIEU25R.js} +1 -1
- package/dist/{chunk-KSKC53TG.js → chunk-SYN5FFHV.js} +3 -3
- package/dist/{chunk-T3F37S6Z.js → chunk-TYTD4FLW.js} +1 -1
- package/dist/{chunk-4AHS4CVA.js → chunk-VEL4ICLU.js} +2 -2
- package/dist/{chunk-KNP4LUFA.js → chunk-WWAPK5PH.js} +1 -1
- package/dist/{chunk-OGMN5SHL.js → chunk-XM7IQHBU.js} +2 -2
- package/dist/components/AccessChangerTabItem.js +3 -3
- package/dist/components/Accordion.js +6 -6
- package/dist/components/Breadcrumbs.js +3 -3
- package/dist/components/Button.js +2 -2
- package/dist/components/CalendarRange.js +22 -22
- package/dist/components/Caption.js +2 -2
- package/dist/components/Card.js +2 -2
- package/dist/components/Checkbox.js +4 -4
- package/dist/components/ContentTab.js +3 -3
- package/dist/components/ContentTabs.js +3 -3
- package/dist/components/DMSiLogo.js +1 -1
- package/dist/components/DataGridCell.js +13 -13
- package/dist/components/DataTable.js +1 -1
- package/dist/components/DateInput.js +24 -24
- package/dist/components/DateRangeInput.js +24 -24
- package/dist/components/DebugJson.js +1 -1
- package/dist/components/Display.js +2 -2
- package/dist/components/EditingContext.js +1 -1
- package/dist/components/FilterGroup.js +13 -13
- package/dist/components/FullViewportBox.js +1 -1
- package/dist/components/Grid.js +1 -1
- package/dist/components/Heading.js +2 -2
- package/dist/components/HorizontalDivider.js +1 -1
- package/dist/components/Icon.js +2 -2
- package/dist/components/Input.js +4 -4
- package/dist/components/InputGroup.js +2 -2
- package/dist/components/Label.js +2 -2
- package/dist/components/Link.js +2 -2
- package/dist/components/List.js +1 -1
- package/dist/components/LiveChatComponent.js +1 -1
- package/dist/components/LoadingScrim.js +1 -1
- package/dist/components/LogoAgilityTopBar.js +1 -1
- package/dist/components/LogoDMSiTopBar.js +2 -2
- package/dist/components/LogoMillworkTopBar.js +1 -1
- package/dist/components/MainBar.js +1 -1
- package/dist/components/Menu.js +5 -5
- package/dist/components/MenuOption.js +7 -7
- package/dist/components/MobileDataGrid.js +6 -6
- package/dist/components/Modal.js +9 -9
- package/dist/components/ModalButtons.js +4 -4
- package/dist/components/ModalContent.js +1 -1
- package/dist/components/ModalHeader.js +5 -5
- package/dist/components/ModalScrim.js +1 -1
- package/dist/components/NavigationTab.js +4 -4
- package/dist/components/NavigationTabs.js +4 -4
- package/dist/components/NestedMenu.js +7 -7
- package/dist/components/Notification.js +6 -6
- package/dist/components/OptionPill.js +5 -5
- package/dist/components/PDFViewer.cjs +39 -79
- package/dist/components/PDFViewer.js +51 -73
- package/dist/components/Paragraph.js +2 -2
- package/dist/components/Password.js +4 -4
- package/dist/components/ProjectBar.js +3 -3
- package/dist/components/Radio.js +2 -2
- package/dist/components/Search.js +5 -5
- package/dist/components/Select.js +5 -5
- package/dist/components/SideMenu.js +1 -1
- package/dist/components/SideMenuGroup.js +4 -4
- package/dist/components/SideMenuItem.js +3 -3
- package/dist/components/Spinner.js +1 -1
- package/dist/components/Stack.js +2 -2
- package/dist/components/StatusPill.js +2 -2
- package/dist/components/Stepper.js +5 -5
- package/dist/components/Subheader.js +2 -2
- package/dist/components/Surface.js +1 -1
- package/dist/components/Swatch.js +5 -5
- package/dist/components/Textarea.js +1 -1
- package/dist/components/Theme.js +1 -1
- package/dist/components/Time.js +8 -8
- package/dist/components/Toast.js +5 -5
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/TopBar.js +2 -2
- package/dist/components/Upload.js +5 -5
- package/dist/components/WorldpayIframe.js +1 -1
- package/dist/components/index.js +25 -25
- package/dist/components/useMenuSystem.js +4 -4
- package/dist/components/useMounted.js +1 -1
- package/dist/hooks/index.js +3 -3
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/src/components/PDFViewer.tsx +43 -57
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Label
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7CS736EF.js";
|
|
5
5
|
import {
|
|
6
6
|
Stack
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-NQXZBWDZ.js";
|
|
8
8
|
import {
|
|
9
9
|
Icon
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-NKUETCDA.js";
|
|
11
11
|
import {
|
|
12
12
|
baseTransition
|
|
13
13
|
} from "../chunk-6CTCHYIS.js";
|
|
14
14
|
import {
|
|
15
15
|
__spreadProps,
|
|
16
16
|
__spreadValues
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-ORMEWXMH.js";
|
|
18
18
|
|
|
19
19
|
// src/components/SideMenuGroup.tsx
|
|
20
20
|
import clsx from "clsx";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Stack
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NQXZBWDZ.js";
|
|
4
4
|
import {
|
|
5
5
|
Paragraph
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-OGIFIPKH.js";
|
|
7
7
|
import {
|
|
8
8
|
baseTransition,
|
|
9
9
|
componentPaddingMinus2pxBorder
|
|
10
10
|
} from "../chunk-6CTCHYIS.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-ORMEWXMH.js";
|
|
12
12
|
|
|
13
13
|
// src/components/SideMenuItem.tsx
|
|
14
14
|
import clsx from "clsx";
|
package/dist/components/Stack.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Label
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-7CS736EF.js";
|
|
4
4
|
import {
|
|
5
5
|
componentPaddingYUsingComponentGap,
|
|
6
6
|
paddingXUsingLayoutGroupGap
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
__objRest,
|
|
10
10
|
__spreadProps,
|
|
11
11
|
__spreadValues
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-ORMEWXMH.js";
|
|
13
13
|
|
|
14
14
|
// src/components/StatusPill.tsx
|
|
15
15
|
import clsx from "clsx";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
InputBase
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-VP7HJX24.js";
|
|
4
|
+
} from "../chunk-5NIAGAA7.js";
|
|
6
5
|
import "../chunk-5UH6QUFB.js";
|
|
6
|
+
import "../chunk-7CS736EF.js";
|
|
7
7
|
import {
|
|
8
8
|
Icon
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-NKUETCDA.js";
|
|
10
10
|
import {
|
|
11
11
|
Button
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-WWAPK5PH.js";
|
|
13
13
|
import {
|
|
14
14
|
componentGap
|
|
15
15
|
} from "../chunk-6CTCHYIS.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
__objRest,
|
|
18
18
|
__spreadProps,
|
|
19
19
|
__spreadValues
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-ORMEWXMH.js";
|
|
21
21
|
|
|
22
22
|
// src/components/Stepper.tsx
|
|
23
23
|
import clsx from "clsx";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Heading2,
|
|
3
3
|
Heading3
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-EU73QPW7.js";
|
|
5
5
|
import {
|
|
6
6
|
Display1
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-GICZ5RWY.js";
|
|
8
8
|
import {
|
|
9
9
|
Stack
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-NQXZBWDZ.js";
|
|
11
11
|
import {
|
|
12
12
|
Paragraph
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-OGIFIPKH.js";
|
|
14
14
|
import {
|
|
15
15
|
typography
|
|
16
16
|
} from "../chunk-6CTCHYIS.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-ORMEWXMH.js";
|
|
18
18
|
|
|
19
19
|
// src/components/Swatch.tsx
|
|
20
20
|
import clsx from "clsx";
|
package/dist/components/Theme.js
CHANGED
package/dist/components/Time.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
InputBase
|
|
3
|
-
} from "../chunk-ESXNSPIG.js";
|
|
4
|
-
import "../chunk-VP7HJX24.js";
|
|
5
1
|
import {
|
|
6
2
|
findDocumentRoot
|
|
7
3
|
} from "../chunk-VXWSAIB5.js";
|
|
8
|
-
import "../chunk-
|
|
4
|
+
import "../chunk-TYTD4FLW.js";
|
|
5
|
+
import {
|
|
6
|
+
InputBase
|
|
7
|
+
} from "../chunk-5NIAGAA7.js";
|
|
9
8
|
import "../chunk-5UH6QUFB.js";
|
|
9
|
+
import "../chunk-7CS736EF.js";
|
|
10
10
|
import {
|
|
11
11
|
Stack
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-NQXZBWDZ.js";
|
|
13
13
|
import {
|
|
14
14
|
Icon
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-NKUETCDA.js";
|
|
16
16
|
import {
|
|
17
17
|
typography
|
|
18
18
|
} from "../chunk-6CTCHYIS.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
__objRest,
|
|
21
21
|
__spreadProps,
|
|
22
22
|
__spreadValues
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-ORMEWXMH.js";
|
|
24
24
|
|
|
25
25
|
// src/components/Time.tsx
|
|
26
26
|
import { useEffect, useRef, useState } from "react";
|
package/dist/components/Toast.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Heading3
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-EU73QPW7.js";
|
|
5
5
|
import {
|
|
6
6
|
Paragraph
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-OGIFIPKH.js";
|
|
8
8
|
import {
|
|
9
9
|
Icon
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-NKUETCDA.js";
|
|
11
11
|
import {
|
|
12
12
|
Button
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-WWAPK5PH.js";
|
|
14
14
|
import {
|
|
15
15
|
componentGap,
|
|
16
16
|
componentPadding,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
__objRest,
|
|
21
21
|
__spreadProps,
|
|
22
22
|
__spreadValues
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-ORMEWXMH.js";
|
|
24
24
|
|
|
25
25
|
// src/components/Toast.tsx
|
|
26
26
|
import clsx from "clsx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LogoDMSiTopBar
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-QBIEU25R.js";
|
|
4
4
|
import {
|
|
5
5
|
containerPaddingX,
|
|
6
6
|
gapUsingContainerPadding,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
__objRest,
|
|
13
13
|
__spreadProps,
|
|
14
14
|
__spreadValues
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-ORMEWXMH.js";
|
|
16
16
|
|
|
17
17
|
// src/components/TopBar.tsx
|
|
18
18
|
import clsx from "clsx";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "../chunk-PLMGI5K5.js";
|
|
4
4
|
import {
|
|
5
5
|
Stack
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-NQXZBWDZ.js";
|
|
7
7
|
import {
|
|
8
8
|
Paragraph
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-OGIFIPKH.js";
|
|
10
10
|
import {
|
|
11
11
|
Icon
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-NKUETCDA.js";
|
|
13
13
|
import {
|
|
14
14
|
Button
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-WWAPK5PH.js";
|
|
16
16
|
import {
|
|
17
17
|
componentGap
|
|
18
18
|
} from "../chunk-6CTCHYIS.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
__objRest,
|
|
21
21
|
__spreadProps,
|
|
22
22
|
__spreadValues
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-ORMEWXMH.js";
|
|
24
24
|
|
|
25
25
|
// src/components/Upload.tsx
|
|
26
26
|
import clsx from "clsx";
|
package/dist/components/index.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataGrid
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-KIAURU7N.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
6
|
} from "../chunk-QQ5G773N.js";
|
|
7
7
|
import {
|
|
8
8
|
Select
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-SYN5FFHV.js";
|
|
10
10
|
import {
|
|
11
11
|
Checkbox
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-NO5BIKWS.js";
|
|
13
13
|
import {
|
|
14
14
|
DataCellHeader,
|
|
15
15
|
DataGridCell,
|
|
16
16
|
DragAlongCell,
|
|
17
17
|
DraggableCellHeader
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import {
|
|
20
|
-
MenuOption
|
|
21
|
-
} from "../chunk-6IXVPFYC.js";
|
|
18
|
+
} from "../chunk-2MZ5WKCL.js";
|
|
22
19
|
import {
|
|
23
20
|
Menu
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import
|
|
21
|
+
} from "../chunk-PGSDEGBP.js";
|
|
22
|
+
import "../chunk-CCOQOO23.js";
|
|
23
|
+
import {
|
|
24
|
+
MenuOption
|
|
25
|
+
} from "../chunk-FLVYV4T4.js";
|
|
26
|
+
import "../chunk-HIVPC3T4.js";
|
|
27
|
+
import "../chunk-VXWSAIB5.js";
|
|
28
|
+
import "../chunk-TYTD4FLW.js";
|
|
27
29
|
import {
|
|
28
30
|
Search
|
|
29
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-7PWT532Y.js";
|
|
30
32
|
import {
|
|
31
33
|
Input
|
|
32
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-5NIAGAA7.js";
|
|
35
|
+
import "../chunk-5UH6QUFB.js";
|
|
33
36
|
import {
|
|
34
37
|
Label
|
|
35
|
-
} from "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-VXWSAIB5.js";
|
|
38
|
-
import "../chunk-T3F37S6Z.js";
|
|
39
|
-
import "../chunk-5UH6QUFB.js";
|
|
38
|
+
} from "../chunk-7CS736EF.js";
|
|
39
|
+
import "../chunk-WVUIIBRR.js";
|
|
40
40
|
import {
|
|
41
41
|
Subheader
|
|
42
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-FA7IFW66.js";
|
|
43
43
|
import {
|
|
44
44
|
Accordion
|
|
45
|
-
} from "../chunk-
|
|
46
|
-
import "../chunk-
|
|
45
|
+
} from "../chunk-4VER5OEU.js";
|
|
46
|
+
import "../chunk-NQXZBWDZ.js";
|
|
47
47
|
import {
|
|
48
48
|
Card
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-4LXG6QNT.js";
|
|
50
50
|
import {
|
|
51
51
|
Paragraph
|
|
52
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-OGIFIPKH.js";
|
|
53
53
|
import {
|
|
54
54
|
Icon
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-NKUETCDA.js";
|
|
56
56
|
import {
|
|
57
57
|
Button
|
|
58
|
-
} from "../chunk-
|
|
58
|
+
} from "../chunk-WWAPK5PH.js";
|
|
59
59
|
import "../chunk-6CTCHYIS.js";
|
|
60
|
-
import "../chunk-
|
|
60
|
+
import "../chunk-ORMEWXMH.js";
|
|
61
61
|
export {
|
|
62
62
|
Accordion,
|
|
63
63
|
Button,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
useMenuPosition,
|
|
4
4
|
useSubMenuSystem
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-CCOQOO23.js";
|
|
6
|
+
import "../chunk-HIVPC3T4.js";
|
|
7
7
|
import "../chunk-VXWSAIB5.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TYTD4FLW.js";
|
|
9
9
|
import "../chunk-5UH6QUFB.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-ORMEWXMH.js";
|
|
11
11
|
export {
|
|
12
12
|
useMenuPosition,
|
|
13
13
|
useSubMenuSystem
|
package/dist/hooks/index.js
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
useMatchesMedia,
|
|
5
5
|
useMatchesMobile,
|
|
6
6
|
useTableLayout
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-HIVPC3T4.js";
|
|
8
8
|
import "../chunk-VXWSAIB5.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-TYTD4FLW.js";
|
|
10
10
|
import "../chunk-5UH6QUFB.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-ORMEWXMH.js";
|
|
12
12
|
export {
|
|
13
13
|
useInfiniteScroll,
|
|
14
14
|
useKeydown,
|
package/dist/utils/index.js
CHANGED
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
mergeObjectArrays,
|
|
14
14
|
parseDateParts,
|
|
15
15
|
parseInputDate
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-TYTD4FLW.js";
|
|
17
17
|
import {
|
|
18
18
|
formatCurrencyDisplay,
|
|
19
19
|
formatDecimalValue,
|
|
20
20
|
getDecimalPlaceholder
|
|
21
21
|
} from "../chunk-5UH6QUFB.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-ORMEWXMH.js";
|
|
23
23
|
export {
|
|
24
24
|
calculateCursorPosition,
|
|
25
25
|
countDigitsUpToCursor,
|
package/package.json
CHANGED
|
@@ -95,9 +95,7 @@ export function PDFViewer(props: PDFViewerProps) {
|
|
|
95
95
|
}
|
|
96
96
|
className="!max-w-fit"
|
|
97
97
|
>
|
|
98
|
-
<
|
|
99
|
-
<PDFElement testid={testid} b64={encodedPdfs[currentIndex].base64} />
|
|
100
|
-
</Stack>
|
|
98
|
+
<PDFElement testid={testid} b64={encodedPdfs[currentIndex].base64} />
|
|
101
99
|
</Modal>
|
|
102
100
|
);
|
|
103
101
|
}
|
|
@@ -124,29 +122,19 @@ function DownloadIcon({
|
|
|
124
122
|
|
|
125
123
|
function PDFElement({ b64, testid }: { b64: string; testid?: string }) {
|
|
126
124
|
const canvasRef = useRef<HTMLCanvasElement>(null);
|
|
127
|
-
const [pages, setPages] = useState<React.ReactNode[]>([]);
|
|
128
|
-
|
|
129
|
-
useEffect(() => {
|
|
130
|
-
setPages([]);
|
|
131
|
-
}, [b64]);
|
|
132
125
|
|
|
133
126
|
const { pdfDocument } = usePdf({
|
|
134
127
|
file: `data:application/pdf;base64,${b64}`,
|
|
135
128
|
workerSrc: "/scripts/pdf.worker.min.mjs",
|
|
136
|
-
page: 1,
|
|
137
129
|
canvasRef,
|
|
138
130
|
scale: 1.1,
|
|
139
|
-
onDocumentLoadSuccess: async (pdf) => {
|
|
140
|
-
if (pdf.numPages === 1) return;
|
|
141
|
-
// Page loader
|
|
142
|
-
const pages = await renderPages(pdf, testid || "pdf-viewer");
|
|
143
|
-
setPages(pages);
|
|
144
|
-
},
|
|
145
131
|
});
|
|
146
132
|
|
|
133
|
+
const pagesArr = new Array(pdfDocument?.numPages ?? 1).fill(null);
|
|
134
|
+
|
|
147
135
|
return (
|
|
148
136
|
<div
|
|
149
|
-
className="flex flex-col space-y-4
|
|
137
|
+
className="flex flex-col space-y-4"
|
|
150
138
|
style={{
|
|
151
139
|
minHeight: 871,
|
|
152
140
|
minWidth: 654,
|
|
@@ -154,20 +142,27 @@ function PDFElement({ b64, testid }: { b64: string; testid?: string }) {
|
|
|
154
142
|
>
|
|
155
143
|
{!!pdfDocument && !!b64 ? (
|
|
156
144
|
<Stack sizing="layout-group">
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
145
|
+
{pagesArr.length > 1 ? (
|
|
146
|
+
pagesArr.map((_, i) => (
|
|
147
|
+
<div
|
|
148
|
+
key={`${testid}-pdf-page-${i + 1}`}
|
|
149
|
+
className="flex justify-center border border-border-primary-normal"
|
|
150
|
+
>
|
|
151
|
+
<PdfPage
|
|
152
|
+
testid={testid ? `${testid}-pdf_page_${i + 1}` : undefined}
|
|
153
|
+
file={`data:application/pdf;base64,${b64}`}
|
|
154
|
+
pageNumber={i + 1}
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
))
|
|
158
|
+
) : (
|
|
159
|
+
<div className="flex justify-center border border-border-primary-normal">
|
|
160
|
+
<canvas
|
|
161
|
+
data-testid={testid ? `${testid}-pdf-content` : undefined}
|
|
162
|
+
ref={canvasRef}
|
|
163
|
+
/>
|
|
169
164
|
</div>
|
|
170
|
-
)
|
|
165
|
+
)}
|
|
171
166
|
</Stack>
|
|
172
167
|
) : (
|
|
173
168
|
<Stack
|
|
@@ -246,33 +241,24 @@ function PdfNavigation({
|
|
|
246
241
|
);
|
|
247
242
|
}
|
|
248
243
|
|
|
249
|
-
function
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
if (el) {
|
|
260
|
-
const ctx = el.getContext("2d");
|
|
261
|
-
el.width = page.getViewport({ scale: 1.1 }).width;
|
|
262
|
-
el.height = page.getViewport({ scale: 1.1 }).height;
|
|
244
|
+
function PdfPage({
|
|
245
|
+
file,
|
|
246
|
+
pageNumber,
|
|
247
|
+
testid,
|
|
248
|
+
}: {
|
|
249
|
+
file: string;
|
|
250
|
+
pageNumber: number;
|
|
251
|
+
testid?: string;
|
|
252
|
+
}) {
|
|
253
|
+
const canvasRef = useRef<HTMLCanvasElement>(null);
|
|
263
254
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
/>
|
|
274
|
-
);
|
|
275
|
-
},
|
|
276
|
-
);
|
|
277
|
-
return Promise.all(pagesPromises);
|
|
255
|
+
const { pdfDocument } = usePdf({
|
|
256
|
+
file,
|
|
257
|
+
page: pageNumber,
|
|
258
|
+
canvasRef,
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
if (!pdfDocument) return null;
|
|
262
|
+
|
|
263
|
+
return <canvas ref={canvasRef} data-testid={testid} />;
|
|
278
264
|
}
|