@memberjunction/ng-react 6.2.0 → 6.3.0-edge.0
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/README.md +12 -0
- package/dist/__tests__/component-pdf-export.test.d.ts +1 -0
- package/dist/__tests__/component-pdf-export.test.js +265 -0
- package/dist/__tests__/component-pdf-export.test.js.map +1 -0
- package/dist/__tests__/image-pdf-writer.test.d.ts +1 -0
- package/dist/__tests__/image-pdf-writer.test.js +45 -0
- package/dist/__tests__/image-pdf-writer.test.js.map +1 -0
- package/dist/lib/components/mj-react-component.component.d.ts +10 -0
- package/dist/lib/components/mj-react-component.component.js +14 -1
- package/dist/lib/components/mj-react-component.component.js.map +1 -1
- package/dist/lib/export/component-pdf-export.d.ts +115 -0
- package/dist/lib/export/component-pdf-export.js +686 -0
- package/dist/lib/export/component-pdf-export.js.map +1 -0
- package/dist/lib/export/image-pdf-writer.d.ts +25 -0
- package/dist/lib/export/image-pdf-writer.js +82 -0
- package/dist/lib/export/image-pdf-writer.js.map +1 -0
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +11 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-pdf-export.js","sourceRoot":"","sources":["../../../src/lib/export/component-pdf-export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAgB,MAAM,oBAAoB,CAAC;AAEjE,+GAA+G;AAC/G,MAAM,sBAAsB,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AAEhK,0GAA0G;AAC1G,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,oGAAoG;AACpG,MAAM,yBAAyB,GAAG,CAAC,CAAC;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iB,EAAE,CAAC,CAAC,CAAC;IAChF,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,CAAC,KAAK,EAAE,CAAC;IACf,MAAM,CAAC,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAiB,EAAE,KAAqB,EAAE,cAA8B,UAAU;IACzH,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC7D,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;AACtE,CAAC","sourcesContent":["/**\n * @fileoverview Whole-component PDF export for rendered React components.\n *\n * The host captures the component's root element as it is currently shown (filters, selections and\n * grid pages kept) and lays it onto A4 pages. Content the user would have to scroll to see is\n * included. The root is laid out at the page's printable width (portrait or landscape), so the PDF\n * is the same whatever the viewer's size, then a \"print mode\" grows it to its content's height and expands\n * only the elements that actually clip their content, because a blanket height:auto stylesheet breaks\n * charts that size themselves to their container. The host page around the root is never changed.\n * Everything is restored afterwards.\n *\n * Content rendered in portals (antd modals, drawers, dropdowns) lives outside the root and is not\n * part of the PDF.\n * @module @memberjunction/ng-react\n */\n\nimport { BuildImagePdf, PdfImagePage } from './image-pdf-writer';\n\n/** Inline style properties print mode sets; each touched element gets its original style text back on exit. */\nconst PRINT_STYLE_PROPERTIES = ['position', 'top', 'left', 'width', 'height', 'max-height', 'overflow', 'overflow-x', 'overflow-y', 'contain', 'flex'] as const;\n\n/** Upper bound on expand passes: each pass can make a new ancestor spill, so it runs to a fixed point. */\nconst MAX_EXPAND_PASSES = 12;\n\n/** Chart.js re-renders at this pixel ratio for the capture, so canvases stay sharp next to text. */\nconst CAPTURE_CHART_PIXEL_RATIO = 3;\n\n/** html-to-image renders the element at this pixel ratio. */\nconst CAPTURE_PIXEL_RATIO = 2;\n\n/** Elements that never need expanding: their size is their drawing, not a scroll box. */\nconst NON_EXPANDING_TAGS = new Set(['CANVAS', 'svg', 'IMG', 'VIDEO', 'IFRAME']);\n\n/**\n * Elements a page break never splits when they fit on a page: drawings, rows, form fields and text\n * blocks. Elements with no child elements count too, and so does any container shorter than\n * {@link SMALL_BLOCK_PAGE_SHARE} of a page (a KPI tile, a bar row).\n */\nconst ATOMIC_TAGS = new Set(['svg', 'CANVAS', 'IMG', 'VIDEO', 'TR', 'INPUT', 'BUTTON', 'SELECT', 'TEXTAREA', 'LI', 'P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LABEL', 'PRE']);\nconst SMALL_BLOCK_PAGE_SHARE = 0.15;\n\n/** A container cut with less than this share of a page above the cut moves whole (keeps a card's header with it). */\nconst ORPHAN_PAGE_SHARE = 0.15;\n\n/** A container that fits a page moves whole when less than this share of a page would carry over past the cut. */\nconst WIDOW_PAGE_SHARE = 0.15;\n\n/** A break within this share of a page below a table header row or heading moves above it (keep with next). */\nconst KEEP_WITH_NEXT_PAGE_SHARE = 0.1;\n\n/** A table's lead-in (section title, search box, header row) through its first row stays together within this share of a page. */\nconst TABLE_LEAD_PAGE_SHARE = 0.35;\n\n/** Tags whose element must stay on the same page as what follows it. */\nconst KEEP_WITH_NEXT_TAGS = new Set(['THEAD', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6']);\n\n/** A break that would leave a page less full than this is not moved; the page is cut where it falls. */\nconst MIN_PAGE_FILL_SHARE = 0.1;\n\n/**\n * Shrink-to-fit: when keeping a chart or block together leaves a page less than {@link SHRINK_WHEN_FILL_BELOW}\n * full, the page may hold up to this much more content, scaled down to fit the paper.\n */\nconst MAX_SHRINK_EXTRA_SHARE = 0.2;\nconst SHRINK_WHEN_FILL_BELOW = 0.8;\n\n/** Content wider than the page layout is laid out at its own width, up to this many page widths. */\nconst MAX_LAYOUT_WIDTH_FACTOR = 2;\n\n/** Widening rounds: each adds the overflow that remains once the card padding is accounted for. */\nconst MAX_WIDEN_ROUNDS = 4;\n\n/** Marks controls (such as ExportableData's export buttons) that are left out of captures. */\nconst EXPORT_CONTROL_ATTRIBUTE = 'data-export-control';\n\n/** A4 in millimetres, and the page margin. */\nconst A4_SHORT_MM = 210;\nconst A4_LONG_MM = 297;\nconst PAGE_MARGIN_MM = 10;\n\n/** CSS pixels per millimetre (96 per inch): laying out at the page width prints CSS sizes at true size. */\nconst CSS_PX_PER_MM = 96 / 25.4;\n\n/** The page orientations a PDF export offers. */\nexport type PdfOrientation = 'portrait' | 'landscape';\n\n/** One horizontal band of the captured image, placed on its own page. */\nexport interface PdfPageSlice {\n /** First source row of the band, in captured-image pixels. */\n SourceY: number;\n /** Height of the band, in captured-image pixels. */\n SourceHeight: number;\n /** Height the band is drawn at on the page, in millimetres. */\n DrawHeightMM: number;\n /** Width the band is drawn at, in millimetres: the printable width, or less when the page is shrunk to fit. */\n DrawWidthMM: number;\n /** Left edge of the band on the page, in millimetres (a shrunk page is centred). */\n XMM: number;\n}\n\n/** The vertical extent of one element of the capture, in captured-image pixels from its top. */\nexport interface CaptureBlock {\n Top: number;\n Bottom: number;\n /** True for a drawing, row, field or text block that a page break must not split. */\n Atomic: boolean;\n /** True for a table header row or heading, which must stay on the page of what follows it. */\n KeepWithNext?: boolean;\n}\n\n/** How the captured image is laid out: page orientation, drawn width and one slice per page. */\nexport interface PdfPagePlan {\n Orientation: PdfOrientation;\n PageWidthMM: number;\n PageHeightMM: number;\n DrawWidthMM: number;\n Slices: PdfPageSlice[];\n}\n\n/** The subset of a Chart.js instance the capture touches. */\ninterface ChartInstanceLike {\n options: { devicePixelRatio?: number; animation?: boolean | object };\n resize(): void;\n update(mode?: string): void;\n}\n\n/** The Chart.js global, when the page has loaded it from the CDN. */\ninterface ChartGlobalLike {\n instances?: Record<string, ChartInstanceLike>;\n}\n\ntype WindowWithChart = Window & { Chart?: ChartGlobalLike };\n\nfunction pageSize(orientation: PdfOrientation): { WidthMM: number; HeightMM: number } {\n return orientation === 'portrait'\n ? { WidthMM: A4_SHORT_MM, HeightMM: A4_LONG_MM }\n : { WidthMM: A4_LONG_MM, HeightMM: A4_SHORT_MM };\n}\n\n/**\n * The width, in CSS pixels, the component is laid out at for a page: the printable width at 96 dpi\n * (718 portrait, 1047 landscape), so 14px text prints at about 10.5pt whatever the viewer's size.\n */\nexport function PageLayoutWidth(orientation: PdfOrientation): number {\n return Math.round((pageSize(orientation).WidthMM - 2 * PAGE_MARGIN_MM) * CSS_PX_PER_MM);\n}\n\n/**\n * Where a break inside `block` should go instead: its top, or `cut` when the block may be split\n * there. Atomic blocks are never split (when they fit a page); with `layoutRules` on, small\n * containers are kept together and containers are not left with only their first or last lines.\n */\nfunction breakFor(block: CaptureBlock, cut: number, pageHeight: number, layoutRules: boolean): number {\n const height = block.Bottom - block.Top;\n if (height > pageHeight) {\n return cut; // too tall for any page: it has to split\n }\n if (block.Atomic) {\n return block.Top;\n }\n const small = height < pageHeight * SMALL_BLOCK_PAGE_SHARE;\n const orphanedStart = cut - block.Top < pageHeight * ORPHAN_PAGE_SHARE;\n const widowedEnd = block.Bottom - cut < pageHeight * WIDOW_PAGE_SHARE;\n return layoutRules && (small || orphanedStart || widowedEnd) ? block.Top : cut;\n}\n\n/** A header row or heading the cut falls just below: it moves to the next page with what follows it. */\nfunction keptWithNext(block: CaptureBlock, cut: number, pageHeight: number): boolean {\n return !!block.KeepWithNext && block.Bottom <= cut && cut - block.Bottom < pageHeight * KEEP_WITH_NEXT_PAGE_SHARE;\n}\n\n/** The cut moved up until no block (and, with `layoutRules`, no header-row or heading rule) objects to it. */\nfunction settleCut(limit: number, blocks: CaptureBlock[], pageHeight: number, layoutRules: boolean): number {\n let cut = limit;\n for (let moved = true; moved;) {\n moved = false;\n for (const block of blocks) {\n if (layoutRules && keptWithNext(block, cut, pageHeight) && block.Top < cut) {\n cut = block.Top;\n moved = true;\n } else if (block.Top < cut && cut < block.Bottom) {\n const next = breakFor(block, cut, pageHeight, layoutRules);\n if (next < cut) {\n cut = next;\n moved = true;\n }\n }\n }\n }\n return cut;\n}\n\n/**\n * The page break at or above `limit` for a page starting at `pageTop`. First with every rule (no\n * split rows or drawings, no stranded first or last lines, header rows and headings kept with what\n * follows); when that would leave the page nearly empty, with only the never-split rule; and when\n * even that would, the page is cut at `limit`.\n */\nfunction pageBreak(pageTop: number, limit: number, blocks: CaptureBlock[], pageHeight: number): number {\n const minimumEnd = pageTop + pageHeight * MIN_PAGE_FILL_SHARE;\n for (const layoutRules of [true, false]) {\n const cut = settleCut(limit, blocks, pageHeight, layoutRules);\n if (cut >= minimumEnd) {\n // Whole pixels: element positions are fractional, and a page image must be a whole number of rows.\n return Math.floor(cut);\n }\n }\n return limit;\n}\n\n/**\n * Lays a captured image of `imageWidth` by `imageHeight` pixels onto A4 pages in the given\n * orientation: scaled to the page width inside the margins and cut into page-height bands. Each\n * cut moves up so it does not split a drawing, row or other small element in `blocks`, and does not\n * strand a card's first or last lines; a page left mostly empty by that may be shrunk to fit.\n */\nexport function PlanPdfPages(imageWidth: number, imageHeight: number, orientation: PdfOrientation = 'portrait', blocks: CaptureBlock[] = []): PdfPagePlan {\n const page = pageSize(orientation);\n const drawWidthMM = page.WidthMM - 2 * PAGE_MARGIN_MM;\n const mmPerPixel = drawWidthMM / Math.max(imageWidth, 1);\n const pageHeightPx = Math.max(1, Math.floor((page.HeightMM - 2 * PAGE_MARGIN_MM) / mmPerPixel));\n const slices: PdfPageSlice[] = [];\n for (let sourceY = 0; sourceY < imageHeight;) {\n const end = pageEnd(sourceY, imageHeight, blocks, pageHeightPx);\n slices.push(placeSlice(sourceY, end - sourceY, pageHeightPx, mmPerPixel, drawWidthMM));\n sourceY = end;\n }\n return { Orientation: orientation, PageWidthMM: page.WidthMM, PageHeightMM: page.HeightMM, DrawWidthMM: drawWidthMM, Slices: slices };\n}\n\n/**\n * Where the page starting at `pageTop` ends. When keeping a block together leaves the page less than\n * {@link SHRINK_WHEN_FILL_BELOW} full, a page up to {@link MAX_SHRINK_EXTRA_SHARE} taller is tried, and\n * kept when it holds meaningfully more: that page is then shrunk to fit (shrink-to-fit). A sliver\n * that would be alone on the last page is folded into this page the same way.\n */\nfunction pageEnd(pageTop: number, imageHeight: number, blocks: CaptureBlock[], pageHeightPx: number): number {\n const limit = pageTop + pageHeightPx;\n if (limit >= imageHeight) {\n return imageHeight;\n }\n const normal = pageBreak(pageTop, limit, blocks, pageHeightPx);\n const tallerHeight = Math.floor(pageHeightPx * (1 + MAX_SHRINK_EXTRA_SHARE));\n // A last page holding only a sliver (a row or two) is folded into this one when a shrunk page reaches the end.\n if (imageHeight - normal < pageHeightPx * WIDOW_PAGE_SHARE && imageHeight - pageTop <= tallerHeight) {\n return imageHeight;\n }\n if (normal - pageTop >= pageHeightPx * SHRINK_WHEN_FILL_BELOW) {\n return normal;\n }\n const tallerLimit = pageTop + tallerHeight;\n const taller = tallerLimit >= imageHeight ? imageHeight : pageBreak(pageTop, tallerLimit, blocks, tallerHeight);\n return taller - normal > pageHeightPx * SHRINK_WHEN_FILL_BELOW * MAX_SHRINK_EXTRA_SHARE ? taller : normal;\n}\n\n/** A slice drawn at the page width, or scaled down and centred when it is taller than a page. */\nfunction placeSlice(sourceY: number, sourceHeight: number, pageHeightPx: number, mmPerPixel: number, drawWidthMM: number): PdfPageSlice {\n const scale = Math.min(1, pageHeightPx / Math.max(sourceHeight, 1));\n const width = drawWidthMM * scale;\n return {\n SourceY: sourceY,\n SourceHeight: sourceHeight,\n DrawHeightMM: sourceHeight * mmPerPixel * scale,\n DrawWidthMM: width,\n XMM: PAGE_MARGIN_MM + (drawWidthMM - width) / 2,\n };\n}\n\n/** `<title>_<YYYY-MM-DD>.pdf`, with anything outside letters, digits, space, - and _ replaced by _. */\nexport function PdfFileName(title: string | null | undefined, now: Date = new Date()): string {\n const pad = (value: number) => String(value).padStart(2, '0');\n const stamp = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`;\n const base = (title || '').trim().replace(/[^A-Za-z0-9 _-]/g, '_') || 'component';\n return `${base}_${stamp}.pdf`;\n}\n\n/**\n * Records each element's inline style text the first time print mode touches it, and puts it back\n * exactly. Saving the whole text (not single properties) also restores shorthands such as `flex`,\n * which browsers split into longhands.\n */\nclass InlineStyleJournal {\n private readonly saved = new Map<HTMLElement, string>();\n\n Set(element: HTMLElement, property: (typeof PRINT_STYLE_PROPERTIES)[number], value: string): void {\n if (!this.saved.has(element)) {\n this.saved.set(element, element.style.cssText);\n }\n element.style.setProperty(property, value);\n }\n\n RestoreAll(): void {\n for (const [element, cssText] of this.saved) {\n element.style.cssText = cssText;\n }\n this.saved.clear();\n }\n}\n\nconst CLIPPING_OVERFLOW = new Set(['auto', 'scroll', 'hidden', 'clip']);\n\n/** True when the element's content is taller than the box it holds. */\nfunction overflowsVertically(element: HTMLElement): boolean {\n return element.scrollHeight > element.clientHeight + 1;\n}\n\n/** True when the element hides vertical content behind a scrollbar or a clip. */\nfunction clipsVertically(element: HTMLElement): boolean {\n return CLIPPING_OVERFLOW.has(getComputedStyle(element).overflowY) && overflowsVertically(element);\n}\n\n/**\n * True when the element is a sideways scroller hiding columns (a table too wide for the page).\n * Only scrolling containers count: `overflow: hidden` on purpose (an ellipsis cell) stays clipped.\n */\nfunction scrollsHorizontally(element: HTMLElement): boolean {\n const overflowX = getComputedStyle(element).overflowX;\n return (overflowX === 'auto' || overflowX === 'scroll') && element.scrollWidth > element.clientWidth + 1;\n}\n\n/**\n * Shows a sideways scroller's full width, so no column is lost: the content then runs past the page\n * width and the capture is scaled down to fit. Also drops `contain`, which would keep it narrow.\n */\nfunction releaseHorizontally(journal: InlineStyleJournal, element: HTMLElement): void {\n journal.Set(element, 'overflow-x', 'visible');\n journal.Set(element, 'contain', 'none');\n}\n\n/** True when the element's content now spills past a height the element still holds, without clipping it. */\nfunction spillsOutOfFixedHeight(element: HTMLElement): boolean {\n return !CLIPPING_OVERFLOW.has(getComputedStyle(element).overflowY) && overflowsVertically(element);\n}\n\n/** True when the element sits in a top-to-bottom flex layout, where `flex: none` stops it being squeezed. */\nfunction isInColumnFlex(element: HTMLElement): boolean {\n const parent = element.parentElement;\n if (!parent) {\n return false;\n }\n const style = getComputedStyle(parent);\n return style.display.includes('flex') && style.flexDirection.startsWith('column');\n}\n\n/**\n * Lets the element grow to its content's height. `flex: none` is applied only in a column flex\n * layout: in a row layout it would let the element widen to its content and rescale everything\n * that sizes itself to the width (an svg chart with `width: 100%`).\n */\nfunction expandElement(journal: InlineStyleJournal, element: HTMLElement): void {\n journal.Set(element, 'height', 'auto');\n journal.Set(element, 'max-height', 'none');\n journal.Set(element, 'overflow-y', 'visible');\n if (isInColumnFlex(element)) {\n journal.Set(element, 'flex', 'none');\n }\n}\n\n/**\n * The root grows to its content's height at its current width. Its ancestors (the host's panes)\n * are left alone: the capture clones only the root, so their clipping does not matter, and\n * changing them reflows the host page around the component.\n */\nfunction expandRoot(journal: InlineStyleJournal, root: HTMLElement): void {\n journal.Set(root, 'width', `${root.getBoundingClientRect().width}px`);\n journal.Set(root, 'height', 'auto');\n journal.Set(root, 'max-height', 'none');\n journal.Set(root, 'overflow', 'visible');\n}\n\nfunction isExpandable(element: HTMLElement): boolean {\n return !NON_EXPANDING_TAGS.has(element.tagName) && !element.closest('svg');\n}\n\n/** Ancestors (up to the root) that hold a fixed height the expanded element now spills out of. */\nfunction expandSpillingAncestors(journal: InlineStyleJournal, element: HTMLElement, root: HTMLElement): void {\n for (let ancestor = element.parentElement; ancestor && ancestor !== root; ancestor = ancestor.parentElement) {\n if (spillsOutOfFixedHeight(ancestor)) {\n expandElement(journal, ancestor);\n }\n }\n}\n\n/**\n * One pass over the root's elements; true when anything was expanded. Only elements that clip are\n * expanded, plus the ancestors they then spill out of: an element whose absolutely positioned\n * overlay pokes out (a chart legend, a tooltip) is left alone.\n */\nfunction expandClippingPass(journal: InlineStyleJournal, root: HTMLElement): boolean {\n let changed = false;\n for (const element of Array.from(root.querySelectorAll<HTMLElement>('*'))) {\n if (!isExpandable(element)) {\n continue;\n }\n if (clipsVertically(element)) {\n expandElement(journal, element);\n expandSpillingAncestors(journal, element, root);\n changed = true;\n }\n if (scrollsHorizontally(element)) {\n releaseHorizontally(journal, element);\n changed = true;\n }\n }\n return changed;\n}\n\n/**\n * Expands `root` (at its current width) and every element inside it that clips its content,\n * repeating until nothing changes. Returns a function that restores every inline style it touched.\n */\nexport function EnterPrintMode(root: HTMLElement): () => void {\n const journal = new InlineStyleJournal();\n expandRoot(journal, root);\n for (let pass = 0; pass < MAX_EXPAND_PASSES && expandClippingPass(journal, root); pass++) {\n // each pass can reveal a new clipping ancestor\n }\n return () => journal.RestoreAll();\n}\n\n/**\n * How far the widest content inside `root` runs past its container, in CSS pixels: a table wider\n * than its card overflows into the card's padding and border even when the root itself is not\n * wider. Elements that clip on purpose (`overflow: hidden`, an ellipsis cell) and svg internals\n * are ignored.\n */\nexport function HorizontalOverflow(root: HTMLElement): number {\n let widest = Math.max(0, root.scrollWidth - root.clientWidth);\n for (const element of Array.from(root.querySelectorAll<HTMLElement>('*'))) {\n const style = getComputedStyle(element);\n if (element.closest('svg') || element.childElementCount === 0 || CLIPPING_OVERFLOW.has(style.overflowX || style.overflow)) {\n continue;\n }\n widest = Math.max(widest, element.scrollWidth - element.clientWidth);\n }\n return widest;\n}\n\n/**\n * Lays `root` out at `widthPx` (the page's printable width), whatever its container's width. The\n * root is taken out of the page's flow (absolutely positioned at its container's top left) so its\n * page width cannot widen the host's flex panes and reflow the page around it. Returns a function\n * that restores its inline style.\n */\nexport function PinLayoutWidth(root: HTMLElement, widthPx: number): () => void {\n const journal = new InlineStyleJournal();\n journal.Set(root, 'position', 'absolute');\n journal.Set(root, 'top', '0');\n journal.Set(root, 'left', '0');\n journal.Set(root, 'width', `${widthPx}px`);\n return () => journal.RestoreAll();\n}\n\n/**\n * Re-renders every Chart.js chart on the page at a capture pixel ratio with animation off, so\n * canvases are sharp and never caught mid-animation. Returns a function that restores them.\n */\nexport function SharpenCharts(win: Window = window): () => void {\n const instances = Object.values((win as WindowWithChart).Chart?.instances ?? {});\n const originals = instances.map(chart => ({ chart, ratio: chart.options.devicePixelRatio, animation: chart.options.animation }));\n for (const { chart } of originals) {\n chart.options.devicePixelRatio = CAPTURE_CHART_PIXEL_RATIO;\n chart.options.animation = false;\n chart.resize();\n chart.update('none');\n }\n return () => {\n for (const { chart, ratio, animation } of originals) {\n chart.options.devicePixelRatio = ratio;\n chart.options.animation = animation;\n chart.resize();\n chart.update('none');\n }\n };\n}\n\n/** Lets layout, ResizeObservers and Chart.js resizes settle after print mode changes sizes. */\nasync function settleLayout(): Promise<void> {\n await new Promise<void>(resolve => requestAnimationFrame(() => requestAnimationFrame(() => resolve())));\n await new Promise<void>(resolve => setTimeout(resolve, 250));\n}\n\n/** Leaves export controls (ExportableData's buttons) out of the capture. */\nfunction isCapturedNode(node: HTMLElement): boolean {\n return !(node.getAttribute && node.getAttribute(EXPORT_CONTROL_ATTRIBUTE) === 'true');\n}\n\n/** The nearest ancestor that scrolls (the viewer pane), whose visible box the cover hides. */\nfunction scrollingAncestor(element: HTMLElement): HTMLElement | null {\n for (let node = element.parentElement; node && node !== document.body; node = node.parentElement) {\n if (CLIPPING_OVERFLOW.has(getComputedStyle(node).overflowY)) {\n return node;\n }\n }\n return null;\n}\n\n/**\n * Covers the component's on-screen area with a \"Preparing PDF…\" panel while it is laid out at page\n * width, so the user does not watch it reflow. The cover sits outside the root, so it is not captured.\n */\nfunction showPreparingCover(root: HTMLElement): () => void {\n const box = (scrollingAncestor(root) ?? root).getBoundingClientRect();\n const cover = document.createElement('div');\n cover.setAttribute('role', 'status');\n cover.textContent = 'Preparing PDF…';\n Object.assign(cover.style, {\n position: 'fixed', left: `${box.left}px`, top: `${box.top}px`, width: `${box.width}px`, height: `${box.height}px`,\n zIndex: '10000', display: 'flex', alignItems: 'center', justifyContent: 'center',\n background: 'var(--mj-bg-surface, #ffffff)', color: 'var(--mj-text-secondary, #555555)', fontSize: '14px',\n });\n document.body.appendChild(cover);\n return () => cover.remove();\n}\n\n/** A colour as 0–255 channels; `A` is opacity, 255 for opaque. */\nexport interface RgbaColor {\n R: number;\n G: number;\n B: number;\n A: number;\n}\n\n/** The capture background when nothing behind the component paints one. */\nconst WHITE: RgbaColor = { R: 255, G: 255, B: 255, A: 255 };\n\n/** A band pixel within this distance of the background, on every channel, counts as background. */\nconst BLANK_PIXEL_TOLERANCE = 10;\n\n/** The capture, where its elements sit (for choosing page breaks), and the background it was drawn on. */\ninterface CapturedComponent {\n Canvas: HTMLCanvasElement;\n Blocks: CaptureBlock[];\n Background: RgbaColor;\n}\n\n/**\n * Resolves a CSS colour to channels by painting it on a 1×1 canvas, so every syntax a computed style\n * can hold (`rgb()`, `color(srgb …)` from `color-mix()`, `oklch()`) comes out the same way. An\n * unparseable colour, or no canvas, reads as transparent.\n */\nfunction resolveCssColor(css: string): RgbaColor {\n const canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n const context = canvas.getContext('2d', { willReadFrequently: true });\n if (!context) {\n return { R: 0, G: 0, B: 0, A: 0 };\n }\n context.fillStyle = 'transparent';\n context.fillStyle = css;\n context.fillRect(0, 0, 1, 1);\n const [R, G, B, A] = context.getImageData(0, 0, 1, 1).data;\n return { R, G, B, A };\n}\n\n/**\n * The colour a stack of backgrounds shows, nearest first: each translucent layer is blended over the\n * ones behind it, down to the first opaque layer, or over white when none is opaque.\n */\nexport function BlendBackgrounds(layers: RgbaColor[]): RgbaColor {\n const opaqueIndex = layers.findIndex(layer => layer.A >= 255);\n const visible = opaqueIndex >= 0 ? layers.slice(0, opaqueIndex + 1) : [...layers, WHITE];\n return visible.reduceRight<RgbaColor>((behind, layer) => {\n const alpha = layer.A / 255;\n const mix = (front: number, back: number) => Math.round(front * alpha + back * (1 - alpha));\n return { R: mix(layer.R, behind.R), G: mix(layer.G, behind.G), B: mix(layer.B, behind.B), A: 255 };\n }, WHITE);\n}\n\n/**\n * The background the component is seen on. Its root is often transparent and shows an ancestor's\n * surface, which in a dark theme is dark under light text; capturing on white would lose that text.\n */\nfunction captureBackground(root: HTMLElement): RgbaColor {\n const layers: RgbaColor[] = [];\n for (let element: HTMLElement | null = root; element; element = element.parentElement) {\n const layer = resolveCssColor(getComputedStyle(element).backgroundColor);\n if (layer.A > 0) {\n layers.push(layer);\n }\n if (layer.A >= 255) {\n break;\n }\n }\n return BlendBackgrounds(layers);\n}\n\nfunction cssColor(color: RgbaColor): string {\n return `rgb(${color.R}, ${color.G}, ${color.B})`;\n}\n\n/**\n * Where every element of `root` sits vertically, in captured-image pixels. Svg internals are left out\n * (the svg itself counts), and so are export controls.\n */\n/**\n * An svg's vertical extent including what it draws past its own box (ribbons or labels outside its\n * viewBox with `overflow: visible`), within its container, so a page break never cuts the drawing.\n */\nfunction svgDrawingBox(svg: Element): { top: number; bottom: number } {\n const own = svg.getBoundingClientRect();\n // Overshoot is counted only within the svg's container: a chart drawing over the next card is the\n // chart's own defect, and counting it would weld that card to the chart.\n const container = svg.parentElement?.getBoundingClientRect() ?? own;\n let top = own.top;\n let bottom = own.bottom;\n for (const shape of Array.from(svg.querySelectorAll('*'))) {\n const box = shape.getBoundingClientRect();\n if (box.height > 0) {\n top = Math.min(top, box.top);\n bottom = Math.max(bottom, box.bottom);\n }\n }\n return { top: Math.max(top, container.top), bottom: Math.min(bottom, container.bottom) };\n}\n\n/**\n * A table's lead-in, kept on one page: from where its section starts (a card's title, subtitle and\n * search box) through its header row to its first data row. The section start is the highest\n * enclosing container that begins at most `maxLeadPx` above the table, so the lead-in never reaches\n * back to unrelated content. Null when the table has no visible data row.\n */\nexport function TableLeadBlock(table: HTMLTableElement, root: HTMLElement, maxLeadPx: number): { top: number; bottom: number } | null {\n const firstRow = Array.from(table.querySelectorAll('tbody tr')).find(row => row.getBoundingClientRect().height > 0);\n if (!firstRow) {\n return null;\n }\n const tableTop = table.getBoundingClientRect().top;\n let top = tableTop;\n for (let node = table.parentElement; node && node !== root; node = node.parentElement) {\n const box = node.getBoundingClientRect();\n if (box.width === 0 && box.height === 0) {\n continue; // a box-less wrapper (`display: contents`, as the MJ runtime puts around each component)\n }\n if (tableTop - box.top > maxLeadPx) {\n break;\n }\n top = Math.min(top, box.top);\n }\n return { top, bottom: firstRow.getBoundingClientRect().bottom };\n}\n\nfunction captureBlocks(root: HTMLElement, scale: number, orientation: PdfOrientation): CaptureBlock[] {\n const top = root.getBoundingClientRect().top;\n const blocks: CaptureBlock[] = [];\n // A page is this many CSS pixels tall at the capture's width; a table's lead-in may span about a third of it.\n const page = pageSize(orientation);\n const pageHeightCss = root.scrollWidth * (page.HeightMM - 2 * PAGE_MARGIN_MM) / (page.WidthMM - 2 * PAGE_MARGIN_MM);\n for (const table of Array.from(root.querySelectorAll('table'))) {\n const lead = TableLeadBlock(table, root, pageHeightCss * TABLE_LEAD_PAGE_SHARE);\n if (lead) {\n blocks.push({ Top: (lead.top - top) * scale, Bottom: (lead.bottom - top) * scale, Atomic: true });\n }\n }\n for (const element of Array.from(root.querySelectorAll<HTMLElement>('*'))) {\n if ((element.parentElement && element.parentElement.closest('svg')) || element.closest(`[${EXPORT_CONTROL_ATTRIBUTE}=\"true\"]`)) {\n continue;\n }\n const box = element.tagName === 'svg' ? svgDrawingBox(element) : element.getBoundingClientRect();\n if (box.bottom > box.top) {\n const atomic = ATOMIC_TAGS.has(element.tagName) || element.childElementCount === 0;\n const keepWithNext = KEEP_WITH_NEXT_TAGS.has(element.tagName) || element.getAttribute('role') === 'heading';\n blocks.push({ Top: (box.top - top) * scale, Bottom: (box.bottom - top) * scale, Atomic: atomic, KeepWithNext: keepWithNext });\n }\n }\n return blocks;\n}\n\ntype HtmlToImage = typeof import('html-to-image');\n\nlet htmlToImage: Promise<HtmlToImage> | null = null;\n\n/**\n * Loads `html-to-image` the first time a PDF is captured. A dynamic import is correct here (MJ allows one\n * for a measured bundle-size deferral): this package is bundled into hosts that never export a PDF, such\n * as the realtime widget's call, and a static import puts the rasterizer (about 15 KB minified) on their\n * start-up path. Loaded here, the bundler keeps it in a chunk only an export downloads.\n */\nfunction loadHtmlToImage(): Promise<HtmlToImage> {\n htmlToImage ??= import('html-to-image');\n return htmlToImage;\n}\n\n/**\n * Captures `root` laid out at the page width and fully expanded, as a canvas. The width is applied\n * first and allowed to settle (charts re-render on resize), then clipping elements are expanded.\n * Every style and chart is restored afterwards.\n */\nasync function captureAtPageWidth(root: HTMLElement, orientation: PdfOrientation): Promise<CapturedComponent> {\n const removeCover = showPreparingCover(root);\n const restoreCharts = SharpenCharts();\n const pageWidth = PageLayoutWidth(orientation);\n let restoreWidth = PinLayoutWidth(root, pageWidth);\n let exitPrintMode: (() => void) | null = null;\n try {\n await settleLayout();\n exitPrintMode = EnterPrintMode(root);\n await settleLayout();\n // A table that needs more than the page width (released from its scroller) would spill past its\n // card: lay the whole component out wider and let the page scale it down. Widen by the largest\n // overflow inside the component until no container's content is wider than the container.\n let layoutWidth = pageWidth;\n const maxWidth = pageWidth * MAX_LAYOUT_WIDTH_FACTOR;\n for (let round = 0, overflow = HorizontalOverflow(root); round < MAX_WIDEN_ROUNDS && overflow > 1 && layoutWidth < maxWidth; round++, overflow = HorizontalOverflow(root)) {\n layoutWidth = Math.min(Math.ceil(layoutWidth + overflow), maxWidth);\n exitPrintMode();\n restoreWidth();\n restoreWidth = PinLayoutWidth(root, layoutWidth);\n await settleLayout();\n exitPrintMode = EnterPrintMode(root);\n await settleLayout();\n }\n const width = root.scrollWidth;\n const background = captureBackground(root);\n const { toCanvas } = await loadHtmlToImage();\n const canvas = await toCanvas(root, {\n pixelRatio: CAPTURE_PIXEL_RATIO,\n backgroundColor: cssColor(background),\n width,\n height: root.scrollHeight,\n filter: node => !(node instanceof HTMLElement) || isCapturedNode(node),\n });\n return { Canvas: canvas, Blocks: captureBlocks(root, canvas.width / Math.max(width, 1), orientation), Background: background };\n } finally {\n exitPrintMode?.();\n restoreWidth();\n restoreCharts();\n removeCover();\n }\n}\n\n/** Copies one band of the captured canvas into its own canvas, for one page. */\nfunction sliceCanvas(source: HTMLCanvasElement, slice: PdfPageSlice, background: RgbaColor): HTMLCanvasElement {\n const band = document.createElement('canvas');\n band.width = source.width;\n band.height = slice.SourceHeight;\n const context = band.getContext('2d');\n if (context) {\n context.fillStyle = cssColor(background);\n context.fillRect(0, 0, band.width, band.height);\n context.drawImage(source, 0, slice.SourceY, source.width, slice.SourceHeight, 0, 0, source.width, slice.SourceHeight);\n }\n return band;\n}\n\n/** True when RGBA pixel data holds nothing but the background colour (or very near it). */\nexport function IsBlankPixels(pixels: Uint8ClampedArray, background: RgbaColor): boolean {\n const near = (value: number, target: number) => Math.abs(value - target) <= BLANK_PIXEL_TOLERANCE;\n for (let i = 0; i < pixels.length; i += 4 * 7) { // every 7th pixel is plenty for page-sized content\n if (!near(pixels[i], background.R) || !near(pixels[i + 1], background.G) || !near(pixels[i + 2], background.B)) {\n return false;\n }\n }\n return true;\n}\n\n/** True when a band holds nothing but the capture background, such as trailing padding. */\nfunction isBlankBand(band: HTMLCanvasElement, background: RgbaColor): boolean {\n const context = band.getContext('2d');\n if (!context || band.width === 0 || band.height === 0) {\n return true;\n }\n return IsBlankPixels(context.getImageData(0, 0, band.width, band.height).data, background);\n}\n\n/** The JPEG file bytes of a canvas. */\nfunction jpegBytes(canvas: HTMLCanvasElement): Uint8Array {\n const base64 = canvas.toDataURL('image/jpeg', 0.92).split(',')[1] ?? '';\n const binary = atob(base64);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return bytes;\n}\n\n/** Builds the PDF from the captured canvas, one page per slice. */\nfunction buildPdf(captured: CapturedComponent, orientation: PdfOrientation): Uint8Array<ArrayBuffer> {\n const canvas = captured.Canvas;\n const plan = PlanPdfPages(canvas.width, canvas.height, orientation, captured.Blocks);\n const bands = plan.Slices.map(slice => ({ slice, band: sliceCanvas(canvas, slice, captured.Background) }));\n const printed = bands.filter(({ band }) => !isBlankBand(band, captured.Background));\n const pages: PdfImagePage[] = (printed.length > 0 ? printed : bands.slice(0, 1)).map(({ slice, band }) => ({\n Jpeg: jpegBytes(band),\n PixelWidth: band.width,\n PixelHeight: band.height,\n PageWidthMM: plan.PageWidthMM,\n PageHeightMM: plan.PageHeightMM,\n XMM: slice.XMM,\n YMM: PAGE_MARGIN_MM,\n DrawWidthMM: slice.DrawWidthMM,\n DrawHeightMM: slice.DrawHeightMM,\n }));\n return BuildImagePdf(pages);\n}\n\n/** Hands the file to the browser as a download. */\nfunction downloadFile(bytes: Uint8Array<ArrayBuffer>, fileName: string): void {\n const url = URL.createObjectURL(new Blob([bytes], { type: 'application/pdf' }));\n const anchor = document.createElement('a');\n anchor.href = url;\n anchor.download = fileName;\n anchor.style.display = 'none';\n document.body.appendChild(anchor);\n anchor.click();\n anchor.remove();\n setTimeout(() => URL.revokeObjectURL(url), 1000);\n}\n\n/**\n * Exports the rendered component under `root` as a PDF download named `<title>_<date>.pdf`:\n * everything the component shows, including content behind inner scrollbars, in its current state,\n * laid out at the page's printable width so the PDF is the same whatever the viewer's size.\n */\nexport async function ExportComponentToPDF(root: HTMLElement, title?: string | null, orientation: PdfOrientation = 'portrait'): Promise<void> {\n const captured = await captureAtPageWidth(root, orientation);\n downloadFile(buildPdf(captured, orientation), PdfFileName(title));\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview A minimal PDF writer for pages that are each one JPEG image.
|
|
3
|
+
*
|
|
4
|
+
* Whole-component export only needs "one picture per page", which PDF expresses directly: a JPEG
|
|
5
|
+
* is embedded as-is (DCTDecode) and drawn by a one-line content stream. Writing it here keeps the
|
|
6
|
+
* export free of a PDF library, whose lazy imports also do not resolve through Angular's dev-server
|
|
7
|
+
* prebundling in pnpm workspaces.
|
|
8
|
+
* @module @memberjunction/ng-react
|
|
9
|
+
*/
|
|
10
|
+
/** One page: a JPEG drawn at a position and size on a page, all in millimetres from the top left. */
|
|
11
|
+
export interface PdfImagePage {
|
|
12
|
+
/** The JPEG file bytes. */
|
|
13
|
+
Jpeg: Uint8Array;
|
|
14
|
+
/** The JPEG's pixel size; written as whole numbers (a fractional size makes Apple's and Edge's viewers draw nothing). */
|
|
15
|
+
PixelWidth: number;
|
|
16
|
+
PixelHeight: number;
|
|
17
|
+
PageWidthMM: number;
|
|
18
|
+
PageHeightMM: number;
|
|
19
|
+
XMM: number;
|
|
20
|
+
YMM: number;
|
|
21
|
+
DrawWidthMM: number;
|
|
22
|
+
DrawHeightMM: number;
|
|
23
|
+
}
|
|
24
|
+
/** Builds a PDF with one JPEG per page. Object 1 is the catalog, 2 the page tree, then 3 per page. */
|
|
25
|
+
export declare function BuildImagePdf(pages: PdfImagePage[]): Uint8Array<ArrayBuffer>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview A minimal PDF writer for pages that are each one JPEG image.
|
|
3
|
+
*
|
|
4
|
+
* Whole-component export only needs "one picture per page", which PDF expresses directly: a JPEG
|
|
5
|
+
* is embedded as-is (DCTDecode) and drawn by a one-line content stream. Writing it here keeps the
|
|
6
|
+
* export free of a PDF library, whose lazy imports also do not resolve through Angular's dev-server
|
|
7
|
+
* prebundling in pnpm workspaces.
|
|
8
|
+
* @module @memberjunction/ng-react
|
|
9
|
+
*/
|
|
10
|
+
const POINTS_PER_MM = 72 / 25.4;
|
|
11
|
+
/** Collects the file as byte chunks and tracks the offset of every object for the xref table. */
|
|
12
|
+
class PdfByteWriter {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.chunks = [];
|
|
15
|
+
this.encoder = new TextEncoder();
|
|
16
|
+
this.length = 0;
|
|
17
|
+
this.ObjectOffsets = [];
|
|
18
|
+
}
|
|
19
|
+
get Length() {
|
|
20
|
+
return this.length;
|
|
21
|
+
}
|
|
22
|
+
Text(text) {
|
|
23
|
+
this.Bytes(this.encoder.encode(text));
|
|
24
|
+
}
|
|
25
|
+
Bytes(bytes) {
|
|
26
|
+
this.chunks.push(bytes);
|
|
27
|
+
this.length += bytes.length;
|
|
28
|
+
}
|
|
29
|
+
/** Writes `n 0 obj … endobj`; objects must be written in number order starting at 1. */
|
|
30
|
+
Object(body) {
|
|
31
|
+
this.ObjectOffsets.push(this.length);
|
|
32
|
+
this.Text(`${this.ObjectOffsets.length} 0 obj\n${body}\nendobj\n`);
|
|
33
|
+
}
|
|
34
|
+
/** Writes an object whose body ends in a binary stream. */
|
|
35
|
+
StreamObject(dictionary, stream) {
|
|
36
|
+
this.ObjectOffsets.push(this.length);
|
|
37
|
+
this.Text(`${this.ObjectOffsets.length} 0 obj\n${dictionary}\nstream\n`);
|
|
38
|
+
this.Bytes(stream);
|
|
39
|
+
this.Text('\nendstream\nendobj\n');
|
|
40
|
+
}
|
|
41
|
+
Join() {
|
|
42
|
+
const result = new Uint8Array(this.length);
|
|
43
|
+
let offset = 0;
|
|
44
|
+
for (const chunk of this.chunks) {
|
|
45
|
+
result.set(chunk, offset);
|
|
46
|
+
offset += chunk.length;
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function points(mm) {
|
|
52
|
+
return (mm * POINTS_PER_MM).toFixed(2);
|
|
53
|
+
}
|
|
54
|
+
/** The page's three objects: page, content stream (draws the image), image. */
|
|
55
|
+
function writePage(writer, page, pageObject) {
|
|
56
|
+
const content = new TextEncoder().encode(`q ${points(page.DrawWidthMM)} 0 0 ${points(page.DrawHeightMM)} ${points(page.XMM)} ` +
|
|
57
|
+
`${points(page.PageHeightMM - page.YMM - page.DrawHeightMM)} cm /Im0 Do Q`);
|
|
58
|
+
writer.Object(`<< /Type /Page /Parent 2 0 R /MediaBox [0 0 ${points(page.PageWidthMM)} ${points(page.PageHeightMM)}] ` +
|
|
59
|
+
`/Resources << /XObject << /Im0 ${pageObject + 2} 0 R >> >> /Contents ${pageObject + 1} 0 R >>`);
|
|
60
|
+
writer.StreamObject(`<< /Length ${content.length} >>`, content);
|
|
61
|
+
writer.StreamObject(`<< /Type /XObject /Subtype /Image /Width ${Math.round(page.PixelWidth)} /Height ${Math.round(page.PixelHeight)} ` +
|
|
62
|
+
`/ColorSpace /DeviceRGB /BitsPerComponent 8 /Filter /DCTDecode /Length ${page.Jpeg.length} >>`, page.Jpeg);
|
|
63
|
+
}
|
|
64
|
+
function writeXrefAndTrailer(writer) {
|
|
65
|
+
const xrefOffset = writer.Length;
|
|
66
|
+
const entries = writer.ObjectOffsets.map(offset => `${String(offset).padStart(10, '0')} 00000 n \n`).join('');
|
|
67
|
+
writer.Text(`xref\n0 ${writer.ObjectOffsets.length + 1}\n0000000000 65535 f \n${entries}`);
|
|
68
|
+
writer.Text(`trailer\n<< /Size ${writer.ObjectOffsets.length + 1} /Root 1 0 R >>\nstartxref\n${xrefOffset}\n%%EOF\n`);
|
|
69
|
+
}
|
|
70
|
+
/** Builds a PDF with one JPEG per page. Object 1 is the catalog, 2 the page tree, then 3 per page. */
|
|
71
|
+
export function BuildImagePdf(pages) {
|
|
72
|
+
const writer = new PdfByteWriter();
|
|
73
|
+
writer.Text('%PDF-1.4\n');
|
|
74
|
+
writer.Bytes(new Uint8Array([0x25, 0xe2, 0xe3, 0xcf, 0xd3, 0x0a])); // binary marker comment
|
|
75
|
+
const pageObjects = pages.map((_, index) => 3 + index * 3);
|
|
76
|
+
writer.Object('<< /Type /Catalog /Pages 2 0 R >>');
|
|
77
|
+
writer.Object(`<< /Type /Pages /Kids [${pageObjects.map(n => `${n} 0 R`).join(' ')}] /Count ${pages.length} >>`);
|
|
78
|
+
pages.forEach((page, index) => writePage(writer, page, pageObjects[index]));
|
|
79
|
+
writeXrefAndTrailer(writer);
|
|
80
|
+
return writer.Join();
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=image-pdf-writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-pdf-writer.js","sourceRoot":"","sources":["../../../src/lib/export/image-pdf-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAiBH,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,CAAC;AAEhC,iGAAiG;AACjG,MAAM,aAAa;IAAnB;QACqB,WAAM,GAAiB,EAAE,CAAC;QAC1B,YAAO,GAAG,IAAI,WAAW,EAAE,CAAC;QACrC,WAAM,GAAG,CAAC,CAAC;QACV,kBAAa,GAAa,EAAE,CAAC;IAsC1C,CAAC;IApCG,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,CAAC,IAAY;QACb,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,KAAiB;QACnB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC;IAChC,CAAC;IAED,wFAAwF;IACxF,MAAM,CAAC,IAAY;QACf,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,WAAW,IAAI,YAAY,CAAC,CAAC;IACvE,CAAC;IAED,2DAA2D;IAC3D,YAAY,CAAC,UAAkB,EAAE,MAAkB;QAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC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CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC;IAC3D,MAAM,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;IACnD,MAAM,CAAC,MAAM,CAAC,0BAA0B,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACjH,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5E,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC","sourcesContent":["/**\n * @fileoverview A minimal PDF writer for pages that are each one JPEG image.\n *\n * Whole-component export only needs \"one picture per page\", which PDF expresses directly: a JPEG\n * is embedded as-is (DCTDecode) and drawn by a one-line content stream. Writing it here keeps the\n * export free of a PDF library, whose lazy imports also do not resolve through Angular's dev-server\n * prebundling in pnpm workspaces.\n * @module @memberjunction/ng-react\n */\n\n/** One page: a JPEG drawn at a position and size on a page, all in millimetres from the top left. */\nexport interface PdfImagePage {\n /** The JPEG file bytes. */\n Jpeg: Uint8Array;\n /** The JPEG's pixel size; written as whole numbers (a fractional size makes Apple's and Edge's viewers draw nothing). */\n PixelWidth: number;\n PixelHeight: number;\n PageWidthMM: number;\n PageHeightMM: number;\n XMM: number;\n YMM: number;\n DrawWidthMM: number;\n DrawHeightMM: number;\n}\n\nconst POINTS_PER_MM = 72 / 25.4;\n\n/** Collects the file as byte chunks and tracks the offset of every object for the xref table. */\nclass PdfByteWriter {\n private readonly chunks: Uint8Array[] = [];\n private readonly encoder = new TextEncoder();\n private length = 0;\n readonly ObjectOffsets: number[] = [];\n\n get Length(): number {\n return this.length;\n }\n\n Text(text: string): void {\n this.Bytes(this.encoder.encode(text));\n }\n\n Bytes(bytes: Uint8Array): void {\n this.chunks.push(bytes);\n this.length += bytes.length;\n }\n\n /** Writes `n 0 obj … endobj`; objects must be written in number order starting at 1. */\n Object(body: string): void {\n this.ObjectOffsets.push(this.length);\n this.Text(`${this.ObjectOffsets.length} 0 obj\\n${body}\\nendobj\\n`);\n }\n\n /** Writes an object whose body ends in a binary stream. */\n StreamObject(dictionary: string, stream: Uint8Array): void {\n this.ObjectOffsets.push(this.length);\n this.Text(`${this.ObjectOffsets.length} 0 obj\\n${dictionary}\\nstream\\n`);\n this.Bytes(stream);\n this.Text('\\nendstream\\nendobj\\n');\n }\n\n Join(): Uint8Array<ArrayBuffer> {\n const result = new Uint8Array(this.length);\n let offset = 0;\n for (const chunk of this.chunks) {\n result.set(chunk, offset);\n offset += chunk.length;\n }\n return result;\n }\n}\n\nfunction points(mm: number): string {\n return (mm * POINTS_PER_MM).toFixed(2);\n}\n\n/** The page's three objects: page, content stream (draws the image), image. */\nfunction writePage(writer: PdfByteWriter, page: PdfImagePage, pageObject: number): void {\n const content = new TextEncoder().encode(\n `q ${points(page.DrawWidthMM)} 0 0 ${points(page.DrawHeightMM)} ${points(page.XMM)} ` +\n `${points(page.PageHeightMM - page.YMM - page.DrawHeightMM)} cm /Im0 Do Q`);\n writer.Object(\n `<< /Type /Page /Parent 2 0 R /MediaBox [0 0 ${points(page.PageWidthMM)} ${points(page.PageHeightMM)}] ` +\n `/Resources << /XObject << /Im0 ${pageObject + 2} 0 R >> >> /Contents ${pageObject + 1} 0 R >>`);\n writer.StreamObject(`<< /Length ${content.length} >>`, content);\n writer.StreamObject(\n `<< /Type /XObject /Subtype /Image /Width ${Math.round(page.PixelWidth)} /Height ${Math.round(page.PixelHeight)} ` +\n `/ColorSpace /DeviceRGB /BitsPerComponent 8 /Filter /DCTDecode /Length ${page.Jpeg.length} >>`, page.Jpeg);\n}\n\nfunction writeXrefAndTrailer(writer: PdfByteWriter): void {\n const xrefOffset = writer.Length;\n const entries = writer.ObjectOffsets.map(offset => `${String(offset).padStart(10, '0')} 00000 n \\n`).join('');\n writer.Text(`xref\\n0 ${writer.ObjectOffsets.length + 1}\\n0000000000 65535 f \\n${entries}`);\n writer.Text(`trailer\\n<< /Size ${writer.ObjectOffsets.length + 1} /Root 1 0 R >>\\nstartxref\\n${xrefOffset}\\n%%EOF\\n`);\n}\n\n/** Builds a PDF with one JPEG per page. Object 1 is the catalog, 2 the page tree, then 3 per page. */\nexport function BuildImagePdf(pages: PdfImagePage[]): Uint8Array<ArrayBuffer> {\n const writer = new PdfByteWriter();\n writer.Text('%PDF-1.4\\n');\n writer.Bytes(new Uint8Array([0x25, 0xe2, 0xe3, 0xcf, 0xd3, 0x0a])); // binary marker comment\n const pageObjects = pages.map((_, index) => 3 + index * 3);\n writer.Object('<< /Type /Catalog /Pages 2 0 R >>');\n writer.Object(`<< /Type /Pages /Kids [${pageObjects.map(n => `${n} 0 R`).join(' ')}] /Count ${pages.length} >>`);\n pages.forEach((page, index) => writePage(writer, page, pageObjects[index]));\n writeXrefAndTrailer(writer);\n return writer.Join();\n}\n"]}
|
package/dist/public-api.d.ts
CHANGED
|
@@ -8,5 +8,7 @@ export * from './lib/components/mj-react-component.component';
|
|
|
8
8
|
export * from './lib/services/script-loader.service';
|
|
9
9
|
export * from './lib/services/react-bridge.service';
|
|
10
10
|
export * from './lib/services/angular-adapter.service';
|
|
11
|
+
export * from './lib/export/component-pdf-export';
|
|
12
|
+
export * from './lib/export/image-pdf-writer';
|
|
11
13
|
export * from './lib/config/react-debug.config';
|
|
12
14
|
export * from './lib/hooks/antd-dropdown-position-hook';
|
package/dist/public-api.js
CHANGED
|
@@ -11,6 +11,9 @@ export * from './lib/components/mj-react-component.component';
|
|
|
11
11
|
export * from './lib/services/script-loader.service';
|
|
12
12
|
export * from './lib/services/react-bridge.service';
|
|
13
13
|
export * from './lib/services/angular-adapter.service';
|
|
14
|
+
// Export
|
|
15
|
+
export * from './lib/export/component-pdf-export';
|
|
16
|
+
export * from './lib/export/image-pdf-writer';
|
|
14
17
|
// Configuration
|
|
15
18
|
export * from './lib/config/react-debug.config';
|
|
16
19
|
// Hooks
|
package/dist/public-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,SAAS;AACT,cAAc,cAAc,CAAC;AAE7B,aAAa;AACb,cAAc,+CAA+C,CAAC;AAE9D,WAAW;AACX,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AAEvD,gBAAgB;AAChB,cAAc,iCAAiC,CAAC;AAEhD,QAAQ;AACR,cAAc,yCAAyC,CAAC","sourcesContent":["/**\n * @fileoverview Public API Surface of @memberjunction/ng-react\n * This file exports all public APIs from the Angular React integration library.\n * @module @memberjunction/ng-react\n */\n\n// Module\nexport * from './lib/module';\n\n// Components\nexport * from './lib/components/mj-react-component.component';\n\n// Services\nexport * from './lib/services/script-loader.service';\nexport * from './lib/services/react-bridge.service';\nexport * from './lib/services/angular-adapter.service';\n\n// Configuration\nexport * from './lib/config/react-debug.config';\n\n// Hooks\nexport * from './lib/hooks/antd-dropdown-position-hook';\n"]}
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,SAAS;AACT,cAAc,cAAc,CAAC;AAE7B,aAAa;AACb,cAAc,+CAA+C,CAAC;AAE9D,WAAW;AACX,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AAEvD,SAAS;AACT,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAE9C,gBAAgB;AAChB,cAAc,iCAAiC,CAAC;AAEhD,QAAQ;AACR,cAAc,yCAAyC,CAAC","sourcesContent":["/**\n * @fileoverview Public API Surface of @memberjunction/ng-react\n * This file exports all public APIs from the Angular React integration library.\n * @module @memberjunction/ng-react\n */\n\n// Module\nexport * from './lib/module';\n\n// Components\nexport * from './lib/components/mj-react-component.component';\n\n// Services\nexport * from './lib/services/script-loader.service';\nexport * from './lib/services/react-bridge.service';\nexport * from './lib/services/angular-adapter.service';\n\n// Export\nexport * from './lib/export/component-pdf-export';\nexport * from './lib/export/image-pdf-writer';\n\n// Configuration\nexport * from './lib/config/react-debug.config';\n\n// Hooks\nexport * from './lib/hooks/antd-dropdown-position-hook';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0-edge.0",
|
|
4
4
|
"description": "Angular components for hosting React components in MemberJunction applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,21 +34,22 @@
|
|
|
34
34
|
"styles"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@memberjunction/ai-vectors-memory": "6.
|
|
38
|
-
"@memberjunction/core": "6.
|
|
39
|
-
"@memberjunction/core-entities": "6.
|
|
40
|
-
"@memberjunction/global": "6.
|
|
41
|
-
"@memberjunction/graphql-dataprovider": "6.
|
|
42
|
-
"@memberjunction/interactive-component-types": "6.
|
|
43
|
-
"@memberjunction/ng-notifications": "6.
|
|
44
|
-
"@memberjunction/react-runtime": "6.
|
|
37
|
+
"@memberjunction/ai-vectors-memory": "6.3.0-edge.0",
|
|
38
|
+
"@memberjunction/core": "6.3.0-edge.0",
|
|
39
|
+
"@memberjunction/core-entities": "6.3.0-edge.0",
|
|
40
|
+
"@memberjunction/global": "6.3.0-edge.0",
|
|
41
|
+
"@memberjunction/graphql-dataprovider": "6.3.0-edge.0",
|
|
42
|
+
"@memberjunction/interactive-component-types": "6.3.0-edge.0",
|
|
43
|
+
"@memberjunction/ng-notifications": "6.3.0-edge.0",
|
|
44
|
+
"@memberjunction/react-runtime": "6.3.0-edge.0",
|
|
45
45
|
"@babel/standalone": "^7.29.1",
|
|
46
|
+
"html-to-image": "^1.11.11",
|
|
46
47
|
"react": "^19.2.4",
|
|
47
48
|
"react-dom": "^19.2.4",
|
|
48
49
|
"rxjs": "^7.8.2",
|
|
49
50
|
"@types/react": "^19.2.13",
|
|
50
51
|
"@types/react-dom": "^19.2.3",
|
|
51
|
-
"@memberjunction/ng-base-types": "6.
|
|
52
|
+
"@memberjunction/ng-base-types": "6.3.0-edge.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@angular/compiler": "21.2.22",
|