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.

102 lines (101 loc) 4.51 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 { Attributes, Category, Choice, ConditionalVisibility, Content, ContentSection, DataType, DefaultValue, DisplayName, IsNullable, KnownFieldTypes, Margins, ViewSelector, WidgetEntity, WidgetLabel } from '@progress/sitefinity-widget-designers-sdk'; let NavigationEntity = class NavigationEntity { SelectionMode; SelectedPage; CustomSelectedPages; LevelsToInclude; Margins; // Display settings SfViewName; // Advanced SfWidgetLabel = 'Navigation'; WrapperCssClass; ShowParentPage; Attributes; }; __decorate([ ContentSection('Select pages'), DisplayName('Display...'), DefaultValue('TopLevelPages'), DataType(KnownFieldTypes.RadioChoice), Choice([ { Title: 'Top-level pages (and their child-pages if template allows)', Value: 'TopLevelPages' }, { Title: 'All pages under particular page...', Value: 'SelectedPageChildren' }, { Title: 'All pages under currently opened page', Value: 'CurrentPageChildren' }, { Title: 'All sibling pages of currently opened page', Value: 'CurrentPageSiblings' }, { Title: 'Custom selection of pages...', Value: 'SelectedPages' } ]) ], NavigationEntity.prototype, "SelectionMode", void 0); __decorate([ Content({ Type: 'Telerik.Sitefinity.Pages.Model.PageNode', AllowMultipleItemsSelection: false }), ContentSection('Select pages'), DisplayName(''), ConditionalVisibility('{\u0022conditions\u0022:[{\u0022fieldName\u0022:\u0022SelectionMode\u0022,\u0022operator\u0022:\u0022Equals\u0022,\u0022value\u0022:\u0022SelectedPageChildren\u0022}],\u0022inline\u0022:\u0022true\u0022}') ], NavigationEntity.prototype, "SelectedPage", void 0); __decorate([ ContentSection('Select pages'), Content({ Type: 'Telerik.Sitefinity.Pages.Model.PageNode', OpenMultipleItemsSelection: true }), DisplayName(''), ConditionalVisibility('{\u0022conditions\u0022:[{\u0022fieldName\u0022:\u0022SelectionMode\u0022,\u0022operator\u0022:\u0022Equals\u0022,\u0022value\u0022:\u0022SelectedPages\u0022}],\u0022inline\u0022:\u0022true\u0022}') ], NavigationEntity.prototype, "CustomSelectedPages", void 0); __decorate([ ContentSection('Select pages'), DisplayName('Levels to include'), DefaultValue('1'), DataType(KnownFieldTypes.ChipChoice), Choice({ Choices: [ { Title: '1 level', Name: '1', Value: 1 }, { Title: '2 levels', Name: '2', Value: 2 }, { Title: '3 levels', Name: '3', Value: 3 }, { Title: '4 levels', Name: '4', Value: 4 }, { Title: '5 levels', Name: '5', Value: 5 }, { Title: 'All levels', Name: 'All', Value: null } ], NotResponsive: true }), IsNullable(true) ], NavigationEntity.prototype, "LevelsToInclude", void 0); __decorate([ ContentSection('Display settings', 1), Margins('Navigation') ], NavigationEntity.prototype, "Margins", void 0); __decorate([ ContentSection('Display settings', 2), DisplayName('View'), DefaultValue('Horizontal'), ViewSelector([ { Value: 'Accordion' }, { Value: 'Horizontal' }, { Value: 'Tabs' }, { Value: 'Vertical' } ]) ], NavigationEntity.prototype, "SfViewName", void 0); __decorate([ WidgetLabel(), Category('Advanced') ], NavigationEntity.prototype, "SfWidgetLabel", void 0); __decorate([ Category('Advanced'), DisplayName('CSS class'), DataType('string') ], NavigationEntity.prototype, "WrapperCssClass", void 0); __decorate([ Category('Advanced'), DefaultValue(false), DisplayName('Show parent page') ], NavigationEntity.prototype, "ShowParentPage", void 0); __decorate([ Category('Advanced'), Attributes('Navigation') ], NavigationEntity.prototype, "Attributes", void 0); NavigationEntity = __decorate([ WidgetEntity('SitefinityNavigation', 'Navigation') ], NavigationEntity); export { NavigationEntity };