@etus/ui 0.1.0 → 0.1.2
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-UP2VWCW5.js +38 -0
- package/dist/chunk-UP2VWCW5.js.map +1 -0
- package/dist/index.d.ts +1177 -228
- package/dist/index.js +9506 -4308
- package/dist/index.js.map +1 -1
- package/dist/jspdf.node.min-CTWP225M.js +39344 -0
- package/dist/jspdf.node.min-CTWP225M.js.map +1 -0
- package/dist/jspdf.plugin.autotable-AAE7PZKA.js +1908 -0
- package/dist/jspdf.plugin.autotable-AAE7PZKA.js.map +1 -0
- package/dist/lib/utils.js +1 -0
- package/dist/xlsx-PWHBQ6NK.js +31945 -0
- package/dist/xlsx-PWHBQ6NK.js.map +1 -0
- package/package.json +12 -6
- package/styles.css +1 -0
- package/src/components/CLAUDE.md +0 -66
- package/src/components/advanced/AssetManager/AssetManager.test.tsx +0 -624
- package/src/components/advanced/AssetManager/AssetManager.tsx +0 -928
- package/src/components/advanced/AssetManager/AssetManager.types.ts +0 -248
- package/src/components/advanced/AssetManager/AssetManager.variants.ts +0 -284
- package/src/components/advanced/AssetManager/README.md +0 -246
- package/src/components/advanced/AssetManager/index.ts +0 -4
- package/src/components/advanced/CLAUDE.md +0 -77
- package/src/components/advanced/Calendar/Calendar.test.tsx +0 -718
- package/src/components/advanced/Calendar/Calendar.tsx +0 -264
- package/src/components/advanced/Calendar/Calendar.types.ts +0 -62
- package/src/components/advanced/Calendar/Calendar.variants.ts +0 -154
- package/src/components/advanced/Calendar/README.md +0 -389
- package/src/components/advanced/Calendar/index.ts +0 -3
- package/src/components/advanced/Command/Command.test.tsx +0 -1014
- package/src/components/advanced/Command/Command.tsx +0 -330
- package/src/components/advanced/Command/Command.types.ts +0 -238
- package/src/components/advanced/Command/Command.variants.ts +0 -300
- package/src/components/advanced/Command/README.md +0 -1259
- package/src/components/advanced/Command/index.ts +0 -45
- package/src/components/advanced/DragAndDrop/DragAndDrop.test.tsx +0 -573
- package/src/components/advanced/DragAndDrop/DragAndDrop.tsx +0 -495
- package/src/components/advanced/DragAndDrop/DragAndDrop.types.ts +0 -237
- package/src/components/advanced/DragAndDrop/DragAndDrop.variants.ts +0 -156
- package/src/components/advanced/DragAndDrop/README.md +0 -284
- package/src/components/advanced/DragAndDrop/index.ts +0 -4
- package/src/components/advanced/ErrorBoundary/ErrorBoundary.test.tsx +0 -372
- package/src/components/advanced/ErrorBoundary/ErrorBoundary.tsx +0 -184
- package/src/components/advanced/ErrorBoundary/ErrorBoundary.types.ts +0 -73
- package/src/components/advanced/ErrorBoundary/ErrorBoundary.variants.ts +0 -153
- package/src/components/advanced/ErrorBoundary/README.md +0 -296
- package/src/components/advanced/ErrorBoundary/index.ts +0 -18
- package/src/components/advanced/EventCalendar/EventCalendar.test.tsx +0 -535
- package/src/components/advanced/EventCalendar/EventCalendar.tsx +0 -1066
- package/src/components/advanced/EventCalendar/EventCalendar.types.ts +0 -232
- package/src/components/advanced/EventCalendar/EventCalendar.variants.ts +0 -222
- package/src/components/advanced/EventCalendar/README.md +0 -330
- package/src/components/advanced/EventCalendar/index.ts +0 -35
- package/src/components/advanced/FileDropzone/FileDropzone.test.tsx +0 -344
- package/src/components/advanced/FileDropzone/FileDropzone.tsx +0 -188
- package/src/components/advanced/FileDropzone/FileDropzone.types.ts +0 -47
- package/src/components/advanced/FileDropzone/FileDropzone.variants.ts +0 -46
- package/src/components/advanced/FileDropzone/README.md +0 -359
- package/src/components/advanced/FileDropzone/index.ts +0 -7
- package/src/components/advanced/FilePreview/FilePreview.test.tsx +0 -503
- package/src/components/advanced/FilePreview/FilePreview.tsx +0 -385
- package/src/components/advanced/FilePreview/FilePreview.types.ts +0 -90
- package/src/components/advanced/FilePreview/FilePreview.variants.ts +0 -234
- package/src/components/advanced/FilePreview/README.md +0 -318
- package/src/components/advanced/FilePreview/index.ts +0 -25
- package/src/components/advanced/FileUpload/FileUpload.test.tsx +0 -676
- package/src/components/advanced/FileUpload/FileUpload.tsx +0 -845
- package/src/components/advanced/FileUpload/FileUpload.types.ts +0 -270
- package/src/components/advanced/FileUpload/FileUpload.variants.ts +0 -216
- package/src/components/advanced/FileUpload/README.md +0 -380
- package/src/components/advanced/FileUpload/index.ts +0 -39
- package/src/components/advanced/FilterBuilder/FilterBuilder.test.tsx +0 -644
- package/src/components/advanced/FilterBuilder/FilterBuilder.tsx +0 -881
- package/src/components/advanced/FilterBuilder/FilterBuilder.types.ts +0 -249
- package/src/components/advanced/FilterBuilder/FilterBuilder.variants.ts +0 -307
- package/src/components/advanced/FilterBuilder/README.md +0 -383
- package/src/components/advanced/FilterBuilder/index.ts +0 -48
- package/src/components/advanced/MarkdownEditor/MarkdownEditor.test.tsx +0 -468
- package/src/components/advanced/MarkdownEditor/MarkdownEditor.tsx +0 -556
- package/src/components/advanced/MarkdownEditor/MarkdownEditor.types.ts +0 -108
- package/src/components/advanced/MarkdownEditor/MarkdownEditor.variants.ts +0 -62
- package/src/components/advanced/MarkdownEditor/README.md +0 -352
- package/src/components/advanced/MarkdownEditor/index.ts +0 -15
- package/src/components/advanced/Portal/Portal.test.tsx +0 -406
- package/src/components/advanced/Portal/Portal.tsx +0 -77
- package/src/components/advanced/Portal/Portal.types.ts +0 -28
- package/src/components/advanced/Portal/Portal.variants.ts +0 -95
- package/src/components/advanced/Portal/README.md +0 -326
- package/src/components/advanced/Portal/index.ts +0 -9
- package/src/components/advanced/RichTextEditor/README.md +0 -383
- package/src/components/advanced/RichTextEditor/RichTextEditor.test.tsx +0 -394
- package/src/components/advanced/RichTextEditor/RichTextEditor.tsx +0 -651
- package/src/components/advanced/RichTextEditor/RichTextEditor.types.ts +0 -77
- package/src/components/advanced/RichTextEditor/RichTextEditor.variants.ts +0 -151
- package/src/components/advanced/RichTextEditor/index.ts +0 -24
- package/src/components/advanced/Search/README.md +0 -391
- package/src/components/advanced/Search/Search.test.tsx +0 -567
- package/src/components/advanced/Search/Search.tsx +0 -829
- package/src/components/advanced/Search/Search.types.ts +0 -243
- package/src/components/advanced/Search/Search.variants.ts +0 -358
- package/src/components/advanced/Search/index.ts +0 -52
- package/src/components/advanced/SortableList/README.md +0 -448
- package/src/components/advanced/SortableList/SortableList.test.tsx +0 -317
- package/src/components/advanced/SortableList/SortableList.tsx +0 -392
- package/src/components/advanced/SortableList/SortableList.types.ts +0 -122
- package/src/components/advanced/SortableList/SortableList.variants.ts +0 -141
- package/src/components/advanced/SortableList/index.ts +0 -33
- package/src/components/advanced/VersionControl/README.md +0 -440
- package/src/components/advanced/VersionControl/VersionControl.test.tsx +0 -517
- package/src/components/advanced/VersionControl/VersionControl.tsx +0 -758
- package/src/components/advanced/VersionControl/VersionControl.types.ts +0 -176
- package/src/components/advanced/VersionControl/VersionControl.variants.ts +0 -203
- package/src/components/advanced/VersionControl/index.ts +0 -33
- package/src/components/advanced/index.ts +0 -17
- package/src/components/data-display/Accordion/Accordion.test.tsx +0 -519
- package/src/components/data-display/Accordion/Accordion.tsx +0 -164
- package/src/components/data-display/Accordion/Accordion.types.ts +0 -37
- package/src/components/data-display/Accordion/Accordion.variants.ts +0 -112
- package/src/components/data-display/Accordion/README.md +0 -976
- package/src/components/data-display/Accordion/index.ts +0 -31
- package/src/components/data-display/AreaChart/AreaChart.test.tsx +0 -529
- package/src/components/data-display/AreaChart/AreaChart.tsx +0 -318
- package/src/components/data-display/AreaChart/AreaChart.types.ts +0 -169
- package/src/components/data-display/AreaChart/AreaChart.variants.ts +0 -45
- package/src/components/data-display/AreaChart/README.md +0 -229
- package/src/components/data-display/AreaChart/index.ts +0 -2
- package/src/components/data-display/Banner/Banner.test.tsx +0 -648
- package/src/components/data-display/Banner/Banner.tsx +0 -111
- package/src/components/data-display/Banner/Banner.types.ts +0 -51
- package/src/components/data-display/Banner/Banner.variants.ts +0 -37
- package/src/components/data-display/Banner/README.md +0 -351
- package/src/components/data-display/Banner/index.ts +0 -2
- package/src/components/data-display/BarChart/BarChart.test.tsx +0 -536
- package/src/components/data-display/BarChart/BarChart.tsx +0 -305
- package/src/components/data-display/BarChart/BarChart.types.ts +0 -145
- package/src/components/data-display/BarChart/BarChart.variants.ts +0 -61
- package/src/components/data-display/BarChart/README.md +0 -205
- package/src/components/data-display/BarChart/index.ts +0 -2
- package/src/components/data-display/BarList/BarList.tsx +0 -172
- package/src/components/data-display/BarList/BarList.types.ts +0 -69
- package/src/components/data-display/BarList/BarList.variants.ts +0 -63
- package/src/components/data-display/BarList/index.ts +0 -2
- package/src/components/data-display/CLAUDE.md +0 -90
- package/src/components/data-display/Callout/Callout.test.tsx +0 -516
- package/src/components/data-display/Callout/Callout.tsx +0 -112
- package/src/components/data-display/Callout/Callout.types.ts +0 -37
- package/src/components/data-display/Callout/Callout.variants.ts +0 -48
- package/src/components/data-display/Callout/README.md +0 -341
- package/src/components/data-display/Callout/index.ts +0 -2
- package/src/components/data-display/Carousel/Carousel.test.tsx +0 -386
- package/src/components/data-display/Carousel/Carousel.tsx +0 -241
- package/src/components/data-display/Carousel/Carousel.types.ts +0 -20
- package/src/components/data-display/Carousel/Carousel.variants.ts +0 -125
- package/src/components/data-display/Carousel/README.md +0 -711
- package/src/components/data-display/Carousel/index.ts +0 -1
- package/src/components/data-display/CategoryBar/CategoryBar.tsx +0 -220
- package/src/components/data-display/CategoryBar/CategoryBar.types.ts +0 -80
- package/src/components/data-display/CategoryBar/CategoryBar.variants.ts +0 -85
- package/src/components/data-display/CategoryBar/index.ts +0 -2
- package/src/components/data-display/Chart/Chart.test.tsx +0 -432
- package/src/components/data-display/Chart/Chart.tsx +0 -476
- package/src/components/data-display/Chart/Chart.types.ts +0 -24
- package/src/components/data-display/Chart/Chart.variants.ts +0 -106
- package/src/components/data-display/Chart/README.md +0 -674
- package/src/components/data-display/Chart/index.ts +0 -1
- package/src/components/data-display/ChartCard/ChartCard.test.tsx +0 -327
- package/src/components/data-display/ChartCard/ChartCard.tsx +0 -201
- package/src/components/data-display/ChartCard/ChartCard.types.ts +0 -68
- package/src/components/data-display/ChartCard/ChartCard.variants.ts +0 -63
- package/src/components/data-display/ChartCard/index.ts +0 -17
- package/src/components/data-display/ChartLegend/ChartLegend.test.tsx +0 -165
- package/src/components/data-display/ChartLegend/ChartLegend.types.ts +0 -88
- package/src/components/data-display/ChartLegend/README.md +0 -317
- package/src/components/data-display/ChartLegend/index.ts +0 -22
- package/src/components/data-display/ComboChart/ComboChart.tsx +0 -380
- package/src/components/data-display/ComboChart/ComboChart.types.ts +0 -224
- package/src/components/data-display/ComboChart/index.ts +0 -2
- package/src/components/data-display/DashboardCard/DashboardCard.test.tsx +0 -289
- package/src/components/data-display/DashboardCard/DashboardCard.tsx +0 -285
- package/src/components/data-display/DashboardCard/DashboardCard.types.ts +0 -74
- package/src/components/data-display/DashboardCard/DashboardCard.variants.ts +0 -67
- package/src/components/data-display/DashboardCard/index.ts +0 -25
- package/src/components/data-display/DashboardFilterbar/DashboardFilterbar.tsx +0 -151
- package/src/components/data-display/DashboardFilterbar/DashboardFilterbar.types.ts +0 -39
- package/src/components/data-display/DashboardFilterbar/DashboardFilterbar.variants.ts +0 -30
- package/src/components/data-display/DashboardFilterbar/index.ts +0 -10
- package/src/components/data-display/DataTable/DataTable.test.tsx +0 -654
- package/src/components/data-display/DataTable/DataTable.tsx +0 -529
- package/src/components/data-display/DataTable/DataTable.types.ts +0 -190
- package/src/components/data-display/DataTable/DataTable.variants.ts +0 -79
- package/src/components/data-display/DataTable/README.md +0 -447
- package/src/components/data-display/DataTable/index.ts +0 -2
- package/src/components/data-display/DeltaBar/DeltaBar.tsx +0 -100
- package/src/components/data-display/DeltaBar/DeltaBar.types.ts +0 -57
- package/src/components/data-display/DeltaBar/DeltaBar.variants.ts +0 -40
- package/src/components/data-display/DeltaBar/index.ts +0 -2
- package/src/components/data-display/EmptyState/EmptyState.test.tsx +0 -368
- package/src/components/data-display/EmptyState/EmptyState.tsx +0 -91
- package/src/components/data-display/EmptyState/EmptyState.types.ts +0 -9
- package/src/components/data-display/EmptyState/EmptyState.variants.ts +0 -28
- package/src/components/data-display/EmptyState/README.md +0 -746
- package/src/components/data-display/EmptyState/index.ts +0 -1
- package/src/components/data-display/Feed/Feed.test.tsx +0 -668
- package/src/components/data-display/Feed/Feed.tsx +0 -290
- package/src/components/data-display/Feed/Feed.types.ts +0 -104
- package/src/components/data-display/Feed/Feed.variants.ts +0 -64
- package/src/components/data-display/Feed/README.md +0 -326
- package/src/components/data-display/Feed/index.ts +0 -17
- package/src/components/data-display/FunnelChart/FunnelChart.tsx +0 -177
- package/src/components/data-display/FunnelChart/FunnelChart.types.ts +0 -145
- package/src/components/data-display/FunnelChart/index.ts +0 -2
- package/src/components/data-display/GaugeChart/GaugeChart.test.tsx +0 -129
- package/src/components/data-display/GaugeChart/GaugeChart.tsx +0 -332
- package/src/components/data-display/GaugeChart/GaugeChart.types.ts +0 -53
- package/src/components/data-display/GaugeChart/GaugeChart.variants.ts +0 -56
- package/src/components/data-display/GaugeChart/README.md +0 -305
- package/src/components/data-display/GaugeChart/index.ts +0 -3
- package/src/components/data-display/Heatmap/Heatmap.test.tsx +0 -630
- package/src/components/data-display/Heatmap/Heatmap.tsx +0 -569
- package/src/components/data-display/Heatmap/Heatmap.types.ts +0 -120
- package/src/components/data-display/Heatmap/Heatmap.variants.ts +0 -72
- package/src/components/data-display/Heatmap/README.md +0 -321
- package/src/components/data-display/Heatmap/index.ts +0 -2
- package/src/components/data-display/HoverCard/HoverCard.test.tsx +0 -314
- package/src/components/data-display/HoverCard/HoverCard.tsx +0 -40
- package/src/components/data-display/HoverCard/HoverCard.types.ts +0 -21
- package/src/components/data-display/HoverCard/HoverCard.variants.ts +0 -29
- package/src/components/data-display/HoverCard/README.md +0 -624
- package/src/components/data-display/HoverCard/index.ts +0 -1
- package/src/components/data-display/ImageGallery/ImageGallery.test.tsx +0 -519
- package/src/components/data-display/ImageGallery/ImageGallery.tsx +0 -733
- package/src/components/data-display/ImageGallery/ImageGallery.types.ts +0 -109
- package/src/components/data-display/ImageGallery/ImageGallery.variants.ts +0 -58
- package/src/components/data-display/ImageGallery/README.md +0 -352
- package/src/components/data-display/ImageGallery/index.ts +0 -9
- package/src/components/data-display/Item/Item.test.tsx +0 -476
- package/src/components/data-display/Item/Item.tsx +0 -195
- package/src/components/data-display/Item/Item.types.ts +0 -23
- package/src/components/data-display/Item/Item.variants.ts +0 -51
- package/src/components/data-display/Item/README.md +0 -759
- package/src/components/data-display/Item/index.ts +0 -1
- package/src/components/data-display/KPICard/KPICard.test.tsx +0 -445
- package/src/components/data-display/KPICard/KPICard.tsx +0 -203
- package/src/components/data-display/KPICard/KPICard.types.ts +0 -32
- package/src/components/data-display/KPICard/KPICard.variants.ts +0 -64
- package/src/components/data-display/KPICard/README.md +0 -380
- package/src/components/data-display/KPICard/index.ts +0 -7
- package/src/components/data-display/Lightbox/Lightbox.test.tsx +0 -574
- package/src/components/data-display/Lightbox/Lightbox.tsx +0 -466
- package/src/components/data-display/Lightbox/Lightbox.types.ts +0 -53
- package/src/components/data-display/Lightbox/Lightbox.variants.ts +0 -99
- package/src/components/data-display/Lightbox/README.md +0 -397
- package/src/components/data-display/Lightbox/index.ts +0 -2
- package/src/components/data-display/LineChart/LineChart.test.tsx +0 -654
- package/src/components/data-display/LineChart/LineChart.tsx +0 -295
- package/src/components/data-display/LineChart/LineChart.types.ts +0 -168
- package/src/components/data-display/LineChart/LineChart.variants.ts +0 -52
- package/src/components/data-display/LineChart/README.md +0 -242
- package/src/components/data-display/LineChart/index.ts +0 -8
- package/src/components/data-display/List/List.test.tsx +0 -756
- package/src/components/data-display/List/List.tsx +0 -455
- package/src/components/data-display/List/List.types.ts +0 -67
- package/src/components/data-display/List/List.variants.ts +0 -69
- package/src/components/data-display/List/README.md +0 -374
- package/src/components/data-display/List/index.ts +0 -9
- package/src/components/data-display/MarkerBar/MarkerBar.tsx +0 -130
- package/src/components/data-display/MarkerBar/MarkerBar.types.ts +0 -67
- package/src/components/data-display/MarkerBar/MarkerBar.variants.ts +0 -75
- package/src/components/data-display/MarkerBar/index.ts +0 -3
- package/src/components/data-display/PieChart/PieChart.test.tsx +0 -655
- package/src/components/data-display/PieChart/PieChart.tsx +0 -327
- package/src/components/data-display/PieChart/PieChart.types.ts +0 -134
- package/src/components/data-display/PieChart/PieChart.variants.ts +0 -49
- package/src/components/data-display/PieChart/README.md +0 -261
- package/src/components/data-display/PieChart/index.ts +0 -2
- package/src/components/data-display/ScatterChart/ScatterChart.tsx +0 -310
- package/src/components/data-display/ScatterChart/ScatterChart.types.ts +0 -272
- package/src/components/data-display/ScatterChart/index.ts +0 -2
- package/src/components/data-display/SingleStat/README.md +0 -363
- package/src/components/data-display/SingleStat/SingleStat.test.tsx +0 -223
- package/src/components/data-display/SingleStat/SingleStat.tsx +0 -251
- package/src/components/data-display/SingleStat/SingleStat.types.ts +0 -71
- package/src/components/data-display/SingleStat/SingleStat.variants.ts +0 -51
- package/src/components/data-display/SingleStat/index.ts +0 -6
- package/src/components/data-display/Sparkline/README.md +0 -321
- package/src/components/data-display/Sparkline/Sparkline.test.tsx +0 -276
- package/src/components/data-display/Sparkline/Sparkline.tsx +0 -971
- package/src/components/data-display/Sparkline/Sparkline.types.ts +0 -147
- package/src/components/data-display/Sparkline/Sparkline.variants.ts +0 -52
- package/src/components/data-display/Sparkline/index.ts +0 -9
- package/src/components/data-display/Table/README.md +0 -821
- package/src/components/data-display/Table/Table.test.tsx +0 -732
- package/src/components/data-display/Table/Table.tsx +0 -123
- package/src/components/data-display/Table/Table.types.ts +0 -20
- package/src/components/data-display/Table/Table.variants.ts +0 -123
- package/src/components/data-display/Table/index.ts +0 -1
- package/src/components/data-display/Timeline/README.md +0 -366
- package/src/components/data-display/Timeline/Timeline.test.tsx +0 -701
- package/src/components/data-display/Timeline/Timeline.tsx +0 -328
- package/src/components/data-display/Timeline/Timeline.types.ts +0 -59
- package/src/components/data-display/Timeline/Timeline.variants.ts +0 -152
- package/src/components/data-display/Timeline/index.ts +0 -15
- package/src/components/data-display/Tracker/Tracker.tsx +0 -105
- package/src/components/data-display/Tracker/Tracker.types.ts +0 -45
- package/src/components/data-display/Tracker/Tracker.variants.ts +0 -24
- package/src/components/data-display/Tracker/index.ts +0 -2
- package/src/components/data-display/VirtualTable/README.md +0 -383
- package/src/components/data-display/VirtualTable/VirtualTable.test.tsx +0 -295
- package/src/components/data-display/VirtualTable/VirtualTable.tsx +0 -354
- package/src/components/data-display/VirtualTable/VirtualTable.types.ts +0 -62
- package/src/components/data-display/VirtualTable/VirtualTable.variants.ts +0 -61
- package/src/components/data-display/VirtualTable/index.ts +0 -2
- package/src/components/data-display/index.ts +0 -35
- package/src/components/feedback/Alert/Alert.test.tsx +0 -614
- package/src/components/feedback/Alert/Alert.tsx +0 -48
- package/src/components/feedback/Alert/Alert.types.ts +0 -42
- package/src/components/feedback/Alert/Alert.variants.ts +0 -20
- package/src/components/feedback/Alert/README.md +0 -522
- package/src/components/feedback/Alert/index.ts +0 -3
- package/src/components/feedback/AlertDialog/AlertDialog.test.tsx +0 -1237
- package/src/components/feedback/AlertDialog/AlertDialog.tsx +0 -160
- package/src/components/feedback/AlertDialog/AlertDialog.types.ts +0 -139
- package/src/components/feedback/AlertDialog/README.md +0 -723
- package/src/components/feedback/AlertDialog/index.ts +0 -2
- package/src/components/feedback/CLAUDE.md +0 -87
- package/src/components/feedback/ConfirmModal/ConfirmModal.test.tsx +0 -404
- package/src/components/feedback/ConfirmModal/ConfirmModal.tsx +0 -139
- package/src/components/feedback/ConfirmModal/ConfirmModal.types.ts +0 -117
- package/src/components/feedback/ConfirmModal/README.md +0 -546
- package/src/components/feedback/ConfirmModal/index.ts +0 -2
- package/src/components/feedback/Dialog/Dialog.test.tsx +0 -1070
- package/src/components/feedback/Dialog/Dialog.tsx +0 -137
- package/src/components/feedback/Dialog/Dialog.types.ts +0 -119
- package/src/components/feedback/Dialog/README.md +0 -770
- package/src/components/feedback/Dialog/index.ts +0 -2
- package/src/components/feedback/ErrorPage/ErrorPage.test.tsx +0 -338
- package/src/components/feedback/ErrorPage/ErrorPage.tsx +0 -232
- package/src/components/feedback/ErrorPage/ErrorPage.types.ts +0 -95
- package/src/components/feedback/ErrorPage/README.md +0 -573
- package/src/components/feedback/ErrorPage/index.ts +0 -6
- package/src/components/feedback/FocusTrap/FocusTrap.test.tsx +0 -378
- package/src/components/feedback/FocusTrap/FocusTrap.tsx +0 -115
- package/src/components/feedback/FocusTrap/FocusTrap.types.ts +0 -119
- package/src/components/feedback/FocusTrap/README.md +0 -571
- package/src/components/feedback/FocusTrap/index.ts +0 -2
- package/src/components/feedback/Message/Message.test.tsx +0 -143
- package/src/components/feedback/Message/Message.tsx +0 -66
- package/src/components/feedback/Message/Message.types.ts +0 -44
- package/src/components/feedback/Message/Message.variants.ts +0 -24
- package/src/components/feedback/Message/README.md +0 -522
- package/src/components/feedback/Message/index.ts +0 -2
- package/src/components/feedback/Modal/Modal.test.tsx +0 -475
- package/src/components/feedback/Modal/Modal.tsx +0 -168
- package/src/components/feedback/Modal/Modal.types.ts +0 -91
- package/src/components/feedback/Modal/README.md +0 -517
- package/src/components/feedback/Modal/index.ts +0 -2
- package/src/components/feedback/Notification/Notification.test.tsx +0 -908
- package/src/components/feedback/Notification/Notification.tsx +0 -222
- package/src/components/feedback/Notification/Notification.types.ts +0 -90
- package/src/components/feedback/Notification/Notification.variants.ts +0 -54
- package/src/components/feedback/Notification/README.md +0 -602
- package/src/components/feedback/Notification/index.ts +0 -11
- package/src/components/feedback/Popover/Popover.test.tsx +0 -901
- package/src/components/feedback/Popover/Popover.tsx +0 -60
- package/src/components/feedback/Popover/Popover.types.ts +0 -158
- package/src/components/feedback/Popover/Popover.variants.ts +0 -27
- package/src/components/feedback/Popover/README.md +0 -700
- package/src/components/feedback/Popover/index.ts +0 -2
- package/src/components/feedback/Toast/README.md +0 -613
- package/src/components/feedback/Toast/Toast.test.tsx +0 -1116
- package/src/components/feedback/Toast/Toast.tsx +0 -44
- package/src/components/feedback/Toast/Toast.types.ts +0 -156
- package/src/components/feedback/Toast/index.ts +0 -1
- package/src/components/feedback/Tooltip/README.md +0 -671
- package/src/components/feedback/Tooltip/Tooltip.test.tsx +0 -413
- package/src/components/feedback/Tooltip/Tooltip.tsx +0 -110
- package/src/components/feedback/Tooltip/Tooltip.types.ts +0 -138
- package/src/components/feedback/Tooltip/Tooltip.variants.ts +0 -54
- package/src/components/feedback/Tooltip/index.ts +0 -3
- package/src/components/feedback/index.ts +0 -13
- package/src/components/forms/Autocomplete/Autocomplete.test.tsx +0 -2351
- package/src/components/forms/Autocomplete/Autocomplete.tsx +0 -696
- package/src/components/forms/Autocomplete/Autocomplete.types.ts +0 -211
- package/src/components/forms/Autocomplete/Autocomplete.variants.ts +0 -154
- package/src/components/forms/Autocomplete/README.md +0 -919
- package/src/components/forms/Autocomplete/index.ts +0 -7
- package/src/components/forms/CLAUDE.md +0 -124
- package/src/components/forms/Checkbox/Checkbox.test.tsx +0 -475
- package/src/components/forms/Checkbox/Checkbox.tsx +0 -35
- package/src/components/forms/Checkbox/Checkbox.types.ts +0 -24
- package/src/components/forms/Checkbox/Checkbox.variants.ts +0 -46
- package/src/components/forms/Checkbox/README.md +0 -861
- package/src/components/forms/Checkbox/index.ts +0 -3
- package/src/components/forms/CheckboxGroup/CheckboxGroup.test.tsx +0 -338
- package/src/components/forms/CheckboxGroup/CheckboxGroup.tsx +0 -212
- package/src/components/forms/CheckboxGroup/CheckboxGroup.types.ts +0 -150
- package/src/components/forms/CheckboxGroup/CheckboxGroup.variants.ts +0 -85
- package/src/components/forms/CheckboxGroup/README.md +0 -124
- package/src/components/forms/CheckboxGroup/index.ts +0 -21
- package/src/components/forms/ColorPicker/ColorPicker.test.tsx +0 -916
- package/src/components/forms/ColorPicker/ColorPicker.tsx +0 -282
- package/src/components/forms/ColorPicker/ColorPicker.types.ts +0 -99
- package/src/components/forms/ColorPicker/ColorPicker.variants.ts +0 -84
- package/src/components/forms/ColorPicker/README.md +0 -809
- package/src/components/forms/ColorPicker/index.ts +0 -14
- package/src/components/forms/Combobox/Combobox.test.tsx +0 -975
- package/src/components/forms/Combobox/Combobox.tsx +0 -194
- package/src/components/forms/Combobox/Combobox.types.ts +0 -113
- package/src/components/forms/Combobox/Combobox.variants.ts +0 -108
- package/src/components/forms/Combobox/README.md +0 -923
- package/src/components/forms/Combobox/index.ts +0 -7
- package/src/components/forms/DatePicker/DatePicker.test.tsx +0 -1181
- package/src/components/forms/DatePicker/DatePicker.tsx +0 -503
- package/src/components/forms/DatePicker/DatePicker.types.ts +0 -196
- package/src/components/forms/DatePicker/DatePicker.variants.ts +0 -38
- package/src/components/forms/DatePicker/README.md +0 -821
- package/src/components/forms/DatePicker/index.ts +0 -8
- package/src/components/forms/DateRangePicker/DateRangeInput.tsx +0 -139
- package/src/components/forms/DateRangePicker/DateRangePicker.test.tsx +0 -1684
- package/src/components/forms/DateRangePicker/DateRangePicker.tsx +0 -375
- package/src/components/forms/DateRangePicker/DateRangePicker.types.ts +0 -145
- package/src/components/forms/DateRangePicker/DateRangePicker.variants.ts +0 -133
- package/src/components/forms/DateRangePicker/DateRangePresets.tsx +0 -44
- package/src/components/forms/DateRangePicker/index.ts +0 -25
- package/src/components/forms/DateRangePicker/presets.ts +0 -104
- package/src/components/forms/EmailInput/EmailInput.test.tsx +0 -562
- package/src/components/forms/EmailInput/EmailInput.tsx +0 -59
- package/src/components/forms/EmailInput/EmailInput.types.ts +0 -46
- package/src/components/forms/EmailInput/EmailInput.variants.ts +0 -30
- package/src/components/forms/EmailInput/README.md +0 -708
- package/src/components/forms/EmailInput/index.ts +0 -6
- package/src/components/forms/ErrorMessage/ErrorMessage.test.tsx +0 -457
- package/src/components/forms/ErrorMessage/ErrorMessage.tsx +0 -128
- package/src/components/forms/ErrorMessage/ErrorMessage.types.ts +0 -54
- package/src/components/forms/ErrorMessage/ErrorMessage.variants.ts +0 -78
- package/src/components/forms/ErrorMessage/README.md +0 -855
- package/src/components/forms/ErrorMessage/index.ts +0 -4
- package/src/components/forms/Field/Field.test.tsx +0 -811
- package/src/components/forms/Field/Field.tsx +0 -195
- package/src/components/forms/Field/Field.types.ts +0 -94
- package/src/components/forms/Field/Field.variants.ts +0 -114
- package/src/components/forms/Field/README.md +0 -931
- package/src/components/forms/Field/index.ts +0 -3
- package/src/components/forms/FloatLabel/FloatLabel.test.tsx +0 -248
- package/src/components/forms/FloatLabel/FloatLabel.tsx +0 -110
- package/src/components/forms/FloatLabel/FloatLabel.types.ts +0 -37
- package/src/components/forms/FloatLabel/index.ts +0 -2
- package/src/components/forms/Form/Form.test.tsx +0 -1167
- package/src/components/forms/Form/Form.tsx +0 -170
- package/src/components/forms/Form/Form.types.ts +0 -126
- package/src/components/forms/Form/Form.variants.ts +0 -81
- package/src/components/forms/Form/README.md +0 -787
- package/src/components/forms/Form/index.ts +0 -3
- package/src/components/forms/FormValidation/FormValidation.test.tsx +0 -376
- package/src/components/forms/FormValidation/FormValidation.tsx +0 -99
- package/src/components/forms/FormValidation/FormValidation.types.ts +0 -37
- package/src/components/forms/FormValidation/FormValidation.variants.ts +0 -24
- package/src/components/forms/FormValidation/README.md +0 -592
- package/src/components/forms/FormValidation/index.ts +0 -4
- package/src/components/forms/HelpText/HelpText.test.tsx +0 -558
- package/src/components/forms/HelpText/HelpText.tsx +0 -111
- package/src/components/forms/HelpText/HelpText.types.ts +0 -51
- package/src/components/forms/HelpText/HelpText.variants.ts +0 -54
- package/src/components/forms/HelpText/README.md +0 -739
- package/src/components/forms/HelpText/index.ts +0 -4
- package/src/components/forms/IftaLabel/IftaLabel.test.tsx +0 -193
- package/src/components/forms/IftaLabel/IftaLabel.tsx +0 -72
- package/src/components/forms/IftaLabel/IftaLabel.types.ts +0 -18
- package/src/components/forms/IftaLabel/index.ts +0 -2
- package/src/components/forms/InputGroup/InputGroup.test.tsx +0 -782
- package/src/components/forms/InputGroup/InputGroup.tsx +0 -128
- package/src/components/forms/InputGroup/InputGroup.types.ts +0 -66
- package/src/components/forms/InputGroup/InputGroup.variants.ts +0 -102
- package/src/components/forms/InputGroup/README.md +0 -845
- package/src/components/forms/InputGroup/index.ts +0 -24
- package/src/components/forms/InputOTP/InputOTP.test.tsx +0 -793
- package/src/components/forms/InputOTP/InputOTP.tsx +0 -90
- package/src/components/forms/InputOTP/InputOTP.types.ts +0 -74
- package/src/components/forms/InputOTP/InputOTP.variants.ts +0 -64
- package/src/components/forms/InputOTP/README.md +0 -1149
- package/src/components/forms/InputOTP/index.ts +0 -18
- package/src/components/forms/InputOTPField/InputOTPField.test.tsx +0 -220
- package/src/components/forms/InputOTPField/InputOTPField.tsx +0 -148
- package/src/components/forms/InputOTPField/InputOTPField.types.ts +0 -91
- package/src/components/forms/InputOTPField/InputOTPField.variants.ts +0 -83
- package/src/components/forms/InputOTPField/README.md +0 -195
- package/src/components/forms/InputOTPField/index.ts +0 -12
- package/src/components/forms/MultiSelect/MultiSelect.test.tsx +0 -1036
- package/src/components/forms/MultiSelect/MultiSelect.tsx +0 -291
- package/src/components/forms/MultiSelect/MultiSelect.types.ts +0 -147
- package/src/components/forms/MultiSelect/MultiSelect.variants.ts +0 -132
- package/src/components/forms/MultiSelect/README.md +0 -897
- package/src/components/forms/MultiSelect/index.ts +0 -7
- package/src/components/forms/NativeSelect/NativeSelect.test.tsx +0 -856
- package/src/components/forms/NativeSelect/NativeSelect.tsx +0 -75
- package/src/components/forms/NativeSelect/NativeSelect.types.ts +0 -17
- package/src/components/forms/NativeSelect/NativeSelect.variants.ts +0 -106
- package/src/components/forms/NativeSelect/README.md +0 -1033
- package/src/components/forms/NativeSelect/index.ts +0 -3
- package/src/components/forms/NumberInput/NumberInput.test.tsx +0 -636
- package/src/components/forms/NumberInput/NumberInput.tsx +0 -131
- package/src/components/forms/NumberInput/NumberInput.types.ts +0 -45
- package/src/components/forms/NumberInput/NumberInput.variants.ts +0 -85
- package/src/components/forms/NumberInput/README.md +0 -766
- package/src/components/forms/NumberInput/index.ts +0 -9
- package/src/components/forms/PasswordInput/PasswordInput.test.tsx +0 -525
- package/src/components/forms/PasswordInput/PasswordInput.tsx +0 -67
- package/src/components/forms/PasswordInput/PasswordInput.types.ts +0 -35
- package/src/components/forms/PasswordInput/PasswordInput.variants.ts +0 -34
- package/src/components/forms/PasswordInput/README.md +0 -698
- package/src/components/forms/PasswordInput/index.ts +0 -6
- package/src/components/forms/PaymentInput/PaymentInput.test.tsx +0 -252
- package/src/components/forms/PaymentInput/PaymentInput.tsx +0 -178
- package/src/components/forms/PaymentInput/PaymentInput.types.ts +0 -69
- package/src/components/forms/PaymentInput/PaymentInput.variants.ts +0 -81
- package/src/components/forms/PaymentInput/README.md +0 -263
- package/src/components/forms/PaymentInput/card-utils.ts +0 -219
- package/src/components/forms/PaymentInput/index.ts +0 -23
- package/src/components/forms/PhoneInput/PhoneInput.test.tsx +0 -270
- package/src/components/forms/PhoneInput/PhoneInput.tsx +0 -215
- package/src/components/forms/PhoneInput/PhoneInput.types.ts +0 -74
- package/src/components/forms/PhoneInput/PhoneInput.variants.ts +0 -103
- package/src/components/forms/PhoneInput/README.md +0 -258
- package/src/components/forms/PhoneInput/countries.ts +0 -134
- package/src/components/forms/PhoneInput/index.ts +0 -22
- package/src/components/forms/RadioButton/README.md +0 -832
- package/src/components/forms/RadioButton/RadioButton.test.tsx +0 -583
- package/src/components/forms/RadioButton/RadioButton.tsx +0 -82
- package/src/components/forms/RadioButton/RadioButton.types.ts +0 -23
- package/src/components/forms/RadioButton/RadioButton.variants.ts +0 -80
- package/src/components/forms/RadioButton/index.ts +0 -15
- package/src/components/forms/RadioCardGroup/RadioCardGroup.tsx +0 -130
- package/src/components/forms/RadioCardGroup/RadioCardGroup.types.ts +0 -66
- package/src/components/forms/RadioCardGroup/RadioCardGroup.variants.ts +0 -131
- package/src/components/forms/RadioCardGroup/index.ts +0 -3
- package/src/components/forms/RadioGroup/README.md +0 -908
- package/src/components/forms/RadioGroup/RadioGroup.test.tsx +0 -764
- package/src/components/forms/RadioGroup/RadioGroup.tsx +0 -75
- package/src/components/forms/RadioGroup/RadioGroup.types.ts +0 -36
- package/src/components/forms/RadioGroup/RadioGroup.variants.ts +0 -58
- package/src/components/forms/RadioGroup/index.ts +0 -15
- package/src/components/forms/Rating/README.md +0 -729
- package/src/components/forms/Rating/Rating.test.tsx +0 -729
- package/src/components/forms/Rating/Rating.tsx +0 -258
- package/src/components/forms/Rating/Rating.types.ts +0 -89
- package/src/components/forms/Rating/Rating.variants.ts +0 -56
- package/src/components/forms/Rating/index.ts +0 -8
- package/src/components/forms/SearchInput/README.md +0 -729
- package/src/components/forms/SearchInput/SearchInput.test.tsx +0 -579
- package/src/components/forms/SearchInput/SearchInput.tsx +0 -103
- package/src/components/forms/SearchInput/SearchInput.types.ts +0 -40
- package/src/components/forms/SearchInput/SearchInput.variants.ts +0 -51
- package/src/components/forms/SearchInput/index.ts +0 -8
- package/src/components/forms/Select/README.md +0 -1286
- package/src/components/forms/Select/Select.test.tsx +0 -1136
- package/src/components/forms/Select/Select.tsx +0 -170
- package/src/components/forms/Select/Select.types.ts +0 -75
- package/src/components/forms/Select/Select.variants.ts +0 -133
- package/src/components/forms/Select/index.ts +0 -3
- package/src/components/forms/Slider/README.md +0 -1246
- package/src/components/forms/Slider/Slider.test.tsx +0 -731
- package/src/components/forms/Slider/Slider.tsx +0 -235
- package/src/components/forms/Slider/Slider.types.ts +0 -90
- package/src/components/forms/Slider/Slider.variants.ts +0 -239
- package/src/components/forms/Slider/index.ts +0 -34
- package/src/components/forms/SuccessMessage/README.md +0 -534
- package/src/components/forms/SuccessMessage/SuccessMessage.test.tsx +0 -257
- package/src/components/forms/SuccessMessage/SuccessMessage.tsx +0 -43
- package/src/components/forms/SuccessMessage/SuccessMessage.types.ts +0 -11
- package/src/components/forms/SuccessMessage/SuccessMessage.variants.ts +0 -15
- package/src/components/forms/SuccessMessage/index.ts +0 -4
- package/src/components/forms/Switch/README.md +0 -785
- package/src/components/forms/Switch/Switch.test.tsx +0 -636
- package/src/components/forms/Switch/Switch.tsx +0 -28
- package/src/components/forms/Switch/Switch.types.ts +0 -24
- package/src/components/forms/Switch/Switch.variants.ts +0 -49
- package/src/components/forms/Switch/index.ts +0 -3
- package/src/components/forms/TagsInput/README.md +0 -216
- package/src/components/forms/TagsInput/TagsInput.test.tsx +0 -308
- package/src/components/forms/TagsInput/TagsInput.tsx +0 -189
- package/src/components/forms/TagsInput/TagsInput.types.ts +0 -85
- package/src/components/forms/TagsInput/TagsInput.variants.ts +0 -58
- package/src/components/forms/TagsInput/index.ts +0 -12
- package/src/components/forms/TextInput/README.md +0 -871
- package/src/components/forms/TextInput/TextInput.test.tsx +0 -484
- package/src/components/forms/TextInput/TextInput.tsx +0 -76
- package/src/components/forms/TextInput/TextInput.types.ts +0 -61
- package/src/components/forms/TextInput/TextInput.variants.ts +0 -117
- package/src/components/forms/TextInput/index.ts +0 -14
- package/src/components/forms/Textarea/README.md +0 -905
- package/src/components/forms/Textarea/Textarea.test.tsx +0 -482
- package/src/components/forms/Textarea/Textarea.tsx +0 -24
- package/src/components/forms/Textarea/Textarea.types.ts +0 -39
- package/src/components/forms/Textarea/Textarea.variants.ts +0 -48
- package/src/components/forms/Textarea/index.ts +0 -3
- package/src/components/forms/TextareaField/README.md +0 -172
- package/src/components/forms/TextareaField/TextareaField.test.tsx +0 -260
- package/src/components/forms/TextareaField/TextareaField.tsx +0 -73
- package/src/components/forms/TextareaField/TextareaField.types.ts +0 -37
- package/src/components/forms/TextareaField/TextareaField.variants.ts +0 -83
- package/src/components/forms/TextareaField/index.ts +0 -12
- package/src/components/forms/TimePicker/README.md +0 -750
- package/src/components/forms/TimePicker/TimePicker.test.tsx +0 -780
- package/src/components/forms/TimePicker/TimePicker.tsx +0 -383
- package/src/components/forms/TimePicker/TimePicker.types.ts +0 -94
- package/src/components/forms/TimePicker/TimePicker.variants.ts +0 -83
- package/src/components/forms/TimePicker/index.ts +0 -14
- package/src/components/forms/ToggleGroup/README.md +0 -870
- package/src/components/forms/ToggleGroup/ToggleGroup.test.tsx +0 -941
- package/src/components/forms/ToggleGroup/ToggleGroup.tsx +0 -5
- package/src/components/forms/ToggleGroup/ToggleGroup.types.ts +0 -17
- package/src/components/forms/ToggleGroup/ToggleGroup.variants.ts +0 -42
- package/src/components/forms/ToggleGroup/index.ts +0 -9
- package/src/components/forms/URLInput/README.md +0 -701
- package/src/components/forms/URLInput/URLInput.test.tsx +0 -602
- package/src/components/forms/URLInput/URLInput.tsx +0 -71
- package/src/components/forms/URLInput/URLInput.types.ts +0 -51
- package/src/components/forms/URLInput/URLInput.variants.ts +0 -52
- package/src/components/forms/URLInput/index.ts +0 -8
- package/src/components/forms/index.ts +0 -44
- package/src/components/index.ts +0 -26
- package/src/components/layout/AppContent/AppContent.test.tsx +0 -34
- package/src/components/layout/AppContent/AppContent.tsx +0 -23
- package/src/components/layout/AppContent/AppContent.variants.ts +0 -23
- package/src/components/layout/AppContent/index.ts +0 -2
- package/src/components/layout/AppHeader/AppHeader.test.tsx +0 -26
- package/src/components/layout/AppHeader/AppHeader.tsx +0 -17
- package/src/components/layout/AppHeader/AppHeader.variants.ts +0 -21
- package/src/components/layout/AppHeader/AppHeaderActions.tsx +0 -13
- package/src/components/layout/AppHeader/AppHeaderNav.tsx +0 -13
- package/src/components/layout/AppHeader/AppHeaderTitle.tsx +0 -13
- package/src/components/layout/AppHeader/index.ts +0 -5
- package/src/components/layout/AppRail/AppRail.test.tsx +0 -50
- package/src/components/layout/AppRail/AppRail.tsx +0 -24
- package/src/components/layout/AppRail/AppRail.variants.ts +0 -31
- package/src/components/layout/AppRail/AppRailFooter.tsx +0 -13
- package/src/components/layout/AppRail/AppRailGroup.tsx +0 -13
- package/src/components/layout/AppRail/AppRailHeader.tsx +0 -13
- package/src/components/layout/AppRail/AppRailItem.tsx +0 -57
- package/src/components/layout/AppRail/index.ts +0 -5
- package/src/components/layout/AppShell/AppShell.context.tsx +0 -34
- package/src/components/layout/AppShell/AppShell.test.tsx +0 -61
- package/src/components/layout/AppShell/AppShell.tsx +0 -91
- package/src/components/layout/AppShell/AppShell.variants.ts +0 -21
- package/src/components/layout/AppShell/index.ts +0 -2
- package/src/components/layout/AppSidebar/AppSidebar.test.tsx +0 -69
- package/src/components/layout/AppSidebar/AppSidebar.tsx +0 -58
- package/src/components/layout/AppSidebar/AppSidebar.variants.ts +0 -41
- package/src/components/layout/AppSidebar/AppSidebarContent.tsx +0 -18
- package/src/components/layout/AppSidebar/AppSidebarFooter.tsx +0 -13
- package/src/components/layout/AppSidebar/AppSidebarGroup.tsx +0 -22
- package/src/components/layout/AppSidebar/AppSidebarHeader.tsx +0 -13
- package/src/components/layout/AppSidebar/AppSidebarItem.tsx +0 -54
- package/src/components/layout/AppSidebar/AppSidebarTrigger.tsx +0 -25
- package/src/components/layout/AppSidebar/index.ts +0 -7
- package/src/components/layout/CLAUDE.md +0 -112
- package/src/components/layout/Card/Card.test.tsx +0 -339
- package/src/components/layout/Card/Card.tsx +0 -102
- package/src/components/layout/Card/Card.types.ts +0 -52
- package/src/components/layout/Card/Card.variants.ts +0 -85
- package/src/components/layout/Card/README.md +0 -994
- package/src/components/layout/Card/index.ts +0 -3
- package/src/components/layout/Collapsible/Collapsible.test.tsx +0 -491
- package/src/components/layout/Collapsible/Collapsible.tsx +0 -50
- package/src/components/layout/Collapsible/Collapsible.types.ts +0 -26
- package/src/components/layout/Collapsible/Collapsible.variants.ts +0 -52
- package/src/components/layout/Collapsible/README.md +0 -885
- package/src/components/layout/Collapsible/index.ts +0 -3
- package/src/components/layout/Container/Container.test.tsx +0 -283
- package/src/components/layout/Container/Container.tsx +0 -25
- package/src/components/layout/Container/Container.types.ts +0 -36
- package/src/components/layout/Container/Container.variants.ts +0 -59
- package/src/components/layout/Container/README.md +0 -700
- package/src/components/layout/Container/index.ts +0 -3
- package/src/components/layout/Flex/Flex.test.tsx +0 -545
- package/src/components/layout/Flex/Flex.tsx +0 -52
- package/src/components/layout/Flex/Flex.types.ts +0 -61
- package/src/components/layout/Flex/Flex.variants.ts +0 -98
- package/src/components/layout/Flex/README.md +0 -812
- package/src/components/layout/Flex/index.ts +0 -3
- package/src/components/layout/Grid/Grid.test.tsx +0 -601
- package/src/components/layout/Grid/Grid.tsx +0 -61
- package/src/components/layout/Grid/Grid.types.ts +0 -47
- package/src/components/layout/Grid/Grid.variants.ts +0 -100
- package/src/components/layout/Grid/README.md +0 -762
- package/src/components/layout/Grid/index.ts +0 -3
- package/src/components/layout/PageContent/PageContent.tsx +0 -13
- package/src/components/layout/PageContent/index.ts +0 -1
- package/src/components/layout/PageHeader/PageHeader.tsx +0 -43
- package/src/components/layout/PageHeader/index.ts +0 -1
- package/src/components/layout/PageSection/PageSection.tsx +0 -28
- package/src/components/layout/PageSection/index.ts +0 -1
- package/src/components/layout/Panel/Panel.test.tsx +0 -427
- package/src/components/layout/Panel/Panel.tsx +0 -75
- package/src/components/layout/Panel/Panel.types.ts +0 -59
- package/src/components/layout/Panel/Panel.variants.ts +0 -94
- package/src/components/layout/Panel/README.md +0 -861
- package/src/components/layout/Panel/index.ts +0 -3
- package/src/components/layout/ResizablePanels/README.md +0 -369
- package/src/components/layout/ResizablePanels/ResizablePanels.test.tsx +0 -506
- package/src/components/layout/ResizablePanels/ResizablePanels.tsx +0 -64
- package/src/components/layout/ResizablePanels/ResizablePanels.types.ts +0 -41
- package/src/components/layout/ResizablePanels/ResizablePanels.variants.ts +0 -67
- package/src/components/layout/ResizablePanels/index.ts +0 -3
- package/src/components/layout/ResponsiveContainer/README.md +0 -267
- package/src/components/layout/ResponsiveContainer/ResponsiveContainer.test.tsx +0 -386
- package/src/components/layout/ResponsiveContainer/ResponsiveContainer.tsx +0 -54
- package/src/components/layout/ResponsiveContainer/ResponsiveContainer.types.ts +0 -43
- package/src/components/layout/ResponsiveContainer/ResponsiveContainer.variants.ts +0 -106
- package/src/components/layout/ResponsiveContainer/index.ts +0 -3
- package/src/components/layout/ScrollArea/README.md +0 -278
- package/src/components/layout/ScrollArea/ScrollArea.test.tsx +0 -352
- package/src/components/layout/ScrollArea/ScrollArea.tsx +0 -61
- package/src/components/layout/ScrollArea/ScrollArea.types.ts +0 -36
- package/src/components/layout/ScrollArea/ScrollArea.variants.ts +0 -85
- package/src/components/layout/ScrollArea/index.ts +0 -3
- package/src/components/layout/Section/README.md +0 -315
- package/src/components/layout/Section/Section.test.tsx +0 -293
- package/src/components/layout/Section/Section.tsx +0 -60
- package/src/components/layout/Section/Section.types.ts +0 -38
- package/src/components/layout/Section/Section.variants.ts +0 -45
- package/src/components/layout/Section/index.ts +0 -3
- package/src/components/layout/Sheet/README.md +0 -533
- package/src/components/layout/Sheet/Sheet.test.tsx +0 -702
- package/src/components/layout/Sheet/Sheet.tsx +0 -142
- package/src/components/layout/Sheet/Sheet.types.ts +0 -92
- package/src/components/layout/Sheet/Sheet.variants.ts +0 -98
- package/src/components/layout/Sheet/index.ts +0 -3
- package/src/components/layout/Stack/README.md +0 -346
- package/src/components/layout/Stack/Stack.test.tsx +0 -492
- package/src/components/layout/Stack/Stack.tsx +0 -58
- package/src/components/layout/Stack/Stack.types.ts +0 -58
- package/src/components/layout/Stack/Stack.variants.ts +0 -77
- package/src/components/layout/Stack/index.ts +0 -3
- package/src/components/layout/index.ts +0 -21
- package/src/components/navigation/Breadcrumb/Breadcrumb.test.tsx +0 -875
- package/src/components/navigation/Breadcrumb/Breadcrumb.tsx +0 -183
- package/src/components/navigation/Breadcrumb/Breadcrumb.types.ts +0 -49
- package/src/components/navigation/Breadcrumb/Breadcrumb.variants.ts +0 -63
- package/src/components/navigation/Breadcrumb/README.md +0 -608
- package/src/components/navigation/Breadcrumb/index.ts +0 -24
- package/src/components/navigation/CLAUDE.md +0 -118
- package/src/components/navigation/ContextMenu/ContextMenu.test.tsx +0 -881
- package/src/components/navigation/ContextMenu/ContextMenu.tsx +0 -304
- package/src/components/navigation/ContextMenu/ContextMenu.types.ts +0 -119
- package/src/components/navigation/ContextMenu/ContextMenu.variants.ts +0 -167
- package/src/components/navigation/ContextMenu/README.md +0 -660
- package/src/components/navigation/ContextMenu/index.ts +0 -34
- package/src/components/navigation/Drawer/Drawer.test.tsx +0 -721
- package/src/components/navigation/Drawer/Drawer.tsx +0 -178
- package/src/components/navigation/Drawer/Drawer.types.ts +0 -66
- package/src/components/navigation/Drawer/Drawer.variants.ts +0 -121
- package/src/components/navigation/Drawer/README.md +0 -723
- package/src/components/navigation/Drawer/index.ts +0 -24
- package/src/components/navigation/DropdownMenu/DropdownMenu.test.tsx +0 -881
- package/src/components/navigation/DropdownMenu/DropdownMenu.tsx +0 -305
- package/src/components/navigation/DropdownMenu/DropdownMenu.types.ts +0 -98
- package/src/components/navigation/DropdownMenu/DropdownMenu.variants.ts +0 -168
- package/src/components/navigation/DropdownMenu/README.md +0 -676
- package/src/components/navigation/DropdownMenu/index.ts +0 -33
- package/src/components/navigation/Header/Header.test.tsx +0 -418
- package/src/components/navigation/Header/Header.tsx +0 -133
- package/src/components/navigation/Header/Header.types.ts +0 -41
- package/src/components/navigation/Header/Header.variants.ts +0 -91
- package/src/components/navigation/Header/README.md +0 -567
- package/src/components/navigation/Header/index.ts +0 -14
- package/src/components/navigation/Menu/Menu.test.tsx +0 -658
- package/src/components/navigation/Menu/Menu.tsx +0 -247
- package/src/components/navigation/Menu/Menu.types.ts +0 -51
- package/src/components/navigation/Menu/Menu.variants.ts +0 -105
- package/src/components/navigation/Menu/README.md +0 -599
- package/src/components/navigation/Menu/index.ts +0 -17
- package/src/components/navigation/Menubar/Menubar.test.tsx +0 -1028
- package/src/components/navigation/Menubar/Menubar.tsx +0 -308
- package/src/components/navigation/Menubar/Menubar.types.ts +0 -104
- package/src/components/navigation/Menubar/Menubar.variants.ts +0 -182
- package/src/components/navigation/Menubar/README.md +0 -641
- package/src/components/navigation/Menubar/index.ts +0 -36
- package/src/components/navigation/MobileSidebar/MobileSidebar.test.tsx +0 -255
- package/src/components/navigation/MobileSidebar/MobileSidebar.tsx +0 -187
- package/src/components/navigation/MobileSidebar/MobileSidebar.types.ts +0 -62
- package/src/components/navigation/MobileSidebar/MobileSidebar.variants.ts +0 -79
- package/src/components/navigation/MobileSidebar/index.ts +0 -17
- package/src/components/navigation/Navbar/Navbar.test.tsx +0 -621
- package/src/components/navigation/Navbar/Navbar.tsx +0 -238
- package/src/components/navigation/Navbar/Navbar.types.ts +0 -69
- package/src/components/navigation/Navbar/Navbar.variants.ts +0 -176
- package/src/components/navigation/Navbar/README.md +0 -670
- package/src/components/navigation/Navbar/index.ts +0 -20
- package/src/components/navigation/NavigationMenu/NavigationMenu.test.tsx +0 -701
- package/src/components/navigation/NavigationMenu/NavigationMenu.tsx +0 -211
- package/src/components/navigation/NavigationMenu/NavigationMenu.types.ts +0 -52
- package/src/components/navigation/NavigationMenu/NavigationMenu.variants.ts +0 -122
- package/src/components/navigation/NavigationMenu/README.md +0 -697
- package/src/components/navigation/NavigationMenu/index.ts +0 -23
- package/src/components/navigation/Pagination/Pagination.test.tsx +0 -619
- package/src/components/navigation/Pagination/Pagination.tsx +0 -185
- package/src/components/navigation/Pagination/Pagination.types.ts +0 -42
- package/src/components/navigation/Pagination/Pagination.variants.ts +0 -36
- package/src/components/navigation/Pagination/README.md +0 -635
- package/src/components/navigation/Pagination/index.ts +0 -17
- package/src/components/navigation/Sidebar/README.md +0 -628
- package/src/components/navigation/Sidebar/Sidebar.test.tsx +0 -1169
- package/src/components/navigation/Sidebar/Sidebar.tsx +0 -761
- package/src/components/navigation/Sidebar/Sidebar.types.ts +0 -168
- package/src/components/navigation/Sidebar/Sidebar.variants.ts +0 -302
- package/src/components/navigation/Sidebar/index.ts +0 -59
- package/src/components/navigation/SkipLinks/README.md +0 -512
- package/src/components/navigation/SkipLinks/SkipLinks.test.tsx +0 -445
- package/src/components/navigation/SkipLinks/SkipLinks.tsx +0 -103
- package/src/components/navigation/SkipLinks/SkipLinks.types.ts +0 -39
- package/src/components/navigation/SkipLinks/SkipLinks.variants.ts +0 -102
- package/src/components/navigation/SkipLinks/index.ts +0 -12
- package/src/components/navigation/TabNavigation/TabNavigation.tsx +0 -196
- package/src/components/navigation/TabNavigation/TabNavigation.types.ts +0 -85
- package/src/components/navigation/TabNavigation/TabNavigation.variants.ts +0 -95
- package/src/components/navigation/TabNavigation/index.ts +0 -10
- package/src/components/navigation/TabPanel/README.md +0 -437
- package/src/components/navigation/TabPanel/TabPanel.test.tsx +0 -566
- package/src/components/navigation/TabPanel/TabPanel.tsx +0 -95
- package/src/components/navigation/TabPanel/TabPanel.types.ts +0 -29
- package/src/components/navigation/TabPanel/TabPanel.variants.ts +0 -61
- package/src/components/navigation/TabPanel/index.ts +0 -13
- package/src/components/navigation/Tabs/README.md +0 -669
- package/src/components/navigation/Tabs/Tabs.test.tsx +0 -500
- package/src/components/navigation/Tabs/Tabs.tsx +0 -112
- package/src/components/navigation/Tabs/Tabs.types.ts +0 -38
- package/src/components/navigation/Tabs/Tabs.variants.ts +0 -80
- package/src/components/navigation/Tabs/index.ts +0 -14
- package/src/components/navigation/Toolbar/README.md +0 -650
- package/src/components/navigation/Toolbar/Toolbar.test.tsx +0 -620
- package/src/components/navigation/Toolbar/Toolbar.tsx +0 -133
- package/src/components/navigation/Toolbar/Toolbar.types.ts +0 -42
- package/src/components/navigation/Toolbar/Toolbar.variants.ts +0 -95
- package/src/components/navigation/Toolbar/index.ts +0 -17
- package/src/components/navigation/UserProfileDropdown/UserProfileDropdown.test.tsx +0 -257
- package/src/components/navigation/UserProfileDropdown/UserProfileDropdown.tsx +0 -267
- package/src/components/navigation/UserProfileDropdown/UserProfileDropdown.types.ts +0 -84
- package/src/components/navigation/UserProfileDropdown/UserProfileDropdown.variants.ts +0 -77
- package/src/components/navigation/UserProfileDropdown/index.ts +0 -17
- package/src/components/navigation/WorkspaceDropdown/WorkspaceDropdown.tsx +0 -190
- package/src/components/navigation/WorkspaceDropdown/WorkspaceDropdown.types.ts +0 -56
- package/src/components/navigation/WorkspaceDropdown/WorkspaceDropdown.variants.ts +0 -82
- package/src/components/navigation/WorkspaceDropdown/index.ts +0 -20
- package/src/components/navigation/index.ts +0 -17
- package/src/components/primitives/ArrowAnimated/ArrowAnimated.test.tsx +0 -240
- package/src/components/primitives/ArrowAnimated/ArrowAnimated.tsx +0 -96
- package/src/components/primitives/ArrowAnimated/ArrowAnimated.types.ts +0 -16
- package/src/components/primitives/ArrowAnimated/ArrowAnimated.variants.ts +0 -43
- package/src/components/primitives/ArrowAnimated/index.ts +0 -9
- package/src/components/primitives/AspectRatio/AspectRatio.test.tsx +0 -306
- package/src/components/primitives/AspectRatio/AspectRatio.tsx +0 -11
- package/src/components/primitives/AspectRatio/AspectRatio.types.ts +0 -57
- package/src/components/primitives/AspectRatio/AspectRatio.variants.ts +0 -110
- package/src/components/primitives/AspectRatio/README.md +0 -914
- package/src/components/primitives/AspectRatio/index.ts +0 -7
- package/src/components/primitives/Avatar/Avatar.test.tsx +0 -1311
- package/src/components/primitives/Avatar/Avatar.tsx +0 -159
- package/src/components/primitives/Avatar/Avatar.types.ts +0 -70
- package/src/components/primitives/Avatar/AvatarAddButton.tsx +0 -59
- package/src/components/primitives/Avatar/AvatarBadge.tsx +0 -84
- package/src/components/primitives/Avatar/AvatarGroup.test.tsx +0 -1377
- package/src/components/primitives/Avatar/AvatarGroup.tsx +0 -101
- package/src/components/primitives/Avatar/AvatarLabelGroup.tsx +0 -160
- package/src/components/primitives/Avatar/AvatarSkeleton.tsx +0 -76
- package/src/components/primitives/Avatar/AvatarStatus.tsx +0 -71
- package/src/components/primitives/Avatar/README.md +0 -1174
- package/src/components/primitives/Avatar/index.ts +0 -8
- package/src/components/primitives/Badge/Badge.test.tsx +0 -1146
- package/src/components/primitives/Badge/Badge.tsx +0 -389
- package/src/components/primitives/Badge/Badge.types.ts +0 -102
- package/src/components/primitives/Badge/README.md +0 -814
- package/src/components/primitives/Badge/index.ts +0 -2
- package/src/components/primitives/Button/Button.test.tsx +0 -626
- package/src/components/primitives/Button/Button.tsx +0 -299
- package/src/components/primitives/Button/Button.types.ts +0 -137
- package/src/components/primitives/Button/README.md +0 -1112
- package/src/components/primitives/Button/index.ts +0 -8
- package/src/components/primitives/ButtonGroup/ButtonGroup.test.tsx +0 -945
- package/src/components/primitives/ButtonGroup/ButtonGroup.tsx +0 -224
- package/src/components/primitives/ButtonGroup/ButtonGroup.types.ts +0 -133
- package/src/components/primitives/ButtonGroup/README.md +0 -945
- package/src/components/primitives/ButtonGroup/index.ts +0 -12
- package/src/components/primitives/CLAUDE.md +0 -108
- package/src/components/primitives/ConfirmButton/ConfirmButton.test.tsx +0 -929
- package/src/components/primitives/ConfirmButton/ConfirmButton.tsx +0 -298
- package/src/components/primitives/ConfirmButton/ConfirmButton.types.ts +0 -116
- package/src/components/primitives/ConfirmButton/README.md +0 -1059
- package/src/components/primitives/ConfirmButton/index.ts +0 -6
- package/src/components/primitives/Divider/Divider.test.tsx +0 -304
- package/src/components/primitives/Divider/Divider.tsx +0 -209
- package/src/components/primitives/Divider/Divider.types.ts +0 -74
- package/src/components/primitives/Divider/README.md +0 -839
- package/src/components/primitives/Divider/index.ts +0 -8
- package/src/components/primitives/Heading/Heading.test.tsx +0 -611
- package/src/components/primitives/Heading/Heading.tsx +0 -120
- package/src/components/primitives/Heading/Heading.types.ts +0 -61
- package/src/components/primitives/Heading/README.md +0 -820
- package/src/components/primitives/Heading/index.ts +0 -2
- package/src/components/primitives/Icon/Icon.test.tsx +0 -466
- package/src/components/primitives/Icon/Icon.tsx +0 -74
- package/src/components/primitives/Icon/Icon.types.ts +0 -61
- package/src/components/primitives/Icon/README.md +0 -759
- package/src/components/primitives/Icon/index.ts +0 -8
- package/src/components/primitives/Image/Image.test.tsx +0 -734
- package/src/components/primitives/Image/Image.tsx +0 -239
- package/src/components/primitives/Image/Image.types.ts +0 -75
- package/src/components/primitives/Image/README.md +0 -863
- package/src/components/primitives/Image/index.ts +0 -8
- package/src/components/primitives/Kbd/Kbd.test.tsx +0 -432
- package/src/components/primitives/Kbd/Kbd.tsx +0 -53
- package/src/components/primitives/Kbd/Kbd.types.ts +0 -55
- package/src/components/primitives/Kbd/Kbd.variants.ts +0 -33
- package/src/components/primitives/Kbd/README.md +0 -659
- package/src/components/primitives/Kbd/index.ts +0 -3
- package/src/components/primitives/Label/Label.test.tsx +0 -311
- package/src/components/primitives/Label/Label.tsx +0 -46
- package/src/components/primitives/Label/Label.types.ts +0 -28
- package/src/components/primitives/Label/README.md +0 -816
- package/src/components/primitives/Label/index.ts +0 -2
- package/src/components/primitives/Link/Link.test.tsx +0 -764
- package/src/components/primitives/Link/Link.tsx +0 -143
- package/src/components/primitives/Link/Link.types.ts +0 -85
- package/src/components/primitives/Link/README.md +0 -954
- package/src/components/primitives/Link/index.ts +0 -8
- package/src/components/primitives/Paragraph/Paragraph.test.tsx +0 -463
- package/src/components/primitives/Paragraph/Paragraph.tsx +0 -119
- package/src/components/primitives/Paragraph/Paragraph.types.ts +0 -81
- package/src/components/primitives/Paragraph/README.md +0 -812
- package/src/components/primitives/Paragraph/index.ts +0 -2
- package/src/components/primitives/ProgressBar/ProgressBar.test.tsx +0 -598
- package/src/components/primitives/ProgressBar/ProgressBar.tsx +0 -268
- package/src/components/primitives/ProgressBar/ProgressBar.types.ts +0 -127
- package/src/components/primitives/ProgressBar/ProgressBar.variants.ts +0 -111
- package/src/components/primitives/ProgressBar/README.md +0 -772
- package/src/components/primitives/ProgressBar/index.ts +0 -3
- package/src/components/primitives/ProgressCircle/ProgressCircle.test.tsx +0 -219
- package/src/components/primitives/ProgressCircle/ProgressCircle.tsx +0 -264
- package/src/components/primitives/ProgressCircle/ProgressCircle.types.ts +0 -152
- package/src/components/primitives/ProgressCircle/ProgressCircle.variants.ts +0 -140
- package/src/components/primitives/ProgressCircle/README.md +0 -763
- package/src/components/primitives/ProgressCircle/index.ts +0 -3
- package/src/components/primitives/SkeletonLoader/README.md +0 -792
- package/src/components/primitives/SkeletonLoader/SkeletonLoader.test.tsx +0 -382
- package/src/components/primitives/SkeletonLoader/SkeletonLoader.tsx +0 -45
- package/src/components/primitives/SkeletonLoader/SkeletonLoader.types.ts +0 -56
- package/src/components/primitives/SkeletonLoader/SkeletonLoader.variants.ts +0 -87
- package/src/components/primitives/SkeletonLoader/index.ts +0 -3
- package/src/components/primitives/Spacer/README.md +0 -804
- package/src/components/primitives/Spacer/Spacer.test.tsx +0 -363
- package/src/components/primitives/Spacer/Spacer.tsx +0 -147
- package/src/components/primitives/Spacer/Spacer.types.ts +0 -72
- package/src/components/primitives/Spacer/index.ts +0 -9
- package/src/components/primitives/Spinner/README.md +0 -767
- package/src/components/primitives/Spinner/Spinner.test.tsx +0 -289
- package/src/components/primitives/Spinner/Spinner.tsx +0 -101
- package/src/components/primitives/Spinner/Spinner.types.ts +0 -62
- package/src/components/primitives/Spinner/Spinner.variants.ts +0 -50
- package/src/components/primitives/Spinner/index.ts +0 -3
- package/src/components/primitives/SplitButton/README.md +0 -1142
- package/src/components/primitives/SplitButton/SplitButton.test.tsx +0 -1020
- package/src/components/primitives/SplitButton/SplitButton.tsx +0 -215
- package/src/components/primitives/SplitButton/SplitButton.types.ts +0 -114
- package/src/components/primitives/SplitButton/index.ts +0 -8
- package/src/components/primitives/StatusIndicator/README.md +0 -730
- package/src/components/primitives/StatusIndicator/StatusIndicator.test.tsx +0 -446
- package/src/components/primitives/StatusIndicator/StatusIndicator.tsx +0 -100
- package/src/components/primitives/StatusIndicator/StatusIndicator.types.ts +0 -39
- package/src/components/primitives/StatusIndicator/index.ts +0 -2
- package/src/components/primitives/Tag/README.md +0 -793
- package/src/components/primitives/Tag/Tag.test.tsx +0 -410
- package/src/components/primitives/Tag/Tag.tsx +0 -302
- package/src/components/primitives/Tag/Tag.types.ts +0 -112
- package/src/components/primitives/Tag/Tag.variants.ts +0 -144
- package/src/components/primitives/Tag/TagGroup.tsx +0 -89
- package/src/components/primitives/Tag/index.ts +0 -15
- package/src/components/primitives/Text/README.md +0 -849
- package/src/components/primitives/Text/Text.test.tsx +0 -371
- package/src/components/primitives/Text/Text.tsx +0 -89
- package/src/components/primitives/Text/Text.types.ts +0 -21
- package/src/components/primitives/Text/index.ts +0 -2
- package/src/components/primitives/Thumbnail/README.md +0 -800
- package/src/components/primitives/Thumbnail/Thumbnail.test.tsx +0 -657
- package/src/components/primitives/Thumbnail/Thumbnail.tsx +0 -141
- package/src/components/primitives/Thumbnail/Thumbnail.types.ts +0 -102
- package/src/components/primitives/Thumbnail/index.ts +0 -9
- package/src/components/primitives/Toggle/README.md +0 -232
- package/src/components/primitives/Toggle/Toggle.test.tsx +0 -630
- package/src/components/primitives/Toggle/Toggle.tsx +0 -174
- package/src/components/primitives/Toggle/Toggle.types.ts +0 -161
- package/src/components/primitives/Toggle/index.ts +0 -2
- package/src/components/primitives/index.ts +0 -26
- package/src/components/workflow/ApprovalFlow/ApprovalFlow.test.tsx +0 -607
- package/src/components/workflow/ApprovalFlow/ApprovalFlow.tsx +0 -522
- package/src/components/workflow/ApprovalFlow/ApprovalFlow.types.ts +0 -233
- package/src/components/workflow/ApprovalFlow/ApprovalFlow.variants.ts +0 -207
- package/src/components/workflow/ApprovalFlow/README.md +0 -450
- package/src/components/workflow/ApprovalFlow/index.ts +0 -38
- package/src/components/workflow/ApprovalStatus/ApprovalStatus.test.tsx +0 -316
- package/src/components/workflow/ApprovalStatus/ApprovalStatus.tsx +0 -342
- package/src/components/workflow/ApprovalStatus/ApprovalStatus.types.ts +0 -68
- package/src/components/workflow/ApprovalStatus/ApprovalStatus.variants.ts +0 -60
- package/src/components/workflow/ApprovalStatus/README.md +0 -359
- package/src/components/workflow/ApprovalStatus/index.ts +0 -7
- package/src/components/workflow/CLAUDE.md +0 -118
- package/src/components/workflow/CommentSystem/CommentSystem.test.tsx +0 -901
- package/src/components/workflow/CommentSystem/CommentSystem.tsx +0 -1014
- package/src/components/workflow/CommentSystem/CommentSystem.types.ts +0 -290
- package/src/components/workflow/CommentSystem/CommentSystem.variants.ts +0 -307
- package/src/components/workflow/CommentSystem/README.md +0 -478
- package/src/components/workflow/CommentSystem/index.ts +0 -37
- package/src/components/workflow/Dashboard/Dashboard.test.tsx +0 -586
- package/src/components/workflow/Dashboard/Dashboard.tsx +0 -447
- package/src/components/workflow/Dashboard/Dashboard.types.ts +0 -232
- package/src/components/workflow/Dashboard/Dashboard.variants.ts +0 -241
- package/src/components/workflow/Dashboard/README.md +0 -445
- package/src/components/workflow/Dashboard/index.ts +0 -39
- package/src/components/workflow/DashboardBuilder/DashboardBuilder.test.tsx +0 -460
- package/src/components/workflow/DashboardBuilder/DashboardBuilder.tsx +0 -944
- package/src/components/workflow/DashboardBuilder/DashboardBuilder.types.ts +0 -389
- package/src/components/workflow/DashboardBuilder/DashboardBuilder.variants.ts +0 -264
- package/src/components/workflow/DashboardBuilder/README.md +0 -489
- package/src/components/workflow/DashboardBuilder/index.ts +0 -61
- package/src/components/workflow/KanbanBoard/KanbanBoard.test.tsx +0 -445
- package/src/components/workflow/KanbanBoard/KanbanBoard.tsx +0 -806
- package/src/components/workflow/KanbanBoard/KanbanBoard.types.ts +0 -183
- package/src/components/workflow/KanbanBoard/KanbanBoard.variants.ts +0 -311
- package/src/components/workflow/KanbanBoard/README.md +0 -495
- package/src/components/workflow/KanbanBoard/index.ts +0 -40
- package/src/components/workflow/ProgressSteps/ProgressSteps.test.tsx +0 -318
- package/src/components/workflow/ProgressSteps/ProgressSteps.tsx +0 -350
- package/src/components/workflow/ProgressSteps/ProgressSteps.types.ts +0 -84
- package/src/components/workflow/ProgressSteps/ProgressSteps.variants.ts +0 -315
- package/src/components/workflow/ProgressSteps/README.md +0 -412
- package/src/components/workflow/ProgressSteps/index.ts +0 -20
- package/src/components/workflow/ReportGenerator/README.md +0 -530
- package/src/components/workflow/ReportGenerator/ReportGenerator.test.tsx +0 -723
- package/src/components/workflow/ReportGenerator/ReportGenerator.tsx +0 -889
- package/src/components/workflow/ReportGenerator/ReportGenerator.types.ts +0 -321
- package/src/components/workflow/ReportGenerator/ReportGenerator.variants.ts +0 -378
- package/src/components/workflow/ReportGenerator/index.ts +0 -44
- package/src/components/workflow/Stepper/README.md +0 -390
- package/src/components/workflow/Stepper/Stepper.test.tsx +0 -376
- package/src/components/workflow/Stepper/Stepper.tsx +0 -301
- package/src/components/workflow/Stepper/Stepper.types.ts +0 -73
- package/src/components/workflow/Stepper/Stepper.variants.ts +0 -194
- package/src/components/workflow/Stepper/index.ts +0 -16
- package/src/components/workflow/TaskCard/README.md +0 -343
- package/src/components/workflow/TaskCard/TaskCard.test.tsx +0 -375
- package/src/components/workflow/TaskCard/TaskCard.tsx +0 -312
- package/src/components/workflow/TaskCard/TaskCard.types.ts +0 -55
- package/src/components/workflow/TaskCard/TaskCard.variants.ts +0 -64
- package/src/components/workflow/TaskCard/index.ts +0 -14
- package/src/components/workflow/TaskList/README.md +0 -317
- package/src/components/workflow/TaskList/TaskList.test.tsx +0 -318
- package/src/components/workflow/TaskList/TaskList.tsx +0 -556
- package/src/components/workflow/TaskList/TaskList.types.ts +0 -78
- package/src/components/workflow/TaskList/TaskList.variants.ts +0 -143
- package/src/components/workflow/TaskList/index.ts +0 -19
- package/src/components/workflow/TaskStatus/README.md +0 -358
- package/src/components/workflow/TaskStatus/TaskStatus.test.tsx +0 -299
- package/src/components/workflow/TaskStatus/TaskStatus.tsx +0 -246
- package/src/components/workflow/TaskStatus/TaskStatus.types.ts +0 -65
- package/src/components/workflow/TaskStatus/TaskStatus.variants.ts +0 -145
- package/src/components/workflow/TaskStatus/index.ts +0 -24
- package/src/components/workflow/Wizard/README.md +0 -440
- package/src/components/workflow/Wizard/Wizard.test.tsx +0 -432
- package/src/components/workflow/Wizard/Wizard.tsx +0 -279
- package/src/components/workflow/Wizard/Wizard.types.ts +0 -61
- package/src/components/workflow/Wizard/Wizard.variants.ts +0 -105
- package/src/components/workflow/Wizard/index.ts +0 -9
- package/src/components/workflow/index.ts +0 -14
- package/src/hooks/index.ts +0 -4
- package/src/hooks/use-media-query.ts +0 -24
- package/src/hooks/use-mobile.ts +0 -30
- package/src/hooks/use-on-window-resize.ts +0 -27
- package/src/index.ts +0 -22
- package/src/lib/chart-colors.ts +0 -195
- package/src/lib/utils.ts +0 -6
- package/src/test/setup.ts +0 -125
- package/src/test/vitest.d.ts +0 -13
|
@@ -0,0 +1,1908 @@
|
|
|
1
|
+
import "./chunk-UP2VWCW5.js";
|
|
2
|
+
|
|
3
|
+
// ../../node_modules/.pnpm/jspdf-autotable@5.0.7_jspdf@4.2.0/node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.mjs
|
|
4
|
+
function autoTableText(text, x, y, styles, doc) {
|
|
5
|
+
styles = styles || {};
|
|
6
|
+
var PHYSICAL_LINE_HEIGHT = 1.15;
|
|
7
|
+
var k = doc.internal.scaleFactor;
|
|
8
|
+
var fontSize = doc.internal.getFontSize() / k;
|
|
9
|
+
var lineHeightFactor = doc.getLineHeightFactor ? doc.getLineHeightFactor() : PHYSICAL_LINE_HEIGHT;
|
|
10
|
+
var lineHeight = fontSize * lineHeightFactor;
|
|
11
|
+
var splitRegex = /\r\n|\r|\n/g;
|
|
12
|
+
var splitText = "";
|
|
13
|
+
var lineCount = 1;
|
|
14
|
+
if (styles.valign === "middle" || styles.valign === "bottom" || styles.halign === "center" || styles.halign === "right") {
|
|
15
|
+
splitText = typeof text === "string" ? text.split(splitRegex) : text;
|
|
16
|
+
lineCount = splitText.length || 1;
|
|
17
|
+
}
|
|
18
|
+
y += fontSize * (2 - PHYSICAL_LINE_HEIGHT);
|
|
19
|
+
if (styles.valign === "middle")
|
|
20
|
+
y -= lineCount / 2 * lineHeight;
|
|
21
|
+
else if (styles.valign === "bottom")
|
|
22
|
+
y -= lineCount * lineHeight;
|
|
23
|
+
if (styles.halign === "center" || styles.halign === "right") {
|
|
24
|
+
var alignSize = fontSize;
|
|
25
|
+
if (styles.halign === "center")
|
|
26
|
+
alignSize *= 0.5;
|
|
27
|
+
if (splitText && lineCount >= 1) {
|
|
28
|
+
for (var iLine = 0; iLine < splitText.length; iLine++) {
|
|
29
|
+
doc.text(splitText[iLine], x - doc.getStringUnitWidth(splitText[iLine]) * alignSize, y);
|
|
30
|
+
y += lineHeight;
|
|
31
|
+
}
|
|
32
|
+
return doc;
|
|
33
|
+
}
|
|
34
|
+
x -= doc.getStringUnitWidth(text) * alignSize;
|
|
35
|
+
}
|
|
36
|
+
if (styles.halign === "justify") {
|
|
37
|
+
doc.text(text, x, y, { maxWidth: styles.maxWidth || 100, align: "justify" });
|
|
38
|
+
} else {
|
|
39
|
+
doc.text(text, x, y);
|
|
40
|
+
}
|
|
41
|
+
return doc;
|
|
42
|
+
}
|
|
43
|
+
var globalDefaults = {};
|
|
44
|
+
var DocHandler = (
|
|
45
|
+
/** @class */
|
|
46
|
+
(function() {
|
|
47
|
+
function DocHandler2(jsPDFDocument) {
|
|
48
|
+
this.jsPDFDocument = jsPDFDocument;
|
|
49
|
+
this.userStyles = {
|
|
50
|
+
// Black for versions of jspdf without getTextColor
|
|
51
|
+
textColor: jsPDFDocument.getTextColor ? this.jsPDFDocument.getTextColor() : 0,
|
|
52
|
+
fontSize: jsPDFDocument.internal.getFontSize(),
|
|
53
|
+
fontStyle: jsPDFDocument.internal.getFont().fontStyle,
|
|
54
|
+
font: jsPDFDocument.internal.getFont().fontName,
|
|
55
|
+
// 0 for versions of jspdf without getLineWidth
|
|
56
|
+
lineWidth: jsPDFDocument.getLineWidth ? this.jsPDFDocument.getLineWidth() : 0,
|
|
57
|
+
// Black for versions of jspdf without getDrawColor
|
|
58
|
+
lineColor: jsPDFDocument.getDrawColor ? this.jsPDFDocument.getDrawColor() : 0
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
DocHandler2.setDefaults = function(defaults, doc) {
|
|
62
|
+
if (doc === void 0) {
|
|
63
|
+
doc = null;
|
|
64
|
+
}
|
|
65
|
+
if (doc) {
|
|
66
|
+
doc.__autoTableDocumentDefaults = defaults;
|
|
67
|
+
} else {
|
|
68
|
+
globalDefaults = defaults;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
DocHandler2.unifyColor = function(c) {
|
|
72
|
+
if (Array.isArray(c)) {
|
|
73
|
+
return c;
|
|
74
|
+
} else if (typeof c === "number") {
|
|
75
|
+
return [c, c, c];
|
|
76
|
+
} else if (typeof c === "string") {
|
|
77
|
+
return [c];
|
|
78
|
+
} else {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
DocHandler2.prototype.applyStyles = function(styles, fontOnly) {
|
|
83
|
+
var _a2, _b, _c;
|
|
84
|
+
if (fontOnly === void 0) {
|
|
85
|
+
fontOnly = false;
|
|
86
|
+
}
|
|
87
|
+
if (styles.fontStyle && this.jsPDFDocument.setFontStyle) {
|
|
88
|
+
this.jsPDFDocument.setFontStyle(styles.fontStyle);
|
|
89
|
+
}
|
|
90
|
+
var _d = this.jsPDFDocument.internal.getFont(), fontStyle = _d.fontStyle, fontName = _d.fontName;
|
|
91
|
+
if (styles.font)
|
|
92
|
+
fontName = styles.font;
|
|
93
|
+
if (styles.fontStyle) {
|
|
94
|
+
fontStyle = styles.fontStyle;
|
|
95
|
+
var availableFontStyles = this.getFontList()[fontName];
|
|
96
|
+
if (availableFontStyles && availableFontStyles.indexOf(fontStyle) === -1 && this.jsPDFDocument.setFontStyle) {
|
|
97
|
+
this.jsPDFDocument.setFontStyle(availableFontStyles[0]);
|
|
98
|
+
fontStyle = availableFontStyles[0];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
this.jsPDFDocument.setFont(fontName, fontStyle);
|
|
102
|
+
if (styles.fontSize)
|
|
103
|
+
this.jsPDFDocument.setFontSize(styles.fontSize);
|
|
104
|
+
if (fontOnly) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
var color = DocHandler2.unifyColor(styles.fillColor);
|
|
108
|
+
if (color)
|
|
109
|
+
(_a2 = this.jsPDFDocument).setFillColor.apply(_a2, color);
|
|
110
|
+
color = DocHandler2.unifyColor(styles.textColor);
|
|
111
|
+
if (color)
|
|
112
|
+
(_b = this.jsPDFDocument).setTextColor.apply(_b, color);
|
|
113
|
+
color = DocHandler2.unifyColor(styles.lineColor);
|
|
114
|
+
if (color)
|
|
115
|
+
(_c = this.jsPDFDocument).setDrawColor.apply(_c, color);
|
|
116
|
+
if (typeof styles.lineWidth === "number") {
|
|
117
|
+
this.jsPDFDocument.setLineWidth(styles.lineWidth);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
DocHandler2.prototype.splitTextToSize = function(text, size, opts) {
|
|
121
|
+
return this.jsPDFDocument.splitTextToSize(text, size, opts);
|
|
122
|
+
};
|
|
123
|
+
DocHandler2.prototype.rect = function(x, y, width, height, fillStyle) {
|
|
124
|
+
return this.jsPDFDocument.rect(x, y, width, height, fillStyle);
|
|
125
|
+
};
|
|
126
|
+
DocHandler2.prototype.getLastAutoTable = function() {
|
|
127
|
+
return this.jsPDFDocument.lastAutoTable || null;
|
|
128
|
+
};
|
|
129
|
+
DocHandler2.prototype.getTextWidth = function(text) {
|
|
130
|
+
return this.jsPDFDocument.getTextWidth(text);
|
|
131
|
+
};
|
|
132
|
+
DocHandler2.prototype.getDocument = function() {
|
|
133
|
+
return this.jsPDFDocument;
|
|
134
|
+
};
|
|
135
|
+
DocHandler2.prototype.setPage = function(page) {
|
|
136
|
+
this.jsPDFDocument.setPage(page);
|
|
137
|
+
};
|
|
138
|
+
DocHandler2.prototype.addPage = function() {
|
|
139
|
+
return this.jsPDFDocument.addPage();
|
|
140
|
+
};
|
|
141
|
+
DocHandler2.prototype.getFontList = function() {
|
|
142
|
+
return this.jsPDFDocument.getFontList();
|
|
143
|
+
};
|
|
144
|
+
DocHandler2.prototype.getGlobalOptions = function() {
|
|
145
|
+
return globalDefaults || {};
|
|
146
|
+
};
|
|
147
|
+
DocHandler2.prototype.getDocumentOptions = function() {
|
|
148
|
+
return this.jsPDFDocument.__autoTableDocumentDefaults || {};
|
|
149
|
+
};
|
|
150
|
+
DocHandler2.prototype.pageSize = function() {
|
|
151
|
+
var pageSize = this.jsPDFDocument.internal.pageSize;
|
|
152
|
+
if (pageSize.width == null) {
|
|
153
|
+
pageSize = { width: pageSize.getWidth(), height: pageSize.getHeight() };
|
|
154
|
+
}
|
|
155
|
+
return pageSize;
|
|
156
|
+
};
|
|
157
|
+
DocHandler2.prototype.scaleFactor = function() {
|
|
158
|
+
return this.jsPDFDocument.internal.scaleFactor;
|
|
159
|
+
};
|
|
160
|
+
DocHandler2.prototype.getLineHeightFactor = function() {
|
|
161
|
+
var doc = this.jsPDFDocument;
|
|
162
|
+
return doc.getLineHeightFactor ? doc.getLineHeightFactor() : 1.15;
|
|
163
|
+
};
|
|
164
|
+
DocHandler2.prototype.getLineHeight = function(fontSize) {
|
|
165
|
+
return fontSize / this.scaleFactor() * this.getLineHeightFactor();
|
|
166
|
+
};
|
|
167
|
+
DocHandler2.prototype.pageNumber = function() {
|
|
168
|
+
var pageInfo = this.jsPDFDocument.internal.getCurrentPageInfo();
|
|
169
|
+
if (!pageInfo) {
|
|
170
|
+
return this.jsPDFDocument.internal.getNumberOfPages();
|
|
171
|
+
}
|
|
172
|
+
return pageInfo.pageNumber;
|
|
173
|
+
};
|
|
174
|
+
return DocHandler2;
|
|
175
|
+
})()
|
|
176
|
+
);
|
|
177
|
+
var extendStatics = function(d, b) {
|
|
178
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
179
|
+
d2.__proto__ = b2;
|
|
180
|
+
} || function(d2, b2) {
|
|
181
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
182
|
+
};
|
|
183
|
+
return extendStatics(d, b);
|
|
184
|
+
};
|
|
185
|
+
function __extends(d, b) {
|
|
186
|
+
if (typeof b !== "function" && b !== null)
|
|
187
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
188
|
+
extendStatics(d, b);
|
|
189
|
+
function __() {
|
|
190
|
+
this.constructor = d;
|
|
191
|
+
}
|
|
192
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
193
|
+
}
|
|
194
|
+
var HtmlRowInput = (
|
|
195
|
+
/** @class */
|
|
196
|
+
(function(_super) {
|
|
197
|
+
__extends(HtmlRowInput2, _super);
|
|
198
|
+
function HtmlRowInput2(element) {
|
|
199
|
+
var _this = _super.call(this) || this;
|
|
200
|
+
_this._element = element;
|
|
201
|
+
return _this;
|
|
202
|
+
}
|
|
203
|
+
return HtmlRowInput2;
|
|
204
|
+
})(Array)
|
|
205
|
+
);
|
|
206
|
+
function defaultStyles(scaleFactor) {
|
|
207
|
+
return {
|
|
208
|
+
font: "helvetica",
|
|
209
|
+
// helvetica, times, courier
|
|
210
|
+
fontStyle: "normal",
|
|
211
|
+
// normal, bold, italic, bolditalic
|
|
212
|
+
overflow: "linebreak",
|
|
213
|
+
// linebreak, ellipsize, visible or hidden
|
|
214
|
+
fillColor: false,
|
|
215
|
+
// Either false for transparent, rbg array e.g. [255, 255, 255] or gray level e.g 200
|
|
216
|
+
textColor: 20,
|
|
217
|
+
halign: "left",
|
|
218
|
+
// left, center, right, justify
|
|
219
|
+
valign: "top",
|
|
220
|
+
// top, middle, bottom
|
|
221
|
+
fontSize: 10,
|
|
222
|
+
cellPadding: 5 / scaleFactor,
|
|
223
|
+
// number or {top,left,right,left,vertical,horizontal}
|
|
224
|
+
lineColor: 200,
|
|
225
|
+
lineWidth: 0,
|
|
226
|
+
cellWidth: "auto",
|
|
227
|
+
// 'auto'|'wrap'|number
|
|
228
|
+
minCellHeight: 0,
|
|
229
|
+
minCellWidth: 0
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function getTheme(name) {
|
|
233
|
+
var themes = {
|
|
234
|
+
striped: {
|
|
235
|
+
table: { fillColor: 255, textColor: 80, fontStyle: "normal" },
|
|
236
|
+
head: { textColor: 255, fillColor: [41, 128, 185], fontStyle: "bold" },
|
|
237
|
+
body: {},
|
|
238
|
+
foot: { textColor: 255, fillColor: [41, 128, 185], fontStyle: "bold" },
|
|
239
|
+
alternateRow: { fillColor: 245 }
|
|
240
|
+
},
|
|
241
|
+
grid: {
|
|
242
|
+
table: {
|
|
243
|
+
fillColor: 255,
|
|
244
|
+
textColor: 80,
|
|
245
|
+
fontStyle: "normal",
|
|
246
|
+
lineWidth: 0.1
|
|
247
|
+
},
|
|
248
|
+
head: {
|
|
249
|
+
textColor: 255,
|
|
250
|
+
fillColor: [26, 188, 156],
|
|
251
|
+
fontStyle: "bold",
|
|
252
|
+
lineWidth: 0
|
|
253
|
+
},
|
|
254
|
+
body: {},
|
|
255
|
+
foot: {
|
|
256
|
+
textColor: 255,
|
|
257
|
+
fillColor: [26, 188, 156],
|
|
258
|
+
fontStyle: "bold",
|
|
259
|
+
lineWidth: 0
|
|
260
|
+
},
|
|
261
|
+
alternateRow: {}
|
|
262
|
+
},
|
|
263
|
+
plain: { head: { fontStyle: "bold" }, foot: { fontStyle: "bold" } }
|
|
264
|
+
};
|
|
265
|
+
return themes[name];
|
|
266
|
+
}
|
|
267
|
+
function getStringWidth(text, styles, doc) {
|
|
268
|
+
doc.applyStyles(styles, true);
|
|
269
|
+
var textArr = Array.isArray(text) ? text : [text];
|
|
270
|
+
var widestLineWidth = textArr.map(function(text2) {
|
|
271
|
+
return doc.getTextWidth(text2);
|
|
272
|
+
}).reduce(function(a, b) {
|
|
273
|
+
return Math.max(a, b);
|
|
274
|
+
}, 0);
|
|
275
|
+
return widestLineWidth;
|
|
276
|
+
}
|
|
277
|
+
function addTableBorder(doc, table, startPos, cursor) {
|
|
278
|
+
var lineWidth = table.settings.tableLineWidth;
|
|
279
|
+
var lineColor = table.settings.tableLineColor;
|
|
280
|
+
doc.applyStyles({ lineWidth, lineColor });
|
|
281
|
+
var fillStyle = getFillStyle(lineWidth, false);
|
|
282
|
+
if (fillStyle) {
|
|
283
|
+
doc.rect(startPos.x, startPos.y, table.getWidth(doc.pageSize().width), cursor.y - startPos.y, fillStyle);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function getFillStyle(lineWidth, fillColor) {
|
|
287
|
+
var drawLine = lineWidth > 0;
|
|
288
|
+
var drawBackground = fillColor || fillColor === 0;
|
|
289
|
+
if (drawLine && drawBackground) {
|
|
290
|
+
return "DF";
|
|
291
|
+
} else if (drawLine) {
|
|
292
|
+
return "S";
|
|
293
|
+
} else if (drawBackground) {
|
|
294
|
+
return "F";
|
|
295
|
+
} else {
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
function parseSpacing(value, defaultValue) {
|
|
300
|
+
var _a2, _b, _c, _d;
|
|
301
|
+
value = value || defaultValue;
|
|
302
|
+
if (Array.isArray(value)) {
|
|
303
|
+
if (value.length >= 4) {
|
|
304
|
+
return {
|
|
305
|
+
top: value[0],
|
|
306
|
+
right: value[1],
|
|
307
|
+
bottom: value[2],
|
|
308
|
+
left: value[3]
|
|
309
|
+
};
|
|
310
|
+
} else if (value.length === 3) {
|
|
311
|
+
return {
|
|
312
|
+
top: value[0],
|
|
313
|
+
right: value[1],
|
|
314
|
+
bottom: value[2],
|
|
315
|
+
left: value[1]
|
|
316
|
+
};
|
|
317
|
+
} else if (value.length === 2) {
|
|
318
|
+
return {
|
|
319
|
+
top: value[0],
|
|
320
|
+
right: value[1],
|
|
321
|
+
bottom: value[0],
|
|
322
|
+
left: value[1]
|
|
323
|
+
};
|
|
324
|
+
} else if (value.length === 1) {
|
|
325
|
+
value = value[0];
|
|
326
|
+
} else {
|
|
327
|
+
value = defaultValue;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (typeof value === "object") {
|
|
331
|
+
if (typeof value.vertical === "number") {
|
|
332
|
+
value.top = value.vertical;
|
|
333
|
+
value.bottom = value.vertical;
|
|
334
|
+
}
|
|
335
|
+
if (typeof value.horizontal === "number") {
|
|
336
|
+
value.right = value.horizontal;
|
|
337
|
+
value.left = value.horizontal;
|
|
338
|
+
}
|
|
339
|
+
return {
|
|
340
|
+
left: (_a2 = value.left) !== null && _a2 !== void 0 ? _a2 : defaultValue,
|
|
341
|
+
top: (_b = value.top) !== null && _b !== void 0 ? _b : defaultValue,
|
|
342
|
+
right: (_c = value.right) !== null && _c !== void 0 ? _c : defaultValue,
|
|
343
|
+
bottom: (_d = value.bottom) !== null && _d !== void 0 ? _d : defaultValue
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
if (typeof value !== "number") {
|
|
347
|
+
value = defaultValue;
|
|
348
|
+
}
|
|
349
|
+
return { top: value, right: value, bottom: value, left: value };
|
|
350
|
+
}
|
|
351
|
+
function getPageAvailableWidth(doc, table) {
|
|
352
|
+
var margins = parseSpacing(table.settings.margin, 0);
|
|
353
|
+
return doc.pageSize().width - (margins.left + margins.right);
|
|
354
|
+
}
|
|
355
|
+
function parseCss(supportedFonts, element, scaleFactor, style, window2) {
|
|
356
|
+
var result = {};
|
|
357
|
+
var pxScaleFactor = 96 / 72;
|
|
358
|
+
var backgroundColor = parseColor(element, function(elem) {
|
|
359
|
+
return window2.getComputedStyle(elem)["backgroundColor"];
|
|
360
|
+
});
|
|
361
|
+
if (backgroundColor != null)
|
|
362
|
+
result.fillColor = backgroundColor;
|
|
363
|
+
var textColor = parseColor(element, function(elem) {
|
|
364
|
+
return window2.getComputedStyle(elem)["color"];
|
|
365
|
+
});
|
|
366
|
+
if (textColor != null)
|
|
367
|
+
result.textColor = textColor;
|
|
368
|
+
var padding = parsePadding(style, scaleFactor);
|
|
369
|
+
if (padding)
|
|
370
|
+
result.cellPadding = padding;
|
|
371
|
+
var borderColorSide = "borderTopColor";
|
|
372
|
+
var finalScaleFactor = pxScaleFactor * scaleFactor;
|
|
373
|
+
var btw = style.borderTopWidth;
|
|
374
|
+
if (style.borderBottomWidth === btw && style.borderRightWidth === btw && style.borderLeftWidth === btw) {
|
|
375
|
+
var borderWidth = (parseFloat(btw) || 0) / finalScaleFactor;
|
|
376
|
+
if (borderWidth)
|
|
377
|
+
result.lineWidth = borderWidth;
|
|
378
|
+
} else {
|
|
379
|
+
result.lineWidth = {
|
|
380
|
+
top: (parseFloat(style.borderTopWidth) || 0) / finalScaleFactor,
|
|
381
|
+
right: (parseFloat(style.borderRightWidth) || 0) / finalScaleFactor,
|
|
382
|
+
bottom: (parseFloat(style.borderBottomWidth) || 0) / finalScaleFactor,
|
|
383
|
+
left: (parseFloat(style.borderLeftWidth) || 0) / finalScaleFactor
|
|
384
|
+
};
|
|
385
|
+
if (!result.lineWidth.top) {
|
|
386
|
+
if (result.lineWidth.right) {
|
|
387
|
+
borderColorSide = "borderRightColor";
|
|
388
|
+
} else if (result.lineWidth.bottom) {
|
|
389
|
+
borderColorSide = "borderBottomColor";
|
|
390
|
+
} else if (result.lineWidth.left) {
|
|
391
|
+
borderColorSide = "borderLeftColor";
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
var borderColor = parseColor(element, function(elem) {
|
|
396
|
+
return window2.getComputedStyle(elem)[borderColorSide];
|
|
397
|
+
});
|
|
398
|
+
if (borderColor != null)
|
|
399
|
+
result.lineColor = borderColor;
|
|
400
|
+
var accepted = ["left", "right", "center", "justify"];
|
|
401
|
+
if (accepted.indexOf(style.textAlign) !== -1) {
|
|
402
|
+
result.halign = style.textAlign;
|
|
403
|
+
}
|
|
404
|
+
accepted = ["middle", "bottom", "top"];
|
|
405
|
+
if (accepted.indexOf(style.verticalAlign) !== -1) {
|
|
406
|
+
result.valign = style.verticalAlign;
|
|
407
|
+
}
|
|
408
|
+
var res = parseInt(style.fontSize || "");
|
|
409
|
+
if (!isNaN(res))
|
|
410
|
+
result.fontSize = res / pxScaleFactor;
|
|
411
|
+
var fontStyle = parseFontStyle(style);
|
|
412
|
+
if (fontStyle)
|
|
413
|
+
result.fontStyle = fontStyle;
|
|
414
|
+
var font = (style.fontFamily || "").toLowerCase();
|
|
415
|
+
if (supportedFonts.indexOf(font) !== -1) {
|
|
416
|
+
result.font = font;
|
|
417
|
+
}
|
|
418
|
+
return result;
|
|
419
|
+
}
|
|
420
|
+
function parseFontStyle(style) {
|
|
421
|
+
var res = "";
|
|
422
|
+
if (style.fontWeight === "bold" || style.fontWeight === "bolder" || parseInt(style.fontWeight) >= 700) {
|
|
423
|
+
res = "bold";
|
|
424
|
+
}
|
|
425
|
+
if (style.fontStyle === "italic" || style.fontStyle === "oblique") {
|
|
426
|
+
res += "italic";
|
|
427
|
+
}
|
|
428
|
+
return res;
|
|
429
|
+
}
|
|
430
|
+
function parseColor(element, styleGetter) {
|
|
431
|
+
var cssColor = realColor(element, styleGetter);
|
|
432
|
+
if (!cssColor)
|
|
433
|
+
return null;
|
|
434
|
+
var rgba = cssColor.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);
|
|
435
|
+
if (!rgba || !Array.isArray(rgba)) {
|
|
436
|
+
return null;
|
|
437
|
+
}
|
|
438
|
+
var color = [
|
|
439
|
+
parseInt(rgba[1]),
|
|
440
|
+
parseInt(rgba[2]),
|
|
441
|
+
parseInt(rgba[3])
|
|
442
|
+
];
|
|
443
|
+
var alpha = parseInt(rgba[4]);
|
|
444
|
+
if (alpha === 0 || isNaN(color[0]) || isNaN(color[1]) || isNaN(color[2])) {
|
|
445
|
+
return null;
|
|
446
|
+
}
|
|
447
|
+
return color;
|
|
448
|
+
}
|
|
449
|
+
function realColor(elem, styleGetter) {
|
|
450
|
+
var bg = styleGetter(elem);
|
|
451
|
+
if (bg === "rgba(0, 0, 0, 0)" || bg === "transparent" || bg === "initial" || bg === "inherit") {
|
|
452
|
+
if (elem.parentElement == null) {
|
|
453
|
+
return null;
|
|
454
|
+
}
|
|
455
|
+
return realColor(elem.parentElement, styleGetter);
|
|
456
|
+
} else {
|
|
457
|
+
return bg;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
function parsePadding(style, scaleFactor) {
|
|
461
|
+
var val = [
|
|
462
|
+
style.paddingTop,
|
|
463
|
+
style.paddingRight,
|
|
464
|
+
style.paddingBottom,
|
|
465
|
+
style.paddingLeft
|
|
466
|
+
];
|
|
467
|
+
var pxScaleFactor = 96 / (72 / scaleFactor);
|
|
468
|
+
var linePadding = (parseInt(style.lineHeight) - parseInt(style.fontSize)) / scaleFactor / 2;
|
|
469
|
+
var inputPadding = val.map(function(n) {
|
|
470
|
+
return parseInt(n || "0") / pxScaleFactor;
|
|
471
|
+
});
|
|
472
|
+
var padding = parseSpacing(inputPadding, 0);
|
|
473
|
+
if (linePadding > padding.top) {
|
|
474
|
+
padding.top = linePadding;
|
|
475
|
+
}
|
|
476
|
+
if (linePadding > padding.bottom) {
|
|
477
|
+
padding.bottom = linePadding;
|
|
478
|
+
}
|
|
479
|
+
return padding;
|
|
480
|
+
}
|
|
481
|
+
function parseHtml(doc, input, window2, includeHiddenHtml, useCss) {
|
|
482
|
+
var _a2, _b;
|
|
483
|
+
if (includeHiddenHtml === void 0) {
|
|
484
|
+
includeHiddenHtml = false;
|
|
485
|
+
}
|
|
486
|
+
if (useCss === void 0) {
|
|
487
|
+
useCss = false;
|
|
488
|
+
}
|
|
489
|
+
var tableElement;
|
|
490
|
+
if (typeof input === "string") {
|
|
491
|
+
tableElement = window2.document.querySelector(input);
|
|
492
|
+
} else {
|
|
493
|
+
tableElement = input;
|
|
494
|
+
}
|
|
495
|
+
var supportedFonts = Object.keys(doc.getFontList());
|
|
496
|
+
var scaleFactor = doc.scaleFactor();
|
|
497
|
+
var head = [], body = [], foot = [];
|
|
498
|
+
if (!tableElement) {
|
|
499
|
+
console.error("Html table could not be found with input: ", input);
|
|
500
|
+
return { head, body, foot };
|
|
501
|
+
}
|
|
502
|
+
for (var i = 0; i < tableElement.rows.length; i++) {
|
|
503
|
+
var element = tableElement.rows[i];
|
|
504
|
+
var tagName = (_b = (_a2 = element === null || element === void 0 ? void 0 : element.parentElement) === null || _a2 === void 0 ? void 0 : _a2.tagName) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
505
|
+
var row = parseRowContent(supportedFonts, scaleFactor, window2, element, includeHiddenHtml, useCss);
|
|
506
|
+
if (!row)
|
|
507
|
+
continue;
|
|
508
|
+
if (tagName === "thead") {
|
|
509
|
+
head.push(row);
|
|
510
|
+
} else if (tagName === "tfoot") {
|
|
511
|
+
foot.push(row);
|
|
512
|
+
} else {
|
|
513
|
+
body.push(row);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return { head, body, foot };
|
|
517
|
+
}
|
|
518
|
+
function parseRowContent(supportedFonts, scaleFactor, window2, row, includeHidden, useCss) {
|
|
519
|
+
var resultRow = new HtmlRowInput(row);
|
|
520
|
+
for (var i = 0; i < row.cells.length; i++) {
|
|
521
|
+
var cell = row.cells[i];
|
|
522
|
+
var style_1 = window2.getComputedStyle(cell);
|
|
523
|
+
if (includeHidden || style_1.display !== "none") {
|
|
524
|
+
var cellStyles2 = void 0;
|
|
525
|
+
if (useCss) {
|
|
526
|
+
cellStyles2 = parseCss(supportedFonts, cell, scaleFactor, style_1, window2);
|
|
527
|
+
}
|
|
528
|
+
resultRow.push({
|
|
529
|
+
rowSpan: cell.rowSpan,
|
|
530
|
+
colSpan: cell.colSpan,
|
|
531
|
+
styles: cellStyles2,
|
|
532
|
+
_element: cell,
|
|
533
|
+
content: parseCellContent(cell)
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
var style = window2.getComputedStyle(row);
|
|
538
|
+
if (resultRow.length > 0 && (includeHidden || style.display !== "none")) {
|
|
539
|
+
return resultRow;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
function parseCellContent(orgCell) {
|
|
543
|
+
var cell = orgCell.cloneNode(true);
|
|
544
|
+
cell.innerHTML = cell.innerHTML.replace(/\n/g, "").replace(/ +/g, " ");
|
|
545
|
+
cell.innerHTML = cell.innerHTML.split(/<br.*?>/).map(function(part) {
|
|
546
|
+
return part.trim();
|
|
547
|
+
}).join("\n");
|
|
548
|
+
return cell.innerText || cell.textContent || "";
|
|
549
|
+
}
|
|
550
|
+
function validateInput(global, document, current) {
|
|
551
|
+
for (var _i = 0, _a2 = [global, document, current]; _i < _a2.length; _i++) {
|
|
552
|
+
var options = _a2[_i];
|
|
553
|
+
if (options && typeof options !== "object") {
|
|
554
|
+
console.error("The options parameter should be of type object, is: " + typeof options);
|
|
555
|
+
}
|
|
556
|
+
if (options.startY && typeof options.startY !== "number") {
|
|
557
|
+
console.error("Invalid value for startY option", options.startY);
|
|
558
|
+
delete options.startY;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
function assign(target, s, s1, s2, s3) {
|
|
563
|
+
if (target == null) {
|
|
564
|
+
throw new TypeError("Cannot convert undefined or null to object");
|
|
565
|
+
}
|
|
566
|
+
var to = Object(target);
|
|
567
|
+
for (var index = 1; index < arguments.length; index++) {
|
|
568
|
+
var nextSource = arguments[index];
|
|
569
|
+
if (nextSource != null) {
|
|
570
|
+
for (var nextKey in nextSource) {
|
|
571
|
+
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
|
|
572
|
+
to[nextKey] = nextSource[nextKey];
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
return to;
|
|
578
|
+
}
|
|
579
|
+
function parseInput(d, current) {
|
|
580
|
+
var doc = new DocHandler(d);
|
|
581
|
+
var document = doc.getDocumentOptions();
|
|
582
|
+
var global = doc.getGlobalOptions();
|
|
583
|
+
validateInput(global, document, current);
|
|
584
|
+
var options = assign({}, global, document, current);
|
|
585
|
+
var win;
|
|
586
|
+
if (typeof window !== "undefined") {
|
|
587
|
+
win = window;
|
|
588
|
+
}
|
|
589
|
+
var styles = parseStyles(global, document, current);
|
|
590
|
+
var hooks = parseHooks(global, document, current);
|
|
591
|
+
var settings = parseSettings(doc, options);
|
|
592
|
+
var content = parseContent$1(doc, options, win);
|
|
593
|
+
return { id: current.tableId, content, hooks, styles, settings };
|
|
594
|
+
}
|
|
595
|
+
function parseStyles(gInput, dInput, cInput) {
|
|
596
|
+
var styleOptions = {
|
|
597
|
+
styles: {},
|
|
598
|
+
headStyles: {},
|
|
599
|
+
bodyStyles: {},
|
|
600
|
+
footStyles: {},
|
|
601
|
+
alternateRowStyles: {},
|
|
602
|
+
columnStyles: {}
|
|
603
|
+
};
|
|
604
|
+
var _loop_1 = function(prop2) {
|
|
605
|
+
if (prop2 === "columnStyles") {
|
|
606
|
+
var global_1 = gInput[prop2];
|
|
607
|
+
var document_1 = dInput[prop2];
|
|
608
|
+
var current = cInput[prop2];
|
|
609
|
+
styleOptions.columnStyles = assign({}, global_1, document_1, current);
|
|
610
|
+
} else {
|
|
611
|
+
var allOptions = [gInput, dInput, cInput];
|
|
612
|
+
var styles = allOptions.map(function(opts) {
|
|
613
|
+
return opts[prop2] || {};
|
|
614
|
+
});
|
|
615
|
+
styleOptions[prop2] = assign({}, styles[0], styles[1], styles[2]);
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
for (var _i = 0, _a2 = Object.keys(styleOptions); _i < _a2.length; _i++) {
|
|
619
|
+
var prop = _a2[_i];
|
|
620
|
+
_loop_1(prop);
|
|
621
|
+
}
|
|
622
|
+
return styleOptions;
|
|
623
|
+
}
|
|
624
|
+
function parseHooks(global, document, current) {
|
|
625
|
+
var allOptions = [global, document, current];
|
|
626
|
+
var result = {
|
|
627
|
+
didParseCell: [],
|
|
628
|
+
willDrawCell: [],
|
|
629
|
+
didDrawCell: [],
|
|
630
|
+
willDrawPage: [],
|
|
631
|
+
didDrawPage: []
|
|
632
|
+
};
|
|
633
|
+
for (var _i = 0, allOptions_1 = allOptions; _i < allOptions_1.length; _i++) {
|
|
634
|
+
var options = allOptions_1[_i];
|
|
635
|
+
if (options.didParseCell)
|
|
636
|
+
result.didParseCell.push(options.didParseCell);
|
|
637
|
+
if (options.willDrawCell)
|
|
638
|
+
result.willDrawCell.push(options.willDrawCell);
|
|
639
|
+
if (options.didDrawCell)
|
|
640
|
+
result.didDrawCell.push(options.didDrawCell);
|
|
641
|
+
if (options.willDrawPage)
|
|
642
|
+
result.willDrawPage.push(options.willDrawPage);
|
|
643
|
+
if (options.didDrawPage)
|
|
644
|
+
result.didDrawPage.push(options.didDrawPage);
|
|
645
|
+
}
|
|
646
|
+
return result;
|
|
647
|
+
}
|
|
648
|
+
function parseSettings(doc, options) {
|
|
649
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
650
|
+
var margin = parseSpacing(options.margin, 40 / doc.scaleFactor());
|
|
651
|
+
var startY = (_a2 = getStartY(doc, options.startY)) !== null && _a2 !== void 0 ? _a2 : margin.top;
|
|
652
|
+
var showFoot;
|
|
653
|
+
if (options.showFoot === true) {
|
|
654
|
+
showFoot = "everyPage";
|
|
655
|
+
} else if (options.showFoot === false) {
|
|
656
|
+
showFoot = "never";
|
|
657
|
+
} else {
|
|
658
|
+
showFoot = (_b = options.showFoot) !== null && _b !== void 0 ? _b : "everyPage";
|
|
659
|
+
}
|
|
660
|
+
var showHead;
|
|
661
|
+
if (options.showHead === true) {
|
|
662
|
+
showHead = "everyPage";
|
|
663
|
+
} else if (options.showHead === false) {
|
|
664
|
+
showHead = "never";
|
|
665
|
+
} else {
|
|
666
|
+
showHead = (_c = options.showHead) !== null && _c !== void 0 ? _c : "everyPage";
|
|
667
|
+
}
|
|
668
|
+
var useCss = (_d = options.useCss) !== null && _d !== void 0 ? _d : false;
|
|
669
|
+
var theme = options.theme || (useCss ? "plain" : "striped");
|
|
670
|
+
var horizontalPageBreak = !!options.horizontalPageBreak;
|
|
671
|
+
var horizontalPageBreakRepeat = (_e = options.horizontalPageBreakRepeat) !== null && _e !== void 0 ? _e : null;
|
|
672
|
+
return {
|
|
673
|
+
includeHiddenHtml: (_f = options.includeHiddenHtml) !== null && _f !== void 0 ? _f : false,
|
|
674
|
+
useCss,
|
|
675
|
+
theme,
|
|
676
|
+
startY,
|
|
677
|
+
margin,
|
|
678
|
+
pageBreak: (_g = options.pageBreak) !== null && _g !== void 0 ? _g : "auto",
|
|
679
|
+
rowPageBreak: (_h = options.rowPageBreak) !== null && _h !== void 0 ? _h : "auto",
|
|
680
|
+
tableWidth: (_j = options.tableWidth) !== null && _j !== void 0 ? _j : "auto",
|
|
681
|
+
showHead,
|
|
682
|
+
showFoot,
|
|
683
|
+
tableLineWidth: (_k = options.tableLineWidth) !== null && _k !== void 0 ? _k : 0,
|
|
684
|
+
tableLineColor: (_l = options.tableLineColor) !== null && _l !== void 0 ? _l : 200,
|
|
685
|
+
horizontalPageBreak,
|
|
686
|
+
horizontalPageBreakRepeat,
|
|
687
|
+
horizontalPageBreakBehaviour: (_m = options.horizontalPageBreakBehaviour) !== null && _m !== void 0 ? _m : "afterAllRows"
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
function getStartY(doc, userStartY) {
|
|
691
|
+
var previous = doc.getLastAutoTable();
|
|
692
|
+
var sf = doc.scaleFactor();
|
|
693
|
+
var currentPage = doc.pageNumber();
|
|
694
|
+
var isSamePageAsPreviousTable = false;
|
|
695
|
+
if (previous && previous.startPageNumber) {
|
|
696
|
+
var endingPage = previous.startPageNumber + previous.pageNumber - 1;
|
|
697
|
+
isSamePageAsPreviousTable = endingPage === currentPage;
|
|
698
|
+
}
|
|
699
|
+
if (typeof userStartY === "number") {
|
|
700
|
+
return userStartY;
|
|
701
|
+
} else if (userStartY == null || userStartY === false) {
|
|
702
|
+
if (isSamePageAsPreviousTable && (previous === null || previous === void 0 ? void 0 : previous.finalY) != null) {
|
|
703
|
+
return previous.finalY + 20 / sf;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
return null;
|
|
707
|
+
}
|
|
708
|
+
function parseContent$1(doc, options, window2) {
|
|
709
|
+
var head = options.head || [];
|
|
710
|
+
var body = options.body || [];
|
|
711
|
+
var foot = options.foot || [];
|
|
712
|
+
if (options.html) {
|
|
713
|
+
var hidden = options.includeHiddenHtml;
|
|
714
|
+
if (window2) {
|
|
715
|
+
var htmlContent = parseHtml(doc, options.html, window2, hidden, options.useCss) || {};
|
|
716
|
+
head = htmlContent.head || head;
|
|
717
|
+
body = htmlContent.body || head;
|
|
718
|
+
foot = htmlContent.foot || head;
|
|
719
|
+
} else {
|
|
720
|
+
console.error("Cannot parse html in non browser environment");
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
var columns = options.columns || parseColumns(head, body, foot);
|
|
724
|
+
return { columns, head, body, foot };
|
|
725
|
+
}
|
|
726
|
+
function parseColumns(head, body, foot) {
|
|
727
|
+
var firstRow = head[0] || body[0] || foot[0] || [];
|
|
728
|
+
var result = [];
|
|
729
|
+
Object.keys(firstRow).filter(function(key) {
|
|
730
|
+
return key !== "_element";
|
|
731
|
+
}).forEach(function(key) {
|
|
732
|
+
var colSpan = 1;
|
|
733
|
+
var input;
|
|
734
|
+
if (Array.isArray(firstRow)) {
|
|
735
|
+
input = firstRow[parseInt(key)];
|
|
736
|
+
} else {
|
|
737
|
+
input = firstRow[key];
|
|
738
|
+
}
|
|
739
|
+
if (typeof input === "object" && !Array.isArray(input)) {
|
|
740
|
+
colSpan = (input === null || input === void 0 ? void 0 : input.colSpan) || 1;
|
|
741
|
+
}
|
|
742
|
+
for (var i = 0; i < colSpan; i++) {
|
|
743
|
+
var id = void 0;
|
|
744
|
+
if (Array.isArray(firstRow)) {
|
|
745
|
+
id = result.length;
|
|
746
|
+
} else {
|
|
747
|
+
id = key + (i > 0 ? "_".concat(i) : "");
|
|
748
|
+
}
|
|
749
|
+
var rowResult = { dataKey: id };
|
|
750
|
+
result.push(rowResult);
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
return result;
|
|
754
|
+
}
|
|
755
|
+
var HookData = (
|
|
756
|
+
/** @class */
|
|
757
|
+
/* @__PURE__ */ (function() {
|
|
758
|
+
function HookData2(doc, table, cursor) {
|
|
759
|
+
this.table = table;
|
|
760
|
+
this.pageNumber = table.pageNumber;
|
|
761
|
+
this.settings = table.settings;
|
|
762
|
+
this.cursor = cursor;
|
|
763
|
+
this.doc = doc.getDocument();
|
|
764
|
+
}
|
|
765
|
+
return HookData2;
|
|
766
|
+
})()
|
|
767
|
+
);
|
|
768
|
+
var CellHookData = (
|
|
769
|
+
/** @class */
|
|
770
|
+
(function(_super) {
|
|
771
|
+
__extends(CellHookData2, _super);
|
|
772
|
+
function CellHookData2(doc, table, cell, row, column, cursor) {
|
|
773
|
+
var _this = _super.call(this, doc, table, cursor) || this;
|
|
774
|
+
_this.cell = cell;
|
|
775
|
+
_this.row = row;
|
|
776
|
+
_this.column = column;
|
|
777
|
+
_this.section = row.section;
|
|
778
|
+
return _this;
|
|
779
|
+
}
|
|
780
|
+
return CellHookData2;
|
|
781
|
+
})(HookData)
|
|
782
|
+
);
|
|
783
|
+
var Table = (
|
|
784
|
+
/** @class */
|
|
785
|
+
(function() {
|
|
786
|
+
function Table2(input, content) {
|
|
787
|
+
this.pageNumber = 1;
|
|
788
|
+
this.id = input.id;
|
|
789
|
+
this.settings = input.settings;
|
|
790
|
+
this.styles = input.styles;
|
|
791
|
+
this.hooks = input.hooks;
|
|
792
|
+
this.columns = content.columns;
|
|
793
|
+
this.head = content.head;
|
|
794
|
+
this.body = content.body;
|
|
795
|
+
this.foot = content.foot;
|
|
796
|
+
}
|
|
797
|
+
Table2.prototype.getHeadHeight = function(columns) {
|
|
798
|
+
return this.head.reduce(function(acc, row) {
|
|
799
|
+
return acc + row.getMaxCellHeight(columns);
|
|
800
|
+
}, 0);
|
|
801
|
+
};
|
|
802
|
+
Table2.prototype.getFootHeight = function(columns) {
|
|
803
|
+
return this.foot.reduce(function(acc, row) {
|
|
804
|
+
return acc + row.getMaxCellHeight(columns);
|
|
805
|
+
}, 0);
|
|
806
|
+
};
|
|
807
|
+
Table2.prototype.allRows = function() {
|
|
808
|
+
return this.head.concat(this.body).concat(this.foot);
|
|
809
|
+
};
|
|
810
|
+
Table2.prototype.callCellHooks = function(doc, handlers, cell, row, column, cursor) {
|
|
811
|
+
for (var _i = 0, handlers_1 = handlers; _i < handlers_1.length; _i++) {
|
|
812
|
+
var handler = handlers_1[_i];
|
|
813
|
+
var data = new CellHookData(doc, this, cell, row, column, cursor);
|
|
814
|
+
var result = handler(data) === false;
|
|
815
|
+
cell.text = Array.isArray(cell.text) ? cell.text : [cell.text];
|
|
816
|
+
if (result) {
|
|
817
|
+
return false;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
return true;
|
|
821
|
+
};
|
|
822
|
+
Table2.prototype.callEndPageHooks = function(doc, cursor) {
|
|
823
|
+
doc.applyStyles(doc.userStyles);
|
|
824
|
+
for (var _i = 0, _a2 = this.hooks.didDrawPage; _i < _a2.length; _i++) {
|
|
825
|
+
var handler = _a2[_i];
|
|
826
|
+
handler(new HookData(doc, this, cursor));
|
|
827
|
+
}
|
|
828
|
+
};
|
|
829
|
+
Table2.prototype.callWillDrawPageHooks = function(doc, cursor) {
|
|
830
|
+
for (var _i = 0, _a2 = this.hooks.willDrawPage; _i < _a2.length; _i++) {
|
|
831
|
+
var handler = _a2[_i];
|
|
832
|
+
handler(new HookData(doc, this, cursor));
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
Table2.prototype.getWidth = function(pageWidth) {
|
|
836
|
+
if (typeof this.settings.tableWidth === "number") {
|
|
837
|
+
return this.settings.tableWidth;
|
|
838
|
+
} else if (this.settings.tableWidth === "wrap") {
|
|
839
|
+
var wrappedWidth = this.columns.reduce(function(total, col) {
|
|
840
|
+
return total + col.wrappedWidth;
|
|
841
|
+
}, 0);
|
|
842
|
+
return wrappedWidth;
|
|
843
|
+
} else {
|
|
844
|
+
var margin = this.settings.margin;
|
|
845
|
+
return pageWidth - margin.left - margin.right;
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
return Table2;
|
|
849
|
+
})()
|
|
850
|
+
);
|
|
851
|
+
var Row = (
|
|
852
|
+
/** @class */
|
|
853
|
+
(function() {
|
|
854
|
+
function Row2(raw, index, section, cells, spansMultiplePages) {
|
|
855
|
+
if (spansMultiplePages === void 0) {
|
|
856
|
+
spansMultiplePages = false;
|
|
857
|
+
}
|
|
858
|
+
this.height = 0;
|
|
859
|
+
this.raw = raw;
|
|
860
|
+
if (raw instanceof HtmlRowInput) {
|
|
861
|
+
this.raw = raw._element;
|
|
862
|
+
this.element = raw._element;
|
|
863
|
+
}
|
|
864
|
+
this.index = index;
|
|
865
|
+
this.section = section;
|
|
866
|
+
this.cells = cells;
|
|
867
|
+
this.spansMultiplePages = spansMultiplePages;
|
|
868
|
+
}
|
|
869
|
+
Row2.prototype.getMaxCellHeight = function(columns) {
|
|
870
|
+
var _this = this;
|
|
871
|
+
return columns.reduce(function(acc, column) {
|
|
872
|
+
var _a2;
|
|
873
|
+
return Math.max(acc, ((_a2 = _this.cells[column.index]) === null || _a2 === void 0 ? void 0 : _a2.height) || 0);
|
|
874
|
+
}, 0);
|
|
875
|
+
};
|
|
876
|
+
Row2.prototype.hasRowSpan = function(columns) {
|
|
877
|
+
var _this = this;
|
|
878
|
+
return columns.filter(function(column) {
|
|
879
|
+
var cell = _this.cells[column.index];
|
|
880
|
+
if (!cell)
|
|
881
|
+
return false;
|
|
882
|
+
return cell.rowSpan > 1;
|
|
883
|
+
}).length > 0;
|
|
884
|
+
};
|
|
885
|
+
Row2.prototype.canEntireRowFit = function(height, columns) {
|
|
886
|
+
return this.getMaxCellHeight(columns) <= height;
|
|
887
|
+
};
|
|
888
|
+
Row2.prototype.getMinimumRowHeight = function(columns, doc) {
|
|
889
|
+
var _this = this;
|
|
890
|
+
return columns.reduce(function(acc, column) {
|
|
891
|
+
var cell = _this.cells[column.index];
|
|
892
|
+
if (!cell)
|
|
893
|
+
return 0;
|
|
894
|
+
var lineHeight = doc.getLineHeight(cell.styles.fontSize);
|
|
895
|
+
var vPadding = cell.padding("vertical");
|
|
896
|
+
var oneRowHeight = vPadding + lineHeight;
|
|
897
|
+
return oneRowHeight > acc ? oneRowHeight : acc;
|
|
898
|
+
}, 0);
|
|
899
|
+
};
|
|
900
|
+
return Row2;
|
|
901
|
+
})()
|
|
902
|
+
);
|
|
903
|
+
var Cell = (
|
|
904
|
+
/** @class */
|
|
905
|
+
(function() {
|
|
906
|
+
function Cell2(raw, styles, section) {
|
|
907
|
+
var _a2;
|
|
908
|
+
this.contentHeight = 0;
|
|
909
|
+
this.contentWidth = 0;
|
|
910
|
+
this.wrappedWidth = 0;
|
|
911
|
+
this.minReadableWidth = 0;
|
|
912
|
+
this.minWidth = 0;
|
|
913
|
+
this.width = 0;
|
|
914
|
+
this.height = 0;
|
|
915
|
+
this.x = 0;
|
|
916
|
+
this.y = 0;
|
|
917
|
+
this.styles = styles;
|
|
918
|
+
this.section = section;
|
|
919
|
+
this.raw = raw;
|
|
920
|
+
var content = raw;
|
|
921
|
+
if (raw != null && typeof raw === "object" && !Array.isArray(raw)) {
|
|
922
|
+
this.rowSpan = raw.rowSpan || 1;
|
|
923
|
+
this.colSpan = raw.colSpan || 1;
|
|
924
|
+
content = (_a2 = raw.content) !== null && _a2 !== void 0 ? _a2 : raw;
|
|
925
|
+
if (raw._element) {
|
|
926
|
+
this.raw = raw._element;
|
|
927
|
+
}
|
|
928
|
+
} else {
|
|
929
|
+
this.rowSpan = 1;
|
|
930
|
+
this.colSpan = 1;
|
|
931
|
+
}
|
|
932
|
+
var text = content != null ? "" + content : "";
|
|
933
|
+
var splitRegex = /\r\n|\r|\n/g;
|
|
934
|
+
this.text = text.split(splitRegex);
|
|
935
|
+
}
|
|
936
|
+
Cell2.prototype.getTextPos = function() {
|
|
937
|
+
var y;
|
|
938
|
+
if (this.styles.valign === "top") {
|
|
939
|
+
y = this.y + this.padding("top");
|
|
940
|
+
} else if (this.styles.valign === "bottom") {
|
|
941
|
+
y = this.y + this.height - this.padding("bottom");
|
|
942
|
+
} else {
|
|
943
|
+
var netHeight = this.height - this.padding("vertical");
|
|
944
|
+
y = this.y + netHeight / 2 + this.padding("top");
|
|
945
|
+
}
|
|
946
|
+
var x;
|
|
947
|
+
if (this.styles.halign === "right") {
|
|
948
|
+
x = this.x + this.width - this.padding("right");
|
|
949
|
+
} else if (this.styles.halign === "center") {
|
|
950
|
+
var netWidth = this.width - this.padding("horizontal");
|
|
951
|
+
x = this.x + netWidth / 2 + this.padding("left");
|
|
952
|
+
} else {
|
|
953
|
+
x = this.x + this.padding("left");
|
|
954
|
+
}
|
|
955
|
+
return { x, y };
|
|
956
|
+
};
|
|
957
|
+
Cell2.prototype.getContentHeight = function(scaleFactor, lineHeightFactor) {
|
|
958
|
+
if (lineHeightFactor === void 0) {
|
|
959
|
+
lineHeightFactor = 1.15;
|
|
960
|
+
}
|
|
961
|
+
var lineCount = Array.isArray(this.text) ? this.text.length : 1;
|
|
962
|
+
var lineHeight = this.styles.fontSize / scaleFactor * lineHeightFactor;
|
|
963
|
+
var height = lineCount * lineHeight + this.padding("vertical");
|
|
964
|
+
return Math.max(height, this.styles.minCellHeight);
|
|
965
|
+
};
|
|
966
|
+
Cell2.prototype.padding = function(name) {
|
|
967
|
+
var padding = parseSpacing(this.styles.cellPadding, 0);
|
|
968
|
+
if (name === "vertical") {
|
|
969
|
+
return padding.top + padding.bottom;
|
|
970
|
+
} else if (name === "horizontal") {
|
|
971
|
+
return padding.left + padding.right;
|
|
972
|
+
} else {
|
|
973
|
+
return padding[name];
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
return Cell2;
|
|
977
|
+
})()
|
|
978
|
+
);
|
|
979
|
+
var Column = (
|
|
980
|
+
/** @class */
|
|
981
|
+
(function() {
|
|
982
|
+
function Column2(dataKey, raw, index) {
|
|
983
|
+
this.wrappedWidth = 0;
|
|
984
|
+
this.minReadableWidth = 0;
|
|
985
|
+
this.minWidth = 0;
|
|
986
|
+
this.width = 0;
|
|
987
|
+
this.dataKey = dataKey;
|
|
988
|
+
this.raw = raw;
|
|
989
|
+
this.index = index;
|
|
990
|
+
}
|
|
991
|
+
Column2.prototype.getMaxCustomCellWidth = function(table) {
|
|
992
|
+
var max = 0;
|
|
993
|
+
for (var _i = 0, _a2 = table.allRows(); _i < _a2.length; _i++) {
|
|
994
|
+
var row = _a2[_i];
|
|
995
|
+
var cell = row.cells[this.index];
|
|
996
|
+
if (cell && typeof cell.styles.cellWidth === "number") {
|
|
997
|
+
max = Math.max(max, cell.styles.cellWidth);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
return max;
|
|
1001
|
+
};
|
|
1002
|
+
return Column2;
|
|
1003
|
+
})()
|
|
1004
|
+
);
|
|
1005
|
+
function calculateWidths(doc, table) {
|
|
1006
|
+
calculate(doc, table);
|
|
1007
|
+
var resizableColumns = [];
|
|
1008
|
+
var initialTableWidth = 0;
|
|
1009
|
+
table.columns.forEach(function(column) {
|
|
1010
|
+
var customWidth = column.getMaxCustomCellWidth(table);
|
|
1011
|
+
if (customWidth) {
|
|
1012
|
+
column.width = customWidth;
|
|
1013
|
+
} else {
|
|
1014
|
+
column.width = column.wrappedWidth;
|
|
1015
|
+
resizableColumns.push(column);
|
|
1016
|
+
}
|
|
1017
|
+
initialTableWidth += column.width;
|
|
1018
|
+
});
|
|
1019
|
+
var resizeWidth = table.getWidth(doc.pageSize().width) - initialTableWidth;
|
|
1020
|
+
if (resizeWidth) {
|
|
1021
|
+
resizeWidth = resizeColumns(resizableColumns, resizeWidth, function(column) {
|
|
1022
|
+
return Math.max(column.minReadableWidth, column.minWidth);
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
if (resizeWidth) {
|
|
1026
|
+
resizeWidth = resizeColumns(resizableColumns, resizeWidth, function(column) {
|
|
1027
|
+
return column.minWidth;
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
resizeWidth = Math.abs(resizeWidth);
|
|
1031
|
+
if (!table.settings.horizontalPageBreak && resizeWidth > 0.1 / doc.scaleFactor()) {
|
|
1032
|
+
resizeWidth = resizeWidth < 1 ? resizeWidth : Math.round(resizeWidth);
|
|
1033
|
+
console.log("Of the table content, ".concat(resizeWidth, " units width could not fit page"));
|
|
1034
|
+
}
|
|
1035
|
+
applyColSpans(table);
|
|
1036
|
+
fitContent(table, doc);
|
|
1037
|
+
applyRowSpans(table);
|
|
1038
|
+
}
|
|
1039
|
+
function calculate(doc, table) {
|
|
1040
|
+
var sf = doc.scaleFactor();
|
|
1041
|
+
var horizontalPageBreak = table.settings.horizontalPageBreak;
|
|
1042
|
+
var availablePageWidth = getPageAvailableWidth(doc, table);
|
|
1043
|
+
table.allRows().forEach(function(row) {
|
|
1044
|
+
for (var _i = 0, _a2 = table.columns; _i < _a2.length; _i++) {
|
|
1045
|
+
var column = _a2[_i];
|
|
1046
|
+
var cell = row.cells[column.index];
|
|
1047
|
+
if (!cell)
|
|
1048
|
+
continue;
|
|
1049
|
+
var hooks = table.hooks.didParseCell;
|
|
1050
|
+
table.callCellHooks(doc, hooks, cell, row, column, null);
|
|
1051
|
+
var padding = cell.padding("horizontal");
|
|
1052
|
+
cell.contentWidth = getStringWidth(cell.text, cell.styles, doc) + padding;
|
|
1053
|
+
var longestWordWidth = getStringWidth(cell.text.join(" ").split(/[^\S\u00A0]+/), cell.styles, doc);
|
|
1054
|
+
cell.minReadableWidth = longestWordWidth + cell.padding("horizontal");
|
|
1055
|
+
if (typeof cell.styles.cellWidth === "number") {
|
|
1056
|
+
cell.minWidth = cell.styles.cellWidth;
|
|
1057
|
+
cell.wrappedWidth = cell.styles.cellWidth;
|
|
1058
|
+
} else if (cell.styles.cellWidth === "wrap" || horizontalPageBreak === true) {
|
|
1059
|
+
if (cell.contentWidth > availablePageWidth) {
|
|
1060
|
+
cell.minWidth = availablePageWidth;
|
|
1061
|
+
cell.wrappedWidth = availablePageWidth;
|
|
1062
|
+
} else {
|
|
1063
|
+
cell.minWidth = cell.contentWidth;
|
|
1064
|
+
cell.wrappedWidth = cell.contentWidth;
|
|
1065
|
+
}
|
|
1066
|
+
} else {
|
|
1067
|
+
var defaultMinWidth = 10 / sf;
|
|
1068
|
+
cell.minWidth = cell.styles.minCellWidth || defaultMinWidth;
|
|
1069
|
+
cell.wrappedWidth = cell.contentWidth;
|
|
1070
|
+
if (cell.minWidth > cell.wrappedWidth) {
|
|
1071
|
+
cell.wrappedWidth = cell.minWidth;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1076
|
+
table.allRows().forEach(function(row) {
|
|
1077
|
+
for (var _i = 0, _a2 = table.columns; _i < _a2.length; _i++) {
|
|
1078
|
+
var column = _a2[_i];
|
|
1079
|
+
var cell = row.cells[column.index];
|
|
1080
|
+
if (cell && cell.colSpan === 1) {
|
|
1081
|
+
column.wrappedWidth = Math.max(column.wrappedWidth, cell.wrappedWidth);
|
|
1082
|
+
column.minWidth = Math.max(column.minWidth, cell.minWidth);
|
|
1083
|
+
column.minReadableWidth = Math.max(column.minReadableWidth, cell.minReadableWidth);
|
|
1084
|
+
} else {
|
|
1085
|
+
var columnStyles = table.styles.columnStyles[column.dataKey] || table.styles.columnStyles[column.index] || {};
|
|
1086
|
+
var cellWidth = columnStyles.cellWidth || columnStyles.minCellWidth;
|
|
1087
|
+
if (cellWidth && typeof cellWidth === "number") {
|
|
1088
|
+
column.minWidth = cellWidth;
|
|
1089
|
+
column.wrappedWidth = cellWidth;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
if (cell) {
|
|
1093
|
+
if (cell.colSpan > 1 && !column.minWidth) {
|
|
1094
|
+
column.minWidth = cell.minWidth;
|
|
1095
|
+
}
|
|
1096
|
+
if (cell.colSpan > 1 && !column.wrappedWidth) {
|
|
1097
|
+
column.wrappedWidth = cell.minWidth;
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
function resizeColumns(columns, resizeWidth, getMinWidth) {
|
|
1104
|
+
var initialResizeWidth = resizeWidth;
|
|
1105
|
+
var sumWrappedWidth = columns.reduce(function(acc, column2) {
|
|
1106
|
+
return acc + column2.wrappedWidth;
|
|
1107
|
+
}, 0);
|
|
1108
|
+
for (var i = 0; i < columns.length; i++) {
|
|
1109
|
+
var column = columns[i];
|
|
1110
|
+
var ratio = column.wrappedWidth / sumWrappedWidth;
|
|
1111
|
+
var suggestedChange = initialResizeWidth * ratio;
|
|
1112
|
+
var suggestedWidth = column.width + suggestedChange;
|
|
1113
|
+
var minWidth = getMinWidth(column);
|
|
1114
|
+
var newWidth = suggestedWidth < minWidth ? minWidth : suggestedWidth;
|
|
1115
|
+
resizeWidth -= newWidth - column.width;
|
|
1116
|
+
column.width = newWidth;
|
|
1117
|
+
}
|
|
1118
|
+
resizeWidth = Math.round(resizeWidth * 1e10) / 1e10;
|
|
1119
|
+
if (resizeWidth) {
|
|
1120
|
+
var resizableColumns = columns.filter(function(column2) {
|
|
1121
|
+
return resizeWidth < 0 ? column2.width > getMinWidth(column2) : true;
|
|
1122
|
+
});
|
|
1123
|
+
if (resizableColumns.length) {
|
|
1124
|
+
resizeWidth = resizeColumns(resizableColumns, resizeWidth, getMinWidth);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
return resizeWidth;
|
|
1128
|
+
}
|
|
1129
|
+
function applyRowSpans(table) {
|
|
1130
|
+
var rowSpanCells = {};
|
|
1131
|
+
var colRowSpansLeft = 1;
|
|
1132
|
+
var all = table.allRows();
|
|
1133
|
+
for (var rowIndex = 0; rowIndex < all.length; rowIndex++) {
|
|
1134
|
+
var row = all[rowIndex];
|
|
1135
|
+
for (var _i = 0, _a2 = table.columns; _i < _a2.length; _i++) {
|
|
1136
|
+
var column = _a2[_i];
|
|
1137
|
+
var data = rowSpanCells[column.index];
|
|
1138
|
+
if (colRowSpansLeft > 1) {
|
|
1139
|
+
colRowSpansLeft--;
|
|
1140
|
+
delete row.cells[column.index];
|
|
1141
|
+
} else if (data) {
|
|
1142
|
+
data.cell.height += row.height;
|
|
1143
|
+
colRowSpansLeft = data.cell.colSpan;
|
|
1144
|
+
delete row.cells[column.index];
|
|
1145
|
+
data.left--;
|
|
1146
|
+
if (data.left <= 1) {
|
|
1147
|
+
delete rowSpanCells[column.index];
|
|
1148
|
+
}
|
|
1149
|
+
} else {
|
|
1150
|
+
var cell = row.cells[column.index];
|
|
1151
|
+
if (!cell) {
|
|
1152
|
+
continue;
|
|
1153
|
+
}
|
|
1154
|
+
cell.height = row.height;
|
|
1155
|
+
if (cell.rowSpan > 1) {
|
|
1156
|
+
var remaining = all.length - rowIndex;
|
|
1157
|
+
var left = cell.rowSpan > remaining ? remaining : cell.rowSpan;
|
|
1158
|
+
rowSpanCells[column.index] = { cell, left, row };
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
function applyColSpans(table) {
|
|
1165
|
+
var all = table.allRows();
|
|
1166
|
+
for (var rowIndex = 0; rowIndex < all.length; rowIndex++) {
|
|
1167
|
+
var row = all[rowIndex];
|
|
1168
|
+
var colSpanCell = null;
|
|
1169
|
+
var combinedColSpanWidth = 0;
|
|
1170
|
+
var colSpansLeft = 0;
|
|
1171
|
+
for (var columnIndex = 0; columnIndex < table.columns.length; columnIndex++) {
|
|
1172
|
+
var column = table.columns[columnIndex];
|
|
1173
|
+
colSpansLeft -= 1;
|
|
1174
|
+
if (colSpansLeft > 1 && table.columns[columnIndex + 1]) {
|
|
1175
|
+
combinedColSpanWidth += column.width;
|
|
1176
|
+
delete row.cells[column.index];
|
|
1177
|
+
} else if (colSpanCell) {
|
|
1178
|
+
var cell = colSpanCell;
|
|
1179
|
+
delete row.cells[column.index];
|
|
1180
|
+
colSpanCell = null;
|
|
1181
|
+
cell.width = column.width + combinedColSpanWidth;
|
|
1182
|
+
} else {
|
|
1183
|
+
var cell = row.cells[column.index];
|
|
1184
|
+
if (!cell)
|
|
1185
|
+
continue;
|
|
1186
|
+
colSpansLeft = cell.colSpan;
|
|
1187
|
+
combinedColSpanWidth = 0;
|
|
1188
|
+
if (cell.colSpan > 1) {
|
|
1189
|
+
colSpanCell = cell;
|
|
1190
|
+
combinedColSpanWidth += column.width;
|
|
1191
|
+
continue;
|
|
1192
|
+
}
|
|
1193
|
+
cell.width = column.width + combinedColSpanWidth;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
function fitContent(table, doc) {
|
|
1199
|
+
var rowSpanHeight = { count: 0, height: 0 };
|
|
1200
|
+
for (var _i = 0, _a2 = table.allRows(); _i < _a2.length; _i++) {
|
|
1201
|
+
var row = _a2[_i];
|
|
1202
|
+
for (var _b = 0, _c = table.columns; _b < _c.length; _b++) {
|
|
1203
|
+
var column = _c[_b];
|
|
1204
|
+
var cell = row.cells[column.index];
|
|
1205
|
+
if (!cell)
|
|
1206
|
+
continue;
|
|
1207
|
+
doc.applyStyles(cell.styles, true);
|
|
1208
|
+
var textSpace = cell.width - cell.padding("horizontal");
|
|
1209
|
+
if (cell.styles.overflow === "linebreak") {
|
|
1210
|
+
cell.text = doc.splitTextToSize(cell.text, textSpace + 1 / doc.scaleFactor(), { fontSize: cell.styles.fontSize });
|
|
1211
|
+
} else if (cell.styles.overflow === "ellipsize") {
|
|
1212
|
+
cell.text = ellipsize(cell.text, textSpace, cell.styles, doc, "...");
|
|
1213
|
+
} else if (cell.styles.overflow === "hidden") {
|
|
1214
|
+
cell.text = ellipsize(cell.text, textSpace, cell.styles, doc, "");
|
|
1215
|
+
} else if (typeof cell.styles.overflow === "function") {
|
|
1216
|
+
var result = cell.styles.overflow(cell.text, textSpace);
|
|
1217
|
+
if (typeof result === "string") {
|
|
1218
|
+
cell.text = [result];
|
|
1219
|
+
} else {
|
|
1220
|
+
cell.text = result;
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
cell.contentHeight = cell.getContentHeight(doc.scaleFactor(), doc.getLineHeightFactor());
|
|
1224
|
+
var realContentHeight = cell.contentHeight / cell.rowSpan;
|
|
1225
|
+
if (cell.rowSpan > 1 && rowSpanHeight.count * rowSpanHeight.height < realContentHeight * cell.rowSpan) {
|
|
1226
|
+
rowSpanHeight = { height: realContentHeight, count: cell.rowSpan };
|
|
1227
|
+
} else if (rowSpanHeight && rowSpanHeight.count > 0) {
|
|
1228
|
+
if (rowSpanHeight.height > realContentHeight) {
|
|
1229
|
+
realContentHeight = rowSpanHeight.height;
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
if (realContentHeight > row.height) {
|
|
1233
|
+
row.height = realContentHeight;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
rowSpanHeight.count--;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
function ellipsize(text, width, styles, doc, overflow) {
|
|
1240
|
+
return text.map(function(str) {
|
|
1241
|
+
return ellipsizeStr(str, width, styles, doc, overflow);
|
|
1242
|
+
});
|
|
1243
|
+
}
|
|
1244
|
+
function ellipsizeStr(text, width, styles, doc, overflow) {
|
|
1245
|
+
var precision = 1e4 * doc.scaleFactor();
|
|
1246
|
+
width = Math.ceil(width * precision) / precision;
|
|
1247
|
+
if (width >= getStringWidth(text, styles, doc)) {
|
|
1248
|
+
return text;
|
|
1249
|
+
}
|
|
1250
|
+
while (width < getStringWidth(text + overflow, styles, doc)) {
|
|
1251
|
+
if (text.length <= 1) {
|
|
1252
|
+
break;
|
|
1253
|
+
}
|
|
1254
|
+
text = text.substring(0, text.length - 1);
|
|
1255
|
+
}
|
|
1256
|
+
return text.trim() + overflow;
|
|
1257
|
+
}
|
|
1258
|
+
function createTable(jsPDFDoc, input) {
|
|
1259
|
+
var doc = new DocHandler(jsPDFDoc);
|
|
1260
|
+
var content = parseContent(input, doc.scaleFactor());
|
|
1261
|
+
var table = new Table(input, content);
|
|
1262
|
+
calculateWidths(doc, table);
|
|
1263
|
+
doc.applyStyles(doc.userStyles);
|
|
1264
|
+
return table;
|
|
1265
|
+
}
|
|
1266
|
+
function parseContent(input, sf) {
|
|
1267
|
+
var content = input.content;
|
|
1268
|
+
var columns = createColumns(content.columns);
|
|
1269
|
+
if (content.head.length === 0) {
|
|
1270
|
+
var sectionRow = generateSectionRow(columns, "head");
|
|
1271
|
+
if (sectionRow)
|
|
1272
|
+
content.head.push(sectionRow);
|
|
1273
|
+
}
|
|
1274
|
+
if (content.foot.length === 0) {
|
|
1275
|
+
var sectionRow = generateSectionRow(columns, "foot");
|
|
1276
|
+
if (sectionRow)
|
|
1277
|
+
content.foot.push(sectionRow);
|
|
1278
|
+
}
|
|
1279
|
+
var theme = input.settings.theme;
|
|
1280
|
+
var styles = input.styles;
|
|
1281
|
+
return {
|
|
1282
|
+
columns,
|
|
1283
|
+
head: parseSection("head", content.head, columns, styles, theme, sf),
|
|
1284
|
+
body: parseSection("body", content.body, columns, styles, theme, sf),
|
|
1285
|
+
foot: parseSection("foot", content.foot, columns, styles, theme, sf)
|
|
1286
|
+
};
|
|
1287
|
+
}
|
|
1288
|
+
function parseSection(sectionName, sectionRows, columns, styleProps, theme, scaleFactor) {
|
|
1289
|
+
var rowSpansLeftForColumn = {};
|
|
1290
|
+
var result = sectionRows.map(function(rawRow, rowIndex) {
|
|
1291
|
+
var skippedRowForRowSpans = 0;
|
|
1292
|
+
var cells = {};
|
|
1293
|
+
var colSpansAdded = 0;
|
|
1294
|
+
var columnSpansLeft = 0;
|
|
1295
|
+
for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
|
|
1296
|
+
var column = columns_1[_i];
|
|
1297
|
+
if (rowSpansLeftForColumn[column.index] == null || rowSpansLeftForColumn[column.index].left === 0) {
|
|
1298
|
+
if (columnSpansLeft === 0) {
|
|
1299
|
+
var rawCell = void 0;
|
|
1300
|
+
if (Array.isArray(rawRow)) {
|
|
1301
|
+
rawCell = rawRow[column.index - colSpansAdded - skippedRowForRowSpans];
|
|
1302
|
+
} else {
|
|
1303
|
+
rawCell = rawRow[column.dataKey];
|
|
1304
|
+
}
|
|
1305
|
+
var cellInputStyles = {};
|
|
1306
|
+
if (typeof rawCell === "object" && !Array.isArray(rawCell)) {
|
|
1307
|
+
cellInputStyles = (rawCell === null || rawCell === void 0 ? void 0 : rawCell.styles) || {};
|
|
1308
|
+
}
|
|
1309
|
+
var styles = cellStyles(sectionName, column, rowIndex, theme, styleProps, scaleFactor, cellInputStyles);
|
|
1310
|
+
var cell = new Cell(rawCell, styles, sectionName);
|
|
1311
|
+
cells[column.dataKey] = cell;
|
|
1312
|
+
cells[column.index] = cell;
|
|
1313
|
+
columnSpansLeft = cell.colSpan - 1;
|
|
1314
|
+
rowSpansLeftForColumn[column.index] = {
|
|
1315
|
+
left: cell.rowSpan - 1,
|
|
1316
|
+
times: columnSpansLeft
|
|
1317
|
+
};
|
|
1318
|
+
} else {
|
|
1319
|
+
columnSpansLeft--;
|
|
1320
|
+
colSpansAdded++;
|
|
1321
|
+
}
|
|
1322
|
+
} else {
|
|
1323
|
+
rowSpansLeftForColumn[column.index].left--;
|
|
1324
|
+
columnSpansLeft = rowSpansLeftForColumn[column.index].times;
|
|
1325
|
+
skippedRowForRowSpans++;
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
return new Row(rawRow, rowIndex, sectionName, cells);
|
|
1329
|
+
});
|
|
1330
|
+
return result;
|
|
1331
|
+
}
|
|
1332
|
+
function generateSectionRow(columns, section) {
|
|
1333
|
+
var sectionRow = {};
|
|
1334
|
+
columns.forEach(function(col) {
|
|
1335
|
+
if (col.raw != null) {
|
|
1336
|
+
var title = getSectionTitle(section, col.raw);
|
|
1337
|
+
if (title != null)
|
|
1338
|
+
sectionRow[col.dataKey] = title;
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
return Object.keys(sectionRow).length > 0 ? sectionRow : null;
|
|
1342
|
+
}
|
|
1343
|
+
function getSectionTitle(section, column) {
|
|
1344
|
+
if (section === "head") {
|
|
1345
|
+
if (typeof column === "object") {
|
|
1346
|
+
return column.header || null;
|
|
1347
|
+
} else if (typeof column === "string" || typeof column === "number") {
|
|
1348
|
+
return column;
|
|
1349
|
+
}
|
|
1350
|
+
} else if (section === "foot" && typeof column === "object") {
|
|
1351
|
+
return column.footer;
|
|
1352
|
+
}
|
|
1353
|
+
return null;
|
|
1354
|
+
}
|
|
1355
|
+
function createColumns(columns) {
|
|
1356
|
+
return columns.map(function(input, index) {
|
|
1357
|
+
var _a2;
|
|
1358
|
+
var key;
|
|
1359
|
+
if (typeof input === "object") {
|
|
1360
|
+
key = (_a2 = input.dataKey) !== null && _a2 !== void 0 ? _a2 : index;
|
|
1361
|
+
} else {
|
|
1362
|
+
key = index;
|
|
1363
|
+
}
|
|
1364
|
+
return new Column(key, input, index);
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1367
|
+
function cellStyles(sectionName, column, rowIndex, themeName, styles, scaleFactor, cellInputStyles) {
|
|
1368
|
+
var theme = getTheme(themeName);
|
|
1369
|
+
var sectionStyles;
|
|
1370
|
+
if (sectionName === "head") {
|
|
1371
|
+
sectionStyles = styles.headStyles;
|
|
1372
|
+
} else if (sectionName === "body") {
|
|
1373
|
+
sectionStyles = styles.bodyStyles;
|
|
1374
|
+
} else if (sectionName === "foot") {
|
|
1375
|
+
sectionStyles = styles.footStyles;
|
|
1376
|
+
}
|
|
1377
|
+
var otherStyles = assign({}, theme.table, theme[sectionName], styles.styles, sectionStyles);
|
|
1378
|
+
var columnStyles = styles.columnStyles[column.dataKey] || styles.columnStyles[column.index] || {};
|
|
1379
|
+
var colStyles = sectionName === "body" ? columnStyles : {};
|
|
1380
|
+
var rowStyles = sectionName === "body" && rowIndex % 2 === 0 ? assign({}, theme.alternateRow, styles.alternateRowStyles) : {};
|
|
1381
|
+
var defaultStyle = defaultStyles(scaleFactor);
|
|
1382
|
+
var themeStyles = assign({}, defaultStyle, otherStyles, rowStyles, colStyles);
|
|
1383
|
+
return assign(themeStyles, cellInputStyles);
|
|
1384
|
+
}
|
|
1385
|
+
function getColumnsCanFitInPage(doc, table, config) {
|
|
1386
|
+
var _a2;
|
|
1387
|
+
if (config === void 0) {
|
|
1388
|
+
config = {};
|
|
1389
|
+
}
|
|
1390
|
+
var remainingWidth = getPageAvailableWidth(doc, table);
|
|
1391
|
+
var repeatColumnsMap = /* @__PURE__ */ new Map();
|
|
1392
|
+
var colIndexes = [];
|
|
1393
|
+
var columns = [];
|
|
1394
|
+
var horizontalPageBreakRepeat = [];
|
|
1395
|
+
if (Array.isArray(table.settings.horizontalPageBreakRepeat)) {
|
|
1396
|
+
horizontalPageBreakRepeat = table.settings.horizontalPageBreakRepeat;
|
|
1397
|
+
} else if (typeof table.settings.horizontalPageBreakRepeat === "string" || typeof table.settings.horizontalPageBreakRepeat === "number") {
|
|
1398
|
+
horizontalPageBreakRepeat = [table.settings.horizontalPageBreakRepeat];
|
|
1399
|
+
}
|
|
1400
|
+
horizontalPageBreakRepeat.forEach(function(field) {
|
|
1401
|
+
var col = table.columns.find(function(item) {
|
|
1402
|
+
return item.dataKey === field || item.index === field;
|
|
1403
|
+
});
|
|
1404
|
+
if (col && !repeatColumnsMap.has(col.index)) {
|
|
1405
|
+
repeatColumnsMap.set(col.index, true);
|
|
1406
|
+
colIndexes.push(col.index);
|
|
1407
|
+
columns.push(table.columns[col.index]);
|
|
1408
|
+
remainingWidth -= col.wrappedWidth;
|
|
1409
|
+
}
|
|
1410
|
+
});
|
|
1411
|
+
var first = true;
|
|
1412
|
+
var i = (_a2 = config === null || config === void 0 ? void 0 : config.start) !== null && _a2 !== void 0 ? _a2 : 0;
|
|
1413
|
+
while (i < table.columns.length) {
|
|
1414
|
+
if (repeatColumnsMap.has(i)) {
|
|
1415
|
+
i++;
|
|
1416
|
+
continue;
|
|
1417
|
+
}
|
|
1418
|
+
var colWidth = table.columns[i].wrappedWidth;
|
|
1419
|
+
if (first || remainingWidth >= colWidth) {
|
|
1420
|
+
first = false;
|
|
1421
|
+
colIndexes.push(i);
|
|
1422
|
+
columns.push(table.columns[i]);
|
|
1423
|
+
remainingWidth -= colWidth;
|
|
1424
|
+
} else {
|
|
1425
|
+
break;
|
|
1426
|
+
}
|
|
1427
|
+
i++;
|
|
1428
|
+
}
|
|
1429
|
+
return { colIndexes, columns, lastIndex: i - 1 };
|
|
1430
|
+
}
|
|
1431
|
+
function calculateAllColumnsCanFitInPage(doc, table) {
|
|
1432
|
+
var allResults = [];
|
|
1433
|
+
for (var i = 0; i < table.columns.length; i++) {
|
|
1434
|
+
var result = getColumnsCanFitInPage(doc, table, { start: i });
|
|
1435
|
+
if (result.columns.length) {
|
|
1436
|
+
allResults.push(result);
|
|
1437
|
+
i = result.lastIndex;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
return allResults;
|
|
1441
|
+
}
|
|
1442
|
+
function drawTable(jsPDFDoc, table) {
|
|
1443
|
+
var settings = table.settings;
|
|
1444
|
+
var startY = settings.startY;
|
|
1445
|
+
var margin = settings.margin;
|
|
1446
|
+
var cursor = { x: margin.left, y: startY };
|
|
1447
|
+
var sectionsHeight = table.getHeadHeight(table.columns) + table.getFootHeight(table.columns);
|
|
1448
|
+
var minTableBottomPos = startY + margin.bottom + sectionsHeight;
|
|
1449
|
+
if (settings.pageBreak === "avoid") {
|
|
1450
|
+
var rows = table.body;
|
|
1451
|
+
var tableHeight = rows.reduce(function(acc, row) {
|
|
1452
|
+
return acc + row.height;
|
|
1453
|
+
}, 0);
|
|
1454
|
+
minTableBottomPos += tableHeight;
|
|
1455
|
+
}
|
|
1456
|
+
var doc = new DocHandler(jsPDFDoc);
|
|
1457
|
+
if (settings.pageBreak === "always" || settings.startY != null && minTableBottomPos > doc.pageSize().height) {
|
|
1458
|
+
nextPage(doc);
|
|
1459
|
+
cursor.y = margin.top;
|
|
1460
|
+
}
|
|
1461
|
+
table.callWillDrawPageHooks(doc, cursor);
|
|
1462
|
+
var startPos = assign({}, cursor);
|
|
1463
|
+
table.startPageNumber = doc.pageNumber();
|
|
1464
|
+
if (settings.horizontalPageBreak) {
|
|
1465
|
+
printTableWithHorizontalPageBreak(doc, table, startPos, cursor);
|
|
1466
|
+
} else {
|
|
1467
|
+
doc.applyStyles(doc.userStyles);
|
|
1468
|
+
if (settings.showHead === "firstPage" || settings.showHead === "everyPage") {
|
|
1469
|
+
table.head.forEach(function(row) {
|
|
1470
|
+
return printRow(doc, table, row, cursor, table.columns);
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
doc.applyStyles(doc.userStyles);
|
|
1474
|
+
table.body.forEach(function(row, index) {
|
|
1475
|
+
var isLastRow = index === table.body.length - 1;
|
|
1476
|
+
printFullRow(doc, table, row, isLastRow, startPos, cursor, table.columns);
|
|
1477
|
+
});
|
|
1478
|
+
doc.applyStyles(doc.userStyles);
|
|
1479
|
+
if (settings.showFoot === "lastPage" || settings.showFoot === "everyPage") {
|
|
1480
|
+
table.foot.forEach(function(row) {
|
|
1481
|
+
return printRow(doc, table, row, cursor, table.columns);
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
addTableBorder(doc, table, startPos, cursor);
|
|
1486
|
+
table.callEndPageHooks(doc, cursor);
|
|
1487
|
+
table.finalY = cursor.y;
|
|
1488
|
+
jsPDFDoc.lastAutoTable = table;
|
|
1489
|
+
doc.applyStyles(doc.userStyles);
|
|
1490
|
+
}
|
|
1491
|
+
function printTableWithHorizontalPageBreak(doc, table, startPos, cursor) {
|
|
1492
|
+
var allColumnsCanFitResult = calculateAllColumnsCanFitInPage(doc, table);
|
|
1493
|
+
var settings = table.settings;
|
|
1494
|
+
if (settings.horizontalPageBreakBehaviour === "afterAllRows") {
|
|
1495
|
+
allColumnsCanFitResult.forEach(function(colsAndIndexes, index) {
|
|
1496
|
+
doc.applyStyles(doc.userStyles);
|
|
1497
|
+
if (index > 0) {
|
|
1498
|
+
addPage(doc, table, startPos, cursor, colsAndIndexes.columns, true);
|
|
1499
|
+
} else {
|
|
1500
|
+
printHead(doc, table, cursor, colsAndIndexes.columns);
|
|
1501
|
+
}
|
|
1502
|
+
printBody(doc, table, startPos, cursor, colsAndIndexes.columns);
|
|
1503
|
+
printFoot(doc, table, cursor, colsAndIndexes.columns);
|
|
1504
|
+
});
|
|
1505
|
+
} else {
|
|
1506
|
+
var lastRowIndexOfLastPage_1 = -1;
|
|
1507
|
+
var firstColumnsToFitResult = allColumnsCanFitResult[0];
|
|
1508
|
+
var _loop_1 = function() {
|
|
1509
|
+
var lastPrintedRowIndex = lastRowIndexOfLastPage_1;
|
|
1510
|
+
if (firstColumnsToFitResult) {
|
|
1511
|
+
doc.applyStyles(doc.userStyles);
|
|
1512
|
+
var firstColumnsToFit = firstColumnsToFitResult.columns;
|
|
1513
|
+
if (lastRowIndexOfLastPage_1 >= 0) {
|
|
1514
|
+
addPage(doc, table, startPos, cursor, firstColumnsToFit, true);
|
|
1515
|
+
} else {
|
|
1516
|
+
printHead(doc, table, cursor, firstColumnsToFit);
|
|
1517
|
+
}
|
|
1518
|
+
lastPrintedRowIndex = printBodyWithoutPageBreaks(doc, table, lastRowIndexOfLastPage_1 + 1, cursor, firstColumnsToFit);
|
|
1519
|
+
printFoot(doc, table, cursor, firstColumnsToFit);
|
|
1520
|
+
}
|
|
1521
|
+
var maxNumberOfRows = lastPrintedRowIndex - lastRowIndexOfLastPage_1;
|
|
1522
|
+
allColumnsCanFitResult.slice(1).forEach(function(colsAndIndexes) {
|
|
1523
|
+
doc.applyStyles(doc.userStyles);
|
|
1524
|
+
addPage(doc, table, startPos, cursor, colsAndIndexes.columns, true);
|
|
1525
|
+
printBodyWithoutPageBreaks(doc, table, lastRowIndexOfLastPage_1 + 1, cursor, colsAndIndexes.columns, maxNumberOfRows);
|
|
1526
|
+
printFoot(doc, table, cursor, colsAndIndexes.columns);
|
|
1527
|
+
});
|
|
1528
|
+
lastRowIndexOfLastPage_1 = lastPrintedRowIndex;
|
|
1529
|
+
};
|
|
1530
|
+
while (lastRowIndexOfLastPage_1 < table.body.length - 1) {
|
|
1531
|
+
_loop_1();
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
function printHead(doc, table, cursor, columns) {
|
|
1536
|
+
var settings = table.settings;
|
|
1537
|
+
doc.applyStyles(doc.userStyles);
|
|
1538
|
+
if (settings.showHead === "firstPage" || settings.showHead === "everyPage") {
|
|
1539
|
+
table.head.forEach(function(row) {
|
|
1540
|
+
return printRow(doc, table, row, cursor, columns);
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
function printBody(doc, table, startPos, cursor, columns) {
|
|
1545
|
+
doc.applyStyles(doc.userStyles);
|
|
1546
|
+
table.body.forEach(function(row, index) {
|
|
1547
|
+
var isLastRow = index === table.body.length - 1;
|
|
1548
|
+
printFullRow(doc, table, row, isLastRow, startPos, cursor, columns);
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
function printBodyWithoutPageBreaks(doc, table, startRowIndex, cursor, columns, maxNumberOfRows) {
|
|
1552
|
+
doc.applyStyles(doc.userStyles);
|
|
1553
|
+
maxNumberOfRows = maxNumberOfRows !== null && maxNumberOfRows !== void 0 ? maxNumberOfRows : table.body.length;
|
|
1554
|
+
var endRowIndex = Math.min(startRowIndex + maxNumberOfRows, table.body.length);
|
|
1555
|
+
var lastPrintedRowIndex = -1;
|
|
1556
|
+
table.body.slice(startRowIndex, endRowIndex).forEach(function(row, index) {
|
|
1557
|
+
var isLastRow = startRowIndex + index === table.body.length - 1;
|
|
1558
|
+
var remainingSpace = getRemainingPageSpace(doc, table, isLastRow, cursor);
|
|
1559
|
+
if (row.canEntireRowFit(remainingSpace, columns)) {
|
|
1560
|
+
printRow(doc, table, row, cursor, columns);
|
|
1561
|
+
lastPrintedRowIndex = startRowIndex + index;
|
|
1562
|
+
}
|
|
1563
|
+
});
|
|
1564
|
+
return lastPrintedRowIndex;
|
|
1565
|
+
}
|
|
1566
|
+
function printFoot(doc, table, cursor, columns) {
|
|
1567
|
+
var settings = table.settings;
|
|
1568
|
+
doc.applyStyles(doc.userStyles);
|
|
1569
|
+
if (settings.showFoot === "lastPage" || settings.showFoot === "everyPage") {
|
|
1570
|
+
table.foot.forEach(function(row) {
|
|
1571
|
+
return printRow(doc, table, row, cursor, columns);
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
function getRemainingLineCount(cell, remainingPageSpace, doc) {
|
|
1576
|
+
var lineHeight = doc.getLineHeight(cell.styles.fontSize);
|
|
1577
|
+
var vPadding = cell.padding("vertical");
|
|
1578
|
+
var remainingLines = Math.floor((remainingPageSpace - vPadding) / lineHeight);
|
|
1579
|
+
return Math.max(0, remainingLines);
|
|
1580
|
+
}
|
|
1581
|
+
function modifyRowToFit(row, remainingPageSpace, table, doc) {
|
|
1582
|
+
var cells = {};
|
|
1583
|
+
row.spansMultiplePages = true;
|
|
1584
|
+
row.height = 0;
|
|
1585
|
+
var rowHeight = 0;
|
|
1586
|
+
for (var _i = 0, _a2 = table.columns; _i < _a2.length; _i++) {
|
|
1587
|
+
var column = _a2[_i];
|
|
1588
|
+
var cell = row.cells[column.index];
|
|
1589
|
+
if (!cell)
|
|
1590
|
+
continue;
|
|
1591
|
+
if (!Array.isArray(cell.text)) {
|
|
1592
|
+
cell.text = [cell.text];
|
|
1593
|
+
}
|
|
1594
|
+
var remainderCell = new Cell(cell.raw, cell.styles, cell.section);
|
|
1595
|
+
remainderCell = assign(remainderCell, cell);
|
|
1596
|
+
remainderCell.text = [];
|
|
1597
|
+
var remainingLineCount = getRemainingLineCount(cell, remainingPageSpace, doc);
|
|
1598
|
+
if (cell.text.length > remainingLineCount) {
|
|
1599
|
+
remainderCell.text = cell.text.splice(remainingLineCount, cell.text.length);
|
|
1600
|
+
}
|
|
1601
|
+
var scaleFactor = doc.scaleFactor();
|
|
1602
|
+
var lineHeightFactor = doc.getLineHeightFactor();
|
|
1603
|
+
cell.contentHeight = cell.getContentHeight(scaleFactor, lineHeightFactor);
|
|
1604
|
+
if (cell.contentHeight >= remainingPageSpace) {
|
|
1605
|
+
cell.contentHeight = remainingPageSpace;
|
|
1606
|
+
remainderCell.styles.minCellHeight -= remainingPageSpace;
|
|
1607
|
+
}
|
|
1608
|
+
if (cell.contentHeight > row.height) {
|
|
1609
|
+
row.height = cell.contentHeight;
|
|
1610
|
+
}
|
|
1611
|
+
remainderCell.contentHeight = remainderCell.getContentHeight(scaleFactor, lineHeightFactor);
|
|
1612
|
+
if (remainderCell.contentHeight > rowHeight) {
|
|
1613
|
+
rowHeight = remainderCell.contentHeight;
|
|
1614
|
+
}
|
|
1615
|
+
cells[column.index] = remainderCell;
|
|
1616
|
+
}
|
|
1617
|
+
var remainderRow = new Row(row.raw, -1, row.section, cells, true);
|
|
1618
|
+
remainderRow.height = rowHeight;
|
|
1619
|
+
for (var _b = 0, _c = table.columns; _b < _c.length; _b++) {
|
|
1620
|
+
var column = _c[_b];
|
|
1621
|
+
var remainderCell = remainderRow.cells[column.index];
|
|
1622
|
+
if (remainderCell) {
|
|
1623
|
+
remainderCell.height = remainderRow.height;
|
|
1624
|
+
}
|
|
1625
|
+
var cell = row.cells[column.index];
|
|
1626
|
+
if (cell) {
|
|
1627
|
+
cell.height = row.height;
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
return remainderRow;
|
|
1631
|
+
}
|
|
1632
|
+
function shouldPrintOnCurrentPage(doc, row, remainingPageSpace, table) {
|
|
1633
|
+
var pageHeight = doc.pageSize().height;
|
|
1634
|
+
var margin = table.settings.margin;
|
|
1635
|
+
var marginHeight = margin.top + margin.bottom;
|
|
1636
|
+
var maxRowHeight = pageHeight - marginHeight;
|
|
1637
|
+
if (row.section === "body") {
|
|
1638
|
+
maxRowHeight -= table.getHeadHeight(table.columns) + table.getFootHeight(table.columns);
|
|
1639
|
+
}
|
|
1640
|
+
var minRowHeight = row.getMinimumRowHeight(table.columns, doc);
|
|
1641
|
+
var minRowFits = minRowHeight < remainingPageSpace;
|
|
1642
|
+
if (minRowHeight > maxRowHeight) {
|
|
1643
|
+
console.log("Will not be able to print row ".concat(row.index, " correctly since it's minimum height is larger than page height"));
|
|
1644
|
+
return true;
|
|
1645
|
+
}
|
|
1646
|
+
if (!minRowFits) {
|
|
1647
|
+
return false;
|
|
1648
|
+
}
|
|
1649
|
+
var rowHasRowSpanCell = row.hasRowSpan(table.columns);
|
|
1650
|
+
var rowHigherThanPage = row.getMaxCellHeight(table.columns) > maxRowHeight;
|
|
1651
|
+
if (rowHigherThanPage) {
|
|
1652
|
+
if (rowHasRowSpanCell) {
|
|
1653
|
+
console.log("The content of row ".concat(row.index, " will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported."));
|
|
1654
|
+
}
|
|
1655
|
+
return true;
|
|
1656
|
+
}
|
|
1657
|
+
if (rowHasRowSpanCell) {
|
|
1658
|
+
return false;
|
|
1659
|
+
}
|
|
1660
|
+
if (table.settings.rowPageBreak === "avoid") {
|
|
1661
|
+
return false;
|
|
1662
|
+
}
|
|
1663
|
+
return true;
|
|
1664
|
+
}
|
|
1665
|
+
function printFullRow(doc, table, row, isLastRow, startPos, cursor, columns) {
|
|
1666
|
+
var remainingSpace = getRemainingPageSpace(doc, table, isLastRow, cursor);
|
|
1667
|
+
if (row.canEntireRowFit(remainingSpace, columns)) {
|
|
1668
|
+
printRow(doc, table, row, cursor, columns);
|
|
1669
|
+
} else if (shouldPrintOnCurrentPage(doc, row, remainingSpace, table)) {
|
|
1670
|
+
var remainderRow = modifyRowToFit(row, remainingSpace, table, doc);
|
|
1671
|
+
printRow(doc, table, row, cursor, columns);
|
|
1672
|
+
addPage(doc, table, startPos, cursor, columns);
|
|
1673
|
+
printFullRow(doc, table, remainderRow, isLastRow, startPos, cursor, columns);
|
|
1674
|
+
} else {
|
|
1675
|
+
addPage(doc, table, startPos, cursor, columns);
|
|
1676
|
+
printFullRow(doc, table, row, isLastRow, startPos, cursor, columns);
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
function printRow(doc, table, row, cursor, columns) {
|
|
1680
|
+
cursor.x = table.settings.margin.left;
|
|
1681
|
+
for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
|
|
1682
|
+
var column = columns_1[_i];
|
|
1683
|
+
var cell = row.cells[column.index];
|
|
1684
|
+
if (!cell) {
|
|
1685
|
+
cursor.x += column.width;
|
|
1686
|
+
continue;
|
|
1687
|
+
}
|
|
1688
|
+
doc.applyStyles(cell.styles);
|
|
1689
|
+
cell.x = cursor.x;
|
|
1690
|
+
cell.y = cursor.y;
|
|
1691
|
+
var result = table.callCellHooks(doc, table.hooks.willDrawCell, cell, row, column, cursor);
|
|
1692
|
+
if (result === false) {
|
|
1693
|
+
cursor.x += column.width;
|
|
1694
|
+
continue;
|
|
1695
|
+
}
|
|
1696
|
+
drawCellRect(doc, cell, cursor);
|
|
1697
|
+
var textPos = cell.getTextPos();
|
|
1698
|
+
autoTableText(cell.text, textPos.x, textPos.y, {
|
|
1699
|
+
halign: cell.styles.halign,
|
|
1700
|
+
valign: cell.styles.valign,
|
|
1701
|
+
maxWidth: Math.ceil(cell.width - cell.padding("left") - cell.padding("right"))
|
|
1702
|
+
}, doc.getDocument());
|
|
1703
|
+
table.callCellHooks(doc, table.hooks.didDrawCell, cell, row, column, cursor);
|
|
1704
|
+
cursor.x += column.width;
|
|
1705
|
+
}
|
|
1706
|
+
cursor.y += row.height;
|
|
1707
|
+
}
|
|
1708
|
+
function drawCellRect(doc, cell, cursor) {
|
|
1709
|
+
var cellStyles2 = cell.styles;
|
|
1710
|
+
doc.getDocument().setFillColor(doc.getDocument().getFillColor());
|
|
1711
|
+
if (typeof cellStyles2.lineWidth === "number") {
|
|
1712
|
+
var fillStyle = getFillStyle(cellStyles2.lineWidth, cellStyles2.fillColor);
|
|
1713
|
+
if (fillStyle) {
|
|
1714
|
+
doc.rect(cell.x, cursor.y, cell.width, cell.height, fillStyle);
|
|
1715
|
+
}
|
|
1716
|
+
} else if (typeof cellStyles2.lineWidth === "object") {
|
|
1717
|
+
if (cellStyles2.fillColor) {
|
|
1718
|
+
doc.rect(cell.x, cursor.y, cell.width, cell.height, "F");
|
|
1719
|
+
}
|
|
1720
|
+
drawCellBorders(doc, cell, cursor, cellStyles2.lineWidth);
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
function drawCellBorders(doc, cell, cursor, lineWidth) {
|
|
1724
|
+
var x1, y1, x2, y2;
|
|
1725
|
+
if (lineWidth.top) {
|
|
1726
|
+
x1 = cursor.x;
|
|
1727
|
+
y1 = cursor.y;
|
|
1728
|
+
x2 = cursor.x + cell.width;
|
|
1729
|
+
y2 = cursor.y;
|
|
1730
|
+
if (lineWidth.right) {
|
|
1731
|
+
x2 += 0.5 * lineWidth.right;
|
|
1732
|
+
}
|
|
1733
|
+
if (lineWidth.left) {
|
|
1734
|
+
x1 -= 0.5 * lineWidth.left;
|
|
1735
|
+
}
|
|
1736
|
+
drawLine(lineWidth.top, x1, y1, x2, y2);
|
|
1737
|
+
}
|
|
1738
|
+
if (lineWidth.bottom) {
|
|
1739
|
+
x1 = cursor.x;
|
|
1740
|
+
y1 = cursor.y + cell.height;
|
|
1741
|
+
x2 = cursor.x + cell.width;
|
|
1742
|
+
y2 = cursor.y + cell.height;
|
|
1743
|
+
if (lineWidth.right) {
|
|
1744
|
+
x2 += 0.5 * lineWidth.right;
|
|
1745
|
+
}
|
|
1746
|
+
if (lineWidth.left) {
|
|
1747
|
+
x1 -= 0.5 * lineWidth.left;
|
|
1748
|
+
}
|
|
1749
|
+
drawLine(lineWidth.bottom, x1, y1, x2, y2);
|
|
1750
|
+
}
|
|
1751
|
+
if (lineWidth.left) {
|
|
1752
|
+
x1 = cursor.x;
|
|
1753
|
+
y1 = cursor.y;
|
|
1754
|
+
x2 = cursor.x;
|
|
1755
|
+
y2 = cursor.y + cell.height;
|
|
1756
|
+
if (lineWidth.top) {
|
|
1757
|
+
y1 -= 0.5 * lineWidth.top;
|
|
1758
|
+
}
|
|
1759
|
+
if (lineWidth.bottom) {
|
|
1760
|
+
y2 += 0.5 * lineWidth.bottom;
|
|
1761
|
+
}
|
|
1762
|
+
drawLine(lineWidth.left, x1, y1, x2, y2);
|
|
1763
|
+
}
|
|
1764
|
+
if (lineWidth.right) {
|
|
1765
|
+
x1 = cursor.x + cell.width;
|
|
1766
|
+
y1 = cursor.y;
|
|
1767
|
+
x2 = cursor.x + cell.width;
|
|
1768
|
+
y2 = cursor.y + cell.height;
|
|
1769
|
+
if (lineWidth.top) {
|
|
1770
|
+
y1 -= 0.5 * lineWidth.top;
|
|
1771
|
+
}
|
|
1772
|
+
if (lineWidth.bottom) {
|
|
1773
|
+
y2 += 0.5 * lineWidth.bottom;
|
|
1774
|
+
}
|
|
1775
|
+
drawLine(lineWidth.right, x1, y1, x2, y2);
|
|
1776
|
+
}
|
|
1777
|
+
function drawLine(width, x12, y12, x22, y22) {
|
|
1778
|
+
doc.getDocument().setLineWidth(width);
|
|
1779
|
+
doc.getDocument().line(x12, y12, x22, y22, "S");
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
function getRemainingPageSpace(doc, table, isLastRow, cursor) {
|
|
1783
|
+
var bottomContentHeight = table.settings.margin.bottom;
|
|
1784
|
+
var showFoot = table.settings.showFoot;
|
|
1785
|
+
if (showFoot === "everyPage" || showFoot === "lastPage" && isLastRow) {
|
|
1786
|
+
bottomContentHeight += table.getFootHeight(table.columns);
|
|
1787
|
+
}
|
|
1788
|
+
return doc.pageSize().height - cursor.y - bottomContentHeight;
|
|
1789
|
+
}
|
|
1790
|
+
function addPage(doc, table, startPos, cursor, columns, suppressFooter) {
|
|
1791
|
+
if (columns === void 0) {
|
|
1792
|
+
columns = [];
|
|
1793
|
+
}
|
|
1794
|
+
if (suppressFooter === void 0) {
|
|
1795
|
+
suppressFooter = false;
|
|
1796
|
+
}
|
|
1797
|
+
doc.applyStyles(doc.userStyles);
|
|
1798
|
+
if (table.settings.showFoot === "everyPage" && !suppressFooter) {
|
|
1799
|
+
table.foot.forEach(function(row) {
|
|
1800
|
+
return printRow(doc, table, row, cursor, columns);
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
table.callEndPageHooks(doc, cursor);
|
|
1804
|
+
var margin = table.settings.margin;
|
|
1805
|
+
addTableBorder(doc, table, startPos, cursor);
|
|
1806
|
+
nextPage(doc);
|
|
1807
|
+
table.pageNumber++;
|
|
1808
|
+
cursor.x = margin.left;
|
|
1809
|
+
cursor.y = margin.top;
|
|
1810
|
+
startPos.y = margin.top;
|
|
1811
|
+
table.callWillDrawPageHooks(doc, cursor);
|
|
1812
|
+
if (table.settings.showHead === "everyPage") {
|
|
1813
|
+
table.head.forEach(function(row) {
|
|
1814
|
+
return printRow(doc, table, row, cursor, columns);
|
|
1815
|
+
});
|
|
1816
|
+
doc.applyStyles(doc.userStyles);
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
function nextPage(doc) {
|
|
1820
|
+
var current = doc.pageNumber();
|
|
1821
|
+
doc.setPage(current + 1);
|
|
1822
|
+
var newCurrent = doc.pageNumber();
|
|
1823
|
+
if (newCurrent === current) {
|
|
1824
|
+
doc.addPage();
|
|
1825
|
+
return true;
|
|
1826
|
+
}
|
|
1827
|
+
return false;
|
|
1828
|
+
}
|
|
1829
|
+
function applyPlugin(jsPDF) {
|
|
1830
|
+
jsPDF.API.autoTable = function() {
|
|
1831
|
+
var args = [];
|
|
1832
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1833
|
+
args[_i] = arguments[_i];
|
|
1834
|
+
}
|
|
1835
|
+
var options = args[0];
|
|
1836
|
+
var input = parseInput(this, options);
|
|
1837
|
+
var table = createTable(this, input);
|
|
1838
|
+
drawTable(this, table);
|
|
1839
|
+
return this;
|
|
1840
|
+
};
|
|
1841
|
+
jsPDF.API.lastAutoTable = false;
|
|
1842
|
+
jsPDF.API.autoTableText = function(text, x, y, styles) {
|
|
1843
|
+
autoTableText(text, x, y, styles, this);
|
|
1844
|
+
};
|
|
1845
|
+
jsPDF.API.autoTableSetDefaults = function(defaults) {
|
|
1846
|
+
DocHandler.setDefaults(defaults, this);
|
|
1847
|
+
return this;
|
|
1848
|
+
};
|
|
1849
|
+
jsPDF.autoTableSetDefaults = function(defaults, doc) {
|
|
1850
|
+
DocHandler.setDefaults(defaults, doc);
|
|
1851
|
+
};
|
|
1852
|
+
jsPDF.API.autoTableHtmlToJson = function(tableElem, includeHiddenElements) {
|
|
1853
|
+
var _a2;
|
|
1854
|
+
if (includeHiddenElements === void 0) {
|
|
1855
|
+
includeHiddenElements = false;
|
|
1856
|
+
}
|
|
1857
|
+
if (typeof window === "undefined") {
|
|
1858
|
+
console.error("Cannot run autoTableHtmlToJson in non browser environment");
|
|
1859
|
+
return null;
|
|
1860
|
+
}
|
|
1861
|
+
var doc = new DocHandler(this);
|
|
1862
|
+
var _b = parseHtml(doc, tableElem, window, includeHiddenElements, false), head = _b.head, body = _b.body;
|
|
1863
|
+
var columns = ((_a2 = head[0]) === null || _a2 === void 0 ? void 0 : _a2.map(function(c) {
|
|
1864
|
+
return c.content;
|
|
1865
|
+
})) || [];
|
|
1866
|
+
return { columns, rows: body, data: body };
|
|
1867
|
+
};
|
|
1868
|
+
}
|
|
1869
|
+
var _a;
|
|
1870
|
+
function autoTable(d, options) {
|
|
1871
|
+
var input = parseInput(d, options);
|
|
1872
|
+
var table = createTable(d, input);
|
|
1873
|
+
drawTable(d, table);
|
|
1874
|
+
}
|
|
1875
|
+
function __createTable(d, options) {
|
|
1876
|
+
var input = parseInput(d, options);
|
|
1877
|
+
return createTable(d, input);
|
|
1878
|
+
}
|
|
1879
|
+
function __drawTable(d, table) {
|
|
1880
|
+
drawTable(d, table);
|
|
1881
|
+
}
|
|
1882
|
+
try {
|
|
1883
|
+
if (typeof window !== "undefined" && window) {
|
|
1884
|
+
anyWindow = window;
|
|
1885
|
+
jsPDF = anyWindow.jsPDF || ((_a = anyWindow.jspdf) === null || _a === void 0 ? void 0 : _a.jsPDF);
|
|
1886
|
+
if (jsPDF) {
|
|
1887
|
+
applyPlugin(jsPDF);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
} catch (error) {
|
|
1891
|
+
console.error("Could not apply autoTable plugin", error);
|
|
1892
|
+
}
|
|
1893
|
+
var anyWindow;
|
|
1894
|
+
var jsPDF;
|
|
1895
|
+
export {
|
|
1896
|
+
Cell,
|
|
1897
|
+
CellHookData,
|
|
1898
|
+
Column,
|
|
1899
|
+
HookData,
|
|
1900
|
+
Row,
|
|
1901
|
+
Table,
|
|
1902
|
+
__createTable,
|
|
1903
|
+
__drawTable,
|
|
1904
|
+
applyPlugin,
|
|
1905
|
+
autoTable,
|
|
1906
|
+
autoTable as default
|
|
1907
|
+
};
|
|
1908
|
+
//# sourceMappingURL=jspdf.plugin.autotable-AAE7PZKA.js.map
|