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.

106 lines (105 loc) 4.73 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, Range, Category, LengthDependsOn, DisplayName, DataType, ContentSection, DataModel, TableView, Attributes, DefaultValue, Description, RegularExpression, ComplexType } from '@progress/sitefinity-widget-designers-sdk'; import { BackgroundStyle } from '../styling/background-style'; import { CustomCssModel } from '../styling/custom-css-model'; import { OffsetStyle } from '../styling/offset-style'; import { SimpleBackgroundStyle } from '../styling/simple-background-style'; import { LabelModel } from './label-model'; let SectionEntity = class SectionEntity { // Quick edit ColumnsCount = 1; CssSystemGridSize = 12; ColumnProportionsInfo = null; // Basic SectionPadding = null; SectionMargin = null; SectionBackground = null; // Column style ColumnsPadding = null; ColumnsBackground = null; TagName = 'section'; CustomCssClass = null; Labels = null; Attributes; }; __decorate([ Range(1, 12, 'Column\u0027s count must be between 1 and 12.'), Category('QuickEdit') ], SectionEntity.prototype, "ColumnsCount", void 0); __decorate([ Category('QuickEdit') ], SectionEntity.prototype, "CssSystemGridSize", void 0); __decorate([ Category('QuickEdit'), DisplayName('Proportions'), LengthDependsOn('ColumnsCount', 'Column', 'Column'), DataType('enumerable', 'string') ], SectionEntity.prototype, "ColumnProportionsInfo", void 0); __decorate([ ContentSection('Section style', 0), DisplayName('Padding'), DataModel(OffsetStyle), DefaultValue(JSON.stringify({ 'Top': 'S', Bottom: 'S', Left: 'None', Right: 'None' })), TableView('Section') ], SectionEntity.prototype, "SectionPadding", void 0); __decorate([ ContentSection('Section style', 1), DisplayName('Margin'), DataModel(OffsetStyle), TableView('Section') ], SectionEntity.prototype, "SectionMargin", void 0); __decorate([ ContentSection('Section style', 1), DisplayName('Background'), DataModel(BackgroundStyle), TableView('Section') ], SectionEntity.prototype, "SectionBackground", void 0); __decorate([ ContentSection('Column style', 0), DisplayName('Padding'), LengthDependsOn('ColumnsCount', 'Column', 'Column '), DataModel(OffsetStyle), DataType('dictionary') ], SectionEntity.prototype, "ColumnsPadding", void 0); __decorate([ ContentSection('Column style', 2), DisplayName('Background'), LengthDependsOn('ColumnsCount', 'Column', 'Column '), DataModel(SimpleBackgroundStyle), DataType('dictionary') ], SectionEntity.prototype, "ColumnsBackground", void 0); __decorate([ Category('Advanced'), DisplayName('Tag name'), Description('Up to twenty characters in the range a-z are allowed'), RegularExpression('^[a-zA-Z]{1,20}$', 'Up to twenty characters in the range a-z and A-Z are allowed.') ], SectionEntity.prototype, "TagName", void 0); __decorate([ Category('Advanced'), ContentSection('Custom CSS classes'), DisplayName('Custom CSS class for...'), LengthDependsOn('ColumnsCount', 'Column', 'Column ', '[{"Name": "Section", "Title": "Section"}]'), DataModel(CustomCssModel), DataType(ComplexType.Dictionary) ], SectionEntity.prototype, "CustomCssClass", void 0); __decorate([ Category('Advanced'), ContentSection('Labels'), DisplayName('Section and column labels'), Description('Custom labels are displayed in the page editor for your convenience. They do not appear on the public site. You can change the generic name for this section and add column labels in the section widget.'), LengthDependsOn('ColumnsCount', 'Column', 'Column ', '[{"Name": "Section", "Title": "Section"}]'), DataModel(LabelModel), DataType(ComplexType.Dictionary) ], SectionEntity.prototype, "Labels", void 0); __decorate([ Attributes({ DisplayName: 'Column', DisplayTitle: 'Column ', PropertyName: 'ColumnsCount', ExtraRecords: '[{\"Name\": \"Section\", \"Title\": \"Section\"}]' }) ], SectionEntity.prototype, "Attributes", void 0); SectionEntity = __decorate([ WidgetEntity('SitefinitySection', 'Section') ], SectionEntity); export { SectionEntity };