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.

124 lines (123 loc) 5.98 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, KnownFieldTypes, Margins, PropertyCategory, ViewSelector, WidgetEntity, WidgetLabel } from '@progress/sitefinity-widget-designers-sdk'; import { PostPasswordChangeAction } from './interfaces/post-password-change-action'; import { DisplayName } from '@progress/sitefinity-widget-designers-sdk'; import { RestSdkTypes } from '../../rest-sdk/rest-client'; let ChangePasswordEntity = class ChangePasswordEntity { PostPasswordChangeAction = PostPasswordChangeAction.ViewAMessage; PostPasswordChangeRedirectPage; PostPasswordChangeMessage = 'Your password was changed successfully!'; SfViewName = 'Default'; Margins; // Advanced SfWidgetLabel = 'Change password'; CssClass; Header = 'Change password'; CurrentPassword = 'Current password'; NewPassword = 'New password'; ConfirmPassword = 'Repeat new password'; SubmitButtonLabel = 'Save'; LoginFirstMessage = 'You need to be logged in to change your password.'; ValidationRequiredMessage = 'All fields are required.'; ValidationMismatchMessage = 'New password and repeat password don\'t match.'; ExternalProviderMessageFormat = 'Your profile does not store any passwords, because you are registered with {0}'; Attributes; }; __decorate([ ContentSection('Change password setup'), DisplayName('After change users will...'), DataType(KnownFieldTypes.RadioChoice), Choice([ { Title: 'View a message', Value: PostPasswordChangeAction.ViewAMessage }, { Title: 'Redirect to page...', Value: PostPasswordChangeAction.RedirectToPage } ]) ], ChangePasswordEntity.prototype, "PostPasswordChangeAction", void 0); __decorate([ Content({ Type: RestSdkTypes.Pages, AllowMultipleItemsSelection: false }), DisplayName(''), ContentSection('Change password setup', 1), ConditionalVisibility('{\u0022conditions\u0022:[{\u0022fieldName\u0022:\u0022PostPasswordChangeAction\u0022,\u0022operator\u0022:\u0022Equals\u0022,\u0022value\u0022:\u0022RedirectToPage\u0022}],\u0022inline\u0022:\u0022true\u0022}'), DefaultValue(null) ], ChangePasswordEntity.prototype, "PostPasswordChangeRedirectPage", void 0); __decorate([ DisplayName('Message'), ContentSection('Change password setup', 2), DataType(KnownFieldTypes.TextArea), ConditionalVisibility('{\u0022conditions\u0022:[{\u0022fieldName\u0022:\u0022PostPasswordChangeAction\u0022,\u0022operator\u0022:\u0022Equals\u0022,\u0022value\u0022:\u0022ViewAMessage\u0022}]}') ], ChangePasswordEntity.prototype, "PostPasswordChangeMessage", void 0); __decorate([ ContentSection('Display settings', 0), DisplayName('Change password template'), ViewSelector([{ Value: 'Default' }]) ], ChangePasswordEntity.prototype, "SfViewName", void 0); __decorate([ ContentSection('Display settings', 1), Margins('Change password') ], ChangePasswordEntity.prototype, "Margins", void 0); __decorate([ WidgetLabel() ], ChangePasswordEntity.prototype, "SfWidgetLabel", void 0); __decorate([ DisplayName('CSS class'), Category(PropertyCategory.Advanced) ], ChangePasswordEntity.prototype, "CssClass", void 0); __decorate([ Category(PropertyCategory.Advanced), ContentSection('Labels and messages'), DisplayName('Change password header') ], ChangePasswordEntity.prototype, "Header", void 0); __decorate([ Category(PropertyCategory.Advanced), ContentSection('Labels and messages'), DisplayName('Current password field label') ], ChangePasswordEntity.prototype, "CurrentPassword", void 0); __decorate([ Category(PropertyCategory.Advanced), ContentSection('Labels and messages'), DisplayName('New password field label') ], ChangePasswordEntity.prototype, "NewPassword", void 0); __decorate([ Category(PropertyCategory.Advanced), ContentSection('Labels and messages'), DisplayName('Repeat password field label') ], ChangePasswordEntity.prototype, "ConfirmPassword", void 0); __decorate([ Category(PropertyCategory.Advanced), ContentSection('Labels and messages'), DisplayName('Submit button') ], ChangePasswordEntity.prototype, "SubmitButtonLabel", void 0); __decorate([ Category(PropertyCategory.Advanced), ContentSection('Labels and messages'), DisplayName('Login error message') ], ChangePasswordEntity.prototype, "LoginFirstMessage", void 0); __decorate([ Category(PropertyCategory.Advanced), ContentSection('Labels and messages'), DisplayName('Required fields error message') ], ChangePasswordEntity.prototype, "ValidationRequiredMessage", void 0); __decorate([ Category(PropertyCategory.Advanced), ContentSection('Labels and messages'), DisplayName('Password mismatch error message') ], ChangePasswordEntity.prototype, "ValidationMismatchMessage", void 0); __decorate([ Category(PropertyCategory.Advanced), ContentSection('Labels and messages'), DisplayName('External provider message') ], ChangePasswordEntity.prototype, "ExternalProviderMessageFormat", void 0); __decorate([ Attributes('ChangePassword', 'Change password') ], ChangePasswordEntity.prototype, "Attributes", void 0); ChangePasswordEntity = __decorate([ WidgetEntity('SitefinityChangePassword', 'Change password') ], ChangePasswordEntity); export { ChangePasswordEntity };