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.

90 lines (89 loc) 4.78 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 { OffsetStyle } from '../styling/offset-style'; import { ButtonStyle } from './button-style'; import { AlignmentStyle } from './alignment-style'; import { WidgetEntity } from '@progress/sitefinity-widget-designers-sdk/decorators/widget-entity'; import { DisplayName } from '@progress/sitefinity-widget-designers-sdk/decorators/display-name'; import { ContentSection } from '@progress/sitefinity-widget-designers-sdk/decorators/content-section'; import { DescriptionExtended } from '@progress/sitefinity-widget-designers-sdk/decorators/description'; import { DataModel, DataType } from '@progress/sitefinity-widget-designers-sdk/decorators/data-type'; import { ComplexType, ContentSectionTitles } from '@progress/sitefinity-widget-designers-sdk/common'; import { LengthDependsOn } from '@progress/sitefinity-widget-designers-sdk/decorators/length-depends-on'; import { TableView } from '@progress/sitefinity-widget-designers-sdk/decorators/table-view'; import { WidgetLabel } from '@progress/sitefinity-widget-designers-sdk/decorators/widget-label'; import { Category } from '@progress/sitefinity-widget-designers-sdk/decorators/category'; import { Attributes, KeysValues } from '@progress/sitefinity-widget-designers-sdk/decorators/attributes'; import { DefaultValue } from '@progress/sitefinity-widget-designers-sdk/decorators/default-value'; let CallToActionEntity = class CallToActionEntity { PrimaryActionLabel; PrimaryActionLink; SecondaryActionLabel; SecondaryActionLink; Style; Position; Margins = null; SfWidgetLabel = 'Call to action'; CssClass; Attributes = null; }; __decorate([ DisplayName('Action label'), ContentSection('Primary action', 1), DescriptionExtended({ InstructionalNotes: 'Example: Learn more' }) ], CallToActionEntity.prototype, "PrimaryActionLabel", void 0); __decorate([ DisplayName('Action link'), ContentSection('Primary action', 2), DataType('linkSelector') ], CallToActionEntity.prototype, "PrimaryActionLink", void 0); __decorate([ DisplayName('Action label'), ContentSection('Secondary action', 1), DescriptionExtended({ InstructionalNotes: 'Example: Learn more' }) ], CallToActionEntity.prototype, "SecondaryActionLabel", void 0); __decorate([ DisplayName('Action link'), ContentSection('Secondary action', 2), DataType('linkSelector') ], CallToActionEntity.prototype, "SecondaryActionLink", void 0); __decorate([ DataType(ComplexType.Dictionary), ContentSection(ContentSectionTitles.DisplaySettings), DataModel(ButtonStyle), LengthDependsOn({ ExtraRecords: '[{\"Name\": \"Primary\", \"Title\": \"Primary\"}, {\"Name\": \"Secondary\", \"Title\": \"Secondary\"}]', DisplayName: '', DisplayTitle: '', PropertyName: null }), DefaultValue(JSON.stringify({ Primary: { DisplayStyle: 'Primary' }, Secondary: { DisplayStyle: 'Secondary' } })) ], CallToActionEntity.prototype, "Style", void 0); __decorate([ DataType(ComplexType.Dictionary), ContentSection(ContentSectionTitles.DisplaySettings), DataModel(AlignmentStyle), LengthDependsOn({ ExtraRecords: '[{\"Name\": \"CTA\", \"Title\": \"CTA\"}]', DisplayName: '', DisplayTitle: '', PropertyName: null }) ], CallToActionEntity.prototype, "Position", void 0); __decorate([ ContentSection(ContentSectionTitles.DisplaySettings, 1), DisplayName('Margins'), DataModel(OffsetStyle), TableView('CTA') ], CallToActionEntity.prototype, "Margins", void 0); __decorate([ WidgetLabel() ], CallToActionEntity.prototype, "SfWidgetLabel", void 0); __decorate([ Category('Advanced'), DisplayName('CSS class') ], CallToActionEntity.prototype, "CssClass", void 0); __decorate([ Attributes({ ExtraRecords: '[{"Name": "Wrapper", "Title": "Wrapper"},{"Name": "Primary", "Title": "Primary"},{"Name": "Secondary", "Title": "Secondary"}]', DisplayName: '', DisplayTitle: ' ', PropertyName: null }), ContentSection('Attributes'), Category('Advanced'), DataModel(KeysValues) ], CallToActionEntity.prototype, "Attributes", void 0); CallToActionEntity = __decorate([ WidgetEntity('SitefinityButton', 'Call to action') ], CallToActionEntity); export { CallToActionEntity };