@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.
93 lines (92 loc) • 3.7 kB
JavaScript
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, ContentSection, DataModel, DataType, Description, DisplayName, KnownFieldTypes, Margins, Placeholder, Required, ViewSelector, WidgetEntity, WidgetLabel } from '@progress/sitefinity-widget-designers-sdk';
import { ClassificationSettings } from '../common/classification-settings';
let ClassificationEntity = class ClassificationEntity {
ClassificationSettings = null;
// List settings
OrderBy = 'Title ASC';
ShowItemCount = true;
ShowEmpty = false;
// Display settings
SfViewName = 'Default';
Margins = null;
// Advanced
SfWidgetLabel = 'Classification';
CssClass = null;
SortExpression = null;
Attributes;
};
__decorate([
ContentSection('Select classification to display', 0),
DisplayName('Classification'),
DataType('taxonSelector'),
DataModel(ClassificationSettings),
Required('Please select a classification'),
Placeholder('Select classification')
], ClassificationEntity.prototype, "ClassificationSettings", void 0);
__decorate([
ContentSection('List settings', 0),
Choice({
ServiceUrl: '{0}/Default.Sorters()?frontend=True',
ServiceCallParameters: '[{ \u0022taxaUrl\u0022 : \u0022{0}\u0022}]'
}),
DisplayName('Sort items'),
DataType(KnownFieldTypes.Choices)
], ClassificationEntity.prototype, "OrderBy", void 0);
__decorate([
ContentSection('List settings', 1),
DisplayName('Display item count'),
DataType(KnownFieldTypes.ChipChoice),
Choice({ Choices: [
{ Name: 'Yes', Value: 'True' },
{ Name: 'No', Value: 'False' }
]
})
], ClassificationEntity.prototype, "ShowItemCount", void 0);
__decorate([
ContentSection('List settings', 2),
DisplayName('Display empty tags or categories'),
DataType(KnownFieldTypes.ChipChoice),
Choice({ Choices: [
{ Name: 'Yes', Value: 'True' },
{ Name: 'No', Value: 'False' }
]
})
], ClassificationEntity.prototype, "ShowEmpty", void 0);
__decorate([
ContentSection('Display settings'),
DisplayName('Classification template'),
ViewSelector([
{ Value: 'Default' }
])
], ClassificationEntity.prototype, "SfViewName", void 0);
__decorate([
ContentSection('Display settings', 1),
Margins('Classification')
], ClassificationEntity.prototype, "Margins", void 0);
__decorate([
WidgetLabel()
], ClassificationEntity.prototype, "SfWidgetLabel", void 0);
__decorate([
Category('Advanced'),
DataType('string'),
DisplayName('CSS class')
], ClassificationEntity.prototype, "CssClass", void 0);
__decorate([
Category('Advanced'),
DisplayName('Sort expression'),
DataType('string'),
Description('Custom sort expression, used if default sorting options are not suitable.')
], ClassificationEntity.prototype, "SortExpression", void 0);
__decorate([
Attributes('Classification')
], ClassificationEntity.prototype, "Attributes", void 0);
ClassificationEntity = __decorate([
WidgetEntity('SitefinityClassification', 'Classification')
], ClassificationEntity);
export { ClassificationEntity };