Cadenza JS
    Preparing search index...

    Class CadenzaClient

    Notes:

    • Most public methods are tagged with one of these modifiers:
      • Embed: The method embeds Cadenza in the given iframe.
      • Post Message: The method communicates with an embedded Cadenza via postMessage.
      • Post Message Parent: The method communicates with a parent/opener Cadenza via postMessage.
      • Server: The method communicates with the Cadenza server via HTTP.
    • Most public methods can be aborted using an AbortSignal. When aborted, the result Promise is rejected with an AbortError.
    • If there's another error, the result Promise is rejected with a CadenzaError.
    • For methods that support the hideMainHeaderAndFooter and hideWorkbookToolBar parameters - the parameters cannot override the configuration of an embedding target.
    Index

    Accessors

    • get baseUrl(): string | undefined

      The base URL of the Cadenza server this client is requesting

      Returns string | undefined

    • get iframe(): HTMLIFrameElement | undefined

      The iframe this client is using for embedding Cadenza.

      Returns HTMLIFrameElement | undefined

    Methods

    • Post Message Parent

      Sends a message to parent Cadenza window to close the window containing this application

      Returns void

    • Server

      Download data from a workbook view.

      Note: The file name, if not provided, is generated from the name of the workbook view and the current date.

      Parameters

      • source: EmbeddingTargetId

        The workbook view to fetch data from.

      • dataType: DataType

        The data type you want to get back from the server. Currently, "csv", "excel", "ods", and "json" are supported for embedding targets of type view with a view type of table and indicator. "pdf" is supported for embedding targets of type report and of type view with a view type of "JasperReports report".

      • Optional__namedParameters: { fileName?: string; filter?: FilterVariables; parts?: TablePart[] }

        Options

        • OptionalfileName?: string

          The file name to use; The file extension is appended by Cadenza.

        • Optionalfilter?: FilterVariables

          Filter variables

        • Optionalparts?: TablePart[]

          Table parts to export; If not specified, all parts are exported.

      • ...args: any[] = {}

      Returns void

      For invalid arguments

    • Post Message

      Expand/collapse the navigator.

      Parameters

      • expanded: boolean

        The expansion state of the navigator

      • ...args: any[] = true

      Returns void

    • Server

      Fetch the intersection areas from a workbook map view layer in JSON format for a given area.

      Parameters

      • source: EmbeddingTargetId

        The workbook view to fetch object info from.

      • layerPath: (string | WorkbookLayerPath)[]

        Layer path to identify the layer (identified using layer paths or print names)

      • geometry: Geometry

        The intersection geometry

      • Optional__namedParameters: {
            buffer?: Distance;
            includeGeometryValidationReport?: boolean;
            signal?: AbortSignal;
            useAutoCorrection?: boolean;
            useMapSrs?: boolean;
        }

        Options

        • Optionalbuffer?: Distance

          Buffer size for geometry of the transition

        • OptionalincludeGeometryValidationReport?: boolean

          Enables the list of corrected geometries, including error descriptions

        • Optionalsignal?: AbortSignal

          A signal to abort the data fetching

        • OptionaluseAutoCorrection?: boolean

          Enables the automatic correction of invalid geometries

        • OptionaluseMapSrs?: boolean

          The intersection geometry and the result geometries are in the map's SRS (otherwise EPSG:4326 is assumed)

      • ...args: any[] = {}

      Returns Promise<AreaIntersectionsResult | ProblemDetails>

      A Promise for the fetch response

    • Server

      Fetch data from a workbook view.

      Parameters

      • source: EmbeddingTargetId

        The workbook view to fetch data from.

      • dataType: DataType

        The data type you want to get back from the server. Currently, "csv", "excel", "ods", and "json" are supported for embedding targets of type view with a view type of table and indicator. "pdf" is supported for embedding targets of type report and of type view with a view type of "JasperReports report".

      • Optional__namedParameters: { filter?: FilterVariables; parts?: TablePart[]; signal?: AbortSignal }

        Options

        • Optionalfilter?: FilterVariables

          Filter variables

        • Optionalparts?: TablePart[]

          Table parts to export; If not specified, all parts are exported.

        • Optionalsignal?: AbortSignal

          A signal to abort the data fetching

      • ...args: any[] = {}

      Returns Promise<Response>

      A Promise for the fetch response

      For invalid arguments

    • Fetch object info from a workbook map view.

      Parameters

      • source: EmbeddingTargetId

        The workbook view to fetch object info from.

      • layerPath: (string | WorkbookLayerPath)[]

        Layer path to identify the layer (identified using layer paths or print names)

      • objectIds: LenientAttributeValue[][]

        The IDs of the objects to select

      • Optional__namedParameters: {
            filter?: FilterVariables;
            fullGeometries?: boolean;
            signal?: AbortSignal;
            useMapSrs?: boolean;
        }

        Options

        • Optionalfilter?: FilterVariables

          Filter variables

        • OptionalfullGeometries?: boolean

          Return non-simplified geometries

        • Optionalsignal?: AbortSignal

          A signal to abort the data fetching

        • OptionaluseMapSrs?: boolean

          Use the map SRS instead of WGS84

      • ...args: any[] = {}

      Returns Promise<FeatureCollection>

      A Promise for the fetch response

      For invalid arguments

    • Post Message

      Get data from the currently shown workbook view.

      Currently, only map views are supported.

      Type Parameters

      Parameters

      • dataType: DataType

        The requested data type. Currently, only "png" is

      • Optional__namedParameters: { height?: number; width?: number; withScale?: boolean }

        Options

        • Optionalheight?: number

          The height of the resulting map image in px.

        • Optionalwidth?: number

          The width of the resulting map image in px.

        • OptionalwithScale?: boolean

          Whether to show the scale line and the scale on the map image.

      • ...args: any[] = {}

      Returns Promise<T extends "png" ? Blob : never>

    • Post Message

      Reload the views of a worksheet.

      Parameters

      • Optional__namedParameters: { invalidateCaches?: boolean }

        Options

        • OptionalinvalidateCaches?: boolean

          When true, caches will be invalidated for objecttypes used in the worksheet

      • ...args: any[] = {}

      Returns Promise<void>

      A Promise which resolves when the views of the worksheet have finished reloading

    • Embed

      Select objects in a workbook map.

      Parameters

      • backgroundMapView: EmbeddingTargetId

        The workbook map view

      • Optional__namedParameters: {
            disabledUiFeatures?: UiFeature[];
            extentStrategy?: ExtentStrategy;
            filter?: FilterVariables;
            layers?: (string | WorkbookLayerPath)[];
            operationMode?: OperationMode;
            signal?: AbortSignal;
            useMapSrs?: boolean;
        }

        Options

        • OptionaldisabledUiFeatures?: UiFeature[]

          Cadenza UI features to disable

        • OptionalextentStrategy?: ExtentStrategy

          Defines the initial map extent; If not given, Cadenza's default logic is used.

        • Optionalfilter?: FilterVariables

          Filter variables

        • Optionallayers?: (string | WorkbookLayerPath)[]

          Layers to restrict the selection to (identified using layer paths or print names)

        • OptionaloperationMode?: OperationMode

          The mode in which a workbook should be operated

        • Optionalsignal?: AbortSignal

          A signal to abort the iframe loading

        • OptionaluseMapSrs?: boolean

          Whether the coordinates specified in other parameters are specified in the map's SRS (otherwise EPSG:4326 is assumed)

      • ...args: any[] = {}

      Returns Promise<void>

      A Promise for when the iframe is loaded

    • Set the custom validation status of the geometry editor dialog ( createGeometry, editGeometry, batchCreateGeometry, batchEditGeometry ) or the selectObjects dialog in addition to the default validation status (including errors and warnings).

      Behavior:

      • When the custom validation status is of type 'error', the dialog submission is blocked.
      • If a custom validation status is already set, it will be overwritten.
      • Passing '' (an empty string) as the message parameter resets the custom validation status, which means no custom validation status is displayed.

      If neither the geometry editor nor selectObjects is started, the method call has no effect.

      Parameters

      • message: string

        The message to show in the dialog

      • Optionaltype: CustomValidityType = 'error'

        The type of message (defaults to 'error')

      Returns void

    • Post Message

      Set filter variables in the currently shown workbook.

      Parameters

      Returns Promise<void>

      A Promise for when the filter variables were set.

    • Post Message

      Set the visibility of a layer in the currently shown workbook map view.

      When making a layer visible, its ancestors will be made visible, too. When hiding a layer, the ancestors are not affected.

      Parameters

      • layer: string | WorkbookLayerPath

        The layer to show or hide (identified using a layer path or a print name)

      • visible: boolean

        The visibility state of the layer

      • ...args: any[]

      Returns Promise<void>

      A Promise for when the layer visibility was set.

    • Embed

      Show a page, workbook, worksheet or workbook view in an iframe.

      Parameters

      • source: EmbeddingTargetId | PageSource

        The source to show

      • Optional__namedParameters: {
            dataType?: DataType;
            disabledUiFeatures?: UiFeature[];
            expandNavigator?: boolean;
            filter?: FilterVariables;
            hideMainHeaderAndFooter?: boolean;
            hideWorkbookToolBar?: boolean;
            highlightGlobalId?: GlobalId;
            labelSet?: string;
            layout?: Layout;
            operationMode?: OperationMode;
            signal?: AbortSignal;
            worksheetPlaceholders?: WorksheetPlaceholders;
        }
        • OptionaldataType?: DataType

          Set to 'pdf' for embedding targets of type report and of views with view type of "JasperReports report" to show the generated report PDF directly (without any Cadenza headers or footers).

        • OptionaldisabledUiFeatures?: UiFeature[]

          Cadenza UI features to disable

        • OptionalexpandNavigator?: boolean

          Indicates if the navigator should be expanded.

        • Optionalfilter?: FilterVariables

          Filter variables

        • OptionalhideMainHeaderAndFooter?: boolean

          Whether to hide the main Cadenza header and footer

        • OptionalhideWorkbookToolBar?: boolean

          Whether to hide the workbook toolbar

        • OptionalhighlightGlobalId?: GlobalId

          The ID of an item to highlight / expand in the navigator

        • OptionallabelSet?: string

          The name of a label set defined in the basicweb-config.xml (only supported for the welcome page)

        • Optionallayout?: Layout

          The layout to be used; the dashboard layout is used by default or the linear layout if there is not enough space.

        • OptionaloperationMode?: OperationMode

          The mode in which a workbook should be operated

        • Optionalsignal?: AbortSignal

          A signal to abort the iframe loading

        • OptionalworksheetPlaceholders?: WorksheetPlaceholders

          Maps the worksheet placeholder IDs in report embeddings to the print names of the worksheets to replace them with.

      • ...args: any[] = {}

      Returns Promise<void>

      A Promise for when the iframe is loaded

      For invalid arguments

    • Embed

      Show a workbook map view in an iframe.

      Parameters

      • mapView: EmbeddingTargetId

        The workbook map view to show

      • Optional__namedParameters: {
            additionalLayers?: LayerDefinition[];
            disabledUiFeatures?: UiFeature[];
            expandNavigator?: boolean;
            extentStrategy?: ExtentStrategy;
            filter?: FilterVariables;
            geometry?: Geometry;
            hideMainHeaderAndFooter?: boolean;
            hideWorkbookToolBar?: boolean;
            highlightGlobalId?: GlobalId;
            operationMode?: OperationMode;
            signal?: AbortSignal;
            useMapSrs?: boolean;
        }

        Options

        • OptionaladditionalLayers?: LayerDefinition[]

          Layer definitions to be imported and shown in the background, as a basis for the drawing. IMPORTANT: The Cadenza referenced with cadenzaClient must be configured to support the import of GeoJSON, and the (system) privileges of the corresponding user must also be set in such a way that the import of GeoJSON is possible.

        • OptionaldisabledUiFeatures?: UiFeature[]

          Cadenza UI features to disable

        • OptionalexpandNavigator?: boolean

          Indicates if the navigator should be expanded.

        • OptionalextentStrategy?: ExtentStrategy

          Defines the initial map extent; If not given, Cadenza's default logic is used.

        • Optionalfilter?: FilterVariables

          Filter variables

        • Optionalgeometry?: Geometry

          A geometry to show on the map

        • OptionalhideMainHeaderAndFooter?: boolean

          Whether to hide the main Cadenza header and footer

        • OptionalhideWorkbookToolBar?: boolean

          Whether to hide the workbook toolbar

        • OptionalhighlightGlobalId?: GlobalId

          The ID of an item to highlight / expand in the navigator

        • OptionaloperationMode?: OperationMode

          The mode in which a workbook should be operated

        • Optionalsignal?: AbortSignal

          A signal to abort the iframe loading

        • OptionaluseMapSrs?: boolean

          Whether the coordinates specified in other parameters are specified in the map's SRS (otherwise EPSG:4326 is assumed)

      • ...args: any[] = {}

      Returns Promise<void>

      A Promise for when the iframe is loaded