@progress/sitefinity-widget-designers-sdk
Version:
This package aims to create a parity for widget designer generation similar to the [autogenerated widget designers](https://www.progress.com/documentation/sitefinity-cms/next.js-autogenerated-field-types) in Sitefinity. Due to some limitations in Typescri
30 lines (29 loc) • 1.62 kB
TypeScript
/**
* Class decorator
* Defines the decorated class as a widget entity.
* Calls internally the {@link Model} decorator on the entity class.
* @param {string} name The widget's name.
* @param {string?} caption The widget display caption.
*/
export declare function WidgetEntity(name: string, caption?: string): (target: any, context?: any) => void;
/**
* Class decorator
* Defines the widget entity's sections ordering in the designer.
* @param {string[]} sections The sections titles in the order they need to appear in the designer.
*/
export declare function SectionsOrder(sections: string[]): (target: any, context?: any) => void;
/**
* Class decorator
* Defines the decorated class as a data model.
* Enumerates the class properties, defines their name, title and default value (if such is set).
* The class properties are suggested to be defined with a default value to be enumerated properly.
* Properties that have their default value set as undefined or null will not get their default type, receiving 'string' as their type and would need to have the {@link DataType} decorator set as well.
* @param {boolean?} [capitalizeProperties] Defines whether the object properties should be capitalized in their designer metadata names but retain their original spelling in the js object.
* Analoguous to the C# synthax:
* @example
* [DataMember(Name = "warning")]
* public string Warning { get; set; }
*/
export declare function Model(): any;
export declare function Model(capitalizeProperties: boolean): any;
export declare function MappedType(type: string): (target: any, context?: any) => void;