import type { ColorJson } from "@vertigis/arcgis-extensions/json/SymbolJson.js"; import type { WebMapLike } from "@vertigis/arcgis-extensions/mapping/MapExtension.js"; import type { ItemRef } from "../common/ItemRef.js"; import type { ComponentModelProperties } from "./ComponentModelProperties.js"; import type { ReportModelProperties } from "./ReportModelProperties.js"; /** * Properties that can be passed into the constructor for {@link PrintTemplate}. */ export interface PrintTemplateModelProperties extends ReportModelProperties { } /** * A spatial reference grid to use for printing. */ export interface SpatialReferenceGrid { /** * The name of the spatial reference. */ displayName: string; /** * The well-known ID if there is one. */ wkid?: number; /** * The well-known text if no well-known ID is provided. */ wkt?: string; } /** * The print extent indicator style. The extent indicator is exported as map * overlay on overview maps for series prints. */ export interface ExtentIndicatorStyle { /** * The fill color. Defaults to half transparent yellow ([255, 204, 0, 50]). */ fillColor?: ColorJson; /** * The overlap color. Defaults to full transparent green ([0, 255, 0, 0]). */ overlapColor?: ColorJson; /** * The outline color. Defaults to solid yellow ([255, 204, 0, 255]). */ outlineColor?: ColorJson; /** * The outline width in pixels. Defaults to 2. */ outlineWidth?: number; /** * The label color. Defaults to solid yellow ([255, 204, 0, 255]). */ labelColor?: ColorJson; /** * The label font size in points. Defaults to 20. */ labelFontSize?: number; /** * The label halo fill color. Defaults to half transparent white ([255, 255, * 255, 100]). */ labelHaloFillColor?: ColorJson; /** * The label halo outline color. Defaults to half transparent black ([0, 0, * 0, 100]). */ labelHaloOutlineColor?: ColorJson; /** * The label halo outline width in pixels. Defaults to 1. */ labelHaloOutlineWidth?: number; /** * The label halo size in pixels. Defaults to 2. */ labelHaloSize?: number; } /** * Legend items visibility. */ export type LegendItemsVisibility = "default" | "visible-all" | "visible-extent"; /** * A map attribution visibility. */ export type MapAttributionVisibility = "default" | "visible" | "hidden"; /** * Configuration for a print form component. */ export interface PrintFormModelProperties extends ComponentModelProperties { /** * The templates to choose from. */ templates?: (ItemRef | PrintTemplateModelProperties)[]; /** * The spatial reference grids to choose from. */ grids?: SpatialReferenceGrid[]; /** * The supported print resolutions to choose from. */ resolutions?: number[]; /** * The supported print scales to choose from. */ scales?: number[]; /** * Whether map only print should be enabled. */ mapOnlyPrintEnabled?: boolean; /** * Whether the grid print type should be enabled. */ gridPrintEnabled?: boolean; /** * Whether the line print type should be enabled. */ linePrintEnabled?: boolean; /** * Whether the legend items visibility selection should be enabled. */ legendItemsVisibilityEnabled?: boolean; /** * The selected legend items visibility. */ legendItemsVisibility?: LegendItemsVisibility; /** * Whether the printed legend should be as compact as possible. E.g. If * enabled, legend items of composite dynamic layers are not exported to * separate legend pages. Export to seperate legend pages groups related * features together and provides a better overview, but usually causes * additional legend pages to be exported. */ legendCompactModeEnabled?: boolean; /** * Whether strict mode for prints should be enabled. */ strictModeEnabled?: boolean; /** * Web map used as overview map in the print layout. Defaults to application * map if not set. */ additionalMapOverview?: WebMapLike; /** * Web map used as overview page map in the print layout. Defaults to * application map if not set. */ additionalMapOverviewPage?: WebMapLike; /** * The print extent indicator style. Defaults to printing engine defaults if * not set. */ extentIndicatorStyle?: ExtentIndicatorStyle; }