UNPKG

@aurigma/design-atoms-model

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

122 lines 6.1 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; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { EventObject } from "../../EventObject"; import { SimplePropertyFactory } from "../Decorators/Factory"; import { Property } from "../Decorators/Property"; import { PropertyChanged } from "../Decorators/PropertyChanged"; var TextPermissions = /** @class */ (function () { function TextPermissions(defaultValue) { this.propertyChanged = new EventObject(); if (defaultValue == null) defaultValue = true; this.allowChangeText = defaultValue; this.allowChangeFont = defaultValue; this.allowChangeFontSize = defaultValue; this.allowChangeFontColor = defaultValue; this.allowChangeTextAlignment = defaultValue; this.allowChangeTextBIU = defaultValue; this.allowChangeShadow = defaultValue; this.allowChangeStroke = defaultValue; this.allowChangeLeading = defaultValue; this.allowTextFormatting = null; this.allowChangeStrokeColor = defaultValue; } TextPermissions.prototype.clone = function () { var clone = new TextPermissions(); clone.allowChangeFont = this.allowChangeFont; clone.allowChangeFontColor = this.allowChangeFontColor; clone.allowChangeFontSize = this.allowChangeFontSize; clone.allowChangeShadow = this.allowChangeShadow; clone.allowChangeStroke = this.allowChangeStroke; clone.allowChangeText = this.allowChangeText; clone.allowChangeTextAlignment = this.allowChangeTextAlignment; clone.allowChangeTextBIU = this.allowChangeTextBIU; clone.allowChangeLeading = this.allowChangeLeading; clone.allowTextFormatting = this.allowTextFormatting; clone.allowChangeStrokeColor = this.allowChangeStrokeColor; return clone; }; TextPermissions.prototype.equals = function (p) { return (this.allowChangeFont === p.allowChangeFont && this.allowChangeFontColor === p.allowChangeFontColor && this.allowChangeFontSize === p.allowChangeFontSize && this.allowChangeShadow === p.allowChangeShadow && this.allowChangeStroke === p.allowChangeStroke && this.allowChangeText === p.allowChangeText && this.allowChangeTextAlignment === p.allowChangeTextAlignment && this.allowChangeTextBIU === p.allowChangeTextBIU && this.allowChangeLeading === p.allowChangeLeading && this.allowTextFormatting === p.allowTextFormatting && this.allowChangeStrokeColor === p.allowChangeStrokeColor); }; TextPermissions.prototype.getSimplifiedObject = function () { var result = {}; result["allowChangeText"] = this.allowChangeText; result["allowChangeFont"] = this.allowChangeFont; result["allowChangeFontSize"] = this.allowChangeFontSize; result["allowChangeFontColor"] = this.allowChangeFontColor; result["allowChangeTextAlignment"] = this.allowChangeTextAlignment; result["allowChangeTextBIU"] = this.allowChangeTextBIU; result["allowChangeShadow"] = this.allowChangeShadow; result["allowChangeStroke"] = this.allowChangeStroke; result["allowChangeLeading"] = this.allowChangeLeading; result["allowTextFormatting"] = this.allowTextFormatting; result["allowChangeStrokeColor"] = this.allowChangeStrokeColor; return result; }; __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeText", void 0); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeFont", void 0); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeFontSize", void 0); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeFontColor", void 0); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeTextAlignment", void 0); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeTextBIU", void 0); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeShadow", void 0); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeStroke", void 0); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeStrokeColor", void 0); __decorate([ PropertyChanged(), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowChangeLeading", void 0); __decorate([ PropertyChanged(), Property({ factory: new SimplePropertyFactory(true) }), __metadata("design:type", Boolean) ], TextPermissions.prototype, "allowTextFormatting", void 0); return TextPermissions; }()); export { TextPermissions }; //# sourceMappingURL=TextPermissions.js.map