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.

71 lines 3.28 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"; export class PlaceholderPermissions { constructor() { this._allowEditContent = true; this.showSelectButtonConstraint = null; this._showSelectButton = true; this.propertyChanged = new EventObject(); } get allowEditContent() { return this._allowEditContent; } set allowEditContent(value) { if (this._allowEditContent === value) return; this._allowEditContent = value; this.propertyChanged.notify(); } get showSelectButton() { return this.showSelectButtonConstraint != null ? this.showSelectButtonConstraint : this._showSelectButton; } set showSelectButton(value) { if (this._showSelectButton === value) return; this._showSelectButton = value; this.propertyChanged.notify(); } getSimplifiedObject() { const result = {}; result["allowEditContent"] = this.allowEditContent; result["showSelectButton"] = this.showSelectButton; result["showHandleButton"] = this.showHandleButton; result["showSelectButtonConstraint"] = this.showSelectButtonConstraint; return result; } clone() { const clone = new PlaceholderPermissions(); clone.allowEditContent = this._allowEditContent; clone.showSelectButton = this._showSelectButton; clone.showSelectButtonConstraint = this.showSelectButtonConstraint; clone.showHandleButton = this.showHandleButton; return clone; } equals(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); //# sourceMappingURL=PlaceholderPermissions.js.map