...
DigizuiteInitPostMessage
- So you know it is the Digizuite IframeDigizuiteChangeUrlPostMessage
- If the user tries to change URLDigizuiteAssetPostMessage
- When a user clicks on asset. When multi-select you receive more.
Code Block |
---|
export enum MessageType {
AssetMessage = 'AssetMessage',
ChangeUrl = 'ChangeUrl',
SmartPickerInitialized = 'SmartPickerInitialized',
}
export interface DigizuitePostMessage {
messageType: MessageType;
}
export class DigizuiteInitPostMessage implements DigizuitePostMessage {
messageType = MessageType.SmartPickerInitialized;
}
export class DigizuiteChangeUrlPostMessage implements DigizuitePostMessage {
messageType = MessageType.ChangeUrl;
mmUrl: string;
constructor(mmUrl: string) {
this.mmUrl = mmUrl;
}
}
export class DigizuiteAssetPostMessage implements DigizuitePostMessage {
messageType = MessageType.AssetMessage;
asset: AssetMessage;
constructor(asset: AssetMessage) {
this.asset = asset;
}
}
export interface AssetMessage {
assetId: number;
itemId: number;
title: string;
description: string;
downloadUrl: string;
thumb: string;
extension: string;
} |
...