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.

80 lines 3.9 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 PlaceholderPermissions = /** @class */ (function () { function PlaceholderPermissions() { this._allowEditContent = true; this.showSelectButtonConstraint = null; this._showSelectButton = true; this.propertyChanged = new EventObject(); } Object.defineProperty(PlaceholderPermissions.prototype, "allowEditContent", { get: function () { return this._allowEditContent; }, set: function (value) { if (this._allowEditContent === value) return; this._allowEditContent = value; this.propertyChanged.notify(); }, enumerable: true, configurable: true }); Object.defineProperty(PlaceholderPermissions.prototype, "showSelectButton", { get: function () { return this.showSelectButtonConstraint != null ? this.showSelectButtonConstraint : this._showSelectButton; }, set: function (value) { if (this._showSelectButton === value) return; this._showSelectButton = value; this.propertyChanged.notify(); }, enumerable: true, configurable: true }); PlaceholderPermissions.prototype.getSimplifiedObject = function () { var result = {}; result["allowEditContent"] = this.allowEditContent; result["showSelectButton"] = this.showSelectButton; result["showHandleButton"] = this.showHandleButton; result["showSelectButtonConstraint"] = this.showSelectButtonConstraint; return result; }; PlaceholderPermissions.prototype.clone = function () { var clone = new PlaceholderPermissions(); clone.allowEditContent = this._allowEditContent; clone.showSelectButton = this._showSelectButton; clone.showSelectButtonConstraint = this.showSelectButtonConstraint; clone.showHandleButton = this.showHandleButton; return clone; }; PlaceholderPermissions.prototype.equals = function (p) { return this.allowEditContent === p.allowEditContent && this.showSelectButton === p.showSelectButton && this.showSelectButtonConstraint === p.showSelectButtonConstraint && this.showHandleButton === p.showHandleButton; }; __decorate([ Property({ ignore: true, type: "boolean" }), __metadata("design:type", Boolean) ], PlaceholderPermissions.prototype, "showSelectButtonConstraint", void 0); __decorate([ PropertyChanged(), Property({ factory: new SimplePropertyFactory(true) }), __metadata("design:type", Boolean) ], PlaceholderPermissions.prototype, "showHandleButton", void 0); return PlaceholderPermissions; }()); export { PlaceholderPermissions }; //# sourceMappingURL=PlaceholderPermissions.js.map