UNPKG

@progress/sitefinity-nextjs-sdk

Version:

Provides OOB widgets developed using the Next.js framework, which includes an abstraction layer for Sitefinity communication. Additionally, it offers an expanded API, typings, and tools for further development and integration.

75 lines (74 loc) 3.49 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { WidgetEntity } from '@progress/sitefinity-widget-designers-sdk/decorators/widget-entity'; import { OffsetStyle } from '../styling/offset-style'; import { ContentContainer } from '@progress/sitefinity-widget-designers-sdk/decorators/content-container'; import { DataModel, DataType } from '@progress/sitefinity-widget-designers-sdk/decorators/data-type'; import { KnownFieldTypes } from '@progress/sitefinity-widget-designers-sdk/common'; import { WidgetLabel } from '@progress/sitefinity-widget-designers-sdk/decorators/widget-label'; import { Category } from '@progress/sitefinity-widget-designers-sdk/decorators/category'; import { DisplayName } from '@progress/sitefinity-widget-designers-sdk/decorators/display-name'; import { ContentSection } from '@progress/sitefinity-widget-designers-sdk/decorators/content-section'; import { TableView } from '@progress/sitefinity-widget-designers-sdk/decorators/table-view'; import { Attributes } from '@progress/sitefinity-widget-designers-sdk/decorators/attributes'; import { RegularExpression } from '@progress/sitefinity-widget-designers-sdk/decorators/validations'; let ContentBlockEntity = class ContentBlockEntity { Content = null; ProviderName = null; SharedContentID = null; //Advanced SfWidgetLabel = 'Content block'; WrapperCssClass = null; TagName = 'div'; Paddings = null; Margins = null; Attributes = null; }; __decorate([ ContentContainer(), DataType(KnownFieldTypes.Html) ], ContentBlockEntity.prototype, "Content", void 0); __decorate([ DataType('string') ], ContentBlockEntity.prototype, "ProviderName", void 0); __decorate([ DataType('uuid') ], ContentBlockEntity.prototype, "SharedContentID", void 0); __decorate([ WidgetLabel() ], ContentBlockEntity.prototype, "SfWidgetLabel", void 0); __decorate([ Category('Advanced'), DisplayName('CSS class'), DataType('string') ], ContentBlockEntity.prototype, "WrapperCssClass", void 0); __decorate([ Category('Advanced'), DisplayName('Tag name'), RegularExpression('^[a-zA-Z]{1,20}$', 'Up to twenty characters in the range a-z and A-Z are allowed.') ], ContentBlockEntity.prototype, "TagName", void 0); __decorate([ Category('Advanced'), ContentSection('Display settings', 1), DisplayName('Padding'), DataModel(OffsetStyle), TableView('Content block') ], ContentBlockEntity.prototype, "Paddings", void 0); __decorate([ Category('Advanced'), ContentSection('Display settings', 2), DisplayName('Margins'), DataModel(OffsetStyle), TableView('Content block') ], ContentBlockEntity.prototype, "Margins", void 0); __decorate([ Attributes('ContentBlock', 'Content block', 1) ], ContentBlockEntity.prototype, "Attributes", void 0); ContentBlockEntity = __decorate([ WidgetEntity('SitefinityContentBlock', 'Content block') ], ContentBlockEntity); export { ContentBlockEntity };